@transcend-io/airgap.js-types 6.5.0 → 6.8.2

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 (45) hide show
  1. package/.yarn/sdks/eslint/package.json +6 -0
  2. package/.yarn/sdks/prettier/package.json +6 -0
  3. package/.yarn/sdks/typescript/package.json +6 -0
  4. package/LICENSE +21 -0
  5. package/build/core.d.ts +375 -0
  6. package/build/core.d.ts.map +1 -0
  7. package/build/core.js +133 -0
  8. package/build/core.js.map +1 -0
  9. package/{src/enums/index.ts → build/enums/index.d.ts} +1 -0
  10. package/build/enums/index.d.ts.map +1 -0
  11. package/build/enums/index.js +16 -0
  12. package/build/enums/index.js.map +1 -0
  13. package/build/enums/privacyRegime.d.ts +16 -0
  14. package/build/enums/privacyRegime.d.ts.map +1 -0
  15. package/build/enums/privacyRegime.js +20 -0
  16. package/build/enums/privacyRegime.js.map +1 -0
  17. package/build/enums/purpose.d.ts +60 -0
  18. package/build/enums/purpose.d.ts.map +1 -0
  19. package/build/enums/purpose.js +47 -0
  20. package/build/enums/purpose.js.map +1 -0
  21. package/build/enums/viewState.d.ts +53 -0
  22. package/build/enums/viewState.d.ts.map +1 -0
  23. package/build/enums/viewState.js +45 -0
  24. package/build/enums/viewState.js.map +1 -0
  25. package/build/index.d.ts +4 -0
  26. package/build/index.d.ts.map +1 -0
  27. package/build/index.js +16 -0
  28. package/build/index.js.map +1 -0
  29. package/build/tsbuildinfo +1 -0
  30. package/build/ui.d.ts +109 -0
  31. package/build/ui.d.ts.map +1 -0
  32. package/build/ui.js +63 -0
  33. package/build/ui.js.map +1 -0
  34. package/package.json +35 -11
  35. package/.depcheckrc +0 -1
  36. package/.github/PULL_REQUEST_TEMPLATE.md +0 -34
  37. package/.vscode/settings.json +0 -6
  38. package/src/core.ts +0 -351
  39. package/src/enums/privacyRegime.ts +0 -15
  40. package/src/enums/purpose.ts +0 -62
  41. package/src/enums/viewState.ts +0 -67
  42. package/src/index.ts +0 -1
  43. package/src/type-utils.ts +0 -110
  44. package/src/ui.ts +0 -92
  45. package/tsconfig.json +0 -40
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "eslint",
3
+ "version": "8.0.1-sdk",
4
+ "main": "./lib/api.js",
5
+ "type": "commonjs"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "prettier",
3
+ "version": "2.4.1-sdk",
4
+ "main": "./index.js",
5
+ "type": "commonjs"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "typescript",
3
+ "version": "4.4.4-sdk",
4
+ "main": "./lib/typescript.js",
5
+ "type": "commonjs"
6
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Transcend
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,375 @@
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
+ /** Potentially applicable data privacy legal regimes */
95
+ export declare const PrivacyRegime: t.KeyofC<{
96
+ Unknown: unknown;
97
+ CPRA: unknown;
98
+ GDPR: unknown;
99
+ LGPD: unknown;
100
+ CDPA: unknown;
101
+ CPA: unknown;
102
+ }>;
103
+ /** type overload */
104
+ export declare type PrivacyRegime = t.TypeOf<typeof PrivacyRegime>;
105
+ /** airgap.js API */
106
+ export declare type AirgapAPI = Readonly<{
107
+ /** Airgap ready event subscriber */
108
+ ready(callback: (airgap: AirgapAPI) => void): void;
109
+ /** Queue of callbacks to dispatch once airgap is ready */
110
+ readyQueue?: ((airgap: AirgapAPI) => void)[];
111
+ /** Enqueue cross-domain data sync across all airgap bundle domains */
112
+ sync(): Promise<void>;
113
+ /** Resolve airgap request overrides for a URL */
114
+ resolve(url: Stringifiable): string;
115
+ /** Get tracking consent */
116
+ getConsent(): TrackingConsentDetails;
117
+ /** Set tracking consent */
118
+ setConsent(
119
+ /** Airgap auth proof */
120
+ auth: AirgapAuth,
121
+ /** The tracking consent options. */
122
+ consent: TrackingConsent): boolean;
123
+ /** Consents the user to all tracking purposes (requires recent UI interaction) */
124
+ optIn(
125
+ /** Airgap auth proof */
126
+ auth: AirgapAuth): boolean;
127
+ /** Revokes consent for all tracking purposes (requires recent UI interaction) */
128
+ optOut(
129
+ /** Airgap auth proof */
130
+ auth: AirgapAuth): boolean;
131
+ /** Returns true if the user is fully-opted in to all first-order tracking purposes */
132
+ isOptedIn(): boolean;
133
+ /** Returns true if the user is fully-opted out to all first-order tracking purposes */
134
+ isOptedOut(): boolean;
135
+ /** Get initialized tracking purposes config */
136
+ getPurposeTypes(): TrackingPurposesTypes;
137
+ /** Clear airgap queue & caches. Returns `true` on success. */
138
+ clear(auth: AirgapAuth): boolean;
139
+ /** Reset airgap queue and consent. Returns `true` on success. */
140
+ reset(
141
+ /** An airgap auth proof */
142
+ auth: AirgapAuth,
143
+ /** Automatically reload the page if needed to remove CSP. */
144
+ autoReload?: boolean): boolean;
145
+ /** Get a list of legal regimes that are potentially applicable to the user */
146
+ getRegimes(): Promise<Set<PrivacyRegime>>;
147
+ /** Get a list of detected active user agent privacy signals */
148
+ getPrivacySignals(): Promise<Set<UserPrivacySignal>>;
149
+ /** airgap.js version number */
150
+ version: string;
151
+ }> & EventTarget;
152
+ /**
153
+ * airgap.js event type
154
+ */
155
+ export declare type AirgapEventType = 'consent-change' | 'purpose-map-load';
156
+ /** 'consent-change' custom event details */
157
+ export declare type ConsentChangeEventDetails = {
158
+ /** The old tracking consent */
159
+ oldConsent: TrackingConsentDetails;
160
+ /** The new tracking consent */
161
+ consent: TrackingConsentDetails;
162
+ /** The tracking consent diff (what's changed in the new consent) */
163
+ changes: ConsentChange | null;
164
+ };
165
+ /** Removable process (can remove watchers, overrides, and protections) */
166
+ export declare type Removable = {
167
+ /** Remove/revoke process */
168
+ remove(): void;
169
+ };
170
+ /** Any value which implements `toString()` */
171
+ export declare type Stringifiable = string | (string & {
172
+ toString(): string;
173
+ });
174
+ /** Special `defaultConsent` automatic opt-out value for any potential reason */
175
+ export declare const AutoOptOut: t.LiteralC<"Auto">;
176
+ /** Type override */
177
+ export declare type AutoOptOut = t.TypeOf<typeof AutoOptOut>;
178
+ /** Special `defaultConsent` automatic opt-out value for GDPR-protected users */
179
+ export declare const AutoOptOutForGDPR: t.LiteralC<"AutoGDPR">;
180
+ /** Type override */
181
+ export declare type AutoOptOutForGDPR = t.TypeOf<typeof AutoOptOutForGDPR>;
182
+ /**
183
+ * Special `defaultConsent` automatic opt-out value for users with DNT enabled.
184
+ * Note that DNT is enabled by default for some browsers.
185
+ */
186
+ export declare const AutoOptOutForDNT: t.LiteralC<"AutoDNT">;
187
+ /** Type override */
188
+ export declare type AutoOptOutForDNT = t.TypeOf<typeof AutoOptOutForDNT>;
189
+ /**
190
+ * Special `defaultConsent` automatic opt-out value for users with GPC enabled.
191
+ */
192
+ export declare const AutoOptOutForGPC: t.LiteralC<"AutoGPC">;
193
+ /** Type override */
194
+ export declare type AutoOptOutForGPC = t.TypeOf<typeof AutoOptOutForGPC>;
195
+ /** Potential values for `defaultConsent` config token list */
196
+ export declare const DefaultConsentConfigValue: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
197
+ on: null;
198
+ off: null;
199
+ }>]>;
200
+ /** Type override */
201
+ export declare type DefaultConsentConfigValue = t.TypeOf<typeof DefaultConsentConfigValue>;
202
+ /** Tracking purpose metadata */
203
+ export declare const TrackingPurposeDetails: t.IntersectionC<[t.TypeC<{
204
+ /** Tracking purpose name */
205
+ name: t.StringC;
206
+ /** Tracking purpose description (used in Consent Manager UI) */
207
+ description: t.StringC;
208
+ /** Tracking purpose default consent (default: false) */
209
+ defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
210
+ on: null;
211
+ off: null;
212
+ }>]>;
213
+ /**
214
+ * Is this a first-order tracking purpose? If false, this is a
215
+ * second-order tracking purpose that should only be used for
216
+ * request overrides.
217
+ *
218
+ * This parameter previously meant:
219
+ * Show tracking purpose in consent manager UI.
220
+ *
221
+ * Default value: true
222
+ */
223
+ showInConsentManager: t.BooleanC;
224
+ /** Allow user to configure their consent for this purpose (default: true) */
225
+ configurable: t.BooleanC;
226
+ /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
227
+ essential: t.BooleanC;
228
+ }>, t.PartialC<{
229
+ /** Tracking type */
230
+ trackingType: t.KeyofC<{
231
+ Advertising: unknown;
232
+ Analytics: unknown;
233
+ Functional: unknown;
234
+ SaleOfInfo: unknown;
235
+ }>;
236
+ }>]>;
237
+ /** Type override */
238
+ export declare type TrackingPurposeDetails = t.TypeOf<typeof TrackingPurposeDetails>;
239
+ /** Tracking purposes types configuration */
240
+ export declare const TrackingPurposesTypes: t.RecordC<t.StringC, t.IntersectionC<[t.TypeC<{
241
+ /** Tracking purpose name */
242
+ name: t.StringC;
243
+ /** Tracking purpose description (used in Consent Manager UI) */
244
+ description: t.StringC;
245
+ /** Tracking purpose default consent (default: false) */
246
+ defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
247
+ on: null;
248
+ off: null;
249
+ }>]>;
250
+ /**
251
+ * Is this a first-order tracking purpose? If false, this is a
252
+ * second-order tracking purpose that should only be used for
253
+ * request overrides.
254
+ *
255
+ * This parameter previously meant:
256
+ * Show tracking purpose in consent manager UI.
257
+ *
258
+ * Default value: true
259
+ */
260
+ showInConsentManager: t.BooleanC;
261
+ /** Allow user to configure their consent for this purpose (default: true) */
262
+ configurable: t.BooleanC;
263
+ /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
264
+ essential: t.BooleanC;
265
+ }>, t.PartialC<{
266
+ /** Tracking type */
267
+ trackingType: t.KeyofC<{
268
+ Advertising: unknown;
269
+ Analytics: unknown;
270
+ Functional: unknown;
271
+ SaleOfInfo: unknown;
272
+ }>;
273
+ }>]>>;
274
+ /** Type override */
275
+ export declare type TrackingPurposesTypes = t.TypeOf<typeof TrackingPurposesTypes>;
276
+ /** Fully-resolved `defaultConsent` config */
277
+ 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<{
278
+ on: null;
279
+ off: null;
280
+ }>]>>;
281
+ /** Type override */
282
+ export declare type DefaultConsentConfig = t.TypeOf<typeof DefaultConsentConfig>;
283
+ /** Tracking purposes configuration */
284
+ export declare const TrackingPurposesConfig: t.IntersectionC<[t.TypeC<{
285
+ /** Inherit default tracking purposes config */
286
+ useDefault: t.BooleanC;
287
+ types: t.RecordC<t.StringC, t.IntersectionC<[t.TypeC<{
288
+ /** Tracking purpose name */
289
+ name: t.StringC;
290
+ /** Tracking purpose description (used in Consent Manager UI) */
291
+ description: t.StringC;
292
+ /** Tracking purpose default consent (default: false) */
293
+ defaultConsent: t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
294
+ on: null;
295
+ off: null;
296
+ }>]>;
297
+ /**
298
+ * Is this a first-order tracking purpose? If false, this is a
299
+ * second-order tracking purpose that should only be used for
300
+ * request overrides.
301
+ *
302
+ * This parameter previously meant:
303
+ * Show tracking purpose in consent manager UI.
304
+ *
305
+ * Default value: true
306
+ */
307
+ showInConsentManager: t.BooleanC;
308
+ /** Allow user to configure their consent for this purpose (default: true) */
309
+ configurable: t.BooleanC;
310
+ /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
311
+ essential: t.BooleanC;
312
+ }>, t.PartialC<{
313
+ /** Tracking type */
314
+ trackingType: t.KeyofC<{
315
+ Advertising: unknown;
316
+ Analytics: unknown;
317
+ Functional: unknown;
318
+ SaleOfInfo: unknown;
319
+ }>;
320
+ }>]>>;
321
+ }>, t.PartialC<{
322
+ defaultConsent: t.UnionC<[t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
323
+ on: null;
324
+ off: null;
325
+ }>]>, t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.LiteralC<"Auto">, t.LiteralC<"AutoGDPR">, t.LiteralC<"AutoDNT">, t.LiteralC<"AutoGPC">, t.KeyofC<{
326
+ on: null;
327
+ off: null;
328
+ }>]>>]>;
329
+ }>]>;
330
+ /** Type override */
331
+ export declare type TrackingPurposesConfig = {
332
+ /** Inherit default tracking purposes config (Functional, Advertising, Analytics) */
333
+ useDefault: boolean;
334
+ /** Tracking purpose types */
335
+ types: TrackingPurposesTypes;
336
+ /** Default consent states (takes precedence over `TrackingPurposesTypes[purpose].defaultConsent`) */
337
+ defaultConsent?: DefaultConsentConfigValue | DefaultConsentConfig;
338
+ };
339
+ /** Tracking purpose consent config */
340
+ export declare type TrackingConsent = {
341
+ /** Consent to tracking for essential purposes */
342
+ Essential?: true;
343
+ /** Unknown (unable to be directly consented) */
344
+ Unknown?: false;
345
+ /** Custom tracking purpose */
346
+ [purpose: string]: boolean | undefined;
347
+ };
348
+ /** Tracking purpose consent config with timestamp & auth metadata */
349
+ export declare type TrackingConsentDetails = {
350
+ /** Tracking consent config */
351
+ purposes: TrackingConsent;
352
+ /** Consent last-modified timestamp (ISO 8601) */
353
+ timestamp: string;
354
+ };
355
+ /** Tracking purpose */
356
+ export declare const TrackingPurpose: t.UnionC<[t.KeyofC<{
357
+ Unknown: "Unknown";
358
+ Essential: "Essential";
359
+ }>, t.StringC]>;
360
+ /** Type override */
361
+ export declare type TrackingPurpose = t.TypeOf<typeof TrackingPurpose>;
362
+ /** Tracking purposes */
363
+ export declare type TrackingPurposes = Set<TrackingPurpose>;
364
+ /** User-configurable user agent privacy signal */
365
+ export declare const UserPrivacySignal: t.UnionC<[t.LiteralC<"GPC">, t.LiteralC<"DNT">]>;
366
+ /** type overload */
367
+ export declare type UserPrivacySignal = t.TypeOf<typeof UserPrivacySignal>;
368
+ /** Tracking consent change diffs */
369
+ export declare const ConsentChange: t.RecordC<t.UnionC<[t.KeyofC<{
370
+ Unknown: "Unknown";
371
+ Essential: "Essential";
372
+ }>, t.StringC]>, t.BooleanC>;
373
+ /** type overload */
374
+ export declare type ConsentChange = t.TypeOf<typeof ConsentChange>;
375
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAc3B,6BAA6B;AAC7B,oBAAY,OAAO,GAAG;IACpB,uBAAuB;IAEvB,OAAO,EAAE,GAAG,CAAC;IACb,sBAAsB;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,iCAAiC;AACjC,oBAAY,MAAM,GAAG,OAAO,GAAG;IAC7B,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC;AAEF,qCAAqC;AACrC,oBAAY,UAAU,GAAG,OAAO,CAAC;AAEjC,8BAA8B;AAC9B,eAAO,MAAM,mBAAmB;;;;;;;;;;EAW9B,CAAC;AAEH,oBAAoB;AACpB,oBAAY,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEvE,wBAAwB;AACxB,eAAO,MAAM,QAAQ;;;;;;;;;;yBAAqD,CAAC;AAC3E,oBAAoB;AACpB,oBAAY,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEjD,gCAAgC;AAChC,oBAAY,YAAY,GAAG,QAAQ,CAAC;AAEpC,4BAA4B;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jD,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,8BAA8B;IAC9B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,qEAAqE;AACrE,oBAAY,sBAAsB,GAAG;IACnC,8BAA8B;IAC9B,QAAQ,EAAE,eAAe,CAAC;IAC1B,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,uBAAuB;AACvB,eAAO,MAAM,eAAe;;;eAG1B,CAAC;AAEH,oBAAoB;AACpB,oBAAY,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D,wBAAwB;AACxB,oBAAY,gBAAgB,GAAG,GAAG,CAAC,eAAe,CAAC,CAAC;AAEpD,kDAAkD;AAClD,eAAO,MAAM,iBAAiB,kDAK5B,CAAC;AAEH,oBAAoB;AACpB,oBAAY,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEnE,oCAAoC;AACpC,eAAO,MAAM,aAAa;;;4BAAuC,CAAC;AAElE,oBAAoB;AACpB,oBAAY,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC"}
package/build/core.js ADDED
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.ConsentChange = exports.UserPrivacySignal = exports.TrackingPurpose = exports.TrackingPurposesConfig = exports.DefaultConsentConfig = exports.TrackingPurposesTypes = exports.TrackingPurposeDetails = exports.DefaultConsentConfigValue = exports.AutoOptOutForGPC = exports.AutoOptOutForDNT = exports.AutoOptOutForGDPR = exports.AutoOptOut = exports.PrivacyRegime = exports.BooleanString = exports.LogLevel = exports.ConsoleSafeLogLevel = void 0;
23
+ // external
24
+ const t = __importStar(require("io-ts"));
25
+ // main
26
+ const type_utils_1 = require("@transcend-io/type-utils");
27
+ // local
28
+ const enums_1 = require("./enums");
29
+ /** Console-safe log levels */
30
+ exports.ConsoleSafeLogLevel = t.keyof({
31
+ info: null,
32
+ log: null,
33
+ warn: null,
34
+ debug: null,
35
+ error: null,
36
+ trace: null,
37
+ // meta-levels:
38
+ group: null,
39
+ groupCollapsed: null,
40
+ groupEnd: null,
41
+ });
42
+ /** Airgap log levels */
43
+ exports.LogLevel = t.union([exports.ConsoleSafeLogLevel, t.literal('fatal')]);
44
+ /** A boolean value represented as either `'on'` or `'off'` */
45
+ exports.BooleanString = t.keyof({
46
+ on: null,
47
+ off: null,
48
+ });
49
+ /** Potentially applicable data privacy legal regimes */
50
+ exports.PrivacyRegime = (0, type_utils_1.valuesOf)(enums_1.PrivacyRegimeEnum);
51
+ /** Special `defaultConsent` automatic opt-out value for any potential reason */
52
+ exports.AutoOptOut = t.literal('Auto');
53
+ /** Special `defaultConsent` automatic opt-out value for GDPR-protected users */
54
+ exports.AutoOptOutForGDPR = t.literal('AutoGDPR');
55
+ /**
56
+ * Special `defaultConsent` automatic opt-out value for users with DNT enabled.
57
+ * Note that DNT is enabled by default for some browsers.
58
+ */
59
+ exports.AutoOptOutForDNT = t.literal('AutoDNT');
60
+ /**
61
+ * Special `defaultConsent` automatic opt-out value for users with GPC enabled.
62
+ */
63
+ exports.AutoOptOutForGPC = t.literal('AutoGPC');
64
+ /** Potential values for `defaultConsent` config token list */
65
+ exports.DefaultConsentConfigValue = t.union([
66
+ t.boolean,
67
+ exports.AutoOptOut,
68
+ exports.AutoOptOutForGDPR,
69
+ exports.AutoOptOutForDNT,
70
+ exports.AutoOptOutForGPC,
71
+ exports.BooleanString,
72
+ ]);
73
+ /** Tracking purpose metadata */
74
+ exports.TrackingPurposeDetails = t.intersection([
75
+ t.type({
76
+ /** Tracking purpose name */
77
+ name: t.string,
78
+ /** Tracking purpose description (used in Consent Manager UI) */
79
+ description: t.string,
80
+ /** Tracking purpose default consent (default: false) */
81
+ defaultConsent: exports.DefaultConsentConfigValue,
82
+ /**
83
+ * Is this a first-order tracking purpose? If false, this is a
84
+ * second-order tracking purpose that should only be used for
85
+ * request overrides.
86
+ *
87
+ * This parameter previously meant:
88
+ * Show tracking purpose in consent manager UI.
89
+ *
90
+ * Default value: true
91
+ */
92
+ showInConsentManager: t.boolean,
93
+ /** Allow user to configure their consent for this purpose (default: true) */
94
+ configurable: t.boolean,
95
+ /** Is tracking purpose "essential" - i.e. consent is mandatory / equivalent to 'essential' permission (default: false) */
96
+ essential: t.boolean,
97
+ }),
98
+ t.partial({
99
+ /** Tracking type */
100
+ trackingType: (0, type_utils_1.valuesOf)(enums_1.ConfigurablePurpose),
101
+ }),
102
+ ]);
103
+ /** Tracking purposes types configuration */
104
+ exports.TrackingPurposesTypes = t.record(t.string, exports.TrackingPurposeDetails);
105
+ /** Fully-resolved `defaultConsent` config */
106
+ exports.DefaultConsentConfig = t.record(t.string, exports.DefaultConsentConfigValue);
107
+ /** Tracking purposes configuration */
108
+ exports.TrackingPurposesConfig = t.intersection([
109
+ t.type({
110
+ /** Inherit default tracking purposes config */
111
+ useDefault: t.boolean,
112
+ types: exports.TrackingPurposesTypes,
113
+ }),
114
+ t.partial({
115
+ defaultConsent: t.union([exports.DefaultConsentConfigValue, exports.DefaultConsentConfig]),
116
+ }),
117
+ ]);
118
+ /** Tracking purpose */
119
+ exports.TrackingPurpose = t.union([
120
+ t.keyof(enums_1.SpecialTrackingPurpose),
121
+ t.string,
122
+ ]);
123
+ /** User-configurable user agent privacy signal */
124
+ exports.UserPrivacySignal = t.union([
125
+ /** Global Privacy Control */
126
+ t.literal('GPC'),
127
+ /** Do Not Track */
128
+ t.literal('DNT'),
129
+ ]);
130
+ /** Tracking consent change diffs */
131
+ exports.ConsentChange = t.record(exports.TrackingPurpose, t.boolean);
132
+ /* eslint-enable max-lines */
133
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,yCAA2B;AAE3B,OAAO;AACP,yDAAoD;AAEpD,QAAQ;AACR,mCAIiB;AAwBjB,8BAA8B;AACjB,QAAA,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC;IACzC,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,eAAe;IACf,KAAK,EAAE,IAAI;IACX,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAKH,wBAAwB;AACX,QAAA,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,2BAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAsD3E,8DAA8D;AACjD,QAAA,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC;IACnC,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,IAAI;CACV,CAAC,CAAC;AAIH,wDAAwD;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6C;AAChC,QAAA,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAC1C,CAAC,CAAC,MAAM,EACR,iCAAyB,CAC1B,CAAC;AAIF,sCAAsC;AACzB,QAAA,sBAAsB,GAAG,CAAC,CAAC,YAAY,CAAC;IACnD,CAAC,CAAC,IAAI,CAAC;QACL,+CAA+C;QAC/C,UAAU,EAAE,CAAC,CAAC,OAAO;QACrB,KAAK,EAAE,6BAAqB;KAC7B,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,iCAAyB,EAAE,4BAAoB,CAAC,CAAC;KAC3E,CAAC;CACH,CAAC,CAAC;AA8BH,uBAAuB;AACV,QAAA,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC,KAAK,CAAC,8BAAsB,CAAC;IAC/B,CAAC,CAAC,MAAM;CACT,CAAC,CAAC;AAQH,kDAAkD;AACrC,QAAA,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC;IACvC,6BAA6B;IAC7B,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAChB,mBAAmB;IACnB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;CACjB,CAAC,CAAC;AAKH,oCAAoC;AACvB,QAAA,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,uBAAe,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AAKlE,6BAA6B"}
@@ -1,3 +1,4 @@
1
1
  export * from './purpose';
