@transcend-io/airgap.js-types 14.1.1 → 14.2.0

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.
Files changed (53) hide show
  1. package/dist/constants.d.mts +20 -0
  2. package/dist/constants.d.mts.map +1 -0
  3. package/dist/constants.mjs +46 -0
  4. package/dist/constants.mjs.map +1 -0
  5. package/dist/core.d.mts +976 -0
  6. package/dist/core.d.mts.map +1 -0
  7. package/dist/core.mjs +115 -0
  8. package/dist/core.mjs.map +1 -0
  9. package/dist/enums/browserLanguage.d.mts +314 -0
  10. package/dist/enums/browserLanguage.d.mts.map +1 -0
  11. package/dist/enums/browserLanguage.mjs +314 -0
  12. package/dist/enums/browserLanguage.mjs.map +1 -0
  13. package/dist/enums/consentExpiry.d.mts +14 -0
  14. package/dist/enums/consentExpiry.d.mts.map +1 -0
  15. package/dist/enums/consentExpiry.mjs +14 -0
  16. package/dist/enums/consentExpiry.mjs.map +1 -0
  17. package/dist/enums/experience.d.mts +13 -0
  18. package/dist/enums/experience.d.mts.map +1 -0
  19. package/dist/enums/experience.mjs +13 -0
  20. package/dist/enums/experience.mjs.map +1 -0
  21. package/dist/enums/privacyRegime.d.mts +28 -0
  22. package/dist/enums/privacyRegime.d.mts.map +1 -0
  23. package/dist/enums/privacyRegime.mjs +30 -0
  24. package/dist/enums/privacyRegime.mjs.map +1 -0
  25. package/dist/enums/purpose.d.mts +71 -0
  26. package/dist/enums/purpose.d.mts.map +1 -0
  27. package/dist/enums/purpose.mjs +48 -0
  28. package/dist/enums/purpose.mjs.map +1 -0
  29. package/dist/enums/viewState.d.mts +139 -0
  30. package/dist/enums/viewState.d.mts.map +1 -0
  31. package/dist/enums/viewState.mjs +66 -0
  32. package/dist/enums/viewState.mjs.map +1 -0
  33. package/dist/experience.d.mts +68 -0
  34. package/dist/experience.d.mts.map +1 -0
  35. package/dist/experience.mjs +180 -0
  36. package/dist/experience.mjs.map +1 -0
  37. package/dist/iab.d.mts +323 -0
  38. package/dist/iab.d.mts.map +1 -0
  39. package/dist/iab.mjs +139 -0
  40. package/dist/iab.mjs.map +1 -0
  41. package/dist/index.d.mts +13 -2522
  42. package/dist/index.mjs +12 -1013
  43. package/dist/mobile.d.mts +42 -0
  44. package/dist/mobile.d.mts.map +1 -0
  45. package/dist/mobile.mjs +15 -0
  46. package/dist/mobile.mjs.map +1 -0
  47. package/dist/ui.d.mts +566 -0
  48. package/dist/ui.d.mts.map +1 -0
  49. package/dist/ui.mjs +87 -0
  50. package/dist/ui.mjs.map +1 -0
  51. package/package.json +5 -1
  52. package/dist/index.d.mts.map +0 -1
  53. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,976 @@
