@checkbox-site/node 0.1.1 → 0.2.1
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/README.md +3 -1
- package/dist/client.d.ts +87 -2
- package/dist/generated/operations.d.ts +208 -28
- package/dist/generated/operations.js +185 -24
- package/dist/generated/types.d.ts +971 -169
- package/dist/generated/types.js +13 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ sandbox and never need activation.
|
|
|
31
31
|
| Retries | Network errors, 409 `idempotency_key_in_use`, 429 (honours `Retry-After`) and 5xx are retried with exponential backoff and jitter (`maxNetworkRetries`, default 2) |
|
|
32
32
|
| Idempotency | Every POST that changes something gets an `Idempotency-Key` automatically, reused across retries; pass your own with `{ idempotencyKey }` |
|
|
33
33
|
| Versioning | Sends `Checkbox-Version: 2026-10-30` (the version the SDK was generated for); override with `new Checkbox(key, { apiVersion })` or per request |
|
|
34
|
+
| Base URL | `new Checkbox(key, { baseUrl: 'http://localhost:4000' })`, or the `CHECKBOX_API_BASE` environment variable (the same one the MCP server reads); a trailing `/v1` is ignored. Default `https://app.checkbox.site` |
|
|
34
35
|
| Mode | `checkbox.mode` is `'test'` or `'live'` from the key prefix (`ck_test_` / `ck_live_` / `rk_…` / legacy `sk_live_`) |
|
|
35
36
|
| Errors | `CheckboxInvalidRequestError`, `CheckboxAuthenticationError`, `CheckboxPermissionError`, `CheckboxRateLimitError`, `CheckboxIdempotencyError`, `CheckboxAPIError`, `CheckboxConnectionError` (all `CheckboxError`), each with a stable `code`, `param`, `statusCode`, `requestId`, `docUrl` and `nextAction` |
|
|
36
37
|
| Webhooks | `checkbox.webhooks.constructEvent(rawBody, signatureHeader, secret)` verifies `Checkbox-Signature` and returns a typed `WebhookEvent`; `constructEventAsync` for edge runtimes |
|
|
@@ -45,6 +46,7 @@ const checkbox = new Checkbox(process.env.CHECKBOX_API_KEY, {
|
|
|
45
46
|
maxNetworkRetries: 2, // default
|
|
46
47
|
timeout: 80_000, // ms per attempt
|
|
47
48
|
appInfo: { name: 'my-app', version: '1.0.0' },
|
|
49
|
+
// baseUrl: 'http://localhost:4000', // API origin (default https://app.checkbox.site); or set CHECKBOX_API_BASE
|
|
48
50
|
});
|
|
49
51
|
|
|
50
52
|
// Register a site (idempotent per key) and read its compliance plan: ordered tasks with the law, the exact change and
|
|
@@ -70,7 +72,7 @@ try {
|
|
|
70
72
|
await checkbox.certificates.create(site.id);
|
|
71
73
|
} catch (err) {
|
|
72
74
|
if (!(err instanceof CheckboxError)) throw err;
|
|
73
|
-
// resource_conflict: not eligible yet (verify the domain,
|
|
75
|
+
// resource_conflict: not eligible yet (verify the domain, keep the checks passing for 7 days);
|
|
74
76
|
// account_not_activated: a live key before any domain is verified.
|
|
75
77
|
console.log(err.code, err.message, err.nextAction);
|
|
76
78
|
}
|
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.
|
|
48
|
+
static readonly VERSION = "0.2.1";
|
|
49
49
|
static readonly API_VERSION = "2026-10-30";
|
|
50
50
|
static readonly errors: typeof errors;
|
|
51
51
|
static readonly webhooks: Webhooks;
|
|
@@ -390,6 +390,23 @@ export declare class Checkbox implements RequestSender {
|
|
|
390
390
|
readonly paginated: false;
|
|
391
391
|
readonly summary: "Check domain verification now";
|
|
392
392
|
};
|
|
393
|
+
readonly resyncBilling: {
|
|
394
|
+
readonly operationId: "resyncBilling";
|
|
395
|
+
readonly namespace: "billings";
|
|
396
|
+
readonly method: "resync";
|
|
397
|
+
readonly httpMethod: "POST";
|
|
398
|
+
readonly path: "/v1/sites/{site}/billing/resync";
|
|
399
|
+
readonly pathParams: readonly ["site"];
|
|
400
|
+
readonly queryParams: readonly [];
|
|
401
|
+
readonly body: false;
|
|
402
|
+
readonly idempotent: true;
|
|
403
|
+
readonly auth: true;
|
|
404
|
+
readonly scope: "sites:write";
|
|
405
|
+
readonly response: "json";
|
|
406
|
+
readonly list: false;
|
|
407
|
+
readonly paginated: false;
|
|
408
|
+
readonly summary: "Re-sync Stripe settings";
|
|
409
|
+
};
|
|
393
410
|
readonly createScan: {
|
|
394
411
|
readonly operationId: "createScan";
|
|
395
412
|
readonly namespace: "scans";
|
|
@@ -730,6 +747,23 @@ export declare class Checkbox implements RequestSender {
|
|
|
730
747
|
readonly paginated: false;
|
|
731
748
|
readonly summary: "List fix plans for a site";
|
|
732
749
|
};
|
|
750
|
+
readonly publishShopifyTerms: {
|
|
751
|
+
readonly operationId: "publishShopifyTerms";
|
|
752
|
+
readonly namespace: "fixes";
|
|
753
|
+
readonly method: "publishShopifyTerms";
|
|
754
|
+
readonly httpMethod: "POST";
|
|
755
|
+
readonly path: "/v1/sites/{site}/fixes/shopify/publish";
|
|
756
|
+
readonly pathParams: readonly ["site"];
|
|
757
|
+
readonly queryParams: readonly [];
|
|
758
|
+
readonly body: true;
|
|
759
|
+
readonly idempotent: true;
|
|
760
|
+
readonly auth: true;
|
|
761
|
+
readonly scope: "fixes:write";
|
|
762
|
+
readonly response: "json";
|
|
763
|
+
readonly list: false;
|
|
764
|
+
readonly paginated: false;
|
|
765
|
+
readonly summary: "Publish the renewal terms to the Shopify app block";
|
|
766
|
+
};
|
|
733
767
|
readonly listEvidence: {
|
|
734
768
|
readonly operationId: "listEvidence";
|
|
735
769
|
readonly namespace: "evidence";
|
|
@@ -866,6 +900,23 @@ export declare class Checkbox implements RequestSender {
|
|
|
866
900
|
readonly paginated: false;
|
|
867
901
|
readonly summary: "Revoke a certificate";
|
|
868
902
|
};
|
|
903
|
+
readonly listNoticeSends: {
|
|
904
|
+
readonly operationId: "listNoticeSends";
|
|
905
|
+
readonly namespace: "noticeSends";
|
|
906
|
+
readonly method: "list";
|
|
907
|
+
readonly httpMethod: "GET";
|
|
908
|
+
readonly path: "/v1/sites/{site}/notice_sends";
|
|
909
|
+
readonly pathParams: readonly ["site"];
|
|
910
|
+
readonly queryParams: readonly ["limit", "kind", "subscription", "include_samples"];
|
|
911
|
+
readonly body: false;
|
|
912
|
+
readonly idempotent: false;
|
|
913
|
+
readonly auth: true;
|
|
914
|
+
readonly scope: "notices:read";
|
|
915
|
+
readonly response: "json";
|
|
916
|
+
readonly list: true;
|
|
917
|
+
readonly paginated: false;
|
|
918
|
+
readonly summary: "List Checkbox Notices sends";
|
|
919
|
+
};
|
|
869
920
|
readonly retrieveNoticeSettings: {
|
|
870
921
|
readonly operationId: "retrieveNoticeSettings";
|
|
871
922
|
readonly namespace: "noticeSettings";
|
|
@@ -1614,6 +1665,23 @@ export declare class Checkbox implements RequestSender {
|
|
|
1614
1665
|
readonly paginated: false;
|
|
1615
1666
|
readonly summary: "Delete a registered checkout config";
|
|
1616
1667
|
};
|
|
1668
|
+
readonly deleteSiteStripeCheckoutConfig: {
|
|
1669
|
+
readonly operationId: "deleteSiteStripeCheckoutConfig";
|
|
1670
|
+
readonly namespace: "siteStripeCheckoutConfigs";
|
|
1671
|
+
readonly method: "del";
|
|
1672
|
+
readonly httpMethod: "DELETE";
|
|
1673
|
+
readonly path: "/v1/sites/{site}/stripe_checkout_configs/{stripe_checkout_config}";
|
|
1674
|
+
readonly pathParams: readonly ["site", "stripe_checkout_config"];
|
|
1675
|
+
readonly queryParams: readonly [];
|
|
1676
|
+
readonly body: false;
|
|
1677
|
+
readonly idempotent: false;
|
|
1678
|
+
readonly auth: true;
|
|
1679
|
+
readonly scope: "test_runs:write";
|
|
1680
|
+
readonly response: "json";
|
|
1681
|
+
readonly list: false;
|
|
1682
|
+
readonly paginated: false;
|
|
1683
|
+
readonly summary: "Delete a registered checkout config (site path)";
|
|
1684
|
+
};
|
|
1617
1685
|
readonly createTestRun: {
|
|
1618
1686
|
readonly operationId: "createTestRun";
|
|
1619
1687
|
readonly namespace: "testRuns";
|
|
@@ -1655,7 +1723,7 @@ export declare class Checkbox implements RequestSender {
|
|
|
1655
1723
|
readonly httpMethod: "GET";
|
|
1656
1724
|
readonly path: "/v1/test_runs/{test_run}";
|
|
1657
1725
|
readonly pathParams: readonly ["test_run"];
|
|
1658
|
-
readonly queryParams: readonly [];
|
|
1726
|
+
readonly queryParams: readonly ["wait"];
|
|
1659
1727
|
readonly body: false;
|
|
1660
1728
|
readonly idempotent: false;
|
|
1661
1729
|
readonly auth: true;
|
|
@@ -1835,6 +1903,23 @@ export declare class Checkbox implements RequestSender {
|
|
|
1835
1903
|
readonly paginated: false;
|
|
1836
1904
|
readonly summary: "Send feedback";
|
|
1837
1905
|
};
|
|
1906
|
+
readonly claimReviewPrompt: {
|
|
1907
|
+
readonly operationId: "claimReviewPrompt";
|
|
1908
|
+
readonly namespace: "reviewPrompts";
|
|
1909
|
+
readonly method: "claim";
|
|
1910
|
+
readonly httpMethod: "POST";
|
|
1911
|
+
readonly path: "/v1/sites/{site}/review_prompt";
|
|
1912
|
+
readonly pathParams: readonly ["site"];
|
|
1913
|
+
readonly queryParams: readonly [];
|
|
1914
|
+
readonly body: true;
|
|
1915
|
+
readonly idempotent: false;
|
|
1916
|
+
readonly auth: true;
|
|
1917
|
+
readonly scope: "compliance_plans:read";
|
|
1918
|
+
readonly response: "json";
|
|
1919
|
+
readonly list: false;
|
|
1920
|
+
readonly paginated: false;
|
|
1921
|
+
readonly summary: "Claim the one-time review prompt for a site";
|
|
1922
|
+
};
|
|
1838
1923
|
};
|
|
1839
1924
|
static readonly Webhooks: typeof Webhooks;
|
|
1840
1925
|
/** Webhook signature verification: `checkbox.webhooks.constructEvent(rawBody, header, secret)`. */
|