/** * Copyright © 2022 Anagog Ltd. All rights reserved. */ import { AnagogEventType } from './types/AnagogEventType'; import { JedAIStatus } from './types/JedAIStatus'; import type { JEMAUserInteractionEvent } from './models/JEMAUserInteractionEvent'; import type { ApplicationEvent } from './models/ApplicationEvent'; import { Onboarding } from './Onboarding'; import { PageTracker } from './PageTracker'; import type { TimeFrame } from './types/TimeFrame'; export declare class AnagogSDK { static packageVersion: string; static onboarding: Onboarding; static pageTracker: PageTracker; /** * Create an EventStream from JedAI to your ReactNative app. * Use this API to listen for SDK events such as onCampaignTriggered, onNotificationClick, onSnapshotReport. * @param listener callback with 2 parameters: `AnagogEventType` and payload that different for each type of event. * @see {@link https://www.npmjs.com/package/@anagog/jedai#SDK-Notifications example} */ static obtainEventStream(listener: (action: AnagogEventType, payload: any) => void): void; /** * Set String custom micro segment value. * @param customName Name of your custom microsegment. * @param value Value that should be saved. * @returns `Promise` with no parameters. */ static setUserDefinedString(customName: string, value: string): Promise; /** * Get String custom micro segment. * @async * @param customName Name of your custom microsegment. * @returns `Promise` with a stored value. */ static getUserDefinedString(customName: string): Promise; /** * Set Integer custom micro segment value. * @param customName Name of your custom microsegment. * @param value Value that should be saved. * @returns `Promise` with no parameters. */ static setUserDefinedInteger(customName: string, value: number): Promise; /** * Get Integer custom micro segment. * @async * @param customName Name of your custom microsegment. * @returns `Promise` with a stored value. */ static getUserDefinedInteger(customName: string): Promise; /** * Set Decimal custom micro segment value. * @param customName Name of your custom microsegment. * @param value Value that should be saved. * @returns `Promise` with no parameters. */ static setUserDefinedDecimal(customName: string, value: number): Promise; /** * Get Decimal custom micro segment. * @async * @param customName Name of your custom microsegment. * @returns `Promise` with a stored value. */ static getUserDefinedDecimal(customName: string): Promise; /** * Get Stats from Edge SDK. * @async * @param metricName Name of metric. * @param index1 index1 of metric. * @param index2 index2 of metric. * @param timeFrame timeFrame for requested stats such as 'OVERALL', 'LAST_7_DAYS'. * @returns `Promise` with a stored value. */ static getStats(metricName: string, index1?: string, index2?: string, timeFrame?: TimeFrame): Promise; /** * Use to fire micromoments from your app. * @param micromoment ApplicationEvent object. * @see {@link https://www.npmjs.com/package/@anagog/jedai#Micromoments example} * @returns `Promise` with no parameters. */ static fireMicromoment(micromoment: ApplicationEvent): Promise; /** * Report user interaction event to JedAI (e.g. Triggered, Conversion, Clicked etc.). * @param event `JEMAUserInteractionEvent`. * @see {@link https://www.npmjs.com/package/@anagog/jedai#Interaction-events example} * @returns `Promise` with no parameters. */ static sendUserInteractionEvent(event: JEMAUserInteractionEvent): Promise; /** * Request to generate Microsegments Snapshot report. * @returns `Promise` with a generated report. */ static requestMicrosegmentsSnapshotReport(): Promise; /** * Request to generate Encoded Enrichment report. * @returns `Promise` with a generated report. */ static requestEncodedEnrichmentReport(): Promise; /** * Request to export data enrichment * @returns `Promise` with a generated report. */ static exportDataEnrichment(requestedMetrics?: string[]): Promise; /** * @deprecated This method is deprecated and will be removed in the future releases. * Use `AnagogSDK.shareFeedback` instead. */ static share(): Promise; /** * Create and share SDK feedback report. * Use this in case you want to share with Anagog SDK operation and debugging report for analyze. * @returns `Promise` with no parameters. Returned when report is generated and share window closed. */ static shareFeedback(): Promise; /** * Create SDK feedback report. * Use this in case you want to create a feedback report zip file and share it by your self. * @returns `Promise` with a string parameter that represents a URL with the saved zip file. Returned when report is generated and ready for send. */ static generateFeedback(): Promise; /** * Enable and start JedAI. * @returns `Promise` with no parameters. Returned when JedAI is ready. */ static enableSDK(): Promise; /** * Disable and stop JedAI. * @returns `Promise` with no parameters. Returned when JedAI is completely disabled. */ static disableSDK(): Promise; /** * Disable and stop JedAI. Also, all stored data by JedAI will be removed. * @returns `Promise` with no parameters. Returned when JedAI is completely disabled. */ static disableAndPurgeSDK(): Promise; /** * Indicates if JedAI srtarted or not. * @returns `Promise` with JedAI status parameter. */ static getSDKStatus(): Promise; /** * Get JedAI Version. * @returns `Promise` with JedAI version. */ static getSDKVersion(): Promise; /** * Deliver Anagog FCM message to Anagog SDK (Android only). * @returns `Promise` true if its an Anagog FCM message, otherwize false */ /** * Deliver Anagog FCM message to Anagog SDK (Android only). * @returns `Promise` result from native api of message process */ static onPushNotificationReceived(remoteMessage: Object): Promise; }