@checkbox-site/node 0.2.4 → 0.2.6

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/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.2.4";
48
+ static readonly VERSION = "0.2.6";
49
49
  static readonly API_VERSION = "2026-10-30";
50
50
  static readonly errors: typeof errors;
51
51
  static readonly webhooks: Webhooks;
@@ -3323,7 +3323,7 @@ export declare class TestCredentialsResource extends Resource {
3323
3323
  /**
3324
3324
  * Store a billing test-mode key.
3325
3325
  *
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); the owner must have ticked "Let your agent store a Stripe test-mode key" on the approval page of the agent's sign-in or connection (else test_key_declined); a key whose Stripe account looks like another site's is refused with billing_account_mismatch (with confirm_account_mismatch: true the key is connected on hold until a person confirms the account in the dashboard; only a person can confirm it); 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.
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); the owner must have ticked the box “Let your agent store a Stripe test-mode restricted key for this project” (agent sign-in) or “Let this app store a Stripe test-mode restricted key for your sites” (app connection) (checkbox id consent-stripe-test-key) on the approval page of the agent's sign-in or connection (else test_key_declined); a key whose Stripe account looks like another site's is refused with billing_account_mismatch (with confirm_account_mismatch: true the key is connected on hold until a person confirms the account in the dashboard; only a person can confirm it); 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.
3327
3327
  *
3328
3328
  * @param site Unique identifier of the site (site_…).
3329
3329
  * @see POST /v1/sites/{site}/test_credentials (operation `createTestCredential`, scope `test_runs:write`)
@@ -2895,7 +2895,7 @@ export class TestCredentialsResource extends Resource {
2895
2895
  /**
2896
2896
  * Store a billing test-mode key.
2897
2897
  *
2898
- * 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); the owner must have ticked "Let your agent store a Stripe test-mode key" on the approval page of the agent's sign-in or connection (else test_key_declined); a key whose Stripe account looks like another site's is refused with billing_account_mismatch (with confirm_account_mismatch: true the key is connected on hold until a person confirms the account in the dashboard; only a person can confirm it); 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.
2898
+ * 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); the owner must have ticked the box “Let your agent store a Stripe test-mode restricted key for this project” (agent sign-in) or “Let this app store a Stripe test-mode restricted key for your sites” (app connection) (checkbox id consent-stripe-test-key) on the approval page of the agent's sign-in or connection (else test_key_declined); a key whose Stripe account looks like another site's is refused with billing_account_mismatch (with confirm_account_mismatch: true the key is connected on hold until a person confirms the account in the dashboard; only a person can confirm it); 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.
2899
2899
  *
2900
2900
  * @param site Unique identifier of the site (site_…).
2901
2901
  * @see POST /v1/sites/{site}/test_credentials (operation `createTestCredential`, scope `test_runs:write`)
@@ -255,6 +255,28 @@ export type UnverifiedScan = {
255
255
  /** What an unverified scan is (show it with the results). */
256
256
  note: string;
257
257
  } | null;
258
+ /** Test mode only: the steps left before real customers are covered, with who takes each (the compliance plan's go_live). When next_action is done, report "set up in test mode; N steps before real customers" (go_live.summary), never a plain done. Null in live mode or before the first checks. */
259
+ export type GoLive = {
260
+ /** Everything Checkbox observed came from Stripe test mode. */
261
+ mode: "test";
262
+ /** Heading. */
263
+ title: string;
264
+ /** One sentence before the steps. */
265
+ lead: string;
266
+ /** The steps, in order. */
267
+ steps: Array<{
268
+ /** Stable step key. */
269
+ key: "verify_domain" | "stripe_terms_url" | "live_stripe_key" | "live_checkout" | "promote_site";
270
+ /** Who takes the step: person (only the owner can: DNS, the Stripe Dashboard, live keys) or agent (a code change). */
271
+ who: "person" | "agent";
272
+ /** The step in plain words. */
273
+ text: string;
274
+ /** Where the person does it, when there is one fixed place. */
275
+ url?: string;
276
+ }>;
277
+ /** What the agent tells the person instead of "done": set up in test mode, N steps left before real customers. */
278
+ summary: string;
279
+ } | null;
258
280
  /** One step of the setup checklist. */
