@checkbox-site/node 0.2.7 → 0.2.8
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/types.d.ts +66 -7
- 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.8";
|
|
49
49
|
static readonly API_VERSION = "2026-10-30";
|
|
50
50
|
static readonly errors: typeof errors;
|
|
51
51
|
static readonly webhooks: Webhooks;
|
|
@@ -266,7 +266,7 @@ export type GoLive = {
|
|
|
266
266
|
/** The steps, in order. */
|
|
267
267
|
steps: Array<{
|
|
268
268
|
/** Stable step key. */
|
|
269
|
-
key: "verify_domain" | "stripe_terms_url" | "live_stripe_key" | "live_portal_cancel" | "live_checkout" | "deactivate_old_live_link" | "promote_site";
|
|
269
|
+
key: "verify_domain" | "stripe_terms_url" | "live_stripe_key" | "live_portal_cancel" | "live_checkout" | "deactivate_old_live_link" | "swap_test_urls" | "promote_site";
|
|
270
270
|
/** Who takes the step: person (only the owner can: DNS, the Stripe Dashboard, live keys) or agent (a code change). */
|
|
271
271
|
who: "person" | "agent";
|
|
272
272
|
/** The step in plain words. */
|
|
@@ -448,6 +448,24 @@ export interface SetupSession {
|
|
|
448
448
|
/** When it started. Unix timestamp in seconds. */
|
|
449
449
|
created: number;
|
|
450
450
|
} | null;
|
|
451
|
+
/** 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. */
|
|
452
|
+
owner_questions?: {
|
|
453
|
+
/** How to ask them: once, in one message, while the fixes go on. */
|
|
454
|
+
description: string;
|
|
455
|
+
/** Every choice only the owner makes, together. */
|
|
456
|
+
questions: Array<{
|
|
457
|
+
/** "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. */
|
|
458
|
+
id: string;
|
|
459
|
+
/** The question, in plain words for the owner. */
|
|
460
|
+
text: string;
|
|
461
|
+
/** The answers. */
|
|
462
|
+
options: Array<string>;
|
|
463
|
+
/** The tasks the answer settles. */
|
|
464
|
+
tasks: Array<string>;
|
|
465
|
+
/** What the agent does with each answer. */
|
|
466
|
+
on_answer: Record<string, string>;
|
|
467
|
+
}>;
|
|
468
|
+
} | null;
|
|
451
469
|
/** 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
470
|
site_plans: Array<{
|
|
453
471
|
/** Plan name (or its price and interval). */
|
|
@@ -1138,6 +1156,13 @@ export interface Site {
|
|
|
1138
1156
|
devices: Array<"desktop" | "mobile">;
|
|
1139
1157
|
/** Number of configured checkout steps. */
|
|
1140
1158
|
checkout_steps: number;
|
|
1159
|
+
/** The other checkout pages, one per plan (checkout_pages), each loaded on every scan. */
|
|
1160
|
+
pages: Array<{
|
|
1161
|
+
/** The plan's checkout page. */
|
|
1162
|
+
url: string;
|
|
1163
|
+
/** The plan it sells, when given. */
|
|
1164
|
+
plan: string | null;
|
|
1165
|
+
}>;
|
|
1141
1166
|
/** A synthetic sign-up is configured. */
|
|
1142
1167
|
completes_purchase: boolean;
|
|
1143
1168
|
/** A test account for the cancellation test is configured. */
|
|
@@ -1277,6 +1302,13 @@ export interface CreateSiteParams {
|
|
|
1277
1302
|
terms_url?: string | null;
|
|
1278
1303
|
/** Steps to reach the final pre-payment screen. */
|
|
1279
1304
|
checkout_steps?: Array<ScanStep>;
|
|
1305
|
+
/** 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. */
|
|
1306
|
+
checkout_pages?: Array<{
|
|
1307
|
+
/** A plan's own checkout page, on the checkout page's site. */
|
|
1308
|
+
url: string;
|
|
1309
|
+
/** The plan this page sells (its name as in your plans). */
|
|
1310
|
+
plan?: string;
|
|
1311
|
+
}> | null;
|
|
1280
1312
|
purchase?: SitePurchase;
|
|
1281
1313
|
test_account?: SiteTestAccount;
|
|
1282
1314
|
/** Explicit cancellation steps (otherwise auto-discovered). */
|
|
@@ -1308,6 +1340,13 @@ export interface UpdateSiteParams {
|
|
|
1308
1340
|
terms_url?: string | null;
|
|
1309
1341
|
/** Steps to reach the final pre-payment screen. */
|
|
1310
1342
|
checkout_steps?: Array<ScanStep>;
|
|
1343
|
+
/** 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. */
|
|
1344
|
+
checkout_pages?: Array<{
|
|
1345
|
+
/** A plan's own checkout page, on the checkout page's site. */
|
|
1346
|
+
url: string;
|
|
1347
|
+
/** The plan this page sells (its name as in your plans). */
|
|
1348
|
+
plan?: string;
|
|
1349
|
+
}> | null;
|
|
1311
1350
|
purchase?: SitePurchase;
|
|
1312
1351
|
test_account?: SiteTestAccount;
|
|
1313
1352
|
/** Explicit cancellation steps (otherwise auto-discovered). */
|
|
@@ -1619,6 +1658,17 @@ export interface Finding {
|
|
|
1619
1658
|
/** 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
1659
|
compliance_status: "needs_fix" | "pending_live_check" | "verified_live" | "your_call" | "compliant" | "not_applicable" | "not_set_up" | "not_checked";
|
|
1621
1660
|
compliance: ComplianceInfo;
|
|
1661
|
+
/** 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. */
|
|
1662
|
+
plan_task?: {
|
|
1663
|
+
/** Unique identifier of the task (task_…). */
|
|
1664
|
+
id: string;
|
|
1665
|
+
/** The task title. */
|
|
1666
|
+
title: string;
|
|
1667
|
+
/** The task status in the compliance plan. */
|
|
1668
|
+
status: string;
|
|
1669
|
+
/** What the compliance plan says about it, in its own words (the to-do label, Done, Checks pass · live check pending, ...). */
|
|
1670
|
+
label: string;
|
|
1671
|
+
} | null;
|
|
1622
1672
|
/** Scan that produced the latest result. */
|
|
1623
1673
|
scan: string | null;
|
|
1624
1674
|
/** First time the check was evaluated. Unix timestamp in seconds. */
|
|
@@ -1812,8 +1862,8 @@ export interface Task {
|
|
|
1812
1862
|
last_verification: {
|
|
1813
1863
|
/** Unique identifier of the verification (ver_…). */
|
|
1814
1864
|
id: string;
|
|
1815
|
-
/** Result. */
|
|
1816
|
-
status: "pending" | "passed" | "failed";
|
|
1865
|
+
/** 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. */
|
|
1866
|
+
status: "pending" | "passed" | "incomplete" | "failed";
|
|
1817
1867
|
/** When it was requested. Unix timestamp in seconds. */
|
|
1818
1868
|
created: number;
|
|
1819
1869
|
} | null;
|
|
@@ -1831,6 +1881,13 @@ export interface Task {
|
|
|
1831
1881
|
verification_level: "not_seen" | "template_checked" | "delivery_seen" | null;
|
|
1832
1882
|
/** When the task first appeared. Unix timestamp in seconds. */
|
|
1833
1883
|
first_seen: number;
|
|
1884
|
+
/** 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. */
|
|
1885
|
+
found_after_first_plan?: {
|
|
1886
|
+
/** When it first appeared. Unix timestamp in seconds. */
|
|
1887
|
+
found: number;
|
|
1888
|
+
/** What found it, in plain words (the scan of your checkout page, the read of your Terms, the Stripe read, ...). */
|
|
1889
|
+
found_by: string;
|
|
1890
|
+
};
|
|
1834
1891
|
/** When it was done. Unix timestamp in seconds. */
|
|
1835
1892
|
done_at: number | null;
|
|
1836
1893
|
}
|
|
@@ -1907,7 +1964,7 @@ export interface CompliancePlan {
|
|
|
1907
1964
|
description: string;
|
|
1908
1965
|
/** Every choice only the owner makes, together. */
|
|
1909
1966
|
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. */
|
|
1967
|
+
/** "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
1968
|
id: string;
|
|
1912
1969
|
/** The question, in plain words for the owner. */
|
|
1913
1970
|
text: string;
|
|
@@ -2003,8 +2060,8 @@ export interface Verification {
|
|
|
2003
2060
|
task: string | null;
|
|
2004
2061
|
/** One task or the whole site. */
|
|
2005
2062
|
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";
|
|
2063
|
+
/** 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). */
|
|
2064
|
+
status: "pending" | "passed" | "passed_with_gaps" | "passed_with_notes" | "not_checked" | "pending_live_check" | "needs_review" | "incomplete" | "failed" | "superseded";
|
|
2008
2065
|
/** Set when newer evidence settled the task after this verification finished (status superseded). */
|
|
2009
2066
|
superseded?: {
|
|
2010
2067
|
/** The task's status in the current plan. */
|
|
@@ -2384,6 +2441,8 @@ export interface NoticeSettings {
|
|
|
2384
2441
|
real_sends: "test_mode" | "confirmed" | "needs_confirmation" | "off";
|
|
2385
2442
|
/** Where subscribers cancel online (site domain, hosted cancellation page or billing portal). */
|
|
2386
2443
|
cancel_url: string | null;
|
|
2444
|
+
/** 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). */
|
|
2445
|
+
cancel_url_warning?: string | null;
|
|
2387
2446
|
/** Hex brand colour. */
|
|
2388
2447
|
brand_color: string | null;
|
|
2389
2448
|
/** Mailbox name of the sender. */
|
|
@@ -4507,7 +4566,7 @@ export interface TestRunStep {
|
|
|
4507
4566
|
checks: Array<{
|
|
4508
4567
|
/** Machine check id (see listRules / the legal catalog). */
|
|
4509
4568
|
check_id: string;
|
|
4510
|
-
/** pass, fail, needs_review or not_applicable, judged from this run's observations. */
|
|
4569
|
+
/** 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
4570
|
status: string;
|
|
4512
4571
|
/** What was observed. */
|
|
4513
4572
|
message: string;
|
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.8";
|
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.8';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkbox-site/node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
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",
|