@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,1091 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type Expand } from '../../common/objects';
|
|
3
|
+
import { type PriceBillingScheme, type PriceTaxBehavior, type PriceTiersMode, type RecurringInterval, type RecurringUsageType, type TransformQuantityRound } from '../../vocabulary/catalog';
|
|
4
|
+
import type { CurrencyCode } from '../../vocabulary/money';
|
|
5
|
+
/**
|
|
6
|
+
* Prices (`price_…`, ADR 0018) — how much a product costs, in one currency,
|
|
7
|
+
* once or per interval. A price is never deleted and its amount never
|
|
8
|
+
* changes: archive it (`active: false`) and create another.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* One tier of a tiered price. `up_to` is the last quantity the tier covers
|
|
12
|
+
* (inclusive), and `null` on the last tier, which covers everything above —
|
|
13
|
+
* sent as `'inf'`. Each amount is a base-unit string; at least one is set.
|
|
14
|
+
*/
|
|
15
|
+
export declare const priceTierSchema: z.ZodObject<{
|
|
16
|
+
up_to: z.ZodNullable<z.ZodNumber>;
|
|
17
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
18
|
+
flat_amount: z.ZodNullable<z.ZodString>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export type PriceTier = z.output<typeof priceTierSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* Divide the quantity before pricing it: `divide_by: 10, round: 'up'` bills
|
|
23
|
+
* 11 units as 2 packs of ten. Per-unit prices only.
|
|
24
|
+
*/
|
|
25
|
+
export declare const priceTransformQuantitySchema: z.ZodObject<{
|
|
26
|
+
divide_by: z.ZodNumber;
|
|
27
|
+
round: z.ZodEnum<{
|
|
28
|
+
up: "up";
|
|
29
|
+
down: "down";
|
|
30
|
+
}>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type PriceTransformQuantity = z.output<typeof priceTransformQuantitySchema>;
|
|
33
|
+
export declare const priceRecurringSchema: z.ZodObject<{
|
|
34
|
+
interval: z.ZodEnum<{
|
|
35
|
+
day: "day";
|
|
36
|
+
week: "week";
|
|
37
|
+
month: "month";
|
|
38
|
+
year: "year";
|
|
39
|
+
}>;
|
|
40
|
+
interval_count: z.ZodNumber;
|
|
41
|
+
usage_type: z.ZodEnum<{
|
|
42
|
+
licensed: "licensed";
|
|
43
|
+
metered: "metered";
|
|
44
|
+
}>;
|
|
45
|
+
meter: z.ZodNullable<z.ZodString>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
export type PriceRecurring = z.output<typeof priceRecurringSchema>;
|
|
48
|
+
export declare const priceSchema: z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
object: z.ZodLiteral<"price">;
|
|
51
|
+
livemode: z.ZodBoolean;
|
|
52
|
+
active: z.ZodBoolean;
|
|
53
|
+
product: z.ZodType<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">, z.core.$ZodTypeInternals<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">>>;
|
|
54
|
+
currency: z.ZodEnum<{
|
|
55
|
+
FAIR: "FAIR";
|
|
56
|
+
EUR: "EUR";
|
|
57
|
+
USD: "USD";
|
|
58
|
+
GBP: "GBP";
|
|
59
|
+
CHF: "CHF";
|
|
60
|
+
SEK: "SEK";
|
|
61
|
+
NOK: "NOK";
|
|
62
|
+
DKK: "DKK";
|
|
63
|
+
PLN: "PLN";
|
|
64
|
+
CZK: "CZK";
|
|
65
|
+
CAD: "CAD";
|
|
66
|
+
AUD: "AUD";
|
|
67
|
+
JPY: "JPY";
|
|
68
|
+
}>;
|
|
69
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
70
|
+
billing_scheme: z.ZodEnum<{
|
|
71
|
+
per_unit: "per_unit";
|
|
72
|
+
tiered: "tiered";
|
|
73
|
+
}>;
|
|
74
|
+
tiers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
75
|
+
up_to: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
77
|
+
flat_amount: z.ZodNullable<z.ZodString>;
|
|
78
|
+
}, z.core.$strict>>>;
|
|
79
|
+
tiers_mode: z.ZodNullable<z.ZodEnum<{
|
|
80
|
+
graduated: "graduated";
|
|
81
|
+
volume: "volume";
|
|
82
|
+
}>>;
|
|
83
|
+
transform_quantity: z.ZodNullable<z.ZodObject<{
|
|
84
|
+
divide_by: z.ZodNumber;
|
|
85
|
+
round: z.ZodEnum<{
|
|
86
|
+
up: "up";
|
|
87
|
+
down: "down";
|
|
88
|
+
}>;
|
|
89
|
+
}, z.core.$strict>>;
|
|
90
|
+
type: z.ZodEnum<{
|
|
91
|
+
one_time: "one_time";
|
|
92
|
+
recurring: "recurring";
|
|
93
|
+
}>;
|
|
94
|
+
recurring: z.ZodNullable<z.ZodObject<{
|
|
95
|
+
interval: z.ZodEnum<{
|
|
96
|
+
day: "day";
|
|
97
|
+
week: "week";
|
|
98
|
+
month: "month";
|
|
99
|
+
year: "year";
|
|
100
|
+
}>;
|
|
101
|
+
interval_count: z.ZodNumber;
|
|
102
|
+
usage_type: z.ZodEnum<{
|
|
103
|
+
licensed: "licensed";
|
|
104
|
+
metered: "metered";
|
|
105
|
+
}>;
|
|
106
|
+
meter: z.ZodNullable<z.ZodString>;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
tax_behavior: z.ZodEnum<{
|
|
109
|
+
inclusive: "inclusive";
|
|
110
|
+
exclusive: "exclusive";
|
|
111
|
+
unspecified: "unspecified";
|
|
112
|
+
}>;
|
|
113
|
+
lookup_key: z.ZodNullable<z.ZodString>;
|
|
114
|
+
nickname: z.ZodNullable<z.ZodString>;
|
|
115
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
116
|
+
created: z.ZodNumber;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
export type Price = Expand<z.output<typeof priceSchema>>;
|
|
119
|
+
declare module '../../common/objects' {
|
|
120
|
+
interface ObjectMap {
|
|
121
|
+
price: Price;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
declare const recurringParams: z.ZodObject<{
|
|
125
|
+
interval: z.ZodEnum<{
|
|
126
|
+
day: "day";
|
|
127
|
+
week: "week";
|
|
128
|
+
month: "month";
|
|
129
|
+
year: "year";
|
|
130
|
+
}>;
|
|
131
|
+
interval_count: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
usage_type: z.ZodOptional<z.ZodEnum<{
|
|
133
|
+
licensed: "licensed";
|
|
134
|
+
metered: "metered";
|
|
135
|
+
}>>;
|
|
136
|
+
meter: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
export type RecurringParams = z.input<typeof recurringParams>;
|
|
139
|
+
declare const tierParams: z.ZodObject<{
|
|
140
|
+
up_to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
141
|
+
unit_amount: z.ZodOptional<z.ZodString>;
|
|
142
|
+
flat_amount: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, z.core.$strict>;
|
|
144
|
+
export type PriceTierParams = z.input<typeof tierParams>;
|
|
145
|
+
declare const transformQuantityParams: z.ZodObject<{
|
|
146
|
+
divide_by: z.ZodNumber;
|
|
147
|
+
round: z.ZodEnum<{
|
|
148
|
+
up: "up";
|
|
149
|
+
down: "down";
|
|
150
|
+
}>;
|
|
151
|
+
}, z.core.$strict>;
|
|
152
|
+
/** A tier as a parsed request stores it. */
|
|
153
|
+
export interface ParsedPriceTier {
|
|
154
|
+
up_to: number | null;
|
|
155
|
+
unit_amount: string | null;
|
|
156
|
+
flat_amount: string | null;
|
|
157
|
+
}
|
|
158
|
+
/** A price's shape as a parsed request decides it (the backend stores this). */
|
|
159
|
+
export interface ParsedPriceShape {
|
|
160
|
+
readonly currency: CurrencyCode;
|
|
161
|
+
readonly unitAmount: string | null;
|
|
162
|
+
readonly billingScheme: PriceBillingScheme;
|
|
163
|
+
readonly tiers: readonly ParsedPriceTier[] | null;
|
|
164
|
+
readonly tiersMode: PriceTiersMode | null;
|
|
165
|
+
readonly transformQuantity: {
|
|
166
|
+
divideBy: number;
|
|
167
|
+
round: TransformQuantityRound;
|
|
168
|
+
} | null;
|
|
169
|
+
readonly recurring: {
|
|
170
|
+
interval: RecurringInterval;
|
|
171
|
+
intervalCount: number;
|
|
172
|
+
usageType: RecurringUsageType;
|
|
173
|
+
/** The `mtr_…` a request named, before the gateway resolves it. */
|
|
174
|
+
meterPublicId?: string;
|
|
175
|
+
} | null;
|
|
176
|
+
readonly taxBehavior: PriceTaxBehavior;
|
|
177
|
+
}
|
|
178
|
+
interface PriceShapeInput {
|
|
179
|
+
currency: CurrencyCode;
|
|
180
|
+
unit_amount?: string | undefined;
|
|
181
|
+
billing_scheme?: PriceBillingScheme | undefined;
|
|
182
|
+
tiers?: z.output<typeof tierParams>[] | undefined;
|
|
183
|
+
tiers_mode?: PriceTiersMode | undefined;
|
|
184
|
+
transform_quantity?: z.output<typeof transformQuantityParams> | undefined;
|
|
185
|
+
recurring?: (Partial<z.output<typeof recurringParams>> & Pick<z.output<typeof recurringParams>, 'interval'>) | undefined;
|
|
186
|
+
tax_behavior?: PriceTaxBehavior | undefined;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Decide the stored shape of a price from its request fields, adding an issue
|
|
190
|
+
* (with the field's path) for every rule it breaks. Returns `null` when any
|
|
191
|
+
* rule was broken. Amounts are bounded per currency by its decimals
|
|
192
|
+
* (`maxBaseUnits`).
|
|
193
|
+
*/
|
|
194
|
+
export declare function priceShapeOf(input: PriceShapeInput, ctx: z.RefinementCtx): ParsedPriceShape | null;
|
|
195
|
+
/** `price_data` — an inline price of an existing product (`product: 'prod_…'`). */
|
|
196
|
+
export declare const priceDataParams: z.ZodPipe<z.ZodObject<{
|
|
197
|
+
product: z.ZodString;
|
|
198
|
+
currency: z.ZodEnum<{
|
|
199
|
+
FAIR: "FAIR";
|
|
200
|
+
EUR: "EUR";
|
|
201
|
+
USD: "USD";
|
|
202
|
+
GBP: "GBP";
|
|
203
|
+
CHF: "CHF";
|
|
204
|
+
SEK: "SEK";
|
|
205
|
+
NOK: "NOK";
|
|
206
|
+
DKK: "DKK";
|
|
207
|
+
PLN: "PLN";
|
|
208
|
+
CZK: "CZK";
|
|
209
|
+
CAD: "CAD";
|
|
210
|
+
AUD: "AUD";
|
|
211
|
+
JPY: "JPY";
|
|
212
|
+
}>;
|
|
213
|
+
unit_amount: z.ZodString;
|
|
214
|
+
recurring: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
interval: z.ZodEnum<{
|
|
216
|
+
day: "day";
|
|
217
|
+
week: "week";
|
|
218
|
+
month: "month";
|
|
219
|
+
year: "year";
|
|
220
|
+
}>;
|
|
221
|
+
interval_count: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
}, z.core.$strict>>;
|
|
223
|
+
tax_behavior: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
inclusive: "inclusive";
|
|
225
|
+
exclusive: "exclusive";
|
|
226
|
+
unspecified: "unspecified";
|
|
227
|
+
}>>;
|
|
228
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
229
|
+
product: string;
|
|
230
|
+
shape: ParsedPriceShape;
|
|
231
|
+
}, {
|
|
232
|
+
product: string;
|
|
233
|
+
currency: "FAIR" | "EUR" | "USD" | "GBP" | "CHF" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "CAD" | "AUD" | "JPY";
|
|
234
|
+
unit_amount: string;
|
|
235
|
+
recurring?: {
|
|
236
|
+
interval: "day" | "week" | "month" | "year";
|
|
237
|
+
interval_count?: number | undefined;
|
|
238
|
+
} | undefined;
|
|
239
|
+
tax_behavior?: "inclusive" | "exclusive" | "unspecified" | undefined;
|
|
240
|
+
}>>;
|
|
241
|
+
export type PriceDataParams = z.input<typeof priceDataParams>;
|
|
242
|
+
/** `default_price_data` on a product create — `price_data` for the product being made. */
|
|
243
|
+
export declare const defaultPriceDataParams: z.ZodPipe<z.ZodObject<{
|
|
244
|
+
currency: z.ZodEnum<{
|
|
245
|
+
FAIR: "FAIR";
|
|
246
|
+
EUR: "EUR";
|
|
247
|
+
USD: "USD";
|
|
248
|
+
GBP: "GBP";
|
|
249
|
+
CHF: "CHF";
|
|
250
|
+
SEK: "SEK";
|
|
251
|
+
NOK: "NOK";
|
|
252
|
+
DKK: "DKK";
|
|
253
|
+
PLN: "PLN";
|
|
254
|
+
CZK: "CZK";
|
|
255
|
+
CAD: "CAD";
|
|
256
|
+
AUD: "AUD";
|
|
257
|
+
JPY: "JPY";
|
|
258
|
+
}>;
|
|
259
|
+
unit_amount: z.ZodString;
|
|
260
|
+
recurring: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
interval: z.ZodEnum<{
|
|
262
|
+
day: "day";
|
|
263
|
+
week: "week";
|
|
264
|
+
month: "month";
|
|
265
|
+
year: "year";
|
|
266
|
+
}>;
|
|
267
|
+
interval_count: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
}, z.core.$strict>>;
|
|
269
|
+
tax_behavior: z.ZodOptional<z.ZodEnum<{
|
|
270
|
+
inclusive: "inclusive";
|
|
271
|
+
exclusive: "exclusive";
|
|
272
|
+
unspecified: "unspecified";
|
|
273
|
+
}>>;
|
|
274
|
+
}, z.core.$strict>, z.ZodTransform<ParsedPriceShape, {
|
|
275
|
+
currency: "FAIR" | "EUR" | "USD" | "GBP" | "CHF" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "CAD" | "AUD" | "JPY";
|
|
276
|
+
unit_amount: string;
|
|
277
|
+
recurring?: {
|
|
278
|
+
interval: "day" | "week" | "month" | "year";
|
|
279
|
+
interval_count?: number | undefined;
|
|
280
|
+
} | undefined;
|
|
281
|
+
tax_behavior?: "inclusive" | "exclusive" | "unspecified" | undefined;
|
|
282
|
+
}>>;
|
|
283
|
+
export type DefaultPriceDataParams = z.input<typeof defaultPriceDataParams>;
|
|
284
|
+
export declare const createPriceParams: z.ZodPipe<z.ZodObject<{
|
|
285
|
+
product: z.ZodString;
|
|
286
|
+
lookup_key: z.ZodOptional<z.ZodString>;
|
|
287
|
+
transfer_lookup_key: z.ZodOptional<z.ZodBoolean>;
|
|
288
|
+
nickname: z.ZodOptional<z.ZodString>;
|
|
289
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
290
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
|
|
291
|
+
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>>>;
|
|
292
|
+
currency: z.ZodEnum<{
|
|
293
|
+
FAIR: "FAIR";
|
|
294
|
+
EUR: "EUR";
|
|
295
|
+
USD: "USD";
|
|
296
|
+
GBP: "GBP";
|
|
297
|
+
CHF: "CHF";
|
|
298
|
+
SEK: "SEK";
|
|
299
|
+
NOK: "NOK";
|
|
300
|
+
DKK: "DKK";
|
|
301
|
+
PLN: "PLN";
|
|
302
|
+
CZK: "CZK";
|
|
303
|
+
CAD: "CAD";
|
|
304
|
+
AUD: "AUD";
|
|
305
|
+
JPY: "JPY";
|
|
306
|
+
}>;
|
|
307
|
+
unit_amount: z.ZodOptional<z.ZodString>;
|
|
308
|
+
billing_scheme: z.ZodOptional<z.ZodEnum<{
|
|
309
|
+
per_unit: "per_unit";
|
|
310
|
+
tiered: "tiered";
|
|
311
|
+
}>>;
|
|
312
|
+
tiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
313
|
+
up_to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
314
|
+
unit_amount: z.ZodOptional<z.ZodString>;
|
|
315
|
+
flat_amount: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strict>>>;
|
|
317
|
+
tiers_mode: z.ZodOptional<z.ZodEnum<{
|
|
318
|
+
graduated: "graduated";
|
|
319
|
+
volume: "volume";
|
|
320
|
+
}>>;
|
|
321
|
+
transform_quantity: z.ZodOptional<z.ZodObject<{
|
|
322
|
+
divide_by: z.ZodNumber;
|
|
323
|
+
round: z.ZodEnum<{
|
|
324
|
+
up: "up";
|
|
325
|
+
down: "down";
|
|
326
|
+
}>;
|
|
327
|
+
}, z.core.$strict>>;
|
|
328
|
+
recurring: z.ZodOptional<z.ZodObject<{
|
|
329
|
+
interval: z.ZodEnum<{
|
|
330
|
+
day: "day";
|
|
331
|
+
week: "week";
|
|
332
|
+
month: "month";
|
|
333
|
+
year: "year";
|
|
334
|
+
}>;
|
|
335
|
+
interval_count: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
usage_type: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
licensed: "licensed";
|
|
338
|
+
metered: "metered";
|
|
339
|
+
}>>;
|
|
340
|
+
meter: z.ZodOptional<z.ZodString>;
|
|
341
|
+
}, z.core.$strict>>;
|
|
342
|
+
tax_behavior: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
inclusive: "inclusive";
|
|
344
|
+
exclusive: "exclusive";
|
|
345
|
+
unspecified: "unspecified";
|
|
346
|
+
}>>;
|
|
347
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
348
|
+
shape: ParsedPriceShape;
|
|
349
|
+
product: string;
|
|
350
|
+
currency: "FAIR" | "EUR" | "USD" | "GBP" | "CHF" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "CAD" | "AUD" | "JPY";
|
|
351
|
+
lookup_key?: string | undefined;
|
|
352
|
+
transfer_lookup_key?: boolean | undefined;
|
|
353
|
+
nickname?: string | undefined;
|
|
354
|
+
active?: boolean | undefined;
|
|
355
|
+
metadata?: Record<string, string> | undefined;
|
|
356
|
+
expand?: string[] | undefined;
|
|
357
|
+
unit_amount?: string | undefined;
|
|
358
|
+
billing_scheme?: "per_unit" | "tiered" | undefined;
|
|
359
|
+
tiers?: {
|
|
360
|
+
up_to: number | "inf";
|
|
361
|
+
unit_amount?: string | undefined;
|
|
362
|
+
flat_amount?: string | undefined;
|
|
363
|
+
}[] | undefined;
|
|
364
|
+
tiers_mode?: "graduated" | "volume" | undefined;
|
|
365
|
+
transform_quantity?: {
|
|
366
|
+
divide_by: number;
|
|
367
|
+
round: "up" | "down";
|
|
368
|
+
} | undefined;
|
|
369
|
+
recurring?: {
|
|
370
|
+
interval: "day" | "week" | "month" | "year";
|
|
371
|
+
interval_count?: number | undefined;
|
|
372
|
+
usage_type?: "licensed" | "metered" | undefined;
|
|
373
|
+
meter?: string | undefined;
|
|
374
|
+
} | undefined;
|
|
375
|
+
tax_behavior?: "inclusive" | "exclusive" | "unspecified" | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
product: string;
|
|
378
|
+
currency: "FAIR" | "EUR" | "USD" | "GBP" | "CHF" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "CAD" | "AUD" | "JPY";
|
|
379
|
+
lookup_key?: string | undefined;
|
|
380
|
+
transfer_lookup_key?: boolean | undefined;
|
|
381
|
+
nickname?: string | undefined;
|
|
382
|
+
active?: boolean | undefined;
|
|
383
|
+
metadata?: Record<string, string> | undefined;
|
|
384
|
+
expand?: string[] | undefined;
|
|
385
|
+
unit_amount?: string | undefined;
|
|
386
|
+
billing_scheme?: "per_unit" | "tiered" | undefined;
|
|
387
|
+
tiers?: {
|
|
388
|
+
up_to: number | "inf";
|
|
389
|
+
unit_amount?: string | undefined;
|
|
390
|
+
flat_amount?: string | undefined;
|
|
391
|
+
}[] | undefined;
|
|
392
|
+
tiers_mode?: "graduated" | "volume" | undefined;
|
|
393
|
+
transform_quantity?: {
|
|
394
|
+
divide_by: number;
|
|
395
|
+
round: "up" | "down";
|
|
396
|
+
} | undefined;
|
|
397
|
+
recurring?: {
|
|
398
|
+
interval: "day" | "week" | "month" | "year";
|
|
399
|
+
interval_count?: number | undefined;
|
|
400
|
+
usage_type?: "licensed" | "metered" | undefined;
|
|
401
|
+
meter?: string | undefined;
|
|
402
|
+
} | undefined;
|
|
403
|
+
tax_behavior?: "inclusive" | "exclusive" | "unspecified" | undefined;
|
|
404
|
+
}>>;
|
|
405
|
+
export type CreatePriceParams = z.input<typeof createPriceParams>;
|
|
406
|
+
/** The only mutable fields. `""` clears `nickname` and `lookup_key`. */
|
|
407
|
+
export declare const updatePriceParams: z.ZodObject<{
|
|
408
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
409
|
+
nickname: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string>>>;
|
|
410
|
+
lookup_key: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string>>>;
|
|
411
|
+
transfer_lookup_key: z.ZodOptional<z.ZodBoolean>;
|
|
412
|
+
tax_behavior: z.ZodOptional<z.ZodEnum<{
|
|
413
|
+
inclusive: "inclusive";
|
|
414
|
+
exclusive: "exclusive";
|
|
415
|
+
unspecified: "unspecified";
|
|
416
|
+
}>>;
|
|
417
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<import("../..").MetadataPatch, Record<string, string>>>>;
|
|
418
|
+
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>>>;
|
|
419
|
+
}, z.core.$strict>;
|
|
420
|
+
export type UpdatePriceParams = z.input<typeof updatePriceParams>;
|
|
421
|
+
export declare const listPricesQuery: z.ZodObject<{
|
|
422
|
+
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>>;
|
|
423
|
+
starting_after: z.ZodOptional<z.ZodString>;
|
|
424
|
+
ending_before: z.ZodOptional<z.ZodString>;
|
|
425
|
+
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<{
|
|
426
|
+
gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
427
|
+
gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
428
|
+
lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
429
|
+
lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
430
|
+
}, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
|
|
431
|
+
gt?: number | undefined;
|
|
432
|
+
gte?: number | undefined;
|
|
433
|
+
lt?: number | undefined;
|
|
434
|
+
lte?: number | undefined;
|
|
435
|
+
}>>]>>;
|
|
436
|
+
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>>>;
|
|
437
|
+
product: z.ZodOptional<z.ZodString>;
|
|
438
|
+
active: z.ZodOptional<z.ZodType<boolean, boolean, z.core.$ZodTypeInternals<boolean, boolean>>>;
|
|
439
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
440
|
+
one_time: "one_time";
|
|
441
|
+
recurring: "recurring";
|
|
442
|
+
}>>;
|
|
443
|
+
currency: z.ZodOptional<z.ZodEnum<{
|
|
444
|
+
FAIR: "FAIR";
|
|
445
|
+
EUR: "EUR";
|
|
446
|
+
USD: "USD";
|
|
447
|
+
GBP: "GBP";
|
|
448
|
+
CHF: "CHF";
|
|
449
|
+
SEK: "SEK";
|
|
450
|
+
NOK: "NOK";
|
|
451
|
+
DKK: "DKK";
|
|
452
|
+
PLN: "PLN";
|
|
453
|
+
CZK: "CZK";
|
|
454
|
+
CAD: "CAD";
|
|
455
|
+
AUD: "AUD";
|
|
456
|
+
JPY: "JPY";
|
|
457
|
+
}>>;
|
|
458
|
+
lookup_keys: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
|
|
459
|
+
recurring: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
461
|
+
day: "day";
|
|
462
|
+
week: "week";
|
|
463
|
+
month: "month";
|
|
464
|
+
year: "year";
|
|
465
|
+
}>>;
|
|
466
|
+
usage_type: z.ZodOptional<z.ZodEnum<{
|
|
467
|
+
licensed: "licensed";
|
|
468
|
+
metered: "metered";
|
|
469
|
+
}>>;
|
|
470
|
+
}, z.core.$strict>>;
|
|
471
|
+
}, z.core.$strict>;
|
|
472
|
+
export type PriceListParams = z.input<typeof listPricesQuery>;
|
|
473
|
+
export declare const priceRoutes: readonly [{
|
|
474
|
+
readonly operationId: "createPrice";
|
|
475
|
+
readonly method: "post";
|
|
476
|
+
readonly path: "/v1/prices";
|
|
477
|
+
readonly tag: "Prices";
|
|
478
|
+
readonly summary: "Create a price";
|
|
479
|
+
readonly auth: "service";
|
|
480
|
+
readonly scope: "payments:write";
|
|
481
|
+
readonly idempotent: true;
|
|
482
|
+
readonly body: z.ZodPipe<z.ZodObject<{
|
|
483
|
+
product: z.ZodString;
|
|
484
|
+
lookup_key: z.ZodOptional<z.ZodString>;
|
|
485
|
+
transfer_lookup_key: z.ZodOptional<z.ZodBoolean>;
|
|
486
|
+
nickname: z.ZodOptional<z.ZodString>;
|
|
487
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
488
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<Record<string, string>, Record<string, string>>>>;
|
|
489
|
+
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>>>;
|
|
490
|
+
currency: z.ZodEnum<{
|
|
491
|
+
FAIR: "FAIR";
|
|
492
|
+
EUR: "EUR";
|
|
493
|
+
USD: "USD";
|
|
494
|
+
GBP: "GBP";
|
|
495
|
+
CHF: "CHF";
|
|
496
|
+
SEK: "SEK";
|
|
497
|
+
NOK: "NOK";
|
|
498
|
+
DKK: "DKK";
|
|
499
|
+
PLN: "PLN";
|
|
500
|
+
CZK: "CZK";
|
|
501
|
+
CAD: "CAD";
|
|
502
|
+
AUD: "AUD";
|
|
503
|
+
JPY: "JPY";
|
|
504
|
+
}>;
|
|
505
|
+
unit_amount: z.ZodOptional<z.ZodString>;
|
|
506
|
+
billing_scheme: z.ZodOptional<z.ZodEnum<{
|
|
507
|
+
per_unit: "per_unit";
|
|
508
|
+
tiered: "tiered";
|
|
509
|
+
}>>;
|
|
510
|
+
tiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
511
|
+
up_to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
512
|
+
unit_amount: z.ZodOptional<z.ZodString>;
|
|
513
|
+
flat_amount: z.ZodOptional<z.ZodString>;
|
|
514
|
+
}, z.core.$strict>>>;
|
|
515
|
+
tiers_mode: z.ZodOptional<z.ZodEnum<{
|
|
516
|
+
graduated: "graduated";
|
|
517
|
+
volume: "volume";
|
|
518
|
+
}>>;
|
|
519
|
+
transform_quantity: z.ZodOptional<z.ZodObject<{
|
|
520
|
+
divide_by: z.ZodNumber;
|
|
521
|
+
round: z.ZodEnum<{
|
|
522
|
+
up: "up";
|
|
523
|
+
down: "down";
|
|
524
|
+
}>;
|
|
525
|
+
}, z.core.$strict>>;
|
|
526
|
+
recurring: z.ZodOptional<z.ZodObject<{
|
|
527
|
+
interval: z.ZodEnum<{
|
|
528
|
+
day: "day";
|
|
529
|
+
week: "week";
|
|
530
|
+
month: "month";
|
|
531
|
+
year: "year";
|
|
532
|
+
}>;
|
|
533
|
+
interval_count: z.ZodOptional<z.ZodNumber>;
|
|
534
|
+
usage_type: z.ZodOptional<z.ZodEnum<{
|
|
535
|
+
licensed: "licensed";
|
|
536
|
+
metered: "metered";
|
|
537
|
+
}>>;
|
|
538
|
+
meter: z.ZodOptional<z.ZodString>;
|
|
539
|
+
}, z.core.$strict>>;
|
|
540
|
+
tax_behavior: z.ZodOptional<z.ZodEnum<{
|
|
541
|
+
inclusive: "inclusive";
|
|
542
|
+
exclusive: "exclusive";
|
|
543
|
+
unspecified: "unspecified";
|
|
544
|
+
}>>;
|
|
545
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
546
|
+
shape: ParsedPriceShape;
|
|
547
|
+
product: string;
|
|
548
|
+
currency: "FAIR" | "EUR" | "USD" | "GBP" | "CHF" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "CAD" | "AUD" | "JPY";
|
|
549
|
+
lookup_key?: string | undefined;
|
|
550
|
+
transfer_lookup_key?: boolean | undefined;
|
|
551
|
+
nickname?: string | undefined;
|
|
552
|
+
active?: boolean | undefined;
|
|
553
|
+
metadata?: Record<string, string> | undefined;
|
|
554
|
+
expand?: string[] | undefined;
|
|
555
|
+
unit_amount?: string | undefined;
|
|
556
|
+
billing_scheme?: "per_unit" | "tiered" | undefined;
|
|
557
|
+
tiers?: {
|
|
558
|
+
up_to: number | "inf";
|
|
559
|
+
unit_amount?: string | undefined;
|
|
560
|
+
flat_amount?: string | undefined;
|
|
561
|
+
}[] | undefined;
|
|
562
|
+
tiers_mode?: "graduated" | "volume" | undefined;
|
|
563
|
+
transform_quantity?: {
|
|
564
|
+
divide_by: number;
|
|
565
|
+
round: "up" | "down";
|
|
566
|
+
} | undefined;
|
|
567
|
+
recurring?: {
|
|
568
|
+
interval: "day" | "week" | "month" | "year";
|
|
569
|
+
interval_count?: number | undefined;
|
|
570
|
+
usage_type?: "licensed" | "metered" | undefined;
|
|
571
|
+
meter?: string | undefined;
|
|
572
|
+
} | undefined;
|
|
573
|
+
tax_behavior?: "inclusive" | "exclusive" | "unspecified" | undefined;
|
|
574
|
+
}, {
|
|
575
|
+
product: string;
|
|
576
|
+
currency: "FAIR" | "EUR" | "USD" | "GBP" | "CHF" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "CAD" | "AUD" | "JPY";
|
|
577
|
+
lookup_key?: string | undefined;
|
|
578
|
+
transfer_lookup_key?: boolean | undefined;
|
|
579
|
+
nickname?: string | undefined;
|
|
580
|
+
active?: boolean | undefined;
|
|
581
|
+
metadata?: Record<string, string> | undefined;
|
|
582
|
+
expand?: string[] | undefined;
|
|
583
|
+
unit_amount?: string | undefined;
|
|
584
|
+
billing_scheme?: "per_unit" | "tiered" | undefined;
|
|
585
|
+
tiers?: {
|
|
586
|
+
up_to: number | "inf";
|
|
587
|
+
unit_amount?: string | undefined;
|
|
588
|
+
flat_amount?: string | undefined;
|
|
589
|
+
}[] | undefined;
|
|
590
|
+
tiers_mode?: "graduated" | "volume" | undefined;
|
|
591
|
+
transform_quantity?: {
|
|
592
|
+
divide_by: number;
|
|
593
|
+
round: "up" | "down";
|
|
594
|
+
} | undefined;
|
|
595
|
+
recurring?: {
|
|
596
|
+
interval: "day" | "week" | "month" | "year";
|
|
597
|
+
interval_count?: number | undefined;
|
|
598
|
+
usage_type?: "licensed" | "metered" | undefined;
|
|
599
|
+
meter?: string | undefined;
|
|
600
|
+
} | undefined;
|
|
601
|
+
tax_behavior?: "inclusive" | "exclusive" | "unspecified" | undefined;
|
|
602
|
+
}>>;
|
|
603
|
+
readonly response: z.ZodObject<{
|
|
604
|
+
id: z.ZodString;
|
|
605
|
+
object: z.ZodLiteral<"price">;
|
|
606
|
+
livemode: z.ZodBoolean;
|
|
607
|
+
active: z.ZodBoolean;
|
|
608
|
+
product: z.ZodType<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">, z.core.$ZodTypeInternals<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">>>;
|
|
609
|
+
currency: z.ZodEnum<{
|
|
610
|
+
FAIR: "FAIR";
|
|
611
|
+
EUR: "EUR";
|
|
612
|
+
USD: "USD";
|
|
613
|
+
GBP: "GBP";
|
|
614
|
+
CHF: "CHF";
|
|
615
|
+
SEK: "SEK";
|
|
616
|
+
NOK: "NOK";
|
|
617
|
+
DKK: "DKK";
|
|
618
|
+
PLN: "PLN";
|
|
619
|
+
CZK: "CZK";
|
|
620
|
+
CAD: "CAD";
|
|
621
|
+
AUD: "AUD";
|
|
622
|
+
JPY: "JPY";
|
|
623
|
+
}>;
|
|
624
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
625
|
+
billing_scheme: z.ZodEnum<{
|
|
626
|
+
per_unit: "per_unit";
|
|
627
|
+
tiered: "tiered";
|
|
628
|
+
}>;
|
|
629
|
+
tiers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
630
|
+
up_to: z.ZodNullable<z.ZodNumber>;
|
|
631
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
632
|
+
flat_amount: z.ZodNullable<z.ZodString>;
|
|
633
|
+
}, z.core.$strict>>>;
|
|
634
|
+
tiers_mode: z.ZodNullable<z.ZodEnum<{
|
|
635
|
+
graduated: "graduated";
|
|
636
|
+
volume: "volume";
|
|
637
|
+
}>>;
|
|
638
|
+
transform_quantity: z.ZodNullable<z.ZodObject<{
|
|
639
|
+
divide_by: z.ZodNumber;
|
|
640
|
+
round: z.ZodEnum<{
|
|
641
|
+
up: "up";
|
|
642
|
+
down: "down";
|
|
643
|
+
}>;
|
|
644
|
+
}, z.core.$strict>>;
|
|
645
|
+
type: z.ZodEnum<{
|
|
646
|
+
one_time: "one_time";
|
|
647
|
+
recurring: "recurring";
|
|
648
|
+
}>;
|
|
649
|
+
recurring: z.ZodNullable<z.ZodObject<{
|
|
650
|
+
interval: z.ZodEnum<{
|
|
651
|
+
day: "day";
|
|
652
|
+
week: "week";
|
|
653
|
+
month: "month";
|
|
654
|
+
year: "year";
|
|
655
|
+
}>;
|
|
656
|
+
interval_count: z.ZodNumber;
|
|
657
|
+
usage_type: z.ZodEnum<{
|
|
658
|
+
licensed: "licensed";
|
|
659
|
+
metered: "metered";
|
|
660
|
+
}>;
|
|
661
|
+
meter: z.ZodNullable<z.ZodString>;
|
|
662
|
+
}, z.core.$strict>>;
|
|
663
|
+
tax_behavior: z.ZodEnum<{
|
|
664
|
+
inclusive: "inclusive";
|
|
665
|
+
exclusive: "exclusive";
|
|
666
|
+
unspecified: "unspecified";
|
|
667
|
+
}>;
|
|
668
|
+
lookup_key: z.ZodNullable<z.ZodString>;
|
|
669
|
+
nickname: z.ZodNullable<z.ZodString>;
|
|
670
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
671
|
+
created: z.ZodNumber;
|
|
672
|
+
}, z.core.$strict>;
|
|
673
|
+
readonly sdk: "prices.create";
|
|
674
|
+
readonly expandable: "price";
|
|
675
|
+
}, {
|
|
676
|
+
readonly operationId: "listPrices";
|
|
677
|
+
readonly method: "get";
|
|
678
|
+
readonly path: "/v1/prices";
|
|
679
|
+
readonly tag: "Prices";
|
|
680
|
+
readonly summary: "List prices";
|
|
681
|
+
readonly description: "`lookup_keys` (at most 10) finds the current price of a plan by its stable name.";
|
|
682
|
+
readonly auth: "service";
|
|
683
|
+
readonly scope: "payments:read";
|
|
684
|
+
readonly query: z.ZodObject<{
|
|
685
|
+
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>>;
|
|
686
|
+
starting_after: z.ZodOptional<z.ZodString>;
|
|
687
|
+
ending_before: z.ZodOptional<z.ZodString>;
|
|
688
|
+
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<{
|
|
689
|
+
gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
690
|
+
gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
691
|
+
lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
692
|
+
lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
693
|
+
}, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
|
|
694
|
+
gt?: number | undefined;
|
|
695
|
+
gte?: number | undefined;
|
|
696
|
+
lt?: number | undefined;
|
|
697
|
+
lte?: number | undefined;
|
|
698
|
+
}>>]>>;
|
|
699
|
+
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>>>;
|
|
700
|
+
product: z.ZodOptional<z.ZodString>;
|
|
701
|
+
active: z.ZodOptional<z.ZodType<boolean, boolean, z.core.$ZodTypeInternals<boolean, boolean>>>;
|
|
702
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
703
|
+
one_time: "one_time";
|
|
704
|
+
recurring: "recurring";
|
|
705
|
+
}>>;
|
|
706
|
+
currency: z.ZodOptional<z.ZodEnum<{
|
|
707
|
+
FAIR: "FAIR";
|
|
708
|
+
EUR: "EUR";
|
|
709
|
+
USD: "USD";
|
|
710
|
+
GBP: "GBP";
|
|
711
|
+
CHF: "CHF";
|
|
712
|
+
SEK: "SEK";
|
|
713
|
+
NOK: "NOK";
|
|
714
|
+
DKK: "DKK";
|
|
715
|
+
PLN: "PLN";
|
|
716
|
+
CZK: "CZK";
|
|
717
|
+
CAD: "CAD";
|
|
718
|
+
AUD: "AUD";
|
|
719
|
+
JPY: "JPY";
|
|
720
|
+
}>>;
|
|
721
|
+
lookup_keys: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
|
|
722
|
+
recurring: z.ZodOptional<z.ZodObject<{
|
|
723
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
724
|
+
day: "day";
|
|
725
|
+
week: "week";
|
|
726
|
+
month: "month";
|
|
727
|
+
year: "year";
|
|
728
|
+
}>>;
|
|
729
|
+
usage_type: z.ZodOptional<z.ZodEnum<{
|
|
730
|
+
licensed: "licensed";
|
|
731
|
+
metered: "metered";
|
|
732
|
+
}>>;
|
|
733
|
+
}, z.core.$strict>>;
|
|
734
|
+
}, z.core.$strict>;
|
|
735
|
+
readonly response: z.ZodObject<{
|
|
736
|
+
object: z.ZodLiteral<"list">;
|
|
737
|
+
data: z.ZodArray<z.ZodObject<{
|
|
738
|
+
id: z.ZodString;
|
|
739
|
+
object: z.ZodLiteral<"price">;
|
|
740
|
+
livemode: z.ZodBoolean;
|
|
741
|
+
active: z.ZodBoolean;
|
|
742
|
+
product: z.ZodType<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">, z.core.$ZodTypeInternals<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">>>;
|
|
743
|
+
currency: z.ZodEnum<{
|
|
744
|
+
FAIR: "FAIR";
|
|
745
|
+
EUR: "EUR";
|
|
746
|
+
USD: "USD";
|
|
747
|
+
GBP: "GBP";
|
|
748
|
+
CHF: "CHF";
|
|
749
|
+
SEK: "SEK";
|
|
750
|
+
NOK: "NOK";
|
|
751
|
+
DKK: "DKK";
|
|
752
|
+
PLN: "PLN";
|
|
753
|
+
CZK: "CZK";
|
|
754
|
+
CAD: "CAD";
|
|
755
|
+
AUD: "AUD";
|
|
756
|
+
JPY: "JPY";
|
|
757
|
+
}>;
|
|
758
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
759
|
+
billing_scheme: z.ZodEnum<{
|
|
760
|
+
per_unit: "per_unit";
|
|
761
|
+
tiered: "tiered";
|
|
762
|
+
}>;
|
|
763
|
+
tiers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
764
|
+
up_to: z.ZodNullable<z.ZodNumber>;
|
|
765
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
766
|
+
flat_amount: z.ZodNullable<z.ZodString>;
|
|
767
|
+
}, z.core.$strict>>>;
|
|
768
|
+
tiers_mode: z.ZodNullable<z.ZodEnum<{
|
|
769
|
+
graduated: "graduated";
|
|
770
|
+
volume: "volume";
|
|
771
|
+
}>>;
|
|
772
|
+
transform_quantity: z.ZodNullable<z.ZodObject<{
|
|
773
|
+
divide_by: z.ZodNumber;
|
|
774
|
+
round: z.ZodEnum<{
|
|
775
|
+
up: "up";
|
|
776
|
+
down: "down";
|
|
777
|
+
}>;
|
|
778
|
+
}, z.core.$strict>>;
|
|
779
|
+
type: z.ZodEnum<{
|
|
780
|
+
one_time: "one_time";
|
|
781
|
+
recurring: "recurring";
|
|
782
|
+
}>;
|
|
783
|
+
recurring: z.ZodNullable<z.ZodObject<{
|
|
784
|
+
interval: z.ZodEnum<{
|
|
785
|
+
day: "day";
|
|
786
|
+
week: "week";
|
|
787
|
+
month: "month";
|
|
788
|
+
year: "year";
|
|
789
|
+
}>;
|
|
790
|
+
interval_count: z.ZodNumber;
|
|
791
|
+
usage_type: z.ZodEnum<{
|
|
792
|
+
licensed: "licensed";
|
|
793
|
+
metered: "metered";
|
|
794
|
+
}>;
|
|
795
|
+
meter: z.ZodNullable<z.ZodString>;
|
|
796
|
+
}, z.core.$strict>>;
|
|
797
|
+
tax_behavior: z.ZodEnum<{
|
|
798
|
+
inclusive: "inclusive";
|
|
799
|
+
exclusive: "exclusive";
|
|
800
|
+
unspecified: "unspecified";
|
|
801
|
+
}>;
|
|
802
|
+
lookup_key: z.ZodNullable<z.ZodString>;
|
|
803
|
+
nickname: z.ZodNullable<z.ZodString>;
|
|
804
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
805
|
+
created: z.ZodNumber;
|
|
806
|
+
}, z.core.$strict>>;
|
|
807
|
+
has_more: z.ZodBoolean;
|
|
808
|
+
url: z.ZodString;
|
|
809
|
+
}, z.core.$strict>;
|
|
810
|
+
readonly sdk: "prices.list";
|
|
811
|
+
readonly expandable: "price";
|
|
812
|
+
}, {
|
|
813
|
+
readonly operationId: "retrievePrice";
|
|
814
|
+
readonly method: "get";
|
|
815
|
+
readonly path: "/v1/prices/{id}";
|
|
816
|
+
readonly tag: "Prices";
|
|
817
|
+
readonly summary: "Retrieve a price";
|
|
818
|
+
readonly auth: "service";
|
|
819
|
+
readonly scope: "payments:read";
|
|
820
|
+
readonly params: {
|
|
821
|
+
readonly id: "The price (`price_…`).";
|
|
822
|
+
};
|
|
823
|
+
readonly query: z.ZodObject<{
|
|
824
|
+
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>>>;
|
|
825
|
+
}, z.core.$strict>;
|
|
826
|
+
readonly response: z.ZodObject<{
|
|
827
|
+
id: z.ZodString;
|
|
828
|
+
object: z.ZodLiteral<"price">;
|
|
829
|
+
livemode: z.ZodBoolean;
|
|
830
|
+
active: z.ZodBoolean;
|
|
831
|
+
product: z.ZodType<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">, z.core.$ZodTypeInternals<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">>>;
|
|
832
|
+
currency: z.ZodEnum<{
|
|
833
|
+
FAIR: "FAIR";
|
|
834
|
+
EUR: "EUR";
|
|
835
|
+
USD: "USD";
|
|
836
|
+
GBP: "GBP";
|
|
837
|
+
CHF: "CHF";
|
|
838
|
+
SEK: "SEK";
|
|
839
|
+
NOK: "NOK";
|
|
840
|
+
DKK: "DKK";
|
|
841
|
+
PLN: "PLN";
|
|
842
|
+
CZK: "CZK";
|
|
843
|
+
CAD: "CAD";
|
|
844
|
+
AUD: "AUD";
|
|
845
|
+
JPY: "JPY";
|
|
846
|
+
}>;
|
|
847
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
848
|
+
billing_scheme: z.ZodEnum<{
|
|
849
|
+
per_unit: "per_unit";
|
|
850
|
+
tiered: "tiered";
|
|
851
|
+
}>;
|
|
852
|
+
tiers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
853
|
+
up_to: z.ZodNullable<z.ZodNumber>;
|
|
854
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
855
|
+
flat_amount: z.ZodNullable<z.ZodString>;
|
|
856
|
+
}, z.core.$strict>>>;
|
|
857
|
+
tiers_mode: z.ZodNullable<z.ZodEnum<{
|
|
858
|
+
graduated: "graduated";
|
|
859
|
+
volume: "volume";
|
|
860
|
+
}>>;
|
|
861
|
+
transform_quantity: z.ZodNullable<z.ZodObject<{
|
|
862
|
+
divide_by: z.ZodNumber;
|
|
863
|
+
round: z.ZodEnum<{
|
|
864
|
+
up: "up";
|
|
865
|
+
down: "down";
|
|
866
|
+
}>;
|
|
867
|
+
}, z.core.$strict>>;
|
|
868
|
+
type: z.ZodEnum<{
|
|
869
|
+
one_time: "one_time";
|
|
870
|
+
recurring: "recurring";
|
|
871
|
+
}>;
|
|
872
|
+
recurring: z.ZodNullable<z.ZodObject<{
|
|
873
|
+
interval: z.ZodEnum<{
|
|
874
|
+
day: "day";
|
|
875
|
+
week: "week";
|
|
876
|
+
month: "month";
|
|
877
|
+
year: "year";
|
|
878
|
+
}>;
|
|
879
|
+
interval_count: z.ZodNumber;
|
|
880
|
+
usage_type: z.ZodEnum<{
|
|
881
|
+
licensed: "licensed";
|
|
882
|
+
metered: "metered";
|
|
883
|
+
}>;
|
|
884
|
+
meter: z.ZodNullable<z.ZodString>;
|
|
885
|
+
}, z.core.$strict>>;
|
|
886
|
+
tax_behavior: z.ZodEnum<{
|
|
887
|
+
inclusive: "inclusive";
|
|
888
|
+
exclusive: "exclusive";
|
|
889
|
+
unspecified: "unspecified";
|
|
890
|
+
}>;
|
|
891
|
+
lookup_key: z.ZodNullable<z.ZodString>;
|
|
892
|
+
nickname: z.ZodNullable<z.ZodString>;
|
|
893
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
894
|
+
created: z.ZodNumber;
|
|
895
|
+
}, z.core.$strict>;
|
|
896
|
+
readonly sdk: "prices.retrieve";
|
|
897
|
+
readonly expandable: "price";
|
|
898
|
+
}, {
|
|
899
|
+
readonly operationId: "updatePrice";
|
|
900
|
+
readonly method: "post";
|
|
901
|
+
readonly path: "/v1/prices/{id}";
|
|
902
|
+
readonly tag: "Prices";
|
|
903
|
+
readonly summary: "Update a price";
|
|
904
|
+
readonly description: "Only `active`, `nickname`, `metadata`, `lookup_key` and — while it is `unspecified` — `tax_behavior` change. To change an amount, create a new price and archive this one.";
|
|
905
|
+
readonly auth: "service";
|
|
906
|
+
readonly scope: "payments:write";
|
|
907
|
+
readonly idempotent: true;
|
|
908
|
+
readonly params: {
|
|
909
|
+
readonly id: "The price (`price_…`).";
|
|
910
|
+
};
|
|
911
|
+
readonly body: z.ZodObject<{
|
|
912
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
913
|
+
nickname: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string>>>;
|
|
914
|
+
lookup_key: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string>>>;
|
|
915
|
+
transfer_lookup_key: z.ZodOptional<z.ZodBoolean>;
|
|
916
|
+
tax_behavior: z.ZodOptional<z.ZodEnum<{
|
|
917
|
+
inclusive: "inclusive";
|
|
918
|
+
exclusive: "exclusive";
|
|
919
|
+
unspecified: "unspecified";
|
|
920
|
+
}>>;
|
|
921
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<import("../..").MetadataPatch, Record<string, string>>>>;
|
|
922
|
+
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>>>;
|
|
923
|
+
}, z.core.$strict>;
|
|
924
|
+
readonly response: z.ZodObject<{
|
|
925
|
+
id: z.ZodString;
|
|
926
|
+
object: z.ZodLiteral<"price">;
|
|
927
|
+
livemode: z.ZodBoolean;
|
|
928
|
+
active: z.ZodBoolean;
|
|
929
|
+
product: z.ZodType<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">, z.core.$ZodTypeInternals<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">>>;
|
|
930
|
+
currency: z.ZodEnum<{
|
|
931
|
+
FAIR: "FAIR";
|
|
932
|
+
EUR: "EUR";
|
|
933
|
+
USD: "USD";
|
|
934
|
+
GBP: "GBP";
|
|
935
|
+
CHF: "CHF";
|
|
936
|
+
SEK: "SEK";
|
|
937
|
+
NOK: "NOK";
|
|
938
|
+
DKK: "DKK";
|
|
939
|
+
PLN: "PLN";
|
|
940
|
+
CZK: "CZK";
|
|
941
|
+
CAD: "CAD";
|
|
942
|
+
AUD: "AUD";
|
|
943
|
+
JPY: "JPY";
|
|
944
|
+
}>;
|
|
945
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
946
|
+
billing_scheme: z.ZodEnum<{
|
|
947
|
+
per_unit: "per_unit";
|
|
948
|
+
tiered: "tiered";
|
|
949
|
+
}>;
|
|
950
|
+
tiers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
951
|
+
up_to: z.ZodNullable<z.ZodNumber>;
|
|
952
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
953
|
+
flat_amount: z.ZodNullable<z.ZodString>;
|
|
954
|
+
}, z.core.$strict>>>;
|
|
955
|
+
tiers_mode: z.ZodNullable<z.ZodEnum<{
|
|
956
|
+
graduated: "graduated";
|
|
957
|
+
volume: "volume";
|
|
958
|
+
}>>;
|
|
959
|
+
transform_quantity: z.ZodNullable<z.ZodObject<{
|
|
960
|
+
divide_by: z.ZodNumber;
|
|
961
|
+
round: z.ZodEnum<{
|
|
962
|
+
up: "up";
|
|
963
|
+
down: "down";
|
|
964
|
+
}>;
|
|
965
|
+
}, z.core.$strict>>;
|
|
966
|
+
type: z.ZodEnum<{
|
|
967
|
+
one_time: "one_time";
|
|
968
|
+
recurring: "recurring";
|
|
969
|
+
}>;
|
|
970
|
+
recurring: z.ZodNullable<z.ZodObject<{
|
|
971
|
+
interval: z.ZodEnum<{
|
|
972
|
+
day: "day";
|
|
973
|
+
week: "week";
|
|
974
|
+
month: "month";
|
|
975
|
+
year: "year";
|
|
976
|
+
}>;
|
|
977
|
+
interval_count: z.ZodNumber;
|
|
978
|
+
usage_type: z.ZodEnum<{
|
|
979
|
+
licensed: "licensed";
|
|
980
|
+
metered: "metered";
|
|
981
|
+
}>;
|
|
982
|
+
meter: z.ZodNullable<z.ZodString>;
|
|
983
|
+
}, z.core.$strict>>;
|
|
984
|
+
tax_behavior: z.ZodEnum<{
|
|
985
|
+
inclusive: "inclusive";
|
|
986
|
+
exclusive: "exclusive";
|
|
987
|
+
unspecified: "unspecified";
|
|
988
|
+
}>;
|
|
989
|
+
lookup_key: z.ZodNullable<z.ZodString>;
|
|
990
|
+
nickname: z.ZodNullable<z.ZodString>;
|
|
991
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
992
|
+
created: z.ZodNumber;
|
|
993
|
+
}, z.core.$strict>;
|
|
994
|
+
readonly sdk: "prices.update";
|
|
995
|
+
readonly expandable: "price";
|
|
996
|
+
}, {
|
|
997
|
+
readonly operationId: "searchPrices";
|
|
998
|
+
readonly method: "get";
|
|
999
|
+
readonly path: "/v1/prices/search";
|
|
1000
|
+
readonly tag: "Prices";
|
|
1001
|
+
readonly summary: "Search prices";
|
|
1002
|
+
readonly description: "Stripe's query language over `active`, `currency`, `product`, `type`, `lookup_key`, `created` and `metadata['key']`.";
|
|
1003
|
+
readonly auth: "service";
|
|
1004
|
+
readonly scope: "payments:read";
|
|
1005
|
+
readonly query: z.ZodObject<{
|
|
1006
|
+
query: z.ZodString;
|
|
1007
|
+
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>>;
|
|
1008
|
+
page: z.ZodOptional<z.ZodString>;
|
|
1009
|
+
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>>>;
|
|
1010
|
+
}, z.core.$strict>;
|
|
1011
|
+
readonly response: z.ZodObject<{
|
|
1012
|
+
object: z.ZodLiteral<"search_result">;
|
|
1013
|
+
data: z.ZodArray<z.ZodObject<{
|
|
1014
|
+
id: z.ZodString;
|
|
1015
|
+
object: z.ZodLiteral<"price">;
|
|
1016
|
+
livemode: z.ZodBoolean;
|
|
1017
|
+
active: z.ZodBoolean;
|
|
1018
|
+
product: z.ZodType<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">, z.core.$ZodTypeInternals<string | import("../..").Ref<"product">, string | import("../..").Ref<"product">>>;
|
|
1019
|
+
currency: z.ZodEnum<{
|
|
1020
|
+
FAIR: "FAIR";
|
|
1021
|
+
EUR: "EUR";
|
|
1022
|
+
USD: "USD";
|
|
1023
|
+
GBP: "GBP";
|
|
1024
|
+
CHF: "CHF";
|
|
1025
|
+
SEK: "SEK";
|
|
1026
|
+
NOK: "NOK";
|
|
1027
|
+
DKK: "DKK";
|
|
1028
|
+
PLN: "PLN";
|
|
1029
|
+
CZK: "CZK";
|
|
1030
|
+
CAD: "CAD";
|
|
1031
|
+
AUD: "AUD";
|
|
1032
|
+
JPY: "JPY";
|
|
1033
|
+
}>;
|
|
1034
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
1035
|
+
billing_scheme: z.ZodEnum<{
|
|
1036
|
+
per_unit: "per_unit";
|
|
1037
|
+
tiered: "tiered";
|
|
1038
|
+
}>;
|
|
1039
|
+
tiers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1040
|
+
up_to: z.ZodNullable<z.ZodNumber>;
|
|
1041
|
+
unit_amount: z.ZodNullable<z.ZodString>;
|
|
1042
|
+
flat_amount: z.ZodNullable<z.ZodString>;
|
|
1043
|
+
}, z.core.$strict>>>;
|
|
1044
|
+
tiers_mode: z.ZodNullable<z.ZodEnum<{
|
|
1045
|
+
graduated: "graduated";
|
|
1046
|
+
volume: "volume";
|
|
1047
|
+
}>>;
|
|
1048
|
+
transform_quantity: z.ZodNullable<z.ZodObject<{
|
|
1049
|
+
divide_by: z.ZodNumber;
|
|
1050
|
+
round: z.ZodEnum<{
|
|
1051
|
+
up: "up";
|
|
1052
|
+
down: "down";
|
|
1053
|
+
}>;
|
|
1054
|
+
}, z.core.$strict>>;
|
|
1055
|
+
type: z.ZodEnum<{
|
|
1056
|
+
one_time: "one_time";
|
|
1057
|
+
recurring: "recurring";
|
|
1058
|
+
}>;
|
|
1059
|
+
recurring: z.ZodNullable<z.ZodObject<{
|
|
1060
|
+
interval: z.ZodEnum<{
|
|
1061
|
+
day: "day";
|
|
1062
|
+
week: "week";
|
|
1063
|
+
month: "month";
|
|
1064
|
+
year: "year";
|
|
1065
|
+
}>;
|
|
1066
|
+
interval_count: z.ZodNumber;
|
|
1067
|
+
usage_type: z.ZodEnum<{
|
|
1068
|
+
licensed: "licensed";
|
|
1069
|
+
metered: "metered";
|
|
1070
|
+
}>;
|
|
1071
|
+
meter: z.ZodNullable<z.ZodString>;
|
|
1072
|
+
}, z.core.$strict>>;
|
|
1073
|
+
tax_behavior: z.ZodEnum<{
|
|
1074
|
+
inclusive: "inclusive";
|
|
1075
|
+
exclusive: "exclusive";
|
|
1076
|
+
unspecified: "unspecified";
|
|
1077
|
+
}>;
|
|
1078
|
+
lookup_key: z.ZodNullable<z.ZodString>;
|
|
1079
|
+
nickname: z.ZodNullable<z.ZodString>;
|
|
1080
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1081
|
+
created: z.ZodNumber;
|
|
1082
|
+
}, z.core.$strict>>;
|
|
1083
|
+
has_more: z.ZodBoolean;
|
|
1084
|
+
next_page: z.ZodNullable<z.ZodString>;
|
|
1085
|
+
url: z.ZodString;
|
|
1086
|
+
total_count: z.ZodOptional<z.ZodNumber>;
|
|
1087
|
+
}, z.core.$strict>;
|
|
1088
|
+
readonly sdk: "prices.search";
|
|
1089
|
+
readonly expandable: "price";
|
|
1090
|
+
}];
|
|
1091
|
+
export {};
|