@checkbox-site/node 0.1.1 → 0.2.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/README.md CHANGED
@@ -31,6 +31,7 @@ sandbox and never need activation.
31
31
  | Retries | Network errors, 409 `idempotency_key_in_use`, 429 (honours `Retry-After`) and 5xx are retried with exponential backoff and jitter (`maxNetworkRetries`, default 2) |
32
32
  | Idempotency | Every POST that changes something gets an `Idempotency-Key` automatically, reused across retries; pass your own with `{ idempotencyKey }` |
33
33
  | Versioning | Sends `Checkbox-Version: 2026-10-30` (the version the SDK was generated for); override with `new Checkbox(key, { apiVersion })` or per request |
34
+ | Base URL | `new Checkbox(key, { baseUrl: 'http://localhost:4000' })`, or the `CHECKBOX_API_BASE` environment variable (the same one the MCP server reads); a trailing `/v1` is ignored. Default `https://app.checkbox.site` |
34
35
  | Mode | `checkbox.mode` is `'test'` or `'live'` from the key prefix (`ck_test_` / `ck_live_` / `rk_…` / legacy `sk_live_`) |
35
36
  | Errors | `CheckboxInvalidRequestError`, `CheckboxAuthenticationError`, `CheckboxPermissionError`, `CheckboxRateLimitError`, `CheckboxIdempotencyError`, `CheckboxAPIError`, `CheckboxConnectionError` (all `CheckboxError`), each with a stable `code`, `param`, `statusCode`, `requestId`, `docUrl` and `nextAction` |
36
37
  | Webhooks | `checkbox.webhooks.constructEvent(rawBody, signatureHeader, secret)` verifies `Checkbox-Signature` and returns a typed `WebhookEvent`; `constructEventAsync` for edge runtimes |
@@ -45,6 +46,7 @@ const checkbox = new Checkbox(process.env.CHECKBOX_API_KEY, {
45
46
  maxNetworkRetries: 2, // default
46
47
  timeout: 80_000, // ms per attempt
47
48
  appInfo: { name: 'my-app', version: '1.0.0' },
49
+ // baseUrl: 'http://localhost:4000', // API origin (default https://app.checkbox.site); or set CHECKBOX_API_BASE
48
50
  });
49
51
 
50
52
  // Register a site (idempotent per key) and read its compliance plan: ordered tasks with the law, the exact change and
@@ -70,7 +72,7 @@ try {
70
72
  await checkbox.certificates.create(site.id);
71
73
  } catch (err) {
72
74
  if (!(err instanceof CheckboxError)) throw err;
73
- // resource_conflict: not eligible yet (verify the domain, stay compliant for 7 days);
75
+ // resource_conflict: not eligible yet (verify the domain, keep the checks passing for 7 days);
74
76
  // account_not_activated: a live key before any domain is verified.
75
77
  console.log(err.code, err.message, err.nextAction);
76
78
  }
