@cookiemunch/sdk 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,829 +1,3 @@
1
- export { CONSENT_COOKIE_NAME, ConsentCategory, ConsentSource, ConsentTokenClaims, DEFAULT_JWKS_URL, JsonWebKeySet, KeySetOptions, ReadConsentOptions, ReadSignedConsentOptions, ServerConsent, SignableDecision, VerifyTokenOptions, consentSignaturePayload, getConsent, isAllowed, parseConsentValue, readConsent, verifyDecisionSignature, verifyToken } from './consent.js';
2
-
3
- /**
4
- * Request/response shapes for the Cookie Munch Developer API (/v1). These mirror the
5
- * server's dev-api surface; they are defined here (rather than imported) so the SDK
6
- * has no runtime/workspace dependency on the server package.
7
- */
8
- interface Identity {
9
- orgId: string;
10
- orgName?: string | null;
11
- /** The EFFECTIVE plan — the one every feature gate and limit uses. */
12
- plan: string;
13
- /**
14
- * Why: `org` = this org's own subscription (or free, or a reseller-managed `child` plan);
15
- * `account` = another org with the same owner pays for a higher plan that covers this one.
16
- */
17
- planSource: PlanSource;
18
- /** What this org subscribes to itself (`free` = no subscription of its own). */
19
- subscribedPlan: string;
20
- /** Features the effective plan unlocks (e.g. `whiteLabel`, `tcf`, `sso`, `abTesting`). */
21
- features: string[];
22
- keyPrefix: string;
23
- /** null = full access. */
24
- scopes?: string[] | null;
25
- unscoped?: boolean;
26
- propertyLocked?: boolean;
27
- cbids?: string[];
28
- reseller?: boolean;
29
- /** This organisation is a sandbox (`sandbox.create()`): test keys, test rights requests, never billed. */
30
- sandbox?: boolean;
31
- /** For a sandbox: the live organisation it belongs to. */
32
- sandboxOf?: string;
33
- }
34
- type PlanSource = 'org' | 'account';
35
- /** One organisation on an account (GET /v1/orgs, and the `org_limit` refusal). */
36
- interface AccountOrg {
37
- id: string;
38
- name: string;
39
- /** The effective plan. */
40
- plan: string;
41
- planSource: PlanSource;
42
- subscribedPlan: string;
43
- /** Present on a reseller-managed child organisation. */
44
- parentOrgId?: string;
45
- createdAt: number;
46
- /** True for the organisation the calling key belongs to. */
47
- current: boolean;
48
- }
49
- interface AccountOrgs {
50
- orgs: AccountOrg[];
51
- /** The per-account org cap: `max` (null = unlimited), the `plan` that sets it, and `used`. */
52
- orgLimit: {
53
- max: number | null;
54
- plan: string;
55
- used: number;
56
- };
57
- /** The dashboard billing page, where a plan is chosen. */
58
- upgradeUrl: string;
59
- }
60
- interface Site {
61
- cbid: string;
62
- orgId: string;
63
- domain: string;
64
- /** The business name data subjects see on the rights page, in notices and the policy. Absent: the domain is shown. */
65
- name?: string;
66
- /** Other hosts serving the site: accepted consent-ingest origins, never verified claims. */
67
- aliases?: string[];
68
- verified?: boolean;
69
- }
70
- /** PATCH /v1/sites/{cbid} — rename or move a site. `name: null` clears the name; `aliases: []` clears them. */
71
- interface SiteUpdate {
72
- domain?: string;
73
- name?: string | null;
74
- aliases?: string[];
75
- }
76
- interface SiteUpdateResult {
77
- dryRun?: true;
78
- site: Site;
79
- diff: Array<{
80
- field: 'domain' | 'name' | 'aliases' | 'verified';
81
- before: unknown;
82
- after: unknown;
83
- }>;
84
- effects: {
85
- /** `reset`: the domain moved; verify the new one. */
86
- verification: 'kept' | 'reset';
87
- scanTarget: string;
88
- previewDefaultUrl: string;
89
- displayName: string;
90
- /** Custom rights-page hostnames no longer under the domain or an alias (left in place). */
91
- staleRightsDomains: string[];
92
- };
93
- warnings?: Array<{
94
- field: string;
95
- reason: string;
96
- }>;
97
- }
98
- /** One row of GET /v1/integration-health. `ok: null` = the check could not run (see `detail`). */
99
- interface HealthRow {
100
- /** The suite shape's name for `check` (always equal). */
101
- id: string;
102
- check: string;
103
- /** The generic check this row is an instance of (`forumulate.webhook` → `webhook.delivery`); otherwise `check`. */
104
- kind: string;
105
- /** The vendor a vendor-specific instance is about. */
106
- vendor?: string;
107
- ok: boolean | null;
108
- severity: 'error' | 'warning' | 'info';
109
- subject: string;
110
- fixHint?: string;
111
- /** The same as fixHint (suite shape). */
112
- fix?: string;
113
- /** Where the check and its fix are explained. */
114
- docs: string;
115
- detail?: string;
116
- /** Network checks: the hop that failed (or, on success, the last one reached). */
117
- hop?: 'dns' | 'tls' | 'http' | 'challenge' | 'auth';
118
- status?: number;
119
- elapsedMs?: number;
120
- /** Failed network checks: a stable code (ENOTFOUND, timeout, challenge, http_503, …). */
121
- error?: string;
122
- /** A waiver covers this failing row; `ok` is then null. */
123
- waived?: {
124
- reason: string;
125
- by: string;
126
- until: number | null;
127
- };
128
- lastCheckedAt: number;
129
- }
130
- interface IntegrationHealthReport {
131
- cbid: string;
132
- checkedAt: number;
133
- generatedAt: string;
134
- ok: boolean;
135
- counts: {
136
- error: number;
137
- warning: number;
138
- notChecked: number;
139
- waived: number;
140
- };
141
- checks: HealthRow[];
142
- }
143
- /** PUT /v1/integration-health/waivers. */
144
- interface HealthWaiverInput {
145
- /** Optional when the organisation has one site. */
146
- cbid?: string;
147
- /** A row's `check` or `kind`. */
148
- check: string;
149
- /** A row's `subject`; omitted: every subject of the check (`*`). */
150
- subject?: string;
151
- /** Why this is deliberate (1–500 characters). */
152
- reason: string;
153
- /** ISO date or epoch ms, future, within a year; omitted or null: never expires. */
154
- until?: string | number | null;
155
- }
156
- interface HealthWaiver {
157
- cbid: string;
158
- check: string;
159
- subject: string;
160
- reason: string;
161
- by: string;
162
- until: number | null;
163
- createdAt: number;
164
- expired?: boolean;
165
- }
166
- /** POST /v1/provision. Secrets are used for the request only and never returned. */
167
- interface ProvisionRequest {
168
- product: string;
169
- domain: string;
170
- name?: string;
171
- aliases?: string[];
172
- cbid?: string;
173
- /** `frontendApiHost` (e.g. auth.example.com) lets provision declare Atlas's sign-in cookies on the site. */
174
- /** `rightsIdentity` (default true) makes Atlas the site's rights sign-in (step `rights.identity`). */
175
- atlas?: {
176
- secretKey: string;
177
- cookieConsent?: boolean;
178
- dsrWebhook?: boolean;
179
- rightsIdentity?: boolean;
180
- frontendApiHost?: string;
181
- };
182
- forumulate?: {
183
- token: string;
184
- orgId: string;
185
- consent?: boolean;
186
- executorKey?: boolean;
187
- label?: string;
188
- };
189
- rightsApi?: {
190
- baseUrl: string;
191
- secretKey: string;
192
- profilePreset?: string;
193
- };
194
- }
195
- interface ProvisionStep {
196
- /** v2 answers: the stable step id (`fromStep` takes it). */
197
- id?: string;
198
- step: string;
199
- status: 'created' | 'updated' | 'unchanged' | 'would_create' | 'would_update' | 'skipped' | 'waiting' | 'waiting_on' | 'failed' | 'passed';
200
- detail?: string;
201
- diff?: Array<{
202
- field: string;
203
- before: unknown;
204
- after: unknown;
205
- }>;
206
- /** A string in v1 answers; `{ platform, items }` in v2 answers. */
207
- waitingOn?: string | {
208
- platform: string;
209
- items: string[];
210
- };
211
- }
212
- interface ProvisionResult {
213
- dryRun: boolean;
214
- product: string;
215
- cbid: string | null;
216
- steps: ProvisionStep[];
217
- summary: {
218
- changed: number;
219
- unchanged: number;
220
- waiting: number;
221
- failed: number;
222
- };
223
- /** v2 answers only. */
224
- version?: 2;
225
- ids?: {
226
- orgId: string;
227
- cbid: string | null;
228
- executors: Record<string, string>;
229
- webhooks: string[];
230
- };
231
- sealedSecrets?: Array<Record<string, unknown>>;
232
- checklist?: string[];
233
- }
234
- /** A partner the deployment knows: built in (forumulate, atlas, chatly, referalli) or any other registered on it. */
235
- type PartnerId = 'forumulate' | 'atlas' | 'chatly' | 'referalli' | (string & {});
236
- interface PartnerLinkCreate {
237
- partner: PartnerId;
238
- /** The partner's id for the receiving account (a Forumulate organisation id, an Atlas instance id). */
239
- externalId: string;
240
- label?: string;
241
- events?: Array<'consent.recorded' | 'consent.withdrawn'>;
242
- }
243
- interface PartnerLink {
244
- id: string;
245
- cbid: string;
246
- partner: PartnerId;
247
- externalId: string;
248
- label?: string;
249
- events: string[];
250
- status: 'active' | 'waiting_on_partner' | 'revoked';
251
- /** e.g. "Forumulate (docs) — receiving consent events". */
252
- summary: string;
253
- waitingOn?: string;
254
- createdAt: number;
255
- createdBy?: string;
256
- revokedAt?: number;
257
- revokedBy?: string | null;
258
- lastDeliveryAt: number | null;
259
- lastError: string | null;
260
- }
261
- interface PartnerCatalogEntry {
262
- id: PartnerId;
263
- label: string;
264
- externalIdLabel: string;
265
- events: string[];
266
- available: boolean;
267
- waitingOn?: string;
268
- }
269
- interface SiteCreate {
270
- domain: string;
271
- /** Optional; the server auto-generates a cbid when omitted. */
272
- cbid?: string;
273
- }
274
- /** Site config is an open, deeply-nested object owned by @cookiemunch/core. */
275
- type SiteConfig = Record<string, unknown>;
276
- interface ConsentDay {
277
- Date: string;
278
- OptIn: number;
279
- OptOut: number;
280
- OptInImplied: number;
281
- OptInStrict: number;
282
- TypeOptInPref: number;
283
- TypeOptInStat: number;
284
- TypeOptInMark: number;
285
- Impressions: number;
286
- Countries: Record<string, number>;
287
- }
288
- interface ConsentLogRow {
289
- stamp: string;
290
- receivedAt: number;
291
- region: string;
292
- method: string;
293
- choices: {
294
- preferences: boolean;
295
- statistics: boolean;
296
- marketing: boolean;
297
- };
298
- anonIp: string;
299
- url: string;
300
- }
301
- interface RangeQuery {
302
- from?: number;
303
- to?: number;
304
- }
305
- interface LogQuery extends RangeQuery {
306
- limit?: number;
307
- }
308
- type DsarType = 'access' | 'deletion' | 'rectification' | 'portability' | 'opt-out' | 'closure' | 'restriction';
309
- /** A type word as sent: the canonical words, or an alias (`erasure`/`erase` → deletion, `export` → access). */
310
- type DsarTypeWord = DsarType | 'erasure' | 'erase' | 'export';
311
- type Regulation = 'gdpr' | 'ccpa';
312
- type DsarStatus = 'received' | 'verifying' | 'in_progress' | 'completed' | 'rejected' | 'cancelled';
313
- interface DsarRequest {
314
- id: string;
315
- type: DsarType;
316
- subjectEmail: string;
317
- regulation: Regulation;
318
- status: DsarStatus;
319
- createdAt: number;
320
- dueAt: number;
321
- /** Where the subject said they are, when the intake captured it. */
322
- jurisdiction?: string;
323
- /** INTERNAL: intake note plus the audit lines `/erase` and `/export` append. Never shown to the subject. */
324
- note?: string;
325
- /** The line the subject reads in the response notice. */
326
- messageToSubject?: string;
327
- /** A test request: off the SLA board, labelled, and deletable with `dsar.delete`. A closed request can be marked one with `dsar.markTest`. */
328
- test?: boolean;
329
- /** Its type in the suite vocabulary (`erasure` was stored as `deletion`). */
330
- canonicalType?: string;
331
- /** The case's X-ForgeDeck-Trace, when it has one. */
332
- trace?: string;
333
- }
334
- /** A signed-in identity from any OIDC issuer the site trusts. `(iss, sub)` is the key. */
335
- interface SubjectIdentity {
336
- iss: string;
337
- sub: string;
338
- ext?: string;
339
- principal?: string;
340
- }
341
- /** Who a case is about. `atlas` is accepted as an alias of `identity`. */
342
- interface DsarSubject {
343
- emails: string[];
344
- identity?: SubjectIdentity;
345
- atlas?: SubjectIdentity;
346
- }
347
- /** POST /v1/dsar/requests. */
348
- interface DsarCaseCreate {
349
- cbid: string;
350
- type: DsarTypeWord;
351
- subject?: DsarSubject;
352
- /** The person's own token from the site's sign-in issuer (aud `cookiemunch:<cbid>`). */
353
- subjectToken?: string;
354
- /** product and atlas need dsar:write and attest the person; admin (default) files it received. */
355
- source?: 'product' | 'atlas' | 'admin';
356
- reason?: string;
357
- /** Connections not to ask: system names, connection ids, or `self`. */
358
- skipSystems?: string[];
359
- /** Default true. */
360
- fulfill?: boolean;
361
- regulation?: 'gdpr' | 'ccpa' | 'lgpd' | 'pipeda' | 'vcdpa';
362
- jurisdiction?: string;
363
- test?: boolean;
364
- }
365
- type DsarCaseStatus = 'pending' | 'scheduled' | 'processing' | 'completed' | 'completed_with_retention' | 'rejected' | 'cancelled';
366
- interface RetentionLine {
367
- category: string;
368
- basis: 'legal_obligation' | 'legal_claims' | 'contract' | 'public_interest';
369
- until?: string;
370
- }
371
- interface DsarCaseTask {
372
- system: string;
373
- executorId: string | null;
374
- taskId: string;
375
- status: DsarCaseStatus | 'no_match';
376
- requestId: string | null;
377
- eta: string | null;
378
- completedAt: string | null;
379
- detail: string | null;
380
- retention?: RetentionLine[];
381
- }
382
- /** A case across every connected system. */
383
- interface DsarCase {
384
- id: string;
385
- type: DsarType;
386
- canonicalType: string;
387
- status: DsarCaseStatus;
388
- requestStatus: DsarStatus;
389
- cbid?: string;
390
- source: 'product' | 'atlas' | 'rights_page' | 'admin' | null;
391
- reason: string | null;
392
- openedAt: string;
393
- /** Nothing is erased anywhere before this. */
394
- executeAfter: string | null;
395
- graceDays: number | null;
396
- closedAt: string | null;
397
- /** False for a closure: no statutory clock. */
398
- statutory: boolean;
399
- dueAt: string | null;
400
- verification: string | null;
401
- trace: string | null;
402
- subject: {
403
- emails: string[];
404
- identity: SubjectIdentity | null;
405
- };
406
- skipSystems: string[];
407
- fulfill: boolean | null;
408
- cancelRequestedAt: string | null;
409
- test: boolean;
410
- tasks: DsarCaseTask[];
411
- receiptUrl: string;
412
- /** Lets the person who asked read this case through POST /api/v1/public/dsar/status. */
413
- statusToken?: string;
414
- }
415
- /** One signed receipt for a case (Ed25519; verify with GET /v1/partner/jwks.json). */
416
- interface DsarCaseReceipt {
417
- receiptVersion: number;
418
- caseId: string;
419
- type: DsarType;
420
- canonicalType: string;
421
- status: DsarCaseStatus;
422
- openedAt: string;
423
- executeAfter: string | null;
424
- closedAt: string | null;
425
- verification: string | null;
426
- trace: string | null;
427
- subject: {
428
- emailHashes: string[];
429
- identityHash?: string;
430
- atlasSubHash?: string;
431
- };
432
- systems: Array<{
433
- system: string;
434
- executorId: string | null;
435
- requestId: string | null;
436
- status: string;
437
- completedAt: string | null;
438
- trace: string | null;
439
- retention?: RetentionLine[];
440
- }>;
441
- issuedAt: string;
442
- signature: {
443
- alg: 'Ed25519';
444
- kid: string;
445
- value: string;
446
- covers?: string;
447
- };
448
- }
449
- /** A site's rights-request settings. */
450
- interface DsarSettings {
451
- cbid: string;
452
- /** Days an erasure or account closure waits before any system acts (0–30). 7 for a new site; 0 for one that existed before (opt-in). */
453
- graceDays: number;
454
- /** site: set explicitly; default: a new site's 7 days; legacy: an existing site, 0 until set. */
455
- source: 'site' | 'default' | 'legacy';
456
- updatedAt: number | null;
457
- }
458
- /** GET /v1/integrations/{app}/card. */
459
- interface SubjectCard {
460
- app: string;
461
- openCases: Array<{
462
- id: string;
463
- type: string;
464
- status: string;
465
- executeAfter: string | null;
466
- openedAt: string;
467
- receiptUrl: string;
468
- }>;
469
- consent: null;
470
- }
471
- /**
472
- * How a rights-page requester was verified — on every answer of the public intake
473
- * (`POST /api/v1/public/dsar`, `/verify`, `/resend`) and so in the `dsar.created` webhook payload.
474
- * `email_code` on a 202: a code was mailed through your own provider; on a 201: the code matched.
475
- * `none` with a `reason`: filed without verification — confirm the requester yourself. `none`
476
- * without one: an opt-out, which needs no verification.
477
- */
478
- type PublicVerification = {
479
- method: 'session' | 'email_code' | 'account_link';
480
- } | {
481
- method: 'none';
482
- reason?: 'no_verification_configured' | 'mail_failed' | 'recipient_rejected';
483
- };
484
- /** A public intake that filed a request (201): also the `dsar.created` payload for one. */
485
- interface PublicDsarFiled {
486
- id: string;
487
- status: 'received' | 'verifying';
488
- /** Epoch ms the statutory response is due. */
489
- deadline: number;
490
- /** Only when filed without verification; the same as `verification.method` `none` with a `reason`. */
491
- unverified?: true;
492
- verification: PublicVerification;
493
- }
494
- /** A public intake waiting for its email code (202). */
495
- interface PublicDsarPending {
496
- pendingId: string;
497
- expiresAt: number;
498
- resendAfter?: number;
499
- verification: {
500
- method: 'email_code';
501
- };
502
- }
503
- interface DsarCreate {
504
- type: DsarType;
505
- subjectEmail: string;
506
- /** Picks the statutory response window. */
507
- regulation: Regulation;
508
- /**
509
- * Where the subject says they are (ISO 3166 country or country-subdivision, e.g.
510
- * `US-TX`). The response notice names the statute that governs there — without it a
511
- * Texan is told their request was handled under a Virginia law, since every US state
512
- * shares one `regulation` for the deadline.
513
- */
514
- jurisdiction?: string;
515
- /** INTERNAL: kept on the request, never shown to the subject. */
516
- note?: string;
517
- /** The one free-text line the subject reads in the notice (≤2000 chars; an API key or key prefix is refused). */
518
- messageToSubject?: string;
519
- /** The property this request belongs to; decides which connected systems answer it. */
520
- cbid?: string;
521
- /** The subject's consent-receipt id. */
522
- stamp?: string;
523
- /**
524
- * Mark it as a test: left out of SLA metrics and the deadline board, labelled as a test,
525
- * and deletable with `dsar.delete(id)`. For end-to-end checks of a rights flow.
526
- */
527
- test?: boolean;
528
- }
529
- interface VendorInput {
530
- name: string;
531
- category: string;
532
- dataShared: string[];
533
- dpaSigned: boolean;
534
- subprocessors: number;
535
- certifications: string[];
536
- region: string;
537
- }
538
- interface RiskScore {
539
- score: number;
540
- band: 'low' | 'medium' | 'high';
541
- }
542
- /** A stored vendor record (no computed risk; see {@link ScoredVendor}). Returned as the
543
- * `vendor` field of POST /v1/vendors. */
544
- interface VendorRecord extends VendorInput {
545
- id: string;
546
- }
547
- /** A vendor as listed, with its computed risk flattened in. */
548
- interface ScoredVendor extends VendorRecord {
549
- risk: RiskScore;
550
- }
551
- type LegalBasis = 'consent' | 'contract' | 'legal-obligation' | 'vital-interests' | 'public-task' | 'legitimate-interests';
552
- interface RopaInput {
553
- name: string;
554
- purpose: string;
555
- legalBasis: LegalBasis;
556
- dataCategories: string[];
557
- recipients: string[];
558
- retentionDays: number;
559
- crossBorderTransfer: boolean;
560
- }
561
- interface RopaEntry extends RopaInput {
562
- id: string;
563
- }
564
- /** A signed consent receipt (shape owned by @cookiemunch/receipts). */
565
- type SignedReceipt = Record<string, unknown>;
566
- /** How a preference-center opt-in was captured. Mirrors @cookiemunch/preferences OptInMethod. */
567
- type OptInMethod = 'single-opt-in' | 'double-opt-in';
568
- /**
569
- * A subject's saved preference-center record (identity-keyed named purposes, distinct
570
- * from the org-level {@link PreferenceItem} catalog). Matches @cookiemunch/preferences
571
- * PreferenceRecord (mirrored here per this package's no-server-dependency convention).
572
- * Returned wrapped as `{ record }` by POST /v1/preferences.
573
- */
574
- interface PreferenceRecord {
575
- subjectId: string;
576
- purposes: Record<string, boolean>;
577
- method: OptInMethod;
578
- confirmed: boolean;
579
- updatedAt: number;
580
- version: number;
581
- }
582
- /** GET /v1/categories/registry — the reserved category templates (CMU-X15). */
583
- interface CategoryRegistry {
584
- version: 1;
585
- standard: string[];
586
- suite: Array<{
587
- id: 'support_chat' | 'referrals';
588
- stance: 'necessary_on_request' | 'opt_in_eu_uk';
589
- fallback: 'preferences' | 'marketing';
590
- /** By banner language. */
591
- labels: Record<string, string>;
592
- descriptions: Record<string, string>;
593
- basis?: string[];
594
- vendors?: Array<{
595
- product: string;
596
- storage: string[];
597
- }>;
598
- }>;
599
- }
600
-
601
- interface VerifyWebhookInput {
602
- /** The raw request body, exactly as received. Do NOT re-stringify parsed JSON. */
603
- payload: string;
604
- /** The `X-CookieMunch-Signature` header value. */
605
- signature: string | undefined | null;
606
- /** The `X-CookieMunch-Timestamp` header value (unix seconds). */
607
- timestamp: string | number | undefined | null;
608
- /** The subscription secret (`whsec_…`), shown once when the webhook was created. */
609
- secret: string;
610
- /**
611
- * Maximum age (in seconds) of a delivery before it is rejected as stale/replayed.
612
- * Defaults to 300 (5 minutes). Pass 0 to disable the freshness check entirely.
613
- */
614
- toleranceSeconds?: number;
615
- /** Current time in ms (injectable for tests); defaults to `Date.now()`. */
616
- now?: number;
617
- }
618
- /**
619
- * Returns true only when the signature is valid AND (unless disabled) the timestamp is fresh.
620
- * Fail-closed: any missing/malformed input returns false rather than throwing.
621
- */
622
- declare function verifyWebhookSignature(input: VerifyWebhookInput): boolean;
623
-
624
- interface MintConsentSyncTokenInput {
625
- /** The site's consent-sync secret (`cmss_…`). */
626
- secret: string;
627
- /** The site the token is for. A token for one site is refused by every other. */
628
- cbid: string;
629
- /** Who is signed in: 1–128 of `A-Z a-z 0-9 . _ : @ + / = ~ -`. Use an opaque id. */
630
- subject: string;
631
- /** Lifetime in seconds. Default 3600; at most 86400 (Cookie Munch refuses longer). */
632
- ttlSeconds?: number;
633
- /** Current time in ms (injectable for tests). */
634
- now?: number;
635
- }
636
- declare function mintConsentSyncToken(input: MintConsentSyncTokenInput): string;
637
-
638
- /**
639
- * The cm-standard-v2 executor conformance kit (CMU-X20).
640
- *
641
- * cm-standard-v2 is an open contract: any system that holds personal data can implement it and
642
- * be driven by Cookie Munch with no code on our side (docs: cookiemunch.net/docs/executor-contract-v2).
643
- * This kit checks an implementation rule by rule, and names the rule that fails. It is the same
644
- * suite Cookie Munch runs on `POST /v1/dsar/executors/{id}/test {conformance: true}`, and the
645
- * `cookiemunch executors conformance <baseUrl>` command runs it from a terminal or CI.
646
- *
647
- * It only ever touches the CANARY subject — an address no real person has. The contract asks every
648
- * implementation to treat the canary as an existing synthetic person: it is found by its email and
649
- * by its identity, requests on it move through the full state machine, and nothing real is ever
650
- * erased. So the kit can check that an erasure waits for `executeAfter`, that a cancel leaves the
651
- * person in place, and that an identity is never matched to someone else through a shared email —
652
- * without a real person's data being anywhere near it.
653
- *
654
- * No dependencies: `fetch` only, so it runs in Node 18+, a browser, or an edge runtime.
655
- */
656
- type ConformanceStatus = 'pass' | 'fail' | 'skip';
657
- interface ConformanceRuleResult {
658
- /** A stable id, e.g. `requests.execute_after.scheduled`. */
659
- id: string;
660
- /** What the rule says, in one sentence. */
661
- title: string;
662
- status: ConformanceStatus;
663
- /** What was seen, when it failed or was skipped. */
664
- detail?: string;
665
- }
666
- interface ConformanceReport {
667
- /** True when no rule failed. */
668
- ok: boolean;
669
- passed: number;
670
- failed: number;
671
- skipped: number;
672
- rules: ConformanceRuleResult[];
673
- /** The `X-Version` the executor answered with, when it sent one. */
674
- version?: string;
675
- }
676
- interface ConformanceOptions {
677
- /** The executor's base: the contract paths are `{baseUrl}/privacy/lookup` and so on. https (http only for localhost). */
678
- baseUrl: string;
679
- /** The credential Cookie Munch would send. */
680
- secret: string;
681
- /**
682
- * The canary address: `canary-<16 hex>@canary.cookiemunch.net`, per organisation
683
- * (`GET /v1/dsar/executors/presets` → `canaryEmail`).
684
- */
685
- canaryEmail: string;
686
- /** How the secret is sent. Default `Authorization: Bearer {secret}`. */
687
- auth?: {
688
- header: string;
689
- format: string;
690
- };
691
- /** Path prefix under baseUrl. Default `/privacy`. */
692
- prefix?: string;
693
- fetch?: typeof fetch;
694
- now?: () => number;
695
- /** A per-run tag for idempotency keys and case ids. Default random. */
696
- runId?: string;
697
- }
698
- /** The issuer the canary identity carries. */
699
- declare const CANARY_ISSUER = "https://canary.cookiemunch.net";
700
- /** The canary subject's identity, derived from its address. */
701
- declare function canaryIdentityFor(canaryEmail: string): {
702
- iss: string;
703
- sub: string;
704
- ext: string;
705
- };
706
- /** Every rule, in the order they run. */
707
- declare const CONFORMANCE_RULES: ReadonlyArray<{
708
- id: string;
709
- title: string;
710
- }>;
711
- /** Run every rule against one executor. Never throws for an executor's answer; only for bad options. */
712
- declare function runExecutorConformance(o: ConformanceOptions): Promise<ConformanceReport>;
713
-
714
- /**
715
- * Operator token exchange (RFC 8693, CMU-X33): swap your identity provider's token for a short-lived,
716
- * scoped Cookie Munch API key, so no long-lived key has to live in a file.
717
- *
718
- * import { exchangeOperatorToken, createCookieMunch } from '@cookiemunch/sdk';
719
- * const { accessToken } = await exchangeOperatorToken({
720
- * subjectToken: process.env.STAFF_ACCESS_TOKEN!, // from the sign-in your organisation trusts
721
- * scope: ['sites:read', 'dsar:read'],
722
- * resource: 'org:2f1c…', // or 'site:<cbid>' to lock the key to one site
723
- * });
724
- * const client = createCookieMunch({ apiKey: accessToken, baseUrl: 'https://api.cookiemunch.net' });
725
- *
726
- * No API key is needed for the exchange itself. The key it returns expires on its own (at most an hour).
727
- */
728
- interface OperatorTokenExchangeInput {
729
- /** The access or ID token from an OIDC issuer the deployment trusts. */
730
- subjectToken: string;
731
- /** Which kind of token `subjectToken` is. Default `access_token`. */
732
- subjectTokenType?: 'access_token' | 'jwt' | 'id_token';
733
- /** The API scopes the key should carry. Required: an exchanged key is never full access. */
734
- scope: string[];
735
- /** `org:<id>`, or `site:<cbid>` to lock the key to one site. */
736
- resource: `org:${string}` | `site:${string}`;
737
- /** Seconds, 60 to 3600. Default 3600. */
738
- expiresIn?: number;
739
- /** Default `https://api.cookiemunch.net`. */
740
- baseUrl?: string;
741
- fetch?: typeof fetch;
742
- }
743
- interface OperatorTokenExchangeResult {
744
- /** A scoped Cookie Munch API key. */
745
- accessToken: string;
746
- expiresIn: number;
747
- scope: string[];
748
- }
749
- /** Thrown with the RFC 6749 `error` and `error_description` the server answered. */
750
- declare class TokenExchangeError extends Error {
751
- readonly error: string;
752
- readonly status: number;
753
- constructor(error: string, status: number, description?: string);
754
- }
755
- declare function exchangeOperatorToken(input: OperatorTokenExchangeInput): Promise<OperatorTokenExchangeResult>;
756
-
757
- /**
758
- * Types for `window.__fdConsent`, the shared consent API any embed can code against — a chat
759
- * widget, a referral snippet, an analytics tag — whatever CMP the page runs. Cookie Munch sets
760
- * it natively; `fd-consent-shim.js` sets the same object over Cookiebot, OneTrust or no CMP.
761
- * Type-only: importing this module adds nothing to a bundle.
762
- *
763
- * import type { FdConsent, FdConsentQueue } from '@cookiemunch/sdk';
764
- * const fd = (window.__fdConsent ??= { q: [] });
765
- * if ('version' in fd) fd.on('change', (s) => …); else fd.q.push(['on', 'change', (s) => …]);
766
- *
767
- * `version` changes only with a breaking change; new members do not bump it.
768
- */
769
- /** What caused a change. The same causes Cookie Munch's ledger records. */
770
- type FdCause = 'replay' | 'accept' | 'decline' | 'selection' | 'withdraw' | 'implied' | 'sync' | 'request' | 'migrated';
771
- interface FdSnapshot {
772
- /** False until the visitor has answered. */
773
- decided: boolean;
774
- /** False when this visitor's region and the site's rules need no answer (a default applies). */
775
- required: boolean;
776
- /** Every category the site offers (standard, custom, reserved) and its answer. */
777
- categories: Record<string, boolean>;
778
- /** The decision's stamp (`CookieMunch.consentId()`), or null. */
779
- stamp: string | null;
780
- region: string;
781
- /** A Global Privacy Control signal was seen. */
782
- gpc: boolean;
783
- /** ISO 8601, or null before a decision. */
784
- decidedAt: string | null;
785
- }
786
- interface FdRequestOptions {
787
- /** One sentence in the page's language: what will be stored and why. Shown as the prompt's text. */
788
- reason: string;
789
- /** Who is asking: your vendor id. Recorded with the answer. */
790
- vendor: string;
791
- }
792
- interface FdConsent {
793
- readonly version: 1;
794
- /** `cookiemunch`, or `shim:cookiebot` / `shim:onetrust` / `shim:none`. */
795
- readonly provider: string;
796
- /** Resolves once a decision exists, or at once where the region needs none. */
797
- ready(): Promise<FdSnapshot>;
798
- /** true / false, or null while a required decision is pending. Never false for "not decided". */
799
- has(category: string): boolean | null;
800
- /** Fires once per decision (a returning visitor's as `replay`); a withdrawal synchronously. Returns unsubscribe. */
801
- on(event: 'change', cb: (snapshot: FdSnapshot, cause: FdCause) => void): () => void;
802
- /** Ask for one category at the moment you need it. Never re-asks a refusal; one prompt per category per page view. */
803
- request(category: string, opts: FdRequestOptions): Promise<boolean>;
804
- /** Not available yet: warns once and does nothing. */
805
- identify(token: string): void;
806
- layout: {
807
- bottomInset(): number;
808
- on(cb: (insetPx: number) => void): () => void;
809
- };
810
- /** Calls made on the queue before this existed ran in order; later pushes run at once. */
811
- q: {
812
- push(...calls: FdQueuedCall[]): number;
813
- };
814
- }
815
- /** A call queued before the real object exists. */
816
- type FdQueuedCall = ['on', 'change', (snapshot: FdSnapshot, cause: FdCause) => void] | ['ready', (snapshot: FdSnapshot) => void] | ['request', string, FdRequestOptions, (granted: boolean) => void] | ['identify', string];
817
- /** What an embed that loads first creates: `window.__fdConsent = window.__fdConsent || { q: [] }`. */
818
- interface FdConsentQueue {
819
- q: FdQueuedCall[];
820
- }
821
- declare global {
822
- interface Window {
823
- __fdConsent?: FdConsent | FdConsentQueue;
824
- }
825
- }
826
-
827
1
  /**
828
2
  * @cookiemunch/sdk — a small, typed REST client for the Cookie Munch Developer API
829
3
  * (the /v1 surface). Construct it with an API key; the org is derived server-side
@@ -833,13 +7,21 @@ declare global {
833
7
  * const fc = createCookieMunch({ apiKey: 'fck_…', baseUrl: 'https://api.cookiemunch.net' });
834
8
  * const sites = await fc.sites.list();
835
9
  */
