@transcend-io/airgap.js-types 14.2.8 → 14.2.9

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.
package/dist/core.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _transcend_io_type_utils0 from "@transcend-io/type-utils";
1
+ import * as _$_transcend_io_type_utils0 from "@transcend-io/type-utils";
2
2
  import * as t from "io-ts";
3
3
 
4
4
  //#region src/core.d.ts
@@ -770,7 +770,7 @@ declare const ConsentChange: t.RecordC<t.UnionC<[t.KeyofC<{
770
770
  /** type overload */
771
771
  type ConsentChange = t.TypeOf<typeof ConsentChange>;
772
772
  /** Regime purpose scopes configuration */
773
- declare const RegimePurposeScopesConfig: t.ArrayC<t.BrandC<t.ArrayC<t.ArrayC<t.StringC>>, _transcend_io_type_utils0.FixedLengthArrayBrand<t.ArrayC<t.StringC>>>>;
773
+ declare const RegimePurposeScopesConfig: t.ArrayC<t.BrandC<t.ArrayC<t.ArrayC<t.StringC>>, _$_transcend_io_type_utils0.FixedLengthArrayBrand<t.ArrayC<t.StringC>>>>;
774
774
  /** Type override */
775
775
  type RegimePurposeScopesConfig = [/** Regimes */regimes: string[], /** In-scope purposes */purposes: TrackingPurpose[]][];
776
776
  /** Request source types */
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.mts","names":[],"sources":["../src/core.ts"],"mappings":";;;;;KAWY,OAAA;yBAGV,OAAA,OAHiB;EAKjB,MAAA;AAAA;;KAIU,MAAA,GAAS,OAAA;EAAH,uCAEhB,OAAA,UAF0B;EAI1B,MAAA;AAAA;;KAIU,UAAA,GAAa,OAAA;;cAGZ,mBAAA,EAAmB,CAAA,CAAA,MAAA;;;;;;;;;;;;KAcpB,mBAAA,GAAsB,CAAA,CAAE,MAAA,QAAc,mBAAA;;cAGrC,QAAA,EAAQ,CAAA,CAAA,MAAA,EAAA,CAAA,CAAA,MAAA;;;;;;;;;;;;KAET,QAAA,GAAW,CAAA,CAAE,MAAA,Q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AAA,WAAkB,OAAA;AAAA;;KAIR,+BAAA,GAAkC,IAAA,CAAK,yBAAA,eACjD,sCAAA;;KAGG,wCAAA;;UAUK,iCAAA;;EAER,QAAA,GAAW,eAAA;AAAA;;KAID,yBAAA,GAA4B,IAAA,CACtC,+BAAA,EACA,wCAAA,IAEA,iCAAA;;UAGe,sBAAA,SAA+B,+BAAA;;EAE9C,MAAA,IAAU,yBAAA;AAAA;AA1aZ;AAAA,KA8aY,kBAAA,GAAqB,sBAAA;;UAGhB,qBAAA;EA3aE;;;;EAgbjB,OAAA,IAAW,OAAA;EAlbX;;;;;;;AAKF;EAsbE,WAAA,IAAe,OAAA;;EAEf,OAAA;AAAA"}
package/dist/core.mjs CHANGED
@@ -48,14 +48,31 @@ const DefaultConsentConfigValue = t.union([
48
48
  const UserPrivacySignal = t.union([t.literal("GPC"), t.literal("DNT")]);
49
49
  /** Tracking purpose metadata */
50
50
  const TrackingPurposeDetails = t.intersection([t.type({
51
+ /** Tracking purpose name */
51
52
  name: t.string,
53
+ /** Tracking purpose description (used in Consent Manager UI) */
52
54
  description: t.string,
55
+ /** Tracking purpose default consent (default: false) */
53
56
  defaultConsent: DefaultConsentConfigValue,
57
+ /**
58
+ * Is this a first-order tracking purpose? If false, this is a
59
+ * second-order tracking purpose that should only be used for
60
+ * request overrides.
61
+ *
62
+ * This parameter previously meant:
63
+ * Show tracking purpose in consent manager UI.
64
+ *
65
+ * Default value: true
66
+ */
54
67
  showInConsentManager: t.boolean,
68
+ /** Allow user to configure their consent for this purpose (default: true) */
55
69
  configurable: t.boolean,
70
+ /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
56
71
  essential: t.boolean
57
72
  }), t.partial({
73
+ /** Tracking type */
58
74
  trackingType: t.string,
75
+ /** Respected opt-out privacy signals */
59
76
  optOutSignals: t.array(UserPrivacySignal)
60
77
  })]);
61
78
  /** Tracking purposes types configuration */
@@ -64,6 +81,7 @@ const TrackingPurposesTypes = t.record(t.string, TrackingPurposeDetails);
64
81
  const DefaultConsentConfig = t.record(t.string, DefaultConsentConfigValue);
65
82
  /** Tracking purposes configuration */
66
83
  const TrackingPurposesConfig = t.intersection([t.type({
84
+ /** Inherit default tracking purposes config */
67
85
  useDefault: t.boolean,
68
86
  types: TrackingPurposesTypes
69
87
  }), t.partial({ defaultConsent: t.union([DefaultConsentConfigValue, DefaultConsentConfig]) })]);
@@ -75,31 +93,55 @@ const TrackingConsentWithNulls = t.record(t.string, t.union([TrackingConsent, t.
75
93
  const TCFReservedMetadata = t.partial({ tcString: t.string });
76
94
  const ReservedMetadataCodec = t.partial({ tcmp: t.partial({ tcf: TCFReservedMetadata }) });
77
95
  const CoreTrackingConsentDetails = t.intersection([t.type({
96
+ /**
97
+ * Was tracking consent confirmed by the user?
98
+ * If this is false, the consent was resolved from defaults & is not yet confirmed
99
+ */
78
100
  confirmed: t.boolean,
101
+ /** Consent resolution/last-modified timestamp (ISO 8601) */
79
102
  timestamp: t.string
80
103
  }), t.partial({
104
+ /** Has the consent been updated (including no-change confirmation) since default resolution */
81
105
  updated: t.boolean,
106
+ /**
107
+ * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)
108
+ * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
109
+ */
82
110
  prompted: t.boolean,
111
+ /** Arbitrary metadata that customers want to be associated with consent state */
83
112
  metadata: t.intersection([ReservedMetadataCodec, t.UnknownRecord]),
113
+ /** When the metadata was last updated */
84
114
  metadataTimestamp: t.string
85
115
  })]);
86
- const TrackingConsentDetails = t.intersection([CoreTrackingConsentDetails, t.type({ purposes: TrackingConsent })]);
116
+ const TrackingConsentDetails = t.intersection([CoreTrackingConsentDetails, t.type({
117
+ /** Tracking consent config */
118
+ purposes: TrackingConsent })]);
87
119
  const TrackingConsentOptionalData = t.partial({
120
+ /** Transparency Consent (TCF) String */
88
121
  tcf: t.string,
122
+ /** US Privacy (USP) String */
89
123
  usp: t.string,
124
+ /** Global Privacy Platform (GPP) String */
90
125
  gpp: t.string,
126
+ /** Consent Manager View State */
91
127
  viewState: valuesOf(ViewState),
128
+ /** Airgap Version */
92
129
  airgapVersion: t.string
93
130
  });
94
131
  const FullTrackingConsentDetails = t.intersection([TrackingConsentDetails, TrackingConsentOptionalData]);
95
132
  const FullTrackingConsentDetailsWithNulls = t.intersection([
96
133
  CoreTrackingConsentDetails,
97
134
  TrackingConsentOptionalData,
98
- t.type({ purposes: TrackingConsentWithNulls })
135
+ t.type({
136
+ /** Tracking consent config */
137
+ purposes: TrackingConsentWithNulls })
99
138
  ]);
100
139
  const ConsentPreferencesBody = t.type({
140
+ /** token containing encrypted identifier */
101
141
  token: t.string,
142
+ /** consent partition (defaults to bundle id) */
102
143
  partition: t.string,
144
+ /** user consent */
103
145
  consent: TrackingConsentDetails
104
146
  });
105
147
  const ConsentTokenPayload = t.intersection([t.type({ encryptedIdentifier: t.string }), t.partial({ deprecatedEncryptedIdentifiers: t.array(t.string) })]);
package/dist/core.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.mjs","names":[],"sources":["../src/core.ts"],"sourcesContent":["// main\nimport { FixedLengthArray, valuesOf } from '@transcend-io/type-utils';\n// external\nimport * as t from 'io-ts';\n\n// local\nimport { SpecialTrackingPurpose, ViewState } from './enums/index.js';\n\n/* eslint-disable max-lines */\n\n/** Transcend logger items */\nexport type LogItem = {\n /** Log item content */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n content: any;\n /** Log item styles */\n styles: string[];\n};\n\n/** Transcend logger entry tag */\nexport type LogTag = LogItem & {\n /** Log tag content must be a string */\n content: string;\n /** Log tags must have only one style */\n styles: string[1];\n};\n\n/** Transcend logger entry message */\nexport type LogMessage = LogItem;\n\n/** Console-safe log levels */\nexport const ConsoleSafeLogLevel = t.keyof({\n info: null,\n log: null,\n warn: null,\n debug: null,\n error: null,\n trace: null,\n // meta-levels:\n group: null,\n groupCollapsed: null,\n groupEnd: null,\n});\n\n/** Override type */\nexport type ConsoleSafeLogLevel = t.TypeOf<typeof ConsoleSafeLogLevel>;\n\n/** Airgap log levels */\nexport const LogLevel = t.union([ConsoleSafeLogLevel, t.literal('fatal')]);\n/** Override type */\nexport type LogLevel = t.TypeOf<typeof LogLevel>;\n\n/** Airgap logger entry types */\nexport type LogEntryType = LogLevel;\n\n/** Airgap logger entries */\nexport type LogEntry = {\n /** Log entry tag */\n tag: LogTag;\n /** Log entry message */\n message: LogMessage;\n};\n\n/**\n * Log emitter function\n */\nexport type LogEmitter = {\n /** Styled log emitter function */\n styled(styles?: null | string | string[], ...entries: any[]): void; // eslint-disable-line @typescript-eslint/no-explicit-any,max-len\n} & ((...entries: any[]) => void); // eslint-disable-line @typescript-eslint/no-explicit-any\n\n/** Transcend Logger API */\nexport type Logger = {\n /**\n * Set log tag during callback execution or from\n * this point on if no callback is provided.\n */\n tag(logTag: string, callback?: () => any): void; // eslint-disable-line @typescript-eslint/no-explicit-any\n} & {\n /** Log emitter (e.g. `logger.log()`) */\n [method in LogLevel]: LogEmitter;\n};\n\n/** AirgapAuth auth options */\nexport type AirgapAuthMap = {\n /** A `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js) */\n load?: Event;\n /** A user-initiated interaction event that was just dispatched. */\n interaction?: Event;\n /** Automatically reload the page if needed to remove CSP. `false` by default. */\n autoReload?: boolean;\n /**\n * Additional authorization key automatically conferred by airgap.js via setAuth() API for UI modules.\n * Required when optional strict authorization mode is enabled.\n */\n key?: symbol;\n};\n\n/** Airgap authorization proof */\nexport type AirgapAuth =\n | null\n | AirgapAuthMap\n /**\n * A user-initiated interaction event that was just dispatched, or\n * a `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js).\n */\n | Event;\n\n/** A boolean value represented as either `'on'` or `'off'` */\nexport const BooleanString = t.keyof({\n on: null,\n off: null,\n});\n/** Type override */\nexport type BooleanString = t.TypeOf<typeof BooleanString>;\n\n/** Data privacy legal regimes */\nexport type PrivacyRegime = string;\n\nexport interface GetPurposeTypesOptions {\n /** Regimes to include */\n regimes?: PrivacyRegime[];\n /** Privacy signals to include */\n signals?: UserPrivacySignal[];\n}\n\n/**\n * Regime to purpose scope map\n */\nexport type RegimeToPurposeScopes = [PrivacyRegime[], TrackingPurpose[]][];\n\n/** Reserved metadata, currently used for airgap module data syncing */\nexport interface ReservedMetadata {\n /** Top-level key to avoid polluting the metadata key space */\n tcmp?: Record<string, unknown>;\n}\n\n/**\n * Extra metadata to be synced along with consent\n */\nexport type Metadata = Record<string, unknown>;\n\n/** setConsent() options */\nexport interface ConsentOptions {\n /** Was consent confirmed by the user? */\n confirmed?: boolean;\n /**\n * Was the UI shown to the user?\n * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.\n */\n prompted?: boolean;\n /**\n * Extra metadata to be synced along with consent\n *\n * Special values:\n * - `null` - Do not change metadata\n * - `false` - Clear metadata\n */\n metadata?: (Metadata & ReservedMetadata) | null | false;\n /** Last updated for metadata */\n metadataTimestamp?: string;\n /** Whether or not to return a Promise so that the caller can wait for sync to complete. By default, we do not wait for sync */\n waitForSync?: boolean;\n /** Last updated */\n timestamp?: string;\n}\n\n/** airgap.toggle() options */\nexport type AirgapToggleOptions =\n /** Protection state */\n | boolean\n | {\n /** Protection state */\n protection?: boolean;\n };\n\n/** airgap.status format */\nexport interface AirgapSystemStatus {\n /** Protection system active state */\n protection: boolean;\n /** Have any CSPs been activated? */\n csp: boolean;\n /** Monitoring system active state */\n monitoring: boolean;\n /** Telemetry system active state */\n telemetry: boolean;\n}\n\n/**\n * Request override config\n */\nexport interface RequestOverride {\n /** Optional tracking purposes to gate the override with lack of consent */\n unconsented?: TrackingPurpose[];\n /**\n * Optional request matcher. This is a RegExp object (or string input\n * for the RegExp constructor). Overrides apply to all requests\n * when this is undefined.\n */\n matcher?: RegExp | string;\n /** Override executor function or replacement string */\n override: string | ((request: IPendingEvent, matcher?: RegExp) => void);\n /** Name */\n name?: string;\n /** Note */\n note?: string;\n /** Description */\n description?: string;\n}\n\n/** Airgap watcher */\nexport type AirgapWatcher = (request: IPendingEvent) => void;\n\n/**\n * Cookie override handler. This function can modify attempted cookie mutations.\n */\nexport type CookieOverride = (event: IPendingCookieMutation) => void;\n\n/**\n * Passive cookie watcher. This function can view attempted cookie mutations in a read-only state.\n */\nexport type CookieWatcher = (event: IPendingCookieMutation) => void;\n\n/** Event types (for purpose resolution) */\nexport type TrackingEventType = 'request' | 'cookie';\n\n/** Airgap sync types */\nexport type AirgapSyncType = 'consent' | 'quarantine';\n\n/** airgap.sync() options */\nexport interface SyncOptions {\n /** types of data to sync */\n sync?: AirgapSyncType[];\n /** reset synchronized data (default: false) */\n reset?: boolean;\n /** sync locally (i.e. XDI) */\n local?: boolean;\n /** sync with remote endpoint */\n backend?: boolean;\n /** signed authentication token to link consent with encrypted identifier */\n auth?: string;\n}\n\n/** airgap.js API */\nexport type AirgapAPI = Readonly<{\n /** Embedded request watchers */\n watchers?: AirgapWatcher[];\n /** Embedded request overrides (must specify pre-init) */\n overrides?: RequestOverride[];\n /** Embedded request overrides (must specify pre-init) */\n cookieOverrides?: CookieOverride[];\n /** Airgap ready event subscriber */\n ready(callback: (airgap: AirgapAPI) => void): void;\n /** Queue of callbacks to dispatch once airgap is ready */\n readyQueue?: ((airgap: AirgapAPI) => void)[];\n /** Enqueue cross-domain data sync across all airgap bundle domains */\n sync(options?: SyncOptions): Promise<void>;\n /**\n * Resolve URL input reserialization post-regulation.\n * @param resolveOverrides - Resolve overrides. Defaults to true.\n */\n resolve(url: Stringifiable, resolveOverrides?: boolean): Stringifiable;\n /**\n * Resolve consent status for given tracking purposes. Essential purposes override opted out unessential purposes.\n *\n * If `use` is not provided, consent is resolved for both request and cookie tracking event types.\n * @param trackingPurposes - Tracking purposes to resolve\n * @param use - Optional event type to use for tracking purpose resolution\n * @returns `true` if the applicable tracking purposes are consented.\n */\n isConsented(trackingPurposes: TrackingPurposes, use?: TrackingEventType): boolean;\n /** Get tracking consent */\n getConsent(): TrackingConsentDetails;\n /** Set tracking consent */\n setConsent(\n /** Airgap auth proof */\n auth: AirgapAuth,\n /** The tracking consent options. */\n consent: TrackingConsent,\n /** Consent options */\n options?: ConsentOptions,\n ): Promise<boolean> | boolean;\n /**\n * Sets whether or not the Consent UI has been shown to the user\n * @deprecated It was discovered that this function was not working reliably in some versions, and that the value it set was not being used.\n */\n setPrompted(state: boolean): Promise<void>;\n /** Consents the user to all tracking purposes (requires recent UI interaction) */\n optIn(\n /** Airgap auth proof */\n auth: AirgapAuth,\n ): boolean;\n /** Revokes consent for all tracking purposes (requires recent UI interaction) */\n optOut(\n /** Airgap auth proof */\n auth: AirgapAuth,\n ): boolean;\n /** Returns true if the user is fully-opted in to all first-order tracking purposes */\n isOptedIn(): boolean;\n /** Returns true if the user is fully-opted out to all first-order tracking purposes */\n isOptedOut(): boolean;\n /** Resolve regime tracking purposes. If no regimes are provided, then the user's detected regimes are used */\n getRegimePurposes(regimes?: Set<PrivacyRegime>): Set<TrackingPurpose>;\n /** Get initialized tracking purposes config */\n getPurposeTypes(): TrackingPurposesTypes;\n /** Override pending requests */\n override(auth: AirgapAuth, ...overrides: RequestOverride[]): Removable;\n /** Override cookies */\n overrideCookies(auth: AirgapAuth, handler: (event: IPendingCookieMutation) => void): Removable;\n /** Listen to pending requests passively */\n watch(watcher: AirgapWatcher): Removable;\n /** Listen to cookies passively */\n watchCookies(watcher: CookieWatcher): Removable;\n /** Clear airgap queue & caches. Returns `true` on success. */\n clear(auth: AirgapAuth): boolean;\n /** Reset airgap queue and consent. Returns `true` on success. */\n reset(\n /** An airgap auth proof */\n auth: AirgapAuth,\n /** Automatically reload the page if needed to remove CSP. */\n autoReload?: boolean,\n ): boolean;\n /** Check whether a URL is allowed to be loaded */\n isAllowed(\n /** URL to evaluate */\n url: Stringifiable,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<boolean>;\n /** Check whether a cookie is allowed to be set */\n isCookieAllowed(\n /** IPendingCookieMutation-like object to evaluate */\n cookie: string | IPendingCookieMutation | PendingCookieMutationInit,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<boolean>;\n /** Check whether a IPendingRequest is allowed to be loaded */\n isRequestAllowed(\n /** IPendingEvent to inspect */\n request: IPendingEvent,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<boolean>;\n /** Get purposes of URL */\n getPurposes(\n /** URL to evaluate */\n url: Stringifiable,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<TrackingPurposes>;\n /** Get purposes of IPendingRequest */\n getRequestPurposes(\n /** IPendingEvent-like object to inspect */\n request: string | IPendingEvent | PendingRequestInit,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<TrackingPurposes>;\n /** Get purposes of a cookie */\n getCookiePurposes(\n /** IPendingCookieMutation-like object to evaluate */\n cookie: string | IPendingCookieMutation | PendingCookieMutationInit,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<TrackingPurposes>;\n /** Export queues */\n export(options?: AirgapExportOptions): AirgapQueues;\n /** Get a list of legal regimes that are potentially applicable to the user */\n getRegimes(): Set<PrivacyRegime>;\n /** Get a list of detected active user agent privacy signals */\n getPrivacySignals(): Set<UserPrivacySignal>;\n /** Toggle all airgap.js protections. Auth must be a pre-airgap.js or airgap.js script 'load' event. Returns success status */\n toggle(auth: AirgapAuth, options?: AirgapToggleOptions): boolean;\n /** Current airgap.js system flags */\n status: AirgapSystemStatus;\n /** airgap.js version number */\n version: string;\n /** override the event listener signature for consent change events */\n addEventListener: (\n type: AirgapConsentEventType,\n callback: ((evt: ConsentChangeEventPayload) => void) | null,\n options?: boolean | AddEventListenerOptions | undefined,\n ) => void;\n}> &\n EventTarget;\n\n/** airgap.export() options */\nexport interface AirgapExportOptions {\n /** Send output to web endpoint */\n endpoint?: string;\n /** JSON pretty-print indentation (default: 0) */\n space?: number;\n /** Save output to disk (default: off) */\n save?: boolean;\n /** Filename for saving to disk */\n filename?: string;\n}\n\n/** Exported airgap queues & consent */\nexport type AirgapQueues = Readonly<{\n /** airgap.js version number */\n version: string;\n /** Current user consent details */\n consent: TrackingConsentDetails;\n /** Navigation page URL */\n url: Stringifiable;\n /** Pending requests */\n requests: PendingRequestDescriptor[];\n /** Pending mutations (same-session-only replay) */\n mutations: PendingMutationDescriptor[];\n /** Pending cookies */\n cookies: PendingCookieMutationDescriptor[];\n /** Pending cookies (same-session-only replay) */\n cookieMutations: PendingCookieMutationDescriptor[];\n /** Sent requests */\n sentRequests?: PendingRequestDescriptor[];\n /** Set cookies */\n setCookies?: PendingCookieMutationDescriptor[];\n}>;\n\n/**\n * Airgap event types that send the ConsentChangeEventDetails object with them\n */\nexport type AirgapConsentEventType = 'consent-change' | 'sync' | 'consent-resolution';\n\n/**\n * airgap.js event type\n */\nexport type AirgapEventType = AirgapConsentEventType | 'purpose-map-load';\n\nexport interface ConsentChangeEventPayload {\n /** consent change event details */\n detail: ConsentChangeEventDetails;\n}\n\n/** 'consent-change' custom event details */\nexport type ConsentChangeEventDetails = {\n /** The old tracking consent */\n oldConsent: TrackingConsentDetails | null;\n /** The new tracking consent */\n consent: TrackingConsentDetails | null;\n /** The tracking consent diff (what's changed in the new consent) */\n changes: Record<string, boolean> | null;\n /** Applicable privacy signals contributing to this consent change event */\n signals?: Set<UserPrivacySignal> | null;\n};\n\n/** Removable process (can remove watchers, overrides, and protections) */\nexport type Removable = {\n /** Remove/revoke process */\n remove(): void;\n};\n\n/** Any value which implements `toString()` */\nexport type Stringifiable =\n | string\n | (string & {\n toString(): string;\n });\n\n/** Special `defaultConsent` automatic opt-out value for any potential reason */\nexport const AutoOptOut = t.literal('Auto');\n/** Type override */\nexport type AutoOptOut = t.TypeOf<typeof AutoOptOut>;\n\n/** Special `defaultConsent` automatic opt-out value for GDPR-protected users */\nexport const AutoOptOutForGDPR = t.literal('AutoGDPR');\n/** Type override */\nexport type AutoOptOutForGDPR = t.TypeOf<typeof AutoOptOutForGDPR>;\n\n/**\n * Special `defaultConsent` automatic opt-out value for users with DNT enabled.\n * Note that DNT is enabled by default for some browsers.\n */\nexport const AutoOptOutForDNT = t.literal('AutoDNT');\n/** Type override */\nexport type AutoOptOutForDNT = t.TypeOf<typeof AutoOptOutForDNT>;\n\n/**\n * Special `defaultConsent` automatic opt-out value for users with GPC enabled.\n */\nexport const AutoOptOutForGPC = t.literal('AutoGPC');\n/** Type override */\nexport type AutoOptOutForGPC = t.TypeOf<typeof AutoOptOutForGPC>;\n\n/** Potential values for `defaultConsent` config token list */\nexport const DefaultConsentConfigValue = t.union([\n t.boolean,\n AutoOptOut,\n AutoOptOutForGDPR,\n AutoOptOutForDNT,\n AutoOptOutForGPC,\n BooleanString,\n]);\n/** Type override */\nexport type DefaultConsentConfigValue = t.TypeOf<typeof DefaultConsentConfigValue>;\n\n/** User-configurable user agent privacy signal */\nexport const UserPrivacySignal = t.union([\n /** Global Privacy Control */\n t.literal('GPC'),\n /** Do Not Track */\n t.literal('DNT'),\n]);\n\n/** type overload */\nexport type UserPrivacySignal = t.TypeOf<typeof UserPrivacySignal>;\n\n/** Tracking purpose metadata */\nexport const TrackingPurposeDetails = t.intersection([\n t.type({\n /** Tracking purpose name */\n name: t.string,\n /** Tracking purpose description (used in Consent Manager UI) */\n description: t.string,\n /** Tracking purpose default consent (default: false) */\n defaultConsent: DefaultConsentConfigValue,\n /**\n * Is this a first-order tracking purpose? If false, this is a\n * second-order tracking purpose that should only be used for\n * request overrides.\n *\n * This parameter previously meant:\n * Show tracking purpose in consent manager UI.\n *\n * Default value: true\n */\n showInConsentManager: t.boolean,\n /** Allow user to configure their consent for this purpose (default: true) */\n configurable: t.boolean,\n /** Is tracking purpose \"essential\" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */\n essential: t.boolean,\n }),\n t.partial({\n /** Tracking type */\n trackingType: t.string,\n /** Respected opt-out privacy signals */\n optOutSignals: t.array(UserPrivacySignal),\n }),\n]);\n/** Type override */\nexport type TrackingPurposeDetails = t.TypeOf<typeof TrackingPurposeDetails>;\n\n/** Tracking purposes types configuration */\nexport const TrackingPurposesTypes = t.record(t.string, TrackingPurposeDetails);\n/** Type override */\nexport type TrackingPurposesTypes = t.TypeOf<typeof TrackingPurposesTypes>;\n\n/** Fully-resolved `defaultConsent` config */\nexport const DefaultConsentConfig = t.record(t.string, DefaultConsentConfigValue);\n/** Type override */\nexport type DefaultConsentConfig = t.TypeOf<typeof DefaultConsentConfig>;\n\n/** Tracking purposes configuration */\nexport const TrackingPurposesConfig = t.intersection([\n t.type({\n /** Inherit default tracking purposes config */\n useDefault: t.boolean,\n types: TrackingPurposesTypes,\n }),\n t.partial({\n defaultConsent: t.union([DefaultConsentConfigValue, DefaultConsentConfig]),\n }),\n]);\n\n/** Type override */\nexport type TrackingPurposesConfig = {\n /** Inherit default tracking purposes config (Functional, Advertising, Analytics) */\n useDefault: boolean;\n /** Tracking purpose types */\n types: TrackingPurposesTypes;\n /** Default consent states (takes precedence over `TrackingPurposesTypes[purpose].defaultConsent`) */\n defaultConsent?: DefaultConsentConfigValue | DefaultConsentConfig;\n};\n\nexport const TrackingConsent = t.intersection([\n t.partial({\n Essential: t.literal(true),\n Unknown: t.literal(false),\n }),\n t.record(t.string, t.union([DefaultConsentConfigValue, t.undefined])),\n]);\n/**\n * Type override\n */\nexport type TrackingConsent = t.TypeOf<typeof TrackingConsent>;\n\nexport const TrackingConsentWithNulls = t.record(t.string, t.union([TrackingConsent, t.null]));\n/** Type override */\nexport type TrackingConsentWithNulls = t.TypeOf<typeof TrackingConsentWithNulls>;\n\nconst TCFReservedMetadata = t.partial({\n tcString: t.string,\n});\n\nconst ReservedMetadataCodec = t.partial({\n tcmp: t.partial({\n tcf: TCFReservedMetadata,\n }),\n});\n\nexport const CoreTrackingConsentDetails = t.intersection([\n t.type({\n /**\n * Was tracking consent confirmed by the user?\n * If this is false, the consent was resolved from defaults & is not yet confirmed\n */\n confirmed: t.boolean,\n /** Consent resolution/last-modified timestamp (ISO 8601) */\n timestamp: t.string,\n }),\n t.partial({\n /** Has the consent been updated (including no-change confirmation) since default resolution */\n updated: t.boolean,\n /**\n * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)\n * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.\n */\n prompted: t.boolean,\n /** Arbitrary metadata that customers want to be associated with consent state */\n metadata: t.intersection([ReservedMetadataCodec, t.UnknownRecord]),\n /** When the metadata was last updated */\n metadataTimestamp: t.string,\n }),\n]);\n\n/** Type override */\nexport type CoreTrackingConsentDetails = t.TypeOf<typeof CoreTrackingConsentDetails>;\n\nexport const TrackingConsentDetails = t.intersection([\n CoreTrackingConsentDetails,\n t.type({\n /** Tracking consent config */\n purposes: TrackingConsent,\n }),\n]);\n\n/** Override types. */\nexport type TrackingConsentDetails = t.TypeOf<typeof TrackingConsentDetails>;\n\nexport const TrackingConsentOptionalData = t.partial({\n /** Transparency Consent (TCF) String */\n tcf: t.string,\n /** US Privacy (USP) String */\n usp: t.string,\n /** Global Privacy Platform (GPP) String */\n gpp: t.string,\n /** Consent Manager View State */\n viewState: valuesOf(ViewState),\n /** Airgap Version */\n airgapVersion: t.string,\n});\n\nexport const FullTrackingConsentDetails = t.intersection([\n TrackingConsentDetails,\n TrackingConsentOptionalData,\n]);\n\n/** Override types. */\nexport type FullTrackingConsentDetails = t.TypeOf<typeof FullTrackingConsentDetails>;\n\nexport const FullTrackingConsentDetailsWithNulls = t.intersection([\n CoreTrackingConsentDetails,\n TrackingConsentOptionalData,\n t.type({\n /** Tracking consent config */\n purposes: TrackingConsentWithNulls,\n }),\n]);\n\n/** Override types. */\nexport type FullTrackingConsentDetailsWithNulls = t.TypeOf<\n typeof FullTrackingConsentDetailsWithNulls\n>;\n\nexport const ConsentPreferencesBody = t.type({\n /** token containing encrypted identifier */\n token: t.string,\n /** consent partition (defaults to bundle id) */\n partition: t.string,\n /** user consent */\n consent: TrackingConsentDetails,\n});\n\n/** Override types. */\nexport type ConsentPreferencesBody = t.TypeOf<typeof ConsentPreferencesBody>;\n\nexport const ConsentTokenPayload = t.intersection([\n t.type({\n encryptedIdentifier: t.string,\n }),\n t.partial({\n deprecatedEncryptedIdentifiers: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type ConsentTokenPayload = t.TypeOf<typeof ConsentTokenPayload>;\n\n/** Tracking purpose */\nexport const TrackingPurpose = t.union([t.keyof(SpecialTrackingPurpose), t.string]);\n\n/** Type override */\nexport type TrackingPurpose = t.TypeOf<typeof TrackingPurpose>;\n\n/** Tracking purposes */\nexport type TrackingPurposes = Set<TrackingPurpose>;\n\n/** Tracking consent change diffs */\nexport const ConsentChange = t.record(TrackingPurpose, t.boolean);\n\n/** type overload */\nexport type ConsentChange = t.TypeOf<typeof ConsentChange>;\n\n/** Regime purpose scopes configuration */\nexport const RegimePurposeScopesConfig = t.array(FixedLengthArray(2, 2, t.array(t.string)));\n\n/** Type override */\nexport type RegimePurposeScopesConfig = [\n /** Regimes */\n regimes: string[],\n /** In-scope purposes */\n purposes: TrackingPurpose[],\n][];\n\n/** Request source types */\nexport type AirgapRequestSource =\n | 'unknown'\n | 'airgap.js' // emitted by airgap.isAllowed(), etc.\n | 'fetch'\n | 'xhr'\n | 'websocket'\n | 'webtransport'\n | 'service-worker'\n | 'shared-worker'\n | 'worker'\n | 'module-worker'\n | 'shared-module-worker'\n | 'eventsource'\n | 'beacon'\n | 'CSPV'\n | 'navigation'\n | 'open'\n | 'script'\n | AirgapDOMRequestSource;\n\n/** DOM-initiated request source types */\nexport type AirgapDOMRequestSource =\n | 'DOM:style'\n | 'DOM:image'\n | 'DOM:media'\n | 'DOM:video'\n | 'DOM:audio'\n | 'DOM:track'\n | 'DOM:link'\n | 'DOM:form'\n | 'DOM:form-action'\n | 'DOM:view' // iframe {srcdoc, src}, object, embed\n | 'DOM:ping'\n | 'DOM:unknown';\n\n/**\n * Airgap pending request descriptor init dictionary\n */\nexport interface PendingRequestInit {\n /** Request initiator type */\n type: AirgapRequestSource;\n /** Request URL */\n url: Stringifiable;\n /** Persist request for cross-session replay (false by default) */\n persist?: boolean;\n /** Request initialization data */\n requestInit?: RequestInit;\n /** Request timestamp (ISO 8601) */\n timestamp?: Stringifiable;\n /** Request DOM target */\n target?: Node | IDynamicNodeReference | null;\n /** Mutator to apply changes associated with the request */\n mutator?(): void;\n /** Serialize request or mutation state back to DOM patcher parser input */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n serialize?(): any;\n /** Prevent credentials from being included in request */\n omitCredentials?(): boolean;\n}\n\n/** Properties that are added to instantiated PendingRequests */\nexport interface InstantiatedPendingRequestProps {\n /** Primary or first associated request URL input */\n url: Stringifiable;\n /** All associated request URL inputs */\n urls: Stringifiable[];\n /** Request timestamp (ISO 8601) */\n timestamp: Stringifiable;\n /** Serialize request or mutation state back to DOM patcher parser input */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n serialize(): any;\n\n /** The following IPendingEvent APIs are only available to overrides: */\n\n /**\n * All associated resolved request URLs. null = invalid URL or data: URL (parsing\n * skipped to optimize performance)\n */\n URLs: (URL | null)[];\n /** Prevent credentials from being included in request */\n omitCredentials(): boolean;\n /** Whether or not request is currently allowed */\n allowed: boolean;\n /** Bypass our consent logic and force-allow request */\n allow(): void;\n /** Bypass our consent logic and force-deny request */\n deny(): void;\n /** Bypass our consent logic to force-deny request and also block it from entering the replay quarantine */\n block(): void;\n /** Resolved tracking purposes associated with this pending mutation */\n purposes: Set<TrackingPurpose>;\n}\n\n/**\n * Airgap pending request descriptor with script annotation\n */\nexport type PendingRequestDescriptor = PendingRequestInit & InstantiatedPendingRequestProps;\n\n/** Airgap pending request descriptor init with multiple URLs */\nexport type PendingMutationInit = Omit<PendingRequestInit, 'url'> & {\n /** Request URLs */\n urls: Stringifiable[];\n};\n\n/** PendingEvent init input */\nexport type PendingEventInit = PendingRequestInit | PendingMutationInit;\n\n/** Pending mutation descriptor */\nexport type PendingMutationDescriptor = PendingMutationInit & InstantiatedPendingRequestProps;\n\n/** Pending event props that can't or won't be serialized to JSON */\ntype PendingEventUnserializableProps =\n | 'persist'\n | 'target'\n | 'mutator'\n | 'serialize'\n | 'URLs'\n | 'omitCredentials'\n | 'allow'\n | 'deny'\n | 'purposes'\n | 'allowed'\n | 'blocked';\n\n/** JSON-safe representation of pending event tracking purposes */\ninterface PendingEventPurposesJSON {\n /** Tracking purposes list */\n purposes?: TrackingPurpose[];\n}\n\n/** Pending request subset to JSON-safe properties */\nexport type PendingRequestJSON = Omit<\n PendingRequestDescriptor,\n PendingEventUnserializableProps | 'urls'\n> &\n PendingEventPurposesJSON;\n\n/** Pending mutation subset to JSON-safe properties */\nexport type PendingMutationJSON = Omit<\n PendingMutationDescriptor,\n PendingEventUnserializableProps | 'url'\n> &\n PendingEventPurposesJSON;\n\n/** Airgap pending request interface */\nexport interface IPendingRequest extends PendingRequestDescriptor {\n /** Convert PendingRequest to JSON-safe representation */\n toJSON(): PendingRequestJSON;\n}\n\n/** Airgap pending mutation interface */\nexport interface IPendingMutation extends PendingMutationDescriptor {\n /** Convert PendingRequest to JSON-safe representation */\n toJSON(): PendingMutationJSON;\n}\n\n/** Pending event descriptor */\nexport type PendingEventDescriptor = PendingRequestDescriptor | PendingMutationDescriptor;\n\n/** Pending request or mutation */\nexport type IPendingEvent = IPendingMutation | IPendingRequest;\n\n/** Unapproved request queue */\nexport type PendingRequestQueue = IPendingRequest[];\n\n/** Unapproved mutation queue */\nexport type PendingMutationQueue = IPendingEvent[];\n\n/** Unapproved event queue */\nexport type PendingEventQueue = IPendingEvent[];\n\n/** Cookie descriptor */\nexport interface Cookie {\n /** Cookie name */\n name: Stringifiable;\n /** Cookie value */\n value?: Stringifiable;\n /** Cookie change event timestamp (ISO 8601) */\n timestamp?: string;\n /** Expiry date (UTC date string or DOMTimeStamp) */\n expires?: number | Stringifiable;\n /** Max cookie age (seconds) */\n maxAge?: number;\n /** Optional cookie host scope */\n domain?: Stringifiable;\n /** Optional cookie path scope */\n path?: Stringifiable;\n /** Should cookie only be sent in secure contexts? */\n secure?: boolean;\n /**\n * Should cookie be restricted to the same site?\n * Values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite\n */\n sameSite?: Stringifiable;\n /**\n * Is the cookie partitioned (e.g. by CHIPS)?\n * See https://developer.mozilla.org/en-US/docs/Web/Privacy/Partitioned_cookies\n * and https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/get#:~:text=of%20the%20cookie.-,partitioned,-A%20boolean%20indicating\n */\n partitioned?: boolean;\n /** Target document / node */\n target?: Node | null;\n}\n\n/**\n * PendingCookieMutation constructor input\n */\nexport interface PendingCookieMutationInit extends Cookie {\n /** Persist cookie for cross-session replay if quarantined (true by default) */\n persist?: boolean;\n /** Mutator to apply cookie mutation */\n mutator?(): void | Promise<void>;\n}\n\n/** Properties that are added to instantiated PendingCookieMutations */\nexport interface InstantiatedPendingCookieMutationProps {\n /** Expiry date (DOMTimeStamp) */\n expires?: number;\n /** Cookie change event timestamp (Date.now() format) */\n timestamp: string;\n /** Whether or not cookie is currently allowed. null = passthrough */\n allowed?: boolean | null;\n /** Whether or not cookie is currently disallowed & blocked from entering the quarantine */\n blocked?: boolean;\n /** Bypass our consent logic and force-allow cookie */\n allow(): void;\n /** Bypass our consent logic and force-deny cookie */\n deny(): void;\n /** Bypass our consent logic to force-deny cookie and also block it from entering the quarantine */\n block(): void;\n /** Resolved tracking purposes associated with this pending mutation */\n purposes: Set<TrackingPurpose>;\n /** Mutator to apply cookie mutation */\n mutator(): void | Promise<void>;\n}\n\n/** Pending cookie mutation descriptor */\nexport type PendingCookieMutationDescriptor = Omit<PendingCookieMutationInit, 'expires'> &\n InstantiatedPendingCookieMutationProps;\n\n/** Pending cookie mutation props that can't or won't be serialized to JSON */\ntype PendingCookieMutationUnserializableProps =\n | 'persist'\n | 'mutator'\n | 'allow'\n | 'deny'\n | 'purposes'\n | 'allowed'\n | 'blocked';\n\n/** JSON-safe representation of pending cookie mutation tracking purposes */\ninterface PendingCookieMutationPurposesJSON {\n /** Tracking purposes list */\n purposes?: TrackingPurpose[];\n}\n\n/** Pending request subset to JSON-safe properties */\nexport type PendingCookieMutationJSON = Omit<\n PendingCookieMutationDescriptor,\n PendingCookieMutationUnserializableProps\n> &\n PendingCookieMutationPurposesJSON;\n\n/** Airgap pending cookie mutation interface */\nexport interface IPendingCookieMutation extends PendingCookieMutationDescriptor {\n /** Convert PendingCookieMutation to JSON-safe representation */\n toJSON(): PendingCookieMutationJSON;\n}\n\n/** Pending cookie mutation queue */\nexport type PendingCookieQueue = IPendingCookieMutation[];\n\n/** Interface for dynamic node references */\nexport interface IDynamicNodeReference {\n /**\n * Current node getter. This should always be used in `handleLiveMutation()`.\n * @returns current node\n */\n getNode(): Element;\n /**\n * Live node getter. Use this to apply mutations in `quarantine()`\n * and `quarantineMutation()` handlers.\n *\n * `release()` must always be called after completing\n * mutations using `getLiveNode()`.\n * @returns live node\n */\n getLiveNode(): Element;\n /** Release & garbage-collect internal node reference */\n release(): void;\n}\n\n/* eslint-enable max-lines */\n"],"mappings":";;;;;;AA+BA,MAAa,sBAAsB,EAAE,MAAM;CACzC,MAAM;CACN,KAAK;CACL,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO;CAEP,OAAO;CACP,gBAAgB;CAChB,UAAU;CACX,CAAC;;AAMF,MAAa,WAAW,EAAE,MAAM,CAAC,qBAAqB,EAAE,QAAQ,QAAQ,CAAC,CAAC;;AA6D1E,MAAa,gBAAgB,EAAE,MAAM;CACnC,IAAI;CACJ,KAAK;CACN,CAAC;;AA4VF,MAAa,aAAa,EAAE,QAAQ,OAAO;;AAK3C,MAAa,oBAAoB,EAAE,QAAQ,WAAW;;;;;AAQtD,MAAa,mBAAmB,EAAE,QAAQ,UAAU;;;;AAOpD,MAAa,mBAAmB,EAAE,QAAQ,UAAU;;AAKpD,MAAa,4BAA4B,EAAE,MAAM;CAC/C,EAAE;CACF;CACA;CACA;CACA;CACA;CACD,CAAC;;AAKF,MAAa,oBAAoB,EAAE,MAAM,C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E;CAKX,UAAU,EAAE;CAEZ,UAAU,EAAE,aAAa,CAAC,uBAAuB,EAAE,cAAc,CAAC;CAElE,mBAAmB,EAAE;CACtB,CAAC,CACH,CAAC;AAKF,MAAa,yBAAyB,EAAE,aAAa,CACnD,4BACA,EAAE,KAAK,EAEL,UAAU,iBACX,CAAC,CACH,CAAC;AAKF,MAAa,8BAA8B,EAAE,QAAQ;CAEnD,KAAK,EAAE;CAEP,KAAK,EAAE;CAEP,KAAK,EAAE;CAEP,WAAW,SAAS,UAAU;CAE9B,eAAe,EAAE;CAClB,CAAC;AAEF,MAAa,6BAA6B,EAAE,aAAa,CACvD,wBACA,4BACD,CAAC;AAKF,MAAa,sCAAsC,EAAE,aAAa;CAChE;CACA;CACA,EAAE,KAAK,EAEL,UAAU,0BACX,CAAC;CACH,CAAC;AAOF,MAAa,yBAAyB,EAAE,KAAK;CAE3C,OAAO,EAAE;CAET,WAAW,EAAE;CAEb,SAAS;CACV,CAAC;AAKF,MAAa,sBAAsB,EAAE,aAAa,CAChD,EAAE,KAAK,EACL,qBAAqB,EAAE,QACxB,CAAC,EACF,EAAE,QAAQ,EACR,gCAAgC,EAAE,MAAM,EAAE,OAAO,EAClD,CAAC,CACH,CAAC;;AAMF,MAAa,kBAAkB,EAAE,MAAM,CAAC,EAAE,MAAM,uBAAuB,EAAE,EAAE,OAAO,CAAC;;AASnF,MAAa,gBAAgB,EAAE,OAAO,iBAAiB,EAAE,QAAQ;;AAMjE,MAAa,4BAA4B,EAAE,MAAM,iBAAiB,GAAG,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"core.mjs","names":[],"sources":["../src/core.ts"],"sourcesContent":["// main\nimport { FixedLengthArray, valuesOf } from '@transcend-io/type-utils';\n// external\nimport * as t from 'io-ts';\n\n// local\nimport { SpecialTrackingPurpose, ViewState } from './enums/index.js';\n\n/* eslint-disable max-lines */\n\n/** Transcend logger items */\nexport type LogItem = {\n /** Log item content */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n content: any;\n /** Log item styles */\n styles: string[];\n};\n\n/** Transcend logger entry tag */\nexport type LogTag = LogItem & {\n /** Log tag content must be a string */\n content: string;\n /** Log tags must have only one style */\n styles: string[1];\n};\n\n/** Transcend logger entry message */\nexport type LogMessage = LogItem;\n\n/** Console-safe log levels */\nexport const ConsoleSafeLogLevel = t.keyof({\n info: null,\n log: null,\n warn: null,\n debug: null,\n error: null,\n trace: null,\n // meta-levels:\n group: null,\n groupCollapsed: null,\n groupEnd: null,\n});\n\n/** Override type */\nexport type ConsoleSafeLogLevel = t.TypeOf<typeof ConsoleSafeLogLevel>;\n\n/** Airgap log levels */\nexport const LogLevel = t.union([ConsoleSafeLogLevel, t.literal('fatal')]);\n/** Override type */\nexport type LogLevel = t.TypeOf<typeof LogLevel>;\n\n/** Airgap logger entry types */\nexport type LogEntryType = LogLevel;\n\n/** Airgap logger entries */\nexport type LogEntry = {\n /** Log entry tag */\n tag: LogTag;\n /** Log entry message */\n message: LogMessage;\n};\n\n/**\n * Log emitter function\n */\nexport type LogEmitter = {\n /** Styled log emitter function */\n styled(styles?: null | string | string[], ...entries: any[]): void; // eslint-disable-line @typescript-eslint/no-explicit-any,max-len\n} & ((...entries: any[]) => void); // eslint-disable-line @typescript-eslint/no-explicit-any\n\n/** Transcend Logger API */\nexport type Logger = {\n /**\n * Set log tag during callback execution or from\n * this point on if no callback is provided.\n */\n tag(logTag: string, callback?: () => any): void; // eslint-disable-line @typescript-eslint/no-explicit-any\n} & {\n /** Log emitter (e.g. `logger.log()`) */\n [method in LogLevel]: LogEmitter;\n};\n\n/** AirgapAuth auth options */\nexport type AirgapAuthMap = {\n /** A `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js) */\n load?: Event;\n /** A user-initiated interaction event that was just dispatched. */\n interaction?: Event;\n /** Automatically reload the page if needed to remove CSP. `false` by default. */\n autoReload?: boolean;\n /**\n * Additional authorization key automatically conferred by airgap.js via setAuth() API for UI modules.\n * Required when optional strict authorization mode is enabled.\n */\n key?: symbol;\n};\n\n/** Airgap authorization proof */\nexport type AirgapAuth =\n | null\n | AirgapAuthMap\n /**\n * A user-initiated interaction event that was just dispatched, or\n * a `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js).\n */\n | Event;\n\n/** A boolean value represented as either `'on'` or `'off'` */\nexport const BooleanString = t.keyof({\n on: null,\n off: null,\n});\n/** Type override */\nexport type BooleanString = t.TypeOf<typeof BooleanString>;\n\n/** Data privacy legal regimes */\nexport type PrivacyRegime = string;\n\nexport interface GetPurposeTypesOptions {\n /** Regimes to include */\n regimes?: PrivacyRegime[];\n /** Privacy signals to include */\n signals?: UserPrivacySignal[];\n}\n\n/**\n * Regime to purpose scope map\n */\nexport type RegimeToPurposeScopes = [PrivacyRegime[], TrackingPurpose[]][];\n\n/** Reserved metadata, currently used for airgap module data syncing */\nexport interface ReservedMetadata {\n /** Top-level key to avoid polluting the metadata key space */\n tcmp?: Record<string, unknown>;\n}\n\n/**\n * Extra metadata to be synced along with consent\n */\nexport type Metadata = Record<string, unknown>;\n\n/** setConsent() options */\nexport interface ConsentOptions {\n /** Was consent confirmed by the user? */\n confirmed?: boolean;\n /**\n * Was the UI shown to the user?\n * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.\n */\n prompted?: boolean;\n /**\n * Extra metadata to be synced along with consent\n *\n * Special values:\n * - `null` - Do not change metadata\n * - `false` - Clear metadata\n */\n metadata?: (Metadata & ReservedMetadata) | null | false;\n /** Last updated for metadata */\n metadataTimestamp?: string;\n /** Whether or not to return a Promise so that the caller can wait for sync to complete. By default, we do not wait for sync */\n waitForSync?: boolean;\n /** Last updated */\n timestamp?: string;\n}\n\n/** airgap.toggle() options */\nexport type AirgapToggleOptions =\n /** Protection state */\n | boolean\n | {\n /** Protection state */\n protection?: boolean;\n };\n\n/** airgap.status format */\nexport interface AirgapSystemStatus {\n /** Protection system active state */\n protection: boolean;\n /** Have any CSPs been activated? */\n csp: boolean;\n /** Monitoring system active state */\n monitoring: boolean;\n /** Telemetry system active state */\n telemetry: boolean;\n}\n\n/**\n * Request override config\n */\nexport interface RequestOverride {\n /** Optional tracking purposes to gate the override with lack of consent */\n unconsented?: TrackingPurpose[];\n /**\n * Optional request matcher. This is a RegExp object (or string input\n * for the RegExp constructor). Overrides apply to all requests\n * when this is undefined.\n */\n matcher?: RegExp | string;\n /** Override executor function or replacement string */\n override: string | ((request: IPendingEvent, matcher?: RegExp) => void);\n /** Name */\n name?: string;\n /** Note */\n note?: string;\n /** Description */\n description?: string;\n}\n\n/** Airgap watcher */\nexport type AirgapWatcher = (request: IPendingEvent) => void;\n\n/**\n * Cookie override handler. This function can modify attempted cookie mutations.\n */\nexport type CookieOverride = (event: IPendingCookieMutation) => void;\n\n/**\n * Passive cookie watcher. This function can view attempted cookie mutations in a read-only state.\n */\nexport type CookieWatcher = (event: IPendingCookieMutation) => void;\n\n/** Event types (for purpose resolution) */\nexport type TrackingEventType = 'request' | 'cookie';\n\n/** Airgap sync types */\nexport type AirgapSyncType = 'consent' | 'quarantine';\n\n/** airgap.sync() options */\nexport interface SyncOptions {\n /** types of data to sync */\n sync?: AirgapSyncType[];\n /** reset synchronized data (default: false) */\n reset?: boolean;\n /** sync locally (i.e. XDI) */\n local?: boolean;\n /** sync with remote endpoint */\n backend?: boolean;\n /** signed authentication token to link consent with encrypted identifier */\n auth?: string;\n}\n\n/** airgap.js API */\nexport type AirgapAPI = Readonly<{\n /** Embedded request watchers */\n watchers?: AirgapWatcher[];\n /** Embedded request overrides (must specify pre-init) */\n overrides?: RequestOverride[];\n /** Embedded request overrides (must specify pre-init) */\n cookieOverrides?: CookieOverride[];\n /** Airgap ready event subscriber */\n ready(callback: (airgap: AirgapAPI) => void): void;\n /** Queue of callbacks to dispatch once airgap is ready */\n readyQueue?: ((airgap: AirgapAPI) => void)[];\n /** Enqueue cross-domain data sync across all airgap bundle domains */\n sync(options?: SyncOptions): Promise<void>;\n /**\n * Resolve URL input reserialization post-regulation.\n * @param resolveOverrides - Resolve overrides. Defaults to true.\n */\n resolve(url: Stringifiable, resolveOverrides?: boolean): Stringifiable;\n /**\n * Resolve consent status for given tracking purposes. Essential purposes override opted out unessential purposes.\n *\n * If `use` is not provided, consent is resolved for both request and cookie tracking event types.\n * @param trackingPurposes - Tracking purposes to resolve\n * @param use - Optional event type to use for tracking purpose resolution\n * @returns `true` if the applicable tracking purposes are consented.\n */\n isConsented(trackingPurposes: TrackingPurposes, use?: TrackingEventType): boolean;\n /** Get tracking consent */\n getConsent(): TrackingConsentDetails;\n /** Set tracking consent */\n setConsent(\n /** Airgap auth proof */\n auth: AirgapAuth,\n /** The tracking consent options. */\n consent: TrackingConsent,\n /** Consent options */\n options?: ConsentOptions,\n ): Promise<boolean> | boolean;\n /**\n * Sets whether or not the Consent UI has been shown to the user\n * @deprecated It was discovered that this function was not working reliably in some versions, and that the value it set was not being used.\n */\n setPrompted(state: boolean): Promise<void>;\n /** Consents the user to all tracking purposes (requires recent UI interaction) */\n optIn(\n /** Airgap auth proof */\n auth: AirgapAuth,\n ): boolean;\n /** Revokes consent for all tracking purposes (requires recent UI interaction) */\n optOut(\n /** Airgap auth proof */\n auth: AirgapAuth,\n ): boolean;\n /** Returns true if the user is fully-opted in to all first-order tracking purposes */\n isOptedIn(): boolean;\n /** Returns true if the user is fully-opted out to all first-order tracking purposes */\n isOptedOut(): boolean;\n /** Resolve regime tracking purposes. If no regimes are provided, then the user's detected regimes are used */\n getRegimePurposes(regimes?: Set<PrivacyRegime>): Set<TrackingPurpose>;\n /** Get initialized tracking purposes config */\n getPurposeTypes(): TrackingPurposesTypes;\n /** Override pending requests */\n override(auth: AirgapAuth, ...overrides: RequestOverride[]): Removable;\n /** Override cookies */\n overrideCookies(auth: AirgapAuth, handler: (event: IPendingCookieMutation) => void): Removable;\n /** Listen to pending requests passively */\n watch(watcher: AirgapWatcher): Removable;\n /** Listen to cookies passively */\n watchCookies(watcher: CookieWatcher): Removable;\n /** Clear airgap queue & caches. Returns `true` on success. */\n clear(auth: AirgapAuth): boolean;\n /** Reset airgap queue and consent. Returns `true` on success. */\n reset(\n /** An airgap auth proof */\n auth: AirgapAuth,\n /** Automatically reload the page if needed to remove CSP. */\n autoReload?: boolean,\n ): boolean;\n /** Check whether a URL is allowed to be loaded */\n isAllowed(\n /** URL to evaluate */\n url: Stringifiable,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<boolean>;\n /** Check whether a cookie is allowed to be set */\n isCookieAllowed(\n /** IPendingCookieMutation-like object to evaluate */\n cookie: string | IPendingCookieMutation | PendingCookieMutationInit,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<boolean>;\n /** Check whether a IPendingRequest is allowed to be loaded */\n isRequestAllowed(\n /** IPendingEvent to inspect */\n request: IPendingEvent,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<boolean>;\n /** Get purposes of URL */\n getPurposes(\n /** URL to evaluate */\n url: Stringifiable,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<TrackingPurposes>;\n /** Get purposes of IPendingRequest */\n getRequestPurposes(\n /** IPendingEvent-like object to inspect */\n request: string | IPendingEvent | PendingRequestInit,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<TrackingPurposes>;\n /** Get purposes of a cookie */\n getCookiePurposes(\n /** IPendingCookieMutation-like object to evaluate */\n cookie: string | IPendingCookieMutation | PendingCookieMutationInit,\n /** Should overrides be resolved? true by default */\n resolveOverrides?: boolean,\n ): Promise<TrackingPurposes>;\n /** Export queues */\n export(options?: AirgapExportOptions): AirgapQueues;\n /** Get a list of legal regimes that are potentially applicable to the user */\n getRegimes(): Set<PrivacyRegime>;\n /** Get a list of detected active user agent privacy signals */\n getPrivacySignals(): Set<UserPrivacySignal>;\n /** Toggle all airgap.js protections. Auth must be a pre-airgap.js or airgap.js script 'load' event. Returns success status */\n toggle(auth: AirgapAuth, options?: AirgapToggleOptions): boolean;\n /** Current airgap.js system flags */\n status: AirgapSystemStatus;\n /** airgap.js version number */\n version: string;\n /** override the event listener signature for consent change events */\n addEventListener: (\n type: AirgapConsentEventType,\n callback: ((evt: ConsentChangeEventPayload) => void) | null,\n options?: boolean | AddEventListenerOptions | undefined,\n ) => void;\n}> &\n EventTarget;\n\n/** airgap.export() options */\nexport interface AirgapExportOptions {\n /** Send output to web endpoint */\n endpoint?: string;\n /** JSON pretty-print indentation (default: 0) */\n space?: number;\n /** Save output to disk (default: off) */\n save?: boolean;\n /** Filename for saving to disk */\n filename?: string;\n}\n\n/** Exported airgap queues & consent */\nexport type AirgapQueues = Readonly<{\n /** airgap.js version number */\n version: string;\n /** Current user consent details */\n consent: TrackingConsentDetails;\n /** Navigation page URL */\n url: Stringifiable;\n /** Pending requests */\n requests: PendingRequestDescriptor[];\n /** Pending mutations (same-session-only replay) */\n mutations: PendingMutationDescriptor[];\n /** Pending cookies */\n cookies: PendingCookieMutationDescriptor[];\n /** Pending cookies (same-session-only replay) */\n cookieMutations: PendingCookieMutationDescriptor[];\n /** Sent requests */\n sentRequests?: PendingRequestDescriptor[];\n /** Set cookies */\n setCookies?: PendingCookieMutationDescriptor[];\n}>;\n\n/**\n * Airgap event types that send the ConsentChangeEventDetails object with them\n */\nexport type AirgapConsentEventType = 'consent-change' | 'sync' | 'consent-resolution';\n\n/**\n * airgap.js event type\n */\nexport type AirgapEventType = AirgapConsentEventType | 'purpose-map-load';\n\nexport interface ConsentChangeEventPayload {\n /** consent change event details */\n detail: ConsentChangeEventDetails;\n}\n\n/** 'consent-change' custom event details */\nexport type ConsentChangeEventDetails = {\n /** The old tracking consent */\n oldConsent: TrackingConsentDetails | null;\n /** The new tracking consent */\n consent: TrackingConsentDetails | null;\n /** The tracking consent diff (what's changed in the new consent) */\n changes: Record<string, boolean> | null;\n /** Applicable privacy signals contributing to this consent change event */\n signals?: Set<UserPrivacySignal> | null;\n};\n\n/** Removable process (can remove watchers, overrides, and protections) */\nexport type Removable = {\n /** Remove/revoke process */\n remove(): void;\n};\n\n/** Any value which implements `toString()` */\nexport type Stringifiable =\n | string\n | (string & {\n toString(): string;\n });\n\n/** Special `defaultConsent` automatic opt-out value for any potential reason */\nexport const AutoOptOut = t.literal('Auto');\n/** Type override */\nexport type AutoOptOut = t.TypeOf<typeof AutoOptOut>;\n\n/** Special `defaultConsent` automatic opt-out value for GDPR-protected users */\nexport const AutoOptOutForGDPR = t.literal('AutoGDPR');\n/** Type override */\nexport type AutoOptOutForGDPR = t.TypeOf<typeof AutoOptOutForGDPR>;\n\n/**\n * Special `defaultConsent` automatic opt-out value for users with DNT enabled.\n * Note that DNT is enabled by default for some browsers.\n */\nexport const AutoOptOutForDNT = t.literal('AutoDNT');\n/** Type override */\nexport type AutoOptOutForDNT = t.TypeOf<typeof AutoOptOutForDNT>;\n\n/**\n * Special `defaultConsent` automatic opt-out value for users with GPC enabled.\n */\nexport const AutoOptOutForGPC = t.literal('AutoGPC');\n/** Type override */\nexport type AutoOptOutForGPC = t.TypeOf<typeof AutoOptOutForGPC>;\n\n/** Potential values for `defaultConsent` config token list */\nexport const DefaultConsentConfigValue = t.union([\n t.boolean,\n AutoOptOut,\n AutoOptOutForGDPR,\n AutoOptOutForDNT,\n AutoOptOutForGPC,\n BooleanString,\n]);\n/** Type override */\nexport type DefaultConsentConfigValue = t.TypeOf<typeof DefaultConsentConfigValue>;\n\n/** User-configurable user agent privacy signal */\nexport const UserPrivacySignal = t.union([\n /** Global Privacy Control */\n t.literal('GPC'),\n /** Do Not Track */\n t.literal('DNT'),\n]);\n\n/** type overload */\nexport type UserPrivacySignal = t.TypeOf<typeof UserPrivacySignal>;\n\n/** Tracking purpose metadata */\nexport const TrackingPurposeDetails = t.intersection([\n t.type({\n /** Tracking purpose name */\n name: t.string,\n /** Tracking purpose description (used in Consent Manager UI) */\n description: t.string,\n /** Tracking purpose default consent (default: false) */\n defaultConsent: DefaultConsentConfigValue,\n /**\n * Is this a first-order tracking purpose? If false, this is a\n * second-order tracking purpose that should only be used for\n * request overrides.\n *\n * This parameter previously meant:\n * Show tracking purpose in consent manager UI.\n *\n * Default value: true\n */\n showInConsentManager: t.boolean,\n /** Allow user to configure their consent for this purpose (default: true) */\n configurable: t.boolean,\n /** Is tracking purpose \"essential\" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */\n essential: t.boolean,\n }),\n t.partial({\n /** Tracking type */\n trackingType: t.string,\n /** Respected opt-out privacy signals */\n optOutSignals: t.array(UserPrivacySignal),\n }),\n]);\n/** Type override */\nexport type TrackingPurposeDetails = t.TypeOf<typeof TrackingPurposeDetails>;\n\n/** Tracking purposes types configuration */\nexport const TrackingPurposesTypes = t.record(t.string, TrackingPurposeDetails);\n/** Type override */\nexport type TrackingPurposesTypes = t.TypeOf<typeof TrackingPurposesTypes>;\n\n/** Fully-resolved `defaultConsent` config */\nexport const DefaultConsentConfig = t.record(t.string, DefaultConsentConfigValue);\n/** Type override */\nexport type DefaultConsentConfig = t.TypeOf<typeof DefaultConsentConfig>;\n\n/** Tracking purposes configuration */\nexport const TrackingPurposesConfig = t.intersection([\n t.type({\n /** Inherit default tracking purposes config */\n useDefault: t.boolean,\n types: TrackingPurposesTypes,\n }),\n t.partial({\n defaultConsent: t.union([DefaultConsentConfigValue, DefaultConsentConfig]),\n }),\n]);\n\n/** Type override */\nexport type TrackingPurposesConfig = {\n /** Inherit default tracking purposes config (Functional, Advertising, Analytics) */\n useDefault: boolean;\n /** Tracking purpose types */\n types: TrackingPurposesTypes;\n /** Default consent states (takes precedence over `TrackingPurposesTypes[purpose].defaultConsent`) */\n defaultConsent?: DefaultConsentConfigValue | DefaultConsentConfig;\n};\n\nexport const TrackingConsent = t.intersection([\n t.partial({\n Essential: t.literal(true),\n Unknown: t.literal(false),\n }),\n t.record(t.string, t.union([DefaultConsentConfigValue, t.undefined])),\n]);\n/**\n * Type override\n */\nexport type TrackingConsent = t.TypeOf<typeof TrackingConsent>;\n\nexport const TrackingConsentWithNulls = t.record(t.string, t.union([TrackingConsent, t.null]));\n/** Type override */\nexport type TrackingConsentWithNulls = t.TypeOf<typeof TrackingConsentWithNulls>;\n\nconst TCFReservedMetadata = t.partial({\n tcString: t.string,\n});\n\nconst ReservedMetadataCodec = t.partial({\n tcmp: t.partial({\n tcf: TCFReservedMetadata,\n }),\n});\n\nexport const CoreTrackingConsentDetails = t.intersection([\n t.type({\n /**\n * Was tracking consent confirmed by the user?\n * If this is false, the consent was resolved from defaults & is not yet confirmed\n */\n confirmed: t.boolean,\n /** Consent resolution/last-modified timestamp (ISO 8601) */\n timestamp: t.string,\n }),\n t.partial({\n /** Has the consent been updated (including no-change confirmation) since default resolution */\n updated: t.boolean,\n /**\n * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)\n * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.\n */\n prompted: t.boolean,\n /** Arbitrary metadata that customers want to be associated with consent state */\n metadata: t.intersection([ReservedMetadataCodec, t.UnknownRecord]),\n /** When the metadata was last updated */\n metadataTimestamp: t.string,\n }),\n]);\n\n/** Type override */\nexport type CoreTrackingConsentDetails = t.TypeOf<typeof CoreTrackingConsentDetails>;\n\nexport const TrackingConsentDetails = t.intersection([\n CoreTrackingConsentDetails,\n t.type({\n /** Tracking consent config */\n purposes: TrackingConsent,\n }),\n]);\n\n/** Override types. */\nexport type TrackingConsentDetails = t.TypeOf<typeof TrackingConsentDetails>;\n\nexport const TrackingConsentOptionalData = t.partial({\n /** Transparency Consent (TCF) String */\n tcf: t.string,\n /** US Privacy (USP) String */\n usp: t.string,\n /** Global Privacy Platform (GPP) String */\n gpp: t.string,\n /** Consent Manager View State */\n viewState: valuesOf(ViewState),\n /** Airgap Version */\n airgapVersion: t.string,\n});\n\nexport const FullTrackingConsentDetails = t.intersection([\n TrackingConsentDetails,\n TrackingConsentOptionalData,\n]);\n\n/** Override types. */\nexport type FullTrackingConsentDetails = t.TypeOf<typeof FullTrackingConsentDetails>;\n\nexport const FullTrackingConsentDetailsWithNulls = t.intersection([\n CoreTrackingConsentDetails,\n TrackingConsentOptionalData,\n t.type({\n /** Tracking consent config */\n purposes: TrackingConsentWithNulls,\n }),\n]);\n\n/** Override types. */\nexport type FullTrackingConsentDetailsWithNulls = t.TypeOf<\n typeof FullTrackingConsentDetailsWithNulls\n>;\n\nexport const ConsentPreferencesBody = t.type({\n /** token containing encrypted identifier */\n token: t.string,\n /** consent partition (defaults to bundle id) */\n partition: t.string,\n /** user consent */\n consent: TrackingConsentDetails,\n});\n\n/** Override types. */\nexport type ConsentPreferencesBody = t.TypeOf<typeof ConsentPreferencesBody>;\n\nexport const ConsentTokenPayload = t.intersection([\n t.type({\n encryptedIdentifier: t.string,\n }),\n t.partial({\n deprecatedEncryptedIdentifiers: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type ConsentTokenPayload = t.TypeOf<typeof ConsentTokenPayload>;\n\n/** Tracking purpose */\nexport const TrackingPurpose = t.union([t.keyof(SpecialTrackingPurpose), t.string]);\n\n/** Type override */\nexport type TrackingPurpose = t.TypeOf<typeof TrackingPurpose>;\n\n/** Tracking purposes */\nexport type TrackingPurposes = Set<TrackingPurpose>;\n\n/** Tracking consent change diffs */\nexport const ConsentChange = t.record(TrackingPurpose, t.boolean);\n\n/** type overload */\nexport type ConsentChange = t.TypeOf<typeof ConsentChange>;\n\n/** Regime purpose scopes configuration */\nexport const RegimePurposeScopesConfig = t.array(FixedLengthArray(2, 2, t.array(t.string)));\n\n/** Type override */\nexport type RegimePurposeScopesConfig = [\n /** Regimes */\n regimes: string[],\n /** In-scope purposes */\n purposes: TrackingPurpose[],\n][];\n\n/** Request source types */\nexport type AirgapRequestSource =\n | 'unknown'\n | 'airgap.js' // emitted by airgap.isAllowed(), etc.\n | 'fetch'\n | 'xhr'\n | 'websocket'\n | 'webtransport'\n | 'service-worker'\n | 'shared-worker'\n | 'worker'\n | 'module-worker'\n | 'shared-module-worker'\n | 'eventsource'\n | 'beacon'\n | 'CSPV'\n | 'navigation'\n | 'open'\n | 'script'\n | AirgapDOMRequestSource;\n\n/** DOM-initiated request source types */\nexport type AirgapDOMRequestSource =\n | 'DOM:style'\n | 'DOM:image'\n | 'DOM:media'\n | 'DOM:video'\n | 'DOM:audio'\n | 'DOM:track'\n | 'DOM:link'\n | 'DOM:form'\n | 'DOM:form-action'\n | 'DOM:view' // iframe {srcdoc, src}, object, embed\n | 'DOM:ping'\n | 'DOM:unknown';\n\n/**\n * Airgap pending request descriptor init dictionary\n */\nexport interface PendingRequestInit {\n /** Request initiator type */\n type: AirgapRequestSource;\n /** Request URL */\n url: Stringifiable;\n /** Persist request for cross-session replay (false by default) */\n persist?: boolean;\n /** Request initialization data */\n requestInit?: RequestInit;\n /** Request timestamp (ISO 8601) */\n timestamp?: Stringifiable;\n /** Request DOM target */\n target?: Node | IDynamicNodeReference | null;\n /** Mutator to apply changes associated with the request */\n mutator?(): void;\n /** Serialize request or mutation state back to DOM patcher parser input */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n serialize?(): any;\n /** Prevent credentials from being included in request */\n omitCredentials?(): boolean;\n}\n\n/** Properties that are added to instantiated PendingRequests */\nexport interface InstantiatedPendingRequestProps {\n /** Primary or first associated request URL input */\n url: Stringifiable;\n /** All associated request URL inputs */\n urls: Stringifiable[];\n /** Request timestamp (ISO 8601) */\n timestamp: Stringifiable;\n /** Serialize request or mutation state back to DOM patcher parser input */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n serialize(): any;\n\n /** The following IPendingEvent APIs are only available to overrides: */\n\n /**\n * All associated resolved request URLs. null = invalid URL or data: URL (parsing\n * skipped to optimize performance)\n */\n URLs: (URL | null)[];\n /** Prevent credentials from being included in request */\n omitCredentials(): boolean;\n /** Whether or not request is currently allowed */\n allowed: boolean;\n /** Bypass our consent logic and force-allow request */\n allow(): void;\n /** Bypass our consent logic and force-deny request */\n deny(): void;\n /** Bypass our consent logic to force-deny request and also block it from entering the replay quarantine */\n block(): void;\n /** Resolved tracking purposes associated with this pending mutation */\n purposes: Set<TrackingPurpose>;\n}\n\n/**\n * Airgap pending request descriptor with script annotation\n */\nexport type PendingRequestDescriptor = PendingRequestInit & InstantiatedPendingRequestProps;\n\n/** Airgap pending request descriptor init with multiple URLs */\nexport type PendingMutationInit = Omit<PendingRequestInit, 'url'> & {\n /** Request URLs */\n urls: Stringifiable[];\n};\n\n/** PendingEvent init input */\nexport type PendingEventInit = PendingRequestInit | PendingMutationInit;\n\n/** Pending mutation descriptor */\nexport type PendingMutationDescriptor = PendingMutationInit & InstantiatedPendingRequestProps;\n\n/** Pending event props that can't or won't be serialized to JSON */\ntype PendingEventUnserializableProps =\n | 'persist'\n | 'target'\n | 'mutator'\n | 'serialize'\n | 'URLs'\n | 'omitCredentials'\n | 'allow'\n | 'deny'\n | 'purposes'\n | 'allowed'\n | 'blocked';\n\n/** JSON-safe representation of pending event tracking purposes */\ninterface PendingEventPurposesJSON {\n /** Tracking purposes list */\n purposes?: TrackingPurpose[];\n}\n\n/** Pending request subset to JSON-safe properties */\nexport type PendingRequestJSON = Omit<\n PendingRequestDescriptor,\n PendingEventUnserializableProps | 'urls'\n> &\n PendingEventPurposesJSON;\n\n/** Pending mutation subset to JSON-safe properties */\nexport type PendingMutationJSON = Omit<\n PendingMutationDescriptor,\n PendingEventUnserializableProps | 'url'\n> &\n PendingEventPurposesJSON;\n\n/** Airgap pending request interface */\nexport interface IPendingRequest extends PendingRequestDescriptor {\n /** Convert PendingRequest to JSON-safe representation */\n toJSON(): PendingRequestJSON;\n}\n\n/** Airgap pending mutation interface */\nexport interface IPendingMutation extends PendingMutationDescriptor {\n /** Convert PendingRequest to JSON-safe representation */\n toJSON(): PendingMutationJSON;\n}\n\n/** Pending event descriptor */\nexport type PendingEventDescriptor = PendingRequestDescriptor | PendingMutationDescriptor;\n\n/** Pending request or mutation */\nexport type IPendingEvent = IPendingMutation | IPendingRequest;\n\n/** Unapproved request queue */\nexport type PendingRequestQueue = IPendingRequest[];\n\n/** Unapproved mutation queue */\nexport type PendingMutationQueue = IPendingEvent[];\n\n/** Unapproved event queue */\nexport type PendingEventQueue = IPendingEvent[];\n\n/** Cookie descriptor */\nexport interface Cookie {\n /** Cookie name */\n name: Stringifiable;\n /** Cookie value */\n value?: Stringifiable;\n /** Cookie change event timestamp (ISO 8601) */\n timestamp?: string;\n /** Expiry date (UTC date string or DOMTimeStamp) */\n expires?: number | Stringifiable;\n /** Max cookie age (seconds) */\n maxAge?: number;\n /** Optional cookie host scope */\n domain?: Stringifiable;\n /** Optional cookie path scope */\n path?: Stringifiable;\n /** Should cookie only be sent in secure contexts? */\n secure?: boolean;\n /**\n * Should cookie be restricted to the same site?\n * Values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite\n */\n sameSite?: Stringifiable;\n /**\n * Is the cookie partitioned (e.g. by CHIPS)?\n * See https://developer.mozilla.org/en-US/docs/Web/Privacy/Partitioned_cookies\n * and https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/get#:~:text=of%20the%20cookie.-,partitioned,-A%20boolean%20indicating\n */\n partitioned?: boolean;\n /** Target document / node */\n target?: Node | null;\n}\n\n/**\n * PendingCookieMutation constructor input\n */\nexport interface PendingCookieMutationInit extends Cookie {\n /** Persist cookie for cross-session replay if quarantined (true by default) */\n persist?: boolean;\n /** Mutator to apply cookie mutation */\n mutator?(): void | Promise<void>;\n}\n\n/** Properties that are added to instantiated PendingCookieMutations */\nexport interface InstantiatedPendingCookieMutationProps {\n /** Expiry date (DOMTimeStamp) */\n expires?: number;\n /** Cookie change event timestamp (Date.now() format) */\n timestamp: string;\n /** Whether or not cookie is currently allowed. null = passthrough */\n allowed?: boolean | null;\n /** Whether or not cookie is currently disallowed & blocked from entering the quarantine */\n blocked?: boolean;\n /** Bypass our consent logic and force-allow cookie */\n allow(): void;\n /** Bypass our consent logic and force-deny cookie */\n deny(): void;\n /** Bypass our consent logic to force-deny cookie and also block it from entering the quarantine */\n block(): void;\n /** Resolved tracking purposes associated with this pending mutation */\n purposes: Set<TrackingPurpose>;\n /** Mutator to apply cookie mutation */\n mutator(): void | Promise<void>;\n}\n\n/** Pending cookie mutation descriptor */\nexport type PendingCookieMutationDescriptor = Omit<PendingCookieMutationInit, 'expires'> &\n InstantiatedPendingCookieMutationProps;\n\n/** Pending cookie mutation props that can't or won't be serialized to JSON */\ntype PendingCookieMutationUnserializableProps =\n | 'persist'\n | 'mutator'\n | 'allow'\n | 'deny'\n | 'purposes'\n | 'allowed'\n | 'blocked';\n\n/** JSON-safe representation of pending cookie mutation tracking purposes */\ninterface PendingCookieMutationPurposesJSON {\n /** Tracking purposes list */\n purposes?: TrackingPurpose[];\n}\n\n/** Pending request subset to JSON-safe properties */\nexport type PendingCookieMutationJSON = Omit<\n PendingCookieMutationDescriptor,\n PendingCookieMutationUnserializableProps\n> &\n PendingCookieMutationPurposesJSON;\n\n/** Airgap pending cookie mutation interface */\nexport interface IPendingCookieMutation extends PendingCookieMutationDescriptor {\n /** Convert PendingCookieMutation to JSON-safe representation */\n toJSON(): PendingCookieMutationJSON;\n}\n\n/** Pending cookie mutation queue */\nexport type PendingCookieQueue = IPendingCookieMutation[];\n\n/** Interface for dynamic node references */\nexport interface IDynamicNodeReference {\n /**\n * Current node getter. This should always be used in `handleLiveMutation()`.\n * @returns current node\n */\n getNode(): Element;\n /**\n * Live node getter. Use this to apply mutations in `quarantine()`\n * and `quarantineMutation()` handlers.\n *\n * `release()` must always be called after completing\n * mutations using `getLiveNode()`.\n * @returns live node\n */\n getLiveNode(): Element;\n /** Release & garbage-collect internal node reference */\n release(): void;\n}\n\n/* eslint-enable max-lines */\n"],"mappings":";;;;;;AA+BA,MAAa,sBAAsB,EAAE,MAAM;CACzC,MAAM;CACN,KAAK;CACL,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO;CAEP,OAAO;CACP,gBAAgB;CAChB,UAAU;CACX,CAAC;;AAMF,MAAa,WAAW,EAAE,MAAM,CAAC,qBAAqB,EAAE,QAAQ,QAAQ,CAAC,CAAC;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AE,EAAE,OAAO,CAAC;;AASnF,MAAa,gBAAgB,EAAE,OAAO,iBAAiB,EAAE,QAAQ;;AAMjE,MAAa,4BAA4B,EAAE,MAAM,iBAAiB,GAAG,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC"}
@@ -4,8 +4,11 @@ import { makeEnum } from "@transcend-io/type-utils";
4
4
  * Enum of options available for behavior to exhibit when the user's consent has expired
5
5
  */
6
6
  const OnConsentExpiry = makeEnum({
7
+ /** Reprompts the user to change or confirm their selection */
7
8
  Prompt: "Prompt",
9
+ /** Resets the user's consent and reprompts them */
8
10
  ResetAll: "ResetAll",
11
+ /** Resets the user's opted-in purposes and reprompts them */
9
12
  ResetOptIns: "ResetOptIns"
10
13
  });
11
14
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"consentExpiry.mjs","names":[],"sources":["../../src/enums/consentExpiry.ts"],"sourcesContent":["import { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Enum of options available for behavior to exhibit when the user's consent has expired\n */\nexport const OnConsentExpiry = makeEnum({\n /** Reprompts the user to change or confirm their selection */\n Prompt: 'Prompt',\n /** Resets the user's consent and reprompts them */\n ResetAll: 'ResetAll',\n /** Resets the user's opted-in purposes and reprompts them */\n ResetOptIns: 'ResetOptIns',\n});\n/** Override type */\nexport type OnConsentExpiry = (typeof OnConsentExpiry)[keyof typeof OnConsentExpiry];\n"],"mappings":";;;;;AAKA,MAAa,kBAAkB,SAAS;CAEtC,QAAQ;CAER,UAAU;CAEV,aAAa;CACd,CAAC"}
1
+ {"version":3,"file":"consentExpiry.mjs","names":[],"sources":["../../src/enums/consentExpiry.ts"],"sourcesContent":["import { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Enum of options available for behavior to exhibit when the user's consent has expired\n */\nexport const OnConsentExpiry = makeEnum({\n /** Reprompts the user to change or confirm their selection */\n Prompt: 'Prompt',\n /** Resets the user's consent and reprompts them */\n ResetAll: 'ResetAll',\n /** Resets the user's opted-in purposes and reprompts them */\n ResetOptIns: 'ResetOptIns',\n});\n/** Override type */\nexport type OnConsentExpiry = (typeof OnConsentExpiry)[keyof typeof OnConsentExpiry];\n"],"mappings":";;;;;AAKA,MAAa,kBAAkB,SAAS;;CAEtC,QAAQ;;CAER,UAAU;;CAEV,aAAa;CACd,CAAC"}
@@ -4,7 +4,9 @@ import { makeEnum } from "@transcend-io/type-utils";
4
4
  * Describes whether listed countries/country subdivisions are included in an experience
5
5
  */
6
6
  const RegionsOperator = makeEnum({
7
+ /** The listed countries/country subdivisions, time zones, and languages are included in this experience */
7
8
  In: "IN",
9
+ /** The listed countries/country subdivisions, time zones, and languages are NOT included in this experience */
8
10
  NotIn: "NOT_IN"
9
11
  });
10
12
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"experience.mjs","names":[],"sources":["../../src/enums/experience.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Describes whether listed countries/country subdivisions are included in an experience\n */\nexport const RegionsOperator = makeEnum({\n /** The listed countries/country subdivisions, time zones, and languages are included in this experience */\n In: 'IN',\n /** The listed countries/country subdivisions, time zones, and languages are NOT included in this experience */\n NotIn: 'NOT_IN',\n});\n/** Override type */\nexport type RegionsOperator = (typeof RegionsOperator)[keyof typeof RegionsOperator];\n"],"mappings":";;;;;AAMA,MAAa,kBAAkB,SAAS;CAEtC,IAAI;CAEJ,OAAO;CACR,CAAC"}
1
+ {"version":3,"file":"experience.mjs","names":[],"sources":["../../src/enums/experience.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Describes whether listed countries/country subdivisions are included in an experience\n */\nexport const RegionsOperator = makeEnum({\n /** The listed countries/country subdivisions, time zones, and languages are included in this experience */\n In: 'IN',\n /** The listed countries/country subdivisions, time zones, and languages are NOT included in this experience */\n NotIn: 'NOT_IN',\n});\n/** Override type */\nexport type RegionsOperator = (typeof RegionsOperator)[keyof typeof RegionsOperator];\n"],"mappings":";;;;;AAMA,MAAa,kBAAkB,SAAS;;CAEtC,IAAI;;CAEJ,OAAO;CACR,CAAC"}
@@ -4,29 +4,41 @@ import { makeEnum } from "@transcend-io/type-utils";
4
4
  * The options for the type of purpose that airgap classifies requests into
5
5
  */
6
6
  const SpecialTrackingPurpose = makeEnum({
7
+ /** The request has an unknown tracking purpose */
7
8
  Unknown: "Unknown",
9
+ /** The request is necessary for the essential features of the website */
8
10
  Essential: "Essential"
9
11
  });
10
12
  /**
11
13
  * Possible values for the default consent that can be given to a tracking purpose
12
14
  */
13
15
  const DefaultConsentValue = makeEnum({
16
+ /** Tracking purpose is NOT consented to by default */
14
17
  Off: "off",
18
+ /**
19
+ * Tracking purpose is consented to by default, unless user is protected by GDPR
20
+ * or has DNT or GPC enabled
21
+ */
15
22
  Auto: "Auto"
16
23
  });
17
24
  /**
18
25
  * Purposes that can be configured
19
26
  */
20
27
  const ConfigurablePurpose = makeEnum({
28
+ /** SaaS tools used for advertising purposes */
21
29
  Advertising: "Advertising",
30
+ /** SaaS tools used for analytics purposes */
22
31
  Analytics: "Analytics",
32
+ /** SaaS tools used for functional purposes */
23
33
  Functional: "Functional",
34
+ /** SaaS tools used for selling personal information */
24
35
  SaleOfInfo: "SaleOfInfo"
25
36
  });
26
37
  /**
27
38
  * Purposes that can be configured
28
39
  */
29
40
  const KnownDefaultPurpose = makeEnum({
41
+ /** The request is necessary for the essential features of the website */
30
42
  Essential: "Essential",
31
43
  ...ConfigurablePurpose
32
44
  });
@@ -39,7 +51,9 @@ const Purpose = makeEnum({
39
51
  });
40
52
  /** User-configurable user agent privacy signal */
41
53
  const UserPrivacySignalEnum = makeEnum({
54
+ /** Global Privacy Control */
42
55
  GPC: "GPC",
56
+ /** Do Not Track */
43
57
  DNT: "DNT"
44
58
  });
45
59
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"purpose.mjs","names":[],"sources":["../../src/enums/purpose.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * The options for the type of purpose that airgap classifies requests into\n */\nexport const SpecialTrackingPurpose = makeEnum({\n /** The request has an unknown tracking purpose */\n Unknown: 'Unknown',\n /** The request is necessary for the essential features of the website */\n Essential: 'Essential',\n});\n\n/** Type override */\nexport type SpecialTrackingPurpose =\n (typeof SpecialTrackingPurpose)[keyof typeof SpecialTrackingPurpose];\n\n/**\n * Possible values for the default consent that can be given to a tracking purpose\n */\nexport const DefaultConsentValue = makeEnum({\n /** Tracking purpose is NOT consented to by default */\n Off: 'off',\n /**\n * Tracking purpose is consented to by default, unless user is protected by GDPR\n * or has DNT or GPC enabled\n */\n Auto: 'Auto',\n});\n\n/** Type override */\nexport type DefaultConsentValue = (typeof DefaultConsentValue)[keyof typeof DefaultConsentValue];\n\n/**\n * Purposes that can be configured\n */\nexport const ConfigurablePurpose = makeEnum({\n /** SaaS tools used for advertising purposes */\n Advertising: 'Advertising',\n /** SaaS tools used for analytics purposes */\n Analytics: 'Analytics',\n /** SaaS tools used for functional purposes */\n Functional: 'Functional',\n /** SaaS tools used for selling personal information */\n SaleOfInfo: 'SaleOfInfo',\n});\n\n/** Type override */\nexport type ConfigurablePurpose = (typeof ConfigurablePurpose)[keyof typeof ConfigurablePurpose];\n\n/**\n * Purposes that can be configured\n */\nexport const KnownDefaultPurpose = makeEnum({\n /** The request is necessary for the essential features of the website */\n Essential: 'Essential',\n ...ConfigurablePurpose,\n});\n\n/** Type override */\nexport type KnownDefaultPurpose = (typeof KnownDefaultPurpose)[keyof typeof KnownDefaultPurpose];\n\n/**\n * Purposes used by the purpose map\n */\nexport const Purpose = makeEnum({\n ...SpecialTrackingPurpose,\n ...ConfigurablePurpose,\n});\n\n/** Type override */\nexport type Purpose = (typeof Purpose)[keyof typeof Purpose];\n\n/** User-configurable user agent privacy signal */\nexport const UserPrivacySignalEnum = makeEnum({\n /** Global Privacy Control */\n GPC: 'GPC',\n /** Do Not Track */\n DNT: 'DNT',\n});\n\n/**\n * Type override\n */\nexport type UserPrivacySignalEnum =\n (typeof UserPrivacySignalEnum)[keyof typeof UserPrivacySignalEnum];\n"],"mappings":";;;;;AAMA,MAAa,yBAAyB,SAAS;CAE7C,SAAS;CAET,WAAW;CACZ,CAAC;;;;AASF,MAAa,sBAAsB,SAAS;CAE1C,KAAK;CAKL,MAAM;CACP,CAAC;;;;AAQF,MAAa,sBAAsB,SAAS;CAE1C,aAAa;CAEb,WAAW;CAEX,YAAY;CAEZ,YAAY;CACb,CAAC;;;;AAQF,MAAa,sBAAsB,SAAS;CAE1C,WAAW;CACX,GAAG;CACJ,CAAC;;;;AAQF,MAAa,UAAU,SAAS;CAC9B,GAAG;CACH,GAAG;CACJ,CAAC;;AAMF,MAAa,wBAAwB,SAAS;CAE5C,KAAK;CAEL,KAAK;CACN,CAAC"}
1
+ {"version":3,"file":"purpose.mjs","names":[],"sources":["../../src/enums/purpose.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * The options for the type of purpose that airgap classifies requests into\n */\nexport const SpecialTrackingPurpose = makeEnum({\n /** The request has an unknown tracking purpose */\n Unknown: 'Unknown',\n /** The request is necessary for the essential features of the website */\n Essential: 'Essential',\n});\n\n/** Type override */\nexport type SpecialTrackingPurpose =\n (typeof SpecialTrackingPurpose)[keyof typeof SpecialTrackingPurpose];\n\n/**\n * Possible values for the default consent that can be given to a tracking purpose\n */\nexport const DefaultConsentValue = makeEnum({\n /** Tracking purpose is NOT consented to by default */\n Off: 'off',\n /**\n * Tracking purpose is consented to by default, unless user is protected by GDPR\n * or has DNT or GPC enabled\n */\n Auto: 'Auto',\n});\n\n/** Type override */\nexport type DefaultConsentValue = (typeof DefaultConsentValue)[keyof typeof DefaultConsentValue];\n\n/**\n * Purposes that can be configured\n */\nexport const ConfigurablePurpose = makeEnum({\n /** SaaS tools used for advertising purposes */\n Advertising: 'Advertising',\n /** SaaS tools used for analytics purposes */\n Analytics: 'Analytics',\n /** SaaS tools used for functional purposes */\n Functional: 'Functional',\n /** SaaS tools used for selling personal information */\n SaleOfInfo: 'SaleOfInfo',\n});\n\n/** Type override */\nexport type ConfigurablePurpose = (typeof ConfigurablePurpose)[keyof typeof ConfigurablePurpose];\n\n/**\n * Purposes that can be configured\n */\nexport const KnownDefaultPurpose = makeEnum({\n /** The request is necessary for the essential features of the website */\n Essential: 'Essential',\n ...ConfigurablePurpose,\n});\n\n/** Type override */\nexport type KnownDefaultPurpose = (typeof KnownDefaultPurpose)[keyof typeof KnownDefaultPurpose];\n\n/**\n * Purposes used by the purpose map\n */\nexport const Purpose = makeEnum({\n ...SpecialTrackingPurpose,\n ...ConfigurablePurpose,\n});\n\n/** Type override */\nexport type Purpose = (typeof Purpose)[keyof typeof Purpose];\n\n/** User-configurable user agent privacy signal */\nexport const UserPrivacySignalEnum = makeEnum({\n /** Global Privacy Control */\n GPC: 'GPC',\n /** Do Not Track */\n DNT: 'DNT',\n});\n\n/**\n * Type override\n */\nexport type UserPrivacySignalEnum =\n (typeof UserPrivacySignalEnum)[keyof typeof UserPrivacySignalEnum];\n"],"mappings":";;;;;AAMA,MAAa,yBAAyB,SAAS;;CAE7C,SAAS;;CAET,WAAW;CACZ,CAAC;;;;AASF,MAAa,sBAAsB,SAAS;;CAE1C,KAAK;;;;;CAKL,MAAM;CACP,CAAC;;;;AAQF,MAAa,sBAAsB,SAAS;;CAE1C,aAAa;;CAEb,WAAW;;CAEX,YAAY;;CAEZ,YAAY;CACb,CAAC;;;;AAQF,MAAa,sBAAsB,SAAS;;CAE1C,WAAW;CACX,GAAG;CACJ,CAAC;;;;AAQF,MAAa,UAAU,SAAS;CAC9B,GAAG;CACH,GAAG;CACJ,CAAC;;AAMF,MAAa,wBAAwB,SAAS;;CAE5C,KAAK;;CAEL,KAAK;CACN,CAAC"}
@@ -3,52 +3,82 @@ import { makeEnum } from "@transcend-io/type-utils";
3
3
  /**
4
4
  * Consent Manager view state for the Interactive Advertising Bureau
5
5
  */
6
- const IABViewState = makeEnum({ TCF_EU: "TCF_EU" });
6
+ const IABViewState = makeEnum({
7
+ /** Transparency and Consent Framework for Europe */
8
+ TCF_EU: "TCF_EU" });
7
9
  /**
8
10
  * View States for Transcend's Consent Manager UI
9
11
  */
10
12
  const InitialTranscendViewState = makeEnum({
13
+ /** expanded and showing quick select options */
11
14
  QuickOptions: "QuickOptions",
15
+ /** three option UI: essential, functional/analytics, advertising */
12
16
  QuickOptions3: "QuickOptions3",
17
+ /** accept all button call to action, with more options in the banner footer */
13
18
  AcceptAll: "AcceptAll",
19
+ /** toggle button that toggles on or off all active purposes in the current regime */
14
20
  AcceptAllRejectAllToggle: "AcceptAllRejectAllToggle",
21
+ /** accept all or more options, both as calls to action */
15
22
  AcceptAllOrMoreChoices: "AcceptAllOrMoreChoices",
23
+ /** accept all or reject all */
16
24
  AcceptOrRejectAll: "AcceptOrRejectAll",
25
+ /** accept all or reject all or more options */
17
26
  AcceptOrRejectAllOrMoreChoices: "AcceptOrRejectAllOrMoreChoices",
27
+ /** accept or reject the Analytics script tag */
18
28
  AcceptOrRejectAnalytics: "AcceptOrRejectAnalytics",
29
+ /** accept or reject the Advertising script tag */
19
30
  AcceptOrRejectAdvertising: "AcceptOrRejectAdvertising",
31
+ /** data collection notice with do not sell */
20
32
  NoticeAndDoNotSell: "NoticeAndDoNotSell",
33
+ /** open a modal that allows for an explanation of do not sell/share, before opting out */
21
34
  DoNotSellExplainer: "DoNotSellExplainer",
35
+ /** open a modal that allows for complete options toggling */
22
36
  CompleteOptionsToggles: "CompleteOptionsToggles",
37
+ /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */
23
38
  PrivacyPolicyNotice: "PrivacyPolicyNotice",
39
+ /**
40
+ * open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent
41
+ * and no button to close the modal. instead there is an X in the top right corner of the modal
42
+ */
24
43
  PrivacyPolicyNoticeWithCloseButton: "PrivacyPolicyNoticeWithCloseButton",
44
+ /** expanded and showing full checkbox options */
25
45
  CompleteOptions: "CompleteOptions",
46
+ /** complete options, but selecting a checkbox means the user is opted out */
26
47
  CompleteOptionsInverted: "CompleteOptionsInverted",
48
+ /** hidden */
27
49
  Hidden: "Hidden"
28
50
  });
29
51
  /**
30
52
  * Consent Manager view states that can be used at launch
31
53
  */
32
54
  const InitialViewState = makeEnum({
55
+ /** View States for Transcend's Consent Manager UI */
33
56
  ...InitialTranscendViewState,
57
+ /** View States for IAB Frameworks */
34
58
  ...IABViewState
35
59
  });
36
60
  /**
37
61
  * View states that are displayed in response to a user request (e.g. transcend.doNotSell() or )
38
62
  */
39
63
  const ResponseViewState = makeEnum({
64
+ /** notice that do not sell has been acknowledged properly */
40
65
  DoNotSellDisclosure: "DoNotSellDisclosure",
66
+ /** notice of a 1 click opt out for multiple consent purposes */
41
67
  OptOutDisclosure: "OptOutDisclosure"
42
68
  });
43
69
  /**
44
70
  * Consent Manager view states that can be navigated to after initial view state
45
71
  */
46
- const DeepViewState = makeEnum({ LanguageOptions: "LanguageOptions" });
72
+ const DeepViewState = makeEnum({
73
+ /** language options */
74
+ LanguageOptions: "LanguageOptions" });
47
75
  /**
48
76
  * Consent Manager view states after it's been dismissed
49
77
  */
50
78
  const DismissedViewState = makeEnum({
79
+ /** showing and collapsed */
51
80
  Collapsed: "Collapsed",
81
+ /** closed */
52
82
  Closed: "Closed"
53
83
  });
54
84
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"viewState.mjs","names":[],"sources":["../../src/enums/viewState.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Consent Manager view state for the Interactive Advertising Bureau\n */\nexport const IABViewState = makeEnum({\n /** Transparency and Consent Framework for Europe */\n TCF_EU: 'TCF_EU',\n});\n\n/**\n * View States for Transcend's Consent Manager UI\n */\nexport const InitialTranscendViewState = makeEnum({\n /** expanded and showing quick select options */\n QuickOptions: 'QuickOptions',\n /** three option UI: essential, functional/analytics, advertising */\n QuickOptions3: 'QuickOptions3',\n /** accept all button call to action, with more options in the banner footer */\n AcceptAll: 'AcceptAll',\n /** toggle button that toggles on or off all active purposes in the current regime */\n AcceptAllRejectAllToggle: 'AcceptAllRejectAllToggle',\n /** accept all or more options, both as calls to action */\n AcceptAllOrMoreChoices: 'AcceptAllOrMoreChoices',\n /** accept all or reject all */\n AcceptOrRejectAll: 'AcceptOrRejectAll',\n /** accept all or reject all or more options */\n AcceptOrRejectAllOrMoreChoices: 'AcceptOrRejectAllOrMoreChoices',\n /** accept or reject the Analytics script tag */\n AcceptOrRejectAnalytics: 'AcceptOrRejectAnalytics',\n /** accept or reject the Advertising script tag */\n AcceptOrRejectAdvertising: 'AcceptOrRejectAdvertising',\n /** data collection notice with do not sell */\n NoticeAndDoNotSell: 'NoticeAndDoNotSell',\n /** open a modal that allows for an explanation of do not sell/share, before opting out */\n DoNotSellExplainer: 'DoNotSellExplainer',\n /** open a modal that allows for complete options toggling */\n CompleteOptionsToggles: 'CompleteOptionsToggles',\n /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */\n PrivacyPolicyNotice: 'PrivacyPolicyNotice',\n /**\n * open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent\n * and no button to close the modal. instead there is an X in the top right corner of the modal\n */\n PrivacyPolicyNoticeWithCloseButton: 'PrivacyPolicyNoticeWithCloseButton',\n /** expanded and showing full checkbox options */\n CompleteOptions: 'CompleteOptions',\n /** complete options, but selecting a checkbox means the user is opted out */\n CompleteOptionsInverted: 'CompleteOptionsInverted',\n /** hidden */\n Hidden: 'Hidden',\n});\n\n/**\n * Type override\n */\nexport type InitialTranscendViewState =\n (typeof InitialTranscendViewState)[keyof typeof InitialTranscendViewState];\n\n/**\n * Consent Manager view states that can be used at launch\n */\nexport const InitialViewState = makeEnum({\n /** View States for Transcend's Consent Manager UI */\n ...InitialTranscendViewState,\n /** View States for IAB Frameworks */\n ...IABViewState,\n});\n\n/**\n * Type override\n */\nexport type InitialViewState = (typeof InitialViewState)[keyof typeof InitialViewState];\n\n/**\n * View states that are displayed in response to a user request (e.g. transcend.doNotSell() or )\n */\nexport const ResponseViewState = makeEnum({\n /** notice that do not sell has been acknowledged properly */\n DoNotSellDisclosure: 'DoNotSellDisclosure',\n /** notice of a 1 click opt out for multiple consent purposes */\n OptOutDisclosure: 'OptOutDisclosure',\n});\n\n/**\n * Type override\n */\nexport type ResponseViewState = (typeof ResponseViewState)[keyof typeof ResponseViewState];\n\n/**\n * Consent Manager view states that can be navigated to after initial view state\n */\nexport const DeepViewState = makeEnum({\n /** language options */\n LanguageOptions: 'LanguageOptions',\n});\n\n/**\n * Type override\n */\nexport type DeepViewState = (typeof DeepViewState)[keyof typeof DeepViewState];\n\n/**\n * Consent Manager view states after it's been dismissed\n */\nexport const DismissedViewState = makeEnum({\n /** showing and collapsed */\n Collapsed: 'Collapsed',\n /** closed */\n Closed: 'Closed',\n});\n\n/**\n * Type override\n */\nexport type DismissedViewState = (typeof DismissedViewState)[keyof typeof DismissedViewState];\n\n/**\n * All possible view states of the Consent Manager\n */\nexport const ViewState = makeEnum({\n ...InitialViewState,\n ...ResponseViewState,\n ...DeepViewState,\n ...DismissedViewState,\n});\n\n/**\n * Type override\n */\nexport type ViewState = (typeof ViewState)[keyof typeof ViewState];\n"],"mappings":";;;;;AAMA,MAAa,eAAe,SAAS,EAEnC,QAAQ,UACT,CAAC;;;;AAKF,MAAa,4BAA4B,SAAS;CAEhD,cAAc;CAEd,eAAe;CAEf,WAAW;CAEX,0BAA0B;CAE1B,wBAAwB;CAExB,mBAAmB;CAEnB,gCAAgC;CAEhC,yBAAyB;CAEzB,2BAA2B;CAE3B,oBAAoB;CAEpB,oBAAoB;CAEpB,wBAAwB;CAExB,qBAAqB;CAKrB,oCAAoC;CAEpC,iBAAiB;CAEjB,yBAAyB;CAEzB,QAAQ;CACT,CAAC;;;;AAWF,MAAa,mBAAmB,SAAS;CAEvC,GAAG;CAEH,GAAG;CACJ,CAAC;;;;AAUF,MAAa,oBAAoB,SAAS;CAExC,qBAAqB;CAErB,kBAAkB;CACnB,CAAC;;;;AAUF,MAAa,gBAAgB,SAAS,EAEpC,iBAAiB,mBAClB,CAAC;;;;AAUF,MAAa,qBAAqB,SAAS;CAEzC,WAAW;CAEX,QAAQ;CACT,CAAC;;;;AAUF,MAAa,YAAY,SAAS;CAChC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ,CAAC"}
1
+ {"version":3,"file":"viewState.mjs","names":[],"sources":["../../src/enums/viewState.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Consent Manager view state for the Interactive Advertising Bureau\n */\nexport const IABViewState = makeEnum({\n /** Transparency and Consent Framework for Europe */\n TCF_EU: 'TCF_EU',\n});\n\n/**\n * View States for Transcend's Consent Manager UI\n */\nexport const InitialTranscendViewState = makeEnum({\n /** expanded and showing quick select options */\n QuickOptions: 'QuickOptions',\n /** three option UI: essential, functional/analytics, advertising */\n QuickOptions3: 'QuickOptions3',\n /** accept all button call to action, with more options in the banner footer */\n AcceptAll: 'AcceptAll',\n /** toggle button that toggles on or off all active purposes in the current regime */\n AcceptAllRejectAllToggle: 'AcceptAllRejectAllToggle',\n /** accept all or more options, both as calls to action */\n AcceptAllOrMoreChoices: 'AcceptAllOrMoreChoices',\n /** accept all or reject all */\n AcceptOrRejectAll: 'AcceptOrRejectAll',\n /** accept all or reject all or more options */\n AcceptOrRejectAllOrMoreChoices: 'AcceptOrRejectAllOrMoreChoices',\n /** accept or reject the Analytics script tag */\n AcceptOrRejectAnalytics: 'AcceptOrRejectAnalytics',\n /** accept or reject the Advertising script tag */\n AcceptOrRejectAdvertising: 'AcceptOrRejectAdvertising',\n /** data collection notice with do not sell */\n NoticeAndDoNotSell: 'NoticeAndDoNotSell',\n /** open a modal that allows for an explanation of do not sell/share, before opting out */\n DoNotSellExplainer: 'DoNotSellExplainer',\n /** open a modal that allows for complete options toggling */\n CompleteOptionsToggles: 'CompleteOptionsToggles',\n /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */\n PrivacyPolicyNotice: 'PrivacyPolicyNotice',\n /**\n * open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent\n * and no button to close the modal. instead there is an X in the top right corner of the modal\n */\n PrivacyPolicyNoticeWithCloseButton: 'PrivacyPolicyNoticeWithCloseButton',\n /** expanded and showing full checkbox options */\n CompleteOptions: 'CompleteOptions',\n /** complete options, but selecting a checkbox means the user is opted out */\n CompleteOptionsInverted: 'CompleteOptionsInverted',\n /** hidden */\n Hidden: 'Hidden',\n});\n\n/**\n * Type override\n */\nexport type InitialTranscendViewState =\n (typeof InitialTranscendViewState)[keyof typeof InitialTranscendViewState];\n\n/**\n * Consent Manager view states that can be used at launch\n */\nexport const InitialViewState = makeEnum({\n /** View States for Transcend's Consent Manager UI */\n ...InitialTranscendViewState,\n /** View States for IAB Frameworks */\n ...IABViewState,\n});\n\n/**\n * Type override\n */\nexport type InitialViewState = (typeof InitialViewState)[keyof typeof InitialViewState];\n\n/**\n * View states that are displayed in response to a user request (e.g. transcend.doNotSell() or )\n */\nexport const ResponseViewState = makeEnum({\n /** notice that do not sell has been acknowledged properly */\n DoNotSellDisclosure: 'DoNotSellDisclosure',\n /** notice of a 1 click opt out for multiple consent purposes */\n OptOutDisclosure: 'OptOutDisclosure',\n});\n\n/**\n * Type override\n */\nexport type ResponseViewState = (typeof ResponseViewState)[keyof typeof ResponseViewState];\n\n/**\n * Consent Manager view states that can be navigated to after initial view state\n */\nexport const DeepViewState = makeEnum({\n /** language options */\n LanguageOptions: 'LanguageOptions',\n});\n\n/**\n * Type override\n */\nexport type DeepViewState = (typeof DeepViewState)[keyof typeof DeepViewState];\n\n/**\n * Consent Manager view states after it's been dismissed\n */\nexport const DismissedViewState = makeEnum({\n /** showing and collapsed */\n Collapsed: 'Collapsed',\n /** closed */\n Closed: 'Closed',\n});\n\n/**\n * Type override\n */\nexport type DismissedViewState = (typeof DismissedViewState)[keyof typeof DismissedViewState];\n\n/**\n * All possible view states of the Consent Manager\n */\nexport const ViewState = makeEnum({\n ...InitialViewState,\n ...ResponseViewState,\n ...DeepViewState,\n ...DismissedViewState,\n});\n\n/**\n * Type override\n */\nexport type ViewState = (typeof ViewState)[keyof typeof ViewState];\n"],"mappings":";;;;;AAMA,MAAa,eAAe,SAAS;;AAEnC,QAAQ,UACT,CAAC;;;;AAKF,MAAa,4BAA4B,SAAS;;CAEhD,cAAc;;CAEd,eAAe;;CAEf,WAAW;;CAEX,0BAA0B;;CAE1B,wBAAwB;;CAExB,mBAAmB;;CAEnB,gCAAgC;;CAEhC,yBAAyB;;CAEzB,2BAA2B;;CAE3B,oBAAoB;;CAEpB,oBAAoB;;CAEpB,wBAAwB;;CAExB,qBAAqB;;;;;CAKrB,oCAAoC;;CAEpC,iBAAiB;;CAEjB,yBAAyB;;CAEzB,QAAQ;CACT,CAAC;;;;AAWF,MAAa,mBAAmB,SAAS;;CAEvC,GAAG;;CAEH,GAAG;CACJ,CAAC;;;;AAUF,MAAa,oBAAoB,SAAS;;CAExC,qBAAqB;;CAErB,kBAAkB;CACnB,CAAC;;;;AAUF,MAAa,gBAAgB,SAAS;;AAEpC,iBAAiB,mBAClB,CAAC;;;;AAUF,MAAa,qBAAqB,SAAS;;CAEzC,WAAW;;CAEX,QAAQ;CACT,CAAC;;;;AAUF,MAAa,YAAY,SAAS;CAChC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ,CAAC"}
package/dist/iab.mjs CHANGED
@@ -126,11 +126,16 @@ const TcfV3VendorList = t.intersection([TcfVendorListVersion, t.type({
126
126
  vendors: t.record(t.string, TcfGvlV3Vendor)
127
127
  })]);
128
128
  const NonTcfVendor = t.intersection([t.type({
129
+ /** The vendor name */
129
130
  name: t.string,
131
+ /** The transcend purposes associated with each vendor */
130
132
  purposes: t.array(t.string)
131
133
  }), t.partial({
134
+ /** The vendor description */
132
135
  description: t.string,
136
+ /** The privacy policy URL */
133
137
  privacyPolicyUrl: t.string,
138
+ /** The additional consent provider ID - used for Google Additional Consent string */
134
139
  additionalConsentProviderId: t.number
135
140
  })]);
136
141
  //#endregion
package/dist/iab.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"iab.mjs","names":[],"sources":["../src/iab.ts"],"sourcesContent":["import * as t from 'io-ts';\n\n/**\n * TCF purpose configuration\n */\nexport const TcfPurpose = t.type({\n id: t.number,\n name: t.string,\n description: t.string,\n descriptionLegal: t.string,\n});\n\n/**\n * Type override\n */\nexport type TcfPurpose = t.TypeOf<typeof TcfPurpose>;\n\n/**\n * TCF stack configuration\n */\nexport const TcfStack = t.type({\n id: t.number,\n purposes: t.array(t.number),\n specialFeatures: t.array(t.number),\n name: t.string,\n description: t.string,\n});\n\n/**\n * Type override\n */\nexport type TcfStack = t.TypeOf<typeof TcfStack>;\n\n/**\n * TCF stack configuration\n */\nexport const TcfVendor = t.intersection([\n t.type({\n id: t.number,\n name: t.string,\n purposes: t.array(t.number),\n legIntPurposes: t.array(t.number),\n flexiblePurposes: t.array(t.number),\n specialPurposes: t.array(t.number),\n features: t.array(t.number),\n specialFeatures: t.array(t.number),\n policyUrl: t.string,\n cookieMaxAgeSeconds: t.union([t.number, t.null]),\n usesCookies: t.boolean,\n }),\n t.partial({\n deletedDate: t.string,\n overflow: t.type({\n httpGetLimit: t.number,\n }),\n cookieRefresh: t.boolean,\n usesNonCookieAccess: t.boolean,\n deviceStorageDisclosureUrl: t.string,\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfVendor = t.TypeOf<typeof TcfVendor>;\n\nexport const TcfVendorListVersion = t.type({\n gvlSpecificationVersion: t.number,\n vendorListVersion: t.number, // incremented with each published file change\n tcfPolicyVersion: t.number,\n lastUpdated: t.string,\n});\n/**\n * Type override\n */\nexport type TcfVendorListVersion = t.TypeOf<typeof TcfVendorListVersion>;\n\n/**\n * TCF global vendor list version 2\n */\nexport const TcfV2VendorList = t.intersection([\n TcfVendorListVersion,\n t.type({\n purposes: t.record(t.string, TcfPurpose),\n specialPurposes: t.record(t.string, TcfPurpose),\n features: t.record(t.string, TcfPurpose),\n specialFeatures: t.record(t.string, TcfPurpose),\n stacks: t.record(t.string, TcfStack),\n vendors: t.record(t.string, TcfVendor),\n }),\n]);\n\n/**\n * Overload TcfV2VendorList as a type\n */\nexport type TcfV2VendorList = t.TypeOf<typeof TcfV2VendorList>;\n\n/**\n * TCF GVL v3 purpose configuration (TCF features share the same type)\n */\nexport const TcfGvlV3Purpose = t.type({\n id: t.number,\n name: t.string,\n description: t.string,\n illustrations: t.array(t.string),\n});\n\n/**\n * Type override\n */\nexport type TcfGvlV3Purpose = t.TypeOf<typeof TcfGvlV3Purpose>;\n\n/**\n * TCF GVL v3 data categories configuration\n */\nexport const TcfGvlV3DataCategory = t.type({\n id: t.number,\n name: t.string,\n description: t.string,\n});\n\n/**\n * Type override\n */\nexport type TcfGvlV3DataCategory = t.TypeOf<typeof TcfGvlV3DataCategory>;\n\n/**\n * TCF GVL v3 URL configuration\n */\nexport const TcfGvlV3Url = t.intersection([\n t.type({ langId: t.string, privacy: t.string }),\n t.partial({\n legIntClaim: t.string,\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfGvlV3Url = t.TypeOf<typeof TcfGvlV3Url>;\n\n/**\n * TCF GVL v3 data retention configuration\n */\nexport const TcfGvlV3DataRetention = t.intersection([\n t.type({\n purposes: t.record(t.string, t.number),\n specialPurposes: t.record(t.string, t.number),\n }),\n t.partial({\n stdRetention: t.union([t.number, t.null]),\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfGvlV3DataRetention = t.TypeOf<typeof TcfGvlV3DataRetention>;\n\n/**\n * TCF GVL v3 vendor configuration\n */\nexport const TcfGvlV3Vendor = t.intersection([\n t.type({\n id: t.number,\n name: t.string,\n purposes: t.array(t.number),\n legIntPurposes: t.array(t.number),\n flexiblePurposes: t.array(t.number),\n specialPurposes: t.array(t.number),\n features: t.array(t.number),\n specialFeatures: t.array(t.number),\n cookieMaxAgeSeconds: t.union([t.number, t.null]),\n usesCookies: t.boolean,\n cookieRefresh: t.boolean,\n usesNonCookieAccess: t.boolean,\n dataRetention: TcfGvlV3DataRetention,\n urls: t.array(TcfGvlV3Url),\n deviceStorageDisclosureUrl: t.string,\n }),\n t.partial({\n deletedDate: t.string,\n overflow: t.type({\n httpGetLimit: t.number,\n }),\n dataDeclaration: t.array(t.number),\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfGvlV3Vendor = t.TypeOf<typeof TcfGvlV3Vendor>;\n\n/**\n * TCF global vendor list version 3\n */\nexport const TcfV3VendorList = t.intersection([\n TcfVendorListVersion,\n t.type({\n purposes: t.record(t.string, TcfGvlV3Purpose),\n specialPurposes: t.record(t.string, TcfGvlV3Purpose),\n features: t.record(t.string, TcfGvlV3Purpose),\n specialFeatures: t.record(t.string, TcfGvlV3Purpose),\n stacks: t.record(t.string, TcfStack),\n dataCategories: t.record(t.string, TcfGvlV3DataCategory),\n vendors: t.record(t.string, TcfGvlV3Vendor),\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfV3VendorList = t.TypeOf<typeof TcfV3VendorList>;\n\nexport const NonTcfVendor = t.intersection([\n t.type({\n /** The vendor name */\n name: t.string,\n /** The transcend purposes associated with each vendor */\n purposes: t.array(t.string),\n }),\n t.partial({\n /** The vendor description */\n description: t.string,\n /** The privacy policy URL */\n privacyPolicyUrl: t.string,\n /** The additional consent provider ID - used for Google Additional Consent string */\n additionalConsentProviderId: t.number,\n }),\n]);\n\n/**\n * Type override\n */\nexport type NonTcfVendor = t.TypeOf<typeof NonTcfVendor>;\n"],"mappings":";;;;;AAKA,MAAa,aAAa,EAAE,KAAK;CAC/B,IAAI,EAAE;CACN,MAAM,EAAE;CACR,aAAa,EAAE;CACf,kBAAkB,EAAE;CACrB,CAAC;;;;AAUF,MAAa,WAAW,EAAE,KAAK;CAC7B,IAAI,EAAE;CACN,UAAU,EAAE,MAAM,EAAE,OAAO;CAC3B,iBAAiB,EAAE,MAAM,EAAE,OAAO;CAClC,MAAM,EAAE;CACR,aAAa,EAAE;CAChB,CAAC;;;;AAUF,MAAa,YAAY,EAAE,a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AAgB;CAC7C,iBAAiB,EAAE,OAAO,EAAE,QAAQ,gBAAgB;CACpD,UAAU,EAAE,OAAO,EAAE,QAAQ,gBAAgB;CAC7C,iBAAiB,EAAE,OAAO,EAAE,QAAQ,gBAAgB;CACpD,QAAQ,EAAE,OAAO,EAAE,QAAQ,SAAS;CACpC,gBAAgB,EAAE,OAAO,EAAE,QAAQ,qBAAqB;CACxD,SAAS,EAAE,OAAO,EAAE,QAAQ,eAAe;CAC5C,CAAC,CACH,CAAC;AAOF,MAAa,eAAe,EAAE,aAAa,CACzC,EAAE,KAAK;CAEL,MAAM,EAAE;CAER,UAAU,EAAE,MAAM,EAAE,OAAO;CAC5B,CAAC,EACF,EAAE,QAAQ;CAER,aAAa,EAAE;CAEf,kBAAkB,EAAE;CAEpB,6BAA6B,EAAE;CAChC,CAAC,CACH,CAAC"}
1
+ {"version":3,"file":"iab.mjs","names":[],"sources":["../src/iab.ts"],"sourcesContent":["import * as t from 'io-ts';\n\n/**\n * TCF purpose configuration\n */\nexport const TcfPurpose = t.type({\n id: t.number,\n name: t.string,\n description: t.string,\n descriptionLegal: t.string,\n});\n\n/**\n * Type override\n */\nexport type TcfPurpose = t.TypeOf<typeof TcfPurpose>;\n\n/**\n * TCF stack configuration\n */\nexport const TcfStack = t.type({\n id: t.number,\n purposes: t.array(t.number),\n specialFeatures: t.array(t.number),\n name: t.string,\n description: t.string,\n});\n\n/**\n * Type override\n */\nexport type TcfStack = t.TypeOf<typeof TcfStack>;\n\n/**\n * TCF stack configuration\n */\nexport const TcfVendor = t.intersection([\n t.type({\n id: t.number,\n name: t.string,\n purposes: t.array(t.number),\n legIntPurposes: t.array(t.number),\n flexiblePurposes: t.array(t.number),\n specialPurposes: t.array(t.number),\n features: t.array(t.number),\n specialFeatures: t.array(t.number),\n policyUrl: t.string,\n cookieMaxAgeSeconds: t.union([t.number, t.null]),\n usesCookies: t.boolean,\n }),\n t.partial({\n deletedDate: t.string,\n overflow: t.type({\n httpGetLimit: t.number,\n }),\n cookieRefresh: t.boolean,\n usesNonCookieAccess: t.boolean,\n deviceStorageDisclosureUrl: t.string,\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfVendor = t.TypeOf<typeof TcfVendor>;\n\nexport const TcfVendorListVersion = t.type({\n gvlSpecificationVersion: t.number,\n vendorListVersion: t.number, // incremented with each published file change\n tcfPolicyVersion: t.number,\n lastUpdated: t.string,\n});\n/**\n * Type override\n */\nexport type TcfVendorListVersion = t.TypeOf<typeof TcfVendorListVersion>;\n\n/**\n * TCF global vendor list version 2\n */\nexport const TcfV2VendorList = t.intersection([\n TcfVendorListVersion,\n t.type({\n purposes: t.record(t.string, TcfPurpose),\n specialPurposes: t.record(t.string, TcfPurpose),\n features: t.record(t.string, TcfPurpose),\n specialFeatures: t.record(t.string, TcfPurpose),\n stacks: t.record(t.string, TcfStack),\n vendors: t.record(t.string, TcfVendor),\n }),\n]);\n\n/**\n * Overload TcfV2VendorList as a type\n */\nexport type TcfV2VendorList = t.TypeOf<typeof TcfV2VendorList>;\n\n/**\n * TCF GVL v3 purpose configuration (TCF features share the same type)\n */\nexport const TcfGvlV3Purpose = t.type({\n id: t.number,\n name: t.string,\n description: t.string,\n illustrations: t.array(t.string),\n});\n\n/**\n * Type override\n */\nexport type TcfGvlV3Purpose = t.TypeOf<typeof TcfGvlV3Purpose>;\n\n/**\n * TCF GVL v3 data categories configuration\n */\nexport const TcfGvlV3DataCategory = t.type({\n id: t.number,\n name: t.string,\n description: t.string,\n});\n\n/**\n * Type override\n */\nexport type TcfGvlV3DataCategory = t.TypeOf<typeof TcfGvlV3DataCategory>;\n\n/**\n * TCF GVL v3 URL configuration\n */\nexport const TcfGvlV3Url = t.intersection([\n t.type({ langId: t.string, privacy: t.string }),\n t.partial({\n legIntClaim: t.string,\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfGvlV3Url = t.TypeOf<typeof TcfGvlV3Url>;\n\n/**\n * TCF GVL v3 data retention configuration\n */\nexport const TcfGvlV3DataRetention = t.intersection([\n t.type({\n purposes: t.record(t.string, t.number),\n specialPurposes: t.record(t.string, t.number),\n }),\n t.partial({\n stdRetention: t.union([t.number, t.null]),\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfGvlV3DataRetention = t.TypeOf<typeof TcfGvlV3DataRetention>;\n\n/**\n * TCF GVL v3 vendor configuration\n */\nexport const TcfGvlV3Vendor = t.intersection([\n t.type({\n id: t.number,\n name: t.string,\n purposes: t.array(t.number),\n legIntPurposes: t.array(t.number),\n flexiblePurposes: t.array(t.number),\n specialPurposes: t.array(t.number),\n features: t.array(t.number),\n specialFeatures: t.array(t.number),\n cookieMaxAgeSeconds: t.union([t.number, t.null]),\n usesCookies: t.boolean,\n cookieRefresh: t.boolean,\n usesNonCookieAccess: t.boolean,\n dataRetention: TcfGvlV3DataRetention,\n urls: t.array(TcfGvlV3Url),\n deviceStorageDisclosureUrl: t.string,\n }),\n t.partial({\n deletedDate: t.string,\n overflow: t.type({\n httpGetLimit: t.number,\n }),\n dataDeclaration: t.array(t.number),\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfGvlV3Vendor = t.TypeOf<typeof TcfGvlV3Vendor>;\n\n/**\n * TCF global vendor list version 3\n */\nexport const TcfV3VendorList = t.intersection([\n TcfVendorListVersion,\n t.type({\n purposes: t.record(t.string, TcfGvlV3Purpose),\n specialPurposes: t.record(t.string, TcfGvlV3Purpose),\n features: t.record(t.string, TcfGvlV3Purpose),\n specialFeatures: t.record(t.string, TcfGvlV3Purpose),\n stacks: t.record(t.string, TcfStack),\n dataCategories: t.record(t.string, TcfGvlV3DataCategory),\n vendors: t.record(t.string, TcfGvlV3Vendor),\n }),\n]);\n\n/**\n * Type override\n */\nexport type TcfV3VendorList = t.TypeOf<typeof TcfV3VendorList>;\n\nexport const NonTcfVendor = t.intersection([\n t.type({\n /** The vendor name */\n name: t.string,\n /** The transcend purposes associated with each vendor */\n purposes: t.array(t.string),\n }),\n t.partial({\n /** The vendor description */\n description: t.string,\n /** The privacy policy URL */\n privacyPolicyUrl: t.string,\n /** The additional consent provider ID - used for Google Additional Consent string */\n additionalConsentProviderId: t.number,\n }),\n]);\n\n/**\n * Type override\n */\nexport type NonTcfVendor = t.TypeOf<typeof NonTcfVendor>;\n"],"mappings":";;;;;AAKA,MAAa,aAAa,EAAE,KAAK;CAC/B,IAAI,EAAE;CACN,MAAM,EAAE;CACR,aAAa,EAAE;CACf,kBAAkB,EAAE;CACrB,CAAC;;;;AAUF,MAAa,WAAW,EAAE,KAAK;CAC7B,IAAI,EAAE;CACN,UAAU,EAAE,MAAM,EAAE,OAAO;CAC3B,iBAAiB,EAAE,MAAM,EAAE,OAAO;CAClC,MAAM,EAAE;CACR,aAAa,EAAE;CAChB,CAAC;;;;AAUF,MAAa,YAAY,EAAE,aAAa,CACtC,EAAE,KAAK;CACL,IAAI,EAAE;CACN,MAAM,EAAE;CACR,UAAU,EAAE,MAAM,EAAE,OAAO;CAC3B,gBAAgB,EAAE,MAAM,EAAE,OAAO;CACjC,kBAAkB,EAAE,MAAM,EAAE,OAAO;CACnC,iBAAiB,EAAE,MAAM,EAAE,OAAO;CAClC,UAAU,EAAE,MAAM,EAAE,OAAO;CAC3B,iBAAiB,EAAE,MAAM,EAAE,OAAO;CAClC,WAAW,EAAE;CACb,qBAAqB,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC;CAChD,aAAa,EAAE;CAChB,CAAC,EACF,EAAE,QAAQ;CACR,aAAa,EAAE;CACf,UAAU,EAAE,KAAK,EACf,cAAc,EAAE,QACjB,CAAC;CACF,eAAe,EAAE;CACjB,qBAAqB,EAAE;CACvB,4BAA4B,EAAE;CAC/B,CAAC,CACH,CAAC;AAOF,MAAa,uBAAuB,EAAE,KAAK;CACzC,yBAAyB,EAAE;CAC3B,mBAAmB,EAAE;CACrB,kBAAkB,EAAE;CACpB,aAAa,EAAE;CAChB,CAAC;;;;AASF,MAAa,kBAAkB,EAAE,aAAa,CAC5C,sBACA,EAAE,KAAK;C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;CAC3B,iBAAiB,EAAE,MAAM,EAAE,OAAO;CAClC,qBAAqB,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC;CAChD,aAAa,EAAE;CACf,eAAe,EAAE;CACjB,qBAAqB,EAAE;CACvB,eAAe;CACf,MAAM,EAAE,MAAM,YAAY;CAC1B,4BAA4B,EAAE;CAC/B,CAAC,EACF,EAAE,QAAQ;CACR,aAAa,EAAE;CACf,UAAU,EAAE,KAAK,EACf,cAAc,EAAE,QACjB,CAAC;CACF,iBAAiB,EAAE,MAAM,EAAE,OAAO;CACnC,CAAC,CACH,CAAC;;;;AAUF,MAAa,kBAAkB,EAAE,aAAa,CAC5C,sBACA,EAAE,KAAK;CACL,UAAU,EAAE,OAAO,EAAE,QAAQ,gBAAgB;CAC7C,iBAAiB,EAAE,OAAO,EAAE,QAAQ,gBAAgB;CACpD,UAAU,EAAE,OAAO,EAAE,QAAQ,gBAAgB;CAC7C,iBAAiB,EAAE,OAAO,EAAE,QAAQ,gBAAgB;CACpD,QAAQ,EAAE,OAAO,EAAE,QAAQ,SAAS;CACpC,gBAAgB,EAAE,OAAO,EAAE,QAAQ,qBAAqB;CACxD,SAAS,EAAE,OAAO,EAAE,QAAQ,eAAe;CAC5C,CAAC,CACH,CAAC;AAOF,MAAa,eAAe,EAAE,aAAa,CACzC,EAAE,KAAK;;CAEL,MAAM,EAAE;;CAER,UAAU,EAAE,MAAM,EAAE,OAAO;CAC5B,CAAC,EACF,EAAE,QAAQ;;CAER,aAAa,EAAE;;CAEf,kBAAkB,EAAE;;CAEpB,6BAA6B,EAAE;CAChC,CAAC,CACH,CAAC"}
package/dist/mobile.mjs CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as t from "io-ts";
2
2
  //#region src/mobile.ts
3
3
  const ConsentSDK = t.type({
4
+ /** Unique identifier for the SDK */
4
5
  id: t.string,
6
+ /** airgap purposes applicable to this SDK */
5
7
  purposes: t.array(t.string)
6
8
  });
7
9
  const ConsentService = t.intersection([t.type({ name: t.string }), t.partial({
@@ -1 +1 @@
1
- {"version":3,"file":"mobile.mjs","names":[],"sources":["../src/mobile.ts"],"sourcesContent":["import * as t from 'io-ts';\n\nexport const ConsentSDK = t.type({\n /** Unique identifier for the SDK */\n id: t.string,\n /** airgap purposes applicable to this SDK */\n purposes: t.array(t.string),\n});\n\n/**\n * Type override\n */\nexport type ConsentSDK = t.TypeOf<typeof ConsentSDK>;\n\nexport const ConsentService = t.intersection([\n t.type({\n name: t.string,\n }),\n t.partial({\n sdks: t.array(ConsentSDK),\n tcfId: t.number,\n }),\n]);\n\n/**\n * Type override\n */\nexport type ConsentService = t.TypeOf<typeof ConsentService>;\n\nexport const MobileConfig = t.type({\n services: t.array(ConsentService),\n});\n\n/**\n * Type override\n */\nexport type MobileConfig = t.TypeOf<typeof MobileConfig>;\n"],"mappings":";;AAEA,MAAa,aAAa,EAAE,KAAK;CAE/B,IAAI,EAAE;CAEN,UAAU,EAAE,MAAM,EAAE,OAAO;CAC5B,CAAC;AAOF,MAAa,iBAAiB,EAAE,aAAa,CAC3C,EAAE,KAAK,EACL,MAAM,EAAE,QACT,CAAC,EACF,EAAE,QAAQ;CACR,MAAM,EAAE,MAAM,WAAW;CACzB,OAAO,EAAE;CACV,CAAC,CACH,CAAC;AAOF,MAAa,eAAe,EAAE,KAAK,EACjC,UAAU,EAAE,MAAM,eAAe,EAClC,CAAC"}
1
+ {"version":3,"file":"mobile.mjs","names":[],"sources":["../src/mobile.ts"],"sourcesContent":["import * as t from 'io-ts';\n\nexport const ConsentSDK = t.type({\n /** Unique identifier for the SDK */\n id: t.string,\n /** airgap purposes applicable to this SDK */\n purposes: t.array(t.string),\n});\n\n/**\n * Type override\n */\nexport type ConsentSDK = t.TypeOf<typeof ConsentSDK>;\n\nexport const ConsentService = t.intersection([\n t.type({\n name: t.string,\n }),\n t.partial({\n sdks: t.array(ConsentSDK),\n tcfId: t.number,\n }),\n]);\n\n/**\n * Type override\n */\nexport type ConsentService = t.TypeOf<typeof ConsentService>;\n\nexport const MobileConfig = t.type({\n services: t.array(ConsentService),\n});\n\n/**\n * Type override\n */\nexport type MobileConfig = t.TypeOf<typeof MobileConfig>;\n"],"mappings":";;AAEA,MAAa,aAAa,EAAE,KAAK;;CAE/B,IAAI,EAAE;;CAEN,UAAU,EAAE,MAAM,EAAE,OAAO;CAC5B,CAAC;AAOF,MAAa,iBAAiB,EAAE,aAAa,CAC3C,EAAE,KAAK,EACL,MAAM,EAAE,QACT,CAAC,EACF,EAAE,QAAQ;CACR,MAAM,EAAE,MAAM,WAAW;CACzB,OAAO,EAAE;CACV,CAAC,CACH,CAAC;AAOF,MAAa,eAAe,EAAE,KAAK,EACjC,UAAU,EAAE,MAAM,eAAe,EAClC,CAAC"}
package/dist/ui.mjs CHANGED
@@ -9,7 +9,9 @@ import * as t from "io-ts";
9
9
  * Customer theming
10
10
  */
11
11
  const ConsentManagerTheme = t.type({
12
+ /** Primary color */
12
13
  primaryColor: t.string,
14
+ /** Font color */
13
15
  fontColor: t.string
14
16
  });
15
17
  /**
@@ -17,7 +19,9 @@ const ConsentManagerTheme = t.type({
17
19
  * No media query for mobile, which is the default
18
20
  */
19
21
  const ConsentManagerBreakpoints = t.type({
22
+ /** In px, at or above this width is tablet */
20
23
  tablet: t.string,
24
+ /** In px, at or above this width is desktop */
21
25
  desktop: t.string
22
26
  });
23
27
  /**
@@ -32,19 +36,39 @@ const PrivacyRegimeToInitialViewStateInput = t.partial(applyEnum(PrivacyRegimeEn
32
36
  const PrivacyRegimeToInitialViewState = t.record(valuesOf(PrivacyRegimeEnum), valuesOf(InitialTranscendViewState));
33
37
  const ExperienceToInitialViewState = t.record(t.string, valuesOf(InitialViewState));
34
38
  const RequiredConsentManagerConfig = t.type({
39
+ /** Customer theming */
35
40
  theme: ConsentManagerTheme,
41
+ /** A set of responsive breakpoints */
36
42
  breakpoints: ConsentManagerBreakpoints,
43
+ /** The privacy policy URL to redirect to */
37
44
  privacyPolicy: t.string,
45
+ /** The secondary policy URL to redirect to */
38
46
  secondaryPolicy: t.string,
47
+ /** Custom CSS stylesheet */
39
48
  css: t.string,
49
+ /** Path to localizations directory */
40
50
  messages: t.string,
51
+ /** What state the consent manager should launch in */
41
52
  initialViewStateByPrivacyRegime: ExperienceToInitialViewState,
53
+ /** What state the consent manager should go to when dismissed */
42
54
  dismissedViewState: valuesOf(DismissedViewState)
43
55
  });
44
56
  const OptionalConsentManagerConfig = t.partial({
57
+ /** The set of enabled languages - CSV of ConsentManagerSupportedTranslationValue */
45
58
  languages: t.string,
59
+ /** The override value for the consent banner z-index */
46
60
  uiZIndex: t.string,
61
+ /**
62
+ * The override value for the consent banner shadow root state
63
+ *
64
+ * Potential values: 'closed' (default) and 'open'
65
+ */
47
66
  uiShadowRoot: t.string,
67
+ /**
68
+ * The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute
69
+ * Potential values: `'on'` (default) or `'off'`
70
+ *
71
+ */
48
72
  autofocus: BooleanString
49
73
  });
50
74
  /** Consent manager UI configuration */
@@ -55,17 +79,29 @@ const ConsentManagerConfigInput = t.partial({
55
79
  ...RequiredConsentManagerConfig.props
56
80
  });
57
81
  const TCFConfig = t.type({
82
+ /** Path to vendor-list.json */
58
83
  vendorList: t.string,
84
+ /** Custom CSS stylesheet */
59
85
  css: t.string,
86
+ /** Path to localizations directory */
60
87
  messages: t.string
61
88
  });
62
89
  /** Configuration that are passed directly to the TCF module, not via airgap.j */
63
90
  const TCFBundledDataConfig = t.partial({
91
+ /** Mapping of TCF Purpose ID to airgap tracking types */
64
92
  purposeMap: t.array(t.tuple([t.number, t.array(t.string)])),
93
+ /** These TCF purposes cannot be processed on the basis of legitimate interests */
65
94
  restrictLegitimateInterestPurposes: t.array(t.number),
95
+ /** Vendors that Transcend Consent regulates because they haven't registered with IAB TCF */
66
96
  nonTcfVendors: t.array(NonTcfVendor),
97
+ /** Comma separated list of languages to support in the UI */
67
98
  languages: t.string,
99
+ /** Default locale to use for the UI internationalization */
68
100
  locale: t.string,
101
+ /**
102
+ * Whether or not to enable integration between Google Consent Mode and TCF.
103
+ * More docs here https://developers.google.com/tag-platform/security/guides/implement-TCF-strings#cmp-api
104
+ */
69
105
  enableAdvertiserConsentMode: t.boolean
70
106
  });
71
107
  /** Input for Consent manager UI configuration */
package/dist/ui.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ui.mjs","names":[],"sources":["../src/ui.ts"],"sourcesContent":["import type {\n ConsentManagerSupportedTranslationValue,\n LocaleValue,\n} from '@transcend-io/internationalization';\n// main\nimport { applyEnum, type ObjByString, valuesOf } from '@transcend-io/type-utils';\n// external\nimport * as t from 'io-ts';\n\nimport { BooleanString, type AirgapAuth, type AirgapAuthMap } from './core.js';\n// local\nimport {\n ViewState,\n InitialTranscendViewState,\n InitialViewState,\n PrivacyRegimeEnum,\n DismissedViewState,\n} from './enums/index.js';\nimport { NonTcfVendor } from './iab.js';\n\n/** Transcend Smart Quarantine API (window.transcend) */\nexport type PreInitTranscendAPI = {\n /** Ready event subscriber */\n ready(callback: (transcend: TranscendAPI) => void): void;\n /** Ready event dispatch queue */\n readyQueue: ((transcend: TranscendAPI) => void)[];\n};\n\n/** showConsentManager() */\nexport interface ShowConsentManagerOptions {\n /** View state */\n viewState?: ViewState;\n}\n\n/**\n * Input for fetching a policy from Transcend and inserting template variables\n */\nexport type GetTranscendPolicies = {\n /** The language to fetch policy for - defaults to currently selected language key */\n locale?: LocaleValue;\n /** Template variables to dynamically inject into the policy */\n variables?: ObjByString;\n /**\n * The UUID of the policies defined in Transcend to fetch\n *\n * This can be pulled from the URL\n * @see https://app.transcend.io/privacy-center/policies\n */\n policyIds?: string[];\n /**\n * The titles of the policies defined in Transcend to fetch\n *\n * This can be pulled from the URL\n * @see https://app.transcend.io/privacy-center/policies\n */\n policyTitles?: string[];\n};\n\n/**\n * The returning Transcend policy\n */\nexport type TranscendPolicy = {\n /** The policy UUID */\n id: string;\n /** The policy title */\n title: string;\n /** The policy content */\n content: string;\n};\n\n/**\n * Transcend Consent Manager external methods\n */\nexport type ConsentManagerAPI = Readonly<{\n /** Possible ViewState values */\n viewStates: Set<ViewState>;\n /** Expose an option to grab the current view state */\n getViewState: () => ViewState;\n /** Get the current active language */\n getPolicies: (input?: GetTranscendPolicies) => Promise<TranscendPolicy[]>;\n /** Callback that sets any dynamic variables that should be exposed to the consent UI messages */\n setUiVariables: (variables: ObjByString) => Promise<void>;\n /** Get the current value of Transcend UI variables */\n getUiVariables: () => ObjByString;\n /** Set consent change authorization key */\n setAuth?: (key: AirgapAuthMap['key']) => void;\n /** Change the current privacy policy URL */\n setPrivacyPolicy: (privacyPolicyLink: string) => void;\n /** Change the current secondary policy URL */\n setSecondaryPolicy: (privacyPolicyLink: string) => void;\n /** Show consent manager unless recently dismissed */\n autoShowConsentManager(options?: ShowConsentManagerOptions): Promise<void>;\n /** Show consent manager */\n showConsentManager(options?: ShowConsentManagerOptions): Promise<void>;\n /** Set the current active language */\n setActiveLocale(locale: ConsentManagerSupportedTranslationValue): Promise<void>;\n /** Get the currently active locale */\n getActiveLocale: () => ConsentManagerSupportedTranslationValue;\n /** Toggle consent manager */\n toggleConsentManager(options?: ShowConsentManagerOptions): Promise<void>;\n /** Hide consent manager */\n hideConsentManager(): Promise<void>;\n /** Opt out of the sale of personal info & show a disclosure */\n doNotSell(auth: AirgapAuth, options?: ShowConsentManagerOptions): Promise<void>;\n /** Opt out of all purposes */\n optOutNotice(auth: AirgapAuth, options?: ShowConsentManagerOptions): Promise<void>;\n /** Sets local tcf string (does not sync to xdi or preference store) */\n setTCFConsent?: (auth: AirgapAuth, tcString: string) => Promise<void>;\n /** UI version */\n version?: string;\n}> &\n EventTarget;\n\n/**\n * `transcend` event types\n */\nexport type TranscendEventType = 'view-state-change';\n\n/** 'view-state-change' custom event details */\nexport type ViewStateEventDetails = {\n /** The new, now-current view state */\n viewState: ViewState;\n /** The previous view state */\n previousViewState: ViewState | null;\n};\n\n/** Transcend Smart Quarantine API (window.transcend) */\nexport type TranscendAPI = PreInitTranscendAPI & ConsentManagerAPI;\n\n/**\n * Customer theming\n */\nexport const ConsentManagerTheme = t.type({\n /** Primary color */\n primaryColor: t.string,\n /** Font color */\n fontColor: t.string,\n});\n\n/** Type override */\nexport type ConsentManagerTheme = t.TypeOf<typeof ConsentManagerTheme>;\n\n/**\n * Mobile-first responsive breakpoints\n * No media query for mobile, which is the default\n */\nexport const ConsentManagerBreakpoints = t.type({\n /** In px, at or above this width is tablet */\n tablet: t.string,\n /** In px, at or above this width is desktop */\n desktop: t.string,\n});\n\n/** Type override */\nexport type ConsentManagerBreakpoints = t.TypeOf<typeof ConsentManagerBreakpoints>;\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport const PrivacyRegimeToInitialViewStateInput = t.partial(\n applyEnum(PrivacyRegimeEnum, () => valuesOf(InitialTranscendViewState)),\n);\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport type PrivacyRegimeToInitialViewStateInput = t.TypeOf<\n typeof PrivacyRegimeToInitialViewStateInput\n>;\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport const PrivacyRegimeToInitialViewState = t.record(\n valuesOf(PrivacyRegimeEnum),\n valuesOf(InitialTranscendViewState),\n);\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport type PrivacyRegimeToInitialViewState = t.TypeOf<typeof PrivacyRegimeToInitialViewState>;\n\nexport const ExperienceToInitialViewState = t.record(t.string, valuesOf(InitialViewState));\n\n/** type overload */\nexport type ExperienceToInitialViewState = t.TypeOf<typeof ExperienceToInitialViewState>;\n\nexport const RequiredConsentManagerConfig = t.type({\n /** Customer theming */\n theme: ConsentManagerTheme,\n /** A set of responsive breakpoints */\n breakpoints: ConsentManagerBreakpoints,\n /** The privacy policy URL to redirect to */\n privacyPolicy: t.string,\n /** The secondary policy URL to redirect to */\n secondaryPolicy: t.string,\n /** Custom CSS stylesheet */\n css: t.string,\n /** Path to localizations directory */\n messages: t.string,\n /** What state the consent manager should launch in */\n initialViewStateByPrivacyRegime: ExperienceToInitialViewState,\n /** What state the consent manager should go to when dismissed */\n dismissedViewState: valuesOf(DismissedViewState),\n});\n\n/** type overload */\nexport type RequiredConsentManagerConfig = t.TypeOf<typeof RequiredConsentManagerConfig>;\n\nexport const OptionalConsentManagerConfig = t.partial({\n /** The set of enabled languages - CSV of ConsentManagerSupportedTranslationValue */\n languages: t.string,\n /** The override value for the consent banner z-index */\n uiZIndex: t.string,\n /**\n * The override value for the consent banner shadow root state\n *\n * Potential values: 'closed' (default) and 'open'\n */\n uiShadowRoot: t.string,\n /**\n * The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute\n * Potential values: `'on'` (default) or `'off'`\n *\n */\n autofocus: BooleanString,\n});\n\n/** type overload */\nexport type OptionalConsentManagerConfig = t.TypeOf<typeof OptionalConsentManagerConfig>;\n\n/** Consent manager UI configuration */\nexport const ConsentManagerConfig = t.intersection([\n RequiredConsentManagerConfig,\n OptionalConsentManagerConfig,\n]);\n\n/** Type override */\nexport type ConsentManagerConfig = t.TypeOf<typeof ConsentManagerConfig>;\n\n/** Input for Consent manager UI configuration */\nexport const ConsentManagerConfigInput = t.partial({\n ...OptionalConsentManagerConfig.props,\n ...RequiredConsentManagerConfig.props,\n});\n\n/** Type override */\nexport type ConsentManagerConfigInput = t.TypeOf<typeof ConsentManagerConfigInput>;\n\nexport const TCFConfig = t.type({\n /** Path to vendor-list.json */\n vendorList: t.string,\n /** Custom CSS stylesheet */\n css: t.string,\n /** Path to localizations directory */\n messages: t.string,\n});\n\n/** Type override */\nexport type TCFConfig = t.TypeOf<typeof TCFConfig>;\n\n/** Configuration that are passed directly to the TCF module, not via airgap.j */\nexport const TCFBundledDataConfig = t.partial({\n /** Mapping of TCF Purpose ID to airgap tracking types */\n purposeMap: t.array(t.tuple([t.number, t.array(t.string)])),\n /** These TCF purposes cannot be processed on the basis of legitimate interests */\n restrictLegitimateInterestPurposes: t.array(t.number),\n /** Vendors that Transcend Consent regulates because they haven't registered with IAB TCF */\n nonTcfVendors: t.array(NonTcfVendor),\n /** Comma separated list of languages to support in the UI */\n languages: t.string,\n /** Default locale to use for the UI internationalization */\n locale: t.string,\n /**\n * Whether or not to enable integration between Google Consent Mode and TCF.\n * More docs here https://developers.google.com/tag-platform/security/guides/implement-TCF-strings#cmp-api\n */\n enableAdvertiserConsentMode: t.boolean,\n});\n\n/** Type override */\nexport type TCFBundledDataConfig = t.TypeOf<typeof TCFBundledDataConfig>;\n\n/** Input for Consent manager UI configuration */\nexport const TCFConfigInput = t.partial(TCFConfig.props);\n\n/** Type override */\nexport type TCFConfigInput = t.TypeOf<typeof TCFConfigInput>;\n\n/**\n * Properties exposed on `self` by the Transcend Smart Quarantine\n */\nexport type TranscendView = Window & {\n /** Transcend Smart Quarantine API */\n transcend: TranscendAPI;\n};\n\nexport const DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME: ExperienceToInitialViewState = {\n // EU\n GDPR: InitialViewState.QuickOptions,\n // Brazil\n LGPD: InitialViewState.QuickOptions,\n // Switzerland\n nFADP: InitialViewState.QuickOptions,\n // US: California\n CPRA: InitialViewState.Hidden,\n // US: Virginia\n CDPA: InitialViewState.Hidden,\n // US: Colorado\n CPA: InitialViewState.Hidden,\n // US: Nevada\n NEVADA_SB220: InitialViewState.Hidden,\n // Other\n Unknown: InitialViewState.Hidden,\n // US Do Not Sell/Share\n US_DNSS: InitialViewState.Hidden,\n};\n"],"mappings":";;;;;;;;;;AAoIA,MAAa,sBAAsB,EAAE,KAAK;CAExC,cAAc,EAAE;CAEhB,WAAW,EAAE;CACd,CAAC;;;;;AASF,MAAa,4BAA4B,EAAE,KAAK;CAE9C,QAAQ,EAAE;CAEV,SAAS,EAAE;CACZ,CAAC;;;;;AASF,MAAa,uCAAuC,EAAE,QACpD,UAAU,yBAAyB,SAAS,0BAA0B,CAAC,CACxE;;;;;AAcD,MAAa,kCAAkC,EAAE,OAC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s","names":[],"sources":["../src/ui.ts"],"sourcesContent":["import type {\n ConsentManagerSupportedTranslationValue,\n LocaleValue,\n} from '@transcend-io/internationalization';\n// main\nimport { applyEnum, type ObjByString, valuesOf } from '@transcend-io/type-utils';\n// external\nimport * as t from 'io-ts';\n\nimport { BooleanString, type AirgapAuth, type AirgapAuthMap } from './core.js';\n// local\nimport {\n ViewState,\n InitialTranscendViewState,\n InitialViewState,\n PrivacyRegimeEnum,\n DismissedViewState,\n} from './enums/index.js';\nimport { NonTcfVendor } from './iab.js';\n\n/** Transcend Smart Quarantine API (window.transcend) */\nexport type PreInitTranscendAPI = {\n /** Ready event subscriber */\n ready(callback: (transcend: TranscendAPI) => void): void;\n /** Ready event dispatch queue */\n readyQueue: ((transcend: TranscendAPI) => void)[];\n};\n\n/** showConsentManager() */\nexport interface ShowConsentManagerOptions {\n /** View state */\n viewState?: ViewState;\n}\n\n/**\n * Input for fetching a policy from Transcend and inserting template variables\n */\nexport type GetTranscendPolicies = {\n /** The language to fetch policy for - defaults to currently selected language key */\n locale?: LocaleValue;\n /** Template variables to dynamically inject into the policy */\n variables?: ObjByString;\n /**\n * The UUID of the policies defined in Transcend to fetch\n *\n * This can be pulled from the URL\n * @see https://app.transcend.io/privacy-center/policies\n */\n policyIds?: string[];\n /**\n * The titles of the policies defined in Transcend to fetch\n *\n * This can be pulled from the URL\n * @see https://app.transcend.io/privacy-center/policies\n */\n policyTitles?: string[];\n};\n\n/**\n * The returning Transcend policy\n */\nexport type TranscendPolicy = {\n /** The policy UUID */\n id: string;\n /** The policy title */\n title: string;\n /** The policy content */\n content: string;\n};\n\n/**\n * Transcend Consent Manager external methods\n */\nexport type ConsentManagerAPI = Readonly<{\n /** Possible ViewState values */\n viewStates: Set<ViewState>;\n /** Expose an option to grab the current view state */\n getViewState: () => ViewState;\n /** Get the current active language */\n getPolicies: (input?: GetTranscendPolicies) => Promise<TranscendPolicy[]>;\n /** Callback that sets any dynamic variables that should be exposed to the consent UI messages */\n setUiVariables: (variables: ObjByString) => Promise<void>;\n /** Get the current value of Transcend UI variables */\n getUiVariables: () => ObjByString;\n /** Set consent change authorization key */\n setAuth?: (key: AirgapAuthMap['key']) => void;\n /** Change the current privacy policy URL */\n setPrivacyPolicy: (privacyPolicyLink: string) => void;\n /** Change the current secondary policy URL */\n setSecondaryPolicy: (privacyPolicyLink: string) => void;\n /** Show consent manager unless recently dismissed */\n autoShowConsentManager(options?: ShowConsentManagerOptions): Promise<void>;\n /** Show consent manager */\n showConsentManager(options?: ShowConsentManagerOptions): Promise<void>;\n /** Set the current active language */\n setActiveLocale(locale: ConsentManagerSupportedTranslationValue): Promise<void>;\n /** Get the currently active locale */\n getActiveLocale: () => ConsentManagerSupportedTranslationValue;\n /** Toggle consent manager */\n toggleConsentManager(options?: ShowConsentManagerOptions): Promise<void>;\n /** Hide consent manager */\n hideConsentManager(): Promise<void>;\n /** Opt out of the sale of personal info & show a disclosure */\n doNotSell(auth: AirgapAuth, options?: ShowConsentManagerOptions): Promise<void>;\n /** Opt out of all purposes */\n optOutNotice(auth: AirgapAuth, options?: ShowConsentManagerOptions): Promise<void>;\n /** Sets local tcf string (does not sync to xdi or preference store) */\n setTCFConsent?: (auth: AirgapAuth, tcString: string) => Promise<void>;\n /** UI version */\n version?: string;\n}> &\n EventTarget;\n\n/**\n * `transcend` event types\n */\nexport type TranscendEventType = 'view-state-change';\n\n/** 'view-state-change' custom event details */\nexport type ViewStateEventDetails = {\n /** The new, now-current view state */\n viewState: ViewState;\n /** The previous view state */\n previousViewState: ViewState | null;\n};\n\n/** Transcend Smart Quarantine API (window.transcend) */\nexport type TranscendAPI = PreInitTranscendAPI & ConsentManagerAPI;\n\n/**\n * Customer theming\n */\nexport const ConsentManagerTheme = t.type({\n /** Primary color */\n primaryColor: t.string,\n /** Font color */\n fontColor: t.string,\n});\n\n/** Type override */\nexport type ConsentManagerTheme = t.TypeOf<typeof ConsentManagerTheme>;\n\n/**\n * Mobile-first responsive breakpoints\n * No media query for mobile, which is the default\n */\nexport const ConsentManagerBreakpoints = t.type({\n /** In px, at or above this width is tablet */\n tablet: t.string,\n /** In px, at or above this width is desktop */\n desktop: t.string,\n});\n\n/** Type override */\nexport type ConsentManagerBreakpoints = t.TypeOf<typeof ConsentManagerBreakpoints>;\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport const PrivacyRegimeToInitialViewStateInput = t.partial(\n applyEnum(PrivacyRegimeEnum, () => valuesOf(InitialTranscendViewState)),\n);\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport type PrivacyRegimeToInitialViewStateInput = t.TypeOf<\n typeof PrivacyRegimeToInitialViewStateInput\n>;\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport const PrivacyRegimeToInitialViewState = t.record(\n valuesOf(PrivacyRegimeEnum),\n valuesOf(InitialTranscendViewState),\n);\n\n/**\n * TODO: https://transcend.height.app/T-19149 - remove\n * @deprecated\n */\nexport type PrivacyRegimeToInitialViewState = t.TypeOf<typeof PrivacyRegimeToInitialViewState>;\n\nexport const ExperienceToInitialViewState = t.record(t.string, valuesOf(InitialViewState));\n\n/** type overload */\nexport type ExperienceToInitialViewState = t.TypeOf<typeof ExperienceToInitialViewState>;\n\nexport const RequiredConsentManagerConfig = t.type({\n /** Customer theming */\n theme: ConsentManagerTheme,\n /** A set of responsive breakpoints */\n breakpoints: ConsentManagerBreakpoints,\n /** The privacy policy URL to redirect to */\n privacyPolicy: t.string,\n /** The secondary policy URL to redirect to */\n secondaryPolicy: t.string,\n /** Custom CSS stylesheet */\n css: t.string,\n /** Path to localizations directory */\n messages: t.string,\n /** What state the consent manager should launch in */\n initialViewStateByPrivacyRegime: ExperienceToInitialViewState,\n /** What state the consent manager should go to when dismissed */\n dismissedViewState: valuesOf(DismissedViewState),\n});\n\n/** type overload */\nexport type RequiredConsentManagerConfig = t.TypeOf<typeof RequiredConsentManagerConfig>;\n\nexport const OptionalConsentManagerConfig = t.partial({\n /** The set of enabled languages - CSV of ConsentManagerSupportedTranslationValue */\n languages: t.string,\n /** The override value for the consent banner z-index */\n uiZIndex: t.string,\n /**\n * The override value for the consent banner shadow root state\n *\n * Potential values: 'closed' (default) and 'open'\n */\n uiShadowRoot: t.string,\n /**\n * The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute\n * Potential values: `'on'` (default) or `'off'`\n *\n */\n autofocus: BooleanString,\n});\n\n/** type overload */\nexport type OptionalConsentManagerConfig = t.TypeOf<typeof OptionalConsentManagerConfig>;\n\n/** Consent manager UI configuration */\nexport const ConsentManagerConfig = t.intersection([\n RequiredConsentManagerConfig,\n OptionalConsentManagerConfig,\n]);\n\n/** Type override */\nexport type ConsentManagerConfig = t.TypeOf<typeof ConsentManagerConfig>;\n\n/** Input for Consent manager UI configuration */\nexport const ConsentManagerConfigInput = t.partial({\n ...OptionalConsentManagerConfig.props,\n ...RequiredConsentManagerConfig.props,\n});\n\n/** Type override */\nexport type ConsentManagerConfigInput = t.TypeOf<typeof ConsentManagerConfigInput>;\n\nexport const TCFConfig = t.type({\n /** Path to vendor-list.json */\n vendorList: t.string,\n /** Custom CSS stylesheet */\n css: t.string,\n /** Path to localizations directory */\n messages: t.string,\n});\n\n/** Type override */\nexport type TCFConfig = t.TypeOf<typeof TCFConfig>;\n\n/** Configuration that are passed directly to the TCF module, not via airgap.j */\nexport const TCFBundledDataConfig = t.partial({\n /** Mapping of TCF Purpose ID to airgap tracking types */\n purposeMap: t.array(t.tuple([t.number, t.array(t.string)])),\n /** These TCF purposes cannot be processed on the basis of legitimate interests */\n restrictLegitimateInterestPurposes: t.array(t.number),\n /** Vendors that Transcend Consent regulates because they haven't registered with IAB TCF */\n nonTcfVendors: t.array(NonTcfVendor),\n /** Comma separated list of languages to support in the UI */\n languages: t.string,\n /** Default locale to use for the UI internationalization */\n locale: t.string,\n /**\n * Whether or not to enable integration between Google Consent Mode and TCF.\n * More docs here https://developers.google.com/tag-platform/security/guides/implement-TCF-strings#cmp-api\n */\n enableAdvertiserConsentMode: t.boolean,\n});\n\n/** Type override */\nexport type TCFBundledDataConfig = t.TypeOf<typeof TCFBundledDataConfig>;\n\n/** Input for Consent manager UI configuration */\nexport const TCFConfigInput = t.partial(TCFConfig.props);\n\n/** Type override */\nexport type TCFConfigInput = t.TypeOf<typeof TCFConfigInput>;\n\n/**\n * Properties exposed on `self` by the Transcend Smart Quarantine\n */\nexport type TranscendView = Window & {\n /** Transcend Smart Quarantine API */\n transcend: TranscendAPI;\n};\n\nexport const DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME: ExperienceToInitialViewState = {\n // EU\n GDPR: InitialViewState.QuickOptions,\n // Brazil\n LGPD: InitialViewState.QuickOptions,\n // Switzerland\n nFADP: InitialViewState.QuickOptions,\n // US: California\n CPRA: InitialViewState.Hidden,\n // US: Virginia\n CDPA: InitialViewState.Hidden,\n // US: Colorado\n CPA: InitialViewState.Hidden,\n // US: Nevada\n NEVADA_SB220: InitialViewState.Hidden,\n // Other\n Unknown: InitialViewState.Hidden,\n // US Do Not Sell/Share\n US_DNSS: InitialViewState.Hidden,\n};\n"],"mappings":";;;;;;;;;;AAoIA,MAAa,sBAAsB,EAAE,KAAK;;CAExC,cAAc,EAAE;;CAEhB,WAAW,EAAE;CACd,CAAC;;;;;AASF,MAAa,4BAA4B,EAAE,KAAK;;CAE9C,QAAQ,EAAE;;CAEV,SAAS,EAAE;CACZ,CAAC;;;;;AASF,MAAa,uCAAuC,EAAE,QACpD,UAAU,yBAAyB,SAAS,0BAA0B,CAAC,CACxE;;;;;AAcD,MAAa,kCAAkC,EAAE,OAC/C,SAAS,kBAAkB,EAC3B,SAAS,0BAA0B,CACpC;AAQD,MAAa,+BAA+B,EAAE,OAAO,EAAE,QAAQ,SAAS,iBAAiB,CAAC;AAK1F,MAAa,+BAA+B,EAAE,KAAK;;CAEjD,OAAO;;CAEP,aAAa;;CAEb,eAAe,EAAE;;CAEjB,iBAAiB,EAAE;;CAEnB,KAAK,EAAE;;CAEP,UAAU,EAAE;;CAEZ,iCAAiC;;CAEjC,oBAAoB,SAAS,mBAAmB;CACjD,CAAC;AAKF,MAAa,+BAA+B,EAAE,QAAQ;;CAEpD,WAAW,EAAE;;CAEb,UAAU,EAAE;;;;;;CAMZ,cAAc,EAAE;;;;;;CAMhB,WAAW;CACZ,CAAC;;AAMF,MAAa,uBAAuB,EAAE,aAAa,CACjD,8BACA,6BACD,CAAC;;AAMF,MAAa,4BAA4B,EAAE,QAAQ;CACjD,GAAG,6BAA6B;CAChC,GAAG,6BAA6B;CACjC,CAAC;AAKF,MAAa,YAAY,EAAE,KAAK;;CAE9B,YAAY,EAAE;;CAEd,KAAK,EAAE;;CAEP,UAAU,EAAE;CACb,CAAC;;AAMF,MAAa,uBAAuB,EAAE,QAAQ;;CAE5C,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;;CAE3D,oCAAoC,EAAE,MAAM,EAAE,OAAO;;CAErD,eAAe,EAAE,MAAM,aAAa;;CAEpC,WAAW,EAAE;;CAEb,QAAQ,EAAE;;;;;CAKV,6BAA6B,EAAE;CAChC,CAAC;;AAMF,MAAa,iBAAiB,EAAE,QAAQ,UAAU,MAAM;AAaxD,MAAa,uCAAqE;CAEhF,MAAM,iBAAiB;CAEvB,MAAM,iBAAiB;CAEvB,OAAO,iBAAiB;CAExB,MAAM,iBAAiB;CAEvB,MAAM,iBAAiB;CAEvB,KAAK,iBAAiB;CAEtB,cAAc,iBAAiB;CAE/B,SAAS,iBAAiB;CAE1B,SAAS,iBAAiB;CAC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transcend-io/airgap.js-types",
3
- "version": "14.2.8",
3
+ "version": "14.2.9",
4
4
  "description": "TypeScript types for airgap.js interoperability with custom consent UIs.",
5
5
  "homepage": "https://github.com/transcend-io/tools/tree/main/packages/airgap.js-types",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "fp-ts": "^2.16.1",
35
35
  "io-ts": "^2.2.21",
36
36
  "@transcend-io/internationalization": "4.1.1",
37
- "@transcend-io/privacy-types": "5.2.4",
37
+ "@transcend-io/privacy-types": "5.2.5",
38
38
  "@transcend-io/type-utils": "3.0.1"
39
39
  },
40
40
  "devDependencies": {