package/dist/client.d.ts CHANGED
@@ -45,7 +45,7 @@ export interface Checkbox extends ResourceInstances {
45
45
  */
46
46
  export declare class Checkbox implements RequestSender {
47
47
  #private;
48
- static readonly VERSION = "0.1.1";
48
+ static readonly VERSION = "0.2.0";
49
49
  static readonly API_VERSION = "2026-10-30";
50
50
  static readonly errors: typeof errors;
51
51
  static readonly webhooks: Webhooks;
@@ -390,6 +390,23 @@ export declare class Checkbox implements RequestSender {
390
390
  readonly paginated: false;
391
391
  readonly summary: "Check domain verification now";
392
392
  };
393
+ readonly resyncBilling: {
394
+ readonly operationId: "resyncBilling";
395
+ readonly namespace: "billings";
396
+ readonly method: "resync";
397
+ readonly httpMethod: "POST";
398
+ readonly path: "/v1/sites/{site}/billing/resync";
399
+ readonly pathParams: readonly ["site"];
400
+ readonly queryParams: readonly [];
401
+ readonly body: false;
402
+ readonly idempotent: true;
403
+ readonly auth: true;
404
+ readonly scope: "sites:write";
405
+ readonly response: "json";
406
+ readonly list: false;
407
+ readonly paginated: false;
408
+ readonly summary: "Re-sync Stripe settings";
409
+ };
393
410
  readonly createScan: {
394
411
  readonly operationId: "createScan";
395
412
  readonly namespace: "scans";
@@ -730,6 +747,23 @@ export declare class Checkbox implements RequestSender {
730
747
  readonly paginated: false;
731
748
  readonly summary: "List fix plans for a site";
732
749
  };
750
+ readonly publishShopifyTerms: {
751
+ readonly operationId: "publishShopifyTerms";
752
+ readonly namespace: "fixes";
753
+ readonly method: "publishShopifyTerms";
754
+ readonly httpMethod: "POST";
755
+ readonly path: "/v1/sites/{site}/fixes/shopify/publish";
756
+ readonly pathParams: readonly ["site"];
757
+ readonly queryParams: readonly [];
758
+ readonly body: true;
759
+ readonly idempotent: true;
760
+ readonly auth: true;
761
+ readonly scope: "fixes:write";
762
+ readonly response: "json";
763
+ readonly list: false;
764
+ readonly paginated: false;
765
+ readonly summary: "Publish the renewal terms to the Shopify app block";
766
+ };
733
767
  readonly listEvidence: {
734
768
  readonly operationId: "listEvidence";
735
769
  readonly namespace: "evidence";
@@ -1614,6 +1648,23 @@ export declare class Checkbox implements RequestSender {
1614
1648
  readonly paginated: false;
1615
1649
  readonly summary: "Delete a registered checkout config";
1616
1650
  };
1651
+ readonly deleteSiteStripeCheckoutConfig: {
1652
+ readonly operationId: "deleteSiteStripeCheckoutConfig";
1653
+ readonly namespace: "siteStripeCheckoutConfigs";
1654
+ readonly method: "del";
1655
+ readonly httpMethod: "DELETE";
1656
+ readonly path: "/v1/sites/{site}/stripe_checkout_configs/{stripe_checkout_config}";
1657
+ readonly pathParams: readonly ["site", "stripe_checkout_config"];
1658
+ readonly queryParams: readonly [];
1659
+ readonly body: false;
1660
+ readonly idempotent: false;
1661
+ readonly auth: true;
1662
+ readonly scope: "test_runs:write";
1663
+ readonly response: "json";
1664
+ readonly list: false;
1665
+ readonly paginated: false;
1666
+ readonly summary: "Delete a registered checkout config (site path)";
1667
+ };
1617
1668
  readonly createTestRun: {
1618
1669
  readonly operationId: "createTestRun";
1619
1670
  readonly namespace: "testRuns";
@@ -1655,7 +1706,7 @@ export declare class Checkbox implements RequestSender {
1655
1706
  readonly httpMethod: "GET";
1656
1707
  readonly path: "/v1/test_runs/{test_run}";
1657
1708
  readonly pathParams: readonly ["test_run"];
1658
- readonly queryParams: readonly [];
1709
+ readonly queryParams: readonly ["wait"];
1659
1710
  readonly body: false;
1660
1711
  readonly idempotent: false;
1661
1712
  readonly auth: true;
@@ -1835,6 +1886,23 @@ export declare class Checkbox implements RequestSender {
1835
1886
  readonly paginated: false;
1836
1887
  readonly summary: "Send feedback";
1837
1888
  };
1889
+ readonly claimReviewPrompt: {
1890
+ readonly operationId: "claimReviewPrompt";
1891
+ readonly namespace: "reviewPrompts";
1892
+ readonly method: "claim";
1893
+ readonly httpMethod: "POST";
1894
+ readonly path: "/v1/sites/{site}/review_prompt";
1895
+ readonly pathParams: readonly ["site"];
1896
+ readonly queryParams: readonly [];
1897
+ readonly body: true;
1898
+ readonly idempotent: false;
1899
+ readonly auth: true;
1900
+ readonly scope: "compliance_plans:read";
1901
+ readonly response: "json";
1902
+ readonly list: false;
1903
+ readonly paginated: false;
1904
+ readonly summary: "Claim the one-time review prompt for a site";
1905
+ };
1838
1906
  };
1839
1907
  static readonly Webhooks: typeof Webhooks;
1840
1908
  /** Webhook signature verification: `checkbox.webhooks.constructEvent(rawBody, header, secret)`. */
@@ -342,6 +342,23 @@ export declare const OPERATIONS: {
342
342
  readonly paginated: false;
343
343
  readonly summary: "Check domain verification now";
344
344
  };
345
+ readonly resyncBilling: {
346
+ readonly operationId: "resyncBilling";
347
+ readonly namespace: "billings";
348
+ readonly method: "resync";
349
+ readonly httpMethod: "POST";
350
+ readonly path: "/v1/sites/{site}/billing/resync";
351
+ readonly pathParams: readonly ["site"];
352
+ readonly queryParams: readonly [];
353
+ readonly body: false;
354
+ readonly idempotent: true;
355
+ readonly auth: true;
356
+ readonly scope: "sites:write";
357
+ readonly response: "json";
358
+ readonly list: false;
359
+ readonly paginated: false;
360
+ readonly summary: "Re-sync Stripe settings";
361
+ };
345
362
  readonly createScan: {
346
363
  readonly operationId: "createScan";
347
364
  readonly namespace: "scans";
@@ -682,6 +699,23 @@ export declare const OPERATIONS: {
682
699
  readonly paginated: false;
683
700
  readonly summary: "List fix plans for a site";
684
701
  };
702
+ readonly publishShopifyTerms: {
703
+ readonly operationId: "publishShopifyTerms";
704
+ readonly namespace: "fixes";
705
+ readonly method: "publishShopifyTerms";
706
+ readonly httpMethod: "POST";
707
+ readonly path: "/v1/sites/{site}/fixes/shopify/publish";
708
+ readonly pathParams: readonly ["site"];
709
+ readonly queryParams: readonly [];
710
+ readonly body: true;
711
+ readonly idempotent: true;
712
+ readonly auth: true;
713
+ readonly scope: "fixes:write";
714
+ readonly response: "json";
715
+ readonly list: false;
716
+ readonly paginated: false;
717
+ readonly summary: "Publish the renewal terms to the Shopify app block";
718
+ };
685
719
  readonly listEvidence: {
686
720
  readonly operationId: "listEvidence";
687
721
  readonly namespace: "evidence";
@@ -1566,6 +1600,23 @@ export declare const OPERATIONS: {
1566
1600
  readonly paginated: false;
1567
1601
  readonly summary: "Delete a registered checkout config";
1568
1602
  };
1603
+ readonly deleteSiteStripeCheckoutConfig: {
1604
+ readonly operationId: "deleteSiteStripeCheckoutConfig";
1605
+ readonly namespace: "siteStripeCheckoutConfigs";
1606
+ readonly method: "del";
1607
+ readonly httpMethod: "DELETE";
1608
+ readonly path: "/v1/sites/{site}/stripe_checkout_configs/{stripe_checkout_config}";
1609
+ readonly pathParams: readonly ["site", "stripe_checkout_config"];
1610
+ readonly queryParams: readonly [];
1611
+ readonly body: false;
1612
+ readonly idempotent: false;
1613
+ readonly auth: true;
1614
+ readonly scope: "test_runs:write";
1615
+ readonly response: "json";
1616
+ readonly list: false;
1617
+ readonly paginated: false;
1618
+ readonly summary: "Delete a registered checkout config (site path)";
1619
+ };
1569
1620
  readonly createTestRun: {
1570
1621
  readonly operationId: "createTestRun";
1571
1622
  readonly namespace: "testRuns";
@@ -1607,7 +1658,7 @@ export declare const OPERATIONS: {
1607
1658
  readonly httpMethod: "GET";
1608
1659
  readonly path: "/v1/test_runs/{test_run}";
1609
1660
  readonly pathParams: readonly ["test_run"];
1610
- readonly queryParams: readonly [];
1661
+ readonly queryParams: readonly ["wait"];
1611
1662
  readonly body: false;
1612
1663
  readonly idempotent: false;
1613
1664
  readonly auth: true;
@@ -1787,6 +1838,23 @@ export declare const OPERATIONS: {
1787
1838
  readonly paginated: false;
1788
1839
  readonly summary: "Send feedback";
1789
1840
  };
1841
+ readonly claimReviewPrompt: {
1842
+ readonly operationId: "claimReviewPrompt";
1843
+ readonly namespace: "reviewPrompts";
1844
+ readonly method: "claim";
1845
+ readonly httpMethod: "POST";
1846
+ readonly path: "/v1/sites/{site}/review_prompt";
1847
+ readonly pathParams: readonly ["site"];
1848
+ readonly queryParams: readonly [];
1849
+ readonly body: true;
1850
+ readonly idempotent: false;
1851
+ readonly auth: true;
1852
+ readonly scope: "compliance_plans:read";
1853
+ readonly response: "json";
1854
+ readonly list: false;
1855
+ readonly paginated: false;
1856
+ readonly summary: "Claim the one-time review prompt for a site";
1857
+ };
1790
1858
  };
1791
1859
  export interface OperationSpec {
1792
1860
  operationId: string;
@@ -1912,6 +1980,12 @@ export interface OperationTypes {
1912
1980
  };
1913
1981
  response: T.DomainVerification;
1914
1982
  };
1983
+ resyncBilling: {
1984
+ args: {
1985
+ site: string;
1986
+ };
1987
+ response: T.BillingSync;
1988
+ };
1915
1989
  createScan: {
1916
1990
  args: {
1917
1991
  site: string;
@@ -1988,7 +2062,7 @@ export interface OperationTypes {
1988
2062
  args: {
1989
2063
  task: string;
1990
2064
  } & T.AnswerTaskParams;
1991
- response: T.Task;
2065
+ response: T.AnsweredTask;
1992
2066
  };
1993
2067
  verifyTask: {
1994
2068
  args: {
@@ -2026,6 +2100,12 @@ export interface OperationTypes {
2026
2100
  } & T.ListSiteFixesParams;
2027
2101
  response: T.FixList;
2028
2102
  };
2103
+ publishShopifyTerms: {
2104
+ args: {
2105
+ site: string;
2106
+ } & T.PublishShopifyTermsParams;
2107
+ response: T.ShopifyTermsPublication;
2108
+ };
2029
2109
  listEvidence: {
2030
2110
  args: T.ListEvidenceParams;
2031
2111
  response: T.EvidenceList;
@@ -2291,6 +2371,13 @@ export interface OperationTypes {
2291
2371
  };
2292
2372
  response: T.DeletedStripeCheckoutConfig;
2293
2373
  };
2374
+ deleteSiteStripeCheckoutConfig: {
2375
+ args: {
2376
+ site: string;
2377
+ stripe_checkout_config: string;
2378
+ };
2379
+ response: T.DeletedStripeCheckoutConfig;
2380
+ };
2294
2381
  createTestRun: {
2295
2382
  args: {
2296
2383
  site: string;
@@ -2306,7 +2393,7 @@ export interface OperationTypes {
2306
2393
  retrieveTestRun: {
2307
2394
  args: {
2308
2395
  test_run: string;
2309
- };
2396
+ } & T.RetrieveTestRunParams;
2310
2397
  response: T.TestRun;
2311
2398
  };
2312
2399
  cancelTestRun: {
@@ -2361,6 +2448,12 @@ export interface OperationTypes {
2361
2448
  args: T.FeedbackParams;
2362
2449
  response: T.Feedback;
2363
2450
  };
2451
+ claimReviewPrompt: {
2452
+ args: {
2453
+ site: string;
2454
+ } & T.ReviewPromptParams;
2455
+ response: T.ReviewPrompt;
2456
+ };
2364
2457
  }
2365
2458
  /** `checkbox.device` */
2366
2459
  export declare class DeviceResource extends Resource {
@@ -2420,7 +2513,7 @@ export declare class SetupSessionsResource extends Resource {
2420
2513
  /**
2421
2514
  * Re-check the site now.
2422
2515
  *
2423
- * Loads the site (is the snippet live? which policy links does it have?), re-fetches the Terms and policies, re-evaluates compliance and queues the first synthetic-shopper scan. Call it after every change the agent made (and after deploying). Returns what was seen plus the updated session.
2516
+ * Loads the site (is the snippet live? which policy links does it have?), re-fetches the Terms and policies, re-evaluates compliance and queues the first synthetic-shopper scan. While the domain is not verified: a live snippet (or the checkbox-verify meta tag) on the homepage verifies it now; otherwise a read-only scan of the site's own public pages is queued (unverified: no checkout is submitted). Call it after every change the agent made (and after deploying). Returns what was seen plus the updated session.
2424
2517
  *
2425
2518
  * @param setupSession Unique identifier of the setup session (setup_…).
2426
2519
  * @see POST /v1/setup_sessions/{setup_session}/verify (operation `verifySetupSession`, scope `setup_sessions:write`)
@@ -2449,7 +2542,7 @@ export declare class AccountResource extends Resource {
2449
2542
  /**
2450
2543
  * Update the account.
2451
2544
  *
2452
- * Pins the account to an API version (requests without a Checkbox-Version header use it). Known versions: 2026-10-30.
2545
+ * Pins the account to an API version (requests without a Checkbox-Version header use it; known versions: 2026-10-30), sets the default retention, and turns the account-wide legal hold on or off. Retention and legal hold apply to the key's mode (test mode has its own).
2453
2546
  *
2454
2547
  * @see POST /v1/account (operation `updateAccount`, scope `account:write`)
2455
2548
  */
@@ -2476,7 +2569,7 @@ export declare class SitesResource extends Resource {
2476
2569
  /**
2477
2570
  * Retrieve a site.
2478
2571
  *
2479
- * Returns a site with its latest compliance verdict (score, status) and install details.
2572
+ * Returns a site with its latest compliance status (label and counts) and install details.
2480
2573
  *
2481
2574
  * @param site Unique identifier of the site (site_…).
2482
2575
  * @see GET /v1/sites/{site} (operation `retrieveSite`, scope `sites:read`)
@@ -2514,7 +2607,7 @@ export declare class SitesResource extends Resource {
2514
2607
  /**
2515
2608
  * Connect a billing platform.
2516
2609
  *
2517
- * Connects the site's billing platform with read-only credentials (a Stripe restricted key, a Recharge token or a Shopify Admin API token), so Checkbox reads the customer-portal and reminder settings. Works for test-mode sites too (use an rk_test_ key). The credentials are validated by reading the settings once and stored encrypted.
2610
+ * Connects the site's billing platform with read-only credentials (a Stripe restricted key, a Recharge token, a Shopify Admin API token, a Chargebee read-only API key, a Recurly private API key or a Paddle API key with read permissions), so Checkbox reads the customer-portal and reminder settings. Works for test-mode sites too (use an rk_test_ key). The credentials are validated by reading the settings once and stored encrypted.
2518
2611
  *
2519
2612
  * @param site Unique identifier of the site (site_…).
2520
2613
  * @see POST /v1/sites/{site}/integrations (operation `connectBillingPlatform`, scope `sites:write`)
@@ -2553,13 +2646,25 @@ export declare class DomainVerificationsResource extends Resource {
2553
2646
  /**
2554
2647
  * Check domain verification now.
2555
2648
  *
2556
- * Looks for the DNS TXT record and the /.well-known file now. On success in live mode, the account is activated and held monitoring starts.
2649
+ * Looks for the DNS TXT record, the /.well-known file, and the site's Checkbox snippet or the checkbox-verify meta tag on https://<domain>/ now. On success in live mode, the account is activated and held monitoring starts.
2557
2650
  *
2558
2651
  * @param site Unique identifier of the site (site_…).
2559
2652
  * @see POST /v1/sites/{site}/domain_verification/check (operation `checkDomainVerification`, scope `sites:write`)
2560
2653
  */
2561
2654
  check(site: string, options?: RequestOptions): Promise<T.DomainVerification>;
2562
2655
  }
2656
+ /** `checkbox.billings` */
2657
+ export declare class BillingsResource extends Resource {
2658
+ /**
2659
+ * Re-sync Stripe settings.
2660
+ *
2661
+ * Re-reads the site's billing-platform settings now (Stripe customer-portal cancellation, trial-ending emails, plans) and re-evaluates the site, so a setting you just changed in Stripe shows up without waiting for the next scan. Every scan also re-reads them. Then poll retrieveLatestEvaluation (or listFindings) after about a minute.
2662
+ *
2663
+ * @param site Unique identifier of the site (site_…).
2664
+ * @see POST /v1/sites/{site}/billing/resync (operation `resyncBilling`, scope `sites:write`)
2665
+ */
2666
+ resync(site: string, options?: RequestOptions): Promise<T.BillingSync>;
2667
+ }
2563
2668
  /** `checkbox.scans` */
2564
2669
  export declare class ScansResource extends Resource {
2565
2670
  /**
@@ -2603,7 +2708,7 @@ export declare class EvaluationsResource extends Resource {
2603
2708
  /**
2604
2709
  * List evaluations.
2605
2710
  *
2606
- * Verdicts newest first (score history), optionally for one site.
2711
+ * Verdicts newest first (status history), optionally for one site.
2607
2712
  *
2608
2713
  * @see GET /v1/evaluations (operation `listEvaluations`, scope `evaluations:read`)
2609
2714
  */
@@ -2620,7 +2725,7 @@ export declare class EvaluationsResource extends Resource {
2620
2725
  /**
2621
2726
  * Get the current verdict of a site.
2622
2727
  *
2623
- * The latest evaluation of the site: is it compliant (score and status), and what blocks it. 404 resource_missing with next_action createScan when the site was never evaluated.
2728
+ * The latest evaluation of the site: its compliance status and what blocks it. 404 resource_missing with next_action createScan when the site was never evaluated.
2624
2729
  *
2625
2730
  * @param site Unique identifier of the site (site_…).
2626
2731
  * @see GET /v1/sites/{site}/evaluation (operation `retrieveLatestEvaluation`, scope `evaluations:read`)
@@ -2632,7 +2737,7 @@ export declare class FindingsResource extends Resource {
2632
2737
  /**
2633
2738
  * List findings.
2634
2739
  *
2635
- * Findings ordered by urgency (failing first, then by severity). Filter by site, status (fail, needs_review, pass, not_applicable) and state (open, acknowledged, resolved, accepted_risk). Fix the open `fail` findings to become compliant.
2740
+ * Findings ordered by urgency (failing first, then by severity). Filter by site, status (fail, needs_review, pass, not_applicable) and state (open, acknowledged, resolved, accepted_risk). Fix the open `fail` findings so the checks pass.
2636
2741
  *
2637
2742
  * @see GET /v1/findings (operation `listFindings`, scope `findings:read`)
2638
2743
  */
@@ -2661,7 +2766,7 @@ export declare class PlansResource extends Resource {
2661
2766
  /**
2662
2767
  * Get the compliance plan for a site.
2663
2768
  *
2664
- * Ordered tasks that make the site compliant, recomputed from its latest evaluation: each with the requirement and citation, where to change (file / URL / selector / Stripe object), the exact change (unified-diff template with machine-applicable edits, copy, or Stripe params) and how to verify it. Do plan.next_action: apply the first open task, call verifyTask, repeat until status is compliant. Tasks with status manual hold a question for the human (answerTask); they never block the others.
2769
+ * Ordered tasks that make the site's checks pass, recomputed from its latest evaluation: each with the requirement and citation, where to change (file / URL / selector / Stripe object), the exact change (unified-diff template with machine-applicable edits, copy, or Stripe params) and how to verify it. Do plan.next_action: apply the first open task, call verifyTask, and repeat until the checks pass (status value compliant; status_label "Checks pass"). Tasks with status manual hold a question for the human (answerTask); they never block the others.
2665
2770
  *
2666
2771
  * @param site Unique identifier of the site (site_…).
2667
2772
  * @see GET /v1/sites/{site}/plan (operation `retrieveCompliancePlan`, scope `compliance_plans:read`)
@@ -2696,7 +2801,7 @@ export declare class TasksResource extends Resource {
2696
2801
  * @param task Unique identifier of the task (task_…).
2697
2802
  * @see POST /v1/tasks/{task}/answer (operation `answerTask`, scope `compliance_plans:write`)
2698
2803
  */
2699
- answer(task: string, params: T.AnswerTaskParams, options?: RequestOptions): Promise<T.Task>;
2804
+ answer(task: string, params: T.AnswerTaskParams, options?: RequestOptions): Promise<T.AnsweredTask>;
2700
2805
  /**
2701
2806
  * Verify a task after applying its change.
2702
2807
  *
@@ -2712,7 +2817,7 @@ export declare class VerificationsResource extends Resource {
2712
2817
  /**
2713
2818
  * Get a verification (long-poll with ?wait=30).
2714
2819
  *
2715
- * The verification's status (pending, passed, failed), expected vs observed per check, the diff and next_action. ?wait=N (≤ 30) holds the request until it resolves or N seconds pass.
2820
+ * The verification's status (pending, passed, failed), expected vs observed per check, the diff and next_action. Also takes a task id (task_…): the newest verification of that task. ?wait=N (≤ 30) holds the request until it resolves or N seconds pass.
2716
2821
  *
2717
2822
  * @param verification Unique identifier of the verification (ver_…).
2718
2823
  * @see GET /v1/verifications/{verification} (operation `retrieveVerification`, scope `compliance_plans:read`)
@@ -2748,6 +2853,15 @@ export declare class FixesResource extends Resource {
2748
2853
  * @see GET /v1/sites/{site}/fixes (operation `listSiteFixes`, scope `fixes:read`)
2749
2854
  */
2750
2855
  list(site: string, params?: T.ListSiteFixesParams, options?: RequestOptions): Promise<T.FixList>;
2856
+ /**
2857
+ * Publish the renewal terms to the Shopify app block.
2858
+ *
2859
+ * For a Shopify store connected through the Checkbox Shopify app (site.shopify.connection = app): generates the renewal disclosure and consent label from the site's real plan, verifies them against the rules engine, and publishes them to the app-owned metafield the Checkbox "Renewal terms + consent" theme block reads. Nothing else in the store changes (no theme, product or checkout edits). The merchant places the block once in the theme editor (theme_editor_url); after that, publishing again updates the text the block shows. Then verify the sign-up task (verifyTask) or the site (verifySite). Errors: shopify_not_connected (only the merchant can install and connect the app; next_action has the step), terms_incomplete (problems lists the missing plan facts; next_action names the call that sets them), fix_verification_failed, platform_error (Shopify refused the write). In test mode it acts on test-mode sites, whose connected store is written the same way.
2860
+ *
2861
+ * @param site Unique identifier of the site (site_…).
2862
+ * @see POST /v1/sites/{site}/fixes/shopify/publish (operation `publishShopifyTerms`, scope `fixes:write`, live mode needs an activated account)
2863
+ */
2864
+ publishShopifyTerms(site: string, params?: T.PublishShopifyTermsParams, options?: RequestOptions): Promise<T.ShopifyTermsPublication>;
2751
2865
  }
2752
2866
  /** `checkbox.evidence` */
2753
2867
  export declare class EvidenceResource extends Resource {
@@ -2839,7 +2953,7 @@ export declare class NoticeSettingsResource extends Resource {
2839
2953
  /**
2840
2954
  * Update notice settings.
2841
2955
  *
2842
- * Chooses who sends the required emails (mode: merchant = you send them and Checkbox tracks them, the default; checkbox = Checkbox sends them), and sets branding, cancel_url and the confirmed cancellation policy. In checkbox mode, turning a notice on (enabled_kinds) requires cancel_url, a confirmed policy, a connected Stripe or Recharge account and a sending address; otherwise resource_conflict explains what is missing.
2956
+ * Chooses who sends the required emails (mode: merchant = you send them and Checkbox tracks them, the default; checkbox = Checkbox sends them), and sets branding, cancel_url and the confirmed cancellation policy. add_kinds / remove_kinds turn single notices on or off and leave the others as they are; enabled_kinds replaces the whole list. In checkbox mode, turning a notice on requires cancel_url, a confirmed policy, a connected Stripe, Recharge, Chargebee, Recurly or Paddle account and a sending address; otherwise resource_conflict explains what is missing.
2843
2957
  *
2844
2958
  * @param site Unique identifier of the site (site_…).
2845
2959
  * @see POST /v1/sites/{site}/notice_settings (operation `updateNoticeSettings`, scope `notices:write`, live mode needs an activated account)
@@ -2925,7 +3039,7 @@ export declare class ChecksResource extends Resource {
2925
3039
  /**
2926
3040
  * Check checkout disclosure text.
2927
3041
  *
2928
- * Checks the automatic-renewal disclosure you are about to show next to a subscribe button: what it says (renewal until canceled, price, frequency, trial, term, how to cancel), where it sits (above the button, same page) and how it looks (size, contrast, set off), and the consent checkbox (present, not pre-checked). Returns the verdict per check and per legal requirement, plus `replacement`: compliant text and drop-in HTML generated from your price/interval/trial/cancel_url and verified by the engine. Call it whenever you write or change checkout copy. Stateless and deterministic: nothing is stored, the same input on the same as_of date gives the same verdicts. Every verdict comes from the Checkbox rules engine over the legal catalog (federal ROSCA / EFTA plus the state automatic-renewal laws); the response carries rules_version, catalog_version and a disclaimer (not legal advice). Read `verdict`, then `next_action`: it tells you exactly what to change and to call the check again until verdict is pass.
3042
+ * Checks the automatic-renewal disclosure you are about to show next to a subscribe button: what it says (renewal until canceled, price, frequency, trial, term, how to cancel), where it sits (above the button, same page) and how it looks (size, contrast, set off), and the consent checkbox (present, not pre-checked). Returns the verdict per check and per legal requirement, plus `replacement`: suggested text that passes the checks and drop-in HTML (and the same markup as JSX for React) generated from your price/interval/trial/cancel_url and verified by the engine. Call it whenever you write or change checkout copy. Stateless and deterministic: nothing is stored, the same input on the same as_of date gives the same verdicts. Every verdict comes from the Checkbox rules engine over the legal catalog (federal ROSCA / EFTA plus the state automatic-renewal laws); the response carries rules_version, catalog_version and a disclaimer (not legal advice). Read `verdict`, then `next_action`: it tells you exactly what to change and to call the check again until verdict is pass.
2929
3043
  *
2930
3044
  * @see POST /v1/checks/disclosure (operation `checkDisclosure`, scope `checks:read`)
2931
3045
  */
@@ -2949,7 +3063,7 @@ export declare class ChecksResource extends Resource {
2949
3063
  /**
2950
3064
  * Check a subscription lifecycle email.
2951
3065
  *
2952
- * Checks the content of an acknowledgment (welcome) email, trial-ending reminder, renewal reminder, price-change notice, yearly terms reminder or cancellation confirmation against the requirements for that notice (renewal terms, amount, frequency, how to cancel, trial cancellation). The email is modelled as sent on time, so the verdict is about content; get send dates from checkNoticeSchedule. Returns `required_by` (requirements that make the email mandatory for this plan) and a compliant `template` with {{merge_tags}}, verified by the engine. Stateless and deterministic: nothing is stored, the same input on the same as_of date gives the same verdicts. Every verdict comes from the Checkbox rules engine over the legal catalog (federal ROSCA / EFTA plus the state automatic-renewal laws); the response carries rules_version, catalog_version and a disclaimer (not legal advice). Read `verdict`, then `next_action`: it tells you exactly what to change and to call the check again until verdict is pass.
3066
+ * Checks the content of an acknowledgment (welcome) email, trial-ending reminder, renewal reminder, price-change notice, yearly terms reminder or cancellation confirmation against the requirements for that notice (renewal terms, amount, frequency, how to cancel, trial cancellation). The email is modelled as sent on time, so the verdict is about content; get send dates from checkNoticeSchedule. Prices are judged against what Stripe charges: with `site` (or, without it, the account's one site with Stripe connected) the plan fields come from the site's plans and the email is matched to the plan it names ("Annual") first; a price that contradicts it fails, and `warnings` say which site and plan were used. Returns `required_by` (requirements that make the email mandatory for this plan) and a `template` that passes the checks, with {{merge_tags}}, verified by the engine. Stateless and deterministic: nothing is stored, the same input on the same as_of date gives the same verdicts. Every verdict comes from the Checkbox rules engine over the legal catalog (federal ROSCA / EFTA plus the state automatic-renewal laws); the response carries rules_version, catalog_version and a disclaimer (not legal advice). Read `verdict`, then `next_action`: it tells you exactly what to change and to call the check again until verdict is pass.
2953
3067
  *
2954
3068
  * @see POST /v1/checks/email (operation `checkEmail`, scope `checks:read`)
2955
3069
  */
@@ -2965,11 +3079,11 @@ export declare class ChecksResource extends Resource {
2965
3079
  /**
2966
3080
  * Get the dates each required notice must be sent.
2967
3081
  *
2968
- * For a subscription plan (price, interval, trial) and where you sell, returns every legally required notice — acknowledgment, trial-ending reminder, renewal reminders, yearly terms reminder, price-change notice — with the recommended send time and the compliant window (opens / closes), the jurisdictions each send satisfies and the citations. Uses the same timing as Checkbox Notices: per-state windows intersected, or the fewest sends that cover conflicting windows. Stateless. Check each email's content with checkEmail, or let Checkbox Notices send them.
3082
+ * For a subscription plan (price, interval, trial) and where you sell, returns every legally required notice — acknowledgment, trial-ending reminder, renewal reminders, yearly terms reminder, price-change notice — with the recommended send time and the allowed send window (opens / closes), the jurisdictions each send satisfies and the citations. Uses the same timing as Checkbox Notices: per-state windows intersected, or the fewest sends that cover conflicting windows. Stateless. Check each email's content with checkEmail, or let Checkbox Notices send them.
2969
3083
  *
2970
3084
  * @see POST /v1/checks/notice_schedule (operation `checkNoticeSchedule`, scope `checks:read`)
2971
3085
  */
2972
- noticeSchedule(params: T.NoticeScheduleParams, options?: RequestOptions): Promise<T.NoticeScheduleResult>;
3086
+ noticeSchedule(params?: T.NoticeScheduleParams, options?: RequestOptions): Promise<T.NoticeScheduleResult>;
2973
3087
  }
2974
3088
  /** `checkbox.suggestions` */
2975
3089
  export declare class SuggestionsResource extends Resource {
@@ -3108,7 +3222,7 @@ export declare class ReceiptsResource extends Resource {
3108
3222
  /**
3109
3223
  * Erase a subscriber's receipts.
3110
3224
  *
3111
- * For a subscriber's deletion request: deletes every receipt that matches customer_reference, email (hashed before the lookup) or checkout_session (optionally only for one site). The signed copy in the write-once evidence vault is kept but holds only a salted commitment to the subscriber's identifiers; erasing destroys the salt, so it can no longer be tied to the person. Pending attorney review.
3225
+ * For a subscriber's deletion request: deletes every receipt that matches customer_reference, email (hashed before the lookup) or checkout_session (optionally only for one site). The signed copy in the write-once evidence vault is kept but holds only a salted commitment to the subscriber's identifiers; erasing destroys the salt, so it can no longer be tied to the person. Ask your counsel whether this meets a deletion request in your jurisdiction.
3112
3226
  *
3113
3227
  * @see POST /v1/receipts/erase (operation `eraseReceipts`, scope `receipts:write`)
3114
3228
  */
@@ -3163,7 +3277,7 @@ export declare class ReceiptSettingsResource extends Resource {
3163
3277
  /**
3164
3278
  * Update receipt settings.
3165
3279
  *
3166
- * Turn receipts on or off and set the retention in days (default 1461 = 4 years, the California UCL limitation period; pending attorney review). A new retention applies to receipts recorded afterwards.
3280
+ * Turn receipts on or off and set the retention in days (default 1461 = 4 years: the California Unfair Competition Law limitation period; adjust to your counsel's advice). A new retention applies to receipts recorded afterwards.
3167
3281
  *
3168
3282
  * @see POST /v1/receipt_settings (operation `updateReceiptSettings`, scope `receipts:write`)
3169
3283
  */
@@ -3207,7 +3321,7 @@ export declare class StripeCheckoutConfigsResource extends Resource {
3207
3321
  /**
3208
3322
  * Register the Checkout Session params your code uses.
3209
3323
  *
3210
- * Registers exactly the object your code passes to stripe.checkout.sessions.create (customer, URLs and secrets are not needed and are ignored). Test runs mirror it into Stripe test mode; when it matches your latest live checkout, the scanned test page counts as an observation of your live checkout. Re-register after changing your checkout code, then call createTestRun.
3324
+ * Registers exactly the object your code passes to stripe.checkout.sessions.create (customer, URLs and secrets are not needed and are ignored; `warnings` says what was not stored). It is judged exactly like checkStripeCheckoutSession, discounts included. A config with the same name, or for the same Price ids, replaces the older one (`replaced`). Test runs mirror it into Stripe test mode; when it matches your latest live checkout, the scanned test page counts as an observation of your live checkout. Re-register after changing your checkout code, then call createTestRun.
3211
3325
  *
3212
3326
  * @param site Unique identifier of the site (site_…).
3213
3327
  * @see POST /v1/sites/{site}/stripe_checkout_configs (operation `createStripeCheckoutConfig`, scope `test_runs:write`)
@@ -3243,12 +3357,27 @@ export declare class StripeCheckoutConfigsResource extends Resource {
3243
3357
  /** Alias of `del()`. */
3244
3358
  delete(stripeCheckoutConfig: string, options?: RequestOptions): Promise<T.DeletedStripeCheckoutConfig>;
3245
3359
  }
3360
+ /** `checkbox.siteStripeCheckoutConfigs` */
3361
+ export declare class SiteStripeCheckoutConfigsResource extends Resource {
3362
+ /**
3363
+ * Delete a registered checkout config (site path).
3364
+ *
3365
+ * The same as deleteStripeCheckoutConfig, under the site path where configs are created and listed.
3366
+ *
3367
+ * @param site Unique identifier of the site (site_…).
3368
+ * @param stripeCheckoutConfig Unique identifier of the stripe checkout config (scc_…).
3369
+ * @see DELETE /v1/sites/{site}/stripe_checkout_configs/{stripe_checkout_config} (operation `deleteSiteStripeCheckoutConfig`, scope `test_runs:write`)
3370
+ */
3371
+ del(site: string, stripeCheckoutConfig: string, options?: RequestOptions): Promise<T.DeletedStripeCheckoutConfig>;
3372
+ /** Alias of `del()`. */
3373
+ delete(site: string, stripeCheckoutConfig: string, options?: RequestOptions): Promise<T.DeletedStripeCheckoutConfig>;
3374
+ }
3246
3375
  /** `checkbox.testRuns` */
3247
3376
  export declare class TestRunsResource extends Resource {
3248
3377
  /**
3249
3378
  * Start a lifecycle test run.
3250
3379
  *
3251
- * Starts a synthetic test subscription in TEST mode and returns it queued. Stripe runs mirror your checkout into a test-mode Checkout Session, subscribe a test customer (card 4242) whose email is a Checkbox inbox, wait for your acknowledgment, advance a test clock through every legal notice window before trial end and renewal, cancel online in the customer portal and wait for the confirmation; then delete the test clock. Takes about 5-20 minutes: poll retrieveTestRun (next_action says when) or listen for test_run.completed. Each step reports observations, check results and agent-readable fixes; apply them and run again to verify.
3380
+ * Starts a synthetic test subscription in TEST mode and returns it queued. Stripe runs mirror your checkout into a test-mode Checkout Session, subscribe a test customer (card 4242) whose email is a Checkbox inbox, wait for your acknowledgment, advance a test clock through every legal notice window before trial end and renewal, cancel online in the customer portal and wait for the confirmation; then delete the test clock. Usually takes 2-4 minutes (longer when your own emails are slow to arrive): poll retrieveTestRun (next_action says when) or listen for test_run.completed. Each step reports observations, check results and agent-readable fixes; apply them and run again to verify.
3252
3381
  *
3253
3382
  * @param site Unique identifier of the site (site_…).
3254
3383
  * @see POST /v1/sites/{site}/test_runs (operation `createTestRun`, scope `test_runs:write`, live mode needs an activated account)
@@ -3266,12 +3395,12 @@ export declare class TestRunsResource extends Resource {
3266
3395
  /**
3267
3396
  * Retrieve a test run.
3268
3397
  *
3269
- * The run with every step's status, observations, check results and fixes. While it runs, next_action.type is "wait"; when it finished, next_action says what to fix (apply_fixes / review_warnings) or "none".
3398
+ * The run with every step's status, observations, check results and fixes. While it runs, next_action.type is "wait" and waiting_for says what it waits for; ?wait=30 answers as soon as the run moves on (or after 30 seconds). When it finished, next_action says what to fix (apply_fixes / review_warnings), retrieve_plan when the only warnings have nothing to change, or "none".
3270
3399
  *
3271
3400
  * @param testRun Unique identifier of the test run (run_…).
3272
3401
  * @see GET /v1/test_runs/{test_run} (operation `retrieveTestRun`, scope `test_runs:read`)
3273
3402
  */
3274
- retrieve(testRun: string, options?: RequestOptions): Promise<T.TestRun>;
3403
+ retrieve(testRun: string, params?: T.RetrieveTestRunParams, options?: RequestOptions): Promise<T.TestRun>;
3275
3404
  /**
3276
3405
  * Cancel a test run.
3277
3406
  *
@@ -3364,11 +3493,23 @@ export declare class FeedbacksResource extends Resource {
3364
3493
  /**
3365
3494
  * Send feedback.
3366
3495
  *
3367
- * Report a problem or a missing feature in Checkbox. Include what you tried, what happened and what you expected, and the site / request id when there is one. The Checkbox team reads every message. Rate limited to 20 per key per hour.
3496
+ * Report a problem or a missing feature in Checkbox. Include what you tried, what happened and what you expected, and the site / request id when there is one. With type review, send a structured review of Checkbox the product (score 0-10, liked, disliked, wrong_verdicts, would_keep_using, stack) — only after the human said yes and saw the text. A review describes what worked or did not in Checkbox: it never states that the site broke a law or had unfixed problems, and carries no site names, URLs, customer data or quotes of the site's pages or emails (URLs are removed and no site is attached). Never include secrets or customer data: anything that looks like a secret, card number or email address is replaced with [redacted]. The Checkbox team reads every message. Rate limited to 20 per key per hour.
3368
3497
  *
3369
3498
  * @see POST /v1/feedback (operation `createFeedback`, scope `account:read`)
3370
3499
  */
3371
- create(params: T.FeedbackParams, options?: RequestOptions): Promise<T.Feedback>;
3500
+ create(params?: T.FeedbackParams, options?: RequestOptions): Promise<T.Feedback>;
3501
+ }
3502
+ /** `checkbox.reviewPrompts` */
3503
+ export declare class ReviewPromptsResource extends Resource {
3504
+ /**
3505
+ * Claim the one-time review prompt for a site.
3506
+ *
3507
+ * The MCP tools call this when a site's compliance plan reaches status compliant, i.e. checks pass (including "Checks pass · N live checks pending"). show is true exactly once per site: the agent then asks the human once whether they want to send a quick review of Checkbox (createFeedback with type review), and sends it only on a yes, after showing the text. Never send a review without the human's yes.
3508
+ *
3509
+ * @param site Unique identifier of the site (site_…).
3510
+ * @see POST /v1/sites/{site}/review_prompt (operation `claimReviewPrompt`, scope `compliance_plans:read`)
3511
+ */
3512
+ claim(site: string, params?: T.ReviewPromptParams, options?: RequestOptions): Promise<T.ReviewPrompt>;
3372
3513
  }
3373
3514
  /** Resource namespaces of the client. */
3374
3515
  export declare const RESOURCES: {
@@ -3377,6 +3518,7 @@ export declare const RESOURCES: {
3377
3518
  readonly account: typeof AccountResource;
3378
3519
  readonly sites: typeof SitesResource;
3379
3520
  readonly domainVerifications: typeof DomainVerificationsResource;
3521
+ readonly billings: typeof BillingsResource;
3380
3522
  readonly scans: typeof ScansResource;
3381
3523
  readonly evaluations: typeof EvaluationsResource;
3382
3524
  readonly findings: typeof FindingsResource;
@@ -3399,8 +3541,10 @@ export declare const RESOURCES: {
3399
3541
  readonly receiptSettings: typeof ReceiptSettingsResource;
3400
3542
  readonly testCredentials: typeof TestCredentialsResource;
3401
3543
  readonly stripeCheckoutConfigs: typeof StripeCheckoutConfigsResource;
3544
+ readonly siteStripeCheckoutConfigs: typeof SiteStripeCheckoutConfigsResource;
3402
3545
  readonly testRuns: typeof TestRunsResource;
3403
3546
  readonly webhookEndpoints: typeof WebhookEndpointsResource;
3404
3547
  readonly events: typeof EventsResource;
3405
3548
  readonly feedbacks: typeof FeedbacksResource;
3549
+ readonly reviewPrompts: typeof ReviewPromptsResource;
3406
3550
  };