@crevio/sdk 0.4.11 → 0.4.13

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 (473) hide show
  1. package/README.md +9 -13
  2. package/dist/commonjs/funcs/{cartsUpdate.d.ts → customersDelete.d.ts} +4 -4
  3. package/dist/commonjs/funcs/customersDelete.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/{cartsDelete.js → customersDelete.js} +10 -10
  5. package/dist/commonjs/funcs/customersDelete.js.map +1 -0
  6. package/dist/commonjs/funcs/filesCreate.d.ts +1 -2
  7. package/dist/commonjs/funcs/filesCreate.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/filesCreate.js +1 -2
  9. package/dist/commonjs/funcs/filesCreate.js.map +1 -1
  10. package/dist/{esm/funcs/cartsDelete.d.ts → commonjs/funcs/legalPagesGet.d.ts} +4 -4
  11. package/dist/commonjs/funcs/legalPagesGet.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/{cartsGet.js → legalPagesGet.js} +10 -10
  13. package/dist/commonjs/funcs/legalPagesGet.js.map +1 -0
  14. package/dist/commonjs/funcs/{invoicesPay.d.ts → legalPagesList.d.ts} +4 -4
  15. package/dist/commonjs/funcs/legalPagesList.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/{invoicesPay.js → legalPagesList.js} +18 -17
  17. package/dist/commonjs/funcs/legalPagesList.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +2 -2
  19. package/dist/commonjs/lib/config.js +2 -2
  20. package/dist/commonjs/models/blogpost.d.ts +1 -0
  21. package/dist/commonjs/models/blogpost.d.ts.map +1 -1
  22. package/dist/commonjs/models/blogpost.js +2 -0
  23. package/dist/commonjs/models/blogpost.js.map +1 -1
  24. package/dist/commonjs/models/checkout.d.ts +12 -0
  25. package/dist/commonjs/models/checkout.d.ts.map +1 -1
  26. package/dist/commonjs/models/checkout.js +10 -1
  27. package/dist/commonjs/models/checkout.js.map +1 -1
  28. package/dist/commonjs/models/checkoutcreaterequest.d.ts +2 -12
  29. package/dist/commonjs/models/checkoutcreaterequest.d.ts.map +1 -1
  30. package/dist/commonjs/models/checkoutcreaterequest.js +2 -10
  31. package/dist/commonjs/models/checkoutcreaterequest.js.map +1 -1
  32. package/dist/commonjs/models/checkoutlink.d.ts +5 -0
  33. package/dist/commonjs/models/checkoutlink.d.ts.map +1 -1
  34. package/dist/commonjs/models/checkoutlink.js +8 -1
  35. package/dist/commonjs/models/checkoutlink.js.map +1 -1
  36. package/dist/commonjs/models/checkoutlinkrequest.d.ts +8 -18
  37. package/dist/commonjs/models/checkoutlinkrequest.d.ts.map +1 -1
  38. package/dist/commonjs/models/checkoutlinkrequest.js +8 -19
  39. package/dist/commonjs/models/checkoutlinkrequest.js.map +1 -1
  40. package/dist/commonjs/models/checkoutupdaterequest.d.ts +2 -12
  41. package/dist/commonjs/models/checkoutupdaterequest.d.ts.map +1 -1
  42. package/dist/commonjs/models/checkoutupdaterequest.js +2 -10
  43. package/dist/commonjs/models/checkoutupdaterequest.js.map +1 -1
  44. package/dist/commonjs/models/customer.d.ts +1 -0
  45. package/dist/commonjs/models/customer.d.ts.map +1 -1
  46. package/dist/commonjs/models/customer.js +1 -0
  47. package/dist/commonjs/models/customer.js.map +1 -1
  48. package/dist/commonjs/models/customerrequest.d.ts +4 -12
  49. package/dist/commonjs/models/customerrequest.d.ts.map +1 -1
  50. package/dist/commonjs/models/customerrequest.js +4 -10
  51. package/dist/commonjs/models/customerrequest.js.map +1 -1
  52. package/dist/commonjs/models/discountrequest.d.ts +2 -12
  53. package/dist/commonjs/models/discountrequest.d.ts.map +1 -1
  54. package/dist/commonjs/models/discountrequest.js +2 -10
  55. package/dist/commonjs/models/discountrequest.js.map +1 -1
  56. package/dist/commonjs/models/file.d.ts +25 -5
  57. package/dist/commonjs/models/file.d.ts.map +1 -1
  58. package/dist/commonjs/models/file.js +36 -6
  59. package/dist/commonjs/models/file.js.map +1 -1
  60. package/dist/commonjs/models/filecreateresponse.d.ts +25 -5
  61. package/dist/commonjs/models/filecreateresponse.d.ts.map +1 -1
  62. package/dist/commonjs/models/filecreateresponse.js +36 -6
  63. package/dist/commonjs/models/filecreateresponse.js.map +1 -1
  64. package/dist/commonjs/models/filerequest.d.ts +30 -0
  65. package/dist/commonjs/models/filerequest.d.ts.map +1 -0
  66. package/dist/commonjs/models/{cartitem.js → filerequest.js} +16 -12
  67. package/dist/commonjs/models/filerequest.js.map +1 -0
  68. package/dist/commonjs/models/index.d.ts +3 -4
  69. package/dist/commonjs/models/index.d.ts.map +1 -1
  70. package/dist/commonjs/models/index.js +3 -4
  71. package/dist/commonjs/models/index.js.map +1 -1
  72. package/dist/commonjs/models/invoicerequest.d.ts +2 -12
  73. package/dist/commonjs/models/invoicerequest.d.ts.map +1 -1
  74. package/dist/commonjs/models/invoicerequest.js +2 -10
  75. package/dist/commonjs/models/invoicerequest.js.map +1 -1
  76. package/dist/commonjs/models/legalpage.d.ts +26 -0
  77. package/dist/commonjs/models/legalpage.d.ts.map +1 -0
  78. package/dist/commonjs/models/legalpage.js +72 -0
  79. package/dist/commonjs/models/legalpage.js.map +1 -0
  80. package/dist/commonjs/models/listresponselegalpage.d.ts +21 -0
  81. package/dist/commonjs/models/listresponselegalpage.d.ts.map +1 -0
  82. package/dist/commonjs/models/{cart.js → listresponselegalpage.js} +17 -14
  83. package/dist/commonjs/models/listresponselegalpage.js.map +1 -0
  84. package/dist/commonjs/models/me.d.ts +10 -2
  85. package/dist/commonjs/models/me.d.ts.map +1 -1
  86. package/dist/commonjs/models/me.js +17 -3
  87. package/dist/commonjs/models/me.js.map +1 -1
  88. package/dist/commonjs/models/operations/deletecustomer.d.ts +15 -0
  89. package/dist/commonjs/models/operations/deletecustomer.d.ts.map +1 -0
  90. package/dist/commonjs/models/operations/{payinvoice.js → deletecustomer.js} +6 -6
  91. package/dist/commonjs/models/operations/deletecustomer.js.map +1 -0
  92. package/dist/commonjs/models/operations/getlegalpage.d.ts +15 -0
  93. package/dist/commonjs/models/operations/getlegalpage.d.ts.map +1 -0
  94. package/dist/commonjs/models/operations/{updatecart.js → getlegalpage.js} +8 -10
  95. package/dist/commonjs/models/operations/getlegalpage.js.map +1 -0
  96. package/dist/commonjs/models/operations/index.d.ts +3 -5
  97. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  98. package/dist/commonjs/models/operations/index.js +3 -5
  99. package/dist/commonjs/models/operations/index.js.map +1 -1
  100. package/dist/commonjs/models/operations/listfiles.d.ts +4 -4
  101. package/dist/commonjs/models/operations/listfiles.d.ts.map +1 -1
  102. package/dist/commonjs/models/operations/listfiles.js +5 -4
  103. package/dist/commonjs/models/operations/listfiles.js.map +1 -1
  104. package/dist/commonjs/models/operations/listlegalpages.d.ts +45 -0
  105. package/dist/commonjs/models/operations/listlegalpages.d.ts.map +1 -0
  106. package/dist/commonjs/models/operations/{createfile.js → listlegalpages.js} +19 -23
  107. package/dist/commonjs/models/operations/listlegalpages.js.map +1 -0
  108. package/dist/commonjs/models/pricevariant.d.ts +3 -0
  109. package/dist/commonjs/models/pricevariant.d.ts.map +1 -1
  110. package/dist/commonjs/models/pricevariant.js +5 -0
  111. package/dist/commonjs/models/pricevariant.js.map +1 -1
  112. package/dist/commonjs/models/pricevariantrequest.d.ts +7 -12
  113. package/dist/commonjs/models/pricevariantrequest.d.ts.map +1 -1
  114. package/dist/commonjs/models/pricevariantrequest.js +7 -14
  115. package/dist/commonjs/models/pricevariantrequest.js.map +1 -1
  116. package/dist/commonjs/models/pricevariantupdaterequest.d.ts +7 -12
  117. package/dist/commonjs/models/pricevariantupdaterequest.d.ts.map +1 -1
  118. package/dist/commonjs/models/pricevariantupdaterequest.js +7 -14
  119. package/dist/commonjs/models/pricevariantupdaterequest.js.map +1 -1
  120. package/dist/commonjs/models/productrequest.d.ts +2 -12
  121. package/dist/commonjs/models/productrequest.d.ts.map +1 -1
  122. package/dist/commonjs/models/productrequest.js +2 -10
  123. package/dist/commonjs/models/productrequest.js.map +1 -1
  124. package/dist/commonjs/models/subscription.d.ts +40 -8
  125. package/dist/commonjs/models/subscription.d.ts.map +1 -1
  126. package/dist/commonjs/models/subscription.js +58 -9
  127. package/dist/commonjs/models/subscription.js.map +1 -1
  128. package/dist/commonjs/models/webhookendpointrequest.d.ts +2 -12
  129. package/dist/commonjs/models/webhookendpointrequest.d.ts.map +1 -1
  130. package/dist/commonjs/models/webhookendpointrequest.js +2 -14
  131. package/dist/commonjs/models/webhookendpointrequest.js.map +1 -1
  132. package/dist/commonjs/models/x402configuration.d.ts +15 -3
  133. package/dist/commonjs/models/x402configuration.d.ts.map +1 -1
  134. package/dist/commonjs/models/x402configuration.js +22 -4
  135. package/dist/commonjs/models/x402configuration.js.map +1 -1
  136. package/dist/commonjs/models/x402configurationrequest.d.ts +2 -12
  137. package/dist/commonjs/models/x402configurationrequest.d.ts.map +1 -1
  138. package/dist/commonjs/models/x402configurationrequest.js +2 -14
  139. package/dist/commonjs/models/x402configurationrequest.js.map +1 -1
  140. package/dist/commonjs/sdk/customers.d.ts +7 -0
  141. package/dist/commonjs/sdk/customers.d.ts.map +1 -1
  142. package/dist/commonjs/sdk/customers.js +10 -0
  143. package/dist/commonjs/sdk/customers.js.map +1 -1
  144. package/dist/commonjs/sdk/files.d.ts +1 -1
  145. package/dist/commonjs/sdk/files.d.ts.map +1 -1
  146. package/dist/commonjs/sdk/files.js.map +1 -1
  147. package/dist/commonjs/sdk/invoices.d.ts +0 -7
  148. package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
  149. package/dist/commonjs/sdk/invoices.js +0 -10
  150. package/dist/commonjs/sdk/invoices.js.map +1 -1
  151. package/dist/commonjs/sdk/legalpages.d.ts +20 -0
  152. package/dist/commonjs/sdk/legalpages.d.ts.map +1 -0
  153. package/dist/commonjs/sdk/legalpages.js +32 -0
  154. package/dist/commonjs/sdk/legalpages.js.map +1 -0
  155. package/dist/commonjs/sdk/sdk.d.ts +3 -3
  156. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  157. package/dist/commonjs/sdk/sdk.js +4 -4
  158. package/dist/commonjs/sdk/sdk.js.map +1 -1
  159. package/dist/esm/funcs/customersDelete.d.ts +19 -0
  160. package/dist/esm/funcs/customersDelete.d.ts.map +1 -0
  161. package/dist/esm/funcs/{cartsDelete.js → customersDelete.js} +9 -9
  162. package/dist/esm/funcs/customersDelete.js.map +1 -0
  163. package/dist/esm/funcs/filesCreate.d.ts +1 -2
  164. package/dist/esm/funcs/filesCreate.d.ts.map +1 -1
  165. package/dist/esm/funcs/filesCreate.js +1 -2
  166. package/dist/esm/funcs/filesCreate.js.map +1 -1
  167. package/dist/{commonjs/funcs/cartsDelete.d.ts → esm/funcs/legalPagesGet.d.ts} +4 -4
  168. package/dist/esm/funcs/legalPagesGet.d.ts.map +1 -0
  169. package/dist/esm/funcs/{cartsGet.js → legalPagesGet.js} +9 -9
  170. package/dist/esm/funcs/legalPagesGet.js.map +1 -0
  171. package/dist/{commonjs/funcs/cartsGet.d.ts → esm/funcs/legalPagesList.d.ts} +4 -4
  172. package/dist/esm/funcs/legalPagesList.d.ts.map +1 -0
  173. package/dist/esm/funcs/{invoicesPay.js → legalPagesList.js} +18 -17
  174. package/dist/esm/funcs/legalPagesList.js.map +1 -0
  175. package/dist/esm/lib/config.d.ts +2 -2
  176. package/dist/esm/lib/config.js +2 -2
  177. package/dist/esm/models/blogpost.d.ts +1 -0
  178. package/dist/esm/models/blogpost.d.ts.map +1 -1
  179. package/dist/esm/models/blogpost.js +2 -0
  180. package/dist/esm/models/blogpost.js.map +1 -1
  181. package/dist/esm/models/checkout.d.ts +12 -0
  182. package/dist/esm/models/checkout.d.ts.map +1 -1
  183. package/dist/esm/models/checkout.js +8 -0
  184. package/dist/esm/models/checkout.js.map +1 -1
  185. package/dist/esm/models/checkoutcreaterequest.d.ts +2 -12
  186. package/dist/esm/models/checkoutcreaterequest.d.ts.map +1 -1
  187. package/dist/esm/models/checkoutcreaterequest.js +1 -8
  188. package/dist/esm/models/checkoutcreaterequest.js.map +1 -1
  189. package/dist/esm/models/checkoutlink.d.ts +5 -0
  190. package/dist/esm/models/checkoutlink.d.ts.map +1 -1
  191. package/dist/esm/models/checkoutlink.js +6 -0
  192. package/dist/esm/models/checkoutlink.js.map +1 -1
  193. package/dist/esm/models/checkoutlinkrequest.d.ts +8 -18
  194. package/dist/esm/models/checkoutlinkrequest.d.ts.map +1 -1
  195. package/dist/esm/models/checkoutlinkrequest.js +6 -16
  196. package/dist/esm/models/checkoutlinkrequest.js.map +1 -1
  197. package/dist/esm/models/checkoutupdaterequest.d.ts +2 -12
  198. package/dist/esm/models/checkoutupdaterequest.d.ts.map +1 -1
  199. package/dist/esm/models/checkoutupdaterequest.js +1 -8
  200. package/dist/esm/models/checkoutupdaterequest.js.map +1 -1
  201. package/dist/esm/models/customer.d.ts +1 -0
  202. package/dist/esm/models/customer.d.ts.map +1 -1
  203. package/dist/esm/models/customer.js +1 -0
  204. package/dist/esm/models/customer.js.map +1 -1
  205. package/dist/esm/models/customerrequest.d.ts +4 -12
  206. package/dist/esm/models/customerrequest.d.ts.map +1 -1
  207. package/dist/esm/models/customerrequest.js +3 -8
  208. package/dist/esm/models/customerrequest.js.map +1 -1
  209. package/dist/esm/models/discountrequest.d.ts +2 -12
  210. package/dist/esm/models/discountrequest.d.ts.map +1 -1
  211. package/dist/esm/models/discountrequest.js +1 -8
  212. package/dist/esm/models/discountrequest.js.map +1 -1
  213. package/dist/esm/models/file.d.ts +25 -5
  214. package/dist/esm/models/file.d.ts.map +1 -1
  215. package/dist/esm/models/file.js +30 -5
  216. package/dist/esm/models/file.js.map +1 -1
  217. package/dist/esm/models/filecreateresponse.d.ts +25 -5
  218. package/dist/esm/models/filecreateresponse.d.ts.map +1 -1
  219. package/dist/esm/models/filecreateresponse.js +30 -5
  220. package/dist/esm/models/filecreateresponse.js.map +1 -1
  221. package/dist/esm/models/filerequest.d.ts +30 -0
  222. package/dist/esm/models/filerequest.d.ts.map +1 -0
  223. package/dist/esm/models/filerequest.js +25 -0
  224. package/dist/esm/models/filerequest.js.map +1 -0
  225. package/dist/esm/models/index.d.ts +3 -4
  226. package/dist/esm/models/index.d.ts.map +1 -1
  227. package/dist/esm/models/index.js +3 -4
  228. package/dist/esm/models/index.js.map +1 -1
  229. package/dist/esm/models/invoicerequest.d.ts +2 -12
  230. package/dist/esm/models/invoicerequest.d.ts.map +1 -1
  231. package/dist/esm/models/invoicerequest.js +1 -8
  232. package/dist/esm/models/invoicerequest.js.map +1 -1
  233. package/dist/esm/models/legalpage.d.ts +26 -0
  234. package/dist/esm/models/legalpage.d.ts.map +1 -0
  235. package/dist/esm/models/legalpage.js +35 -0
  236. package/dist/esm/models/legalpage.js.map +1 -0
  237. package/dist/esm/models/listresponselegalpage.d.ts +21 -0
  238. package/dist/esm/models/listresponselegalpage.d.ts.map +1 -0
  239. package/dist/esm/models/listresponselegalpage.js +27 -0
  240. package/dist/esm/models/listresponselegalpage.js.map +1 -0
  241. package/dist/esm/models/me.d.ts +10 -2
  242. package/dist/esm/models/me.d.ts.map +1 -1
  243. package/dist/esm/models/me.js +14 -2
  244. package/dist/esm/models/me.js.map +1 -1
  245. package/dist/esm/models/operations/deletecustomer.d.ts +15 -0
  246. package/dist/esm/models/operations/deletecustomer.d.ts.map +1 -0
  247. package/dist/esm/models/operations/deletecustomer.js +12 -0
  248. package/dist/esm/models/operations/deletecustomer.js.map +1 -0
  249. package/dist/esm/models/operations/getlegalpage.d.ts +15 -0
  250. package/dist/esm/models/operations/getlegalpage.d.ts.map +1 -0
  251. package/dist/esm/models/operations/getlegalpage.js +17 -0
  252. package/dist/esm/models/operations/getlegalpage.js.map +1 -0
  253. package/dist/esm/models/operations/index.d.ts +3 -5
  254. package/dist/esm/models/operations/index.d.ts.map +1 -1
  255. package/dist/esm/models/operations/index.js +3 -5
  256. package/dist/esm/models/operations/index.js.map +1 -1
  257. package/dist/esm/models/operations/listfiles.d.ts +4 -4
  258. package/dist/esm/models/operations/listfiles.d.ts.map +1 -1
  259. package/dist/esm/models/operations/listfiles.js +4 -3
  260. package/dist/esm/models/operations/listfiles.js.map +1 -1
  261. package/dist/esm/models/operations/listlegalpages.d.ts +45 -0
  262. package/dist/esm/models/operations/listlegalpages.d.ts.map +1 -0
  263. package/dist/esm/models/operations/listlegalpages.js +32 -0
  264. package/dist/esm/models/operations/listlegalpages.js.map +1 -0
  265. package/dist/esm/models/pricevariant.d.ts +3 -0
  266. package/dist/esm/models/pricevariant.d.ts.map +1 -1
  267. package/dist/esm/models/pricevariant.js +5 -0
  268. package/dist/esm/models/pricevariant.js.map +1 -1
  269. package/dist/esm/models/pricevariantrequest.d.ts +7 -12
  270. package/dist/esm/models/pricevariantrequest.d.ts.map +1 -1
  271. package/dist/esm/models/pricevariantrequest.js +6 -12
  272. package/dist/esm/models/pricevariantrequest.js.map +1 -1
  273. package/dist/esm/models/pricevariantupdaterequest.d.ts +7 -12
  274. package/dist/esm/models/pricevariantupdaterequest.d.ts.map +1 -1
  275. package/dist/esm/models/pricevariantupdaterequest.js +6 -12
  276. package/dist/esm/models/pricevariantupdaterequest.js.map +1 -1
  277. package/dist/esm/models/productrequest.d.ts +2 -12
  278. package/dist/esm/models/productrequest.d.ts.map +1 -1
  279. package/dist/esm/models/productrequest.js +1 -8
  280. package/dist/esm/models/productrequest.js.map +1 -1
  281. package/dist/esm/models/subscription.d.ts +40 -8
  282. package/dist/esm/models/subscription.d.ts.map +1 -1
  283. package/dist/esm/models/subscription.js +49 -8
  284. package/dist/esm/models/subscription.js.map +1 -1
  285. package/dist/esm/models/webhookendpointrequest.d.ts +2 -12
  286. package/dist/esm/models/webhookendpointrequest.d.ts.map +1 -1
  287. package/dist/esm/models/webhookendpointrequest.js +1 -12
  288. package/dist/esm/models/webhookendpointrequest.js.map +1 -1
  289. package/dist/esm/models/x402configuration.d.ts +15 -3
  290. package/dist/esm/models/x402configuration.d.ts.map +1 -1
  291. package/dist/esm/models/x402configuration.js +18 -3
  292. package/dist/esm/models/x402configuration.js.map +1 -1
  293. package/dist/esm/models/x402configurationrequest.d.ts +2 -12
  294. package/dist/esm/models/x402configurationrequest.d.ts.map +1 -1
  295. package/dist/esm/models/x402configurationrequest.js +1 -12
  296. package/dist/esm/models/x402configurationrequest.js.map +1 -1
  297. package/dist/esm/sdk/customers.d.ts +7 -0
  298. package/dist/esm/sdk/customers.d.ts.map +1 -1
  299. package/dist/esm/sdk/customers.js +10 -0
  300. package/dist/esm/sdk/customers.js.map +1 -1
  301. package/dist/esm/sdk/files.d.ts +1 -1
  302. package/dist/esm/sdk/files.d.ts.map +1 -1
  303. package/dist/esm/sdk/files.js.map +1 -1
  304. package/dist/esm/sdk/invoices.d.ts +0 -7
  305. package/dist/esm/sdk/invoices.d.ts.map +1 -1
  306. package/dist/esm/sdk/invoices.js +0 -10
  307. package/dist/esm/sdk/invoices.js.map +1 -1
  308. package/dist/esm/sdk/legalpages.d.ts +20 -0
  309. package/dist/esm/sdk/legalpages.d.ts.map +1 -0
  310. package/dist/esm/sdk/legalpages.js +28 -0
  311. package/dist/esm/sdk/legalpages.js.map +1 -0
  312. package/dist/esm/sdk/sdk.d.ts +3 -3
  313. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  314. package/dist/esm/sdk/sdk.js +4 -4
  315. package/dist/esm/sdk/sdk.js.map +1 -1
  316. package/jsr.json +1 -1
  317. package/package.json +1 -1
  318. package/src/funcs/{cartsDelete.ts → customersDelete.ts} +10 -10
  319. package/src/funcs/filesCreate.ts +3 -4
  320. package/src/funcs/{cartsGet.ts → legalPagesGet.ts} +13 -13
  321. package/src/funcs/{invoicesPay.ts → legalPagesList.ts} +25 -22
  322. package/src/lib/config.ts +2 -2
  323. package/src/models/blogpost.ts +5 -0
  324. package/src/models/checkout.ts +29 -0
  325. package/src/models/checkoutcreaterequest.ts +5 -33
  326. package/src/models/checkoutlink.ts +21 -0
  327. package/src/models/checkoutlinkrequest.ts +22 -47
  328. package/src/models/checkoutupdaterequest.ts +5 -33
  329. package/src/models/customer.ts +2 -0
  330. package/src/models/customerrequest.ts +9 -31
  331. package/src/models/discountrequest.ts +5 -31
  332. package/src/models/file.ts +102 -10
  333. package/src/models/filecreateresponse.ts +105 -10
  334. package/src/models/filerequest.ts +56 -0
  335. package/src/models/index.ts +3 -4
  336. package/src/models/invoicerequest.ts +5 -31
  337. package/src/models/legalpage.ts +64 -0
  338. package/src/models/listresponselegalpage.ts +56 -0
  339. package/src/models/me.ts +36 -4
  340. package/src/models/operations/deletecustomer.ts +34 -0
  341. package/src/models/operations/getlegalpage.ts +39 -0
  342. package/src/models/operations/index.ts +3 -5
  343. package/src/models/operations/listfiles.ts +6 -7
  344. package/src/models/operations/listlegalpages.ts +76 -0
  345. package/src/models/pricevariant.ts +7 -0
  346. package/src/models/pricevariantrequest.ts +14 -37
  347. package/src/models/pricevariantupdaterequest.ts +14 -39
  348. package/src/models/productrequest.ts +5 -31
  349. package/src/models/subscription.ts +165 -16
  350. package/src/models/webhookendpointrequest.ts +5 -39
  351. package/src/models/x402configuration.ts +63 -6
  352. package/src/models/x402configurationrequest.ts +8 -44
  353. package/src/sdk/customers.ts +18 -0
  354. package/src/sdk/files.ts +1 -1
  355. package/src/sdk/invoices.ts +0 -18
  356. package/src/sdk/legalpages.ts +46 -0
  357. package/src/sdk/sdk.ts +6 -6
  358. package/dist/commonjs/funcs/cartsCreate.d.ts +0 -18
  359. package/dist/commonjs/funcs/cartsCreate.d.ts.map +0 -1
  360. package/dist/commonjs/funcs/cartsCreate.js +0 -118
  361. package/dist/commonjs/funcs/cartsCreate.js.map +0 -1
  362. package/dist/commonjs/funcs/cartsDelete.d.ts.map +0 -1
  363. package/dist/commonjs/funcs/cartsDelete.js.map +0 -1
  364. package/dist/commonjs/funcs/cartsGet.d.ts.map +0 -1
  365. package/dist/commonjs/funcs/cartsGet.js.map +0 -1
  366. package/dist/commonjs/funcs/cartsUpdate.d.ts.map +0 -1
  367. package/dist/commonjs/funcs/cartsUpdate.js +0 -125
  368. package/dist/commonjs/funcs/cartsUpdate.js.map +0 -1
  369. package/dist/commonjs/funcs/invoicesPay.d.ts.map +0 -1
  370. package/dist/commonjs/funcs/invoicesPay.js.map +0 -1
  371. package/dist/commonjs/models/cart.d.ts +0 -15
  372. package/dist/commonjs/models/cart.d.ts.map +0 -1
  373. package/dist/commonjs/models/cart.js.map +0 -1
  374. package/dist/commonjs/models/cartcreaterequest.d.ts +0 -41
  375. package/dist/commonjs/models/cartcreaterequest.d.ts.map +0 -1
  376. package/dist/commonjs/models/cartcreaterequest.js +0 -78
  377. package/dist/commonjs/models/cartcreaterequest.js.map +0 -1
  378. package/dist/commonjs/models/cartitem.d.ts +0 -13
  379. package/dist/commonjs/models/cartitem.d.ts.map +0 -1
  380. package/dist/commonjs/models/cartitem.js.map +0 -1
  381. package/dist/commonjs/models/cartupdaterequest.d.ts +0 -38
  382. package/dist/commonjs/models/cartupdaterequest.d.ts.map +0 -1
  383. package/dist/commonjs/models/cartupdaterequest.js +0 -79
  384. package/dist/commonjs/models/cartupdaterequest.js.map +0 -1
  385. package/dist/commonjs/models/operations/createfile.d.ts +0 -49
  386. package/dist/commonjs/models/operations/createfile.d.ts.map +0 -1
  387. package/dist/commonjs/models/operations/createfile.js.map +0 -1
  388. package/dist/commonjs/models/operations/deletecart.d.ts +0 -15
  389. package/dist/commonjs/models/operations/deletecart.d.ts.map +0 -1
  390. package/dist/commonjs/models/operations/deletecart.js +0 -49
  391. package/dist/commonjs/models/operations/deletecart.js.map +0 -1
  392. package/dist/commonjs/models/operations/getcart.d.ts +0 -15
  393. package/dist/commonjs/models/operations/getcart.d.ts.map +0 -1
  394. package/dist/commonjs/models/operations/getcart.js +0 -49
  395. package/dist/commonjs/models/operations/getcart.js.map +0 -1
  396. package/dist/commonjs/models/operations/payinvoice.d.ts +0 -15
  397. package/dist/commonjs/models/operations/payinvoice.d.ts.map +0 -1
  398. package/dist/commonjs/models/operations/payinvoice.js.map +0 -1
  399. package/dist/commonjs/models/operations/updatecart.d.ts +0 -18
  400. package/dist/commonjs/models/operations/updatecart.d.ts.map +0 -1
  401. package/dist/commonjs/models/operations/updatecart.js.map +0 -1
  402. package/dist/commonjs/sdk/carts.d.ts +0 -34
  403. package/dist/commonjs/sdk/carts.d.ts.map +0 -1
  404. package/dist/commonjs/sdk/carts.js +0 -52
  405. package/dist/commonjs/sdk/carts.js.map +0 -1
  406. package/dist/esm/funcs/cartsCreate.d.ts +0 -18
  407. package/dist/esm/funcs/cartsCreate.d.ts.map +0 -1
  408. package/dist/esm/funcs/cartsCreate.js +0 -82
  409. package/dist/esm/funcs/cartsCreate.js.map +0 -1
  410. package/dist/esm/funcs/cartsDelete.d.ts.map +0 -1
  411. package/dist/esm/funcs/cartsDelete.js.map +0 -1
  412. package/dist/esm/funcs/cartsGet.d.ts +0 -19
  413. package/dist/esm/funcs/cartsGet.d.ts.map +0 -1
  414. package/dist/esm/funcs/cartsGet.js.map +0 -1
  415. package/dist/esm/funcs/cartsUpdate.d.ts +0 -19
  416. package/dist/esm/funcs/cartsUpdate.d.ts.map +0 -1
  417. package/dist/esm/funcs/cartsUpdate.js +0 -89
  418. package/dist/esm/funcs/cartsUpdate.js.map +0 -1
  419. package/dist/esm/funcs/invoicesPay.d.ts +0 -19
  420. package/dist/esm/funcs/invoicesPay.d.ts.map +0 -1
  421. package/dist/esm/funcs/invoicesPay.js.map +0 -1
  422. package/dist/esm/models/cart.d.ts +0 -15
  423. package/dist/esm/models/cart.d.ts.map +0 -1
  424. package/dist/esm/models/cart.js +0 -24
  425. package/dist/esm/models/cart.js.map +0 -1
  426. package/dist/esm/models/cartcreaterequest.d.ts +0 -41
  427. package/dist/esm/models/cartcreaterequest.d.ts.map +0 -1
  428. package/dist/esm/models/cartcreaterequest.js +0 -39
  429. package/dist/esm/models/cartcreaterequest.js.map +0 -1
  430. package/dist/esm/models/cartitem.d.ts +0 -13
  431. package/dist/esm/models/cartitem.d.ts.map +0 -1
  432. package/dist/esm/models/cartitem.js +0 -21
  433. package/dist/esm/models/cartitem.js.map +0 -1
  434. package/dist/esm/models/cartupdaterequest.d.ts +0 -38
  435. package/dist/esm/models/cartupdaterequest.d.ts.map +0 -1
  436. package/dist/esm/models/cartupdaterequest.js +0 -40
  437. package/dist/esm/models/cartupdaterequest.js.map +0 -1
  438. package/dist/esm/models/operations/createfile.d.ts +0 -49
  439. package/dist/esm/models/operations/createfile.d.ts.map +0 -1
  440. package/dist/esm/models/operations/createfile.js +0 -35
  441. package/dist/esm/models/operations/createfile.js.map +0 -1
  442. package/dist/esm/models/operations/deletecart.d.ts +0 -15
  443. package/dist/esm/models/operations/deletecart.d.ts.map +0 -1
  444. package/dist/esm/models/operations/deletecart.js +0 -12
  445. package/dist/esm/models/operations/deletecart.js.map +0 -1
  446. package/dist/esm/models/operations/getcart.d.ts +0 -15
  447. package/dist/esm/models/operations/getcart.d.ts.map +0 -1
  448. package/dist/esm/models/operations/getcart.js +0 -12
  449. package/dist/esm/models/operations/getcart.js.map +0 -1
  450. package/dist/esm/models/operations/payinvoice.d.ts +0 -15
  451. package/dist/esm/models/operations/payinvoice.d.ts.map +0 -1
  452. package/dist/esm/models/operations/payinvoice.js +0 -12
  453. package/dist/esm/models/operations/payinvoice.js.map +0 -1
  454. package/dist/esm/models/operations/updatecart.d.ts +0 -18
  455. package/dist/esm/models/operations/updatecart.d.ts.map +0 -1
  456. package/dist/esm/models/operations/updatecart.js +0 -19
  457. package/dist/esm/models/operations/updatecart.js.map +0 -1
  458. package/dist/esm/sdk/carts.d.ts +0 -34
  459. package/dist/esm/sdk/carts.d.ts.map +0 -1
  460. package/dist/esm/sdk/carts.js +0 -48
  461. package/dist/esm/sdk/carts.js.map +0 -1
  462. package/src/funcs/cartsCreate.ts +0 -170
  463. package/src/funcs/cartsUpdate.ts +0 -177
  464. package/src/models/cart.ts +0 -42
  465. package/src/models/cartcreaterequest.ts +0 -111
  466. package/src/models/cartitem.ts +0 -42
  467. package/src/models/cartupdaterequest.ts +0 -109
  468. package/src/models/operations/createfile.ts +0 -91
  469. package/src/models/operations/deletecart.ts +0 -34
  470. package/src/models/operations/getcart.ts +0 -30
  471. package/src/models/operations/payinvoice.ts +0 -34
  472. package/src/models/operations/updatecart.ts +0 -43
  473. package/src/sdk/carts.ts +0 -82
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+
9
+ /**
10
+ * Filter by policy type: terms_of_service, privacy_policy, refund_policy
11
+ */
12
+ export const PolicyType = {
13
+ TermsOfService: "terms_of_service",
14
+ PrivacyPolicy: "privacy_policy",
15
+ RefundPolicy: "refund_policy",
16
+ } as const;
17
+ /**
18
+ * Filter by policy type: terms_of_service, privacy_policy, refund_policy
19
+ */
20
+ export type PolicyType = ClosedEnum<typeof PolicyType>;
21
+
22
+ export type ListLegalPagesRequest = {
23
+ /**
24
+ * Filter by policy type: terms_of_service, privacy_policy, refund_policy
25
+ */
26
+ policyType?: PolicyType | undefined;
27
+ /**
28
+ * Search by title
29
+ */
30
+ query?: string | undefined;
31
+ /**
32
+ * Cursor for pagination — the ID of the last item in the previous page
33
+ */
34
+ startingAfter?: string | undefined;
35
+ /**
36
+ * Items per page
37
+ */
38
+ limit?: number | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const PolicyType$outboundSchema: z.ZodNativeEnum<typeof PolicyType> = z
43
+ .nativeEnum(PolicyType);
44
+
45
+ /** @internal */
46
+ export type ListLegalPagesRequest$Outbound = {
47
+ policy_type?: string | undefined;
48
+ query?: string | undefined;
49
+ starting_after?: string | undefined;
50
+ limit: number;
51
+ };
52
+
53
+ /** @internal */
54
+ export const ListLegalPagesRequest$outboundSchema: z.ZodType<
55
+ ListLegalPagesRequest$Outbound,
56
+ z.ZodTypeDef,
57
+ ListLegalPagesRequest
58
+ > = z.object({
59
+ policyType: PolicyType$outboundSchema.optional(),
60
+ query: z.string().optional(),
61
+ startingAfter: z.string().optional(),
62
+ limit: z.number().int().default(20),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ policyType: "policy_type",
66
+ startingAfter: "starting_after",
67
+ });
68
+ });
69
+
70
+ export function listLegalPagesRequestToJSON(
71
+ listLegalPagesRequest: ListLegalPagesRequest,
72
+ ): string {
73
+ return JSON.stringify(
74
+ ListLegalPagesRequest$outboundSchema.parse(listLegalPagesRequest),
75
+ );
76
+ }
@@ -19,6 +19,7 @@ export type PriceVariantAmountType = ClosedEnum<typeof PriceVariantAmountType>;
19
19
  export const PriceVariantBillingType = {
20
20
  Subscription: "subscription",
21
21
  OneTime: "one_time",
22
+ PaymentPlan: "payment_plan",
22
23
  } as const;