836
-
10
+ export * from './types.js';
11
+ export * from './consent.js';
12
+ export * from './webhooks.js';
13
+ export * from './consent-sync.js';
14
+ export * from './executor-conformance.js';
15
+ export * from './token-exchange.js';
16
+ export type * from './fd-consent.js';
17
+ import type { CategoryRegistry, Identity, AccountOrgs, Site, SiteCreate, SiteConfig, SiteUpdate, SiteUpdateResult, IntegrationHealthReport, HealthWaiver, HealthWaiverInput, ProvisionRequest, ProvisionResult, PartnerLink, PartnerLinkCreate, PartnerCatalogEntry, ConsentDay, ConsentLogRow, RangeQuery, LogQuery, DsarRequest, DsarCreate, DsarCase, DsarCaseCreate, DsarCaseReceipt, DsarSettings, SubjectCard, IntegrationConnect, IntegrationConnectResult, DsarStatus, ScoredVendor, VendorInput, VendorRecord, RiskScore, RopaEntry, RopaInput, SignedReceipt, PreferenceRecord } from './types.js';
18
+ import type { ConformanceReport } from './executor-conformance.js';
837
19
  /**
838
20
  * This package's version, sent in the default User-Agent. Cloudflare answers a request with
839
21
  * no recognisable User-Agent with `403 error code: 1010`; a test pins this to package.json.
840
22
  */
