@oursprivacy/platform-sdk 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +31 -0
- package/client.d.mts +32 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +32 -14
- package/client.d.ts.map +1 -1
- package/client.js +26 -4
- package/client.js.map +1 -1
- package/client.mjs +26 -4
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +60 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +60 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/allowed-events.d.mts +18 -18
- package/resources/allowed-events.d.mts.map +1 -1
- package/resources/allowed-events.d.ts +18 -18
- package/resources/allowed-events.d.ts.map +1 -1
- package/resources/allowed-events.js +7 -7
- package/resources/allowed-events.js.map +1 -1
- package/resources/allowed-events.mjs +7 -7
- package/resources/allowed-events.mjs.map +1 -1
- package/resources/consent-settings.d.mts +2568 -124
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts +2568 -124
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/consent-settings.js +24 -7
- package/resources/consent-settings.js.map +1 -1
- package/resources/consent-settings.mjs +24 -7
- package/resources/consent-settings.mjs.map +1 -1
- package/resources/destinations.d.mts +33 -32
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +33 -32
- package/resources/destinations.d.ts.map +1 -1
- package/resources/destinations.js +8 -7
- package/resources/destinations.js.map +1 -1
- package/resources/destinations.mjs +8 -7
- package/resources/destinations.mjs.map +1 -1
- package/resources/experiment-settings.d.mts +277 -0
- package/resources/experiment-settings.d.mts.map +1 -0
- package/resources/experiment-settings.d.ts +277 -0
- package/resources/experiment-settings.d.ts.map +1 -0
- package/resources/experiment-settings.js +77 -0
- package/resources/experiment-settings.js.map +1 -0
- package/resources/experiment-settings.mjs +73 -0
- package/resources/experiment-settings.mjs.map +1 -0
- package/resources/experiment-variants.d.mts +659 -0
- package/resources/experiment-variants.d.mts.map +1 -0
- package/resources/experiment-variants.d.ts +659 -0
- package/resources/experiment-variants.d.ts.map +1 -0
- package/resources/experiment-variants.js +79 -0
- package/resources/experiment-variants.js.map +1 -0
- package/resources/experiment-variants.mjs +75 -0
- package/resources/experiment-variants.mjs.map +1 -0
- package/resources/experiments.d.mts +2002 -0
- package/resources/experiments.d.mts.map +1 -0
- package/resources/experiments.d.ts +2002 -0
- package/resources/experiments.d.ts.map +1 -0
- package/resources/experiments.js +166 -0
- package/resources/experiments.js.map +1 -0
- package/resources/experiments.mjs +162 -0
- package/resources/experiments.mjs.map +1 -0
- package/resources/global-dispatch-centers.d.mts +125 -58
- package/resources/global-dispatch-centers.d.mts.map +1 -1
- package/resources/global-dispatch-centers.d.ts +125 -58
- package/resources/global-dispatch-centers.d.ts.map +1 -1
- package/resources/global-dispatch-centers.js +10 -7
- package/resources/global-dispatch-centers.js.map +1 -1
- package/resources/global-dispatch-centers.mjs +10 -7
- package/resources/global-dispatch-centers.mjs.map +1 -1
- package/resources/index.d.mts +11 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/mappings.d.mts +136 -0
- package/resources/mappings.d.mts.map +1 -0
- package/resources/mappings.d.ts +136 -0
- package/resources/mappings.d.ts.map +1 -0
- package/resources/mappings.js +41 -0
- package/resources/mappings.js.map +1 -0
- package/resources/mappings.mjs +37 -0
- package/resources/mappings.mjs.map +1 -0
- package/resources/replay-settings.d.mts +48 -48
- package/resources/replay-settings.d.mts.map +1 -1
- package/resources/replay-settings.d.ts +48 -48
- package/resources/replay-settings.d.ts.map +1 -1
- package/resources/replay-settings.js +13 -8
- package/resources/replay-settings.js.map +1 -1
- package/resources/replay-settings.mjs +13 -8
- package/resources/replay-settings.mjs.map +1 -1
- package/resources/sources.d.mts +64 -27
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +64 -27
- package/resources/sources.d.ts.map +1 -1
- package/resources/sources.js +14 -7
- package/resources/sources.js.map +1 -1
- package/resources/sources.mjs +14 -7
- package/resources/sources.mjs.map +1 -1
- package/resources/versions.d.mts +742 -16
- package/resources/versions.d.mts.map +1 -1
- package/resources/versions.d.ts +742 -16
- package/resources/versions.d.ts.map +1 -1
- package/resources/versions.js +45 -5
- package/resources/versions.js.map +1 -1
- package/resources/versions.mjs +45 -5
- package/resources/versions.mjs.map +1 -1
- package/src/client.ts +206 -29
- package/src/core/pagination.ts +165 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/allowed-events.ts +27 -27
- package/src/resources/consent-settings.ts +3036 -244
- package/src/resources/destinations.ts +128 -127
- package/src/resources/experiment-settings.ts +367 -0
- package/src/resources/experiment-variants.ts +870 -0
- package/src/resources/experiments.ts +2446 -0
- package/src/resources/global-dispatch-centers.ts +155 -65
- package/src/resources/index.ts +75 -7
- package/src/resources/mappings.ts +230 -0
- package/src/resources/replay-settings.ts +67 -59
- package/src/resources/sources.ts +116 -71
- package/src/resources/versions.ts +1130 -17
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -7,7 +7,20 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class ConsentSettings extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* List all consent settings. Requires scope: consentSettings:list
|
|
11
|
+
*/
|
|
12
|
+
list(options?: RequestOptions): APIPromise<ConsentSettingListResponse> {
|
|
13
|
+
return this._client.get('/rest/v1/consent-settings', options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Create a new consent settings record. POST takes no request body — the server
|
|
18
|
+
* initializes the record with defaults (Disabled status, opt-out default rule,
|
|
19
|
+
* English translations, necessary/analytics/advertising categories, no regions, no
|
|
20
|
+
* whitelisted domains). Configure the record afterward with PATCH (partial update)
|
|
21
|
+
* or PUT (full replacement). Returns the same shape as GET so you can read the
|
|
22
|
+
* server-assigned `id`, default rule, and categories without a follow-up fetch.
|
|
23
|
+
* Requires scope: consentSettings:create
|
|
11
24
|
*/
|
|
12
25
|
create(options?: RequestOptions): APIPromise<ConsentSettingCreateResponse> {
|
|
13
26
|
return this._client.post('/rest/v1/consent-settings', options);
|
|
@@ -21,21 +34,30 @@ export class ConsentSettings extends APIResource {
|
|
|
21
34
|
}
|
|
22
35
|
|
|
23
36
|
/**
|
|
24
|
-
*
|
|
37
|
+
* Replace a consent setting. Send the full ConsentSettingsInput body — omitted
|
|
38
|
+
* optional fields are reset. Use PATCH for partial updates. Requires scope:
|
|
39
|
+
* consentSettings:update
|
|
25
40
|
*/
|
|
26
|
-
|
|
41
|
+
replace(
|
|
27
42
|
id: string,
|
|
28
|
-
body:
|
|
43
|
+
body: ConsentSettingReplaceParams,
|
|
29
44
|
options?: RequestOptions,
|
|
30
|
-
): APIPromise<
|
|
31
|
-
return this._client.
|
|
45
|
+
): APIPromise<ConsentSettingReplaceResponse> {
|
|
46
|
+
return this._client.put(path`/rest/v1/consent-settings/${id}`, { body, ...options });
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
/**
|
|
35
|
-
*
|
|
50
|
+
* Partially update a consent setting. Send only the fields you want to change —
|
|
51
|
+
* every field is optional and unspecified fields are preserved. List-valued fields
|
|
52
|
+
* (services, categories, regions) are replaced wholesale when sent. Requires
|
|
53
|
+
* scope: consentSettings:update
|
|
36
54
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
55
|
+
update(
|
|
56
|
+
id: string,
|
|
57
|
+
body: ConsentSettingUpdateParams,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): APIPromise<ConsentSettingUpdateResponse> {
|
|
60
|
+
return this._client.patch(path`/rest/v1/consent-settings/${id}`, { body, ...options });
|
|
39
61
|
}
|
|
40
62
|
|
|
41
63
|
/**
|
|
@@ -46,85 +68,2725 @@ export class ConsentSettings extends APIResource {
|
|
|
46
68
|
}
|
|
47
69
|
}
|
|
48
70
|
|
|
49
|
-
export interface
|
|
50
|
-
|
|
71
|
+
export interface ConsentSettingListResponse {
|
|
72
|
+
entities: Array<ConsentSettingListResponse.Entity>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export namespace ConsentSettingListResponse {
|
|
76
|
+
export interface Entity {
|
|
77
|
+
/**
|
|
78
|
+
* Server-assigned UUID for this consent settings record.
|
|
79
|
+
*/
|
|
80
|
+
id: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Top-level consent categories (e.g. necessary / analytics / advertising). Server
|
|
84
|
+
* re-stamps `priority` to 0..N on write.
|
|
85
|
+
*/
|
|
86
|
+
categories: Array<Entity.Category>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* ISO 8601 timestamp when the record was created.
|
|
90
|
+
*/
|
|
91
|
+
createdAt: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
95
|
+
*/
|
|
96
|
+
default: Entity.Default;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Discriminator for the entity type. Always "consentSettings".
|
|
100
|
+
*/
|
|
101
|
+
kind: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Human-readable name shown in the dashboard.
|
|
105
|
+
*/
|
|
106
|
+
name: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Per-region rule overrides. The first rule whose `regionCode`/`additionalRegions`
|
|
110
|
+
* includes the user's region wins; otherwise `default` applies.
|
|
111
|
+
*/
|
|
112
|
+
regions: Array<Entity.Region>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Per-service entries powering "show vendors" and category-aware blocking.
|
|
116
|
+
*/
|
|
117
|
+
services: Array<Entity.Service>;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Enabled means the CMP serves on whitelisted domains; Disabled means it does not.
|
|
121
|
+
*/
|
|
122
|
+
status: 'Disabled' | 'Enabled';
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Name of the cookie that stores the user's consent state. Defaults to
|
|
126
|
+
* "op_consent".
|
|
127
|
+
*/
|
|
128
|
+
consentCookieName?: string | null;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Optional custom CDN domain for serving the CMP script (e.g.
|
|
132
|
+
* consent.example.com).
|
|
133
|
+
*/
|
|
134
|
+
customDomain?: string | null;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Revision counter. Bump this to force users who already consented to see the
|
|
138
|
+
* modal again (the SDK compares the persisted revision against this value).
|
|
139
|
+
*/
|
|
140
|
+
revision?: number | null;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* CSS class names that opt scripts out of consent blocking. Each entry must be a
|
|
144
|
+
* single class token (no whitespace).
|
|
145
|
+
*/
|
|
146
|
+
skipBlockingClassNames?: Array<string> | null;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* ISO 8601 timestamp of the last write. Null on a freshly created record.
|
|
150
|
+
*/
|
|
151
|
+
updatedAt?: string | null;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Pixel of the WebSource that this CMP is wired into. Setting this to a token that
|
|
155
|
+
* is not a valid WebSource of yours is rejected; use null to clear the link.
|
|
156
|
+
*/
|
|
157
|
+
webSDKToken?: string | null;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Allowlist of domains where this CMP configuration may run. Used at runtime to
|
|
161
|
+
* derive the broadest matching base domain so consent can persist across matching
|
|
162
|
+
* subdomains.
|
|
163
|
+
*/
|
|
164
|
+
whitelistDomains?: Array<string> | null;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export namespace Entity {
|
|
168
|
+
export interface Category {
|
|
169
|
+
/**
|
|
170
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
171
|
+
*/
|
|
172
|
+
label: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
176
|
+
* any integer, gaps and duplicates are ironed out.
|
|
177
|
+
*/
|
|
178
|
+
priority: number;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Stable identifier referenced by services and translation sections.
|
|
182
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
183
|
+
*/
|
|
184
|
+
value: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
189
|
+
*/
|
|
190
|
+
export interface Default {
|
|
191
|
+
/**
|
|
192
|
+
* Per-category default config for this rule. Every category defined in the
|
|
193
|
+
* top-level `categories[].value` should have an entry here.
|
|
194
|
+
*/
|
|
195
|
+
categories: Array<Default.Category>;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
199
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
200
|
+
*/
|
|
201
|
+
language: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
205
|
+
* default until user rejects (CCPA style).
|
|
206
|
+
*/
|
|
207
|
+
mode: 'opt_in' | 'opt_out';
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
211
|
+
* the rule's `language` field.
|
|
212
|
+
*/
|
|
213
|
+
translations: Array<Default.Translation>;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
217
|
+
* in.
|
|
218
|
+
*/
|
|
219
|
+
autoblockUnknown?: boolean | null;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* When true, the consent modal auto-opens on page load.
|
|
223
|
+
*/
|
|
224
|
+
autoShow?: boolean | null;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
228
|
+
*/
|
|
229
|
+
autoShowDismissConfig?: unknown | null;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
233
|
+
*/
|
|
234
|
+
autoShowDismissMode?: string | null;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
238
|
+
* chooses.
|
|
239
|
+
*/
|
|
240
|
+
disablePageInteraction?: boolean | null;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Visual options for the modals (layout/position/colors).
|
|
244
|
+
*/
|
|
245
|
+
guiOptions?: unknown | null;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
249
|
+
*/
|
|
250
|
+
hideFromBots?: boolean | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
254
|
+
* modal.
|
|
255
|
+
*/
|
|
256
|
+
showVendorsInPreferences?: boolean | null;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export namespace Default {
|
|
260
|
+
export interface Category {
|
|
261
|
+
/**
|
|
262
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
263
|
+
*/
|
|
264
|
+
key: string;
|
|
265
|
+
|
|
266
|
+
value: Category.Value;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export namespace Category {
|
|
270
|
+
export interface Value {
|
|
271
|
+
/**
|
|
272
|
+
* Whether this category is on by default before the user interacts.
|
|
273
|
+
*/
|
|
274
|
+
enabled: boolean;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
278
|
+
*/
|
|
279
|
+
autoDisableOnGPC?: boolean | null;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
283
|
+
*/
|
|
284
|
+
readOnly?: boolean | null;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
288
|
+
* scripts can run.
|
|
289
|
+
*/
|
|
290
|
+
reloadPage?: boolean | null;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface Translation {
|
|
295
|
+
/**
|
|
296
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
297
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
298
|
+
*/
|
|
299
|
+
language: string;
|
|
300
|
+
|
|
301
|
+
value: Translation.Value;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export namespace Translation {
|
|
305
|
+
export interface Value {
|
|
306
|
+
/**
|
|
307
|
+
* Translated copy for the initial consent modal.
|
|
308
|
+
*/
|
|
309
|
+
consentModal?: unknown | null;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Translated copy for the preferences modal.
|
|
313
|
+
*/
|
|
314
|
+
preferencesModal?: unknown | null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
51
318
|
|
|
52
|
-
|
|
319
|
+
export interface Region {
|
|
320
|
+
/**
|
|
321
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
322
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
323
|
+
* may appear in only one rule across `regions[]`.
|
|
324
|
+
*/
|
|
325
|
+
regionCode: string;
|
|
326
|
+
|
|
327
|
+
rule: Region.Rule;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
331
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
332
|
+
* overlap with another rule's regions.
|
|
333
|
+
*/
|
|
334
|
+
additionalRegions?: Array<string> | null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export namespace Region {
|
|
338
|
+
export interface Rule {
|
|
339
|
+
/**
|
|
340
|
+
* Per-category default config for this rule. Every category defined in the
|
|
341
|
+
* top-level `categories[].value` should have an entry here.
|
|
342
|
+
*/
|
|
343
|
+
categories: Array<Rule.Category>;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
347
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
348
|
+
*/
|
|
349
|
+
language: string;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
353
|
+
* default until user rejects (CCPA style).
|
|
354
|
+
*/
|
|
355
|
+
mode: 'opt_in' | 'opt_out';
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
359
|
+
* the rule's `language` field.
|
|
360
|
+
*/
|
|
361
|
+
translations: Array<Rule.Translation>;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
365
|
+
* in.
|
|
366
|
+
*/
|
|
367
|
+
autoblockUnknown?: boolean | null;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* When true, the consent modal auto-opens on page load.
|
|
371
|
+
*/
|
|
372
|
+
autoShow?: boolean | null;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
376
|
+
*/
|
|
377
|
+
autoShowDismissConfig?: unknown | null;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
381
|
+
*/
|
|
382
|
+
autoShowDismissMode?: string | null;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
386
|
+
* chooses.
|
|
387
|
+
*/
|
|
388
|
+
disablePageInteraction?: boolean | null;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Visual options for the modals (layout/position/colors).
|
|
392
|
+
*/
|
|
393
|
+
guiOptions?: unknown | null;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
397
|
+
*/
|
|
398
|
+
hideFromBots?: boolean | null;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
402
|
+
* modal.
|
|
403
|
+
*/
|
|
404
|
+
showVendorsInPreferences?: boolean | null;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export namespace Rule {
|
|
408
|
+
export interface Category {
|
|
409
|
+
/**
|
|
410
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
411
|
+
*/
|
|
412
|
+
key: string;
|
|
413
|
+
|
|
414
|
+
value: Category.Value;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export namespace Category {
|
|
418
|
+
export interface Value {
|
|
419
|
+
/**
|
|
420
|
+
* Whether this category is on by default before the user interacts.
|
|
421
|
+
*/
|
|
422
|
+
enabled: boolean;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
426
|
+
*/
|
|
427
|
+
autoDisableOnGPC?: boolean | null;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
431
|
+
*/
|
|
432
|
+
readOnly?: boolean | null;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
436
|
+
* scripts can run.
|
|
437
|
+
*/
|
|
438
|
+
reloadPage?: boolean | null;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface Translation {
|
|
443
|
+
/**
|
|
444
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
445
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
446
|
+
*/
|
|
447
|
+
language: string;
|
|
448
|
+
|
|
449
|
+
value: Translation.Value;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export namespace Translation {
|
|
453
|
+
export interface Value {
|
|
454
|
+
/**
|
|
455
|
+
* Translated copy for the initial consent modal.
|
|
456
|
+
*/
|
|
457
|
+
consentModal?: unknown | null;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Translated copy for the preferences modal.
|
|
461
|
+
*/
|
|
462
|
+
preferencesModal?: unknown | null;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface Service {
|
|
469
|
+
/**
|
|
470
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
471
|
+
*/
|
|
472
|
+
internalNotes: string;
|
|
53
473
|
|
|
54
|
-
|
|
474
|
+
/**
|
|
475
|
+
* Display name for this service in the preferences modal.
|
|
476
|
+
*/
|
|
477
|
+
label: string;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Extra category values this service belongs to. Each must match a
|
|
481
|
+
* `categories[].value`.
|
|
482
|
+
*/
|
|
483
|
+
additionalCategories?: Array<string> | null;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
487
|
+
* `categories[].value` entries.
|
|
488
|
+
*/
|
|
489
|
+
category?: string | null;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
493
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
494
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
495
|
+
* specific script.
|
|
496
|
+
*/
|
|
497
|
+
domainPatterns?: Array<string> | null;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
55
500
|
}
|
|
56
501
|
|
|
57
|
-
export interface
|
|
502
|
+
export interface ConsentSettingCreateResponse {
|
|
503
|
+
/**
|
|
504
|
+
* Server-assigned UUID for this consent settings record.
|
|
505
|
+
*/
|
|
58
506
|
id: string;
|
|
59
507
|
|
|
60
|
-
|
|
508
|
+
/**
|
|
509
|
+
* Top-level consent categories (e.g. necessary / analytics / advertising). Server
|
|
510
|
+
* re-stamps `priority` to 0..N on write.
|
|
511
|
+
*/
|
|
512
|
+
categories: Array<ConsentSettingCreateResponse.Category>;
|
|
61
513
|
|
|
514
|
+
/**
|
|
515
|
+
* ISO 8601 timestamp when the record was created.
|
|
516
|
+
*/
|
|
62
517
|
createdAt: string;
|
|
63
518
|
|
|
64
|
-
|
|
519
|
+
/**
|
|
520
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
521
|
+
*/
|
|
522
|
+
default: ConsentSettingCreateResponse.Default;
|
|
65
523
|
|
|
524
|
+
/**
|
|
525
|
+
* Discriminator for the entity type. Always "consentSettings".
|
|
526
|
+
*/
|
|
66
527
|
kind: string;
|
|
67
528
|
|
|
529
|
+
/**
|
|
530
|
+
* Human-readable name shown in the dashboard.
|
|
531
|
+
*/
|
|
68
532
|
name: string;
|
|
69
533
|
|
|
70
|
-
|
|
534
|
+
/**
|
|
535
|
+
* Per-region rule overrides. The first rule whose `regionCode`/`additionalRegions`
|
|
536
|
+
* includes the user's region wins; otherwise `default` applies.
|
|
537
|
+
*/
|
|
538
|
+
regions: Array<ConsentSettingCreateResponse.Region>;
|
|
71
539
|
|
|
72
|
-
|
|
540
|
+
/**
|
|
541
|
+
* Per-service entries powering "show vendors" and category-aware blocking.
|
|
542
|
+
*/
|
|
543
|
+
services: Array<ConsentSettingCreateResponse.Service>;
|
|
73
544
|
|
|
545
|
+
/**
|
|
546
|
+
* Enabled means the CMP serves on whitelisted domains; Disabled means it does not.
|
|
547
|
+
*/
|
|
74
548
|
status: 'Disabled' | 'Enabled';
|
|
75
549
|
|
|
550
|
+
/**
|
|
551
|
+
* Name of the cookie that stores the user's consent state. Defaults to
|
|
552
|
+
* "op_consent".
|
|
553
|
+
*/
|
|
76
554
|
consentCookieName?: string | null;
|
|
77
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Optional custom CDN domain for serving the CMP script (e.g.
|
|
558
|
+
* consent.example.com).
|
|
559
|
+
*/
|
|
78
560
|
customDomain?: string | null;
|
|
79
561
|
|
|
562
|
+
/**
|
|
563
|
+
* Revision counter. Bump this to force users who already consented to see the
|
|
564
|
+
* modal again (the SDK compares the persisted revision against this value).
|
|
565
|
+
*/
|
|
80
566
|
revision?: number | null;
|
|
81
567
|
|
|
568
|
+
/**
|
|
569
|
+
* CSS class names that opt scripts out of consent blocking. Each entry must be a
|
|
570
|
+
* single class token (no whitespace).
|
|
571
|
+
*/
|
|
82
572
|
skipBlockingClassNames?: Array<string> | null;
|
|
83
573
|
|
|
574
|
+
/**
|
|
575
|
+
* ISO 8601 timestamp of the last write. Null on a freshly created record.
|
|
576
|
+
*/
|
|
84
577
|
updatedAt?: string | null;
|
|
85
578
|
|
|
579
|
+
/**
|
|
580
|
+
* Pixel of the WebSource that this CMP is wired into. Setting this to a token that
|
|
581
|
+
* is not a valid WebSource of yours is rejected; use null to clear the link.
|
|
582
|
+
*/
|
|
583
|
+
webSDKToken?: string | null;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Allowlist of domains where this CMP configuration may run. Used at runtime to
|
|
587
|
+
* derive the broadest matching base domain so consent can persist across matching
|
|
588
|
+
* subdomains.
|
|
589
|
+
*/
|
|
590
|
+
whitelistDomains?: Array<string> | null;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export namespace ConsentSettingCreateResponse {
|
|
594
|
+
export interface Category {
|
|
595
|
+
/**
|
|
596
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
597
|
+
*/
|
|
598
|
+
label: string;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
602
|
+
* any integer, gaps and duplicates are ironed out.
|
|
603
|
+
*/
|
|
604
|
+
priority: number;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Stable identifier referenced by services and translation sections.
|
|
608
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
609
|
+
*/
|
|
610
|
+
value: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
615
|
+
*/
|
|
616
|
+
export interface Default {
|
|
617
|
+
/**
|
|
618
|
+
* Per-category default config for this rule. Every category defined in the
|
|
619
|
+
* top-level `categories[].value` should have an entry here.
|
|
620
|
+
*/
|
|
621
|
+
categories: Array<Default.Category>;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
625
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
626
|
+
*/
|
|
627
|
+
language: string;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
631
|
+
* default until user rejects (CCPA style).
|
|
632
|
+
*/
|
|
633
|
+
mode: 'opt_in' | 'opt_out';
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
637
|
+
* the rule's `language` field.
|
|
638
|
+
*/
|
|
639
|
+
translations: Array<Default.Translation>;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
643
|
+
* in.
|
|
644
|
+
*/
|
|
645
|
+
autoblockUnknown?: boolean | null;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* When true, the consent modal auto-opens on page load.
|
|
649
|
+
*/
|
|
650
|
+
autoShow?: boolean | null;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
654
|
+
*/
|
|
655
|
+
autoShowDismissConfig?: unknown | null;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
659
|
+
*/
|
|
660
|
+
autoShowDismissMode?: string | null;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
664
|
+
* chooses.
|
|
665
|
+
*/
|
|
666
|
+
disablePageInteraction?: boolean | null;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Visual options for the modals (layout/position/colors).
|
|
670
|
+
*/
|
|
671
|
+
guiOptions?: unknown | null;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
675
|
+
*/
|
|
676
|
+
hideFromBots?: boolean | null;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
680
|
+
* modal.
|
|
681
|
+
*/
|
|
682
|
+
showVendorsInPreferences?: boolean | null;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export namespace Default {
|
|
686
|
+
export interface Category {
|
|
687
|
+
/**
|
|
688
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
689
|
+
*/
|
|
690
|
+
key: string;
|
|
691
|
+
|
|
692
|
+
value: Category.Value;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export namespace Category {
|
|
696
|
+
export interface Value {
|
|
697
|
+
/**
|
|
698
|
+
* Whether this category is on by default before the user interacts.
|
|
699
|
+
*/
|
|
700
|
+
enabled: boolean;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
704
|
+
*/
|
|
705
|
+
autoDisableOnGPC?: boolean | null;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
709
|
+
*/
|
|
710
|
+
readOnly?: boolean | null;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
714
|
+
* scripts can run.
|
|
715
|
+
*/
|
|
716
|
+
reloadPage?: boolean | null;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export interface Translation {
|
|
721
|
+
/**
|
|
722
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
723
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
724
|
+
*/
|
|
725
|
+
language: string;
|
|
726
|
+
|
|
727
|
+
value: Translation.Value;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
export namespace Translation {
|
|
731
|
+
export interface Value {
|
|
732
|
+
/**
|
|
733
|
+
* Translated copy for the initial consent modal.
|
|
734
|
+
*/
|
|
735
|
+
consentModal?: unknown | null;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Translated copy for the preferences modal.
|
|
739
|
+
*/
|
|
740
|
+
preferencesModal?: unknown | null;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export interface Region {
|
|
746
|
+
/**
|
|
747
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
748
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
749
|
+
* may appear in only one rule across `regions[]`.
|
|
750
|
+
*/
|
|
751
|
+
regionCode: string;
|
|
752
|
+
|
|
753
|
+
rule: Region.Rule;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
757
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
758
|
+
* overlap with another rule's regions.
|
|
759
|
+
*/
|
|
760
|
+
additionalRegions?: Array<string> | null;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export namespace Region {
|
|
764
|
+
export interface Rule {
|
|
765
|
+
/**
|
|
766
|
+
* Per-category default config for this rule. Every category defined in the
|
|
767
|
+
* top-level `categories[].value` should have an entry here.
|
|
768
|
+
*/
|
|
769
|
+
categories: Array<Rule.Category>;
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
773
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
774
|
+
*/
|
|
775
|
+
language: string;
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
779
|
+
* default until user rejects (CCPA style).
|
|
780
|
+
*/
|
|
781
|
+
mode: 'opt_in' | 'opt_out';
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
785
|
+
* the rule's `language` field.
|
|
786
|
+
*/
|
|
787
|
+
translations: Array<Rule.Translation>;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
791
|
+
* in.
|
|
792
|
+
*/
|
|
793
|
+
autoblockUnknown?: boolean | null;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* When true, the consent modal auto-opens on page load.
|
|
797
|
+
*/
|
|
798
|
+
autoShow?: boolean | null;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
802
|
+
*/
|
|
803
|
+
autoShowDismissConfig?: unknown | null;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
807
|
+
*/
|
|
808
|
+
autoShowDismissMode?: string | null;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
812
|
+
* chooses.
|
|
813
|
+
*/
|
|
814
|
+
disablePageInteraction?: boolean | null;
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Visual options for the modals (layout/position/colors).
|
|
818
|
+
*/
|
|
819
|
+
guiOptions?: unknown | null;
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
823
|
+
*/
|
|
824
|
+
hideFromBots?: boolean | null;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
828
|
+
* modal.
|
|
829
|
+
*/
|
|
830
|
+
showVendorsInPreferences?: boolean | null;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
export namespace Rule {
|
|
834
|
+
export interface Category {
|
|
835
|
+
/**
|
|
836
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
837
|
+
*/
|
|
838
|
+
key: string;
|
|
839
|
+
|
|
840
|
+
value: Category.Value;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
export namespace Category {
|
|
844
|
+
export interface Value {
|
|
845
|
+
/**
|
|
846
|
+
* Whether this category is on by default before the user interacts.
|
|
847
|
+
*/
|
|
848
|
+
enabled: boolean;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
852
|
+
*/
|
|
853
|
+
autoDisableOnGPC?: boolean | null;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
857
|
+
*/
|
|
858
|
+
readOnly?: boolean | null;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
862
|
+
* scripts can run.
|
|
863
|
+
*/
|
|
864
|
+
reloadPage?: boolean | null;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export interface Translation {
|
|
869
|
+
/**
|
|
870
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
871
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
872
|
+
*/
|
|
873
|
+
language: string;
|
|
874
|
+
|
|
875
|
+
value: Translation.Value;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
export namespace Translation {
|
|
879
|
+
export interface Value {
|
|
880
|
+
/**
|
|
881
|
+
* Translated copy for the initial consent modal.
|
|
882
|
+
*/
|
|
883
|
+
consentModal?: unknown | null;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Translated copy for the preferences modal.
|
|
887
|
+
*/
|
|
888
|
+
preferencesModal?: unknown | null;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
export interface Service {
|
|
895
|
+
/**
|
|
896
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
897
|
+
*/
|
|
898
|
+
internalNotes: string;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Display name for this service in the preferences modal.
|
|
902
|
+
*/
|
|
903
|
+
label: string;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Extra category values this service belongs to. Each must match a
|
|
907
|
+
* `categories[].value`.
|
|
908
|
+
*/
|
|
909
|
+
additionalCategories?: Array<string> | null;
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
913
|
+
* `categories[].value` entries.
|
|
914
|
+
*/
|
|
915
|
+
category?: string | null;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
919
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
920
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
921
|
+
* specific script.
|
|
922
|
+
*/
|
|
923
|
+
domainPatterns?: Array<string> | null;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export interface ConsentSettingRetrieveResponse {
|
|
928
|
+
/**
|
|
929
|
+
* Server-assigned UUID for this consent settings record.
|
|
930
|
+
*/
|
|
931
|
+
id: string;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Top-level consent categories (e.g. necessary / analytics / advertising). Server
|
|
935
|
+
* re-stamps `priority` to 0..N on write.
|
|
936
|
+
*/
|
|
937
|
+
categories: Array<ConsentSettingRetrieveResponse.Category>;
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* ISO 8601 timestamp when the record was created.
|
|
941
|
+
*/
|
|
942
|
+
createdAt: string;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
946
|
+
*/
|
|
947
|
+
default: ConsentSettingRetrieveResponse.Default;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Discriminator for the entity type. Always "consentSettings".
|
|
951
|
+
*/
|
|
952
|
+
kind: string;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Human-readable name shown in the dashboard.
|
|
956
|
+
*/
|
|
957
|
+
name: string;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Per-region rule overrides. The first rule whose `regionCode`/`additionalRegions`
|
|
961
|
+
* includes the user's region wins; otherwise `default` applies.
|
|
962
|
+
*/
|
|
963
|
+
regions: Array<ConsentSettingRetrieveResponse.Region>;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Per-service entries powering "show vendors" and category-aware blocking.
|
|
967
|
+
*/
|
|
968
|
+
services: Array<ConsentSettingRetrieveResponse.Service>;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Enabled means the CMP serves on whitelisted domains; Disabled means it does not.
|
|
972
|
+
*/
|
|
973
|
+
status: 'Disabled' | 'Enabled';
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Name of the cookie that stores the user's consent state. Defaults to
|
|
977
|
+
* "op_consent".
|
|
978
|
+
*/
|
|
979
|
+
consentCookieName?: string | null;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Optional custom CDN domain for serving the CMP script (e.g.
|
|
983
|
+
* consent.example.com).
|
|
984
|
+
*/
|
|
985
|
+
customDomain?: string | null;
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Revision counter. Bump this to force users who already consented to see the
|
|
989
|
+
* modal again (the SDK compares the persisted revision against this value).
|
|
990
|
+
*/
|
|
991
|
+
revision?: number | null;
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* CSS class names that opt scripts out of consent blocking. Each entry must be a
|
|
995
|
+
* single class token (no whitespace).
|
|
996
|
+
*/
|
|
997
|
+
skipBlockingClassNames?: Array<string> | null;
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* ISO 8601 timestamp of the last write. Null on a freshly created record.
|
|
1001
|
+
*/
|
|
1002
|
+
updatedAt?: string | null;
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Pixel of the WebSource that this CMP is wired into. Setting this to a token that
|
|
1006
|
+
* is not a valid WebSource of yours is rejected; use null to clear the link.
|
|
1007
|
+
*/
|
|
1008
|
+
webSDKToken?: string | null;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Allowlist of domains where this CMP configuration may run. Used at runtime to
|
|
1012
|
+
* derive the broadest matching base domain so consent can persist across matching
|
|
1013
|
+
* subdomains.
|
|
1014
|
+
*/
|
|
1015
|
+
whitelistDomains?: Array<string> | null;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
export namespace ConsentSettingRetrieveResponse {
|
|
1019
|
+
export interface Category {
|
|
1020
|
+
/**
|
|
1021
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
1022
|
+
*/
|
|
1023
|
+
label: string;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
1027
|
+
* any integer, gaps and duplicates are ironed out.
|
|
1028
|
+
*/
|
|
1029
|
+
priority: number;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Stable identifier referenced by services and translation sections.
|
|
1033
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
1034
|
+
*/
|
|
1035
|
+
value: string;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
1040
|
+
*/
|
|
1041
|
+
export interface Default {
|
|
1042
|
+
/**
|
|
1043
|
+
* Per-category default config for this rule. Every category defined in the
|
|
1044
|
+
* top-level `categories[].value` should have an entry here.
|
|
1045
|
+
*/
|
|
1046
|
+
categories: Array<Default.Category>;
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
1050
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
1051
|
+
*/
|
|
1052
|
+
language: string;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
1056
|
+
* default until user rejects (CCPA style).
|
|
1057
|
+
*/
|
|
1058
|
+
mode: 'opt_in' | 'opt_out';
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
1062
|
+
* the rule's `language` field.
|
|
1063
|
+
*/
|
|
1064
|
+
translations: Array<Default.Translation>;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
1068
|
+
* in.
|
|
1069
|
+
*/
|
|
1070
|
+
autoblockUnknown?: boolean | null;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* When true, the consent modal auto-opens on page load.
|
|
1074
|
+
*/
|
|
1075
|
+
autoShow?: boolean | null;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
1079
|
+
*/
|
|
1080
|
+
autoShowDismissConfig?: unknown | null;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
1084
|
+
*/
|
|
1085
|
+
autoShowDismissMode?: string | null;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
1089
|
+
* chooses.
|
|
1090
|
+
*/
|
|
1091
|
+
disablePageInteraction?: boolean | null;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Visual options for the modals (layout/position/colors).
|
|
1095
|
+
*/
|
|
1096
|
+
guiOptions?: unknown | null;
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
1100
|
+
*/
|
|
1101
|
+
hideFromBots?: boolean | null;
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
1105
|
+
* modal.
|
|
1106
|
+
*/
|
|
1107
|
+
showVendorsInPreferences?: boolean | null;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
export namespace Default {
|
|
1111
|
+
export interface Category {
|
|
1112
|
+
/**
|
|
1113
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
1114
|
+
*/
|
|
1115
|
+
key: string;
|
|
1116
|
+
|
|
1117
|
+
value: Category.Value;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
export namespace Category {
|
|
1121
|
+
export interface Value {
|
|
1122
|
+
/**
|
|
1123
|
+
* Whether this category is on by default before the user interacts.
|
|
1124
|
+
*/
|
|
1125
|
+
enabled: boolean;
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
1129
|
+
*/
|
|
1130
|
+
autoDisableOnGPC?: boolean | null;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
1134
|
+
*/
|
|
1135
|
+
readOnly?: boolean | null;
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
1139
|
+
* scripts can run.
|
|
1140
|
+
*/
|
|
1141
|
+
reloadPage?: boolean | null;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
export interface Translation {
|
|
1146
|
+
/**
|
|
1147
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
1148
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
1149
|
+
*/
|
|
1150
|
+
language: string;
|
|
1151
|
+
|
|
1152
|
+
value: Translation.Value;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
export namespace Translation {
|
|
1156
|
+
export interface Value {
|
|
1157
|
+
/**
|
|
1158
|
+
* Translated copy for the initial consent modal.
|
|
1159
|
+
*/
|
|
1160
|
+
consentModal?: unknown | null;
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Translated copy for the preferences modal.
|
|
1164
|
+
*/
|
|
1165
|
+
preferencesModal?: unknown | null;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
export interface Region {
|
|
1171
|
+
/**
|
|
1172
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
1173
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
1174
|
+
* may appear in only one rule across `regions[]`.
|
|
1175
|
+
*/
|
|
1176
|
+
regionCode: string;
|
|
1177
|
+
|
|
1178
|
+
rule: Region.Rule;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
1182
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
1183
|
+
* overlap with another rule's regions.
|
|
1184
|
+
*/
|
|
1185
|
+
additionalRegions?: Array<string> | null;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
export namespace Region {
|
|
1189
|
+
export interface Rule {
|
|
1190
|
+
/**
|
|
1191
|
+
* Per-category default config for this rule. Every category defined in the
|
|
1192
|
+
* top-level `categories[].value` should have an entry here.
|
|
1193
|
+
*/
|
|
1194
|
+
categories: Array<Rule.Category>;
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
1198
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
1199
|
+
*/
|
|
1200
|
+
language: string;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
1204
|
+
* default until user rejects (CCPA style).
|
|
1205
|
+
*/
|
|
1206
|
+
mode: 'opt_in' | 'opt_out';
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
1210
|
+
* the rule's `language` field.
|
|
1211
|
+
*/
|
|
1212
|
+
translations: Array<Rule.Translation>;
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
1216
|
+
* in.
|
|
1217
|
+
*/
|
|
1218
|
+
autoblockUnknown?: boolean | null;
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* When true, the consent modal auto-opens on page load.
|
|
1222
|
+
*/
|
|
1223
|
+
autoShow?: boolean | null;
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
1227
|
+
*/
|
|
1228
|
+
autoShowDismissConfig?: unknown | null;
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
1232
|
+
*/
|
|
1233
|
+
autoShowDismissMode?: string | null;
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
1237
|
+
* chooses.
|
|
1238
|
+
*/
|
|
1239
|
+
disablePageInteraction?: boolean | null;
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Visual options for the modals (layout/position/colors).
|
|
1243
|
+
*/
|
|
1244
|
+
guiOptions?: unknown | null;
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
1248
|
+
*/
|
|
1249
|
+
hideFromBots?: boolean | null;
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
1253
|
+
* modal.
|
|
1254
|
+
*/
|
|
1255
|
+
showVendorsInPreferences?: boolean | null;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
export namespace Rule {
|
|
1259
|
+
export interface Category {
|
|
1260
|
+
/**
|
|
1261
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
1262
|
+
*/
|
|
1263
|
+
key: string;
|
|
1264
|
+
|
|
1265
|
+
value: Category.Value;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
export namespace Category {
|
|
1269
|
+
export interface Value {
|
|
1270
|
+
/**
|
|
1271
|
+
* Whether this category is on by default before the user interacts.
|
|
1272
|
+
*/
|
|
1273
|
+
enabled: boolean;
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
1277
|
+
*/
|
|
1278
|
+
autoDisableOnGPC?: boolean | null;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
1282
|
+
*/
|
|
1283
|
+
readOnly?: boolean | null;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
1287
|
+
* scripts can run.
|
|
1288
|
+
*/
|
|
1289
|
+
reloadPage?: boolean | null;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
export interface Translation {
|
|
1294
|
+
/**
|
|
1295
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
1296
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
1297
|
+
*/
|
|
1298
|
+
language: string;
|
|
1299
|
+
|
|
1300
|
+
value: Translation.Value;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
export namespace Translation {
|
|
1304
|
+
export interface Value {
|
|
1305
|
+
/**
|
|
1306
|
+
* Translated copy for the initial consent modal.
|
|
1307
|
+
*/
|
|
1308
|
+
consentModal?: unknown | null;
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
* Translated copy for the preferences modal.
|
|
1312
|
+
*/
|
|
1313
|
+
preferencesModal?: unknown | null;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
export interface Service {
|
|
1320
|
+
/**
|
|
1321
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
1322
|
+
*/
|
|
1323
|
+
internalNotes: string;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Display name for this service in the preferences modal.
|
|
1327
|
+
*/
|
|
1328
|
+
label: string;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Extra category values this service belongs to. Each must match a
|
|
1332
|
+
* `categories[].value`.
|
|
1333
|
+
*/
|
|
1334
|
+
additionalCategories?: Array<string> | null;
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
1338
|
+
* `categories[].value` entries.
|
|
1339
|
+
*/
|
|
1340
|
+
category?: string | null;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
1344
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
1345
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
1346
|
+
* specific script.
|
|
1347
|
+
*/
|
|
1348
|
+
domainPatterns?: Array<string> | null;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
export interface ConsentSettingReplaceResponse {
|
|
1353
|
+
/**
|
|
1354
|
+
* Server-assigned UUID for this consent settings record.
|
|
1355
|
+
*/
|
|
1356
|
+
id: string;
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Top-level consent categories (e.g. necessary / analytics / advertising). Server
|
|
1360
|
+
* re-stamps `priority` to 0..N on write.
|
|
1361
|
+
*/
|
|
1362
|
+
categories: Array<ConsentSettingReplaceResponse.Category>;
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* ISO 8601 timestamp when the record was created.
|
|
1366
|
+
*/
|
|
1367
|
+
createdAt: string;
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
1371
|
+
*/
|
|
1372
|
+
default: ConsentSettingReplaceResponse.Default;
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Discriminator for the entity type. Always "consentSettings".
|
|
1376
|
+
*/
|
|
1377
|
+
kind: string;
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Human-readable name shown in the dashboard.
|
|
1381
|
+
*/
|
|
1382
|
+
name: string;
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* Per-region rule overrides. The first rule whose `regionCode`/`additionalRegions`
|
|
1386
|
+
* includes the user's region wins; otherwise `default` applies.
|
|
1387
|
+
*/
|
|
1388
|
+
regions: Array<ConsentSettingReplaceResponse.Region>;
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* Per-service entries powering "show vendors" and category-aware blocking.
|
|
1392
|
+
*/
|
|
1393
|
+
services: Array<ConsentSettingReplaceResponse.Service>;
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Enabled means the CMP serves on whitelisted domains; Disabled means it does not.
|
|
1397
|
+
*/
|
|
1398
|
+
status: 'Disabled' | 'Enabled';
|
|
1399
|
+
|
|
1400
|
+
/**
|
|
1401
|
+
* Name of the cookie that stores the user's consent state. Defaults to
|
|
1402
|
+
* "op_consent".
|
|
1403
|
+
*/
|
|
1404
|
+
consentCookieName?: string | null;
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Optional custom CDN domain for serving the CMP script (e.g.
|
|
1408
|
+
* consent.example.com).
|
|
1409
|
+
*/
|
|
1410
|
+
customDomain?: string | null;
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* Revision counter. Bump this to force users who already consented to see the
|
|
1414
|
+
* modal again (the SDK compares the persisted revision against this value).
|
|
1415
|
+
*/
|
|
1416
|
+
revision?: number | null;
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* CSS class names that opt scripts out of consent blocking. Each entry must be a
|
|
1420
|
+
* single class token (no whitespace).
|
|
1421
|
+
*/
|
|
1422
|
+
skipBlockingClassNames?: Array<string> | null;
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* ISO 8601 timestamp of the last write. Null on a freshly created record.
|
|
1426
|
+
*/
|
|
1427
|
+
updatedAt?: string | null;
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* Pixel of the WebSource that this CMP is wired into. Setting this to a token that
|
|
1431
|
+
* is not a valid WebSource of yours is rejected; use null to clear the link.
|
|
1432
|
+
*/
|
|
1433
|
+
webSDKToken?: string | null;
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Allowlist of domains where this CMP configuration may run. Used at runtime to
|
|
1437
|
+
* derive the broadest matching base domain so consent can persist across matching
|
|
1438
|
+
* subdomains.
|
|
1439
|
+
*/
|
|
1440
|
+
whitelistDomains?: Array<string> | null;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
export namespace ConsentSettingReplaceResponse {
|
|
1444
|
+
export interface Category {
|
|
1445
|
+
/**
|
|
1446
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
1447
|
+
*/
|
|
1448
|
+
label: string;
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
1452
|
+
* any integer, gaps and duplicates are ironed out.
|
|
1453
|
+
*/
|
|
1454
|
+
priority: number;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Stable identifier referenced by services and translation sections.
|
|
1458
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
1459
|
+
*/
|
|
1460
|
+
value: string;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
1465
|
+
*/
|
|
1466
|
+
export interface Default {
|
|
1467
|
+
/**
|
|
1468
|
+
* Per-category default config for this rule. Every category defined in the
|
|
1469
|
+
* top-level `categories[].value` should have an entry here.
|
|
1470
|
+
*/
|
|
1471
|
+
categories: Array<Default.Category>;
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
1475
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
1476
|
+
*/
|
|
1477
|
+
language: string;
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
1481
|
+
* default until user rejects (CCPA style).
|
|
1482
|
+
*/
|
|
1483
|
+
mode: 'opt_in' | 'opt_out';
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
1487
|
+
* the rule's `language` field.
|
|
1488
|
+
*/
|
|
1489
|
+
translations: Array<Default.Translation>;
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
1493
|
+
* in.
|
|
1494
|
+
*/
|
|
1495
|
+
autoblockUnknown?: boolean | null;
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* When true, the consent modal auto-opens on page load.
|
|
1499
|
+
*/
|
|
1500
|
+
autoShow?: boolean | null;
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
1504
|
+
*/
|
|
1505
|
+
autoShowDismissConfig?: unknown | null;
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
1509
|
+
*/
|
|
1510
|
+
autoShowDismissMode?: string | null;
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
1514
|
+
* chooses.
|
|
1515
|
+
*/
|
|
1516
|
+
disablePageInteraction?: boolean | null;
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Visual options for the modals (layout/position/colors).
|
|
1520
|
+
*/
|
|
1521
|
+
guiOptions?: unknown | null;
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
1525
|
+
*/
|
|
1526
|
+
hideFromBots?: boolean | null;
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
1530
|
+
* modal.
|
|
1531
|
+
*/
|
|
1532
|
+
showVendorsInPreferences?: boolean | null;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
export namespace Default {
|
|
1536
|
+
export interface Category {
|
|
1537
|
+
/**
|
|
1538
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
1539
|
+
*/
|
|
1540
|
+
key: string;
|
|
1541
|
+
|
|
1542
|
+
value: Category.Value;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
export namespace Category {
|
|
1546
|
+
export interface Value {
|
|
1547
|
+
/**
|
|
1548
|
+
* Whether this category is on by default before the user interacts.
|
|
1549
|
+
*/
|
|
1550
|
+
enabled: boolean;
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
1554
|
+
*/
|
|
1555
|
+
autoDisableOnGPC?: boolean | null;
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
1559
|
+
*/
|
|
1560
|
+
readOnly?: boolean | null;
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
1564
|
+
* scripts can run.
|
|
1565
|
+
*/
|
|
1566
|
+
reloadPage?: boolean | null;
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
export interface Translation {
|
|
1571
|
+
/**
|
|
1572
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
1573
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
1574
|
+
*/
|
|
1575
|
+
language: string;
|
|
1576
|
+
|
|
1577
|
+
value: Translation.Value;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
export namespace Translation {
|
|
1581
|
+
export interface Value {
|
|
1582
|
+
/**
|
|
1583
|
+
* Translated copy for the initial consent modal.
|
|
1584
|
+
*/
|
|
1585
|
+
consentModal?: unknown | null;
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Translated copy for the preferences modal.
|
|
1589
|
+
*/
|
|
1590
|
+
preferencesModal?: unknown | null;
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
export interface Region {
|
|
1596
|
+
/**
|
|
1597
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
1598
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
1599
|
+
* may appear in only one rule across `regions[]`.
|
|
1600
|
+
*/
|
|
1601
|
+
regionCode: string;
|
|
1602
|
+
|
|
1603
|
+
rule: Region.Rule;
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
1607
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
1608
|
+
* overlap with another rule's regions.
|
|
1609
|
+
*/
|
|
1610
|
+
additionalRegions?: Array<string> | null;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
export namespace Region {
|
|
1614
|
+
export interface Rule {
|
|
1615
|
+
/**
|
|
1616
|
+
* Per-category default config for this rule. Every category defined in the
|
|
1617
|
+
* top-level `categories[].value` should have an entry here.
|
|
1618
|
+
*/
|
|
1619
|
+
categories: Array<Rule.Category>;
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
1623
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
1624
|
+
*/
|
|
1625
|
+
language: string;
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
1629
|
+
* default until user rejects (CCPA style).
|
|
1630
|
+
*/
|
|
1631
|
+
mode: 'opt_in' | 'opt_out';
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
1635
|
+
* the rule's `language` field.
|
|
1636
|
+
*/
|
|
1637
|
+
translations: Array<Rule.Translation>;
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
1641
|
+
* in.
|
|
1642
|
+
*/
|
|
1643
|
+
autoblockUnknown?: boolean | null;
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* When true, the consent modal auto-opens on page load.
|
|
1647
|
+
*/
|
|
1648
|
+
autoShow?: boolean | null;
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
1652
|
+
*/
|
|
1653
|
+
autoShowDismissConfig?: unknown | null;
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
1657
|
+
*/
|
|
1658
|
+
autoShowDismissMode?: string | null;
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
1662
|
+
* chooses.
|
|
1663
|
+
*/
|
|
1664
|
+
disablePageInteraction?: boolean | null;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Visual options for the modals (layout/position/colors).
|
|
1668
|
+
*/
|
|
1669
|
+
guiOptions?: unknown | null;
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
1673
|
+
*/
|
|
1674
|
+
hideFromBots?: boolean | null;
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
1678
|
+
* modal.
|
|
1679
|
+
*/
|
|
1680
|
+
showVendorsInPreferences?: boolean | null;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
export namespace Rule {
|
|
1684
|
+
export interface Category {
|
|
1685
|
+
/**
|
|
1686
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
1687
|
+
*/
|
|
1688
|
+
key: string;
|
|
1689
|
+
|
|
1690
|
+
value: Category.Value;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
export namespace Category {
|
|
1694
|
+
export interface Value {
|
|
1695
|
+
/**
|
|
1696
|
+
* Whether this category is on by default before the user interacts.
|
|
1697
|
+
*/
|
|
1698
|
+
enabled: boolean;
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
1702
|
+
*/
|
|
1703
|
+
autoDisableOnGPC?: boolean | null;
|
|
1704
|
+
|
|
1705
|
+
/**
|
|
1706
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
1707
|
+
*/
|
|
1708
|
+
readOnly?: boolean | null;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
1712
|
+
* scripts can run.
|
|
1713
|
+
*/
|
|
1714
|
+
reloadPage?: boolean | null;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
export interface Translation {
|
|
1719
|
+
/**
|
|
1720
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
1721
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
1722
|
+
*/
|
|
1723
|
+
language: string;
|
|
1724
|
+
|
|
1725
|
+
value: Translation.Value;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
export namespace Translation {
|
|
1729
|
+
export interface Value {
|
|
1730
|
+
/**
|
|
1731
|
+
* Translated copy for the initial consent modal.
|
|
1732
|
+
*/
|
|
1733
|
+
consentModal?: unknown | null;
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* Translated copy for the preferences modal.
|
|
1737
|
+
*/
|
|
1738
|
+
preferencesModal?: unknown | null;
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
export interface Service {
|
|
1745
|
+
/**
|
|
1746
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
1747
|
+
*/
|
|
1748
|
+
internalNotes: string;
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* Display name for this service in the preferences modal.
|
|
1752
|
+
*/
|
|
1753
|
+
label: string;
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* Extra category values this service belongs to. Each must match a
|
|
1757
|
+
* `categories[].value`.
|
|
1758
|
+
*/
|
|
1759
|
+
additionalCategories?: Array<string> | null;
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
1763
|
+
* `categories[].value` entries.
|
|
1764
|
+
*/
|
|
1765
|
+
category?: string | null;
|
|
1766
|
+
|
|
1767
|
+
/**
|
|
1768
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
1769
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
1770
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
1771
|
+
* specific script.
|
|
1772
|
+
*/
|
|
1773
|
+
domainPatterns?: Array<string> | null;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
export interface ConsentSettingUpdateResponse {
|
|
1778
|
+
/**
|
|
1779
|
+
* Server-assigned UUID for this consent settings record.
|
|
1780
|
+
*/
|
|
1781
|
+
id: string;
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* Top-level consent categories (e.g. necessary / analytics / advertising). Server
|
|
1785
|
+
* re-stamps `priority` to 0..N on write.
|
|
1786
|
+
*/
|
|
1787
|
+
categories: Array<ConsentSettingUpdateResponse.Category>;
|
|
1788
|
+
|
|
1789
|
+
/**
|
|
1790
|
+
* ISO 8601 timestamp when the record was created.
|
|
1791
|
+
*/
|
|
1792
|
+
createdAt: string;
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
1796
|
+
*/
|
|
1797
|
+
default: ConsentSettingUpdateResponse.Default;
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* Discriminator for the entity type. Always "consentSettings".
|
|
1801
|
+
*/
|
|
1802
|
+
kind: string;
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* Human-readable name shown in the dashboard.
|
|
1806
|
+
*/
|
|
1807
|
+
name: string;
|
|
1808
|
+
|
|
1809
|
+
/**
|
|
1810
|
+
* Per-region rule overrides. The first rule whose `regionCode`/`additionalRegions`
|
|
1811
|
+
* includes the user's region wins; otherwise `default` applies.
|
|
1812
|
+
*/
|
|
1813
|
+
regions: Array<ConsentSettingUpdateResponse.Region>;
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Per-service entries powering "show vendors" and category-aware blocking.
|
|
1817
|
+
*/
|
|
1818
|
+
services: Array<ConsentSettingUpdateResponse.Service>;
|
|
1819
|
+
|
|
1820
|
+
/**
|
|
1821
|
+
* Enabled means the CMP serves on whitelisted domains; Disabled means it does not.
|
|
1822
|
+
*/
|
|
1823
|
+
status: 'Disabled' | 'Enabled';
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* Name of the cookie that stores the user's consent state. Defaults to
|
|
1827
|
+
* "op_consent".
|
|
1828
|
+
*/
|
|
1829
|
+
consentCookieName?: string | null;
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* Optional custom CDN domain for serving the CMP script (e.g.
|
|
1833
|
+
* consent.example.com).
|
|
1834
|
+
*/
|
|
1835
|
+
customDomain?: string | null;
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* Revision counter. Bump this to force users who already consented to see the
|
|
1839
|
+
* modal again (the SDK compares the persisted revision against this value).
|
|
1840
|
+
*/
|
|
1841
|
+
revision?: number | null;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* CSS class names that opt scripts out of consent blocking. Each entry must be a
|
|
1845
|
+
* single class token (no whitespace).
|
|
1846
|
+
*/
|
|
1847
|
+
skipBlockingClassNames?: Array<string> | null;
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* ISO 8601 timestamp of the last write. Null on a freshly created record.
|
|
1851
|
+
*/
|
|
1852
|
+
updatedAt?: string | null;
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* Pixel of the WebSource that this CMP is wired into. Setting this to a token that
|
|
1856
|
+
* is not a valid WebSource of yours is rejected; use null to clear the link.
|
|
1857
|
+
*/
|
|
1858
|
+
webSDKToken?: string | null;
|
|
1859
|
+
|
|
1860
|
+
/**
|
|
1861
|
+
* Allowlist of domains where this CMP configuration may run. Used at runtime to
|
|
1862
|
+
* derive the broadest matching base domain so consent can persist across matching
|
|
1863
|
+
* subdomains.
|
|
1864
|
+
*/
|
|
1865
|
+
whitelistDomains?: Array<string> | null;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
export namespace ConsentSettingUpdateResponse {
|
|
1869
|
+
export interface Category {
|
|
1870
|
+
/**
|
|
1871
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
1872
|
+
*/
|
|
1873
|
+
label: string;
|
|
1874
|
+
|
|
1875
|
+
/**
|
|
1876
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
1877
|
+
* any integer, gaps and duplicates are ironed out.
|
|
1878
|
+
*/
|
|
1879
|
+
priority: number;
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* Stable identifier referenced by services and translation sections.
|
|
1883
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
1884
|
+
*/
|
|
1885
|
+
value: string;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
1890
|
+
*/
|
|
1891
|
+
export interface Default {
|
|
1892
|
+
/**
|
|
1893
|
+
* Per-category default config for this rule. Every category defined in the
|
|
1894
|
+
* top-level `categories[].value` should have an entry here.
|
|
1895
|
+
*/
|
|
1896
|
+
categories: Array<Default.Category>;
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
1900
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
1901
|
+
*/
|
|
1902
|
+
language: string;
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
1906
|
+
* default until user rejects (CCPA style).
|
|
1907
|
+
*/
|
|
1908
|
+
mode: 'opt_in' | 'opt_out';
|
|
1909
|
+
|
|
1910
|
+
/**
|
|
1911
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
1912
|
+
* the rule's `language` field.
|
|
1913
|
+
*/
|
|
1914
|
+
translations: Array<Default.Translation>;
|
|
1915
|
+
|
|
1916
|
+
/**
|
|
1917
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
1918
|
+
* in.
|
|
1919
|
+
*/
|
|
1920
|
+
autoblockUnknown?: boolean | null;
|
|
1921
|
+
|
|
1922
|
+
/**
|
|
1923
|
+
* When true, the consent modal auto-opens on page load.
|
|
1924
|
+
*/
|
|
1925
|
+
autoShow?: boolean | null;
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
1929
|
+
*/
|
|
1930
|
+
autoShowDismissConfig?: unknown | null;
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
1934
|
+
*/
|
|
1935
|
+
autoShowDismissMode?: string | null;
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
1939
|
+
* chooses.
|
|
1940
|
+
*/
|
|
1941
|
+
disablePageInteraction?: boolean | null;
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* Visual options for the modals (layout/position/colors).
|
|
1945
|
+
*/
|
|
1946
|
+
guiOptions?: unknown | null;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
1950
|
+
*/
|
|
1951
|
+
hideFromBots?: boolean | null;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
1955
|
+
* modal.
|
|
1956
|
+
*/
|
|
1957
|
+
showVendorsInPreferences?: boolean | null;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
export namespace Default {
|
|
1961
|
+
export interface Category {
|
|
1962
|
+
/**
|
|
1963
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
1964
|
+
*/
|
|
1965
|
+
key: string;
|
|
1966
|
+
|
|
1967
|
+
value: Category.Value;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
export namespace Category {
|
|
1971
|
+
export interface Value {
|
|
1972
|
+
/**
|
|
1973
|
+
* Whether this category is on by default before the user interacts.
|
|
1974
|
+
*/
|
|
1975
|
+
enabled: boolean;
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
1979
|
+
*/
|
|
1980
|
+
autoDisableOnGPC?: boolean | null;
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
1984
|
+
*/
|
|
1985
|
+
readOnly?: boolean | null;
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
1989
|
+
* scripts can run.
|
|
1990
|
+
*/
|
|
1991
|
+
reloadPage?: boolean | null;
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
export interface Translation {
|
|
1996
|
+
/**
|
|
1997
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
1998
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
1999
|
+
*/
|
|
2000
|
+
language: string;
|
|
2001
|
+
|
|
2002
|
+
value: Translation.Value;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
export namespace Translation {
|
|
2006
|
+
export interface Value {
|
|
2007
|
+
/**
|
|
2008
|
+
* Translated copy for the initial consent modal.
|
|
2009
|
+
*/
|
|
2010
|
+
consentModal?: unknown | null;
|
|
2011
|
+
|
|
2012
|
+
/**
|
|
2013
|
+
* Translated copy for the preferences modal.
|
|
2014
|
+
*/
|
|
2015
|
+
preferencesModal?: unknown | null;
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
export interface Region {
|
|
2021
|
+
/**
|
|
2022
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
2023
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
2024
|
+
* may appear in only one rule across `regions[]`.
|
|
2025
|
+
*/
|
|
2026
|
+
regionCode: string;
|
|
2027
|
+
|
|
2028
|
+
rule: Region.Rule;
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
2032
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
2033
|
+
* overlap with another rule's regions.
|
|
2034
|
+
*/
|
|
2035
|
+
additionalRegions?: Array<string> | null;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
export namespace Region {
|
|
2039
|
+
export interface Rule {
|
|
2040
|
+
/**
|
|
2041
|
+
* Per-category default config for this rule. Every category defined in the
|
|
2042
|
+
* top-level `categories[].value` should have an entry here.
|
|
2043
|
+
*/
|
|
2044
|
+
categories: Array<Rule.Category>;
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
2048
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
2049
|
+
*/
|
|
2050
|
+
language: string;
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
2054
|
+
* default until user rejects (CCPA style).
|
|
2055
|
+
*/
|
|
2056
|
+
mode: 'opt_in' | 'opt_out';
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
2060
|
+
* the rule's `language` field.
|
|
2061
|
+
*/
|
|
2062
|
+
translations: Array<Rule.Translation>;
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
2066
|
+
* in.
|
|
2067
|
+
*/
|
|
2068
|
+
autoblockUnknown?: boolean | null;
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* When true, the consent modal auto-opens on page load.
|
|
2072
|
+
*/
|
|
2073
|
+
autoShow?: boolean | null;
|
|
2074
|
+
|
|
2075
|
+
/**
|
|
2076
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
2077
|
+
*/
|
|
2078
|
+
autoShowDismissConfig?: unknown | null;
|
|
2079
|
+
|
|
2080
|
+
/**
|
|
2081
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
2082
|
+
*/
|
|
2083
|
+
autoShowDismissMode?: string | null;
|
|
2084
|
+
|
|
2085
|
+
/**
|
|
2086
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
2087
|
+
* chooses.
|
|
2088
|
+
*/
|
|
2089
|
+
disablePageInteraction?: boolean | null;
|
|
2090
|
+
|
|
2091
|
+
/**
|
|
2092
|
+
* Visual options for the modals (layout/position/colors).
|
|
2093
|
+
*/
|
|
2094
|
+
guiOptions?: unknown | null;
|
|
2095
|
+
|
|
2096
|
+
/**
|
|
2097
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
2098
|
+
*/
|
|
2099
|
+
hideFromBots?: boolean | null;
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
2103
|
+
* modal.
|
|
2104
|
+
*/
|
|
2105
|
+
showVendorsInPreferences?: boolean | null;
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
export namespace Rule {
|
|
2109
|
+
export interface Category {
|
|
2110
|
+
/**
|
|
2111
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
2112
|
+
*/
|
|
2113
|
+
key: string;
|
|
2114
|
+
|
|
2115
|
+
value: Category.Value;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
export namespace Category {
|
|
2119
|
+
export interface Value {
|
|
2120
|
+
/**
|
|
2121
|
+
* Whether this category is on by default before the user interacts.
|
|
2122
|
+
*/
|
|
2123
|
+
enabled: boolean;
|
|
2124
|
+
|
|
2125
|
+
/**
|
|
2126
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
2127
|
+
*/
|
|
2128
|
+
autoDisableOnGPC?: boolean | null;
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
2132
|
+
*/
|
|
2133
|
+
readOnly?: boolean | null;
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
2137
|
+
* scripts can run.
|
|
2138
|
+
*/
|
|
2139
|
+
reloadPage?: boolean | null;
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
export interface Translation {
|
|
2144
|
+
/**
|
|
2145
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
2146
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
2147
|
+
*/
|
|
2148
|
+
language: string;
|
|
2149
|
+
|
|
2150
|
+
value: Translation.Value;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
export namespace Translation {
|
|
2154
|
+
export interface Value {
|
|
2155
|
+
/**
|
|
2156
|
+
* Translated copy for the initial consent modal.
|
|
2157
|
+
*/
|
|
2158
|
+
consentModal?: unknown | null;
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* Translated copy for the preferences modal.
|
|
2162
|
+
*/
|
|
2163
|
+
preferencesModal?: unknown | null;
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
export interface Service {
|
|
2170
|
+
/**
|
|
2171
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
2172
|
+
*/
|
|
2173
|
+
internalNotes: string;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* Display name for this service in the preferences modal.
|
|
2177
|
+
*/
|
|
2178
|
+
label: string;
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* Extra category values this service belongs to. Each must match a
|
|
2182
|
+
* `categories[].value`.
|
|
2183
|
+
*/
|
|
2184
|
+
additionalCategories?: Array<string> | null;
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
2188
|
+
* `categories[].value` entries.
|
|
2189
|
+
*/
|
|
2190
|
+
category?: string | null;
|
|
2191
|
+
|
|
2192
|
+
/**
|
|
2193
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
2194
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
2195
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
2196
|
+
* specific script.
|
|
2197
|
+
*/
|
|
2198
|
+
domainPatterns?: Array<string> | null;
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
export interface ConsentSettingDeleteResponse {
|
|
2203
|
+
/**
|
|
2204
|
+
* Server-assigned UUID for this consent settings record.
|
|
2205
|
+
*/
|
|
2206
|
+
id: string;
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* Top-level consent categories (e.g. necessary / analytics / advertising). Server
|
|
2210
|
+
* re-stamps `priority` to 0..N on write.
|
|
2211
|
+
*/
|
|
2212
|
+
categories: Array<ConsentSettingDeleteResponse.Category>;
|
|
2213
|
+
|
|
2214
|
+
/**
|
|
2215
|
+
* ISO 8601 timestamp when the record was created.
|
|
2216
|
+
*/
|
|
2217
|
+
createdAt: string;
|
|
2218
|
+
|
|
2219
|
+
/**
|
|
2220
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
2221
|
+
*/
|
|
2222
|
+
default: ConsentSettingDeleteResponse.Default;
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* Discriminator for the entity type. Always "consentSettings".
|
|
2226
|
+
*/
|
|
2227
|
+
kind: string;
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* Human-readable name shown in the dashboard.
|
|
2231
|
+
*/
|
|
2232
|
+
name: string;
|
|
2233
|
+
|
|
2234
|
+
/**
|
|
2235
|
+
* Per-region rule overrides. The first rule whose `regionCode`/`additionalRegions`
|
|
2236
|
+
* includes the user's region wins; otherwise `default` applies.
|
|
2237
|
+
*/
|
|
2238
|
+
regions: Array<ConsentSettingDeleteResponse.Region>;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* Per-service entries powering "show vendors" and category-aware blocking.
|
|
2242
|
+
*/
|
|
2243
|
+
services: Array<ConsentSettingDeleteResponse.Service>;
|
|
2244
|
+
|
|
2245
|
+
/**
|
|
2246
|
+
* Enabled means the CMP serves on whitelisted domains; Disabled means it does not.
|
|
2247
|
+
*/
|
|
2248
|
+
status: 'Disabled' | 'Enabled';
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* Name of the cookie that stores the user's consent state. Defaults to
|
|
2252
|
+
* "op_consent".
|
|
2253
|
+
*/
|
|
2254
|
+
consentCookieName?: string | null;
|
|
2255
|
+
|
|
2256
|
+
/**
|
|
2257
|
+
* Optional custom CDN domain for serving the CMP script (e.g.
|
|
2258
|
+
* consent.example.com).
|
|
2259
|
+
*/
|
|
2260
|
+
customDomain?: string | null;
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Revision counter. Bump this to force users who already consented to see the
|
|
2264
|
+
* modal again (the SDK compares the persisted revision against this value).
|
|
2265
|
+
*/
|
|
2266
|
+
revision?: number | null;
|
|
2267
|
+
|
|
2268
|
+
/**
|
|
2269
|
+
* CSS class names that opt scripts out of consent blocking. Each entry must be a
|
|
2270
|
+
* single class token (no whitespace).
|
|
2271
|
+
*/
|
|
2272
|
+
skipBlockingClassNames?: Array<string> | null;
|
|
2273
|
+
|
|
2274
|
+
/**
|
|
2275
|
+
* ISO 8601 timestamp of the last write. Null on a freshly created record.
|
|
2276
|
+
*/
|
|
2277
|
+
updatedAt?: string | null;
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* Pixel of the WebSource that this CMP is wired into. Setting this to a token that
|
|
2281
|
+
* is not a valid WebSource of yours is rejected; use null to clear the link.
|
|
2282
|
+
*/
|
|
2283
|
+
webSDKToken?: string | null;
|
|
2284
|
+
|
|
2285
|
+
/**
|
|
2286
|
+
* Allowlist of domains where this CMP configuration may run. Used at runtime to
|
|
2287
|
+
* derive the broadest matching base domain so consent can persist across matching
|
|
2288
|
+
* subdomains.
|
|
2289
|
+
*/
|
|
2290
|
+
whitelistDomains?: Array<string> | null;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
export namespace ConsentSettingDeleteResponse {
|
|
2294
|
+
export interface Category {
|
|
2295
|
+
/**
|
|
2296
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
2297
|
+
*/
|
|
2298
|
+
label: string;
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
2302
|
+
* any integer, gaps and duplicates are ironed out.
|
|
2303
|
+
*/
|
|
2304
|
+
priority: number;
|
|
2305
|
+
|
|
2306
|
+
/**
|
|
2307
|
+
* Stable identifier referenced by services and translation sections.
|
|
2308
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
2309
|
+
*/
|
|
2310
|
+
value: string;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
2315
|
+
*/
|
|
2316
|
+
export interface Default {
|
|
2317
|
+
/**
|
|
2318
|
+
* Per-category default config for this rule. Every category defined in the
|
|
2319
|
+
* top-level `categories[].value` should have an entry here.
|
|
2320
|
+
*/
|
|
2321
|
+
categories: Array<Default.Category>;
|
|
2322
|
+
|
|
2323
|
+
/**
|
|
2324
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
2325
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
2326
|
+
*/
|
|
2327
|
+
language: string;
|
|
2328
|
+
|
|
2329
|
+
/**
|
|
2330
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
2331
|
+
* default until user rejects (CCPA style).
|
|
2332
|
+
*/
|
|
2333
|
+
mode: 'opt_in' | 'opt_out';
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
2337
|
+
* the rule's `language` field.
|
|
2338
|
+
*/
|
|
2339
|
+
translations: Array<Default.Translation>;
|
|
2340
|
+
|
|
2341
|
+
/**
|
|
2342
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
2343
|
+
* in.
|
|
2344
|
+
*/
|
|
2345
|
+
autoblockUnknown?: boolean | null;
|
|
2346
|
+
|
|
2347
|
+
/**
|
|
2348
|
+
* When true, the consent modal auto-opens on page load.
|
|
2349
|
+
*/
|
|
2350
|
+
autoShow?: boolean | null;
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
2354
|
+
*/
|
|
2355
|
+
autoShowDismissConfig?: unknown | null;
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
2359
|
+
*/
|
|
2360
|
+
autoShowDismissMode?: string | null;
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
2364
|
+
* chooses.
|
|
2365
|
+
*/
|
|
2366
|
+
disablePageInteraction?: boolean | null;
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Visual options for the modals (layout/position/colors).
|
|
2370
|
+
*/
|
|
2371
|
+
guiOptions?: unknown | null;
|
|
2372
|
+
|
|
2373
|
+
/**
|
|
2374
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
2375
|
+
*/
|
|
2376
|
+
hideFromBots?: boolean | null;
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
2380
|
+
* modal.
|
|
2381
|
+
*/
|
|
2382
|
+
showVendorsInPreferences?: boolean | null;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
export namespace Default {
|
|
2386
|
+
export interface Category {
|
|
2387
|
+
/**
|
|
2388
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
2389
|
+
*/
|
|
2390
|
+
key: string;
|
|
2391
|
+
|
|
2392
|
+
value: Category.Value;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
export namespace Category {
|
|
2396
|
+
export interface Value {
|
|
2397
|
+
/**
|
|
2398
|
+
* Whether this category is on by default before the user interacts.
|
|
2399
|
+
*/
|
|
2400
|
+
enabled: boolean;
|
|
2401
|
+
|
|
2402
|
+
/**
|
|
2403
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
2404
|
+
*/
|
|
2405
|
+
autoDisableOnGPC?: boolean | null;
|
|
2406
|
+
|
|
2407
|
+
/**
|
|
2408
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
2409
|
+
*/
|
|
2410
|
+
readOnly?: boolean | null;
|
|
2411
|
+
|
|
2412
|
+
/**
|
|
2413
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
2414
|
+
* scripts can run.
|
|
2415
|
+
*/
|
|
2416
|
+
reloadPage?: boolean | null;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
export interface Translation {
|
|
2421
|
+
/**
|
|
2422
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
2423
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
2424
|
+
*/
|
|
2425
|
+
language: string;
|
|
2426
|
+
|
|
2427
|
+
value: Translation.Value;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
export namespace Translation {
|
|
2431
|
+
export interface Value {
|
|
2432
|
+
/**
|
|
2433
|
+
* Translated copy for the initial consent modal.
|
|
2434
|
+
*/
|
|
2435
|
+
consentModal?: unknown | null;
|
|
2436
|
+
|
|
2437
|
+
/**
|
|
2438
|
+
* Translated copy for the preferences modal.
|
|
2439
|
+
*/
|
|
2440
|
+
preferencesModal?: unknown | null;
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
export interface Region {
|
|
2446
|
+
/**
|
|
2447
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
2448
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
2449
|
+
* may appear in only one rule across `regions[]`.
|
|
2450
|
+
*/
|
|
2451
|
+
regionCode: string;
|
|
2452
|
+
|
|
2453
|
+
rule: Region.Rule;
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
2457
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
2458
|
+
* overlap with another rule's regions.
|
|
2459
|
+
*/
|
|
2460
|
+
additionalRegions?: Array<string> | null;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
export namespace Region {
|
|
2464
|
+
export interface Rule {
|
|
2465
|
+
/**
|
|
2466
|
+
* Per-category default config for this rule. Every category defined in the
|
|
2467
|
+
* top-level `categories[].value` should have an entry here.
|
|
2468
|
+
*/
|
|
2469
|
+
categories: Array<Rule.Category>;
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
2473
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
2474
|
+
*/
|
|
2475
|
+
language: string;
|
|
2476
|
+
|
|
2477
|
+
/**
|
|
2478
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
2479
|
+
* default until user rejects (CCPA style).
|
|
2480
|
+
*/
|
|
2481
|
+
mode: 'opt_in' | 'opt_out';
|
|
2482
|
+
|
|
2483
|
+
/**
|
|
2484
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
2485
|
+
* the rule's `language` field.
|
|
2486
|
+
*/
|
|
2487
|
+
translations: Array<Rule.Translation>;
|
|
2488
|
+
|
|
2489
|
+
/**
|
|
2490
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
2491
|
+
* in.
|
|
2492
|
+
*/
|
|
2493
|
+
autoblockUnknown?: boolean | null;
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* When true, the consent modal auto-opens on page load.
|
|
2497
|
+
*/
|
|
2498
|
+
autoShow?: boolean | null;
|
|
2499
|
+
|
|
2500
|
+
/**
|
|
2501
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
2502
|
+
*/
|
|
2503
|
+
autoShowDismissConfig?: unknown | null;
|
|
2504
|
+
|
|
2505
|
+
/**
|
|
2506
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
2507
|
+
*/
|
|
2508
|
+
autoShowDismissMode?: string | null;
|
|
2509
|
+
|
|
2510
|
+
/**
|
|
2511
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
2512
|
+
* chooses.
|
|
2513
|
+
*/
|
|
2514
|
+
disablePageInteraction?: boolean | null;
|
|
2515
|
+
|
|
2516
|
+
/**
|
|
2517
|
+
* Visual options for the modals (layout/position/colors).
|
|
2518
|
+
*/
|
|
2519
|
+
guiOptions?: unknown | null;
|
|
2520
|
+
|
|
2521
|
+
/**
|
|
2522
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
2523
|
+
*/
|
|
2524
|
+
hideFromBots?: boolean | null;
|
|
2525
|
+
|
|
2526
|
+
/**
|
|
2527
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
2528
|
+
* modal.
|
|
2529
|
+
*/
|
|
2530
|
+
showVendorsInPreferences?: boolean | null;
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
export namespace Rule {
|
|
2534
|
+
export interface Category {
|
|
2535
|
+
/**
|
|
2536
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
2537
|
+
*/
|
|
2538
|
+
key: string;
|
|
2539
|
+
|
|
2540
|
+
value: Category.Value;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
export namespace Category {
|
|
2544
|
+
export interface Value {
|
|
2545
|
+
/**
|
|
2546
|
+
* Whether this category is on by default before the user interacts.
|
|
2547
|
+
*/
|
|
2548
|
+
enabled: boolean;
|
|
2549
|
+
|
|
2550
|
+
/**
|
|
2551
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
2552
|
+
*/
|
|
2553
|
+
autoDisableOnGPC?: boolean | null;
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
2557
|
+
*/
|
|
2558
|
+
readOnly?: boolean | null;
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
2562
|
+
* scripts can run.
|
|
2563
|
+
*/
|
|
2564
|
+
reloadPage?: boolean | null;
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
export interface Translation {
|
|
2569
|
+
/**
|
|
2570
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
2571
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
2572
|
+
*/
|
|
2573
|
+
language: string;
|
|
2574
|
+
|
|
2575
|
+
value: Translation.Value;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
export namespace Translation {
|
|
2579
|
+
export interface Value {
|
|
2580
|
+
/**
|
|
2581
|
+
* Translated copy for the initial consent modal.
|
|
2582
|
+
*/
|
|
2583
|
+
consentModal?: unknown | null;
|
|
2584
|
+
|
|
2585
|
+
/**
|
|
2586
|
+
* Translated copy for the preferences modal.
|
|
2587
|
+
*/
|
|
2588
|
+
preferencesModal?: unknown | null;
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
export interface Service {
|
|
2595
|
+
/**
|
|
2596
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
2597
|
+
*/
|
|
2598
|
+
internalNotes: string;
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* Display name for this service in the preferences modal.
|
|
2602
|
+
*/
|
|
2603
|
+
label: string;
|
|
2604
|
+
|
|
2605
|
+
/**
|
|
2606
|
+
* Extra category values this service belongs to. Each must match a
|
|
2607
|
+
* `categories[].value`.
|
|
2608
|
+
*/
|
|
2609
|
+
additionalCategories?: Array<string> | null;
|
|
2610
|
+
|
|
2611
|
+
/**
|
|
2612
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
2613
|
+
* `categories[].value` entries.
|
|
2614
|
+
*/
|
|
2615
|
+
category?: string | null;
|
|
2616
|
+
|
|
2617
|
+
/**
|
|
2618
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
2619
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
2620
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
2621
|
+
* specific script.
|
|
2622
|
+
*/
|
|
2623
|
+
domainPatterns?: Array<string> | null;
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
export interface ConsentSettingReplaceParams {
|
|
2628
|
+
/**
|
|
2629
|
+
* Top-level consent categories. Server re-stamps `priority` to 0..N.
|
|
2630
|
+
*/
|
|
2631
|
+
categories: Array<ConsentSettingReplaceParams.Category>;
|
|
2632
|
+
|
|
2633
|
+
/**
|
|
2634
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
2635
|
+
*/
|
|
2636
|
+
default: ConsentSettingReplaceParams.Default;
|
|
2637
|
+
|
|
2638
|
+
/**
|
|
2639
|
+
* Human-readable name shown in the dashboard.
|
|
2640
|
+
*/
|
|
2641
|
+
name: string;
|
|
2642
|
+
|
|
2643
|
+
/**
|
|
2644
|
+
* Per-region rule overrides. Each `regionCode` must be unique across rules and
|
|
2645
|
+
* must not appear in any other rule's `additionalRegions`.
|
|
2646
|
+
*/
|
|
2647
|
+
regions: Array<ConsentSettingReplaceParams.Region>;
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* Per-service entries powering "show vendors" and category-aware blocking. Empty
|
|
2651
|
+
* array clears the list.
|
|
2652
|
+
*/
|
|
2653
|
+
services: Array<ConsentSettingReplaceParams.Service>;
|
|
2654
|
+
|
|
2655
|
+
/**
|
|
2656
|
+
* Enabled to serve the CMP, Disabled to take it offline.
|
|
2657
|
+
*/
|
|
2658
|
+
status: 'Disabled' | 'Enabled';
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Name of the cookie that stores consent state. Pass null to clear (defaults to
|
|
2662
|
+
* "op_consent").
|
|
2663
|
+
*/
|
|
2664
|
+
consentCookieName?: string | null;
|
|
2665
|
+
|
|
2666
|
+
/**
|
|
2667
|
+
* Custom CDN domain for serving the CMP script. Pass null to clear.
|
|
2668
|
+
*/
|
|
2669
|
+
customDomain?: string | null;
|
|
2670
|
+
|
|
2671
|
+
/**
|
|
2672
|
+
* Revision counter. Bump to re-prompt users who already consented.
|
|
2673
|
+
*/
|
|
2674
|
+
revision?: number | null;
|
|
2675
|
+
|
|
2676
|
+
/**
|
|
2677
|
+
* CSS class names that opt scripts out of consent blocking. Each must be a single
|
|
2678
|
+
* class token.
|
|
2679
|
+
*/
|
|
2680
|
+
skipBlockingClassNames?: Array<string> | null;
|
|
2681
|
+
|
|
2682
|
+
/**
|
|
2683
|
+
* Pixel of the WebSource this CMP is wired into. Pass null to clear the link.
|
|
2684
|
+
*/
|
|
86
2685
|
webSDKToken?: string | null;
|
|
87
2686
|
|
|
2687
|
+
/**
|
|
2688
|
+
* Allowlist of domains where this CMP runs. Pass null/[] to clear.
|
|
2689
|
+
*/
|
|
88
2690
|
whitelistDomains?: Array<string> | null;
|
|
89
2691
|
}
|
|
90
2692
|
|
|
91
|
-
export namespace
|
|
2693
|
+
export namespace ConsentSettingReplaceParams {
|
|
92
2694
|
export interface Category {
|
|
2695
|
+
/**
|
|
2696
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
2697
|
+
*/
|
|
93
2698
|
label: string;
|
|
94
2699
|
|
|
2700
|
+
/**
|
|
2701
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
2702
|
+
* any integer, gaps and duplicates are ironed out.
|
|
2703
|
+
*/
|
|
95
2704
|
priority: number;
|
|
96
2705
|
|
|
2706
|
+
/**
|
|
2707
|
+
* Stable identifier referenced by services and translation sections.
|
|
2708
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
2709
|
+
*/
|
|
97
2710
|
value: string;
|
|
98
2711
|
}
|
|
99
2712
|
|
|
2713
|
+
/**
|
|
2714
|
+
* Default rule used when the user is not in any region listed in `regions[]`.
|
|
2715
|
+
*/
|
|
100
2716
|
export interface Default {
|
|
2717
|
+
/**
|
|
2718
|
+
* Per-category default config for this rule. Every category defined in the
|
|
2719
|
+
* top-level `categories[].value` should have an entry here.
|
|
2720
|
+
*/
|
|
101
2721
|
categories: Array<Default.Category>;
|
|
102
2722
|
|
|
2723
|
+
/**
|
|
2724
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
2725
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
2726
|
+
*/
|
|
103
2727
|
language: string;
|
|
104
2728
|
|
|
2729
|
+
/**
|
|
2730
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
2731
|
+
* default until user rejects (CCPA style).
|
|
2732
|
+
*/
|
|
105
2733
|
mode: 'opt_in' | 'opt_out';
|
|
106
2734
|
|
|
2735
|
+
/**
|
|
2736
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
2737
|
+
* the rule's `language` field.
|
|
2738
|
+
*/
|
|
107
2739
|
translations: Array<Default.Translation>;
|
|
108
2740
|
|
|
2741
|
+
/**
|
|
2742
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
2743
|
+
* in.
|
|
2744
|
+
*/
|
|
109
2745
|
autoblockUnknown?: boolean | null;
|
|
110
2746
|
|
|
2747
|
+
/**
|
|
2748
|
+
* When true, the consent modal auto-opens on page load.
|
|
2749
|
+
*/
|
|
111
2750
|
autoShow?: boolean | null;
|
|
112
2751
|
|
|
2752
|
+
/**
|
|
2753
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
2754
|
+
*/
|
|
113
2755
|
autoShowDismissConfig?: unknown | null;
|
|
114
2756
|
|
|
2757
|
+
/**
|
|
2758
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
2759
|
+
*/
|
|
115
2760
|
autoShowDismissMode?: string | null;
|
|
116
2761
|
|
|
2762
|
+
/**
|
|
2763
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
2764
|
+
* chooses.
|
|
2765
|
+
*/
|
|
117
2766
|
disablePageInteraction?: boolean | null;
|
|
118
2767
|
|
|
2768
|
+
/**
|
|
2769
|
+
* Visual options for the modals (layout/position/colors).
|
|
2770
|
+
*/
|
|
119
2771
|
guiOptions?: unknown | null;
|
|
120
2772
|
|
|
2773
|
+
/**
|
|
2774
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
2775
|
+
*/
|
|
121
2776
|
hideFromBots?: boolean | null;
|
|
122
2777
|
|
|
2778
|
+
/**
|
|
2779
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
2780
|
+
* modal.
|
|
2781
|
+
*/
|
|
123
2782
|
showVendorsInPreferences?: boolean | null;
|
|
124
2783
|
}
|
|
125
2784
|
|
|
126
2785
|
export namespace Default {
|
|
127
2786
|
export interface Category {
|
|
2787
|
+
/**
|
|
2788
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
2789
|
+
*/
|
|
128
2790
|
key: string;
|
|
129
2791
|
|
|
130
2792
|
value: Category.Value;
|
|
@@ -132,17 +2794,34 @@ export namespace ConsentSettingRetrieveResponse {
|
|
|
132
2794
|
|
|
133
2795
|
export namespace Category {
|
|
134
2796
|
export interface Value {
|
|
2797
|
+
/**
|
|
2798
|
+
* Whether this category is on by default before the user interacts.
|
|
2799
|
+
*/
|
|
135
2800
|
enabled: boolean;
|
|
136
2801
|
|
|
2802
|
+
/**
|
|
2803
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
2804
|
+
*/
|
|
137
2805
|
autoDisableOnGPC?: boolean | null;
|
|
138
2806
|
|
|
2807
|
+
/**
|
|
2808
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
2809
|
+
*/
|
|
139
2810
|
readOnly?: boolean | null;
|
|
140
2811
|
|
|
2812
|
+
/**
|
|
2813
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
2814
|
+
* scripts can run.
|
|
2815
|
+
*/
|
|
141
2816
|
reloadPage?: boolean | null;
|
|
142
2817
|
}
|
|
143
2818
|
}
|
|
144
2819
|
|
|
145
2820
|
export interface Translation {
|
|
2821
|
+
/**
|
|
2822
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
2823
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
2824
|
+
*/
|
|
146
2825
|
language: string;
|
|
147
2826
|
|
|
148
2827
|
value: Translation.Value;
|
|
@@ -150,50 +2829,112 @@ export namespace ConsentSettingRetrieveResponse {
|
|
|
150
2829
|
|
|
151
2830
|
export namespace Translation {
|
|
152
2831
|
export interface Value {
|
|
2832
|
+
/**
|
|
2833
|
+
* Translated copy for the initial consent modal.
|
|
2834
|
+
*/
|
|
153
2835
|
consentModal?: unknown | null;
|
|
154
2836
|
|
|
2837
|
+
/**
|
|
2838
|
+
* Translated copy for the preferences modal.
|
|
2839
|
+
*/
|
|
155
2840
|
preferencesModal?: unknown | null;
|
|
156
2841
|
}
|
|
157
2842
|
}
|
|
158
2843
|
}
|
|
159
2844
|
|
|
160
2845
|
export interface Region {
|
|
2846
|
+
/**
|
|
2847
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
2848
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
2849
|
+
* may appear in only one rule across `regions[]`.
|
|
2850
|
+
*/
|
|
161
2851
|
regionCode: string;
|
|
162
2852
|
|
|
163
2853
|
rule: Region.Rule;
|
|
164
2854
|
|
|
2855
|
+
/**
|
|
2856
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
2857
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
2858
|
+
* overlap with another rule's regions.
|
|
2859
|
+
*/
|
|
165
2860
|
additionalRegions?: Array<string> | null;
|
|
166
2861
|
}
|
|
167
2862
|
|
|
168
2863
|
export namespace Region {
|
|
169
2864
|
export interface Rule {
|
|
2865
|
+
/**
|
|
2866
|
+
* Per-category default config for this rule. Every category defined in the
|
|
2867
|
+
* top-level `categories[].value` should have an entry here.
|
|
2868
|
+
*/
|
|
170
2869
|
categories: Array<Rule.Category>;
|
|
171
2870
|
|
|
2871
|
+
/**
|
|
2872
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
2873
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
2874
|
+
*/
|
|
172
2875
|
language: string;
|
|
173
2876
|
|
|
2877
|
+
/**
|
|
2878
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
2879
|
+
* default until user rejects (CCPA style).
|
|
2880
|
+
*/
|
|
174
2881
|
mode: 'opt_in' | 'opt_out';
|
|
175
2882
|
|
|
2883
|
+
/**
|
|
2884
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
2885
|
+
* the rule's `language` field.
|
|
2886
|
+
*/
|
|
176
2887
|
translations: Array<Rule.Translation>;
|
|
177
2888
|
|
|
2889
|
+
/**
|
|
2890
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
2891
|
+
* in.
|
|
2892
|
+
*/
|
|
178
2893
|
autoblockUnknown?: boolean | null;
|
|
179
2894
|
|
|
2895
|
+
/**
|
|
2896
|
+
* When true, the consent modal auto-opens on page load.
|
|
2897
|
+
*/
|
|
180
2898
|
autoShow?: boolean | null;
|
|
181
2899
|
|
|
2900
|
+
/**
|
|
2901
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
2902
|
+
*/
|
|
182
2903
|
autoShowDismissConfig?: unknown | null;
|
|
183
2904
|
|
|
2905
|
+
/**
|
|
2906
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
2907
|
+
*/
|
|
184
2908
|
autoShowDismissMode?: string | null;
|
|
185
2909
|
|
|
2910
|
+
/**
|
|
2911
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
2912
|
+
* chooses.
|
|
2913
|
+
*/
|
|
186
2914
|
disablePageInteraction?: boolean | null;
|
|
187
2915
|
|
|
2916
|
+
/**
|
|
2917
|
+
* Visual options for the modals (layout/position/colors).
|
|
2918
|
+
*/
|
|
188
2919
|
guiOptions?: unknown | null;
|
|
189
2920
|
|
|
2921
|
+
/**
|
|
2922
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
2923
|
+
*/
|
|
190
2924
|
hideFromBots?: boolean | null;
|
|
191
2925
|
|
|
2926
|
+
/**
|
|
2927
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
2928
|
+
* modal.
|
|
2929
|
+
*/
|
|
192
2930
|
showVendorsInPreferences?: boolean | null;
|
|
193
2931
|
}
|
|
194
2932
|
|
|
195
2933
|
export namespace Rule {
|
|
196
2934
|
export interface Category {
|
|
2935
|
+
/**
|
|
2936
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
2937
|
+
*/
|
|
197
2938
|
key: string;
|
|
198
2939
|
|
|
199
2940
|
value: Category.Value;
|
|
@@ -201,17 +2942,34 @@ export namespace ConsentSettingRetrieveResponse {
|
|
|
201
2942
|
|
|
202
2943
|
export namespace Category {
|
|
203
2944
|
export interface Value {
|
|
2945
|
+
/**
|
|
2946
|
+
* Whether this category is on by default before the user interacts.
|
|
2947
|
+
*/
|
|
204
2948
|
enabled: boolean;
|
|
205
2949
|
|
|
2950
|
+
/**
|
|
2951
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
2952
|
+
*/
|
|
206
2953
|
autoDisableOnGPC?: boolean | null;
|
|
207
2954
|
|
|
2955
|
+
/**
|
|
2956
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
2957
|
+
*/
|
|
208
2958
|
readOnly?: boolean | null;
|
|
209
2959
|
|
|
2960
|
+
/**
|
|
2961
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
2962
|
+
* scripts can run.
|
|
2963
|
+
*/
|
|
210
2964
|
reloadPage?: boolean | null;
|
|
211
2965
|
}
|
|
212
2966
|
}
|
|
213
2967
|
|
|
214
2968
|
export interface Translation {
|
|
2969
|
+
/**
|
|
2970
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
2971
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
2972
|
+
*/
|
|
215
2973
|
language: string;
|
|
216
2974
|
|
|
217
2975
|
value: Translation.Value;
|
|
@@ -219,8 +2977,14 @@ export namespace ConsentSettingRetrieveResponse {
|
|
|
219
2977
|
|
|
220
2978
|
export namespace Translation {
|
|
221
2979
|
export interface Value {
|
|
2980
|
+
/**
|
|
2981
|
+
* Translated copy for the initial consent modal.
|
|
2982
|
+
*/
|
|
222
2983
|
consentModal?: unknown | null;
|
|
223
2984
|
|
|
2985
|
+
/**
|
|
2986
|
+
* Translated copy for the preferences modal.
|
|
2987
|
+
*/
|
|
224
2988
|
preferencesModal?: unknown | null;
|
|
225
2989
|
}
|
|
226
2990
|
}
|
|
@@ -228,295 +2992,199 @@ export namespace ConsentSettingRetrieveResponse {
|
|
|
228
2992
|
}
|
|
229
2993
|
|
|
230
2994
|
export interface Service {
|
|
2995
|
+
/**
|
|
2996
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
2997
|
+
*/
|
|
231
2998
|
internalNotes: string;
|
|
232
2999
|
|
|
3000
|
+
/**
|
|
3001
|
+
* Display name for this service in the preferences modal.
|
|
3002
|
+
*/
|
|
233
3003
|
label: string;
|
|
234
3004
|
|
|
3005
|
+
/**
|
|
3006
|
+
* Extra category values this service belongs to. Each must match a
|
|
3007
|
+
* `categories[].value`.
|
|
3008
|
+
*/
|
|
235
3009
|
additionalCategories?: Array<string> | null;
|
|
236
3010
|
|
|
3011
|
+
/**
|
|
3012
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
3013
|
+
* `categories[].value` entries.
|
|
3014
|
+
*/
|
|
237
3015
|
category?: string | null;
|
|
238
3016
|
|
|
3017
|
+
/**
|
|
3018
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
3019
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
3020
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
3021
|
+
* specific script.
|
|
3022
|
+
*/
|
|
239
3023
|
domainPatterns?: Array<string> | null;
|
|
240
3024
|
}
|
|
241
3025
|
}
|
|
242
3026
|
|
|
243
|
-
export interface ConsentSettingUpdateResponse {
|
|
244
|
-
isSuccess: boolean;
|
|
245
|
-
|
|
246
|
-
cause?: string | null;
|
|
247
|
-
|
|
248
|
-
consentSettings?: unknown | null;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export interface ConsentSettingListResponse {
|
|
252
|
-
entities: Array<ConsentSettingListResponse.Entity>;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export namespace ConsentSettingListResponse {
|
|
256
|
-
export interface Entity {
|
|
257
|
-
id: string;
|
|
258
|
-
|
|
259
|
-
categories: Array<Entity.Category>;
|
|
260
|
-
|
|
261
|
-
createdAt: string;
|
|
262
|
-
|
|
263
|
-
default: Entity.Default;
|
|
264
|
-
|
|
265
|
-
kind: string;
|
|
266
|
-
|
|
267
|
-
name: string;
|
|
268
|
-
|
|
269
|
-
regions: Array<Entity.Region>;
|
|
270
|
-
|
|
271
|
-
services: Array<Entity.Service>;
|
|
272
|
-
|
|
273
|
-
status: 'Disabled' | 'Enabled';
|
|
274
|
-
|
|
275
|
-
consentCookieName?: string | null;
|
|
276
|
-
|
|
277
|
-
customDomain?: string | null;
|
|
278
|
-
|
|
279
|
-
revision?: number | null;
|
|
280
|
-
|
|
281
|
-
skipBlockingClassNames?: Array<string> | null;
|
|
282
|
-
|
|
283
|
-
updatedAt?: string | null;
|
|
284
|
-
|
|
285
|
-
webSDKToken?: string | null;
|
|
286
|
-
|
|
287
|
-
whitelistDomains?: Array<string> | null;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export namespace Entity {
|
|
291
|
-
export interface Category {
|
|
292
|
-
label: string;
|
|
293
|
-
|
|
294
|
-
priority: number;
|
|
295
|
-
|
|
296
|
-
value: string;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
export interface Default {
|
|
300
|
-
categories: Array<Default.Category>;
|
|
301
|
-
|
|
302
|
-
language: string;
|
|
303
|
-
|
|
304
|
-
mode: 'opt_in' | 'opt_out';
|
|
305
|
-
|
|
306
|
-
translations: Array<Default.Translation>;
|
|
307
|
-
|
|
308
|
-
autoblockUnknown?: boolean | null;
|
|
309
|
-
|
|
310
|
-
autoShow?: boolean | null;
|
|
311
|
-
|
|
312
|
-
autoShowDismissConfig?: unknown | null;
|
|
313
|
-
|
|
314
|
-
autoShowDismissMode?: string | null;
|
|
315
|
-
|
|
316
|
-
disablePageInteraction?: boolean | null;
|
|
317
|
-
|
|
318
|
-
guiOptions?: unknown | null;
|
|
319
|
-
|
|
320
|
-
hideFromBots?: boolean | null;
|
|
321
|
-
|
|
322
|
-
showVendorsInPreferences?: boolean | null;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export namespace Default {
|
|
326
|
-
export interface Category {
|
|
327
|
-
key: string;
|
|
328
|
-
|
|
329
|
-
value: Category.Value;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export namespace Category {
|
|
333
|
-
export interface Value {
|
|
334
|
-
enabled: boolean;
|
|
335
|
-
|
|
336
|
-
autoDisableOnGPC?: boolean | null;
|
|
337
|
-
|
|
338
|
-
readOnly?: boolean | null;
|
|
339
|
-
|
|
340
|
-
reloadPage?: boolean | null;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
export interface Translation {
|
|
345
|
-
language: string;
|
|
346
|
-
|
|
347
|
-
value: Translation.Value;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
export namespace Translation {
|
|
351
|
-
export interface Value {
|
|
352
|
-
consentModal?: unknown | null;
|
|
353
|
-
|
|
354
|
-
preferencesModal?: unknown | null;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
export interface Region {
|
|
360
|
-
regionCode: string;
|
|
361
|
-
|
|
362
|
-
rule: Region.Rule;
|
|
363
|
-
|
|
364
|
-
additionalRegions?: Array<string> | null;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
export namespace Region {
|
|
368
|
-
export interface Rule {
|
|
369
|
-
categories: Array<Rule.Category>;
|
|
370
|
-
|
|
371
|
-
language: string;
|
|
372
|
-
|
|
373
|
-
mode: 'opt_in' | 'opt_out';
|
|
374
|
-
|
|
375
|
-
translations: Array<Rule.Translation>;
|
|
376
|
-
|
|
377
|
-
autoblockUnknown?: boolean | null;
|
|
378
|
-
|
|
379
|
-
autoShow?: boolean | null;
|
|
380
|
-
|
|
381
|
-
autoShowDismissConfig?: unknown | null;
|
|
382
|
-
|
|
383
|
-
autoShowDismissMode?: string | null;
|
|
384
|
-
|
|
385
|
-
disablePageInteraction?: boolean | null;
|
|
386
|
-
|
|
387
|
-
guiOptions?: unknown | null;
|
|
388
|
-
|
|
389
|
-
hideFromBots?: boolean | null;
|
|
390
|
-
|
|
391
|
-
showVendorsInPreferences?: boolean | null;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
export namespace Rule {
|
|
395
|
-
export interface Category {
|
|
396
|
-
key: string;
|
|
397
|
-
|
|
398
|
-
value: Category.Value;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
export namespace Category {
|
|
402
|
-
export interface Value {
|
|
403
|
-
enabled: boolean;
|
|
404
|
-
|
|
405
|
-
autoDisableOnGPC?: boolean | null;
|
|
406
|
-
|
|
407
|
-
readOnly?: boolean | null;
|
|
408
|
-
|
|
409
|
-
reloadPage?: boolean | null;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
export interface Translation {
|
|
414
|
-
language: string;
|
|
415
|
-
|
|
416
|
-
value: Translation.Value;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
export namespace Translation {
|
|
420
|
-
export interface Value {
|
|
421
|
-
consentModal?: unknown | null;
|
|
422
|
-
|
|
423
|
-
preferencesModal?: unknown | null;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export interface Service {
|
|
430
|
-
internalNotes: string;
|
|
431
|
-
|
|
432
|
-
label: string;
|
|
433
|
-
|
|
434
|
-
additionalCategories?: Array<string> | null;
|
|
435
|
-
|
|
436
|
-
category?: string | null;
|
|
437
|
-
|
|
438
|
-
domainPatterns?: Array<string> | null;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
export interface ConsentSettingDeleteResponse {
|
|
444
|
-
id: string;
|
|
445
|
-
|
|
446
|
-
createdAt: string;
|
|
447
|
-
|
|
448
|
-
kind: string;
|
|
449
|
-
|
|
450
|
-
name: string;
|
|
451
|
-
|
|
452
|
-
status: 'Disabled' | 'Enabled';
|
|
453
|
-
|
|
454
|
-
updatedAt?: string | null;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
3027
|
export interface ConsentSettingUpdateParams {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
name: string;
|
|
3028
|
+
/**
|
|
3029
|
+
* Replace the entire categories list. Omit to leave existing categories untouched.
|
|
3030
|
+
*/
|
|
3031
|
+
categories?: Array<ConsentSettingUpdateParams.Category>;
|
|
463
3032
|
|
|
464
|
-
|
|
3033
|
+
/**
|
|
3034
|
+
* Set or clear the consent cookie name.
|
|
3035
|
+
*/
|
|
3036
|
+
consentCookieName?: string | null;
|
|
465
3037
|
|
|
466
|
-
|
|
3038
|
+
/**
|
|
3039
|
+
* Set or clear the custom CDN domain.
|
|
3040
|
+
*/
|
|
3041
|
+
customDomain?: string | null;
|
|
467
3042
|
|
|
468
|
-
|
|
3043
|
+
/**
|
|
3044
|
+
* Replace the default rule wholesale. Omit to leave it untouched.
|
|
3045
|
+
*/
|
|
3046
|
+
default?: ConsentSettingUpdateParams.Default;
|
|
469
3047
|
|
|
470
|
-
|
|
3048
|
+
/**
|
|
3049
|
+
* Rename the consent settings record.
|
|
3050
|
+
*/
|
|
3051
|
+
name?: string;
|
|
471
3052
|
|
|
472
|
-
|
|
3053
|
+
/**
|
|
3054
|
+
* Replace the entire regions list. Omit to leave it untouched. To change one
|
|
3055
|
+
* region, send the full regions array with that region's rule modified.
|
|
3056
|
+
*/
|
|
3057
|
+
regions?: Array<ConsentSettingUpdateParams.Region>;
|
|
473
3058
|
|
|
3059
|
+
/**
|
|
3060
|
+
* Bump the revision counter to re-prompt users.
|
|
3061
|
+
*/
|
|
474
3062
|
revision?: number | null;
|
|
475
3063
|
|
|
3064
|
+
/**
|
|
3065
|
+
* Replace the entire services list. Omit to leave existing services untouched.
|
|
3066
|
+
*/
|
|
3067
|
+
services?: Array<ConsentSettingUpdateParams.Service>;
|
|
3068
|
+
|
|
3069
|
+
/**
|
|
3070
|
+
* Replace the skipBlockingClassNames list. Pass null/[] to clear.
|
|
3071
|
+
*/
|
|
476
3072
|
skipBlockingClassNames?: Array<string> | null;
|
|
477
3073
|
|
|
3074
|
+
/**
|
|
3075
|
+
* Toggle Enabled/Disabled without re-sending the rest of the config.
|
|
3076
|
+
*/
|
|
3077
|
+
status?: 'Disabled' | 'Enabled';
|
|
3078
|
+
|
|
3079
|
+
/**
|
|
3080
|
+
* Set or clear the WebSource pixel link. A non-null token must be a valid
|
|
3081
|
+
* WebSource of yours.
|
|
3082
|
+
*/
|
|
478
3083
|
webSDKToken?: string | null;
|
|
479
3084
|
|
|
3085
|
+
/**
|
|
3086
|
+
* Replace the allowlist. Pass null/[] to clear.
|
|
3087
|
+
*/
|
|
480
3088
|
whitelistDomains?: Array<string> | null;
|
|
481
3089
|
}
|
|
482
3090
|
|
|
483
3091
|
export namespace ConsentSettingUpdateParams {
|
|
484
3092
|
export interface Category {
|
|
3093
|
+
/**
|
|
3094
|
+
* Human-readable label shown next to the toggle in the preferences modal.
|
|
3095
|
+
*/
|
|
485
3096
|
label: string;
|
|
486
3097
|
|
|
3098
|
+
/**
|
|
3099
|
+
* Sort key. Lower numbers render first. Server re-stamps to 0..N on write — send
|
|
3100
|
+
* any integer, gaps and duplicates are ironed out.
|
|
3101
|
+
*/
|
|
487
3102
|
priority: number;
|
|
488
3103
|
|
|
3104
|
+
/**
|
|
3105
|
+
* Stable identifier referenced by services and translation sections.
|
|
3106
|
+
* Conventionally lowercase (e.g. "necessary", "analytics", "advertising").
|
|
3107
|
+
*/
|
|
489
3108
|
value: string;
|
|
490
3109
|
}
|
|
491
3110
|
|
|
3111
|
+
/**
|
|
3112
|
+
* Replace the default rule wholesale. Omit to leave it untouched.
|
|
3113
|
+
*/
|
|
492
3114
|
export interface Default {
|
|
3115
|
+
/**
|
|
3116
|
+
* Per-category default config for this rule. Every category defined in the
|
|
3117
|
+
* top-level `categories[].value` should have an entry here.
|
|
3118
|
+
*/
|
|
493
3119
|
categories: Array<Default.Category>;
|
|
494
3120
|
|
|
3121
|
+
/**
|
|
3122
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
3123
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
3124
|
+
*/
|
|
495
3125
|
language: string;
|
|
496
3126
|
|
|
3127
|
+
/**
|
|
3128
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
3129
|
+
* default until user rejects (CCPA style).
|
|
3130
|
+
*/
|
|
497
3131
|
mode: 'opt_in' | 'opt_out';
|
|
498
3132
|
|
|
3133
|
+
/**
|
|
3134
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
3135
|
+
* the rule's `language` field.
|
|
3136
|
+
*/
|
|
499
3137
|
translations: Array<Default.Translation>;
|
|
500
3138
|
|
|
3139
|
+
/**
|
|
3140
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
3141
|
+
* in.
|
|
3142
|
+
*/
|
|
501
3143
|
autoblockUnknown?: boolean | null;
|
|
502
3144
|
|
|
3145
|
+
/**
|
|
3146
|
+
* When true, the consent modal auto-opens on page load.
|
|
3147
|
+
*/
|
|
503
3148
|
autoShow?: boolean | null;
|
|
504
3149
|
|
|
3150
|
+
/**
|
|
3151
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
3152
|
+
*/
|
|
505
3153
|
autoShowDismissConfig?: unknown | null;
|
|
506
3154
|
|
|
3155
|
+
/**
|
|
3156
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
3157
|
+
*/
|
|
507
3158
|
autoShowDismissMode?: string | null;
|
|
508
3159
|
|
|
3160
|
+
/**
|
|
3161
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
3162
|
+
* chooses.
|
|
3163
|
+
*/
|
|
509
3164
|
disablePageInteraction?: boolean | null;
|
|
510
3165
|
|
|
3166
|
+
/**
|
|
3167
|
+
* Visual options for the modals (layout/position/colors).
|
|
3168
|
+
*/
|
|
511
3169
|
guiOptions?: unknown | null;
|
|
512
3170
|
|
|
3171
|
+
/**
|
|
3172
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
3173
|
+
*/
|
|
513
3174
|
hideFromBots?: boolean | null;
|
|
514
3175
|
|
|
3176
|
+
/**
|
|
3177
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
3178
|
+
* modal.
|
|
3179
|
+
*/
|
|
515
3180
|
showVendorsInPreferences?: boolean | null;
|
|
516
3181
|
}
|
|
517
3182
|
|
|
518
3183
|
export namespace Default {
|
|
519
3184
|
export interface Category {
|
|
3185
|
+
/**
|
|
3186
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
3187
|
+
*/
|
|
520
3188
|
key: string;
|
|
521
3189
|
|
|
522
3190
|
value: Category.Value;
|
|
@@ -524,17 +3192,34 @@ export namespace ConsentSettingUpdateParams {
|
|
|
524
3192
|
|
|
525
3193
|
export namespace Category {
|
|
526
3194
|
export interface Value {
|
|
3195
|
+
/**
|
|
3196
|
+
* Whether this category is on by default before the user interacts.
|
|
3197
|
+
*/
|
|
527
3198
|
enabled: boolean;
|
|
528
3199
|
|
|
3200
|
+
/**
|
|
3201
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
3202
|
+
*/
|
|
529
3203
|
autoDisableOnGPC?: boolean | null;
|
|
530
3204
|
|
|
3205
|
+
/**
|
|
3206
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
3207
|
+
*/
|
|
531
3208
|
readOnly?: boolean | null;
|
|
532
3209
|
|
|
3210
|
+
/**
|
|
3211
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
3212
|
+
* scripts can run.
|
|
3213
|
+
*/
|
|
533
3214
|
reloadPage?: boolean | null;
|
|
534
3215
|
}
|
|
535
3216
|
}
|
|
536
3217
|
|
|
537
3218
|
export interface Translation {
|
|
3219
|
+
/**
|
|
3220
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
3221
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
3222
|
+
*/
|
|
538
3223
|
language: string;
|
|
539
3224
|
|
|
540
3225
|
value: Translation.Value;
|
|
@@ -542,50 +3227,112 @@ export namespace ConsentSettingUpdateParams {
|
|
|
542
3227
|
|
|
543
3228
|
export namespace Translation {
|
|
544
3229
|
export interface Value {
|
|
3230
|
+
/**
|
|
3231
|
+
* Translated copy for the initial consent modal.
|
|
3232
|
+
*/
|
|
545
3233
|
consentModal?: unknown | null;
|
|
546
3234
|
|
|
3235
|
+
/**
|
|
3236
|
+
* Translated copy for the preferences modal.
|
|
3237
|
+
*/
|
|
547
3238
|
preferencesModal?: unknown | null;
|
|
548
3239
|
}
|
|
549
3240
|
}
|
|
550
3241
|
}
|
|
551
3242
|
|
|
552
3243
|
export interface Region {
|
|
3244
|
+
/**
|
|
3245
|
+
* Region this rule applies to. Use ISO 3166-1 alpha-2 country code ("US", "DE",
|
|
3246
|
+
* "BR") or country-subdivision code ("US-CA", "GB-ENG", "CA-ON"). Each region code
|
|
3247
|
+
* may appear in only one rule across `regions[]`.
|
|
3248
|
+
*/
|
|
553
3249
|
regionCode: string;
|
|
554
3250
|
|
|
555
3251
|
rule: Region.Rule;
|
|
556
3252
|
|
|
3253
|
+
/**
|
|
3254
|
+
* Other region codes that should reuse this rule. Same code-format rules as
|
|
3255
|
+
* `regionCode`. Cannot include `regionCode` itself, cannot duplicate, cannot
|
|
3256
|
+
* overlap with another rule's regions.
|
|
3257
|
+
*/
|
|
557
3258
|
additionalRegions?: Array<string> | null;
|
|
558
3259
|
}
|
|
559
3260
|
|
|
560
3261
|
export namespace Region {
|
|
561
3262
|
export interface Rule {
|
|
3263
|
+
/**
|
|
3264
|
+
* Per-category default config for this rule. Every category defined in the
|
|
3265
|
+
* top-level `categories[].value` should have an entry here.
|
|
3266
|
+
*/
|
|
562
3267
|
categories: Array<Rule.Category>;
|
|
563
3268
|
|
|
3269
|
+
/**
|
|
3270
|
+
* BCP 47 default language for this rule. Must have a matching entry in
|
|
3271
|
+
* `translations`. Examples: "en", "en-US", "es", "de".
|
|
3272
|
+
*/
|
|
564
3273
|
language: string;
|
|
565
3274
|
|
|
3275
|
+
/**
|
|
3276
|
+
* opt_in: scripts blocked until user accepts (GDPR style). opt_out: scripts run by
|
|
3277
|
+
* default until user rejects (CCPA style).
|
|
3278
|
+
*/
|
|
566
3279
|
mode: 'opt_in' | 'opt_out';
|
|
567
3280
|
|
|
3281
|
+
/**
|
|
3282
|
+
* All UI copy, keyed by language. Must include an entry whose `language` matches
|
|
3283
|
+
* the rule's `language` field.
|
|
3284
|
+
*/
|
|
568
3285
|
translations: Array<Rule.Translation>;
|
|
569
3286
|
|
|
3287
|
+
/**
|
|
3288
|
+
* When true, scripts not classified by services[] are blocked until the user opts
|
|
3289
|
+
* in.
|
|
3290
|
+
*/
|
|
570
3291
|
autoblockUnknown?: boolean | null;
|
|
571
3292
|
|
|
3293
|
+
/**
|
|
3294
|
+
* When true, the consent modal auto-opens on page load.
|
|
3295
|
+
*/
|
|
572
3296
|
autoShow?: boolean | null;
|
|
573
3297
|
|
|
3298
|
+
/**
|
|
3299
|
+
* Threshold config for autoShowDismissMode (page count or seconds).
|
|
3300
|
+
*/
|
|
574
3301
|
autoShowDismissConfig?: unknown | null;
|
|
575
3302
|
|
|
3303
|
+
/**
|
|
3304
|
+
* How the modal is treated as dismissed (never, after_pages, after_seconds).
|
|
3305
|
+
*/
|
|
576
3306
|
autoShowDismissMode?: string | null;
|
|
577
3307
|
|
|
3308
|
+
/**
|
|
3309
|
+
* When true, the rest of the page is locked behind a backdrop until the user
|
|
3310
|
+
* chooses.
|
|
3311
|
+
*/
|
|
578
3312
|
disablePageInteraction?: boolean | null;
|
|
579
3313
|
|
|
3314
|
+
/**
|
|
3315
|
+
* Visual options for the modals (layout/position/colors).
|
|
3316
|
+
*/
|
|
580
3317
|
guiOptions?: unknown | null;
|
|
581
3318
|
|
|
3319
|
+
/**
|
|
3320
|
+
* When true, the modal is suppressed for known bot user agents.
|
|
3321
|
+
*/
|
|
582
3322
|
hideFromBots?: boolean | null;
|
|
583
3323
|
|
|
3324
|
+
/**
|
|
3325
|
+
* When true, the per-service list (services[]) is rendered inside the preferences
|
|
3326
|
+
* modal.
|
|
3327
|
+
*/
|
|
584
3328
|
showVendorsInPreferences?: boolean | null;
|
|
585
3329
|
}
|
|
586
3330
|
|
|
587
3331
|
export namespace Rule {
|
|
588
3332
|
export interface Category {
|
|
3333
|
+
/**
|
|
3334
|
+
* Category value (matches `categories[].value`) this entry configures.
|
|
3335
|
+
*/
|
|
589
3336
|
key: string;
|
|
590
3337
|
|
|
591
3338
|
value: Category.Value;
|
|
@@ -593,17 +3340,34 @@ export namespace ConsentSettingUpdateParams {
|
|
|
593
3340
|
|
|
594
3341
|
export namespace Category {
|
|
595
3342
|
export interface Value {
|
|
3343
|
+
/**
|
|
3344
|
+
* Whether this category is on by default before the user interacts.
|
|
3345
|
+
*/
|
|
596
3346
|
enabled: boolean;
|
|
597
3347
|
|
|
3348
|
+
/**
|
|
3349
|
+
* When true, this category defaults off if the browser sends Sec-GPC: 1.
|
|
3350
|
+
*/
|
|
598
3351
|
autoDisableOnGPC?: boolean | null;
|
|
599
3352
|
|
|
3353
|
+
/**
|
|
3354
|
+
* When true, the user cannot toggle this category in the preferences modal.
|
|
3355
|
+
*/
|
|
600
3356
|
readOnly?: boolean | null;
|
|
601
3357
|
|
|
3358
|
+
/**
|
|
3359
|
+
* When true, the page reloads after this category is toggled so newly-allowed
|
|
3360
|
+
* scripts can run.
|
|
3361
|
+
*/
|
|
602
3362
|
reloadPage?: boolean | null;
|
|
603
3363
|
}
|
|
604
3364
|
}
|
|
605
3365
|
|
|
606
3366
|
export interface Translation {
|
|
3367
|
+
/**
|
|
3368
|
+
* BCP 47 language tag identifying which translation this entry provides. Examples:
|
|
3369
|
+
* "en", "en-US", "es", "fr-CA". The default rule's `language` must appear here.
|
|
3370
|
+
*/
|
|
607
3371
|
language: string;
|
|
608
3372
|
|
|
609
3373
|
value: Translation.Value;
|
|
@@ -611,8 +3375,14 @@ export namespace ConsentSettingUpdateParams {
|
|
|
611
3375
|
|
|
612
3376
|
export namespace Translation {
|
|
613
3377
|
export interface Value {
|
|
3378
|
+
/**
|
|
3379
|
+
* Translated copy for the initial consent modal.
|
|
3380
|
+
*/
|
|
614
3381
|
consentModal?: unknown | null;
|
|
615
3382
|
|
|
3383
|
+
/**
|
|
3384
|
+
* Translated copy for the preferences modal.
|
|
3385
|
+
*/
|
|
616
3386
|
preferencesModal?: unknown | null;
|
|
617
3387
|
}
|
|
618
3388
|
}
|
|
@@ -620,25 +3390,47 @@ export namespace ConsentSettingUpdateParams {
|
|
|
620
3390
|
}
|
|
621
3391
|
|
|
622
3392
|
export interface Service {
|
|
3393
|
+
/**
|
|
3394
|
+
* Internal notes shown to admins in the dashboard. Not user-facing.
|
|
3395
|
+
*/
|
|
623
3396
|
internalNotes: string;
|
|
624
3397
|
|
|
3398
|
+
/**
|
|
3399
|
+
* Display name for this service in the preferences modal.
|
|
3400
|
+
*/
|
|
625
3401
|
label: string;
|
|
626
3402
|
|
|
3403
|
+
/**
|
|
3404
|
+
* Extra category values this service belongs to. Each must match a
|
|
3405
|
+
* `categories[].value`.
|
|
3406
|
+
*/
|
|
627
3407
|
additionalCategories?: Array<string> | null;
|
|
628
3408
|
|
|
3409
|
+
/**
|
|
3410
|
+
* Primary category value this service belongs to. Must match one of the top-level
|
|
3411
|
+
* `categories[].value` entries.
|
|
3412
|
+
*/
|
|
629
3413
|
category?: string | null;
|
|
630
3414
|
|
|
3415
|
+
/**
|
|
3416
|
+
* Domains/paths this service matches. Patterns matching the CMP's own scripts
|
|
3417
|
+
* (e.g. cdn.oursprivacy.com/cmp-init) are rejected to prevent the CMP blocking
|
|
3418
|
+
* itself — use a more specific path like cdn.oursprivacy.com/main.js to block a
|
|
3419
|
+
* specific script.
|
|
3420
|
+
*/
|
|
631
3421
|
domainPatterns?: Array<string> | null;
|
|
632
3422
|
}
|
|
633
3423
|
}
|
|
634
3424
|
|
|
635
3425
|
export declare namespace ConsentSettings {
|
|
636
3426
|
export {
|
|
3427
|
+
type ConsentSettingListResponse as ConsentSettingListResponse,
|
|
637
3428
|
type ConsentSettingCreateResponse as ConsentSettingCreateResponse,
|
|
638
3429
|
type ConsentSettingRetrieveResponse as ConsentSettingRetrieveResponse,
|
|
3430
|
+
type ConsentSettingReplaceResponse as ConsentSettingReplaceResponse,
|
|
639
3431
|
type ConsentSettingUpdateResponse as ConsentSettingUpdateResponse,
|
|
640
|
-
type ConsentSettingListResponse as ConsentSettingListResponse,
|
|
641
3432
|
type ConsentSettingDeleteResponse as ConsentSettingDeleteResponse,
|
|
3433
|
+
type ConsentSettingReplaceParams as ConsentSettingReplaceParams,
|
|
642
3434
|
type ConsentSettingUpdateParams as ConsentSettingUpdateParams,
|
|
643
3435
|
};
|
|
644
3436
|
}
|