23
24
  export type PriceVariantBillingType = ClosedEnum<
24
25
  typeof PriceVariantBillingType
@@ -43,6 +44,8 @@ export type PriceVariant = {
43
44
  billingType: PriceVariantBillingType;
44
45
  recurringInterval: PriceVariantRecurringInterval | null;
45
46
  intervalCount: number;
47
+ installmentCount: number | null;
48
+ setupFeeAmount: number | null;
46
49
  trialPeriodDays: number | null;
47
50
  revokeAfterDays: number | null;
48
51
  quantityAvailable: number | null;
@@ -91,6 +94,8 @@ export const PriceVariant$inboundSchema: z.ZodType<
91
94
  billing_type: PriceVariantBillingType$inboundSchema,
92
95
  recurring_interval: z.nullable(PriceVariantRecurringInterval$inboundSchema),
93
96
  interval_count: z.number().int(),
97
+ installment_count: z.nullable(z.number().int()),
98
+ setup_fee_amount: z.nullable(z.number().int()),
94
99
  trial_period_days: z.nullable(z.number().int()),
95
100
  revoke_after_days: z.nullable(z.number().int()),
96
101
  quantity_available: z.nullable(z.number().int()),
@@ -114,6 +119,8 @@ export const PriceVariant$inboundSchema: z.ZodType<
114
119
  "billing_type": "billingType",
115
120
  "recurring_interval": "recurringInterval",
116
121
  "interval_count": "intervalCount",
122
+ "installment_count": "installmentCount",
123
+ "setup_fee_amount": "setupFeeAmount",
117
124
  "trial_period_days": "trialPeriodDays",
118
125
  "revoke_after_days": "revokeAfterDays",
119
126
  "quantity_available": "quantityAvailable",
@@ -18,6 +18,7 @@ export type PriceVariantRequestAmountType = ClosedEnum<
18
18
  export const PriceVariantRequestBillingType = {
19
19
  Subscription: "subscription",
20
20
  OneTime: "one_time",
21
+ PaymentPlan: "payment_plan",
21
22
  } as const;
22
23
  export type PriceVariantRequestBillingType = ClosedEnum<
23
24
  typeof PriceVariantRequestBillingType
@@ -33,7 +34,7 @@ export type PriceVariantRequestRecurringInterval = ClosedEnum<
33
34
  typeof PriceVariantRequestRecurringInterval
34
35
  >;
35
36
 
36
- export type PriceVariantRequestPriceVariant = {
37
+ export type PriceVariantRequest = {
37
38
  name?: string | undefined;
38
39
  amountType?: PriceVariantRequestAmountType | undefined;
39
40
  amount?: number | null | undefined;
@@ -41,6 +42,8 @@ export type PriceVariantRequestPriceVariant = {
41
42
  billingType?: PriceVariantRequestBillingType | undefined;
42
43
  recurringInterval?: PriceVariantRequestRecurringInterval | null | undefined;
43
44
  intervalCount?: number | undefined;
45
+ installmentCount?: number | null | undefined;
46
+ setupFeeAmount?: number | null | undefined;
44
47
  trialPeriodDays?: number | null | undefined;
45
48
  revokeAfterDays?: number | null | undefined;
46
49
  quantityAvailable?: number | null | undefined;
@@ -49,10 +52,6 @@ export type PriceVariantRequestPriceVariant = {
49
52
  hidden?: boolean | null | undefined;
50
53
  };
51
54
 
52
- export type PriceVariantRequest = {
53
- priceVariant: PriceVariantRequestPriceVariant;
54
- };
55
-
56
55
  /** @internal */
57
56
  export const PriceVariantRequestAmountType$outboundSchema: z.ZodNativeEnum<
58
57
  typeof PriceVariantRequestAmountType
@@ -70,7 +69,7 @@ export const PriceVariantRequestRecurringInterval$outboundSchema:
70
69
  );
71
70
 
72
71
  /** @internal */
73
- export type PriceVariantRequestPriceVariant$Outbound = {
72
+ export type PriceVariantRequest$Outbound = {
74
73
  name?: string | undefined;
75
74
  amount_type?: string | undefined;
76
75
  amount?: number | null | undefined;
@@ -78,6 +77,8 @@ export type PriceVariantRequestPriceVariant$Outbound = {
78
77
  billing_type?: string | undefined;
79
78
  recurring_interval?: string | null | undefined;
80
79
  interval_count?: number | undefined;
80
+ installment_count?: number | null | undefined;
81
+ setup_fee_amount?: number | null | undefined;
81
82
  trial_period_days?: number | null | undefined;
82
83
  revoke_after_days?: number | null | undefined;
83
84
  quantity_available?: number | null | undefined;
@@ -87,10 +88,10 @@ export type PriceVariantRequestPriceVariant$Outbound = {
87
88
  };
88
89
 
89
90
  /** @internal */
90
- export const PriceVariantRequestPriceVariant$outboundSchema: z.ZodType<
91
- PriceVariantRequestPriceVariant$Outbound,
91
+ export const PriceVariantRequest$outboundSchema: z.ZodType<
92
+ PriceVariantRequest$Outbound,
92
93
  z.ZodTypeDef,
93
- PriceVariantRequestPriceVariant
94
+ PriceVariantRequest
94
95
  > = z.object({
95
96
  name: z.string().optional(),
96
97
  amountType: PriceVariantRequestAmountType$outboundSchema.optional(),
@@ -101,6 +102,8 @@ export const PriceVariantRequestPriceVariant$outboundSchema: z.ZodType<
101
102
  PriceVariantRequestRecurringInterval$outboundSchema,
102
103
  ).optional(),
103
104
  intervalCount: z.number().int().optional(),
105
+ installmentCount: z.nullable(z.number().int()).optional(),
106
+ setupFeeAmount: z.nullable(z.number().int()).optional(),
104
107
  trialPeriodDays: z.nullable(z.number().int()).optional(),
105
108
  revokeAfterDays: z.nullable(z.number().int()).optional(),
106
109
  quantityAvailable: z.nullable(z.number().int()).optional(),
@@ -113,40 +116,14 @@ export const PriceVariantRequestPriceVariant$outboundSchema: z.ZodType<
113
116
  billingType: "billing_type",
114
117
  recurringInterval: "recurring_interval",
115
118
  intervalCount: "interval_count",
119
+ installmentCount: "installment_count",
120
+ setupFeeAmount: "setup_fee_amount",
116
121
  trialPeriodDays: "trial_period_days",
117
122
  revokeAfterDays: "revoke_after_days",
118
123
  quantityAvailable: "quantity_available",
119
124
  });
120
125
  });
121
126
 
122
- export function priceVariantRequestPriceVariantToJSON(
123
- priceVariantRequestPriceVariant: PriceVariantRequestPriceVariant,
124
- ): string {
125
- return JSON.stringify(
126
- PriceVariantRequestPriceVariant$outboundSchema.parse(
127
- priceVariantRequestPriceVariant,
128
- ),
129
- );
130
- }
131
-
132
- /** @internal */
133
- export type PriceVariantRequest$Outbound = {
134
- price_variant: PriceVariantRequestPriceVariant$Outbound;
135
- };
136
-
137
- /** @internal */
138
- export const PriceVariantRequest$outboundSchema: z.ZodType<
139
- PriceVariantRequest$Outbound,
140
- z.ZodTypeDef,
141
- PriceVariantRequest
142
- > = z.object({
143
- priceVariant: z.lazy(() => PriceVariantRequestPriceVariant$outboundSchema),
144
- }).transform((v) => {
145
- return remap$(v, {
146
- priceVariant: "price_variant",
147
- });
148
- });
149
-
150
127
  export function priceVariantRequestToJSON(
151
128
  priceVariantRequest: PriceVariantRequest,
152
129
  ): string {
@@ -18,6 +18,7 @@ export type PriceVariantUpdateRequestAmountType = ClosedEnum<
18
18
  export const PriceVariantUpdateRequestBillingType = {
19
19
  Subscription: "subscription",
20
20
  OneTime: "one_time",
21
+ PaymentPlan: "payment_plan",
21
22
  } as const;
22
23
  export type PriceVariantUpdateRequestBillingType = ClosedEnum<
23
24
  typeof PriceVariantUpdateRequestBillingType
@@ -33,7 +34,7 @@ export type PriceVariantUpdateRequestRecurringInterval = ClosedEnum<
33
34
  typeof PriceVariantUpdateRequestRecurringInterval
34
35
  >;
35
36
 
36
- export type PriceVariantUpdateRequestPriceVariant = {
37
+ export type PriceVariantUpdateRequest = {
37
38
  name?: string | undefined;
38
39
  amountType?: PriceVariantUpdateRequestAmountType | undefined;
39
40
  amount?: number | null | undefined;
@@ -44,6 +45,8 @@ export type PriceVariantUpdateRequestPriceVariant = {
44
45
  | null
45
46
  | undefined;
46
47
  intervalCount?: number | undefined;
48
+ installmentCount?: number | null | undefined;
49
+ setupFeeAmount?: number | null | undefined;
47
50
  trialPeriodDays?: number | null | undefined;
48
51
  revokeAfterDays?: number | null | undefined;
49
52
  quantityAvailable?: number | null | undefined;
@@ -52,10 +55,6 @@ export type PriceVariantUpdateRequestPriceVariant = {
52
55
  hidden?: boolean | null | undefined;
53
56
  };
54
57
 
55
- export type PriceVariantUpdateRequest = {
56
- priceVariant: PriceVariantUpdateRequestPriceVariant;
57
- };
58
-
59
58
  /** @internal */
60
59
  export const PriceVariantUpdateRequestAmountType$outboundSchema:
61
60
  z.ZodNativeEnum<typeof PriceVariantUpdateRequestAmountType> = z.nativeEnum(
@@ -74,7 +73,7 @@ export const PriceVariantUpdateRequestRecurringInterval$outboundSchema:
74
73
  .nativeEnum(PriceVariantUpdateRequestRecurringInterval);
75
74
 
76
75
  /** @internal */
77
- export type PriceVariantUpdateRequestPriceVariant$Outbound = {
76
+ export type PriceVariantUpdateRequest$Outbound = {
78
77
  name?: string | undefined;
79
78
  amount_type?: string | undefined;
80
79
  amount?: number | null | undefined;
@@ -82,6 +81,8 @@ export type PriceVariantUpdateRequestPriceVariant$Outbound = {
82
81
  billing_type?: string | undefined;
83
82
  recurring_interval?: string | null | undefined;
84
83
  interval_count?: number | undefined;
84
+ installment_count?: number | null | undefined;
85
+ setup_fee_amount?: number | null | undefined;
85
86
  trial_period_days?: number | null | undefined;
86
87
  revoke_after_days?: number | null | undefined;
87
88
  quantity_available?: number | null | undefined;
@@ -91,10 +92,10 @@ export type PriceVariantUpdateRequestPriceVariant$Outbound = {
91
92
  };
92
93
 
93
94
  /** @internal */
94
- export const PriceVariantUpdateRequestPriceVariant$outboundSchema: z.ZodType<
95
- PriceVariantUpdateRequestPriceVariant$Outbound,
95
+ export const PriceVariantUpdateRequest$outboundSchema: z.ZodType<
96
+ PriceVariantUpdateRequest$Outbound,
96
97
  z.ZodTypeDef,
97
- PriceVariantUpdateRequestPriceVariant
98
+ PriceVariantUpdateRequest
98
99
  > = z.object({
99
100
  name: z.string().optional(),
100
101
  amountType: PriceVariantUpdateRequestAmountType$outboundSchema.optional(),
@@ -105,6 +106,8 @@ export const PriceVariantUpdateRequestPriceVariant$outboundSchema: z.ZodType<
105
106
  PriceVariantUpdateRequestRecurringInterval$outboundSchema,
106
107
  ).optional(),
107
108
  intervalCount: z.number().int().optional(),
109
+ installmentCount: z.nullable(z.number().int()).optional(),
110
+ setupFeeAmount: z.nullable(z.number().int()).optional(),
108
111
  trialPeriodDays: z.nullable(z.number().int()).optional(),
109
112
  revokeAfterDays: z.nullable(z.number().int()).optional(),
110
113
  quantityAvailable: z.nullable(z.number().int()).optional(),
@@ -117,42 +120,14 @@ export const PriceVariantUpdateRequestPriceVariant$outboundSchema: z.ZodType<
117
120
  billingType: "billing_type",
118
121
  recurringInterval: "recurring_interval",
119
122
  intervalCount: "interval_count",
123
+ installmentCount: "installment_count",
124
+ setupFeeAmount: "setup_fee_amount",
120
125
  trialPeriodDays: "trial_period_days",
121
126
  revokeAfterDays: "revoke_after_days",
122
127
  quantityAvailable: "quantity_available",
123
128
  });
124
129
  });
125
130
 
126
- export function priceVariantUpdateRequestPriceVariantToJSON(
127
- priceVariantUpdateRequestPriceVariant: PriceVariantUpdateRequestPriceVariant,
128
- ): string {
129
- return JSON.stringify(
130
- PriceVariantUpdateRequestPriceVariant$outboundSchema.parse(
131
- priceVariantUpdateRequestPriceVariant,
132
- ),
133
- );
134
- }
135
-
136
- /** @internal */
137
- export type PriceVariantUpdateRequest$Outbound = {
138
- price_variant: PriceVariantUpdateRequestPriceVariant$Outbound;
139
- };
140
-
141
- /** @internal */
142
- export const PriceVariantUpdateRequest$outboundSchema: z.ZodType<
143
- PriceVariantUpdateRequest$Outbound,
144
- z.ZodTypeDef,
145
- PriceVariantUpdateRequest
146
- > = z.object({
147
- priceVariant: z.lazy(() =>
148
- PriceVariantUpdateRequestPriceVariant$outboundSchema
149
- ),
150
- }).transform((v) => {
151
- return remap$(v, {
152
- priceVariant: "price_variant",
153
- });
154
- });
155
-
156
131
  export function priceVariantUpdateRequestToJSON(
157
132
  priceVariantUpdateRequest: PriceVariantUpdateRequest,
158
133
  ): string {
@@ -13,7 +13,7 @@ export const ProductRequestStatus = {
13
13
  } as const;
14
14
  export type ProductRequestStatus = ClosedEnum<typeof ProductRequestStatus>;
15
15
 
16
- export type ProductRequestProduct = {
16
+ export type ProductRequest = {
17
17
  name?: string | undefined;
18
18
  status?: ProductRequestStatus | undefined;
19
19
  description?: string | undefined;
@@ -25,17 +25,13 @@ export type ProductRequestProduct = {
25
25
  taxCode?: string | null | undefined;
26
26
  };
27
27
 
28
- export type ProductRequest = {
29
- product: ProductRequestProduct;
30
- };
31
-
32
28
  /** @internal */
33
29
  export const ProductRequestStatus$outboundSchema: z.ZodNativeEnum<
34
30
  typeof ProductRequestStatus
35
31
  > = z.nativeEnum(ProductRequestStatus);
36
32
 
37
33
  /** @internal */
38
- export type ProductRequestProduct$Outbound = {
34
+ export type ProductRequest$Outbound = {
39
35
  name?: string | undefined;
40
36
  status?: string | undefined;
41
37
  description?: string | undefined;
@@ -48,10 +44,10 @@ export type ProductRequestProduct$Outbound = {
48
44
  };
49
45
 
50
46
  /** @internal */
51
- export const ProductRequestProduct$outboundSchema: z.ZodType<
52
- ProductRequestProduct$Outbound,
47
+ export const ProductRequest$outboundSchema: z.ZodType<
48
+ ProductRequest$Outbound,
53
49
  z.ZodTypeDef,
54
- ProductRequestProduct
50
+ ProductRequest
55
51
  > = z.object({
56
52
  name: z.string().optional(),
57
53
  status: ProductRequestStatus$outboundSchema.optional(),
@@ -74,28 +70,6 @@ export const ProductRequestProduct$outboundSchema: z.ZodType<
74
70
  });
75
71
  });
76
72
 
77
- export function productRequestProductToJSON(
78
- productRequestProduct: ProductRequestProduct,
79
- ): string {
80
- return JSON.stringify(
81
- ProductRequestProduct$outboundSchema.parse(productRequestProduct),
82
- );
83
- }
84
-
85
- /** @internal */
86
- export type ProductRequest$Outbound = {
87
- product: ProductRequestProduct$Outbound;
88
- };
89
-
90
- /** @internal */
91
- export const ProductRequest$outboundSchema: z.ZodType<
92
- ProductRequest$Outbound,
93
- z.ZodTypeDef,
94
- ProductRequest
95
- > = z.object({
96
- product: z.lazy(() => ProductRequestProduct$outboundSchema),
97
- });
98
-
99
73
  export function productRequestToJSON(productRequest: ProductRequest): string {
100
74
  return JSON.stringify(ProductRequest$outboundSchema.parse(productRequest));
101
75
  }
@@ -8,21 +8,170 @@ 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
10
 
11
+ export type SubscriptionStatus = {};
12
+
13
+ export type Quantity = {};
14
+
15
+ export type CurrentPeriodStart = {};
16
+
17
+ export type CurrentPeriodEnd = {};
18
+
19
+ export type TrialEndsAt = {};
20
+
21
+ export type EndsAt = {};
22
+
23
+ export type SubscriptionCreatedAt = {};
24
+
25
+ export type SubscriptionUpdatedAt = {};
26
+
11
27
  export type Subscription = {
12
28
  id: string;
13
29
  object: string;
14
- status: string;
15
- quantity: number;
16
- currentPeriodStart: string;
17
- currentPeriodEnd: string;
18
- trialEndsAt: string;
19
- endsAt: string;
20
- createdAt: string;
21
- updatedAt: string;
30
+ status: SubscriptionStatus;
31
+ quantity: Quantity;
32
+ currentPeriodStart: CurrentPeriodStart;
33
+ currentPeriodEnd: CurrentPeriodEnd;
34
+ trialEndsAt: TrialEndsAt;
35
+ endsAt: EndsAt;
36
+ createdAt: SubscriptionCreatedAt;
37
+ updatedAt: SubscriptionUpdatedAt;
22
38
  canceled: boolean;
23
39
  paused: boolean;
24
40
  };
25
41
 
42
+ /** @internal */
43
+ export const SubscriptionStatus$inboundSchema: z.ZodType<
44
+ SubscriptionStatus,
45
+ z.ZodTypeDef,
46
+ unknown
47
+ > = z.object({});
48
+
49
+ export function subscriptionStatusFromJSON(
50
+ jsonString: string,
51
+ ): SafeParseResult<SubscriptionStatus, SDKValidationError> {
52
+ return safeParse(
53
+ jsonString,
54
+ (x) => SubscriptionStatus$inboundSchema.parse(JSON.parse(x)),
55
+ `Failed to parse 'SubscriptionStatus' from JSON`,
56
+ );
57
+ }
58
+
59
+ /** @internal */
60
+ export const Quantity$inboundSchema: z.ZodType<
61
+ Quantity,
62
+ z.ZodTypeDef,
63
+ unknown
64
+ > = z.object({});
65
+
66
+ export function quantityFromJSON(
67
+ jsonString: string,
68
+ ): SafeParseResult<Quantity, SDKValidationError> {
69
+ return safeParse(
70
+ jsonString,
71
+ (x) => Quantity$inboundSchema.parse(JSON.parse(x)),
72
+ `Failed to parse 'Quantity' from JSON`,
73
+ );
74
+ }
75
+
76
+ /** @internal */
77
+ export const CurrentPeriodStart$inboundSchema: z.ZodType<
78
+ CurrentPeriodStart,
79
+ z.ZodTypeDef,
80
+ unknown
81
+ > = z.object({});
82
+
83
+ export function currentPeriodStartFromJSON(
84
+ jsonString: string,
85
+ ): SafeParseResult<CurrentPeriodStart, SDKValidationError> {
86
+ return safeParse(
87
+ jsonString,
88
+ (x) => CurrentPeriodStart$inboundSchema.parse(JSON.parse(x)),
89
+ `Failed to parse 'CurrentPeriodStart' from JSON`,
90
+ );
91
+ }
92
+
93
+ /** @internal */
94
+ export const CurrentPeriodEnd$inboundSchema: z.ZodType<
95
+ CurrentPeriodEnd,
96
+ z.ZodTypeDef,
97
+ unknown
98
+ > = z.object({});
99
+
100
+ export function currentPeriodEndFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<CurrentPeriodEnd, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => CurrentPeriodEnd$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'CurrentPeriodEnd' from JSON`,
107
+ );
108
+ }
109
+
110
+ /** @internal */
111
+ export const TrialEndsAt$inboundSchema: z.ZodType<
112
+ TrialEndsAt,
113
+ z.ZodTypeDef,
114
+ unknown
115
+ > = z.object({});
116
+
117
+ export function trialEndsAtFromJSON(
118
+ jsonString: string,
119
+ ): SafeParseResult<TrialEndsAt, SDKValidationError> {
120
+ return safeParse(
121
+ jsonString,
122
+ (x) => TrialEndsAt$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'TrialEndsAt' from JSON`,
124
+ );
125
+ }
126
+
127
+ /** @internal */
128
+ export const EndsAt$inboundSchema: z.ZodType<EndsAt, z.ZodTypeDef, unknown> = z
129
+ .object({});
130
+
131
+ export function endsAtFromJSON(
132
+ jsonString: string,
133
+ ): SafeParseResult<EndsAt, SDKValidationError> {
134
+ return safeParse(
135
+ jsonString,
136
+ (x) => EndsAt$inboundSchema.parse(JSON.parse(x)),
137
+ `Failed to parse 'EndsAt' from JSON`,
138
+ );
139
+ }
140
+
141
+ /** @internal */
142
+ export const SubscriptionCreatedAt$inboundSchema: z.ZodType<
143
+ SubscriptionCreatedAt,
144
+ z.ZodTypeDef,
145
+ unknown
146
+ > = z.object({});
147
+
148
+ export function subscriptionCreatedAtFromJSON(
149
+ jsonString: string,
150
+ ): SafeParseResult<SubscriptionCreatedAt, SDKValidationError> {
151
+ return safeParse(
152
+ jsonString,
153
+ (x) => SubscriptionCreatedAt$inboundSchema.parse(JSON.parse(x)),
154
+ `Failed to parse 'SubscriptionCreatedAt' from JSON`,
155
+ );
156
+ }
157
+
158
+ /** @internal */
159
+ export const SubscriptionUpdatedAt$inboundSchema: z.ZodType<
160
+ SubscriptionUpdatedAt,
161
+ z.ZodTypeDef,
162
+ unknown
163
+ > = z.object({});
164
+
165
+ export function subscriptionUpdatedAtFromJSON(
166
+ jsonString: string,
167
+ ): SafeParseResult<SubscriptionUpdatedAt, SDKValidationError> {
168
+ return safeParse(
169
+ jsonString,
170
+ (x) => SubscriptionUpdatedAt$inboundSchema.parse(JSON.parse(x)),
171
+ `Failed to parse 'SubscriptionUpdatedAt' from JSON`,
172
+ );
173
+ }
174
+
26
175
  /** @internal */
27
176
  export const Subscription$inboundSchema: z.ZodType<
28
177
  Subscription,
@@ -31,14 +180,14 @@ export const Subscription$inboundSchema: z.ZodType<
31
180
  > = z.object({
32
181
  id: z.string(),
33
182
  object: z.string(),
34
- status: z.string(),
35
- quantity: z.number().int(),
36
- current_period_start: z.string(),
37
- current_period_end: z.string(),
38
- trial_ends_at: z.string(),
39
- ends_at: z.string(),
40
- created_at: z.string(),
41
- updated_at: z.string(),
183
+ status: z.lazy(() => SubscriptionStatus$inboundSchema),
184
+ quantity: z.lazy(() => Quantity$inboundSchema),
185
+ current_period_start: z.lazy(() => CurrentPeriodStart$inboundSchema),
186
+ current_period_end: z.lazy(() => CurrentPeriodEnd$inboundSchema),
187
+ trial_ends_at: z.lazy(() => TrialEndsAt$inboundSchema),
188
+ ends_at: z.lazy(() => EndsAt$inboundSchema),
189
+ created_at: z.lazy(() => SubscriptionCreatedAt$inboundSchema),
190
+ updated_at: z.lazy(() => SubscriptionUpdatedAt$inboundSchema),
42
191
  canceled: z.boolean(),
43
192
  paused: z.boolean(),
44
193
  }).transform((v) => {
@@ -14,33 +14,29 @@ export type WebhookEndpointRequestStatus = ClosedEnum<
14
14
  typeof WebhookEndpointRequestStatus
15
15
  >;
16
16
 
17
- export type WebhookEndpointRequestWebhookEndpoint = {
17
+ export type WebhookEndpointRequest = {
18
18
  url?: string | undefined;
19
19
  status?: WebhookEndpointRequestStatus | undefined;
20
20
  enabledEvents?: Array<string> | undefined;
21
21
  };
22
22
 
23
- export type WebhookEndpointRequest = {
24
- webhookEndpoint: WebhookEndpointRequestWebhookEndpoint;
25
- };
26
-
27
23
  /** @internal */
28
24
  export const WebhookEndpointRequestStatus$outboundSchema: z.ZodNativeEnum<
29
25
  typeof WebhookEndpointRequestStatus
30
26
  > = z.nativeEnum(WebhookEndpointRequestStatus);
31
27
 
32
28
  /** @internal */
33
- export type WebhookEndpointRequestWebhookEndpoint$Outbound = {
29
+ export type WebhookEndpointRequest$Outbound = {
34
30
  url?: string | undefined;
35
31
  status?: string | undefined;
36
32
  enabled_events?: Array<string> | undefined;
37
33
  };
38
34
 
39
35
  /** @internal */
40
- export const WebhookEndpointRequestWebhookEndpoint$outboundSchema: z.ZodType<
41
- WebhookEndpointRequestWebhookEndpoint$Outbound,
36
+ export const WebhookEndpointRequest$outboundSchema: z.ZodType<
37
+ WebhookEndpointRequest$Outbound,
42
38
  z.ZodTypeDef,
43
- WebhookEndpointRequestWebhookEndpoint
39
+ WebhookEndpointRequest
44
40
  > = z.object({
45
41
  url: z.string().optional(),
46
42
  status: WebhookEndpointRequestStatus$outboundSchema.optional(),
@@ -51,36 +47,6 @@ export const WebhookEndpointRequestWebhookEndpoint$outboundSchema: z.ZodType<
51
47
  });
52
48
  });
53
49
 
54
- export function webhookEndpointRequestWebhookEndpointToJSON(
55
- webhookEndpointRequestWebhookEndpoint: WebhookEndpointRequestWebhookEndpoint,
56
- ): string {
57
- return JSON.stringify(
58
- WebhookEndpointRequestWebhookEndpoint$outboundSchema.parse(
59
- webhookEndpointRequestWebhookEndpoint,
60
- ),
61
- );
62
- }
63
-
64
- /** @internal */
65
- export type WebhookEndpointRequest$Outbound = {
66
- webhook_endpoint: WebhookEndpointRequestWebhookEndpoint$Outbound;
67
- };
68
-
69
- /** @internal */
70
- export const WebhookEndpointRequest$outboundSchema: z.ZodType<
71
- WebhookEndpointRequest$Outbound,
72
- z.ZodTypeDef,
73
- WebhookEndpointRequest
74
- > = z.object({
75
- webhookEndpoint: z.lazy(() =>
76
- WebhookEndpointRequestWebhookEndpoint$outboundSchema
77
- ),
78
- }).transform((v) => {
79
- return remap$(v, {
80
- webhookEndpoint: "webhook_endpoint",
81
- });
82
- });
83
-
84
50
  export function webhookEndpointRequestToJSON(
85
51
  webhookEndpointRequest: WebhookEndpointRequest,
86
52
  ): string {