@peable.to/contracts 0.3.0 → 1.0.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/common/address.js +81 -0
- package/dist/cjs/common/envelopes.js +101 -0
- package/dist/cjs/common/objects.js +85 -0
- package/dist/cjs/common/params.js +211 -0
- package/dist/cjs/common/primitives.js +39 -0
- package/dist/cjs/contributions.js +22 -0
- package/dist/cjs/index.js +40 -97
- package/dist/cjs/openapi/document.js +297 -0
- package/dist/cjs/openapi/index.js +7 -0
- package/dist/cjs/openapi/webhooks.js +17 -0
- package/dist/cjs/resources/billingEngine/billingPortal.js +237 -0
- package/dist/cjs/resources/billingEngine/creditNotes.js +189 -0
- package/dist/cjs/resources/billingEngine/customerBalanceTransactions.js +90 -0
- package/dist/cjs/resources/billingEngine/index.js +43 -0
- package/dist/cjs/resources/billingEngine/invoiceItems.js +155 -0
- package/dist/cjs/resources/billingEngine/invoices.js +509 -0
- package/dist/cjs/resources/billingEngine/params.js +43 -0
- package/dist/cjs/resources/billingEngine/public.js +326 -0
- package/dist/cjs/resources/billingEngine/subscriptions.js +476 -0
- package/dist/cjs/resources/catalog/billing.js +755 -0
- package/dist/cjs/resources/catalog/billingSettings.js +131 -0
- package/dist/cjs/resources/catalog/coupons.js +222 -0
- package/dist/cjs/resources/catalog/entitlements.js +257 -0
- package/dist/cjs/resources/catalog/index.js +58 -0
- package/dist/cjs/resources/catalog/meters.js +279 -0
- package/dist/cjs/resources/catalog/prices.js +423 -0
- package/dist/cjs/resources/catalog/products.js +228 -0
- package/dist/cjs/resources/catalog/promotionCodes.js +174 -0
- package/dist/cjs/resources/catalog/shared.js +75 -0
- package/dist/cjs/resources/catalog/testClocks.js +127 -0
- package/dist/cjs/resources/checkout/checkoutSessions.js +582 -0
- package/dist/cjs/resources/checkout/contributions.js +172 -0
- package/dist/cjs/resources/checkout/files.js +133 -0
- package/dist/cjs/resources/checkout/index.js +57 -0
- package/dist/cjs/resources/checkout/merchants.js +290 -0
- package/dist/cjs/resources/checkout/paymentLinks.js +330 -0
- package/dist/cjs/resources/checkout/paymentMethodConfigurations.js +262 -0
- package/dist/cjs/resources/checkout/shared.js +368 -0
- package/dist/cjs/resources/connect/account.js +332 -0
- package/dist/cjs/resources/connect/applicationFees.js +113 -0
- package/dist/cjs/resources/connect/balance.js +212 -0
- package/dist/cjs/resources/connect/connectedAccounts.js +260 -0
- package/dist/cjs/resources/connect/index.js +51 -0
- package/dist/cjs/resources/connect/onboarding.js +82 -0
- package/dist/cjs/resources/connect/payouts.js +196 -0
- package/dist/cjs/resources/connect/reporting.js +235 -0
- package/dist/cjs/resources/connect/requestLogs.js +110 -0
- package/dist/cjs/resources/connect/transfers.js +227 -0
- package/dist/cjs/resources/core/customers.js +194 -0
- package/dist/cjs/resources/core/index.js +23 -0
- package/dist/cjs/resources/core/paymentMethods.js +134 -0
- package/dist/cjs/resources/events/events.js +357 -0
- package/dist/cjs/resources/events/index.js +29 -0
- package/dist/cjs/resources/events/webhookDeliveries.js +93 -0
- package/dist/cjs/resources/events/webhookEndpoints.js +215 -0
- package/dist/cjs/resources/payments/charges.js +157 -0
- package/dist/cjs/resources/payments/disputes.js +204 -0
- package/dist/cjs/resources/payments/index.js +41 -0
- package/dist/cjs/resources/payments/paymentIntents.js +529 -0
- package/dist/cjs/resources/payments/refunds.js +245 -0
- package/dist/cjs/resources/payments/setupIntents.js +158 -0
- package/dist/cjs/resources/payments/social.js +182 -0
- package/dist/cjs/resources/payments/testHelpers.js +39 -0
- package/dist/cjs/resources/tax/assessments.js +217 -0
- package/dist/cjs/resources/tax/businessProfile.js +99 -0
- package/dist/cjs/resources/tax/calculations.js +176 -0
- package/dist/cjs/resources/tax/capabilities.js +42 -0
- package/dist/cjs/resources/tax/codes.js +37 -0
- package/dist/cjs/resources/tax/complianceActions.js +56 -0
- package/dist/cjs/resources/tax/deadlines.js +59 -0
- package/dist/cjs/resources/tax/documents.js +128 -0
- package/dist/cjs/resources/tax/index.js +80 -0
- package/dist/cjs/resources/tax/locationEvidence.js +131 -0
- package/dist/cjs/resources/tax/operatingLocations.js +98 -0
- package/dist/cjs/resources/tax/products.js +67 -0
- package/dist/cjs/resources/tax/registrationDeclarations.js +124 -0
- package/dist/cjs/resources/tax/registrations.js +82 -0
- package/dist/cjs/resources/tax/reports.js +92 -0
- package/dist/cjs/resources/tax/reviewItems.js +116 -0
- package/dist/cjs/resources/tax/ruleSet.js +68 -0
- package/dist/cjs/resources/tax/salesDestinations.js +94 -0
- package/dist/cjs/resources/tax/settings.js +104 -0
- package/dist/cjs/resources/tax/shared.js +62 -0
- package/dist/cjs/resources/tax/transactions.js +102 -0
- package/dist/cjs/route.js +22 -0
- package/dist/cjs/routes.js +31 -0
- package/dist/cjs/vocabulary/billingPortal.js +15 -0
- package/dist/cjs/vocabulary/catalog.js +110 -0
- package/dist/cjs/vocabulary/checkout.js +53 -0
- package/dist/cjs/vocabulary/connect.js +95 -0
- package/dist/cjs/vocabulary/errors.js +174 -0
- package/dist/cjs/vocabulary/events.js +176 -0
- package/dist/cjs/vocabulary/files.js +44 -0
- package/dist/cjs/vocabulary/index.js +37 -0
- package/dist/cjs/vocabulary/invoices.js +52 -0
- package/dist/cjs/vocabulary/lists.js +22 -0
- package/dist/cjs/vocabulary/merchants.js +23 -0
- package/dist/cjs/vocabulary/money.js +104 -0
- package/dist/cjs/vocabulary/paymentMethodConfigurations.js +36 -0
- package/dist/cjs/vocabulary/payments.js +195 -0
- package/dist/cjs/vocabulary/reporting.js +27 -0
- package/dist/cjs/vocabulary/subscriptions.js +60 -0
- package/dist/cjs/vocabulary/tax.js +237 -0
- package/dist/cjs/vocabulary/version.js +12 -0
- package/dist/esm/common/address.js +76 -0
- package/dist/esm/common/envelopes.js +95 -0
- package/dist/esm/common/objects.js +74 -0
- package/dist/esm/common/params.js +203 -0
- package/dist/esm/common/primitives.js +35 -0
- package/dist/esm/contributions.js +5 -0
- package/dist/esm/index.js +26 -94
- package/dist/esm/openapi/document.js +294 -0
- package/dist/esm/openapi/index.js +2 -0
- package/dist/esm/openapi/webhooks.js +14 -0
- package/dist/esm/resources/billingEngine/billingPortal.js +234 -0
- package/dist/esm/resources/billingEngine/creditNotes.js +186 -0
- package/dist/esm/resources/billingEngine/customerBalanceTransactions.js +87 -0
- package/dist/esm/resources/billingEngine/index.js +26 -0
- package/dist/esm/resources/billingEngine/invoiceItems.js +152 -0
- package/dist/esm/resources/billingEngine/invoices.js +506 -0
- package/dist/esm/resources/billingEngine/params.js +39 -0
- package/dist/esm/resources/billingEngine/public.js +323 -0
- package/dist/esm/resources/billingEngine/subscriptions.js +473 -0
- package/dist/esm/resources/catalog/billing.js +752 -0
- package/dist/esm/resources/catalog/billingSettings.js +128 -0
- package/dist/esm/resources/catalog/coupons.js +219 -0
- package/dist/esm/resources/catalog/entitlements.js +254 -0
- package/dist/esm/resources/catalog/index.js +38 -0
- package/dist/esm/resources/catalog/meters.js +276 -0
- package/dist/esm/resources/catalog/prices.js +419 -0
- package/dist/esm/resources/catalog/products.js +225 -0
- package/dist/esm/resources/catalog/promotionCodes.js +171 -0
- package/dist/esm/resources/catalog/shared.js +67 -0
- package/dist/esm/resources/catalog/testClocks.js +124 -0
- package/dist/esm/resources/checkout/checkoutSessions.js +579 -0
- package/dist/esm/resources/checkout/contributions.js +167 -0
- package/dist/esm/resources/checkout/files.js +130 -0
- package/dist/esm/resources/checkout/index.js +25 -0
- package/dist/esm/resources/checkout/merchants.js +287 -0
- package/dist/esm/resources/checkout/paymentLinks.js +327 -0
- package/dist/esm/resources/checkout/paymentMethodConfigurations.js +259 -0
- package/dist/esm/resources/checkout/shared.js +363 -0
- package/dist/esm/resources/connect/account.js +329 -0
- package/dist/esm/resources/connect/applicationFees.js +110 -0
- package/dist/esm/resources/connect/balance.js +209 -0
- package/dist/esm/resources/connect/connectedAccounts.js +257 -0
- package/dist/esm/resources/connect/index.js +34 -0
- package/dist/esm/resources/connect/onboarding.js +79 -0
- package/dist/esm/resources/connect/payouts.js +193 -0
- package/dist/esm/resources/connect/reporting.js +232 -0
- package/dist/esm/resources/connect/requestLogs.js +107 -0
- package/dist/esm/resources/connect/transfers.js +224 -0
- package/dist/esm/resources/core/customers.js +191 -0
- package/dist/esm/resources/core/index.js +6 -0
- package/dist/esm/resources/core/paymentMethods.js +131 -0
- package/dist/esm/resources/events/events.js +353 -0
- package/dist/esm/resources/events/index.js +12 -0
- package/dist/esm/resources/events/webhookDeliveries.js +90 -0
- package/dist/esm/resources/events/webhookEndpoints.js +212 -0
- package/dist/esm/resources/payments/charges.js +154 -0
- package/dist/esm/resources/payments/disputes.js +201 -0
- package/dist/esm/resources/payments/index.js +24 -0
- package/dist/esm/resources/payments/paymentIntents.js +526 -0
- package/dist/esm/resources/payments/refunds.js +242 -0
- package/dist/esm/resources/payments/setupIntents.js +155 -0
- package/dist/esm/resources/payments/social.js +179 -0
- package/dist/esm/resources/payments/testHelpers.js +36 -0
- package/dist/esm/resources/tax/assessments.js +214 -0
- package/dist/esm/resources/tax/businessProfile.js +96 -0
- package/dist/esm/resources/tax/calculations.js +173 -0
- package/dist/esm/resources/tax/capabilities.js +39 -0
- package/dist/esm/resources/tax/codes.js +34 -0
- package/dist/esm/resources/tax/complianceActions.js +53 -0
- package/dist/esm/resources/tax/deadlines.js +56 -0
- package/dist/esm/resources/tax/documents.js +125 -0
- package/dist/esm/resources/tax/index.js +63 -0
- package/dist/esm/resources/tax/locationEvidence.js +128 -0
- package/dist/esm/resources/tax/operatingLocations.js +95 -0
- package/dist/esm/resources/tax/products.js +64 -0
- package/dist/esm/resources/tax/registrationDeclarations.js +121 -0
- package/dist/esm/resources/tax/registrations.js +79 -0
- package/dist/esm/resources/tax/reports.js +89 -0
- package/dist/esm/resources/tax/reviewItems.js +113 -0
- package/dist/esm/resources/tax/ruleSet.js +65 -0
- package/dist/esm/resources/tax/salesDestinations.js +91 -0
- package/dist/esm/resources/tax/settings.js +101 -0
- package/dist/esm/resources/tax/shared.js +58 -0
- package/dist/esm/resources/tax/transactions.js +99 -0
- package/dist/esm/route.js +16 -0
- package/dist/esm/routes.js +27 -0
- package/dist/esm/vocabulary/billingPortal.js +12 -0
- package/dist/esm/vocabulary/catalog.js +106 -0
- package/dist/esm/vocabulary/checkout.js +50 -0
- package/dist/esm/vocabulary/connect.js +92 -0
- package/dist/esm/vocabulary/errors.js +169 -0
- package/dist/esm/vocabulary/events.js +173 -0
- package/dist/esm/vocabulary/files.js +41 -0
- package/dist/esm/vocabulary/index.js +21 -0
- package/dist/esm/vocabulary/invoices.js +49 -0
- package/dist/esm/vocabulary/lists.js +19 -0
- package/dist/esm/vocabulary/merchants.js +20 -0
- package/dist/esm/vocabulary/money.js +98 -0
- package/dist/esm/vocabulary/paymentMethodConfigurations.js +33 -0
- package/dist/esm/vocabulary/payments.js +192 -0
- package/dist/esm/vocabulary/reporting.js +24 -0
- package/dist/esm/vocabulary/subscriptions.js +57 -0
- package/dist/esm/vocabulary/tax.js +233 -0
- package/dist/esm/vocabulary/version.js +9 -0
- package/dist/types/common/address.d.ts +62 -0
- package/dist/types/common/envelopes.d.ts +88 -0
- package/dist/types/common/objects.d.ts +107 -0
- package/dist/types/common/params.d.ts +156 -0
- package/dist/types/common/primitives.d.ts +56 -0
- package/dist/types/contributions.d.ts +1 -0
- package/dist/types/index.d.ts +16 -134
- package/dist/types/openapi/document.d.ts +16 -0
- package/dist/types/openapi/index.d.ts +2 -0
- package/dist/types/openapi/webhooks.d.ts +15 -0
- package/dist/types/resources/billingEngine/billingPortal.d.ts +742 -0
- package/dist/types/resources/billingEngine/creditNotes.d.ts +655 -0
- package/dist/types/resources/billingEngine/customerBalanceTransactions.d.ts +282 -0
- package/dist/types/resources/billingEngine/index.d.ts +6071 -0
- package/dist/types/resources/billingEngine/invoiceItems.d.ts +502 -0
- package/dist/types/resources/billingEngine/invoices.d.ts +2547 -0
- package/dist/types/resources/billingEngine/params.d.ts +51 -0
- package/dist/types/resources/billingEngine/public.d.ts +1860 -0
- package/dist/types/resources/billingEngine/subscriptions.d.ts +1519 -0
- package/dist/types/resources/catalog/billing.d.ts +1723 -0
- package/dist/types/resources/catalog/billingSettings.d.ts +160 -0
- package/dist/types/resources/catalog/coupons.d.ts +403 -0
- package/dist/types/resources/catalog/entitlements.d.ts +422 -0
- package/dist/types/resources/catalog/index.d.ts +3155 -0
- package/dist/types/resources/catalog/meters.d.ts +474 -0
- package/dist/types/resources/catalog/prices.d.ts +1091 -0
- package/dist/types/resources/catalog/products.d.ts +430 -0
- package/dist/types/resources/catalog/promotionCodes.d.ts +369 -0
- package/dist/types/resources/catalog/shared.d.ts +34 -0
- package/dist/types/resources/catalog/testClocks.d.ts +220 -0
- package/dist/types/resources/checkout/checkoutSessions.d.ts +3207 -0
- package/dist/types/resources/checkout/contributions.d.ts +375 -0
- package/dist/types/resources/checkout/files.d.ts +280 -0
- package/dist/types/resources/checkout/index.d.ts +5678 -0
- package/dist/types/resources/checkout/merchants.d.ts +395 -0
- package/dist/types/resources/checkout/paymentLinks.d.ts +1728 -0
- package/dist/types/resources/checkout/paymentMethodConfigurations.d.ts +2104 -0
- package/dist/types/resources/checkout/shared.d.ts +419 -0
- package/dist/types/resources/connect/account.d.ts +483 -0
- package/dist/types/resources/connect/applicationFees.d.ts +198 -0
- package/dist/types/resources/connect/balance.d.ts +399 -0
- package/dist/types/resources/connect/connectedAccounts.d.ts +494 -0
- package/dist/types/resources/connect/index.d.ts +2094 -0
- package/dist/types/resources/connect/onboarding.d.ts +95 -0
- package/dist/types/resources/connect/payouts.d.ts +527 -0
- package/dist/types/resources/connect/reporting.d.ts +506 -0
- package/dist/types/resources/connect/requestLogs.d.ts +236 -0
- package/dist/types/resources/connect/transfers.d.ts +436 -0
- package/dist/types/resources/core/customers.d.ts +619 -0
- package/dist/types/resources/core/index.d.ts +679 -0
- package/dist/types/resources/core/paymentMethods.d.ts +336 -0
- package/dist/types/resources/events/events.d.ts +731 -0
- package/dist/types/resources/events/index.d.ts +1727 -0
- package/dist/types/resources/events/webhookDeliveries.d.ts +436 -0
- package/dist/types/resources/events/webhookEndpoints.d.ts +1502 -0
- package/dist/types/resources/payments/charges.d.ts +390 -0
- package/dist/types/resources/payments/disputes.d.ts +822 -0
- package/dist/types/resources/payments/index.d.ts +3517 -0
- package/dist/types/resources/payments/paymentIntents.d.ts +2080 -0
- package/dist/types/resources/payments/refunds.d.ts +684 -0
- package/dist/types/resources/payments/setupIntents.d.ts +391 -0
- package/dist/types/resources/payments/social.d.ts +266 -0
- package/dist/types/resources/payments/testHelpers.d.ts +178 -0
- package/dist/types/resources/tax/assessments.d.ts +787 -0
- package/dist/types/resources/tax/businessProfile.d.ts +134 -0
- package/dist/types/resources/tax/calculations.d.ts +261 -0
- package/dist/types/resources/tax/capabilities.d.ts +81 -0
- package/dist/types/resources/tax/codes.d.ts +29 -0
- package/dist/types/resources/tax/complianceActions.d.ts +97 -0
- package/dist/types/resources/tax/deadlines.d.ts +133 -0
- package/dist/types/resources/tax/documents.d.ts +257 -0
- package/dist/types/resources/tax/index.d.ts +1946 -0
- package/dist/types/resources/tax/locationEvidence.d.ts +246 -0
- package/dist/types/resources/tax/operatingLocations.d.ts +170 -0
- package/dist/types/resources/tax/products.d.ts +68 -0
- package/dist/types/resources/tax/registrationDeclarations.d.ts +270 -0
- package/dist/types/resources/tax/registrations.d.ts +103 -0
- package/dist/types/resources/tax/reports.d.ts +129 -0
- package/dist/types/resources/tax/reviewItems.d.ts +226 -0
- package/dist/types/resources/tax/ruleSet.d.ts +219 -0
- package/dist/types/resources/tax/salesDestinations.d.ts +158 -0
- package/dist/types/resources/tax/settings.d.ts +122 -0
- package/dist/types/resources/tax/shared.d.ts +43 -0
- package/dist/types/resources/tax/transactions.d.ts +404 -0
- package/dist/types/route.d.ts +86 -0
- package/dist/types/routes.d.ts +23 -0
- package/dist/types/vocabulary/billingPortal.d.ts +15 -0
- package/dist/types/vocabulary/catalog.d.ts +97 -0
- package/dist/types/vocabulary/checkout.d.ts +49 -0
- package/dist/types/vocabulary/connect.d.ts +62 -0
- package/dist/types/vocabulary/errors.d.ts +145 -0
- package/dist/types/vocabulary/events.d.ts +171 -0
- package/dist/types/vocabulary/files.d.ts +30 -0
- package/dist/types/vocabulary/index.d.ts +17 -0
- package/dist/types/vocabulary/invoices.d.ts +39 -0
- package/dist/types/vocabulary/lists.d.ts +9 -0
- package/dist/types/vocabulary/merchants.d.ts +9 -0
- package/dist/types/vocabulary/money.d.ts +59 -0
- package/dist/types/vocabulary/paymentMethodConfigurations.d.ts +22 -0
- package/dist/types/vocabulary/payments.d.ts +117 -0
- package/dist/types/vocabulary/reporting.d.ts +18 -0
- package/dist/types/vocabulary/subscriptions.d.ts +45 -0
- package/dist/types/vocabulary/tax.d.ts +163 -0
- package/dist/types/vocabulary/version.d.ts +10 -0
- package/package.json +51 -11
- package/dist/cjs/openapi.js +0 -138
- package/dist/esm/openapi.js +0 -134
- package/dist/types/openapi.d.ts +0 -145
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type Expand } from '../../common/objects';
|
|
3
|
+
/**
|
|
4
|
+
* SetupIntents (`seti_…`) — saving a card for later without charging it
|
|
5
|
+
* (ADR 0016, ADR 0019). The provider SetupIntent is an internal binding; its
|
|
6
|
+
* success is what creates the Peable `pm_…`, attached to the customer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const setupIntentSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
object: z.ZodLiteral<"setup_intent">;
|
|
11
|
+
livemode: z.ZodBoolean;
|
|
12
|
+
status: z.ZodEnum<{
|
|
13
|
+
succeeded: "succeeded";
|
|
14
|
+
canceled: "canceled";
|
|
15
|
+
requires_payment_method: "requires_payment_method";
|
|
16
|
+
requires_confirmation: "requires_confirmation";
|
|
17
|
+
requires_action: "requires_action";
|
|
18
|
+
processing: "processing";
|
|
19
|
+
}>;
|
|
20
|
+
usage: z.ZodEnum<{
|
|
21
|
+
off_session: "off_session";
|
|
22
|
+
on_session: "on_session";
|
|
23
|
+
}>;
|
|
24
|
+
payment_method_types: z.ZodTuple<[z.ZodLiteral<"card">], null>;
|
|
25
|
+
customer: z.ZodNullable<z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>>;
|
|
26
|
+
payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
27
|
+
client_secret: z.ZodString;
|
|
28
|
+
next_action: z.ZodNullable<z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"use_peable_sdk">;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
last_setup_error: z.ZodNullable<z.ZodObject<{
|
|
32
|
+
type: z.ZodEnum<{
|
|
33
|
+
api_error: "api_error";
|
|
34
|
+
card_error: "card_error";
|
|
35
|
+
payment_error: "payment_error";
|
|
36
|
+
}>;
|
|
37
|
+
code: z.ZodNullable<z.ZodString>;
|
|
38
|
+
decline_code: z.ZodNullable<z.ZodString>;
|
|
39
|
+
message: z.ZodString;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
42
|
+
duplicate: "duplicate";
|
|
43
|
+
abandoned: "abandoned";
|
|
44
|
+
requested_by_customer: "requested_by_customer";
|
|
45
|
+
}>>;
|
|
46
|
+
description: z.ZodNullable<z.ZodString>;
|
|
47
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
48
|
+
created: z.ZodNumber;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
export type SetupIntent = Expand<z.output<typeof setupIntentSchema>>;
|
|
51
|
+
declare module '../../common/objects' {
|
|
52
|
+
interface ObjectMap {
|
|
53
|
+
setup_intent: SetupIntent;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export declare const createSetupIntentParams: z.ZodObject<{
|
|
57
|
+
customer: z.ZodOptional<z.ZodString>;
|
|
58
|
+
usage: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
off_session: "off_session";
|
|
60
|
+
on_session: "on_session";
|
|
61
|
+
}>>;
|
|
62
|
+
payment_method_types: z.ZodOptional<z.ZodTuple<[z.ZodLiteral<"card">], null>>;
|
|
63
|
+
description: z.ZodOptional<z.ZodString>;
|
|
64
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
|
|
65
|
+
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>>>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
export type CreateSetupIntentParams = z.input<typeof createSetupIntentParams>;
|
|
68
|
+
export declare const cancelSetupIntentParams: z.ZodObject<{
|
|
69
|
+
cancellation_reason: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
duplicate: "duplicate";
|
|
71
|
+
abandoned: "abandoned";
|
|
72
|
+
requested_by_customer: "requested_by_customer";
|
|
73
|
+
}>>;
|
|
74
|
+
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>>>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export type CancelSetupIntentParams = z.input<typeof cancelSetupIntentParams>;
|
|
77
|
+
export declare const listSetupIntentsQuery: z.ZodObject<{
|
|
78
|
+
limit: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>, z.ZodTransform<number, number | undefined>>;
|
|
79
|
+
starting_after: z.ZodOptional<z.ZodString>;
|
|
80
|
+
ending_before: z.ZodOptional<z.ZodString>;
|
|
81
|
+
created: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
|
|
82
|
+
gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
83
|
+
gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
84
|
+
lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
85
|
+
lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
86
|
+
}, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
|
|
87
|
+
gt?: number | undefined;
|
|
88
|
+
gte?: number | undefined;
|
|
89
|
+
lt?: number | undefined;
|
|
90
|
+
lte?: number | undefined;
|
|
91
|
+
}>>]>>;
|
|
92
|
+
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>>>;
|
|
93
|
+
customer: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
export type ListSetupIntentsParams = z.input<typeof listSetupIntentsQuery>;
|
|
96
|
+
/** A merchant retrieve takes `expand[]`; the payer's takes `client_secret` and nothing to expand. */
|
|
97
|
+
export declare const retrieveSetupIntentQuery: z.ZodObject<{
|
|
98
|
+
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>>>;
|
|
99
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
export type RetrieveSetupIntentParams = z.input<typeof retrieveSetupIntentQuery>;
|
|
102
|
+
export declare const setupIntentRoutes: readonly [{
|
|
103
|
+
readonly operationId: "createSetupIntent";
|
|
104
|
+
readonly method: "post";
|
|
105
|
+
readonly path: "/v1/setup_intents";
|
|
106
|
+
readonly tag: "Setup intents";
|
|
107
|
+
readonly summary: "Create a setup intent";
|
|
108
|
+
readonly auth: "service";
|
|
109
|
+
readonly scope: "payments:write";
|
|
110
|
+
readonly idempotent: true;
|
|
111
|
+
readonly body: z.ZodObject<{
|
|
112
|
+
customer: z.ZodOptional<z.ZodString>;
|
|
113
|
+
usage: z.ZodOptional<z.ZodEnum<{
|
|
114
|
+
off_session: "off_session";
|
|
115
|
+
on_session: "on_session";
|
|
116
|
+
}>>;
|
|
117
|
+
payment_method_types: z.ZodOptional<z.ZodTuple<[z.ZodLiteral<"card">], null>>;
|
|
118
|
+
description: z.ZodOptional<z.ZodString>;
|
|
119
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
|
|
120
|
+
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>>>;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
readonly response: z.ZodObject<{
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
object: z.ZodLiteral<"setup_intent">;
|
|
125
|
+
livemode: z.ZodBoolean;
|
|
126
|
+
status: z.ZodEnum<{
|
|
127
|
+
succeeded: "succeeded";
|
|
128
|
+
canceled: "canceled";
|
|
129
|
+
requires_payment_method: "requires_payment_method";
|
|
130
|
+
requires_confirmation: "requires_confirmation";
|
|
131
|
+
requires_action: "requires_action";
|
|
132
|
+
processing: "processing";
|
|
133
|
+
}>;
|
|
134
|
+
usage: z.ZodEnum<{
|
|
135
|
+
off_session: "off_session";
|
|
136
|
+
on_session: "on_session";
|
|
137
|
+
}>;
|
|
138
|
+
payment_method_types: z.ZodTuple<[z.ZodLiteral<"card">], null>;
|
|
139
|
+
customer: z.ZodNullable<z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>>;
|
|
140
|
+
payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
141
|
+
client_secret: z.ZodString;
|
|
142
|
+
next_action: z.ZodNullable<z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"use_peable_sdk">;
|
|
144
|
+
}, z.core.$strict>>;
|
|
145
|
+
last_setup_error: z.ZodNullable<z.ZodObject<{
|
|
146
|
+
type: z.ZodEnum<{
|
|
147
|
+
api_error: "api_error";
|
|
148
|
+
card_error: "card_error";
|
|
149
|
+
payment_error: "payment_error";
|
|
150
|
+
}>;
|
|
151
|
+
code: z.ZodNullable<z.ZodString>;
|
|
152
|
+
decline_code: z.ZodNullable<z.ZodString>;
|
|
153
|
+
message: z.ZodString;
|
|
154
|
+
}, z.core.$strict>>;
|
|
155
|
+
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
156
|
+
duplicate: "duplicate";
|
|
157
|
+
abandoned: "abandoned";
|
|
158
|
+
requested_by_customer: "requested_by_customer";
|
|
159
|
+
}>>;
|
|
160
|
+
description: z.ZodNullable<z.ZodString>;
|
|
161
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
162
|
+
created: z.ZodNumber;
|
|
163
|
+
}, z.core.$strict>;
|
|
164
|
+
readonly status: 201;
|
|
165
|
+
readonly sdk: "setupIntents.create";
|
|
166
|
+
readonly expandable: "setup_intent";
|
|
167
|
+
}, {
|
|
168
|
+
readonly operationId: "listSetupIntents";
|
|
169
|
+
readonly method: "get";
|
|
170
|
+
readonly path: "/v1/setup_intents";
|
|
171
|
+
readonly tag: "Setup intents";
|
|
172
|
+
readonly summary: "List setup intents";
|
|
173
|
+
readonly auth: "service";
|
|
174
|
+
readonly scope: "payments:read";
|
|
175
|
+
readonly query: z.ZodObject<{
|
|
176
|
+
limit: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>, z.ZodTransform<number, number | undefined>>;
|
|
177
|
+
starting_after: z.ZodOptional<z.ZodString>;
|
|
178
|
+
ending_before: z.ZodOptional<z.ZodString>;
|
|
179
|
+
created: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
|
|
180
|
+
gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
181
|
+
gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
182
|
+
lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
183
|
+
lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
184
|
+
}, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
|
|
185
|
+
gt?: number | undefined;
|
|
186
|
+
gte?: number | undefined;
|
|
187
|
+
lt?: number | undefined;
|
|
188
|
+
lte?: number | undefined;
|
|
189
|
+
}>>]>>;
|
|
190
|
+
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>>>;
|
|
191
|
+
customer: z.ZodOptional<z.ZodString>;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
readonly response: z.ZodObject<{
|
|
194
|
+
object: z.ZodLiteral<"list">;
|
|
195
|
+
data: z.ZodArray<z.ZodObject<{
|
|
196
|
+
id: z.ZodString;
|
|
197
|
+
object: z.ZodLiteral<"setup_intent">;
|
|
198
|
+
livemode: z.ZodBoolean;
|
|
199
|
+
status: z.ZodEnum<{
|
|
200
|
+
succeeded: "succeeded";
|
|
201
|
+
canceled: "canceled";
|
|
202
|
+
requires_payment_method: "requires_payment_method";
|
|
203
|
+
requires_confirmation: "requires_confirmation";
|
|
204
|
+
requires_action: "requires_action";
|
|
205
|
+
processing: "processing";
|
|
206
|
+
}>;
|
|
207
|
+
usage: z.ZodEnum<{
|
|
208
|
+
off_session: "off_session";
|
|
209
|
+
on_session: "on_session";
|
|
210
|
+
}>;
|
|
211
|
+
payment_method_types: z.ZodTuple<[z.ZodLiteral<"card">], null>;
|
|
212
|
+
customer: z.ZodNullable<z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>>;
|
|
213
|
+
payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
214
|
+
client_secret: z.ZodString;
|
|
215
|
+
next_action: z.ZodNullable<z.ZodObject<{
|
|
216
|
+
type: z.ZodLiteral<"use_peable_sdk">;
|
|
217
|
+
}, z.core.$strict>>;
|
|
218
|
+
last_setup_error: z.ZodNullable<z.ZodObject<{
|
|
219
|
+
type: z.ZodEnum<{
|
|
220
|
+
api_error: "api_error";
|
|
221
|
+
card_error: "card_error";
|
|
222
|
+
payment_error: "payment_error";
|
|
223
|
+
}>;
|
|
224
|
+
code: z.ZodNullable<z.ZodString>;
|
|
225
|
+
decline_code: z.ZodNullable<z.ZodString>;
|
|
226
|
+
message: z.ZodString;
|
|
227
|
+
}, z.core.$strict>>;
|
|
228
|
+
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
229
|
+
duplicate: "duplicate";
|
|
230
|
+
abandoned: "abandoned";
|
|
231
|
+
requested_by_customer: "requested_by_customer";
|
|
232
|
+
}>>;
|
|
233
|
+
description: z.ZodNullable<z.ZodString>;
|
|
234
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
235
|
+
created: z.ZodNumber;
|
|
236
|
+
}, z.core.$strict>>;
|
|
237
|
+
has_more: z.ZodBoolean;
|
|
238
|
+
url: z.ZodString;
|
|
239
|
+
}, z.core.$strict>;
|
|
240
|
+
readonly sdk: "setupIntents.list";
|
|
241
|
+
readonly expandable: "setup_intent";
|
|
242
|
+
}, {
|
|
243
|
+
readonly operationId: "retrieveSetupIntent";
|
|
244
|
+
readonly method: "get";
|
|
245
|
+
readonly path: "/v1/setup_intents/{id}";
|
|
246
|
+
readonly tag: "Setup intents";
|
|
247
|
+
readonly summary: "Retrieve a setup intent";
|
|
248
|
+
readonly description: "With the merchant credential: reconciled with the provider when not terminal, expandable. Without one, the PAYER reads the row as stored with its `client_secret` (the `X-Peable-Client-Secret` header, or the query).";
|
|
249
|
+
readonly auth: "service";
|
|
250
|
+
readonly scope: "payments:read";
|
|
251
|
+
readonly params: {
|
|
252
|
+
id: string;
|
|
253
|
+
};
|
|
254
|
+
readonly query: z.ZodObject<{
|
|
255
|
+
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>>>;
|
|
256
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, z.core.$strict>;
|
|
258
|
+
readonly response: z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
object: z.ZodLiteral<"setup_intent">;
|
|
261
|
+
livemode: z.ZodBoolean;
|
|
262
|
+
status: z.ZodEnum<{
|
|
263
|
+
succeeded: "succeeded";
|
|
264
|
+
canceled: "canceled";
|
|
265
|
+
requires_payment_method: "requires_payment_method";
|
|
266
|
+
requires_confirmation: "requires_confirmation";
|
|
267
|
+
requires_action: "requires_action";
|
|
268
|
+
processing: "processing";
|
|
269
|
+
}>;
|
|
270
|
+
usage: z.ZodEnum<{
|
|
271
|
+
off_session: "off_session";
|
|
272
|
+
on_session: "on_session";
|
|
273
|
+
}>;
|
|
274
|
+
payment_method_types: z.ZodTuple<[z.ZodLiteral<"card">], null>;
|
|
275
|
+
customer: z.ZodNullable<z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>>;
|
|
276
|
+
payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
277
|
+
client_secret: z.ZodString;
|
|
278
|
+
next_action: z.ZodNullable<z.ZodObject<{
|
|
279
|
+
type: z.ZodLiteral<"use_peable_sdk">;
|
|
280
|
+
}, z.core.$strict>>;
|
|
281
|
+
last_setup_error: z.ZodNullable<z.ZodObject<{
|
|
282
|
+
type: z.ZodEnum<{
|
|
283
|
+
api_error: "api_error";
|
|
284
|
+
card_error: "card_error";
|
|
285
|
+
payment_error: "payment_error";
|
|
286
|
+
}>;
|
|
287
|
+
code: z.ZodNullable<z.ZodString>;
|
|
288
|
+
decline_code: z.ZodNullable<z.ZodString>;
|
|
289
|
+
message: z.ZodString;
|
|
290
|
+
}, z.core.$strict>>;
|
|
291
|
+
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
292
|
+
duplicate: "duplicate";
|
|
293
|
+
abandoned: "abandoned";
|
|
294
|
+
requested_by_customer: "requested_by_customer";
|
|
295
|
+
}>>;
|
|
296
|
+
description: z.ZodNullable<z.ZodString>;
|
|
297
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
298
|
+
created: z.ZodNumber;
|
|
299
|
+
}, z.core.$strict>;
|
|
300
|
+
readonly sdk: "setupIntents.retrieve";
|
|
301
|
+
readonly expandable: "setup_intent";
|
|
302
|
+
}, {
|
|
303
|
+
readonly operationId: "cancelSetupIntent";
|
|
304
|
+
readonly method: "post";
|
|
305
|
+
readonly path: "/v1/setup_intents/{id}/cancel";
|
|
306
|
+
readonly tag: "Setup intents";
|
|
307
|
+
readonly summary: "Cancel a setup intent";
|
|
308
|
+
readonly auth: "service";
|
|
309
|
+
readonly scope: "payments:write";
|
|
310
|
+
readonly idempotent: true;
|
|
311
|
+
readonly params: {
|
|
312
|
+
id: string;
|
|
313
|
+
};
|
|
314
|
+
readonly body: z.ZodObject<{
|
|
315
|
+
cancellation_reason: z.ZodOptional<z.ZodEnum<{
|
|
316
|
+
duplicate: "duplicate";
|
|
317
|
+
abandoned: "abandoned";
|
|
318
|
+
requested_by_customer: "requested_by_customer";
|
|
319
|
+
}>>;
|
|
320
|
+
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>>>;
|
|
321
|
+
}, z.core.$strict>;
|
|
322
|
+
readonly response: z.ZodObject<{
|
|
323
|
+
id: z.ZodString;
|
|
324
|
+
object: z.ZodLiteral<"setup_intent">;
|
|
325
|
+
livemode: z.ZodBoolean;
|
|
326
|
+
status: z.ZodEnum<{
|
|
327
|
+
succeeded: "succeeded";
|
|
328
|
+
canceled: "canceled";
|
|
329
|
+
requires_payment_method: "requires_payment_method";
|
|
330
|
+
requires_confirmation: "requires_confirmation";
|
|
331
|
+
requires_action: "requires_action";
|
|
332
|
+
processing: "processing";
|
|
333
|
+
}>;
|
|
334
|
+
usage: z.ZodEnum<{
|
|
335
|
+
off_session: "off_session";
|
|
336
|
+
on_session: "on_session";
|
|
337
|
+
}>;
|
|
338
|
+
payment_method_types: z.ZodTuple<[z.ZodLiteral<"card">], null>;
|
|
339
|
+
customer: z.ZodNullable<z.ZodType<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">, z.core.$ZodTypeInternals<string | import("../..").Ref<"customer">, string | import("../..").Ref<"customer">>>>;
|
|
340
|
+
payment_method: z.ZodNullable<z.ZodType<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">, z.core.$ZodTypeInternals<string | import("../..").Ref<"payment_method">, string | import("../..").Ref<"payment_method">>>>;
|
|
341
|
+
client_secret: z.ZodString;
|
|
342
|
+
next_action: z.ZodNullable<z.ZodObject<{
|
|
343
|
+
type: z.ZodLiteral<"use_peable_sdk">;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
last_setup_error: z.ZodNullable<z.ZodObject<{
|
|
346
|
+
type: z.ZodEnum<{
|
|
347
|
+
api_error: "api_error";
|
|
348
|
+
card_error: "card_error";
|
|
349
|
+
payment_error: "payment_error";
|
|
350
|
+
}>;
|
|
351
|
+
code: z.ZodNullable<z.ZodString>;
|
|
352
|
+
decline_code: z.ZodNullable<z.ZodString>;
|
|
353
|
+
message: z.ZodString;
|
|
354
|
+
}, z.core.$strict>>;
|
|
355
|
+
cancellation_reason: z.ZodNullable<z.ZodEnum<{
|
|
356
|
+
duplicate: "duplicate";
|
|
357
|
+
abandoned: "abandoned";
|
|
358
|
+
requested_by_customer: "requested_by_customer";
|
|
359
|
+
}>>;
|
|
360
|
+
description: z.ZodNullable<z.ZodString>;
|
|
361
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
362
|
+
created: z.ZodNumber;
|
|
363
|
+
}, z.core.$strict>;
|
|
364
|
+
readonly sdk: "setupIntents.cancel";
|
|
365
|
+
readonly expandable: "setup_intent";
|
|
366
|
+
}, {
|
|
367
|
+
readonly operationId: "retrieveSetupIntentClientAction";
|
|
368
|
+
readonly method: "post";
|
|
369
|
+
readonly path: "/v1/setup_intents/{id}/client_action";
|
|
370
|
+
readonly tag: "Setup intents";
|
|
371
|
+
readonly summary: "Retrieve a setup intent's client action";
|
|
372
|
+
readonly description: "The provider credential the payer's client confirms the SetupIntent with — read fresh, `Cache-Control: no-store`, never on the object. The merchant credential, or the payer's `client_secret` (`X-Peable-Client-Secret`). A succeeded or canceled setup intent answers 409.";
|
|
373
|
+
readonly auth: "service";
|
|
374
|
+
readonly scope: "payments:read";
|
|
375
|
+
readonly params: {
|
|
376
|
+
id: string;
|
|
377
|
+
};
|
|
378
|
+
readonly query: z.ZodObject<{
|
|
379
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
380
|
+
}, z.core.$strict>;
|
|
381
|
+
readonly response: z.ZodObject<{
|
|
382
|
+
kind: z.ZodEnum<{
|
|
383
|
+
client_secret: "client_secret";
|
|
384
|
+
redirect: "redirect";
|
|
385
|
+
}>;
|
|
386
|
+
value: z.ZodString;
|
|
387
|
+
publishable_key: z.ZodOptional<z.ZodString>;
|
|
388
|
+
object: z.ZodLiteral<"client_action">;
|
|
389
|
+
}, z.core.$strict>;
|
|
390
|
+
readonly sdk: "setupIntents.clientAction";
|
|
391
|
+
}];
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Social payments (pay a person by `@username`) and transaction enrichment —
|
|
4
|
+
* the wallet's routes, called with the person's own Oxy session. Display-only
|
|
5
|
+
* context throughout: nothing here decides where money goes; the address comes
|
|
6
|
+
* from the recipient's identity key and their reservation cursor.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Display-only context for one social payment: which app the payer was in, and
|
|
10
|
+
* that app's own opaque id for what it was for (a Mention post, say). Peable
|
|
11
|
+
* never parses, resolves or links `ref`; it stores a string and hands the same
|
|
12
|
+
* string back.
|
|
13
|
+
*/
|
|
14
|
+
export declare const socialPaymentSourceSchema: z.ZodObject<{
|
|
15
|
+
app: z.ZodString;
|
|
16
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export type SocialPaymentSource = z.output<typeof socialPaymentSourceSchema>;
|
|
19
|
+
/**
|
|
20
|
+
* Display-only counterparty identity for one address, as `POST /v1/enrich`
|
|
21
|
+
* resolves it. A failed or partial resolution degrades to `{ kind: 'unknown' }`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const enrichmentResultSchema: z.ZodObject<{
|
|
24
|
+
kind: z.ZodEnum<{
|
|
25
|
+
merchant: "merchant";
|
|
26
|
+
unknown: "unknown";
|
|
27
|
+
user: "user";
|
|
28
|
+
}>;
|
|
29
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
30
|
+
avatar_file_id: z.ZodOptional<z.ZodString>;
|
|
31
|
+
username: z.ZodOptional<z.ZodString>;
|
|
32
|
+
description: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export type EnrichmentResult = z.output<typeof enrichmentResultSchema>;
|
|
35
|
+
/**
|
|
36
|
+
* `.strict()` is load-bearing: `{ app, postId }` — the obvious misspelling of
|
|
37
|
+
* `ref` — would otherwise reserve an address and record a context missing the
|
|
38
|
+
* only part the recipient cares about, with a 200. `ref` is validated for SHAPE
|
|
39
|
+
* (printable non-space ASCII) and never for meaning, so it cannot become a
|
|
40
|
+
* free-text memo the gateway stores on behalf of two users.
|
|
41
|
+
*/
|
|
42
|
+
export declare const socialPaymentSourceParams: z.ZodObject<{
|
|
43
|
+
app: z.ZodString;
|
|
44
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
/** `source` is OPTIONAL and stays that way: most person-to-person payments are for nothing in particular. */
|
|
47
|
+
export declare const socialNextAddressParams: z.ZodObject<{
|
|
48
|
+
network: z.ZodEnum<{
|
|
49
|
+
mainnet: "mainnet";
|
|
50
|
+
testnet: "testnet";
|
|
51
|
+
}>;
|
|
52
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
app: z.ZodString;
|
|
54
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strict>>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type SocialNextAddressRequest = z.input<typeof socialNextAddressParams>;
|
|
58
|
+
export declare const socialNextAddressSchema: z.ZodObject<{
|
|
59
|
+
address: z.ZodString;
|
|
60
|
+
index: z.ZodNumber;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
export type SocialNextAddressResponse = z.output<typeof socialNextAddressSchema>;
|
|
63
|
+
export declare const socialReceiveCursorQuery: z.ZodObject<{
|
|
64
|
+
network: z.ZodEnum<{
|
|
65
|
+
mainnet: "mainnet";
|
|
66
|
+
testnet: "testnet";
|
|
67
|
+
}>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type SocialReceiveCursorParams = z.input<typeof socialReceiveCursorQuery>;
|
|
70
|
+
/**
|
|
71
|
+
* Lets the caller's device resync its watch window: every `next_address`
|
|
72
|
+
* advances a monotonic index whether or not it is ever paid, so a burst of
|
|
73
|
+
* reservations can outrun a device that widens only on payment. Watch
|
|
74
|
+
* `0..reserved_through + gap`.
|
|
75
|
+
*/
|
|
76
|
+
export declare const socialReceiveCursorSchema: z.ZodObject<{
|
|
77
|
+
reserved_through: z.ZodNumber;
|
|
78
|
+
identity_public_key: z.ZodNullable<z.ZodString>;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
export type SocialReceiveCursorResponse = z.output<typeof socialReceiveCursorSchema>;
|
|
81
|
+
export declare const socialPaymentsQuery: z.ZodObject<{
|
|
82
|
+
network: z.ZodEnum<{
|
|
83
|
+
mainnet: "mainnet";
|
|
84
|
+
testnet: "testnet";
|
|
85
|
+
}>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export type SocialPaymentsParams = z.input<typeof socialPaymentsQuery>;
|
|
88
|
+
/**
|
|
89
|
+
* One social payment as the CALLER saw it — the address-free view, and the
|
|
90
|
+
* only history a surface without a key can ask for. Carries NO amount: the
|
|
91
|
+
* attribution records which address was minted, not what was paid; the amount
|
|
92
|
+
* is on-chain at `address`.
|
|
93
|
+
*/
|
|
94
|
+
export declare const socialPaymentSchema: z.ZodObject<{
|
|
95
|
+
address: z.ZodString;
|
|
96
|
+
direction: z.ZodEnum<{
|
|
97
|
+
sent: "sent";
|
|
98
|
+
received: "received";
|
|
99
|
+
}>;
|
|
100
|
+
counterparty: z.ZodObject<{
|
|
101
|
+
kind: z.ZodEnum<{
|
|
102
|
+
merchant: "merchant";
|
|
103
|
+
unknown: "unknown";
|
|
104
|
+
user: "user";
|
|
105
|
+
}>;
|
|
106
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
107
|
+
avatar_file_id: z.ZodOptional<z.ZodString>;
|
|
108
|
+
username: z.ZodOptional<z.ZodString>;
|
|
109
|
+
description: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
app: z.ZodString;
|
|
113
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
created: z.ZodNumber;
|
|
116
|
+
}, z.core.$strict>;
|
|
117
|
+
export type SocialPayment = z.output<typeof socialPaymentSchema>;
|
|
118
|
+
export declare const socialPaymentsSchema: z.ZodObject<{
|
|
119
|
+
payments: z.ZodArray<z.ZodObject<{
|
|
120
|
+
address: z.ZodString;
|
|
121
|
+
direction: z.ZodEnum<{
|
|
122
|
+
sent: "sent";
|
|
123
|
+
received: "received";
|
|
124
|
+
}>;
|
|
125
|
+
counterparty: z.ZodObject<{
|
|
126
|
+
kind: z.ZodEnum<{
|
|
127
|
+
merchant: "merchant";
|
|
128
|
+
unknown: "unknown";
|
|
129
|
+
user: "user";
|
|
130
|
+
}>;
|
|
131
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
132
|
+
avatar_file_id: z.ZodOptional<z.ZodString>;
|
|
133
|
+
username: z.ZodOptional<z.ZodString>;
|
|
134
|
+
description: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
app: z.ZodString;
|
|
138
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strict>>;
|
|
140
|
+
created: z.ZodNumber;
|
|
141
|
+
}, z.core.$strict>>;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
export type SocialPaymentsResponse = z.output<typeof socialPaymentsSchema>;
|
|
144
|
+
export declare const enrichParams: z.ZodObject<{
|
|
145
|
+
addresses: z.ZodArray<z.ZodString>;
|
|
146
|
+
}, z.core.$strict>;
|
|
147
|
+
export type EnrichRequest = z.input<typeof enrichParams>;
|
|
148
|
+
export declare const enrichSchema: z.ZodObject<{
|
|
149
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
150
|
+
kind: z.ZodEnum<{
|
|
151
|
+
merchant: "merchant";
|
|
152
|
+
unknown: "unknown";
|
|
153
|
+
user: "user";
|
|
154
|
+
}>;
|
|
155
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
156
|
+
avatar_file_id: z.ZodOptional<z.ZodString>;
|
|
157
|
+
username: z.ZodOptional<z.ZodString>;
|
|
158
|
+
description: z.ZodOptional<z.ZodString>;
|
|
159
|
+
}, z.core.$strict>>;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
export type EnrichResponse = z.output<typeof enrichSchema>;
|
|
162
|
+
export declare const socialRoutes: readonly [{
|
|
163
|
+
readonly operationId: "reserveSocialAddress";
|
|
164
|
+
readonly method: "post";
|
|
165
|
+
readonly path: "/v1/social/{username}/next_address";
|
|
166
|
+
readonly tag: "Social payments";
|
|
167
|
+
readonly summary: "Reserve an address to pay a person";
|
|
168
|
+
readonly description: "A fresh address of the recipient's, derived from their Oxy identity key. Limited per (sender, recipient) pair; a recipient without an identity answers 409 `keyless_recipient`; paying yourself is refused.";
|
|
169
|
+
readonly auth: "user";
|
|
170
|
+
readonly params: {
|
|
171
|
+
readonly username: "The recipient’s Oxy username.";
|
|
172
|
+
};
|
|
173
|
+
readonly body: z.ZodObject<{
|
|
174
|
+
network: z.ZodEnum<{
|
|
175
|
+
mainnet: "mainnet";
|
|
176
|
+
testnet: "testnet";
|
|
177
|
+
}>;
|
|
178
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
app: z.ZodString;
|
|
180
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
181
|
+
}, z.core.$strict>>;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
readonly response: z.ZodObject<{
|
|
184
|
+
address: z.ZodString;
|
|
185
|
+
index: z.ZodNumber;
|
|
186
|
+
}, z.core.$strict>;
|
|
187
|
+
}, {
|
|
188
|
+
readonly operationId: "retrieveSocialReceiveCursor";
|
|
189
|
+
readonly method: "get";
|
|
190
|
+
readonly path: "/v1/social/me/cursor";
|
|
191
|
+
readonly tag: "Social payments";
|
|
192
|
+
readonly summary: "Retrieve the caller's receive cursor";
|
|
193
|
+
readonly auth: "user";
|
|
194
|
+
readonly query: z.ZodObject<{
|
|
195
|
+
network: z.ZodEnum<{
|
|
196
|
+
mainnet: "mainnet";
|
|
197
|
+
testnet: "testnet";
|
|
198
|
+
}>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
readonly response: z.ZodObject<{
|
|
201
|
+
reserved_through: z.ZodNumber;
|
|
202
|
+
identity_public_key: z.ZodNullable<z.ZodString>;
|
|
203
|
+
}, z.core.$strict>;
|
|
204
|
+
}, {
|
|
205
|
+
readonly operationId: "listSocialPayments";
|
|
206
|
+
readonly method: "get";
|
|
207
|
+
readonly path: "/v1/social/me/payments";
|
|
208
|
+
readonly tag: "Social payments";
|
|
209
|
+
readonly summary: "List the caller's social payments";
|
|
210
|
+
readonly auth: "user";
|
|
211
|
+
readonly query: z.ZodObject<{
|
|
212
|
+
network: z.ZodEnum<{
|
|
213
|
+
mainnet: "mainnet";
|
|
214
|
+
testnet: "testnet";
|
|
215
|
+
}>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
readonly response: z.ZodObject<{
|
|
218
|
+
payments: z.ZodArray<z.ZodObject<{
|
|
219
|
+
address: z.ZodString;
|
|
220
|
+
direction: z.ZodEnum<{
|
|
221
|
+
sent: "sent";
|
|
222
|
+
received: "received";
|
|
223
|
+
}>;
|
|
224
|
+
counterparty: z.ZodObject<{
|
|
225
|
+
kind: z.ZodEnum<{
|
|
226
|
+
merchant: "merchant";
|
|
227
|
+
unknown: "unknown";
|
|
228
|
+
user: "user";
|
|
229
|
+
}>;
|
|
230
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
231
|
+
avatar_file_id: z.ZodOptional<z.ZodString>;
|
|
232
|
+
username: z.ZodOptional<z.ZodString>;
|
|
233
|
+
description: z.ZodOptional<z.ZodString>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
app: z.ZodString;
|
|
237
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, z.core.$strict>>;
|
|
239
|
+
created: z.ZodNumber;
|
|
240
|
+
}, z.core.$strict>>;
|
|
241
|
+
}, z.core.$strict>;
|
|
242
|
+
}, {
|
|
243
|
+
readonly operationId: "enrichAddresses";
|
|
244
|
+
readonly method: "post";
|
|
245
|
+
readonly path: "/v1/enrich";
|
|
246
|
+
readonly tag: "Social payments";
|
|
247
|
+
readonly summary: "Resolve who is behind addresses";
|
|
248
|
+
readonly description: "Display-only counterparty identity for the caller’s own payments; never affects custody.";
|
|
249
|
+
readonly auth: "user";
|
|
250
|
+
readonly body: z.ZodObject<{
|
|
251
|
+
addresses: z.ZodArray<z.ZodString>;
|
|
252
|
+
}, z.core.$strict>;
|
|
253
|
+
readonly response: z.ZodObject<{
|
|
254
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
255
|
+
kind: z.ZodEnum<{
|
|
256
|
+
merchant: "merchant";
|
|
257
|
+
unknown: "unknown";
|
|
258
|
+
user: "user";
|
|
259
|
+
}>;
|
|
260
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
261
|
+
avatar_file_id: z.ZodOptional<z.ZodString>;
|
|
262
|
+
username: z.ZodOptional<z.ZodString>;
|
|
263
|
+
description: z.ZodOptional<z.ZodString>;
|
|
264
|
+
}, z.core.$strict>>;
|
|
265
|
+
}, z.core.$strict>;
|
|
266
|
+
}];
|