@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.
Files changed (288) hide show
  1. package/bin/mcp-server.js +673 -475
  2. package/bin/mcp-server.js.map +19 -15
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  6. package/dist/commonjs/mcp-server/server.js +1 -1
  7. package/dist/commonjs/models/components/address.d.ts +687 -687
  8. package/dist/commonjs/models/components/address.js +222 -222
  9. package/dist/commonjs/models/components/addressinput.d.ts +683 -683
  10. package/dist/commonjs/models/components/addressinput.js +217 -217
  11. package/dist/commonjs/models/components/checkout.d.ts +31 -5
  12. package/dist/commonjs/models/components/checkout.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/checkout.js +23 -2
  14. package/dist/commonjs/models/components/checkout.js.map +1 -1
  15. package/dist/commonjs/models/components/checkoutcreate.d.ts +11 -0
  16. package/dist/commonjs/models/components/checkoutcreate.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/checkoutcreate.js +9 -0
  18. package/dist/commonjs/models/components/checkoutcreate.js.map +1 -1
  19. package/dist/commonjs/models/components/checkoutlink.d.ts +14 -3
  20. package/dist/commonjs/models/components/checkoutlink.d.ts.map +1 -1
  21. package/dist/commonjs/models/components/checkoutlink.js +11 -2
  22. package/dist/commonjs/models/components/checkoutlink.js.map +1 -1
  23. package/dist/commonjs/models/components/checkoutlinkcreateproduct.d.ts +11 -0
  24. package/dist/commonjs/models/components/checkoutlinkcreateproduct.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/checkoutlinkcreateproduct.js +9 -0
  26. package/dist/commonjs/models/components/checkoutlinkcreateproduct.js.map +1 -1
  27. package/dist/commonjs/models/components/checkoutlinkcreateproductprice.d.ts +11 -0
  28. package/dist/commonjs/models/components/checkoutlinkcreateproductprice.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/checkoutlinkcreateproductprice.js +9 -0
  30. package/dist/commonjs/models/components/checkoutlinkcreateproductprice.js.map +1 -1
  31. package/dist/commonjs/models/components/checkoutlinkcreateproducts.d.ts +11 -0
  32. package/dist/commonjs/models/components/checkoutlinkcreateproducts.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/checkoutlinkcreateproducts.js +9 -0
  34. package/dist/commonjs/models/components/checkoutlinkcreateproducts.js.map +1 -1
  35. package/dist/commonjs/models/components/checkoutlinkproduct.d.ts +14 -3
  36. package/dist/commonjs/models/components/checkoutlinkproduct.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/checkoutlinkproduct.js +11 -2
  38. package/dist/commonjs/models/components/checkoutlinkproduct.js.map +1 -1
  39. package/dist/commonjs/models/components/checkoutlinkupdate.d.ts +11 -0
  40. package/dist/commonjs/models/components/checkoutlinkupdate.d.ts.map +1 -1
  41. package/dist/commonjs/models/components/checkoutlinkupdate.js +9 -0
  42. package/dist/commonjs/models/components/checkoutlinkupdate.js.map +1 -1
  43. package/dist/commonjs/models/components/checkoutproduct.d.ts +14 -3
  44. package/dist/commonjs/models/components/checkoutproduct.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/checkoutproduct.js +11 -2
  46. package/dist/commonjs/models/components/checkoutproduct.js.map +1 -1
  47. package/dist/commonjs/models/components/checkoutpublic.d.ts +21 -5
  48. package/dist/commonjs/models/components/checkoutpublic.d.ts.map +1 -1
  49. package/dist/commonjs/models/components/checkoutpublic.js +15 -2
  50. package/dist/commonjs/models/components/checkoutpublic.js.map +1 -1
  51. package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts +21 -5
  52. package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/checkoutpublicconfirmed.js +15 -2
  54. package/dist/commonjs/models/components/checkoutpublicconfirmed.js.map +1 -1
  55. package/dist/commonjs/models/components/checkoutupdate.d.ts +11 -0
  56. package/dist/commonjs/models/components/checkoutupdate.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/checkoutupdate.js +9 -0
  58. package/dist/commonjs/models/components/checkoutupdate.js.map +1 -1
  59. package/dist/commonjs/models/components/customerorderproduct.d.ts +14 -3
  60. package/dist/commonjs/models/components/customerorderproduct.d.ts.map +1 -1
  61. package/dist/commonjs/models/components/customerorderproduct.js +11 -2
  62. package/dist/commonjs/models/components/customerorderproduct.js.map +1 -1
  63. package/dist/commonjs/models/components/customerordersubscription.d.ts +10 -0
  64. package/dist/commonjs/models/components/customerordersubscription.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/customerordersubscription.js +8 -0
  66. package/dist/commonjs/models/components/customerordersubscription.js.map +1 -1
  67. package/dist/commonjs/models/components/customerproduct.d.ts +14 -3
  68. package/dist/commonjs/models/components/customerproduct.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/customerproduct.js +11 -2
  70. package/dist/commonjs/models/components/customerproduct.js.map +1 -1
  71. package/dist/commonjs/models/components/customersubscription.d.ts +10 -0
  72. package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/customersubscription.js +8 -0
  74. package/dist/commonjs/models/components/customersubscription.js.map +1 -1
  75. package/dist/commonjs/models/components/customersubscriptionproduct.d.ts +14 -3
  76. package/dist/commonjs/models/components/customersubscriptionproduct.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/customersubscriptionproduct.js +11 -2
  78. package/dist/commonjs/models/components/customersubscriptionproduct.js.map +1 -1
  79. package/dist/commonjs/models/components/discountproduct.d.ts +14 -3
  80. package/dist/commonjs/models/components/discountproduct.d.ts.map +1 -1
  81. package/dist/commonjs/models/components/discountproduct.js +11 -2
  82. package/dist/commonjs/models/components/discountproduct.js.map +1 -1
  83. package/dist/commonjs/models/components/orderproduct.d.ts +14 -3
  84. package/dist/commonjs/models/components/orderproduct.d.ts.map +1 -1
  85. package/dist/commonjs/models/components/orderproduct.js +11 -2
  86. package/dist/commonjs/models/components/orderproduct.js.map +1 -1
  87. package/dist/commonjs/models/components/ordersubscription.d.ts +10 -0
  88. package/dist/commonjs/models/components/ordersubscription.d.ts.map +1 -1
  89. package/dist/commonjs/models/components/ordersubscription.js +8 -0
  90. package/dist/commonjs/models/components/ordersubscription.js.map +1 -1
  91. package/dist/commonjs/models/components/product.d.ts +14 -3
  92. package/dist/commonjs/models/components/product.d.ts.map +1 -1
  93. package/dist/commonjs/models/components/product.js +11 -2
  94. package/dist/commonjs/models/components/product.js.map +1 -1
  95. package/dist/commonjs/models/components/productcreate.d.ts +4 -111
  96. package/dist/commonjs/models/components/productcreate.d.ts.map +1 -1
  97. package/dist/commonjs/models/components/productcreate.js +9 -106
  98. package/dist/commonjs/models/components/productcreate.js.map +1 -1
  99. package/dist/commonjs/models/components/productcreateonetime.d.ts +130 -0
  100. package/dist/commonjs/models/components/productcreateonetime.d.ts.map +1 -0
  101. package/dist/commonjs/models/components/productcreateonetime.js +169 -0
  102. package/dist/commonjs/models/components/productcreateonetime.js.map +1 -0
  103. package/dist/commonjs/models/components/productcreaterecurring.d.ts +139 -0
  104. package/dist/commonjs/models/components/productcreaterecurring.d.ts.map +1 -0
  105. package/dist/commonjs/models/components/productcreaterecurring.js +179 -0
  106. package/dist/commonjs/models/components/productcreaterecurring.js.map +1 -0
  107. package/dist/commonjs/models/components/productupdate.d.ts +11 -0
  108. package/dist/commonjs/models/components/productupdate.d.ts.map +1 -1
  109. package/dist/commonjs/models/components/productupdate.js +9 -0
  110. package/dist/commonjs/models/components/productupdate.js.map +1 -1
  111. package/dist/commonjs/models/components/subscription.d.ts +10 -0
  112. package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
  113. package/dist/commonjs/models/components/subscription.js +8 -0
  114. package/dist/commonjs/models/components/subscription.js.map +1 -1
  115. package/dist/commonjs/models/components/subscriptionupdate.d.ts +3 -2
  116. package/dist/commonjs/models/components/subscriptionupdate.d.ts.map +1 -1
  117. package/dist/commonjs/models/components/subscriptionupdate.js +3 -0
  118. package/dist/commonjs/models/components/subscriptionupdate.js.map +1 -1
  119. package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts +32 -0
  120. package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts.map +1 -0
  121. package/dist/commonjs/models/components/subscriptionupdatetrial.js +78 -0
  122. package/dist/commonjs/models/components/subscriptionupdatetrial.js.map +1 -0
  123. package/dist/commonjs/models/components/trialinterval.d.ts +34 -0
  124. package/dist/commonjs/models/components/trialinterval.d.ts.map +1 -0
  125. package/dist/commonjs/models/components/trialinterval.js +62 -0
  126. package/dist/commonjs/models/components/trialinterval.js.map +1 -0
  127. package/dist/esm/lib/config.d.ts +2 -2
  128. package/dist/esm/lib/config.js +2 -2
  129. package/dist/esm/mcp-server/mcp-server.js +1 -1
  130. package/dist/esm/mcp-server/server.js +1 -1
  131. package/dist/esm/models/components/address.d.ts +687 -687
  132. package/dist/esm/models/components/address.js +222 -222
  133. package/dist/esm/models/components/addressinput.d.ts +683 -683
  134. package/dist/esm/models/components/addressinput.js +217 -217
  135. package/dist/esm/models/components/checkout.d.ts +31 -5
  136. package/dist/esm/models/components/checkout.d.ts.map +1 -1
  137. package/dist/esm/models/components/checkout.js +23 -2
  138. package/dist/esm/models/components/checkout.js.map +1 -1
  139. package/dist/esm/models/components/checkoutcreate.d.ts +11 -0
  140. package/dist/esm/models/components/checkoutcreate.d.ts.map +1 -1
  141. package/dist/esm/models/components/checkoutcreate.js +9 -0
  142. package/dist/esm/models/components/checkoutcreate.js.map +1 -1
  143. package/dist/esm/models/components/checkoutlink.d.ts +14 -3
  144. package/dist/esm/models/components/checkoutlink.d.ts.map +1 -1
  145. package/dist/esm/models/components/checkoutlink.js +11 -2
  146. package/dist/esm/models/components/checkoutlink.js.map +1 -1
  147. package/dist/esm/models/components/checkoutlinkcreateproduct.d.ts +11 -0
  148. package/dist/esm/models/components/checkoutlinkcreateproduct.d.ts.map +1 -1
  149. package/dist/esm/models/components/checkoutlinkcreateproduct.js +9 -0
  150. package/dist/esm/models/components/checkoutlinkcreateproduct.js.map +1 -1
  151. package/dist/esm/models/components/checkoutlinkcreateproductprice.d.ts +11 -0
  152. package/dist/esm/models/components/checkoutlinkcreateproductprice.d.ts.map +1 -1
  153. package/dist/esm/models/components/checkoutlinkcreateproductprice.js +9 -0
  154. package/dist/esm/models/components/checkoutlinkcreateproductprice.js.map +1 -1
  155. package/dist/esm/models/components/checkoutlinkcreateproducts.d.ts +11 -0
  156. package/dist/esm/models/components/checkoutlinkcreateproducts.d.ts.map +1 -1
  157. package/dist/esm/models/components/checkoutlinkcreateproducts.js +9 -0
  158. package/dist/esm/models/components/checkoutlinkcreateproducts.js.map +1 -1
  159. package/dist/esm/models/components/checkoutlinkproduct.d.ts +14 -3
  160. package/dist/esm/models/components/checkoutlinkproduct.d.ts.map +1 -1
  161. package/dist/esm/models/components/checkoutlinkproduct.js +11 -2
  162. package/dist/esm/models/components/checkoutlinkproduct.js.map +1 -1
  163. package/dist/esm/models/components/checkoutlinkupdate.d.ts +11 -0
  164. package/dist/esm/models/components/checkoutlinkupdate.d.ts.map +1 -1
  165. package/dist/esm/models/components/checkoutlinkupdate.js +9 -0
  166. package/dist/esm/models/components/checkoutlinkupdate.js.map +1 -1
  167. package/dist/esm/models/components/checkoutproduct.d.ts +14 -3
  168. package/dist/esm/models/components/checkoutproduct.d.ts.map +1 -1
  169. package/dist/esm/models/components/checkoutproduct.js +11 -2
  170. package/dist/esm/models/components/checkoutproduct.js.map +1 -1
  171. package/dist/esm/models/components/checkoutpublic.d.ts +21 -5
  172. package/dist/esm/models/components/checkoutpublic.d.ts.map +1 -1
  173. package/dist/esm/models/components/checkoutpublic.js +15 -2
  174. package/dist/esm/models/components/checkoutpublic.js.map +1 -1
  175. package/dist/esm/models/components/checkoutpublicconfirmed.d.ts +21 -5
  176. package/dist/esm/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
  177. package/dist/esm/models/components/checkoutpublicconfirmed.js +15 -2
  178. package/dist/esm/models/components/checkoutpublicconfirmed.js.map +1 -1
  179. package/dist/esm/models/components/checkoutupdate.d.ts +11 -0
  180. package/dist/esm/models/components/checkoutupdate.d.ts.map +1 -1
  181. package/dist/esm/models/components/checkoutupdate.js +9 -0
  182. package/dist/esm/models/components/checkoutupdate.js.map +1 -1
  183. package/dist/esm/models/components/customerorderproduct.d.ts +14 -3
  184. package/dist/esm/models/components/customerorderproduct.d.ts.map +1 -1
  185. package/dist/esm/models/components/customerorderproduct.js +11 -2
  186. package/dist/esm/models/components/customerorderproduct.js.map +1 -1
  187. package/dist/esm/models/components/customerordersubscription.d.ts +10 -0
  188. package/dist/esm/models/components/customerordersubscription.d.ts.map +1 -1
  189. package/dist/esm/models/components/customerordersubscription.js +8 -0
  190. package/dist/esm/models/components/customerordersubscription.js.map +1 -1
  191. package/dist/esm/models/components/customerproduct.d.ts +14 -3
  192. package/dist/esm/models/components/customerproduct.d.ts.map +1 -1
  193. package/dist/esm/models/components/customerproduct.js +11 -2
  194. package/dist/esm/models/components/customerproduct.js.map +1 -1
  195. package/dist/esm/models/components/customersubscription.d.ts +10 -0
  196. package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
  197. package/dist/esm/models/components/customersubscription.js +8 -0
  198. package/dist/esm/models/components/customersubscription.js.map +1 -1
  199. package/dist/esm/models/components/customersubscriptionproduct.d.ts +14 -3
  200. package/dist/esm/models/components/customersubscriptionproduct.d.ts.map +1 -1
  201. package/dist/esm/models/components/customersubscriptionproduct.js +11 -2
  202. package/dist/esm/models/components/customersubscriptionproduct.js.map +1 -1
  203. package/dist/esm/models/components/discountproduct.d.ts +14 -3
  204. package/dist/esm/models/components/discountproduct.d.ts.map +1 -1
  205. package/dist/esm/models/components/discountproduct.js +11 -2
  206. package/dist/esm/models/components/discountproduct.js.map +1 -1
  207. package/dist/esm/models/components/orderproduct.d.ts +14 -3
  208. package/dist/esm/models/components/orderproduct.d.ts.map +1 -1
  209. package/dist/esm/models/components/orderproduct.js +11 -2
  210. package/dist/esm/models/components/orderproduct.js.map +1 -1
  211. package/dist/esm/models/components/ordersubscription.d.ts +10 -0
  212. package/dist/esm/models/components/ordersubscription.d.ts.map +1 -1
  213. package/dist/esm/models/components/ordersubscription.js +8 -0
  214. package/dist/esm/models/components/ordersubscription.js.map +1 -1
  215. package/dist/esm/models/components/product.d.ts +14 -3
  216. package/dist/esm/models/components/product.d.ts.map +1 -1
  217. package/dist/esm/models/components/product.js +11 -2
  218. package/dist/esm/models/components/product.js.map +1 -1
  219. package/dist/esm/models/components/productcreate.d.ts +4 -111
  220. package/dist/esm/models/components/productcreate.d.ts.map +1 -1
  221. package/dist/esm/models/components/productcreate.js +8 -101
  222. package/dist/esm/models/components/productcreate.js.map +1 -1
  223. package/dist/esm/models/components/productcreateonetime.d.ts +130 -0
  224. package/dist/esm/models/components/productcreateonetime.d.ts.map +1 -0
  225. package/dist/esm/models/components/productcreateonetime.js +127 -0
  226. package/dist/esm/models/components/productcreateonetime.js.map +1 -0
  227. package/dist/esm/models/components/productcreaterecurring.d.ts +139 -0
  228. package/dist/esm/models/components/productcreaterecurring.d.ts.map +1 -0
  229. package/dist/esm/models/components/productcreaterecurring.js +137 -0
  230. package/dist/esm/models/components/productcreaterecurring.js.map +1 -0
  231. package/dist/esm/models/components/productupdate.d.ts +11 -0
  232. package/dist/esm/models/components/productupdate.d.ts.map +1 -1
  233. package/dist/esm/models/components/productupdate.js +9 -0
  234. package/dist/esm/models/components/productupdate.js.map +1 -1
  235. package/dist/esm/models/components/subscription.d.ts +10 -0
  236. package/dist/esm/models/components/subscription.d.ts.map +1 -1
  237. package/dist/esm/models/components/subscription.js +8 -0
  238. package/dist/esm/models/components/subscription.js.map +1 -1
  239. package/dist/esm/models/components/subscriptionupdate.d.ts +3 -2
  240. package/dist/esm/models/components/subscriptionupdate.d.ts.map +1 -1
  241. package/dist/esm/models/components/subscriptionupdate.js +3 -0
  242. package/dist/esm/models/components/subscriptionupdate.js.map +1 -1
  243. package/dist/esm/models/components/subscriptionupdatetrial.d.ts +32 -0
  244. package/dist/esm/models/components/subscriptionupdatetrial.d.ts.map +1 -0
  245. package/dist/esm/models/components/subscriptionupdatetrial.js +40 -0
  246. package/dist/esm/models/components/subscriptionupdatetrial.js.map +1 -0
  247. package/dist/esm/models/components/trialinterval.d.ts +34 -0
  248. package/dist/esm/models/components/trialinterval.d.ts.map +1 -0
  249. package/dist/esm/models/components/trialinterval.js +26 -0
  250. package/dist/esm/models/components/trialinterval.js.map +1 -0
  251. package/docs/sdks/products/README.md +2 -2
  252. package/examples/package-lock.json +1 -1
  253. package/jsr.json +1 -1
  254. package/package.json +1 -1
  255. package/src/lib/config.ts +2 -2
  256. package/src/mcp-server/mcp-server.ts +1 -1
  257. package/src/mcp-server/server.ts +1 -1
  258. package/src/models/components/address.ts +222 -222
  259. package/src/models/components/addressinput.ts +217 -217
  260. package/src/models/components/checkout.ts +59 -7
  261. package/src/models/components/checkoutcreate.ts +23 -0
  262. package/src/models/components/checkoutlink.ts +28 -5
  263. package/src/models/components/checkoutlinkcreateproduct.ts +23 -0
  264. package/src/models/components/checkoutlinkcreateproductprice.ts +23 -0
  265. package/src/models/components/checkoutlinkcreateproducts.ts +23 -0
  266. package/src/models/components/checkoutlinkproduct.ts +28 -5
  267. package/src/models/components/checkoutlinkupdate.ts +23 -0
  268. package/src/models/components/checkoutproduct.ts +28 -5
  269. package/src/models/components/checkoutpublic.ts +41 -7
  270. package/src/models/components/checkoutpublicconfirmed.ts +41 -7
  271. package/src/models/components/checkoutupdate.ts +23 -0
  272. package/src/models/components/customerorderproduct.ts +28 -5
  273. package/src/models/components/customerordersubscription.ts +22 -0
  274. package/src/models/components/customerproduct.ts +28 -5
  275. package/src/models/components/customersubscription.ts +22 -0
  276. package/src/models/components/customersubscriptionproduct.ts +28 -5
  277. package/src/models/components/discountproduct.ts +28 -5
  278. package/src/models/components/orderproduct.ts +28 -5
  279. package/src/models/components/ordersubscription.ts +22 -0
  280. package/src/models/components/product.ts +28 -5
  281. package/src/models/components/productcreate.ts +22 -275
  282. package/src/models/components/productcreateonetime.ts +329 -0
  283. package/src/models/components/productcreaterecurring.ts +356 -0
  284. package/src/models/components/productupdate.ts +23 -0
  285. package/src/models/components/subscription.ts +22 -0
  286. package/src/models/components/subscriptionupdate.ts +10 -0
  287. package/src/models/components/subscriptionupdatetrial.ts +78 -0
  288. package/src/models/components/trialinterval.ts +35 -0
