@transcend-io/airgap.js-types 10.7.9 → 10.8.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.
- package/build/core.d.ts +1 -1
- package/build/core.d.ts.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/build-esm/constants.d.ts +10 -0
- package/build-esm/constants.d.ts.map +1 -0
- package/build-esm/constants.js +35 -0
- package/build-esm/constants.js.map +1 -0
- package/build-esm/core.d.ts +688 -0
- package/build-esm/core.d.ts.map +1 -0
- package/build-esm/core.js +197 -0
- package/build-esm/core.js.map +1 -0
- package/build-esm/enums/browserLanguage.d.ts +248 -0
- package/build-esm/enums/browserLanguage.d.ts.map +1 -0
- package/build-esm/enums/browserLanguage.js +248 -0
- package/build-esm/enums/browserLanguage.js.map +1 -0
- package/build-esm/enums/experience.d.ts +12 -0
- package/build-esm/enums/experience.d.ts.map +1 -0
- package/build-esm/enums/experience.js +12 -0
- package/build-esm/enums/experience.js.map +1 -0
- package/build-esm/enums/index.d.ts +6 -0
- package/build-esm/enums/index.d.ts.map +1 -0
- package/build-esm/enums/index.js +6 -0
- package/build-esm/enums/index.js.map +1 -0
- package/build-esm/enums/privacyRegime.d.ts +23 -0
- package/build-esm/enums/privacyRegime.d.ts.map +1 -0
- package/build-esm/enums/privacyRegime.js +24 -0
- package/build-esm/enums/privacyRegime.js.map +1 -0
- package/build-esm/enums/purpose.d.ts +60 -0
- package/build-esm/enums/purpose.d.ts.map +1 -0
- package/build-esm/enums/purpose.js +44 -0
- package/build-esm/enums/purpose.js.map +1 -0
- package/build-esm/enums/viewState.d.ts +121 -0
- package/build-esm/enums/viewState.d.ts.map +1 -0
- package/build-esm/enums/viewState.js +90 -0
- package/build-esm/enums/viewState.js.map +1 -0
- package/build-esm/experience.d.ts +57 -0
- package/build-esm/experience.d.ts.map +1 -0
- package/build-esm/experience.js +107 -0
- package/build-esm/experience.js.map +1 -0
- package/build-esm/iab.d.ts +307 -0
- package/build-esm/iab.d.ts.map +1 -0
- package/build-esm/iab.js +150 -0
- package/build-esm/iab.js.map +1 -0
- package/build-esm/index.d.ts +7 -0
- package/build-esm/index.d.ts.map +1 -0
- package/build-esm/index.js +7 -0
- package/build-esm/index.js.map +1 -0
- package/build-esm/ui.d.ts +499 -0
- package/build-esm/ui.d.ts.map +1 -0
- package/build-esm/ui.js +101 -0
- package/build-esm/ui.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
import * as t from 'io-ts';
|
|
2
|
+
/** Transcend logger items */
|
|
3
|
+
export declare type LogItem = {
|
|
4
|
+
/** Log item content */
|
|
5
|
+
content: any;
|
|
6
|
+
/** Log item styles */
|
|
7
|
+
styles: string[];
|
|
8
|
+
};
|
|
9
|
+
/** Transcend logger entry tag */
|
|
10
|
+
export declare type LogTag = LogItem & {
|
|
11
|
+
/** Log tag content must be a string */
|
|
12
|
+
content: string;
|
|
13
|
+
/** Log tags must have only one style */
|
|
14
|
+
styles: string[1];
|
|
15
|
+
};
|
|
16
|
+
/** Transcend logger entry message */
|
|
17
|
+
export declare type LogMessage = LogItem;
|
|
18
|
+
/** Console-safe log levels */
|
|
19
|
+
export declare const ConsoleSafeLogLevel: t.KeyofC<{
|
|
20
|
+
info: null;
|
|
21
|
+
log: null;
|
|
22
|
+
warn: null;
|
|
23
|
+
debug: null;
|
|
24
|
+
error: null;
|
|
25
|
+
trace: null;
|
|
26
|
+
group: null;
|
|
27
|
+
groupCollapsed: null;
|
|
28
|
+
groupEnd: null;
|
|
29
|
+
}>;
|
|
30
|
+
/** Override type */
|
|
31
|
+
export declare type ConsoleSafeLogLevel = t.TypeOf<typeof ConsoleSafeLogLevel>;
|
|
32
|
+
/** Airgap log levels */
|
|
33
|
+
export declare const LogLevel: t.UnionC<[t.KeyofC<{
|
|
34
|
+
info: null;
|
|
35
|
+
log: null;
|
|
36
|
+
warn: null;
|
|
37
|
+
debug: null;
|
|
38
|
+
error: null;
|
|
39
|
+
trace: null;
|
|
40
|
+
group: null;
|
|
41
|
+
groupCollapsed: null;
|
|
42
|
+
groupEnd: null;
|
|
43
|
+
}>, t.LiteralC<"fatal">]>;
|
|
44
|
+
/** Override type */
|
|
45
|
+
export declare type LogLevel = t.TypeOf<typeof LogLevel>;
|
|
46
|
+
/** Airgap logger entry types */
|
|
47
|
+
export declare type LogEntryType = LogLevel;
|
|
48
|
+
/** Airgap logger entries */
|
|
49
|
+
export declare type LogEntry = {
|
|
50
|
+
/** Log entry tag */
|
|
51
|
+
tag: LogTag;
|
|
52
|
+
/** Log entry message */
|
|
53
|
+
message: LogMessage;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Log emitter function
|
|
57
|
+
*/
|
|
58
|
+
export declare type LogEmitter = {
|
|
59
|
+
/** Styled log emitter function */
|
|
60
|
+
styled(styles?: null | string | string[], ...entries: any[]): void;
|
|
61
|
+
} & ((...entries: any[]) => void);
|
|
62
|
+
/** Transcend Logger API */
|
|
63
|
+
export declare type Logger = {
|
|
64
|
+
/**
|
|
65
|
+
* Set log tag during callback execution or from
|
|
66
|
+
* this point on if no callback is provided.
|
|
67
|
+
*/
|
|
68
|
+
tag(logTag: string, callback?: () => any): void;
|
|
69
|
+
} & {
|
|
70
|
+
[method in LogLevel]: LogEmitter;
|
|
71
|
+
};
|
|
72
|
+
/** AirgapAuth auth options */
|
|
73
|
+
export declare type AirgapAuthMap = {
|
|
74
|
+
/** A `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js) */
|
|
75
|
+
load?: Event;
|
|
76
|
+
/** A user-initiated interaction event that was just dispatched. */
|
|
77
|
+
interaction?: UIEvent;
|
|
78
|
+
/** Automatically reload the page if needed to remove CSP. `false` by default. */
|
|
79
|
+
autoReload?: boolean;
|
|
80
|
+
};
|
|
81
|
+
/** Airgap authorization proof */
|
|
82
|
+
export declare type AirgapAuth = null | AirgapAuthMap
|
|
83
|
+
/** A user-initiated interaction event that was just dispatched. */
|
|
84
|
+
| UIEvent
|
|
85
|
+
/** A `load` event from a just-loaded airgap.js script element (which implies auth by being loaded before airgap.js) */
|
|
86
|
+
| Event;
|
|
87
|
+
/** A boolean value represented as either `'on'` or `'off'` */
|
|
88
|
+
export declare const BooleanString: t.KeyofC<{
|
|
89
|
+
on: null;
|
|
90
|
+
off: null;
|
|
91
|
+
}>;
|
|
92
|
+
/** Type override */
|
|
93
|
+
export declare type BooleanString = t.TypeOf<typeof BooleanString>;
|
|
94
|
+
/** Data privacy legal regimes */
|
|
95
|
+
export declare type PrivacyRegime = string;
|
|
96
|
+
export interface GetPurposeTypesOptions {
|
|
97
|
+
/** Regimes to include */
|
|
98
|
+
regimes?: PrivacyRegime[];
|
|
99
|
+
/** Privacy signals to include */
|
|
100
|
+
signals?: UserPrivacySignal[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Regime to purpose scope map
|
|
104
|
+
*/
|
|
105
|
+
export declare type RegimeToPurposeScopes = [PrivacyRegime[], TrackingPurpose[]][];
|
|
106
|
+
/** Reserved metadata, currently used for airgap module data syncing */
|
|
107
|
+
export interface ReservedMetadata {
|
|
108
|
+
/** Top-level key to avoid polluting the metadata key space */
|
|
109
|
+
tcmp?: Record<string, unknown>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Extra metadata to be synced along with consent
|
|
113
|
+
*/
|
|
114
|
+
export declare type Metadata = Record<string, unknown>;
|
|
115
|
+
/** setConsent() options */
|
|
116
|
+
export interface ConsentOptions {
|
|
117
|
+
/** Was consent confirmed by the user? */
|
|
118
|
+
confirmed?: boolean;
|
|
119
|
+
/** Was the UI shown to the user? */
|
|
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.js API */
|
|
137
|
+
export declare type AirgapAPI = Readonly<{
|
|
138
|
+
/** Airgap ready event subscriber */
|
|
139
|
+
ready(callback: (airgap: AirgapAPI) => void): void;
|
|
140
|
+
/** Queue of callbacks to dispatch once airgap is ready */
|
|
141
|
+
readyQueue?: ((airgap: AirgapAPI) => void)[];
|
|
142
|
+
/** Enqueue cross-domain data sync across all airgap bundle domains */
|
|
143
|
+
sync(): Promise<void>;
|
|
144
|
+
/** Resolve airgap request overrides for a URL */
|
|
145
|
+
resolve(url: Stringifiable): Stringifiable;
|
|
146
|
+
/** Get tracking consent */
|
|
147
|
+
getConsent(): TrackingConsentDetails;
|
|
148
|
+
/** Set tracking consent */
|
|
149
|
+
setConsent(
|
|
150
|
+
/** Airgap auth proof */
|
|
151
|
+
auth: AirgapAuth,
|
|
152
|
+
/** The tracking consent options. */
|
|
153
|
+
consent: TrackingConsent,
|
|
154
|
+
/** Consent options */
|
|
155
|
+
options?: ConsentOptions): Promise<boolean> | boolean;
|
|
156
|
+
/** Sets whether or not the Consent UI has been shown to the user */
|
|
157
|
+
setPrompted(state: boolean): Promise<void>;
|
|
158
|
+
/** Consents the user to all tracking purposes (requires recent UI interaction) */
|
|
159
|
+
optIn(
|
|
160
|
+
/** Airgap auth proof */
|
|
161
|
+
auth: AirgapAuth): boolean;
|
|
162
|
+
/** Revokes consent for all tracking purposes (requires recent UI interaction) */
|
|
163
|
+
optOut(
|
|
164
|
+
/** Airgap auth proof */
|
|
165
|
+
auth: AirgapAuth): boolean;
|
|
166
|
+
/** Returns true if the user is fully-opted in to all first-order tracking purposes */
|
|
167
|
+
isOptedIn(): boolean;
|
|
168
|
+
/** Returns true if the user is fully-opted out to all first-order tracking purposes */
|
|
169
|
+
isOptedOut(): boolean;
|
|
170
|
+
/** Resolve regime tracking purposes. If no regimes are provided, then the user's detected regimes are used */
|
|
171
|
+
getRegimePurposes(regimes?: Set<PrivacyRegime>): Set<TrackingPurpose>;
|
|
172
|
+
/** Get initialized tracking purposes config */
|
|
173
|
+
getPurposeTypes(): TrackingPurposesTypes;
|
|
174
|
+
/** Clear airgap queue & caches. Returns `true` on success. */
|
|
175
|
+
clear(auth: AirgapAuth): boolean;
|
|
176
|
+
/** Reset airgap queue and consent. Returns `true` on success. */
|
|
177
|
+
reset(
|
|
178
|
+
/** An airgap auth proof */
|
|
179
|
+
auth: AirgapAuth,
|
|
180
|
+
/** Automatically reload the page if needed to remove CSP. */
|
|
181
|
+
autoReload?: boolean): boolean;
|
|
182
|
+
/** Get a list of legal regimes that are potentially applicable to the user */
|
|
183
|
+
getRegimes(): Set<PrivacyRegime>;
|
|
184
|
+
/** Get a list of detected active user agent privacy signals */
|
|
185
|
+
getPrivacySignals(): Set<UserPrivacySignal>;
|
|
186
|
+
/** airgap.js version number */
|
|
187
|
+
version: string;
|
|
188
|
+
/** override the event listener signature for consent change events */
|
|
189
|
+
addEventListener: (type: AirgapConsentEventType, callback: ((evt: ConsentChangeEventPayload) => void) | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
|
190
|
+
}> & EventTarget;
|
|
191
|
+
/**
|
|
192
|
+
* Airgap event types that send the ConsentChangeEventDetails object with them
|
|
193
|
+
*/
|
|
194
|
+
export declare type AirgapConsentEventType = 'consent-change' | 'sync' | 'consent-resolution';
|
|
195
|
+
/**
|
|
196
|
+
* airgap.js event type
|
|
197
|
+
*/
|
|
198
|
+
export declare type AirgapEventType = AirgapConsentEventType | 'purpose-map-load';
|
|
199
|
+
export interface ConsentChangeEventPayload {
|
|
200
|
+
/** consent change event details */
|
|
201
|
+
detail: ConsentChangeEventDetails;
|
|
202
|
+
}
|
|
203
|
+
/** 'consent-change' custom event details */
|
|
204
|
+
export declare type ConsentChangeEventDetails = {
|
|
205
|
+
/** The old tracking consent */
|
|
206
|
+
oldConsent: TrackingConsentDetails | null;
|
|
207
|
+
/** The new tracking consent */
|
|
208
|
+
consent: TrackingConsentDetails | null;
|
|
209
|
+
/** The tracking consent diff (what's changed in the new consent) */
|
|
210
|
+
changes: Record<string, boolean> | null;
|
|
211
|
+
/** Applicable privacy signals contributing to this consent change event */
|
|
212
|
+
signals?: Set<UserPrivacySignal> | null;
|
|
213
|
+
};
|
|
214
|
+
/** Removable process (can remove watchers, overrides, and protections) */
|
|
215
|
+
export declare type Removable = {
|
|
216
|
+
/** Remove/revoke process */
|
|
217
|
+
remove(): void;
|
|
218
|
+
};
|
|
219
|
+
/** Any value which implements `toString()` */
|
|
220
|
+
export declare type Stringifiable = string | (string & {
|
|
221
|
+
toString(): string;
|
|
222
|
+
});
|
|
223
|
+
/** Special `defaultConsent` automatic opt-out value for any potential reason */
|
|
224
|
+
export declare const AutoOptOut: t.LiteralC<"Auto">;
|
|
225
|
+
/** Type override */
|
|
226
|
+
export declare type AutoOptOut = t.TypeOf<typeof AutoOptOut>;
|
|
227
|
+
/** Special `defaultConsent` automatic opt-out value for GDPR-protected users */
|
|
228
|
+
export declare const AutoOptOutForGDPR: t.LiteralC<"AutoGDPR">;
|
|
229
|
+
/** Type override */
|
|
230
|
+
export declare type AutoOptOutForGDPR = t.TypeOf<typeof AutoOptOutForGDPR>;
|
|
231
|
+
/**
|
|
232
|
+
* Special `defaultConsent` automatic opt-out value for users with DNT enabled.
|
|
233
|
+
* Note that DNT is enabled by default for some browsers.
|
|
234
|
+
*/
|
|
235
|
+
export declare const AutoOptOutForDNT: t.LiteralC<"AutoDNT">;
|
|
236
|
+
/** Type override */
|
|
237
|
+
export declare type AutoOptOutForDNT = t.TypeOf<typeof AutoOptOutForDNT>;
|
|
238
|
+
/**
|
|
239
|
+
* Special `defaultConsent` automatic opt-out value for users with GPC enabled.
|
|
240
|
+
*/
|
|
241
|
+
export declare const AutoOptOutForGPC: t.LiteralC<"AutoGPC">;
|
|
242
|
+
/** Type override */
|
|
243
|
+
export declare type AutoOptOutForGPC = t.TypeOf<typeof AutoOptOutForGPC>;
|
|
244
|
+
/** Potential values for `defaultConsent` config token list */
|
|
245
|
+
export declare const DefaultConsentConfigValue: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
|
|
246
|
+
on: null;
|
|
247
|
+
off: null;
|
|
248
|
+
}>]>;
|
|
249
|
+
/** Type override */
|
|
250
|
+
export declare type DefaultConsentConfigValue = t.TypeOf<typeof DefaultConsentConfigValue>;
|
|
251
|
+
/** User-configurable user agent privacy signal */
|
|
252
|
+
export declare const UserPrivacySignal: t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>;
|
|
253
|
+
/** type overload */
|
|
254
|
+
export declare type UserPrivacySignal = t.TypeOf<typeof UserPrivacySignal>;
|
|
255
|
+
/** Tracking purpose metadata */
|
|
256
|
+
export declare const TrackingPurposeDetails: t.IntersectionC<[t.TypeC<{
|
|
257
|
+
/** Tracking purpose name */
|
|
258
|
+
name: t.StringC;
|
|
259
|
+
/** Tracking purpose description (used in Consent Manager UI) */
|
|
260
|
+
description: t.StringC;
|
|
261
|
+
/** Tracking purpose default consent (default: false) */
|
|
262
|
+
defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
|
|
263
|
+
on: null;
|
|
264
|
+
off: null;
|
|
265
|
+
}>]>;
|
|
266
|
+
/**
|
|
267
|
+
* Is this a first-order tracking purpose? If false, this is a
|
|
268
|
+
* second-order tracking purpose that should only be used for
|
|
269
|
+
* request overrides.
|
|
270
|
+
*
|
|
271
|
+
* This parameter previously meant:
|
|
272
|
+
* Show tracking purpose in consent manager UI.
|
|
273
|
+
*
|
|
274
|
+
* Default value: true
|
|
275
|
+
*/
|
|
276
|
+
showInConsentManager: t.BooleanC;
|
|
277
|
+
/** Allow user to configure their consent for this purpose (default: true) */
|
|
278
|
+
configurable: t.BooleanC;
|
|
279
|
+
/** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
|
|
280
|
+
essential: t.BooleanC;
|
|
281
|
+
}>, t.PartialC<{
|
|
282
|
+
/** Tracking type */
|
|
283
|
+
trackingType: t.StringC;
|
|
284
|
+
/** Respected opt-out privacy signals */
|
|
285
|
+
optOutSignals: t.ArrayC<t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>>;
|
|
286
|
+
}>]>;
|
|
287
|
+
/** Type override */
|
|
288
|
+
export declare type TrackingPurposeDetails = t.TypeOf<typeof TrackingPurposeDetails>;
|
|
289
|
+
/** Tracking purposes types configuration */
|
|
290
|
+
export declare const TrackingPurposesTypes: t.RecordC<t.StringC, t.IntersectionC<[t.TypeC<{
|
|
291
|
+
/** Tracking purpose name */
|
|
292
|
+
name: t.StringC;
|
|
293
|
+
/** Tracking purpose description (used in Consent Manager UI) */
|
|
294
|
+
description: t.StringC;
|
|
295
|
+
/** Tracking purpose default consent (default: false) */
|
|
296
|
+
defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
|
|
297
|
+
on: null;
|
|
298
|
+
off: null;
|
|
299
|
+
}>]>;
|
|
300
|
+
/**
|
|
301
|
+
* Is this a first-order tracking purpose? If false, this is a
|
|
302
|
+
* second-order tracking purpose that should only be used for
|
|
303
|
+
* request overrides.
|
|
304
|
+
*
|
|
305
|
+
* This parameter previously meant:
|
|
306
|
+
* Show tracking purpose in consent manager UI.
|
|
307
|
+
*
|
|
308
|
+
* Default value: true
|
|
309
|
+
*/
|
|
310
|
+
showInConsentManager: t.BooleanC;
|
|
311
|
+
/** Allow user to configure their consent for this purpose (default: true) */
|
|
312
|
+
configurable: t.BooleanC;
|
|
313
|
+
/** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
|
|
314
|
+
essential: t.BooleanC;
|
|
315
|
+
}>, t.PartialC<{
|
|
316
|
+
/** Tracking type */
|
|
317
|
+
trackingType: t.StringC;
|
|
318
|
+
/** Respected opt-out privacy signals */
|
|
319
|
+
optOutSignals: t.ArrayC<t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>>;
|
|
320
|
+
}>]>>;
|
|
321
|
+
/** Type override */
|
|
322
|
+
export declare type TrackingPurposesTypes = t.TypeOf<typeof TrackingPurposesTypes>;
|
|
323
|
+
/** Fully-resolved `defaultConsent` config */
|
|
324
|
+
export 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<{
|
|
325
|
+
on: null;
|
|
326
|
+
off: null;
|
|
327
|
+
}>]>>;
|
|
328
|
+
/** Type override */
|
|
329
|
+
export declare type DefaultConsentConfig = t.TypeOf<typeof DefaultConsentConfig>;
|
|
330
|
+
/** Tracking purposes configuration */
|
|
331
|
+
export declare const TrackingPurposesConfig: t.IntersectionC<[t.TypeC<{
|
|
332
|
+
/** Inherit default tracking purposes config */
|
|
333
|
+
useDefault: t.BooleanC;
|
|
334
|
+
types: t.RecordC<t.StringC, t.IntersectionC<[t.TypeC<{
|
|
335
|
+
/** Tracking purpose name */
|
|
336
|
+
name: t.StringC;
|
|
337
|
+
/** Tracking purpose description (used in Consent Manager UI) */
|
|
338
|
+
description: t.StringC;
|
|
339
|
+
/** Tracking purpose default consent (default: false) */
|
|
340
|
+
defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
|
|
341
|
+
on: null;
|
|
342
|
+
off: null;
|
|
343
|
+
}>]>;
|
|
344
|
+
/**
|
|
345
|
+
* Is this a first-order tracking purpose? If false, this is a
|
|
346
|
+
* second-order tracking purpose that should only be used for
|
|
347
|
+
* request overrides.
|
|
348
|
+
*
|
|
349
|
+
* This parameter previously meant:
|
|
350
|
+
* Show tracking purpose in consent manager UI.
|
|
351
|
+
*
|
|
352
|
+
* Default value: true
|
|
353
|
+
*/
|
|
354
|
+
showInConsentManager: t.BooleanC;
|
|
355
|
+
/** Allow user to configure their consent for this purpose (default: true) */
|
|
356
|
+
configurable: t.BooleanC;
|
|
357
|
+
/** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
|
|
358
|
+
essential: t.BooleanC;
|
|
359
|
+
}>, t.PartialC<{
|
|
360
|
+
/** Tracking type */
|
|
361
|
+
trackingType: t.StringC;
|
|
362
|
+
/** Respected opt-out privacy signals */
|
|
363
|
+
optOutSignals: t.ArrayC<t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>>;
|
|
364
|
+
}>]>>;
|
|
365
|
+
}>, t.PartialC<{
|
|
366
|
+
defaultConsent: t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
|
|
367
|
+
on: null;
|
|
368
|
+
off: null;
|
|
369
|
+
}>]>, t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
|
|
370
|
+
on: null;
|
|
371
|
+
off: null;
|
|
372
|
+
}>]>>]>;
|
|
373
|
+
}>]>;
|
|
374
|
+
/** Type override */
|
|
375
|
+
export declare type TrackingPurposesConfig = {
|
|
376
|
+
/** Inherit default tracking purposes config (Functional, Advertising, Analytics) */
|
|
377
|
+
useDefault: boolean;
|
|
378
|
+
/** Tracking purpose types */
|
|
379
|
+
types: TrackingPurposesTypes;
|
|
380
|
+
/** Default consent states (takes precedence over `TrackingPurposesTypes[purpose].defaultConsent`) */
|
|
381
|
+
defaultConsent?: DefaultConsentConfigValue | DefaultConsentConfig;
|
|
382
|
+
};
|
|
383
|
+
export declare const TrackingConsent: t.IntersectionC<[t.PartialC<{
|
|
384
|
+
Essential: t.LiteralC<true>;
|
|
385
|
+
Unknown: t.LiteralC<false>;
|
|
386
|
+
}>, t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.UndefinedC]>>]>;
|
|
387
|
+
/**
|
|
388
|
+
* Type override
|
|
389
|
+
*/
|
|
390
|
+
export declare type TrackingConsent = t.TypeOf<typeof TrackingConsent>;
|
|
391
|
+
export declare const TrackingConsentWithNulls: t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.UndefinedC, t.NullC]>>;
|
|
392
|
+
/** Type override */
|
|
393
|
+
export declare type TrackingConsentWithNulls = t.TypeOf<typeof TrackingConsent>;
|
|
394
|
+
declare const CoreTrackingConsentDetails: t.IntersectionC<[t.TypeC<{
|
|
395
|
+
/**
|
|
396
|
+
* Was tracking consent confirmed by the user?
|
|
397
|
+
* If this is false, the consent was resolved from defaults & is not yet confirmed
|
|
398
|
+
*/
|
|
399
|
+
confirmed: t.BooleanC;
|
|
400
|
+
/** Consent resolution/last-modified timestamp (ISO 8601) */
|
|
401
|
+
timestamp: t.StringC;
|
|
402
|
+
}>, t.PartialC<{
|
|
403
|
+
/** Has the consent been updated (including no-change confirmation) since default resolution */
|
|
404
|
+
updated: t.BooleanC;
|
|
405
|
+
/** Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js) */
|
|
406
|
+
prompted: t.BooleanC;
|
|
407
|
+
/** Arbitrary metadata that customers want to be associated with consent state */
|
|
408
|
+
metadata: t.IntersectionC<[t.PartialC<{
|
|
409
|
+
tcmp: t.PartialC<{
|
|
410
|
+
tcf: t.PartialC<{
|
|
411
|
+
tcString: t.StringC;
|
|
412
|
+
}>;
|
|
413
|
+
}>;
|
|
414
|
+
}>, t.UnknownRecordC]>;
|
|
415
|
+
/** When the metadata was last updated */
|
|
416
|
+
metadataTimestamp: t.StringC;
|
|
417
|
+
}>]>;
|
|
418
|
+
/** Type override */
|
|
419
|
+
export declare type CoreTrackingConsentDetails = t.TypeOf<typeof CoreTrackingConsentDetails>;
|
|
420
|
+
export declare const TrackingConsentDetails: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
|
421
|
+
/**
|
|
422
|
+
* Was tracking consent confirmed by the user?
|
|
423
|
+
* If this is false, the consent was resolved from defaults & is not yet confirmed
|
|
424
|
+
*/
|
|
425
|
+
confirmed: t.BooleanC;
|
|
426
|
+
/** Consent resolution/last-modified timestamp (ISO 8601) */
|
|
427
|
+
timestamp: t.StringC;
|
|
428
|
+
}>, t.PartialC<{
|
|
429
|
+
/** Has the consent been updated (including no-change confirmation) since default resolution */
|
|
430
|
+
updated: t.BooleanC;
|
|
431
|
+
/** Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js) */
|
|
432
|
+
prompted: t.BooleanC;
|
|
433
|
+
/** Arbitrary metadata that customers want to be associated with consent state */
|
|
434
|
+
metadata: t.IntersectionC<[t.PartialC<{
|
|
435
|
+
tcmp: t.PartialC<{
|
|
436
|
+
tcf: t.PartialC<{
|
|
437
|
+
tcString: t.StringC;
|
|
438
|
+
}>;
|
|
439
|
+
}>;
|
|
440
|
+
}>, t.UnknownRecordC]>;
|
|
441
|
+
/** When the metadata was last updated */
|
|
442
|
+
metadataTimestamp: t.StringC;
|
|
443
|
+
}>]>, t.TypeC<{
|
|
444
|
+
/** Tracking consent config */
|
|
445
|
+
purposes: t.IntersectionC<[t.PartialC<{
|
|
446
|
+
Essential: t.LiteralC<true>;
|
|
447
|
+
Unknown: t.LiteralC<false>;
|
|
448
|
+
}>, t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.UndefinedC]>>]>;
|
|
449
|
+
}>]>;
|
|
450
|
+
/** Override types. */
|
|
451
|
+
export declare type TrackingConsentDetails = t.TypeOf<typeof TrackingConsentDetails>;
|
|
452
|
+
export declare const TrackingConsentOptionalData: t.PartialC<{
|
|
453
|
+
/** Transparency Consent (TCF) String */
|
|
454
|
+
tcf: t.StringC;
|
|
455
|
+
/** US Privacy (USP) String */
|
|
456
|
+
usp: t.StringC;
|
|
457
|
+
/** Global Privacy Platform (GPP) String */
|
|
458
|
+
gpp: t.StringC;
|
|
459
|
+
/** Consent Manager View State */
|
|
460
|
+
viewState: t.KeyofC<{
|
|
461
|
+
TCF_EU: unknown;
|
|
462
|
+
QuickOptions: unknown;
|
|
463
|
+
QuickOptions3: unknown;
|
|
464
|
+
AcceptAll: unknown;
|
|
465
|
+
AcceptAllRejectAllToggle: unknown;
|
|
466
|
+
AcceptAllOrMoreChoices: unknown;
|
|
467
|
+
AcceptOrRejectAll: unknown;
|
|
468
|
+
AcceptOrRejectAllOrMoreChoices: unknown;
|
|
469
|
+
AcceptOrRejectAnalytics: unknown;
|
|
470
|
+
AcceptOrRejectAdvertising: unknown;
|
|
471
|
+
NoticeAndDoNotSell: unknown;
|
|
472
|
+
DoNotSellExplainer: unknown;
|
|
473
|
+
CompleteOptionsToggles: unknown;
|
|
474
|
+
PrivacyPolicyNotice: unknown;
|
|
475
|
+
CompleteOptions: unknown;
|
|
476
|
+
CompleteOptionsInverted: unknown;
|
|
477
|
+
Hidden: unknown;
|
|
478
|
+
DoNotSellDisclosure: unknown;
|
|
479
|
+
OptOutDisclosure: unknown;
|
|
480
|
+
LanguageOptions: unknown;
|
|
481
|
+
Collapsed: unknown;
|
|
482
|
+
Closed: unknown;
|
|
483
|
+
}>;
|
|
484
|
+
/** Airgap Version */
|
|
485
|
+
airgapVersion: t.StringC;
|
|
486
|
+
}>;
|
|
487
|
+
export declare const FullTrackingConsentDetails: t.IntersectionC<[t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
|
488
|
+
/**
|
|
489
|
+
* Was tracking consent confirmed by the user?
|
|
490
|
+
* If this is false, the consent was resolved from defaults & is not yet confirmed
|
|
491
|
+
*/
|
|
492
|
+
confirmed: t.BooleanC;
|
|
493
|
+
/** Consent resolution/last-modified timestamp (ISO 8601) */
|
|
494
|
+
timestamp: t.StringC;
|
|
495
|
+
}>, t.PartialC<{
|
|
496
|
+
/** Has the consent been updated (including no-change confirmation) since default resolution */
|
|
497
|
+
updated: t.BooleanC;
|
|
498
|
+
/** Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js) */
|
|
499
|
+
prompted: t.BooleanC;
|
|
500
|
+
/** Arbitrary metadata that customers want to be associated with consent state */
|
|
501
|
+
metadata: t.IntersectionC<[t.PartialC<{
|
|
502
|
+
tcmp: t.PartialC<{
|
|
503
|
+
tcf: t.PartialC<{
|
|
504
|
+
tcString: t.StringC;
|
|
505
|
+
}>;
|
|
506
|
+
}>;
|
|
507
|
+
}>, t.UnknownRecordC]>;
|
|
508
|
+
/** When the metadata was last updated */
|
|
509
|
+
metadataTimestamp: t.StringC;
|
|
510
|
+
}>]>, t.TypeC<{
|
|
511
|
+
/** Tracking consent config */
|
|
512
|
+
purposes: t.IntersectionC<[t.PartialC<{
|
|
513
|
+
Essential: t.LiteralC<true>;
|
|
514
|
+
Unknown: t.LiteralC<false>;
|
|
515
|
+
}>, t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.UndefinedC]>>]>;
|
|
516
|
+
}>]>, t.PartialC<{
|
|
517
|
+
/** Transparency Consent (TCF) String */
|
|
518
|
+
tcf: t.StringC;
|
|
519
|
+
/** US Privacy (USP) String */
|
|
520
|
+
usp: t.StringC;
|
|
521
|
+
/** Global Privacy Platform (GPP) String */
|
|
522
|
+
gpp: t.StringC;
|
|
523
|
+
/** Consent Manager View State */
|
|
524
|
+
viewState: t.KeyofC<{
|
|
525
|
+
TCF_EU: unknown;
|
|
526
|
+
QuickOptions: unknown;
|
|
527
|
+
QuickOptions3: unknown;
|
|
528
|
+
AcceptAll: unknown;
|
|
529
|
+
AcceptAllRejectAllToggle: unknown;
|
|
530
|
+
AcceptAllOrMoreChoices: unknown;
|
|
531
|
+
AcceptOrRejectAll: unknown;
|
|
532
|
+
AcceptOrRejectAllOrMoreChoices: unknown;
|
|
533
|
+
AcceptOrRejectAnalytics: unknown;
|
|
534
|
+
AcceptOrRejectAdvertising: unknown;
|
|
535
|
+
NoticeAndDoNotSell: unknown;
|
|
536
|
+
DoNotSellExplainer: unknown;
|
|
537
|
+
CompleteOptionsToggles: unknown;
|
|
538
|
+
PrivacyPolicyNotice: unknown;
|
|
539
|
+
CompleteOptions: unknown;
|
|
540
|
+
CompleteOptionsInverted: unknown;
|
|
541
|
+
Hidden: unknown;
|
|
542
|
+
DoNotSellDisclosure: unknown;
|
|
543
|
+
OptOutDisclosure: unknown;
|
|
544
|
+
LanguageOptions: unknown;
|
|
545
|
+
Collapsed: unknown;
|
|
546
|
+
Closed: unknown;
|
|
547
|
+
}>;
|
|
548
|
+
/** Airgap Version */
|
|
549
|
+
airgapVersion: t.StringC;
|
|
550
|
+
}>]>;
|
|
551
|
+
/** Override types. */
|
|
552
|
+
export declare type FullTrackingConsentDetails = t.TypeOf<typeof FullTrackingConsentDetails>;
|
|
553
|
+
export declare const FullTrackingConsentDetailsWithNulls: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
|
554
|
+
/**
|
|
555
|
+
* Was tracking consent confirmed by the user?
|
|
556
|
+
* If this is false, the consent was resolved from defaults & is not yet confirmed
|
|
557
|
+
*/
|
|
558
|
+
confirmed: t.BooleanC;
|
|
559
|
+
/** Consent resolution/last-modified timestamp (ISO 8601) */
|
|
560
|
+
timestamp: t.StringC;
|
|
561
|
+
}>, t.PartialC<{
|
|
562
|
+
/** Has the consent been updated (including no-change confirmation) since default resolution */
|
|
563
|
+
updated: t.BooleanC;
|
|
564
|
+
/** Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js) */
|
|
565
|
+
prompted: t.BooleanC;
|
|
566
|
+
/** Arbitrary metadata that customers want to be associated with consent state */
|
|
567
|
+
metadata: t.IntersectionC<[t.PartialC<{
|
|
568
|
+
tcmp: t.PartialC<{
|
|
569
|
+
tcf: t.PartialC<{
|
|
570
|
+
tcString: t.StringC;
|
|
571
|
+
}>;
|
|
572
|
+
}>;
|
|
573
|
+
}>, t.UnknownRecordC]>;
|
|
574
|
+
/** When the metadata was last updated */
|
|
575
|
+
metadataTimestamp: t.StringC;
|
|
576
|
+
}>]>, t.PartialC<{
|
|
577
|
+
/** Transparency Consent (TCF) String */
|
|
578
|
+
tcf: t.StringC;
|
|
579
|
+
/** US Privacy (USP) String */
|
|
580
|
+
usp: t.StringC;
|
|
581
|
+
/** Global Privacy Platform (GPP) String */
|
|
582
|
+
gpp: t.StringC;
|
|
583
|
+
/** Consent Manager View State */
|
|
584
|
+
viewState: t.KeyofC<{
|
|
585
|
+
TCF_EU: unknown;
|
|
586
|
+
QuickOptions: unknown;
|
|
587
|
+
QuickOptions3: unknown;
|
|
588
|
+
AcceptAll: unknown;
|
|
589
|
+
AcceptAllRejectAllToggle: unknown;
|
|
590
|
+
AcceptAllOrMoreChoices: unknown;
|
|
591
|
+
AcceptOrRejectAll: unknown;
|
|
592
|
+
AcceptOrRejectAllOrMoreChoices: unknown;
|
|
593
|
+
AcceptOrRejectAnalytics: unknown;
|
|
594
|
+
AcceptOrRejectAdvertising: unknown;
|
|
595
|
+
NoticeAndDoNotSell: unknown;
|
|
596
|
+
DoNotSellExplainer: unknown;
|
|
597
|
+
CompleteOptionsToggles: unknown;
|
|
598
|
+
PrivacyPolicyNotice: unknown;
|
|
599
|
+
CompleteOptions: unknown;
|
|
600
|
+
CompleteOptionsInverted: unknown;
|
|
601
|
+
Hidden: unknown;
|
|
602
|
+
DoNotSellDisclosure: unknown;
|
|
603
|
+
OptOutDisclosure: unknown;
|
|
604
|
+
LanguageOptions: unknown;
|
|
605
|
+
Collapsed: unknown;
|
|
606
|
+
Closed: unknown;
|
|
607
|
+
}>;
|
|
608
|
+
/** Airgap Version */
|
|
609
|
+
airgapVersion: t.StringC;
|
|
610
|
+
}>, t.TypeC<{
|
|
611
|
+
/** Tracking consent config */
|
|
612
|
+
purposes: t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.UndefinedC, t.NullC]>>;
|
|
613
|
+
}>]>;
|
|
614
|
+
/** Override types. */
|
|
615
|
+
export declare type FullTrackingConsentDetailsWithNulls = t.TypeOf<typeof FullTrackingConsentDetailsWithNulls>;
|
|
616
|
+
export declare const ConsentPreferencesBody: t.TypeC<{
|
|
617
|
+
/** token containing encrypted identifier */
|
|
618
|
+
token: t.StringC;
|
|
619
|
+
/** consent partition (defaults to bundle id) */
|
|
620
|
+
partition: t.StringC;
|
|
621
|
+
/** user consent */
|
|
622
|
+
consent: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
|
623
|
+
/**
|
|
624
|
+
* Was tracking consent confirmed by the user?
|
|
625
|
+
* If this is false, the consent was resolved from defaults & is not yet confirmed
|
|
626
|
+
*/
|
|
627
|
+
confirmed: t.BooleanC;
|
|
628
|
+
/** Consent resolution/last-modified timestamp (ISO 8601) */
|
|
629
|
+
timestamp: t.StringC;
|
|
630
|
+
}>, t.PartialC<{
|
|
631
|
+
/** Has the consent been updated (including no-change confirmation) since default resolution */
|
|
632
|
+
updated: t.BooleanC;
|
|
633
|
+
/** Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js) */
|
|
634
|
+
prompted: t.BooleanC;
|
|
635
|
+
/** Arbitrary metadata that customers want to be associated with consent state */
|
|
636
|
+
metadata: t.IntersectionC<[t.PartialC<{
|
|
637
|
+
tcmp: t.PartialC<{
|
|
638
|
+
tcf: t.PartialC<{
|
|
639
|
+
tcString: t.StringC;
|
|
640
|
+
}>;
|
|
641
|
+
}>;
|
|
642
|
+
}>, t.UnknownRecordC]>;
|
|
643
|
+
/** When the metadata was last updated */
|
|
644
|
+
metadataTimestamp: t.StringC;
|
|
645
|
+
}>]>, t.TypeC<{
|
|
646
|
+
/** Tracking consent config */
|
|
647
|
+
purposes: t.IntersectionC<[t.PartialC<{
|
|
648
|
+
Essential: t.LiteralC<true>;
|
|
649
|
+
Unknown: t.LiteralC<false>;
|
|
650
|
+
}>, t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.UndefinedC]>>]>;
|
|
651
|
+
}>]>;
|
|
652
|
+
}>;
|
|
653
|
+
/** Override types. */
|
|
654
|
+
export declare type ConsentPreferencesBody = t.TypeOf<typeof ConsentPreferencesBody>;
|
|
655
|
+
export declare const ConsentTokenPayload: t.IntersectionC<[t.TypeC<{
|
|
656
|
+
encryptedIdentifier: t.StringC;
|
|
657
|
+
}>, t.PartialC<{
|
|
658
|
+
deprecatedEncryptedIdentifiers: t.ArrayC<t.StringC>;
|
|
659
|
+
}>]>;
|
|
660
|
+
/** Type override */
|
|
661
|
+
export declare type ConsentTokenPayload = t.TypeOf<typeof ConsentTokenPayload>;
|
|
662
|
+
/** Tracking purpose */
|
|
663
|
+
export declare const TrackingPurpose: t.UnionC<[t.KeyofC<{
|
|
664
|
+
Unknown: "Unknown";
|
|
665
|
+
Essential: "Essential";
|
|
666
|
+
}>, t.StringC]>;
|
|
667
|
+
/** Type override */
|
|
668
|
+
export declare type TrackingPurpose = t.TypeOf<typeof TrackingPurpose>;
|
|
669
|
+
/** Tracking purposes */
|
|
670
|
+
export declare type TrackingPurposes = Set<TrackingPurpose>;
|
|
671
|
+
/** Tracking consent change diffs */
|
|
672
|
+
export declare const ConsentChange: t.RecordC<t.UnionC<[t.KeyofC<{
|
|
673
|
+
Unknown: "Unknown";
|
|
674
|
+
Essential: "Essential";
|
|
675
|
+
}>, t.StringC]>, t.BooleanC>;
|
|
676
|
+
/** type overload */
|
|
677
|
+
export declare type ConsentChange = t.TypeOf<typeof ConsentChange>;
|
|
678
|
+
/** Regime purpose scopes configuration */
|
|
679
|
+
export declare const RegimePurposeScopesConfig: t.ArrayC<t.BrandC<t.ArrayC<t.ArrayC<t.StringC>>, import("@transcend-io/type-utils").FixedLengthArrayBrand<t.ArrayC<t.StringC>>>>;
|
|
680
|
+
/** Type override */
|
|
681
|
+
export declare type RegimePurposeScopesConfig = [
|
|
682
|
+
/** Regimes */
|
|
683
|
+
regimes: string[],
|
|
684
|
+
/** In-scope purposes */
|
|
685
|
+
purposes: TrackingPurpose[]
|
|
686
|
+
][];
|
|
687
|
+
export {};
|
|
688
|
+
//# sourceMappingURL=core.d.ts.map
|