@checkbox-site/node 0.2.8 → 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
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. */
|
|
@@ -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. */
|
|
@@ -1215,6 +1228,7 @@ export interface Site {
|
|
|
1215
1228
|
latest_scan?: Scan;
|
|
1216
1229
|
unverified_scan: UnverifiedScan;
|
|
1217
1230
|
domain_verification?: DomainVerification;
|
|
1231
|
+
next_action?: NextAction;
|
|
1218
1232
|
}
|
|
1219
1233
|
/** A page of sites, newest first. */
|
|
1220
1234
|
export interface SiteList {
|
|
@@ -2441,6 +2455,17 @@ export interface NoticeSettings {
|
|
|
2441
2455
|
real_sends: "test_mode" | "confirmed" | "needs_confirmation" | "off";
|
|
2442
2456
|
/** Where subscribers cancel online (site domain, hosted cancellation page or billing portal). */
|
|
2443
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
|
+
}>;
|
|
2444
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). */
|
|
2445
2470
|
cancel_url_warning?: string | null;
|
|
2446
2471
|
/** Hex brand colour. */
|
|
@@ -4578,7 +4603,7 @@ export interface TestRunStep {
|
|
|
4578
4603
|
observations: Record<string, unknown>;
|
|
4579
4604
|
/** Evidence records (screenshots, page captures, raw emails) behind the step. */
|
|
4580
4605
|
evidence: Array<string>;
|
|
4581
|
-
/** 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. */
|
|
4582
4607
|
code: string | null;
|
|
4583
4608
|
fix: TestRunFix;
|
|
4584
4609
|
}
|
|
@@ -4637,7 +4662,7 @@ export interface TestRun {
|
|
|
4637
4662
|
steps: Array<TestRunStep>;
|
|
4638
4663
|
/** Why the run stopped (failed / canceled runs). */
|
|
4639
4664
|
failure: {
|
|
4640
|
-
/** 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. */
|
|
4641
4666
|
code: string;
|
|
4642
4667
|
/** What went wrong. */
|
|
4643
4668
|
message: string;
|
|
@@ -4762,6 +4787,8 @@ export interface TestRun {
|
|
|
4762
4787
|
} | null;
|
|
4763
4788
|
} | null;
|
|
4764
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;
|
|
4765
4792
|
}
|
|
4766
4793
|
/** A page of test runs, newest first. */
|
|
4767
4794
|
export interface TestRunList {
|
|
@@ -5340,7 +5367,7 @@ export interface CreateTestRunParams {
|
|
|
5340
5367
|
cancel_url?: string;
|
|
5341
5368
|
/** Clicks that cancel in your flow (after login / cancel_url), e.g. [{ "action": "click", "text": "Cancel subscription" }, { "action": "click", "text": "Confirm" }]. */
|
|
5342
5369
|
cancel_steps?: Array<ScanStep>;
|
|
5343
|
-
/** 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. */
|
|
5344
5371
|
cancel_via?: "merchant_flow" | "stripe_portal";
|
|
5345
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. */
|
|
5346
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",
|