2
2
  export * from './privacyRegime';
3
3
  export * from './viewState';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./purpose"), exports);
14
+ __exportStar(require("./privacyRegime"), exports);
15
+ __exportStar(require("./viewState"), exports);
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,8CAA4B"}
@@ -0,0 +1,16 @@
1
+ /** Potentially applicable data privacy legal regimes */
2
+ export declare enum PrivacyRegimeEnum {
3
+ /** Unable to determine any applicable regimes */
4
+ Unknown = "Unknown",
5
+ /** California Privacy Rights Act (and CCPA: California Consumer Privacy Act) */
6
+ CPRA = "CPRA",
7
+ /** EU General Data Protection Regulation */
8
+ GDPR = "GDPR",
9
+ /** Brazil Lei Geral de Proteção de Dados (General Personal Data Protection Law) */
10
+ LGPD = "LGPD",
11
+ /** Virginia Consumer Data Protection Act */
12
+ CDPA = "CDPA",
13
+ /** Colorado Privacy Act */
14
+ CPA = "CPA"
15
+ }
16
+ //# sourceMappingURL=privacyRegime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacyRegime.d.ts","sourceRoot":"","sources":["../../src/enums/privacyRegime.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,oBAAY,iBAAiB;IAC3B,iDAAiD;IACjD,OAAO,YAAY;IACnB,gFAAgF;IAChF,IAAI,SAAS;IACb,4CAA4C;IAC5C,IAAI,SAAS;IACb,mFAAmF;IACnF,IAAI,SAAS;IACb,4CAA4C;IAC5C,IAAI,SAAS;IACb,2BAA2B;IAC3B,GAAG,QAAQ;CACZ"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrivacyRegimeEnum = void 0;
4
+ /** Potentially applicable data privacy legal regimes */
5
+ var PrivacyRegimeEnum;
6
+ (function (PrivacyRegimeEnum) {
7
+ /** Unable to determine any applicable regimes */
8
+ PrivacyRegimeEnum["Unknown"] = "Unknown";
9
+ /** California Privacy Rights Act (and CCPA: California Consumer Privacy Act) */
10
+ PrivacyRegimeEnum["CPRA"] = "CPRA";
11
+ /** EU General Data Protection Regulation */
12
+ PrivacyRegimeEnum["GDPR"] = "GDPR";
13
+ /** Brazil Lei Geral de Proteção de Dados (General Personal Data Protection Law) */
14
+ PrivacyRegimeEnum["LGPD"] = "LGPD";
15
+ /** Virginia Consumer Data Protection Act */
16
+ PrivacyRegimeEnum["CDPA"] = "CDPA";
17
+ /** Colorado Privacy Act */
18
+ PrivacyRegimeEnum["CPA"] = "CPA";
19
+ })(PrivacyRegimeEnum = exports.PrivacyRegimeEnum || (exports.PrivacyRegimeEnum = {}));
20
+ //# sourceMappingURL=privacyRegime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacyRegime.js","sourceRoot":"","sources":["../../src/enums/privacyRegime.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,iDAAiD;IACjD,wCAAmB,CAAA;IACnB,gFAAgF;IAChF,kCAAa,CAAA;IACb,4CAA4C;IAC5C,kCAAa,CAAA;IACb,mFAAmF;IACnF,kCAAa,CAAA;IACb,4CAA4C;IAC5C,kCAAa,CAAA;IACb,2BAA2B;IAC3B,gCAAW,CAAA;AACb,CAAC,EAbW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAa5B"}