@peable.to/contracts 2.0.0 → 3.1.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/catalog/index.js +1 -5
- package/dist/cjs/resources/checkout/checkoutSessions.js +0 -4
- package/dist/cjs/resources/events/events.js +1 -32
- package/dist/cjs/resources/events/webhookDeliveries.js +1 -1
- package/dist/cjs/resources/events/webhookEndpoints.js +1 -1
- package/dist/cjs/resources/payments/disputes.js +16 -0
- package/dist/cjs/resources/payments/refunds.js +46 -11
- package/dist/cjs/vocabulary/catalog.js +1 -17
- package/dist/cjs/vocabulary/errors.js +0 -13
- package/dist/cjs/vocabulary/events.js +5 -1
- package/dist/esm/resources/catalog/index.js +1 -5
- package/dist/esm/resources/checkout/checkoutSessions.js +0 -4
- package/dist/esm/resources/events/events.js +0 -31
- package/dist/esm/resources/events/webhookDeliveries.js +1 -1
- package/dist/esm/resources/events/webhookEndpoints.js +1 -1
- package/dist/esm/resources/payments/disputes.js +16 -0
- package/dist/esm/resources/payments/refunds.js +46 -11
- package/dist/esm/vocabulary/catalog.js +0 -16
- package/dist/esm/vocabulary/errors.js +0 -13
- package/dist/esm/vocabulary/events.js +5 -1
- package/dist/types/resources/catalog/index.d.ts +1 -851
- package/dist/types/resources/checkout/checkoutSessions.d.ts +13 -61
- package/dist/types/resources/checkout/index.d.ts +10 -46
- package/dist/types/resources/connect/balance.d.ts +5 -5
- package/dist/types/resources/connect/index.d.ts +4 -4
- package/dist/types/resources/connect/payouts.d.ts +2 -2
- package/dist/types/resources/events/events.d.ts +0 -22
- package/dist/types/resources/events/index.d.ts +7 -15
- package/dist/types/resources/events/webhookDeliveries.d.ts +0 -3
- package/dist/types/resources/events/webhookEndpoints.d.ts +11 -16
- package/dist/types/resources/payments/disputes.d.ts +35 -0
- package/dist/types/resources/payments/index.d.ts +82 -10
- package/dist/types/resources/payments/paymentIntents.d.ts +10 -10
- package/dist/types/resources/payments/refunds.d.ts +56 -5
- package/dist/types/resources/payments/testHelpers.d.ts +1 -1
- package/dist/types/resources/tax/index.d.ts +1 -1
- package/dist/types/resources/tax/registrations.d.ts +2 -2
- package/dist/types/vocabulary/catalog.d.ts +0 -9
- package/dist/types/vocabulary/errors.d.ts +0 -13
- package/dist/types/vocabulary/events.d.ts +5 -2
- package/package.json +1 -1
- package/dist/cjs/resources/catalog/billing.js +0 -753
- package/dist/esm/resources/catalog/billing.js +0 -750
- package/dist/types/resources/catalog/billing.d.ts +0 -1723
|
@@ -176,8 +176,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
176
176
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
177
177
|
duplicate: "duplicate";
|
|
178
178
|
fraudulent: "fraudulent";
|
|
179
|
-
automatic: "automatic";
|
|
180
179
|
abandoned: "abandoned";
|
|
180
|
+
automatic: "automatic";
|
|
181
181
|
requested_by_customer: "requested_by_customer";
|
|
182
182
|
underpaid: "underpaid";
|
|
183
183
|
}>>;
|
|
@@ -358,8 +358,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
358
358
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
359
359
|
duplicate: "duplicate";
|
|
360
360
|
fraudulent: "fraudulent";
|
|
361
|
-
automatic: "automatic";
|
|
362
361
|
abandoned: "abandoned";
|
|
362
|
+
automatic: "automatic";
|
|
363
363
|
requested_by_customer: "requested_by_customer";
|
|
364
364
|
underpaid: "underpaid";
|
|
365
365
|
}>>;
|
|
@@ -521,8 +521,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
521
521
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
522
522
|
duplicate: "duplicate";
|
|
523
523
|
fraudulent: "fraudulent";
|
|
524
|
-
automatic: "automatic";
|
|
525
524
|
abandoned: "abandoned";
|
|
525
|
+
automatic: "automatic";
|
|
526
526
|
requested_by_customer: "requested_by_customer";
|
|
527
527
|
underpaid: "underpaid";
|
|
528
528
|
}>>;
|
|
@@ -698,8 +698,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
698
698
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
699
699
|
duplicate: "duplicate";
|
|
700
700
|
fraudulent: "fraudulent";
|
|
701
|
-
automatic: "automatic";
|
|
702
701
|
abandoned: "abandoned";
|
|
702
|
+
automatic: "automatic";
|
|
703
703
|
requested_by_customer: "requested_by_customer";
|
|
704
704
|
underpaid: "underpaid";
|
|
705
705
|
}>>;
|
|
@@ -905,8 +905,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
905
905
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
906
906
|
duplicate: "duplicate";
|
|
907
907
|
fraudulent: "fraudulent";
|
|
908
|
-
automatic: "automatic";
|
|
909
908
|
abandoned: "abandoned";
|
|
909
|
+
automatic: "automatic";
|
|
910
910
|
requested_by_customer: "requested_by_customer";
|
|
911
911
|
underpaid: "underpaid";
|
|
912
912
|
}>>;
|
|
@@ -1066,8 +1066,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1066
1066
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1067
1067
|
duplicate: "duplicate";
|
|
1068
1068
|
fraudulent: "fraudulent";
|
|
1069
|
-
automatic: "automatic";
|
|
1070
1069
|
abandoned: "abandoned";
|
|
1070
|
+
automatic: "automatic";
|
|
1071
1071
|
requested_by_customer: "requested_by_customer";
|
|
1072
1072
|
underpaid: "underpaid";
|
|
1073
1073
|
}>>;
|
|
@@ -1232,8 +1232,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1232
1232
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1233
1233
|
duplicate: "duplicate";
|
|
1234
1234
|
fraudulent: "fraudulent";
|
|
1235
|
-
automatic: "automatic";
|
|
1236
1235
|
abandoned: "abandoned";
|
|
1236
|
+
automatic: "automatic";
|
|
1237
1237
|
requested_by_customer: "requested_by_customer";
|
|
1238
1238
|
underpaid: "underpaid";
|
|
1239
1239
|
}>>;
|
|
@@ -1391,8 +1391,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1391
1391
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1392
1392
|
duplicate: "duplicate";
|
|
1393
1393
|
fraudulent: "fraudulent";
|
|
1394
|
-
automatic: "automatic";
|
|
1395
1394
|
abandoned: "abandoned";
|
|
1395
|
+
automatic: "automatic";
|
|
1396
1396
|
requested_by_customer: "requested_by_customer";
|
|
1397
1397
|
underpaid: "underpaid";
|
|
1398
1398
|
}>>;
|
|
@@ -1550,8 +1550,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
1550
1550
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1551
1551
|
duplicate: "duplicate";
|
|
1552
1552
|
fraudulent: "fraudulent";
|
|
1553
|
-
automatic: "automatic";
|
|
1554
1553
|
abandoned: "abandoned";
|
|
1554
|
+
automatic: "automatic";
|
|
1555
1555
|
requested_by_customer: "requested_by_customer";
|
|
1556
1556
|
underpaid: "underpaid";
|
|
1557
1557
|
}>>;
|
|
@@ -2306,6 +2306,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
2306
2306
|
object: import("zod").ZodLiteral<"settlement">;
|
|
2307
2307
|
livemode: import("zod").ZodBoolean;
|
|
2308
2308
|
payment_intent: import("zod").ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>;
|
|
2309
|
+
refund: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">>>>;
|
|
2310
|
+
dispute: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">>>>;
|
|
2309
2311
|
status: import("zod").ZodEnum<{
|
|
2310
2312
|
unknown: "unknown";
|
|
2311
2313
|
pending: "pending";
|
|
@@ -2320,6 +2322,41 @@ export declare const paymentsRoutes: readonly [{
|
|
|
2320
2322
|
}, import("zod/v4/core").$strict>;
|
|
2321
2323
|
readonly sdk: "refunds.settlement";
|
|
2322
2324
|
readonly expandable: "settlement";
|
|
2325
|
+
}, {
|
|
2326
|
+
readonly operationId: "retrieveRefundSettlement";
|
|
2327
|
+
readonly method: "get";
|
|
2328
|
+
readonly path: "/v1/refunds/{id}/settlement";
|
|
2329
|
+
readonly tag: "Refunds";
|
|
2330
|
+
readonly summary: "Retrieve a refund's settlement";
|
|
2331
|
+
readonly description: "What the refund took off the settlement balance — `gross`, `fee`, a negative `net` — in the settlement currency, read live from the provider. A missing figure is `null` with a `status`, never `0`; a refund that failed or was canceled is `unknown`.";
|
|
2332
|
+
readonly auth: "service";
|
|
2333
|
+
readonly scope: "payments:read";
|
|
2334
|
+
readonly params: {
|
|
2335
|
+
id: string;
|
|
2336
|
+
};
|
|
2337
|
+
readonly query: import("zod").ZodObject<{
|
|
2338
|
+
expand: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodPipe<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>, import("zod").ZodTransform<string[], string | string[]>>, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
2339
|
+
}, import("zod/v4/core").$strict>;
|
|
2340
|
+
readonly response: import("zod").ZodObject<{
|
|
2341
|
+
object: import("zod").ZodLiteral<"settlement">;
|
|
2342
|
+
livemode: import("zod").ZodBoolean;
|
|
2343
|
+
payment_intent: import("zod").ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>;
|
|
2344
|
+
refund: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">>>>;
|
|
2345
|
+
dispute: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">>>>;
|
|
2346
|
+
status: import("zod").ZodEnum<{
|
|
2347
|
+
unknown: "unknown";
|
|
2348
|
+
pending: "pending";
|
|
2349
|
+
available: "available";
|
|
2350
|
+
}>;
|
|
2351
|
+
gross: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2352
|
+
fee: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2353
|
+
net: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2354
|
+
currency: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2355
|
+
available_on: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
2356
|
+
exchange_rate: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
2357
|
+
}, import("zod/v4/core").$strict>;
|
|
2358
|
+
readonly sdk: "refunds.refundSettlement";
|
|
2359
|
+
readonly expandable: "settlement";
|
|
2323
2360
|
}, {
|
|
2324
2361
|
readonly operationId: "searchRefunds";
|
|
2325
2362
|
readonly method: "get";
|
|
@@ -2958,6 +2995,41 @@ export declare const paymentsRoutes: readonly [{
|
|
|
2958
2995
|
updated_at: import("zod").ZodNumber;
|
|
2959
2996
|
}, import("zod/v4/core").$strict>;
|
|
2960
2997
|
readonly sdk: "disputes.close";
|
|
2998
|
+
}, {
|
|
2999
|
+
readonly operationId: "retrieveDisputeSettlement";
|
|
3000
|
+
readonly method: "get";
|
|
3001
|
+
readonly path: "/v1/disputes/{disputeId}/settlement";
|
|
3002
|
+
readonly tag: "Disputes";
|
|
3003
|
+
readonly summary: "Retrieve a dispute's settlement";
|
|
3004
|
+
readonly description: "What the dispute WITHDREW from the settlement balance — `gross` the principal, `fee` the dispute fee, a negative `net` — in the settlement currency, read live from the provider. An inquiry moves no money: `unknown`, every figure `null`, never `0`. A reinstatement after a won dispute is not this figure.";
|
|
3005
|
+
readonly auth: "service";
|
|
3006
|
+
readonly scope: "payments:read";
|
|
3007
|
+
readonly params: {
|
|
3008
|
+
disputeId: string;
|
|
3009
|
+
};
|
|
3010
|
+
readonly query: import("zod").ZodObject<{
|
|
3011
|
+
expand: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodPipe<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>, import("zod").ZodTransform<string[], string | string[]>>, import("zod").ZodArray<import("zod").ZodString>>>;
|
|
3012
|
+
}, import("zod/v4/core").$strict>;
|
|
3013
|
+
readonly response: import("zod").ZodObject<{
|
|
3014
|
+
object: import("zod").ZodLiteral<"settlement">;
|
|
3015
|
+
livemode: import("zod").ZodBoolean;
|
|
3016
|
+
payment_intent: import("zod").ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>;
|
|
3017
|
+
refund: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">>>>;
|
|
3018
|
+
dispute: import("zod").ZodNullable<import("zod").ZodType<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">, import("zod/v4/core").$ZodTypeInternals<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">>>>;
|
|
3019
|
+
status: import("zod").ZodEnum<{
|
|
3020
|
+
unknown: "unknown";
|
|
3021
|
+
pending: "pending";
|
|
3022
|
+
available: "available";
|
|
3023
|
+
}>;
|
|
3024
|
+
gross: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3025
|
+
fee: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3026
|
+
net: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3027
|
+
currency: import("zod").ZodNullable<import("zod").ZodString>;
|
|
3028
|
+
available_on: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
3029
|
+
exchange_rate: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
3030
|
+
}, import("zod/v4/core").$strict>;
|
|
3031
|
+
readonly sdk: "disputes.settlement";
|
|
3032
|
+
readonly expandable: "settlement";
|
|
2961
3033
|
}, {
|
|
2962
3034
|
readonly operationId: "createSetupIntent";
|
|
2963
3035
|
readonly method: "post";
|
|
@@ -3457,8 +3529,8 @@ export declare const paymentsRoutes: readonly [{
|
|
|
3457
3529
|
cancellation_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
3458
3530
|
duplicate: "duplicate";
|
|
3459
3531
|
fraudulent: "fraudulent";
|
|
3460
|
-
automatic: "automatic";
|
|
3461
3532
|
abandoned: "abandoned";
|
|
3533
|
+
automatic: "automatic";
|
|
3462
3534
|
requested_by_customer: "requested_by_customer";
|
|
3463
3535
|
underpaid: "underpaid";
|
|
3464
3536
|
}>>;
|
|
@@ -174,8 +174,8 @@ export declare const paymentIntentSchema: z.ZodObject<{
|
|
|
174
174
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
175
175
|
duplicate: "duplicate";
|
|
176
176
|
fraudulent: "fraudulent";
|
|
177
|
-
automatic: "automatic";
|
|
178
177
|
abandoned: "abandoned";
|
|
178
|
+
automatic: "automatic";
|
|
179
179
|
requested_by_customer: "requested_by_customer";
|
|
180
180
|
underpaid: "underpaid";
|
|
181
181
|
}>>;
|
|
@@ -640,8 +640,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
640
640
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
641
641
|
duplicate: "duplicate";
|
|
642
642
|
fraudulent: "fraudulent";
|
|
643
|
-
automatic: "automatic";
|
|
644
643
|
abandoned: "abandoned";
|
|
644
|
+
automatic: "automatic";
|
|
645
645
|
requested_by_customer: "requested_by_customer";
|
|
646
646
|
underpaid: "underpaid";
|
|
647
647
|
}>>;
|
|
@@ -822,8 +822,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
822
822
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
823
823
|
duplicate: "duplicate";
|
|
824
824
|
fraudulent: "fraudulent";
|
|
825
|
-
automatic: "automatic";
|
|
826
825
|
abandoned: "abandoned";
|
|
826
|
+
automatic: "automatic";
|
|
827
827
|
requested_by_customer: "requested_by_customer";
|
|
828
828
|
underpaid: "underpaid";
|
|
829
829
|
}>>;
|
|
@@ -985,8 +985,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
985
985
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
986
986
|
duplicate: "duplicate";
|
|
987
987
|
fraudulent: "fraudulent";
|
|
988
|
-
automatic: "automatic";
|
|
989
988
|
abandoned: "abandoned";
|
|
989
|
+
automatic: "automatic";
|
|
990
990
|
requested_by_customer: "requested_by_customer";
|
|
991
991
|
underpaid: "underpaid";
|
|
992
992
|
}>>;
|
|
@@ -1162,8 +1162,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1162
1162
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1163
1163
|
duplicate: "duplicate";
|
|
1164
1164
|
fraudulent: "fraudulent";
|
|
1165
|
-
automatic: "automatic";
|
|
1166
1165
|
abandoned: "abandoned";
|
|
1166
|
+
automatic: "automatic";
|
|
1167
1167
|
requested_by_customer: "requested_by_customer";
|
|
1168
1168
|
underpaid: "underpaid";
|
|
1169
1169
|
}>>;
|
|
@@ -1369,8 +1369,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1369
1369
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1370
1370
|
duplicate: "duplicate";
|
|
1371
1371
|
fraudulent: "fraudulent";
|
|
1372
|
-
automatic: "automatic";
|
|
1373
1372
|
abandoned: "abandoned";
|
|
1373
|
+
automatic: "automatic";
|
|
1374
1374
|
requested_by_customer: "requested_by_customer";
|
|
1375
1375
|
underpaid: "underpaid";
|
|
1376
1376
|
}>>;
|
|
@@ -1530,8 +1530,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1530
1530
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1531
1531
|
duplicate: "duplicate";
|
|
1532
1532
|
fraudulent: "fraudulent";
|
|
1533
|
-
automatic: "automatic";
|
|
1534
1533
|
abandoned: "abandoned";
|
|
1534
|
+
automatic: "automatic";
|
|
1535
1535
|
requested_by_customer: "requested_by_customer";
|
|
1536
1536
|
underpaid: "underpaid";
|
|
1537
1537
|
}>>;
|
|
@@ -1696,8 +1696,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1696
1696
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1697
1697
|
duplicate: "duplicate";
|
|
1698
1698
|
fraudulent: "fraudulent";
|
|
1699
|
-
automatic: "automatic";
|
|
1700
1699
|
abandoned: "abandoned";
|
|
1700
|
+
automatic: "automatic";
|
|
1701
1701
|
requested_by_customer: "requested_by_customer";
|
|
1702
1702
|
underpaid: "underpaid";
|
|
1703
1703
|
}>>;
|
|
@@ -1855,8 +1855,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
1855
1855
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
1856
1856
|
duplicate: "duplicate";
|
|
1857
1857
|
fraudulent: "fraudulent";
|
|
1858
|
-
automatic: "automatic";
|
|
1859
1858
|
abandoned: "abandoned";
|
|
1859
|
+
automatic: "automatic";
|
|
1860
1860
|
requested_by_customer: "requested_by_customer";
|
|
1861
1861
|
underpaid: "underpaid";
|
|
1862
1862
|
}>>;
|
|
@@ -2014,8 +2014,8 @@ export declare const paymentIntentRoutes: readonly [{
|
|
|
2014
2014
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
2015
2015
|
duplicate: "duplicate";
|
|
2016
2016
|
fraudulent: "fraudulent";
|
|
2017
|
-
automatic: "automatic";
|
|
2018
2017
|
abandoned: "abandoned";
|
|
2018
|
+
automatic: "automatic";
|
|
2019
2019
|
requested_by_customer: "requested_by_customer";
|
|
2020
2020
|
underpaid: "underpaid";
|
|
2021
2021
|
}>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type Expand } from '../../common/objects';
|
|
3
3
|
/**
|
|
4
|
-
* Refunds (`re_…`) and a payment
|
|
4
|
+
* Refunds (`re_…`) and the settlement figures of a payment, a refund or a
|
|
5
|
+
* dispute. The provider's own
|
|
5
6
|
* refund id never appears: a merchant integrates against Peable and never
|
|
6
7
|
* learns which acquirer sat behind it (ADR 0001 D3).
|
|
7
8
|
*/
|
|
@@ -49,15 +50,28 @@ export declare const refundSchema: z.ZodObject<{
|
|
|
49
50
|
}, z.core.$strict>;
|
|
50
51
|
export type Refund = Expand<z.output<typeof refundSchema>>;
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* One movement of the settlement balance, as the PROVIDER reports it: what a
|
|
54
|
+
* payment brought in (`GET /v1/payment_intents/{intentId}/settlement`), what a
|
|
55
|
+
* refund took out (`GET /v1/refunds/{id}/settlement`) or what a dispute
|
|
56
|
+
* withdrew (`GET /v1/disputes/{disputeId}/settlement`). `refund` and `dispute`
|
|
57
|
+
* say which: both `null` for a payment's.
|
|
58
|
+
*
|
|
59
|
+
* Every figure is nullable and that is the contract: "the fee was zero" and
|
|
60
|
+
* "the fee is not known yet" are different facts, and `status` says which
|
|
61
|
+
* produced the nulls. It reports what the provider took; it attributes that
|
|
62
|
+
* cost to nobody.
|
|
63
|
+
*
|
|
64
|
+
* The signs: `gross` is the MAGNITUDE of the movement, `fee` the provider's fee
|
|
65
|
+
* on it (positive when charged, negative when returned), `net` its SIGNED
|
|
66
|
+
* effect on the balance — so `net = gross − fee` for a payment and
|
|
67
|
+
* `net = −gross − fee` for a refund or a dispute.
|
|
56
68
|
*/
|
|
57
69
|
export declare const settlementSchema: z.ZodObject<{
|
|
58
70
|
object: z.ZodLiteral<"settlement">;
|
|
59
71
|
livemode: z.ZodBoolean;
|
|
60
72
|
payment_intent: z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>;
|
|
73
|
+
refund: z.ZodNullable<z.ZodType<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">, z.core.$ZodTypeInternals<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">>>>;
|
|
74
|
+
dispute: z.ZodNullable<z.ZodType<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">, z.core.$ZodTypeInternals<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">>>>;
|
|
61
75
|
status: z.ZodEnum<{
|
|
62
76
|
unknown: "unknown";
|
|
63
77
|
pending: "pending";
|
|
@@ -601,6 +615,8 @@ export declare const refundRoutes: readonly [{
|
|
|
601
615
|
object: z.ZodLiteral<"settlement">;
|
|
602
616
|
livemode: z.ZodBoolean;
|
|
603
617
|
payment_intent: z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>;
|
|
618
|
+
refund: z.ZodNullable<z.ZodType<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">, z.core.$ZodTypeInternals<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">>>>;
|
|
619
|
+
dispute: z.ZodNullable<z.ZodType<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">, z.core.$ZodTypeInternals<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">>>>;
|
|
604
620
|
status: z.ZodEnum<{
|
|
605
621
|
unknown: "unknown";
|
|
606
622
|
pending: "pending";
|
|
@@ -615,6 +631,41 @@ export declare const refundRoutes: readonly [{
|
|
|
615
631
|
}, z.core.$strict>;
|
|
616
632
|
readonly sdk: "refunds.settlement";
|
|
617
633
|
readonly expandable: "settlement";
|
|
634
|
+
}, {
|
|
635
|
+
readonly operationId: "retrieveRefundSettlement";
|
|
636
|
+
readonly method: "get";
|
|
637
|
+
readonly path: "/v1/refunds/{id}/settlement";
|
|
638
|
+
readonly tag: "Refunds";
|
|
639
|
+
readonly summary: "Retrieve a refund's settlement";
|
|
640
|
+
readonly description: "What the refund took off the settlement balance — `gross`, `fee`, a negative `net` — in the settlement currency, read live from the provider. A missing figure is `null` with a `status`, never `0`; a refund that failed or was canceled is `unknown`.";
|
|
641
|
+
readonly auth: "service";
|
|
642
|
+
readonly scope: "payments:read";
|
|
643
|
+
readonly params: {
|
|
644
|
+
id: string;
|
|
645
|
+
};
|
|
646
|
+
readonly query: z.ZodObject<{
|
|
647
|
+
expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
|
|
648
|
+
}, z.core.$strict>;
|
|
649
|
+
readonly response: z.ZodObject<{
|
|
650
|
+
object: z.ZodLiteral<"settlement">;
|
|
651
|
+
livemode: z.ZodBoolean;
|
|
652
|
+
payment_intent: z.ZodType<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_intent">, string | import("../..").Ref<"payment_intent">>>;
|
|
653
|
+
refund: z.ZodNullable<z.ZodType<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">, z.core.$ZodTypeInternals<string | import("../..").Ref<"refund">, string | import("../..").Ref<"refund">>>>;
|
|
654
|
+
dispute: z.ZodNullable<z.ZodType<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">, z.core.$ZodTypeInternals<string | import("../..").Ref<"dispute">, string | import("../..").Ref<"dispute">>>>;
|
|
655
|
+
status: z.ZodEnum<{
|
|
656
|
+
unknown: "unknown";
|
|
657
|
+
pending: "pending";
|
|
658
|
+
available: "available";
|
|
659
|
+
}>;
|
|
660
|
+
gross: z.ZodNullable<z.ZodString>;
|
|
661
|
+
fee: z.ZodNullable<z.ZodString>;
|
|
662
|
+
net: z.ZodNullable<z.ZodString>;
|
|
663
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
664
|
+
available_on: z.ZodNullable<z.ZodNumber>;
|
|
665
|
+
exchange_rate: z.ZodNullable<z.ZodNumber>;
|
|
666
|
+
}, z.core.$strict>;
|
|
667
|
+
readonly sdk: "refunds.refundSettlement";
|
|
668
|
+
readonly expandable: "settlement";
|
|
618
669
|
}, {
|
|
619
670
|
readonly operationId: "searchRefunds";
|
|
620
671
|
readonly method: "get";
|
|
@@ -118,8 +118,8 @@ export declare const paymentIntentTestHelperRoutes: readonly [{
|
|
|
118
118
|
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
119
119
|
duplicate: "duplicate";
|
|
120
120
|
fraudulent: "fraudulent";
|
|
121
|
-
automatic: "automatic";
|
|
122
121
|
abandoned: "abandoned";
|
|
122
|
+
automatic: "automatic";
|
|
123
123
|
requested_by_customer: "requested_by_customer";
|
|
124
124
|
underpaid: "underpaid";
|
|
125
125
|
}>>;
|
|
@@ -108,9 +108,9 @@ export declare const taxRoutes: readonly [{
|
|
|
108
108
|
expires_at: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
109
109
|
status: import("zod").ZodEnum<{
|
|
110
110
|
active: "active";
|
|
111
|
-
expired: "expired";
|
|
112
111
|
pending_approval: "pending_approval";
|
|
113
112
|
scheduled: "scheduled";
|
|
113
|
+
expired: "expired";
|
|
114
114
|
}>;
|
|
115
115
|
approved_at: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
116
116
|
provider_registration_ref: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -23,9 +23,9 @@ export declare const taxRegistrationSchema: z.ZodObject<{
|
|
|
23
23
|
expires_at: z.ZodNullable<z.ZodNumber>;
|
|
24
24
|
status: z.ZodEnum<{
|
|
25
25
|
active: "active";
|
|
26
|
-
expired: "expired";
|
|
27
26
|
pending_approval: "pending_approval";
|
|
28
27
|
scheduled: "scheduled";
|
|
28
|
+
expired: "expired";
|
|
29
29
|
}>;
|
|
30
30
|
approved_at: z.ZodNullable<z.ZodNumber>;
|
|
31
31
|
provider_registration_ref: z.ZodNullable<z.ZodString>;
|
|
@@ -88,9 +88,9 @@ export declare const taxRegistrationRoutes: readonly [{
|
|
|
88
88
|
expires_at: z.ZodNullable<z.ZodNumber>;
|
|
89
89
|
status: z.ZodEnum<{
|
|
90
90
|
active: "active";
|
|
91
|
-
expired: "expired";
|
|
92
91
|
pending_approval: "pending_approval";
|
|
93
92
|
scheduled: "scheduled";
|
|
93
|
+
expired: "expired";
|
|
94
94
|
}>;
|
|
95
95
|
approved_at: z.ZodNullable<z.ZodNumber>;
|
|
96
96
|
provider_registration_ref: z.ZodNullable<z.ZodString>;
|
|
@@ -86,12 +86,3 @@ export declare const METER_AGGREGATIONS: readonly ["sum", "count", "last"];
|
|
|
86
86
|
export type MeterAggregation = (typeof METER_AGGREGATIONS)[number];
|
|
87
87
|
export declare const METER_STATUSES: readonly ["active", "inactive"];
|
|
88
88
|
export type MeterStatus = (typeof METER_STATUSES)[number];
|
|
89
|
-
/** A provider subscription's status, as the recurring transport observes it. */
|
|
90
|
-
export declare const BILLING_SUBSCRIPTION_STATUSES: readonly ["incomplete", "incomplete_expired", "trialing", "active", "past_due", "canceled", "unpaid", "paused"];
|
|
91
|
-
export type BillingSubscriptionStatus = (typeof BILLING_SUBSCRIPTION_STATUSES)[number];
|
|
92
|
-
/** `fiat` (Stripe and any further provider) or `faircoin` (native, to the merchant's watch-only wallet). */
|
|
93
|
-
export declare const BILLING_RAIL_SETTLEMENTS: readonly ["fiat", "faircoin"];
|
|
94
|
-
export type BillingRailSettlement = (typeof BILLING_RAIL_SETTLEMENTS)[number];
|
|
95
|
-
/** `automatic`: the provider charges each period. `payer_initiated`: each period is an explicit payment. */
|
|
96
|
-
export declare const BILLING_RAIL_RENEWALS: readonly ["automatic", "payer_initiated"];
|
|
97
|
-
export type BillingRailRenewal = (typeof BILLING_RAIL_RENEWALS)[number];
|
|
@@ -21,19 +21,15 @@ export declare const ERROR_CODE_DESCRIPTIONS: {
|
|
|
21
21
|
readonly account_invalid: "The `Peable-Account` header names no connected account of this platform.";
|
|
22
22
|
readonly account_missing: "The merchant has no account object yet.";
|
|
23
23
|
readonly amount_not_representable: "The amount does not fit the currency or the rail.";
|
|
24
|
-
readonly billing_not_enabled: "Billing is not enabled for this merchant.";
|
|
25
|
-
readonly billing_provider_unavailable: "The billing provider could not be reached; retry.";
|
|
26
24
|
readonly domain_taken: "The domain is already registered by another merchant.";
|
|
27
25
|
readonly file_too_large: "The uploaded file is larger than its purpose allows.";
|
|
28
26
|
readonly file_unavailable: "The file exists but its contents cannot be served right now.";
|
|
29
27
|
readonly idempotency_error: "The `Idempotency-Key` was used with a different request, or its first request is still running.";
|
|
30
28
|
readonly idempotency_key_invalid: "The `Idempotency-Key` header is not a valid key.";
|
|
31
29
|
readonly insufficient_scope: "The credential is valid but was not granted the Oxy scope this route requires (`payments:read`, `payments:write`, …); `message` names it.";
|
|
32
|
-
readonly invalid_billing_request: "The billing request is not valid for this subscription or offer.";
|
|
33
30
|
readonly keyless_recipient: "The recipient has no receive key, so no address can be derived for them.";
|
|
34
31
|
readonly link_not_found: "The link does not exist or is no longer active.";
|
|
35
32
|
readonly live_payments_gated: "Live payments are not enabled for this application yet.";
|
|
36
|
-
readonly local_test_request_required: "This test helper only answers a local test request.";
|
|
37
33
|
readonly parameter_invalid: "A parameter is invalid; `param` names it.";
|
|
38
34
|
readonly parameter_missing: "A required parameter is missing; `param` names it.";
|
|
39
35
|
readonly parameter_unknown: "The request carries a parameter this route does not accept; `param` names it.";
|
|
@@ -62,10 +58,7 @@ export declare const ERROR_CODE_DESCRIPTIONS: {
|
|
|
62
58
|
readonly customer_location_invalid: "The tax provider could not use the customer's location.";
|
|
63
59
|
readonly dispute_already_submitted: "Evidence for this dispute has already been submitted; it is one shot.";
|
|
64
60
|
readonly dispute_not_answerable: "The dispute is in a status that no longer accepts evidence.";
|
|
65
|
-
readonly idempotency_conflict: "The same operation key was used for a different billing request.";
|
|
66
|
-
readonly identity_conflict: "The billing identity already belongs to another customer or subscription.";
|
|
67
61
|
readonly in_progress: "The same operation is still running; retry with the same key.";
|
|
68
|
-
readonly invalid_provider_response: "The provider answered with something Peable cannot trust; the operation was not applied.";
|
|
69
62
|
readonly invalid_registration: "The tax registration is not valid.";
|
|
70
63
|
readonly invalid_registration_declaration: "The tax registration declaration is not valid.";
|
|
71
64
|
readonly invalid_tax_code: "The tax code does not exist.";
|
|
@@ -80,12 +73,9 @@ export declare const ERROR_CODE_DESCRIPTIONS: {
|
|
|
80
73
|
readonly product_in_use: "The product is referenced by a subscription or a link.";
|
|
81
74
|
readonly promotion_code_invalid: "The promotion code does not exist, is inactive or does not apply.";
|
|
82
75
|
readonly promotion_code_taken: "Another active promotion code already uses this `code`.";
|
|
83
|
-
readonly provider_unavailable: "The payment provider could not be reached; retry.";
|
|
84
76
|
readonly rail_unavailable: "The payment rail this request needs is not available.";
|
|
85
|
-
readonly reconciliation_required: "The billing operation has an unknown outcome at the provider and is being reconciled.";
|
|
86
77
|
readonly registration_immutable: "An approved or ended tax registration cannot be deleted or changed this way; end it instead.";
|
|
87
78
|
readonly resource_already_exists: "An object with this identity already exists.";
|
|
88
|
-
readonly result_expired: "The stored result of this operation has expired.";
|
|
89
79
|
readonly review_item_not_open: "The review item is already resolved or dismissed.";
|
|
90
80
|
readonly rule_set_version_unavailable: "The tax rule set version is not available.";
|
|
91
81
|
readonly subscription_line_invalid: "A subscription line item is not valid for Checkout.";
|
|
@@ -93,9 +83,6 @@ export declare const ERROR_CODE_DESCRIPTIONS: {
|
|
|
93
83
|
readonly tax_calculation_unavailable: "Tax could not be calculated; a covered sale fails closed.";
|
|
94
84
|
readonly tax_provider_registration_mismatch: "The provider's registrations disagree with the ones Peable has approved.";
|
|
95
85
|
readonly tax_settings_not_active: "Tax settings are not active for this merchant.";
|
|
96
|
-
readonly local_test_unavailable: "The local test checkout is not available.";
|
|
97
|
-
readonly local_test_configuration_unavailable: "The local test checkout has no provider configuration.";
|
|
98
|
-
readonly local_test_subscription_unavailable: "The local test subscription cannot be read.";
|
|
99
86
|
readonly rail_mismatch: "The operation does not apply to the rail this payment uses.";
|
|
100
87
|
readonly checkout_session_changed: "The Checkout Session changed while this request ran (a price, a discount, its tax); read it again and retry.";
|
|
101
88
|
readonly checkout_session_locked: "The Checkout Session is being confirmed and cannot change.";
|
|
@@ -54,7 +54,6 @@ export declare const WEBHOOK_EVENT_OBJECTS: {
|
|
|
54
54
|
readonly 'setup_intent.succeeded': "setup_intent";
|
|
55
55
|
readonly 'setup_intent.setup_failed': "setup_intent";
|
|
56
56
|
readonly 'setup_intent.canceled': "setup_intent";
|
|
57
|
-
readonly 'billing.observation.updated': "billing_observation";
|
|
58
57
|
readonly 'connected_account.updated': "connected_account";
|
|
59
58
|
readonly 'product.created': "product";
|
|
60
59
|
readonly 'product.updated': "product";
|
|
@@ -147,8 +146,12 @@ export type WebhookEndpointStatus = (typeof WEBHOOK_ENDPOINT_STATUSES)[number];
|
|
|
147
146
|
* - `delivery_failures` — every delivery to it failed for three days
|
|
148
147
|
* straight, so Peable stopped sending. Re-enabling it (`disabled: false`)
|
|
149
148
|
* starts the clock again.
|
|
149
|
+
* - `url_refused` — its stored `url` breaks the rules a URL is
|
|
150
|
+
* registered under (https in live mode, ports 80/443, no private, loopback
|
|
151
|
+
* or reserved address), judged again before every delivery, so Peable never
|
|
152
|
+
* sent to it. It is re-enabled only together with a `url` that passes.
|
|
150
153
|
*/
|
|
151
|
-
export declare const WEBHOOK_ENDPOINT_DISABLED_REASONS: readonly ["disabled_by_merchant", "delivery_failures"];
|
|
154
|
+
export declare const WEBHOOK_ENDPOINT_DISABLED_REASONS: readonly ["disabled_by_merchant", "delivery_failures", "url_refused"];
|
|
152
155
|
export type WebhookEndpointDisabledReason = (typeof WEBHOOK_ENDPOINT_DISABLED_REASONS)[number];
|
|
153
156
|
/** At most this many endpoints per merchant (per mode). */
|
|
154
157
|
export declare const WEBHOOK_ENDPOINTS_MAX_PER_MERCHANT = 16;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peable.to/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.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",
|