@polar-sh/sdk 0.35.0 → 0.35.1
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/bin/mcp-server.js +673 -475
- package/bin/mcp-server.js.map +19 -15
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/address.d.ts +687 -687
- package/dist/commonjs/models/components/address.js +222 -222
- package/dist/commonjs/models/components/addressinput.d.ts +683 -683
- package/dist/commonjs/models/components/addressinput.js +217 -217
- package/dist/commonjs/models/components/checkout.d.ts +31 -5
- package/dist/commonjs/models/components/checkout.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkout.js +23 -2
- package/dist/commonjs/models/components/checkout.js.map +1 -1
- package/dist/commonjs/models/components/checkoutcreate.d.ts +11 -0
- package/dist/commonjs/models/components/checkoutcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutcreate.js +9 -0
- package/dist/commonjs/models/components/checkoutcreate.js.map +1 -1
- package/dist/commonjs/models/components/checkoutlink.d.ts +14 -3
- package/dist/commonjs/models/components/checkoutlink.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutlink.js +11 -2
- package/dist/commonjs/models/components/checkoutlink.js.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkcreateproduct.d.ts +11 -0
- package/dist/commonjs/models/components/checkoutlinkcreateproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkcreateproduct.js +9 -0
- package/dist/commonjs/models/components/checkoutlinkcreateproduct.js.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkcreateproductprice.d.ts +11 -0
- package/dist/commonjs/models/components/checkoutlinkcreateproductprice.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkcreateproductprice.js +9 -0
- package/dist/commonjs/models/components/checkoutlinkcreateproductprice.js.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkcreateproducts.d.ts +11 -0
- package/dist/commonjs/models/components/checkoutlinkcreateproducts.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkcreateproducts.js +9 -0
- package/dist/commonjs/models/components/checkoutlinkcreateproducts.js.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkproduct.d.ts +14 -3
- package/dist/commonjs/models/components/checkoutlinkproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkproduct.js +11 -2
- package/dist/commonjs/models/components/checkoutlinkproduct.js.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkupdate.d.ts +11 -0
- package/dist/commonjs/models/components/checkoutlinkupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutlinkupdate.js +9 -0
- package/dist/commonjs/models/components/checkoutlinkupdate.js.map +1 -1
- package/dist/commonjs/models/components/checkoutproduct.d.ts +14 -3
- package/dist/commonjs/models/components/checkoutproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutproduct.js +11 -2
- package/dist/commonjs/models/components/checkoutproduct.js.map +1 -1
- package/dist/commonjs/models/components/checkoutpublic.d.ts +21 -5
- package/dist/commonjs/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublic.js +15 -2
- package/dist/commonjs/models/components/checkoutpublic.js.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts +21 -5
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js +15 -2
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/commonjs/models/components/checkoutupdate.d.ts +11 -0
- package/dist/commonjs/models/components/checkoutupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutupdate.js +9 -0
- package/dist/commonjs/models/components/checkoutupdate.js.map +1 -1
- package/dist/commonjs/models/components/customerorderproduct.d.ts +14 -3
- package/dist/commonjs/models/components/customerorderproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerorderproduct.js +11 -2
- package/dist/commonjs/models/components/customerorderproduct.js.map +1 -1
- package/dist/commonjs/models/components/customerordersubscription.d.ts +10 -0
- package/dist/commonjs/models/components/customerordersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerordersubscription.js +8 -0
- package/dist/commonjs/models/components/customerordersubscription.js.map +1 -1
- package/dist/commonjs/models/components/customerproduct.d.ts +14 -3
- package/dist/commonjs/models/components/customerproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerproduct.js +11 -2
- package/dist/commonjs/models/components/customerproduct.js.map +1 -1
- package/dist/commonjs/models/components/customersubscription.d.ts +10 -0
- package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customersubscription.js +8 -0
- package/dist/commonjs/models/components/customersubscription.js.map +1 -1
- package/dist/commonjs/models/components/customersubscriptionproduct.d.ts +14 -3
- package/dist/commonjs/models/components/customersubscriptionproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/customersubscriptionproduct.js +11 -2
- package/dist/commonjs/models/components/customersubscriptionproduct.js.map +1 -1
- package/dist/commonjs/models/components/discountproduct.d.ts +14 -3
- package/dist/commonjs/models/components/discountproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountproduct.js +11 -2
- package/dist/commonjs/models/components/discountproduct.js.map +1 -1
- package/dist/commonjs/models/components/orderproduct.d.ts +14 -3
- package/dist/commonjs/models/components/orderproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/orderproduct.js +11 -2
- package/dist/commonjs/models/components/orderproduct.js.map +1 -1
- package/dist/commonjs/models/components/ordersubscription.d.ts +10 -0
- package/dist/commonjs/models/components/ordersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/ordersubscription.js +8 -0
- package/dist/commonjs/models/components/ordersubscription.js.map +1 -1
- package/dist/commonjs/models/components/product.d.ts +14 -3
- package/dist/commonjs/models/components/product.d.ts.map +1 -1
- package/dist/commonjs/models/components/product.js +11 -2
- package/dist/commonjs/models/components/product.js.map +1 -1
- package/dist/commonjs/models/components/productcreate.d.ts +4 -111
- package/dist/commonjs/models/components/productcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/productcreate.js +9 -106
- package/dist/commonjs/models/components/productcreate.js.map +1 -1
- package/dist/commonjs/models/components/productcreateonetime.d.ts +130 -0
- package/dist/commonjs/models/components/productcreateonetime.d.ts.map +1 -0
- package/dist/commonjs/models/components/productcreateonetime.js +169 -0
- package/dist/commonjs/models/components/productcreateonetime.js.map +1 -0
- package/dist/commonjs/models/components/productcreaterecurring.d.ts +139 -0
- package/dist/commonjs/models/components/productcreaterecurring.d.ts.map +1 -0
- package/dist/commonjs/models/components/productcreaterecurring.js +179 -0
- package/dist/commonjs/models/components/productcreaterecurring.js.map +1 -0
- package/dist/commonjs/models/components/productupdate.d.ts +11 -0
- package/dist/commonjs/models/components/productupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/productupdate.js +9 -0
- package/dist/commonjs/models/components/productupdate.js.map +1 -1
- package/dist/commonjs/models/components/subscription.d.ts +10 -0
- package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscription.js +8 -0
- package/dist/commonjs/models/components/subscription.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionupdate.d.ts +3 -2
- package/dist/commonjs/models/components/subscriptionupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptionupdate.js +3 -0
- package/dist/commonjs/models/components/subscriptionupdate.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts +32 -0
- package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatetrial.js +78 -0
- package/dist/commonjs/models/components/subscriptionupdatetrial.js.map +1 -0
- package/dist/commonjs/models/components/trialinterval.d.ts +34 -0
- package/dist/commonjs/models/components/trialinterval.d.ts.map +1 -0
- package/dist/commonjs/models/components/trialinterval.js +62 -0
- package/dist/commonjs/models/components/trialinterval.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/address.d.ts +687 -687
- package/dist/esm/models/components/address.js +222 -222
- package/dist/esm/models/components/addressinput.d.ts +683 -683
- package/dist/esm/models/components/addressinput.js +217 -217
- package/dist/esm/models/components/checkout.d.ts +31 -5
- package/dist/esm/models/components/checkout.d.ts.map +1 -1
- package/dist/esm/models/components/checkout.js +23 -2
- package/dist/esm/models/components/checkout.js.map +1 -1
- package/dist/esm/models/components/checkoutcreate.d.ts +11 -0
- package/dist/esm/models/components/checkoutcreate.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutcreate.js +9 -0
- package/dist/esm/models/components/checkoutcreate.js.map +1 -1
- package/dist/esm/models/components/checkoutlink.d.ts +14 -3
- package/dist/esm/models/components/checkoutlink.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutlink.js +11 -2
- package/dist/esm/models/components/checkoutlink.js.map +1 -1
- package/dist/esm/models/components/checkoutlinkcreateproduct.d.ts +11 -0
- package/dist/esm/models/components/checkoutlinkcreateproduct.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutlinkcreateproduct.js +9 -0
- package/dist/esm/models/components/checkoutlinkcreateproduct.js.map +1 -1
- package/dist/esm/models/components/checkoutlinkcreateproductprice.d.ts +11 -0
- package/dist/esm/models/components/checkoutlinkcreateproductprice.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutlinkcreateproductprice.js +9 -0
- package/dist/esm/models/components/checkoutlinkcreateproductprice.js.map +1 -1
- package/dist/esm/models/components/checkoutlinkcreateproducts.d.ts +11 -0
- package/dist/esm/models/components/checkoutlinkcreateproducts.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutlinkcreateproducts.js +9 -0
- package/dist/esm/models/components/checkoutlinkcreateproducts.js.map +1 -1
- package/dist/esm/models/components/checkoutlinkproduct.d.ts +14 -3
- package/dist/esm/models/components/checkoutlinkproduct.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutlinkproduct.js +11 -2
- package/dist/esm/models/components/checkoutlinkproduct.js.map +1 -1
- package/dist/esm/models/components/checkoutlinkupdate.d.ts +11 -0
- package/dist/esm/models/components/checkoutlinkupdate.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutlinkupdate.js +9 -0
- package/dist/esm/models/components/checkoutlinkupdate.js.map +1 -1
- package/dist/esm/models/components/checkoutproduct.d.ts +14 -3
- package/dist/esm/models/components/checkoutproduct.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutproduct.js +11 -2
- package/dist/esm/models/components/checkoutproduct.js.map +1 -1
- package/dist/esm/models/components/checkoutpublic.d.ts +21 -5
- package/dist/esm/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublic.js +15 -2
- package/dist/esm/models/components/checkoutpublic.js.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts +21 -5
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.js +15 -2
- package/dist/esm/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/esm/models/components/checkoutupdate.d.ts +11 -0
- package/dist/esm/models/components/checkoutupdate.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutupdate.js +9 -0
- package/dist/esm/models/components/checkoutupdate.js.map +1 -1
- package/dist/esm/models/components/customerorderproduct.d.ts +14 -3
- package/dist/esm/models/components/customerorderproduct.d.ts.map +1 -1
- package/dist/esm/models/components/customerorderproduct.js +11 -2
- package/dist/esm/models/components/customerorderproduct.js.map +1 -1
- package/dist/esm/models/components/customerordersubscription.d.ts +10 -0
- package/dist/esm/models/components/customerordersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customerordersubscription.js +8 -0
- package/dist/esm/models/components/customerordersubscription.js.map +1 -1
- package/dist/esm/models/components/customerproduct.d.ts +14 -3
- package/dist/esm/models/components/customerproduct.d.ts.map +1 -1
- package/dist/esm/models/components/customerproduct.js +11 -2
- package/dist/esm/models/components/customerproduct.js.map +1 -1
- package/dist/esm/models/components/customersubscription.d.ts +10 -0
- package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customersubscription.js +8 -0
- package/dist/esm/models/components/customersubscription.js.map +1 -1
- package/dist/esm/models/components/customersubscriptionproduct.d.ts +14 -3
- package/dist/esm/models/components/customersubscriptionproduct.d.ts.map +1 -1
- package/dist/esm/models/components/customersubscriptionproduct.js +11 -2
- package/dist/esm/models/components/customersubscriptionproduct.js.map +1 -1
- package/dist/esm/models/components/discountproduct.d.ts +14 -3
- package/dist/esm/models/components/discountproduct.d.ts.map +1 -1
- package/dist/esm/models/components/discountproduct.js +11 -2
- package/dist/esm/models/components/discountproduct.js.map +1 -1
- package/dist/esm/models/components/orderproduct.d.ts +14 -3
- package/dist/esm/models/components/orderproduct.d.ts.map +1 -1
- package/dist/esm/models/components/orderproduct.js +11 -2
- package/dist/esm/models/components/orderproduct.js.map +1 -1
- package/dist/esm/models/components/ordersubscription.d.ts +10 -0
- package/dist/esm/models/components/ordersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/ordersubscription.js +8 -0
- package/dist/esm/models/components/ordersubscription.js.map +1 -1
- package/dist/esm/models/components/product.d.ts +14 -3
- package/dist/esm/models/components/product.d.ts.map +1 -1
- package/dist/esm/models/components/product.js +11 -2
- package/dist/esm/models/components/product.js.map +1 -1
- package/dist/esm/models/components/productcreate.d.ts +4 -111
- package/dist/esm/models/components/productcreate.d.ts.map +1 -1
- package/dist/esm/models/components/productcreate.js +8 -101
- package/dist/esm/models/components/productcreate.js.map +1 -1
- package/dist/esm/models/components/productcreateonetime.d.ts +130 -0
- package/dist/esm/models/components/productcreateonetime.d.ts.map +1 -0
- package/dist/esm/models/components/productcreateonetime.js +127 -0
- package/dist/esm/models/components/productcreateonetime.js.map +1 -0
- package/dist/esm/models/components/productcreaterecurring.d.ts +139 -0
- package/dist/esm/models/components/productcreaterecurring.d.ts.map +1 -0
- package/dist/esm/models/components/productcreaterecurring.js +137 -0
- package/dist/esm/models/components/productcreaterecurring.js.map +1 -0
- package/dist/esm/models/components/productupdate.d.ts +11 -0
- package/dist/esm/models/components/productupdate.d.ts.map +1 -1
- package/dist/esm/models/components/productupdate.js +9 -0
- package/dist/esm/models/components/productupdate.js.map +1 -1
- package/dist/esm/models/components/subscription.d.ts +10 -0
- package/dist/esm/models/components/subscription.d.ts.map +1 -1
- package/dist/esm/models/components/subscription.js +8 -0
- package/dist/esm/models/components/subscription.js.map +1 -1
- package/dist/esm/models/components/subscriptionupdate.d.ts +3 -2
- package/dist/esm/models/components/subscriptionupdate.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptionupdate.js +3 -0
- package/dist/esm/models/components/subscriptionupdate.js.map +1 -1
- package/dist/esm/models/components/subscriptionupdatetrial.d.ts +32 -0
- package/dist/esm/models/components/subscriptionupdatetrial.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdatetrial.js +40 -0
- package/dist/esm/models/components/subscriptionupdatetrial.js.map +1 -0
- package/dist/esm/models/components/trialinterval.d.ts +34 -0
- package/dist/esm/models/components/trialinterval.d.ts.map +1 -0
- package/dist/esm/models/components/trialinterval.js +26 -0
- package/dist/esm/models/components/trialinterval.js.map +1 -0
- package/docs/sdks/products/README.md +2 -2
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/address.ts +222 -222
- package/src/models/components/addressinput.ts +217 -217
- package/src/models/components/checkout.ts +59 -7
- package/src/models/components/checkoutcreate.ts +23 -0
- package/src/models/components/checkoutlink.ts +28 -5
- package/src/models/components/checkoutlinkcreateproduct.ts +23 -0
- package/src/models/components/checkoutlinkcreateproductprice.ts +23 -0
- package/src/models/components/checkoutlinkcreateproducts.ts +23 -0
- package/src/models/components/checkoutlinkproduct.ts +28 -5
- package/src/models/components/checkoutlinkupdate.ts +23 -0
- package/src/models/components/checkoutproduct.ts +28 -5
- package/src/models/components/checkoutpublic.ts +41 -7
- package/src/models/components/checkoutpublicconfirmed.ts +41 -7
- package/src/models/components/checkoutupdate.ts +23 -0
- package/src/models/components/customerorderproduct.ts +28 -5
- package/src/models/components/customerordersubscription.ts +22 -0
- package/src/models/components/customerproduct.ts +28 -5
- package/src/models/components/customersubscription.ts +22 -0
- package/src/models/components/customersubscriptionproduct.ts +28 -5
- package/src/models/components/discountproduct.ts +28 -5
- package/src/models/components/orderproduct.ts +28 -5
- package/src/models/components/ordersubscription.ts +22 -0
- package/src/models/components/product.ts +28 -5
- package/src/models/components/productcreate.ts +22 -275
- package/src/models/components/productcreateonetime.ts +329 -0
- package/src/models/components/productcreaterecurring.ts +356 -0
- package/src/models/components/productupdate.ts +23 -0
- package/src/models/components/subscription.ts +22 -0
- package/src/models/components/subscriptionupdate.ts +10 -0
- package/src/models/components/subscriptionupdatetrial.ts +78 -0
- package/src/models/components/trialinterval.ts +35 -0
|
@@ -42,12 +42,21 @@ import {
|
|
|
42
42
|
SubscriptionRecurringInterval$inboundSchema,
|
|
43
43
|
SubscriptionRecurringInterval$outboundSchema,
|
|
44
44
|
} from "./subscriptionrecurringinterval.js";
|
|
45
|
+
import {
|
|
46
|
+
TrialInterval,
|
|
47
|
+
TrialInterval$inboundSchema,
|
|
48
|
+
TrialInterval$outboundSchema,
|
|
49
|
+
} from "./trialinterval.js";
|
|
45
50
|
|
|
46
51
|
export type CustomerSubscriptionProductPrices =
|
|
47
52
|
| LegacyRecurringProductPrice
|
|
48
53
|
| ProductPrice;
|
|
49
54
|
|
|
50
55
|
export type CustomerSubscriptionProduct = {
|
|
56
|
+
/**
|
|
57
|
+
* The ID of the object.
|
|
58
|
+
*/
|
|
59
|
+
id: string;
|
|
51
60
|
/**
|
|
52
61
|
* Creation timestamp of the object.
|
|
53
62
|
*/
|
|
@@ -57,9 +66,13 @@ export type CustomerSubscriptionProduct = {
|
|
|
57
66
|
*/
|
|
58
67
|
modifiedAt: Date | null;
|
|
59
68
|
/**
|
|
60
|
-
* The
|
|
69
|
+
* The interval unit for the trial period.
|
|
61
70
|
*/
|
|
62
|
-
|
|
71
|
+
trialInterval: TrialInterval | null;
|
|
72
|
+
/**
|
|
73
|
+
* The number of interval units for the trial period.
|
|
74
|
+
*/
|
|
75
|
+
trialIntervalCount: number | null;
|
|
63
76
|
/**
|
|
64
77
|
* The name of the product.
|
|
65
78
|
*/
|
|
@@ -164,11 +177,13 @@ export const CustomerSubscriptionProduct$inboundSchema: z.ZodType<
|
|
|
164
177
|
z.ZodTypeDef,
|
|
165
178
|
unknown
|
|
166
179
|
> = z.object({
|
|
180
|
+
id: z.string(),
|
|
167
181
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
168
182
|
modified_at: z.nullable(
|
|
169
183
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
170
184
|
),
|
|
171
|
-
|
|
185
|
+
trial_interval: z.nullable(TrialInterval$inboundSchema),
|
|
186
|
+
trial_interval_count: z.nullable(z.number().int()),
|
|
172
187
|
name: z.string(),
|
|
173
188
|
description: z.nullable(z.string()),
|
|
174
189
|
recurring_interval: z.nullable(SubscriptionRecurringInterval$inboundSchema),
|
|
@@ -188,6 +203,8 @@ export const CustomerSubscriptionProduct$inboundSchema: z.ZodType<
|
|
|
188
203
|
return remap$(v, {
|
|
189
204
|
"created_at": "createdAt",
|
|
190
205
|
"modified_at": "modifiedAt",
|
|
206
|
+
"trial_interval": "trialInterval",
|
|
207
|
+
"trial_interval_count": "trialIntervalCount",
|
|
191
208
|
"recurring_interval": "recurringInterval",
|
|
192
209
|
"is_recurring": "isRecurring",
|
|
193
210
|
"is_archived": "isArchived",
|
|
@@ -197,9 +214,11 @@ export const CustomerSubscriptionProduct$inboundSchema: z.ZodType<
|
|
|
197
214
|
|
|
198
215
|
/** @internal */
|
|
199
216
|
export type CustomerSubscriptionProduct$Outbound = {
|
|
217
|
+
id: string;
|
|
200
218
|
created_at: string;
|
|
201
219
|
modified_at: string | null;
|
|
202
|
-
|
|
220
|
+
trial_interval: string | null;
|
|
221
|
+
trial_interval_count: number | null;
|
|
203
222
|
name: string;
|
|
204
223
|
description: string | null;
|
|
205
224
|
recurring_interval: string | null;
|
|
@@ -218,9 +237,11 @@ export const CustomerSubscriptionProduct$outboundSchema: z.ZodType<
|
|
|
218
237
|
z.ZodTypeDef,
|
|
219
238
|
CustomerSubscriptionProduct
|
|
220
239
|
> = z.object({
|
|
240
|
+
id: z.string(),
|
|
221
241
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
222
242
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
223
|
-
|
|
243
|
+
trialInterval: z.nullable(TrialInterval$outboundSchema),
|
|
244
|
+
trialIntervalCount: z.nullable(z.number().int()),
|
|
224
245
|
name: z.string(),
|
|
225
246
|
description: z.nullable(z.string()),
|
|
226
247
|
recurringInterval: z.nullable(SubscriptionRecurringInterval$outboundSchema),
|
|
@@ -240,6 +261,8 @@ export const CustomerSubscriptionProduct$outboundSchema: z.ZodType<
|
|
|
240
261
|
return remap$(v, {
|
|
241
262
|
createdAt: "created_at",
|
|
242
263
|
modifiedAt: "modified_at",
|
|
264
|
+
trialInterval: "trial_interval",
|
|
265
|
+
trialIntervalCount: "trial_interval_count",
|
|
243
266
|
recurringInterval: "recurring_interval",
|
|
244
267
|
isRecurring: "is_recurring",
|
|
245
268
|
isArchived: "is_archived",
|
|
@@ -12,6 +12,11 @@ import {
|
|
|
12
12
|
SubscriptionRecurringInterval$inboundSchema,
|
|
13
13
|
SubscriptionRecurringInterval$outboundSchema,
|
|
14
14
|
} from "./subscriptionrecurringinterval.js";
|
|
15
|
+
import {
|
|
16
|
+
TrialInterval,
|
|
17
|
+
TrialInterval$inboundSchema,
|
|
18
|
+
TrialInterval$outboundSchema,
|
|
19
|
+
} from "./trialinterval.js";
|
|
15
20
|
|
|
16
21
|
export type DiscountProductMetadata = string | number | number | boolean;
|
|
17
22
|
|
|
@@ -20,6 +25,10 @@ export type DiscountProductMetadata = string | number | number | boolean;
|
|
|
20
25
|
*/
|
|
21
26
|
export type DiscountProduct = {
|
|
22
27
|
metadata: { [k: string]: string | number | number | boolean };
|
|
28
|
+
/**
|
|
29
|
+
* The ID of the object.
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
23
32
|
/**
|
|
24
33
|
* Creation timestamp of the object.
|
|
25
34
|
*/
|
|
@@ -29,9 +38,13 @@ export type DiscountProduct = {
|
|
|
29
38
|
*/
|
|
30
39
|
modifiedAt: Date | null;
|
|
31
40
|
/**
|
|
32
|
-
* The
|
|
41
|
+
* The interval unit for the trial period.
|
|
33
42
|
*/
|
|
34
|
-
|
|
43
|
+
trialInterval: TrialInterval | null;
|
|
44
|
+
/**
|
|
45
|
+
* The number of interval units for the trial period.
|
|
46
|
+
*/
|
|
47
|
+
trialIntervalCount: number | null;
|
|
35
48
|
/**
|
|
36
49
|
* The name of the product.
|
|
37
50
|
*/
|
|
@@ -119,11 +132,13 @@ export const DiscountProduct$inboundSchema: z.ZodType<
|
|
|
119
132
|
metadata: z.record(
|
|
120
133
|
z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
|
|
121
134
|
),
|
|
135
|
+
id: z.string(),
|
|
122
136
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
123
137
|
modified_at: z.nullable(
|
|
124
138
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
125
139
|
),
|
|
126
|
-
|
|
140
|
+
trial_interval: z.nullable(TrialInterval$inboundSchema),
|
|
141
|
+
trial_interval_count: z.nullable(z.number().int()),
|
|
127
142
|
name: z.string(),
|
|
128
143
|
description: z.nullable(z.string()),
|
|
129
144
|
recurring_interval: z.nullable(SubscriptionRecurringInterval$inboundSchema),
|
|
@@ -134,6 +149,8 @@ export const DiscountProduct$inboundSchema: z.ZodType<
|
|
|
134
149
|
return remap$(v, {
|
|
135
150
|
"created_at": "createdAt",
|
|
136
151
|
"modified_at": "modifiedAt",
|
|
152
|
+
"trial_interval": "trialInterval",
|
|
153
|
+
"trial_interval_count": "trialIntervalCount",
|
|
137
154
|
"recurring_interval": "recurringInterval",
|
|
138
155
|
"is_recurring": "isRecurring",
|
|
139
156
|
"is_archived": "isArchived",
|
|
@@ -144,9 +161,11 @@ export const DiscountProduct$inboundSchema: z.ZodType<
|
|
|
144
161
|
/** @internal */
|
|
145
162
|
export type DiscountProduct$Outbound = {
|
|
146
163
|
metadata: { [k: string]: string | number | number | boolean };
|
|
164
|
+
id: string;
|
|
147
165
|
created_at: string;
|
|
148
166
|
modified_at: string | null;
|
|
149
|
-
|
|
167
|
+
trial_interval: string | null;
|
|
168
|
+
trial_interval_count: number | null;
|
|
150
169
|
name: string;
|
|
151
170
|
description: string | null;
|
|
152
171
|
recurring_interval: string | null;
|
|
@@ -164,9 +183,11 @@ export const DiscountProduct$outboundSchema: z.ZodType<
|
|
|
164
183
|
metadata: z.record(
|
|
165
184
|
z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
|
|
166
185
|
),
|
|
186
|
+
id: z.string(),
|
|
167
187
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
168
188
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
169
|
-
|
|
189
|
+
trialInterval: z.nullable(TrialInterval$outboundSchema),
|
|
190
|
+
trialIntervalCount: z.nullable(z.number().int()),
|
|
170
191
|
name: z.string(),
|
|
171
192
|
description: z.nullable(z.string()),
|
|
172
193
|
recurringInterval: z.nullable(SubscriptionRecurringInterval$outboundSchema),
|
|
@@ -177,6 +198,8 @@ export const DiscountProduct$outboundSchema: z.ZodType<
|
|
|
177
198
|
return remap$(v, {
|
|
178
199
|
createdAt: "created_at",
|
|
179
200
|
modifiedAt: "modified_at",
|
|
201
|
+
trialInterval: "trial_interval",
|
|
202
|
+
trialIntervalCount: "trial_interval_count",
|
|
180
203
|
recurringInterval: "recurring_interval",
|
|
181
204
|
isRecurring: "is_recurring",
|
|
182
205
|
isArchived: "is_archived",
|
|
@@ -12,11 +12,20 @@ import {
|
|
|
12
12
|
SubscriptionRecurringInterval$inboundSchema,
|
|
13
13
|
SubscriptionRecurringInterval$outboundSchema,
|
|
14
14
|
} from "./subscriptionrecurringinterval.js";
|
|
15
|
+
import {
|
|
16
|
+
TrialInterval,
|
|
17
|
+
TrialInterval$inboundSchema,
|
|
18
|
+
TrialInterval$outboundSchema,
|
|
19
|
+
} from "./trialinterval.js";
|
|
15
20
|
|
|
16
21
|
export type OrderProductMetadata = string | number | number | boolean;
|
|
17
22
|
|
|
18
23
|
export type OrderProduct = {
|
|
19
24
|
metadata: { [k: string]: string | number | number | boolean };
|
|
25
|
+
/**
|
|
26
|
+
* The ID of the object.
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
20
29
|
/**
|
|
21
30
|
* Creation timestamp of the object.
|
|
22
31
|
*/
|
|
@@ -26,9 +35,13 @@ export type OrderProduct = {
|
|
|
26
35
|
*/
|
|
27
36
|
modifiedAt: Date | null;
|
|
28
37
|
/**
|
|
29
|
-
* The
|
|
38
|
+
* The interval unit for the trial period.
|
|
30
39
|
*/
|
|
31
|
-
|
|
40
|
+
trialInterval: TrialInterval | null;
|
|
41
|
+
/**
|
|
42
|
+
* The number of interval units for the trial period.
|
|
43
|
+
*/
|
|
44
|
+
trialIntervalCount: number | null;
|
|
32
45
|
/**
|
|
33
46
|
* The name of the product.
|
|
34
47
|
*/
|
|
@@ -112,11 +125,13 @@ export const OrderProduct$inboundSchema: z.ZodType<
|
|
|
112
125
|
metadata: z.record(
|
|
113
126
|
z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
|
|
114
127
|
),
|
|
128
|
+
id: z.string(),
|
|
115
129
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
116
130
|
modified_at: z.nullable(
|
|
117
131
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
118
132
|
),
|
|
119
|
-
|
|
133
|
+
trial_interval: z.nullable(TrialInterval$inboundSchema),
|
|
134
|
+
trial_interval_count: z.nullable(z.number().int()),
|
|
120
135
|
name: z.string(),
|
|
121
136
|
description: z.nullable(z.string()),
|
|
122
137
|
recurring_interval: z.nullable(SubscriptionRecurringInterval$inboundSchema),
|
|
@@ -127,6 +142,8 @@ export const OrderProduct$inboundSchema: z.ZodType<
|
|
|
127
142
|
return remap$(v, {
|
|
128
143
|
"created_at": "createdAt",
|
|
129
144
|
"modified_at": "modifiedAt",
|
|
145
|
+
"trial_interval": "trialInterval",
|
|
146
|
+
"trial_interval_count": "trialIntervalCount",
|
|
130
147
|
"recurring_interval": "recurringInterval",
|
|
131
148
|
"is_recurring": "isRecurring",
|
|
132
149
|
"is_archived": "isArchived",
|
|
@@ -137,9 +154,11 @@ export const OrderProduct$inboundSchema: z.ZodType<
|
|
|
137
154
|
/** @internal */
|
|
138
155
|
export type OrderProduct$Outbound = {
|
|
139
156
|
metadata: { [k: string]: string | number | number | boolean };
|
|
157
|
+
id: string;
|
|
140
158
|
created_at: string;
|
|
141
159
|
modified_at: string | null;
|
|
142
|
-
|
|
160
|
+
trial_interval: string | null;
|
|
161
|
+
trial_interval_count: number | null;
|
|
143
162
|
name: string;
|
|
144
163
|
description: string | null;
|
|
145
164
|
recurring_interval: string | null;
|
|
@@ -157,9 +176,11 @@ export const OrderProduct$outboundSchema: z.ZodType<
|
|
|
157
176
|
metadata: z.record(
|
|
158
177
|
z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
|
|
159
178
|
),
|
|
179
|
+
id: z.string(),
|
|
160
180
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
161
181
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
162
|
-
|
|
182
|
+
trialInterval: z.nullable(TrialInterval$outboundSchema),
|
|
183
|
+
trialIntervalCount: z.nullable(z.number().int()),
|
|
163
184
|
name: z.string(),
|
|
164
185
|
description: z.nullable(z.string()),
|
|
165
186
|
recurringInterval: z.nullable(SubscriptionRecurringInterval$outboundSchema),
|
|
@@ -170,6 +191,8 @@ export const OrderProduct$outboundSchema: z.ZodType<
|
|
|
170
191
|
return remap$(v, {
|
|
171
192
|
createdAt: "created_at",
|
|
172
193
|
modifiedAt: "modified_at",
|
|
194
|
+
trialInterval: "trial_interval",
|
|
195
|
+
trialIntervalCount: "trial_interval_count",
|
|
173
196
|
recurringInterval: "recurring_interval",
|
|
174
197
|
isRecurring: "is_recurring",
|
|
175
198
|
isArchived: "is_archived",
|
|
@@ -57,6 +57,14 @@ export type OrderSubscription = {
|
|
|
57
57
|
* The end timestamp of the current billing period.
|
|
58
58
|
*/
|
|
59
59
|
currentPeriodEnd: Date | null;
|
|
60
|
+
/**
|
|
61
|
+
* The start timestamp of the trial period, if any.
|
|
62
|
+
*/
|
|
63
|
+
trialStart: Date | null;
|
|
64
|
+
/**
|
|
65
|
+
* The end timestamp of the trial period, if any.
|
|
66
|
+
*/
|
|
67
|
+
trialEnd: Date | null;
|
|
60
68
|
/**
|
|
61
69
|
* Whether the subscription will be canceled at the end of the current period.
|
|
62
70
|
*/
|
|
@@ -170,6 +178,12 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
170
178
|
current_period_end: z.nullable(
|
|
171
179
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
172
180
|
),
|
|
181
|
+
trial_start: z.nullable(
|
|
182
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
183
|
+
),
|
|
184
|
+
trial_end: z.nullable(
|
|
185
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
186
|
+
),
|
|
173
187
|
cancel_at_period_end: z.boolean(),
|
|
174
188
|
canceled_at: z.nullable(
|
|
175
189
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -198,6 +212,8 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
198
212
|
"recurring_interval": "recurringInterval",
|
|
199
213
|
"current_period_start": "currentPeriodStart",
|
|
200
214
|
"current_period_end": "currentPeriodEnd",
|
|
215
|
+
"trial_start": "trialStart",
|
|
216
|
+
"trial_end": "trialEnd",
|
|
201
217
|
"cancel_at_period_end": "cancelAtPeriodEnd",
|
|
202
218
|
"canceled_at": "canceledAt",
|
|
203
219
|
"started_at": "startedAt",
|
|
@@ -224,6 +240,8 @@ export type OrderSubscription$Outbound = {
|
|
|
224
240
|
status: string;
|
|
225
241
|
current_period_start: string;
|
|
226
242
|
current_period_end: string | null;
|
|
243
|
+
trial_start: string | null;
|
|
244
|
+
trial_end: string | null;
|
|
227
245
|
cancel_at_period_end: boolean;
|
|
228
246
|
canceled_at: string | null;
|
|
229
247
|
started_at: string | null;
|
|
@@ -255,6 +273,8 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
255
273
|
status: SubscriptionStatus$outboundSchema,
|
|
256
274
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
257
275
|
currentPeriodEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
276
|
+
trialStart: z.nullable(z.date().transform(v => v.toISOString())),
|
|
277
|
+
trialEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
258
278
|
cancelAtPeriodEnd: z.boolean(),
|
|
259
279
|
canceledAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
260
280
|
startedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
@@ -275,6 +295,8 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
275
295
|
recurringInterval: "recurring_interval",
|
|
276
296
|
currentPeriodStart: "current_period_start",
|
|
277
297
|
currentPeriodEnd: "current_period_end",
|
|
298
|
+
trialStart: "trial_start",
|
|
299
|
+
trialEnd: "trial_end",
|
|
278
300
|
cancelAtPeriodEnd: "cancel_at_period_end",
|
|
279
301
|
canceledAt: "canceled_at",
|
|
280
302
|
startedAt: "started_at",
|
|
@@ -42,6 +42,11 @@ import {
|
|
|
42
42
|
SubscriptionRecurringInterval$inboundSchema,
|
|
43
43
|
SubscriptionRecurringInterval$outboundSchema,
|
|
44
44
|
} from "./subscriptionrecurringinterval.js";
|
|
45
|
+
import {
|
|
46
|
+
TrialInterval,
|
|
47
|
+
TrialInterval$inboundSchema,
|
|
48
|
+
TrialInterval$outboundSchema,
|
|
49
|
+
} from "./trialinterval.js";
|
|
45
50
|
|
|
46
51
|
export type ProductMetadata = string | number | number | boolean;
|
|
47
52
|
|
|
@@ -51,6 +56,10 @@ export type Prices = LegacyRecurringProductPrice | ProductPrice;
|
|
|
51
56
|
* A product.
|
|
52
57
|
*/
|
|
53
58
|
export type Product = {
|
|
59
|
+
/**
|
|
60
|
+
* The ID of the object.
|
|
61
|
+
*/
|
|
62
|
+
id: string;
|
|
54
63
|
/**
|
|
55
64
|
* Creation timestamp of the object.
|
|
56
65
|
*/
|
|
@@ -60,9 +69,13 @@ export type Product = {
|
|
|
60
69
|
*/
|
|
61
70
|
modifiedAt: Date | null;
|
|
62
71
|
/**
|
|
63
|
-
* The
|
|
72
|
+
* The interval unit for the trial period.
|
|
64
73
|
*/
|
|
65
|
-
|
|
74
|
+
trialInterval: TrialInterval | null;
|
|
75
|
+
/**
|
|
76
|
+
* The number of interval units for the trial period.
|
|
77
|
+
*/
|
|
78
|
+
trialIntervalCount: number | null;
|
|
66
79
|
/**
|
|
67
80
|
* The name of the product.
|
|
68
81
|
*/
|
|
@@ -204,13 +217,15 @@ export function pricesFromJSON(
|
|
|
204
217
|
/** @internal */
|
|
205
218
|
export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
206
219
|
z.object({
|
|
220
|
+
id: z.string(),
|
|
207
221
|
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
208
222
|
new Date(v)
|
|
209
223
|
),
|
|
210
224
|
modified_at: z.nullable(
|
|
211
225
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
212
226
|
),
|
|
213
|
-
|
|
227
|
+
trial_interval: z.nullable(TrialInterval$inboundSchema),
|
|
228
|
+
trial_interval_count: z.nullable(z.number().int()),
|
|
214
229
|
name: z.string(),
|
|
215
230
|
description: z.nullable(z.string()),
|
|
216
231
|
recurring_interval: z.nullable(SubscriptionRecurringInterval$inboundSchema),
|
|
@@ -233,6 +248,8 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
|
233
248
|
return remap$(v, {
|
|
234
249
|
"created_at": "createdAt",
|
|
235
250
|
"modified_at": "modifiedAt",
|
|
251
|
+
"trial_interval": "trialInterval",
|
|
252
|
+
"trial_interval_count": "trialIntervalCount",
|
|
236
253
|
"recurring_interval": "recurringInterval",
|
|
237
254
|
"is_recurring": "isRecurring",
|
|
238
255
|
"is_archived": "isArchived",
|
|
@@ -243,9 +260,11 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
|
243
260
|
|
|
244
261
|
/** @internal */
|
|
245
262
|
export type Product$Outbound = {
|
|
263
|
+
id: string;
|
|
246
264
|
created_at: string;
|
|
247
265
|
modified_at: string | null;
|
|
248
|
-
|
|
266
|
+
trial_interval: string | null;
|
|
267
|
+
trial_interval_count: number | null;
|
|
249
268
|
name: string;
|
|
250
269
|
description: string | null;
|
|
251
270
|
recurring_interval: string | null;
|
|
@@ -265,9 +284,11 @@ export const Product$outboundSchema: z.ZodType<
|
|
|
265
284
|
z.ZodTypeDef,
|
|
266
285
|
Product
|
|
267
286
|
> = z.object({
|
|
287
|
+
id: z.string(),
|
|
268
288
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
269
289
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
270
|
-
|
|
290
|
+
trialInterval: z.nullable(TrialInterval$outboundSchema),
|
|
291
|
+
trialIntervalCount: z.nullable(z.number().int()),
|
|
271
292
|
name: z.string(),
|
|
272
293
|
description: z.nullable(z.string()),
|
|
273
294
|
recurringInterval: z.nullable(SubscriptionRecurringInterval$outboundSchema),
|
|
@@ -290,6 +311,8 @@ export const Product$outboundSchema: z.ZodType<
|
|
|
290
311
|
return remap$(v, {
|
|
291
312
|
createdAt: "created_at",
|
|
292
313
|
modifiedAt: "modified_at",
|
|
314
|
+
trialInterval: "trial_interval",
|
|
315
|
+
trialIntervalCount: "trial_interval_count",
|
|
293
316
|
recurringInterval: "recurring_interval",
|
|
294
317
|
isRecurring: "is_recurring",
|
|
295
318
|
isArchived: "is_archived",
|