forked from snowplow/snowplow-javascript-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
53 lines (50 loc) · 1.42 KB
/
Copy pathtypes.ts
File metadata and controls
53 lines (50 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { CommonEventProperties, SelfDescribingJson } from '@snowplow/tracker-core';
/**
* Type for Consent Action
*/
export interface Consent {
/**
* The action for the consent preferences of a user
*/
eventType: 'deny_all' | 'allow_all' | 'allow_selected' | 'pending' | 'implicit_consent' | 'withdrawn' | 'expired';
/**
* GDPR lawful basis for data collection & processing
*/
basisForProcessing:
| 'consent'
| 'contract'
| 'legal_obligation'
| 'vital_interests'
| 'public_task'
| 'legitimate_interests';
/**
* URI of the privacy policy related document
*/
consentUrl: string;
/**
* Version of the privacy policy related document
*/
consentVersion: string;
/**
* The scopes allowed after the user finalized his selection of consent preferences. E.g ['analytics', 'functional', 'advertisement'].
*/
consentScopes: string[];
/**
* The domains for which this consent allows these preferences to persist to.
*/
domainsApplied: string[];
/**
* Determine if GDPR applies based on the user's geo-location.
*/
gdprApplies?: boolean;
}
export interface CmpVisible {
/**
* The time between the page load and dialog box appearing
*/
elapsedTime: number;
}
export interface CommonConsentEventProperties extends CommonEventProperties {
/** Add context to an event by setting an Array of Self Describing JSON */
context?: Array<SelfDescribingJson>;
}