@cookiemunch/sdk 0.21.0 → 0.22.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
@@ -20,7 +20,7 @@ import type { ConformanceReport } from './executor-conformance.js';
20
20
  * This package's version, sent in the default User-Agent. Cloudflare answers a request with
21
21
  * no recognisable User-Agent with `403 error code: 1010`; a test pins this to package.json.
22
22
  */
23
- export declare const SDK_VERSION = "0.21.0";
23
+ export declare const SDK_VERSION = "0.22.0";
24
24
  export interface CookieMunchOptions {
25
25
  apiKey: string;
26
26
  /** "https://api.cookiemunch.net" — the /v1 prefix is appended automatically. */
@@ -32,11 +32,16 @@ export interface CookieMunchOptions {
32
32
  * declare is refused (`400 unknown_field`, with `field`) instead of ignored. Catches typos.
33
33
  */
34
34
  strictUnknownFields?: boolean;
35
- /** The `User-Agent` sent on every request. Default `cookiemunch-js/<version>`. */
35
+ /**
36
+ * The `User-Agent` sent on every request. Default `cookiemunch-js/<version>`. Without `apiVersion`, a request whose
37
+ * User-Agent starts `cookiemunch-` is served no later than API version 2026-10-24, the shapes this SDK's types
38
+ * describe; another User-Agent is served as the key is pinned.
39
+ */
36
40
  userAgent?: string;
37
41
  /**
38
42
  * Serve every request under this dated API version (`CookieMunch-Version`, e.g. `'2026-10-24'`) instead of the
39
- * one your key is pinned to. `versions()` lists them; `keys.updateSelf({ apiVersion })` re-pins the key.
43
+ * one your key is pinned to. `versions()` lists them; `keys.updateSelf({ apiVersion })` re-pins the key. Lists are
44
+ * unwrapped under any version; from 2026-11-11, `consent.stats` rows are camelCase and partner links snake_case.
40
45
  */
41
46
  apiVersion?: string;
42
47
  /**
@@ -50,7 +55,7 @@ export interface CookieMunchOptions {
50
55
  */
51
56
  headers?: Record<string, string>;
52
57
  }
53
- /** Tags on a created resource (CMU-X29). `stack_sandbox: true` can only be set at creation. */
58
+ /** Tags on a created resource. `stack_sandbox: true` can only be set at creation. */
54
59
  export type ResourceMetadata = Record<string, string | number | boolean>;
55
60
  /** Keep only resources whose tags match, e.g. `{ stack_product: 'referalli' }`. */
56
61
  export interface MetadataFilter {
@@ -88,7 +93,7 @@ export interface SandboxPurge {
88
93
  orgId?: string;
89
94
  counts: Record<string, number>;
90
95
  }
91
- /** A partner link in the suite-standard shape (CMU-X34). */
96
+ /** A partner link in the suite-standard shape. */
92
97
  export interface StandardPartnerLink {
93
98
  id: string;
94
99
  partner: string;
@@ -259,6 +264,11 @@ export interface CategorizedCookie {
259
264
  * `not_seen_recently` = unseen for the site's `staleAfterDays`, owner views only.
260
265
  */
261
266
  review?: 'unclassified' | 'category_disabled' | 'category_unknown' | 'retired_but_seen' | 'awaiting_corroboration' | 'suspicious_report' | 'foreign_cmp' | 'not_seen_recently';
267
+ /** Owner views only, on a `suspicious_report` row: the introducing report's new names and vendors. */
268
+ suspiciousReport?: {
269
+ names: number;
270
+ vendors: number;
271
+ };
262
272
  /** Epoch-ms a crawl or a real visit last saw it. Absent on older rows. */
263
273
  lastSeenAt?: number;
264
274
  /** Owner views only: the site owner retired this cookie (see `sites.retireCookie`). */
@@ -411,7 +421,7 @@ export interface ConfigTranslateResult {
411
421
  }>;
412
422
  }
413
423
  /** A platform whose cookies and storage a preset declares. */
414
- export type CookiePresetVendor = 'atlas' | 'forumulate' | 'chatly' | 'cookiemunch' | 'referalli' | 'firstpromoter' | 'partnerstack' | 'tapfiliate' | 'impact' | 'seolyticize'
424
+ export type CookiePresetVendor = 'atlas' | 'forumulate' | 'chatly' | 'cookiemunch' | 'referalli' | 'firstpromoter' | 'partnerstack' | 'tapfiliate' | 'impact' | 'seolyticize' | 'lucida' | 'hermetica' | 'watchtower'
415
425
  /** @deprecated the old name of `referalli`, accepted until 2027-10-23. */
416
426
  | 'referally';
417
427
  /** Where a vendor's live manifest will come from, and whether it exists yet. */
@@ -497,7 +507,7 @@ export interface CookieSuggestionsDeclared {
497
507
  declared?: DeclaredCookie[];
498
508
  diff?: DeclarationDiff;
499
509
  }
500
- /** Preset parameters: Atlas `frontendApiHost`/`crossSubdomainCookies`/`publishableKey`; Chatly `publicId`/`dragging`/`storage`/`tracking`/`category`; referral and affiliate presets (referalli, firstpromoter, partnerstack, tapfiliate, impact) `cookieDomain`/`cookieDays`/`category`, referalli `legacyName`/`programHandle`, impact `campaignId`. */
510
+ /** Preset parameters: Atlas `frontendApiHost`/`crossSubdomainCookies`/`publishableKey`; Chatly `publicId`/`dragging`/`storage`/`tracking`/`category`; referral and affiliate presets (referalli, firstpromoter, partnerstack, tapfiliate, impact) `cookieDomain`/`cookieDays`/`category`, referalli `legacyName`/`programHandle`, impact `campaignId`; lucida `publicKey`/`cookieDomain`/`category`; hermetica `storage`/`category`; watchtower `category`. */
501
511
  export interface CookiePresetParams {
502
512
  frontendApiHost?: string;
503
513
  crossSubdomainCookies?: boolean;
@@ -505,8 +515,8 @@ export interface CookiePresetParams {
505
515
  publishableKey?: string;
506
516
  publicId?: string;
507
517
  dragging?: boolean;
508
- /** Chatly: the widget's own storage option, as passed to Chatly.init; analytics 'deny' leaves chatly:seen out, marketing 'deny' chatly:utm. */
509
- storage?: 'allow' | 'deny' | 'on-open' | {
518
+ /** Chatly: the widget's own storage option, as passed to Chatly.init; analytics 'deny' leaves chatly:seen out, marketing 'deny' chatly:utm. Hermetica: 'localStorage' (default) or 'cookie'. */
519
+ storage?: 'allow' | 'deny' | 'on-open' | 'localStorage' | 'cookie' | {
510
520
  functional?: 'allow' | 'deny' | 'on-open';
511
521
  analytics?: 'allow' | 'deny' | 'on-open';
512
522
  marketing?: 'allow' | 'deny' | 'on-open';
@@ -528,6 +538,8 @@ export interface CookiePresetParams {
528
538
  orgToken?: string;
529
539
  /** impact: your program id; declares IR_<campaignId> too. */
530
540
  campaignId?: string;
541
+ /** lucida: your public project key; the rows are then exact names ending in its last 8 word characters (else prefix patterns). */
542
+ publicKey?: string;
531
543
  }
532
544
  /** One browser key a surface writes, in an embed manifest. */
533
545
  export interface EmbedManifestStorage {
@@ -735,6 +747,17 @@ export interface ScanStatus {
735
747
  finalUrl?: string;
736
748
  /** Why it failed. */
737
749
  error?: string;
750
+ /** Once done: cookies the scan saw (or a visit since) that no declaration covers. Reporting only. */
751
+ undeclared?: Array<{
752
+ name: string;
753
+ domain?: string;
754
+ category: string;
755
+ }>;
756
+ /** Once done: declarations the scan did not see and nothing has seen for `staleAfterDays`. Reporting only. */
757
+ stale?: Array<{
758
+ name: string;
759
+ lastSeenAt: number | null;
760
+ }>;
738
761
  }
739
762
  /** Consent-button parity of the banner a real browser saw on the site (see ScanStatus). */
740
763
  export interface ButtonParityScan {
@@ -785,6 +808,10 @@ export interface InstallSnippet {
785
808
  blockingMode: string;
786
809
  /** Where `blockingMode` came from: the site's config, or the `blockingMode` option. */
787
810
  blockingModeSource?: 'config' | 'query';
811
+ /** The site's `embedChannel`: `stable`, or `pinned:<version>` (then `src` is that release's immutable URL). */
812
+ channel?: string;
813
+ /** Pinned releases only: the loader's `sha384-` hash, also on the tag with `crossorigin="anonymous"`. */
814
+ integrity?: string;
788
815
  /** The tag's data-culture, when it has one. */
789
816
  culture?: string;
790
817
  /** CSP sources this site needs, by directive, plus a paste-able `policy`. */
@@ -1663,7 +1690,7 @@ export interface Org {
1663
1690
  plan: string;
1664
1691
  logoUrl: string | null;
1665
1692
  }
1666
- export type MailProviderKind = 'brevo' | 'sendgrid' | 'postmark' | 'resend' | 'ses' | 'smtp';
1693
+ export type MailProviderKind = 'brevo' | 'sendgrid' | 'postmark' | 'resend' | 'ses' | 'smtp' | 'hermetica';
1667
1694
  /**
1668
1695
  * The org's own mail provider for rights-request mail. The credential is never returned —
1669
1696
  * `secretLast4` only. `sender` says whether verification codes go through it right now
@@ -1788,6 +1815,17 @@ export type RightsIdentityType = 'clerk' | 'atlas' | 'oidc_jwt';
1788
1815
  * The sign-in provider rights requests are verified with: a visitor signed in to your site is
1789
1816
  * verified by their session, with no code mail. Nothing here is secret.
1790
1817
  */
1818
+ /** What the rights intake would make of one session token (`rightsIdentity.check`). The email is never echoed. */
1819
+ export interface RightsIdentityCheck {
1820
+ verified: boolean;
1821
+ reason?: 'not_configured' | 'unavailable' | 'invalid' | 'no_email' | 'email_unverified';
1822
+ /** For `invalid`: which JWT check failed. */
1823
+ jwt?: 'malformed' | 'alg' | 'no_key' | 'signature' | 'expired' | 'claims' | 'azp';
1824
+ detail: string;
1825
+ /** The claim names the token carries (never their values). */
1826
+ claims?: string[];
1827
+ provider?: 'clerk' | 'atlas' | 'oidc_jwt';
1828
+ }
1791
1829
  export interface RightsIdentity {
1792
1830
  /** `site`: the site's own setting; `org`: the organisation default; `default`: neither (none). */
1793
1831
  source: 'site' | 'org' | 'default';
@@ -2175,7 +2213,7 @@ export interface ChildKeyInput {
2175
2213
  cbids?: string[];
2176
2214
  }
2177
2215
  export interface PolicyOptions {
2178
- /** Contact email shown in the policy. Falls back to the org controller's, then the owner's. */
2216
+ /** Contact email the policy publishes. Falls back to the controller's (org, else site config); with none the API answers 422 `contact_email_required`. */
2179
2217
  contactEmail?: string;
2180
2218
  /** YYYY-MM-DD. Defaults to today. */
2181
2219
  effectiveDate?: string;
@@ -2185,6 +2223,8 @@ export interface PolicyOptions {
2185
2223
  fragment?: 'cookies';
2186
2224
  /** With `fragment: 'cookies'`: Markdown (default) or escaped HTML tables. */
2187
2225
  format?: 'markdown' | 'html';
2226
+ /** With `fragment: 'cookies'`: `review` lists the owner's raw rows (retired and quarantined too), for checking, not publishing. */
2227
+ include?: 'review';
2188
2228
  /** The text's language; the policy is written in English only (`en`). */
2189
2229
  lang?: string;
2190
2230
  }
@@ -2351,7 +2391,9 @@ export interface DsarExecutor {
2351
2391
  completionSecretPrefix?: string;
2352
2392
  /** When a signed completion last verified; running work is then polled every 6 hours. */
2353
2393
  lastSignedCompletionAt?: number | null;
2354
- /** Where signed cm-standard-v2 completions go. */
2394
+ /** Where signed cm-standard-v2 completions go, signed with `completionSecret` (not `webhookUrl`, which profile-based systems use). */
2395
+ completionUrl?: string;
2396
+ /** The same URL as `completionUrl`, under its earlier name. */
2355
2397
  completionsUrl?: string;
2356
2398
  /** True: its erasures wait (status `awaiting_approval`) for `approveTask` or `rejectTask`. */
2357
2399
  requireApproval?: boolean;
@@ -2370,12 +2412,21 @@ export interface DsarExecutor {
2370
2412
  /** On create only: the completion secret, shown this once. */
2371
2413
  completionSecret?: string;
2372
2414
  }
2415
+ /** GET …/completion-secret: the current secret again (dsar:write, audited). */
2416
+ export interface CompletionSecret {
2417
+ id: string;
2418
+ completionSecret: string;
2419
+ completionSecretPrefix: string;
2420
+ completionUrl: string;
2421
+ completionsUrl?: string;
2422
+ }
2373
2423
  /** POST …/completion-secret/roll. */
2374
2424
  export interface CompletionSecretRolled {
2375
2425
  id: string;
2376
2426
  completionSecret: string;
2377
2427
  completionSecretPrefix: string;
2378
2428
  previousRetiresAt: string | null;
2429
+ completionUrl?: string;
2379
2430
  completionsUrl?: string;
2380
2431
  }
2381
2432
  /** POST …/test {conformance: true}: the conformance kit's report. */
@@ -2433,6 +2484,12 @@ export interface DsarExecutorPresetInput {
2433
2484
  orchestrator?: 1 | 2;
2434
2485
  /** Park its erasures for a person's approval. Default false. */
2435
2486
  requireApproval?: boolean;
2487
+ /**
2488
+ * Any of the preset's params by name, as `executorPresets()` lists them: `{ programId }` for referalli
2489
+ * (one program of a shared organisation), `{ projectId }` for lucida, `{ scopeName, scopeId }` for
2490
+ * cm-standard-v2. A name the preset does not list is a 400 naming `params.<name>`.
2491
+ */
2492
+ params?: Record<string, string | boolean>;
2436
2493
  }
2437
2494
  /** What `upgradeExecutorPreset` takes: a version, a preset to adopt, or params to add. */
2438
2495
  export interface ExecutorPresetUpgrade {
@@ -2441,10 +2498,12 @@ export interface ExecutorPresetUpgrade {
2441
2498
  orgId?: string;
2442
2499
  atlasIdAppId?: string;
2443
2500
  revokeAtlasIdGrant?: boolean;
2501
+ /** Any of the preset's params by name (see `DsarExecutorPresetInput.params`). */
2502
+ params?: Record<string, string | boolean>;
2444
2503
  /** Overridden paths (`profileOverrides`) that take the preset's value again; every other override is kept. */
2445
2504
  acceptPreset?: string | string[];
2446
2505
  }
2447
- /** One step a preset builds, and whether it can run now (CMU-B01). */
2506
+ /** One step a preset builds, and whether it can run now. */
2448
2507
  export interface ExecutorPresetStep {
2449
2508
  name: 'subjectLookup' | 'open' | 'poll' | 'webhook' | 'grantRevoke';
2450
2509
  available: boolean;
@@ -2461,6 +2520,20 @@ export interface ExecutorPresetStep {
2461
2520
  };
2462
2521
  }
2463
2522
  /** The presets, which are usable now, and this org's canary address. */
2523
+ /** GET /v1/dsar/executors/suggestions: platforms a site runs on that no connected system covers yet. */
2524
+ export interface ExecutorSuggestion {
2525
+ cbid: string;
2526
+ preset: ExecutorPresetName;
2527
+ platform: string;
2528
+ /** Which cookie rows and partner link implied it. */
2529
+ reason: string;
2530
+ available: boolean;
2531
+ waitingOn?: {
2532
+ platform: string;
2533
+ items: string[];
2534
+ operations: string[];
2535
+ };
2536
+ }
2464
2537
  export interface ExecutorPresets {
2465
2538
  canaryEmail: string;
2466
2539
  /** The same list as `presets`, under the name every list answer uses. */
@@ -2773,7 +2846,7 @@ export interface CookieMunchClient {
2773
2846
  /** Hard-delete a SANDBOX organisation of this account (created with metadata.stack_sandbox). Anything else: 403 not_a_sandbox. */
2774
2847
  deleteSandbox(id: string): Promise<SandboxPurge>;
2775
2848
  };
2776
- /** Tags on any created resource (CMU-X29). */
2849
+ /** Tags on any created resource. */
2777
2850
  metadata: {
2778
2851
  get(type: TaggedType, id: string): Promise<ResourceTags>;
2779
2852
  /** Merge tags (null removes one). `stack_sandbox` cannot be set here. `{ dryRun: true }` answers with the diff. */
@@ -2781,7 +2854,7 @@ export interface CookieMunchClient {
2781
2854
  dryRun?: boolean;
2782
2855
  }): Promise<ResourceTagsUpdate>;
2783
2856
  };
2784
- /** Partner links in the suite-standard shape (CMU-X34). */
2857
+ /** Partner links in the suite-standard shape. */
2785
2858
  partnerLinks: {
2786
2859
  list(opts?: MetadataFilter): Promise<StandardPartnerLink[]>;
2787
2860
  create(input: StandardPartnerLinkCreate): Promise<StandardPartnerLink>;
@@ -2853,10 +2926,16 @@ export interface CookieMunchClient {
2853
2926
  cookies(cbid: string): Promise<CookieDeclaration>;
2854
2927
  /**
2855
2928
  * Start a cookie crawl. Answers at once with `scanId` and `state: 'queued'`; `wait`
2856
- * (seconds, ≤60) holds the request until the scan is done or failed.
2929
+ * (seconds, ≤60) holds the request until the scan is done or failed. `cookies` (a Cookie
2930
+ * header value or `[{ name, value }]`, a test account's session) makes it a signed-in crawl:
2931
+ * set only on the site's own hosts, never stored or returned.
2857
2932
  */
2858
2933
  scan(cbid: string, opts?: {
2859
2934
  wait?: number;
2935
+ cookies?: string | Array<{
2936
+ name: string;
2937
+ value: string;
2938
+ }>;
2860
2939
  }): Promise<ScanStatus>;
2861
2940
  /** The last scan's state. `wait` (seconds, ≤60) holds the request until a running scan settles. */
2862
2941
  scanStatus(cbid: string, opts?: {
@@ -2940,7 +3019,7 @@ export interface CookieMunchClient {
2940
3019
  dryRun: true;
2941
3020
  retired: RetiredCookie[];
2942
3021
  }>;
2943
- /** Every declaration preset (atlas, forumulate, chatly, cookiemunch, referalli, firstpromoter, partnerstack, tapfiliate, impact, seolyticize): params, what it declared here, manifest status. */
3022
+ /** Every declaration preset (atlas, forumulate, chatly, cookiemunch, referalli, firstpromoter, partnerstack, tapfiliate, impact, seolyticize, lucida, hermetica, watchtower): params, what it declared here, manifest status. */
2944
3023
  cookiePresets(cbid: string): Promise<{
2945
3024
  presets: CookiePreset[];
2946
3025
  aliases?: Record<string, string>;
@@ -3484,6 +3563,10 @@ export interface CookieMunchClient {
3484
3563
  dryRunConnectExecutor(input: DsarExecutorInput | DsarExecutorPresetInput): Promise<DsarExecutorDryRun>;
3485
3564
  /** The versioned presets, whether each is usable now (or waits on another platform), and the org canary address. */
3486
3565
  executorPresets(): Promise<ExecutorPresets>;
3566
+ /** The platforms a site's cookie rows and partner links imply that have no connected system yet; every site the key reaches without `cbid`. */
3567
+ executorSuggestions(cbid?: string): Promise<{
3568
+ data: ExecutorSuggestion[];
3569
+ }>;
3487
3570
  /**
3488
3571
  * Rebuild a connection from its preset's latest version (or `presetVersion`), keeping its id
3489
3572
  * and credentials; or adopt a preset on a hand-written one by naming it. Answers with `diff`.
@@ -3537,6 +3620,8 @@ export interface CookieMunchClient {
3537
3620
  }): Promise<ExecutorHealth[]>;
3538
3621
  /** Run the cm-standard-v2 conformance kit against a connection, on the canary subject only. */
3539
3622
  executorConformance(id: string): Promise<ExecutorConformanceResult>;
3623
+ /** The connection's current completion secret and the URL it signs for (dsar:write; each read is audited). */
3624
+ getExecutorCompletionSecret(id: string): Promise<CompletionSecret>;
3540
3625
  /** A new completion secret, shown once; the old one keeps verifying for 24 hours. */
3541
3626
  rollExecutorCompletionSecret(id: string): Promise<CompletionSecretRolled>;
3542
3627
  };
@@ -3736,9 +3821,13 @@ export interface CookieMunchClient {
3736
3821
  };
3737
3822
  };
3738
3823
  /** The org's audit log, newest first. API actions appear as `apikey:<prefix>`. */
3739
- /** `{ actor: 'self' }` reads the calling key's own rows, the one form a scoped key may call. */
3824
+ /**
3825
+ * `{ actor: 'self' }` reads the calling key's own rows, which any key may call. Otherwise an unscoped key or
3826
+ * `audit:read`. `since` (ISO 8601 or epoch ms) keeps rows at or after it.
3827
+ */
3740
3828
  audit(limit?: number, opts?: {
3741
3829
  actor?: string;
3830
+ since?: string | number;
3742
3831
  }): Promise<{
3743
3832
  entries: AuditEntry[];
3744
3833
  }>;
@@ -3848,9 +3937,23 @@ export interface CookieMunchClient {
3848
3937
  */
3849
3938
  rightsIdentity: {
3850
3939
  get(cbid: string): Promise<RightsIdentity>;
3940
+ /** `dryRun`: checked in full (the key set fetched), nothing saved; answers `{ dryRun, setting, diff }`. */
3851
3941
  set(cbid: string, input: RightsIdentityInput): Promise<RightsIdentity>;
3942
+ set(cbid: string, input: RightsIdentityInput, opts: {
3943
+ dryRun: true;
3944
+ }): Promise<{
3945
+ dryRun: true;
3946
+ setting: RightsIdentity;
3947
+ diff: Array<{
3948
+ path: string;
3949
+ from?: unknown;
3950
+ to?: unknown;
3951
+ }>;
3952
+ }>;
3852
3953
  /** Remove the site's own setting: it inherits the organisation default again. */
3853
3954
  remove(cbid: string): Promise<RightsIdentity>;
3955
+ /** Check one session token as the rights intake would, and say why it fails. Files nothing. */
3956
+ check(cbid: string, token: string): Promise<RightsIdentityCheck>;
3854
3957
  };
3855
3958
  /** A site's rights-request settings: graceDays (0–30; 7 for a new site, 0 until set for one that existed before). Requires dsar:read / dsar:write. */
3856
3959
  dsarSettings: {
package/dist/index.js CHANGED
@@ -8,13 +8,13 @@ import {
8
8
  readConsent,
9
9
  verifyDecisionSignature,
10
10
  verifyToken
11
- } from "./chunk-OSVTQPQG.js";
11
+ } from "./chunk-OQJYQMQR.js";
12
12
  import {
13
13
  CANARY_ISSUER,
14
14
  CONFORMANCE_RULES,
15
15
  canaryIdentityFor,
16
16
  runExecutorConformance
17
- } from "./chunk-I4FS2BBF.js";
17
+ } from "./chunk-7Q6XFXKS.js";
18
18
 
19
19
  // src/webhooks.ts
20
20
  import { createHmac, timingSafeEqual } from "crypto";
@@ -88,7 +88,7 @@ async function exchangeOperatorToken(input) {
88
88
  }
89
89
 
90
90
  // src/index.ts
91
- var SDK_VERSION = "0.21.0";
91
+ var SDK_VERSION = "0.22.0";
92
92
  var CookieMunchApiError = class extends Error {
93
93
  constructor(status, message, code, body) {
94
94
  super(message);
@@ -212,7 +212,7 @@ function createCookieMunch(opts) {
212
212
  ),
213
213
  lintConfig: (cbid, config, opts2) => request("POST", `/sites/${enc(cbid)}/config/lint${qs({ replace: opts2?.replace ? 1 : void 0 })}`, config),
214
214
  cookies: (cbid) => get(`/sites/${enc(cbid)}/cookies`),
215
- scan: (cbid, o) => request("POST", `/sites/${enc(cbid)}/scan${qs({ wait: o?.wait })}`),
215
+ scan: (cbid, o) => request("POST", `/sites/${enc(cbid)}/scan${qs({ wait: o?.wait })}`, o?.cookies !== void 0 ? { cookies: o.cookies } : void 0),
216
216
  scanStatus: (cbid, o) => get(`/sites/${enc(cbid)}/scan${qs({ wait: o?.wait })}`),
217
217
  waitForScan: async (cbid, o) => {
218
218
  const until = Date.now() + (o?.timeoutMs ?? 12e4);
@@ -229,7 +229,7 @@ function createCookieMunch(opts) {
229
229
  ab: (cbid) => get(`/sites/${enc(cbid)}/ab`),
230
230
  policy: (cbid, o) => request(
231
231
  "GET",
232
- `/sites/${enc(cbid)}/policy${qs({ contactEmail: o?.contactEmail, effectiveDate: o?.effectiveDate, jurisdictions: o?.jurisdictions?.join(","), fragment: o?.fragment, format: o?.format, lang: o?.lang })}`,
232
+ `/sites/${enc(cbid)}/policy${qs({ contactEmail: o?.contactEmail, effectiveDate: o?.effectiveDate, jurisdictions: o?.jurisdictions?.join(","), fragment: o?.fragment, format: o?.format, include: o?.include, lang: o?.lang })}`,
233
233
  void 0,
234
234
  true
235
235
  ),
@@ -440,6 +440,7 @@ function createCookieMunch(opts) {
440
440
  upsertExecutor: (input, o) => request("PUT", `/dsar/executors${qs({ verify: o?.verify === true ? "1" : o?.verify })}`, input),
441
441
  dryRunConnectExecutor: (input) => request("POST", "/dsar/executors?dryRun=1", input),
442
442
  executorPresets: () => get("/dsar/executors/presets"),
443
+ executorSuggestions: (cbid) => get(`/dsar/executors/suggestions${qs({ cbid })}`),
443
444
  upgradeExecutorPreset: (id, input = {}) => request("POST", `/dsar/executors/${enc(id)}/upgrade-preset`, input),
444
445
  dryRunUpgradeExecutorPreset: (id, input = {}) => request("POST", `/dsar/executors/${enc(id)}/upgrade-preset?dryRun=1`, input),
445
446
  dryRunUpdateExecutor: (id, patch) => request("PATCH", `/dsar/executors/${enc(id)}?dryRun=1`, patch),
@@ -456,6 +457,7 @@ function createCookieMunch(opts) {
456
457
  recheckExecutor: (id) => request("POST", `/dsar/executors/${enc(id)}/recheck`),
457
458
  executorHealthHistory: (id, opts2 = {}) => get(`/dsar/executors/${enc(id)}/health/history${qs({ limit: opts2.limit })}`),
458
459
  executorConformance: (id) => request("POST", `/dsar/executors/${enc(id)}/test`, { conformance: true }),
460
+ getExecutorCompletionSecret: (id) => request("GET", `/dsar/executors/${enc(id)}/completion-secret`),
459
461
  rollExecutorCompletionSecret: (id) => request("POST", `/dsar/executors/${enc(id)}/completion-secret/roll`)
460
462
  },
461
463
  preferences: {
@@ -540,7 +542,7 @@ function createCookieMunch(opts) {
540
542
  remove: () => request("DELETE", "/org/rights-identity")
541
543
  }
542
544
  },
543
- audit: (limit, opts2) => get(`/audit${qs({ limit, actor: opts2?.actor })}`),
545
+ audit: (limit, opts2) => get(`/audit${qs({ limit, actor: opts2?.actor, since: opts2?.since })}`),
544
546
  auditSink: {
545
547
  get: () => get("/audit/sink"),
546
548
  set: (input) => request("PUT", "/audit/sink", input),
@@ -597,8 +599,9 @@ function createCookieMunch(opts) {
597
599
  },
598
600
  rightsIdentity: {
599
601
  get: (cbid) => get(`/sites/${enc(cbid)}/rights-identity`),
600
- set: (cbid, input) => request("PUT", `/sites/${enc(cbid)}/rights-identity`, input),
601
- remove: (cbid) => request("DELETE", `/sites/${enc(cbid)}/rights-identity`)
602
+ set: ((cbid, input, o) => request("PUT", `/sites/${enc(cbid)}/rights-identity${qs({ dryRun: o?.dryRun ? "1" : void 0 })}`, input)),
603
+ remove: (cbid) => request("DELETE", `/sites/${enc(cbid)}/rights-identity`),
604
+ check: (cbid, token) => request("POST", `/sites/${enc(cbid)}/rights-identity/check`, { token })
602
605
  },
603
606
  dsarSettings: {
604
607
  get: (cbid) => get(`/sites/${enc(cbid)}/dsar-settings`),