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