@checkbox-site/node 0.2.7 → 0.2.9
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 +1 -1
- package/dist/generated/operations.d.ts +2 -2
- package/dist/generated/operations.js +2 -2
- package/dist/generated/types.d.ts +96 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
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.
|
|
48
|
+
static readonly VERSION = "0.2.9";
|
|
49
49
|
static readonly API_VERSION = "2026-10-30";
|
|
50
50
|
static readonly errors: typeof errors;
|
|
51
51
|
static readonly webhooks: Webhooks;
|
|
@@ -2988,7 +2988,7 @@ export declare class NoticeSettingsResource extends Resource {
|
|
|
2988
2988
|
/**
|
|
2989
2989
|
* Update notice settings.
|
|
2990
2990
|
*
|
|
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.
|
|
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 (while an agent sets up a test-mode site, that change is listed in the setup summary email instead of an email of its own). The response lists the plan tasks Notices now covers (closed_tasks).
|
|
2992
2992
|
*
|
|
2993
2993
|
* @param site Unique identifier of the site (site_…).
|
|
2994
2994
|
* @see POST /v1/sites/{site}/notice_settings (operation `updateNoticeSettings`, scope `notices:write`, live mode needs an activated account)
|
|
@@ -3430,7 +3430,7 @@ export declare class TestRunsResource extends Resource {
|
|
|
3430
3430
|
/**
|
|
3431
3431
|
* Retrieve a test run.
|
|
3432
3432
|
*
|
|
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
|
|
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), or retrieve_plan (retrieveCompliancePlan: the plan lists what is left; plan_status_label gives its status in words).
|
|
3434
3434
|
*
|
|
3435
3435
|
* @param testRun Unique identifier of the test run (run_…).
|
|
3436
3436
|
* @see GET /v1/test_runs/{test_run} (operation `retrieveTestRun`, scope `test_runs:read`)
|
|
@@ -2488,7 +2488,7 @@ export class NoticeSettingsResource extends Resource {
|
|
|
2488
2488
|
/**
|
|
2489
2489
|
* Update notice settings.
|
|
2490
2490
|
*
|
|
2491
|
-
* 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.
|
|
2491
|
+
* 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 (while an agent sets up a test-mode site, that change is listed in the setup summary email instead of an email of its own). The response lists the plan tasks Notices now covers (closed_tasks).
|
|
2492
2492
|
*
|
|
2493
2493
|
* @param site Unique identifier of the site (site_…).
|
|
2494
2494
|
* @see POST /v1/sites/{site}/notice_settings (operation `updateNoticeSettings`, scope `notices:write`, live mode needs an activated account)
|
|
@@ -3028,7 +3028,7 @@ export class TestRunsResource extends Resource {
|
|
|
3028
3028
|
/**
|
|
3029
3029
|
* Retrieve a test run.
|
|
3030
3030
|
*
|
|
3031
|
-
* 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
|
|
3031
|
+
* 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), or retrieve_plan (retrieveCompliancePlan: the plan lists what is left; plan_status_label gives its status in words).
|
|
3032
3032
|
*
|
|
3033
3033
|
* @param testRun Unique identifier of the test run (run_…).
|
|
3034
3034
|
* @see GET /v1/test_runs/{test_run} (operation `retrieveTestRun`, scope `test_runs:read`)
|
|
@@ -117,6 +117,10 @@ export interface DeviceAuthorizationParams {
|
|
|
117
117
|
client?: SetupClient;
|
|
118
118
|
/** Site URL detected in the project (shown on the approval screen; the test-mode site is created for it). */
|
|
119
119
|
site_url?: string;
|
|
120
|
+
/** Page where customers subscribe (pricing page or checkout). Carried into the setup session and the test-mode site. */
|
|
121
|
+
checkout_url?: string;
|
|
122
|
+
/** Account page where subscribers manage or cancel. Carried into the setup session. */
|
|
123
|
+
account_url?: string;
|
|
120
124
|
/** Project name. */
|
|
121
125
|
project_name?: string;
|
|
122
126
|
/** Detected framework. */
|
|
@@ -266,7 +270,7 @@ export type GoLive = {
|
|
|
266
270
|
/** The steps, in order. */
|
|
267
271
|
steps: Array<{
|
|
268
272
|
/** Stable step key. */
|
|
269
|
-
key: "verify_domain" | "stripe_terms_url" | "live_stripe_key" | "live_portal_cancel" | "live_checkout" | "deactivate_old_live_link" | "promote_site";
|
|
273
|
+
key: "verify_domain" | "stripe_terms_url" | "live_stripe_key" | "live_portal_cancel" | "live_checkout" | "deactivate_old_live_link" | "swap_test_urls" | "promote_site";
|
|
270
274
|
/** Who takes the step: person (only the owner can: DNS, the Stripe Dashboard, live keys) or agent (a code change). */
|
|
271
275
|
who: "person" | "agent";
|
|
272
276
|
/** The step in plain words. */
|
|
@@ -276,6 +280,13 @@ export type GoLive = {
|
|
|
276
280
|
}>;
|
|
277
281
|
/** What the agent tells the person instead of "done": set up in test mode, N steps left before real customers. */
|
|
278
282
|
summary: string;
|
|
283
|
+
/** Steps Checkbox closed by inference from what the billing platform showed (the Stripe Terms of Service URL, which Stripe does not report directly), each with the reason. Tell the owner these too. Absent when none. */
|
|
284
|
+
closed?: Array<{
|
|
285
|
+
/** Stable step key. */
|
|
286
|
+
key: "verify_domain" | "stripe_terms_url" | "live_stripe_key" | "live_portal_cancel" | "live_checkout" | "deactivate_old_live_link" | "swap_test_urls" | "promote_site";
|
|
287
|
+
/** Why Checkbox closed the step, in plain words (what Stripe showed). */
|
|
288
|
+
text: string;
|
|
289
|
+
}>;
|
|
279
290
|
} | null;
|
|
280
291
|
/** One step of the setup checklist. */
|
|
281
292
|
export interface SetupStep {
|
|
@@ -360,6 +371,8 @@ export interface SetupSession {
|
|
|
360
371
|
install: {
|
|
361
372
|
/** The exact tag to put in <head> of the homepage, pricing, checkout / sign-up and account pages (not needed on every page). */
|
|
362
373
|
script_tag: string | null;
|
|
374
|
+
/** The same tag pinned to the current snippet release with Subresource Integrity (integrity + crossorigin): the bytes never change until you update the tag (/s/latest.json names newer releases). Null when the deployment has no pinned release. */
|
|
375
|
+
pinned_script_tag: string | null;
|
|
363
376
|
/** The site's public snippet key: the data-key of script_tag (and the local part of inbound_email). Use only this key in the snippet tag. */
|
|
364
377
|
snippet_key: string | null;
|
|
365
378
|
/** A different key: the account's test-mode publishable key (pk_test_…) for Checkbox Elements (<checkbox-disclosure>) and consent receipts (data-publishable-key). Not the snippet's data-key. */
|
|
@@ -448,6 +461,24 @@ export interface SetupSession {
|
|
|
448
461
|
/** When it started. Unix timestamp in seconds. */
|
|
449
462
|
created: number;
|
|
450
463
|
} | null;
|
|
464
|
+
/** Round 35: the plan's batched owner questions (the same as retrieveCompliancePlan owner_questions), so next_action's "as owner_questions says" can be followed from this response. Null when there is none. */
|
|
465
|
+
owner_questions?: {
|
|
466
|
+
/** How to ask them: once, in one message, while the fixes go on. */
|
|
467
|
+
description: string;
|
|
468
|
+
/** Every choice only the owner makes, together. */
|
|
469
|
+
questions: Array<{
|
|
470
|
+
/** "email_sender" (who sends the required emails), "notices_support_email" / "notices_cancel_timing" (what Checkbox Notices needs before it sends), "stripe_terms_url" (a step only the owner takes in the Stripe Dashboard: the Terms of Service URL Stripe needs before it collects consent, in test mode too), or the id of the task whose question it is. */
|
|
471
|
+
id: string;
|
|
472
|
+
/** The question, in plain words for the owner. */
|
|
473
|
+
text: string;
|
|
474
|
+
/** The answers. */
|
|
475
|
+
options: Array<string>;
|
|
476
|
+
/** The tasks the answer settles. */
|
|
477
|
+
tasks: Array<string>;
|
|
478
|
+
/** What the agent does with each answer. */
|
|
479
|
+
on_answer: Record<string, string>;
|
|
480
|
+
}>;
|
|
481
|
+
} | null;
|
|
451
482
|
/** The plans Checkbox judges the site against: the declared plans as reconciled with the connected Stripe Prices (Stripe wins), the plans the pay buttons sell and the account's Prices of a declared plan. Empty until a plan is known (updateSetupSession plans[], or connect Stripe). */
|
|
452
483
|
site_plans: Array<{
|
|
453
484
|
/** Plan name (or its price and interval). */
|
|
@@ -1138,6 +1169,13 @@ export interface Site {
|
|
|
1138
1169
|
devices: Array<"desktop" | "mobile">;
|
|
1139
1170
|
/** Number of configured checkout steps. */
|
|
1140
1171
|
checkout_steps: number;
|
|
1172
|
+
/** The other checkout pages, one per plan (checkout_pages), each loaded on every scan. */
|
|
1173
|
+
pages: Array<{
|
|
1174
|
+
/** The plan's checkout page. */
|
|
1175
|
+
url: string;
|
|
1176
|
+
/** The plan it sells, when given. */
|
|
1177
|
+
plan: string | null;
|
|
1178
|
+
}>;
|
|
1141
1179
|
/** A synthetic sign-up is configured. */
|
|
1142
1180
|
completes_purchase: boolean;
|
|
1143
1181
|
/** A test account for the cancellation test is configured. */
|
|
@@ -1190,6 +1228,7 @@ export interface Site {
|
|
|
1190
1228
|
latest_scan?: Scan;
|
|
1191
1229
|
unverified_scan: UnverifiedScan;
|
|
1192
1230
|
domain_verification?: DomainVerification;
|
|
1231
|
+
next_action?: NextAction;
|
|
1193
1232
|
}
|
|
1194
1233
|
/** A page of sites, newest first. */
|
|
1195
1234
|
export interface SiteList {
|
|
@@ -1277,6 +1316,13 @@ export interface CreateSiteParams {
|
|
|
1277
1316
|
terms_url?: string | null;
|
|
1278
1317
|
/** Steps to reach the final pre-payment screen. */
|
|
1279
1318
|
checkout_steps?: Array<ScanStep>;
|
|
1319
|
+
/** More checkout pages, one per plan, when each plan has its own (e.g. /checkout?plan=annual next to checkout_url /checkout?plan=monthly). Every scan loads each one and judges it against the plan it sells. At most 4; replaces the stored list; null or [] clears it. */
|
|
1320
|
+
checkout_pages?: Array<{
|
|
1321
|
+
/** A plan's own checkout page, on the checkout page's site. */
|
|
1322
|
+
url: string;
|
|
1323
|
+
/** The plan this page sells (its name as in your plans). */
|
|
1324
|
+
plan?: string;
|
|
1325
|
+
}> | null;
|
|
1280
1326
|
purchase?: SitePurchase;
|
|
1281
1327
|
test_account?: SiteTestAccount;
|
|
1282
1328
|
/** Explicit cancellation steps (otherwise auto-discovered). */
|
|
@@ -1308,6 +1354,13 @@ export interface UpdateSiteParams {
|
|
|
1308
1354
|
terms_url?: string | null;
|
|
1309
1355
|
/** Steps to reach the final pre-payment screen. */
|
|
1310
1356
|
checkout_steps?: Array<ScanStep>;
|
|
1357
|
+
/** More checkout pages, one per plan, when each plan has its own (e.g. /checkout?plan=annual next to checkout_url /checkout?plan=monthly). Every scan loads each one and judges it against the plan it sells. At most 4; replaces the stored list; null or [] clears it. */
|
|
1358
|
+
checkout_pages?: Array<{
|
|
1359
|
+
/** A plan's own checkout page, on the checkout page's site. */
|
|
1360
|
+
url: string;
|
|
1361
|
+
/** The plan this page sells (its name as in your plans). */
|
|
1362
|
+
plan?: string;
|
|
1363
|
+
}> | null;
|
|
1311
1364
|
purchase?: SitePurchase;
|
|
1312
1365
|
test_account?: SiteTestAccount;
|
|
1313
1366
|
/** Explicit cancellation steps (otherwise auto-discovered). */
|
|
@@ -1619,6 +1672,17 @@ export interface Finding {
|
|
|
1619
1672
|
/** User-facing status. needs_fix (a requirement is clearly not met: `compliance.fix` is the one change), pending_live_check (everything Checkbox can see is right; the live event has not been observed yet — counts as passing the checks), verified_live (observed live: proof run, real BCC'd send, Stripe-confirmed cancellation), your_call (a real decision for a person: `compliance.question`), compliant (passes; grey areas carry a `compliance.note`), not_applicable, not_set_up (no sign the email or setting exists yet: `compliance.fix` is the one-click way to set it up; never counts as passing the checks), not_checked (Checkbox has not tried it yet, e.g. the cancel flow: `compliance.fix` says how; never counts as passing the checks). */
|
|
1620
1673
|
compliance_status: "needs_fix" | "pending_live_check" | "verified_live" | "your_call" | "compliant" | "not_applicable" | "not_set_up" | "not_checked";
|
|
1621
1674
|
compliance: ComplianceInfo;
|
|
1675
|
+
/** The compliance plan task this check belongs to and what the plan says about it. The plan decides what is left to do: when compliance and plan_task.label differ (a check pending a live send, a decision you recorded), follow the plan. Null when no task covers the check. */
|
|
1676
|
+
plan_task?: {
|
|
1677
|
+
/** Unique identifier of the task (task_…). */
|
|
1678
|
+
id: string;
|
|
1679
|
+
/** The task title. */
|
|
1680
|
+
title: string;
|
|
1681
|
+
/** The task status in the compliance plan. */
|
|
1682
|
+
status: string;
|
|
1683
|
+
/** What the compliance plan says about it, in its own words (the to-do label, Done, Checks pass · live check pending, ...). */
|
|
1684
|
+
label: string;
|
|
1685
|
+
} | null;
|
|
1622
1686
|
/** Scan that produced the latest result. */
|
|
1623
1687
|
scan: string | null;
|
|
1624
1688
|
/** First time the check was evaluated. Unix timestamp in seconds. */
|
|
@@ -1812,8 +1876,8 @@ export interface Task {
|
|
|
1812
1876
|
last_verification: {
|
|
1813
1877
|
/** Unique identifier of the verification (ver_…). */
|
|
1814
1878
|
id: string;
|
|
1815
|
-
/** Result. */
|
|
1816
|
-
status: "pending" | "passed" | "failed";
|
|
1879
|
+
/** Result. incomplete: every check observed passes, but something the task covers was not given to Checkbox yet (e.g. a plan's Checkout config is not registered); not done. */
|
|
1880
|
+
status: "pending" | "passed" | "incomplete" | "failed";
|
|
1817
1881
|
/** When it was requested. Unix timestamp in seconds. */
|
|
1818
1882
|
created: number;
|
|
1819
1883
|
} | null;
|
|
@@ -1831,6 +1895,13 @@ export interface Task {
|
|
|
1831
1895
|
verification_level: "not_seen" | "template_checked" | "delivery_seen" | null;
|
|
1832
1896
|
/** When the task first appeared. Unix timestamp in seconds. */
|
|
1833
1897
|
first_seen: number;
|
|
1898
|
+
/** Present on an open task that was not in the site's first plan: a later check found it. Tell the human it is new, and what found it. */
|
|
1899
|
+
found_after_first_plan?: {
|
|
1900
|
+
/** When it first appeared. Unix timestamp in seconds. */
|
|
1901
|
+
found: number;
|
|
1902
|
+
/** What found it, in plain words (the scan of your checkout page, the read of your Terms, the Stripe read, ...). */
|
|
1903
|
+
found_by: string;
|
|
1904
|
+
};
|
|
1834
1905
|
/** When it was done. Unix timestamp in seconds. */
|
|
1835
1906
|
done_at: number | null;
|
|
1836
1907
|
}
|
|
@@ -1907,7 +1978,7 @@ export interface CompliancePlan {
|
|
|
1907
1978
|
description: string;
|
|
1908
1979
|
/** Every choice only the owner makes, together. */
|
|
1909
1980
|
questions: Array<{
|
|
1910
|
-
/** "email_sender" (who sends the required emails), "notices_support_email" / "notices_cancel_timing" (what Checkbox Notices needs before it sends), or the id of the task whose question it is. */
|
|
1981
|
+
/** "email_sender" (who sends the required emails), "notices_support_email" / "notices_cancel_timing" (what Checkbox Notices needs before it sends), "stripe_terms_url" (a step only the owner takes in the Stripe Dashboard: the Terms of Service URL Stripe needs before it collects consent, in test mode too), or the id of the task whose question it is. */
|
|
1911
1982
|
id: string;
|
|
1912
1983
|
/** The question, in plain words for the owner. */
|
|
1913
1984
|
text: string;
|
|
@@ -2003,8 +2074,8 @@ export interface Verification {
|
|
|
2003
2074
|
task: string | null;
|
|
2004
2075
|
/** One task or the whole site. */
|
|
2005
2076
|
scope: "task" | "site";
|
|
2006
|
-
/** 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). */
|
|
2007
|
-
status: "pending" | "passed" | "passed_with_gaps" | "passed_with_notes" | "not_checked" | "pending_live_check" | "needs_review" | "failed" | "superseded";
|
|
2077
|
+
/** 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), incomplete (every check observed passes, but something the task covers was not given to Checkbox yet, e.g. one plan's Stripe Checkout config is not registered: not done; next_action says what to register), 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). */
|
|
2078
|
+
status: "pending" | "passed" | "passed_with_gaps" | "passed_with_notes" | "not_checked" | "pending_live_check" | "needs_review" | "incomplete" | "failed" | "superseded";
|
|
2008
2079
|
/** Set when newer evidence settled the task after this verification finished (status superseded). */
|
|
2009
2080
|
superseded?: {
|
|
2010
2081
|
/** The task's status in the current plan. */
|
|
@@ -2384,6 +2455,19 @@ export interface NoticeSettings {
|
|
|
2384
2455
|
real_sends: "test_mode" | "confirmed" | "needs_confirmation" | "off";
|
|
2385
2456
|
/** Where subscribers cancel online (site domain, hosted cancellation page or billing portal). */
|
|
2386
2457
|
cancel_url: string | null;
|
|
2458
|
+
/** Round 36: on updateNoticeSettings, the plan's email tasks Checkbox Notices now covers (no longer on your to-do list). An empty list when none; absent on retrieve. */
|
|
2459
|
+
closed_tasks?: Array<{
|
|
2460
|
+
/** The plan task (task_…). */
|
|
2461
|
+
id: string;
|
|
2462
|
+
/** The task key. */
|
|
2463
|
+
key: string;
|
|
2464
|
+
/** The task title. */
|
|
2465
|
+
title: string;
|
|
2466
|
+
/** Its plan status now: pending_live_check (Checkbox Notices sends it; it completes on the first real send or a test run) or done. */
|
|
2467
|
+
status: string;
|
|
2468
|
+
}>;
|
|
2469
|
+
/** Round 35: set when every notice links to cancel_url while Checkbox has not seen a working online cancellation (cancel.online_available is not passing). Fix the cancel option there, or point cancel_url at one that works (e.g. the hosted cancellation page). */
|
|
2470
|
+
cancel_url_warning?: string | null;
|
|
2387
2471
|
/** Hex brand colour. */
|
|
2388
2472
|
brand_color: string | null;
|
|
2389
2473
|
/** Mailbox name of the sender. */
|
|
@@ -4507,7 +4591,7 @@ export interface TestRunStep {
|
|
|
4507
4591
|
checks: Array<{
|
|
4508
4592
|
/** Machine check id (see listRules / the legal catalog). */
|
|
4509
4593
|
check_id: string;
|
|
4510
|
-
/** pass, fail, needs_review or not_applicable, judged from this run's observations. */
|
|
4594
|
+
/** pass, fail, needs_review or not_applicable, judged from this run's observations; informational on a step that is informational only (a mirrored page that is not your checkout): listed, never a failure, nothing to fix. */
|
|
4511
4595
|
status: string;
|
|
4512
4596
|
/** What was observed. */
|
|
4513
4597
|
message: string;
|
|
@@ -4519,7 +4603,7 @@ export interface TestRunStep {
|
|
|
4519
4603
|
observations: Record<string, unknown>;
|
|
4520
4604
|
/** Evidence records (screenshots, page captures, raw emails) behind the step. */
|
|
4521
4605
|
evidence: Array<string>;
|
|
4522
|
-
/** 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. */
|
|
4606
|
+
/** 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, cancel_own_control_failed, cancel_own_control_not_tested, not_judged, scan_config_missing, domain_not_verified, scanner_failed, stripe_api_error, timeout, canceled, internal_error. */
|
|
4523
4607
|
code: string | null;
|
|
4524
4608
|
fix: TestRunFix;
|
|
4525
4609
|
}
|
|
@@ -4578,7 +4662,7 @@ export interface TestRun {
|
|
|
4578
4662
|
steps: Array<TestRunStep>;
|
|
4579
4663
|
/** Why the run stopped (failed / canceled runs). */
|
|
4580
4664
|
failure: {
|
|
4581
|
-
/** 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. */
|
|
4665
|
+
/** 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, cancel_own_control_failed, cancel_own_control_not_tested, not_judged, scan_config_missing, domain_not_verified, scanner_failed, stripe_api_error, timeout, canceled, internal_error. */
|
|
4582
4666
|
code: string;
|
|
4583
4667
|
/** What went wrong. */
|
|
4584
4668
|
message: string;
|
|
@@ -4703,6 +4787,8 @@ export interface TestRun {
|
|
|
4703
4787
|
} | null;
|
|
4704
4788
|
} | null;
|
|
4705
4789
|
next_action: NextAction;
|
|
4790
|
+
/** Round 36: once the run finished, the site plan's status_label after it (the same words the plan, its verifications and the dashboard show, e.g. "Checks pass · 2 live checks pending"); null while the run is running or when the plan could not be read. A clean run is not the whole plan: owner steps and live checks pending stay on it. */
|
|
4791
|
+
plan_status_label?: string | null;
|
|
4706
4792
|
}
|
|
4707
4793
|
/** A page of test runs, newest first. */
|
|
4708
4794
|
export interface TestRunList {
|
|
@@ -5281,7 +5367,7 @@ export interface CreateTestRunParams {
|
|
|
5281
5367
|
cancel_url?: string;
|
|
5282
5368
|
/** Clicks that cancel in your flow (after login / cancel_url), e.g. [{ "action": "click", "text": "Cancel subscription" }, { "action": "click", "text": "Confirm" }]. */
|
|
5283
5369
|
cancel_steps?: Array<ScanStep>;
|
|
5284
|
-
/** How your customers cancel. Default: your flow when test_account / cancel_url / cancel_steps describe it; else the Stripe portal, taken as declared when Stripe has portal cancellation on and your site links to the portal, or when the account or cancellation page you registered redirects or links to the portal; otherwise reported as a warning (cancel_flow_not_configured: the cancel worked, but how your customers cancel was not given). */
|
|
5370
|
+
/** How your customers cancel. Default: your flow when test_account / cancel_url / cancel_steps describe it; else the Stripe portal, taken as declared when Stripe has portal cancellation on and your site links to the portal, or when the account or cancellation page you registered redirects or links to the portal; otherwise reported as a warning (cancel_flow_not_configured: the cancel worked, but how your customers cancel was not given). "merchant_flow" is never replaced by the portal: without test_account / cancel_url / cancel_steps, Checkbox presses the cancel option the last scan saw on your site, else the account or cancellation page you registered (a link there to the Stripe portal login link counts as your control); with none of these, the step says what to pass. */
|
|
5285
5371
|
cancel_via?: "merchant_flow" | "stripe_portal";
|
|
5286
5372
|
/** A test account the shopper logs into: to buy as a logged-in user (real_checkout) and to cancel through your in-app flow. Mail to its address counts when you BCC the site's Checkbox address. */
|
|
5287
5373
|
test_account?: {
|
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.
|
|
2
|
+
export declare const SDK_VERSION = "0.2.9";
|
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.
|
|
2
|
+
export const SDK_VERSION = '0.2.9';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkbox-site/node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
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",
|