@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.
Files changed (297) hide show
  1. package/bin/mcp-server.js +691 -475
  2. package/bin/mcp-server.js.map +20 -16
  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 +669 -669
  8. package/dist/commonjs/models/components/address.js +221 -221
  9. package/dist/commonjs/models/components/addressinput.d.ts +653 -653
  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/customerstatesubscription.d.ts +38 -2
  72. package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/customerstatesubscription.js +30 -3
  74. package/dist/commonjs/models/components/customerstatesubscription.js.map +1 -1
  75. package/dist/commonjs/models/components/customersubscription.d.ts +10 -0
  76. package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/customersubscription.js +8 -0
  78. package/dist/commonjs/models/components/customersubscription.js.map +1 -1
  79. package/dist/commonjs/models/components/customersubscriptionproduct.d.ts +14 -3
  80. package/dist/commonjs/models/components/customersubscriptionproduct.d.ts.map +1 -1
  81. package/dist/commonjs/models/components/customersubscriptionproduct.js +11 -2
  82. package/dist/commonjs/models/components/customersubscriptionproduct.js.map +1 -1
  83. package/dist/commonjs/models/components/discountproduct.d.ts +14 -3
  84. package/dist/commonjs/models/components/discountproduct.d.ts.map +1 -1
  85. package/dist/commonjs/models/components/discountproduct.js +11 -2
  86. package/dist/commonjs/models/components/discountproduct.js.map +1 -1
  87. package/dist/commonjs/models/components/orderproduct.d.ts +14 -3
  88. package/dist/commonjs/models/components/orderproduct.d.ts.map +1 -1
  89. package/dist/commonjs/models/components/orderproduct.js +11 -2
  90. package/dist/commonjs/models/components/orderproduct.js.map +1 -1
  91. package/dist/commonjs/models/components/ordersubscription.d.ts +10 -0
  92. package/dist/commonjs/models/components/ordersubscription.d.ts.map +1 -1
  93. package/dist/commonjs/models/components/ordersubscription.js +8 -0
  94. package/dist/commonjs/models/components/ordersubscription.js.map +1 -1
  95. package/dist/commonjs/models/components/product.d.ts +14 -3
  96. package/dist/commonjs/models/components/product.d.ts.map +1 -1
  97. package/dist/commonjs/models/components/product.js +11 -2
  98. package/dist/commonjs/models/components/product.js.map +1 -1
  99. package/dist/commonjs/models/components/productcreate.d.ts +4 -111
  100. package/dist/commonjs/models/components/productcreate.d.ts.map +1 -1
  101. package/dist/commonjs/models/components/productcreate.js +9 -106
  102. package/dist/commonjs/models/components/productcreate.js.map +1 -1
  103. package/dist/commonjs/models/components/productcreateonetime.d.ts +130 -0
  104. package/dist/commonjs/models/components/productcreateonetime.d.ts.map +1 -0
  105. package/dist/commonjs/models/components/productcreateonetime.js +169 -0
  106. package/dist/commonjs/models/components/productcreateonetime.js.map +1 -0
  107. package/dist/commonjs/models/components/productcreaterecurring.d.ts +139 -0
  108. package/dist/commonjs/models/components/productcreaterecurring.d.ts.map +1 -0
  109. package/dist/commonjs/models/components/productcreaterecurring.js +179 -0
  110. package/dist/commonjs/models/components/productcreaterecurring.js.map +1 -0
  111. package/dist/commonjs/models/components/productupdate.d.ts +11 -0
  112. package/dist/commonjs/models/components/productupdate.d.ts.map +1 -1
  113. package/dist/commonjs/models/components/productupdate.js +9 -0
  114. package/dist/commonjs/models/components/productupdate.js.map +1 -1
  115. package/dist/commonjs/models/components/subscription.d.ts +10 -0
  116. package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
  117. package/dist/commonjs/models/components/subscription.js +8 -0
  118. package/dist/commonjs/models/components/subscription.js.map +1 -1
  119. package/dist/commonjs/models/components/subscriptionupdate.d.ts +3 -2
  120. package/dist/commonjs/models/components/subscriptionupdate.d.ts.map +1 -1
  121. package/dist/commonjs/models/components/subscriptionupdate.js +3 -0
  122. package/dist/commonjs/models/components/subscriptionupdate.js.map +1 -1
  123. package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts +32 -0
  124. package/dist/commonjs/models/components/subscriptionupdatetrial.d.ts.map +1 -0
  125. package/dist/commonjs/models/components/subscriptionupdatetrial.js +78 -0
  126. package/dist/commonjs/models/components/subscriptionupdatetrial.js.map +1 -0
  127. package/dist/commonjs/models/components/trialinterval.d.ts +34 -0
  128. package/dist/commonjs/models/components/trialinterval.d.ts.map +1 -0
  129. package/dist/commonjs/models/components/trialinterval.js +62 -0
  130. package/dist/commonjs/models/components/trialinterval.js.map +1 -0
  131. package/dist/esm/lib/config.d.ts +2 -2
  132. package/dist/esm/lib/config.js +2 -2
  133. package/dist/esm/mcp-server/mcp-server.js +1 -1
  134. package/dist/esm/mcp-server/server.js +1 -1
  135. package/dist/esm/models/components/address.d.ts +669 -669
  136. package/dist/esm/models/components/address.js +221 -221
  137. package/dist/esm/models/components/addressinput.d.ts +653 -653
  138. package/dist/esm/models/components/addressinput.js +217 -217
  139. package/dist/esm/models/components/checkout.d.ts +31 -5
  140. package/dist/esm/models/components/checkout.d.ts.map +1 -1
  141. package/dist/esm/models/components/checkout.js +23 -2
  142. package/dist/esm/models/components/checkout.js.map +1 -1
  143. package/dist/esm/models/components/checkoutcreate.d.ts +11 -0
  144. package/dist/esm/models/components/checkoutcreate.d.ts.map +1 -1
  145. package/dist/esm/models/components/checkoutcreate.js +9 -0
  146. package/dist/esm/models/components/checkoutcreate.js.map +1 -1
  147. package/dist/esm/models/components/checkoutlink.d.ts +14 -3
  148. package/dist/esm/models/components/checkoutlink.d.ts.map +1 -1
  149. package/dist/esm/models/components/checkoutlink.js +11 -2
  150. package/dist/esm/models/components/checkoutlink.js.map +1 -1
  151. package/dist/esm/models/components/checkoutlinkcreateproduct.d.ts +11 -0
  152. package/dist/esm/models/components/checkoutlinkcreateproduct.d.ts.map +1 -1
  153. package/dist/esm/models/components/checkoutlinkcreateproduct.js +9 -0
  154. package/dist/esm/models/components/checkoutlinkcreateproduct.js.map +1 -1
  155. package/dist/esm/models/components/checkoutlinkcreateproductprice.d.ts +11 -0
  156. package/dist/esm/models/components/checkoutlinkcreateproductprice.d.ts.map +1 -1
  157. package/dist/esm/models/components/checkoutlinkcreateproductprice.js +9 -0
  158. package/dist/esm/models/components/checkoutlinkcreateproductprice.js.map +1 -1
  159. package/dist/esm/models/components/checkoutlinkcreateproducts.d.ts +11 -0
  160. package/dist/esm/models/components/checkoutlinkcreateproducts.d.ts.map +1 -1
  161. package/dist/esm/models/components/checkoutlinkcreateproducts.js +9 -0
  162. package/dist/esm/models/components/checkoutlinkcreateproducts.js.map +1 -1
  163. package/dist/esm/models/components/checkoutlinkproduct.d.ts +14 -3
  164. package/dist/esm/models/components/checkoutlinkproduct.d.ts.map +1 -1
  165. package/dist/esm/models/components/checkoutlinkproduct.js +11 -2
  166. package/dist/esm/models/components/checkoutlinkproduct.js.map +1 -1
  167. package/dist/esm/models/components/checkoutlinkupdate.d.ts +11 -0
  168. package/dist/esm/models/components/checkoutlinkupdate.d.ts.map +1 -1
  169. package/dist/esm/models/components/checkoutlinkupdate.js +9 -0
  170. package/dist/esm/models/components/checkoutlinkupdate.js.map +1 -1
  171. package/dist/esm/models/components/checkoutproduct.d.ts +14 -3
  172. package/dist/esm/models/components/checkoutproduct.d.ts.map +1 -1
  173. package/dist/esm/models/components/checkoutproduct.js +11 -2
  174. package/dist/esm/models/components/checkoutproduct.js.map +1 -1
  175. package/dist/esm/models/components/checkoutpublic.d.ts +21 -5
  176. package/dist/esm/models/components/checkoutpublic.d.ts.map +1 -1
  177. package/dist/esm/models/components/checkoutpublic.js +15 -2
  178. package/dist/esm/models/components/checkoutpublic.js.map +1 -1
  179. package/dist/esm/models/components/checkoutpublicconfirmed.d.ts +21 -5
  180. package/dist/esm/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
  181. package/dist/esm/models/components/checkoutpublicconfirmed.js +15 -2
  182. package/dist/esm/models/components/checkoutpublicconfirmed.js.map +1 -1
  183. package/dist/esm/models/components/checkoutupdate.d.ts +11 -0
  184. package/dist/esm/models/components/checkoutupdate.d.ts.map +1 -1
  185. package/dist/esm/models/components/checkoutupdate.js +9 -0
  186. package/dist/esm/models/components/checkoutupdate.js.map +1 -1
  187. package/dist/esm/models/components/customerorderproduct.d.ts +14 -3
  188. package/dist/esm/models/components/customerorderproduct.d.ts.map +1 -1
  189. package/dist/esm/models/components/customerorderproduct.js +11 -2
  190. package/dist/esm/models/components/customerorderproduct.js.map +1 -1
  191. package/dist/esm/models/components/customerordersubscription.d.ts +10 -0
  192. package/dist/esm/models/components/customerordersubscription.d.ts.map +1 -1
  193. package/dist/esm/models/components/customerordersubscription.js +8 -0
  194. package/dist/esm/models/components/customerordersubscription.js.map +1 -1
  195. package/dist/esm/models/components/customerproduct.d.ts +14 -3
  196. package/dist/esm/models/components/customerproduct.d.ts.map +1 -1
  197. package/dist/esm/models/components/customerproduct.js +11 -2
  198. package/dist/esm/models/components/customerproduct.js.map +1 -1
  199. package/dist/esm/models/components/customerstatesubscription.d.ts +38 -2
  200. package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -1
  201. package/dist/esm/models/components/customerstatesubscription.js +29 -2
  202. package/dist/esm/models/components/customerstatesubscription.js.map +1 -1
  203. package/dist/esm/models/components/customersubscription.d.ts +10 -0
  204. package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
  205. package/dist/esm/models/components/customersubscription.js +8 -0
  206. package/dist/esm/models/components/customersubscription.js.map +1 -1
  207. package/dist/esm/models/components/customersubscriptionproduct.d.ts +14 -3
  208. package/dist/esm/models/components/customersubscriptionproduct.d.ts.map +1 -1
  209. package/dist/esm/models/components/customersubscriptionproduct.js +11 -2
  210. package/dist/esm/models/components/customersubscriptionproduct.js.map +1 -1
  211. package/dist/esm/models/components/discountproduct.d.ts +14 -3
  212. package/dist/esm/models/components/discountproduct.d.ts.map +1 -1
  213. package/dist/esm/models/components/discountproduct.js +11 -2
  214. package/dist/esm/models/components/discountproduct.js.map +1 -1
  215. package/dist/esm/models/components/orderproduct.d.ts +14 -3
  216. package/dist/esm/models/components/orderproduct.d.ts.map +1 -1
  217. package/dist/esm/models/components/orderproduct.js +11 -2
  218. package/dist/esm/models/components/orderproduct.js.map +1 -1
  219. package/dist/esm/models/components/ordersubscription.d.ts +10 -0
  220. package/dist/esm/models/components/ordersubscription.d.ts.map +1 -1
  221. package/dist/esm/models/components/ordersubscription.js +8 -0
  222. package/dist/esm/models/components/ordersubscription.js.map +1 -1
  223. package/dist/esm/models/components/product.d.ts +14 -3
  224. package/dist/esm/models/components/product.d.ts.map +1 -1
  225. package/dist/esm/models/components/product.js +11 -2
  226. package/dist/esm/models/components/product.js.map +1 -1
  227. package/dist/esm/models/components/productcreate.d.ts +4 -111
  228. package/dist/esm/models/components/productcreate.d.ts.map +1 -1
  229. package/dist/esm/models/components/productcreate.js +8 -101
  230. package/dist/esm/models/components/productcreate.js.map +1 -1
  231. package/dist/esm/models/components/productcreateonetime.d.ts +130 -0
  232. package/dist/esm/models/components/productcreateonetime.d.ts.map +1 -0
  233. package/dist/esm/models/components/productcreateonetime.js +127 -0
  234. package/dist/esm/models/components/productcreateonetime.js.map +1 -0
  235. package/dist/esm/models/components/productcreaterecurring.d.ts +139 -0
  236. package/dist/esm/models/components/productcreaterecurring.d.ts.map +1 -0
  237. package/dist/esm/models/components/productcreaterecurring.js +137 -0
  238. package/dist/esm/models/components/productcreaterecurring.js.map +1 -0
  239. package/dist/esm/models/components/productupdate.d.ts +11 -0
  240. package/dist/esm/models/components/productupdate.d.ts.map +1 -1
  241. package/dist/esm/models/components/productupdate.js +9 -0
  242. package/dist/esm/models/components/productupdate.js.map +1 -1
  243. package/dist/esm/models/components/subscription.d.ts +10 -0
  244. package/dist/esm/models/components/subscription.d.ts.map +1 -1
  245. package/dist/esm/models/components/subscription.js +8 -0
  246. package/dist/esm/models/components/subscription.js.map +1 -1
  247. package/dist/esm/models/components/subscriptionupdate.d.ts +3 -2
  248. package/dist/esm/models/components/subscriptionupdate.d.ts.map +1 -1
  249. package/dist/esm/models/components/subscriptionupdate.js +3 -0
  250. package/dist/esm/models/components/subscriptionupdate.js.map +1 -1
  251. package/dist/esm/models/components/subscriptionupdatetrial.d.ts +32 -0
  252. package/dist/esm/models/components/subscriptionupdatetrial.d.ts.map +1 -0
  253. package/dist/esm/models/components/subscriptionupdatetrial.js +40 -0
  254. package/dist/esm/models/components/subscriptionupdatetrial.js.map +1 -0
  255. package/dist/esm/models/components/trialinterval.d.ts +34 -0
  256. package/dist/esm/models/components/trialinterval.d.ts.map +1 -0
  257. package/dist/esm/models/components/trialinterval.js +26 -0
  258. package/dist/esm/models/components/trialinterval.js.map +1 -0
  259. package/docs/sdks/products/README.md +2 -2
  260. package/examples/package-lock.json +1 -1
  261. package/jsr.json +1 -1
  262. package/package.json +1 -1
  263. package/src/lib/config.ts +2 -2
  264. package/src/mcp-server/mcp-server.ts +1 -1
  265. package/src/mcp-server/server.ts +1 -1
  266. package/src/models/components/address.ts +221 -221
  267. package/src/models/components/addressinput.ts +217 -217
  268. package/src/models/components/checkout.ts +59 -7
  269. package/src/models/components/checkoutcreate.ts +23 -0
  270. package/src/models/components/checkoutlink.ts +28 -5
  271. package/src/models/components/checkoutlinkcreateproduct.ts +23 -0
  272. package/src/models/components/checkoutlinkcreateproductprice.ts +23 -0
  273. package/src/models/components/checkoutlinkcreateproducts.ts +23 -0
  274. package/src/models/components/checkoutlinkproduct.ts +28 -5
  275. package/src/models/components/checkoutlinkupdate.ts +23 -0
  276. package/src/models/components/checkoutproduct.ts +28 -5
  277. package/src/models/components/checkoutpublic.ts +41 -7
  278. package/src/models/components/checkoutpublicconfirmed.ts +41 -7
  279. package/src/models/components/checkoutupdate.ts +23 -0
  280. package/src/models/components/customerorderproduct.ts +28 -5
  281. package/src/models/components/customerordersubscription.ts +22 -0
  282. package/src/models/components/customerproduct.ts +28 -5
  283. package/src/models/components/customerstatesubscription.ts +56 -4
  284. package/src/models/components/customersubscription.ts +22 -0
  285. package/src/models/components/customersubscriptionproduct.ts +28 -5
  286. package/src/models/components/discountproduct.ts +28 -5
  287. package/src/models/components/orderproduct.ts +28 -5
  288. package/src/models/components/ordersubscription.ts +22 -0
  289. package/src/models/components/product.ts +28 -5
  290. package/src/models/components/productcreate.ts +22 -275
  291. package/src/models/components/productcreateonetime.ts +329 -0
  292. package/src/models/components/productcreaterecurring.ts +356 -0
  293. package/src/models/components/productupdate.ts +23 -0
  294. package/src/models/components/subscription.ts +22 -0
  295. package/src/models/components/subscriptionupdate.ts +10 -0
  296. package/src/models/components/subscriptionupdatetrial.ts +78 -0
  297. package/src/models/components/trialinterval.ts +35 -0
