@didomi/react-native 1.11.0 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["Didomi.ts"],"names":["NativeModules","DidomiListener","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","Didomi","RNDidomi","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","init","onReady","onError","setupUI","setLogLevel","level","addEventListener","eventType","callback","removeEventListener","removeAllEventListeners","reset","getDisabledPurposes","getDisabledPurposeIds","getDisabledVendors","getDisabledVendorIds","getEnabledPurposes","getEnabledPurposeIds","getEnabledVendors","getEnabledVendorIds","getJavaScriptForWebView","extra","getQueryStringForWebView","getPurpose","purposeId","getRequiredPurposes","getRequiredPurposeIds","getRequiredVendors","getRequiredVendorIds","getText","key","getTranslatedText","getUserConsentStatusForPurpose","getUserConsentStatusForVendor","vendorId","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getUserStatus","getUserStatusForVendor","getVendor","hideNotice","hidePreferences","isConsentRequired","isUserConsentStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","algorithm","secretId","salt","digest","setUserAndSetupUI","setUserWithHashAuth","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage"],"mappings":"AAAA,SAASA,aAAT,QAA8B,cAA9B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AAEA,SAASC,sBAAT,EAAiCC,cAAjC,QAAuD,aAAvD;AAEA,MAAM;AAAEC,EAAAA,MAAM,EAAEC;AAAV,IAAuBL,aAA7B;AAEA,OAAO,MAAMI,MAAM,GAAG;AACpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEE,EAAAA,UAAU,EAAE,CACVC,MADU,EAEVC,sBAFU,EAGVC,sBAHU,EAIVC,UAJU,EAKVC,yBAAkC,GAAG,KAL3B,EAMVC,YANU,EAOVC,QAPU,EAQVC,iBARU,EASVC,gBAAyB,GAAG,KATlB,KAUQ;AAClB;AACAd,IAAAA,cAAc,CAACe,IAAf,GAFkB,CAIlB;;AACA,WAAOX,QAAQ,CAACC,UAAT,CACLJ,sBADK,EAELC,cAFK,EAGLI,MAHK,EAILC,sBAJK,EAKLC,sBALK,EAMLC,UANK,EAOLC,yBAPK,EAQLC,YARK,EASLC,QATK,EAULC,iBAVK,EAWLC,gBAXK,CAAP;AAaD,GA1CmB;;AA4CpB;AACF;AACA;AACEE,EAAAA,OAAO,EAAE,MAAqBhB,cAAc,CAACgB,OAAf,EA/CV;;AAiDpB;AACF;AACA;AACEC,EAAAA,OAAO,EAAE,MAAoBjB,cAAc,CAACiB,OAAf,EApDT;;AAsDpB;AACF;AACA;AACEC,EAAAA,OAAO,EAAE,MAAqBd,QAAQ,CAACc,OAAT,EAzDV;;AA2DpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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BC,yBAFiB,EAGjBC,mBAHiB,EAIjBC,oBAJiB,EAKjBC,uBALiB,EAMjBC,wBANiB,EAOjBC,kBAPiB,EAQjBC,mBARiB,KAUjBxG,QAAQ,CAACgG,iBAAT,CACEC,wBADF,EAEEC,yBAFF,EAGEC,mBAHF,EAIEC,oBAJF,EAKEC,uBALF,EAMEC,wBANF,EAOEC,kBAPF,EAQEC,mBARF,CAnoBkB;;AA8oBpB;AACF;AACA;AACA;AACEC,EAAAA,wBAAwB,EAAE,MACxBzG,QAAQ,CAACyG,wBAAT,EAnpBkB;;AAqpBpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,sBAAsB,EAAGnG,YAAD,IACtBP,QAAQ,CAAC0G,sBAAT,CAAgCnG,YAAhC;AA5pBkB,CAAf","sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType, UserStatus } from './DidomiTypes';\nimport { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';\n\nconst { Didomi: RNDidomi } = NativeModules;\n\nexport const Didomi = {\n /**\n * Initialize the Didomi SDK\n *\n * @param apiKey: Public API key of the organization from the Didomi Console.\n * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.\n * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.\n * @param providerId: Your provider ID (if any).\n * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to \"false\" for loading configuration from the Didomi Console.\n * @param languageCode: Language in which the consent UI should be displayed. By default, the consent UI is displayed in the language configured in the device settings. This property allows you to override the default setting and specify a language to display the UI in. String containing the language code e.g.: \"es\", \"fr\", etc.\n * @param noticeId: Notice id for the remote configuration.\n * @param androidTvNoticeId: Notice id for the remote configuration when running on Android TV device (ignored on iOS / tvOS). Note that using remote configuration is mandatory for TV devices.\n * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to \"false\".\n */\n initialize: (\n apiKey: string,\n localConfigurationPath?: string,\n remoteConfigurationUrl?: string,\n providerId?: string,\n disableDidomiRemoteConfig: boolean = false,\n languageCode?: string,\n noticeId?: string,\n androidTvNoticeId?: string,\n androidTvEnabled: boolean = false\n ): Promise<void> => {\n // Init listener\n DidomiListener.init();\n\n // Trigger native SDK init\n return RNDidomi.initialize(\n DIDOMI_USER_AGENT_NAME,\n DIDOMI_VERSION,\n apiKey,\n localConfigurationPath,\n remoteConfigurationUrl,\n providerId,\n disableDidomiRemoteConfig,\n languageCode,\n noticeId,\n androidTvNoticeId,\n androidTvEnabled\n );\n },\n\n /**\n * Listen to SDK ready state\n */\n onReady: (): Promise<void> => DidomiListener.onReady(),\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<any> => DidomiListener.onError(),\n\n /**\n * Provide the objects required to display UI elements\n */\n setupUI: (): Promise<void> => RNDidomi.setupUI(),\n\n /**\n * Set the minimum level of messages to log\n * You can decide what level of messages should be logged by the SDK by calling the setLogLevel function before initialize\n *\n * Messages with a level below `minLevel` will not be logged.\n *\n * For iOS:\n * Levels are standard levels from `OSLogType` (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message):\n * - OSLogType.info (1)\n * - OSLogType.debug (2)\n * - OSLogType.error (16)\n * - OSLogType.fault (17)\n *\n * We recommend setting `OSLogType.error` (16) in production\n *\n * For Android:\n * Use the standard log levels supported by android.util.Log: VERBOSE, DEBUG, INFO, WARN and ERROR.\n * (https://developer.android.com/reference/android/util/Log#constants_1)\n *\n * We recommend setting `Log.INFO` (4) in production\n *\n * @param minLevel: Minimum level of messages to log\n */\n setLogLevel: (level: number): Promise<void> => RNDidomi.setLogLevel(level),\n\n /**\n * Add an event listener\n * @param listener:\n */\n addEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.addEventListener(eventType, callback),\n\n /**\n * Remove an event listener\n * @param listener:\n */\n removeEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.removeEventListener(eventType, callback),\n\n /**\n * Remove all event listeners\n */\n removeAllEventListeners: () => DidomiListener.reset(),\n\n /**\n * Method used to get an array of disabled purposes.\n * @returns: array of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().\n */\n getDisabledPurposes: (): Promise<any[]> => RNDidomi.getDisabledPurposes(),\n\n /**\n * Method used to get a set of disabled purpose IDs.\n * @returns: set that contains the IDs of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().\n */\n getDisabledPurposeIds: (): Promise<any[]> => RNDidomi.getDisabledPurposeIds(),\n\n /**\n * Method used to get an array of disabled vendors.\n * @returns: array of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().\n */\n getDisabledVendors: (): Promise<any[]> => RNDidomi.getDisabledVendors(),\n\n /**\n * Method used to get a set of disabled vendor IDs.\n * @returns: set that contains the IDs of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().\n */\n getDisabledVendorIds: (): Promise<any[]> => RNDidomi.getDisabledVendorIds(),\n\n /**\n * Method used to get an array of enabled purposes.\n * @returns: array of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().\n */\n getEnabledPurposes: (): Promise<any[]> => RNDidomi.getEnabledPurposes(),\n\n /**\n * Method used to get a set of enabled purpose IDs.\n * @returns: set that contains the IDs of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().\n */\n getEnabledPurposeIds: (): Promise<any[]> => RNDidomi.getEnabledPurposeIds(),\n\n /**\n * Method used to get an array of enabled vendors.\n * @returns: array of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().\n */\n getEnabledVendors: (): Promise<any[]> => RNDidomi.getEnabledVendors(),\n\n /**\n * Method used to get a set of enabled vendor IDs.\n * @returns: set that contains the IDs of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().\n */\n getEnabledVendorIds: (): Promise<any[]> => RNDidomi.getEnabledVendorIds(),\n\n /**\n * Get JavaScript to embed into a WebView to pass the consent status from the app\n * to the Didomi Web SDK embedded into the WebView\n * Inject the returned JavaScript into a WebView\n * @param extra: Extra JavaScript to inject in the returned code\n * @returns: JavaScript code to inject in a WebView\n */\n getJavaScriptForWebView: (extra?: string | null): Promise<string> => RNDidomi.getJavaScriptForWebView(extra),\n\n getQueryStringForWebView: (): Promise<string> => RNDidomi.getQueryStringForWebView(),\n\n /**\n * Method used to get a Purpose based on its ID.\n * @param purposeId: purpose ID used in the search.\n * @returns: purpose found in the array.\n */\n getPurpose: (purposeId: string): Promise<any> => RNDidomi.getPurpose(purposeId),\n\n /**\n * Method used to get an array of required purposes.\n *\n * @returns: array of required purposes.\n */\n getRequiredPurposes: (): Promise<any[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<any[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<any[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<any[]> => RNDidomi.getRequiredVendorIds(),\n\n /**\n * Method used to get a dictionary/map in the form of { \"en\": \"Key in English\", \"fr\": \"Key in French.\" }\n * for a given key.\n * @param key: used to find its corresponding value in the dictionary/map.\n * @returns: dictionary containing the different translations for a given key.\n */\n getText: (key: string): Promise<any[]> => RNDidomi.getText(key),\n\n /**\n * Method used to get a translated text based on the key being passed.\n * The language and the source of this translated text will depend on the availability of the translation for the specific key.\n * The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the `didomi_config.json` file which can be either local or remote, or the `didomi_master_config.json` file which is bundled within the SDK.\n *\n * These are the attempts performed by the SDK to try to find a translation for the specific key:\n * - Get translated value in user locale (selected language) from `didomi_config.json` (either local or remote).\n * - Get translated value in default locale (from the config) from `didomi_config.json` (either local or remote).\n * - Get translated value in user locale (selected language) from `didomi_master_config.json` (bundled within the Didomi SDK).\n * - Get translated value in default locale (from the config) from `didomi_master_config.json` (bundled within the Didomi SDK).\n *\n * If no translation can be found after these 4 attempts, the key will be returned.\n *\n * App developers can provide these translated texts through the `didomi_config.json` file (locally or remotely) in 3 different ways:\n * - Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts\n * - Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text\n * - Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices\n *\n * @param key: used to find its corresponding value in one of the different sources.\n * @returns: a translated string if a translation was found, the same key that was passed otherwise.\n */\n getTranslatedText: (key: string): Promise<string> => RNDidomi.getTranslatedText(key),\n\n /**\n * Get the user consent status for a specific purpose\n * @param purposeId: The purpose ID to check consent for\n * @returns: The user consent status for the specified purpose\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().getPurposes().getConsent().getEnabled() or\n * getUserStatus().getPurposes().getConsent().getDisabled().\n */\n getUserConsentStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForPurpose(purposeId),\n\n /**\n * Get the user consent status for a specific vendor\n * @param vendorId: The vendor ID to check consent for\n * @returns: The user consent status for the specified vendor\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().getVendors().getConsent().getEnabled() or\n * getUserStatus().getVendors().getConsent().getDisabled().\n */\n getUserConsentStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendor(vendorId),\n\n /**\n * Get the user consent status for a specific vendor and all its purposes\n * @param vendorId: The ID of the vendor\n * @returns: The user consent status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced\n * by getUserStatus().getVendors().getGlobalConsent().getEnabled() or\n * getUserStatus().getVendors().getGlobalConsent().getDisabled().\n */\n getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user legitimate interest status for a specific purpose.\n * @param purposeId: purpose ID.\n * @returns: LI status of a purpose.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().getPurposes().getLegitimateInterest().getEnabled() or\n * getUserStatus().getPurposes().getLegitimateInterest().getDisabled().\n */\n getUserLegitimateInterestStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForPurpose(purposeId),\n\n /**\n * Get the user legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: LI status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().getVendors().getLegitimateInterest().getEnabled() or\n * getUserStatus().getVendors().getLegitimateInterest().getDisabled().\n */\n getUserLegitimateInterestForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForVendor(vendorId),\n\n /**\n * Get the user LI status for a specific vendor and all its purposes.\n * @param vendorId: vendor ID.\n * @returns: The user LI status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().getVendors().getGlobalLegitimateInterest().getEnabled() or\n * getUserStatus().getVendors().getGlobalLegitimateInterest().getDisabled().\n */\n getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user consent status.\n * @returns: status that represents user consent.\n */\n getUserStatus: (): Promise<UserStatus> => RNDidomi.getUserStatus(),\n\n /**\n * Get the user consent and legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: status that represents both consent and legitimate interest status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().getVendors().getGlobal().getEnabled() or\n * getUserStatus().getVendors().getGlobal().getDisabled().\n */\n getUserStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserStatusForVendor(vendorId),\n\n /**\n * Method used to get a Vendor based on its ID.\n * @param vendorId: vendor ID used in the search.\n * @returns: vendor found in the array.\n */\n getVendor: (vendorId: string): Promise<any> => RNDidomi.getVendor(vendorId),\n\n /**\n * Hide the notice if it is currently displayed\n */\n hideNotice: (): Promise<void> => RNDidomi.hideNotice(),\n\n /**\n * Hide the preferences popup for purposes\n */\n hidePreferences: (): Promise<void> => RNDidomi.hidePreferences(),\n\n /**\n * Determine if consent is required for the user. The rules are (OR):\n * - The user country is in the EU.\n * - The company is from the EU.\n * - The user country is unknown and the app has chosen to collect consent when unknown.\n * @returns: **true** if consent is required, **false** if it is not required.\n */\n isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),\n\n /**\n * Determine if consent information is available for all purposes and vendors that are required\n * @returns: **true** if consent is required and consent information is available, **false** otherwise.\n */\n isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),\n\n /**\n * Check if the consent notice is currently displayed\n * @returns: **true** if the notice is displayed, **false** if is not.\n */\n isNoticeVisible: (): Promise<boolean> => RNDidomi.isNoticeVisible(),\n\n /**\n * Method used to check if the Preferences view is visible.\n * @returns: **true** if Preferences view is visible, **false** otherwise.\n */\n isPreferencesVisible: (): Promise<boolean> => RNDidomi.isPreferencesVisible(),\n\n isError: (): Promise<boolean> => RNDidomi.isError(),\n\n /**\n * Is the Didomi SDK ready?\n */\n isReady: (): Promise<boolean> => RNDidomi.isReady(),\n\n /**\n * Clear user information\n */\n clearUser: (): Promise<void> => RNDidomi.clearUser(),\n\n /**\n * Set user information without authentication\n *\n * @param id Organization user ID\n * @param algorithm Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param secretId Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n */\n setUser: (\n id: string,\n algorithm?: string,\n secretId?: string,\n salt?: string,\n digest?: string\n ): Promise<void> =>\n RNDidomi.setUser(\n id,\n algorithm,\n secretId,\n salt,\n digest\n ),\n\n /**\n * Set user information without authentication and check for missing consent\n *\n * @param id Organization user ID\n */\n setUserAndSetupUI: (id: string): Promise<void> => RNDidomi.setUserAndSetupUI(id),\n\n /**\n * Set user information with Hash authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuth(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpiration(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Hash authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuth(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpiration(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Show the consent notice (if required, not disabled in the config and not already displayed)\n */\n showNotice: (): Promise<void> => RNDidomi.showNotice(),\n\n /**\n * Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.\n * @param view: It can be `purposes` or `vendors`\n */\n showPreferences: (view?: string): Promise<void> => RNDidomi.showPreferences(view),\n\n /**\n * Remove all consents for the user\n */\n reset: (): Promise<void> => RNDidomi.reset(),\n\n /**\n * Method that allows to enable consent and legitimate interest for all the required purposes.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserAgreeToAll: (): Promise<boolean> => RNDidomi.setUserAgreeToAll(),\n\n /**\n * Set the user consent status.\n * @param enabledPurposeIds: set containing **enabled purpose ids**\n * @param disabledPurposeIds: set containing **disabled purpose ids**\n * @param enabledVendorIds: set containing **enabled vendor ids**\n * @param disabledVendorIds: set containing **disabled purpose ids**\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserConsentStatus: (\n enabledPurposeIds: string[],\n disabledPurposeIds: string[],\n enabledVendorIds: string[],\n disabledVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserConsentStatus(\n enabledPurposeIds,\n disabledPurposeIds,\n enabledVendorIds,\n disabledVendorIds\n ),\n\n /**\n * Method that allows to disable consent and legitimate interest for all the required purposes and vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserDisagreeToAll: (): Promise<boolean> => RNDidomi.setUserDisagreeToAll(),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.\n * @param purposesLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all purposes.\n * @param vendorsConsentStatus: boolean used to determine if consent will be enabled or disabled for all vendors.\n * @param vendorsLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserStatus: (\n purposesConsentStatus: boolean,\n purposesLIStatus: boolean,\n vendorsConsentStatus: boolean,\n vendorsLIStatus: boolean\n ): Promise<boolean> =>\n RNDidomi.setUserStatus(\n purposesConsentStatus,\n purposesLIStatus,\n vendorsConsentStatus,\n vendorsLIStatus\n ),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param enabledConsentPurposeIds: List of purpose IDs to enable for consent.\n * @param disabledConsentPurposeIds: List of purpose IDs to disable for consent.\n * @param enabledLIPurposeIds: List of purpose IDs to enable for LI.\n * @param disabledLIPurposeIds: List of purpose IDs to disable for LI.\n * @param enabledConsentVendorIds: List of vendor IDs to enable for consent.\n * @param disabledConsentVendorIds: List of vendor IDs to disable for consent.\n * @param enabledLIVendorIds: List of vendor IDs to enable for LI.\n * @param disabledLIVendorIds: List of vendor IDs to disable for LI.\n */\n setUserStatusSets: (\n enabledConsentPurposeIds: string[],\n disabledConsentPurposeIds: string[],\n enabledLIPurposeIds: string[],\n disabledLIPurposeIds: string[],\n enabledConsentVendorIds: string[],\n disabledConsentVendorIds: string[],\n enabledLIVendorIds: string[],\n disabledLIVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserStatusSets(\n enabledConsentPurposeIds,\n disabledConsentPurposeIds,\n enabledLIPurposeIds,\n disabledLIPurposeIds,\n enabledConsentVendorIds,\n disabledConsentVendorIds,\n enabledLIVendorIds,\n disabledLIVendorIds\n ),\n\n /**\n * Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet\n * @returns: A boolean depending if the consent should be collected or not\n */\n shouldConsentBeCollected: (): Promise<boolean> =>\n RNDidomi.shouldConsentBeCollected(),\n\n /**\n * Method used to update the selected language of the Didomi SDK and any property that depends on it.\n * In most cases this method doesn't need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings.\n * In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed.\n * @param languageCode: string containing the language code e.g.: \"es\", \"fr\", etc.\n */\n updateSelectedLanguage: (languageCode: string): Promise<void> =>\n RNDidomi.updateSelectedLanguage(languageCode),\n};\n"]}
1
+ {"version":3,"sources":["Didomi.ts"],"names":["NativeModules","DidomiListener","DIDOMI_USER_AGENT_NAME","DIDOMI_VERSION","Didomi","RNDidomi","initialize","apiKey","localConfigurationPath","remoteConfigurationUrl","providerId","disableDidomiRemoteConfig","languageCode","noticeId","androidTvNoticeId","androidTvEnabled","init","onReady","onError","setupUI","setLogLevel","level","addEventListener","eventType","callback","removeEventListener","removeAllEventListeners","reset","getDisabledPurposes","getDisabledPurposeIds","getDisabledVendors","getDisabledVendorIds","getEnabledPurposes","getEnabledPurposeIds","getEnabledVendors","getEnabledVendorIds","getJavaScriptForWebView","extra","getQueryStringForWebView","getPurpose","purposeId","getRequiredPurposes","getRequiredPurposeIds","getRequiredVendors","getRequiredVendorIds","getText","key","getTranslatedText","getUserConsentStatusForPurpose","getUserConsentStatusForVendor","vendorId","getUserConsentStatusForVendorAndRequiredPurposes","getUserLegitimateInterestStatusForPurpose","getUserLegitimateInterestForVendor","getUserLegitimateInterestStatusForVendor","getUserLegitimateInterestStatusForVendorAndRequiredPurposes","getUserStatus","getUserStatusForVendor","getVendor","hideNotice","hidePreferences","isConsentRequired","isUserConsentStatusPartial","isNoticeVisible","isPreferencesVisible","isError","isReady","clearUser","setUser","id","algorithm","secretId","salt","digest","setUserAndSetupUI","setUserWithHashAuth","expiration","undefined","setUserWithHashAuthWithExpiration","setUserWithHashAuthAndSetupUI","setUserWithHashAuthWithExpirationAndSetupUI","setUserWithEncryptionAuth","initializationVector","setUserWithEncryptionAuthWithExpiration","setUserWithEncryptionAuthAndSetupUI","setUserWithEncryptionAuthWithExpirationAndSetupUI","showNotice","showPreferences","view","setUserAgreeToAll","setUserConsentStatus","enabledPurposeIds","disabledPurposeIds","enabledVendorIds","disabledVendorIds","setUserDisagreeToAll","setUserStatus","purposesConsentStatus","purposesLIStatus","vendorsConsentStatus","vendorsLIStatus","setUserStatusSets","enabledConsentPurposeIds","disabledConsentPurposeIds","enabledLIPurposeIds","disabledLIPurposeIds","enabledConsentVendorIds","disabledConsentVendorIds","enabledLIVendorIds","disabledLIVendorIds","shouldConsentBeCollected","updateSelectedLanguage"],"mappings":"AAAA,SAASA,aAAT,QAA8B,cAA9B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AAEA,SAASC,sBAAT,EAAiCC,cAAjC,QAAuD,aAAvD;AAEA,MAAM;AAAEC,EAAAA,MAAM,EAAEC;AAAV,IAAuBL,aAA7B;AAEA,OAAO,MAAMI,MAAM,GAAG;AACpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEE,EAAAA,UAAU,EAAE,CACVC,MADU,EAEVC,sBAFU,EAGVC,sBAHU,EAIVC,UAJU,EAKVC,yBAAkC,GAAG,KAL3B,EAMVC,YANU,EAOVC,QAPU,EAQVC,iBARU,EASVC,gBAAyB,GAAG,KATlB,KAUQ;AAClB;AACAd,IAAAA,cAAc,CAACe,IAAf,GAFkB,CAIlB;;AACA,WAAOX,QAAQ,CAACC,UAAT,CACLJ,sBADK,EAELC,cAFK,EAGLI,MAHK,EAILC,sBAJK,EAKLC,sBALK,EAMLC,UANK,EAOLC,yBAPK,EAQLC,YARK,EASLC,QATK,EAULC,iBAVK,EAWLC,gBAXK,CAAP;AAaD,GA1CmB;;AA4CpB;AACF;AACA;AACEE,EAAAA,OAAO,EAAE,MAAqBhB,cAAc,CAACgB,OAAf,EA/CV;;AAiDpB;AACF;AACA;AACEC,EAAAA,OAAO,EAAE,MAAoBjB,cAAc,CAACiB,OAAf,EApDT;;AAsDpB;AACF;AACA;AACEC,EAAAA,OAAO,EAAE,MAAqBd,QAAQ,CAACc,OAAT,EAzDV;;AA2DpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,WAAW,EAAGC,KAAD,IAAkChB,QAAQ,CAACe,WAAT,CAAqBC,KAArB,CAlF3B;;AAoFpB;AACF;AACA;AACA;AACEC,EAAAA,gBAAgB,EAAE,CAChBC,SADgB,EAE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EAGEC,mBAHF,EAIEC,oBAJF,EAKEC,uBALF,EAMEC,wBANF,EAOEC,kBAPF,EAQEC,mBARF,CAnoBkB;;AA8oBpB;AACF;AACA;AACA;AACEC,EAAAA,wBAAwB,EAAE,MACxBzG,QAAQ,CAACyG,wBAAT,EAnpBkB;;AAqpBpB;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,sBAAsB,EAAGnG,YAAD,IACtBP,QAAQ,CAAC0G,sBAAT,CAAgCnG,YAAhC;AA5pBkB,CAAf","sourcesContent":["import { NativeModules } from 'react-native';\nimport { DidomiListener } from './DidomiListener';\nimport { DidomiEventType, Purpose, UserStatus, Vendor } from './DidomiTypes';\nimport { DIDOMI_USER_AGENT_NAME, DIDOMI_VERSION } from './Constants';\n\nconst { Didomi: RNDidomi } = NativeModules;\n\nexport const Didomi = {\n /**\n * Initialize the Didomi SDK\n *\n * @param apiKey: Public API key of the organization from the Didomi Console.\n * @param localConfigurationPath: Path to your local config file. Defaults to didomi_config.json if null.\n * @param remoteConfigurationURL: URL to a remote configuration file to load during initialization. This parameter is not used yet. Set it to null for now.\n * @param providerId: Your provider ID (if any).\n * @param disableDidomiRemoteConfig: Whether to disable loading the remote configuration from the Didomi config. Keep this to \"false\" for loading configuration from the Didomi Console.\n * @param languageCode: Language in which the consent UI should be displayed. By default, the consent UI is displayed in the language configured in the device settings. This property allows you to override the default setting and specify a language to display the UI in. String containing the language code e.g.: \"es\", \"fr\", etc.\n * @param noticeId: Notice id for the remote configuration.\n * @param androidTvNoticeId: Notice id for the remote configuration when running on Android TV device (ignored on iOS / tvOS). Note that using remote configuration is mandatory for TV devices.\n * @param androidTvEnabled: Whether to allow Didomi SDK to run on Android TV, default to \"false\".\n */\n initialize: (\n apiKey: string,\n localConfigurationPath?: string,\n remoteConfigurationUrl?: string,\n providerId?: string,\n disableDidomiRemoteConfig: boolean = false,\n languageCode?: string,\n noticeId?: string,\n androidTvNoticeId?: string,\n androidTvEnabled: boolean = false\n ): Promise<void> => {\n // Init listener\n DidomiListener.init();\n\n // Trigger native SDK init\n return RNDidomi.initialize(\n DIDOMI_USER_AGENT_NAME,\n DIDOMI_VERSION,\n apiKey,\n localConfigurationPath,\n remoteConfigurationUrl,\n providerId,\n disableDidomiRemoteConfig,\n languageCode,\n noticeId,\n androidTvNoticeId,\n androidTvEnabled\n );\n },\n\n /**\n * Listen to SDK ready state\n */\n onReady: (): Promise<void> => DidomiListener.onReady(),\n\n /**\n * Listen to SDK errors\n */\n onError: (): Promise<any> => DidomiListener.onError(),\n\n /**\n * Provide the objects required to display UI elements\n */\n setupUI: (): Promise<void> => RNDidomi.setupUI(),\n\n /**\n * Set the minimum level of messages to log\n * You can decide what level of messages should be logged by the SDK by calling the setLogLevel function before initialize\n *\n * Messages with a level below `minLevel` will not be logged.\n *\n * For iOS:\n * Levels are standard levels from `OSLogType` (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message):\n * - OSLogType.info (1)\n * - OSLogType.debug (2)\n * - OSLogType.error (16)\n * - OSLogType.fault (17)\n *\n * We recommend setting `OSLogType.error` (16) in production\n *\n * For Android:\n * Use the standard log levels supported by android.util.Log: VERBOSE, DEBUG, INFO, WARN and ERROR.\n * (https://developer.android.com/reference/android/util/Log#constants_1)\n *\n * We recommend setting `Log.INFO` (4) in production\n *\n * @param minLevel: Minimum level of messages to log\n */\n setLogLevel: (level: number): Promise<void> => RNDidomi.setLogLevel(level),\n\n /**\n * Add an event listener\n * @param listener:\n */\n addEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.addEventListener(eventType, callback),\n\n /**\n * Remove an event listener\n * @param listener:\n */\n removeEventListener: (\n eventType: DidomiEventType,\n callback: (data: any) => void\n ) => DidomiListener.removeEventListener(eventType, callback),\n\n /**\n * Remove all event listeners\n */\n removeAllEventListeners: () => DidomiListener.reset(),\n\n /**\n * Method used to get an array of disabled purposes.\n * @returns: array of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.disabled.\n */\n getDisabledPurposes: (): Promise<Purpose[]> => RNDidomi.getDisabledPurposes(),\n\n /**\n * Method used to get a set of disabled purpose IDs.\n * @returns: set that contains the IDs of disabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getDisabledPurposeIds: (): Promise<string[]> => RNDidomi.getDisabledPurposeIds(),\n\n /**\n * Method used to get an array of disabled vendors.\n * @returns: array of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendors: (): Promise<Vendor[]> => RNDidomi.getDisabledVendors(),\n\n /**\n * Method used to get a set of disabled vendor IDs.\n * @returns: set that contains the IDs of disabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.disabled.\n */\n getDisabledVendorIds: (): Promise<string[]> => RNDidomi.getDisabledVendorIds(),\n\n /**\n * Method used to get an array of enabled purposes.\n * @returns: array of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposes: (): Promise<Purpose[]> => RNDidomi.getEnabledPurposes(),\n\n /**\n * Method used to get a set of enabled purpose IDs.\n * @returns: set that contains the IDs of enabled purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().purposes.consent.enabled.\n */\n getEnabledPurposeIds: (): Promise<string[]> => RNDidomi.getEnabledPurposeIds(),\n\n /**\n * Method used to get an array of enabled vendors.\n * @returns: array of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendors: (): Promise<Vendor[]> => RNDidomi.getEnabledVendors(),\n\n /**\n * Method used to get a set of enabled vendor IDs.\n * @returns: set that contains the IDs of enabled vendors.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method\n * has been replaced by getUserStatus().vendors.consent.enabled.\n */\n getEnabledVendorIds: (): Promise<string[]> => RNDidomi.getEnabledVendorIds(),\n\n /**\n * Get JavaScript to embed into a WebView to pass the consent status from the app\n * to the Didomi Web SDK embedded into the WebView\n * Inject the returned JavaScript into a WebView\n * @param extra: Extra JavaScript to inject in the returned code\n * @returns: JavaScript code to inject in a WebView\n */\n getJavaScriptForWebView: (extra?: string | null): Promise<string> => RNDidomi.getJavaScriptForWebView(extra),\n\n getQueryStringForWebView: (): Promise<string> => RNDidomi.getQueryStringForWebView(),\n\n /**\n * Method used to get a Purpose based on its ID.\n * @param purposeId: purpose ID used in the search.\n * @returns: purpose found in the array.\n */\n getPurpose: (purposeId: string): Promise<Purpose> => RNDidomi.getPurpose(purposeId),\n\n /**\n * Method used to get an array of required purposes.\n *\n * @returns: array of required purposes.\n */\n getRequiredPurposes: (): Promise<Purpose[]> => RNDidomi.getRequiredPurposes(),\n\n /**\n * Get the configured purpose IDs\n * @returns: set of purpose IDs.\n */\n getRequiredPurposeIds: (): Promise<string[]> => RNDidomi.getRequiredPurposeIds(),\n\n /**\n * Method used to get an array of required vendors.\n * @returns: array of required vendors.\n */\n getRequiredVendors: (): Promise<Vendor[]> => RNDidomi.getRequiredVendors(),\n\n /**\n * Get the configured vendor IDs\n * @returns: set of vendor IDs.\n */\n getRequiredVendorIds: (): Promise<string[]> => RNDidomi.getRequiredVendorIds(),\n\n /**\n * Method used to get a dictionary/map in the form of { \"en\": \"Key in English\", \"fr\": \"Key in French.\" }\n * for a given key.\n * @param key: used to find its corresponding value in the dictionary/map.\n * @returns: dictionary containing the different translations for a given key.\n */\n getText: (key: string): Promise<any[]> => RNDidomi.getText(key),\n\n /**\n * Method used to get a translated text based on the key being passed.\n * The language and the source of this translated text will depend on the availability of the translation for the specific key.\n * The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the `didomi_config.json` file which can be either local or remote, or the `didomi_master_config.json` file which is bundled within the SDK.\n *\n * These are the attempts performed by the SDK to try to find a translation for the specific key:\n * - Get translated value in user locale (selected language) from `didomi_config.json` (either local or remote).\n * - Get translated value in default locale (from the config) from `didomi_config.json` (either local or remote).\n * - Get translated value in user locale (selected language) from `didomi_master_config.json` (bundled within the Didomi SDK).\n * - Get translated value in default locale (from the config) from `didomi_master_config.json` (bundled within the Didomi SDK).\n *\n * If no translation can be found after these 4 attempts, the key will be returned.\n *\n * App developers can provide these translated texts through the `didomi_config.json` file (locally or remotely) in 3 different ways:\n * - Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts\n * - Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text\n * - Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices\n *\n * @param key: used to find its corresponding value in one of the different sources.\n * @returns: a translated string if a translation was found, the same key that was passed otherwise.\n */\n getTranslatedText: (key: string): Promise<string> => RNDidomi.getTranslatedText(key),\n\n /**\n * Get the user consent status for a specific purpose\n * @param purposeId: The purpose ID to check consent for\n * @returns: The user consent status for the specified purpose\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserConsentStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForPurpose(purposeId),\n\n /**\n * Get the user consent status for a specific vendor\n * @param vendorId: The vendor ID to check consent for\n * @returns: The user consent status for the specified vendor\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.consent.enabled or\n * getUserStatus().vendors.consent.disabled.\n */\n getUserConsentStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendor(vendorId),\n\n /**\n * Get the user consent status for a specific vendor and all its purposes\n * @param vendorId: The ID of the vendor\n * @returns: The user consent status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced\n * by getUserStatus().vendors.global_consent.enabled or\n * getUserStatus().vendors.global_consent.disabled.\n */\n getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string): Promise<boolean> => RNDidomi.getUserConsentStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user legitimate interest status for a specific purpose.\n * @param purposeId: purpose ID.\n * @returns: LI status of a purpose.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().purposes.consent.enabled or\n * getUserStatus().purposes.consent.enabled.\n */\n getUserLegitimateInterestStatusForPurpose: (purposeId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForPurpose(purposeId),\n\n /**\n * Get the user legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: LI status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.legitimate_interest.enabled or\n * getUserStatus().vendors.legitimate_interest.disabled.\n */\n getUserLegitimateInterestForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserLegitimateInterestStatusForVendor(vendorId),\n\n /**\n * Get the user LI status for a specific vendor and all its purposes.\n * @param vendorId: vendor ID.\n * @returns: The user LI status corresponding to the specified vendor and all its required purposes.\n * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in\n * getUserStatus().vendors.global_legitimate_interest.enabled or\n * getUserStatus().vendors.global_legitimate_interest.disabled.\n */\n getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string): boolean => RNDidomi.getUserLegitimateInterestStatusForVendorAndRequiredPurposes(vendorId),\n\n /**\n * Get the user consent status.\n * @returns: status that represents user consent.\n */\n getUserStatus: (): Promise<UserStatus> => RNDidomi.getUserStatus(),\n\n /**\n * Get the user consent and legitimate interest status for a specific vendor.\n * @param vendorId: vendor ID.\n * @returns: status that represents both consent and legitimate interest status of a vendor.\n * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in\n * getUserStatus().vendors.global.enabled or\n * getUserStatus().vendors.global.disabled.\n */\n getUserStatusForVendor: (vendorId: string): Promise<boolean> => RNDidomi.getUserStatusForVendor(vendorId),\n\n /**\n * Method used to get a Vendor based on its ID.\n * @param vendorId: vendor ID used in the search.\n * @returns: vendor found in the array.\n */\n getVendor: (vendorId: string): Promise<Vendor> => RNDidomi.getVendor(vendorId),\n\n /**\n * Hide the notice if it is currently displayed\n */\n hideNotice: (): Promise<void> => RNDidomi.hideNotice(),\n\n /**\n * Hide the preferences popup for purposes\n */\n hidePreferences: (): Promise<void> => RNDidomi.hidePreferences(),\n\n /**\n * Determine if consent is required for the user. The rules are (OR):\n * - The user country is in the EU.\n * - The company is from the EU.\n * - The user country is unknown and the app has chosen to collect consent when unknown.\n * @returns: **true** if consent is required, **false** if it is not required.\n */\n isConsentRequired: (): Promise<boolean> => RNDidomi.isConsentRequired(),\n\n /**\n * Determine if consent information is available for all purposes and vendors that are required\n * @returns: **true** if consent is required and consent information is available, **false** otherwise.\n */\n isUserConsentStatusPartial: (): Promise<boolean> => RNDidomi.isUserConsentStatusPartial(),\n\n /**\n * Check if the consent notice is currently displayed\n * @returns: **true** if the notice is displayed, **false** if is not.\n */\n isNoticeVisible: (): Promise<boolean> => RNDidomi.isNoticeVisible(),\n\n /**\n * Method used to check if the Preferences view is visible.\n * @returns: **true** if Preferences view is visible, **false** otherwise.\n */\n isPreferencesVisible: (): Promise<boolean> => RNDidomi.isPreferencesVisible(),\n\n isError: (): Promise<boolean> => RNDidomi.isError(),\n\n /**\n * Is the Didomi SDK ready?\n */\n isReady: (): Promise<boolean> => RNDidomi.isReady(),\n\n /**\n * Clear user information\n */\n clearUser: (): Promise<void> => RNDidomi.clearUser(),\n\n /**\n * Set user information without authentication\n *\n * @param id Organization user ID\n * @param algorithm Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param secretId Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param salt Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n * @param digest Deprecated. To set user with authentication, use setUserWithHashAuth or setUserWithEncryptionAuth.\n */\n setUser: (\n id: string,\n algorithm?: string,\n secretId?: string,\n salt?: string,\n digest?: string\n ): Promise<void> =>\n RNDidomi.setUser(\n id,\n algorithm,\n secretId,\n salt,\n digest\n ),\n\n /**\n * Set user information without authentication and check for missing consent\n *\n * @param id Organization user ID\n */\n setUserAndSetupUI: (id: string): Promise<void> => RNDidomi.setUserAndSetupUI(id),\n\n /**\n * Set user information with Hash authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuth(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpiration(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Hash authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param digest Digest of the organization user ID and secret\n * @param salt Salt used for computing the digest (optional)\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithHashAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n digest: string,\n salt?: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithHashAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt\n );\n } else {\n RNDidomi.setUserWithHashAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n digest,\n salt,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuth: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuth(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpiration(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Set user information with Encryption authentication and check for missing consent\n *\n * @param id Organization user ID\n * @param algorithm Algorithm used for computing the digest\n * @param secretId ID of the secret used for computing the digest\n * @param initializationVector Initialization Vector used for computing the user ID\n * @param expiration Expiration date as timestamp (to prevent replay attacks)\n */\n setUserWithEncryptionAuthAndSetupUI: (\n id: string,\n algorithm: string,\n secretId: string,\n initializationVector: string,\n expiration?: BigInt\n ): void => {\n if (expiration === undefined) {\n RNDidomi.setUserWithEncryptionAuthAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector\n );\n } else {\n RNDidomi.setUserWithEncryptionAuthWithExpirationAndSetupUI(\n id,\n algorithm,\n secretId,\n initializationVector,\n expiration\n );\n }\n },\n\n /**\n * Show the consent notice (if required, not disabled in the config and not already displayed)\n */\n showNotice: (): Promise<void> => RNDidomi.showNotice(),\n\n /**\n * Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed.\n * @param view: It can be `purposes` or `vendors`\n */\n showPreferences: (view?: string): Promise<void> => RNDidomi.showPreferences(view),\n\n /**\n * Remove all consents for the user\n */\n reset: (): Promise<void> => RNDidomi.reset(),\n\n /**\n * Method that allows to enable consent and legitimate interest for all the required purposes.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserAgreeToAll: (): Promise<boolean> => RNDidomi.setUserAgreeToAll(),\n\n /**\n * Set the user consent status.\n * @param enabledPurposeIds: set containing **enabled purpose ids**\n * @param disabledPurposeIds: set containing **disabled purpose ids**\n * @param enabledVendorIds: set containing **enabled vendor ids**\n * @param disabledVendorIds: set containing **disabled purpose ids**\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserConsentStatus: (\n enabledPurposeIds: string[],\n disabledPurposeIds: string[],\n enabledVendorIds: string[],\n disabledVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserConsentStatus(\n enabledPurposeIds,\n disabledPurposeIds,\n enabledVendorIds,\n disabledVendorIds\n ),\n\n /**\n * Method that allows to disable consent and legitimate interest for all the required purposes and vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserDisagreeToAll: (): Promise<boolean> => RNDidomi.setUserDisagreeToAll(),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param purposesConsentStatus: boolean used to determine if consent will be enabled or disabled for all purposes.\n * @param purposesLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all purposes.\n * @param vendorsConsentStatus: boolean used to determine if consent will be enabled or disabled for all vendors.\n * @param vendorsLIStatus: boolean used to determine if legitimate interest will be enabled or disabled for all vendors.\n * @returns: **true** if consent status has been updated, **false** otherwise.\n */\n setUserStatus: (\n purposesConsentStatus: boolean,\n purposesLIStatus: boolean,\n vendorsConsentStatus: boolean,\n vendorsLIStatus: boolean\n ): Promise<boolean> =>\n RNDidomi.setUserStatus(\n purposesConsentStatus,\n purposesLIStatus,\n vendorsConsentStatus,\n vendorsLIStatus\n ),\n\n /**\n * Set the user status for purposes and vendors for consent and legitimate interest.\n * @param enabledConsentPurposeIds: List of purpose IDs to enable for consent.\n * @param disabledConsentPurposeIds: List of purpose IDs to disable for consent.\n * @param enabledLIPurposeIds: List of purpose IDs to enable for LI.\n * @param disabledLIPurposeIds: List of purpose IDs to disable for LI.\n * @param enabledConsentVendorIds: List of vendor IDs to enable for consent.\n * @param disabledConsentVendorIds: List of vendor IDs to disable for consent.\n * @param enabledLIVendorIds: List of vendor IDs to enable for LI.\n * @param disabledLIVendorIds: List of vendor IDs to disable for LI.\n */\n setUserStatusSets: (\n enabledConsentPurposeIds: string[],\n disabledConsentPurposeIds: string[],\n enabledLIPurposeIds: string[],\n disabledLIPurposeIds: string[],\n enabledConsentVendorIds: string[],\n disabledConsentVendorIds: string[],\n enabledLIVendorIds: string[],\n disabledLIVendorIds: string[]\n ): Promise<boolean> =>\n RNDidomi.setUserStatusSets(\n enabledConsentPurposeIds,\n disabledConsentPurposeIds,\n enabledLIPurposeIds,\n disabledLIPurposeIds,\n enabledConsentVendorIds,\n disabledConsentVendorIds,\n enabledLIVendorIds,\n disabledLIVendorIds\n ),\n\n /**\n * Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet\n * @returns: A boolean depending if the consent should be collected or not\n */\n shouldConsentBeCollected: (): Promise<boolean> =>\n RNDidomi.shouldConsentBeCollected(),\n\n /**\n * Method used to update the selected language of the Didomi SDK and any property that depends on it.\n * In most cases this method doesn't need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings.\n * In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed.\n * @param languageCode: string containing the language code e.g.: \"es\", \"fr\", etc.\n */\n updateSelectedLanguage: (languageCode: string): Promise<void> =>\n RNDidomi.updateSelectedLanguage(languageCode),\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["DidomiTypes.ts"],"names":["DidomiEventType"],"mappings":"AAAA;AACA,WAAYA,eAAZ;;WAAYA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,KAAAA,e","sourcesContent":["// TODO\nexport enum DidomiEventType {\n READY = 'on_ready',\n ERROR = 'on_error',\n CONSENT_CHANGED = 'on_consent_changed',\n HIDE_NOTICE = 'on_hide_notice',\n SHOW_NOTICE = 'on_show_notice',\n NOTICE_CLICK_AGREE = 'on_notice_click_agree',\n NOTICE_CLICK_DISAGREE = 'on_notice_click_disagree',\n NOTICE_CLICK_MORE_INFO = 'on_notice_click_more_info',\n NOTICE_CLICK_VIEW_VENDORS = 'on_notice_click_view_vendors',\n NOTICE_CLICK_PRIVACY_POLICY = 'on_notice_click_privacy_policy',\n HIDE_PREFERENCES = 'on_hide_preferences',\n SHOW_PREFERENCES = 'on_show_preferences',\n PREFERENCES_CLICK_AGREE_TO_ALL = 'on_preferences_click_agree_to_all',\n PREFERENCES_CLICK_DISAGREE_TO_ALL = 'on_preferences_click_disagree_to_all',\n PREFERENCES_CLICK_PURPOSE_AGREE = 'on_preferences_click_purpose_agree',\n PREFERENCES_CLICK_PURPOSE_DISAGREE = 'on_preferences_click_purpose_disagree',\n PREFERENCES_CLICK_VIEW_VENDORS = 'on_preferences_click_view_vendors',\n PREFERENCES_CLICK_SAVE_CHOICES = 'on_preferences_click_save_choices',\n PREFERENCES_CLICK_VENDOR_AGREE = 'on_preferences_click_vendor_agree',\n PREFERENCES_CLICK_VENDOR_DISAGREE = 'on_preferences_click_vendor_disagree',\n PREFERENCES_CLICK_CATEGORY_AGREE = 'on_preferences_click_category_agree',\n PREFERENCES_CLICK_CATEGORY_DISAGREE = 'on_preferences_click_category_disagree',\n PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS = 'on_preferences_click_agree_to_all_vendors',\n PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS = 'on_preferences_click_disagree_to_all_vendors',\n PREFERENCES_CLICK_VENDOR_SAVE_CHOICES = 'on_preferences_click_vendor_save_choices',\n PREFERENCES_CLICK_VIEW_PURPOSES = 'on_preferences_click_view_purposes',\n PREFERENCES_CLICK_AGREE_TO_ALL_PURPOSES = 'on_preferences_click_agree_to_all_purposes',\n PREFERENCES_CLICK_DISAGREE_TO_ALL_PURPOSES = 'on_preferences_click_disagree_to_all_purposes',\n PREFERENCES_CLICK_RESET_ALL_PURPOSES = 'on_preferences_click_reset_all_purposes',\n SYNC_DONE = 'on_sync_done',\n SYNC_ERROR = 'on_sync_error',\n LANGUAGE_UPDATED = \"on_language_updated\",\n LANGUAGE_UPDATE_FAILED = \"on_language_update_failed\",\n}\n\nexport interface Vendor {\n id: string;\n name: string;\n privacyPolicyUrl: string;\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeId: string[];\n legIntPurposeIds: string[];\n essentialPurposeIds: string[];\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: string;\n custom: boolean;\n essential: boolean;\n specialFeature: boolean;\n legitimateInterest: boolean;\n consent: boolean;\n category: PurposeCategory;\n}\n\nexport interface PurposeCategory {\n id: string;\n idpurposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n namedescription: Map<string>;\n children: PurposeCategory[];\n}\n\nexport interface Map<T> {\n [index: string]: T;\n [index: number]: T;\n}\n\nexport interface UserStatus {\n purposes: UserStatusPurposes;\n vendors: UserStatusVendors;\n userId: string;\n created: string;\n updated: string;\n consentString: string;\n additionalConsent: string;\n regulation: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimateInterest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n globalConsent: UserStatusIds;\n globalLegitimateInterest: UserStatusIds;\n consent: UserStatusIds;\n legitimateInterest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n"]}
1
+ {"version":3,"sources":["DidomiTypes.ts"],"names":["DidomiEventType"],"mappings":"AAAA;AACA,WAAYA,eAAZ;;WAAYA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;AAAAA,EAAAA,e;GAAAA,e,KAAAA,e","sourcesContent":["// TODO\nexport enum DidomiEventType {\n READY = 'on_ready',\n ERROR = 'on_error',\n CONSENT_CHANGED = 'on_consent_changed',\n HIDE_NOTICE = 'on_hide_notice',\n SHOW_NOTICE = 'on_show_notice',\n NOTICE_CLICK_AGREE = 'on_notice_click_agree',\n NOTICE_CLICK_DISAGREE = 'on_notice_click_disagree',\n NOTICE_CLICK_MORE_INFO = 'on_notice_click_more_info',\n NOTICE_CLICK_VIEW_VENDORS = 'on_notice_click_view_vendors',\n NOTICE_CLICK_PRIVACY_POLICY = 'on_notice_click_privacy_policy',\n HIDE_PREFERENCES = 'on_hide_preferences',\n SHOW_PREFERENCES = 'on_show_preferences',\n PREFERENCES_CLICK_AGREE_TO_ALL = 'on_preferences_click_agree_to_all',\n PREFERENCES_CLICK_DISAGREE_TO_ALL = 'on_preferences_click_disagree_to_all',\n PREFERENCES_CLICK_PURPOSE_AGREE = 'on_preferences_click_purpose_agree',\n PREFERENCES_CLICK_PURPOSE_DISAGREE = 'on_preferences_click_purpose_disagree',\n PREFERENCES_CLICK_VIEW_VENDORS = 'on_preferences_click_view_vendors',\n PREFERENCES_CLICK_SAVE_CHOICES = 'on_preferences_click_save_choices',\n PREFERENCES_CLICK_VENDOR_AGREE = 'on_preferences_click_vendor_agree',\n PREFERENCES_CLICK_VENDOR_DISAGREE = 'on_preferences_click_vendor_disagree',\n PREFERENCES_CLICK_CATEGORY_AGREE = 'on_preferences_click_category_agree',\n PREFERENCES_CLICK_CATEGORY_DISAGREE = 'on_preferences_click_category_disagree',\n PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS = 'on_preferences_click_agree_to_all_vendors',\n PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS = 'on_preferences_click_disagree_to_all_vendors',\n PREFERENCES_CLICK_VENDOR_SAVE_CHOICES = 'on_preferences_click_vendor_save_choices',\n PREFERENCES_CLICK_VIEW_PURPOSES = 'on_preferences_click_view_purposes',\n PREFERENCES_CLICK_AGREE_TO_ALL_PURPOSES = 'on_preferences_click_agree_to_all_purposes',\n PREFERENCES_CLICK_DISAGREE_TO_ALL_PURPOSES = 'on_preferences_click_disagree_to_all_purposes',\n PREFERENCES_CLICK_RESET_ALL_PURPOSES = 'on_preferences_click_reset_all_purposes',\n SYNC_DONE = 'on_sync_done',\n SYNC_ERROR = 'on_sync_error',\n LANGUAGE_UPDATED = \"on_language_updated\",\n LANGUAGE_UPDATE_FAILED = \"on_language_update_failed\",\n}\n\nexport interface Vendor {\n id: string;\n iabId: string\n name: string;\n policyUrl: string;\n namespace: string;\n namespaces: VendorNamespaces;\n iabVendor: boolean;\n purposeIds: string[];\n flexiblePurposeIds: string[];\n specialPurposeIds: string[];\n legIntPurposeIds: string[];\n specialFeatureIds: string[];\n cookieMaxAgeSeconds: number\n usesNonCookieAccess: boolean;\n}\n\nexport interface VendorNamespaces {\n iab2: string;\n}\n\nexport interface Purpose {\n id: string;\n iabId: string;\n name: string;\n description: string;\n descriptionLegal: string;\n custom: boolean;\n essential: boolean;\n specialFeature: boolean;\n legitimateInterest: boolean;\n consent: boolean;\n category: PurposeCategory;\n}\n\nexport interface PurposeCategory {\n id: string;\n purposeId: string;\n icon: string;\n type: string;\n name: Map<string>;\n description: Map<string>;\n children: PurposeCategory[];\n}\n\nexport interface Map<T> {\n [index: string]: T;\n [index: number]: T;\n}\n\nexport interface UserStatus {\n purposes: UserStatusPurposes;\n vendors: UserStatusVendors;\n user_id: string;\n created: string;\n updated: string;\n consent_string: string;\n additional_consent: string;\n regulation: string;\n}\n\nexport interface UserStatusPurposes {\n global: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n essential: UserStatusIds;\n}\n\nexport interface UserStatusVendors {\n global: UserStatusIds;\n global_consent: UserStatusIds;\n global_legitimate_interest: UserStatusIds;\n consent: UserStatusIds;\n legitimate_interest: UserStatusIds;\n}\n\nexport interface UserStatusIds {\n disabled: string[];\n enabled: string[];\n}\n"]}
@@ -1,2 +1,2 @@
1
1
  export declare const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK";
2
- export declare const DIDOMI_VERSION = "1.11.0";
2
+ export declare const DIDOMI_VERSION = "1.11.1";
@@ -1,4 +1,4 @@
1
- import { DidomiEventType, UserStatus } from './DidomiTypes';
1
+ import { DidomiEventType, Purpose, UserStatus, Vendor } from './DidomiTypes';
2
2
  export declare const Didomi: {
3
3
  /**
4
4
  * Initialize the Didomi SDK
@@ -68,58 +68,58 @@ export declare const Didomi: {
68
68
  * Method used to get an array of disabled purposes.
69
69
  * @returns: array of disabled purposes.
70
70
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
71
- * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().
71
+ * has been replaced by getUserStatus().purposes.consent.disabled.
72
72
  */
73
- getDisabledPurposes: () => Promise<any[]>;
73
+ getDisabledPurposes: () => Promise<Purpose[]>;
74
74
  /**
75
75
  * Method used to get a set of disabled purpose IDs.
76
76
  * @returns: set that contains the IDs of disabled purposes.
77
77
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
78
- * has been replaced by getUserStatus().getPurposes().getConsent().getDisabled().
78
+ * has been replaced by getUserStatus().purposes.consent.enabled.
79
79
  */
80
- getDisabledPurposeIds: () => Promise<any[]>;
80
+ getDisabledPurposeIds: () => Promise<string[]>;
81
81
  /**
82
82
  * Method used to get an array of disabled vendors.
83
83
  * @returns: array of disabled vendors.
84
84
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
85
- * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().
85
+ * has been replaced by getUserStatus().vendors.consent.disabled.
86
86
  */
87
- getDisabledVendors: () => Promise<any[]>;
87
+ getDisabledVendors: () => Promise<Vendor[]>;
88
88
  /**
89
89
  * Method used to get a set of disabled vendor IDs.
90
90
  * @returns: set that contains the IDs of disabled vendors.
91
91
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
92
- * has been replaced by getUserStatus().getVendors().getConsent().getDisabled().
92
+ * has been replaced by getUserStatus().vendors.consent.disabled.
93
93
  */
94
- getDisabledVendorIds: () => Promise<any[]>;
94
+ getDisabledVendorIds: () => Promise<string[]>;
95
95
  /**
96
96
  * Method used to get an array of enabled purposes.
97
97
  * @returns: array of enabled purposes.
98
98
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
99
- * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().
99
+ * has been replaced by getUserStatus().purposes.consent.enabled.
100
100
  */
101
- getEnabledPurposes: () => Promise<any[]>;
101
+ getEnabledPurposes: () => Promise<Purpose[]>;
102
102
  /**
103
103
  * Method used to get a set of enabled purpose IDs.
104
104
  * @returns: set that contains the IDs of enabled purposes.
105
105
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
106
- * has been replaced by getUserStatus().getPurposes().getConsent().getEnabled().
106
+ * has been replaced by getUserStatus().purposes.consent.enabled.
107
107
  */
108
- getEnabledPurposeIds: () => Promise<any[]>;
108
+ getEnabledPurposeIds: () => Promise<string[]>;
109
109
  /**
110
110
  * Method used to get an array of enabled vendors.
111
111
  * @returns: array of enabled vendors.
112
112
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
113
- * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().
113
+ * has been replaced by getUserStatus().vendors.consent.enabled.
114
114
  */
115
- getEnabledVendors: () => Promise<any[]>;
115
+ getEnabledVendors: () => Promise<Vendor[]>;
116
116
  /**
117
117
  * Method used to get a set of enabled vendor IDs.
118
118
  * @returns: set that contains the IDs of enabled vendors.
119
119
  * @deprecated use {@link #getUserStatus()} instead. The result of this method
120
- * has been replaced by getUserStatus().getVendors().getConsent().getEnabled().
120
+ * has been replaced by getUserStatus().vendors.consent.enabled.
121
121
  */
122
- getEnabledVendorIds: () => Promise<any[]>;
122
+ getEnabledVendorIds: () => Promise<string[]>;
123
123
  /**
124
124
  * Get JavaScript to embed into a WebView to pass the consent status from the app
125
125
  * to the Didomi Web SDK embedded into the WebView
@@ -134,28 +134,28 @@ export declare const Didomi: {
134
134
  * @param purposeId: purpose ID used in the search.
135
135
  * @returns: purpose found in the array.
136
136
  */
137
- getPurpose: (purposeId: string) => Promise<any>;
137
+ getPurpose: (purposeId: string) => Promise<Purpose>;
138
138
  /**
139
139
  * Method used to get an array of required purposes.
140
140
  *
141
141
  * @returns: array of required purposes.
142
142
  */
143
- getRequiredPurposes: () => Promise<any[]>;
143
+ getRequiredPurposes: () => Promise<Purpose[]>;
144
144
  /**
145
145
  * Get the configured purpose IDs
146
146
  * @returns: set of purpose IDs.
147
147
  */
148
- getRequiredPurposeIds: () => Promise<any[]>;
148
+ getRequiredPurposeIds: () => Promise<string[]>;
149
149
  /**
150
150
  * Method used to get an array of required vendors.
151
151
  * @returns: array of required vendors.
152
152
  */
153
- getRequiredVendors: () => Promise<any[]>;
153
+ getRequiredVendors: () => Promise<Vendor[]>;
154
154
  /**
155
155
  * Get the configured vendor IDs
156
156
  * @returns: set of vendor IDs.
157
157
  */
158
- getRequiredVendorIds: () => Promise<any[]>;
158
+ getRequiredVendorIds: () => Promise<string[]>;
159
159
  /**
160
160
  * Method used to get a dictionary/map in the form of { "en": "Key in English", "fr": "Key in French." }
161
161
  * for a given key.
@@ -190,8 +190,8 @@ export declare const Didomi: {
190
190
  * @param purposeId: The purpose ID to check consent for
191
191
  * @returns: The user consent status for the specified purpose
192
192
  * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in
193
- * getUserStatus().getPurposes().getConsent().getEnabled() or
194
- * getUserStatus().getPurposes().getConsent().getDisabled().
193
+ * getUserStatus().purposes.consent.enabled or
194
+ * getUserStatus().purposes.consent.enabled.
195
195
  */
196
196
  getUserConsentStatusForPurpose: (purposeId: string) => Promise<boolean>;
197
197
  /**
@@ -199,8 +199,8 @@ export declare const Didomi: {
199
199
  * @param vendorId: The vendor ID to check consent for
200
200
  * @returns: The user consent status for the specified vendor
201
201
  * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in
202
- * getUserStatus().getVendors().getConsent().getEnabled() or
203
- * getUserStatus().getVendors().getConsent().getDisabled().
202
+ * getUserStatus().vendors.consent.enabled or
203
+ * getUserStatus().vendors.consent.disabled.
204
204
  */
205
205
  getUserConsentStatusForVendor: (vendorId: string) => Promise<boolean>;
206
206
  /**
@@ -208,8 +208,8 @@ export declare const Didomi: {
208
208
  * @param vendorId: The ID of the vendor
209
209
  * @returns: The user consent status corresponding to the specified vendor and all its required purposes.
210
210
  * @deprecated use {@link #getUserStatus()} instead. The result of this method has been replaced
211
- * by getUserStatus().getVendors().getGlobalConsent().getEnabled() or
212
- * getUserStatus().getVendors().getGlobalConsent().getDisabled().
211
+ * by getUserStatus().vendors.global_consent.enabled or
212
+ * getUserStatus().vendors.global_consent.disabled.
213
213
  */
214
214
  getUserConsentStatusForVendorAndRequiredPurposes: (vendorId: string) => Promise<boolean>;
215
215
  /**
@@ -217,8 +217,8 @@ export declare const Didomi: {
217
217
  * @param purposeId: purpose ID.
218
218
  * @returns: LI status of a purpose.
219
219
  * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in
220
- * getUserStatus().getPurposes().getLegitimateInterest().getEnabled() or
221
- * getUserStatus().getPurposes().getLegitimateInterest().getDisabled().
220
+ * getUserStatus().purposes.consent.enabled or
221
+ * getUserStatus().purposes.consent.enabled.
222
222
  */
223
223
  getUserLegitimateInterestStatusForPurpose: (purposeId: string) => Promise<boolean>;
224
224
  /**
@@ -226,8 +226,8 @@ export declare const Didomi: {
226
226
  * @param vendorId: vendor ID.
227
227
  * @returns: LI status of a vendor.
228
228
  * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in
229
- * getUserStatus().getVendors().getLegitimateInterest().getEnabled() or
230
- * getUserStatus().getVendors().getLegitimateInterest().getDisabled().
229
+ * getUserStatus().vendors.legitimate_interest.enabled or
230
+ * getUserStatus().vendors.legitimate_interest.disabled.
231
231
  */
232
232
  getUserLegitimateInterestForVendor: (vendorId: string) => Promise<boolean>;
233
233
  /**
@@ -235,8 +235,8 @@ export declare const Didomi: {
235
235
  * @param vendorId: vendor ID.
236
236
  * @returns: The user LI status corresponding to the specified vendor and all its required purposes.
237
237
  * @deprecated use {@link #getUserStatus()} instead. Search the purposeId in
238
- * getUserStatus().getVendors().getGlobalLegitimateInterest().getEnabled() or
239
- * getUserStatus().getVendors().getGlobalLegitimateInterest().getDisabled().
238
+ * getUserStatus().vendors.global_legitimate_interest.enabled or
239
+ * getUserStatus().vendors.global_legitimate_interest.disabled.
240
240
  */
241
241
  getUserLegitimateInterestStatusForVendorAndRequiredPurposes: (vendorId: string) => boolean;
242
242
  /**
@@ -249,8 +249,8 @@ export declare const Didomi: {
249
249
  * @param vendorId: vendor ID.
250
250
  * @returns: status that represents both consent and legitimate interest status of a vendor.
251
251
  * @deprecated use {@link #getUserStatus()} instead. Search the vendorId in
252
- * getUserStatus().getVendors().getGlobal().getEnabled() or
253
- * getUserStatus().getVendors().getGlobal().getDisabled().
252
+ * getUserStatus().vendors.global.enabled or
253
+ * getUserStatus().vendors.global.disabled.
254
254
  */
255
255
  getUserStatusForVendor: (vendorId: string) => Promise<boolean>;
256
256
  /**
@@ -258,7 +258,7 @@ export declare const Didomi: {
258
258
  * @param vendorId: vendor ID used in the search.
259
259
  * @returns: vendor found in the array.
260
260
  */
261
- getVendor: (vendorId: string) => Promise<any>;
261
+ getVendor: (vendorId: string) => Promise<Vendor>;
262
262
  /**
263
263
  * Hide the notice if it is currently displayed
264
264
  */
@@ -35,14 +35,19 @@ export declare enum DidomiEventType {
35
35
  }
36
36
  export interface Vendor {
37
37
  id: string;
38
+ iabId: string;
38
39
  name: string;
39
- privacyPolicyUrl: string;
40
+ policyUrl: string;
40
41
  namespace: string;
41
42
  namespaces: VendorNamespaces;
42
43
  iabVendor: boolean;
43
- purposeId: string[];
44
+ purposeIds: string[];
45
+ flexiblePurposeIds: string[];
46
+ specialPurposeIds: string[];
44
47
  legIntPurposeIds: string[];
45
- essentialPurposeIds: string[];
48
+ specialFeatureIds: string[];
49
+ cookieMaxAgeSeconds: number;
50
+ usesNonCookieAccess: boolean;
46
51
  }
47
52
  export interface VendorNamespaces {
48
53
  iab2: string;
@@ -62,11 +67,11 @@ export interface Purpose {
62
67
  }
63
68
  export interface PurposeCategory {
64
69
  id: string;
65
- idpurposeId: string;
70
+ purposeId: string;
66
71
  icon: string;
67
72
  type: string;
68
73
  name: Map<string>;
69
- namedescription: Map<string>;
74
+ description: Map<string>;
70
75
  children: PurposeCategory[];
71
76
  }
72
77
  export interface Map<T> {
@@ -76,25 +81,25 @@ export interface Map<T> {
76
81
  export interface UserStatus {
77
82
  purposes: UserStatusPurposes;
78
83
  vendors: UserStatusVendors;
79
- userId: string;
84
+ user_id: string;
80
85
  created: string;
81
86
  updated: string;
82
- consentString: string;
83
- additionalConsent: string;
87
+ consent_string: string;
88
+ additional_consent: string;
84
89
  regulation: string;
85
90
  }
86
91
  export interface UserStatusPurposes {
87
92
  global: UserStatusIds;
88
93
  consent: UserStatusIds;
89
- legitimateInterest: UserStatusIds;
94
+ legitimate_interest: UserStatusIds;
90
95
  essential: UserStatusIds;
91
96
  }
92
97
  export interface UserStatusVendors {
93
98
  global: UserStatusIds;
94
- globalConsent: UserStatusIds;
95
- globalLegitimateInterest: UserStatusIds;
99
+ global_consent: UserStatusIds;
100
+ global_legitimate_interest: UserStatusIds;
96
101
  consent: UserStatusIds;
97
- legitimateInterest: UserStatusIds;
102
+ legitimate_interest: UserStatusIds;
98
103
  }
99
104
  export interface UserStatusIds {
100
105
  disabled: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didomi/react-native",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "Didomi React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -151,5 +151,6 @@
151
151
  }
152
152
  ]
153
153
  ]
154
- }
154
+ },
155
+ "dependencies": {}
155
156
  }
package/src/Constants.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  // User agent name
2
2
  export const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK"
3
3
  // User agent version
4
- export const DIDOMI_VERSION = "1.11.0"
4
+ export const DIDOMI_VERSION = "1.11.1"