@checkbox-site/node 0.1.1 → 0.2.1

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.
@@ -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";
@@ -818,6 +852,23 @@ export declare const OPERATIONS: {
818
852
  readonly paginated: false;
819
853
  readonly summary: "Revoke a certificate";
820
854
  };
855
+ readonly listNoticeSends: {
856
+ readonly operationId: "listNoticeSends";
857
+ readonly namespace: "noticeSends";
858
+ readonly method: "list";
859
+ readonly httpMethod: "GET";
860
+ readonly path: "/v1/sites/{site}/notice_sends";
861
+ readonly pathParams: readonly ["site"];
862
+ readonly queryParams: readonly ["limit", "kind", "subscription", "include_samples"];
863
+ readonly body: false;
864
+ readonly idempotent: false;
865
+ readonly auth: true;
866
+ readonly scope: "notices:read";
867
+ readonly response: "json";
868
+ readonly list: true;
869
+ readonly paginated: false;
870
+ readonly summary: "List Checkbox Notices sends";
871
+ };
821
872
  readonly retrieveNoticeSettings: {
822
873
  readonly operationId: "retrieveNoticeSettings";
823
874
  readonly namespace: "noticeSettings";
@@ -1566,6 +1617,23 @@ export declare const OPERATIONS: {
1566
1617
  readonly paginated: false;
1567
1618
  readonly summary: "Delete a registered checkout config";
1568
1619
  };
1620
+ readonly deleteSiteStripeCheckoutConfig: {
1621
+ readonly operationId: "deleteSiteStripeCheckoutConfig";
1622
+ readonly namespace: "siteStripeCheckoutConfigs";
1623
+ readonly method: "del";
1624
+ readonly httpMethod: "DELETE";
1625
+ readonly path: "/v1/sites/{site}/stripe_checkout_configs/{stripe_checkout_config}";
1626
+ readonly pathParams: readonly ["site", "stripe_checkout_config"];
1627
+ readonly queryParams: readonly [];
1628
+ readonly body: false;
1629
+ readonly idempotent: false;
1630
+ readonly auth: true;
1631
+ readonly scope: "test_runs:write";
1632
+ readonly response: "json";
1633
+ readonly list: false;
1634
+ readonly paginated: false;
1635
+ readonly summary: "Delete a registered checkout config (site path)";
1636
+ };
1569
1637
  readonly createTestRun: {
1570
1638
  readonly operationId: "createTestRun";
1571
1639
  readonly namespace: "testRuns";
@@ -1607,7 +1675,7 @@ export declare const OPERATIONS: {
1607
1675
  readonly httpMethod: "GET";
1608
1676
  readonly path: "/v1/test_runs/{test_run}";
1609
1677
  readonly pathParams: readonly ["test_run"];
1610
- readonly queryParams: readonly [];
1678
+ readonly queryParams: readonly ["wait"];
1611
1679
  readonly body: false;
1612
1680
  readonly idempotent: false;
1613
1681
  readonly auth: true;
@@ -1787,6 +1855,23 @@ export declare const OPERATIONS: {
1787
1855
  readonly paginated: false;
1788
1856
  readonly summary: "Send feedback";
1789
1857
  };
1858
+ readonly claimReviewPrompt: {
1859
+ readonly operationId: "claimReviewPrompt";
1860
+ readonly namespace: "reviewPrompts";
1861
+ readonly method: "claim";
1862
+ readonly httpMethod: "POST";
1863
+ readonly path: "/v1/sites/{site}/review_prompt";
1864
+ readonly pathParams: readonly ["site"];
1865
+ readonly queryParams: readonly [];
1866
+ readonly body: true;
1867
+ readonly idempotent: false;
1868
+ readonly auth: true;
1869
+ readonly scope: "compliance_plans:read";
1870
+ readonly response: "json";
1871
+ readonly list: false;
1872
+ readonly paginated: false;
1873
+ readonly summary: "Claim the one-time review prompt for a site";
1874
+ };
1790
1875
  };
1791
1876
  export interface OperationSpec {
1792
1877
  operationId: string;
@@ -1912,6 +1997,12 @@ export interface OperationTypes {
1912
1997
  };
1913
1998
  response: T.DomainVerification;
1914
1999
  };
2000
+ resyncBilling: {
2001
+ args: {
2002
+ site: string;
2003
+ };
2004
+ response: T.BillingSync;
2005
+ };
1915
2006
  createScan: {
1916
2007
  args: {
1917
2008
  site: string;
@@ -1988,7 +2079,7 @@ export interface OperationTypes {
1988
2079
  args: {
1989
2080
  task: string;
1990
2081
  } & T.AnswerTaskParams;
1991
- response: T.Task;
2082
+ response: T.AnsweredTask;
1992
2083
  };
1993
2084
  verifyTask: {
1994
2085
  args: {
@@ -2026,6 +2117,12 @@ export interface OperationTypes {
2026
2117
  } & T.ListSiteFixesParams;
2027
2118
  response: T.FixList;
2028
2119
  };
2120
+ publishShopifyTerms: {
2121
+ args: {
2122
+ site: string;
2123
+ } & T.PublishShopifyTermsParams;
2124
+ response: T.ShopifyTermsPublication;
2125
+ };
2029
2126
  listEvidence: {
2030
2127
  args: T.ListEvidenceParams;
2031
2128
  response: T.EvidenceList;
@@ -2070,6 +2167,12 @@ export interface OperationTypes {
2070
2167
  } & T.RevokeCertificateParams;
2071
2168
  response: T.Certificate;
2072
2169
  };
2170
+ listNoticeSends: {
2171
+ args: {
2172
+ site: string;
2173
+ } & T.ListNoticeSendsParams;
2174
+ response: T.NoticeSendList;
2175
+ };
2073
2176
  retrieveNoticeSettings: {
2074
2177
  args: {
2075
2178
  site: string;
@@ -2291,6 +2394,13 @@ export interface OperationTypes {
2291
2394
  };
2292
2395
  response: T.DeletedStripeCheckoutConfig;
2293
2396
  };
2397
+ deleteSiteStripeCheckoutConfig: {
2398
+ args: {
2399
+ site: string;
2400
+ stripe_checkout_config: string;
2401
+ };
2402
+ response: T.DeletedStripeCheckoutConfig;
2403
+ };
2294
2404
  createTestRun: {
2295
2405
  args: {
2296
2406
  site: string;
@@ -2306,7 +2416,7 @@ export interface OperationTypes {
2306
2416
  retrieveTestRun: {
2307
2417
  args: {
2308
2418
  test_run: string;
2309
- };
2419
+ } & T.RetrieveTestRunParams;
2310
2420
  response: T.TestRun;
2311
2421
  };
2312
2422
  cancelTestRun: {
@@ -2361,6 +2471,12 @@ export interface OperationTypes {
2361
2471
  args: T.FeedbackParams;
2362
2472
  response: T.Feedback;
2363
2473
  };
2474
+ claimReviewPrompt: {
2475
+ args: {
2476
+ site: string;
2477
+ } & T.ReviewPromptParams;
2478
+ response: T.ReviewPrompt;
2479
+ };
2364
2480
  }
2365
2481
  /** `checkbox.device` */
2366
2482
  export declare class DeviceResource extends Resource {
@@ -2420,7 +2536,7 @@ export declare class SetupSessionsResource extends Resource {
2420
2536
  /**
2421
2537
  * Re-check the site now.
2422
2538
  *
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.
2539
+ * 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
2540
  *
2425
2541
  * @param setupSession Unique identifier of the setup session (setup_…).
2426
2542
  * @see POST /v1/setup_sessions/{setup_session}/verify (operation `verifySetupSession`, scope `setup_sessions:write`)
@@ -2449,7 +2565,7 @@ export declare class AccountResource extends Resource {
2449
2565
  /**
2450
2566
  * Update the account.
2451
2567
  *
2452
- * Pins the account to an API version (requests without a Checkbox-Version header use it). Known versions: 2026-10-30.
2568
+ * 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
2569
  *
2454
2570
  * @see POST /v1/account (operation `updateAccount`, scope `account:write`)
2455
2571
  */
@@ -2476,7 +2592,7 @@ export declare class SitesResource extends Resource {
2476
2592
  /**
2477
2593
  * Retrieve a site.
2478
2594
  *
2479
- * Returns a site with its latest compliance verdict (score, status) and install details.
2595
+ * Returns a site with its latest compliance status (label and counts) and install details.
2480
2596
  *
2481
2597
  * @param site Unique identifier of the site (site_…).
2482
2598
  * @see GET /v1/sites/{site} (operation `retrieveSite`, scope `sites:read`)
@@ -2514,7 +2630,7 @@ export declare class SitesResource extends Resource {
2514
2630
  /**
2515
2631
  * Connect a billing platform.
2516
2632
  *
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.
2633
+ * Connects the site's billing platform with the one restricted key (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. Stripe: One Stripe restricted key per site: Read permissions for the checks, and Write permissions that Checkbox uses only after you click Approve on a fix, or in test mode (the one exception: Webhook Endpoints, used once to add Checkbox's webhook endpoint when you connect the key) (checklist: https://checkbox.site/docs/guides/stripe-key). A full secret key (sk_test_ / sk_live_) is refused on every path with test_key_not_restricted: use a restricted key. API keys and AI agents may connect TEST-mode keys (rk_test_…) only; a live key (rk_live_ / sk_live_) is refused with live_key_requires_dashboard, because only a person signed in to the Checkbox dashboard can connect one. The credentials are validated by reading the settings once and stored encrypted. When the key's Stripe account looks like another site's (the site's prices or Payment Links are not in it, or it is already connected in another workspace), nothing is connected and the error billing_account_mismatch asks the human to confirm; retry with confirm_account_mismatch: true only after they said yes. The account owner is emailed about every key connected.
2518
2634
  *
2519
2635
  * @param site Unique identifier of the site (site_…).
2520
2636
  * @see POST /v1/sites/{site}/integrations (operation `connectBillingPlatform`, scope `sites:write`)
@@ -2553,13 +2669,25 @@ export declare class DomainVerificationsResource extends Resource {
2553
2669
  /**
2554
2670
  * Check domain verification now.
2555
2671
  *
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.
2672
+ * 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
2673
  *
2558
2674
  * @param site Unique identifier of the site (site_…).
2559
2675
  * @see POST /v1/sites/{site}/domain_verification/check (operation `checkDomainVerification`, scope `sites:write`)
2560
2676
  */
2561
2677
  check(site: string, options?: RequestOptions): Promise<T.DomainVerification>;
2562
2678
  }
2679
+ /** `checkbox.billings` */
2680
+ export declare class BillingsResource extends Resource {
2681
+ /**
2682
+ * Re-sync Stripe settings.
2683
+ *
2684
+ * 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.
2685
+ *
2686
+ * @param site Unique identifier of the site (site_…).
2687
+ * @see POST /v1/sites/{site}/billing/resync (operation `resyncBilling`, scope `sites:write`)
2688
+ */
2689
+ resync(site: string, options?: RequestOptions): Promise<T.BillingSync>;
2690
+ }
2563
2691
  /** `checkbox.scans` */
2564
2692
  export declare class ScansResource extends Resource {
2565
2693
  /**
@@ -2603,7 +2731,7 @@ export declare class EvaluationsResource extends Resource {
2603
2731
  /**
2604
2732
  * List evaluations.
2605
2733
  *
2606
- * Verdicts newest first (score history), optionally for one site.
2734
+ * Verdicts newest first (status history), optionally for one site.
2607
2735
  *
2608
2736
  * @see GET /v1/evaluations (operation `listEvaluations`, scope `evaluations:read`)
2609
2737
  */
@@ -2620,7 +2748,7 @@ export declare class EvaluationsResource extends Resource {
2620
2748
  /**
2621
2749
  * Get the current verdict of a site.
2622
2750
  *
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.
2751
+ * 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
2752
  *
2625
2753
  * @param site Unique identifier of the site (site_…).
2626
2754
  * @see GET /v1/sites/{site}/evaluation (operation `retrieveLatestEvaluation`, scope `evaluations:read`)
@@ -2632,7 +2760,7 @@ export declare class FindingsResource extends Resource {
2632
2760
  /**
2633
2761
  * List findings.
2634
2762
  *
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.
2763
+ * 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
2764
  *
2637
2765
  * @see GET /v1/findings (operation `listFindings`, scope `findings:read`)
2638
2766
  */
@@ -2661,7 +2789,7 @@ export declare class PlansResource extends Resource {
2661
2789
  /**
2662
2790
  * Get the compliance plan for a site.
2663
2791
  *
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.
2792
+ * 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
2793
  *
2666
2794
  * @param site Unique identifier of the site (site_…).
2667
2795
  * @see GET /v1/sites/{site}/plan (operation `retrieveCompliancePlan`, scope `compliance_plans:read`)
@@ -2696,7 +2824,7 @@ export declare class TasksResource extends Resource {
2696
2824
  * @param task Unique identifier of the task (task_…).
2697
2825
  * @see POST /v1/tasks/{task}/answer (operation `answerTask`, scope `compliance_plans:write`)
2698
2826
  */
2699
- answer(task: string, params: T.AnswerTaskParams, options?: RequestOptions): Promise<T.Task>;
2827
+ answer(task: string, params: T.AnswerTaskParams, options?: RequestOptions): Promise<T.AnsweredTask>;
2700
2828
  /**
2701
2829
  * Verify a task after applying its change.
2702
2830
  *
@@ -2712,7 +2840,7 @@ export declare class VerificationsResource extends Resource {
2712
2840
  /**
2713
2841
  * Get a verification (long-poll with ?wait=30).
2714
2842
  *
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.
2843
+ * 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
2844
  *
2717
2845
  * @param verification Unique identifier of the verification (ver_…).
2718
2846
  * @see GET /v1/verifications/{verification} (operation `retrieveVerification`, scope `compliance_plans:read`)
@@ -2748,6 +2876,15 @@ export declare class FixesResource extends Resource {
2748
2876
  * @see GET /v1/sites/{site}/fixes (operation `listSiteFixes`, scope `fixes:read`)
2749
2877
  */
2750
2878
  list(site: string, params?: T.ListSiteFixesParams, options?: RequestOptions): Promise<T.FixList>;
2879
+ /**
2880
+ * Publish the renewal terms to the Shopify app block.
2881
+ *
2882
+ * 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.
2883
+ *
2884
+ * @param site Unique identifier of the site (site_…).
2885
+ * @see POST /v1/sites/{site}/fixes/shopify/publish (operation `publishShopifyTerms`, scope `fixes:write`, live mode needs an activated account)
2886
+ */
2887
+ publishShopifyTerms(site: string, params?: T.PublishShopifyTermsParams, options?: RequestOptions): Promise<T.ShopifyTermsPublication>;
2751
2888
  }
2752
2889
  /** `checkbox.evidence` */
2753
2890
  export declare class EvidenceResource extends Resource {
@@ -2825,6 +2962,18 @@ export declare class CertificatesResource extends Resource {
2825
2962
  */
2826
2963
  revoke(certificate: string, params: T.RevokeCertificateParams, options?: RequestOptions): Promise<T.Certificate>;
2827
2964
  }
2965
+ /** `checkbox.noticeSends` */
2966
+ export declare class NoticeSendsResource extends Resource {
2967
+ /**
2968
+ * List Checkbox Notices sends.
2969
+ *
2970
+ * Read-only: the emails Checkbox Notices sent, or tried to send, for this site (newest first), with status and, for a failed or skipped send, why. A test run's email steps name these rows (notices_send_log). Samples ("Send a test") are left out unless include_samples=true.
2971
+ *
2972
+ * @param site Unique identifier of the site (site_…).
2973
+ * @see GET /v1/sites/{site}/notice_sends (operation `listNoticeSends`, scope `notices:read`)
2974
+ */
2975
+ list(site: string, params?: T.ListNoticeSendsParams, options?: RequestOptions): Promise<T.NoticeSendList>;
2976
+ }
2828
2977
  /** `checkbox.noticeSettings` */
2829
2978
  export declare class NoticeSettingsResource extends Resource {
2830
2979
  /**
@@ -2839,7 +2988,7 @@ export declare class NoticeSettingsResource extends Resource {
2839
2988
  /**
2840
2989
  * Update notice settings.
2841
2990
  *
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.
2991
+ * 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 support email, a connected Stripe, Recharge, Chargebee, Recurly or Paddle account and a sending address; otherwise resource_conflict explains what is missing. The support email may be the Stripe account's public one (used automatically); the account owner's login address only after the human confirms it in the dashboard (support_email_to_confirm; an agent cannot confirm it). Turning notices on through the API never emails a real subscriber: on a test-mode site only test-run inboxes (and marked test copies to the owner) are emailed, and on a live site real subscribers are emailed only after a person confirms it once in the dashboard, after a preview (real_sends). The account owner is emailed when an agent turns notices on.
2843
2992
  *
2844
2993
  * @param site Unique identifier of the site (site_…).
2845
2994
  * @see POST /v1/sites/{site}/notice_settings (operation `updateNoticeSettings`, scope `notices:write`, live mode needs an activated account)
@@ -2925,7 +3074,7 @@ export declare class ChecksResource extends Resource {
2925
3074
  /**
2926
3075
  * Check checkout disclosure text.
2927
3076
  *
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.
3077
+ * 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
3078
  *
2930
3079
  * @see POST /v1/checks/disclosure (operation `checkDisclosure`, scope `checks:read`)
2931
3080
  */
@@ -2949,7 +3098,7 @@ export declare class ChecksResource extends Resource {
2949
3098
  /**
2950
3099
  * Check a subscription lifecycle email.
2951
3100
  *
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.
3101
+ * 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 and without a price in terms, 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. Without `site`, a price you send in terms is judged as sent; when it differs from every plan of that site, the result is at most needs_review and Next is update_setup (update the site's plans first). 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
3102
  *
2954
3103
  * @see POST /v1/checks/email (operation `checkEmail`, scope `checks:read`)
2955
3104
  */
@@ -2965,11 +3114,11 @@ export declare class ChecksResource extends Resource {
2965
3114
  /**
2966
3115
  * Get the dates each required notice must be sent.
2967
3116
  *
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.
3117
+ * 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
3118
  *
2970
3119
  * @see POST /v1/checks/notice_schedule (operation `checkNoticeSchedule`, scope `checks:read`)
2971
3120
  */
2972
- noticeSchedule(params: T.NoticeScheduleParams, options?: RequestOptions): Promise<T.NoticeScheduleResult>;
3121
+ noticeSchedule(params?: T.NoticeScheduleParams, options?: RequestOptions): Promise<T.NoticeScheduleResult>;
2973
3122
  }
2974
3123
  /** `checkbox.suggestions` */
2975
3124
  export declare class SuggestionsResource extends Resource {
@@ -3108,7 +3257,7 @@ export declare class ReceiptsResource extends Resource {
3108
3257
  /**
3109
3258
  * Erase a subscriber's receipts.
3110
3259
  *
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.
3260
+ * 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
3261
  *
3113
3262
  * @see POST /v1/receipts/erase (operation `eraseReceipts`, scope `receipts:write`)
3114
3263
  */
@@ -3163,7 +3312,7 @@ export declare class ReceiptSettingsResource extends Resource {
3163
3312
  /**
3164
3313
  * Update receipt settings.
3165
3314
  *
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.
3315
+ * 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
3316
  *
3168
3317
  * @see POST /v1/receipt_settings (operation `updateReceiptSettings`, scope `receipts:write`)
3169
3318
  */
@@ -3174,7 +3323,7 @@ export declare class TestCredentialsResource extends Resource {
3174
3323
  /**
3175
3324
  * Store a billing test-mode key.
3176
3325
  *
3177
- * Stores the site's Stripe TEST-mode key (rk_test_… preferred) used by test runs, after checking it with Stripe. Live keys are refused (test_key_not_test_mode). Least privilege: Write on Customers, Checkout Sessions, Subscriptions, Test clocks and Customer portal; Read on Prices, Products and Billing portal configuration. Replaces an existing key. Next: createTestRun.
3326
+ * Stores the site's Stripe TEST-mode restricted key (rk_test_…), after checking it with Stripe the way the dashboard's Connect Stripe does. An agent may call this itself once the owner approved the setup; every store is logged on the site's setup timeline and Billing connection line, and the human can revoke it in one click. Live keys are refused (test_key_not_test_mode: a human adds live keys in the dashboard); a key whose Stripe account looks like another site's is refused with billing_account_mismatch until the human confirms (confirm_account_mismatch: true); secret keys (sk_test_…) are refused (test_key_not_restricted). On a test-mode site without a Stripe connection the key also becomes the site's Stripe connection: one key for checks, fixes (only after the human approves each) and test runs. The key's checklist: Customers: Write, Products: Read, Prices: Read, Coupons: Read, Subscriptions: Write, Test clocks: Write, Customer portal: Write, Checkout Sessions: Write, Payment Links: Write, Webhook Endpoints: Write. Replaces an existing key. Next: createTestRun.
3178
3327
  *
3179
3328
  * @param site Unique identifier of the site (site_…).
3180
3329
  * @see POST /v1/sites/{site}/test_credentials (operation `createTestCredential`, scope `test_runs:write`)
@@ -3207,7 +3356,7 @@ export declare class StripeCheckoutConfigsResource extends Resource {
3207
3356
  /**
3208
3357
  * Register the Checkout Session params your code uses.
3209
3358
  *
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.
3359
+ * 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
3360
  *
3212
3361
  * @param site Unique identifier of the site (site_…).
3213
3362
  * @see POST /v1/sites/{site}/stripe_checkout_configs (operation `createStripeCheckoutConfig`, scope `test_runs:write`)
@@ -3243,12 +3392,27 @@ export declare class StripeCheckoutConfigsResource extends Resource {
3243
3392
  /** Alias of `del()`. */
3244
3393
  delete(stripeCheckoutConfig: string, options?: RequestOptions): Promise<T.DeletedStripeCheckoutConfig>;
3245
3394
  }
3395
+ /** `checkbox.siteStripeCheckoutConfigs` */
3396
+ export declare class SiteStripeCheckoutConfigsResource extends Resource {
3397
+ /**
3398
+ * Delete a registered checkout config (site path).
3399
+ *
3400
+ * The same as deleteStripeCheckoutConfig, under the site path where configs are created and listed.
3401
+ *
3402
+ * @param site Unique identifier of the site (site_…).
3403
+ * @param stripeCheckoutConfig Unique identifier of the stripe checkout config (scc_…).
3404
+ * @see DELETE /v1/sites/{site}/stripe_checkout_configs/{stripe_checkout_config} (operation `deleteSiteStripeCheckoutConfig`, scope `test_runs:write`)
3405
+ */
3406
+ del(site: string, stripeCheckoutConfig: string, options?: RequestOptions): Promise<T.DeletedStripeCheckoutConfig>;
3407
+ /** Alias of `del()`. */
3408
+ delete(site: string, stripeCheckoutConfig: string, options?: RequestOptions): Promise<T.DeletedStripeCheckoutConfig>;
3409
+ }
3246
3410
  /** `checkbox.testRuns` */
3247
3411
  export declare class TestRunsResource extends Resource {
3248
3412
  /**
3249
3413
  * Start a lifecycle test run.
3250
3414
  *
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.
3415
+ * 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
3416
  *
3253
3417
  * @param site Unique identifier of the site (site_…).
3254
3418
  * @see POST /v1/sites/{site}/test_runs (operation `createTestRun`, scope `test_runs:write`, live mode needs an activated account)
@@ -3266,12 +3430,12 @@ export declare class TestRunsResource extends Resource {
3266
3430
  /**
3267
3431
  * Retrieve a test run.
3268
3432
  *
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".
3433
+ * 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
3434
  *
3271
3435
  * @param testRun Unique identifier of the test run (run_…).
3272
3436
  * @see GET /v1/test_runs/{test_run} (operation `retrieveTestRun`, scope `test_runs:read`)
3273
3437
  */
3274
- retrieve(testRun: string, options?: RequestOptions): Promise<T.TestRun>;
3438
+ retrieve(testRun: string, params?: T.RetrieveTestRunParams, options?: RequestOptions): Promise<T.TestRun>;
3275
3439
  /**
3276
3440
  * Cancel a test run.
3277
3441
  *
@@ -3364,11 +3528,23 @@ export declare class FeedbacksResource extends Resource {
3364
3528
  /**
3365
3529
  * Send feedback.
3366
3530
  *
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.
3531
+ * 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
3532
  *
3369
3533
  * @see POST /v1/feedback (operation `createFeedback`, scope `account:read`)
3370
3534
  */
3371
- create(params: T.FeedbackParams, options?: RequestOptions): Promise<T.Feedback>;
3535
+ create(params?: T.FeedbackParams, options?: RequestOptions): Promise<T.Feedback>;
3536
+ }
3537
+ /** `checkbox.reviewPrompts` */
3538
+ export declare class ReviewPromptsResource extends Resource {
3539
+ /**
3540
+ * Claim the one-time review prompt for a site.
3541
+ *
3542
+ * 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.
3543
+ *
3544
+ * @param site Unique identifier of the site (site_…).
3545
+ * @see POST /v1/sites/{site}/review_prompt (operation `claimReviewPrompt`, scope `compliance_plans:read`)
3546
+ */
3547
+ claim(site: string, params?: T.ReviewPromptParams, options?: RequestOptions): Promise<T.ReviewPrompt>;
3372
3548
  }
3373
3549
  /** Resource namespaces of the client. */
3374
3550
  export declare const RESOURCES: {
@@ -3377,6 +3553,7 @@ export declare const RESOURCES: {
3377
3553
  readonly account: typeof AccountResource;
3378
3554
  readonly sites: typeof SitesResource;
3379
3555
  readonly domainVerifications: typeof DomainVerificationsResource;
3556
+ readonly billings: typeof BillingsResource;
3380
3557
  readonly scans: typeof ScansResource;
3381
3558
  readonly evaluations: typeof EvaluationsResource;
3382
3559
  readonly findings: typeof FindingsResource;
@@ -3386,6 +3563,7 @@ export declare const RESOURCES: {
3386
3563
  readonly fixes: typeof FixesResource;
3387
3564
  readonly evidence: typeof EvidenceResource;
3388
3565
  readonly certificates: typeof CertificatesResource;
3566
+ readonly noticeSends: typeof NoticeSendsResource;
3389
3567
  readonly noticeSettings: typeof NoticeSettingsResource;
3390
3568
  readonly notices: typeof NoticesResource;
3391
3569
  readonly lawUpdates: typeof LawUpdatesResource;
@@ -3399,8 +3577,10 @@ export declare const RESOURCES: {
3399
3577
  readonly receiptSettings: typeof ReceiptSettingsResource;
3400
3578
  readonly testCredentials: typeof TestCredentialsResource;
3401
3579
  readonly stripeCheckoutConfigs: typeof StripeCheckoutConfigsResource;
3580
+ readonly siteStripeCheckoutConfigs: typeof SiteStripeCheckoutConfigsResource;
3402
3581
  readonly testRuns: typeof TestRunsResource;
3403
3582
  readonly webhookEndpoints: typeof WebhookEndpointsResource;
3404
3583
  readonly events: typeof EventsResource;
3405
3584
  readonly feedbacks: typeof FeedbacksResource;
3585
+ readonly reviewPrompts: typeof ReviewPromptsResource;
3406
3586
  };