@checkbox-site/node 0.2.6 → 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/operations.d.ts +1 -1
- package/dist/generated/operations.js +1 -1
- package/dist/generated/types.d.ts +125 -14
- package/dist/generated/types.js +1 -1
- 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;
|
|
@@ -3098,7 +3098,7 @@ export declare class ChecksResource extends Resource {
|
|
|
3098
3098
|
/**
|
|
3099
3099
|
* Check a subscription lifecycle email.
|
|
3100
3100
|
*
|
|
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
|
|
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 verdict is still judged with the terms you sent and a `site_plans_differ` warning says to update the site's plans (update_setup) once the change is deployed. 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.
|
|
3102
3102
|
*
|
|
3103
3103
|
* @see POST /v1/checks/email (operation `checkEmail`, scope `checks:read`)
|
|
3104
3104
|
*/
|
|
@@ -2622,7 +2622,7 @@ export class ChecksResource extends Resource {
|
|
|
2622
2622
|
/**
|
|
2623
2623
|
* Check a subscription lifecycle email.
|
|
2624
2624
|
*
|
|
2625
|
-
* 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
|
|
2625
|
+
* 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 verdict is still judged with the terms you sent and a `site_plans_differ` warning says to update the site's plans (update_setup) once the change is deployed. 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.
|
|
2626
2626
|
*
|
|
2627
2627
|
* @see POST /v1/checks/email (operation `checkEmail`, scope `checks:read`)
|
|
2628
2628
|
*/
|
|
@@ -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_checkout" | "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). */
|
|
@@ -680,6 +698,56 @@ export interface SetupVerification {
|
|
|
680
698
|
next_action: SetupNextAction;
|
|
681
699
|
/** The same as setup_session.steps, at the top level: the setup checklist, in order. */
|
|
682
700
|
steps: Array<SetupStep>;
|
|
701
|
+
/** The same as setup_session.compliance, at the top level: the site's status label and to-do list after this re-check (null before the first evaluation). */
|
|
702
|
+
compliance: {
|
|
703
|
+
/** When it was evaluated (Unix seconds; a time, not a count). Unix timestamp in seconds. */
|
|
704
|
+
evaluated: number;
|
|
705
|
+
/** The same time as evaluated, in ISO 8601. */
|
|
706
|
+
evaluated_at: string;
|
|
707
|
+
/**
|
|
708
|
+
* Deprecated: open failing findings (per check). Read `label` (counted in tasks) and `todo` instead.
|
|
709
|
+
* @deprecated
|
|
710
|
+
*/
|
|
711
|
+
failing: number;
|
|
712
|
+
/**
|
|
713
|
+
* Deprecated: open needs-review findings (per check). Read `label` (counted in tasks) and `todo` instead.
|
|
714
|
+
* @deprecated
|
|
715
|
+
*/
|
|
716
|
+
needs_review: number;
|
|
717
|
+
/** The site roll-up label, the same everywhere (dashboard, plan, emails): "2 fixes needed · 1 your call", "Checks pass · 2 live checks pending". */
|
|
718
|
+
label: string | null;
|
|
719
|
+
/** The site roll-up status: needs_fix, your_call, incomplete, compliant or not_checked. */
|
|
720
|
+
status: string | null;
|
|
721
|
+
/**
|
|
722
|
+
* Deprecated: open findings (evidence). The to-do list is `todo` (the compliance plan's ordered open tasks).
|
|
723
|
+
* @deprecated
|
|
724
|
+
*/
|
|
725
|
+
top_findings: Array<{
|
|
726
|
+
/** Unique identifier of the finding (fnd_…). */
|
|
727
|
+
id: string;
|
|
728
|
+
/** Check id. */
|
|
729
|
+
check_id: string;
|
|
730
|
+
/** fail or needs_review. */
|
|
731
|
+
status: string;
|
|
732
|
+
/** critical, high, medium or low. */
|
|
733
|
+
severity: string;
|
|
734
|
+
/** What is wrong. */
|
|
735
|
+
title: string;
|
|
736
|
+
}>;
|
|
737
|
+
/** The to-do list: the compliance plan's ordered open required tasks (same titles, order and counts as the dashboard, MCP get_site_status and the summary email). */
|
|
738
|
+
todo?: Array<{
|
|
739
|
+
/** Plan task id (task_…); its findings are the evidence. */
|
|
740
|
+
task: string;
|
|
741
|
+
/** Task key. */
|
|
742
|
+
key: string;
|
|
743
|
+
/** Task title, the same as in the plan. */
|
|
744
|
+
title: string;
|
|
745
|
+
/** The status the site roll-up counts the task under. */
|
|
746
|
+
status: "needs_fix" | "not_set_up" | "your_call" | "not_checked";
|
|
747
|
+
/** Needs a fix, Not set up yet, Your call or Not checked yet. */
|
|
748
|
+
label: string;
|
|
749
|
+
}>;
|
|
750
|
+
} | null;
|
|
683
751
|
setup_session: SetupSession;
|
|
684
752
|
}
|
|
685
753
|
/** Account default retention (sites without their own setting use it). */
|
|
@@ -1088,6 +1156,13 @@ export interface Site {
|
|
|
1088
1156
|
devices: Array<"desktop" | "mobile">;
|
|
1089
1157
|
/** Number of configured checkout steps. */
|
|
1090
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
|
+
}>;
|
|
1091
1166
|
/** A synthetic sign-up is configured. */
|
|
1092
1167
|
completes_purchase: boolean;
|
|
1093
1168
|
/** A test account for the cancellation test is configured. */
|
|
@@ -1200,8 +1275,8 @@ export interface SiteTestAccount {
|
|
|
1200
1275
|
login_url: string;
|
|
1201
1276
|
/** Test account email. */
|
|
1202
1277
|
email: string;
|
|
1203
|
-
/** Test account password (write-only; encrypted at rest). */
|
|
1204
|
-
password
|
|
1278
|
+
/** Test account password (write-only; encrypted at rest). Leave it out for an email-only login (no password field); the stored password is kept when one was saved before. */
|
|
1279
|
+
password?: string;
|
|
1205
1280
|
/** Custom login steps. */
|
|
1206
1281
|
login_steps?: Array<ScanStep>;
|
|
1207
1282
|
/** Optional page on your site that RE-ACTIVATES the test subscription (a test-only route). The cancellation test really cancels the test account; the scanner opens this page after logging in, before cancelling, so every scan starts subscribed. Without it, a scan after a completed cancellation reports "not observed: the test account has no active subscription" (needs review). (Replaces reset_url, now a deprecated alias.) */
|
|
@@ -1227,6 +1302,13 @@ export interface CreateSiteParams {
|
|
|
1227
1302
|
terms_url?: string | null;
|
|
1228
1303
|
/** Steps to reach the final pre-payment screen. */
|
|
1229
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;
|
|
1230
1312
|
purchase?: SitePurchase;
|
|
1231
1313
|
test_account?: SiteTestAccount;
|
|
1232
1314
|
/** Explicit cancellation steps (otherwise auto-discovered). */
|
|
@@ -1258,6 +1340,13 @@ export interface UpdateSiteParams {
|
|
|
1258
1340
|
terms_url?: string | null;
|
|
1259
1341
|
/** Steps to reach the final pre-payment screen. */
|
|
1260
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;
|
|
1261
1350
|
purchase?: SitePurchase;
|
|
1262
1351
|
test_account?: SiteTestAccount;
|
|
1263
1352
|
/** Explicit cancellation steps (otherwise auto-discovered). */
|
|
@@ -1569,6 +1658,17 @@ export interface Finding {
|
|
|
1569
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). */
|
|
1570
1659
|
compliance_status: "needs_fix" | "pending_live_check" | "verified_live" | "your_call" | "compliant" | "not_applicable" | "not_set_up" | "not_checked";
|
|
1571
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;
|
|
1572
1672
|
/** Scan that produced the latest result. */
|
|
1573
1673
|
scan: string | null;
|
|
1574
1674
|
/** First time the check was evaluated. Unix timestamp in seconds. */
|
|
@@ -1762,8 +1862,8 @@ export interface Task {
|
|
|
1762
1862
|
last_verification: {
|
|
1763
1863
|
/** Unique identifier of the verification (ver_…). */
|
|
1764
1864
|
id: string;
|
|
1765
|
-
/** Result. */
|
|
1766
|
-
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";
|
|
1767
1867
|
/** When it was requested. Unix timestamp in seconds. */
|
|
1768
1868
|
created: number;
|
|
1769
1869
|
} | null;
|
|
@@ -1781,6 +1881,13 @@ export interface Task {
|
|
|
1781
1881
|
verification_level: "not_seen" | "template_checked" | "delivery_seen" | null;
|
|
1782
1882
|
/** When the task first appeared. Unix timestamp in seconds. */
|
|
1783
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
|
+
};
|
|
1784
1891
|
/** When it was done. Unix timestamp in seconds. */
|
|
1785
1892
|
done_at: number | null;
|
|
1786
1893
|
}
|
|
@@ -1857,7 +1964,7 @@ export interface CompliancePlan {
|
|
|
1857
1964
|
description: string;
|
|
1858
1965
|
/** Every choice only the owner makes, together. */
|
|
1859
1966
|
questions: Array<{
|
|
1860
|
-
/** "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. */
|
|
1861
1968
|
id: string;
|
|
1862
1969
|
/** The question, in plain words for the owner. */
|
|
1863
1970
|
text: string;
|
|
@@ -1953,8 +2060,8 @@ export interface Verification {
|
|
|
1953
2060
|
task: string | null;
|
|
1954
2061
|
/** One task or the whole site. */
|
|
1955
2062
|
scope: "task" | "site";
|
|
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";
|
|
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";
|
|
1958
2065
|
/** Set when newer evidence settled the task after this verification finished (status superseded). */
|
|
1959
2066
|
superseded?: {
|
|
1960
2067
|
/** The task's status in the current plan. */
|
|
@@ -2334,6 +2441,8 @@ export interface NoticeSettings {
|
|
|
2334
2441
|
real_sends: "test_mode" | "confirmed" | "needs_confirmation" | "off";
|
|
2335
2442
|
/** Where subscribers cancel online (site domain, hosted cancellation page or billing portal). */
|
|
2336
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;
|
|
2337
2446
|
/** Hex brand colour. */
|
|
2338
2447
|
brand_color: string | null;
|
|
2339
2448
|
/** Mailbox name of the sender. */
|
|
@@ -2854,13 +2963,13 @@ export interface DisclosureCheckParams {
|
|
|
2854
2963
|
trial_days?: number;
|
|
2855
2964
|
/** Intro / first-period price in major units ("$34.50 for your first box, then $69 every 2 weeks"). Or give `intro_amount` in minor units. */
|
|
2856
2965
|
intro_price?: number | string;
|
|
2857
|
-
/** Intro / first-period price in minor units. */
|
|
2966
|
+
/** Intro / first-period price in minor units (999 = $9.99), like `amount`. Units never mix: price / intro_price are major units, amount / intro_amount / intro_amount_off are minor units; with `price` in major units, a value under 100 that reads like major units is refused with both ways to send it. */
|
|
2858
2967
|
intro_amount?: number;
|
|
2859
2968
|
/** How many billing periods the intro price lasts (default 1). */
|
|
2860
2969
|
intro_periods?: number;
|
|
2861
2970
|
/** Intro discount as a percentage off the recurring price (a Stripe coupon's percent_off: 20 for "20% off your first month"). Lasts `intro_periods` billing periods. Give one of intro_price / intro_amount, intro_percent_off or intro_amount_off. */
|
|
2862
2971
|
intro_percent_off?: number;
|
|
2863
|
-
/** Intro discount as an amount off in minor units (a Stripe coupon's amount_off: 200 for $2.00 off). Lasts `intro_periods` billing periods. */
|
|
2972
|
+
/** Intro discount as an amount off in minor units (a Stripe coupon's amount_off: 200 for $2.00 off), like `amount`, even when the price is sent as `price` in major units. Lasts `intro_periods` billing periods. */
|
|
2864
2973
|
intro_amount_off?: number;
|
|
2865
2974
|
/** https URL where subscribers cancel online (used in generated text; a {{cancel_url}} placeholder otherwise). */
|
|
2866
2975
|
cancel_url?: string;
|
|
@@ -2900,6 +3009,8 @@ export interface DisclosureCheckParams {
|
|
|
2900
3009
|
/** The form cannot be submitted without ticking it (default true). */
|
|
2901
3010
|
required?: boolean;
|
|
2902
3011
|
};
|
|
3012
|
+
/** Where the shopper pays: own_page (a form on this page), stripe_checkout or payment_link (a Stripe-hosted page that collects consent, so no checkbox is needed next to this text; consent is then left to that page and checked with checkStripeCheckoutSession / checkStripePaymentLink). With site, the site's checkout type is used when absent (declared, or Stripe Checkout when the site has a registered Stripe Checkout config). */
|
|
3013
|
+
checkout_type?: "own_page" | "stripe_checkout" | "payment_link";
|
|
2903
3014
|
/** Evaluate the law as of this date (YYYY-MM-DD, default today). */
|
|
2904
3015
|
as_of?: string;
|
|
2905
3016
|
/** Round 23: a site of yours (site_…): the disclosure is judged against the plan it states among the site's plans (the connected Stripe Prices win over plans typed in setup), with the site's merchant name, cancellation URL and jurisdictions, as verifyTask judges it. Plan fields you send are replaced by the plan's. "none" judges only what you send. */
|
|
@@ -3013,13 +3124,13 @@ export interface CheckPlanTerms {
|
|
|
3013
3124
|
trial_days?: number;
|
|
3014
3125
|
/** Intro / first-period price in major units ("$34.50 for your first box, then $69 every 2 weeks"). Or give `intro_amount` in minor units. */
|
|
3015
3126
|
intro_price?: number | string;
|
|
3016
|
-
/** Intro / first-period price in minor units. */
|
|
3127
|
+
/** Intro / first-period price in minor units (999 = $9.99), like `amount`. Units never mix: price / intro_price are major units, amount / intro_amount / intro_amount_off are minor units; with `price` in major units, a value under 100 that reads like major units is refused with both ways to send it. */
|
|
3017
3128
|
intro_amount?: number;
|
|
3018
3129
|
/** How many billing periods the intro price lasts (default 1). */
|
|
3019
3130
|
intro_periods?: number;
|
|
3020
3131
|
/** Intro discount as a percentage off the recurring price (a Stripe coupon's percent_off: 20 for "20% off your first month"). Lasts `intro_periods` billing periods. Give one of intro_price / intro_amount, intro_percent_off or intro_amount_off. */
|
|
3021
3132
|
intro_percent_off?: number;
|
|
3022
|
-
/** Intro discount as an amount off in minor units (a Stripe coupon's amount_off: 200 for $2.00 off). Lasts `intro_periods` billing periods. */
|
|
3133
|
+
/** Intro discount as an amount off in minor units (a Stripe coupon's amount_off: 200 for $2.00 off), like `amount`, even when the price is sent as `price` in major units. Lasts `intro_periods` billing periods. */
|
|
3023
3134
|
intro_amount_off?: number;
|
|
3024
3135
|
/** https URL where subscribers cancel online (used in generated text; a {{cancel_url}} placeholder otherwise). */
|
|
3025
3136
|
cancel_url?: string;
|
|
@@ -4455,7 +4566,7 @@ export interface TestRunStep {
|
|
|
4455
4566
|
checks: Array<{
|
|
4456
4567
|
/** Machine check id (see listRules / the legal catalog). */
|
|
4457
4568
|
check_id: string;
|
|
4458
|
-
/** 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. */
|
|
4459
4570
|
status: string;
|
|
4460
4571
|
/** What was observed. */
|
|
4461
4572
|
message: string;
|
|
@@ -5610,7 +5721,7 @@ export declare const ERROR_CODES: {
|
|
|
5610
5721
|
readonly test_key_declined: {
|
|
5611
5722
|
readonly status: 403;
|
|
5612
5723
|
readonly type: "permission_error";
|
|
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.
|
|
5724
|
+
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. next_action.url is a one-click allow page for this agent or app (dashboard /allow-stripe-test-key, signed in, no new sign-in); or the human adds the key themselves in the dashboard.";
|
|
5614
5725
|
};
|
|
5615
5726
|
readonly test_key_rejected: {
|
|
5616
5727
|
readonly status: 400;
|
package/dist/generated/types.js
CHANGED
|
@@ -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 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.
|
|
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. next_action.url is a one-click allow page for this agent or app (dashboard /allow-stripe-test-key, signed in, no new sign-in); or the human adds 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.
|
|
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",
|