@checkbox-site/node 0.2.4 → 0.2.5
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 +54 -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.5";
|
|
49
49
|
static readonly API_VERSION = "2026-10-30";
|
|
50
50
|
static readonly errors: typeof errors;
|
|
51
51
|
static readonly webhooks: Webhooks;
|
|
@@ -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. */
|
|
@@ -503,6 +525,7 @@ export interface SetupSession {
|
|
|
503
525
|
}>;
|
|
504
526
|
} | null;
|
|
505
527
|
unverified_scan: UnverifiedScan;
|
|
528
|
+
go_live: GoLive;
|
|
506
529
|
/** The setup checklist, in order. */
|
|
507
530
|
steps: Array<SetupStep>;
|
|
508
531
|
next_action: SetupNextAction;
|
|
@@ -573,6 +596,8 @@ export interface SetupSessionUpdate {
|
|
|
573
596
|
env_file?: string;
|
|
574
597
|
/** Static files directory (for /.well-known). */
|
|
575
598
|
public_dir?: string;
|
|
599
|
+
/** 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. */
|
|
600
|
+
mailer?: string;
|
|
576
601
|
/** 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
602
|
checkout_code?: Array<SetupCodeRef>;
|
|
578
603
|
/** Where the subscribe / pay buttons are rendered. */
|
|
@@ -650,6 +675,7 @@ export interface SetupVerification {
|
|
|
650
675
|
/** Why not (limits: one per site per 24 h, three unverified sites per account in 30 days). */
|
|
651
676
|
reason: string | null;
|
|
652
677
|
} | null;
|
|
678
|
+
next_action: SetupNextAction;
|
|
653
679
|
setup_session: SetupSession;
|
|
654
680
|
}
|
|
655
681
|
/** Account default retention (sites without their own setting use it). */
|
|
@@ -1689,7 +1715,7 @@ export interface Task {
|
|
|
1689
1715
|
/** What Checkbox must observe for the task to be done. */
|
|
1690
1716
|
expected: string;
|
|
1691
1717
|
};
|
|
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. */
|
|
1718
|
+
/** 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
1719
|
blocked_on: string | null;
|
|
1694
1720
|
/** 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
1721
|
closed_reason: "verified" | "no_longer_applicable" | "superseded" | "declined" | "decided" | null;
|
|
@@ -1837,6 +1863,7 @@ export interface CompliancePlan {
|
|
|
1837
1863
|
on_answer: Record<string, string>;
|
|
1838
1864
|
}>;
|
|
1839
1865
|
};
|
|
1866
|
+
go_live?: GoLive;
|
|
1840
1867
|
/** Evidence level per required email kind. A plan never reaches status compliant on template_checked emails. */
|
|
1841
1868
|
email_verification: Array<{
|
|
1842
1869
|
/** Email kind (acknowledgment, trial_ending, renewal_reminder, annual_terms, charge_notice, price_change, cancellation_confirmation). */
|
|
@@ -1899,7 +1926,7 @@ export interface VerificationCheck {
|
|
|
1899
1926
|
check_id: string;
|
|
1900
1927
|
/** Status the task needs. */
|
|
1901
1928
|
expected: string;
|
|
1902
|
-
/** Status observed (pass, fail, needs_review, not_applicable, unknown). */
|
|
1929
|
+
/** 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
1930
|
observed: string;
|
|
1904
1931
|
/** Where the observation comes from: evaluation, static_fetch, html, stripe_params, email, policy_fetch. */
|
|
1905
1932
|
source: string;
|
|
@@ -1920,8 +1947,17 @@ export interface Verification {
|
|
|
1920
1947
|
task: string | null;
|
|
1921
1948
|
/** One task or the whole site. */
|
|
1922
1949
|
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";
|
|
1950
|
+
/** 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), 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). */
|
|
1951
|
+
status: "pending" | "passed" | "passed_with_gaps" | "passed_with_notes" | "not_checked" | "pending_live_check" | "failed" | "superseded";
|
|
1952
|
+
/** Set when newer evidence settled the task after this verification finished (status superseded). */
|
|
1953
|
+
superseded?: {
|
|
1954
|
+
/** The task's status in the current plan. */
|
|
1955
|
+
task_status: string;
|
|
1956
|
+
/** What settled the task: a test run (run_…) or the latest evaluation. */
|
|
1957
|
+
by: string;
|
|
1958
|
+
/** In words: what this verification found and what settled the task since. */
|
|
1959
|
+
detail: string;
|
|
1960
|
+
} | null;
|
|
1925
1961
|
/** How it was re-checked. */
|
|
1926
1962
|
method: "page_fetch" | "policy_refetch" | "stripe_params" | "email_copy" | "platform_sync" | "attestation" | "evaluation" | "test_run";
|
|
1927
1963
|
/** 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 +1987,7 @@ export interface Verification {
|
|
|
1951
1987
|
checks: Array<{
|
|
1952
1988
|
/** Check id. */
|
|
1953
1989
|
check_id: string;
|
|
1954
|
-
/** Pre-check result: pass, fail, needs_review or
|
|
1990
|
+
/** 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
1991
|
status: string;
|
|
1956
1992
|
/** What the pre-check found, in one line. */
|
|
1957
1993
|
reason: string;
|
|
@@ -4425,7 +4461,7 @@ export interface TestRunStep {
|
|
|
4425
4461
|
observations: Record<string, unknown>;
|
|
4426
4462
|
/** Evidence records (screenshots, page captures, raw emails) behind the step. */
|
|
4427
4463
|
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. */
|
|
4464
|
+
/** 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
4465
|
code: string | null;
|
|
4430
4466
|
fix: TestRunFix;
|
|
4431
4467
|
}
|
|
@@ -4480,7 +4516,7 @@ export interface TestRun {
|
|
|
4480
4516
|
steps: Array<TestRunStep>;
|
|
4481
4517
|
/** Why the run stopped (failed / canceled runs). */
|
|
4482
4518
|
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. */
|
|
4519
|
+
/** 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
4520
|
code: string;
|
|
4485
4521
|
/** What went wrong. */
|
|
4486
4522
|
message: string;
|
|
@@ -4523,6 +4559,17 @@ export interface TestRun {
|
|
|
4523
4559
|
/** Why something was kept in the run report only. */
|
|
4524
4560
|
notes: Array<string>;
|
|
4525
4561
|
};
|
|
4562
|
+
/** 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". */
|
|
4563
|
+
notices_skipped: Array<{
|
|
4564
|
+
/** Notice kind. */
|
|
4565
|
+
kind: string;
|
|
4566
|
+
/** skipped or failed. */
|
|
4567
|
+
status: string;
|
|
4568
|
+
/** Why Checkbox Notices did not send it. */
|
|
4569
|
+
reason: string | null;
|
|
4570
|
+
/** The step that reports it (now a warning, code required_notice_skipped). */
|
|
4571
|
+
step: string;
|
|
4572
|
+
}>;
|
|
4526
4573
|
} | null;
|
|
4527
4574
|
/** Stripe test-mode objects of the run (type stripe). */
|
|
4528
4575
|
stripe: {
|
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.5";
|
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.5';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkbox-site/node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
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",
|