@@ -1,120 +1,13 @@
1
1
  import * as z from "zod";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } 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
- export type ProductCreateMetadata = string | number | number | boolean;
11
- export type ProductCreatePrices = ProductPriceMeteredUnitCreate | ProductPriceFixedCreate | ProductPriceCustomCreate | ProductPriceFreeCreate;
12
- /**
13
- * Schema to create a product.
14
- */
15
- export type ProductCreate = {
16
- /**
17
- * Key-value object allowing you to store additional information.
18
- *
19
- * @remarks
20
- *
21
- * The key must be a string with a maximum length of **40 characters**.
22
- * The value must be either:
23
- *
24
- * * A string with a maximum length of **500 characters**
25
- * * An integer
26
- * * A floating-point number
27
- * * A boolean
28
- *
29
- * You can store up to **50 key-value pairs**.
30
- */
31
- metadata?: {
32
- [k: string]: string | number | number | boolean;
33
- } | undefined;
34
- /**
35
- * The name of the product.
36
- */
37
- name: string;
38
- /**
39
- * The description of the product.
40
- */
41
- description?: string | null | undefined;
42
- /**
43
- * The recurring interval of the product. If `None`, the product is a one-time purchase.Note that the `day` and `week` values are for internal Polar staff use only.
44
- */
45
- recurringInterval: SubscriptionRecurringInterval | null;
46
- /**
47
- * 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.
48
- */
49
- prices: Array<ProductPriceMeteredUnitCreate | ProductPriceFixedCreate | ProductPriceCustomCreate | ProductPriceFreeCreate>;
50
- /**
51
- * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.
52
- */
53
- medias?: Array<string> | null | undefined;
54
- /**
55
- * List of custom fields to attach.
56
- */
57
- attachedCustomFields?: Array<AttachedCustomFieldCreate> | undefined;
58
- /**
59
- * The ID of the organization owning the product. **Required unless you use an organization token.**
60
- */
61
- organizationId?: string | null | undefined;
62
- };
63
- /** @internal */
64
- export declare const ProductCreateMetadata$inboundSchema: z.ZodType<ProductCreateMetadata, z.ZodTypeDef, unknown>;
65
- /** @internal */
66
- export type ProductCreateMetadata$Outbound = string | number | number | boolean;
67
- /** @internal */
68
- export declare const ProductCreateMetadata$outboundSchema: z.ZodType<ProductCreateMetadata$Outbound, z.ZodTypeDef, ProductCreateMetadata>;
69
- /**
70
- * @internal
71
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
72
- */
73
- export declare namespace ProductCreateMetadata$ {
74
- /** @deprecated use `ProductCreateMetadata$inboundSchema` instead. */
75
- const inboundSchema: z.ZodType<ProductCreateMetadata, z.ZodTypeDef, unknown>;
76
- /** @deprecated use `ProductCreateMetadata$outboundSchema` instead. */
77
- const outboundSchema: z.ZodType<ProductCreateMetadata$Outbound, z.ZodTypeDef, ProductCreateMetadata>;
78
- /** @deprecated use `ProductCreateMetadata$Outbound` instead. */
79
- type Outbound = ProductCreateMetadata$Outbound;
80
- }
81
- export declare function productCreateMetadataToJSON(productCreateMetadata: ProductCreateMetadata): string;
82
- export declare function productCreateMetadataFromJSON(jsonString: string): SafeParseResult<ProductCreateMetadata, SDKValidationError>;
83
- /** @internal */
84
- export declare const ProductCreatePrices$inboundSchema: z.ZodType<ProductCreatePrices, z.ZodTypeDef, unknown>;
85
- /** @internal */
86
- export type ProductCreatePrices$Outbound = ProductPriceMeteredUnitCreate$Outbound | ProductPriceFixedCreate$Outbound | ProductPriceCustomCreate$Outbound | ProductPriceFreeCreate$Outbound;
87
- /** @internal */
88
- export declare const ProductCreatePrices$outboundSchema: z.ZodType<ProductCreatePrices$Outbound, z.ZodTypeDef, ProductCreatePrices>;
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
- export declare namespace ProductCreatePrices$ {
94
- /** @deprecated use `ProductCreatePrices$inboundSchema` instead. */
95
- const inboundSchema: z.ZodType<ProductCreatePrices, z.ZodTypeDef, unknown>;
96
- /** @deprecated use `ProductCreatePrices$outboundSchema` instead. */
97
- const outboundSchema: z.ZodType<ProductCreatePrices$Outbound, z.ZodTypeDef, ProductCreatePrices>;
98
- /** @deprecated use `ProductCreatePrices$Outbound` instead. */
99
- type Outbound = ProductCreatePrices$Outbound;
100
- }
101
- export declare function productCreatePricesToJSON(productCreatePrices: ProductCreatePrices): string;
102
- export declare function productCreatePricesFromJSON(jsonString: string): SafeParseResult<ProductCreatePrices, SDKValidationError>;
4
+ import { ProductCreateOneTime, ProductCreateOneTime$Outbound } from "./productcreateonetime.js";
5
+ import { ProductCreateRecurring, ProductCreateRecurring$Outbound } from "./productcreaterecurring.js";
6
+ export type ProductCreate = ProductCreateRecurring | ProductCreateOneTime;
103
7
  /** @internal */
