@ketch-sdk/ketch-types 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1231 -928
- package/dist/index.js +56 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Status
|
|
3
|
-
*/
|
|
4
|
-
export type Status = {
|
|
5
|
-
[key: string]: boolean;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Consent
|
|
9
|
-
*/
|
|
10
|
-
export type Consent = {
|
|
11
|
-
purposes: Status;
|
|
12
|
-
vendors?: string[];
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Identities
|
|
16
|
-
*/
|
|
17
|
-
export type Identities = {
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
};
|
|
20
1
|
/**
|
|
21
2
|
* Tab
|
|
3
|
+
*
|
|
4
|
+
* @enum
|
|
22
5
|
*/
|
|
23
6
|
export declare enum Tab {
|
|
24
7
|
Overview = "overviewTab",
|
|
@@ -26,341 +9,249 @@ export declare enum Tab {
|
|
|
26
9
|
Consents = "consentsTab"
|
|
27
10
|
}
|
|
28
11
|
/**
|
|
29
|
-
* Determines if the
|
|
12
|
+
* Determines if the given value is a Tab
|
|
30
13
|
*
|
|
31
|
-
* @param value
|
|
14
|
+
* @param value The value to test
|
|
15
|
+
* @returns true if the given value is a Tab
|
|
32
16
|
*/
|
|
33
17
|
export declare function isTab(value: string): value is Tab;
|
|
34
18
|
/**
|
|
35
|
-
*
|
|
19
|
+
* ExperienceType is the type of experience that will be shown
|
|
36
20
|
*
|
|
37
|
-
* @
|
|
38
|
-
* @see PluginFunction
|
|
21
|
+
* @enum
|
|
39
22
|
*/
|
|
40
|
-
export
|
|
23
|
+
export declare enum ExperienceType {
|
|
24
|
+
Consent = "experiences.consent",
|
|
25
|
+
Preference = "experiences.preference"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ConsentExperienceType is the type of consent experience that will be shown
|
|
29
|
+
*
|
|
30
|
+
* @enum
|
|
31
|
+
*/
|
|
32
|
+
export declare enum ConsentExperienceType {
|
|
33
|
+
Banner = "experiences.consent.banner",
|
|
34
|
+
Modal = "experiences.consent.modal",
|
|
35
|
+
JIT = "experiences.consent.jit"
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* ExperienceClosedReason describes the reason the experience was closed.
|
|
39
|
+
*
|
|
40
|
+
* setConsent = consent was accepted/set
|
|
41
|
+
* invokeRight = the right was invoked
|
|
42
|
+
* close = the close/exit button was clicked
|
|
43
|
+
* willNotShow = the experience was skipped
|
|
44
|
+
*
|
|
45
|
+
* @enum
|
|
46
|
+
*/
|
|
47
|
+
export declare enum ExperienceClosedReason {
|
|
48
|
+
SET_CONSENT = "setConsent",
|
|
49
|
+
INVOKE_RIGHT = "invokeRight",
|
|
50
|
+
CLOSE = "close",
|
|
51
|
+
WILL_NOT_SHOW = "willNotShow"
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* ExperienceDefault
|
|
55
|
+
*
|
|
56
|
+
* @enum
|
|
57
|
+
*/
|
|
58
|
+
export declare enum ExperienceDefault {
|
|
59
|
+
BANNER = 1,
|
|
60
|
+
MODAL = 2
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* ExperienceButtonDestination
|
|
64
|
+
*
|
|
65
|
+
* @enum
|
|
66
|
+
*/
|
|
67
|
+
export declare enum ExperienceButtonDestination {
|
|
68
|
+
GOTO_MODAL = 1,
|
|
69
|
+
GOTO_PREFERENCE = 2,
|
|
70
|
+
REJECT_ALL = 3
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* ExperiencePrimaryButtonAction
|
|
74
|
+
*
|
|
75
|
+
* @enum
|
|
76
|
+
*/
|
|
77
|
+
export declare enum ExperiencePrimaryButtonAction {
|
|
78
|
+
SAVE_CURRENT_STATE = 1,
|
|
79
|
+
ACCEPT_ALL = 2
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* MigrationOption
|
|
83
|
+
*
|
|
84
|
+
* @enum
|
|
85
|
+
*/
|
|
86
|
+
export declare enum MigrationOption {
|
|
87
|
+
MIGRATE_DEFAULT = 0,
|
|
88
|
+
MIGRATE_NEVER = 1,
|
|
89
|
+
MIGRATE_FROM_ALLOW = 2,
|
|
90
|
+
MIGRATE_FROM_DENY = 3,
|
|
91
|
+
MIGRATE_ALWAYS = 4
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* CookieDuration
|
|
95
|
+
*
|
|
96
|
+
* @enum
|
|
97
|
+
*/
|
|
98
|
+
export declare enum CookieDuration {
|
|
99
|
+
SESSION = 1,
|
|
100
|
+
PERSISTENT = 2
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* CookieProvenance
|
|
104
|
+
*
|
|
105
|
+
* @enum
|
|
106
|
+
*/
|
|
107
|
+
export declare enum CookieProvenance {
|
|
108
|
+
FIRST_PARTY = 1,
|
|
109
|
+
THIRD_PARTY = 2
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* CookieCategory
|
|
113
|
+
*
|
|
114
|
+
* @enum
|
|
115
|
+
*/
|
|
116
|
+
export declare enum CookieCategory {
|
|
117
|
+
STRICTLY_NECESSARY = 1,
|
|
118
|
+
FUNCTIONAL = 2,
|
|
119
|
+
PERFORMANCE = 3,
|
|
120
|
+
MARKETING = 4
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* IdentityLocation is the location on the page from which to retrieve identity information
|
|
124
|
+
*
|
|
125
|
+
* @enum
|
|
126
|
+
*/
|
|
127
|
+
export declare enum IdentityType {
|
|
128
|
+
IDENTITY_TYPE_UNDEFINED = "",
|
|
129
|
+
IDENTITY_TYPE_DATA_LAYER = "dataLayer",
|
|
130
|
+
IDENTITY_TYPE_WINDOW = "window",
|
|
131
|
+
IDENTITY_TYPE_COOKIE = "cookie",
|
|
132
|
+
IDENTITY_TYPE_MANAGED = "managedCookie",
|
|
133
|
+
IDENTITY_TYPE_LOCAL_STORAGE = "localStorage",
|
|
134
|
+
IDENTITY_TYPE_SESSION_STORAGE = "sessionStorage",
|
|
135
|
+
IDENTITY_TYPE_QUERY_STRING = "queryString"
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* IdentityFormat is the encoding of the string identity value
|
|
139
|
+
*
|
|
140
|
+
* @enum
|
|
141
|
+
*/
|
|
142
|
+
export declare enum IdentityFormat {
|
|
143
|
+
IDENTITY_FORMAT_UNDEFINED = "",
|
|
144
|
+
IDENTITY_FORMAT_STRING = "string",
|
|
145
|
+
IDENTITY_FORMAT_JSON = "json",
|
|
146
|
+
IDENTITY_FORMAT_JWT = "jwt",
|
|
147
|
+
IDENTITY_FORMAT_QUERY = "query",
|
|
148
|
+
IDENTITY_FORMAT_SEMICOLON = "semicolon"
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* SwitchTextRenderLogic
|
|
152
|
+
*
|
|
153
|
+
* @enum
|
|
154
|
+
*/
|
|
155
|
+
export declare enum SwitchTextRenderLogic {
|
|
41
156
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* @param host The Ketch instance
|
|
45
|
-
* @param config The configuration
|
|
157
|
+
* SWITCH_TEXT_RENDER_ALL always renders the switch text regardless of state
|
|
46
158
|
*/
|
|
47
|
-
|
|
159
|
+
SWITCH_TEXT_RENDER_ALL = 1,
|
|
48
160
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param host The Ketch instance
|
|
52
|
-
* @param config The configuration
|
|
53
|
-
* @param env The environment
|
|
161
|
+
* SWITCH_TEXT_RENDER_LEGAL_BASIS renders the switch text only if different from the legal basis default
|
|
54
162
|
*/
|
|
55
|
-
|
|
163
|
+
SWITCH_TEXT_RENDER_LEGAL_BASIS = 2,
|
|
56
164
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @param host The Ketch instance
|
|
60
|
-
* @param config The configuration
|
|
61
|
-
* @param ipInfo The IP information
|
|
165
|
+
* SWITCH_TEXT_RENDER_CHANGE renders the switch only if the user changes the state of the switch
|
|
62
166
|
*/
|
|
63
|
-
|
|
167
|
+
SWITCH_TEXT_RENDER_CHANGE = 3,
|
|
64
168
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* @param host The Ketch instance
|
|
68
|
-
* @param config The configuration
|
|
69
|
-
* @param identities The identities
|
|
169
|
+
* SWITCH_TEXT_RENDER_NEVER never renders the switch text
|
|
70
170
|
*/
|
|
71
|
-
|
|
171
|
+
SWITCH_TEXT_RENDER_NEVER = 4
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* BannerPosition
|
|
175
|
+
*
|
|
176
|
+
* @enum
|
|
177
|
+
*/
|
|
178
|
+
export declare enum BannerPosition {
|
|
179
|
+
BOTTOM = 1,
|
|
180
|
+
TOP = 2,
|
|
181
|
+
BOTTOM_LEFT = 3,
|
|
182
|
+
BOTTOM_RIGHT = 4
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* ModalPosition
|
|
186
|
+
*
|
|
187
|
+
* @enum
|
|
188
|
+
*/
|
|
189
|
+
export declare enum ModalPosition {
|
|
190
|
+
CENTER = 1,
|
|
191
|
+
LEFT_FULL_HEIGHT = 2,
|
|
192
|
+
RIGHT_FULL_HEIGHT = 3
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* ExperienceActionKind is the Kind of the ExperienceAction.
|
|
196
|
+
*
|
|
197
|
+
* @enum
|
|
198
|
+
*/
|
|
199
|
+
export declare enum ExperienceActionKind {
|
|
72
200
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* @param host The Ketch instance
|
|
76
|
-
* @param config The configuration
|
|
77
|
-
* @param jurisdiction The jurisdiction
|
|
201
|
+
* The experience was shown
|
|
78
202
|
*/
|
|
79
|
-
|
|
203
|
+
ShowExperience = 0,
|
|
80
204
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* @param host The Ketch instance
|
|
84
|
-
* @param config The configuration
|
|
85
|
-
* @param regionInfo The region info
|
|
205
|
+
* The experience was hidden
|
|
86
206
|
*/
|
|
87
|
-
|
|
207
|
+
HideExperience = 1,
|
|
88
208
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* @param host The Ketch instance
|
|
92
|
-
* @param config The configuration
|
|
93
|
-
* @param consent The consent
|
|
209
|
+
* Consent was changed
|
|
94
210
|
*/
|
|
95
|
-
|
|
211
|
+
SetConsent = 2,
|
|
96
212
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* @param host The Ketch instance
|
|
100
|
-
* @param config The configuration
|
|
101
|
-
* @param request The right invocation request
|
|
213
|
+
* Subscriptions were changed
|
|
102
214
|
*/
|
|
103
|
-
|
|
215
|
+
SetSubscription = 3,
|
|
104
216
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* @param host The Ketch instance
|
|
108
|
-
* @param config The configuration
|
|
109
|
-
* @param consents The current consents
|
|
110
|
-
* @param options The options for the experience
|
|
217
|
+
* Right was invoked
|
|
111
218
|
*/
|
|
112
|
-
|
|
219
|
+
InvokeRight = 4
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Storage policy setting
|
|
223
|
+
*
|
|
224
|
+
* @enum
|
|
225
|
+
*/
|
|
226
|
+
export declare enum StorageOriginPolicy {
|
|
113
227
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* @param host The Ketch instance
|
|
117
|
-
* @param config The configuration
|
|
118
|
-
* @param consents The current consents
|
|
119
|
-
* @param options The options for the experience
|
|
120
|
-
*/
|
|
121
|
-
showPreferenceExperience?: (host: Ketch, config: Configuration, consents: Consent, options?: ShowPreferenceOptions) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Equivalent of on('willShowExperience')
|
|
124
|
-
*
|
|
125
|
-
* @param host The Ketch instance
|
|
126
|
-
* @param config The configuration
|
|
127
|
-
* @param type The type of the experience
|
|
228
|
+
* Storage saved cross-origin.
|
|
128
229
|
*/
|
|
129
|
-
|
|
230
|
+
CrossOrigin = "cross-origin",
|
|
130
231
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* @param host The Ketch instance
|
|
134
|
-
* @param config The configuration
|
|
135
|
-
* @param reason The reason the experience was hidden
|
|
232
|
+
* Storage is same-origin only.
|
|
136
233
|
*/
|
|
137
|
-
|
|
234
|
+
SameOrigin = "same-origin,"
|
|
138
235
|
}
|
|
139
236
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* @param host The Ketch instance
|
|
143
|
-
* @param config The plugin configuration
|
|
144
|
-
*/
|
|
145
|
-
export type PluginFunction = (host: Ketch, config?: any) => Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* Plugin
|
|
148
|
-
*/
|
|
149
|
-
export type Plugin = PluginClass | PluginFunction;
|
|
150
|
-
/**
|
|
151
|
-
* IdentityProvider defines a function for providing identities
|
|
237
|
+
* Identities
|
|
152
238
|
*/
|
|
153
|
-
export type
|
|
239
|
+
export type Identities = {
|
|
240
|
+
[key: string]: string;
|
|
241
|
+
};
|
|
154
242
|
/**
|
|
155
|
-
*
|
|
243
|
+
* Status
|
|
156
244
|
*/
|
|
157
|
-
export
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
*
|
|
161
|
-
* @param key The item key
|
|
162
|
-
*/
|
|
163
|
-
getItem(key: string): Promise<string | null>;
|
|
164
|
-
/**
|
|
165
|
-
* Sets the value for the given key
|
|
166
|
-
*
|
|
167
|
-
* @param key The item key
|
|
168
|
-
* @param value The item value
|
|
169
|
-
*/
|
|
170
|
-
setItem(key: string, value: string): Promise<void>;
|
|
171
|
-
/**
|
|
172
|
-
* Removes the given item
|
|
173
|
-
*
|
|
174
|
-
* @param key The item key
|
|
175
|
-
*/
|
|
176
|
-
removeItem(key: string): Promise<void>;
|
|
177
|
-
}
|
|
245
|
+
export type Status = {
|
|
246
|
+
[key: string]: boolean;
|
|
247
|
+
};
|
|
178
248
|
/**
|
|
179
|
-
*
|
|
249
|
+
* Consent
|
|
180
250
|
*/
|
|
181
|
-
export
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
CrossOrigin = "cross-origin",
|
|
186
|
-
/**
|
|
187
|
-
* Storage is same-origin only.
|
|
188
|
-
*/
|
|
189
|
-
SameOrigin = "same-origin,"
|
|
190
|
-
}
|
|
191
|
-
export interface Ketch {
|
|
192
|
-
/**
|
|
193
|
-
* Register a plugin with the given configuration
|
|
194
|
-
*
|
|
195
|
-
* @param plugin The plugin
|
|
196
|
-
* @param config The plugin configuration
|
|
197
|
-
*/
|
|
198
|
-
registerPlugin(plugin: Plugin, config?: any): Promise<void>;
|
|
199
|
-
/**
|
|
200
|
-
* Register an identity provider for the given identity
|
|
201
|
-
*
|
|
202
|
-
* @param name The name of the identity
|
|
203
|
-
* @param provider The provider of the identity
|
|
204
|
-
*/
|
|
205
|
-
registerIdentityProvider(name: string, provider: IdentityProvider): Promise<void>;
|
|
206
|
-
/**
|
|
207
|
-
* Register a storage provider
|
|
208
|
-
*
|
|
209
|
-
* @param policy The storage origin policy
|
|
210
|
-
* @param provider The provider implementation
|
|
211
|
-
*/
|
|
212
|
-
registerStorageProvider(policy: StorageOriginPolicy, provider: StorageProvider): Promise<void>;
|
|
213
|
-
/**
|
|
214
|
-
* Returns the Consent
|
|
215
|
-
*/
|
|
216
|
-
getConsent(): Promise<Consent>;
|
|
217
|
-
/**
|
|
218
|
-
* Sets the consent
|
|
219
|
-
*
|
|
220
|
-
* @param consent
|
|
221
|
-
*/
|
|
222
|
-
setConsent(consent: Consent): Promise<void>;
|
|
223
|
-
/**
|
|
224
|
-
* Show the consent experience
|
|
225
|
-
*/
|
|
226
|
-
showConsent(): Promise<void>;
|
|
227
|
-
/**
|
|
228
|
-
* Show the preference experience
|
|
229
|
-
*
|
|
230
|
-
* @param params The parameters for the experience
|
|
231
|
-
*/
|
|
232
|
-
showPreferences(params?: ShowPreferenceOptions): Promise<void>;
|
|
233
|
-
/**
|
|
234
|
-
* Notify that the experience was closed
|
|
235
|
-
*
|
|
236
|
-
* @param reason Reason the experience was closed
|
|
237
|
-
* @deprecated This method will be moved to an experience interface.
|
|
238
|
-
*/
|
|
239
|
-
experienceClosed(reason: ExperienceClosedReason): Promise<void>;
|
|
240
|
-
/**
|
|
241
|
-
* Invokes a right
|
|
242
|
-
*
|
|
243
|
-
* @param eventData The definition of the right
|
|
244
|
-
*/
|
|
245
|
-
invokeRight(eventData: InvokeRightEvent): Promise<void>;
|
|
246
|
-
/**
|
|
247
|
-
* Get the Configuration.
|
|
248
|
-
*/
|
|
249
|
-
getConfig(): Promise<Configuration>;
|
|
250
|
-
/**
|
|
251
|
-
* Get the Environment
|
|
252
|
-
*/
|
|
253
|
-
getEnvironment(): Promise<Environment>;
|
|
254
|
-
/**
|
|
255
|
-
* Get the IP information
|
|
256
|
-
*/
|
|
257
|
-
getGeoIP(): Promise<IPInfo>;
|
|
258
|
-
/**
|
|
259
|
-
* Get the identities
|
|
260
|
-
*/
|
|
261
|
-
getIdentities(): Promise<Identities>;
|
|
262
|
-
/**
|
|
263
|
-
* Get the jurisdiction
|
|
264
|
-
*/
|
|
265
|
-
getJurisdiction(): Promise<string>;
|
|
266
|
-
/**
|
|
267
|
-
* Get the region information
|
|
268
|
-
*/
|
|
269
|
-
getRegionInfo(): Promise<string>;
|
|
270
|
-
/**
|
|
271
|
-
* Alias for `emitter.on(eventName, listener)`.
|
|
272
|
-
*
|
|
273
|
-
* @param eventName The name of the event.
|
|
274
|
-
* @param listener The callback function
|
|
275
|
-
*/
|
|
276
|
-
addListener(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
277
|
-
/**
|
|
278
|
-
* Adds the `listener` function to the end of the listeners array for the
|
|
279
|
-
* event named `eventName`. No checks are made to see if the `listener` has
|
|
280
|
-
* already been added. Multiple calls passing the same combination of `eventName`
|
|
281
|
-
* and `listener` will result in the `listener` being added, and called, multiple
|
|
282
|
-
* times.
|
|
283
|
-
*
|
|
284
|
-
* Returns a reference to the `EventEmitter`, so that calls can be chained.
|
|
285
|
-
*
|
|
286
|
-
* By default, event listeners are invoked in the order they are added. The
|
|
287
|
-
* `emitter.prependListener()` method can be used as an alternative to add the
|
|
288
|
-
* event listener to the beginning of the listeners array.
|
|
289
|
-
*
|
|
290
|
-
* @param eventName The name of the event.
|
|
291
|
-
* @param listener The callback function
|
|
292
|
-
*/
|
|
293
|
-
on(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
294
|
-
/**
|
|
295
|
-
* Adds a **one-time**`listener` function for the event named `eventName`. The
|
|
296
|
-
* next time `eventName` is triggered, this listener is removed and then invoked.
|
|
297
|
-
*
|
|
298
|
-
* By default, event listeners are invoked in the order they are added. The
|
|
299
|
-
* `emitter.prependOnceListener()` method can be used as an alternative to add the
|
|
300
|
-
* event listener to the beginning of the listeners array.
|
|
301
|
-
*
|
|
302
|
-
* @param eventName The name of the event.
|
|
303
|
-
* @param listener The callback function
|
|
304
|
-
*/
|
|
305
|
-
once(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
306
|
-
/**
|
|
307
|
-
* Removes the specified `listener` from the listener array for the event
|
|
308
|
-
* named `eventName`.
|
|
309
|
-
*
|
|
310
|
-
* `removeListener()` will remove, at most, one instance of a listener from the
|
|
311
|
-
* listener array. If any single listener has been added multiple times to the
|
|
312
|
-
* listener array for the specified `eventName`, then `removeListener()` must be
|
|
313
|
-
* called multiple times to remove each instance.
|
|
314
|
-
*
|
|
315
|
-
* Once an event is emitted, all listeners attached to it at the
|
|
316
|
-
* time of emitting are called in order. This implies that any`removeListener()`
|
|
317
|
-
* or `removeAllListeners()` calls _after_ emitting and _before_ the last listener
|
|
318
|
-
* finishes execution will not remove them from`emit()` in progress. Subsequent
|
|
319
|
-
* events behave as expected.
|
|
320
|
-
*
|
|
321
|
-
* Because listeners are managed using an internal array, calling this will
|
|
322
|
-
* change the position indices of any listener registered _after_ the listener
|
|
323
|
-
* being removed. This will not impact the order in which listeners are called,
|
|
324
|
-
* but it means that any copies of the listener array as returned by
|
|
325
|
-
* the `emitter.listeners()` method will need to be recreated.
|
|
326
|
-
*
|
|
327
|
-
* When a single function has been added as a handler multiple times for a single
|
|
328
|
-
* event (as in the example below), `removeListener()` will remove the most
|
|
329
|
-
* recently added instance. In the example the `once('ping')` listener is removed
|
|
330
|
-
*
|
|
331
|
-
* @param eventName The name of the event.
|
|
332
|
-
* @param listener The callback function
|
|
333
|
-
*/
|
|
334
|
-
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
335
|
-
/**
|
|
336
|
-
* Alias for `emitter.removeListener()`.
|
|
337
|
-
*
|
|
338
|
-
* @param eventName The name of the event.
|
|
339
|
-
* @param listener The callback function
|
|
340
|
-
*/
|
|
341
|
-
off(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
342
|
-
/**
|
|
343
|
-
* Removes all listeners, or those of the specified `eventName`.
|
|
344
|
-
*
|
|
345
|
-
* It is bad practice to remove listeners added elsewhere in the code,
|
|
346
|
-
* particularly when the `EventEmitter` instance was created by some other
|
|
347
|
-
* component or module (e.g. sockets or file streams).
|
|
348
|
-
*
|
|
349
|
-
* @param eventName The name of the event.
|
|
350
|
-
*/
|
|
351
|
-
removeAllListeners(eventName?: string | symbol): Promise<void>;
|
|
352
|
-
/**
|
|
353
|
-
* Synchronously calls each of the listeners registered for the event named
|
|
354
|
-
* `eventName`, in the order they were registered, passing the supplied arguments
|
|
355
|
-
* to each.
|
|
356
|
-
*
|
|
357
|
-
* @returns `true` if the event had listeners, `false` otherwise.
|
|
358
|
-
*
|
|
359
|
-
* @param eventName The name of the event.
|
|
360
|
-
* @param args The arguments for the event.
|
|
361
|
-
*/
|
|
362
|
-
emit(eventName: string | symbol, ...args: any[]): Promise<void>;
|
|
363
|
-
}
|
|
251
|
+
export type Consent = {
|
|
252
|
+
purposes: Status;
|
|
253
|
+
vendors?: string[];
|
|
254
|
+
};
|
|
364
255
|
/**
|
|
365
256
|
* ShowPreferenceOptions
|
|
366
257
|
*/
|
|
@@ -390,25 +281,6 @@ export type ShowPreferenceOptions = {
|
|
|
390
281
|
*/
|
|
391
282
|
showConsentsTab?: boolean;
|
|
392
283
|
};
|
|
393
|
-
/**
|
|
394
|
-
* ExperienceType is the type of experience that will be shown
|
|
395
|
-
*
|
|
396
|
-
* @enum
|
|
397
|
-
*/
|
|
398
|
-
export declare enum ExperienceType {
|
|
399
|
-
Consent = "experiences.consent",
|
|
400
|
-
Preference = "experiences.preference"
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* ConsentExperienceType is the type of consent experience that will be shown
|
|
404
|
-
*
|
|
405
|
-
* @enum
|
|
406
|
-
*/
|
|
407
|
-
export declare enum ConsentExperienceType {
|
|
408
|
-
Banner = "experiences.consent.banner",
|
|
409
|
-
Modal = "experiences.consent.modal",
|
|
410
|
-
JIT = "experiences.consent.jit"
|
|
411
|
-
}
|
|
412
284
|
/**
|
|
413
285
|
* ShowConsentOptions
|
|
414
286
|
*/
|
|
@@ -424,91 +296,6 @@ export type InvokeRightEvent = {
|
|
|
424
296
|
subject: DataSubject;
|
|
425
297
|
recaptchaToken?: string;
|
|
426
298
|
};
|
|
427
|
-
/**
|
|
428
|
-
* ExperienceClosedReason describes the reason the experience was closed.
|
|
429
|
-
*
|
|
430
|
-
* setConsent = consent was accepted/set
|
|
431
|
-
* invokeRight = the right was invoked
|
|
432
|
-
* close = the close/exit button was clicked
|
|
433
|
-
* willNotShow = the experience was skipped
|
|
434
|
-
*
|
|
435
|
-
* @enum
|
|
436
|
-
*/
|
|
437
|
-
export declare enum ExperienceClosedReason {
|
|
438
|
-
SET_CONSENT = "setConsent",
|
|
439
|
-
INVOKE_RIGHT = "invokeRight",
|
|
440
|
-
CLOSE = "close",
|
|
441
|
-
WILL_NOT_SHOW = "willNotShow"
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* ExperienceDefault
|
|
445
|
-
*
|
|
446
|
-
* @enum
|
|
447
|
-
*/
|
|
448
|
-
export declare enum ExperienceDefault {
|
|
449
|
-
BANNER = 1,
|
|
450
|
-
MODAL = 2
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* ExperienceButtonDestination
|
|
454
|
-
*
|
|
455
|
-
* @enum
|
|
456
|
-
*/
|
|
457
|
-
export declare enum ExperienceButtonDestination {
|
|
458
|
-
GOTO_MODAL = 1,
|
|
459
|
-
GOTO_PREFERENCE = 2,
|
|
460
|
-
REJECT_ALL = 3
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* ExperiencePrimaryButtonAction
|
|
464
|
-
*
|
|
465
|
-
* @enum
|
|
466
|
-
*/
|
|
467
|
-
export declare enum ExperiencePrimaryButtonAction {
|
|
468
|
-
SAVE_CURRENT_STATE = 1,
|
|
469
|
-
ACCEPT_ALL = 2
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* MigrationOption
|
|
473
|
-
*
|
|
474
|
-
* @enum
|
|
475
|
-
*/
|
|
476
|
-
export declare enum MigrationOption {
|
|
477
|
-
MIGRATE_DEFAULT = 0,
|
|
478
|
-
MIGRATE_NEVER = 1,
|
|
479
|
-
MIGRATE_FROM_ALLOW = 2,
|
|
480
|
-
MIGRATE_FROM_DENY = 3,
|
|
481
|
-
MIGRATE_ALWAYS = 4
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* CookieDuration
|
|
485
|
-
*
|
|
486
|
-
* @enum
|
|
487
|
-
*/
|
|
488
|
-
export declare enum CookieDuration {
|
|
489
|
-
SESSION = 1,
|
|
490
|
-
PERSISTENT = 2
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* CookieProvenance
|
|
494
|
-
*
|
|
495
|
-
* @enum
|
|
496
|
-
*/
|
|
497
|
-
export declare enum CookieProvenance {
|
|
498
|
-
FIRST_PARTY = 1,
|
|
499
|
-
THIRD_PARTY = 2
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* CookieCategory
|
|
503
|
-
*
|
|
504
|
-
* @enum
|
|
505
|
-
*/
|
|
506
|
-
export declare enum CookieCategory {
|
|
507
|
-
STRICTLY_NECESSARY = 1,
|
|
508
|
-
FUNCTIONAL = 2,
|
|
509
|
-
PERFORMANCE = 3,
|
|
510
|
-
MARKETING = 4
|
|
511
|
-
}
|
|
512
299
|
/**
|
|
513
300
|
* IPLanguage
|
|
514
301
|
*/
|
|
@@ -548,18 +335,6 @@ export interface IPInfo {
|
|
|
548
335
|
longitude: number;
|
|
549
336
|
location: IPLocation;
|
|
550
337
|
}
|
|
551
|
-
/**
|
|
552
|
-
* GetLocationRequest
|
|
553
|
-
*/
|
|
554
|
-
export interface GetLocationRequest {
|
|
555
|
-
IP?: string;
|
|
556
|
-
}
|
|
557
|
-
/**
|
|
558
|
-
* GetLocationResponse
|
|
559
|
-
*/
|
|
560
|
-
export interface GetLocationResponse {
|
|
561
|
-
location: IPInfo;
|
|
562
|
-
}
|
|
563
338
|
/**
|
|
564
339
|
* PurposeLegalBasis
|
|
565
340
|
*/
|
|
@@ -581,69 +356,6 @@ export interface PurposeAllowedLegalBasis {
|
|
|
581
356
|
allowed: string;
|
|
582
357
|
legalBasisCode: string;
|
|
583
358
|
}
|
|
584
|
-
/**
|
|
585
|
-
* GetConsentRequest
|
|
586
|
-
*/
|
|
587
|
-
export interface GetConsentRequest {
|
|
588
|
-
organizationCode: string;
|
|
589
|
-
controllerCode?: string;
|
|
590
|
-
propertyCode: string;
|
|
591
|
-
environmentCode: string;
|
|
592
|
-
jurisdictionCode: string;
|
|
593
|
-
identities: {
|
|
594
|
-
[key: string]: string;
|
|
595
|
-
};
|
|
596
|
-
purposes: {
|
|
597
|
-
[key: string]: PurposeLegalBasis;
|
|
598
|
-
};
|
|
599
|
-
/**
|
|
600
|
-
* list of vendor ids for which the user has opted out
|
|
601
|
-
*/
|
|
602
|
-
vendors?: string[];
|
|
603
|
-
collectedAt?: number;
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
* GetConsentResponse
|
|
607
|
-
*/
|
|
608
|
-
export interface GetConsentResponse {
|
|
609
|
-
organizationCode: string;
|
|
610
|
-
controllerCode?: string;
|
|
611
|
-
propertyCode: string;
|
|
612
|
-
environmentCode: string;
|
|
613
|
-
jurisdictionCode: string;
|
|
614
|
-
identities: {
|
|
615
|
-
[key: string]: string;
|
|
616
|
-
};
|
|
617
|
-
purposes: {
|
|
618
|
-
[key: string]: PurposeAllowed | string;
|
|
619
|
-
};
|
|
620
|
-
/**
|
|
621
|
-
* list of vendor ids for which the user has opted out
|
|
622
|
-
*/
|
|
623
|
-
vendors?: string[];
|
|
624
|
-
collectedAt?: number;
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* SetConsentRequest
|
|
628
|
-
*/
|
|
629
|
-
export interface SetConsentRequest {
|
|
630
|
-
organizationCode: string;
|
|
631
|
-
controllerCode?: string;
|
|
632
|
-
propertyCode: string;
|
|
633
|
-
environmentCode: string;
|
|
634
|
-
jurisdictionCode: string;
|
|
635
|
-
identities: {
|
|
636
|
-
[key: string]: string;
|
|
637
|
-
};
|
|
638
|
-
collectedAt?: number;
|
|
639
|
-
purposes: {
|
|
640
|
-
[key: string]: PurposeAllowedLegalBasis;
|
|
641
|
-
};
|
|
642
|
-
/**
|
|
643
|
-
* list of vendor ids for which the user has opted out
|
|
644
|
-
*/
|
|
645
|
-
vendors?: string[];
|
|
646
|
-
}
|
|
647
359
|
/**
|
|
648
360
|
* DataSubject
|
|
649
361
|
*/
|
|
@@ -667,69 +379,6 @@ export interface DataSubject {
|
|
|
667
379
|
*/
|
|
668
380
|
typeRelationshipDetails?: string;
|
|
669
381
|
}
|
|
670
|
-
/**
|
|
671
|
-
* InvokeRightRequest
|
|
672
|
-
*/
|
|
673
|
-
export interface InvokeRightRequest {
|
|
674
|
-
organizationCode: string;
|
|
675
|
-
controllerCode?: string;
|
|
676
|
-
propertyCode: string;
|
|
677
|
-
environmentCode: string;
|
|
678
|
-
identities: {
|
|
679
|
-
[key: string]: string;
|
|
680
|
-
};
|
|
681
|
-
invokedAt?: number;
|
|
682
|
-
jurisdictionCode: string;
|
|
683
|
-
rightCode: string;
|
|
684
|
-
user: DataSubject;
|
|
685
|
-
recaptchaToken?: string;
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
* GetBootstrapConfigurationRequest
|
|
689
|
-
*/
|
|
690
|
-
export interface GetBootstrapConfigurationRequest {
|
|
691
|
-
organizationCode: string;
|
|
692
|
-
propertyCode: string;
|
|
693
|
-
}
|
|
694
|
-
/**
|
|
695
|
-
* GetFullConfigurationRequest
|
|
696
|
-
*/
|
|
697
|
-
export interface GetFullConfigurationRequest {
|
|
698
|
-
organizationCode: string;
|
|
699
|
-
propertyCode: string;
|
|
700
|
-
environmentCode?: string;
|
|
701
|
-
hash?: string;
|
|
702
|
-
deploymentID?: string;
|
|
703
|
-
jurisdictionCode?: string;
|
|
704
|
-
languageCode?: string;
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* GetPreferenceQRRequest
|
|
708
|
-
*/
|
|
709
|
-
export interface GetPreferenceQRRequest {
|
|
710
|
-
organizationCode: string;
|
|
711
|
-
propertyCode: string;
|
|
712
|
-
environmentCode?: string;
|
|
713
|
-
imageSize?: number;
|
|
714
|
-
path?: string;
|
|
715
|
-
backgroundColor?: string;
|
|
716
|
-
foregroundColor?: string;
|
|
717
|
-
parameters: {
|
|
718
|
-
[key: string]: string;
|
|
719
|
-
};
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* WebReportRequest
|
|
723
|
-
*/
|
|
724
|
-
export interface WebReportRequest {
|
|
725
|
-
type: string;
|
|
726
|
-
age: number;
|
|
727
|
-
url: string;
|
|
728
|
-
user_agent: string;
|
|
729
|
-
body: {
|
|
730
|
-
[key: string]: any;
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
382
|
/**
|
|
734
383
|
* Organization
|
|
735
384
|
*/
|
|
@@ -816,552 +465,1206 @@ export interface Purpose {
|
|
|
816
465
|
legalBasisName?: string;
|
|
817
466
|
legalBasisDescription?: string;
|
|
818
467
|
/**
|
|
819
|
-
* the data subject types for which the purpose is relevant. If this list is empty then the purpose applies to all
|
|
820
|
-
* data subject types
|
|
468
|
+
* the data subject types for which the purpose is relevant. If this list is empty then the purpose applies to all
|
|
469
|
+
* data subject types
|
|
470
|
+
*/
|
|
471
|
+
dataSubjectTypeCodes?: string[];
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* CanonicalPurpose
|
|
475
|
+
*/
|
|
476
|
+
export interface CanonicalPurpose {
|
|
477
|
+
code: string;
|
|
478
|
+
name: string;
|
|
479
|
+
purposeCodes?: string[];
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Identity represents all the metadata for an identifier on the page
|
|
483
|
+
*/
|
|
484
|
+
export interface Identity {
|
|
485
|
+
/**
|
|
486
|
+
* type is the location on the page from which to retrieve identity information
|
|
487
|
+
*/
|
|
488
|
+
type: IdentityType;
|
|
489
|
+
/**
|
|
490
|
+
* variable is the name to look up the identity value in the specified location
|
|
491
|
+
*/
|
|
492
|
+
variable: string;
|
|
493
|
+
/**
|
|
494
|
+
* format is the encoding of the value
|
|
495
|
+
*/
|
|
496
|
+
format: IdentityFormat;
|
|
497
|
+
/**
|
|
498
|
+
* key is the identifier to find the identity within the value if the format is IDENTITY_FORMAT_STRING then key
|
|
499
|
+
* will be undefined
|
|
500
|
+
*/
|
|
501
|
+
key?: string;
|
|
502
|
+
/**
|
|
503
|
+
* priority of the identity for consent conflict resolution
|
|
504
|
+
*/
|
|
505
|
+
priority?: number;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* PolicyDocument
|
|
509
|
+
*/
|
|
510
|
+
export interface PolicyDocument {
|
|
511
|
+
code: string;
|
|
512
|
+
version: number;
|
|
513
|
+
url: string;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Banner
|
|
517
|
+
*/
|
|
518
|
+
export interface Banner {
|
|
519
|
+
title?: string;
|
|
520
|
+
footerDescription: string;
|
|
521
|
+
buttonText: string;
|
|
522
|
+
primaryButtonAction?: ExperiencePrimaryButtonAction;
|
|
523
|
+
secondaryButtonText?: string;
|
|
524
|
+
secondaryButtonDestination?: ExperienceButtonDestination;
|
|
525
|
+
/**
|
|
526
|
+
* showCloseIcon determines whether the x out icon appears in the experience. Default do not show
|
|
527
|
+
*/
|
|
528
|
+
showCloseIcon?: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* additional extensions
|
|
531
|
+
*/
|
|
532
|
+
extensions?: {
|
|
533
|
+
[key: string]: string;
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Modal
|
|
538
|
+
*/
|
|
539
|
+
export interface Modal {
|
|
540
|
+
title: string;
|
|
541
|
+
bodyTitle?: string;
|
|
542
|
+
bodyDescription?: string;
|
|
543
|
+
footerDescription?: string;
|
|
544
|
+
buttonText: string;
|
|
545
|
+
/**
|
|
546
|
+
* consentTitle is the heading that goes above the list of purposes this optionally overrides the standard title
|
|
547
|
+
*/
|
|
548
|
+
consentTitle?: string;
|
|
549
|
+
/**
|
|
550
|
+
* hideConsentTitle determines whether the consent title should be hidden. Default is to show
|
|
551
|
+
*/
|
|
552
|
+
hideConsentTitle?: boolean;
|
|
553
|
+
/**
|
|
554
|
+
* hideLegalBases determines whether the legal bases should be hidden. Default is to show
|
|
555
|
+
*/
|
|
556
|
+
hideLegalBases?: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* switchOnText overrides the standard text for a consent switch in the on state
|
|
559
|
+
*/
|
|
560
|
+
switchOnText?: string;
|
|
561
|
+
/**
|
|
562
|
+
* switchOffText overrides the standard text for a consent switch in the off state
|
|
563
|
+
*/
|
|
564
|
+
switchOffText?: string;
|
|
565
|
+
/**
|
|
566
|
+
* switchTextRenderLogic determines the logic for showing the switch text
|
|
567
|
+
*/
|
|
568
|
+
switchTextRenderLogic?: SwitchTextRenderLogic;
|
|
569
|
+
/**
|
|
570
|
+
* showCloseIcon determines whether the x out icon appears in the experience. Default do not show
|
|
571
|
+
*/
|
|
572
|
+
showCloseIcon?: boolean;
|
|
573
|
+
/**
|
|
574
|
+
* additional extensions
|
|
575
|
+
*/
|
|
576
|
+
extensions?: {
|
|
577
|
+
[key: string]: string;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* JIT
|
|
582
|
+
*/
|
|
583
|
+
export interface JIT {
|
|
584
|
+
title?: string;
|
|
585
|
+
bodyDescription?: string;
|
|
586
|
+
acceptButtonText: string;
|
|
587
|
+
declineButtonText: string;
|
|
588
|
+
moreInfoText?: string;
|
|
589
|
+
moreInfoDestination?: ExperienceButtonDestination;
|
|
590
|
+
/**
|
|
591
|
+
* showCloseIcon determines whether the x out icon appears in the experience. Default do not show
|
|
592
|
+
*/
|
|
593
|
+
showCloseIcon?: boolean;
|
|
594
|
+
/**
|
|
595
|
+
* additional extensions
|
|
596
|
+
*/
|
|
597
|
+
extensions?: {
|
|
598
|
+
[key: string]: string;
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* RightsTab
|
|
603
|
+
*/
|
|
604
|
+
export interface RightsTab {
|
|
605
|
+
tabName: string;
|
|
606
|
+
bodyTitle?: string;
|
|
607
|
+
bodyDescription?: string;
|
|
608
|
+
buttonText: string;
|
|
609
|
+
/**
|
|
610
|
+
* additional extensions
|
|
611
|
+
*/
|
|
612
|
+
extensions?: {
|
|
613
|
+
[key: string]: string;
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* ConsentsTab
|
|
618
|
+
*/
|
|
619
|
+
export interface ConsentsTab {
|
|
620
|
+
tabName: string;
|
|
621
|
+
bodyTitle?: string;
|
|
622
|
+
bodyDescription?: string;
|
|
623
|
+
buttonText: string;
|
|
624
|
+
/**
|
|
625
|
+
* consentTitle is the heading that goes above the list of purposes
|
|
626
|
+
* this optionally overrides the standard title
|
|
627
|
+
*/
|
|
628
|
+
consentTitle?: string;
|
|
629
|
+
/**
|
|
630
|
+
* hideConsentTitle determines whether the consent title should be hidden. Default is to show
|
|
631
|
+
*/
|
|
632
|
+
hideConsentTitle?: boolean;
|
|
633
|
+
/**
|
|
634
|
+
* hideLegalBases determines whether the legal bases should be hidden. Default is to show
|
|
635
|
+
*/
|
|
636
|
+
hideLegalBases?: boolean;
|
|
637
|
+
/**
|
|
638
|
+
* switchOnText overrides the standard text for a consent switch in the on state
|
|
639
|
+
*/
|
|
640
|
+
switchOnText?: string;
|
|
641
|
+
/**
|
|
642
|
+
* switchOffText overrides the standard text for a consent switch in the off state
|
|
643
|
+
*/
|
|
644
|
+
switchOffText?: string;
|
|
645
|
+
/**
|
|
646
|
+
* switchTextRenderLogic determines the logic for showing the switch text
|
|
647
|
+
*/
|
|
648
|
+
switchTextRenderLogic?: SwitchTextRenderLogic;
|
|
649
|
+
/**
|
|
650
|
+
* additional extensions
|
|
651
|
+
*/
|
|
652
|
+
extensions?: {
|
|
653
|
+
[key: string]: string;
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* OverviewTab
|
|
658
|
+
*/
|
|
659
|
+
export interface OverviewTab {
|
|
660
|
+
tabName: string;
|
|
661
|
+
bodyTitle?: string;
|
|
662
|
+
bodyDescription: string;
|
|
663
|
+
/**
|
|
664
|
+
* additional extensions
|
|
665
|
+
* */
|
|
666
|
+
extensions?: {
|
|
667
|
+
[key: string]: string;
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* ConsentExperience
|
|
672
|
+
*/
|
|
673
|
+
export interface ConsentExperience {
|
|
674
|
+
code: string;
|
|
675
|
+
version: number;
|
|
676
|
+
banner: Banner;
|
|
677
|
+
modal: Modal;
|
|
678
|
+
jit?: JIT;
|
|
679
|
+
experienceDefault: ExperienceDefault;
|
|
680
|
+
/**
|
|
681
|
+
* additional extensions
|
|
682
|
+
*/
|
|
683
|
+
extensions?: {
|
|
684
|
+
[key: string]: string;
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* PreferenceExperience
|
|
689
|
+
*/
|
|
690
|
+
export interface PreferenceExperience {
|
|
691
|
+
code: string;
|
|
692
|
+
version: number;
|
|
693
|
+
title: string;
|
|
694
|
+
rights?: RightsTab;
|
|
695
|
+
consents?: ConsentsTab;
|
|
696
|
+
overview: OverviewTab;
|
|
697
|
+
/**
|
|
698
|
+
* additional extensions
|
|
699
|
+
*/
|
|
700
|
+
extensions?: {
|
|
701
|
+
[key: string]: string;
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Right
|
|
706
|
+
*/
|
|
707
|
+
export interface Right {
|
|
708
|
+
code: string;
|
|
709
|
+
name: string;
|
|
710
|
+
description: string;
|
|
711
|
+
/**
|
|
712
|
+
* the data subject types for which the right is relevant. If this list is empty then the right applies to all
|
|
713
|
+
* data subject types
|
|
714
|
+
*/
|
|
715
|
+
dataSubjectTypeCodes?: string[];
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Experience
|
|
719
|
+
*/
|
|
720
|
+
export interface Experience {
|
|
721
|
+
consent?: ConsentExperience;
|
|
722
|
+
preference?: PreferenceExperience;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Theme
|
|
726
|
+
*/
|
|
727
|
+
export interface Theme {
|
|
728
|
+
code?: string;
|
|
729
|
+
name?: string;
|
|
730
|
+
description?: string;
|
|
731
|
+
watermark?: boolean;
|
|
732
|
+
buttonBorderRadius: number;
|
|
733
|
+
font?: string;
|
|
734
|
+
bannerBackgroundColor: string;
|
|
735
|
+
bannerContentColor?: string;
|
|
736
|
+
bannerButtonColor: string;
|
|
737
|
+
bannerSecondaryButtonColor?: string;
|
|
738
|
+
bannerPosition?: BannerPosition;
|
|
739
|
+
modalHeaderBackgroundColor: string;
|
|
740
|
+
modalHeaderContentColor?: string;
|
|
741
|
+
modalContentColor: string;
|
|
742
|
+
modalButtonColor: string;
|
|
743
|
+
modalPosition?: ModalPosition;
|
|
744
|
+
/**
|
|
745
|
+
* modalSwitchOnColor is the color of the consent switch in the on state for the modal this overrides standard theme
|
|
746
|
+
* colors
|
|
747
|
+
*/
|
|
748
|
+
modalSwitchOnColor?: string;
|
|
749
|
+
/**
|
|
750
|
+
* modalSwitchOffColor is the color of the consent switch in the off state for the modal this overrides standard
|
|
751
|
+
* theme colors
|
|
752
|
+
*/
|
|
753
|
+
modalSwitchOffColor?: string;
|
|
754
|
+
formHeaderBackgroundColor: string;
|
|
755
|
+
formHeaderContentColor?: string;
|
|
756
|
+
formContentColor: string;
|
|
757
|
+
formButtonColor: string;
|
|
758
|
+
/**
|
|
759
|
+
* formSwitchOnColor is the color of the consent switch in the on state for the form this overrides standard theme
|
|
760
|
+
* colors
|
|
761
|
+
*/
|
|
762
|
+
formSwitchOnColor?: string;
|
|
763
|
+
/**
|
|
764
|
+
* formSwitchOffColor is the color of the consent switch in the off state for the form this overrides standard theme
|
|
765
|
+
* colors
|
|
766
|
+
*/
|
|
767
|
+
formSwitchOffColor?: string;
|
|
768
|
+
/**
|
|
769
|
+
* qrBackgroundColor is the override for the QR code background color
|
|
770
|
+
*/
|
|
771
|
+
qrBackgroundColor?: string;
|
|
772
|
+
/**
|
|
773
|
+
* qrForegroundColor is the override for the QR code foreground color
|
|
774
|
+
*/
|
|
775
|
+
qrForegroundColor?: string;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Vendor purpose
|
|
779
|
+
*/
|
|
780
|
+
export interface VendorPurpose {
|
|
781
|
+
name: string;
|
|
782
|
+
legalBasis?: string;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Vendor definition
|
|
786
|
+
*/
|
|
787
|
+
export interface Vendor {
|
|
788
|
+
id: string;
|
|
789
|
+
name: string;
|
|
790
|
+
purposes?: VendorPurpose[];
|
|
791
|
+
specialPurposes?: VendorPurpose[];
|
|
792
|
+
features?: VendorPurpose[];
|
|
793
|
+
specialFeatures?: VendorPurpose[];
|
|
794
|
+
policyUrl?: string;
|
|
795
|
+
cookieMaxAgeSeconds?: number;
|
|
796
|
+
usesCookies?: boolean;
|
|
797
|
+
usesNonCookieAccess?: boolean;
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* DataSubjectType represents user defined data subject types with code as the unique identifier
|
|
801
|
+
*/
|
|
802
|
+
export interface DataSubjectType {
|
|
803
|
+
code: string;
|
|
804
|
+
name: string;
|
|
805
|
+
/**
|
|
806
|
+
* requiresUserInput is true if additional information must be requested to describe the data subject relation
|
|
807
|
+
*/
|
|
808
|
+
requiresUserInput: boolean;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Stack represents a grouping of purposes to be displayed in an experience
|
|
812
|
+
*/
|
|
813
|
+
export interface Stack {
|
|
814
|
+
/**
|
|
815
|
+
* name of the stack to be displayed
|
|
816
|
+
*/
|
|
817
|
+
name: string;
|
|
818
|
+
/**
|
|
819
|
+
* list of purpose codes that are members of the stack
|
|
820
|
+
*/
|
|
821
|
+
purposeCodes: string[];
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* Configuration
|
|
825
|
+
*/
|
|
826
|
+
export interface Configuration {
|
|
827
|
+
/**
|
|
828
|
+
* Organization this configuration belongs to
|
|
829
|
+
*/
|
|
830
|
+
organization: Organization;
|
|
831
|
+
/**
|
|
832
|
+
* Property this configuration belongs to
|
|
833
|
+
*/
|
|
834
|
+
property?: Property;
|
|
835
|
+
/**
|
|
836
|
+
* Language for all text
|
|
837
|
+
*/
|
|
838
|
+
language?: string;
|
|
839
|
+
/**
|
|
840
|
+
* Available environments. Only available in the "boot" configuration.
|
|
841
|
+
*/
|
|
842
|
+
environments?: Environment[];
|
|
843
|
+
/**
|
|
844
|
+
* Environment for this configuration. Only available in the "full" configuration.
|
|
845
|
+
*/
|
|
846
|
+
environment?: Environment;
|
|
847
|
+
/**
|
|
848
|
+
* Applicable jurisdiction.
|
|
849
|
+
*/
|
|
850
|
+
jurisdiction?: JurisdictionInfo;
|
|
851
|
+
/**
|
|
852
|
+
* Identity spaces defined for this property
|
|
853
|
+
*/
|
|
854
|
+
identities?: {
|
|
855
|
+
[key: string]: Identity;
|
|
856
|
+
};
|
|
857
|
+
/**
|
|
858
|
+
* Deployment information. Only available in the "full" configuration.
|
|
859
|
+
*/
|
|
860
|
+
deployment?: Deployment;
|
|
861
|
+
/**
|
|
862
|
+
* Regulations enabled for this jurisdiction.
|
|
863
|
+
*/
|
|
864
|
+
regulations?: string[];
|
|
865
|
+
/**
|
|
866
|
+
* Rights available in this jurisdiction.
|
|
867
|
+
*/
|
|
868
|
+
rights?: Right[];
|
|
869
|
+
/**
|
|
870
|
+
* Purposes in this jurisdiction.
|
|
871
|
+
*/
|
|
872
|
+
purposes?: Purpose[];
|
|
873
|
+
/**
|
|
874
|
+
* Mapping of purposes to canonical purposes.
|
|
875
|
+
*/
|
|
876
|
+
canonicalPurposes?: {
|
|
877
|
+
[key: string]: CanonicalPurpose;
|
|
878
|
+
};
|
|
879
|
+
/**
|
|
880
|
+
* Privacy policy document
|
|
881
|
+
*/
|
|
882
|
+
privacyPolicy?: PolicyDocument;
|
|
883
|
+
/**
|
|
884
|
+
* Terms of Service (ToS) policy document
|
|
885
|
+
*/
|
|
886
|
+
termsOfService?: PolicyDocument;
|
|
887
|
+
/**
|
|
888
|
+
* Theme
|
|
889
|
+
*/
|
|
890
|
+
theme?: Theme;
|
|
891
|
+
/**
|
|
892
|
+
* Experience definitions
|
|
893
|
+
*/
|
|
894
|
+
experiences?: Experience;
|
|
895
|
+
/**
|
|
896
|
+
* Vendors (TCF)
|
|
897
|
+
*/
|
|
898
|
+
vendors?: Vendor[];
|
|
899
|
+
/**
|
|
900
|
+
* Data subject types relevant for this configuration
|
|
901
|
+
*/
|
|
902
|
+
dataSubjectTypes?: DataSubjectType[];
|
|
903
|
+
/**
|
|
904
|
+
* Stacks to be displayed in an experience
|
|
905
|
+
*/
|
|
906
|
+
stacks?: Stack[];
|
|
907
|
+
/**
|
|
908
|
+
* Services
|
|
909
|
+
*/
|
|
910
|
+
services?: {
|
|
911
|
+
[key: string]: string;
|
|
912
|
+
};
|
|
913
|
+
/**
|
|
914
|
+
* Flexible options
|
|
915
|
+
*/
|
|
916
|
+
options?: {
|
|
917
|
+
[key: string]: string;
|
|
918
|
+
};
|
|
919
|
+
/**
|
|
920
|
+
* Scripts to load
|
|
921
|
+
*/
|
|
922
|
+
scripts?: string[];
|
|
923
|
+
/**
|
|
924
|
+
* Plugins configured for the configuration
|
|
925
|
+
*/
|
|
926
|
+
plugins?: {
|
|
927
|
+
[key: string]: any;
|
|
928
|
+
};
|
|
929
|
+
/**
|
|
930
|
+
* Recaptcha config
|
|
931
|
+
*/
|
|
932
|
+
recaptcha?: Recaptcha;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Recaptcha interface defines the Recaptcha config
|
|
936
|
+
*/
|
|
937
|
+
export interface Recaptcha {
|
|
938
|
+
/**
|
|
939
|
+
* siteKey: Recaptcha site/public key used to exchange for a reCaptcha token
|
|
940
|
+
*/
|
|
941
|
+
siteKey?: string;
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Details about showing the Experience
|
|
945
|
+
*/
|
|
946
|
+
export interface ShowExperienceAction {
|
|
947
|
+
/**
|
|
948
|
+
* ShowExperience
|
|
949
|
+
*/
|
|
950
|
+
kind: ExperienceActionKind.ShowExperience;
|
|
951
|
+
/**
|
|
952
|
+
* Agent string for the Experience Server (e.g., `lanyard/1.0.3`). Useful for diagnostics.
|
|
953
|
+
*/
|
|
954
|
+
server: string;
|
|
955
|
+
/**
|
|
956
|
+
* Kind of the experience
|
|
957
|
+
*/
|
|
958
|
+
experienceKind: ExperienceType;
|
|
959
|
+
/**
|
|
960
|
+
* Mode of the experience
|
|
961
|
+
*/
|
|
962
|
+
experienceMode?: ConsentExperienceType;
|
|
963
|
+
/**
|
|
964
|
+
* Timestamp when the action happened
|
|
965
|
+
*/
|
|
966
|
+
ts: Date;
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Details about hiding the Experience
|
|
970
|
+
*/
|
|
971
|
+
export interface HideExperienceAction {
|
|
972
|
+
/**
|
|
973
|
+
* HideExperience
|
|
974
|
+
*/
|
|
975
|
+
kind: ExperienceActionKind.HideExperience;
|
|
976
|
+
/**
|
|
977
|
+
* Timestamp when the action happened
|
|
978
|
+
*/
|
|
979
|
+
ts: Date;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Details about setting consent
|
|
983
|
+
*/
|
|
984
|
+
export interface SetConsentExperienceAction {
|
|
985
|
+
/**
|
|
986
|
+
* SetConsent
|
|
987
|
+
*/
|
|
988
|
+
kind: ExperienceActionKind.SetConsent;
|
|
989
|
+
/**
|
|
990
|
+
* The consent
|
|
821
991
|
*/
|
|
822
|
-
|
|
992
|
+
consent: Consent;
|
|
993
|
+
/**
|
|
994
|
+
* Timestamp when the action happened
|
|
995
|
+
*/
|
|
996
|
+
ts: Date;
|
|
823
997
|
}
|
|
824
998
|
/**
|
|
825
|
-
*
|
|
999
|
+
* Details about setting subscriptions
|
|
826
1000
|
*/
|
|
827
|
-
export interface
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
1001
|
+
export interface SetSubscriptionExperienceAction {
|
|
1002
|
+
/**
|
|
1003
|
+
* SetSubscription
|
|
1004
|
+
*/
|
|
1005
|
+
kind: ExperienceActionKind.SetSubscription;
|
|
1006
|
+
/**
|
|
1007
|
+
* Timestamp when the action happened
|
|
1008
|
+
*/
|
|
1009
|
+
ts: Date;
|
|
831
1010
|
}
|
|
832
1011
|
/**
|
|
833
|
-
*
|
|
834
|
-
*
|
|
835
|
-
* @enum
|
|
1012
|
+
* Details about invoking rights
|
|
836
1013
|
*/
|
|
837
|
-
export
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
1014
|
+
export interface InvokeRightExperienceAction {
|
|
1015
|
+
/**
|
|
1016
|
+
* InvokeRight
|
|
1017
|
+
*/
|
|
1018
|
+
kind: ExperienceActionKind.InvokeRight;
|
|
1019
|
+
/**
|
|
1020
|
+
* The right details
|
|
1021
|
+
*/
|
|
1022
|
+
right: InvokeRightEvent;
|
|
1023
|
+
/**
|
|
1024
|
+
* Timestamp when the action happened
|
|
1025
|
+
*/
|
|
1026
|
+
ts: Date;
|
|
846
1027
|
}
|
|
847
1028
|
/**
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
* @enum
|
|
1029
|
+
* ExperienceResult action
|
|
851
1030
|
*/
|
|
852
|
-
export
|
|
853
|
-
IDENTITY_FORMAT_UNDEFINED = "",
|
|
854
|
-
IDENTITY_FORMAT_STRING = "string",
|
|
855
|
-
IDENTITY_FORMAT_JSON = "json",
|
|
856
|
-
IDENTITY_FORMAT_JWT = "jwt",
|
|
857
|
-
IDENTITY_FORMAT_QUERY = "query",
|
|
858
|
-
IDENTITY_FORMAT_SEMICOLON = "semicolon"
|
|
859
|
-
}
|
|
1031
|
+
export type ExperienceAction = ShowExperienceAction | HideExperienceAction | SetConsentExperienceAction | SetSubscriptionExperienceAction | InvokeRightExperienceAction;
|
|
860
1032
|
/**
|
|
861
|
-
*
|
|
1033
|
+
* Options for a modal consent experience
|
|
862
1034
|
*/
|
|
863
|
-
export interface
|
|
1035
|
+
export interface ModalConsentExperienceOptions {
|
|
864
1036
|
/**
|
|
865
|
-
*
|
|
1037
|
+
* Consent
|
|
866
1038
|
*/
|
|
867
|
-
|
|
1039
|
+
kind: ExperienceType.Consent;
|
|
868
1040
|
/**
|
|
869
|
-
*
|
|
1041
|
+
* Modal
|
|
870
1042
|
*/
|
|
871
|
-
|
|
1043
|
+
mode: ConsentExperienceType.Modal;
|
|
872
1044
|
/**
|
|
873
|
-
*
|
|
1045
|
+
* Code of the experience
|
|
874
1046
|
*/
|
|
875
|
-
|
|
1047
|
+
code: string;
|
|
876
1048
|
/**
|
|
877
|
-
*
|
|
878
|
-
* will be undefined
|
|
1049
|
+
* Version of the experience
|
|
879
1050
|
*/
|
|
880
|
-
|
|
1051
|
+
version: number;
|
|
881
1052
|
/**
|
|
882
|
-
*
|
|
1053
|
+
* Configuration of the Modal
|
|
883
1054
|
*/
|
|
884
|
-
|
|
1055
|
+
config: Modal;
|
|
1056
|
+
/**
|
|
1057
|
+
* Theme for rendering the Modal
|
|
1058
|
+
*/
|
|
1059
|
+
theme: Theme;
|
|
885
1060
|
}
|
|
886
1061
|
/**
|
|
887
|
-
*
|
|
1062
|
+
* Options for a banner consent experience
|
|
888
1063
|
*/
|
|
889
|
-
export interface
|
|
1064
|
+
export interface BannerConsentExperienceOptions {
|
|
1065
|
+
/**
|
|
1066
|
+
* Consent
|
|
1067
|
+
*/
|
|
1068
|
+
kind: ExperienceType.Consent;
|
|
1069
|
+
/**
|
|
1070
|
+
* Banner
|
|
1071
|
+
*/
|
|
1072
|
+
mode: ConsentExperienceType.Banner;
|
|
1073
|
+
/**
|
|
1074
|
+
* Code of the experience
|
|
1075
|
+
*/
|
|
890
1076
|
code: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* Version of the experience
|
|
1079
|
+
*/
|
|
891
1080
|
version: number;
|
|
892
|
-
|
|
1081
|
+
/**
|
|
1082
|
+
* Configuration of the Banner
|
|
1083
|
+
*/
|
|
1084
|
+
config: Banner;
|
|
1085
|
+
/**
|
|
1086
|
+
* Theme for rendering the Banner
|
|
1087
|
+
*/
|
|
1088
|
+
theme: Theme;
|
|
893
1089
|
}
|
|
894
1090
|
/**
|
|
895
|
-
*
|
|
896
|
-
*
|
|
897
|
-
* @enum
|
|
1091
|
+
* Options for a JIT consent experience
|
|
898
1092
|
*/
|
|
899
|
-
export
|
|
1093
|
+
export interface JITConsentExperienceOptions {
|
|
900
1094
|
/**
|
|
901
|
-
*
|
|
1095
|
+
* Consent
|
|
902
1096
|
*/
|
|
903
|
-
|
|
1097
|
+
kind: ExperienceType.Consent;
|
|
904
1098
|
/**
|
|
905
|
-
*
|
|
1099
|
+
* JIT
|
|
906
1100
|
*/
|
|
907
|
-
|
|
1101
|
+
mode: ConsentExperienceType.JIT;
|
|
908
1102
|
/**
|
|
909
|
-
*
|
|
1103
|
+
* Code of the experience
|
|
910
1104
|
*/
|
|
911
|
-
|
|
1105
|
+
code: string;
|
|
912
1106
|
/**
|
|
913
|
-
*
|
|
1107
|
+
* Version of the experience
|
|
914
1108
|
*/
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Banner
|
|
919
|
-
*/
|
|
920
|
-
export interface Banner {
|
|
921
|
-
title?: string;
|
|
922
|
-
footerDescription: string;
|
|
923
|
-
buttonText: string;
|
|
924
|
-
primaryButtonAction?: ExperiencePrimaryButtonAction;
|
|
925
|
-
secondaryButtonText?: string;
|
|
926
|
-
secondaryButtonDestination?: ExperienceButtonDestination;
|
|
1109
|
+
version: number;
|
|
927
1110
|
/**
|
|
928
|
-
*
|
|
1111
|
+
* Configuration of the JIT
|
|
929
1112
|
*/
|
|
930
|
-
|
|
1113
|
+
config: JIT;
|
|
931
1114
|
/**
|
|
932
|
-
*
|
|
1115
|
+
* Purposes for which consent is sought
|
|
933
1116
|
*/
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1117
|
+
purposes: string[];
|
|
1118
|
+
/**
|
|
1119
|
+
* Theme for rendering the Consents
|
|
1120
|
+
*/
|
|
1121
|
+
theme: Theme;
|
|
937
1122
|
}
|
|
938
1123
|
/**
|
|
939
|
-
*
|
|
1124
|
+
* Consent experience options
|
|
940
1125
|
*/
|
|
941
|
-
export
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
buttonText: string;
|
|
1126
|
+
export type ConsentExperienceOptions = ModalConsentExperienceOptions | BannerConsentExperienceOptions | JITConsentExperienceOptions;
|
|
1127
|
+
/**
|
|
1128
|
+
* Preferences configuration
|
|
1129
|
+
*/
|
|
1130
|
+
export interface Preferences {
|
|
947
1131
|
/**
|
|
948
|
-
*
|
|
1132
|
+
* Title of the experience
|
|
949
1133
|
*/
|
|
950
|
-
|
|
1134
|
+
title: string;
|
|
951
1135
|
/**
|
|
952
|
-
*
|
|
1136
|
+
* Overview tab configuration
|
|
953
1137
|
*/
|
|
954
|
-
|
|
1138
|
+
overview?: OverviewTab;
|
|
955
1139
|
/**
|
|
956
|
-
*
|
|
1140
|
+
* Consents tab configuration
|
|
957
1141
|
*/
|
|
958
|
-
|
|
1142
|
+
consents?: ConsentsTab;
|
|
959
1143
|
/**
|
|
960
|
-
*
|
|
1144
|
+
* Rights tab configuration
|
|
961
1145
|
*/
|
|
962
|
-
|
|
1146
|
+
rights?: RightsTab;
|
|
963
1147
|
/**
|
|
964
|
-
*
|
|
1148
|
+
* Subscriptions tab configuration
|
|
965
1149
|
*/
|
|
966
|
-
|
|
1150
|
+
subscriptions?: any;
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Preference experience options
|
|
1154
|
+
*/
|
|
1155
|
+
export interface PreferencesExperienceOptions {
|
|
967
1156
|
/**
|
|
968
|
-
*
|
|
1157
|
+
* Preference
|
|
969
1158
|
*/
|
|
970
|
-
|
|
1159
|
+
kind: ExperienceType.Preference;
|
|
971
1160
|
/**
|
|
972
|
-
*
|
|
1161
|
+
* Code of the experience
|
|
973
1162
|
*/
|
|
974
|
-
|
|
1163
|
+
code: string;
|
|
975
1164
|
/**
|
|
976
|
-
*
|
|
1165
|
+
* Version of the experience
|
|
977
1166
|
*/
|
|
978
|
-
|
|
979
|
-
[key: string]: string;
|
|
980
|
-
};
|
|
981
|
-
}
|
|
982
|
-
/**
|
|
983
|
-
* JIT
|
|
984
|
-
*/
|
|
985
|
-
export interface JIT {
|
|
986
|
-
title?: string;
|
|
987
|
-
bodyDescription?: string;
|
|
988
|
-
acceptButtonText: string;
|
|
989
|
-
declineButtonText: string;
|
|
990
|
-
moreInfoText?: string;
|
|
991
|
-
moreInfoDestination?: ExperienceButtonDestination;
|
|
1167
|
+
version: number;
|
|
992
1168
|
/**
|
|
993
|
-
*
|
|
1169
|
+
* Configuration of the Preferences
|
|
994
1170
|
*/
|
|
995
|
-
|
|
1171
|
+
config: Preferences;
|
|
996
1172
|
/**
|
|
997
|
-
*
|
|
1173
|
+
* Theme for rendering the Preferences
|
|
998
1174
|
*/
|
|
999
|
-
|
|
1000
|
-
[key: string]: string;
|
|
1001
|
-
};
|
|
1175
|
+
theme: Theme;
|
|
1002
1176
|
}
|
|
1003
1177
|
/**
|
|
1004
|
-
*
|
|
1178
|
+
* Experience options
|
|
1005
1179
|
*/
|
|
1006
|
-
export
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1180
|
+
export type ExperienceOptions = ConsentExperienceOptions | PreferencesExperienceOptions;
|
|
1181
|
+
/**
|
|
1182
|
+
* ExperienceServer provides an interface implemented by experience servers for rendering experiences
|
|
1183
|
+
*/
|
|
1184
|
+
export declare interface ExperienceServer {
|
|
1011
1185
|
/**
|
|
1012
|
-
*
|
|
1186
|
+
* Render is called to render an experience.
|
|
1187
|
+
*
|
|
1188
|
+
* @param options Options specific to the requested kind of experience.
|
|
1189
|
+
* @returns ExperienceResults that describe what happened and what actions were taken in the experience
|
|
1013
1190
|
*/
|
|
1014
|
-
|
|
1015
|
-
[key: string]: string;
|
|
1016
|
-
};
|
|
1191
|
+
render(options: ExperienceOptions): Promise<ExperienceAction[]>;
|
|
1017
1192
|
}
|
|
1018
1193
|
/**
|
|
1019
|
-
*
|
|
1194
|
+
* Plugin class
|
|
1195
|
+
*
|
|
1196
|
+
* @deprecated New plugins should be functional plugins.
|
|
1197
|
+
* @see PluginFunction
|
|
1020
1198
|
*/
|
|
1021
|
-
export interface
|
|
1022
|
-
tabName: string;
|
|
1023
|
-
bodyTitle?: string;
|
|
1024
|
-
bodyDescription?: string;
|
|
1025
|
-
buttonText: string;
|
|
1199
|
+
export interface PluginClass {
|
|
1026
1200
|
/**
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1201
|
+
* Initialize the plugin
|
|
1202
|
+
*
|
|
1203
|
+
* @param host The Ketch instance
|
|
1204
|
+
* @param config The configuration
|
|
1029
1205
|
*/
|
|
1030
|
-
|
|
1206
|
+
init?: (host: Ketch, config: Configuration) => void;
|
|
1031
1207
|
/**
|
|
1032
|
-
*
|
|
1208
|
+
* Equivalent of on('environment')
|
|
1209
|
+
*
|
|
1210
|
+
* @param host The Ketch instance
|
|
1211
|
+
* @param config The configuration
|
|
1212
|
+
* @param env The environment
|
|
1033
1213
|
*/
|
|
1034
|
-
|
|
1214
|
+
environmentLoaded?: (host: Ketch, config: Configuration, env: Environment) => void;
|
|
1035
1215
|
/**
|
|
1036
|
-
*
|
|
1216
|
+
* Equivalent of on('geoip')
|
|
1217
|
+
*
|
|
1218
|
+
* @param host The Ketch instance
|
|
1219
|
+
* @param config The configuration
|
|
1220
|
+
* @param ipInfo The IP information
|
|
1037
1221
|
*/
|
|
1038
|
-
|
|
1222
|
+
geoIPLoaded?: (host: Ketch, config: Configuration, ipInfo: IPInfo) => void;
|
|
1039
1223
|
/**
|
|
1040
|
-
*
|
|
1224
|
+
* Equivalent of on('identities')
|
|
1225
|
+
*
|
|
1226
|
+
* @param host The Ketch instance
|
|
1227
|
+
* @param config The configuration
|
|
1228
|
+
* @param identities The identities
|
|
1041
1229
|
*/
|
|
1042
|
-
|
|
1230
|
+
identitiesLoaded?: (host: Ketch, config: Configuration, identities: Identities) => void;
|
|
1231
|
+
/**
|
|
1232
|
+
* Equivalent of on('jurisdiction')
|
|
1233
|
+
*
|
|
1234
|
+
* @param host The Ketch instance
|
|
1235
|
+
* @param config The configuration
|
|
1236
|
+
* @param jurisdiction The jurisdiction
|
|
1237
|
+
*/
|
|
1238
|
+
jurisdictionLoaded?: (host: Ketch, config: Configuration, policyScope: string) => void;
|
|
1239
|
+
/**
|
|
1240
|
+
* Equivalent of on('regionInfo')
|
|
1241
|
+
*
|
|
1242
|
+
* @param host The Ketch instance
|
|
1243
|
+
* @param config The configuration
|
|
1244
|
+
* @param regionInfo The region info
|
|
1245
|
+
*/
|
|
1246
|
+
regionInfoLoaded?: (host: Ketch, config: Configuration, region: string) => void;
|
|
1247
|
+
/**
|
|
1248
|
+
* Equivalent of on('consent')
|
|
1249
|
+
*
|
|
1250
|
+
* @param host The Ketch instance
|
|
1251
|
+
* @param config The configuration
|
|
1252
|
+
* @param consent The consent
|
|
1253
|
+
*/
|
|
1254
|
+
consentChanged?: (host: Ketch, config: Configuration, consent: Consent) => void;
|
|
1255
|
+
/**
|
|
1256
|
+
* Equivalent of on('rightInvoked')
|
|
1257
|
+
*
|
|
1258
|
+
* @param host The Ketch instance
|
|
1259
|
+
* @param config The configuration
|
|
1260
|
+
* @param request The right invocation request
|
|
1261
|
+
*/
|
|
1262
|
+
rightInvoked?: (host: Ketch, config: Configuration, request: InvokeRightRequest) => void;
|
|
1263
|
+
/**
|
|
1264
|
+
* Equivalent of on('showConsentExperience')
|
|
1265
|
+
*
|
|
1266
|
+
* @param host The Ketch instance
|
|
1267
|
+
* @param config The configuration
|
|
1268
|
+
* @param consents The current consents
|
|
1269
|
+
* @param options The options for the experience
|
|
1270
|
+
*/
|
|
1271
|
+
showConsentExperience?: (host: Ketch, config: Configuration, consents: Consent, options?: ShowConsentOptions) => void;
|
|
1043
1272
|
/**
|
|
1044
|
-
*
|
|
1273
|
+
* Equivalent of on('showPreferenceExperience')
|
|
1274
|
+
*
|
|
1275
|
+
* @param host The Ketch instance
|
|
1276
|
+
* @param config The configuration
|
|
1277
|
+
* @param consents The current consents
|
|
1278
|
+
* @param options The options for the experience
|
|
1045
1279
|
*/
|
|
1046
|
-
|
|
1280
|
+
showPreferenceExperience?: (host: Ketch, config: Configuration, consents: Consent, options?: ShowPreferenceOptions) => void;
|
|
1047
1281
|
/**
|
|
1048
|
-
*
|
|
1282
|
+
* Equivalent of on('willShowExperience')
|
|
1283
|
+
*
|
|
1284
|
+
* @param host The Ketch instance
|
|
1285
|
+
* @param config The configuration
|
|
1286
|
+
* @param type The type of the experience
|
|
1049
1287
|
*/
|
|
1050
|
-
|
|
1288
|
+
willShowExperience?: (host: Ketch, config: Configuration, type: string) => void;
|
|
1051
1289
|
/**
|
|
1052
|
-
*
|
|
1290
|
+
* Equivalent of on('experienceHidden')
|
|
1291
|
+
*
|
|
1292
|
+
* @param host The Ketch instance
|
|
1293
|
+
* @param config The configuration
|
|
1294
|
+
* @param reason The reason the experience was hidden
|
|
1053
1295
|
*/
|
|
1054
|
-
|
|
1055
|
-
[key: string]: string;
|
|
1056
|
-
};
|
|
1296
|
+
experienceHidden?: (host: Ketch, config: Configuration, reason: string) => void;
|
|
1057
1297
|
}
|
|
1058
1298
|
/**
|
|
1059
|
-
*
|
|
1299
|
+
* Plugin factory function signature
|
|
1300
|
+
*
|
|
1301
|
+
* @param host The Ketch instance
|
|
1302
|
+
* @param config The plugin configuration
|
|
1060
1303
|
*/
|
|
1061
|
-
export
|
|
1062
|
-
tabName: string;
|
|
1063
|
-
bodyTitle?: string;
|
|
1064
|
-
bodyDescription: string;
|
|
1065
|
-
/**
|
|
1066
|
-
* additional extensions
|
|
1067
|
-
* */
|
|
1068
|
-
extensions?: {
|
|
1069
|
-
[key: string]: string;
|
|
1070
|
-
};
|
|
1071
|
-
}
|
|
1304
|
+
export type PluginFunction = (host: Ketch, config?: any) => Promise<void>;
|
|
1072
1305
|
/**
|
|
1073
|
-
*
|
|
1306
|
+
* Plugin
|
|
1074
1307
|
*/
|
|
1075
|
-
export
|
|
1076
|
-
code: string;
|
|
1077
|
-
version: number;
|
|
1078
|
-
banner: Banner;
|
|
1079
|
-
modal: Modal;
|
|
1080
|
-
jit?: JIT;
|
|
1081
|
-
experienceDefault: ExperienceDefault;
|
|
1082
|
-
/**
|
|
1083
|
-
* additional extensions
|
|
1084
|
-
*/
|
|
1085
|
-
extensions?: {
|
|
1086
|
-
[key: string]: string;
|
|
1087
|
-
};
|
|
1088
|
-
}
|
|
1308
|
+
export type Plugin = PluginClass | PluginFunction;
|
|
1089
1309
|
/**
|
|
1090
|
-
*
|
|
1310
|
+
* IdentityProvider defines a function for providing identities
|
|
1091
1311
|
*/
|
|
1092
|
-
export
|
|
1093
|
-
code: string;
|
|
1094
|
-
version: number;
|
|
1095
|
-
title: string;
|
|
1096
|
-
rights?: RightsTab;
|
|
1097
|
-
consents?: ConsentsTab;
|
|
1098
|
-
overview: OverviewTab;
|
|
1099
|
-
/**
|
|
1100
|
-
* additional extensions
|
|
1101
|
-
*/
|
|
1102
|
-
extensions?: {
|
|
1103
|
-
[key: string]: string;
|
|
1104
|
-
};
|
|
1105
|
-
}
|
|
1312
|
+
export type IdentityProvider = () => Promise<string[]>;
|
|
1106
1313
|
/**
|
|
1107
|
-
*
|
|
1314
|
+
* StorageProvider defines an interface for storage
|
|
1108
1315
|
*/
|
|
1109
|
-
export interface
|
|
1110
|
-
code: string;
|
|
1111
|
-
name: string;
|
|
1112
|
-
description: string;
|
|
1316
|
+
export interface StorageProvider {
|
|
1113
1317
|
/**
|
|
1114
|
-
*
|
|
1115
|
-
*
|
|
1318
|
+
* Get an item with the given key
|
|
1319
|
+
*
|
|
1320
|
+
* @param key The item key
|
|
1116
1321
|
*/
|
|
1117
|
-
|
|
1322
|
+
getItem(key: string): Promise<string | null>;
|
|
1323
|
+
/**
|
|
1324
|
+
* Sets the value for the given key
|
|
1325
|
+
*
|
|
1326
|
+
* @param key The item key
|
|
1327
|
+
* @param value The item value
|
|
1328
|
+
*/
|
|
1329
|
+
setItem(key: string, value: string): Promise<void>;
|
|
1330
|
+
/**
|
|
1331
|
+
* Removes the given item
|
|
1332
|
+
*
|
|
1333
|
+
* @param key The item key
|
|
1334
|
+
*/
|
|
1335
|
+
removeItem(key: string): Promise<void>;
|
|
1118
1336
|
}
|
|
1119
1337
|
/**
|
|
1120
|
-
*
|
|
1338
|
+
* GetLocationRequest
|
|
1121
1339
|
*/
|
|
1122
|
-
export interface
|
|
1123
|
-
|
|
1124
|
-
preference?: PreferenceExperience;
|
|
1340
|
+
export interface GetLocationRequest {
|
|
1341
|
+
IP?: string;
|
|
1125
1342
|
}
|
|
1126
1343
|
/**
|
|
1127
|
-
*
|
|
1128
|
-
*
|
|
1129
|
-
* @enum
|
|
1344
|
+
* GetLocationResponse
|
|
1130
1345
|
*/
|
|
1131
|
-
export
|
|
1132
|
-
|
|
1133
|
-
TOP = 2,
|
|
1134
|
-
BOTTOM_LEFT = 3,
|
|
1135
|
-
BOTTOM_RIGHT = 4
|
|
1346
|
+
export interface GetLocationResponse {
|
|
1347
|
+
location: IPInfo;
|
|
1136
1348
|
}
|
|
1137
1349
|
/**
|
|
1138
|
-
*
|
|
1139
|
-
*
|
|
1140
|
-
* @enum
|
|
1350
|
+
* GetConsentRequest
|
|
1141
1351
|
*/
|
|
1142
|
-
export
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1352
|
+
export interface GetConsentRequest {
|
|
1353
|
+
organizationCode: string;
|
|
1354
|
+
controllerCode?: string;
|
|
1355
|
+
propertyCode: string;
|
|
1356
|
+
environmentCode: string;
|
|
1357
|
+
jurisdictionCode: string;
|
|
1358
|
+
identities: {
|
|
1359
|
+
[key: string]: string;
|
|
1360
|
+
};
|
|
1361
|
+
purposes: {
|
|
1362
|
+
[key: string]: PurposeLegalBasis;
|
|
1363
|
+
};
|
|
1364
|
+
/**
|
|
1365
|
+
* list of vendor ids for which the user has opted out
|
|
1366
|
+
*/
|
|
1367
|
+
vendors?: string[];
|
|
1368
|
+
collectedAt?: number;
|
|
1146
1369
|
}
|
|
1147
1370
|
/**
|
|
1148
|
-
*
|
|
1371
|
+
* GetConsentResponse
|
|
1149
1372
|
*/
|
|
1150
|
-
export interface
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
modalHeaderBackgroundColor: string;
|
|
1163
|
-
modalHeaderContentColor?: string;
|
|
1164
|
-
modalContentColor: string;
|
|
1165
|
-
modalButtonColor: string;
|
|
1166
|
-
modalPosition?: ModalPosition;
|
|
1167
|
-
/**
|
|
1168
|
-
* modalSwitchOnColor is the color of the consent switch in the on state for the modal this overrides standard theme
|
|
1169
|
-
* colors
|
|
1170
|
-
*/
|
|
1171
|
-
modalSwitchOnColor?: string;
|
|
1172
|
-
/**
|
|
1173
|
-
* modalSwitchOffColor is the color of the consent switch in the off state for the modal this overrides standard
|
|
1174
|
-
* theme colors
|
|
1175
|
-
*/
|
|
1176
|
-
modalSwitchOffColor?: string;
|
|
1177
|
-
formHeaderBackgroundColor: string;
|
|
1178
|
-
formHeaderContentColor?: string;
|
|
1179
|
-
formContentColor: string;
|
|
1180
|
-
formButtonColor: string;
|
|
1181
|
-
/**
|
|
1182
|
-
* formSwitchOnColor is the color of the consent switch in the on state for the form this overrides standard theme
|
|
1183
|
-
* colors
|
|
1184
|
-
*/
|
|
1185
|
-
formSwitchOnColor?: string;
|
|
1186
|
-
/**
|
|
1187
|
-
* formSwitchOffColor is the color of the consent switch in the off state for the form this overrides standard theme
|
|
1188
|
-
* colors
|
|
1189
|
-
*/
|
|
1190
|
-
formSwitchOffColor?: string;
|
|
1373
|
+
export interface GetConsentResponse {
|
|
1374
|
+
organizationCode: string;
|
|
1375
|
+
controllerCode?: string;
|
|
1376
|
+
propertyCode: string;
|
|
1377
|
+
environmentCode: string;
|
|
1378
|
+
jurisdictionCode: string;
|
|
1379
|
+
identities: {
|
|
1380
|
+
[key: string]: string;
|
|
1381
|
+
};
|
|
1382
|
+
purposes: {
|
|
1383
|
+
[key: string]: PurposeAllowed | string;
|
|
1384
|
+
};
|
|
1191
1385
|
/**
|
|
1192
|
-
*
|
|
1386
|
+
* list of vendor ids for which the user has opted out
|
|
1193
1387
|
*/
|
|
1194
|
-
|
|
1388
|
+
vendors?: string[];
|
|
1389
|
+
collectedAt?: number;
|
|
1390
|
+
}
|
|
1391
|
+
/**
|
|
1392
|
+
* SetConsentRequest
|
|
1393
|
+
*/
|
|
1394
|
+
export interface SetConsentRequest {
|
|
1395
|
+
organizationCode: string;
|
|
1396
|
+
controllerCode?: string;
|
|
1397
|
+
propertyCode: string;
|
|
1398
|
+
environmentCode: string;
|
|
1399
|
+
jurisdictionCode: string;
|
|
1400
|
+
identities: {
|
|
1401
|
+
[key: string]: string;
|
|
1402
|
+
};
|
|
1403
|
+
collectedAt?: number;
|
|
1404
|
+
purposes: {
|
|
1405
|
+
[key: string]: PurposeAllowedLegalBasis;
|
|
1406
|
+
};
|
|
1195
1407
|
/**
|
|
1196
|
-
*
|
|
1408
|
+
* list of vendor ids for which the user has opted out
|
|
1197
1409
|
*/
|
|
1198
|
-
|
|
1410
|
+
vendors?: string[];
|
|
1199
1411
|
}
|
|
1200
1412
|
/**
|
|
1201
|
-
*
|
|
1413
|
+
* InvokeRightRequest
|
|
1202
1414
|
*/
|
|
1203
|
-
export interface
|
|
1204
|
-
|
|
1205
|
-
|
|
1415
|
+
export interface InvokeRightRequest {
|
|
1416
|
+
organizationCode: string;
|
|
1417
|
+
controllerCode?: string;
|
|
1418
|
+
propertyCode: string;
|
|
1419
|
+
environmentCode: string;
|
|
1420
|
+
identities: {
|
|
1421
|
+
[key: string]: string;
|
|
1422
|
+
};
|
|
1423
|
+
invokedAt?: number;
|
|
1424
|
+
jurisdictionCode: string;
|
|
1425
|
+
rightCode: string;
|
|
1426
|
+
user: DataSubject;
|
|
1427
|
+
recaptchaToken?: string;
|
|
1206
1428
|
}
|
|
1207
1429
|
/**
|
|
1208
|
-
*
|
|
1430
|
+
* GetBootstrapConfigurationRequest
|
|
1431
|
+
*/
|
|
1432
|
+
export interface GetBootstrapConfigurationRequest {
|
|
1433
|
+
organizationCode: string;
|
|
1434
|
+
propertyCode: string;
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* GetFullConfigurationRequest
|
|
1209
1438
|
*/
|
|
1210
|
-
export interface
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
cookieMaxAgeSeconds?: number;
|
|
1219
|
-
usesCookies?: boolean;
|
|
1220
|
-
usesNonCookieAccess?: boolean;
|
|
1439
|
+
export interface GetFullConfigurationRequest {
|
|
1440
|
+
organizationCode: string;
|
|
1441
|
+
propertyCode: string;
|
|
1442
|
+
environmentCode?: string;
|
|
1443
|
+
hash?: string;
|
|
1444
|
+
deploymentID?: string;
|
|
1445
|
+
jurisdictionCode?: string;
|
|
1446
|
+
languageCode?: string;
|
|
1221
1447
|
}
|
|
1222
1448
|
/**
|
|
1223
|
-
*
|
|
1449
|
+
* GetPreferenceQRRequest
|
|
1224
1450
|
*/
|
|
1225
|
-
export interface
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1451
|
+
export interface GetPreferenceQRRequest {
|
|
1452
|
+
organizationCode: string;
|
|
1453
|
+
propertyCode: string;
|
|
1454
|
+
environmentCode?: string;
|
|
1455
|
+
imageSize?: number;
|
|
1456
|
+
path?: string;
|
|
1457
|
+
backgroundColor?: string;
|
|
1458
|
+
foregroundColor?: string;
|
|
1459
|
+
parameters: {
|
|
1460
|
+
[key: string]: string;
|
|
1461
|
+
};
|
|
1232
1462
|
}
|
|
1233
1463
|
/**
|
|
1234
|
-
*
|
|
1464
|
+
* WebReportRequest
|
|
1235
1465
|
*/
|
|
1236
|
-
export interface
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
purposeCodes: string[];
|
|
1466
|
+
export interface WebReportRequest {
|
|
1467
|
+
type: string;
|
|
1468
|
+
age: number;
|
|
1469
|
+
url: string;
|
|
1470
|
+
user_agent: string;
|
|
1471
|
+
body: {
|
|
1472
|
+
[key: string]: any;
|
|
1473
|
+
};
|
|
1245
1474
|
}
|
|
1246
1475
|
/**
|
|
1247
|
-
*
|
|
1476
|
+
* Ketch is the standard interface to the tag
|
|
1248
1477
|
*/
|
|
1249
|
-
export interface
|
|
1478
|
+
export interface Ketch {
|
|
1250
1479
|
/**
|
|
1251
|
-
*
|
|
1480
|
+
* Register a plugin with the given configuration
|
|
1481
|
+
*
|
|
1482
|
+
* @param plugin The plugin
|
|
1483
|
+
* @param config The plugin configuration
|
|
1252
1484
|
*/
|
|
1253
|
-
|
|
1485
|
+
registerPlugin(plugin: Plugin, config?: any): Promise<void>;
|
|
1254
1486
|
/**
|
|
1255
|
-
*
|
|
1487
|
+
* Register an identity provider for the given identity
|
|
1488
|
+
*
|
|
1489
|
+
* @param name The name of the identity
|
|
1490
|
+
* @param provider The provider of the identity
|
|
1256
1491
|
*/
|
|
1257
|
-
|
|
1492
|
+
registerIdentityProvider(name: string, provider: IdentityProvider): Promise<void>;
|
|
1258
1493
|
/**
|
|
1259
|
-
*
|
|
1494
|
+
* Register an experience server to use for rendering experiences.
|
|
1495
|
+
*
|
|
1496
|
+
* @param server The experience server
|
|
1260
1497
|
*/
|
|
1261
|
-
|
|
1498
|
+
registerExperienceServer(server: ExperienceServer): Promise<void>;
|
|
1262
1499
|
/**
|
|
1263
|
-
*
|
|
1500
|
+
* Register a storage provider
|
|
1501
|
+
*
|
|
1502
|
+
* @param policy The storage origin policy
|
|
1503
|
+
* @param provider The provider implementation
|
|
1264
1504
|
*/
|
|
1265
|
-
|
|
1505
|
+
registerStorageProvider(policy: StorageOriginPolicy, provider: StorageProvider): Promise<void>;
|
|
1266
1506
|
/**
|
|
1267
|
-
*
|
|
1507
|
+
* Returns the Consent
|
|
1268
1508
|
*/
|
|
1269
|
-
|
|
1509
|
+
getConsent(): Promise<Consent>;
|
|
1270
1510
|
/**
|
|
1271
|
-
*
|
|
1511
|
+
* Sets the consent
|
|
1512
|
+
*
|
|
1513
|
+
* @param consent Consents
|
|
1272
1514
|
*/
|
|
1273
|
-
|
|
1515
|
+
setConsent(consent: Consent): Promise<void>;
|
|
1274
1516
|
/**
|
|
1275
|
-
*
|
|
1517
|
+
* Sets the provisional consent
|
|
1518
|
+
*
|
|
1519
|
+
* @param consent Consents
|
|
1276
1520
|
*/
|
|
1277
|
-
|
|
1278
|
-
[key: string]: Identity;
|
|
1279
|
-
};
|
|
1521
|
+
setProvisionalConsent(consent: Consent): Promise<void>;
|
|
1280
1522
|
/**
|
|
1281
|
-
*
|
|
1523
|
+
* Show the consent experience
|
|
1282
1524
|
*/
|
|
1283
|
-
|
|
1525
|
+
showConsent(): Promise<void>;
|
|
1284
1526
|
/**
|
|
1285
|
-
*
|
|
1527
|
+
* Show the experience as described
|
|
1528
|
+
*
|
|
1529
|
+
* @param options The experience options
|
|
1286
1530
|
*/
|
|
1287
|
-
|
|
1531
|
+
showExperience(options: ExperienceOptions): Promise<void>;
|
|
1288
1532
|
/**
|
|
1289
|
-
*
|
|
1533
|
+
* Show the preference experience
|
|
1534
|
+
*
|
|
1535
|
+
* @param params The parameters for the experience
|
|
1290
1536
|
*/
|
|
1291
|
-
|
|
1537
|
+
showPreferences(params?: ShowPreferenceOptions): Promise<void>;
|
|
1292
1538
|
/**
|
|
1293
|
-
*
|
|
1539
|
+
* Notify that the experience was closed
|
|
1540
|
+
*
|
|
1541
|
+
* @param reason Reason the experience was closed
|
|
1542
|
+
* @deprecated This method will be moved to an experience interface.
|
|
1294
1543
|
*/
|
|
1295
|
-
|
|
1544
|
+
experienceClosed(reason: ExperienceClosedReason): Promise<void>;
|
|
1296
1545
|
/**
|
|
1297
|
-
*
|
|
1546
|
+
* Invokes a right
|
|
1547
|
+
*
|
|
1548
|
+
* @param eventData The definition of the right
|
|
1298
1549
|
*/
|
|
1299
|
-
|
|
1300
|
-
[key: string]: CanonicalPurpose;
|
|
1301
|
-
};
|
|
1550
|
+
invokeRight(eventData: InvokeRightEvent): Promise<void>;
|
|
1302
1551
|
/**
|
|
1303
|
-
*
|
|
1552
|
+
* Get the Configuration.
|
|
1304
1553
|
*/
|
|
1305
|
-
|
|
1554
|
+
getConfig(): Promise<Configuration>;
|
|
1306
1555
|
/**
|
|
1307
|
-
*
|
|
1556
|
+
* Get the Environment
|
|
1308
1557
|
*/
|
|
1309
|
-
|
|
1558
|
+
getEnvironment(): Promise<Environment>;
|
|
1310
1559
|
/**
|
|
1311
|
-
*
|
|
1560
|
+
* Get the IP information
|
|
1312
1561
|
*/
|
|
1313
|
-
|
|
1562
|
+
getGeoIP(): Promise<IPInfo>;
|
|
1314
1563
|
/**
|
|
1315
|
-
*
|
|
1564
|
+
* Get the identities
|
|
1316
1565
|
*/
|
|
1317
|
-
|
|
1566
|
+
getIdentities(): Promise<Identities>;
|
|
1318
1567
|
/**
|
|
1319
|
-
*
|
|
1568
|
+
* Get the jurisdiction
|
|
1320
1569
|
*/
|
|
1321
|
-
|
|
1570
|
+
getJurisdiction(): Promise<string>;
|
|
1322
1571
|
/**
|
|
1323
|
-
*
|
|
1572
|
+
* Get the region information
|
|
1324
1573
|
*/
|
|
1325
|
-
|
|
1574
|
+
getRegionInfo(): Promise<string>;
|
|
1326
1575
|
/**
|
|
1327
|
-
*
|
|
1576
|
+
* Alias for `emitter.on(eventName, listener)`.
|
|
1577
|
+
*
|
|
1578
|
+
* @param eventName The name of the event.
|
|
1579
|
+
* @param listener The callback function
|
|
1328
1580
|
*/
|
|
1329
|
-
|
|
1581
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
1330
1582
|
/**
|
|
1331
|
-
*
|
|
1583
|
+
* Adds the `listener` function to the end of the listeners array for the
|
|
1584
|
+
* event named `eventName`. No checks are made to see if the `listener` has
|
|
1585
|
+
* already been added. Multiple calls passing the same combination of `eventName`
|
|
1586
|
+
* and `listener` will result in the `listener` being added, and called, multiple
|
|
1587
|
+
* times.
|
|
1588
|
+
*
|
|
1589
|
+
* Returns a reference to the `EventEmitter`, so that calls can be chained.
|
|
1590
|
+
*
|
|
1591
|
+
* By default, event listeners are invoked in the order they are added. The
|
|
1592
|
+
* `emitter.prependListener()` method can be used as an alternative to add the
|
|
1593
|
+
* event listener to the beginning of the listeners array.
|
|
1594
|
+
*
|
|
1595
|
+
* @param eventName The name of the event.
|
|
1596
|
+
* @param listener The callback function
|
|
1332
1597
|
*/
|
|
1333
|
-
|
|
1334
|
-
[key: string]: string;
|
|
1335
|
-
};
|
|
1598
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
1336
1599
|
/**
|
|
1337
|
-
*
|
|
1600
|
+
* Adds a **one-time**`listener` function for the event named `eventName`. The
|
|
1601
|
+
* next time `eventName` is triggered, this listener is removed and then invoked.
|
|
1602
|
+
*
|
|
1603
|
+
* By default, event listeners are invoked in the order they are added. The
|
|
1604
|
+
* `emitter.prependOnceListener()` method can be used as an alternative to add the
|
|
1605
|
+
* event listener to the beginning of the listeners array.
|
|
1606
|
+
*
|
|
1607
|
+
* @param eventName The name of the event.
|
|
1608
|
+
* @param listener The callback function
|
|
1338
1609
|
*/
|
|
1339
|
-
|
|
1340
|
-
[key: string]: string;
|
|
1341
|
-
};
|
|
1610
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
1342
1611
|
/**
|
|
1343
|
-
*
|
|
1612
|
+
* Removes the specified `listener` from the listener array for the event
|
|
1613
|
+
* named `eventName`.
|
|
1614
|
+
*
|
|
1615
|
+
* `removeListener()` will remove, at most, one instance of a listener from the
|
|
1616
|
+
* listener array. If any single listener has been added multiple times to the
|
|
1617
|
+
* listener array for the specified `eventName`, then `removeListener()` must be
|
|
1618
|
+
* called multiple times to remove each instance.
|
|
1619
|
+
*
|
|
1620
|
+
* Once an event is emitted, all listeners attached to it at the
|
|
1621
|
+
* time of emitting are called in order. This implies that any`removeListener()`
|
|
1622
|
+
* or `removeAllListeners()` calls _after_ emitting and _before_ the last listener
|
|
1623
|
+
* finishes execution will not remove them from`emit()` in progress. Subsequent
|
|
1624
|
+
* events behave as expected.
|
|
1625
|
+
*
|
|
1626
|
+
* Because listeners are managed using an internal array, calling this will
|
|
1627
|
+
* change the position indices of any listener registered _after_ the listener
|
|
1628
|
+
* being removed. This will not impact the order in which listeners are called,
|
|
1629
|
+
* but it means that any copies of the listener array as returned by
|
|
1630
|
+
* the `emitter.listeners()` method will need to be recreated.
|
|
1631
|
+
*
|
|
1632
|
+
* When a single function has been added as a handler multiple times for a single
|
|
1633
|
+
* event (as in the example below), `removeListener()` will remove the most
|
|
1634
|
+
* recently added instance. In the example the `once('ping')` listener is removed
|
|
1635
|
+
*
|
|
1636
|
+
* @param eventName The name of the event.
|
|
1637
|
+
* @param listener The callback function
|
|
1344
1638
|
*/
|
|
1345
|
-
|
|
1639
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
1346
1640
|
/**
|
|
1347
|
-
*
|
|
1641
|
+
* Alias for `emitter.removeListener()`.
|
|
1642
|
+
*
|
|
1643
|
+
* @param eventName The name of the event.
|
|
1644
|
+
* @param listener The callback function
|
|
1348
1645
|
*/
|
|
1349
|
-
|
|
1350
|
-
[key: string]: any;
|
|
1351
|
-
};
|
|
1646
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): Promise<void>;
|
|
1352
1647
|
/**
|
|
1353
|
-
*
|
|
1648
|
+
* Removes all listeners, or those of the specified `eventName`.
|
|
1649
|
+
*
|
|
1650
|
+
* It is bad practice to remove listeners added elsewhere in the code,
|
|
1651
|
+
* particularly when the `EventEmitter` instance was created by some other
|
|
1652
|
+
* component or module (e.g. sockets or file streams).
|
|
1653
|
+
*
|
|
1654
|
+
* @param eventName The name of the event.
|
|
1354
1655
|
*/
|
|
1355
|
-
|
|
1356
|
-
}
|
|
1357
|
-
/**
|
|
1358
|
-
* Recaptcha interface defines the Recaptcha config
|
|
1359
|
-
*/
|
|
1360
|
-
export interface Recaptcha {
|
|
1656
|
+
removeAllListeners(eventName?: string | symbol): Promise<void>;
|
|
1361
1657
|
/**
|
|
1362
|
-
*
|
|
1658
|
+
* Synchronously calls each of the listeners registered for the event named
|
|
1659
|
+
* `eventName`, in the order they were registered, passing the supplied arguments
|
|
1660
|
+
* to each.
|
|
1661
|
+
*
|
|
1662
|
+
* @returns `true` if the event had listeners, `false` otherwise.
|
|
1663
|
+
*
|
|
1664
|
+
* @param eventName The name of the event.
|
|
1665
|
+
* @param args The arguments for the event.
|
|
1363
1666
|
*/
|
|
1364
|
-
|
|
1667
|
+
emit(eventName: string | symbol, ...args: any[]): Promise<void>;
|
|
1365
1668
|
}
|
|
1366
1669
|
/**
|
|
1367
1670
|
* Pusher interface defines a type that has a push function like an array
|