import { type TurboModule } from 'react-native'; export interface ExponeaProject { projectToken: string; authorizationToken: string; baseUrl?: string; } export interface Consent { id: string; legitimateInterest: boolean; sources: ConsentSources; translations: Object; } export interface ConsentSources { createdFromCRM: boolean; imported: boolean; fromConsentPage: boolean; privateAPI: boolean; publicAPI: boolean; trackedFromScenario: boolean; } export interface RecommendationOptions { id: string; fillWithRandom: boolean; size?: number; items?: Object; noTrack?: boolean; catalogAttributesWhitelist?: Array; } export interface Recommendation { engineName: string; itemId: string; recommendationId: string; recommendationVariantId: string; data: Object; } export type JsonObject = { [key: string]: any; }; export type Segment = Readonly<{ [key: string]: string; }>; export interface AppInboxAction { action?: string; title?: string; url?: string; } export interface AppInboxMessage { id: string; type: string; is_read?: boolean; create_time?: number; content?: Object; } export interface ButtonStyle { textOverride?: string; textColor?: string; backgroundColor?: string; showIcon?: boolean; textSize?: string; enabled?: boolean; borderRadius?: string; textWeight?: string; } export interface TextViewStyle { visible?: boolean; textColor?: string; textSize?: string; textWeight?: string; textOverride?: string; } export interface ImageViewStyle { visible?: boolean; backgroundColor?: string; } export interface ProgressBarStyle { visible?: boolean; progressColor?: string; backgroundColor?: string; } export interface AppInboxListItemStyle { backgroundColor?: string; readFlag?: ImageViewStyle; receivedTime?: TextViewStyle; title?: TextViewStyle; content?: TextViewStyle; image?: ImageViewStyle; } export interface AppInboxListViewStyle { backgroundColor?: string; item?: AppInboxListItemStyle; } export interface DetailViewStyle { title?: TextViewStyle; content?: TextViewStyle; receivedTime?: TextViewStyle; image?: ImageViewStyle; button?: ButtonStyle; } export interface ListViewStyle { emptyTitle?: TextViewStyle; emptyMessage?: TextViewStyle; errorTitle?: TextViewStyle; errorMessage?: TextViewStyle; progress?: ProgressBarStyle; list?: AppInboxListViewStyle; } export interface AppInboxStyle { appInboxButton?: ButtonStyle; detailView?: DetailViewStyle; listView?: ListViewStyle; } export interface Spec extends TurboModule { addListener(eventType: string): void; removeListeners(count: number): void; isConfigured(): boolean; /** Configures Exponea SDK. Should only be called once. You need to configure ExponeaSDK before calling most methods */ configure(configMap: Object, customerIdentity: Object | null): Promise; /** Resolves to cookie of the current customer */ getCustomerCookie(): Promise; /** Enable automatic push notification diagnostics *before* configuring the SDK to help you with push notification integration */ checkPushSetup(): Promise; /** Resolves to current FlushMode used by the SDK */ getFlushMode(): Promise; /** Sets the Flush mode of the SDK */ setFlushMode(flushingMode: FlushMode): Promise; /** Gets the period with which events are tracked to Exponea backend. Only valid in PERIOD FlushMode */ getFlushPeriod(): Promise; /** Sets the period with which events are tracked to Exponea backend. Only valid in PERIOD FlushMode */ setFlushPeriod(period: number): Promise; /** Resolves to current LogLevel native SDK uses. */ getLogLevel(): Promise; /** Sets LogLevel for native SDK. */ setLogLevel(loggerLevel: LogLevel): Promise; /** Get default properties tracked with every event (JSON string) */ getDefaultProperties(): Promise; /** Set default properties tracked with every event. * Only use for reconfiguration, preferred way of setting default properties is configuration object. */ setDefaultProperties(properties: Object): Promise; /** Anonymizes current customer and creates a new one. Push token is cleared on Exponea backend. * Optionally switches the default Exponea integration (Project or Stream) and event routing map. */ anonymize(integrationConfig?: Object, integrationRouteMap?: Object): Promise; /** Identifies current customer with a customer identity (ids + optional sdkAuthToken) and properties. */ identifyCustomer(customerIdentity: Object, properties: Object): Promise; /** Sets a Stream JWT auth token used by Stream/Data Hub integrations. */ setSdkAuthToken(token: string): Promise; /** Flushes data to Exponea backend. Only usable in MANUAL FlushMode */ flushData(): Promise; /** Tracks custom event to Exponea backend */ trackEvent(eventName: string, properties: Object, timestamp?: number): Promise; /** Manually tracks session start. Only usable when automaticSessionTracking is disabled in Configuration */ trackSessionStart(timestamp?: number): Promise; /** Manually tracks session end. Only usable when automaticSessionTracking is disabled in Configuration */ trackSessionEnd(timestamp?: number): Promise; /** Fetches consents for the current customer */ fetchConsents(): Promise>; /** Fetches recommendations based on RecommendationOptions */ fetchRecommendations(options: RecommendationOptions): Promise>; /** * Requests authorization and subsequently registers for receiving notifications for iOS platform * @deprecated use `requestPushAuthorization` instead */ requestIosPushAuthorization(): Promise; /** * Requests authorization and subsequently registers for receiving notifications for both Android and iOS platform */ requestPushAuthorization(): Promise; /** Sets whether automatic session tracking is enabled */ setAutomaticSessionTracking(enabled: boolean): Promise; /** Sets session timeout in seconds */ setSessionTimeout(timeout: number): Promise; /** Sets whether automatic push notification tracking is enabled */ setAutoPushNotification(enabled: boolean): Promise; /** Sets campaign TTL in seconds */ setCampaignTTL(seconds: number): Promise; /** Manually tracks push notification token to Exponea */ trackPushToken(token: string): Promise; /** Manually tracks HMS push notification token to Exponea (Huawei Mobile Services) */ trackHmsPushToken(token: string): Promise; /** Sets App Inbox provider with custom styling */ setAppInboxProvider(withStyle: AppInboxStyle): Promise; /** Tracks App Inbox message opened event (respects tracking consent) */ trackAppInboxOpened(message: AppInboxMessage): Promise; /** Tracks App Inbox message opened event (ignores tracking consent) */ trackAppInboxOpenedWithoutTrackingConsent(message: AppInboxMessage): Promise; /** Tracks App Inbox message click event (respects tracking consent) */ trackAppInboxClick(action: AppInboxAction, message: AppInboxMessage): Promise; /** Tracks App Inbox message click event (ignores tracking consent) */ trackAppInboxClickWithoutTrackingConsent(action: AppInboxAction, message: AppInboxMessage): Promise; /** Marks App Inbox message as read */ markAppInboxAsRead(message: AppInboxMessage): Promise; /** Fetches all App Inbox messages for the current customer */ fetchAppInbox(): Promise>; /** Fetches a specific App Inbox message by ID */ fetchAppInboxItem(messageId: string): Promise; /** Tracks push notification delivery event (respects tracking consent) */ trackDeliveredPush(params: Object): Promise; /** Tracks push notification delivery event (ignores tracking consent) */ trackDeliveredPushWithoutTrackingConsent(params: Object): Promise; /** Tracks push notification click event (respects tracking consent) */ trackClickedPush(params: Object): Promise; /** Tracks push notification click event (ignores tracking consent) */ trackClickedPushWithoutTrackingConsent(params: Object): Promise; /** Tracks payment event */ trackPaymentEvent(params: Object): Promise; /** Checks if notification payload belongs to Exponea */ isExponeaPushNotification(params: Object): Promise; /** Tracks in-app message click event (respects tracking consent) */ trackInAppMessageClick(message: InAppMessage, buttonText: string | null, buttonUrl: string | null): Promise; /** Tracks in-app message click event (ignores tracking consent) */ trackInAppMessageClickWithoutTrackingConsent(message: InAppMessage, buttonText: string | null, buttonUrl: string | null): Promise; /** Tracks in-app message close event (respects tracking consent) */ trackInAppMessageClose(message: InAppMessage, buttonText: string | null, interaction: boolean): Promise; /** Tracks in-app message close event (ignores tracking consent) */ trackInAppMessageCloseWithoutTrackingConsent(message: InAppMessage, buttonText: string | null, interaction: boolean): Promise; /** Tracks in-app content block click event (respects tracking consent) */ trackInAppContentBlockClick(params: Object): Promise; /** Tracks in-app content block click event (ignores tracking consent) */ trackInAppContentBlockClickWithoutTrackingConsent(params: Object): Promise; /** Tracks in-app content block close event (respects tracking consent) */ trackInAppContentBlockClose(params: Object): Promise; /** Tracks in-app content block close event (ignores tracking consent) */ trackInAppContentBlockCloseWithoutTrackingConsent(params: Object): Promise; /** Tracks in-app content block shown event (respects tracking consent) */ trackInAppContentBlockShown(params: Object): Promise; /** Tracks in-app content block shown event (ignores tracking consent) */ trackInAppContentBlockShownWithoutTrackingConsent(params: Object): Promise; /** Tracks in-app content block error event (respects tracking consent) */ trackInAppContentBlockError(params: Object): Promise; /** Tracks in-app content block error event (ignores tracking consent) */ trackInAppContentBlockErrorWithoutTrackingConsent(params: Object): Promise; /** Fetches customer segments for the given category */ getSegments(exposingCategory: string, force?: boolean): Promise>; /** Stops all SDK tracking and integration */ stopIntegration(): Promise; /** Clears all local customer data from device storage */ clearLocalCustomerData(appGroup?: string): Promise; /** Notify native that push opened listener is set */ onPushOpenedListenerSet(): void; /** Notify native that push opened listener is removed */ onPushOpenedListenerRemove(): void; /** Notify native that push received listener is set */ onPushReceivedListenerSet(): void; /** Notify native that push received listener is removed */ onPushReceivedListenerRemove(): void; /** Notify native that in-app message callback is set */ onInAppMessageCallbackSet(overrideDefaultBehavior: boolean, trackActions: boolean): void; /** Notify native that in-app message callback is removed */ onInAppMessageCallbackRemove(): void; /** Notify native that segmentation callback is set */ onSegmentationCallbackSet(category: string, includeFirstLoad: boolean): void; /** Notify native that segmentation callback is removed */ onSegmentationCallbackRemove(category: string): void; /** Notify native that the SDK auth error callback is set */ onSdkAuthErrorCallbackSet(): void; /** Notify native that the SDK auth error callback is removed */ onSdkAuthErrorCallbackRemove(): void; } export declare enum FlushMode { IMMEDIATE = "IMMEDIATE", PERIOD = "PERIOD", APP_CLOSE = "APP_CLOSE", MANUAL = "MANUAL" } export declare enum LogLevel { OFF = "OFF", ERROR = "ERROR", WARN = "WARN", INFO = "INFO", DBG = "DBG", VERBOSE = "VERBOSE" } export interface OpenedPush { action: PushAction; url?: string; /** Additional data defined on Exponea web app when creating the push */ additionalData?: Object; } export declare enum PushAction { /** "Open App" action */ APP = "app", /** "Deep link" action. In order to open your application from deeplink, extra setup is required. */ DEEPLINK = "deeplink", /** "Open web browser" action. Exponea SDK will automatically open the browser in this case. */ WEB = "web" } export interface InAppMessageAction { message?: InAppMessage; button?: InAppMessageButton; interaction?: boolean; errorMessage?: string; type: InAppMessageActionType; } export declare enum InAppMessageActionType { SHOW = "SHOW", ACTION = "ACTION", CLOSE = "CLOSE", ERROR = "ERROR" } export interface InAppMessage { id: string; name: string; message_type?: string; frequency: string; payload?: Object; variant_id: number; variant_name: string; trigger?: Object; date_filter?: Object; load_priority?: number; load_delay?: number; close_timeout?: number; payload_html?: string; is_html?: boolean; has_tracking_consent?: boolean; consent_category_tracking?: string; is_rich_text?: boolean; } export interface InAppMessageButton { text?: string; url?: string; } export interface InAppContentBlock { id: string; name: string; date_filter?: Object; frequency?: string; load_priority?: number; consentCategoryTracking?: string; content_type?: string; content?: Object; placeholders: []; } export interface InAppContentBlockAction { type: string; name?: string; url?: string; } declare const _default: Spec; export default _default; //# sourceMappingURL=NativeExponea.d.ts.map