104
8
  export declare const ProductCreate$inboundSchema: z.ZodType<ProductCreate, z.ZodTypeDef, unknown>;
105
9
  /** @internal */
106
- export type ProductCreate$Outbound = {
107
- metadata?: {
108
- [k: string]: string | number | number | boolean;
109
- } | undefined;
110
- name: string;
111
- description?: string | null | undefined;
112
- recurring_interval: string | null;
113
- prices: Array<ProductPriceMeteredUnitCreate$Outbound | ProductPriceFixedCreate$Outbound | ProductPriceCustomCreate$Outbound | ProductPriceFreeCreate$Outbound>;
114
- medias?: Array<string> | null | undefined;
115
- attached_custom_fields?: Array<AttachedCustomFieldCreate$Outbound> | undefined;
116
- organization_id?: string | null | undefined;
117
- };
10
+ export type ProductCreate$Outbound = ProductCreateRecurring$Outbound | ProductCreateOneTime$Outbound;
118
11
  /** @internal */
119
12
  export declare const ProductCreate$outboundSchema: z.ZodType<ProductCreate$Outbound, z.ZodTypeDef, ProductCreate>;
120
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"productcreate.d.ts","sourceRoot":"","sources":["../../../../src/models/components/productcreate.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;AAE5C,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAC3B,6BAA6B,GAC7B,uBAAuB,GACvB,wBAAwB,GACxB,sBAAsB,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,CAAC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AI,GAAG,SAAS,CAAC;IACxC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,KAAK,CACT,sCAAsC,GACtC,gCAAgC,GAChC,iCAAiC,GACjC,+BAA+B,CAClC,CAAC;IACF,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,sBAAsB,CAAC,EACnB,KAAK,CAAC,kCAAkC,CAAC,GACzC,SAAS,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,aAAa,CA0Bb,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"}
1
+ {"version":3,"file":"productcreate.d.ts","sourceRoot":"","sources":["../../../../src/models/components/productcreate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,sBAAsB,EAEtB,+BAA+B,EAEhC,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,aAAa,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;AAE1E,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,aAAa,EACb,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,sBAAsB,GAC9B,+BAA+B,GAC/B,6BAA6B,CAAC;AAElC,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,aAAa,CAIb,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"}
@@ -2,112 +2,19 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
  import * as z from "zod";
5
- import { remap as remap$ } from "../../lib/primitives.js";
6
5
  import { safeParse } from "../../lib/schemas.js";
7
- import { AttachedCustomFieldCreate$inboundSchema, AttachedCustomFieldCreate$outboundSchema, } from "./attachedcustomfieldcreate.js";
8
- import { ProductPriceCustomCreate$inboundSchema, ProductPriceCustomCreate$outboundSchema, } from "./productpricecustomcreate.js";
9
- import { ProductPriceFixedCreate$inboundSchema, ProductPriceFixedCreate$outboundSchema, } from "./productpricefixedcreate.js";
10
- import { ProductPriceFreeCreate$inboundSchema, ProductPriceFreeCreate$outboundSchema, } from "./productpricefreecreate.js";
11
- import { ProductPriceMeteredUnitCreate$inboundSchema, ProductPriceMeteredUnitCreate$outboundSchema, } from "./productpricemeteredunitcreate.js";
12
- import { SubscriptionRecurringInterval$inboundSchema, SubscriptionRecurringInterval$outboundSchema, } from "./subscriptionrecurringinterval.js";
6
+ import { ProductCreateOneTime$inboundSchema, ProductCreateOneTime$outboundSchema, } from "./productcreateonetime.js";
7
+ import { ProductCreateRecurring$inboundSchema, ProductCreateRecurring$outboundSchema, } from "./productcreaterecurring.js";
13
8
  /** @internal */
14
- export const ProductCreateMetadata$inboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
15
- /** @internal */
16
- export const ProductCreateMetadata$outboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
17
- /**
18
- * @internal
19
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
20
- */
21
- export var ProductCreateMetadata$;
22
- (function (ProductCreateMetadata$) {
23
- /** @deprecated use `ProductCreateMetadata$inboundSchema` instead. */
24
- ProductCreateMetadata$.inboundSchema = ProductCreateMetadata$inboundSchema;
25
- /** @deprecated use `ProductCreateMetadata$outboundSchema` instead. */
26
- ProductCreateMetadata$.outboundSchema = ProductCreateMetadata$outboundSchema;
27
- })(ProductCreateMetadata$ || (ProductCreateMetadata$ = {}));
28
- export function productCreateMetadataToJSON(productCreateMetadata) {
29
- return JSON.stringify(ProductCreateMetadata$outboundSchema.parse(productCreateMetadata));
30
- }
31
- export function productCreateMetadataFromJSON(jsonString) {
32
- return safeParse(jsonString, (x) => ProductCreateMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateMetadata' from JSON`);
33
- }
34
- /** @internal */
35
- export const ProductCreatePrices$inboundSchema = z.union([
36
- ProductPriceMeteredUnitCreate$inboundSchema,
37
- ProductPriceFixedCreate$inboundSchema,
38
- ProductPriceCustomCreate$inboundSchema,
39
- ProductPriceFreeCreate$inboundSchema,
9
+ export const ProductCreate$inboundSchema = z.union([
10
+ ProductCreateRecurring$inboundSchema,
11
+ ProductCreateOneTime$inboundSchema,
40
12
  ]);
41
13
  /** @internal */
42
- export const ProductCreatePrices$outboundSchema = z.union([
43
- ProductPriceMeteredUnitCreate$outboundSchema,
44
- ProductPriceFixedCreate$outboundSchema,
45
- ProductPriceCustomCreate$outboundSchema,
46
- ProductPriceFreeCreate$outboundSchema,
14
+ export const ProductCreate$outboundSchema = z.union([
15
+ ProductCreateRecurring$outboundSchema,
16
+ ProductCreateOneTime$outboundSchema,
47
17
  ]);
48
- /**
49
- * @internal
50
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
51
- */
52
- export var ProductCreatePrices$;
53
- (function (ProductCreatePrices$) {
54
- /** @deprecated use `ProductCreatePrices$inboundSchema` instead. */
55
- ProductCreatePrices$.inboundSchema = ProductCreatePrices$inboundSchema;
56
- /** @deprecated use `ProductCreatePrices$outboundSchema` instead. */
57
- ProductCreatePrices$.outboundSchema = ProductCreatePrices$outboundSchema;
58
- })(ProductCreatePrices$ || (ProductCreatePrices$ = {}));
59
- export function productCreatePricesToJSON(productCreatePrices) {
60
- return JSON.stringify(ProductCreatePrices$outboundSchema.parse(productCreatePrices));
61
- }
62
- export function productCreatePricesFromJSON(jsonString) {
63
- return safeParse(jsonString, (x) => ProductCreatePrices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreatePrices' from JSON`);
64
- }
65
- /** @internal */
66
- export const ProductCreate$inboundSchema = z.object({
67
- metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
68
- name: z.string(),
69
- description: z.nullable(z.string()).optional(),
70
- recurring_interval: z.nullable(SubscriptionRecurringInterval$inboundSchema),
71
- prices: z.array(z.union([
72
- ProductPriceMeteredUnitCreate$inboundSchema,
73
- ProductPriceFixedCreate$inboundSchema,
74
- ProductPriceCustomCreate$inboundSchema,
75
- ProductPriceFreeCreate$inboundSchema,
76
- ])),
77
- medias: z.nullable(z.array(z.string())).optional(),
78
- attached_custom_fields: z.array(AttachedCustomFieldCreate$inboundSchema)
79
- .optional(),
80
- organization_id: z.nullable(z.string()).optional(),
81
- }).transform((v) => {
82
- return remap$(v, {
83
- "recurring_interval": "recurringInterval",
84
- "attached_custom_fields": "attachedCustomFields",
85
- "organization_id": "organizationId",
86
- });
87
- });
88
- /** @internal */
89
- export const ProductCreate$outboundSchema = z.object({
90
- metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
91
- name: z.string(),
92
- description: z.nullable(z.string()).optional(),
93
- recurringInterval: z.nullable(SubscriptionRecurringInterval$outboundSchema),
94
- prices: z.array(z.union([
95
- ProductPriceMeteredUnitCreate$outboundSchema,
96
- ProductPriceFixedCreate$outboundSchema,
97
- ProductPriceCustomCreate$outboundSchema,
98
- ProductPriceFreeCreate$outboundSchema,
99
- ])),
100
- medias: z.nullable(z.array(z.string())).optional(),
101
- attachedCustomFields: z.array(AttachedCustomFieldCreate$outboundSchema)
102
- .optional(),
103
- organizationId: z.nullable(z.string()).optional(),
104
- }).transform((v) => {
105
- return remap$(v, {
106
- recurringInterval: "recurring_interval",
107
- attachedCustomFields: "attached_custom_fields",
108
- organizationId: "organization_id",
109
- });
110
- });
111
18
  /**
112
19
  * @internal
113
20
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
@@ -1 +1 @@
1
- {"version":3,"file":"productcreate.js","sourceRoot":"","sources":["../../../../src/models/components/productcreate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,uCAAuC,EAEvC,wCAAwC,GACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,sCAAsC,EAEtC,uCAAuC,GACxC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,qCAAqC,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AAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvD,2CAA2C,CAC5C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"productcreate.js","sourceRoot":"","sources":["../../../../src/models/components/productcreate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,kCAAkC,EAElC,mCAAmC,GACpC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,oCAAoC,EAEpC,qCAAqC,GACtC,MAAM,6BAA6B,CAAC;AAIrC,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAIpC,CAAC,CAAC,KAAK,CAAC;IACV,oCAAoC;IACpC,kCAAkC;CACnC,CAAC,CAAC;AAOH,gBAAgB;AAChB,MAAM,CAAC,MAAM,4BAA4B,GAIrC,CAAC,CAAC,KAAK,CAAC;IACV,qCAAqC;IACrC,mCAAmC;CACpC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,cAAc,CAO9B;AAPD,WAAiB,cAAc;IAC7B,6DAA6D;IAChD,4BAAa,GAAG,2BAA2B,CAAC;IACzD,8DAA8D;IACjD,6BAAc,GAAG,4BAA4B,CAAC;AAG7D,CAAC,EAPgB,cAAc,KAAd,cAAc,QAO9B;AAED,MAAM,UAAU,mBAAmB,CAAC,aAA4B;IAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,4BAA4B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvD,2CAA2C,CAC5C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,130 @@
1
+ import * as z from "zod";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } 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
+ export type ProductCreateOneTimeMetadata = string | number | number | boolean;
10
+ export type ProductCreateOneTimePrices = ProductPriceMeteredUnitCreate | ProductPriceFixedCreate | ProductPriceCustomCreate | ProductPriceFreeCreate;
11
+ export type ProductCreateOneTime = {
12
+ /**
13
+ * Key-value object allowing you to store additional information.
14
+ *
15
+ * @remarks
16
+ *
17
+ * The key must be a string with a maximum length of **40 characters**.
18
+ * The value must be either:
19
+ *
20
+ * * A string with a maximum length of **500 characters**
21
+ * * An integer
22
+ * * A floating-point number
23
+ * * A boolean
24
+ *
25
+ * You can store up to **50 key-value pairs**.
26
+ */
27
+ metadata?: {
28
+ [k: string]: string | number | number | boolean;
29
+ } | undefined;
30
+ /**
31
+ * The name of the product.
32
+ */
33
+ name: string;
34
+ /**
35
+ * The description of the product.
36
+ */
37
+ description?: string | null | undefined;
38
+ /**
39
+ * 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.
40
+ */
41
+ prices: Array<ProductPriceMeteredUnitCreate | ProductPriceFixedCreate | ProductPriceCustomCreate | ProductPriceFreeCreate>;
42
+ /**
43
+ * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.
44
+ */
45
+ medias?: Array<string> | null | undefined;
46
+ /**
47
+ * List of custom fields to attach.
48
+ */
49
+ attachedCustomFields?: Array<AttachedCustomFieldCreate> | undefined;
50
+ /**
51
+ * The ID of the organization owning the product. **Required unless you use an organization token.**
52
+ */
53
+ organizationId?: string | null | undefined;
54
+ /**
55
+ * States that the product is a one-time purchase.
56
+ */
57
+ recurringInterval?: any | null | undefined;
58
+ };
59
+ /** @internal */
60
+ export declare const ProductCreateOneTimeMetadata$inboundSchema: z.ZodType<ProductCreateOneTimeMetadata, z.ZodTypeDef, unknown>;
61
+ /** @internal */
62
+ export type ProductCreateOneTimeMetadata$Outbound = string | number | number | boolean;
63
+ /** @internal */
64
+ export declare const ProductCreateOneTimeMetadata$outboundSchema: z.ZodType<ProductCreateOneTimeMetadata$Outbound, z.ZodTypeDef, ProductCreateOneTimeMetadata>;
65
+ /**
66
+ * @internal
67
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
68
+ */
69
+ export declare namespace ProductCreateOneTimeMetadata$ {
70
+ /** @deprecated use `ProductCreateOneTimeMetadata$inboundSchema` instead. */
71
+ const inboundSchema: z.ZodType<ProductCreateOneTimeMetadata, z.ZodTypeDef, unknown>;
72
+ /** @deprecated use `ProductCreateOneTimeMetadata$outboundSchema` instead. */
73
+ const outboundSchema: z.ZodType<ProductCreateOneTimeMetadata$Outbound, z.ZodTypeDef, ProductCreateOneTimeMetadata>;
74
+ /** @deprecated use `ProductCreateOneTimeMetadata$Outbound` instead. */
75
+ type Outbound = ProductCreateOneTimeMetadata$Outbound;
76
+ }
77
+ export declare function productCreateOneTimeMetadataToJSON(productCreateOneTimeMetadata: ProductCreateOneTimeMetadata): string;
78
+ export declare function productCreateOneTimeMetadataFromJSON(jsonString: string): SafeParseResult<ProductCreateOneTimeMetadata, SDKValidationError>;
79
+ /** @internal */
80
+ export declare const ProductCreateOneTimePrices$inboundSchema: z.ZodType<ProductCreateOneTimePrices, z.ZodTypeDef, unknown>;
81
+ /** @internal */
82
+ export type ProductCreateOneTimePrices$Outbound = ProductPriceMeteredUnitCreate$Outbound | ProductPriceFixedCreate$Outbound | ProductPriceCustomCreate$Outbound | ProductPriceFreeCreate$Outbound;
83
+ /** @internal */
84
+ export declare const ProductCreateOneTimePrices$outboundSchema: z.ZodType<ProductCreateOneTimePrices$Outbound, z.ZodTypeDef, ProductCreateOneTimePrices>;
85
+ /**
86
+ * @internal
87
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
88
+ */
89
+ export declare namespace ProductCreateOneTimePrices$ {
90
+ /** @deprecated use `ProductCreateOneTimePrices$inboundSchema` instead. */
91
+ const inboundSchema: z.ZodType<ProductCreateOneTimePrices, z.ZodTypeDef, unknown>;
92
+ /** @deprecated use `ProductCreateOneTimePrices$outboundSchema` instead. */
93
+ const outboundSchema: z.ZodType<ProductCreateOneTimePrices$Outbound, z.ZodTypeDef, ProductCreateOneTimePrices>;
94
+ /** @deprecated use `ProductCreateOneTimePrices$Outbound` instead. */
95
+ type Outbound = ProductCreateOneTimePrices$Outbound;
96
+ }
97
+ export declare function productCreateOneTimePricesToJSON(productCreateOneTimePrices: ProductCreateOneTimePrices): string;
98
+ export declare function productCreateOneTimePricesFromJSON(jsonString: string): SafeParseResult<ProductCreateOneTimePrices, SDKValidationError>;
99
+ /** @internal */
100
+ export declare const ProductCreateOneTime$inboundSchema: z.ZodType<ProductCreateOneTime, z.ZodTypeDef, unknown>;
101
+ /** @internal */
102
+ export type ProductCreateOneTime$Outbound = {
103
+ metadata?: {
104
+ [k: string]: string | number | number | boolean;
105
+ } | undefined;
106
+ name: string;
107
+ description?: string | null | undefined;
108
+ prices: Array<ProductPriceMeteredUnitCreate$Outbound | ProductPriceFixedCreate$Outbound | ProductPriceCustomCreate$Outbound | ProductPriceFreeCreate$Outbound>;
109
+ medias?: Array<string> | null | undefined;
110
+ attached_custom_fields?: Array<AttachedCustomFieldCreate$Outbound> | undefined;
111
+ organization_id?: string | null | undefined;
112
+ recurring_interval?: any | null | undefined;
113
+ };
114
+ /** @internal */
115
+ export declare const ProductCreateOneTime$outboundSchema: z.ZodType<ProductCreateOneTime$Outbound, z.ZodTypeDef, ProductCreateOneTime>;
116
+ /**
117
+ * @internal
118
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
119
+ */
120
+ export declare namespace ProductCreateOneTime$ {
121
+ /** @deprecated use `ProductCreateOneTime$inboundSchema` instead. */
122
+ const inboundSchema: z.ZodType<ProductCreateOneTime, z.ZodTypeDef, unknown>;
123
+ /** @deprecated use `ProductCreateOneTime$outboundSchema` instead. */
124
+ const outboundSchema: z.ZodType<ProductCreateOneTime$Outbound, z.ZodTypeDef, ProductCreateOneTime>;
125
+ /** @deprecated use `ProductCreateOneTime$Outbound` instead. */
126
+ type Outbound = ProductCreateOneTime$Outbound;
127
+ }
128
+ export declare function productCreateOneTimeToJSON(productCreateOneTime: ProductCreateOneTime): string;
129
+ export declare function productCreateOneTimeFromJSON(jsonString: string): SafeParseResult<ProductCreateOneTime, SDKValidationError>;
130
+ //# sourceMappingURL=productcreateonetime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productcreateonetime.d.ts","sourceRoot":"","sources":["../../../../src/models/components/productcreateonetime.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,EAC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AAkB,CAAC,CAM3D"}
@@ -0,0 +1,127 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod";
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { AttachedCustomFieldCreate$inboundSchema, AttachedCustomFieldCreate$outboundSchema, } from "./attachedcustomfieldcreate.js";
8
+ import { ProductPriceCustomCreate$inboundSchema, ProductPriceCustomCreate$outboundSchema, } from "./productpricecustomcreate.js";
9
+ import { ProductPriceFixedCreate$inboundSchema, ProductPriceFixedCreate$outboundSchema, } from "./productpricefixedcreate.js";
10
+ import { ProductPriceFreeCreate$inboundSchema, ProductPriceFreeCreate$outboundSchema, } from "./productpricefreecreate.js";
11
+ import { ProductPriceMeteredUnitCreate$inboundSchema, ProductPriceMeteredUnitCreate$outboundSchema, } from "./productpricemeteredunitcreate.js";
12
+ /** @internal */
13
+ export const ProductCreateOneTimeMetadata$inboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
14
+ /** @internal */
15
+ export const ProductCreateOneTimeMetadata$outboundSchema = z.union([z.string(), z.number().int(), z.number(), z.boolean()]);
16
+ /**
17
+ * @internal
18
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
19
+ */
20
+ export var ProductCreateOneTimeMetadata$;
21
+ (function (ProductCreateOneTimeMetadata$) {
22
+ /** @deprecated use `ProductCreateOneTimeMetadata$inboundSchema` instead. */
23
+ ProductCreateOneTimeMetadata$.inboundSchema = ProductCreateOneTimeMetadata$inboundSchema;
24
+ /** @deprecated use `ProductCreateOneTimeMetadata$outboundSchema` instead. */
25
+ ProductCreateOneTimeMetadata$.outboundSchema = ProductCreateOneTimeMetadata$outboundSchema;
26
+ })(ProductCreateOneTimeMetadata$ || (ProductCreateOneTimeMetadata$ = {}));
27
+ export function productCreateOneTimeMetadataToJSON(productCreateOneTimeMetadata) {
28
+ return JSON.stringify(ProductCreateOneTimeMetadata$outboundSchema.parse(productCreateOneTimeMetadata));
29
+ }
30
+ export function productCreateOneTimeMetadataFromJSON(jsonString) {
31
+ return safeParse(jsonString, (x) => ProductCreateOneTimeMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateOneTimeMetadata' from JSON`);
32
+ }
33
+ /** @internal */
34
+ export const ProductCreateOneTimePrices$inboundSchema = z.union([
35
+ ProductPriceMeteredUnitCreate$inboundSchema,
36
+ ProductPriceFixedCreate$inboundSchema,
37
+ ProductPriceCustomCreate$inboundSchema,
38
+ ProductPriceFreeCreate$inboundSchema,
39
+ ]);
40
+ /** @internal */
41
+ export const ProductCreateOneTimePrices$outboundSchema = z.union([
42
+ ProductPriceMeteredUnitCreate$outboundSchema,
43
+ ProductPriceFixedCreate$outboundSchema,
44
+ ProductPriceCustomCreate$outboundSchema,
45
+ ProductPriceFreeCreate$outboundSchema,
46
+ ]);
47
+ /**
48
+ * @internal
49
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
+ */
51
+ export var ProductCreateOneTimePrices$;
52
+ (function (ProductCreateOneTimePrices$) {
53
+ /** @deprecated use `ProductCreateOneTimePrices$inboundSchema` instead. */
54
+ ProductCreateOneTimePrices$.inboundSchema = ProductCreateOneTimePrices$inboundSchema;
55
+ /** @deprecated use `ProductCreateOneTimePrices$outboundSchema` instead. */
56
+ ProductCreateOneTimePrices$.outboundSchema = ProductCreateOneTimePrices$outboundSchema;
57
+ })(ProductCreateOneTimePrices$ || (ProductCreateOneTimePrices$ = {}));
58
+ export function productCreateOneTimePricesToJSON(productCreateOneTimePrices) {
59
+ return JSON.stringify(ProductCreateOneTimePrices$outboundSchema.parse(productCreateOneTimePrices));
60
+ }
61
+ export function productCreateOneTimePricesFromJSON(jsonString) {
62
+ return safeParse(jsonString, (x) => ProductCreateOneTimePrices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateOneTimePrices' from JSON`);
63
+ }
64
+ /** @internal */
65
+ export const ProductCreateOneTime$inboundSchema = z.object({
66
+ metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
67
+ name: z.string(),
68
+ description: z.nullable(z.string()).optional(),
69
+ prices: z.array(z.union([
70
+ ProductPriceMeteredUnitCreate$inboundSchema,
71
+ ProductPriceFixedCreate$inboundSchema,
72
+ ProductPriceCustomCreate$inboundSchema,
73
+ ProductPriceFreeCreate$inboundSchema,
74
+ ])),
75
+ medias: z.nullable(z.array(z.string())).optional(),
76
+ attached_custom_fields: z.array(AttachedCustomFieldCreate$inboundSchema)
77
+ .optional(),
78
+ organization_id: z.nullable(z.string()).optional(),
79
+ recurring_interval: z.nullable(z.any()).optional(),
80
+ }).transform((v) => {
81
+ return remap$(v, {
82
+ "attached_custom_fields": "attachedCustomFields",
83
+ "organization_id": "organizationId",
84
+ "recurring_interval": "recurringInterval",
85
+ });
86
+ });
87
+ /** @internal */
88
+ export const ProductCreateOneTime$outboundSchema = z.object({
89
+ metadata: z.record(z.union([z.string(), z.number().int(), z.number(), z.boolean()])).optional(),
90
+ name: z.string(),
91
+ description: z.nullable(z.string()).optional(),
92
+ prices: z.array(z.union([
93
+ ProductPriceMeteredUnitCreate$outboundSchema,
94
+ ProductPriceFixedCreate$outboundSchema,
95
+ ProductPriceCustomCreate$outboundSchema,
96
+ ProductPriceFreeCreate$outboundSchema,
97
+ ])),
98
+ medias: z.nullable(z.array(z.string())).optional(),
99
+ attachedCustomFields: z.array(AttachedCustomFieldCreate$outboundSchema)
100
+ .optional(),
101
+ organizationId: z.nullable(z.string()).optional(),
102
+ recurringInterval: z.nullable(z.any()).optional(),
103
+ }).transform((v) => {
104
+ return remap$(v, {
105
+ attachedCustomFields: "attached_custom_fields",
106
+ organizationId: "organization_id",
107
+ recurringInterval: "recurring_interval",
108
+ });
109
+ });
110
+ /**
111
+ * @internal
112
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
113
+ */
114
+ export var ProductCreateOneTime$;
115
+ (function (ProductCreateOneTime$) {
116
+ /** @deprecated use `ProductCreateOneTime$inboundSchema` instead. */
117
+ ProductCreateOneTime$.inboundSchema = ProductCreateOneTime$inboundSchema;
118
+ /** @deprecated use `ProductCreateOneTime$outboundSchema` instead. */
119
+ ProductCreateOneTime$.outboundSchema = ProductCreateOneTime$outboundSchema;
120
+ })(ProductCreateOneTime$ || (ProductCreateOneTime$ = {}));
121
+ export function productCreateOneTimeToJSON(productCreateOneTime) {
122
+ return JSON.stringify(ProductCreateOneTime$outboundSchema.parse(productCreateOneTime));
123
+ }
124
+ export function productCreateOneTimeFromJSON(jsonString) {
125
+ return safeParse(jsonString, (x) => ProductCreateOneTime$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductCreateOneTime' from JSON`);
126
+ }
127
+ //# sourceMappingURL=productcreateonetime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productcreateonetime.js","sourceRoot":"","sources":["../../../../src/models/components/productcreateonetime.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,uCAAuC,EAEvC,wCAAwC,GACzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,sCAAsC,EAEtC,uCAAuC,GACxC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,qCAAqC,EAErC,sCAAsC,GACvC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,oCAAoC,EAEpC,qCAAqC,GACtC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,2CAA2C,EAE3C,4CAA4C,GAC7C,MAAM,oCAAoC,CAAC;AA8D5C,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,C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