export declare const RNQualtricsDigital: any; /** * @class * @classdesc a class used to hold the results of the initialization methods * @property {boolean} passed - whether or not initialization succeeded * @property {string} surveyUrl - initialization message used to determine initialization status */ export declare class InitializationResult { passed: boolean; message: string; constructor(passed: boolean, message: string); } type TargetingResultStatus = 'passed' | 'failedLogic' | 'sampledOut' | 'multipleDisplayPrevented' | 'contactFrequencyFailed' | 'error' | 'inactive' | undefined; type TargetingResultType = { passed?: boolean; targetingResultStatus?: TargetingResultStatus; error?: string; creativeType?: string; surveyUrl?: string; }; /** * @class * @classdesc a class used to hold the results of the evaluation methods * @property {boolean} passed - whether or not target evaluation succeeded * @property {string} targetingResultStatus - one of: * "passed" | "failedLogic" | "sampledOut" | "multipleDisplayPrevented" | * "contactFrequencyFailed" | "error" | "inactive" * * Android-only prop * * @property {string} error - error from the last evaluation of the intercept if * applicable; * * Android-only prop * * @property {string} surveyUrl - link to the survey in Creative where logic evaluation passed. url used to display survey in display() * @property {string} creativeType - the type of the creative associated with the passing action set. */ export declare class TargetingResult { passed?: boolean; targetingResultStatus: TargetingResultStatus; error?: string; creativeType?: string; surveyUrl?: string; constructor({ passed, targetingResultStatus, error, surveyUrl, creativeType, }?: TargetingResultType); /** * @method recordClick() - void method * @description records a click to the server associated with intercept */ recordClick(): void; /** * @method recordImpression() - void method * @description records an impression to the server associated with intercept */ recordImpression(): void; } /** initialize() * @description initializes Qualtrics singleton with specified params * @deprecate marked for future deprecation with version 2.0.0 * @param brandid - intercept brand id * @param projectid - intercept project/zone id * @param interceptid - intercept id * @param {callback} [callback] - optional method called, if defined, to handle the InitializationResult * @returns {InitializationResult} in callback */ declare function initialize(brandid: string, projectid: string, interceptid: string, callback?: (result: InitializationResult) => void): void; /** initializeProject() - void method * @description initializes Qualtrics singleton with specified params * @param brandId - intercept brand id * @param projectId - intercept project/zone id * @param {callback} [callback] - optional method called, if defined, to handle initializationResults * @return {InitializationResult}s to the callback */ declare function initializeProject(brandId: string, projectId: string, callback: (initializationResults: { [interceptId: string]: InitializationResult; }) => void): void; /** initializeProjectWithExtRefId() - void method * @description initializes Qualtrics singleton with specified params * @param brandid - intercept brand id * @param projectid - intercept project/zone id * @param extrefid - external reference id * @param {callback} [callback] - optional method called, if defined, to handle initializationResults * @return {InitializationResult}s to the callback */ declare function initializeProjectWithExtRefId(brandid: string, projectid: string, extrefid: string, callback: (initializationResults: { [interceptId: string]: InitializationResult; }) => void): void; /** evaluateTargetingLogic() - void method * @deprecate marked for future deprecation with version 2.0.0 * @description evaluates current intercept and calls callback * @return {TargetingResult} in callback * @param callback - method called, to handle TargetingResult, must be defined */ declare function evaluateTargetingLogic(callback: (result: TargetingResult) => void): void; /** evaluateProject() - void method * @description evaluates all the initialized intercepts and calls callback * @returns {TargetingResult}s in callback * @param callback - method called to handle TargetingResults, must be defined */ declare function evaluateProject(callback: (targetingResults: { [key: string]: TargetingResult; }) => void): void; /** evaluateIntercept() - void method * @description evaluates the passed intercept and calls callback * @param interceptId * @param callback - method called to handle TargetingResult, must be defined * @return {TargetingResult}s in callback */ declare function evaluateIntercept(interceptId: string, callback: (result: TargetingResult) => void): void; /** display() - bool return method * @description displays creative in the view controller * @param {boolean} autoCloseSurvey Parameter that enables auto close for displayed survey * @returns {Promise} Promise object representing a bool */ declare function display(autoCloseSurvey?: boolean): Promise; /** displayTarget() - void method * @description displays evaluated TargetingResult in webview * @param {string} surveyUrl - Optional link to the surveyUrl * @param {string} autoCloseSurvey - Optional boolean for auto closing survey at the end */ declare function displayTarget(surveyUrl?: string | null, autoCloseSurvey?: boolean): void; /** displayIntercept() - bool return method * @description displays creative in the view controller * @param {string} interceptId - Id of evaluated intercept that should be displayed * @param {string} autoCloseSurvey - Optional boolean for auto closing survey at the end * @returns {Promise} Promise object representing a bool */ declare function displayIntercept(interceptId: string, autoCloseSurvey?: boolean): Promise; /** setString() - void method * @description sets string value for specified key in properties * @param propertyKey - Key for value * @param propertyString - String value to assign with key */ declare function setString(propertyKey: string, propertyString: string): void; /** setNumber() - void method * @description sets double value for specified key in properties * @param propertyKey - Key for value * @param propertyNumber - Numeric value to assign with key */ declare function setNumber(propertyKey: string, propertyNumber: number): void; /** setDateTime() - void method * @description sets current datetime value for specified key in properties * @param propertyKey - Key for value */ declare function setDateTime(propertyKey: string): void; /** setLastDisplayTimeForIntercept() - void method * @description sets the lastDisplayedTime for specified interceptId to now * @param {string} interceptId - The ID of the intercept for which the last display time is being set */ declare function setLastDisplayTimeForIntercept(interceptId: string): void; /** setNotificationIconAsset() - void method * @description Sets string file name for notificationIconAsset in properties * @param {string} propertyAsset - File name of Image stored in Drawable folder of Android Project */ declare function setNotificationIconAsset(propertyAsset: string): void; /** registerViewVisit() - void method * @description record visits to a particular view * @param viewName - name of view to record */ declare function registerViewVisit(viewName: string): void; /** resetTimer() - void method * @description resets timer used for Time Spent In App */ declare function resetTimer(): void; /** resetViewCounter() - void method * @description resets view count used for View Count */ declare function resetViewCounter(): void; /** * * @returns Returns an array of all the initialized intercepts */ declare function getInitializedIntercepts(): Promise>; /** * * @returns Returns an array of all the passing intercepts */ declare function getPassingIntercepts(): Promise>; declare const _default: { initialize: typeof initialize; initializeProject: typeof initializeProject; initializeProjectWithExtRefId: typeof initializeProjectWithExtRefId; evaluateTargetingLogic: typeof evaluateTargetingLogic; evaluateIntercept: typeof evaluateIntercept; evaluateProject: typeof evaluateProject; display: typeof display; displayTarget: typeof displayTarget; displayIntercept: typeof displayIntercept; setString: typeof setString; setNumber: typeof setNumber; setDateTime: typeof setDateTime; setLastDisplayTimeForIntercept: typeof setLastDisplayTimeForIntercept; setNotificationIconAsset: typeof setNotificationIconAsset; registerViewVisit: typeof registerViewVisit; resetTimer: typeof resetTimer; resetViewCounter: typeof resetViewCounter; getInitializedIntercepts: typeof getInitializedIntercepts; getPassingIntercepts: typeof getPassingIntercepts; }; export default _default; //# sourceMappingURL=index.d.ts.map