259
281
  export interface SetupStep {
260
282
  /** Stable step key. */
@@ -388,7 +410,7 @@ export interface SetupSession {
388
410
  }>;
389
411
  /** Stripe test mode for lifecycle test runs. */
390
412
  stripe: {
391
- /** Whether the human ticked “Let your agent store a Stripe test-mode key” on the approval page (device login or OAuth connection). False: the agent may not store one (createTestCredential answers test_key_declined); the human adds it in the dashboard. Sessions started with a key the human made in the dashboard: true. */
413
+ /** Whether the human ticked the box “Let your agent store a Stripe test-mode restricted key for this project” (agent sign-in) or “Let this app store a Stripe test-mode restricted key for your sites” (app connection) (checkbox id consent-stripe-test-key) on the approval page (device login or OAuth connection). False: the agent may not store one (createTestCredential answers test_key_declined); the human adds it in the dashboard. Sessions started with a key the human made in the dashboard: true. */
392
414
  test_key_consent: boolean;
393
415
  /** Hint of the restricted test key the CLI found (never the key). */
394
416
  test_key_hint: string | null;
@@ -456,8 +478,10 @@ export interface SetupSession {
456
478
  }>;
457
479
  /** Latest verdict of the test-mode site. */
458
480
  compliance: {
459
- /** When it was evaluated. Unix timestamp in seconds. */
481
+ /** When it was evaluated (Unix seconds; a time, not a count). Unix timestamp in seconds. */
460
482
  evaluated: number;
483
+ /** The same time as evaluated, in ISO 8601. */
484
+ evaluated_at: string;
461
485
  /**
462
486
  * Deprecated: open failing findings (per check). Read `label` (counted in tasks) and `todo` instead.
463
487
  * @deprecated
@@ -503,6 +527,7 @@ export interface SetupSession {
503
527
  }>;
504
528
  } | null;
505
529
  unverified_scan: UnverifiedScan;
530
+ go_live: GoLive;
506
531
  /** The setup checklist, in order. */
507
532
  steps: Array<SetupStep>;
508
533
  next_action: SetupNextAction;
@@ -573,13 +598,15 @@ export interface SetupSessionUpdate {
573
598
  env_file?: string;
574
599
  /** Static files directory (for /.well-known). */
575
600
  public_dir?: string;
601
+ /** The email library the project sends with (nodemailer, resend, @sendgrid/mail…), or "none" when nothing in it sends email (a static site): the plan then offers Checkbox Notices first for the required emails. */
602
+ mailer?: string;
576
603
  /** Where checkout sessions / payment links are created: an ARRAY of { file, kind, line?, snippet? } objects, one per place (not a string), e.g. [{"file": "app.py", "line": 40, "kind": "stripe_checkout_session"}]. */
577
604
  checkout_code?: Array<SetupCodeRef>;
578
605
  /** Where the subscribe / pay buttons are rendered. */
579
606
  pay_buttons?: Array<SetupCodeRef>;
580
607
  };
581
- /** File the snippet tag was added to. */
582
- snippet_installed_in?: string;
608
+ /** File the snippet tag was added to, or a list of files (e.g. ["app/layout.tsx", "app/account/layout.tsx"]). */
609
+ snippet_installed_in?: string | Array<string>;
583
610
  /** File the API keys were written to (never committed). */
584
611
  env_written?: string;
585
612
  /** Live-mode site (site_…) you created with the live key, so the checklist tracks its domain verification. */
@@ -650,6 +677,9 @@ export interface SetupVerification {
650
677
  /** Why not (limits: one per site per 24 h, three unverified sites per account in 30 days). */
651
678
  reason: string | null;
652
679
  } | null;
680
+ next_action: SetupNextAction;
681
+ /** The same as setup_session.steps, at the top level: the setup checklist, in order. */
682
+ steps: Array<SetupStep>;
653
683
  setup_session: SetupSession;
654
684
  }
655
685
  /** Account default retention (sites without their own setting use it). */
@@ -1689,7 +1719,7 @@ export interface Task {
1689
1719
  /** What Checkbox must observe for the task to be done. */
1690
1720
  expected: string;
1691
1721
  };
1692
- /** What Checkbox needs before it can give the exact change (observation: it has not seen the page / email yet; facts: plan, price, cancel URL or merchant name). The title stays the same either way. */
1722
+ /** What Checkbox needs before it can give the exact change or verify it (observation: it has not seen the page / email yet; facts: plan, price, cancel URL or merchant name; verify_domain: the site's domain is not verified yet, so Checkbox cannot visit it to verify this task: do the verify_domain task first). The title stays the same either way. */
1693
1723
  blocked_on: string | null;
1694
1724
  /** Done / declined tasks: verified (its checks pass), no_longer_applicable (its checks no longer apply, e.g. the data source changed), superseded, declined, decided (the owner confirmed a decision, e.g. New York notices by email only: closed, but its checks are not verified). */
1695
1725
  closed_reason: "verified" | "no_longer_applicable" | "superseded" | "declined" | "decided" | null;
@@ -1764,8 +1794,10 @@ export interface CompliancePlan {
1764
1794
  livemode: boolean;
1765
1795
  /** The site. */
1766
1796
  site: string;
1767
- /** action_required (an agent can apply open tasks now), verifying (changes applied; waiting for confirming observations), compliant (every required check passes or only waits for a live check — an automated assessment, not a legal determination; see compliance.pending_live_checks and coverage), blocked (only human answers ("Your call") or declined critical tasks remain). */
1797
+ /** action_required (an agent can apply open tasks now), verifying (changes applied; waiting for confirming observations), compliant (every required check passes or only waits for a live check — an automated assessment, not a legal determination; see compliance.pending_live_checks and coverage), blocked (only human answers ("Your call") or declined critical tasks remain). The value "compliant" is kept so published SDKs keep working; prefer checks_status ("checks_pass") and show status_label to people: never tell anyone the site "is compliant". */
1768
1798
  status: "action_required" | "verifying" | "compliant" | "blocked";
1799
+ /** The same as status, with "checks_pass" in place of the older value "compliant" (every required check passes or only waits for a live check: an automated assessment, not a legal determination). Read this one in new code. */
1800
+ checks_status?: "action_required" | "verifying" | "checks_pass" | "blocked";
1769
1801
  /** The plan status in words to show a person, from the same counts as the summary ("1 fix needed · 2 to set up", "1 decision for you"; else action_required "Fixes needed", blocked "Your call"), "Checks still running (N)" while checks are still running (verifying), compliant "Checks pass"; while an agent works the site and everything left waits for a deploy or the owner (next_action done_for_now): "Waiting on deploy and you" or "Waiting on deploy". Show this, never the machine value (`compliant` is a status name, not a legal conclusion). */
1770
1802
  status_label?: string;
1771
1803
  /** The evaluation the plan was built from (null before the first check). */
@@ -1837,6 +1869,7 @@ export interface CompliancePlan {
1837
1869
  on_answer: Record<string, string>;
1838
1870
  }>;
1839
1871
  };
1872
+ go_live?: GoLive;
1840
1873
  /** Evidence level per required email kind. A plan never reaches status compliant on template_checked emails. */
1841
1874
  email_verification: Array<{
1842
1875
  /** Email kind (acknowledgment, trial_ending, renewal_reminder, annual_terms, charge_notice, price_change, cancellation_confirmation). */
@@ -1899,7 +1932,7 @@ export interface VerificationCheck {
1899
1932
  check_id: string;
1900
1933
  /** Status the task needs. */
1901
1934
  expected: string;
1902
- /** Status observed (pass, fail, needs_review, not_applicable, unknown). */
1935
+ /** Status observed (pass, fail, needs_review, missing_data, not_checked, not_applicable, unknown, or informational: a note on a part that is not yours to change, such as Stripe's own hosted page layout; it never holds a verification back). */
1903
1936
  observed: string;
1904
1937
  /** Where the observation comes from: evaluation, static_fetch, html, stripe_params, email, policy_fetch. */
1905
1938
  source: string;
@@ -1920,8 +1953,17 @@ export interface Verification {
1920
1953
  task: string | null;
1921
1954
  /** One task or the whole site. */
1922
1955
  scope: "task" | "site";
1923
- /** pending (waiting for the confirming scan / re-evaluation), passed (Checkbox observed the expected result: every check passes or does not apply), passed_with_gaps (nothing observed fails, but some checks could not be observed: observed missing_data — not verified), passed_with_notes (nothing observed fails and the task counts as passing, but a check is still needs_review on a part that is not yours to change, such as Stripe's own page layout: see checks), not_checked (a task whose checks could only not be observed yet: nothing to change in the code; next_action says what evidence to provide), pending_live_check (an email whose content passes but that Checkbox has not seen sent for a real event yet: nothing to change; it completes on the first real send or a proof run), failed (it did not: see diff). */
1924
- status: "pending" | "passed" | "passed_with_gaps" | "passed_with_notes" | "not_checked" | "pending_live_check" | "failed";
1956
+ /** pending (waiting for the confirming scan / re-evaluation), passed (Checkbox observed the expected result: every check passes or does not apply), passed_with_gaps (nothing observed fails, but some checks could not be observed: observed missing_data — not verified), passed_with_notes (nothing observed fails and the task counts as passing, but a check is still needs_review on a part that is not yours to change, such as Stripe's own page layout: see checks), not_checked (a task whose checks could only not be observed yet: nothing to change in the code; next_action says what evidence to provide), pending_live_check (an email whose content passes but that Checkbox has not seen sent for a real event yet: nothing to change; it completes on the first real send or a proof run), needs_review (nothing observed fails, but a check is still undecided, e.g. a cancellation not tried yet or a styling estimate: not done; next_action says what decides it), failed (a check was observed failing: see diff), superseded (this verification did not pass, but newer evidence, such as a test run or a later evaluation, settled the task since: see superseded and follow next_action; nothing to change for it). */
1957
+ status: "pending" | "passed" | "passed_with_gaps" | "passed_with_notes" | "not_checked" | "pending_live_check" | "needs_review" | "failed" | "superseded";
1958
+ /** Set when newer evidence settled the task after this verification finished (status superseded). */
1959
+ superseded?: {
1960
+ /** The task's status in the current plan. */
1961
+ task_status: string;
1962
+ /** What settled the task: a test run (run_…) or the latest evaluation. */
1963
+ by: string;
1964
+ /** In words: what this verification found and what settled the task since. */
1965
+ detail: string;
1966
+ } | null;
1925
1967
  /** How it was re-checked. */
1926
1968
  method: "page_fetch" | "policy_refetch" | "stripe_params" | "email_copy" | "platform_sync" | "attestation" | "evaluation" | "test_run";
1927
1969
  /** What this verification checked, in words: "the params you sent", "Checkout Sessions read from Stripe", "registered configs", "the HTML you sent", "the email copy you sent (plan …)", "the live page …, fetched now"… */
@@ -1951,7 +1993,7 @@ export interface Verification {
1951
1993
  checks: Array<{
1952
1994
  /** Check id. */
1953
1995
  check_id: string;
1954
- /** Pre-check result: pass, fail, needs_review or not_applicable. */
1996
+ /** Pre-check result: pass, fail, needs_review, not_applicable, or informational (a note on Stripe's own hosted page layout: nothing to change, never holds the verification back). */
1955
1997
  status: string;
1956
1998
  /** What the pre-check found, in one line. */
1957
1999
  reason: string;
@@ -4425,7 +4467,7 @@ export interface TestRunStep {
4425
4467
  observations: Record<string, unknown>;
4426
4468
  /** Evidence records (screenshots, page captures, raw emails) behind the step. */
4427
4469
  evidence: Array<string>;
4428
- /** Warning or failure code of the step (stable): key_missing, key_not_test_mode, key_invalid, key_permission_missing, checkout_config_missing, price_not_in_test_mode, checkout_session_failed, checkout_page_unreadable, checkout_not_completed, subscription_create_failed, test_clock_failed, no_email_received_within, reminder_not_received, portal_not_configured, cancel_not_completed, cancellation_email_not_received, checkout_url_missing, real_checkout_not_completed, payment_link_not_found, webhook_not_delivered, reminder_outside_window, reminder_timing_not_observed, cancel_flow_not_configured, cancel_not_confirmed_in_stripe, acknowledgment_content_incomplete, cancel_replaced_by_other_subscription, not_judged, scan_config_missing, domain_not_verified, scanner_failed, stripe_api_error, timeout, canceled, internal_error. */
4470
+ /** Warning or failure code of the step (stable): key_missing, key_not_test_mode, key_invalid, key_permission_missing, checkout_config_missing, price_not_in_test_mode, checkout_session_failed, checkout_page_unreadable, checkout_not_completed, subscription_create_failed, test_clock_failed, no_email_received_within, reminder_not_received, portal_not_configured, cancel_not_completed, cancellation_email_not_received, checkout_url_missing, real_checkout_not_completed, payment_link_not_found, webhook_not_delivered, reminder_outside_window, reminder_timing_not_observed, cancel_flow_not_configured, cancel_not_confirmed_in_stripe, acknowledgment_content_incomplete, required_notice_skipped, cancel_replaced_by_other_subscription, not_judged, scan_config_missing, domain_not_verified, scanner_failed, stripe_api_error, timeout, canceled, internal_error. */
4429
4471
  code: string | null;
4430
4472
  fix: TestRunFix;
4431
4473
  }
@@ -4443,7 +4485,7 @@ export interface TestRun {
4443
4485
  type: "stripe" | "generic";
4444
4486
  /** Stripe runs: mirror (Checkbox mirrors your checkout into test mode and moves a test clock through trial and renewal) or real_checkout (the shopper buys through YOUR checkout on your test deployment, so your own webhook handlers and email code fire: the proof that your real system works). null for generic runs. */
4445
4487
  mode: "mirror" | "real_checkout" | null;
4446
- /** succeeded means the run finished every step and no step failed (steps may still have warnings to review); incomplete means no step failed, but a step could not finish what it set out to observe (for example the online cancellation could not be completed): not a pass; failed means it stopped early, or finished with a failed step (see failure and steps[].fix). */
4488
+ /** succeeded means the run finished every step and no step failed (steps may still have warnings to review); incomplete means no step failed, but a step could not finish what it set out to observe (for example the online cancellation could not be completed, or a required email never arrived): not a pass; failed means it stopped early, or finished with a failed step (see failure and steps[].fix). */
4447
4489
  status: "queued" | "running" | "succeeded" | "incomplete" | "failed" | "canceled";
4448
4490
  /** The status in plain words, counting steps: "Finished with 6 warnings to review", "Finished with 1 failed step", "Finished: every observed step passed". succeeded with warnings is not a clean pass. */
4449
4491
  status_label: string;
@@ -4476,11 +4518,15 @@ export interface TestRun {
4476
4518
  started: number | null;
4477
4519
  /** When it finished. Unix timestamp in seconds. */
4478
4520
  finished: number | null;
4521
+ /** The same as finished (the name verifications use): when the run finished; null while it runs. Unix timestamp in seconds. */
4522
+ completed: number | null;
4523
+ /** How long the run took, from started (or created) to finished, in seconds; null while it runs. */
4524
+ duration_seconds: number | null;
4479
4525
  /** Lifecycle steps in order. */
4480
4526
  steps: Array<TestRunStep>;
4481
4527
  /** Why the run stopped (failed / canceled runs). */
4482
4528
  failure: {
4483
- /** Stable failure code: key_missing, key_not_test_mode, key_invalid, key_permission_missing, checkout_config_missing, price_not_in_test_mode, checkout_session_failed, checkout_page_unreadable, checkout_not_completed, subscription_create_failed, test_clock_failed, no_email_received_within, reminder_not_received, portal_not_configured, cancel_not_completed, cancellation_email_not_received, checkout_url_missing, real_checkout_not_completed, payment_link_not_found, webhook_not_delivered, reminder_outside_window, reminder_timing_not_observed, cancel_flow_not_configured, cancel_not_confirmed_in_stripe, acknowledgment_content_incomplete, cancel_replaced_by_other_subscription, not_judged, scan_config_missing, domain_not_verified, scanner_failed, stripe_api_error, timeout, canceled, internal_error. */
4529
+ /** Stable failure code: key_missing, key_not_test_mode, key_invalid, key_permission_missing, checkout_config_missing, price_not_in_test_mode, checkout_session_failed, checkout_page_unreadable, checkout_not_completed, subscription_create_failed, test_clock_failed, no_email_received_within, reminder_not_received, portal_not_configured, cancel_not_completed, cancellation_email_not_received, checkout_url_missing, real_checkout_not_completed, payment_link_not_found, webhook_not_delivered, reminder_outside_window, reminder_timing_not_observed, cancel_flow_not_configured, cancel_not_confirmed_in_stripe, acknowledgment_content_incomplete, required_notice_skipped, cancel_replaced_by_other_subscription, not_judged, scan_config_missing, domain_not_verified, scanner_failed, stripe_api_error, timeout, canceled, internal_error. */
4484
4530
  code: string;
4485
4531
  /** What went wrong. */
4486
4532
  message: string;
@@ -4523,6 +4569,17 @@ export interface TestRun {
4523
4569
  /** Why something was kept in the run report only. */
4524
4570
  notes: Array<string>;
4525
4571
  };
4572
+ /** Notices Checkbox Notices owed the run's subscriber (an applicable law requires them) but skipped or failed to send. Not empty: the run is not a clean pass, and the setup is not "all set". */
4573
+ notices_skipped: Array<{
4574
+ /** Notice kind. */
4575
+ kind: string;
4576
+ /** skipped or failed. */
4577
+ status: string;
4578
+ /** Why Checkbox Notices did not send it. */
4579
+ reason: string | null;
4580
+ /** The step that reports it (now a warning, code required_notice_skipped). */
4581
+ step: string;
4582
+ }>;
4526
4583
  } | null;
4527
4584
  /** Stripe test-mode objects of the run (type stripe). */
4528
4585
  stripe: {
@@ -4766,7 +4823,7 @@ export interface CompliancePlanSummary {
4766
4823
  livemode: boolean;
4767
4824
  /** The site. */
4768
4825
  site: string;
4769
- /** action_required (an agent can apply open tasks now), verifying (changes applied; waiting for confirming observations), compliant (every required check passes or only waits for a live check — an automated assessment, not a legal determination; see compliance.pending_live_checks and coverage), blocked (only human answers ("Your call") or declined critical tasks remain). */
4826
+ /** action_required (an agent can apply open tasks now), verifying (changes applied; waiting for confirming observations), compliant (every required check passes or only waits for a live check — an automated assessment, not a legal determination; see compliance.pending_live_checks and coverage), blocked (only human answers ("Your call") or declined critical tasks remain). The value "compliant" is kept so published SDKs keep working; prefer checks_status ("checks_pass") and show status_label to people: never tell anyone the site "is compliant". */
4770
4827
  status: "action_required" | "verifying" | "compliant" | "blocked";
4771
4828
  /** The plan status in words to show a person, from the same counts as the summary ("1 fix needed · 2 to set up", "1 decision for you"; else action_required "Fixes needed", blocked "Your call"), "Checks still running (N)" while checks are still running (verifying), compliant "Checks pass"; while an agent works the site and everything left waits for a deploy or the owner (next_action done_for_now): "Waiting on deploy and you" or "Waiting on deploy". Show this, never the machine value (`compliant` is a status name, not a legal conclusion). */
4772
4829
  status_label?: string;
@@ -5553,7 +5610,7 @@ export declare const ERROR_CODES: {
5553
5610
  readonly test_key_declined: {
5554
5611
  readonly status: 403;
5555
5612
  readonly type: "permission_error";
5556
- readonly description: "The owner did not tick “Let your agent store a Stripe test-mode key” on the approval page of this agent's sign-in (device login) or connection (OAuth). Nothing was stored. Ask them to allow it on the approval page (sign in again) or to add the key themselves in the dashboard.";
5613
+ readonly description: "The owner did not tick “Let your agent store a Stripe test-mode restricted key for this project” (agent sign-in, device login) or “Let this app store a Stripe test-mode restricted key for your sites” (app connection, OAuth) on the approval page (checkbox id consent-stripe-test-key). Nothing was stored. Ask them to allow it on the approval page (sign in again) or to add the key themselves in the dashboard.";
5557
5614
  };
5558
5615
  readonly test_key_rejected: {
5559
5616
  readonly status: 400;
@@ -21,7 +21,7 @@ export const ERROR_CODES = {
21
21
  test_key_missing: { status: 400, type: "invalid_request_error", description: "A Stripe test run needs a Stripe TEST-mode key stored for the site: the agent stores the restricted test key (rk_test_…) with createTestCredential, or a person adds it in the dashboard." },
22
22
  test_key_not_test_mode: { status: 400, type: "invalid_request_error", description: "The billing key is a live-mode (or malformed) key. Agents only store TEST-mode restricted keys (rk_test_…); a human adds live keys in the Checkbox dashboard." },
23
23
  test_key_not_restricted: { status: 400, type: "invalid_request_error", description: "The key is a full Stripe secret key (sk_test_… or sk_live_…), which is refused on every connect path (createTestCredential, connectBillingPlatform, the dashboard). Use a restricted key (rk_test_…) with the permissions on Checkbox's key checklist instead; `message` lists them." },
24
- test_key_declined: { status: 403, type: "permission_error", description: "The owner did not tick “Let your agent store a Stripe test-mode key” on the approval page of this agent's sign-in (device login) or connection (OAuth). Nothing was stored. Ask them to allow it on the approval page (sign in again) or to add the key themselves in the dashboard." },
24
+ test_key_declined: { status: 403, type: "permission_error", description: "The owner did not tick “Let your agent store a Stripe test-mode restricted key for this project” (agent sign-in, device login) or “Let this app store a Stripe test-mode restricted key for your sites” (app connection, OAuth) on the approval page (checkbox id consent-stripe-test-key). Nothing was stored. Ask them to allow it on the approval page (sign in again) or to add the key themselves in the dashboard." },
25
25
  test_key_rejected: { status: 400, type: "invalid_request_error", description: "Stripe rejected the test-mode key or it lacks a permission test runs need; `message` names it." },
26
26
  authorization_pending: { status: 400, type: "invalid_request_error", description: "Device login: the human has not approved yet. Keep polling createDeviceToken every `interval` seconds." },
27
27
  slow_down: { status: 400, type: "rate_limit_error", description: "Device login: polling too fast. Add 5 seconds to the interval and keep polling." },
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Version of this SDK (kept equal to packages/sdk-node/package.json "version"; a test checks it). */
2
- export declare const SDK_VERSION = "0.2.4";
2
+ export declare const SDK_VERSION = "0.2.6";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Version of this SDK (kept equal to packages/sdk-node/package.json "version"; a test checks it). */
2
- export const SDK_VERSION = '0.2.4';
2
+ export const SDK_VERSION = '0.2.6';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkbox-site/node",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Checkbox Node.js SDK: auto-renewal law and subscription compliance checks (FTC ROSCA, California ARL, New York and other state laws) for Stripe Checkout and other subscription checkouts. Zero dependencies. Published to npm as @checkbox-site/node.",
5
5
  "keywords": [
6
6
  "subscription",