@polar-sh/sdk 0.35.0 → 0.35.2
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 +691 -475
- package/bin/mcp-server.js.map +20 -16
- 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 +669 -669
- package/dist/commonjs/models/components/address.js +221 -221
- package/dist/commonjs/models/components/addressinput.d.ts +653 -653
- 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/customerstatesubscription.d.ts +38 -2
- package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerstatesubscription.js +30 -3
- package/dist/commonjs/models/components/customerstatesubscription.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 +669 -669
- package/dist/esm/models/components/address.js +221 -221
- package/dist/esm/models/components/addressinput.d.ts +653 -653
- 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/customerstatesubscription.d.ts +38 -2
- package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customerstatesubscription.js +29 -2
- package/dist/esm/models/components/customerstatesubscription.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 +221 -221
- 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/customerstatesubscription.ts +56 -4
- 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
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ProductCreateOneTime$ = exports.ProductCreateOneTime$outboundSchema = exports.ProductCreateOneTime$inboundSchema = exports.ProductCreateOneTimePrices$ = exports.ProductCreateOneTimePrices$outboundSchema = exports.ProductCreateOneTimePrices$inboundSchema = exports.ProductCreateOneTimeMetadata$ = exports.ProductCreateOneTimeMetadata$outboundSchema = exports.ProductCreateOneTimeMetadata$inboundSchema = void 0;
|
|
40
|
+
exports.productCreateOneTimeMetadataToJSON = productCreateOneTimeMetadataToJSON;
|
|
41
|
+
exports.productCreateOneTimeMetadataFromJSON = productCreateOneTimeMetadataFromJSON;
|
|
42
|
+
exports.productCreateOneTimePricesToJSON = productCreateOneTimePricesToJSON;
|
|
43
|
+
exports.productCreateOneTimePricesFromJSON = productCreateOneTimePricesFromJSON;
|
|
44
|
+
exports.productCreateOneTimeToJSON = productCreateOneTimeToJSON;
|
|
45
|
+
exports.productCreateOneTimeFromJSON = productCreateOneTimeFromJSON;
|
|
46
|
+
const z = __importStar(require("zod"));
|
|
47
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
48
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
49
|
+
const attachedcustomfieldcreate_js_1 = require("./attachedcustomfieldcreate.js");
|
|
50
|
+
const productpricecustomcreate_js_1 = require("./productpricecustomcreate.js");
|
|
51
|
+
const productpricefixedcreate_js_1 = require("./productpricefixedcreate.js");
|
|
52
|
+
const productpricefreecreate_js_1 = require("./productpricefreecreate.js");
|
|
53
|
+
const productpricemeteredunitcreate_js_1 = require("./productpricemeteredunitcreate.js");
|
|
54
|
+
/** @internal */
|
|
55
|
+
exports.ProductCreateOneTimeMetadata$inboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
|
|
56
|
+
/** @internal */
|
|
57
|
+
exports.ProductCreateOneTimeMetadata$outboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
var ProductCreateOneTimeMetadata$;
|
|
63
|
+
(function (ProductCreateOneTimeMetadata$) {
|
|
64
|
+
/** @deprecated use `ProductCreateOneTimeMetadata$inboundSchema` instead. */
|
|
65
|
+
ProductCreateOneTimeMetadata$.inboundSchema = exports.ProductCreateOneTimeMetadata$inboundSchema;
|
|
66
|
+
/** @deprecated use `ProductCreateOneTimeMetadata$outboundSchema` instead. */
|
|
67
|
+
ProductCreateOneTimeMetadata$.outboundSchema = exports.ProductCreateOneTimeMetadata$outboundSchema;
|
|
68
|
+
})(ProductCreateOneTimeMetadata$ || (exports.ProductCreateOneTimeMetadata$ = ProductCreateOneTimeMetadata$ = {}));
|
|
69
|
+
function productCreateOneTimeMetadataToJSON(productCreateOneTimeMetadata) {
|
|
70
|
+
return JSON.stringify(exports.ProductCreateOneTimeMetadata$outboundSchema.parse(productCreateOneTimeMetadata));
|
|
71
|
+
}
|
|
72
|
+
function productCreateOneTimeMetadataFromJSON(jsonString) {
|
|
73
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProductCreateOneTimeMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateOneTimeMetadata' from JSON`);
|
|
74
|
+
}
|
|
75
|
+
/** @internal */
|
|
76
|
+
exports.ProductCreateOneTimePrices$inboundSchema = z.union([
|
|
77
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$inboundSchema,
|
|
78
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$inboundSchema,
|
|
79
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$inboundSchema,
|
|
80
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$inboundSchema,
|
|
81
|
+
]);
|
|
82
|
+
/** @internal */
|
|
83
|
+
exports.ProductCreateOneTimePrices$outboundSchema = z.union([
|
|
84
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$outboundSchema,
|
|
85
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$outboundSchema,
|
|
86
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$outboundSchema,
|
|
87
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$outboundSchema,
|
|
88
|
+
]);
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
92
|
+
*/
|
|
93
|
+
var ProductCreateOneTimePrices$;
|
|
94
|
+
(function (ProductCreateOneTimePrices$) {
|
|
95
|
+
/** @deprecated use `ProductCreateOneTimePrices$inboundSchema` instead. */
|
|
96
|
+
ProductCreateOneTimePrices$.inboundSchema = exports.ProductCreateOneTimePrices$inboundSchema;
|
|
97
|
+
/** @deprecated use `ProductCreateOneTimePrices$outboundSchema` instead. */
|
|
98
|
+
ProductCreateOneTimePrices$.outboundSchema = exports.ProductCreateOneTimePrices$outboundSchema;
|
|
99
|
+
})(ProductCreateOneTimePrices$ || (exports.ProductCreateOneTimePrices$ = ProductCreateOneTimePrices$ = {}));
|
|
100
|
+
function productCreateOneTimePricesToJSON(productCreateOneTimePrices) {
|
|
101
|
+
return JSON.stringify(exports.ProductCreateOneTimePrices$outboundSchema.parse(productCreateOneTimePrices));
|
|
102
|
+
}
|
|
103
|
+
function productCreateOneTimePricesFromJSON(jsonString) {
|
|
104
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProductCreateOneTimePrices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateOneTimePrices' from JSON`);
|
|
105
|
+
}
|
|
106
|
+
/** @internal */
|
|
107
|
+
exports.ProductCreateOneTime$inboundSchema = z.object({
|
|
108
|
+
metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
|
|
109
|
+
name: z.string(),
|
|
110
|
+
description: z.nullable(z.string()).optional(),
|
|
111
|
+
prices: z.array(z.union([
|
|
112
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$inboundSchema,
|
|
113
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$inboundSchema,
|
|
114
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$inboundSchema,
|
|
115
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$inboundSchema,
|
|
116
|
+
])),
|
|
117
|
+
medias: z.nullable(z.array(z.string())).optional(),
|
|
118
|
+
attached_custom_fields: z.array(attachedcustomfieldcreate_js_1.AttachedCustomFieldCreate$inboundSchema)
|
|
119
|
+
.optional(),
|
|
120
|
+
organization_id: z.nullable(z.string()).optional(),
|
|
121
|
+
recurring_interval: z.nullable(z.any()).optional(),
|
|
122
|
+
}).transform((v) => {
|
|
123
|
+
return (0, primitives_js_1.remap)(v, {
|
|
124
|
+
"attached_custom_fields": "attachedCustomFields",
|
|
125
|
+
"organization_id": "organizationId",
|
|
126
|
+
"recurring_interval": "recurringInterval",
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
/** @internal */
|
|
130
|
+
exports.ProductCreateOneTime$outboundSchema = z.object({
|
|
131
|
+
metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
|
|
132
|
+
name: z.string(),
|
|
133
|
+
description: z.nullable(z.string()).optional(),
|
|
134
|
+
prices: z.array(z.union([
|
|
135
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$outboundSchema,
|
|
136
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$outboundSchema,
|
|
137
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$outboundSchema,
|
|
138
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$outboundSchema,
|
|
139
|
+
])),
|
|
140
|
+
medias: z.nullable(z.array(z.string())).optional(),
|
|
141
|
+
attachedCustomFields: z.array(attachedcustomfieldcreate_js_1.AttachedCustomFieldCreate$outboundSchema)
|
|
142
|
+
.optional(),
|
|
143
|
+
organizationId: z.nullable(z.string()).optional(),
|
|
144
|
+
recurringInterval: z.nullable(z.any()).optional(),
|
|
145
|
+
}).transform((v) => {
|
|
146
|
+
return (0, primitives_js_1.remap)(v, {
|
|
147
|
+
attachedCustomFields: "attached_custom_fields",
|
|
148
|
+
organizationId: "organization_id",
|
|
149
|
+
recurringInterval: "recurring_interval",
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
155
|
+
*/
|
|
156
|
+
var ProductCreateOneTime$;
|
|
157
|
+
(function (ProductCreateOneTime$) {
|
|
158
|
+
/** @deprecated use `ProductCreateOneTime$inboundSchema` instead. */
|
|
159
|
+
ProductCreateOneTime$.inboundSchema = exports.ProductCreateOneTime$inboundSchema;
|
|
160
|
+
/** @deprecated use `ProductCreateOneTime$outboundSchema` instead. */
|
|
161
|
+
ProductCreateOneTime$.outboundSchema = exports.ProductCreateOneTime$outboundSchema;
|
|
162
|
+
})(ProductCreateOneTime$ || (exports.ProductCreateOneTime$ = ProductCreateOneTime$ = {}));
|
|
163
|
+
function productCreateOneTimeToJSON(productCreateOneTime) {
|
|
164
|
+
return JSON.stringify(exports.ProductCreateOneTime$outboundSchema.parse(productCreateOneTime));
|
|
165
|
+
}
|
|
166
|
+
function productCreateOneTimeFromJSON(jsonString) {
|
|
167
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProductCreateOneTime$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateOneTime' from JSON`);
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=productcreateonetime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productcreateonetime.js","sourceRoot":"","sources":["../../../../src/models/components/productcreateonetime.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIH,gFAQC;AAED,oFAQC;AA8CD,4EAMC;AAED,gFAQC;AAkGD,gEAMC;AAED,oEAQC;AApUD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,iFAKwC;AACxC,+EAKuC;AACvC,6EAKsC;AACtC,2EAKqC;AACr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KValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import { AttachedCustomFieldCreate, AttachedCustomFieldCreate$Outbound } from "./attachedcustomfieldcreate.js";
|
|
5
|
+
import { ProductPriceCustomCreate, ProductPriceCustomCreate$Outbound } from "./productpricecustomcreate.js";
|
|
6
|
+
import { ProductPriceFixedCreate, ProductPriceFixedCreate$Outbound } from "./productpricefixedcreate.js";
|
|
7
|
+
import { ProductPriceFreeCreate, ProductPriceFreeCreate$Outbound } from "./productpricefreecreate.js";
|
|
8
|
+
import { ProductPriceMeteredUnitCreate, ProductPriceMeteredUnitCreate$Outbound } from "./productpricemeteredunitcreate.js";
|
|
9
|
+
import { SubscriptionRecurringInterval } from "./subscriptionrecurringinterval.js";
|
|
10
|
+
import { TrialInterval } from "./trialinterval.js";
|
|
11
|
+
export type ProductCreateRecurringMetadata = string | number | number | boolean;
|
|
12
|
+
export type ProductCreateRecurringPrices = ProductPriceMeteredUnitCreate | ProductPriceFixedCreate | ProductPriceCustomCreate | ProductPriceFreeCreate;
|
|
13
|
+
export type ProductCreateRecurring = {
|
|
14
|
+
/**
|
|
15
|
+
* Key-value object allowing you to store additional information.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
*
|
|
19
|
+
* The key must be a string with a maximum length of **40 characters**.
|
|
20
|
+
* The value must be either:
|
|
21
|
+
*
|
|
22
|
+
* * A string with a maximum length of **500 characters**
|
|
23
|
+
* * An integer
|
|
24
|
+
* * A floating-point number
|
|
25
|
+
* * A boolean
|
|
26
|
+
*
|
|
27
|
+
* You can store up to **50 key-value pairs**.
|
|
28
|
+
*/
|
|
29
|
+
metadata?: {
|
|
30
|
+
[k: string]: string | number | number | boolean;
|
|
31
|
+
} | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The name of the product.
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* The description of the product.
|
|
38
|
+
*/
|
|
39
|
+
description?: string | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* List of available prices for this product. It should contain at most one static price (fixed, custom or free), and any number of metered prices. Metered prices are not supported on one-time purchase products.
|
|
42
|
+
*/
|
|
43
|
+
prices: Array<ProductPriceMeteredUnitCreate | ProductPriceFixedCreate | ProductPriceCustomCreate | ProductPriceFreeCreate>;
|
|
44
|
+
/**
|
|
45
|
+
* List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.
|
|
46
|
+
*/
|
|
47
|
+
medias?: Array<string> | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* List of custom fields to attach.
|
|
50
|
+
*/
|
|
51
|
+
attachedCustomFields?: Array<AttachedCustomFieldCreate> | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The ID of the organization owning the product. **Required unless you use an organization token.**
|
|
54
|
+
*/
|
|
55
|
+
organizationId?: string | null | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The interval unit for the trial period.
|
|
58
|
+
*/
|
|
59
|
+
trialInterval?: TrialInterval | null | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The number of interval units for the trial period.
|
|
62
|
+
*/
|
|
63
|
+
trialIntervalCount?: number | null | undefined;
|
|
64
|
+
recurringInterval: SubscriptionRecurringInterval;
|
|
65
|
+
};
|
|
66
|
+
/** @internal */
|
|
67
|
+
export declare const ProductCreateRecurringMetadata$inboundSchema: z.ZodType<ProductCreateRecurringMetadata, z.ZodTypeDef, unknown>;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type ProductCreateRecurringMetadata$Outbound = string | number | number | boolean;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export declare const ProductCreateRecurringMetadata$outboundSchema: z.ZodType<ProductCreateRecurringMetadata$Outbound, z.ZodTypeDef, ProductCreateRecurringMetadata>;
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export declare namespace ProductCreateRecurringMetadata$ {
|
|
77
|
+
/** @deprecated use `ProductCreateRecurringMetadata$inboundSchema` instead. */
|
|
78
|
+
const inboundSchema: z.ZodType<ProductCreateRecurringMetadata, z.ZodTypeDef, unknown>;
|
|
79
|
+
/** @deprecated use `ProductCreateRecurringMetadata$outboundSchema` instead. */
|
|
80
|
+
const outboundSchema: z.ZodType<ProductCreateRecurringMetadata$Outbound, z.ZodTypeDef, ProductCreateRecurringMetadata>;
|
|
81
|
+
/** @deprecated use `ProductCreateRecurringMetadata$Outbound` instead. */
|
|
82
|
+
type Outbound = ProductCreateRecurringMetadata$Outbound;
|
|
83
|
+
}
|
|
84
|
+
export declare function productCreateRecurringMetadataToJSON(productCreateRecurringMetadata: ProductCreateRecurringMetadata): string;
|
|
85
|
+
export declare function productCreateRecurringMetadataFromJSON(jsonString: string): SafeParseResult<ProductCreateRecurringMetadata, SDKValidationError>;
|
|
86
|
+
/** @internal */
|
|
87
|
+
export declare const ProductCreateRecurringPrices$inboundSchema: z.ZodType<ProductCreateRecurringPrices, z.ZodTypeDef, unknown>;
|
|
88
|
+
/** @internal */
|
|
89
|
+
export type ProductCreateRecurringPrices$Outbound = ProductPriceMeteredUnitCreate$Outbound | ProductPriceFixedCreate$Outbound | ProductPriceCustomCreate$Outbound | ProductPriceFreeCreate$Outbound;
|
|
90
|
+
/** @internal */
|
|
91
|
+
export declare const ProductCreateRecurringPrices$outboundSchema: z.ZodType<ProductCreateRecurringPrices$Outbound, z.ZodTypeDef, ProductCreateRecurringPrices>;
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
95
|
+
*/
|
|
96
|
+
export declare namespace ProductCreateRecurringPrices$ {
|
|
97
|
+
/** @deprecated use `ProductCreateRecurringPrices$inboundSchema` instead. */
|
|
98
|
+
const inboundSchema: z.ZodType<ProductCreateRecurringPrices, z.ZodTypeDef, unknown>;
|
|
99
|
+
/** @deprecated use `ProductCreateRecurringPrices$outboundSchema` instead. */
|
|
100
|
+
const outboundSchema: z.ZodType<ProductCreateRecurringPrices$Outbound, z.ZodTypeDef, ProductCreateRecurringPrices>;
|
|
101
|
+
/** @deprecated use `ProductCreateRecurringPrices$Outbound` instead. */
|
|
102
|
+
type Outbound = ProductCreateRecurringPrices$Outbound;
|
|
103
|
+
}
|
|
104
|
+
export declare function productCreateRecurringPricesToJSON(productCreateRecurringPrices: ProductCreateRecurringPrices): string;
|
|
105
|
+
export declare function productCreateRecurringPricesFromJSON(jsonString: string): SafeParseResult<ProductCreateRecurringPrices, SDKValidationError>;
|
|
106
|
+
/** @internal */
|
|
107
|
+
export declare const ProductCreateRecurring$inboundSchema: z.ZodType<ProductCreateRecurring, z.ZodTypeDef, unknown>;
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type ProductCreateRecurring$Outbound = {
|
|
110
|
+
metadata?: {
|
|
111
|
+
[k: string]: string | number | number | boolean;
|
|
112
|
+
} | undefined;
|
|
113
|
+
name: string;
|
|
114
|
+
description?: string | null | undefined;
|
|
115
|
+
prices: Array<ProductPriceMeteredUnitCreate$Outbound | ProductPriceFixedCreate$Outbound | ProductPriceCustomCreate$Outbound | ProductPriceFreeCreate$Outbound>;
|
|
116
|
+
medias?: Array<string> | null | undefined;
|
|
117
|
+
attached_custom_fields?: Array<AttachedCustomFieldCreate$Outbound> | undefined;
|
|
118
|
+
organization_id?: string | null | undefined;
|
|
119
|
+
trial_interval?: string | null | undefined;
|
|
120
|
+
trial_interval_count?: number | null | undefined;
|
|
121
|
+
recurring_interval: string;
|
|
122
|
+
};
|
|
123
|
+
/** @internal */
|
|
124
|
+
export declare const ProductCreateRecurring$outboundSchema: z.ZodType<ProductCreateRecurring$Outbound, z.ZodTypeDef, ProductCreateRecurring>;
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
|
+
*/
|
|
129
|
+
export declare namespace ProductCreateRecurring$ {
|
|
130
|
+
/** @deprecated use `ProductCreateRecurring$inboundSchema` instead. */
|
|
131
|
+
const inboundSchema: z.ZodType<ProductCreateRecurring, z.ZodTypeDef, unknown>;
|
|
132
|
+
/** @deprecated use `ProductCreateRecurring$outboundSchema` instead. */
|
|
133
|
+
const outboundSchema: z.ZodType<ProductCreateRecurring$Outbound, z.ZodTypeDef, ProductCreateRecurring>;
|
|
134
|
+
/** @deprecated use `ProductCreateRecurring$Outbound` instead. */
|
|
135
|
+
type Outbound = ProductCreateRecurring$Outbound;
|
|
136
|
+
}
|
|
137
|
+
export declare function productCreateRecurringToJSON(productCreateRecurring: ProductCreateRecurring): string;
|
|
138
|
+
export declare function productCreateRecurringFromJSON(jsonString: string): SafeParseResult<ProductCreateRecurring, SDKValidationError>;
|
|
139
|
+
//# sourceMappingURL=productcreaterecurring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productcreaterecurring.d.ts","sourceRoot":"","sources":["../../../../src/models/components/productcreaterecurring.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,yBAAyB,EAEzB,kCAAkC,EAEnC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,wBAAwB,EAExB,iCAAiC,EAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EAEvB,gCAAgC,EAEjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,EAEtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,6BAA6B,EAE7B,sCAAsC,EAEvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,6BAA6B,EAG9B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,aAAa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G,+BAA+B,CAAC;CACxD;AAED,wBAAgB,4BAA4B,CAC1C,sBAAsB,EAAE,sBAAsB,GAC7C,MAAM,CAIR;AAED,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ProductCreateRecurring$ = exports.ProductCreateRecurring$outboundSchema = exports.ProductCreateRecurring$inboundSchema = exports.ProductCreateRecurringPrices$ = exports.ProductCreateRecurringPrices$outboundSchema = exports.ProductCreateRecurringPrices$inboundSchema = exports.ProductCreateRecurringMetadata$ = exports.ProductCreateRecurringMetadata$outboundSchema = exports.ProductCreateRecurringMetadata$inboundSchema = void 0;
|
|
40
|
+
exports.productCreateRecurringMetadataToJSON = productCreateRecurringMetadataToJSON;
|
|
41
|
+
exports.productCreateRecurringMetadataFromJSON = productCreateRecurringMetadataFromJSON;
|
|
42
|
+
exports.productCreateRecurringPricesToJSON = productCreateRecurringPricesToJSON;
|
|
43
|
+
exports.productCreateRecurringPricesFromJSON = productCreateRecurringPricesFromJSON;
|
|
44
|
+
exports.productCreateRecurringToJSON = productCreateRecurringToJSON;
|
|
45
|
+
exports.productCreateRecurringFromJSON = productCreateRecurringFromJSON;
|
|
46
|
+
const z = __importStar(require("zod"));
|
|
47
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
48
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
49
|
+
const attachedcustomfieldcreate_js_1 = require("./attachedcustomfieldcreate.js");
|
|
50
|
+
const productpricecustomcreate_js_1 = require("./productpricecustomcreate.js");
|
|
51
|
+
const productpricefixedcreate_js_1 = require("./productpricefixedcreate.js");
|
|
52
|
+
const productpricefreecreate_js_1 = require("./productpricefreecreate.js");
|
|
53
|
+
const productpricemeteredunitcreate_js_1 = require("./productpricemeteredunitcreate.js");
|
|
54
|
+
const subscriptionrecurringinterval_js_1 = require("./subscriptionrecurringinterval.js");
|
|
55
|
+
const trialinterval_js_1 = require("./trialinterval.js");
|
|
56
|
+
/** @internal */
|
|
57
|
+
exports.ProductCreateRecurringMetadata$inboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
|
|
58
|
+
/** @internal */
|
|
59
|
+
exports.ProductCreateRecurringMetadata$outboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
var ProductCreateRecurringMetadata$;
|
|
65
|
+
(function (ProductCreateRecurringMetadata$) {
|
|
66
|
+
/** @deprecated use `ProductCreateRecurringMetadata$inboundSchema` instead. */
|
|
67
|
+
ProductCreateRecurringMetadata$.inboundSchema = exports.ProductCreateRecurringMetadata$inboundSchema;
|
|
68
|
+
/** @deprecated use `ProductCreateRecurringMetadata$outboundSchema` instead. */
|
|
69
|
+
ProductCreateRecurringMetadata$.outboundSchema = exports.ProductCreateRecurringMetadata$outboundSchema;
|
|
70
|
+
})(ProductCreateRecurringMetadata$ || (exports.ProductCreateRecurringMetadata$ = ProductCreateRecurringMetadata$ = {}));
|
|
71
|
+
function productCreateRecurringMetadataToJSON(productCreateRecurringMetadata) {
|
|
72
|
+
return JSON.stringify(exports.ProductCreateRecurringMetadata$outboundSchema.parse(productCreateRecurringMetadata));
|
|
73
|
+
}
|
|
74
|
+
function productCreateRecurringMetadataFromJSON(jsonString) {
|
|
75
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProductCreateRecurringMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateRecurringMetadata' from JSON`);
|
|
76
|
+
}
|
|
77
|
+
/** @internal */
|
|
78
|
+
exports.ProductCreateRecurringPrices$inboundSchema = z.union([
|
|
79
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$inboundSchema,
|
|
80
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$inboundSchema,
|
|
81
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$inboundSchema,
|
|
82
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$inboundSchema,
|
|
83
|
+
]);
|
|
84
|
+
/** @internal */
|
|
85
|
+
exports.ProductCreateRecurringPrices$outboundSchema = z.union([
|
|
86
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$outboundSchema,
|
|
87
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$outboundSchema,
|
|
88
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$outboundSchema,
|
|
89
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$outboundSchema,
|
|
90
|
+
]);
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
94
|
+
*/
|
|
95
|
+
var ProductCreateRecurringPrices$;
|
|
96
|
+
(function (ProductCreateRecurringPrices$) {
|
|
97
|
+
/** @deprecated use `ProductCreateRecurringPrices$inboundSchema` instead. */
|
|
98
|
+
ProductCreateRecurringPrices$.inboundSchema = exports.ProductCreateRecurringPrices$inboundSchema;
|
|
99
|
+
/** @deprecated use `ProductCreateRecurringPrices$outboundSchema` instead. */
|
|
100
|
+
ProductCreateRecurringPrices$.outboundSchema = exports.ProductCreateRecurringPrices$outboundSchema;
|
|
101
|
+
})(ProductCreateRecurringPrices$ || (exports.ProductCreateRecurringPrices$ = ProductCreateRecurringPrices$ = {}));
|
|
102
|
+
function productCreateRecurringPricesToJSON(productCreateRecurringPrices) {
|
|
103
|
+
return JSON.stringify(exports.ProductCreateRecurringPrices$outboundSchema.parse(productCreateRecurringPrices));
|
|
104
|
+
}
|
|
105
|
+
function productCreateRecurringPricesFromJSON(jsonString) {
|
|
106
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProductCreateRecurringPrices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateRecurringPrices' from JSON`);
|
|
107
|
+
}
|
|
108
|
+
/** @internal */
|
|
109
|
+
exports.ProductCreateRecurring$inboundSchema = z.object({
|
|
110
|
+
metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
|
|
111
|
+
name: z.string(),
|
|
112
|
+
description: z.nullable(z.string()).optional(),
|
|
113
|
+
prices: z.array(z.union([
|
|
114
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$inboundSchema,
|
|
115
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$inboundSchema,
|
|
116
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$inboundSchema,
|
|
117
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$inboundSchema,
|
|
118
|
+
])),
|
|
119
|
+
medias: z.nullable(z.array(z.string())).optional(),
|
|
120
|
+
attached_custom_fields: z.array(attachedcustomfieldcreate_js_1.AttachedCustomFieldCreate$inboundSchema)
|
|
121
|
+
.optional(),
|
|
122
|
+
organization_id: z.nullable(z.string()).optional(),
|
|
123
|
+
trial_interval: z.nullable(trialinterval_js_1.TrialInterval$inboundSchema).optional(),
|
|
124
|
+
trial_interval_count: z.nullable(z.number().int()).optional(),
|
|
125
|
+
recurring_interval: subscriptionrecurringinterval_js_1.SubscriptionRecurringInterval$inboundSchema,
|
|
126
|
+
}).transform((v) => {
|
|
127
|
+
return (0, primitives_js_1.remap)(v, {
|
|
128
|
+
"attached_custom_fields": "attachedCustomFields",
|
|
129
|
+
"organization_id": "organizationId",
|
|
130
|
+
"trial_interval": "trialInterval",
|
|
131
|
+
"trial_interval_count": "trialIntervalCount",
|
|
132
|
+
"recurring_interval": "recurringInterval",
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
/** @internal */
|
|
136
|
+
exports.ProductCreateRecurring$outboundSchema = z.object({
|
|
137
|
+
metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
|
|
138
|
+
name: z.string(),
|
|
139
|
+
description: z.nullable(z.string()).optional(),
|
|
140
|
+
prices: z.array(z.union([
|
|
141
|
+
productpricemeteredunitcreate_js_1.ProductPriceMeteredUnitCreate$outboundSchema,
|
|
142
|
+
productpricefixedcreate_js_1.ProductPriceFixedCreate$outboundSchema,
|
|
143
|
+
productpricecustomcreate_js_1.ProductPriceCustomCreate$outboundSchema,
|
|
144
|
+
productpricefreecreate_js_1.ProductPriceFreeCreate$outboundSchema,
|
|
145
|
+
])),
|
|
146
|
+
medias: z.nullable(z.array(z.string())).optional(),
|
|
147
|
+
attachedCustomFields: z.array(attachedcustomfieldcreate_js_1.AttachedCustomFieldCreate$outboundSchema)
|
|
148
|
+
.optional(),
|
|
149
|
+
organizationId: z.nullable(z.string()).optional(),
|
|
150
|
+
trialInterval: z.nullable(trialinterval_js_1.TrialInterval$outboundSchema).optional(),
|
|
151
|
+
trialIntervalCount: z.nullable(z.number().int()).optional(),
|
|
152
|
+
recurringInterval: subscriptionrecurringinterval_js_1.SubscriptionRecurringInterval$outboundSchema,
|
|
153
|
+
}).transform((v) => {
|
|
154
|
+
return (0, primitives_js_1.remap)(v, {
|
|
155
|
+
attachedCustomFields: "attached_custom_fields",
|
|
156
|
+
organizationId: "organization_id",
|
|
157
|
+
trialInterval: "trial_interval",
|
|
158
|
+
trialIntervalCount: "trial_interval_count",
|
|
159
|
+
recurringInterval: "recurring_interval",
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
/**
|
|
163
|
+
* @internal
|
|
164
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
165
|
+
*/
|
|
166
|
+
var ProductCreateRecurring$;
|
|
167
|
+
(function (ProductCreateRecurring$) {
|
|
168
|
+
/** @deprecated use `ProductCreateRecurring$inboundSchema` instead. */
|
|
169
|
+
ProductCreateRecurring$.inboundSchema = exports.ProductCreateRecurring$inboundSchema;
|
|
170
|
+
/** @deprecated use `ProductCreateRecurring$outboundSchema` instead. */
|
|
171
|
+
ProductCreateRecurring$.outboundSchema = exports.ProductCreateRecurring$outboundSchema;
|
|
172
|
+
})(ProductCreateRecurring$ || (exports.ProductCreateRecurring$ = ProductCreateRecurring$ = {}));
|
|
173
|
+
function productCreateRecurringToJSON(productCreateRecurring) {
|
|
174
|
+
return JSON.stringify(exports.ProductCreateRecurring$outboundSchema.parse(productCreateRecurring));
|
|
175
|
+
}
|
|
176
|
+
function productCreateRecurringFromJSON(jsonString) {
|
|
177
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ProductCreateRecurring$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateRecurring' from JSON`);
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=productcreaterecurring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productcreaterecurring.js","sourceRoot":"","sources":["../../../../src/models/components/productcreaterecurring.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmJH,oFAQC;AAED,wFAQC;AA8CD,gFAQC;AAED,oFAQC;AA4GD,oEAMC;AAED,wEAQC;AA/VD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,iFAKwC;AACxC,+EAKuC;AACvC,6EAKsC;AACtC,2EAKqC;AACrC,yFAK4C;AAC5C,yFAI4C;AAC5C,yDAI4B;AAmE5B,gBAAgB;AACH,QAAA,4CAA4C,GAIrD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AASrE,gBAAgB;AACH,QAAA,6CAA6C,GAItD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MA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,CAAC,QAAQ,EAAE;IACjD,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,+CAA4B,CAAC,CAAC,QAAQ,EAAE;IAClE,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3D,iBAAiB,EAAE,+EAA4C;CAChE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,oBAAoB,EAAE,wBAAwB;QAC9C,cAAc,EAAE,iBAAiB;QACjC,aAAa,EAAE,gBAAgB;QAC/B,kBAAkB,EAAE,sBAAsB;QAC1C,iBAAiB,EAAE,oBAAoB;KACxC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,uBAAuB,CAOvC;AAPD,WAAiB,uBAAuB;IACtC,sEAAsE;IACzD,qCAAa,GAAG,4CAAoC,CAAC;IAClE,uEAAuE;IAC1D,sCAAc,GAAG,6CAAqC,CAAC;AAGtE,CAAC,EAPgB,uBAAuB,uCAAvB,uBAAuB,QAOvC;AAED,SAAgB,4BAA4B,CAC1C,sBAA8C;IAE9C,OAAO,IAAI,CAAC,SAAS,CACnB,6CAAqC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CACpE,CAAC;AACJ,CAAC;AAED,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { ProductPriceFixedCreate, ProductPriceFixedCreate$Outbound } from "./pro
|
|
|
8
8
|
import { ProductPriceFreeCreate, ProductPriceFreeCreate$Outbound } from "./productpricefreecreate.js";
|
|
9
9
|
import { ProductPriceMeteredUnitCreate, ProductPriceMeteredUnitCreate$Outbound } from "./productpricemeteredunitcreate.js";
|
|
10
10
|
import { SubscriptionRecurringInterval } from "./subscriptionrecurringinterval.js";
|
|
11
|
+
import { TrialInterval } from "./trialinterval.js";
|
|
11
12
|
export type ProductUpdateMetadata = string | number | number | boolean;
|
|
12
13
|
export type ProductUpdatePrices = ProductPriceMeteredUnitCreate | ProductPriceFixedCreate | ExistingProductPrice | ProductPriceCustomCreate | ProductPriceFreeCreate;
|
|
13
14
|
/**
|
|
@@ -32,6 +33,14 @@ export type ProductUpdate = {
|
|
|
32
33
|
metadata?: {
|
|
33
34
|
[k: string]: string | number | number | boolean;
|
|
34
35
|
} | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The interval unit for the trial period.
|
|
38
|
+
*/
|
|
39
|
+
trialInterval?: TrialInterval | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The number of interval units for the trial period.
|
|
42
|
+
*/
|
|
43
|
+
trialIntervalCount?: number | null | undefined;
|
|
35
44
|
name?: string | null | undefined;
|
|
36
45
|
/**
|
|
37
46
|
* The description of the product.
|
|
@@ -102,6 +111,8 @@ export type ProductUpdate$Outbound = {
|
|
|
102
111
|
metadata?: {
|
|
103
112
|
[k: string]: string | number | number | boolean;
|
|
104
113
|
} | undefined;
|
|
114
|
+
trial_interval?: string | null | undefined;
|
|
115
|
+
trial_interval_count?: number | null | undefined;
|
|
105
116
|
name?: string | null | undefined;
|
|
106
117
|
description?: string | null | undefined;
|
|
107
118
|
recurring_interval?: string | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productupdate.d.ts","sourceRoot":"","sources":["../../../../src/models/components/productupdate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,yBAAyB,EAEzB,kCAAkC,EAEnC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wBAAwB,EAExB,iCAAiC,EAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EAEvB,gCAAgC,EAEjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,EAEtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,6BAA6B,EAE7B,sCAAsC,EAEvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,6BAA6B,EAG9B,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"productupdate.d.ts","sourceRoot":"","sources":["../../../../src/models/components/productupdate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,yBAAyB,EAEzB,kCAAkC,EAEnC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wBAAwB,EAExB,iCAAiC,EAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EAEvB,gCAAgC,EAEjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,EAEtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,6BAA6B,EAE7B,sCAAsC,EAEvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,6BAA6B,EAG9B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,aAAa,EAGd,MAAM,o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,CAClD,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,aAAa,CAmCb,CAAC;AAEH;;;GAGG;AACH,yBAAiB,cAAc,CAAC;IAC9B,6DAA6D;IACtD,MAAM,aAAa,iDAA8B,CAAC;IACzD,8DAA8D;IACvD,MAAM,cAAc,gEAA+B,CAAC;IAC3D,wDAAwD;IACxD,KAAY,QAAQ,GAAG,sBAAsB,CAAC;CAC/C;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAExE;AAED,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAMpD"}
|
|
@@ -53,6 +53,7 @@ const productpricefixedcreate_js_1 = require("./productpricefixedcreate.js");
|
|
|
53
53
|
const productpricefreecreate_js_1 = require("./productpricefreecreate.js");
|
|
54
54
|
const productpricemeteredunitcreate_js_1 = require("./productpricemeteredunitcreate.js");
|
|
55
55
|
const subscriptionrecurringinterval_js_1 = require("./subscriptionrecurringinterval.js");
|
|
56
|
+
const trialinterval_js_1 = require("./trialinterval.js");
|
|
56
57
|
/** @internal */
|
|
57
58
|
exports.ProductUpdateMetadata$inboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
|
|
58
59
|
/** @internal */
|
|
@@ -110,6 +111,8 @@ function productUpdatePricesFromJSON(jsonString) {
|
|
|
110
111
|
/** @internal */
|
|
111
112
|
exports.ProductUpdate$inboundSchema = z.object({
|
|
112
113
|
metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
|
|
114
|
+
trial_interval: z.nullable(trialinterval_js_1.TrialInterval$inboundSchema).optional(),
|
|
115
|
+
trial_interval_count: z.nullable(z.number().int()).optional(),
|
|
113
116
|
name: z.nullable(z.string()).optional(),
|
|
114
117
|
description: z.nullable(z.string()).optional(),
|
|
115
118
|
recurring_interval: z.nullable(subscriptionrecurringinterval_js_1.SubscriptionRecurringInterval$inboundSchema)
|
|
@@ -126,6 +129,8 @@ exports.ProductUpdate$inboundSchema = z.object({
|
|
|
126
129
|
attached_custom_fields: z.nullable(z.array(attachedcustomfieldcreate_js_1.AttachedCustomFieldCreate$inboundSchema)).optional(),
|
|
127
130
|
}).transform((v) => {
|
|
128
131
|
return (0, primitives_js_1.remap)(v, {
|
|
132
|
+
"trial_interval": "trialInterval",
|
|
133
|
+
"trial_interval_count": "trialIntervalCount",
|
|
129
134
|
"recurring_interval": "recurringInterval",
|
|
130
135
|
"is_archived": "isArchived",
|
|
131
136
|
"attached_custom_fields": "attachedCustomFields",
|
|
@@ -134,6 +139,8 @@ exports.ProductUpdate$inboundSchema = z.object({
|
|
|
134
139
|
/** @internal */
|
|
135
140
|
exports.ProductUpdate$outboundSchema = z.object({
|
|
136
141
|
metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
|
|
142
|
+
trialInterval: z.nullable(trialinterval_js_1.TrialInterval$outboundSchema).optional(),
|
|
143
|
+
trialIntervalCount: z.nullable(z.number().int()).optional(),
|
|
137
144
|
name: z.nullable(z.string()).optional(),
|
|
138
145
|
description: z.nullable(z.string()).optional(),
|
|
139
146
|
recurringInterval: z.nullable(subscriptionrecurringinterval_js_1.SubscriptionRecurringInterval$outboundSchema)
|
|
@@ -150,6 +157,8 @@ exports.ProductUpdate$outboundSchema = z.object({
|
|
|
150
157
|
attachedCustomFields: z.nullable(z.array(attachedcustomfieldcreate_js_1.AttachedCustomFieldCreate$outboundSchema)).optional(),
|
|
151
158
|
}).transform((v) => {
|
|
152
159
|
return (0, primitives_js_1.remap)(v, {
|
|
160
|
+
trialInterval: "trial_interval",
|
|
161
|
+
trialIntervalCount: "trial_interval_count",
|
|
153
162
|
recurringInterval: "recurring_interval",
|
|
154
163
|
isArchived: "is_archived",
|
|
155
164
|
attachedCustomFields: "attached_custom_fields",
|