@peable.to/contracts 0.4.0 → 1.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/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 -137
- 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/dashboard.js +68 -0
- package/dist/cjs/vocabulary/errors.js +175 -0
- package/dist/cjs/vocabulary/events.js +176 -0
- package/dist/cjs/vocabulary/files.js +44 -0
- package/dist/cjs/vocabulary/identity.js +12 -0
- package/dist/cjs/vocabulary/index.js +39 -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 -134
- 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/dashboard.js +64 -0
- package/dist/esm/vocabulary/errors.js +170 -0
- package/dist/esm/vocabulary/events.js +173 -0
- package/dist/esm/vocabulary/files.js +41 -0
- package/dist/esm/vocabulary/identity.js +9 -0
- package/dist/esm/vocabulary/index.js +23 -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 -171
- 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/dashboard.d.ts +44 -0
- package/dist/types/vocabulary/errors.d.ts +146 -0
- package/dist/types/vocabulary/events.d.ts +171 -0
- package/dist/types/vocabulary/files.d.ts +30 -0
- package/dist/types/vocabulary/identity.d.ts +9 -0
- package/dist/types/vocabulary/index.d.ts +19 -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 -165
- package/dist/esm/openapi.js +0 -161
- package/dist/types/openapi.d.ts +0 -148
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a file is FOR. Decided at upload and never changed: the purpose is what
|
|
3
|
+
* sets the type and size policy, who may see the bytes, and which objects may
|
|
4
|
+
* reference the file — a `business_logo` is public, a `dispute_evidence` file
|
|
5
|
+
* is private and can only be attached to the merchant's own disputes.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FILE_PURPOSES: readonly ["dispute_evidence", "business_logo", "identity_document", "additional_verification", "finance_report_run", "tax_document"];
|
|
8
|
+
export type FilePurpose = (typeof FILE_PURPOSES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* The purposes a merchant may upload or import. `finance_report_run` is not
|
|
11
|
+
* among them: a report's CSV is written by Peable's report runs
|
|
12
|
+
* (`/v1/reporting/report_runs`) and nobody else, so a file of that purpose is
|
|
13
|
+
* always a report Peable produced.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FILE_UPLOAD_PURPOSES: readonly ["dispute_evidence", "business_logo", "identity_document", "additional_verification", "tax_document"];
|
|
16
|
+
export type FileUploadPurpose = (typeof FILE_UPLOAD_PURPOSES)[number];
|
|
17
|
+
/** The stored format, by its conventional extension (Stripe's `type`). */
|
|
18
|
+
export declare const FILE_TYPES: readonly ["pdf", "png", "jpg", "csv"];
|
|
19
|
+
export type FileType = (typeof FILE_TYPES)[number];
|
|
20
|
+
/**
|
|
21
|
+
* Whether the bytes can be used right now.
|
|
22
|
+
*
|
|
23
|
+
* - `available` — Oxy serves the file; it can be shown or forwarded.
|
|
24
|
+
* - `withheld` — the file still exists and is not being served (its owner
|
|
25
|
+
* trashed it or made it private); it can come back.
|
|
26
|
+
* - `removed` — Oxy said the file is gone for good (deleted, taken down, lost).
|
|
27
|
+
* The object stays so whatever referenced it can say why it stopped working.
|
|
28
|
+
*/
|
|
29
|
+
export declare const FILE_STATUSES: readonly ["available", "withheld", "removed"];
|
|
30
|
+
export type FileStatus = (typeof FILE_STATUSES)[number];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peable's own Oxy application: the identity the gateway runs as (`OxyServer`'s
|
|
3
|
+
* `applicationId`) and the one an Oxy service addresses when it calls the
|
|
4
|
+
* gateway. One constant, so the gateway's accepted audience and the SDK's
|
|
5
|
+
* requested one cannot name two different applications.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PEABLE_OXY_APPLICATION_ID = "6a2f851751b784a86fd0e958";
|
|
8
|
+
/** The service-token audience of Peable's gateway (`oxy-service:<application id>`). */
|
|
9
|
+
export declare const PEABLE_SERVICE_AUDIENCE = "oxy-service:6a2f851751b784a86fd0e958";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './billingPortal';
|
|
2
|
+
export * from './connect';
|
|
3
|
+
export * from './dashboard';
|
|
4
|
+
export * from './catalog';
|
|
5
|
+
export * from './errors';
|
|
6
|
+
export * from './invoices';
|
|
7
|
+
export * from './events';
|
|
8
|
+
export * from './lists';
|
|
9
|
+
export * from './money';
|
|
10
|
+
export * from './tax';
|
|
11
|
+
export * from './subscriptions';
|
|
12
|
+
export * from './reporting';
|
|
13
|
+
export * from './payments';
|
|
14
|
+
export * from './version';
|
|
15
|
+
export * from './checkout';
|
|
16
|
+
export * from './files';
|
|
17
|
+
export * from './identity';
|
|
18
|
+
export * from './merchants';
|
|
19
|
+
export * from './paymentMethodConfigurations';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const INVOICE_STATUSES: readonly ["draft", "open", "paid", "void", "uncollectible"];
|
|
2
|
+
export type InvoiceStatus = (typeof INVOICE_STATUSES)[number];
|
|
3
|
+
/** Why an invoice exists. */
|
|
4
|
+
export declare const INVOICE_BILLING_REASONS: readonly ["manual", "subscription_create", "subscription_cycle", "subscription_update", "subscription_cancel", "upcoming"];
|
|
5
|
+
export type InvoiceBillingReason = (typeof INVOICE_BILLING_REASONS)[number];
|
|
6
|
+
/**
|
|
7
|
+
* `automatic_tax.status` — Peable Tax (ADR 0011) is computed before an invoice
|
|
8
|
+
* finalizes (ADR 0018 §2).
|
|
9
|
+
*
|
|
10
|
+
* - `requires_location_inputs` — the customer's location could not be
|
|
11
|
+
* established; the invoice cannot finalize until it can.
|
|
12
|
+
* - `failed` — the calculation failed closed (the provider
|
|
13
|
+
* was unavailable, or disagreed with Peable's registrations); retried.
|
|
14
|
+
* - `complete` — calculated (including `not_registered`,
|
|
15
|
+
* which is a calculation that collects zero).
|
|
16
|
+
*/
|
|
17
|
+
export declare const AUTOMATIC_TAX_STATUSES: readonly ["requires_location_inputs", "failed", "complete"];
|
|
18
|
+
export type AutomaticTaxStatus = (typeof AUTOMATIC_TAX_STATUSES)[number];
|
|
19
|
+
/** Where an invoice line comes from: a subscription item's period, or an invoice item. */
|
|
20
|
+
export declare const INVOICE_LINE_TYPES: readonly ["subscription", "invoiceitem"];
|
|
21
|
+
export type InvoiceLineType = (typeof INVOICE_LINE_TYPES)[number];
|
|
22
|
+
/** `pending_invoice_items_behavior` on an invoice create. Default `exclude` (Stripe's). */
|
|
23
|
+
export declare const PENDING_INVOICE_ITEMS_BEHAVIORS: readonly ["include", "exclude"];
|
|
24
|
+
export type PendingInvoiceItemsBehavior = (typeof PENDING_INVOICE_ITEMS_BEHAVIORS)[number];
|
|
25
|
+
export declare const CREDIT_NOTE_STATUSES: readonly ["issued", "void"];
|
|
26
|
+
export type CreditNoteStatus = (typeof CREDIT_NOTE_STATUSES)[number];
|
|
27
|
+
/** `pre_payment` reduces what an open invoice asks for; `post_payment` gives back on a paid one. */
|
|
28
|
+
export declare const CREDIT_NOTE_TYPES: readonly ["pre_payment", "post_payment"];
|
|
29
|
+
export type CreditNoteType = (typeof CREDIT_NOTE_TYPES)[number];
|
|
30
|
+
export declare const CREDIT_NOTE_REASONS: readonly ["duplicate", "fraudulent", "order_change", "product_unsatisfactory"];
|
|
31
|
+
export type CreditNoteReason = (typeof CREDIT_NOTE_REASONS)[number];
|
|
32
|
+
/** A credit note line: part of an invoice line, or a custom amount. */
|
|
33
|
+
export declare const CREDIT_NOTE_LINE_TYPES: readonly ["invoice_line_item", "custom_line_item"];
|
|
34
|
+
export type CreditNoteLineType = (typeof CREDIT_NOTE_LINE_TYPES)[number];
|
|
35
|
+
export declare const CUSTOMER_BALANCE_TRANSACTION_TYPES: readonly ["adjustment", "applied_to_invoice", "credit_note", "invoice_overpaid", "unapplied_from_invoice"];
|
|
36
|
+
export type CustomerBalanceTransactionType = (typeof CUSTOMER_BALANCE_TRANSACTION_TYPES)[number];
|
|
37
|
+
/** The rails a hosted invoice is paid on: a card through the provider's fields, FairCoin from the payer's wallet. */
|
|
38
|
+
export declare const PUBLIC_INVOICE_PAYMENT_METHOD_TYPES: readonly ["card", "faircoin"];
|
|
39
|
+
export type PublicInvoicePaymentMethodType = (typeof PUBLIC_INVOICE_PAYMENT_METHOD_TYPES)[number];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const LIST_LIMIT_DEFAULT = 10;
|
|
2
|
+
export declare const LIST_LIMIT_MAX = 100;
|
|
3
|
+
export declare const SEARCH_QUERY_MAX_LENGTH = 1000;
|
|
4
|
+
export declare const SEARCH_QUERY_MAX_CLAUSES = 10;
|
|
5
|
+
/** A `~` substring needs at least this many characters (Stripe's rule). */
|
|
6
|
+
export declare const SEARCH_SUBSTRING_MIN_LENGTH = 3;
|
|
7
|
+
/** Every searchable resource, by its path segment (`/v1/<resource>/search`). */
|
|
8
|
+
export declare const SEARCHABLE_RESOURCES: readonly ["payment_intents", "charges", "customers", "products", "prices", "refunds", "subscriptions", "invoices"];
|
|
9
|
+
export type SearchableResource = (typeof SEARCHABLE_RESOURCES)[number];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const MERCHANT_ENVIRONMENTS: readonly ["development", "staging", "production"];
|
|
2
|
+
export type MerchantEnvironment = (typeof MERCHANT_ENVIRONMENTS)[number];
|
|
3
|
+
/** The fonts checkout may render in — system stacks only, no remote font is ever loaded. */
|
|
4
|
+
export declare const BRANDING_FONTS: readonly ["system", "inter", "roboto", "open_sans", "lato", "source_sans", "noto_sans", "serif", "monospace"];
|
|
5
|
+
export type BrandingFont = (typeof BRANDING_FONTS)[number];
|
|
6
|
+
export declare const BRANDING_BORDER_STYLES: readonly ["rounded", "rectangular", "pill"];
|
|
7
|
+
export type BrandingBorderStyle = (typeof BRANDING_BORDER_STYLES)[number];
|
|
8
|
+
/** `#rrggbb`, lowercase — the only colour spelling branding stores. */
|
|
9
|
+
export declare const BRANDING_COLOR_PATTERN: RegExp;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The currencies this gateway can denominate a payment in: FairCoin on the
|
|
3
|
+
* chain rail, and on the card rail the fiat set the provider settles for the
|
|
4
|
+
* payment methods Orbit offers (cards, wallets, SEPA Debit, iDEAL, Bancontact,
|
|
5
|
+
* EPS). A local method narrows it further per payment
|
|
6
|
+
* (`PAYMENT_METHOD_CURRENCIES` in `paymentMethodConfiguration.ts`).
|
|
7
|
+
*
|
|
8
|
+
* A closed set, and the database mirrors it as a CHECK
|
|
9
|
+
* (`db/schema/valueSets.ts`). ADR 0001 D4: the scale of an amount is a property
|
|
10
|
+
* of its currency and is NOT implied by the field's type, which is why
|
|
11
|
+
* {@link CURRENCY_DECIMALS} exists and why {@link UNITS_PER_COIN} must never be
|
|
12
|
+
* used to interpret a fiat amount.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CURRENCY_CODES: readonly ["FAIR", "EUR", "USD", "GBP", "CHF", "SEK", "NOK", "DKK", "PLN", "CZK", "CAD", "AUD", "JPY"];
|
|
15
|
+
export type CurrencyCode = (typeof CURRENCY_CODES)[number];
|
|
16
|
+
/** Whether an arbitrary string is a currency this gateway knows. */
|
|
17
|
+
export declare function isCurrencyCode(value: string): value is CurrencyCode;
|
|
18
|
+
/**
|
|
19
|
+
* How many decimal places each currency's smallest unit represents — i.e. an
|
|
20
|
+
* amount of `1` means `10^-decimals` of one whole unit.
|
|
21
|
+
*
|
|
22
|
+
* ISO 4217's minor units for every fiat member (JPY has none). FairCoin's 8 is
|
|
23
|
+
* a consensus constant and is pinned against {@link UNITS_PER_COIN} by this
|
|
24
|
+
* package's own tests, so the two spellings of one fact cannot drift.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CURRENCY_DECIMALS: Readonly<Record<CurrencyCode, number>>;
|
|
27
|
+
/** A currency the card rail can denominate a payment in. */
|
|
28
|
+
export type FiatCurrencyCode = Exclude<CurrencyCode, 'FAIR'>;
|
|
29
|
+
/** The fiat members — every currency the card rail can denominate a payment in. */
|
|
30
|
+
export declare const FIAT_CURRENCY_CODES: readonly FiatCurrencyCode[];
|
|
31
|
+
/** The decimal places of `currency`'s smallest unit. */
|
|
32
|
+
export declare function decimalsFor(currency: CurrencyCode): number;
|
|
33
|
+
/**
|
|
34
|
+
* Frozen FairCoin consensus constant (smallest units per FAIR). Mirrors
|
|
35
|
+
* `@fairco.in/core`'s branding.ts; inlined to keep this module zero-dependency
|
|
36
|
+
* for a clean CJS+ESM publish — must stay a bigint, never converted to number.
|
|
37
|
+
*
|
|
38
|
+
* FAIRCOIN ONLY. A fiat amount has its own scale (`CURRENCY_DECIMALS`), and
|
|
39
|
+
* dividing a EUR amount by this constant is off by six orders of magnitude with
|
|
40
|
+
* nothing failing.
|
|
41
|
+
*/
|
|
42
|
+
export declare const UNITS_PER_COIN = 100000000n;
|
|
43
|
+
/** The spelling of a base-unit amount: digits, no sign, no leading zeros but `0`. */
|
|
44
|
+
export declare const BASE_UNIT_PATTERN: RegExp;
|
|
45
|
+
/** A signed base-unit amount (a customer balance, a balance transaction's net). */
|
|
46
|
+
export declare const SIGNED_BASE_UNIT_PATTERN: RegExp;
|
|
47
|
+
/**
|
|
48
|
+
* True only for a canonical non-negative integer string in the currency's
|
|
49
|
+
* smallest unit: one or more decimal digits, no sign, no decimal point, no
|
|
50
|
+
* leading zeros (except the literal "0"). Floats and negatives are rejected.
|
|
51
|
+
*
|
|
52
|
+
* Currency-agnostic on purpose — the pattern is about the SPELLING of an
|
|
53
|
+
* amount, not its scale, and the same one is restated as a CHECK in the
|
|
54
|
+
* database (`BASE_UNIT_STRING_PATTERN`), byte-identical.
|
|
55
|
+
*/
|
|
56
|
+
export declare function isBaseUnitString(s: string): boolean;
|
|
57
|
+
/** FairCoin network identifier, mirroring `@fairco.in/core`'s `NetworkType`. */
|
|
58
|
+
export declare const NETWORK_TYPES: readonly ["mainnet", "testnet"];
|
|
59
|
+
export type NetworkType = (typeof NETWORK_TYPES)[number];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The methods a configuration can turn on.
|
|
3
|
+
*
|
|
4
|
+
* `apple_pay` and `google_pay` are WALLETS over a card: a payment made with one
|
|
5
|
+
* is a `card` payment, so they appear here and never in a PaymentIntent's
|
|
6
|
+
* `payment_method_types`. `bizum` is listed because merchants ask for it and the
|
|
7
|
+
* honest answer is a reason, not an absence: the provider does not offer it.
|
|
8
|
+
*
|
|
9
|
+
* Deliberately absent: the provider's own consumer wallet (its brand on Orbit's
|
|
10
|
+
* checkout, `payment-provider-boundary.md`) and giropay (discontinued by the
|
|
11
|
+
* scheme).
|
|
12
|
+
*/
|
|
13
|
+
export declare const PAYMENT_METHOD_CONFIGURATION_TYPES: readonly ["card", "apple_pay", "google_pay", "sepa_debit", "ideal", "bancontact", "eps", "bizum"];
|
|
14
|
+
export type PaymentMethodConfigurationType = (typeof PAYMENT_METHOD_CONFIGURATION_TYPES)[number];
|
|
15
|
+
/**
|
|
16
|
+
* Why a method cannot be offered whatever the merchant chooses.
|
|
17
|
+
*
|
|
18
|
+
* - `provider_unsupported` — the processing provider does not offer it;
|
|
19
|
+
* - `requires_card` — a wallet rides on card payments, and card is off.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PAYMENT_METHOD_UNAVAILABLE_REASONS: readonly ["provider_unsupported", "requires_card"];
|
|
22
|
+
export type PaymentMethodUnavailableReason = (typeof PAYMENT_METHOD_UNAVAILABLE_REASONS)[number];
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which rail moves the money (ADR 0001 D1). On the INTENT, not on the merchant:
|
|
3
|
+
* one merchant takes both, and the rail decides which fields mean anything.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PAYMENT_INTENT_RAILS: readonly ["faircoin", "card"];
|
|
6
|
+
export type PaymentIntentRail = (typeof PAYMENT_INTENT_RAILS)[number];
|
|
7
|
+
/**
|
|
8
|
+
* Stripe's seven statuses, and no others (ADR 0019). The FairCoin rail walks
|
|
9
|
+
* four of them (`requires_action` → `processing` → `succeeded` | `canceled`); a
|
|
10
|
+
* card walks all seven. The order is the lifecycle table's
|
|
11
|
+
* (`@peable.to/shared-types`), which the database CHECK is rendered from.
|
|
12
|
+
*/
|
|
13
|
+
export declare const PAYMENT_INTENT_STATUSES: readonly ["requires_payment_method", "requires_confirmation", "requires_action", "processing", "requires_capture", "succeeded", "canceled"];
|
|
14
|
+
export type PaymentIntentStatus = (typeof PAYMENT_INTENT_STATUSES)[number];
|
|
15
|
+
/**
|
|
16
|
+
* Why an intent was cancelled — Stripe's reasons, plus `underpaid` (FairCoin
|
|
17
|
+
* only: a transaction paid less than the amount).
|
|
18
|
+
*/
|
|
19
|
+
export declare const PAYMENT_INTENT_CANCELLATION_REASONS: readonly ["abandoned", "automatic", "duplicate", "fraudulent", "requested_by_customer", "underpaid"];
|
|
20
|
+
export type PaymentIntentCancellationReason = (typeof PAYMENT_INTENT_CANCELLATION_REASONS)[number];
|
|
21
|
+
/** The reasons a MERCHANT may give `POST /v1/payment_intents/:id/cancel`. */
|
|
22
|
+
export declare const MERCHANT_CANCELLATION_REASONS: readonly ["abandoned", "duplicate", "fraudulent", "requested_by_customer"];
|
|
23
|
+
export type MerchantCancellationReason = (typeof MERCHANT_CANCELLATION_REASONS)[number];
|
|
24
|
+
/** When a card is captured: at confirmation, or by `POST …/capture` (card only). */
|
|
25
|
+
export declare const PAYMENT_INTENT_CAPTURE_METHODS: readonly ["automatic", "manual"];
|
|
26
|
+
export type PaymentIntentCaptureMethod = (typeof PAYMENT_INTENT_CAPTURE_METHODS)[number];
|
|
27
|
+
/** Card only: keep the payment method on the customer for later (ADR 0016). */
|
|
28
|
+
export declare const PAYMENT_INTENT_SETUP_FUTURE_USAGES: readonly ["on_session", "off_session"];
|
|
29
|
+
export type PaymentIntentSetupFutureUsage = (typeof PAYMENT_INTENT_SETUP_FUTURE_USAGES)[number];
|
|
30
|
+
/** The card-rail types a PaymentIntent can carry in `payment_method_types`. */
|
|
31
|
+
export declare const CARD_RAIL_PAYMENT_METHOD_TYPES: readonly ["card", "sepa_debit", "ideal", "bancontact", "eps"];
|
|
32
|
+
export type CardRailPaymentMethodType = (typeof CARD_RAIL_PAYMENT_METHOD_TYPES)[number];
|
|
33
|
+
/**
|
|
34
|
+
* Every payment method type a PaymentIntent can carry: `faircoin` on the chain
|
|
35
|
+
* rail, the card rail's otherwise. Wallets (Apple Pay, Google Pay) are `card`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PAYMENT_METHOD_TYPES: readonly ["faircoin", "card", "sepa_debit", "ideal", "bancontact", "eps"];
|
|
38
|
+
export type PaymentMethodType = (typeof PAYMENT_METHOD_TYPES)[number];
|
|
39
|
+
/** The kinds of `last_payment_error` (and a SetupIntent's `last_setup_error`). */
|
|
40
|
+
export declare const PAYMENT_ERROR_TYPES: readonly ["card_error", "payment_error", "api_error"];
|
|
41
|
+
export type PaymentErrorType = (typeof PAYMENT_ERROR_TYPES)[number];
|
|
42
|
+
/** How the payer's client continues: a confirmation credential, or a redirect. */
|
|
43
|
+
export declare const CLIENT_ACTION_KINDS: readonly ["client_secret", "redirect"];
|
|
44
|
+
export type ClientActionKind = (typeof CLIENT_ACTION_KINDS)[number];
|
|
45
|
+
/**
|
|
46
|
+
* Where one refund stands — the MONEY's own lifecycle, not the payment's.
|
|
47
|
+
* `canceled` only through `POST /v1/refunds/:id/cancel`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const REFUND_STATUSES: readonly ["pending", "succeeded", "failed", "canceled"];
|
|
50
|
+
export type RefundStatus = (typeof REFUND_STATUSES)[number];
|
|
51
|
+
/** Stripe's refund reasons. */
|
|
52
|
+
export declare const REFUND_REASONS: readonly ["duplicate", "fraudulent", "requested_by_customer"];
|
|
53
|
+
export type RefundReason = (typeof REFUND_REASONS)[number];
|
|
54
|
+
/**
|
|
55
|
+
* Who created a refund. `provider`: it appeared at the acquirer (a dashboard
|
|
56
|
+
* refund, a dispute's resolution) and was imported, without an `external_ref`.
|
|
57
|
+
*/
|
|
58
|
+
export declare const REFUND_ORIGINS: readonly ["merchant", "provider"];
|
|
59
|
+
export type RefundOrigin = (typeof REFUND_ORIGINS)[number];
|
|
60
|
+
/** Where a payment's settlement figures stand. `unknown` is not zero. */
|
|
61
|
+
export declare const SETTLEMENT_STATUSES: readonly ["available", "pending", "unknown"];
|
|
62
|
+
export type SettlementStatus = (typeof SETTLEMENT_STATUSES)[number];
|
|
63
|
+
/**
|
|
64
|
+
* Where a dispute stands. `needs_response` and `under_review` are open; `won`
|
|
65
|
+
* and `lost` are terminal. There is deliberately no `closed`.
|
|
66
|
+
*/
|
|
67
|
+
export declare const DISPUTE_STATUSES: readonly ["needs_response", "under_review", "won", "lost"];
|
|
68
|
+
export type DisputeStatus = (typeof DISPUTE_STATUSES)[number];
|
|
69
|
+
/** Why the cardholder disputed — Stripe's enum; an unmapped network reason reads `general`. */
|
|
70
|
+
export declare const DISPUTE_REASONS: readonly ["bank_cannot_process", "check_returned", "credit_not_processed", "customer_initiated", "debit_not_authorized", "duplicate", "fraudulent", "general", "incorrect_account_details", "insufficient_funds", "noncompliant", "product_not_received", "product_unacceptable", "subscription_canceled", "unrecognized"];
|
|
71
|
+
export type DisputeReason = (typeof DISPUTE_REASONS)[number];
|
|
72
|
+
/**
|
|
73
|
+
* The TEXT evidence fields — the network's names, never a Peable paraphrase: a
|
|
74
|
+
* merchant assembling a defence reads their acquirer's guidance, and renamed
|
|
75
|
+
* fields would make it not apply. The Stripe adapter's name map is a total
|
|
76
|
+
* `Record` over this set, so a field added here does not compile until it
|
|
77
|
+
* carries it.
|
|
78
|
+
*/
|
|
79
|
+
export declare const DISPUTE_TEXT_EVIDENCE_FIELDS: readonly ["access_activity_log", "billing_address", "cancellation_policy_disclosure", "cancellation_rebuttal", "customer_email_address", "customer_name", "customer_purchase_ip", "duplicate_charge_explanation", "product_description", "refund_policy_disclosure", "refund_refusal_explanation", "service_date", "shipping_address", "shipping_carrier", "shipping_date", "shipping_tracking_number", "uncategorized_text"];
|
|
80
|
+
export type DisputeTextEvidenceField = (typeof DISPUTE_TEXT_EVIDENCE_FIELDS)[number];
|
|
81
|
+
/** The FILE evidence fields: each names a `file_…` of purpose `dispute_evidence`. */
|
|
82
|
+
export declare const DISPUTE_FILE_EVIDENCE_FIELDS: readonly ["cancellation_policy", "customer_communication", "customer_signature", "duplicate_charge_documentation", "receipt", "refund_policy", "service_documentation", "shipping_documentation", "uncategorized_file"];
|
|
83
|
+
export type DisputeFileEvidenceField = (typeof DISPUTE_FILE_EVIDENCE_FIELDS)[number];
|
|
84
|
+
export type DisputeEvidenceField = DisputeTextEvidenceField | DisputeFileEvidenceField;
|
|
85
|
+
/** The provider's ceiling on one TEXT evidence field, restated where the request is parsed. */
|
|
86
|
+
export declare const DISPUTE_EVIDENCE_TEXT_MAX = 20000;
|
|
87
|
+
export declare const SETUP_INTENT_STATUSES: readonly ["requires_payment_method", "requires_confirmation", "requires_action", "processing", "canceled", "succeeded"];
|
|
88
|
+
export type SetupIntentStatus = (typeof SETUP_INTENT_STATUSES)[number];
|
|
89
|
+
export declare const SETUP_INTENT_USAGES: readonly ["on_session", "off_session"];
|
|
90
|
+
export type SetupIntentUsage = (typeof SETUP_INTENT_USAGES)[number];
|
|
91
|
+
export declare const SETUP_INTENT_CANCELLATION_REASONS: readonly ["abandoned", "duplicate", "requested_by_customer"];
|
|
92
|
+
export type SetupIntentCancellationReason = (typeof SETUP_INTENT_CANCELLATION_REASONS)[number];
|
|
93
|
+
/**
|
|
94
|
+
* Longest `source.app` of a social payment: an app slug, not a label. The
|
|
95
|
+
* column CHECK reads the same bound.
|
|
96
|
+
*/
|
|
97
|
+
export declare const SOCIAL_SOURCE_APP_MAX_LENGTH = 32;
|
|
98
|
+
/**
|
|
99
|
+
* Longest `source.ref` of a social payment. The bound is the whole defence: the
|
|
100
|
+
* value is opaque, so nothing downstream would notice it growing.
|
|
101
|
+
*/
|
|
102
|
+
export declare const SOCIAL_SOURCE_REF_MAX_LENGTH = 128;
|
|
103
|
+
/** Which side of a social payment the caller was on. */
|
|
104
|
+
export declare const SOCIAL_PAYMENT_DIRECTIONS: readonly ["sent", "received"];
|
|
105
|
+
export type SocialPaymentDirection = (typeof SOCIAL_PAYMENT_DIRECTIONS)[number];
|
|
106
|
+
/** Where a transaction's counterparty identity came from. */
|
|
107
|
+
export declare const ENRICHMENT_KINDS: readonly ["merchant", "user", "unknown"];
|
|
108
|
+
export type EnrichmentKind = (typeof ENRICHMENT_KINDS)[number];
|
|
109
|
+
/** How many addresses one `POST /v1/enrich` resolves (and one social history lists). */
|
|
110
|
+
export declare const ENRICH_MAX_ADDRESSES = 50;
|
|
111
|
+
/**
|
|
112
|
+
* What `simulate_faircoin_payment` pretends the payer did: `settled` paid the
|
|
113
|
+
* full amount (`processing` → `succeeded`); `underpaid` sent less
|
|
114
|
+
* (`processing` → `canceled`, `cancellation_reason: 'underpaid'`).
|
|
115
|
+
*/
|
|
116
|
+
export declare const SIMULATED_FAIRCOIN_OUTCOMES: readonly ["settled", "underpaid"];
|
|
117
|
+
export type SimulatedFaircoinOutcome = (typeof SIMULATED_FAIRCOIN_OUTCOMES)[number];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every report Peable produces, by Stripe's versioned id: the trailing `.1` is
|
|
3
|
+
* the column layout's version, so a layout can change under a new id without
|
|
4
|
+
* changing a report a merchant already parses. The layouts themselves are
|
|
5
|
+
* `REPORT_TYPE_LAYOUTS` in `@peable.to/shared-types/reporting`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const REPORT_TYPE_IDS: readonly ["payments.itemized.1", "balance.summary.1", "balance_transactions.itemized.1", "payouts.itemized.1", "refunds.itemized.1", "disputes.itemized.1"];
|
|
8
|
+
export type ReportTypeId = (typeof REPORT_TYPE_IDS)[number];
|
|
9
|
+
export declare const REPORT_RUN_STATUSES: readonly ["pending", "succeeded", "failed"];
|
|
10
|
+
export type ReportRunStatus = (typeof REPORT_RUN_STATUSES)[number];
|
|
11
|
+
/** The HTTP methods a request log records. */
|
|
12
|
+
export declare const REQUEST_LOG_METHODS: readonly ["GET", "POST", "DELETE", "PATCH", "PUT"];
|
|
13
|
+
export type RequestLogMethod = (typeof REQUEST_LOG_METHODS)[number];
|
|
14
|
+
/** A request-log `status` filter's class form (`4xx` is 400–499). */
|
|
15
|
+
export declare const REQUEST_LOG_STATUS_CLASSES: readonly ["2xx", "3xx", "4xx", "5xx"];
|
|
16
|
+
export type RequestLogStatusClass = (typeof REQUEST_LOG_STATUS_CLASSES)[number];
|
|
17
|
+
/** How long a request log is kept (and served). */
|
|
18
|
+
export declare const REQUEST_LOG_RETENTION_DAYS = 30;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a subscription stands — Stripe's eight.
|
|
3
|
+
*
|
|
4
|
+
* - `incomplete` — the first invoice is not paid yet; expires to
|
|
5
|
+
* `incomplete_expired` when nobody pays it in time.
|
|
6
|
+
* - `incomplete_expired` — terminal: the first invoice was never paid.
|
|
7
|
+
* - `trialing` — in a trial; nothing is charged until it ends.
|
|
8
|
+
* - `active` — in good standing.
|
|
9
|
+
* - `past_due` — a renewal invoice failed; dunning is retrying it.
|
|
10
|
+
* - `unpaid` — dunning gave up and the merchant's final action
|
|
11
|
+
* is `unpaid`: invoices are still created, access
|
|
12
|
+
* should be withdrawn.
|
|
13
|
+
* - `canceled` — terminal.
|
|
14
|
+
* - `paused` — a trial ended with no payment method and the
|
|
15
|
+
* trial's end behaviour was `pause`; resumed with
|
|
16
|
+
* `POST /v1/subscriptions/:id/resume`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SUBSCRIPTION_STATUSES: readonly ["incomplete", "incomplete_expired", "trialing", "active", "past_due", "unpaid", "canceled", "paused"];
|
|
19
|
+
export type SubscriptionStatus = (typeof SUBSCRIPTION_STATUSES)[number];
|
|
20
|
+
/** `status=` on a subscription list: a status, `all` (including canceled), or `ended`. */
|
|
21
|
+
export declare const SUBSCRIPTION_LIST_STATUSES: readonly ["incomplete", "incomplete_expired", "trialing", "active", "past_due", "unpaid", "canceled", "paused", "all", "ended"];
|
|
22
|
+
export type SubscriptionListStatus = (typeof SUBSCRIPTION_LIST_STATUSES)[number];
|
|
23
|
+
/** How the subscription's invoices are collected. FairCoin is always `send_invoice`. */
|
|
24
|
+
export declare const COLLECTION_METHODS: readonly ["charge_automatically", "send_invoice"];
|
|
25
|
+
export type CollectionMethod = (typeof COLLECTION_METHODS)[number];
|
|
26
|
+
/** How a change mid-period is billed. */
|
|
27
|
+
export declare const PRORATION_BEHAVIORS: readonly ["create_prorations", "none", "always_invoice"];
|
|
28
|
+
export type ProrationBehavior = (typeof PRORATION_BEHAVIORS)[number];
|
|
29
|
+
/** The proration behaviours a subscription CREATE accepts: there is nothing to invoice at once yet. */
|
|
30
|
+
export declare const CREATE_PRORATION_BEHAVIORS: readonly ["create_prorations", "none"];
|
|
31
|
+
/** What a create does when the first invoice cannot be paid at once. */
|
|
32
|
+
export declare const PAYMENT_BEHAVIORS: readonly ["allow_incomplete", "default_incomplete", "error_if_incomplete"];
|
|
33
|
+
export type PaymentBehavior = (typeof PAYMENT_BEHAVIORS)[number];
|
|
34
|
+
/** What happens to the invoices of a subscription whose collection is paused. */
|
|
35
|
+
export declare const PAUSE_COLLECTION_BEHAVIORS: readonly ["keep_as_draft", "mark_uncollectible", "void"];
|
|
36
|
+
export type PauseCollectionBehavior = (typeof PAUSE_COLLECTION_BEHAVIORS)[number];
|
|
37
|
+
/** What a trial ending with no payment method does (`trial_settings.end_behavior`). */
|
|
38
|
+
export declare const TRIAL_END_BEHAVIORS: readonly ["cancel", "create_invoice", "pause"];
|
|
39
|
+
export type TrialEndBehavior = (typeof TRIAL_END_BEHAVIORS)[number];
|
|
40
|
+
/** Why a subscription was cancelled. */
|
|
41
|
+
export declare const SUBSCRIPTION_CANCELLATION_REASONS: readonly ["cancellation_requested", "payment_failed"];
|
|
42
|
+
export type SubscriptionCancellationReason = (typeof SUBSCRIPTION_CANCELLATION_REASONS)[number];
|
|
43
|
+
/** `billing_cycle_anchor` on a resume: a new period now (the default), or the anchor kept. */
|
|
44
|
+
export declare const RESUME_BILLING_CYCLE_ANCHORS: readonly ["now", "unchanged"];
|
|
45
|
+
export type ResumeBillingCycleAnchor = (typeof RESUME_BILLING_CYCLE_ANCHORS)[number];
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a registration lets the seller collect. `standard`/`simplified` cover one
|
|
3
|
+
* country; the EU One-Stop-Shop schemes cover every EU member state from one
|
|
4
|
+
* identification state; the US is per state; Canadian PST/QST is per province.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TAX_REGISTRATION_SCHEMES: readonly ["standard", "simplified", "eu_oss_union", "eu_oss_non_union", "us_state_sales_tax", "ca_provincial"];
|
|
7
|
+
export type TaxRegistrationScheme = (typeof TAX_REGISTRATION_SCHEMES)[number];
|
|
8
|
+
/**
|
|
9
|
+
* Location evidence a jurisdiction accepts. There is deliberately no language,
|
|
10
|
+
* currency, locale or timezone: none of them is evidence of where a customer
|
|
11
|
+
* lives, and Peable cannot be told otherwise.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TAX_LOCATION_EVIDENCE_TYPES: readonly ["billing_address", "ip_address", "payment_method_country", "bank_country", "sim_country", "landline_country"];
|
|
14
|
+
export type TaxLocationEvidenceType = (typeof TAX_LOCATION_EVIDENCE_TYPES)[number];
|
|
15
|
+
/** Whether a line's amount includes its tax (`inclusive`) or tax is added on top. */
|
|
16
|
+
export declare const TAX_BEHAVIORS: readonly ["inclusive", "exclusive"];
|
|
17
|
+
export type TaxBehavior = (typeof TAX_BEHAVIORS)[number];
|
|
18
|
+
/** `active` once the owner approved; any edit returns the settings to `draft`. */
|
|
19
|
+
export declare const TAX_SETTINGS_STATUSES: readonly ["draft", "active"];
|
|
20
|
+
export type TaxSettingsStatus = (typeof TAX_SETTINGS_STATUSES)[number];
|
|
21
|
+
/**
|
|
22
|
+
* Which provider account calculates for a merchant. `platform`: Peable's own
|
|
23
|
+
* provider account, available only to official Oxy applications, whose seller
|
|
24
|
+
* is the platform's legal entity. `none`: no provider; sales in a registered
|
|
25
|
+
* jurisdiction cannot be calculated and fail closed.
|
|
26
|
+
*/
|
|
27
|
+
export declare const TAX_CALCULATION_ACCOUNTS: readonly ["platform", "none"];
|
|
28
|
+
export type TaxCalculationAccount = (typeof TAX_CALCULATION_ACCOUNTS)[number];
|
|
29
|
+
/** `pending_approval` until the owner approves; `scheduled` before `active_from`. */
|
|
30
|
+
export declare const TAX_REGISTRATION_STATUSES: readonly ["pending_approval", "scheduled", "active", "expired"];
|
|
31
|
+
export type TaxRegistrationStatus = (typeof TAX_REGISTRATION_STATUSES)[number];
|
|
32
|
+
/** Only `sufficient` evidence can be calculated against. */
|
|
33
|
+
export declare const TAX_EVIDENCE_STATUSES: readonly ["sufficient", "insufficient", "conflicting"];
|
|
34
|
+
export type TaxLocationEvidenceStatus = (typeof TAX_EVIDENCE_STATUSES)[number];
|
|
35
|
+
/**
|
|
36
|
+
* Why a calculation's tax is what it is: `collect` (a registration covers the
|
|
37
|
+
* customer and the provider calculated), `not_registered` (no registration
|
|
38
|
+
* covers them: zero tax, recorded as such), `nontaxable` (every line used the
|
|
39
|
+
* nontaxable code).
|
|
40
|
+
*/
|
|
41
|
+
export declare const TAX_COLLECTIONS: readonly ["collect", "not_registered", "nontaxable"];
|
|
42
|
+
export type TaxCollection = (typeof TAX_COLLECTIONS)[number];
|
|
43
|
+
/** A sale, or a refund (or credit note) of one. */
|
|
44
|
+
export declare const TAX_TRANSACTION_TYPES: readonly ["transaction", "reversal"];
|
|
45
|
+
export type TaxTransactionType = (typeof TAX_TRANSACTION_TYPES)[number];
|
|
46
|
+
/**
|
|
47
|
+
* The product tax codes Peable accepts, starting with digital services and
|
|
48
|
+
* SaaS — what every Oxy application sells. Ids are Stripe Tax's tax codes, so a
|
|
49
|
+
* code means the same thing to Peable and to the provider calculating it.
|
|
50
|
+
* Adding a category is adding a row here; classifying a product is the seller's
|
|
51
|
+
* decision.
|
|
52
|
+
*/
|
|
53
|
+
export declare const TAX_CODES: readonly [{
|
|
54
|
+
readonly id: "txcd_00000000";
|
|
55
|
+
readonly name: "Nontaxable";
|
|
56
|
+
readonly description: "A product that is not subject to tax anywhere. No tax is calculated.";
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: "txcd_10000000";
|
|
59
|
+
readonly name: "General - Electronically Supplied Services";
|
|
60
|
+
readonly description: "A service delivered electronically over the internet with minimal human involvement.";
|
|
61
|
+
}, {
|
|
62
|
+
readonly id: "txcd_10103000";
|
|
63
|
+
readonly name: "Software as a service (SaaS) - personal use";
|
|
64
|
+
readonly description: "Hosted software accessed online, sold to consumers for personal use.";
|
|
65
|
+
}, {
|
|
66
|
+
readonly id: "txcd_10103001";
|
|
67
|
+
readonly name: "Software as a service (SaaS) - business use";
|
|
68
|
+
readonly description: "Hosted software accessed online, sold to businesses for business use.";
|
|
69
|
+
}, {
|
|
70
|
+
readonly id: "txcd_10202000";
|
|
71
|
+
readonly name: "Downloadable Software - personal use";
|
|
72
|
+
readonly description: "Software downloaded to the customer’s device, for personal use.";
|
|
73
|
+
}, {
|
|
74
|
+
readonly id: "txcd_10202003";
|
|
75
|
+
readonly name: "Downloadable Software - business use";
|
|
76
|
+
readonly description: "Software downloaded to the customer’s device, for business use.";
|
|
77
|
+
}, {
|
|
78
|
+
readonly id: "txcd_10701100";
|
|
79
|
+
readonly name: "Website Hosting";
|
|
80
|
+
readonly description: "Hosting of a website or web application on the seller’s servers.";
|
|
81
|
+
}];
|
|
82
|
+
/** The code of a product that is taxed nowhere. */
|
|
83
|
+
export declare const NONTAXABLE_TAX_CODE = "txcd_00000000";
|
|
84
|
+
/** The code a merchant's settings start with: electronically supplied services. */
|
|
85
|
+
export declare const DEFAULT_TAX_CODE = "txcd_10000000";
|
|
86
|
+
/** Whether `id` is one of {@link TAX_CODES}. */
|
|
87
|
+
export declare function isKnownTaxCode(id: string): boolean;
|
|
88
|
+
/** `unknown` is an answer, not a gap: the owner says they do not know yet. */
|
|
89
|
+
export declare const TAX_LEGAL_ENTITY_TYPES: readonly ["corporation", "limited_liability_company", "partnership", "sole_proprietorship", "nonprofit", "public_body", "other", "unknown"];
|
|
90
|
+
export type TaxLegalEntityType = (typeof TAX_LEGAL_ENTITY_TYPES)[number];
|
|
91
|
+
export declare const TAX_CUSTOMER_TYPES: readonly ["consumers", "businesses", "both", "unknown"];
|
|
92
|
+
export type TaxCustomerType = (typeof TAX_CUSTOMER_TYPES)[number];
|
|
93
|
+
export declare const TAX_SUPPLY_TYPES: readonly ["digital_services", "software_as_a_service", "physical_goods", "professional_services", "other"];
|
|
94
|
+
export type TaxSupplyType = (typeof TAX_SUPPLY_TYPES)[number];
|
|
95
|
+
/**
|
|
96
|
+
* Where the business ACTUALLY operates. `head_office` and `fixed_establishment`
|
|
97
|
+
* are the owner's statement of establishment (the EU rule reads them); any
|
|
98
|
+
* location in a US state is physical presence there.
|
|
99
|
+
*/
|
|
100
|
+
export declare const TAX_OPERATING_LOCATION_KINDS: readonly ["head_office", "fixed_establishment", "office", "warehouse", "employees", "inventory", "other"];
|
|
101
|
+
export type TaxOperatingLocationKind = (typeof TAX_OPERATING_LOCATION_KINDS)[number];
|
|
102
|
+
/**
|
|
103
|
+
* Where the business stands with a tax authority, IN ITS OWN WORDS.
|
|
104
|
+
*
|
|
105
|
+
* - `unknown` — the owner does not know; an assessment escalates it.
|
|
106
|
+
* - `not_registered` — the owner says there is no registration.
|
|
107
|
+
* - `application_pending` — an application was made outside Peable and the
|
|
108
|
+
* authority has not answered: an ambiguous outcome, never treated as
|
|
109
|
+
* registered.
|
|
110
|
+
* - `registered` — the owner says the authority registered the business, from
|
|
111
|
+
* `effective_from`.
|
|
112
|
+
* - `rejected` — the authority refused the application.
|
|
113
|
+
* - `ended` — the registration ended at `effective_to`.
|
|
114
|
+
*/
|
|
115
|
+
export declare const TAX_REGISTRATION_DECLARATION_STATUSES: readonly ["unknown", "not_registered", "application_pending", "registered", "rejected", "ended"];
|
|
116
|
+
export type TaxRegistrationDeclarationStatus = (typeof TAX_REGISTRATION_DECLARATION_STATUSES)[number];
|
|
117
|
+
export declare const TAX_FILING_FREQUENCIES: readonly ["monthly", "quarterly", "annual", "unknown"];
|
|
118
|
+
export type TaxFilingFrequency = (typeof TAX_FILING_FREQUENCIES)[number];
|
|
119
|
+
export declare const TAX_DOCUMENT_KINDS: readonly ["registration_certificate", "authority_correspondence", "incorporation_record", "filing_confirmation", "payment_receipt", "other"];
|
|
120
|
+
export type TaxDocumentKind = (typeof TAX_DOCUMENT_KINDS)[number];
|
|
121
|
+
/** `provided`: an available document is attached; `unavailable`: only removed ones are. */
|
|
122
|
+
export declare const TAX_DOCUMENT_CHECKLIST_STATUSES: readonly ["provided", "missing", "unavailable"];
|
|
123
|
+
export type TaxDocumentChecklistStatus = (typeof TAX_DOCUMENT_CHECKLIST_STATUSES)[number];
|
|
124
|
+
/** The tax a jurisdiction rule is about. */
|
|
125
|
+
export declare const TAX_TYPES: readonly ["vat", "sales_tax"];
|
|
126
|
+
export type TaxType = (typeof TAX_TYPES)[number];
|
|
127
|
+
/** The window a rule's threshold is measured over. */
|
|
128
|
+
export declare const TAX_THRESHOLD_PERIODS: readonly ["current_or_previous_calendar_year", "preceding_twelve_calendar_months"];
|
|
129
|
+
export type TaxThresholdPeriod = (typeof TAX_THRESHOLD_PERIODS)[number];
|
|
130
|
+
/** Whether a tax professional has signed a rule off. */
|
|
131
|
+
export declare const TAX_RULE_REVIEW_STATUSES: readonly ["unreviewed", "reviewed"];
|
|
132
|
+
export type TaxRuleReviewStatus = (typeof TAX_RULE_REVIEW_STATUSES)[number];
|
|
133
|
+
/**
|
|
134
|
+
* What an assessment found for one jurisdiction.
|
|
135
|
+
*
|
|
136
|
+
* - `registration_declared` — the owner declares a registration in force.
|
|
137
|
+
* - `likely_required` — the rule indicates an obligation; a person decides.
|
|
138
|
+
* - `approaching_threshold` — at or above 80% of the threshold.
|
|
139
|
+
* - `not_indicated` — nothing in the recorded facts indicates one.
|
|
140
|
+
* - `uncertain` — the facts are missing or contradictory; escalated.
|
|
141
|
+
* - `unsupported` — sales exist where no supported rule applies.
|
|
142
|
+
*/
|
|
143
|
+
export declare const TAX_OBLIGATION_OUTCOMES: readonly ["registration_declared", "likely_required", "approaching_threshold", "not_indicated", "uncertain", "unsupported"];
|
|
144
|
+
export type TaxObligationOutcome = (typeof TAX_OBLIGATION_OUTCOMES)[number];
|
|
145
|
+
export declare const TAX_REVIEW_ITEM_STATUSES: readonly ["open", "resolved", "dismissed"];
|
|
146
|
+
export type TaxReviewItemStatus = (typeof TAX_REVIEW_ITEM_STATUSES)[number];
|
|
147
|
+
export declare const TAX_REVIEW_SEVERITIES: readonly ["action_required", "review"];
|
|
148
|
+
export type TaxReviewSeverity = (typeof TAX_REVIEW_SEVERITIES)[number];
|
|
149
|
+
/** What the owner decided. None of them activates collection. */
|
|
150
|
+
export declare const TAX_REVIEW_DECISIONS: readonly ["will_register", "registered_outside_peable", "not_required", "accepted_risk", "facts_corrected", "dismissed"];
|
|
151
|
+
export type TaxReviewDecision = (typeof TAX_REVIEW_DECISIONS)[number];
|
|
152
|
+
/** Who recorded a compliance change: the owner, a service credential, or Peable itself. */
|
|
153
|
+
export declare const TAX_ACTOR_TYPES: readonly ["user", "service", "system"];
|
|
154
|
+
export type TaxActorType = (typeof TAX_ACTOR_TYPES)[number];
|
|
155
|
+
export declare const TAX_DEADLINE_KINDS: readonly ["return", "payment", "registration"];
|
|
156
|
+
export type TaxDeadlineKind = (typeof TAX_DEADLINE_KINDS)[number];
|
|
157
|
+
export declare const TAX_DEADLINE_STATUSES: readonly ["upcoming", "due_soon", "passed"];
|
|
158
|
+
export type TaxDeadlineStatus = (typeof TAX_DEADLINE_STATUSES)[number];
|
|
159
|
+
export declare const TAX_COMPLIANCE_CAPABILITY_STATUSES: readonly ["available", "limited", "not_available", "out_of_scope"];
|
|
160
|
+
export type TaxComplianceCapabilityStatus = (typeof TAX_COMPLIANCE_CAPABILITY_STATUSES)[number];
|
|
161
|
+
/** VAT/sales tax, corporate income tax and annual company filings are different obligations. */
|
|
162
|
+
export declare const TAX_COMPLIANCE_CAPABILITY_CATEGORIES: readonly ["vat_sales_tax", "corporate_income_tax", "annual_company_filings", "workflow"];
|
|
163
|
+
export type TaxComplianceCapabilityCategory = (typeof TAX_COMPLIANCE_CAPABILITY_CATEGORIES)[number];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The date of the one wire (ADR 0014 D2): echoed as `Peable-Version` on every
|
|
3
|
+
* response, the `api_version` every event is stored under, and the only value
|
|
4
|
+
* a caller may send in `Peable-Version`. One constant, so the header, the
|
|
5
|
+
* stored events and the SDK's `apiVersion` cannot name two different wires.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PEABLE_API_VERSION = "2026-11-03";
|
|
8
|
+
/** Every wire date the gateway serves. Dated versions side by side are a later decision (ADR 0014 D2). */
|
|
9
|
+
export declare const PEABLE_API_VERSIONS: readonly ["2026-11-03"];
|
|
10
|
+
export type PeableApiVersion = (typeof PEABLE_API_VERSIONS)[number];
|