841
- declare const SDK_VERSION = "0.7.1";
842
- interface CookieMunchOptions {
23
+ export declare const SDK_VERSION = "0.8.0";
24
+ export interface CookieMunchOptions {
843
25
  apiKey: string;
844
26
  /** "https://api.cookiemunch.net" — the /v1 prefix is appended automatically. */
845
27
  baseUrl: string;
@@ -863,32 +45,32 @@ interface CookieMunchOptions {
863
45
  */
864
46
  secretRecipient?: string;
865
47
  /**
866
- * Extra headers on every request, e.g. `{ 'Idempotency-Key': '<forgedeck ref>:<run>' }` on a client made for
48
+ * Extra headers on every request, e.g. `{ 'Idempotency-Key': '<stack ref>:<run>' }` on a client made for
867
49
  * one create: a retry with the same key replays the first answer (secrets included) for 24 hours.
868
50
  */
869
51
  headers?: Record<string, string>;
870
52
  }
871
- /** Tags on a created resource (CMU-X29). `forgedeck_sandbox: true` can only be set at creation. */
872
- type ResourceMetadata = Record<string, string | number | boolean>;
873
- /** Keep only resources whose tags match, e.g. `{ forgedeck_product: 'referalli' }`. */
874
- interface MetadataFilter {
53
+ /** Tags on a created resource (CMU-X29). `stack_sandbox: true` can only be set at creation. */
54
+ export type ResourceMetadata = Record<string, string | number | boolean>;
55
+ /** Keep only resources whose tags match, e.g. `{ stack_product: 'referalli' }`. */
56
+ export interface MetadataFilter {
875
57
  metadata?: Record<string, string>;
876
58
  }
877
59
  /** externalRef and metadata, accepted by every create (orgs, sites, webhooks, executors, DSARs, partner links). */
878
- interface ResourceTagsInput {
60
+ export interface ResourceTagsInput {
879
61
  /** Your own name for it, unique per org and type: a repeat create with the same body returns the existing one. */
880
62
  externalRef?: string;
881
63
  metadata?: ResourceMetadata;
882
64
  }
883
- type TaggedType = 'org' | 'site' | 'webhook' | 'executor' | 'dsar' | 'partner_link';
884
- interface ResourceTags {
65
+ export type TaggedType = 'org' | 'site' | 'webhook' | 'executor' | 'dsar' | 'partner_link';
66
+ export interface ResourceTags {
885
67
  type: TaggedType;
886
68
  id: string;
887
69
  metadata: ResourceMetadata;
888
70
  externalRef: string | null;
889
71
  sandbox: boolean;
890
72
  }
891
- interface ResourceTagsUpdate {
73
+ export interface ResourceTagsUpdate {
892
74
  dryRun?: true;
893
75
  type: TaggedType;
894
76
  id: string;
@@ -900,14 +82,14 @@ interface ResourceTagsUpdate {
900
82
  }>;
901
83
  }
902
84
  /** What a sandbox hard delete removed. */
903
- interface SandboxPurge {
85
+ export interface SandboxPurge {
904
86
  deleted: true;
905
87
  cbid?: string;
906
88
  orgId?: string;
907
89
  counts: Record<string, number>;
908
90
  }
909
91
  /** A partner link in the suite-standard shape (CMU-X34). */
910
- interface StandardPartnerLink {
92
+ export interface StandardPartnerLink {
911
93
  id: string;
912
94
  partner: string;
913
95
  resource: string;
@@ -920,7 +102,7 @@ interface StandardPartnerLink {
920
102
  externalId?: string;
921
103
  label?: string;
922
104
  }
923
- interface StandardPartnerLinkCreate extends ResourceTagsInput {
105
+ export interface StandardPartnerLinkCreate extends ResourceTagsInput {
924
106
  partner: string;
925
107
  /** `site:<cbid>` or `org:<org id>`. */
926
108
  resource: string;
@@ -929,9 +111,9 @@ interface StandardPartnerLinkCreate extends ResourceTagsInput {
929
111
  externalId?: string;
930
112
  label?: string;
931
113
  }
932
- /** POST /v1/provision v2: the `cookiemunch` block of a forgedeck.yaml (see the forgedeck API map page). */
933
- interface ProvisionRequestV2 {
934
- forgedeck: {
114
+ /** POST /v1/provision v2: the `cookiemunch` block of a stack.yaml (see the provisioning API map page). */
115
+ export interface ProvisionRequestV2 {
116
+ stack: {
935
117
  ref?: string;
936
118
  product: string;
937
119
  env?: string;
@@ -990,7 +172,7 @@ interface ProvisionRequestV2 {
990
172
  };
991
173
  }
992
174
  /** GET /v1/provision/env: names, non-secret values, and references for secrets. */
993
- interface ProvisionEnv {
175
+ export interface ProvisionEnv {
994
176
  ref: string;
995
177
  cbid: string;
996
178
  env: Array<{
@@ -1000,7 +182,7 @@ interface ProvisionEnv {
1000
182
  }>;
1001
183
  }
1002
184
  /** A vended short-lived key, shown once. */
1003
- interface ApiKeyVended {
185
+ export interface ApiKeyVended {
1004
186
  key: string;
1005
187
  prefix: string;
1006
188
  expiresAt: number;
@@ -1008,7 +190,7 @@ interface ApiKeyVended {
1008
190
  cbids: string[] | null;
1009
191
  }
1010
192
  /** The suite-standard key listing (GET /v1/keys?shape=standard). */
1011
- interface StandardKeyList {
193
+ export interface StandardKeyList {
1012
194
  keys: Array<{
1013
195
  id: string;
1014
196
  prefix: string;
@@ -1027,7 +209,7 @@ interface StandardKeyList {
1027
209
  }>;
1028
210
  }
1029
211
  /** A leaked secret to revoke (POST /v1/keys/revoke_leaked, no authentication needed). */
1030
- type LeakReport = {
212
+ export type LeakReport = {
1031
213
  key: string;
1032
214
  source?: string;
1033
215
  } | {
@@ -1040,7 +222,7 @@ type LeakReport = {
1040
222
  * (e.g. `forbidden` on a scope failure, whose `message` is `insufficient_scope`,
1041
223
  * or `banner_in_use` on a banner-library conflict). It's `undefined` when the body has no `code`.
1042
224
  */
1043
- declare class CookieMunchApiError extends Error {
225
+ export declare class CookieMunchApiError extends Error {
1044
226
  readonly status: number;
1045
227
  readonly code?: string;
1046
228
  /** The parsed JSON error body, when there was one (e.g. `issues` on a 422). */
@@ -1049,7 +231,7 @@ declare class CookieMunchApiError extends Error {
1049
231
  }
1050
232
  /** A cookie discovered on a site, classified into a consent category (wire shape of the
1051
233
  * cookie-declaration feed). Matches the server's CategorizedCookie schema. */
1052
- interface CategorizedCookie {
234
+ export interface CategorizedCookie {
1053
235
  name: string;
1054
236
  category: 'necessary' | 'preferences' | 'statistics' | 'marketing' | 'unclassified' | (string & {});
1055
237
  domain?: string;
@@ -1100,9 +282,9 @@ interface CategorizedCookie {
1100
282
  vendor?: string;
1101
283
  }
1102
284
  /** What a declaration row describes. */
1103
- type StorageType = 'cookie' | 'localStorage' | 'sessionStorage' | 'indexedDB';
285
+ export type StorageType = 'cookie' | 'localStorage' | 'sessionStorage' | 'indexedDB';
1104
286
  /** A cookie the site owner retired: the site renamed or stopped setting it. */
1105
- interface RetiredCookie {
287
+ export interface RetiredCookie {
1106
288
  /** Exact name, or a `prefix*` wildcard. */
1107
289
  name: string;
1108
290
  /** Epoch-ms it was retired; anything seen after this brings it back. */
@@ -1115,7 +297,7 @@ interface RetiredCookie {
1115
297
  }
1116
298
  /** A site's cookie declaration: the latest scan and observed visits with the site's own
1117
299
  * declarations on top. This is what GET /v1/sites/:cbid/cookies returns. */
1118
- interface CookieDeclaration {
300
+ export interface CookieDeclaration {
1119
301
  /** Epoch-ms of the latest scan or declaration change, or 0 if none. */
1120
302
  updatedAt: number;
1121
303
  cookies: CategorizedCookie[];
@@ -1125,7 +307,7 @@ interface CookieDeclaration {
1125
307
  retired?: RetiredCookie[];
1126
308
  }
1127
309
  /** What the site owner says a cookie is (PUT /v1/sites/:cbid/cookies/:name). */
1128
- interface DeclaredCookieInput {
310
+ export interface DeclaredCookieInput {
1129
311
  /** A standard category or one of the site's `categories.custom` ids. Not `unclassified`. */
1130
312
  category: string;
1131
313
  /** Shown to visitors, and the fallback for any language `purposes` lacks. */
@@ -1145,7 +327,7 @@ interface DeclaredCookieInput {
1145
327
  type?: StorageType;
1146
328
  }
1147
329
  /** A stored declaration. */
1148
- interface DeclaredCookie extends DeclaredCookieInput {
330
+ export interface DeclaredCookie extends DeclaredCookieInput {
1149
331
  name: string;
1150
332
  updatedAt: number;
1151
333
  /** `import` when a vendor preset wrote it. */
@@ -1154,11 +336,11 @@ interface DeclaredCookie extends DeclaredCookieInput {
1154
336
  vendor?: string;
1155
337
  }
1156
338
  /** A platform whose cookies and storage a preset declares. */
1157
- type CookiePresetVendor = 'atlas' | 'forumulate' | 'chatly' | 'cookiemunch' | 'referalli' | 'firstpromoter' | 'partnerstack' | 'tapfiliate' | 'impact'
339
+ export type CookiePresetVendor = 'atlas' | 'forumulate' | 'chatly' | 'cookiemunch' | 'referalli' | 'firstpromoter' | 'partnerstack' | 'tapfiliate' | 'impact'
1158
340
  /** @deprecated the old name of `referalli`, accepted until 2027-10-23. */
1159
341
  | 'referally';
1160
342
  /** Where a vendor's live manifest will come from, and whether it exists yet. */
1161
- interface CookiePresetManifest {
343
+ export interface CookiePresetManifest {
1162
344
  /** `live`/`stale`/`invalid`: the vendor's embed manifest feeds the preset; `waiting_on_vendor`: built-in rows. */
1163
345
  status: 'builtin' | 'live' | 'stale' | 'invalid' | 'waiting_on_vendor';
1164
346
  waitingOn?: string;
@@ -1184,7 +366,7 @@ interface CookiePresetManifest {
1184
366
  }>;
1185
367
  }
1186
368
  /** PUT /v1/sites/:cbid/cookies/presets/custom — any vendor's embed manifest, by URL or as a body. */
1187
- type CustomPresetInput = ({
369
+ export type CustomPresetInput = ({
1188
370
  url: string;
1189
371
  manifest?: never;
1190
372
  } | {
@@ -1195,7 +377,7 @@ type CustomPresetInput = ({
1195
377
  params?: Record<string, string>;
1196
378
  };
1197
379
  /** One suggestion in GET /v1/sites/:cbid/cookies/suggestions. */
1198
- interface CookieSuggestion {
380
+ export interface CookieSuggestion {
1199
381
  name: string;
1200
382
  storage: 'cookie' | 'localStorage' | 'sessionStorage' | 'indexedDB';
1201
383
  foundOnPages: string[];
@@ -1208,7 +390,7 @@ interface CookieSuggestion {
1208
390
  reason: string;
1209
391
  }
1210
392
  /** GET /v1/sites/:cbid/cookies/suggestions */
1211
- interface CookieSuggestions {
393
+ export interface CookieSuggestions {
1212
394
  suggestions: CookieSuggestion[];
1213
395
  vendors: Array<{
1214
396
  vendor: string;
@@ -1224,7 +406,7 @@ interface CookieSuggestions {
1224
406
  }>;
1225
407
  }
1226
408
  /** POST /v1/sites/:cbid/cookies/suggestions/declare */
1227
- interface CookieSuggestionsDeclared {
409
+ export interface CookieSuggestionsDeclared {
1228
410
  presetsApplied: string[];
1229
411
  declaredCount: number;
1230
412
  skipped?: Array<{
@@ -1236,7 +418,7 @@ interface CookieSuggestionsDeclared {
1236
418
  diff?: DeclarationDiff;
1237
419
  }
1238
420
  /** Preset parameters: Atlas `frontendApiHost`/`crossSubdomainCookies`; Chatly `publicId`/`dragging`/`category`; referral and affiliate presets (referalli, firstpromoter, partnerstack, tapfiliate, impact) `cookieDomain`/`cookieDays`/`category`, referalli `legacyName`, impact `campaignId`. */
1239
- interface CookiePresetParams {
421
+ export interface CookiePresetParams {
1240
422
  frontendApiHost?: string;
1241
423
  crossSubdomainCookies?: boolean;
1242
424
  publicId?: string;
@@ -1250,7 +432,7 @@ interface CookiePresetParams {
1250
432
  campaignId?: string;
1251
433
  }
1252
434
  /** One browser key a surface writes, in an embed manifest. */
1253
- interface EmbedManifestStorage {
435
+ export interface EmbedManifestStorage {
1254
436
  name: string;
1255
437
  type: 'cookie' | 'localStorage' | 'sessionStorage' | 'indexedDB';
1256
438
  category: string;
@@ -1262,7 +444,7 @@ interface EmbedManifestStorage {
1262
444
  sentTo?: string;
1263
445
  }
1264
446
  /** One embeddable surface in an embed manifest: its origins by CSP directive and its storage. */
1265
- interface EmbedManifestSurface {
447
+ export interface EmbedManifestSurface {
1266
448
  /** Origins by CSP directive (`script-src`, `connect-src`, …). */
1267
449
  csp?: Record<string, string[]>;
1268
450
  /** Non-origin sources the surface needs (`'unsafe-inline'`, `data:`). */
@@ -1273,7 +455,7 @@ interface EmbedManifestSurface {
1273
455
  sri?: Record<string, string>;
1274
456
  }
1275
457
  /** The shared embed/origins manifest (https://cookiemunch.net/schemas/embed-v1.json). */
1276
- interface EmbedManifest {
458
+ export interface EmbedManifest {
1277
459
  schema: string;
1278
460
  product: string;
1279
461
  updated: string;
@@ -1309,7 +491,7 @@ interface EmbedManifest {
1309
491
  };
1310
492
  }
1311
493
  /** One preset in GET /v1/sites/:cbid/cookies/presets. */
1312
- interface CookiePreset {
494
+ export interface CookiePreset {
1313
495
  /** A first-class preset, or a custom preset's product id. */
1314
496
  vendor: CookiePresetVendor | (string & {});
1315
497
  /** A custom preset (importCookieManifest). */
@@ -1326,10 +508,10 @@ interface CookiePreset {
1326
508
  manifest: CookiePresetManifest;
1327
509
  }
1328
510
  /** What applying a preset declared. */
1329
- interface CookiePresetResult {
511
+ export interface CookiePresetResult {
1330
512
  vendor: CookiePresetVendor | (string & {});
1331
- /** `manifest` when the rows came from the vendor's embed manifest. */
1332
- source?: 'manifest';
513
+ /** `builtin` (Cookie Munch's own rows, also while the vendor's manifest is invalid), `manifest` (its valid embed manifest), or `instance`. */
514
+ source?: 'builtin' | 'manifest' | 'instance';
1333
515
  cookies: DeclaredCookie[];
1334
516
  removed: string[];
1335
517
  skipped?: Array<{
@@ -1353,7 +535,7 @@ interface CookiePresetResult {
1353
535
  diff?: DeclarationDiff;
1354
536
  }
1355
537
  /** What removing observed rows removed (or, with `dryRun`, would). */
1356
- interface ObservedPurgeResult {
538
+ export interface ObservedPurgeResult {
1357
539
  removed: string[];
1358
540
  count: number;
1359
541
  since?: number;
@@ -1361,7 +543,7 @@ interface ObservedPurgeResult {
1361
543
  dryRun?: true;
1362
544
  }
1363
545
  /** What a declaration write would change (`dryRun`). */
1364
- interface DeclarationDiff {
546
+ export interface DeclarationDiff {
1365
547
  added: DeclaredCookie[];
1366
548
  removed: DeclaredCookie[];
1367
549
  changed: Array<{
@@ -1371,19 +553,19 @@ interface DeclarationDiff {
1371
553
  }>;
1372
554
  }
1373
555
  /** The answer to a `dryRun` declaration write: nothing was stored. */
1374
- interface DeclarationDryRun {
556
+ export interface DeclarationDryRun {
1375
557
  dryRun: true;
1376
558
  /** Every declaration the site would have. */
1377
559
  declared: DeclaredCookie[];
1378
560
  diff: DeclarationDiff;
1379
561
  }
1380
562
  /** A warning about a write: e.g. the category is switched off for the site. */
1381
- interface DeclarationWarning {
563
+ export interface DeclarationWarning {
1382
564
  field: string;
1383
565
  reason: string;
1384
566
  }
1385
567
  /** What an import with `apply` declared, on top of what it read. */
1386
- interface AppliedImport extends ImportedDeclaration {
568
+ export interface AppliedImport extends ImportedDeclaration {
1387
569
  applied: number;
1388
570
  skipped: Array<{
1389
571
  name: string;
@@ -1392,7 +574,7 @@ interface AppliedImport extends ImportedDeclaration {
1392
574
  warnings?: DeclarationWarning[];
1393
575
  }
1394
576
  /** @deprecated The server returns {@link CookieDeclaration}; kept only for back-compat. */
1395
- interface SiteCookie {
577
+ export interface SiteCookie {
1396
578
  name: string;
1397
579
  domain: string;
1398
580
  category: string;
@@ -1402,7 +584,7 @@ interface SiteCookie {
1402
584
  firstSeen?: number;
1403
585
  }
1404
586
  /** Cookie-scan status, from GET /v1/sites/:cbid/scan. */
1405
- interface ScanStatus {
587
+ export interface ScanStatus {
1406
588
  /** `scanning` while the last scan is queued or crawling. Kept for older clients; read `state`. */
1407
589
  status: 'idle' | 'scanning';
1408
590
  /** Epoch-ms of the last completed scan, or null. */
@@ -1425,7 +607,7 @@ interface ScanStatus {
1425
607
  error?: string;
1426
608
  }
1427
609
  /** Consent-button parity of the banner a real browser saw on the site (see ScanStatus). */
1428
- interface ButtonParityScan {
610
+ export interface ButtonParityScan {
1429
611
  url: string;
1430
612
  /** False when no visible consent accept control was found in a recognisable banner. */
1431
613
  bannerFound: boolean;
@@ -1444,7 +626,7 @@ interface ButtonParityScan {
1444
626
  checkedAt?: number;
1445
627
  }
1446
628
  /** @deprecated The server returns {@link ScanStatus}; kept only for back-compat. */
1447
- interface ScanResult {
629
+ export interface ScanResult {
1448
630
  scanId: string;
1449
631
  status: 'queued' | 'running' | 'complete' | 'failed';
1450
632
  startedAt?: number;
@@ -1453,14 +635,14 @@ interface ScanResult {
1453
635
  cookiesFound?: number;
1454
636
  }
1455
637
  /** A/B banner experiment results for a single variant. */
1456
- interface AbResult {
638
+ export interface AbResult {
1457
639
  variant: string;
1458
640
  impressions: number;
1459
641
  optIns: number;
1460
642
  optInRate: number;
1461
643
  }
1462
644
  /** The response shape of GET /v1/sites/:cbid/snippet. */
1463
- interface InstallSnippet {
645
+ export interface InstallSnippet {
1464
646
  /** The exact `<script>` tag to paste into `<head>`. */
1465
647
  snippet: string;
1466
648
  /** URL of the consent.js embed file (the embed/CDN origin). */
@@ -1481,7 +663,7 @@ interface InstallSnippet {
1481
663
  warnings?: ConfigWarning[];
1482
664
  }
1483
665
  /** Content Security Policy sources the embed needs. */
1484
- interface CspSources {
666
+ export interface CspSources {
1485
667
  script: string[];
1486
668
  connect: string[];
1487
669
  img: string[];
@@ -1493,22 +675,22 @@ interface CspSources {
1493
675
  policy: string;
1494
676
  }
1495
677
  /** Something a config write did not store as sent. */
1496
- interface ConfigWarning {
678
+ export interface ConfigWarning {
1497
679
  field: string;
1498
680
  reason: string;
1499
681
  }
1500
682
  /** One leaf a config write would change. */
1501
- interface ConfigChange {
683
+ export interface ConfigChange {
1502
684
  path: string;
1503
685
  from?: unknown;
1504
686
  to?: unknown;
1505
687
  }
1506
688
  /** `PUT …/config` options. `keep: 'unspecified'` keeps the stored value of every top-level field the body omits. */
1507
- interface PutConfigOptions {
689
+ export interface PutConfigOptions {
1508
690
  keep?: 'unspecified';
1509
691
  }
1510
692
  /** What a config write would do (`?dryRun=1`) — nothing is saved. */
1511
- interface ConfigDryRun {
693
+ export interface ConfigDryRun {
1512
694
  dryRun: true;
1513
695
  /** The config as it would be saved. */
1514
696
  config: SiteConfig;
@@ -1519,7 +701,7 @@ interface ConfigDryRun {
1519
701
  designWarnings: ButtonParityFinding[];
1520
702
  }
1521
703
  /** The effective style of an Accept all / Reject all control. */
1522
- interface ParityControlSummary {
704
+ export interface ParityControlSummary {
1523
705
  id?: string;
1524
706
  label: string;
1525
707
  element: 'button' | 'link';
@@ -1537,8 +719,8 @@ interface ParityControlSummary {
1537
719
  * CSS). Returned as `designWarnings` on every config read and write, and by `lintConfig`.
1538
720
  * A warning, never an error — the config is saved regardless. See /docs/fair-consent-buttons.
1539
721
  */
1540
- interface ButtonParityFinding {
1541
- code: 'reject_missing_first_layer' | 'reject_missing_same_layer' | 'reject_hidden' | 'reject_below_fold' | 'reject_isolated' | 'reject_low_emphasis' | 'saturation_gap' | 'color_mismatch' | 'reject_text_low_contrast' | 'reject_styled_as_link' | 'font_size_gap' | 'font_weight_gap' | 'size_gap' | 'padding_gap' | 'border_mismatch' | 'reject_label_missing' | 'reject_label_long' | 'confirmshaming' | 'custom_css_asymmetric' | 'text_low_contrast' | 'link_low_contrast' | 'button_text_low_contrast' | 'focus_ring_low_contrast' | 'toggle_low_contrast' | 'control_boundary_low_contrast';
722
+ export interface ButtonParityFinding {
723
+ code: 'reject_missing_first_layer' | 'reject_missing_same_layer' | 'reject_hidden' | 'reject_below_fold' | 'reject_isolated' | 'reject_low_emphasis' | 'saturation_gap' | 'color_mismatch' | 'reject_text_low_contrast' | 'reject_styled_as_link' | 'font_size_gap' | 'font_weight_gap' | 'size_gap' | 'padding_gap' | 'border_mismatch' | 'reject_label_missing' | 'reject_label_long' | 'confirmshaming' | 'custom_css_asymmetric' | 'customize_label_clash' | 'text_low_contrast' | 'link_low_contrast' | 'button_text_low_contrast' | 'focus_ring_low_contrast' | 'toggle_low_contrast' | 'control_boundary_low_contrast';
1542
724
  severity: 'warning' | 'notice';
1543
725
  layer: 'banner' | 'preferences' | 'modal' | 'popup' | 'bar' | 'inline' | 'custom';
1544
726
  accept: ParityControlSummary | null;
@@ -1564,7 +746,7 @@ interface ButtonParityFinding {
1564
746
  wcag?: '1.4.3' | '1.4.11';
1565
747
  }
1566
748
  /** Reject all style values that would match the Accept all on the same layer. */
1567
- interface SuggestedRejectStyle {
749
+ export interface SuggestedRejectStyle {
1568
750
  layer: string;
1569
751
  view?: string;
1570
752
  background?: string;
@@ -1577,7 +759,7 @@ interface SuggestedRejectStyle {
1577
759
  height?: number;
1578
760
  }
1579
761
  /** `POST /v1/sites/:cbid/config/lint` — nothing is saved. */
1580
- interface ButtonParityLint {
762
+ export interface ButtonParityLint {
1581
763
  /** `merged` = what PATCH would store (merged over the stored config); `replaced` = what PUT would store (`replace: true`). */
1582
764
  mode: 'merged' | 'replaced';
1583
765
  designWarnings: ButtonParityFinding[];
@@ -1589,7 +771,7 @@ interface ButtonParityLint {
1589
771
  * Scrollbars on the surfaces Cookie Munch renders — the same shape on the banner theme (`theme.scrollbar`)
1590
772
  * and the rights-page theme. Colours are #hex, rgb() or hsl(); width is clamped to 4–16, radius to 0–999.
1591
773
  */
1592
- interface ScrollbarTheme {
774
+ export interface ScrollbarTheme {
1593
775
  style: 'themed' | 'thin' | 'native' | 'hidden';
1594
776
  thumb?: string;
1595
777
  thumbHover?: string;
@@ -1598,7 +780,7 @@ interface ScrollbarTheme {
1598
780
  radius?: number;
1599
781
  }
1600
782
  /** The hosted rights page document. See docs/rights-page for each section type's props. */
1601
- interface RightsPageDocument {
783
+ export interface RightsPageDocument {
1602
784
  v: 1;
1603
785
  theme: {
1604
786
  preset: 'brand' | 'light' | 'dark' | 'custom';
@@ -1644,13 +826,13 @@ interface RightsPageDocument {
1644
826
  customCss?: string;
1645
827
  }
1646
828
  /** `message` is English; `code` (+ `params`) is stable, for your own wording or language. */
1647
- interface RightsPageIssue {
829
+ export interface RightsPageIssue {
1648
830
  path: string;
1649
831
  message: string;
1650
832
  code?: string;
1651
833
  params?: Record<string, string | number>;
1652
834
  }
1653
- interface RightsPageDraft {
835
+ export interface RightsPageDraft {
1654
836
  cbid: string;
1655
837
  draft: RightsPageDocument;
1656
838
  version: number;
@@ -1658,19 +840,19 @@ interface RightsPageDraft {
1658
840
  updatedAt: number | null;
1659
841
  warnings: RightsPageIssue[];
1660
842
  }
1661
- interface RightsPageDryRun {
843
+ export interface RightsPageDryRun {
1662
844
  dryRun: true;
1663
845
  cbid: string;
1664
846
  draft: RightsPageDocument;
1665
847
  warnings: RightsPageIssue[];
1666
848
  }
1667
849
  /** Who published a version: `publishedBy` is an actor id; `publishedByEmail` names a dashboard user (null for an API key). */
1668
- interface RightsPagePublisher {
850
+ export interface RightsPagePublisher {
1669
851
  publishedBy: string;
1670
852
  publishedByEmail: string | null;
1671
853
  publishedVia: 'dashboard' | 'api_key';
1672
854
  }
1673
- interface RightsPagePublished {
855
+ export interface RightsPagePublished {
1674
856
  cbid: string;
1675
857
  page: RightsPageDocument;
1676
858
  version: number;
@@ -1685,22 +867,22 @@ interface RightsPagePublished {
1685
867
  * body is RightsPageDraftConflict. Omitted: a full write (put) is last-write-wins; a patch merges onto the draft
1686
868
  * as it is when written, so a concurrent edit is not lost.
1687
869
  */
1688
- interface RightsPageWriteOptions {
870
+ export interface RightsPageWriteOptions {
1689
871
  baseUpdatedAt?: number | string | null;
1690
872
  }
1691
- interface RightsPageDraftConflict {
873
+ export interface RightsPageDraftConflict {
1692
874
  error: 'draft_conflict';
1693
875
  draft: RightsPageDraft;
1694
876
  }
1695
877
  /** `draftUpdatedAt`: the draft's updatedAt after the call — pass it as the next `baseUpdatedAt`. */
1696
- interface RightsPagePublishResult {
878
+ export interface RightsPagePublishResult {
1697
879
  cbid: string;
1698
880
  version: number;
1699
881
  publishedAt: number;
1700
882
  draftUpdatedAt: number;
1701
883
  rolledBackTo?: number;
1702
884
  }
1703
- interface RightsPageVersions {
885
+ export interface RightsPageVersions {
1704
886
  cbid: string;
1705
887
  versions: Array<{
1706
888
  version: number;
@@ -1708,7 +890,7 @@ interface RightsPageVersions {
1708
890
  } & RightsPagePublisher>;
1709
891
  }
1710
892
  /** Options for POST /v1/sites/:cbid/preview-token. All optional. */
1711
- interface PreviewTokenOptions {
893
+ export interface PreviewTokenOptions {
1712
894
  /** Lifetime in seconds, 1..3600. Default 900. */
1713
895
  ttlSeconds?: number;
1714
896
  /** The page to preview. Default: the site's registered domain. */
@@ -1719,7 +901,7 @@ interface PreviewTokenOptions {
1719
901
  lang?: string;
1720
902
  }
1721
903
  /** A banner preview token, and the page URL that opens the preview. */
1722
- interface PreviewToken {
904
+ export interface PreviewToken {
1723
905
  cbid: string;
1724
906
  token: string;
1725
907
  /** Epoch milliseconds. */
@@ -1730,9 +912,9 @@ interface PreviewToken {
1730
912
  previewUrl?: string;
1731
913
  }
1732
914
  /** A right a rights link may file (the hosted rights page's request-type kinds). */
1733
- type RightKind = 'access' | 'erasure' | 'rectification' | 'portability' | 'restriction' | 'objection' | 'opt_out_sale' | 'opt_out_targeted' | 'limit_sensitive';
915
+ export type RightKind = 'access' | 'erasure' | 'rectification' | 'portability' | 'restriction' | 'objection' | 'opt_out_sale' | 'opt_out_targeted' | 'limit_sensitive';
1734
916
  /** Input for POST /v1/sites/:cbid/rights-links. */
1735
- interface RightsLinkInput {
917
+ export interface RightsLinkInput {
1736
918
  /** The signed-in person. `email` must be an address you have verified. */
1737
919
  subject: {
1738
920
  email: string;
@@ -1744,7 +926,7 @@ interface RightsLinkInput {
1744
926
  ttlSeconds?: number;
1745
927
  }
1746
928
  /** A signed, single-use link to the hosted rights page for one signed-in person. */
1747
- interface RightsLink {
929
+ export interface RightsLink {
1748
930
  /** `https://<customDomain>/?t=…`, or `https://cookiemunch.net/r/<cbid>?t=…` when `customDomain` is null. */
1749
931
  url: string;
1750
932
  /** Epoch milliseconds. */
@@ -1753,13 +935,13 @@ interface RightsLink {
1753
935
  customDomain: string | null;
1754
936
  }
1755
937
  /** One DNS record to create, exactly as written. */
1756
- interface DnsRecordInstruction {
938
+ export interface DnsRecordInstruction {
1757
939
  type: 'CNAME' | 'TXT';
1758
940
  name: string;
1759
941
  value: string;
1760
942
  }
1761
943
  /** A custom hostname serving a site's rights page. */
1762
- interface RightsPageDomain {
944
+ export interface RightsPageDomain {
1763
945
  /** Lowercase ASCII form (punycode for an internationalised name). */
1764
946
  hostname: string;
1765
947
  /** As a person reads it. */
@@ -1790,14 +972,14 @@ interface RightsPageDomain {
1790
972
  };
1791
973
  }
1792
974
  /** The site's custom hostnames, the plan allowance (null = unlimited) and the org's usage. */
1793
- interface RightsPageDomainList {
975
+ export interface RightsPageDomainList {
1794
976
  domains: RightsPageDomain[];
1795
977
  limit: number | null;
1796
978
  used: number;
1797
979
  target: string;
1798
980
  }
1799
981
  /** Options for the snippet endpoint. */
1800
- interface SnippetOptions {
982
+ export interface SnippetOptions {
1801
983
  /** Override the site's configured `blocking.mode`. Default: the config's. */
1802
984
  blockingMode?: 'auto' | 'manual';
1803
985
  /** Language culture override, e.g. "en" or "fr". */
@@ -1809,13 +991,13 @@ interface SnippetOptions {
1809
991
  * packages/server/src/dev-api.ts (~L267) — note the server adds `method` on success,
1810
992
  * so this wire shape is wider than domain-verify.ts's internal VerifyResult.
1811
993
  */
1812
- interface VerifyResult {
994
+ export interface VerifyResult {
1813
995
  verified: boolean;
1814
996
  method?: 'dns' | 'meta' | 'file';
1815
997
  reason?: string;
1816
998
  }
1817
999
  /** A site brand suggestion ("Match my site"). Keep in sync with packages/server/src/brand-extract.ts BrandSuggestion. */
1818
- interface BrandSuggestion {
1000
+ export interface BrandSuggestion {
1819
1001
  background?: string;
1820
1002
  text?: string;
1821
1003
  highlight?: string;
@@ -1824,15 +1006,15 @@ interface BrandSuggestion {
1824
1006
  palette?: string[];
1825
1007
  }
1826
1008
  /** The response shape of POST /v1/sites/:cbid/brand. */
1827
- interface BrandExtractionResult {
1009
+ export interface BrandExtractionResult {
1828
1010
  suggestion: BrandSuggestion;
1829
1011
  }
1830
1012
  /** PUT /v1/sites/{cbid}/brand: `{url}` alone (fetched once, https only), or a DTCG brand.json document. */
1831
- type BrandImportInput = {
1013
+ export type BrandImportInput = {
1832
1014
  url: string;
1833
1015
  } | Record<string, unknown>;
1834
1016
  /** One brand.json role and what it became. */
1835
- interface BrandMappingRow {
1017
+ export interface BrandMappingRow {
1836
1018
  role: string;
1837
1019
  /** The site-config path it sets, e.g. `banner.theme.highlight`. */
1838
1020
  target: string;
@@ -1846,7 +1028,7 @@ interface BrandMappingRow {
1846
1028
  variants?: string[];
1847
1029
  }
1848
1030
  /** The read-back of a brand.json import. Precedence: brand.json < site banner theme < per-banner variant. */
1849
- interface BrandReadBack {
1031
+ export interface BrandReadBack {
1850
1032
  cbid: string;
1851
1033
  dryRun?: boolean;
1852
1034
  source: {
@@ -1873,13 +1055,13 @@ interface BrandReadBack {
1873
1055
  }>;
1874
1056
  }
1875
1057
  /** A validation/lint issue on a v2 banner flow. */
1876
- interface FlowIssue {
1058
+ export interface FlowIssue {
1877
1059
  code: string;
1878
1060
  message: string;
1879
1061
  path?: string;
1880
1062
  }
1881
1063
  /** A site's v2 banner flow + lint issues, from GET /v1/sites/:cbid/flow. */
1882
- interface SiteFlow {
1064
+ export interface SiteFlow {
1883
1065
  v: 2;
1884
1066
  flow: Record<string, unknown>;
1885
1067
  categories: Record<string, unknown>;
@@ -1890,14 +1072,14 @@ interface SiteFlow {
1890
1072
  * A single structured flow edit operation. `op` selects the kind; remaining fields are
1891
1073
  * that op's args (e.g. { op: 'addView', id, surface, layoutMode }).
1892
1074
  */
1893
- type FlowOp = {
1075
+ export type FlowOp = {
1894
1076
  op: string;
1895
1077
  } & Record<string, unknown>;
1896
1078
  /**
1897
1079
  * Result of editFlow/setFlow. On success the new flow is persisted and returned;
1898
1080
  * on a validation/lint failure the config is NOT saved and `issues` says why.
1899
1081
  */
1900
- type FlowOpResponse = {
1082
+ export type FlowOpResponse = {
1901
1083
  ok: true;
1902
1084
  flow: Record<string, unknown>; /** Consent-button parity of the saved design. */
1903
1085
  designWarnings?: ButtonParityFinding[];
@@ -1908,7 +1090,7 @@ type FlowOpResponse = {
1908
1090
  issues: FlowIssue[];
1909
1091
  };
1910
1092
  /** A reusable brand kit (colors/logo/typography) for banner theming. */
1911
- interface BrandKit {
1093
+ export interface BrandKit {
1912
1094
  id: string;
1913
1095
  orgId: string;
1914
1096
  name: string;
@@ -1920,7 +1102,7 @@ interface BrandKit {
1920
1102
  customCss?: string;
1921
1103
  }
1922
1104
  /** A configurable consent preference/purpose item. */
1923
- interface PreferenceItem {
1105
+ export interface PreferenceItem {
1924
1106
  id: string;
1925
1107
  orgId: string;
1926
1108
  cbid?: string;
@@ -1929,13 +1111,13 @@ interface PreferenceItem {
1929
1111
  category?: string;
1930
1112
  }
1931
1113
  /** An organization member. */
1932
- interface Member {
1114
+ export interface Member {
1933
1115
  userId: string;
1934
1116
  email: string;
1935
1117
  role: 'owner' | 'admin' | 'member' | 'viewer' | (string & {});
1936
1118
  }
1937
1119
  /** Display metadata for an issued key — never the secret. Returned by keys.list(). */
1938
- interface ApiKeyPrefix {
1120
+ export interface ApiKeyPrefix {
1939
1121
  prefix: string;
1940
1122
  createdAt?: number;
1941
1123
  /** Epoch ms the key stops working; null = never. */
@@ -1958,14 +1140,14 @@ interface ApiKeyPrefix {
1958
1140
  apiVersion?: string;
1959
1141
  }
1960
1142
  /** A live organisation's sandbox (GET /v1/sandbox). */
1961
- interface SandboxOrg {
1143
+ export interface SandboxOrg {
1962
1144
  orgId: string;
1963
1145
  name: string;
1964
1146
  sandboxOf: string;
1965
1147
  createdAt: string;
1966
1148
  }
1967
1149
  /** POST /v1/sandbox: the sandbox and a test key for it, shown once. */
1968
- interface SandboxCreated {
1150
+ export interface SandboxCreated {
1969
1151
  sandbox: SandboxOrg;
1970
1152
  created: boolean;
1971
1153
  key: string;
@@ -1973,7 +1155,7 @@ interface SandboxCreated {
1973
1155
  keyExpiresAt: string;
1974
1156
  }
1975
1157
  /** GET /v1/versions. */
1976
- interface ApiVersions {
1158
+ export interface ApiVersions {
1977
1159
  latest: string;
1978
1160
  base: string;
1979
1161
  /** With a key: the version it is pinned to. */
@@ -1989,7 +1171,7 @@ interface ApiVersions {
1989
1171
  }>;
1990
1172
  }
1991
1173
  /** A revoked key in the report: when, by whom, why; never the secret. */
1992
- interface ApiKeyRevoked {
1174
+ export interface ApiKeyRevoked {
1993
1175
  prefix: string;
1994
1176
  name: string | null;
1995
1177
  owner: string | null;
@@ -2005,7 +1187,7 @@ interface ApiKeyRevoked {
2005
1187
  leakSource: string | null;
2006
1188
  }
2007
1189
  /** GET /v1/keys/report — key hygiene. */
2008
- interface ApiKeyReport {
1190
+ export interface ApiKeyReport {
2009
1191
  generatedAt: number;
2010
1192
  unusedDays: number;
2011
1193
  expiringDays: number;
@@ -2024,7 +1206,7 @@ interface ApiKeyReport {
2024
1206
  revoked?: ApiKeyRevoked[];
2025
1207
  }
2026
1208
  /** A newly issued key. `key` is returned ONCE and never again (or, with `secretRecipient`, sealed). */
2027
- interface ApiKeyIssued {
1209
+ export interface ApiKeyIssued {
2028
1210
  key: string;
2029
1211
  prefix: string;
2030
1212
  expiresAt?: number | null;
@@ -2037,7 +1219,7 @@ interface ApiKeyIssued {
2037
1219
  sealed_field?: string;
2038
1220
  }
2039
1221
  /** @deprecated No endpoint returns this shape; use {@link ApiKeyPrefix} / {@link ApiKeyIssued}. */
2040
- interface ApiKey {
1222
+ export interface ApiKey {
2041
1223
  id: string;
2042
1224
  orgId: string;
2043
1225
  prefix: string;
@@ -2050,7 +1232,7 @@ interface ApiKey {
2050
1232
  * Input for issuing a new API key (POST /v1/keys). Every field is honoured: `scopes`, `cbids`,
2051
1233
  * `expiresInDays` / `expiresAt`, `name`, `owner` and `strictUnknownFields`.
2052
1234
  */
2053
- interface ApiKeyIssueInput {
1235
+ export interface ApiKeyIssueInput {
2054
1236
  /** `user:<id>`, `service:<name>` or `apikey:<prefix>`. Default: the calling key. */
2055
1237
  owner?: string;
2056
1238
  /** Writes with the new key refuse unknown body fields unless they send `Prefer: lenient-unknown-fields`. */
@@ -2069,7 +1251,7 @@ interface ApiKeyIssueInput {
2069
1251
  expiresAt?: number | string;
2070
1252
  }
2071
1253
  /** One entitlement (suite-standard shape). A feature is `{key, enabled}`; a limit is `limits.<name>`. */
2072
- interface Entitlement {
1254
+ export interface Entitlement {
2073
1255
  key: string;
2074
1256
  enabled: boolean;
2075
1257
  /** Limits only. null = unlimited, 0 = not on this plan. */
@@ -2079,7 +1261,7 @@ interface Entitlement {
2079
1261
  source: 'plan';
2080
1262
  }
2081
1263
  /** GET /v1/entitlements: what the org may use, from its effective plan. */
2082
- interface Entitlements {
1264
+ export interface Entitlements {
2083
1265
  orgId: string;
2084
1266
  plan: string;
2085
1267
  planSource: 'org' | 'account';
@@ -2088,13 +1270,13 @@ interface Entitlements {
2088
1270
  generatedAt: string;
2089
1271
  }
2090
1272
  /** Org usage/quota summary. Matches the server's Usage schema. */
2091
- interface Usage {
1273
+ export interface Usage {
2092
1274
  domains: number;
2093
1275
  seats: number;
2094
1276
  monthlyEvents: number;
2095
1277
  }
2096
1278
  /** A webhook subscription. `secret` is present only in the create response. */
2097
- interface WebhookSubscription {
1279
+ export interface WebhookSubscription {
2098
1280
  id: string;
2099
1281
  orgId: string;
2100
1282
  url: string;
@@ -2125,7 +1307,7 @@ interface WebhookSubscription {
2125
1307
  };
2126
1308
  }
2127
1309
  /** POST /v1/webhooks/{id}/replay. */
2128
- interface WebhookReplayResult {
1310
+ export interface WebhookReplayResult {
2129
1311
  ok: boolean;
2130
1312
  replayed: number;
2131
1313
  failed: number;
@@ -2135,7 +1317,7 @@ interface WebhookReplayResult {
2135
1317
  error?: string;
2136
1318
  }
2137
1319
  /** The audit-log export (GET/PUT /v1/audit/sink). Never the secret. */
2138
- interface AuditSink {
1320
+ export interface AuditSink {
2139
1321
  type: 'webhook';
2140
1322
  url: string;
2141
1323
  secretSet: true;
@@ -2145,14 +1327,14 @@ interface AuditSink {
2145
1327
  lastStatus: number | null;
2146
1328
  lastError: string | null;
2147
1329
  }
2148
- interface AuditSinkInput {
1330
+ export interface AuditSinkInput {
2149
1331
  type: 'webhook';
2150
1332
  url: string;
2151
1333
  /** 16–256 characters; omitted: one is generated and returned once. */
2152
1334
  secret?: string;
2153
1335
  }
2154
1336
  /** GET /v1/sites/{cbid}/consent/insights. */
2155
- interface ConsentInsights {
1337
+ export interface ConsentInsights {
2156
1338
  cbid: string;
2157
1339
  from: number;
2158
1340
  to: number;
@@ -2203,7 +1385,7 @@ interface ConsentInsights {
2203
1385
  };
2204
1386
  }
2205
1387
  /** One cookie read from another CMP's export. */
2206
- interface ImportedCookie {
1388
+ export interface ImportedCookie {
2207
1389
  name: string;
2208
1390
  domain: string;
2209
1391
  /** Ours, or `unclassified` when their category did not map to one. */
@@ -2215,7 +1397,7 @@ interface ImportedCookie {
2215
1397
  expiry: string;
2216
1398
  }
2217
1399
  /** What a competitor's cookie-declaration export contained, in our vocabulary. */
2218
- interface ImportedDeclaration {
1400
+ export interface ImportedDeclaration {
2219
1401
  source: 'onetrust' | 'cookiebot' | 'cookieyes' | 'unknown';
2220
1402
  cookies: ImportedCookie[];
2221
1403
  /** Rows whose category could not be placed — review these first. */
@@ -2228,7 +1410,7 @@ interface ImportedDeclaration {
2228
1410
  * A page that refused to load the banner renderer. The site is live and configured, so
2229
1411
  * every other signal looks healthy; this is the one that says nobody can be asked.
2230
1412
  */
2231
- interface BlockedReport {
1413
+ export interface BlockedReport {
2232
1414
  cbid: string;
2233
1415
  /** Origin of the page the embed was running on. */
2234
1416
  page: string;
@@ -2241,7 +1423,7 @@ interface BlockedReport {
2241
1423
  count: number;
2242
1424
  }
2243
1425
  /** A webhook delivery that failed every retry. Replay it by `id`. */
2244
- interface WebhookDeadLetter {
1426
+ export interface WebhookDeadLetter {
2245
1427
  id: string;
2246
1428
  orgId: string;
2247
1429
  subscriptionId: string;
@@ -2255,25 +1437,25 @@ interface WebhookDeadLetter {
2255
1437
  failedAt: number;
2256
1438
  }
2257
1439
  /** What a test delivery's endpoint answered. */
2258
- interface WebhookTestResult {
1440
+ export interface WebhookTestResult {
2259
1441
  ok: boolean;
2260
1442
  status?: number;
2261
1443
  error?: string;
2262
1444
  }
2263
1445
  /** The key's organisation. */
2264
- interface Org {
1446
+ export interface Org {
2265
1447
  id: string;
2266
1448
  name: string;
2267
1449
  plan: string;
2268
1450
  logoUrl: string | null;
2269
1451
  }
2270
- type MailProviderKind = 'brevo' | 'sendgrid' | 'postmark' | 'resend' | 'ses' | 'smtp';
1452
+ export type MailProviderKind = 'brevo' | 'sendgrid' | 'postmark' | 'resend' | 'ses' | 'smtp';
2271
1453
  /**
2272
1454
  * The org's own mail provider for rights-request mail. The credential is never returned —
2273
1455
  * `secretLast4` only. `sender` says whether verification codes go through it right now
2274
1456
  * (`own`) or are not mailed at all (`none`): there is no shared sender for rights mail.
2275
1457
  */
2276
- interface MailProvider {
1458
+ export interface MailProvider {
2277
1459
  configured: boolean;
2278
1460
  sender: 'own' | 'none';
2279
1461
  provider?: MailProviderKind;
@@ -2303,7 +1485,7 @@ interface MailProvider {
2303
1485
  note?: string;
2304
1486
  }
2305
1487
  /** Save a provider. `secret` is write-only; omit it to keep the stored one (same provider only). */
2306
- interface MailProviderInput {
1488
+ export interface MailProviderInput {
2307
1489
  provider: MailProviderKind;
2308
1490
  fromEmail: string;
2309
1491
  fromName?: string | null;
@@ -2320,13 +1502,13 @@ interface MailProviderInput {
2320
1502
  username: string;
2321
1503
  };
2322
1504
  }
2323
- type RightsCaptchaProvider = 'turnstile' | 'hcaptcha' | 'recaptcha_v2' | 'recaptcha_v3';
1505
+ export type RightsCaptchaProvider = 'turnstile' | 'hcaptcha' | 'recaptcha_v2' | 'recaptcha_v3';
2324
1506
  /**
2325
1507
  * The rights page's captcha in force: your own keys (`own`, recommended) or none (`off`, the default).
2326
1508
  * Cookie Munch's own captcha is never used on rights pages. The secret is never returned.
2327
1509
  */
2328
1510
  /** Whether hosted consent sync is set up for a site. The secret itself is never read back. */
2329
- interface ConsentSyncSecret {
1511
+ export interface ConsentSyncSecret {
2330
1512
  cbid: string;
2331
1513
  configured: boolean;
2332
1514
  secretLast4: string | null;
@@ -2337,7 +1519,7 @@ interface ConsentSyncSecret {
2337
1519
  * Who a preference-centre token is for: a site of your organisation and exactly one of `email`
2338
1520
  * (resolved as the emailed preference link resolves it) or `subjectId`.
2339
1521
  */
2340
- type CenterTokenInput = {
1522
+ export type CenterTokenInput = {
2341
1523
  cbid: string;
2342
1524
  ttlSeconds?: number;
2343
1525
  } & ({
@@ -2348,16 +1530,16 @@ type CenterTokenInput = {
2348
1530
  email?: never;
2349
1531
  });
2350
1532
  /** A preference-centre token. A credential: hand it to `CookieMunch.setSubjectToken`, never put it in a shared URL or a log. */
2351
- interface CenterToken {
1533
+ export interface CenterToken {
2352
1534
  token: string;
2353
1535
  /** ISO 8601. */
2354
1536
  expiresAt: string;
2355
1537
  }
2356
1538
  /** A freshly minted or rotated consent-sync secret: `secret` is shown this once. */
2357
- interface ConsentSyncSecretMinted extends ConsentSyncSecret {
1539
+ export interface ConsentSyncSecretMinted extends ConsentSyncSecret {
2358
1540
  secret: string;
2359
1541
  }
2360
- interface RightsCaptcha {
1542
+ export interface RightsCaptcha {
2361
1543
  /** `site`: the site's own setting; `org`: the organisation default; `default`: neither (off). */
2362
1544
  source: 'site' | 'org' | 'default';
2363
1545
  mode: 'own' | 'off';
@@ -2378,7 +1560,7 @@ interface RightsCaptcha {
2378
1560
  * anything is saved (422 captcha_secret_invalid / 502 captcha_unreachable). `off` removes spam protection beyond
2379
1561
  * the hidden spam-trap field, the rate limits and the email code.
2380
1562
  */
2381
- interface RightsCaptchaInput {
1563
+ export interface RightsCaptchaInput {
2382
1564
  mode: 'own' | 'off';
2383
1565
  provider?: RightsCaptchaProvider;
2384
1566
  siteKey?: string;
@@ -2387,12 +1569,12 @@ interface RightsCaptchaInput {
2387
1569
  /** reCAPTCHA v3 only: 0.1–0.9, default 0.5. */
2388
1570
  minScore?: number;
2389
1571
  }
2390
- type RightsIdentityType = 'clerk' | 'atlas' | 'oidc_jwt';
1572
+ export type RightsIdentityType = 'clerk' | 'atlas' | 'oidc_jwt';
2391
1573
  /**
2392
1574
  * The sign-in provider rights requests are verified with: a visitor signed in to your site is
2393
1575
  * verified by their session, with no code mail. Nothing here is secret.
2394
1576
  */
2395
- interface RightsIdentity {
1577
+ export interface RightsIdentity {
2396
1578
  /** `site`: the site's own setting; `org`: the organisation default; `default`: neither (none). */
2397
1579
  source: 'site' | 'org' | 'default';
2398
1580
  configured: boolean;
@@ -2417,7 +1599,7 @@ interface RightsIdentity {
2417
1599
  * never an IP address. The token must carry the email and a verified-email claim set to `true`
2418
1600
  * (clerk/atlas with `trustEmailClaim`: the verified claim may be absent).
2419
1601
  */
2420
- interface RightsIdentityInput {
1602
+ export interface RightsIdentityInput {
2421
1603
  type: RightsIdentityType;
2422
1604
  /** Exactly the token's `iss` (Clerk: your Frontend API URL). */
2423
1605
  issuer: string;
@@ -2438,7 +1620,7 @@ interface RightsIdentityInput {
2438
1620
  trustEmailClaim?: boolean;
2439
1621
  }
2440
1622
  /** The organisation's own data-controller identity (GET /v1/org/controller). */
2441
- interface OrgControllerIdentity {
1623
+ export interface OrgControllerIdentity {
2442
1624
  /** False when none is set; then only `updatedAt` (null) is present. */
2443
1625
  set: boolean;
2444
1626
  legalName?: string;
@@ -2449,25 +1631,25 @@ interface OrgControllerIdentity {
2449
1631
  updatedAt: number | null;
2450
1632
  }
2451
1633
  /** Replaces the identity: a field left out is removed. `legalName` is required. */
2452
- interface OrgControllerInput {
1634
+ export interface OrgControllerInput {
2453
1635
  legalName: string;
2454
1636
  contactEmail?: string;
2455
1637
  address?: string;
2456
1638
  dpoContact?: string;
2457
1639
  }
2458
- interface MailProviderTestResult {
1640
+ export interface MailProviderTestResult {
2459
1641
  ok: boolean;
2460
1642
  sentTo: string;
2461
1643
  error?: string;
2462
1644
  mailProvider: MailProvider;
2463
1645
  }
2464
1646
  /** Change an org's name or logo. `logoUrl: null` removes the logo. */
2465
- interface OrgUpdate {
1647
+ export interface OrgUpdate {
2466
1648
  name?: string;
2467
1649
  logoUrl?: string | null;
2468
1650
  }
2469
1651
  /** One entry in the org's audit log. */
2470
- interface AuditEntry {
1652
+ export interface AuditEntry {
2471
1653
  id: string;
2472
1654
  orgId: string;
2473
1655
  actorUserId: string;
@@ -2478,7 +1660,7 @@ interface AuditEntry {
2478
1660
  at: number;
2479
1661
  }
2480
1662
  /** Rename a key, or replace its scopes or the properties it is locked to. */
2481
- interface ApiKeyUpdate {
1663
+ export interface ApiKeyUpdate {
2482
1664
  owner?: string;
2483
1665
  strictUnknownFields?: boolean;
2484
1666
  name?: string;
@@ -2488,12 +1670,12 @@ interface ApiKeyUpdate {
2488
1670
  expiresAt?: number | string | null;
2489
1671
  }
2490
1672
  /** An image to upload: base64 (or a `data:` URL) plus its type. */
2491
- interface AssetUpload {
1673
+ export interface AssetUpload {
2492
1674
  data: string;
2493
1675
  contentType: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/svg+xml';
2494
1676
  }
2495
1677
  /** Result of erasing a subject's consent for a deletion request. */
2496
- interface DsarEraseResult {
1678
+ export interface DsarEraseResult {
2497
1679
  erased: number;
2498
1680
  encryptionEnabled: boolean;
2499
1681
  /** Present when no KEK is configured, so nothing was cryptographically erased. */
@@ -2501,19 +1683,19 @@ interface DsarEraseResult {
2501
1683
  request: DsarRequest;
2502
1684
  }
2503
1685
  /** Result of exporting a subject's consent for an access or portability request. */
2504
- interface DsarExportResult {
1686
+ export interface DsarExportResult {
2505
1687
  records: unknown[];
2506
1688
  count: number;
2507
1689
  request: DsarRequest;
2508
1690
  }
2509
1691
  /** Input for creating a webhook subscription. */
2510
- interface WebhookCreate {
1692
+ export interface WebhookCreate {
2511
1693
  url: string;
2512
1694
  events: string[];
2513
1695
  cbid?: string;
2514
1696
  }
2515
1697
  /** Fields to change on a webhook subscription. Only those present are sent. */
2516
- interface WebhookUpdate {
1698
+ export interface WebhookUpdate {
2517
1699
  url?: string;
2518
1700
  events?: string[];
2519
1701
  /** One property, or null for every property in the org. */
@@ -2524,20 +1706,20 @@ interface WebhookUpdate {
2524
1706
  alertContacts?: string[] | null;
2525
1707
  }
2526
1708
  /** One site to create in a bulk call. */
2527
- interface BulkSiteInput {
1709
+ export interface BulkSiteInput {
2528
1710
  domain: string;
2529
1711
  cbid?: string;
2530
1712
  platform?: string;
2531
1713
  }
2532
1714
  /** Per-item outcome of a bulk create, in input order. */
2533
- interface BulkSiteResult {
1715
+ export interface BulkSiteResult {
2534
1716
  ok: boolean;
2535
1717
  cbid?: string;
2536
1718
  domain?: string;
2537
1719
  error?: string;
2538
1720
  }
2539
1721
  /** Input for creating a brand kit. */
2540
- interface BrandKitCreate {
1722
+ export interface BrandKitCreate {
2541
1723
  name: string;
2542
1724
  theme: unknown;
2543
1725
  content?: unknown;
@@ -2545,7 +1727,7 @@ interface BrandKitCreate {
2545
1727
  customCss?: string;
2546
1728
  }
2547
1729
  /** A lightweight summary of an account-level banner, as returned by GET /v1/banners. */
2548
- interface BannerSummary {
1730
+ export interface BannerSummary {
2549
1731
  id: string;
2550
1732
  name: string;
2551
1733
  updatedAt: number;
@@ -2554,7 +1736,7 @@ interface BannerSummary {
2554
1736
  designWarningCount: number;
2555
1737
  }
2556
1738
  /** A full account-level banner record, including its config JSON. */
2557
- interface BannerRecord {
1739
+ export interface BannerRecord {
2558
1740
  id: string;
2559
1741
  orgId: string;
2560
1742
  name: string;
@@ -2570,7 +1752,7 @@ interface BannerRecord {
2570
1752
  * server's ConsentPayload; optional fields are sent only when set. Records are
2571
1753
  * anonymised (IP truncated) and hash-chained server-side.
2572
1754
  */
2573
- interface ConsentIngestInput {
1755
+ export interface ConsentIngestInput {
2574
1756
  /** The registered site id the consent belongs to. */
2575
1757
  cbid: string;
2576
1758
  /** Stable per-subject consent-receipt id (used for erase/export). */
@@ -2609,11 +1791,11 @@ interface ConsentIngestInput {
2609
1791
  subjectId?: string;
2610
1792
  }
2611
1793
  /** One of a person's identifiers: an identity-space code plus the normalised value. */
2612
- interface Identifier {
1794
+ export interface Identifier {
2613
1795
  space: string;
2614
1796
  value: string;
2615
1797
  }
2616
- interface ConsentDecisionInput {
1798
+ export interface ConsentDecisionInput {
2617
1799
  purpose: string;
2618
1800
  allowed: boolean;
2619
1801
  legalBasis?: string;
@@ -2621,19 +1803,19 @@ interface ConsentDecisionInput {
2621
1803
  provenance?: string;
2622
1804
  collectedAt?: number;
2623
1805
  }
2624
- interface ProfileAttributeInput {
1806
+ export interface ProfileAttributeInput {
2625
1807
  value: string;
2626
1808
  purpose?: string;
2627
1809
  collectedAt?: number;
2628
1810
  }
2629
- interface SubscriptionTopicInput {
1811
+ export interface SubscriptionTopicInput {
2630
1812
  code: string;
2631
1813
  name?: string;
2632
1814
  channels: string[];
2633
1815
  downstream?: Record<string, string>;
2634
1816
  }
2635
1817
  /** A warehouse-native enforcement rule. See POST /v1/discovery/enforcement. */
2636
- interface EnforcementRuleInput {
1818
+ export interface EnforcementRuleInput {
2637
1819
  id: string;
2638
1820
  action: 'mask' | 'restrict';
2639
1821
  /** Select columns at or above this sensitivity. */
@@ -2647,7 +1829,7 @@ interface EnforcementRuleInput {
2647
1829
  /** restrict: the column holding the subject id. Default SUBJECT_ID. */
2648
1830
  subjectColumn?: string;
2649
1831
  }
2650
- interface RegulationSummary {
1832
+ export interface RegulationSummary {
2651
1833
  id: string;
2652
1834
  jurisdiction: string;
2653
1835
  name: string;
@@ -2658,7 +1840,7 @@ interface RegulationSummary {
2658
1840
  /** Primary source — the statute or the regulator. */
2659
1841
  source: string;
2660
1842
  }
2661
- interface RegulatoryFeedResult {
1843
+ export interface RegulatoryFeedResult {
2662
1844
  /** When a human last checked the dataset against its sources. */
2663
1845
  reviewedAt: string;
2664
1846
  /** Days since that review. */
@@ -2669,7 +1851,7 @@ interface RegulatoryFeedResult {
2669
1851
  stale: boolean;
2670
1852
  regulations: RegulationSummary[];
2671
1853
  }
2672
- interface AiInspectInput {
1854
+ export interface AiInspectInput {
2673
1855
  prompt: string;
2674
1856
  purpose: string;
2675
1857
  model?: string;
@@ -2678,7 +1860,7 @@ interface AiInspectInput {
2678
1860
  /** The subject's current permits, when the call concerns an identified person. */
2679
1861
  consent?: Record<string, boolean>;
2680
1862
  }
2681
- interface AiInspectResult {
1863
+ export interface AiInspectResult {
2682
1864
  action: 'allow' | 'redact' | 'block';
2683
1865
  /** The text to forward: redacted when `redact`, empty when `block`. */
2684
1866
  prompt: string;
@@ -2688,9 +1870,9 @@ interface AiInspectResult {
2688
1870
  blocked: boolean;
2689
1871
  direction: 'prompt' | 'response';
2690
1872
  }
2691
- type FulfillmentOp = 'locate' | 'export' | 'erase' | 'optOut';
1873
+ export type FulfillmentOp = 'locate' | 'export' | 'erase' | 'optOut';
2692
1874
  /** A child org provisioned by a reseller. */
2693
- interface ResellerChild {
1875
+ export interface ResellerChild {
2694
1876
  id: string;
2695
1877
  name: string;
2696
1878
  status: 'active' | 'suspended';
@@ -2700,7 +1882,7 @@ interface ResellerChild {
2700
1882
  createdAt?: number;
2701
1883
  usage?: unknown;
2702
1884
  }
2703
- interface ResellerChildList {
1885
+ export interface ResellerChildList {
2704
1886
  children: ResellerChild[];
2705
1887
  /** Pooled usage across the reseller and all its children, when metering is wired. */
2706
1888
  aggregate?: {
@@ -2711,7 +1893,7 @@ interface ResellerChildList {
2711
1893
  overCap: boolean;
2712
1894
  };
2713
1895
  }
2714
- interface ResellerChildCreate {
1896
+ export interface ResellerChildCreate {
2715
1897
  name: string;
2716
1898
  ownerEmail?: string;
2717
1899
  /** legalName, contactEmail, address, dpoContact. */
@@ -2724,20 +1906,20 @@ interface ResellerChildCreate {
2724
1906
  /** Scopes for that key. Defaults to ["sites:read"]. */
2725
1907
  keyScopes?: string[];
2726
1908
  }
2727
- interface ResellerChildPatch {
1909
+ export interface ResellerChildPatch {
2728
1910
  status?: 'active' | 'suspended';
2729
1911
  delegatedAccess?: boolean;
2730
1912
  /** Pin this child's DSAR routing; null clears the override. */
2731
1913
  dsarRouting?: 'reseller' | 'child' | null;
2732
1914
  controller?: Record<string, unknown>;
2733
1915
  }
2734
- interface ChildKeyInput {
1916
+ export interface ChildKeyInput {
2735
1917
  name?: string;
2736
1918
  scopes?: string[];
2737
1919
  /** Lock the key to these properties of the child org. */
2738
1920
  cbids?: string[];
2739
1921
  }
2740
- interface PolicyOptions {
1922
+ export interface PolicyOptions {
2741
1923
  /** Contact email shown in the policy. Falls back to the org controller's, then the owner's. */
2742
1924
  contactEmail?: string;
2743
1925
  /** YYYY-MM-DD. Defaults to today. */
@@ -2745,13 +1927,13 @@ interface PolicyOptions {
2745
1927
  /** Override the jurisdictions the policy addresses. */
2746
1928
  jurisdictions?: string[];
2747
1929
  }
2748
- interface AdPersonalizationInput {
1930
+ export interface AdPersonalizationInput {
2749
1931
  enabled: boolean;
2750
1932
  /** Whether personalised ads start on before the visitor chooses. */
2751
1933
  default?: boolean;
2752
1934
  label?: string;
2753
1935
  }
2754
- interface SessionAnalysisInput {
1936
+ export interface SessionAnalysisInput {
2755
1937
  /** A HAR export of the captured session. */
2756
1938
  har?: unknown;
2757
1939
  /** Or the requests directly. */
@@ -2767,7 +1949,7 @@ interface SessionAnalysisInput {
2767
1949
  * rather than a release. Paths are relative to `baseUrl`; placeholders are `{email}`,
2768
1950
  * `{subject}`, `{operation}`, `{correlation}` and `{id}`.
2769
1951
  */
2770
- interface ExecutorProfile {
1952
+ export interface ExecutorProfile {
2771
1953
  /** How requests carry the credential. Defaults to `Authorization: Bearer {secret}`. */
2772
1954
  auth?: {
2773
1955
  header: string;
@@ -2859,7 +2041,7 @@ interface ExecutorProfile {
2859
2041
  };
2860
2042
  }
2861
2043
  /** A system connected to run part of a rights request. Credentials are never included. */
2862
- interface DsarExecutor {
2044
+ export interface DsarExecutor {
2863
2045
  id: string;
2864
2046
  /** The name it answers to in a fulfillment plan, e.g. `identity` or `crm`. */
2865
2047
  system: string;
@@ -2910,7 +2092,7 @@ interface DsarExecutor {
2910
2092
  completionSecret?: string;
2911
2093
  }
2912
2094
  /** POST …/completion-secret/roll. */
2913
- interface CompletionSecretRolled {
2095
+ export interface CompletionSecretRolled {
2914
2096
  id: string;
2915
2097
  completionSecret: string;
2916
2098
  completionSecretPrefix: string;
@@ -2918,13 +2100,13 @@ interface CompletionSecretRolled {
2918
2100
  completionsUrl?: string;
2919
2101
  }
2920
2102
  /** POST …/test {conformance: true}: the conformance kit's report. */
2921
- interface ExecutorConformanceResult extends ConformanceReport {
2103
+ export interface ExecutorConformanceResult extends ConformanceReport {
2922
2104
  conformance: true;
2923
2105
  canary: true;
2924
2106
  email: string;
2925
2107
  }
2926
2108
  /** A connection's last health check. */
2927
- interface ExecutorHealth {
2109
+ export interface ExecutorHealth {
2928
2110
  lastCheckedAt: number;
2929
2111
  ok: boolean;
2930
2112
  verdict: string;
@@ -2937,16 +2119,24 @@ interface ExecutorHealth {
2937
2119
  hint?: string;
2938
2120
  }
2939
2121
  /** A preset's name, as `executorPresets()` lists them. Not enumerated here: presets are data. */
2940
- type ExecutorPresetName = string;
2122
+ export type ExecutorPresetName = string;
2941
2123
  /**
2942
2124
  * Connect a system from a versioned preset instead of a hand-written profile. Each preset
2943
2125
  * lists the params it takes (`executorPresets()`); a preset waiting on another platform is
2944
2126
  * refused with `preset_waiting_on_platform`.
2945
2127
  */
2946
- interface DsarExecutorPresetInput {
2128
+ export interface DsarExecutorPresetInput {
2947
2129
  preset: ExecutorPresetName;
2948
2130
  presetVersion?: number;
2949
- secretKey: string;
2131
+ /** The connection's key. Send this or `mintFrom`. */
2132
+ secretKey?: string;
2133
+ /**
2134
+ * A partner id (it registered an `executorKeyUrl`: chatly, forumulate, referalli, …) that mints the key for
2135
+ * the site under its partner link, in place of `secretKey`. The connection is scoped to that site.
2136
+ */
2137
+ mintFrom?: string;
2138
+ /** With `mintFrom`: the partner account the key is minted for. Default: the one the site's live link for that partner names. */
2139
+ externalId?: string;
2950
2140
  system?: string;
2951
2141
  baseUrl?: string;
2952
2142
  orgId?: string;
@@ -2962,7 +2152,7 @@ interface DsarExecutorPresetInput {
2962
2152
  orchestrator?: 1 | 2;
2963
2153
  }
2964
2154
  /** What `upgradeExecutorPreset` takes: a version, a preset to adopt, or params to add. */
2965
- interface ExecutorPresetUpgrade {
2155
+ export interface ExecutorPresetUpgrade {
2966
2156
  preset?: ExecutorPresetName;
2967
2157
  presetVersion?: number;
2968
2158
  orgId?: string;
@@ -2972,7 +2162,7 @@ interface ExecutorPresetUpgrade {
2972
2162
  acceptPreset?: string | string[];
2973
2163
  }
2974
2164
  /** One step a preset builds, and whether it can run now (CMU-B01). */
2975
- interface ExecutorPresetStep {
2165
+ export interface ExecutorPresetStep {
2976
2166
  name: 'subjectLookup' | 'open' | 'poll' | 'webhook' | 'grantRevoke';
2977
2167
  available: boolean;
2978
2168
  /** Never fails a connection: a credential without the scope reports `skipped: insufficient_scope`. */
@@ -2988,7 +2178,7 @@ interface ExecutorPresetStep {
2988
2178
  };
2989
2179
  }
2990
2180
  /** The presets, which are usable now, and this org's canary address. */
2991
- interface ExecutorPresets {
2181
+ export interface ExecutorPresets {
2992
2182
  canaryEmail: string;
2993
2183
  presets: Array<{
2994
2184
  name: ExecutorPresetName;
@@ -3011,7 +2201,7 @@ interface ExecutorPresets {
3011
2201
  }>;
3012
2202
  }
3013
2203
  /** What a connection write would do (`?dryRun=1`). Nothing was stored. */
3014
- interface DsarExecutorDryRun {
2204
+ export interface DsarExecutorDryRun {
3015
2205
  dryRun: true;
3016
2206
  /** The connection as it would be, credentials excluded. A create has no `id` or `webhookUrl` yet. */
3017
2207
  executor: Partial<DsarExecutor> & Record<string, unknown>;
@@ -3021,13 +2211,20 @@ interface DsarExecutorDryRun {
3021
2211
  field: string;
3022
2212
  reason: string;
3023
2213
  }>;
2214
+ /** With `mintFrom`: who would mint the key, for which account and site. Nothing is minted. */
2215
+ mint?: {
2216
+ partner: string;
2217
+ externalId: string | null;
2218
+ cbid: string;
2219
+ detail: string;
2220
+ };
3024
2221
  }
3025
2222
  /** Where a webhook check stopped. */
3026
- type WebhookStage = 'configuration' | 'headers' | 'timestamp' | 'prefix' | 'signature';
2223
+ export type WebhookStage = 'configuration' | 'headers' | 'timestamp' | 'prefix' | 'signature';
3027
2224
  /** Which key a verified delivery matched: a `whsec_` secret's base64-decoded remainder, or the secret as typed. */
3028
- type WebhookKeyForm = 'decoded' | 'raw';
2225
+ export type WebhookKeyForm = 'decoded' | 'raw';
3029
2226
  /** Whether a supplied delivery verified (`stage` and `reason` are null when it did). */
3030
- interface ExecutorWebhookTestResult {
2227
+ export interface ExecutorWebhookTestResult {
3031
2228
  verified: boolean;
3032
2229
  stage: WebhookStage | null;
3033
2230
  reason: string | null;
@@ -3035,7 +2232,7 @@ interface ExecutorWebhookTestResult {
3035
2232
  keyForm: WebhookKeyForm | null;
3036
2233
  }
3037
2234
  /** One delivery to a connection's webhook. Never the secret, the signature or the body. */
3038
- interface ExecutorWebhookDelivery {
2235
+ export interface ExecutorWebhookDelivery {
3039
2236
  id: string;
3040
2237
  executorId: string;
3041
2238
  at: number;
@@ -3050,7 +2247,7 @@ interface ExecutorWebhookDelivery {
3050
2247
  /** Which key form matched; null when refused (or logged before this was kept). Never the key. */
3051
2248
  keyForm: WebhookKeyForm | null;
3052
2249
  }
3053
- interface DsarExecutorInput {
2250
+ export interface DsarExecutorInput {
3054
2251
  /** The name this connection answers to in a plan, e.g. `identity` or `crm`. */
3055
2252
  system: string;
3056
2253
  /** The system's public https origin. */
@@ -3072,9 +2269,9 @@ interface DsarExecutorInput {
3072
2269
  /** Default 2. */
3073
2270
  orchestrator?: 1 | 2;
3074
2271
  }
3075
- type DsarExecutorCreated = DsarExecutor;
2272
+ export type DsarExecutorCreated = DsarExecutor;
3076
2273
  /** The fields `updateExecutor` may change. */
3077
- interface DsarExecutorPatch {
2274
+ export interface DsarExecutorPatch {
3078
2275
  profile?: unknown;
3079
2276
  baseUrl?: string;
3080
2277
  secretKey?: string;
@@ -3090,7 +2287,7 @@ interface DsarExecutorPatch {
3090
2287
  orchestrator?: 1 | 2;
3091
2288
  }
3092
2289
  /** One entry in a fulfilment task's status history. */
3093
- interface DsarTaskEvent {
2290
+ export interface DsarTaskEvent {
3094
2291
  at: number;
3095
2292
  kind: 'created' | 'changed' | 'version_changed';
3096
2293
  status: 'pending' | 'running' | 'done' | 'failed' | 'cancelled';
@@ -3100,9 +2297,9 @@ interface DsarTaskEvent {
3100
2297
  externalRef?: string;
3101
2298
  }
3102
2299
  /** What a task's answer means for the person. `exported` only once the export was fetched. */
3103
- type DsarTaskOutcome = 'located' | 'exported' | 'erased' | 'no_record' | 'done_without_artifact' | 'not_applicable' | 'already_erased' | 'external_identity';
2300
+ export type DsarTaskOutcome = 'located' | 'exported' | 'erased' | 'no_record' | 'done_without_artifact' | 'not_applicable' | 'already_erased' | 'external_identity';
3104
2301
  /** One request made to a connected system on a task's behalf, credentials removed. Kept 30 days. */
3105
- interface DsarTaskLogEntry {
2302
+ export interface DsarTaskLogEntry {
3106
2303
  id?: string;
3107
2304
  system?: string;
3108
2305
  step: 'lookup' | 'open' | 'poll' | 'export' | 'grant';
@@ -3127,7 +2324,7 @@ interface DsarTaskLogEntry {
3127
2324
  at: number;
3128
2325
  }
3129
2326
  /** One fulfilment task with its history and its upstream request log. */
3130
- interface DsarTask {
2327
+ export interface DsarTask {
3131
2328
  id: string;
3132
2329
  requestId: string;
3133
2330
  system: string;
@@ -3154,7 +2351,7 @@ interface DsarTask {
3154
2351
  versionChanged: boolean;
3155
2352
  }
3156
2353
  /** What testing a connection found. Nothing was filed. */
3157
- interface ExecutorTestResult {
2354
+ export interface ExecutorTestResult {
3158
2355
  system: string;
3159
2356
  /** Did the lookup find the person; null when there is no lookup step or it failed. */
3160
2357
  matched: boolean | null;
@@ -3184,7 +2381,7 @@ interface ExecutorTestResult {
3184
2381
  /** Every upstream answer, as the system gave it (credentials removed). */
3185
2382
  exchanges: DsarTaskLogEntry[];
3186
2383
  }
3187
- interface ExecutorTestInput {
2384
+ export interface ExecutorTestInput {
3188
2385
  /** The address to look up. Required unless `canary` is true. */
3189
2386
  email?: string;
3190
2387
  /** Use this org's canary address — no real person. A canary `locate` also updates `health`. */
@@ -3194,14 +2391,14 @@ interface ExecutorTestInput {
3194
2391
  /** For `export` only: open a real export and poll it once. An erasure is never sent. */
3195
2392
  open?: boolean;
3196
2393
  }
3197
- interface DsarTaskExport {
2394
+ export interface DsarTaskExport {
3198
2395
  system: string;
3199
2396
  ref: string;
3200
2397
  /** The bundle as that system returned it. Not stored here. */
3201
2398
  bundle: unknown;
3202
2399
  }
3203
2400
  /** A language the banner already has copy for. */
3204
- interface SupportedLanguage {
2401
+ export interface SupportedLanguage {
3205
2402
  /** BCP-47 tag, lowercase. Matched exactly, then by language prefix. */
3206
2403
  code: string;
3207
2404
  /** English name. */
@@ -3213,7 +2410,7 @@ interface SupportedLanguage {
3213
2410
  /** `bundled` ships in consent.js; `extended` ships in the renderer, fetched when a banner is first drawn. */
3214
2411
  source: 'bundled' | 'extended';
3215
2412
  }
3216
- interface CookieMunchClient {
2413
+ export interface CookieMunchClient {
3217
2414
  me(): Promise<Identity>;
3218
2415
  /**
3219
2416
  * Languages the banner already speaks. Diff this against the locales your visitors
@@ -3245,13 +2442,13 @@ interface CookieMunchClient {
3245
2442
  apiKey?: string;
3246
2443
  keyError?: string;
3247
2444
  }>;
3248
- /** Hard-delete a SANDBOX organisation of this account (created with metadata.forgedeck_sandbox). Anything else: 403 not_a_sandbox. */
2445
+ /** Hard-delete a SANDBOX organisation of this account (created with metadata.stack_sandbox). Anything else: 403 not_a_sandbox. */
3249
2446
  deleteSandbox(id: string): Promise<SandboxPurge>;
3250
2447
  };
3251
2448
  /** Tags on any created resource (CMU-X29). */
3252
2449
  metadata: {
3253
2450
  get(type: TaggedType, id: string): Promise<ResourceTags>;
3254
- /** Merge tags (null removes one). `forgedeck_sandbox` cannot be set here. `{ dryRun: true }` answers with the diff. */
2451
+ /** Merge tags (null removes one). `stack_sandbox` cannot be set here. `{ dryRun: true }` answers with the diff. */
3255
2452
  update(type: TaggedType, id: string, metadata: Record<string, string | number | boolean | null>, opts?: {
3256
2453
  dryRun?: boolean;
3257
2454
  }): Promise<ResourceTagsUpdate>;
@@ -3262,7 +2459,7 @@ interface CookieMunchClient {
3262
2459
  create(input: StandardPartnerLinkCreate): Promise<StandardPartnerLink>;
3263
2460
  revoke(id: string): Promise<StandardPartnerLink>;
3264
2461
  };
3265
- /** What `forgedeck env` writes for a product provisioned with this forgedeck ref: names, values, secret references. */
2462
+ /** What `env` writes for a product provisioned with this stack ref: names, values, secret references. */
3266
2463
  provisionEnv(ref: string): Promise<ProvisionEnv>;
3267
2464
  sites: {
3268
2465
  list(opts?: MetadataFilter): Promise<Site[]>;
@@ -3599,11 +2796,11 @@ interface CookieMunchClient {
3599
2796
  request: DsarRequest;
3600
2797
  changed: boolean;
3601
2798
  }>;
3602
- /** Requests carrying one X-ForgeDeck-Trace (`GET /v1/dsar?trace=`). */
2799
+ /** Requests carrying one X-Trace-Id (`GET /v1/dsar?trace=`). */
3603
2800
  listByTrace(trace: string): Promise<DsarRequest[]>;
3604
2801
  /**
3605
2802
  * Open a case fanned out to every connected system (POST /v1/dsar/requests). `opts.idempotencyKey`
3606
- * (16–128 chars) makes a retry answer the same case; `opts.trace` passes your X-ForgeDeck-Trace on.
2803
+ * (16–128 chars) makes a retry answer the same case; `opts.trace` passes your X-Trace-Id on.
3607
2804
  */
3608
2805
  openCase(input: DsarCaseCreate, opts?: {
3609
2806
  idempotencyKey?: string;
@@ -4040,7 +3237,7 @@ interface CookieMunchClient {
4040
3237
  }): Promise<void>;
4041
3238
  };
4042
3239
  /**
4043
- * The site's embed manifest: the tenant variant of `/.well-known/forgedeck-embed.json` — every
3240
+ * The site's embed manifest: the tenant variant of `/.well-known/cookiemunch-embed.json` — every
4044
3241
  * origin by CSP directive and every browser key the embed writes for this site's config. Public.
4045
3242
  */
4046
3243
  embedManifest(cbid: string): Promise<EmbedManifest>;
@@ -4219,7 +3416,7 @@ interface CookieMunchClient {
4219
3416
  graceDays: number;
4220
3417
  }): Promise<DsarSettings>;
4221
3418
  };
4222
- /** Cards for support, CRM and helpdesk sidebars. Requires dsar:read. */
3419
+ /** Cards for support, CRM and helpdesk sidebars (dsar:read), and one-call identity-provider connect (dsar:write). */
4223
3420
  integrations: {
4224
3421
  /** Open rights requests for one person, by identity (preferred) or email. */
4225
3422
  subjectCard(app: string, person: {
@@ -4228,6 +3425,14 @@ interface CookieMunchClient {
4228
3425
  } | {
4229
3426
  email: string;
4230
3427
  }): Promise<SubjectCard>;
3428
+ /**
3429
+ * Connect an identity provider's privacy orchestrator (`atlas`, or any provider with `connector`): mints a
3430
+ * dsar:write key locked to `cbid` and hands it to the provider, authorised with `providerKey`. The minted key
3431
+ * is never returned (only its prefix). `{ dryRun: true }` mints and sends nothing.
3432
+ */
3433
+ connect(provider: string, input: IntegrationConnect, opts?: {
3434
+ dryRun?: boolean;
3435
+ }): Promise<IntegrationConnectResult>;
4231
3436
  };
4232
3437
  /** One person's consent across every site in the org, by the subjectId your apps attach. */
4233
3438
  subjects: {
@@ -4262,6 +3467,4 @@ interface CookieMunchClient {
4262
3467
  }>;
4263
3468
  };
4264
3469
  }
4265
- declare function createCookieMunch(opts: CookieMunchOptions): CookieMunchClient;
4266
-
4267
- export { type AbResult, type AccountOrg, type AccountOrgs, type AdPersonalizationInput, type AiInspectInput, type AiInspectResult, type ApiKey, type ApiKeyIssueInput, type ApiKeyIssued, type ApiKeyPrefix, type ApiKeyReport, type ApiKeyRevoked, type ApiKeyUpdate, type ApiKeyVended, type ApiVersions, type AppliedImport, type AssetUpload, type AuditEntry, type AuditSink, type AuditSinkInput, type BannerRecord, type BannerSummary, type BlockedReport, type BrandExtractionResult, type BrandImportInput, type BrandKit, type BrandKitCreate, type BrandMappingRow, type BrandReadBack, type BrandSuggestion, type BulkSiteInput, type BulkSiteResult, type ButtonParityFinding, type ButtonParityLint, type ButtonParityScan, CANARY_ISSUER, CONFORMANCE_RULES, type CategorizedCookie, type CategoryRegistry, type CenterToken, type CenterTokenInput, type ChildKeyInput, type CompletionSecretRolled, type ConfigChange, type ConfigDryRun, type ConfigWarning, type ConformanceOptions, type ConformanceReport, type ConformanceRuleResult, type ConformanceStatus, type ConsentDay, type ConsentDecisionInput, type ConsentIngestInput, type ConsentInsights, type ConsentLogRow, type ConsentSyncSecret, type ConsentSyncSecretMinted, type CookieDeclaration, CookieMunchApiError, type CookieMunchClient, type CookieMunchOptions, type CookiePreset, type CookiePresetManifest, type CookiePresetParams, type CookiePresetResult, type CookiePresetVendor, type CookieSuggestion, type CookieSuggestions, type CookieSuggestionsDeclared, type CspSources, type CustomPresetInput, type DeclarationDiff, type DeclarationDryRun, type DeclarationWarning, type DeclaredCookie, type DeclaredCookieInput, type DnsRecordInstruction, type DsarCase, type DsarCaseCreate, type DsarCaseReceipt, type DsarCaseStatus, type DsarCaseTask, type DsarCreate, type DsarEraseResult, type DsarExecutor, type DsarExecutorCreated, type DsarExecutorDryRun, type DsarExecutorInput, type DsarExecutorPatch, type DsarExecutorPresetInput, type DsarExportResult, type DsarRequest, type DsarSettings, type DsarStatus, type DsarSubject, type DsarTask, type DsarTaskEvent, type DsarTaskExport, type DsarTaskLogEntry, type DsarTaskOutcome, type DsarType, type DsarTypeWord, type EmbedManifest, type EmbedManifestStorage, type EmbedManifestSurface, type EnforcementRuleInput, type Entitlement, type Entitlements, type ExecutorConformanceResult, type ExecutorHealth, type ExecutorPresetName, type ExecutorPresetStep, type ExecutorPresetUpgrade, type ExecutorPresets, type ExecutorProfile, type ExecutorTestInput, type ExecutorTestResult, type ExecutorWebhookDelivery, type ExecutorWebhookTestResult, type FdCause, type FdConsent, type FdConsentQueue, type FdQueuedCall, type FdRequestOptions, type FdSnapshot, type FlowIssue, type FlowOp, type FlowOpResponse, type FulfillmentOp, type HealthRow, type HealthWaiver, type HealthWaiverInput, type Identifier, type Identity, type ImportedCookie, type ImportedDeclaration, type InstallSnippet, type IntegrationHealthReport, type LeakReport, type LegalBasis, type LogQuery, type MailProvider, type MailProviderInput, type MailProviderKind, type MailProviderTestResult, type Member, type MetadataFilter, type MintConsentSyncTokenInput, type ObservedPurgeResult, type OperatorTokenExchangeInput, type OperatorTokenExchangeResult, type OptInMethod, type Org, type OrgControllerIdentity, type OrgControllerInput, type OrgUpdate, type ParityControlSummary, type PartnerCatalogEntry, type PartnerId, type PartnerLink, type PartnerLinkCreate, type PlanSource, type PolicyOptions, type PreferenceItem, type PreferenceRecord, type PreviewToken, type PreviewTokenOptions, type ProfileAttributeInput, type ProvisionEnv, type ProvisionRequest, type ProvisionRequestV2, type ProvisionResult, type ProvisionStep, type PublicDsarFiled, type PublicDsarPending, type PublicVerification, type PutConfigOptions, type RangeQuery, type Regulation, type RegulationSummary, type RegulatoryFeedResult, type ResellerChild, type ResellerChildCreate, type ResellerChildList, type ResellerChildPatch, type ResourceMetadata, type ResourceTags, type ResourceTagsInput, type ResourceTagsUpdate, type RetentionLine, type RetiredCookie, type RightKind, type RightsCaptcha, type RightsCaptchaInput, type RightsCaptchaProvider, type RightsIdentity, type RightsIdentityInput, type RightsIdentityType, type RightsLink, type RightsLinkInput, type RightsPageDocument, type RightsPageDomain, type RightsPageDomainList, type RightsPageDraft, type RightsPageDraftConflict, type RightsPageDryRun, type RightsPageIssue, type RightsPagePublishResult, type RightsPagePublished, type RightsPagePublisher, type RightsPageVersions, type RightsPageWriteOptions, type RiskScore, type RopaEntry, type RopaInput, SDK_VERSION, type SandboxCreated, type SandboxOrg, type SandboxPurge, type ScanResult, type ScanStatus, type ScoredVendor, type ScrollbarTheme, type SessionAnalysisInput, type SignedReceipt, type Site, type SiteConfig, type SiteCookie, type SiteCreate, type SiteFlow, type SiteUpdate, type SiteUpdateResult, type SnippetOptions, type StandardKeyList, type StandardPartnerLink, type StandardPartnerLinkCreate, type StorageType, type SubjectCard, type SubjectIdentity, type SubscriptionTopicInput, type SuggestedRejectStyle, type SupportedLanguage, type TaggedType, TokenExchangeError, type Usage, type VendorInput, type VendorRecord, type VerifyResult, type VerifyWebhookInput, type WebhookCreate, type WebhookDeadLetter, type WebhookKeyForm, type WebhookReplayResult, type WebhookStage, type WebhookSubscription, type WebhookTestResult, type WebhookUpdate, canaryIdentityFor, createCookieMunch, exchangeOperatorToken, mintConsentSyncToken, runExecutorConformance, verifyWebhookSignature };
3470
+ export declare function createCookieMunch(opts: CookieMunchOptions): CookieMunchClient;