1
+ import * as _transcend_io_type_utils0 from "@transcend-io/type-utils";
2
+ import * as t from "io-ts";
3
+
4
+ //#region src/core.d.ts
5
+ /** Transcend logger items */
6
+ type LogItem = {
7
+ /** Log item content */content: any; /** Log item styles */
8
+ styles: string[];
9
+ };
10
+ /** Transcend logger entry tag */
11
+ type LogTag = LogItem & {
12
+ /** Log tag content must be a string */content: string; /** Log tags must have only one style */
13
+ styles: string[1];
14
+ };
15
+ /** Transcend logger entry message */
16
+ type LogMessage = LogItem;
17
+ /** Console-safe log levels */
18
+ declare const ConsoleSafeLogLevel: t.KeyofC<{
19
+ info: null;
20
+ log: null;
21
+ warn: null;
22
+ debug: null;
23
+ error: null;
24
+ trace: null;
25
+ group: null;
26
+ groupCollapsed: null;
27
+ groupEnd: null;
28
+ }>;
29
+ /** Override type */
30
+ type ConsoleSafeLogLevel = t.TypeOf<typeof ConsoleSafeLogLevel>;
31
+ /** Airgap log levels */
32
+ declare const LogLevel: t.UnionC<[t.KeyofC<{
33
+ info: null;
34
+ log: null;
35
+ warn: null;
36
+ debug: null;
37
+ error: null;
38
+ trace: null;
39
+ group: null;
40
+ groupCollapsed: null;
41
+ groupEnd: null;
42
+ }>, t.LiteralC<"fatal">]>;
43
+ /** Override type */
44
+ type LogLevel = t.TypeOf<typeof LogLevel>;
45
+ /** Airgap logger entry types */
46
+ type LogEntryType = LogLevel;
47
+ /** Airgap logger entries */
48
+ type LogEntry = {
49
+ /** Log entry tag */tag: LogTag; /** Log entry message */
50
+ message: LogMessage;
51
+ };
52
+ /**
53
+ * Log emitter function
54
+ */
55
+ type LogEmitter = {
56
+ /** Styled log emitter function */styled(styles?: null | string | string[], ...entries: any[]): void;
57
+ } & ((...entries: any[]) => void);
58
+ /** Transcend Logger API */
59
+ type Logger = {
60
+ /**
61
+ * Set log tag during callback execution or from
62
+ * this point on if no callback is provided.
63
+ */
64
+ tag(logTag: string, callback?: () => any): void;
65
+ } & { [method in LogLevel]: LogEmitter };
66
+ /** AirgapAuth auth options */
67
+ type AirgapAuthMap = {
68
+ /** A `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js) */load?: Event; /** A user-initiated interaction event that was just dispatched. */
69
+ interaction?: Event; /** Automatically reload the page if needed to remove CSP. `false` by default. */
70
+ autoReload?: boolean;
71
+ /**
72
+ * Additional authorization key automatically conferred by airgap.js via setAuth() API for UI modules.
73
+ * Required when optional strict authorization mode is enabled.
74
+ */
75
+ key?: symbol;
76
+ };
77
+ /** Airgap authorization proof */
78
+ type AirgapAuth = null | AirgapAuthMap
79
+ /**
80
+ * A user-initiated interaction event that was just dispatched, or
81
+ * a `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js).
82
+ */
83
+ | Event;
84
+ /** A boolean value represented as either `'on'` or `'off'` */
85
+ declare const BooleanString: t.KeyofC<{
86
+ on: null;
87
+ off: null;
88
+ }>;
89
+ /** Type override */
90
+ type BooleanString = t.TypeOf<typeof BooleanString>;
91
+ /** Data privacy legal regimes */
92
+ type PrivacyRegime = string;
93
+ interface GetPurposeTypesOptions {
94
+ /** Regimes to include */
95
+ regimes?: PrivacyRegime[];
96
+ /** Privacy signals to include */
97
+ signals?: UserPrivacySignal[];
98
+ }
99
+ /**
100
+ * Regime to purpose scope map
101
+ */
102
+ type RegimeToPurposeScopes = [PrivacyRegime[], TrackingPurpose[]][];
103
+ /** Reserved metadata, currently used for airgap module data syncing */
104
+ interface ReservedMetadata {
105
+ /** Top-level key to avoid polluting the metadata key space */
106
+ tcmp?: Record<string, unknown>;
107
+ }
108
+ /**
109
+ * Extra metadata to be synced along with consent
110
+ */
111
+ type Metadata = Record<string, unknown>;
112
+ /** setConsent() options */
113
+ interface ConsentOptions {
114
+ /** Was consent confirmed by the user? */
115
+ confirmed?: boolean;
116
+ /**
117
+ * Was the UI shown to the user?
118
+ * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
119
+ */
120
+ prompted?: boolean;
121
+ /**
122
+ * Extra metadata to be synced along with consent
123
+ *
124
+ * Special values:
125
+ * - `null` - Do not change metadata
126
+ * - `false` - Clear metadata
127
+ */
128
+ metadata?: (Metadata & ReservedMetadata) | null | false;
129
+ /** Last updated for metadata */
130
+ metadataTimestamp?: string;
131
+ /** 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 */
132
+ waitForSync?: boolean;
133
+ /** Last updated */
134
+ timestamp?: string;
135
+ }
136
+ /** airgap.toggle() options */
137
+ type AirgapToggleOptions = /** Protection state */boolean | {
138
+ /** Protection state */protection?: boolean;
139
+ };
140
+ /** airgap.status format */
141
+ interface AirgapSystemStatus {
142
+ /** Protection system active state */
143
+ protection: boolean;
144
+ /** Have any CSPs been activated? */
145
+ csp: boolean;
146
+ /** Monitoring system active state */
147
+ monitoring: boolean;
148
+ /** Telemetry system active state */
149
+ telemetry: boolean;
150
+ }
151
+ /**
152
+ * Request override config
153
+ */
154
+ interface RequestOverride {
155
+ /** Optional tracking purposes to gate the override with lack of consent */
156
+ unconsented?: TrackingPurpose[];
157
+ /**
158
+ * Optional request matcher. This is a RegExp object (or string input
159
+ * for the RegExp constructor). Overrides apply to all requests
160
+ * when this is undefined.
161
+ */
162
+ matcher?: RegExp | string;
163
+ /** Override executor function or replacement string */
164
+ override: string | ((request: IPendingEvent, matcher?: RegExp) => void);
165
+ /** Name */
166
+ name?: string;
167
+ /** Note */
168
+ note?: string;
169
+ /** Description */
170
+ description?: string;
171
+ }
172
+ /** Airgap watcher */
173
+ type AirgapWatcher = (request: IPendingEvent) => void;
174
+ /**
175
+ * Cookie override handler. This function can modify attempted cookie mutations.
176
+ */
177
+ type CookieOverride = (event: IPendingCookieMutation) => void;
178
+ /**
179
+ * Passive cookie watcher. This function can view attempted cookie mutations in a read-only state.
180
+ */
181
+ type CookieWatcher = (event: IPendingCookieMutation) => void;
182
+ /** Event types (for purpose resolution) */
183
+ type TrackingEventType = 'request' | 'cookie';
184
+ /** Airgap sync types */
185
+ type AirgapSyncType = 'consent' | 'quarantine';
186
+ /** airgap.sync() options */
187
+ interface SyncOptions {
188
+ /** types of data to sync */
189
+ sync?: AirgapSyncType[];
190
+ /** reset synchronized data (default: false) */
191
+ reset?: boolean;
192
+ /** sync locally (i.e. XDI) */
193
+ local?: boolean;
194
+ /** sync with remote endpoint */
195
+ backend?: boolean;
196
+ /** signed authentication token to link consent with encrypted identifier */
197
+ auth?: string;
198
+ }
199
+ /** airgap.js API */
200
+ type AirgapAPI = Readonly<{
201
+ /** Embedded request watchers */watchers?: AirgapWatcher[]; /** Embedded request overrides (must specify pre-init) */
202
+ overrides?: RequestOverride[]; /** Embedded request overrides (must specify pre-init) */
203
+ cookieOverrides?: CookieOverride[]; /** Airgap ready event subscriber */
204
+ ready(callback: (airgap: AirgapAPI) => void): void; /** Queue of callbacks to dispatch once airgap is ready */
205
+ readyQueue?: ((airgap: AirgapAPI) => void)[]; /** Enqueue cross-domain data sync across all airgap bundle domains */
206
+ sync(options?: SyncOptions): Promise<void>;
207
+ /**
208
+ * Resolve URL input reserialization post-regulation.
209
+ * @param resolveOverrides - Resolve overrides. Defaults to true.
210
+ */
211
+ resolve(url: Stringifiable, resolveOverrides?: boolean): Stringifiable;
212
+ /**
213
+ * Resolve consent status for given tracking purposes. Essential purposes override opted out unessential purposes.
214
+ *
215
+ * If `use` is not provided, consent is resolved for both request and cookie tracking event types.
216
+ * @param trackingPurposes - Tracking purposes to resolve
217
+ * @param use - Optional event type to use for tracking purpose resolution
218
+ * @returns `true` if the applicable tracking purposes are consented.
219
+ */
220
+ isConsented(trackingPurposes: TrackingPurposes, use?: TrackingEventType): boolean; /** Get tracking consent */
221
+ getConsent(): TrackingConsentDetails; /** Set tracking consent */
222
+ setConsent(/** Airgap auth proof */
223
+
224
+ auth: AirgapAuth, /** The tracking consent options. */
225
+
226
+ consent: TrackingConsent, /** Consent options */
227
+
228
+ options?: ConsentOptions): Promise<boolean> | boolean;
229
+ /**
230
+ * Sets whether or not the Consent UI has been shown to the user
231
+ * @deprecated It was discovered that this function was not working reliably in some versions, and that the value it set was not being used.
232
+ */
233
+ setPrompted(state: boolean): Promise<void>; /** Consents the user to all tracking purposes (requires recent UI interaction) */
234
+ optIn(/** Airgap auth proof */
235
+
236
+ auth: AirgapAuth): boolean; /** Revokes consent for all tracking purposes (requires recent UI interaction) */
237
+ optOut(/** Airgap auth proof */
238
+
239
+ auth: AirgapAuth): boolean; /** Returns true if the user is fully-opted in to all first-order tracking purposes */
240
+ isOptedIn(): boolean; /** Returns true if the user is fully-opted out to all first-order tracking purposes */
241
+ isOptedOut(): boolean; /** Resolve regime tracking purposes. If no regimes are provided, then the user's detected regimes are used */
242
+ getRegimePurposes(regimes?: Set<PrivacyRegime>): Set<TrackingPurpose>; /** Get initialized tracking purposes config */
243
+ getPurposeTypes(): TrackingPurposesTypes; /** Override pending requests */
244
+ override(auth: AirgapAuth, ...overrides: RequestOverride[]): Removable; /** Override cookies */
245
+ overrideCookies(auth: AirgapAuth, handler: (event: IPendingCookieMutation) => void): Removable; /** Listen to pending requests passively */
246
+ watch(watcher: AirgapWatcher): Removable; /** Listen to cookies passively */
247
+ watchCookies(watcher: CookieWatcher): Removable; /** Clear airgap queue & caches. Returns `true` on success. */
248
+ clear(auth: AirgapAuth): boolean; /** Reset airgap queue and consent. Returns `true` on success. */
249
+ reset(/** An airgap auth proof */
250
+
251
+ auth: AirgapAuth, /** Automatically reload the page if needed to remove CSP. */
252
+
253
+ autoReload?: boolean): boolean; /** Check whether a URL is allowed to be loaded */
254
+ isAllowed(/** URL to evaluate */
255
+
256
+ url: Stringifiable, /** Should overrides be resolved? true by default */
257
+
258
+ resolveOverrides?: boolean): Promise<boolean>; /** Check whether a cookie is allowed to be set */
259
+ isCookieAllowed(/** IPendingCookieMutation-like object to evaluate */
260
+
261
+ cookie: string | IPendingCookieMutation | PendingCookieMutationInit, /** Should overrides be resolved? true by default */
262
+
263
+ resolveOverrides?: boolean): Promise<boolean>; /** Check whether a IPendingRequest is allowed to be loaded */
264
+ isRequestAllowed(/** IPendingEvent to inspect */
265
+
266
+ request: IPendingEvent, /** Should overrides be resolved? true by default */
267
+
268
+ resolveOverrides?: boolean): Promise<boolean>; /** Get purposes of URL */
269
+ getPurposes(/** URL to evaluate */
270
+
271
+ url: Stringifiable, /** Should overrides be resolved? true by default */
272
+
273
+ resolveOverrides?: boolean): Promise<TrackingPurposes>; /** Get purposes of IPendingRequest */
274
+ getRequestPurposes(/** IPendingEvent-like object to inspect */
275
+
276
+ request: string | IPendingEvent | PendingRequestInit, /** Should overrides be resolved? true by default */
277
+
278
+ resolveOverrides?: boolean): Promise<TrackingPurposes>; /** Get purposes of a cookie */
279
+ getCookiePurposes(/** IPendingCookieMutation-like object to evaluate */
280
+
281
+ cookie: string | IPendingCookieMutation | PendingCookieMutationInit, /** Should overrides be resolved? true by default */
282
+
283
+ resolveOverrides?: boolean): Promise<TrackingPurposes>; /** Export queues */
284
+ export(options?: AirgapExportOptions): AirgapQueues; /** Get a list of legal regimes that are potentially applicable to the user */
285
+ getRegimes(): Set<PrivacyRegime>; /** Get a list of detected active user agent privacy signals */
286
+ getPrivacySignals(): Set<UserPrivacySignal>; /** Toggle all airgap.js protections. Auth must be a pre-airgap.js or airgap.js script 'load' event. Returns success status */
287
+ toggle(auth: AirgapAuth, options?: AirgapToggleOptions): boolean; /** Current airgap.js system flags */
288
+ status: AirgapSystemStatus; /** airgap.js version number */
289
+ version: string; /** override the event listener signature for consent change events */
290
+ addEventListener: (type: AirgapConsentEventType, callback: ((evt: ConsentChangeEventPayload) => void) | null, options?: boolean | AddEventListenerOptions | undefined) => void;
291
+ }> & EventTarget;
292
+ /** airgap.export() options */
293
+ interface AirgapExportOptions {
294
+ /** Send output to web endpoint */
295
+ endpoint?: string;
296
+ /** JSON pretty-print indentation (default: 0) */
297
+ space?: number;
298
+ /** Save output to disk (default: off) */
299
+ save?: boolean;
300
+ /** Filename for saving to disk */
301
+ filename?: string;
302
+ }
303
+ /** Exported airgap queues & consent */
304
+ type AirgapQueues = Readonly<{
305
+ /** airgap.js version number */version: string; /** Current user consent details */
306
+ consent: TrackingConsentDetails; /** Navigation page URL */
307
+ url: Stringifiable; /** Pending requests */
308
+ requests: PendingRequestDescriptor[]; /** Pending mutations (same-session-only replay) */
309
+ mutations: PendingMutationDescriptor[]; /** Pending cookies */
310
+ cookies: PendingCookieMutationDescriptor[]; /** Pending cookies (same-session-only replay) */
311
+ cookieMutations: PendingCookieMutationDescriptor[]; /** Sent requests */
312
+ sentRequests?: PendingRequestDescriptor[]; /** Set cookies */
313
+ setCookies?: PendingCookieMutationDescriptor[];
314
+ }>;
315
+ /**
316
+ * Airgap event types that send the ConsentChangeEventDetails object with them
317
+ */
318
+ type AirgapConsentEventType = 'consent-change' | 'sync' | 'consent-resolution';
319
+ /**
320
+ * airgap.js event type
321
+ */
322
+ type AirgapEventType = AirgapConsentEventType | 'purpose-map-load';
323
+ interface ConsentChangeEventPayload {
324
+ /** consent change event details */
325
+ detail: ConsentChangeEventDetails;
326
+ }
327
+ /** 'consent-change' custom event details */
328
+ type ConsentChangeEventDetails = {
329
+ /** The old tracking consent */oldConsent: TrackingConsentDetails | null; /** The new tracking consent */
330
+ consent: TrackingConsentDetails | null; /** The tracking consent diff (what's changed in the new consent) */
331
+ changes: Record<string, boolean> | null; /** Applicable privacy signals contributing to this consent change event */
332
+ signals?: Set<UserPrivacySignal> | null;
333
+ };
334
+ /** Removable process (can remove watchers, overrides, and protections) */
335
+ type Removable = {
336
+ /** Remove/revoke process */remove(): void;
337
+ };
338
+ /** Any value which implements `toString()` */
339
+ type Stringifiable = string | (string & {
340
+ toString(): string;
341
+ });
342
+ /** Special `defaultConsent` automatic opt-out value for any potential reason */
343
+ declare const AutoOptOut: t.LiteralC<"Auto">;
344
+ /** Type override */
345
+ type AutoOptOut = t.TypeOf<typeof AutoOptOut>;
346
+ /** Special `defaultConsent` automatic opt-out value for GDPR-protected users */
347
+ declare const AutoOptOutForGDPR: t.LiteralC<"AutoGDPR">;
348
+ /** Type override */
349
+ type AutoOptOutForGDPR = t.TypeOf<typeof AutoOptOutForGDPR>;
350
+ /**
351
+ * Special `defaultConsent` automatic opt-out value for users with DNT enabled.
352
+ * Note that DNT is enabled by default for some browsers.
353
+ */
354
+ declare const AutoOptOutForDNT: t.LiteralC<"AutoDNT">;
355
+ /** Type override */
356
+ type AutoOptOutForDNT = t.TypeOf<typeof AutoOptOutForDNT>;
357
+ /**
358
+ * Special `defaultConsent` automatic opt-out value for users with GPC enabled.
359
+ */
360
+ declare const AutoOptOutForGPC: t.LiteralC<"AutoGPC">;
361
+ /** Type override */
362
+ type AutoOptOutForGPC = t.TypeOf<typeof AutoOptOutForGPC>;
363
+ /** Potential values for `defaultConsent` config token list */
364
+ declare const DefaultConsentConfigValue: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
365
+ on: null;
366
+ off: null;
367
+ }>]>;
368
+ /** Type override */
369
+ type DefaultConsentConfigValue = t.TypeOf<typeof DefaultConsentConfigValue>;
370
+ /** User-configurable user agent privacy signal */
371
+ declare const UserPrivacySignal: t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>;
372
+ /** type overload */
373
+ type UserPrivacySignal = t.TypeOf<typeof UserPrivacySignal>;
374
+ /** Tracking purpose metadata */
375
+ declare const TrackingPurposeDetails: t.IntersectionC<[t.TypeC<{
376
+ /** Tracking purpose name */name: t.StringC; /** Tracking purpose description (used in Consent Manager UI) */
377
+ description: t.StringC; /** Tracking purpose default consent (default: false) */
378
+ defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
379
+ on: null;
380
+ off: null;
381
+ }>]>;
382
+ /**
383
+ * Is this a first-order tracking purpose? If false, this is a
384
+ * second-order tracking purpose that should only be used for
385
+ * request overrides.
386
+ *
387
+ * This parameter previously meant:
388
+ * Show tracking purpose in consent manager UI.
389
+ *
390
+ * Default value: true
391
+ */
392
+ showInConsentManager: t.BooleanC; /** Allow user to configure their consent for this purpose (default: true) */
393
+ configurable: t.BooleanC; /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
394
+ essential: t.BooleanC;
395
+ }>, t.PartialC<{
396
+ /** Tracking type */trackingType: t.StringC; /** Respected opt-out privacy signals */
397
+ optOutSignals: t.ArrayC<t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>>;
398
+ }>]>;
399
+ /** Type override */
400
+ type TrackingPurposeDetails = t.TypeOf<typeof TrackingPurposeDetails>;
401
+ /** Tracking purposes types configuration */
402
+ declare const TrackingPurposesTypes: t.RecordC<t.StringC, t.IntersectionC<[t.TypeC<{
403
+ /** Tracking purpose name */name: t.StringC; /** Tracking purpose description (used in Consent Manager UI) */
404
+ description: t.StringC; /** Tracking purpose default consent (default: false) */
405
+ defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
406
+ on: null;
407
+ off: null;
408
+ }>]>;
409
+ /**
410
+ * Is this a first-order tracking purpose? If false, this is a
411
+ * second-order tracking purpose that should only be used for
412
+ * request overrides.
413
+ *
414
+ * This parameter previously meant:
415
+ * Show tracking purpose in consent manager UI.
416
+ *
417
+ * Default value: true
418
+ */
419
+ showInConsentManager: t.BooleanC; /** Allow user to configure their consent for this purpose (default: true) */
420
+ configurable: t.BooleanC; /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
421
+ essential: t.BooleanC;
422
+ }>, t.PartialC<{
423
+ /** Tracking type */trackingType: t.StringC; /** Respected opt-out privacy signals */
424
+ optOutSignals: t.ArrayC<t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>>;
425
+ }>]>>;
426
+ /** Type override */
427
+ type TrackingPurposesTypes = t.TypeOf<typeof TrackingPurposesTypes>;
428
+ /** Fully-resolved `defaultConsent` config */
429
+ declare const DefaultConsentConfig: t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
430
+ on: null;
431
+ off: null;
432
+ }>]>>;
433
+ /** Type override */
434
+ type DefaultConsentConfig = t.TypeOf<typeof DefaultConsentConfig>;
435
+ /** Tracking purposes configuration */
436
+ declare const TrackingPurposesConfig: t.IntersectionC<[t.TypeC<{
437
+ /** Inherit default tracking purposes config */useDefault: t.BooleanC;
438
+ types: t.RecordC<t.StringC, t.IntersectionC<[t.TypeC<{
439
+ /** Tracking purpose name */name: t.StringC; /** Tracking purpose description (used in Consent Manager UI) */
440
+ description: t.StringC; /** Tracking purpose default consent (default: false) */
441
+ defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
442
+ on: null;
443
+ off: null;
444
+ }>]>;
445
+ /**
446
+ * Is this a first-order tracking purpose? If false, this is a
447
+ * second-order tracking purpose that should only be used for
448
+ * request overrides.
449
+ *
450
+ * This parameter previously meant:
451
+ * Show tracking purpose in consent manager UI.
452
+ *
453
+ * Default value: true
454
+ */
455
+ showInConsentManager: t.BooleanC; /** Allow user to configure their consent for this purpose (default: true) */
456
+ configurable: t.BooleanC; /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
457
+ essential: t.BooleanC;
458
+ }>, t.PartialC<{
459
+ /** Tracking type */trackingType: t.StringC; /** Respected opt-out privacy signals */
460
+ optOutSignals: t.ArrayC<t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>>;
461
+ }>]>>;
462
+ }>, t.PartialC<{
463
+ defaultConsent: t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
464
+ on: null;
465
+ off: null;
466
+ }>]>, t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
467
+ on: null;
468
+ off: null;
469
+ }>]>>]>;
470
+ }>]>;
471
+ /** Type override */
472
+ type TrackingPurposesConfig = {
473
+ /** Inherit default tracking purposes config (Functional, Advertising, Analytics) */useDefault: boolean; /** Tracking purpose types */
474
+ types: TrackingPurposesTypes; /** Default consent states (takes precedence over `TrackingPurposesTypes[purpose].defaultConsent`) */
475
+ defaultConsent?: DefaultConsentConfigValue | DefaultConsentConfig;
476
+ };
477
+ declare const TrackingConsent: t.IntersectionC<[t.PartialC<{
478
+ Essential: t.LiteralC<true>;
479
+ Unknown: t.LiteralC<false>;
480
+ }>, t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
481
+ on: null;
482
+ off: null;
483
+ }>]>, t.UndefinedC]>>]>;
484
+ /**
485
+ * Type override
486
+ */
487
+ type TrackingConsent = t.TypeOf<typeof TrackingConsent>;
488
+ declare const TrackingConsentWithNulls: t.RecordC<t.StringC, t.UnionC<[t.IntersectionC<[t.PartialC<{
489
+ Essential: t.LiteralC<true>;
490
+ Unknown: t.LiteralC<false>;
491
+ }>, t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
492
+ on: null;
493
+ off: null;
494
+ }>]>, t.UndefinedC]>>]>, t.NullC]>>;
495
+ /** Type override */
496
+ type TrackingConsentWithNulls = t.TypeOf<typeof TrackingConsentWithNulls>;
497
+ declare const CoreTrackingConsentDetails: t.IntersectionC<[t.TypeC<{
498
+ /**
499
+ * Was tracking consent confirmed by the user?
500
+ * If this is false, the consent was resolved from defaults & is not yet confirmed
501
+ */
502
+ confirmed: t.BooleanC; /** Consent resolution/last-modified timestamp (ISO 8601) */
503
+ timestamp: t.StringC;
504
+ }>, t.PartialC<{
505
+ /** Has the consent been updated (including no-change confirmation) since default resolution */updated: t.BooleanC;
506
+ /**
507
+ * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)
508
+ * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
509
+ */
510
+ prompted: t.BooleanC; /** Arbitrary metadata that customers want to be associated with consent state */
511
+ metadata: t.IntersectionC<[t.PartialC<{
512
+ tcmp: t.PartialC<{
513
+ tcf: t.PartialC<{
514
+ tcString: t.StringC;
515
+ }>;
516
+ }>;
517
+ }>, t.UnknownRecordC]>; /** When the metadata was last updated */
518
+ metadataTimestamp: t.StringC;
519
+ }>]>;
520
+ /** Type override */
521
+ type CoreTrackingConsentDetails = t.TypeOf<typeof CoreTrackingConsentDetails>;
522
+ declare const TrackingConsentDetails: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
523
+ /**
524
+ * Was tracking consent confirmed by the user?
525
+ * If this is false, the consent was resolved from defaults & is not yet confirmed
526
+ */
527
+ confirmed: t.BooleanC; /** Consent resolution/last-modified timestamp (ISO 8601) */
528
+ timestamp: t.StringC;
529
+ }>, t.PartialC<{
530
+ /** Has the consent been updated (including no-change confirmation) since default resolution */updated: t.BooleanC;
531
+ /**
532
+ * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)
533
+ * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
534
+ */
535
+ prompted: t.BooleanC; /** Arbitrary metadata that customers want to be associated with consent state */
536
+ metadata: t.IntersectionC<[t.PartialC<{
537
+ tcmp: t.PartialC<{
538
+ tcf: t.PartialC<{
539
+ tcString: t.StringC;
540
+ }>;
541
+ }>;
542
+ }>, t.UnknownRecordC]>; /** When the metadata was last updated */
543
+ metadataTimestamp: t.StringC;
544
+ }>]>, t.TypeC<{
545
+ /** Tracking consent config */purposes: t.IntersectionC<[t.PartialC<{
546
+ Essential: t.LiteralC<true>;
547
+ Unknown: t.LiteralC<false>;
548
+ }>, t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
549
+ on: null;
550
+ off: null;
551
+ }>]>, t.UndefinedC]>>]>;
552
+ }>]>;
553
+ /** Override types. */
554
+ type TrackingConsentDetails = t.TypeOf<typeof TrackingConsentDetails>;
555
+ declare const TrackingConsentOptionalData: t.PartialC<{
556
+ /** Transparency Consent (TCF) String */tcf: t.StringC; /** US Privacy (USP) String */
557
+ usp: t.StringC; /** Global Privacy Platform (GPP) String */
558
+ gpp: t.StringC; /** Consent Manager View State */
559
+ viewState: t.KeyofC<{
560
+ QuickOptions: unknown;
561
+ QuickOptions3: unknown;
562
+ AcceptAll: unknown;
563
+ AcceptAllRejectAllToggle: unknown;
564
+ AcceptAllOrMoreChoices: unknown;
565
+ AcceptOrRejectAll: unknown;
566
+ AcceptOrRejectAllOrMoreChoices: unknown;
567
+ AcceptOrRejectAnalytics: unknown;
568
+ AcceptOrRejectAdvertising: unknown;
569
+ NoticeAndDoNotSell: unknown;
570
+ DoNotSellExplainer: unknown;
571
+ CompleteOptionsToggles: unknown;
572
+ PrivacyPolicyNotice: unknown;
573
+ PrivacyPolicyNoticeWithCloseButton: unknown;
574
+ CompleteOptions: unknown;
575
+ CompleteOptionsInverted: unknown;
576
+ Hidden: unknown;
577
+ TCF_EU: unknown;
578
+ DoNotSellDisclosure: unknown;
579
+ OptOutDisclosure: unknown;
580
+ LanguageOptions: unknown;
581
+ Collapsed: unknown;
582
+ Closed: unknown;
583
+ }>; /** Airgap Version */
584
+ airgapVersion: t.StringC;
585
+ }>;
586
+ declare const FullTrackingConsentDetails: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
587
+ /**
588
+ * Was tracking consent confirmed by the user?
589
+ * If this is false, the consent was resolved from defaults & is not yet confirmed
590
+ */
591
+ confirmed: t.BooleanC; /** Consent resolution/last-modified timestamp (ISO 8601) */
592
+ timestamp: t.StringC;
593
+ }>, t.PartialC<{
594
+ /** Has the consent been updated (including no-change confirmation) since default resolution */updated: t.BooleanC;
595
+ /**
596
+ * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)
597
+ * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
598
+ */
599
+ prompted: t.BooleanC; /** Arbitrary metadata that customers want to be associated with consent state */
600
+ metadata: t.IntersectionC<[t.PartialC<{
601
+ tcmp: t.PartialC<{
602
+ tcf: t.PartialC<{
603
+ tcString: t.StringC;
604
+ }>;
605
+ }>;
606
+ }>, t.UnknownRecordC]>; /** When the metadata was last updated */
607
+ metadataTimestamp: t.StringC;
608
+ }>]>, t.TypeC<{
609
+ /** Tracking consent config */purposes: t.IntersectionC<[t.PartialC<{
610
+ Essential: t.LiteralC<true>;
611
+ Unknown: t.LiteralC<false>;
612
+ }>, t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
613
+ on: null;
614
+ off: null;
615
+ }>]>, t.UndefinedC]>>]>;
616
+ }>]>, t.PartialC<{
617
+ /** Transparency Consent (TCF) String */tcf: t.StringC; /** US Privacy (USP) String */
618
+ usp: t.StringC; /** Global Privacy Platform (GPP) String */
619
+ gpp: t.StringC; /** Consent Manager View State */
620
+ viewState: t.KeyofC<{
621
+ QuickOptions: unknown;
622
+ QuickOptions3: unknown;
623
+ AcceptAll: unknown;
624
+ AcceptAllRejectAllToggle: unknown;
625
+ AcceptAllOrMoreChoices: unknown;
626
+ AcceptOrRejectAll: unknown;
627
+ AcceptOrRejectAllOrMoreChoices: unknown;
628
+ AcceptOrRejectAnalytics: unknown;
629
+ AcceptOrRejectAdvertising: unknown;
630
+ NoticeAndDoNotSell: unknown;
631
+ DoNotSellExplainer: unknown;
632
+ CompleteOptionsToggles: unknown;
633
+ PrivacyPolicyNotice: unknown;
634
+ PrivacyPolicyNoticeWithCloseButton: unknown;
635
+ CompleteOptions: unknown;
636
+ CompleteOptionsInverted: unknown;
637
+ Hidden: unknown;
638
+ TCF_EU: unknown;
639
+ DoNotSellDisclosure: unknown;
640
+ OptOutDisclosure: unknown;
641
+ LanguageOptions: unknown;
642
+ Collapsed: unknown;
643
+ Closed: unknown;
644
+ }>; /** Airgap Version */
645
+ airgapVersion: t.StringC;
646
+ }>]>;
647
+ /** Override types. */
648
+ type FullTrackingConsentDetails = t.TypeOf<typeof FullTrackingConsentDetails>;
649
+ declare const FullTrackingConsentDetailsWithNulls: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
650
+ /**
651
+ * Was tracking consent confirmed by the user?
652
+ * If this is false, the consent was resolved from defaults & is not yet confirmed
653
+ */
654
+ confirmed: t.BooleanC; /** Consent resolution/last-modified timestamp (ISO 8601) */
655
+ timestamp: t.StringC;
656
+ }>, t.PartialC<{
657
+ /** Has the consent been updated (including no-change confirmation) since default resolution */updated: t.BooleanC;
658
+ /**
659
+ * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)
660
+ * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
661
+ */
662
+ prompted: t.BooleanC; /** Arbitrary metadata that customers want to be associated with consent state */
663
+ metadata: t.IntersectionC<[t.PartialC<{
664
+ tcmp: t.PartialC<{
665
+ tcf: t.PartialC<{
666
+ tcString: t.StringC;
667
+ }>;
668
+ }>;
669
+ }>, t.UnknownRecordC]>; /** When the metadata was last updated */
670
+ metadataTimestamp: t.StringC;
671
+ }>]>, t.PartialC<{
672
+ /** Transparency Consent (TCF) String */tcf: t.StringC; /** US Privacy (USP) String */
673
+ usp: t.StringC; /** Global Privacy Platform (GPP) String */
674
+ gpp: t.StringC; /** Consent Manager View State */
675
+ viewState: t.KeyofC<{
676
+ QuickOptions: unknown;
677
+ QuickOptions3: unknown;
678
+ AcceptAll: unknown;
679
+ AcceptAllRejectAllToggle: unknown;
680
+ AcceptAllOrMoreChoices: unknown;
681
+ AcceptOrRejectAll: unknown;
682
+ AcceptOrRejectAllOrMoreChoices: unknown;
683
+ AcceptOrRejectAnalytics: unknown;
684
+ AcceptOrRejectAdvertising: unknown;
685
+ NoticeAndDoNotSell: unknown;
686
+ DoNotSellExplainer: unknown;
687
+ CompleteOptionsToggles: unknown;
688
+ PrivacyPolicyNotice: unknown;
689
+ PrivacyPolicyNoticeWithCloseButton: unknown;
690
+ CompleteOptions: unknown;
691
+ CompleteOptionsInverted: unknown;
692
+ Hidden: unknown;
693
+ TCF_EU: unknown;
694
+ DoNotSellDisclosure: unknown;
695
+ OptOutDisclosure: unknown;
696
+ LanguageOptions: unknown;
697
+ Collapsed: unknown;
698
+ Closed: unknown;
699
+ }>; /** Airgap Version */
700
+ airgapVersion: t.StringC;
701
+ }>, t.TypeC<{
702
+ /** Tracking consent config */purposes: t.RecordC<t.StringC, t.UnionC<[t.IntersectionC<[t.PartialC<{
703
+ Essential: t.LiteralC<true>;
704
+ Unknown: t.LiteralC<false>;
705
+ }>, t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
706
+ on: null;
707
+ off: null;
708
+ }>]>, t.UndefinedC]>>]>, t.NullC]>>;
709
+ }>]>;
710
+ /** Override types. */
711
+ type FullTrackingConsentDetailsWithNulls = t.TypeOf<typeof FullTrackingConsentDetailsWithNulls>;
712
+ declare const ConsentPreferencesBody: t.TypeC<{
713
+ /** token containing encrypted identifier */token: t.StringC; /** consent partition (defaults to bundle id) */
714
+ partition: t.StringC; /** user consent */
715
+ consent: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
716
+ /**
717
+ * Was tracking consent confirmed by the user?
718
+ * If this is false, the consent was resolved from defaults & is not yet confirmed
719
+ */
720
+ confirmed: t.BooleanC; /** Consent resolution/last-modified timestamp (ISO 8601) */
721
+ timestamp: t.StringC;
722
+ }>, t.PartialC<{
723
+ /** Has the consent been updated (including no-change confirmation) since default resolution */updated: t.BooleanC;
724
+ /**
725
+ * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)
726
+ * @deprecated It was discovered that this value was not being set reliably in some versions, and was not being used.
727
+ */
728
+ prompted: t.BooleanC; /** Arbitrary metadata that customers want to be associated with consent state */
729
+ metadata: t.IntersectionC<[t.PartialC<{
730
+ tcmp: t.PartialC<{
731
+ tcf: t.PartialC<{
732
+ tcString: t.StringC;
733
+ }>;
734
+ }>;
735
+ }>, t.UnknownRecordC]>; /** When the metadata was last updated */
736
+ metadataTimestamp: t.StringC;
737
+ }>]>, t.TypeC<{
738
+ /** Tracking consent config */purposes: t.IntersectionC<[t.PartialC<{
739
+ Essential: t.LiteralC<true>;
740
+ Unknown: t.LiteralC<false>;
741
+ }>, t.RecordC<t.StringC, t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
742
+ on: null;
743
+ off: null;
744
+ }>]>, t.UndefinedC]>>]>;
745
+ }>]>;
746
+ }>;
747
+ /** Override types. */
748
+ type ConsentPreferencesBody = t.TypeOf<typeof ConsentPreferencesBody>;
749
+ declare const ConsentTokenPayload: t.IntersectionC<[t.TypeC<{
750
+ encryptedIdentifier: t.StringC;
751
+ }>, t.PartialC<{
752
+ deprecatedEncryptedIdentifiers: t.ArrayC<t.StringC>;
753
+ }>]>;
754
+ /** Type override */
755
+ type ConsentTokenPayload = t.TypeOf<typeof ConsentTokenPayload>;
756
+ /** Tracking purpose */
757
+ declare const TrackingPurpose: t.UnionC<[t.KeyofC<{
758
+ Unknown: "Unknown";
759
+ Essential: "Essential";
760
+ }>, t.StringC]>;
761
+ /** Type override */
762
+ type TrackingPurpose = t.TypeOf<typeof TrackingPurpose>;
763
+ /** Tracking purposes */
764
+ type TrackingPurposes = Set<TrackingPurpose>;
765
+ /** Tracking consent change diffs */
766
+ declare const ConsentChange: t.RecordC<t.UnionC<[t.KeyofC<{
767
+ Unknown: "Unknown";
768
+ Essential: "Essential";
769
+ }>, t.StringC]>, t.BooleanC>;
770
+ /** type overload */
771
+ type ConsentChange = t.TypeOf<typeof ConsentChange>;
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>>>>;
774
+ /** Type override */
775
+ type RegimePurposeScopesConfig = [/** Regimes */regimes: string[], /** In-scope purposes */purposes: TrackingPurpose[]][];
776
+ /** Request source types */
777
+ type AirgapRequestSource = 'unknown' | 'airgap.js' | 'fetch' | 'xhr' | 'websocket' | 'webtransport' | 'service-worker' | 'shared-worker' | 'worker' | 'module-worker' | 'shared-module-worker' | 'eventsource' | 'beacon' | 'CSPV' | 'navigation' | 'open' | 'script' | AirgapDOMRequestSource;
778
+ /** DOM-initiated request source types */
779
+ type AirgapDOMRequestSource = 'DOM:style' | 'DOM:image' | 'DOM:media' | 'DOM:video' | 'DOM:audio' | 'DOM:track' | 'DOM:link' | 'DOM:form' | 'DOM:form-action' | 'DOM:view' | 'DOM:ping' | 'DOM:unknown';
780
+ /**
781
+ * Airgap pending request descriptor init dictionary
782
+ */
783
+ interface PendingRequestInit {
784
+ /** Request initiator type */
785
+ type: AirgapRequestSource;
786
+ /** Request URL */
787
+ url: Stringifiable;
788
+ /** Persist request for cross-session replay (false by default) */
789
+ persist?: boolean;
790
+ /** Request initialization data */
791
+ requestInit?: RequestInit;
792
+ /** Request timestamp (ISO 8601) */
793
+ timestamp?: Stringifiable;
794
+ /** Request DOM target */
795
+ target?: Node | IDynamicNodeReference | null;
796
+ /** Mutator to apply changes associated with the request */
797
+ mutator?(): void;
798
+ /** Serialize request or mutation state back to DOM patcher parser input */
799
+ serialize?(): any;
800
+ /** Prevent credentials from being included in request */
801
+ omitCredentials?(): boolean;
802
+ }
803
+ /** Properties that are added to instantiated PendingRequests */
804
+ interface InstantiatedPendingRequestProps {
805
+ /** Primary or first associated request URL input */
806
+ url: Stringifiable;
807
+ /** All associated request URL inputs */
808
+ urls: Stringifiable[];
809
+ /** Request timestamp (ISO 8601) */
810
+ timestamp: Stringifiable;
811
+ /** Serialize request or mutation state back to DOM patcher parser input */
812
+ serialize(): any;
813
+ /** The following IPendingEvent APIs are only available to overrides: */
814
+ /**
815
+ * All associated resolved request URLs. null = invalid URL or data: URL (parsing
816
+ * skipped to optimize performance)
817
+ */
818
+ URLs: (URL | null)[];
819
+ /** Prevent credentials from being included in request */
820
+ omitCredentials(): boolean;
821
+ /** Whether or not request is currently allowed */
822
+ allowed: boolean;
823
+ /** Bypass our consent logic and force-allow request */
824
+ allow(): void;
825
+ /** Bypass our consent logic and force-deny request */
826
+ deny(): void;
827
+ /** Bypass our consent logic to force-deny request and also block it from entering the replay quarantine */
828
+ block(): void;
829
+ /** Resolved tracking purposes associated with this pending mutation */
830
+ purposes: Set<TrackingPurpose>;
831
+ }
832
+ /**
833
+ * Airgap pending request descriptor with script annotation
834
+ */
835
+ type PendingRequestDescriptor = PendingRequestInit & InstantiatedPendingRequestProps;
836
+ /** Airgap pending request descriptor init with multiple URLs */
837
+ type PendingMutationInit = Omit<PendingRequestInit, 'url'> & {
838
+ /** Request URLs */urls: Stringifiable[];
839
+ };
840
+ /** PendingEvent init input */
841
+ type PendingEventInit = PendingRequestInit | PendingMutationInit;
842
+ /** Pending mutation descriptor */
843
+ type PendingMutationDescriptor = PendingMutationInit & InstantiatedPendingRequestProps;
844
+ /** Pending event props that can't or won't be serialized to JSON */
845
+ type PendingEventUnserializableProps = 'persist' | 'target' | 'mutator' | 'serialize' | 'URLs' | 'omitCredentials' | 'allow' | 'deny' | 'purposes' | 'allowed' | 'blocked';
846
+ /** JSON-safe representation of pending event tracking purposes */
847
+ interface PendingEventPurposesJSON {
848
+ /** Tracking purposes list */
849
+ purposes?: TrackingPurpose[];
850
+ }
851
+ /** Pending request subset to JSON-safe properties */
852
+ type PendingRequestJSON = Omit<PendingRequestDescriptor, PendingEventUnserializableProps | 'urls'> & PendingEventPurposesJSON;
853
+ /** Pending mutation subset to JSON-safe properties */
854
+ type PendingMutationJSON = Omit<PendingMutationDescriptor, PendingEventUnserializableProps | 'url'> & PendingEventPurposesJSON;
855
+ /** Airgap pending request interface */
856
+ interface IPendingRequest extends PendingRequestDescriptor {
857
+ /** Convert PendingRequest to JSON-safe representation */
858
+ toJSON(): PendingRequestJSON;
859
+ }
860
+ /** Airgap pending mutation interface */
861
+ interface IPendingMutation extends PendingMutationDescriptor {
862
+ /** Convert PendingRequest to JSON-safe representation */
863
+ toJSON(): PendingMutationJSON;
864
+ }
865
+ /** Pending event descriptor */
866
+ type PendingEventDescriptor = PendingRequestDescriptor | PendingMutationDescriptor;
867
+ /** Pending request or mutation */
868
+ type IPendingEvent = IPendingMutation | IPendingRequest;
869
+ /** Unapproved request queue */
870
+ type PendingRequestQueue = IPendingRequest[];
871
+ /** Unapproved mutation queue */
872
+ type PendingMutationQueue = IPendingEvent[];
873
+ /** Unapproved event queue */
874
+ type PendingEventQueue = IPendingEvent[];
875
+ /** Cookie descriptor */
876
+ interface Cookie {
877
+ /** Cookie name */
878
+ name: Stringifiable;
879
+ /** Cookie value */
880
+ value?: Stringifiable;
881
+ /** Cookie change event timestamp (ISO 8601) */
882
+ timestamp?: string;
883
+ /** Expiry date (UTC date string or DOMTimeStamp) */
884
+ expires?: number | Stringifiable;
885
+ /** Max cookie age (seconds) */
886
+ maxAge?: number;
887
+ /** Optional cookie host scope */
888
+ domain?: Stringifiable;
889
+ /** Optional cookie path scope */
890
+ path?: Stringifiable;
891
+ /** Should cookie only be sent in secure contexts? */
892
+ secure?: boolean;
893
+ /**
894
+ * Should cookie be restricted to the same site?
895
+ * Values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
896
+ */
897
+ sameSite?: Stringifiable;
898
+ /**
899
+ * Is the cookie partitioned (e.g. by CHIPS)?
900
+ * See https://developer.mozilla.org/en-US/docs/Web/Privacy/Partitioned_cookies
901
+ * and https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/get#:~:text=of%20the%20cookie.-,partitioned,-A%20boolean%20indicating
902
+ */
903
+ partitioned?: boolean;
904
+ /** Target document / node */
905
+ target?: Node | null;
906
+ }
907
+ /**
908
+ * PendingCookieMutation constructor input
909
+ */
910
+ interface PendingCookieMutationInit extends Cookie {
911
+ /** Persist cookie for cross-session replay if quarantined (true by default) */
912
+ persist?: boolean;
913
+ /** Mutator to apply cookie mutation */
914
+ mutator?(): void | Promise<void>;
915
+ }
916
+ /** Properties that are added to instantiated PendingCookieMutations */
917
+ interface InstantiatedPendingCookieMutationProps {
918
+ /** Expiry date (DOMTimeStamp) */
919
+ expires?: number;
920
+ /** Cookie change event timestamp (Date.now() format) */
921
+ timestamp: string;
922
+ /** Whether or not cookie is currently allowed. null = passthrough */
923
+ allowed?: boolean | null;
924
+ /** Whether or not cookie is currently disallowed & blocked from entering the quarantine */
925
+ blocked?: boolean;
926
+ /** Bypass our consent logic and force-allow cookie */
927
+ allow(): void;
928
+ /** Bypass our consent logic and force-deny cookie */
929
+ deny(): void;
930
+ /** Bypass our consent logic to force-deny cookie and also block it from entering the quarantine */
931
+ block(): void;
932
+ /** Resolved tracking purposes associated with this pending mutation */
933
+ purposes: Set<TrackingPurpose>;
934
+ /** Mutator to apply cookie mutation */
935
+ mutator(): void | Promise<void>;
936
+ }
937
+ /** Pending cookie mutation descriptor */
938
+ type PendingCookieMutationDescriptor = Omit<PendingCookieMutationInit, 'expires'> & InstantiatedPendingCookieMutationProps;
939
+ /** Pending cookie mutation props that can't or won't be serialized to JSON */
940
+ type PendingCookieMutationUnserializableProps = 'persist' | 'mutator' | 'allow' | 'deny' | 'purposes' | 'allowed' | 'blocked';
941
+ /** JSON-safe representation of pending cookie mutation tracking purposes */
942
+ interface PendingCookieMutationPurposesJSON {
943
+ /** Tracking purposes list */
944
+ purposes?: TrackingPurpose[];
945
+ }
946
+ /** Pending request subset to JSON-safe properties */
947
+ type PendingCookieMutationJSON = Omit<PendingCookieMutationDescriptor, PendingCookieMutationUnserializableProps> & PendingCookieMutationPurposesJSON;
948
+ /** Airgap pending cookie mutation interface */
949
+ interface IPendingCookieMutation extends PendingCookieMutationDescriptor {
950
+ /** Convert PendingCookieMutation to JSON-safe representation */
951
+ toJSON(): PendingCookieMutationJSON;
952
+ }
953
+ /** Pending cookie mutation queue */
954
+ type PendingCookieQueue = IPendingCookieMutation[];
955
+ /** Interface for dynamic node references */
956
+ interface IDynamicNodeReference {
957
+ /**
958
+ * Current node getter. This should always be used in `handleLiveMutation()`.
959
+ * @returns current node
960
+ */
961
+ getNode(): Element;
962
+ /**
963
+ * Live node getter. Use this to apply mutations in `quarantine()`
964
+ * and `quarantineMutation()` handlers.
965
+ *
966
+ * `release()` must always be called after completing
967
+ * mutations using `getLiveNode()`.
968
+ * @returns live node
969
+ */
970
+ getLiveNode(): Element;
971
+ /** Release & garbage-collect internal node reference */
972
+ release(): void;
973
+ }
974
+ //#endregion
975
+ export { AirgapAPI, AirgapAuth, AirgapAuthMap, AirgapConsentEventType, AirgapDOMRequestSource, AirgapEventType, AirgapExportOptions, AirgapQueues, AirgapRequestSource, AirgapSyncType, AirgapSystemStatus, AirgapToggleOptions, AirgapWatcher, AutoOptOut, AutoOptOutForDNT, AutoOptOutForGDPR, AutoOptOutForGPC, BooleanString, ConsentChange, ConsentChangeEventDetails, ConsentChangeEventPayload, ConsentOptions, ConsentPreferencesBody, ConsentTokenPayload, ConsoleSafeLogLevel, Cookie, CookieOverride, CookieWatcher, CoreTrackingConsentDetails, DefaultConsentConfig, DefaultConsentConfigValue, FullTrackingConsentDetails, FullTrackingConsentDetailsWithNulls, GetPurposeTypesOptions, IDynamicNodeReference, IPendingCookieMutation, IPendingEvent, IPendingMutation, IPendingRequest, InstantiatedPendingCookieMutationProps, InstantiatedPendingRequestProps, LogEmitter, LogEntry, LogEntryType, LogItem, LogLevel, LogMessage, LogTag, Logger, Metadata, PendingCookieMutationDescriptor, PendingCookieMutationInit, PendingCookieMutationJSON, PendingCookieQueue, PendingEventDescriptor, PendingEventInit, PendingEventQueue, PendingMutationDescriptor, PendingMutationInit, PendingMutationJSON, PendingMutationQueue, PendingRequestDescriptor, PendingRequestInit, PendingRequestJSON, PendingRequestQueue, PrivacyRegime, RegimePurposeScopesConfig, RegimeToPurposeScopes, Removable, RequestOverride, ReservedMetadata, Stringifiable, SyncOptions, TrackingConsent, TrackingConsentDetails, TrackingConsentOptionalData, TrackingConsentWithNulls, TrackingEventType, TrackingPurpose, TrackingPurposeDetails, TrackingPurposes, TrackingPurposesConfig, TrackingPurposesTypes, UserPrivacySignal };
976
+ //# sourceMappingURL=core.d.mts.map