@peable.to/contracts 6.1.0 → 6.2.0
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/cjs/resources/billingEngine/index.js +4 -1
- package/dist/cjs/resources/billingEngine/quotes.js +342 -0
- package/dist/cjs/resources/events/events.js +4 -0
- package/dist/cjs/vocabulary/errors.js +3 -0
- package/dist/cjs/vocabulary/events.js +4 -0
- package/dist/cjs/vocabulary/index.js +1 -0
- package/dist/cjs/vocabulary/invoices.js +3 -0
- package/dist/cjs/vocabulary/quotes.js +31 -0
- package/dist/esm/resources/billingEngine/index.js +4 -1
- package/dist/esm/resources/billingEngine/quotes.js +339 -0
- package/dist/esm/resources/events/events.js +4 -0
- package/dist/esm/vocabulary/errors.js +3 -0
- package/dist/esm/vocabulary/events.js +4 -0
- package/dist/esm/vocabulary/index.js +1 -0
- package/dist/esm/vocabulary/invoices.js +3 -0
- package/dist/esm/vocabulary/quotes.js +28 -0
- package/dist/types/resources/billingEngine/index.d.ts +839 -1
- package/dist/types/resources/billingEngine/invoices.d.ts +12 -0
- package/dist/types/resources/billingEngine/quotes.d.ts +1032 -0
- package/dist/types/resources/events/events.d.ts +16 -0
- package/dist/types/resources/events/index.d.ts +54 -2
- package/dist/types/resources/events/webhookDeliveries.d.ts +12 -0
- package/dist/types/resources/events/webhookEndpoints.d.ts +52 -4
- package/dist/types/resources/payments/disputes.d.ts +10 -10
- package/dist/types/resources/payments/index.d.ts +6 -6
- package/dist/types/vocabulary/errors.d.ts +3 -0
- package/dist/types/vocabulary/events.d.ts +4 -0
- package/dist/types/vocabulary/index.d.ts +1 -0
- package/dist/types/vocabulary/invoices.d.ts +1 -1
- package/dist/types/vocabulary/quotes.d.ts +27 -0
- package/package.json +1 -1
|
@@ -2895,8 +2895,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
2895
2895
|
}, import("zod/v4/core").$strict>;
|
|
2896
2896
|
evidence: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2897
2897
|
customer_name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2898
|
-
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2899
2898
|
access_activity_log: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2899
|
+
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2900
2900
|
cancellation_policy_disclosure: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2901
2901
|
cancellation_rebuttal: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2902
2902
|
customer_email_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -3014,8 +3014,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3014
3014
|
}, import("zod/v4/core").$strict>;
|
|
3015
3015
|
evidence: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3016
3016
|
customer_name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3017
|
-
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3018
3017
|
access_activity_log: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3018
|
+
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3019
3019
|
cancellation_policy_disclosure: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3020
3020
|
cancellation_rebuttal: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3021
3021
|
customer_email_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -3119,8 +3119,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3119
3119
|
}, import("zod/v4/core").$strict>;
|
|
3120
3120
|
evidence: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3121
3121
|
customer_name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3122
|
-
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3123
3122
|
access_activity_log: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3123
|
+
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3124
3124
|
cancellation_policy_disclosure: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3125
3125
|
cancellation_rebuttal: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3126
3126
|
customer_email_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -3176,8 +3176,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3176
3176
|
shipping_documentation: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3177
3177
|
uncategorized_file: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3178
3178
|
customer_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3179
|
-
billing_address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3180
3179
|
access_activity_log: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3180
|
+
billing_address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3181
3181
|
cancellation_policy_disclosure: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3182
3182
|
cancellation_rebuttal: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3183
3183
|
customer_email_address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -3251,8 +3251,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3251
3251
|
}, import("zod/v4/core").$strict>;
|
|
3252
3252
|
evidence: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3253
3253
|
customer_name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3254
|
-
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3255
3254
|
access_activity_log: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3255
|
+
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3256
3256
|
cancellation_policy_disclosure: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3257
3257
|
cancellation_rebuttal: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3258
3258
|
customer_email_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -3351,8 +3351,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3351
3351
|
}, import("zod/v4/core").$strict>;
|
|
3352
3352
|
evidence: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3353
3353
|
customer_name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3354
|
-
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3355
3354
|
access_activity_log: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3355
|
+
billing_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3356
3356
|
cancellation_policy_disclosure: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3357
3357
|
cancellation_rebuttal: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3358
3358
|
customer_email_address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -91,6 +91,9 @@ export declare const ERROR_CODE_DESCRIPTIONS: {
|
|
|
91
91
|
readonly invoice_not_editable: "The invoice is finalized and can no longer be edited.";
|
|
92
92
|
readonly invoice_unexpected_state: "The invoice is in a status that does not allow this operation.";
|
|
93
93
|
readonly invoice_no_customer_line_items: "The invoice has no line items to finalize.";
|
|
94
|
+
readonly quote_not_editable: "Only a draft quote can be edited.";
|
|
95
|
+
readonly quote_unexpected_state: "The quote's status does not allow this.";
|
|
96
|
+
readonly quote_expired: "The quote expired.";
|
|
94
97
|
readonly invoice_payment_intent_requires_action: "The invoice's payment needs the customer to act (a card challenge).";
|
|
95
98
|
readonly subscription_unexpected_state: "The subscription is in a status that does not allow this operation.";
|
|
96
99
|
readonly customer_currency_mismatch: "The currency differs from the customer's billing currency.";
|
|
@@ -116,6 +116,10 @@ export declare const WEBHOOK_EVENT_OBJECTS: {
|
|
|
116
116
|
readonly 'billing_portal.configuration.created': "billing_portal.configuration";
|
|
117
117
|
readonly 'billing_portal.configuration.updated': "billing_portal.configuration";
|
|
118
118
|
readonly 'billing_portal.session.created': "billing_portal.session";
|
|
119
|
+
readonly 'quote.created': "quote";
|
|
120
|
+
readonly 'quote.finalized': "quote";
|
|
121
|
+
readonly 'quote.accepted': "quote";
|
|
122
|
+
readonly 'quote.canceled': "quote";
|
|
119
123
|
readonly 'tax.assessment.created': "tax.assessment";
|
|
120
124
|
readonly 'tax.review_item.created': "tax.review_item";
|
|
121
125
|
readonly 'tax.review_item.updated': "tax.review_item";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const INVOICE_STATUSES: readonly ["draft", "open", "paid", "void", "uncollectible"];
|
|
2
2
|
export type InvoiceStatus = (typeof INVOICE_STATUSES)[number];
|
|
3
3
|
/** Why an invoice exists. */
|
|
4
|
-
export declare const INVOICE_BILLING_REASONS: readonly ["manual", "subscription_create", "subscription_cycle", "subscription_update", "subscription_cancel", "upcoming"];
|
|
4
|
+
export declare const INVOICE_BILLING_REASONS: readonly ["manual", "subscription_create", "subscription_cycle", "subscription_update", "subscription_cancel", "upcoming", "quote_accept"];
|
|
5
5
|
export type InvoiceBillingReason = (typeof INVOICE_BILLING_REASONS)[number];
|
|
6
6
|
/**
|
|
7
7
|
* `automatic_tax.status` — Peable Tax (ADR 0011) is computed before an invoice
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a quote stands — Stripe's four.
|
|
3
|
+
*
|
|
4
|
+
* - `draft` — being written; the only status a quote can be edited in.
|
|
5
|
+
* - `open` — finalized: numbered, priced and taxed, waiting for the
|
|
6
|
+
* customer's answer until `expires_at`.
|
|
7
|
+
* - `accepted` — terminal: the native billing engine made its invoice (one-time
|
|
8
|
+
* lines) or its subscription and first invoice (recurring lines).
|
|
9
|
+
* - `canceled` — terminal: cancelled by the merchant, or expired while open.
|
|
10
|
+
*/
|
|
11
|
+
export declare const QUOTE_STATUSES: readonly ["draft", "open", "accepted", "canceled"];
|
|
12
|
+
export type QuoteStatus = (typeof QUOTE_STATUSES)[number];
|
|
13
|
+
/** Bounds a quote is checked against. */
|
|
14
|
+
export declare const QUOTE_LIMITS: {
|
|
15
|
+
/** Lines on one quote — a subscription's item limit. */
|
|
16
|
+
readonly lineItemsMax: 20;
|
|
17
|
+
readonly quantityMax: 1000000;
|
|
18
|
+
/** `header` and `footer`; `description` is 1500 like an invoice's. */
|
|
19
|
+
readonly headerMax: 50;
|
|
20
|
+
readonly footerMax: 500;
|
|
21
|
+
readonly descriptionMax: 1500;
|
|
22
|
+
/** A quote expires 30 days after it is created unless `expires_at` says otherwise (Stripe's default). */
|
|
23
|
+
readonly defaultExpiryDays: 30;
|
|
24
|
+
/** `expires_at` at most this far ahead. */
|
|
25
|
+
readonly expiryMaxDays: 365;
|
|
26
|
+
readonly trialPeriodDaysMax: 730;
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peable.to/contracts",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "The Peable wire, declared once: Zod contracts of every public route, the OpenAPI 3.1 generator and the closed value sets (ADR 0014 D5).",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|