@usercentrics/cmp-browser-sdk
Advanced tools
Comparing version 4.9.0 to 4.10.0
@@ -1,1 +0,1 @@ | ||
export{c as API_COMMANDS,V as BUTTON_ALIGNMENT,a3 as CLOSE_OPTION,aj as CONSENT_ACTION,ak as CONSENT_TYPE,a4 as Core,U as DPS_DISPLAY_FORMAT,am as FIRST_LAYER_VARIANT,ap as SECOND_LAYER_SIDE,$ as SECOND_LAYER_TRIGGER,an as SECOND_LAYER_VARIANT,aq as TCF_DECISION_UI_LAYER,ao as THEME,al as TRACKING_EVENT_TYPE,a5 as UI_LAYER,a6 as UI_VARIANT,a2 as default,a7 as isCcpaData,a8 as isCcpaLabels,a9 as isCcpaUI,aa as isDefaultData,ab as isDefaultLabels,ac as isDefaultUI,af as isNotPrivacyButtonLabels,ae as isPrivacyButtonLabels,ad as isPrivacyButtonUI,ag as isTcfData,ah as isTcfLabels,ai as isTcfUI}from"./index-c8395a2d.js"; | ||
export{c as API_COMMANDS,V as BUTTON_ALIGNMENT,a3 as CLOSE_OPTION,aj as CONSENT_ACTION,ak as CONSENT_TYPE,a4 as Core,U as DPS_DISPLAY_FORMAT,am as FIRST_LAYER_VARIANT,ap as SECOND_LAYER_SIDE,$ as SECOND_LAYER_TRIGGER,an as SECOND_LAYER_VARIANT,aq as TCF_DECISION_UI_LAYER,ao as THEME,al as TRACKING_EVENT_TYPE,a5 as UI_LAYER,a6 as UI_VARIANT,a2 as default,a7 as isCcpaData,a8 as isCcpaLabels,a9 as isCcpaUI,aa as isDefaultData,ab as isDefaultLabels,ac as isDefaultUI,af as isNotPrivacyButtonLabels,ae as isPrivacyButtonLabels,ad as isPrivacyButtonUI,ag as isTcfData,ah as isTcfLabels,ai as isTcfUI}from"./index-b1a4aa7b.js"; |
@@ -30,2 +30,3 @@ import { UserCountryData, UserSessionData } from './index.legacy'; | ||
consentsV2: string; | ||
consentsV2Fetch: string; | ||
crossDomainConsentSharingIFrame: string; | ||
@@ -65,2 +66,4 @@ graphql: string; | ||
euMode?: boolean; | ||
/** Array to exclude vendors from the Accept All method */ | ||
excludeAcceptAllVendors?: number[]; | ||
/** Enforce a certain initial language for the user (default: user's browser language) */ | ||
@@ -67,0 +70,0 @@ language?: string; |
import { CONSENT_ACTION, CONSENT_TYPE } from '../../services/DataFacade/enums'; | ||
import { ConsentHistory, DataFacadeService, DataTransferObject } from '../../services/DataFacade/interfaces'; | ||
import { ConsentDTOV2, ConsentHistory, DataFacadeService, DataTransferObject } from '../../services/DataFacade/interfaces'; | ||
import { IdAndName, Service as ServiceV2 } from '../../index.legacy'; | ||
import { IntMap, UcDomains } from '../../interfaces'; | ||
import Core from '../../services/SettingsV2/Core'; | ||
import { IdAndName } from '../../index.legacy'; | ||
import { GraphQLConsentString } from '../../services/Api/interfaces'; | ||
export declare const arrayContainsValue: <T>(array: T[], value: T) => boolean; | ||
@@ -22,2 +23,13 @@ export declare const getApplicationVersion: () => string; | ||
} | undefined) => DataTransferObject; | ||
interface MapDataTransferObjectsV2Options { | ||
dataTransferSettings: DataTransferSettings; | ||
services: ServiceV2[] | DataFacadeService[]; | ||
consentAction: CONSENT_ACTION; | ||
consentString?: GraphQLConsentString; | ||
isTcf?: boolean; | ||
isCcpa?: boolean; | ||
isAnalyticsEnabled?: boolean; | ||
isConsentXDeviceEnabled?: boolean; | ||
} | ||
export declare const mapDataTransferObjectsV2: ({ dataTransferSettings, services, consentAction, consentString, isCcpa, isTcf, isAnalyticsEnabled, isConsentXDeviceEnabled, }: MapDataTransferObjectsV2Options) => ConsentDTOV2; | ||
export declare const reduceIdAndName: <T extends IdAndName>(ids: number[], source: IntMap<T>) => IdAndName[]; | ||
@@ -62,1 +74,2 @@ /** | ||
export declare const compareSemanticVersions: (a: string, b: string) => number; | ||
export {}; |
import { CoreJsonResponse, DpsJsonResponse, LegacyHashService, LegacySettings, Ruleset } from '../interfaces'; | ||
import { UserConsentResponse, UserConsentResponseV2 } from '../interfaces/interfaces'; | ||
import { StorageTCF } from '../../Storage/interfaces'; | ||
import { UcDomains } from '../../../interfaces'; | ||
import { UserConsentResponse } from '../interfaces/interfaces'; | ||
import { UserCountryResponse } from '../../Location/interfaces'; | ||
@@ -42,2 +42,3 @@ export default class Api { | ||
fetchUserConsents(): Promise<UserConsentResponse[]>; | ||
fetchUserConsentsV2(): Promise<UserConsentResponseV2 | null>; | ||
saveConsents(): Promise<Record<string, unknown>[]>; | ||
@@ -44,0 +45,0 @@ saveConsentsV2(): Promise<void>; |
@@ -38,2 +38,13 @@ import { Consents, CoreCcpa, CoreJsonResponse, CoreTcf, DpsJsonResponse, LegacyHashService, LegacySettings, Ruleset, Translations } from '../interfaces'; | ||
}[]; | ||
export declare const fetchUserConsentsV2Data: { | ||
consents: { | ||
status: boolean; | ||
templateId: string; | ||
action: string; | ||
consentId: string; | ||
settingsVersion: string; | ||
timestamp: string; | ||
updatedBy: string; | ||
}[]; | ||
}; | ||
export declare const fetchTranslations: Translations; | ||
@@ -40,0 +51,0 @@ export declare const coreJsonResponseNarrowVendors: CoreJsonResponse; |
@@ -1,2 +0,2 @@ | ||
import { Consents, CoreJsonResponse, DpsJsonResponse, GraphQLQuery, LegacyHashService, LegacySettings, Ruleset, Translations, UserConsentResponse } from './interfaces'; | ||
import { Consents, CoreJsonResponse, DpsJsonResponse, GraphQLQuery, LegacyHashService, LegacySettings, Ruleset, Translations, UserConsentResponse, UserConsentResponseV2 } from './interfaces'; | ||
import { CONSENT_ACTION, CONSENT_TYPE } from '../DataFacade/enums'; | ||
@@ -101,6 +101,10 @@ import { ConsentDTOV2, ConsentDTOV2Record } from '../DataFacade/interfaces/interfaces'; | ||
fetchUserConsents(): Promise<UserConsentResponse[]>; | ||
fetchUserConsentsV2(isTCF: boolean, isCCPA: boolean): Promise<UserConsentResponseV2 | null>; | ||
fetchUserCountry(): Promise<UserCountryResponse>; | ||
fetchUserTcfData(): Promise<StorageTCF | null>; | ||
fetchUserTcfDataV2(): Promise<StorageTCF>; | ||
saveTCFConsents(dataTransferSettings: DataTransferSettings, storageTCF: StorageTCF, consentAction: CONSENT_ACTION, consentType: CONSENT_TYPE): Promise<void>; | ||
saveTCFConsents(dataTransferSettings: DataTransferSettings, storageTCF: StorageTCF, consentAction: CONSENT_ACTION, consentType: CONSENT_TYPE, apiV2: { | ||
isAnalyticsEnabled: boolean; | ||
isConsentAPIv2Enabled: boolean; | ||
} | null): Promise<void>; | ||
saveConsents(consents: Consents): Promise<void>; | ||
@@ -123,2 +127,3 @@ saveConsentsV2(consents: ConsentDTOV2): Promise<void>; | ||
private createFetchUserConsentsUrl; | ||
private createFetchUserConsentsV2Url; | ||
private createFetchUserTcfDataUrl; | ||
@@ -125,0 +130,0 @@ private createFetchUserTcfDataV2Url; |
@@ -9,2 +9,3 @@ export declare const FALLBACK_VERSION = "latest"; | ||
FETCH_CONSENTS: string; | ||
FETCH_CONSENTS_V2: string; | ||
FETCH_TCF_DATA: string; | ||
@@ -27,2 +28,3 @@ FETCH_TCF_DATA_V2: string; | ||
FETCH_CONSENTS: string; | ||
FETCH_CONSENTS_V2: string; | ||
FETCH_TCF_DATA: string; | ||
@@ -42,2 +44,3 @@ FETCH_TCF_DATA_V2: string; | ||
FETCH_CONSENTS: string; | ||
FETCH_CONSENTS_V2: string; | ||
FETCH_TCF_DATA: string; | ||
@@ -60,2 +63,3 @@ FETCH_TCF_DATA_V2: string; | ||
FETCH_CONSENTS: string; | ||
FETCH_CONSENTS_V2: string; | ||
FETCH_TCF_DATA: string; | ||
@@ -62,0 +66,0 @@ FETCH_TCF_DATA_V2: string; |
import { CONSENT_ACTION, CONSENT_TYPE } from '../../DataFacade/enums'; | ||
import { StorageCcpa, StorageTCF } from '../../Storage/interfaces'; | ||
import { DataTransferObject } from '../../DataFacade/interfaces'; | ||
@@ -18,2 +19,3 @@ import { UserCountryData } from '../../..'; | ||
FETCH_CONSENTS: string; | ||
FETCH_CONSENTS_V2?: string; | ||
FETCH_TCF_DATA: string; | ||
@@ -72,2 +74,7 @@ FETCH_TCF_DATA_V2: string; | ||
} | ||
export interface UserConsentResponseV2 { | ||
consents: UserConsentResponse[]; | ||
tcf?: StorageTCF; | ||
ccpa?: StorageCcpa; | ||
} | ||
export declare type RulesetRule = { | ||
@@ -74,0 +81,0 @@ settingsId: string; |
export declare enum CROSS_DEVICE_WARN_MESSAGES { | ||
CROSS_DEVICE_DATA_NOT_AVAILABLE = "Usercentrics: Cross Device Consents data is not available", | ||
CROSS_DEVICE_TCF_DATA_NOT_AVAILABLE = "Usercentrics: Cross Device TCF data is not available" | ||
CROSS_DEVICE_TCF_DATA_NOT_AVAILABLE = "Usercentrics: Cross Device TCF data is not available", | ||
CROSS_DEVICE_FEATURE_DISABLED = "Usercentrics: The `Cross-Device Consent Sharing` feature is not enabled. Please contact the support team in order to enable this feature for your configuration" | ||
} | ||
@@ -5,0 +6,0 @@ export declare enum CROSS_DOMAIN_WARN_MESSAGES { |
import { CONSENT_ACTION } from './enums'; | ||
export declare const INTERNAL_ACTIONS: CONSENT_ACTION[]; | ||
export declare const RESTORE_ACTIONS: CONSENT_ACTION[]; |
@@ -12,3 +12,3 @@ import { CONSENT_ACTION, CONSENT_TYPE } from './enums'; | ||
export default class DataFacade { | ||
restoreAction?: CONSENT_ACTION; | ||
restoreAction: CONSENT_ACTION | null; | ||
private static instance; | ||
@@ -56,3 +56,2 @@ private apiInstance; | ||
restoreData(userSessionData: UserSessionData, dpsJson: DpsJsonResponse): Promise<boolean>; | ||
private mapDataTransferObjectsV2; | ||
private getDataFacadeServices; | ||
@@ -59,0 +58,0 @@ private getMergedAndUpdatedEssentialServices; |
@@ -38,2 +38,7 @@ import { CONSENT_ACTION, CONSENT_TYPE } from '../enums'; | ||
} | ||
export interface ConsentV2Metadata { | ||
timestamp: number; | ||
vendors: (number | number[])[][]; | ||
vendorsDisclosed?: number[]; | ||
} | ||
export interface ConsentDTOV2 { | ||
@@ -47,5 +52,6 @@ action: CONSENT_ACTION; | ||
settingsVersion: string; | ||
consentString: string; | ||
consentMeta: string; | ||
consentString?: string; | ||
consentMeta?: string; | ||
consents: ConsentV2[]; | ||
timestamp?: number; | ||
xdevice: boolean; | ||
@@ -52,0 +58,0 @@ } |
@@ -18,2 +18,5 @@ import { CoreTcf, DpsJsonResponse, LegacySettings } from '../../Api/interfaces'; | ||
hideLegitimateInterestToggles: boolean; | ||
isAnalyticsEnabled: boolean; | ||
isApiV2Enabled: boolean; | ||
isConsentXDeviceEnabled: boolean; | ||
publisherCountryCode: string; | ||
@@ -38,2 +41,3 @@ purposeOneTreatment: boolean; | ||
private selectedLanguage; | ||
private excludeAcceptAllVendors; | ||
acceptAllDisclosed(fromLayer: TCF_DECISION_UI_LAYER): Promise<void>; | ||
@@ -77,4 +81,4 @@ areAllPurposesAccepted(): boolean; | ||
private updateTCString; | ||
constructor(legacySettings: LegacySettings, coreTcf: CoreTcf, dpsJson: DpsJsonResponse, dataTransferSettings: DataTransferSettings, controllerId: string, language: string); | ||
constructor(legacySettings: LegacySettings, coreTcf: CoreTcf, dpsJson: DpsJsonResponse, dataTransferSettings: DataTransferSettings, controllerId: string, language: string, excludeAcceptAllVendors: number[]); | ||
} | ||
export default Tcf; |
@@ -51,3 +51,3 @@ import { BaseCategory, DataExchangeSetting, UserDecision } from './interfaces'; | ||
init(coreJson: CoreJsonResponse, dpsJson: DpsJsonResponse, language: string): Promise<void>; | ||
initData(variant: UI_VARIANT | null, aggregatedServices?: LegacyHashService[], shouldInitTcf?: boolean, isEuMode?: boolean): Promise<void>; | ||
initData(variant: UI_VARIANT | null, aggregatedServices?: LegacyHashService[], shouldInitTcf?: boolean, isEuMode?: boolean, excludeAcceptAllVendors?: number[]): Promise<void>; | ||
checkIfServiceNameExists(services: LegacyService[]): boolean; | ||
@@ -54,0 +54,0 @@ initLabels(variant: UI_VARIANT | null, translations: Translations | null, aggregatedServices?: LegacyHashService[]): void; |
{ | ||
"name": "@usercentrics/cmp-browser-sdk", | ||
"version": "4.9.0", | ||
"version": "4.10.0", | ||
"tcfCmpVersion": "3", | ||
"author": "Usercentrics GmbH", | ||
"description": "Usercentrics CMP Browser SDK", | ||
"homepage": "https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/index.html", | ||
"homepage": "https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/index.html", | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
@@ -9,0 +9,0 @@ "main": "dist/index.js", |
@@ -44,3 +44,3 @@ # Usercentrics CMP Browser SDK | ||
The constructor also supports an optional [Options](https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/interfaces/InitOptions.html) parameter. | ||
The constructor also supports an optional [Options](https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/interfaces/InitOptions.html) parameter. | ||
@@ -134,3 +134,3 @@ ## Geolocation initialization | ||
The constructor also supports an optional [Options](https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/interfaces/InitOptions.html) parameter. | ||
The constructor also supports an optional [Options](https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/interfaces/InitOptions.html) parameter. | ||
@@ -237,3 +237,3 @@ For TCF, the `createTcfApiStub` option needs to be set to true in order for the \_\_tcfapi queue to initialize right away (we cannot wait for the settings request to finish). | ||
- `getServicesBaseInfo` retrieve all services with their base information, without fetching the aggregator. | ||
- Returns [BaseService](https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/interfaces/BaseService.html)[] | ||
- Returns [BaseService](https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/interfaces/BaseService.html)[] | ||
@@ -249,3 +249,3 @@ ``` | ||
- `getServicesFullInfo` retrieves all services with their complete information, fetching the aggregator if necessary. | ||
- Returns Promise<[Service](https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/modules.html#service)[]> | ||
- Returns Promise<[Service](https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/modules.html#service)[]> | ||
@@ -267,3 +267,3 @@ ``` | ||
- `getCategoriesBaseInfo` retrieves the categories and their base services info to display this information in your UI. | ||
- Returns [BaseCategory](https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/interfaces/BaseCategory.html)[] | ||
- Returns [BaseCategory](https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/interfaces/BaseCategory.html)[] | ||
@@ -279,3 +279,3 @@ ``` | ||
- `getCategoriesFullInfo` retrieves the categories and their full services info to display this information in your UI. | ||
- Returns Promise<[Category](https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/interfaces/Category.html)[]> | ||
- Returns Promise<[Category](https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/interfaces/Category.html)[]> | ||
@@ -346,3 +346,3 @@ ``` | ||
```html | ||
<script src="https://app.usercentrics.eu/browser-sdk/4.9.0/bundle.js"></script> | ||
<script src="https://app.usercentrics.eu/browser-sdk/4.10.0/bundle.js"></script> | ||
``` | ||
@@ -379,3 +379,3 @@ | ||
**NOTE**: If you need Internet Explorer 11 support, you can point the `src` attribute to `https://app.usercentrics.eu/browser-sdk/4.9.0/bundle_legacy.js`. | ||
**NOTE**: If you need Internet Explorer 11 support, you can point the `src` attribute to `https://app.usercentrics.eu/browser-sdk/4.10.0/bundle_legacy.js`. | ||
@@ -390,2 +390,2 @@ ## Considerations for building your custom TCF v2.0 UI | ||
Documentation can be found on our [documentation website](https://docs.usercentrics.com/cmp_browser_sdk/4.9.0/index.html). | ||
Documentation can be found on our [documentation website](https://docs.usercentrics.com/cmp_browser_sdk/4.10.0/index.html). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1766468
202
23269