@@ -13,6 +13,11 @@ import {
13
13
  AddressInput$Outbound,
14
14
  AddressInput$outboundSchema,
15
15
  } from "./addressinput.js";
16
+ import {
17
+ TrialInterval,
18
+ TrialInterval$inboundSchema,
19
+ TrialInterval$outboundSchema,
20
+ } from "./trialinterval.js";
16
21
 
17
22
  export type CheckoutCreateMetadata = string | number | number | boolean;
18
23
 
@@ -30,6 +35,14 @@ export type CheckoutCreateCustomerMetadata = string | number | number | boolean;
30
35
  * to the resulting order and/or subscription.
31
36
  */
32
37
  export type CheckoutCreate = {
38
+ /**
39
+ * The interval unit for the trial period.
40
+ */
41
+ trialInterval?: TrialInterval | null | undefined;
42
+ /**
43
+ * The number of interval units for the trial period.
44
+ */
45
+ trialIntervalCount?: number | null | undefined;
33
46
  /**
34
47
  * Key-value object allowing you to store additional information.
35
48
  *
@@ -295,6 +308,8 @@ export const CheckoutCreate$inboundSchema: z.ZodType<
295
308
  z.ZodTypeDef,
296
309
  unknown
297
310
  > = z.object({
311
+ trial_interval: z.nullable(TrialInterval$inboundSchema).optional(),
312
+ trial_interval_count: z.nullable(z.number().int()).optional(),
298
313
  metadata: z.record(
299
314
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
300
315
  ).optional(),
@@ -330,6 +345,8 @@ export const CheckoutCreate$inboundSchema: z.ZodType<
330
345
  products: z.array(z.string()),
331
346
  }).transform((v) => {
332
347
  return remap$(v, {
348
+ "trial_interval": "trialInterval",
349
+ "trial_interval_count": "trialIntervalCount",
333
350
  "custom_field_data": "customFieldData",
334
351
  "discount_id": "discountId",
335
352
  "allow_discount_codes": "allowDiscountCodes",
@@ -352,6 +369,8 @@ export const CheckoutCreate$inboundSchema: z.ZodType<
352
369
 
353
370
  /** @internal */
354
371
  export type CheckoutCreate$Outbound = {
372
+ trial_interval?: string | null | undefined;
373
+ trial_interval_count?: number | null | undefined;
355
374
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
356
375
  custom_field_data?:
357
376
  | { [k: string]: string | number | boolean | string | null }
@@ -384,6 +403,8 @@ export const CheckoutCreate$outboundSchema: z.ZodType<
384
403
  z.ZodTypeDef,
385
404
  CheckoutCreate
386
405
  > = z.object({
406
+ trialInterval: z.nullable(TrialInterval$outboundSchema).optional(),
407
+ trialIntervalCount: z.nullable(z.number().int()).optional(),
387
408
  metadata: z.record(
388
409
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
389
410
  ).optional(),
@@ -419,6 +440,8 @@ export const CheckoutCreate$outboundSchema: z.ZodType<
419
440
  products: z.array(z.string()),
420
441
  }).transform((v) => {
421
442
  return remap$(v, {
443
+ trialInterval: "trial_interval",
444
+ trialIntervalCount: "trial_interval_count",
422
445
  customFieldData: "custom_field_data",
423
446
  discountId: "discount_id",
424
447
  allowDiscountCodes: "allow_discount_codes",
@@ -42,6 +42,11 @@ import {
42
42
  PaymentProcessor$inboundSchema,
43
43
  PaymentProcessor$outboundSchema,
44
44
  } from "./paymentprocessor.js";
45
+ import {
46
+ TrialInterval,
47
+ TrialInterval$inboundSchema,
48
+ TrialInterval$outboundSchema,
49
+ } from "./trialinterval.js";
45
50
 
46
51
  export type CheckoutLinkMetadata = string | number | number | boolean;
47
52
 
@@ -55,6 +60,10 @@ export type CheckoutLinkDiscount =
55
60
  * Checkout link data.
56
61
  */
57
62
  export type CheckoutLink = {
63
+ /**
64
+ * The ID of the object.
65
+ */
66
+ id: string;
58
67
  /**
59
68
  * Creation timestamp of the object.
60
69
  */
@@ -64,9 +73,13 @@ export type CheckoutLink = {
64
73
  */
65
74
  modifiedAt: Date | null;
66
75
  /**
67
- * The ID of the object.
76
+ * The interval unit for the trial period.
68
77
  */
69
- id: string;
78
+ trialInterval: TrialInterval | null;
79
+ /**
80
+ * The number of interval units for the trial period.
81
+ */
82
+ trialIntervalCount: number | null;
70
83
  metadata: { [k: string]: string | number | number | boolean };
71
84
  paymentProcessor: PaymentProcessor;
72
85
  /**
@@ -223,11 +236,13 @@ export const CheckoutLink$inboundSchema: z.ZodType<
223
236
  z.ZodTypeDef,
224
237
  unknown
225
238
  > = z.object({
239
+ id: z.string(),
226
240
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
227
241
  modified_at: z.nullable(
228
242
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
229
243
  ),
230
- id: z.string(),
244
+ trial_interval: z.nullable(TrialInterval$inboundSchema),
245
+ trial_interval_count: z.nullable(z.number().int()),
231
246
  metadata: z.record(
232
247
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
233
248
  ),
@@ -253,6 +268,8 @@ export const CheckoutLink$inboundSchema: z.ZodType<
253
268
  return remap$(v, {
254
269
  "created_at": "createdAt",
255
270
  "modified_at": "modifiedAt",
271
+ "trial_interval": "trialInterval",
272
+ "trial_interval_count": "trialIntervalCount",
256
273
  "payment_processor": "paymentProcessor",
257
274
  "client_secret": "clientSecret",
258
275
  "success_url": "successUrl",
@@ -265,9 +282,11 @@ export const CheckoutLink$inboundSchema: z.ZodType<
265
282
 
266
283
  /** @internal */
267
284
  export type CheckoutLink$Outbound = {
285
+ id: string;
268
286
  created_at: string;
269
287
  modified_at: string | null;
270
- id: string;
288
+ trial_interval: string | null;
289
+ trial_interval_count: number | null;
271
290
  metadata: { [k: string]: string | number | number | boolean };
272
291
  payment_processor: string;
273
292
  client_secret: string;
@@ -293,9 +312,11 @@ export const CheckoutLink$outboundSchema: z.ZodType<
293
312
  z.ZodTypeDef,
294
313
  CheckoutLink
295
314
  > = z.object({
315
+ id: z.string(),
296
316
  createdAt: z.date().transform(v => v.toISOString()),
297
317
  modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
298
- id: z.string(),
318
+ trialInterval: z.nullable(TrialInterval$outboundSchema),
319
+ trialIntervalCount: z.nullable(z.number().int()),
299
320
  metadata: z.record(
300
321
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
301
322
  ),
@@ -321,6 +342,8 @@ export const CheckoutLink$outboundSchema: z.ZodType<
321
342
  return remap$(v, {
322
343
  createdAt: "created_at",
323
344
  modifiedAt: "modified_at",
345
+ trialInterval: "trial_interval",
346
+ trialIntervalCount: "trial_interval_count",
324
347
  paymentProcessor: "payment_processor",
325
348
  clientSecret: "client_secret",
326
349
  successUrl: "success_url",
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ TrialInterval,
12
+ TrialInterval$inboundSchema,
13
+ TrialInterval$outboundSchema,
14
+ } from "./trialinterval.js";
10
15
 
11
16
  export type CheckoutLinkCreateProductMetadata =
12
17
  | string
@@ -38,6 +43,14 @@ export type CheckoutLinkCreateProduct = {
38
43
  * You can store up to **50 key-value pairs**.
39
44
  */
40
45
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
46
+ /**
47
+ * The interval unit for the trial period.
48
+ */
49
+ trialInterval?: TrialInterval | null | undefined;
50
+ /**
51
+ * The number of interval units for the trial period.
52
+ */
53
+ trialIntervalCount?: number | null | undefined;
41
54
  /**
42
55
  * Payment processor to use. Currently only Stripe is supported.
43
56
  */
@@ -129,6 +142,8 @@ export const CheckoutLinkCreateProduct$inboundSchema: z.ZodType<
129
142
  metadata: z.record(
130
143
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
131
144
  ).optional(),
145
+ trial_interval: z.nullable(TrialInterval$inboundSchema).optional(),
146
+ trial_interval_count: z.nullable(z.number().int()).optional(),
132
147
  payment_processor: z.literal("stripe"),
133
148
  label: z.nullable(z.string()).optional(),
134
149
  allow_discount_codes: z.boolean().default(true),
@@ -138,6 +153,8 @@ export const CheckoutLinkCreateProduct$inboundSchema: z.ZodType<
138
153
  product_id: z.string(),
139
154
  }).transform((v) => {
140
155
  return remap$(v, {
156
+ "trial_interval": "trialInterval",
157
+ "trial_interval_count": "trialIntervalCount",
141
158
  "payment_processor": "paymentProcessor",
142
159
  "allow_discount_codes": "allowDiscountCodes",
143
160
  "require_billing_address": "requireBillingAddress",
@@ -150,6 +167,8 @@ export const CheckoutLinkCreateProduct$inboundSchema: z.ZodType<
150
167
  /** @internal */
151
168
  export type CheckoutLinkCreateProduct$Outbound = {
152
169
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
170
+ trial_interval?: string | null | undefined;
171
+ trial_interval_count?: number | null | undefined;
153
172
  payment_processor: "stripe";
154
173
  label?: string | null | undefined;
155
174
  allow_discount_codes: boolean;
@@ -168,6 +187,8 @@ export const CheckoutLinkCreateProduct$outboundSchema: z.ZodType<
168
187
  metadata: z.record(
169
188
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
170
189
  ).optional(),
190
+ trialInterval: z.nullable(TrialInterval$outboundSchema).optional(),
191
+ trialIntervalCount: z.nullable(z.number().int()).optional(),
171
192
  paymentProcessor: z.literal("stripe"),
172
193
  label: z.nullable(z.string()).optional(),
173
194
  allowDiscountCodes: z.boolean().default(true),
@@ -177,6 +198,8 @@ export const CheckoutLinkCreateProduct$outboundSchema: z.ZodType<
177
198
  productId: z.string(),
178
199
  }).transform((v) => {
179
200
  return remap$(v, {
201
+ trialInterval: "trial_interval",
202
+ trialIntervalCount: "trial_interval_count",
180
203
  paymentProcessor: "payment_processor",
181
204
  allowDiscountCodes: "allow_discount_codes",
182
205
  requireBillingAddress: "require_billing_address",
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ TrialInterval,
12
+ TrialInterval$inboundSchema,
13
+ TrialInterval$outboundSchema,
14
+ } from "./trialinterval.js";
10
15
 
11
16
  export type CheckoutLinkCreateProductPriceMetadata =
12
17
  | string
@@ -38,6 +43,14 @@ export type CheckoutLinkCreateProductPrice = {
38
43
  * You can store up to **50 key-value pairs**.
39
44
  */
40
45
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
46
+ /**
47
+ * The interval unit for the trial period.
48
+ */
49
+ trialInterval?: TrialInterval | null | undefined;
50
+ /**
51
+ * The number of interval units for the trial period.
52
+ */
53
+ trialIntervalCount?: number | null | undefined;
41
54
  /**
42
55
  * Payment processor to use. Currently only Stripe is supported.
43
56
  */
@@ -132,6 +145,8 @@ export const CheckoutLinkCreateProductPrice$inboundSchema: z.ZodType<
132
145
  metadata: z.record(
133
146
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
134
147
  ).optional(),
148
+ trial_interval: z.nullable(TrialInterval$inboundSchema).optional(),
149
+ trial_interval_count: z.nullable(z.number().int()).optional(),
135
150
  payment_processor: z.literal("stripe"),
136
151
  label: z.nullable(z.string()).optional(),
137
152
  allow_discount_codes: z.boolean().default(true),
@@ -141,6 +156,8 @@ export const CheckoutLinkCreateProductPrice$inboundSchema: z.ZodType<
141
156
  product_price_id: z.string(),
142
157
  }).transform((v) => {
143
158
  return remap$(v, {
159
+ "trial_interval": "trialInterval",
160
+ "trial_interval_count": "trialIntervalCount",
144
161
  "payment_processor": "paymentProcessor",
145
162
  "allow_discount_codes": "allowDiscountCodes",
146
163
  "require_billing_address": "requireBillingAddress",
@@ -153,6 +170,8 @@ export const CheckoutLinkCreateProductPrice$inboundSchema: z.ZodType<
153
170
  /** @internal */
154
171
  export type CheckoutLinkCreateProductPrice$Outbound = {
155
172
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
173
+ trial_interval?: string | null | undefined;
174
+ trial_interval_count?: number | null | undefined;
156
175
  payment_processor: "stripe";
157
176
  label?: string | null | undefined;
158
177
  allow_discount_codes: boolean;
@@ -171,6 +190,8 @@ export const CheckoutLinkCreateProductPrice$outboundSchema: z.ZodType<
171
190
  metadata: z.record(
172
191
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
173
192
  ).optional(),
193
+ trialInterval: z.nullable(TrialInterval$outboundSchema).optional(),
194
+ trialIntervalCount: z.nullable(z.number().int()).optional(),
174
195
  paymentProcessor: z.literal("stripe"),
175
196
  label: z.nullable(z.string()).optional(),
176
197
  allowDiscountCodes: z.boolean().default(true),
@@ -180,6 +201,8 @@ export const CheckoutLinkCreateProductPrice$outboundSchema: z.ZodType<
180
201
  productPriceId: z.string(),
181
202
  }).transform((v) => {
182
203
  return remap$(v, {
204
+ trialInterval: "trial_interval",
205
+ trialIntervalCount: "trial_interval_count",
183
206
  paymentProcessor: "payment_processor",
184
207
  allowDiscountCodes: "allow_discount_codes",
185
208
  requireBillingAddress: "require_billing_address",
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ TrialInterval,
12
+ TrialInterval$inboundSchema,
13
+ TrialInterval$outboundSchema,
14
+ } from "./trialinterval.js";
10
15
 
11
16
  export type CheckoutLinkCreateProductsMetadata =
12
17
  | string
@@ -34,6 +39,14 @@ export type CheckoutLinkCreateProducts = {
34
39
  * You can store up to **50 key-value pairs**.
35
40
  */
36
41
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
42
+ /**
43
+ * The interval unit for the trial period.
44
+ */
45
+ trialInterval?: TrialInterval | null | undefined;
46
+ /**
47
+ * The number of interval units for the trial period.
48
+ */
49
+ trialIntervalCount?: number | null | undefined;
37
50
  /**
38
51
  * Payment processor to use. Currently only Stripe is supported.
39
52
  */
@@ -129,6 +142,8 @@ export const CheckoutLinkCreateProducts$inboundSchema: z.ZodType<
129
142
  metadata: z.record(
130
143
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
131
144
  ).optional(),
145
+ trial_interval: z.nullable(TrialInterval$inboundSchema).optional(),
146
+ trial_interval_count: z.nullable(z.number().int()).optional(),
132
147
  payment_processor: z.literal("stripe"),
133
148
  label: z.nullable(z.string()).optional(),
134
149
  allow_discount_codes: z.boolean().default(true),
@@ -138,6 +153,8 @@ export const CheckoutLinkCreateProducts$inboundSchema: z.ZodType<
138
153
  products: z.array(z.string()),
139
154
  }).transform((v) => {
140
155
  return remap$(v, {
156
+ "trial_interval": "trialInterval",
157
+ "trial_interval_count": "trialIntervalCount",
141
158
  "payment_processor": "paymentProcessor",
142
159
  "allow_discount_codes": "allowDiscountCodes",
143
160
  "require_billing_address": "requireBillingAddress",
@@ -149,6 +166,8 @@ export const CheckoutLinkCreateProducts$inboundSchema: z.ZodType<
149
166
  /** @internal */
150
167
  export type CheckoutLinkCreateProducts$Outbound = {
151
168
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
169
+ trial_interval?: string | null | undefined;
170
+ trial_interval_count?: number | null | undefined;
152
171
  payment_processor: "stripe";
153
172
  label?: string | null | undefined;
154
173
  allow_discount_codes: boolean;
@@ -167,6 +186,8 @@ export const CheckoutLinkCreateProducts$outboundSchema: z.ZodType<
167
186
  metadata: z.record(
168
187
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
169
188
  ).optional(),
189
+ trialInterval: z.nullable(TrialInterval$outboundSchema).optional(),
190
+ trialIntervalCount: z.nullable(z.number().int()).optional(),
170
191
  paymentProcessor: z.literal("stripe"),
171
192
  label: z.nullable(z.string()).optional(),
172
193
  allowDiscountCodes: z.boolean().default(true),
@@ -176,6 +197,8 @@ export const CheckoutLinkCreateProducts$outboundSchema: z.ZodType<
176
197
  products: z.array(z.string()),
177
198
  }).transform((v) => {
178
199
  return remap$(v, {
200
+ trialInterval: "trial_interval",
201
+ trialIntervalCount: "trial_interval_count",
179
202
  paymentProcessor: "payment_processor",
180
203
  allowDiscountCodes: "allow_discount_codes",
181
204
  requireBillingAddress: "require_billing_address",
@@ -36,6 +36,11 @@ import {
36
36
  SubscriptionRecurringInterval$inboundSchema,
37
37
  SubscriptionRecurringInterval$outboundSchema,
38
38
  } from "./subscriptionrecurringinterval.js";
39
+ import {
40
+ TrialInterval,
41
+ TrialInterval$inboundSchema,
42
+ TrialInterval$outboundSchema,
43
+ } from "./trialinterval.js";
39
44
 
40
45
  export type CheckoutLinkProductMetadata = string | number | number | boolean;
41
46
 
@@ -48,6 +53,10 @@ export type CheckoutLinkProductPrices =
48
53
  */
49
54
  export type CheckoutLinkProduct = {
50
55
  metadata: { [k: string]: string | number | number | boolean };
56
+ /**
57
+ * The ID of the object.
58
+ */
59
+ id: string;
51
60
  /**
52
61
  * Creation timestamp of the object.
53
62
  */
@@ -57,9 +66,13 @@ export type CheckoutLinkProduct = {
57
66
  */
58
67
  modifiedAt: Date | null;
59
68
  /**
60
- * The ID of the product.
69
+ * The interval unit for the trial period.
61
70
  */
62
- id: string;
71
+ trialInterval: TrialInterval | null;
72
+ /**
73
+ * The number of interval units for the trial period.
74
+ */
75
+ trialIntervalCount: number | null;
63
76
  /**
64
77
  * The name of the product.
65
78
  */
@@ -217,11 +230,13 @@ export const CheckoutLinkProduct$inboundSchema: z.ZodType<
217
230
  metadata: z.record(
218
231
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
219
232
  ),
233
+ id: z.string(),
220
234
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
221
235
  modified_at: z.nullable(
222
236
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
223
237
  ),
224
- id: z.string(),
238
+ trial_interval: z.nullable(TrialInterval$inboundSchema),
239
+ trial_interval_count: z.nullable(z.number().int()),
225
240
  name: z.string(),
226
241
  description: z.nullable(z.string()),
227
242
  recurring_interval: z.nullable(SubscriptionRecurringInterval$inboundSchema),
@@ -240,6 +255,8 @@ export const CheckoutLinkProduct$inboundSchema: z.ZodType<
240
255
  return remap$(v, {
241
256
  "created_at": "createdAt",
242
257
  "modified_at": "modifiedAt",
258
+ "trial_interval": "trialInterval",
259
+ "trial_interval_count": "trialIntervalCount",
243
260
  "recurring_interval": "recurringInterval",
244
261
  "is_recurring": "isRecurring",
245
262
  "is_archived": "isArchived",
@@ -250,9 +267,11 @@ export const CheckoutLinkProduct$inboundSchema: z.ZodType<
250
267
  /** @internal */
251
268
  export type CheckoutLinkProduct$Outbound = {
252
269
  metadata: { [k: string]: string | number | number | boolean };
270
+ id: string;
253
271
  created_at: string;
254
272
  modified_at: string | null;
255
- id: string;
273
+ trial_interval: string | null;
274
+ trial_interval_count: number | null;
256
275
  name: string;
257
276
  description: string | null;
258
277
  recurring_interval: string | null;
@@ -273,9 +292,11 @@ export const CheckoutLinkProduct$outboundSchema: z.ZodType<
273
292
  metadata: z.record(
274
293
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
275
294
  ),
295
+ id: z.string(),
276
296
  createdAt: z.date().transform(v => v.toISOString()),
277
297
  modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
278
- id: z.string(),
298
+ trialInterval: z.nullable(TrialInterval$outboundSchema),
299
+ trialIntervalCount: z.nullable(z.number().int()),
279
300
  name: z.string(),
280
301
  description: z.nullable(z.string()),
281
302
  recurringInterval: z.nullable(SubscriptionRecurringInterval$outboundSchema),
@@ -294,6 +315,8 @@ export const CheckoutLinkProduct$outboundSchema: z.ZodType<
294
315
  return remap$(v, {
295
316
  createdAt: "created_at",
296
317
  modifiedAt: "modified_at",
318
+ trialInterval: "trial_interval",
319
+ trialIntervalCount: "trial_interval_count",
297
320
  recurringInterval: "recurring_interval",
298
321
  isRecurring: "is_recurring",
299
322
  isArchived: "is_archived",
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ TrialInterval,
12
+ TrialInterval$inboundSchema,
13
+ TrialInterval$outboundSchema,
14
+ } from "./trialinterval.js";
10
15
 
11
16
  export type CheckoutLinkUpdateMetadata = string | number | number | boolean;
12
17
 
@@ -14,6 +19,14 @@ export type CheckoutLinkUpdateMetadata = string | number | number | boolean;
14
19
  * Schema to update an existing checkout link.
15
20
  */
16
21
  export type CheckoutLinkUpdate = {
22
+ /**
23
+ * The interval unit for the trial period.
24
+ */
25
+ trialInterval?: TrialInterval | null | undefined;
26
+ /**
27
+ * The number of interval units for the trial period.
28
+ */
29
+ trialIntervalCount?: number | null | undefined;
17
30
  /**
18
31
  * Key-value object allowing you to store additional information.
19
32
  *
@@ -111,6 +124,8 @@ export const CheckoutLinkUpdate$inboundSchema: z.ZodType<
111
124
  z.ZodTypeDef,
112
125
  unknown
113
126
  > = z.object({
127
+ trial_interval: z.nullable(TrialInterval$inboundSchema).optional(),
128
+ trial_interval_count: z.nullable(z.number().int()).optional(),
114
129
  metadata: z.record(
115
130
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
116
131
  ).optional(),
@@ -122,6 +137,8 @@ export const CheckoutLinkUpdate$inboundSchema: z.ZodType<
122
137
  success_url: z.nullable(z.string()).optional(),
123
138
  }).transform((v) => {
124
139
  return remap$(v, {
140
+ "trial_interval": "trialInterval",
141
+ "trial_interval_count": "trialIntervalCount",
125
142
  "allow_discount_codes": "allowDiscountCodes",
126
143
  "require_billing_address": "requireBillingAddress",
127
144
  "discount_id": "discountId",
@@ -131,6 +148,8 @@ export const CheckoutLinkUpdate$inboundSchema: z.ZodType<
131
148
 
132
149
  /** @internal */
133
150
  export type CheckoutLinkUpdate$Outbound = {
151
+ trial_interval?: string | null | undefined;
152
+ trial_interval_count?: number | null | undefined;
134
153
  metadata?: { [k: string]: string | number | number | boolean } | undefined;
135
154
  products?: Array<string> | null | undefined;
136
155
  label?: string | null | undefined;
@@ -146,6 +165,8 @@ export const CheckoutLinkUpdate$outboundSchema: z.ZodType<
146
165
  z.ZodTypeDef,
147
166
  CheckoutLinkUpdate
148
167
  > = z.object({
168
+ trialInterval: z.nullable(TrialInterval$outboundSchema).optional(),
169
+ trialIntervalCount: z.nullable(z.number().int()).optional(),
149
170
  metadata: z.record(
150
171
  z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
151
172
  ).optional(),
@@ -157,6 +178,8 @@ export const CheckoutLinkUpdate$outboundSchema: z.ZodType<
157
178
  successUrl: z.nullable(z.string()).optional(),
158
179
  }).transform((v) => {
159
180
  return remap$(v, {
181
+ trialInterval: "trial_interval",
182
+ trialIntervalCount: "trial_interval_count",
160
183
  allowDiscountCodes: "allow_discount_codes",
161
184
  requireBillingAddress: "require_billing_address",
162
185
  discountId: "discount_id",
@@ -36,6 +36,11 @@ import {
36
36
  SubscriptionRecurringInterval$inboundSchema,
37
37
  SubscriptionRecurringInterval$outboundSchema,
38
38
  } from "./subscriptionrecurringinterval.js";
39
+ import {
40
+ TrialInterval,
41
+ TrialInterval$inboundSchema,
42
+ TrialInterval$outboundSchema,
43
+ } from "./trialinterval.js";
39
44
 
40
45
  export type CheckoutProductPrices = LegacyRecurringProductPrice | ProductPrice;
41
46
 
@@ -43,6 +48,10 @@ export type CheckoutProductPrices = LegacyRecurringProductPrice | ProductPrice;
43
48
  * Product data for a checkout session.
44
49
  */
45
50
  export type CheckoutProduct = {
51
+ /**
52
+ * The ID of the object.
53
+ */
54
+ id: string;
46
55
  /**
47
56
  * Creation timestamp of the object.
48
57
  */
@@ -52,9 +61,13 @@ export type CheckoutProduct = {
52
61
  */
53
62
  modifiedAt: Date | null;
54
63
  /**
55
- * The ID of the product.
64
+ * The interval unit for the trial period.
56
65
  */
57
- id: string;
66
+ trialInterval: TrialInterval | null;
67
+ /**
68
+ * The number of interval units for the trial period.
69
+ */
70
+ trialIntervalCount: number | null;
58
71
  /**
59
72
  * The name of the product.
60
73
  */
@@ -155,11 +168,13 @@ export const CheckoutProduct$inboundSchema: z.ZodType<
155
168
  z.ZodTypeDef,
156
169
  unknown
157
170
  > = z.object({
171
+ id: z.string(),
158
172
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
159
173
  modified_at: z.nullable(
160
174
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
161
175
  ),
162
- id: z.string(),
176
+ trial_interval: z.nullable(TrialInterval$inboundSchema),
177
+ trial_interval_count: z.nullable(z.number().int()),
163
178
  name: z.string(),
164
179
  description: z.nullable(z.string()),
165
180
  recurring_interval: z.nullable(SubscriptionRecurringInterval$inboundSchema),
@@ -178,6 +193,8 @@ export const CheckoutProduct$inboundSchema: z.ZodType<
178
193
  return remap$(v, {
179
194
  "created_at": "createdAt",
180
195
  "modified_at": "modifiedAt",
196
+ "trial_interval": "trialInterval",
197
+ "trial_interval_count": "trialIntervalCount",
181
198
  "recurring_interval": "recurringInterval",
182
199
  "is_recurring": "isRecurring",
183
200
  "is_archived": "isArchived",
@@ -187,9 +204,11 @@ export const CheckoutProduct$inboundSchema: z.ZodType<
187
204
 
188
205
  /** @internal */
189
206
  export type CheckoutProduct$Outbound = {
207
+ id: string;
190
208
  created_at: string;
191
209
  modified_at: string | null;
192
- id: string;
210
+ trial_interval: string | null;
211
+ trial_interval_count: number | null;
193
212
  name: string;
194
213
  description: string | null;
195
214
  recurring_interval: string | null;
@@ -207,9 +226,11 @@ export const CheckoutProduct$outboundSchema: z.ZodType<
207
226
  z.ZodTypeDef,
208
227
  CheckoutProduct
209
228
  > = z.object({
229
+ id: z.string(),
210
230
  createdAt: z.date().transform(v => v.toISOString()),
211
231
  modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
212
- id: z.string(),
232
+ trialInterval: z.nullable(TrialInterval$outboundSchema),
233
+ trialIntervalCount: z.nullable(z.number().int()),
213
234
  name: z.string(),
214
235
  description: z.nullable(z.string()),
215
236
  recurringInterval: z.nullable(SubscriptionRecurringInterval$outboundSchema),
@@ -228,6 +249,8 @@ export const CheckoutProduct$outboundSchema: z.ZodType<
228
249
  return remap$(v, {
229
250
  createdAt: "created_at",
230
251
  modifiedAt: "modified_at",
252
+ trialInterval: "trial_interval",
253
+ trialIntervalCount: "trial_interval_count",
231
254
  recurringInterval: "recurring_interval",
232
255
  isRecurring: "is_recurring",
233
256
  isArchived: "is_archived",