
/**
 * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
 *
 * Do not edit this file as changes may cause incorrect behavior and will be lost
 * once the code is regenerated.
 *
 * @generated by codegen project: GenerateModuleJavaSpec.js
 *
 * @nolint
 */

package com.clevertap.react;

import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.common.build.ReactBuildConfig;
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public abstract class NativeCleverTapModuleSpec extends ReactContextBaseJavaModule implements TurboModule {
  public static final String NAME = "CleverTapReact";

  public NativeCleverTapModuleSpec(ReactApplicationContext reactContext) {
    super(reactContext);
  }

  @Override
  public @Nonnull String getName() {
    return NAME;
  }

  protected abstract Map<String, Object> getTypedExportedConstants();

  @Override
  @DoNotStrip
  public final @Nullable Map<String, Object> getConstants() {
    Map<String, Object> constants = getTypedExportedConstants();
    if (ReactBuildConfig.DEBUG || ReactBuildConfig.IS_INTERNAL_BUILD) {
      Set<String> obligatoryFlowConstants = new HashSet<>(Arrays.asList(
          "BPS",
          "CleverTapCustomFunctionPresent",
          "CleverTapCustomTemplateClose",
          "CleverTapCustomTemplatePresent",
          "CleverTapDisplayUnitsLoaded",
          "CleverTapFeatureFlagsDidUpdate",
          "CleverTapInAppNotificationButtonTapped",
          "CleverTapInAppNotificationDismissed",
          "CleverTapInAppNotificationShowed",
          "CleverTapInboxDidInitialize",
          "CleverTapInboxMessageButtonTapped",
          "CleverTapInboxMessageTapped",
          "CleverTapInboxMessagesDidUpdate",
          "CleverTapOnFileValueChanged",
          "CleverTapOnOneTimeVariablesChanged",
          "CleverTapOnValueChanged",
          "CleverTapOnVariablesChanged",
          "CleverTapOnVariablesChangedAndNoDownloadsPending",
          "CleverTapOnceVariablesChangedAndNoDownloadsPending",
          "CleverTapProductConfigDidActivate",
          "CleverTapProductConfigDidFetch",
          "CleverTapProductConfigDidInitialize",
          "CleverTapProfileDidInitialize",
          "CleverTapProfileSync",
          "CleverTapPushNotificationClicked",
          "CleverTapPushPermissionResponseReceived",
          "FCM",
          "HPS"
      ));
      Set<String> optionalFlowConstants = new HashSet<>();
      Set<String> undeclaredConstants = new HashSet<>(constants.keySet());
      undeclaredConstants.removeAll(obligatoryFlowConstants);
      undeclaredConstants.removeAll(optionalFlowConstants);
      if (!undeclaredConstants.isEmpty()) {
        throw new IllegalStateException(String.format("Native Module Flow doesn't declare constants: %s", undeclaredConstants));
      }
      undeclaredConstants = obligatoryFlowConstants;
      undeclaredConstants.removeAll(constants.keySet());
      if (!undeclaredConstants.isEmpty()) {
        throw new IllegalStateException(String.format("Native Module doesn't fill in constants: %s", undeclaredConstants));
      }
    }
    return constants;
  }

  @ReactMethod
  @DoNotStrip
  public abstract void setInstanceWithAccountId(String accountId);

  @ReactMethod
  @DoNotStrip
  public abstract void getInitialUrl(Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void setLibrary(String name, double andVersion);

  @ReactMethod
  @DoNotStrip
  public abstract void setLocale(String locale);

  @ReactMethod
  @DoNotStrip
  public abstract void registerForPush();

  @ReactMethod
  @DoNotStrip
  public abstract void setPushTokenAsString(String token, String withType);

  @ReactMethod
  @DoNotStrip
  public abstract void setPushTokenAsStringWithRegion(String token, String withType, String withRegion);

  @ReactMethod
  @DoNotStrip
  public abstract void enablePersonalization();

  @ReactMethod
  @DoNotStrip
  public abstract void disablePersonalization();

  @ReactMethod
  @DoNotStrip
  public abstract void setOffline(boolean enabled);

  @ReactMethod
  @DoNotStrip
  public abstract void setOptOut(boolean enabled);

  @ReactMethod
  @DoNotStrip
  public abstract void enableDeviceNetworkInfoReporting(boolean enabled);

  @ReactMethod
  @DoNotStrip
  public abstract void recordScreenView(String screenName);

  @ReactMethod
  @DoNotStrip
  public abstract void recordEvent(String eventName, @Nullable ReadableMap withProps);

  @ReactMethod
  @DoNotStrip
  public abstract void recordChargedEvent(@Nullable ReadableMap details, ReadableArray andItems);

  @ReactMethod
  @DoNotStrip
  public abstract void eventGetFirstTime(String eventName, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void eventGetLastTime(String eventName, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void eventGetOccurrences(String eventName, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void eventGetDetail(String eventName, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getUserEventLog(String eventName, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getUserEventLogCount(String eventName, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getEventHistory(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getUserEventLogHistory(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void setLocation(double location, double longitude);

  @ReactMethod
  @DoNotStrip
  public abstract void profileGetCleverTapAttributionIdentifier(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void profileGetCleverTapID(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getCleverTapID(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void onUserLogin(@Nullable ReadableMap profile);

  @ReactMethod
  @DoNotStrip
  public abstract void profileSet(@Nullable ReadableMap profile);

  @ReactMethod
  @DoNotStrip
  public abstract void profileGetProperty(String propertyName, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void profileRemoveValueForKey(String key);

  @ReactMethod
  @DoNotStrip
  public abstract void profileSetMultiValues(ReadableArray values, String forKey);

  @ReactMethod
  @DoNotStrip
  public abstract void profileAddMultiValue(String value, String forKey);

  @ReactMethod
  @DoNotStrip
  public abstract void profileAddMultiValues(ReadableArray values, String forKey);

  @ReactMethod
  @DoNotStrip
  public abstract void profileRemoveMultiValue(String value, String forKey);

  @ReactMethod
  @DoNotStrip
  public abstract void profileRemoveMultiValues(ReadableArray values, String forKey);

  @ReactMethod
  @DoNotStrip
  public abstract void profileIncrementValueForKey(@Nullable Double value, String forKey);

  @ReactMethod
  @DoNotStrip
  public abstract void profileDecrementValueForKey(@Nullable Double value, String forKey);

  @ReactMethod
  @DoNotStrip
  public abstract void pushInstallReferrer(String source, String medium, String campaign);

  @ReactMethod
  @DoNotStrip
  public abstract void sessionGetTimeElapsed(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void sessionGetTotalVisits(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void sessionGetScreenCount(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void sessionGetPreviousVisitTime(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void sessionGetUTMDetails(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getUserLastVisitTs(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getUserAppLaunchCount(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void createNotificationChannel(String channelId, String withChannelName, String withChannelDescription, double withImportance, boolean withShowBadge);

  @ReactMethod
  @DoNotStrip
  public abstract void createNotificationChannelWithSound(String channelId, String withChannelName, String withChannelDescription, double withImportance, boolean withShowBadge, String withSound);

  @ReactMethod
  @DoNotStrip
  public abstract void createNotificationChannelWithGroupId(String channelId, String withChannelName, String withChannelDescription, double withImportance, String withGroupId, boolean withShowBadge);

  @ReactMethod
  @DoNotStrip
  public abstract void createNotificationChannelWithGroupIdAndSound(String channelId, String withChannelName, String withChannelDescription, double withImportance, String withGroupId, boolean withShowBadge, String withSound);

  @ReactMethod
  @DoNotStrip
  public abstract void createNotificationChannelGroup(String groupId, String withGroupName);

  @ReactMethod
  @DoNotStrip
  public abstract void deleteNotificationChannel(String channelId);

  @ReactMethod
  @DoNotStrip
  public abstract void deleteNotificationChannelGroup(String groupId);

  @ReactMethod
  @DoNotStrip
  public abstract void createNotification(@Nullable ReadableMap extras);

  @ReactMethod
  @DoNotStrip
  public abstract void setDebugLevel(double level);

  @ReactMethod
  @DoNotStrip
  public abstract void getInboxMessageCount(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getInboxMessageUnreadCount(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getAllInboxMessages(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getUnreadInboxMessages(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getInboxMessageForId(String messageId, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void pushInboxNotificationViewedEventForId(String messageId);

  @ReactMethod
  @DoNotStrip
  public abstract void pushInboxNotificationClickedEventForId(String messageId);

  @ReactMethod
  @DoNotStrip
  public abstract void markReadInboxMessageForId(String messageId);

  @ReactMethod
  @DoNotStrip
  public abstract void deleteInboxMessageForId(String messageId);

  @ReactMethod
  @DoNotStrip
  public abstract void markReadInboxMessagesForIDs(ReadableArray messageIds);

  @ReactMethod
  @DoNotStrip
  public abstract void deleteInboxMessagesForIDs(ReadableArray messageIds);

  @ReactMethod
  @DoNotStrip
  public abstract void dismissInbox();

  @ReactMethod
  @DoNotStrip
  public abstract void initializeInbox();

  @ReactMethod
  @DoNotStrip
  public abstract void showInbox(@Nullable ReadableMap styleConfig);

  @ReactMethod
  @DoNotStrip
  public abstract void getAllDisplayUnits(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getDisplayUnitForId(String unitId, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void pushDisplayUnitViewedEventForID(String unitId);

  @ReactMethod
  @DoNotStrip
  public abstract void pushDisplayUnitClickedEventForID(String unitId);

  @ReactMethod
  @DoNotStrip
  public abstract void getFeatureFlag(String flag, boolean withdefaultValue, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void setDefaultsMap(@Nullable ReadableMap jsonDict);

  @ReactMethod
  @DoNotStrip
  public abstract void fetch();

  @ReactMethod
  @DoNotStrip
  public abstract void fetchWithMinimumFetchIntervalInSeconds(double time);

  @ReactMethod
  @DoNotStrip
  public abstract void activate();

  @ReactMethod
  @DoNotStrip
  public abstract void fetchAndActivate();

  @ReactMethod
  @DoNotStrip
  public abstract void setMinimumFetchIntervalInSeconds(double time);

  @ReactMethod
  @DoNotStrip
  public abstract void getLastFetchTimeStampInMillis(Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getString(String key, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getBoolean(String key, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getDouble(String key, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void reset();

  @ReactMethod
  @DoNotStrip
  public abstract void suspendInAppNotifications();

  @ReactMethod
  @DoNotStrip
  public abstract void discardInAppNotifications();

  @ReactMethod
  @DoNotStrip
  public abstract void resumeInAppNotifications();

  @ReactMethod
  @DoNotStrip
  public abstract void fetchInApps(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void clearInAppResources(boolean expiredOnly);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateSetDismissed(String templateName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateSetPresented(String templateName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateRunAction(String templateName, String argName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateGetStringArg(String templateName, String argName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateGetNumberArg(String templateName, String argName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateGetBooleanArg(String templateName, String argName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateGetFileArg(String templateName, String argName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateGetObjectArg(String templateName, String argName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void customTemplateContextToString(String templateName, Promise promise);

  @ReactMethod
  @DoNotStrip
  public abstract void syncCustomTemplates();

  @ReactMethod
  @DoNotStrip
  public abstract void syncCustomTemplatesInProd(boolean isProduction);

  @ReactMethod
  @DoNotStrip
  public abstract void promptForPushPermission(boolean showFallbackSettings);

  @ReactMethod
  @DoNotStrip
  public abstract void promptPushPrimer(ReadableMap json);

  @ReactMethod
  @DoNotStrip
  public abstract void isPushPermissionGranted(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void syncVariables();

  @ReactMethod
  @DoNotStrip
  public abstract void syncVariablesinProd(boolean isProduction);

  @ReactMethod
  @DoNotStrip
  public abstract void getVariable(String name, @Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void fetchVariables(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void getVariables(@Nullable Callback callback);

  @ReactMethod
  @DoNotStrip
  public abstract void defineVariables(@Nullable ReadableMap variables);

  @ReactMethod
  @DoNotStrip
  public abstract void defineFileVariable(String name);

  @ReactMethod
  @DoNotStrip
  public abstract void onVariablesChanged();

  @ReactMethod
  @DoNotStrip
  public abstract void onOneTimeVariablesChanged();

  @ReactMethod
  @DoNotStrip
  public abstract void onValueChanged(String name);

  @ReactMethod
  @DoNotStrip
  public abstract void onVariablesChangedAndNoDownloadsPending();

  @ReactMethod
  @DoNotStrip
  public abstract void onceVariablesChangedAndNoDownloadsPending();

  @ReactMethod
  @DoNotStrip
  public abstract void onFileValueChanged(String name);

  @ReactMethod
  @DoNotStrip
  public abstract void onEventListenerAdded(String eventType);

  @ReactMethod
  @DoNotStrip
  public abstract void addListener(String eventType);

  @ReactMethod
  @DoNotStrip
  public abstract void removeListeners(double count);
}
