@polar-sh/sdk 0.13.0 → 0.13.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 (332) hide show
  1. package/README.md +15 -0
  2. package/docs/sdks/articles/README.md +78 -0
  3. package/docs/sdks/benefits/README.md +3 -3
  4. package/docs/sdks/checkoutlinks/README.md +400 -0
  5. package/funcs/articlesExport.d.ts +16 -0
  6. package/funcs/articlesExport.d.ts.map +1 -0
  7. package/funcs/articlesExport.js +99 -0
  8. package/funcs/articlesExport.js.map +1 -0
  9. package/funcs/benefitsCreate.d.ts +2 -1
  10. package/funcs/benefitsCreate.d.ts.map +1 -1
  11. package/funcs/benefitsCreate.js +2 -1
  12. package/funcs/benefitsCreate.js.map +1 -1
  13. package/funcs/benefitsGet.d.ts +2 -1
  14. package/funcs/benefitsGet.d.ts.map +1 -1
  15. package/funcs/benefitsGet.js +2 -1
  16. package/funcs/benefitsGet.js.map +1 -1
  17. package/funcs/benefitsUpdate.d.ts +2 -1
  18. package/funcs/benefitsUpdate.d.ts.map +1 -1
  19. package/funcs/benefitsUpdate.js +2 -1
  20. package/funcs/benefitsUpdate.js.map +1 -1
  21. package/funcs/checkoutLinksCreate.d.ts +16 -0
  22. package/funcs/checkoutLinksCreate.d.ts.map +1 -0
  23. package/funcs/checkoutLinksCreate.js +95 -0
  24. package/funcs/checkoutLinksCreate.js.map +1 -0
  25. package/funcs/checkoutLinksDelete.d.ts +16 -0
  26. package/funcs/checkoutLinksDelete.d.ts.map +1 -0
  27. package/funcs/checkoutLinksDelete.js +101 -0
  28. package/funcs/checkoutLinksDelete.js.map +1 -0
  29. package/funcs/checkoutLinksGet.d.ts +17 -0
  30. package/funcs/checkoutLinksGet.d.ts.map +1 -0
  31. package/funcs/checkoutLinksGet.js +101 -0
  32. package/funcs/checkoutLinksGet.js.map +1 -0
  33. package/funcs/checkoutLinksList.d.ts +17 -0
  34. package/funcs/checkoutLinksList.d.ts.map +1 -0
  35. package/funcs/checkoutLinksList.js +130 -0
  36. package/funcs/checkoutLinksList.js.map +1 -0
  37. package/funcs/checkoutLinksUpdate.d.ts +17 -0
  38. package/funcs/checkoutLinksUpdate.d.ts.map +1 -0
  39. package/funcs/checkoutLinksUpdate.js +104 -0
  40. package/funcs/checkoutLinksUpdate.js.map +1 -0
  41. package/lib/config.d.ts +3 -3
  42. package/lib/config.js +3 -3
  43. package/models/components/articlecreate.d.ts +6 -67
  44. package/models/components/articlecreate.d.ts.map +1 -1
  45. package/models/components/articlecreate.js +7 -47
  46. package/models/components/articlecreate.js.map +1 -1
  47. package/models/components/benefit.d.ts +28 -0
  48. package/models/components/benefit.d.ts.map +1 -0
  49. package/models/components/benefit.js +69 -0
  50. package/models/components/benefit.js.map +1 -0
  51. package/models/components/benefitbase.d.ts +0 -3
  52. package/models/components/benefitbase.d.ts.map +1 -1
  53. package/models/components/benefitbase.js.map +1 -1
  54. package/models/components/benefitgrantwebhook.d.ts +3 -28
  55. package/models/components/benefitgrantwebhook.d.ts.map +1 -1
  56. package/models/components/benefitgrantwebhook.js +4 -57
  57. package/models/components/benefitgrantwebhook.js.map +1 -1
  58. package/models/components/benefitinput.d.ts +28 -0
  59. package/models/components/benefitinput.d.ts.map +1 -0
  60. package/models/components/benefitinput.js +69 -0
  61. package/models/components/benefitinput.js.map +1 -0
  62. package/models/components/checkoutlink.d.ts +69 -0
  63. package/models/components/checkoutlink.d.ts.map +1 -0
  64. package/models/components/checkoutlink.js +90 -0
  65. package/models/components/checkoutlink.js.map +1 -0
  66. package/models/components/checkoutlinkcreate.d.ts +85 -0
  67. package/models/components/checkoutlinkcreate.d.ts.map +1 -0
  68. package/models/components/checkoutlinkcreate.js +90 -0
  69. package/models/components/checkoutlinkcreate.js.map +1 -0
  70. package/models/components/checkoutlinksortproperty.d.ts +28 -0
  71. package/models/components/checkoutlinksortproperty.d.ts.map +1 -0
  72. package/models/components/checkoutlinksortproperty.js +50 -0
  73. package/models/components/checkoutlinksortproperty.js.map +1 -0
  74. package/models/components/checkoutlinkupdate.d.ts +46 -0
  75. package/models/components/checkoutlinkupdate.d.ts.map +1 -0
  76. package/models/components/checkoutlinkupdate.js +61 -0
  77. package/models/components/checkoutlinkupdate.js.map +1 -0
  78. package/models/components/checkoutpublic.d.ts +5 -8
  79. package/models/components/checkoutpublic.d.ts.map +1 -1
  80. package/models/components/checkoutpublic.js +2 -2
  81. package/models/components/checkoutpublic.js.map +1 -1
  82. package/models/components/index.d.ts +13 -0
  83. package/models/components/index.d.ts.map +1 -1
  84. package/models/components/index.js +13 -0
  85. package/models/components/index.js.map +1 -1
  86. package/models/components/interval.d.ts +37 -0
  87. package/models/components/interval.d.ts.map +1 -0
  88. package/models/components/interval.js +54 -0
  89. package/models/components/interval.js.map +1 -0
  90. package/models/components/issue.d.ts +0 -6
  91. package/models/components/issue.d.ts.map +1 -1
  92. package/models/components/issue.js.map +1 -1
  93. package/models/components/licensekeyread.d.ts +3 -0
  94. package/models/components/licensekeyread.d.ts.map +1 -1
  95. package/models/components/licensekeyread.js +3 -0
  96. package/models/components/licensekeyread.js.map +1 -1
  97. package/models/components/licensekeyuser.d.ts +31 -0
  98. package/models/components/licensekeyuser.d.ts.map +1 -0
  99. package/models/components/licensekeyuser.js +67 -0
  100. package/models/components/licensekeyuser.js.map +1 -0
  101. package/models/components/licensekeywithactivations.d.ts +3 -0
  102. package/models/components/licensekeywithactivations.d.ts.map +1 -1
  103. package/models/components/licensekeywithactivations.js +3 -0
  104. package/models/components/licensekeywithactivations.js.map +1 -1
  105. package/models/components/listresourcebenefit.d.ts +3 -28
  106. package/models/components/listresourcebenefit.d.ts.map +1 -1
  107. package/models/components/listresourcebenefit.js +4 -57
  108. package/models/components/listresourcebenefit.js.map +1 -1
  109. package/models/components/listresourcecheckoutlink.d.ts +29 -0
  110. package/models/components/listresourcecheckoutlink.d.ts.map +1 -0
  111. package/models/components/listresourcecheckoutlink.js +54 -0
  112. package/models/components/listresourcecheckoutlink.js.map +1 -0
  113. package/models/components/metric.d.ts +0 -3
  114. package/models/components/metric.d.ts.map +1 -1
  115. package/models/components/metric.js.map +1 -1
  116. package/models/components/metricsintervalslimits.d.ts +5 -5
  117. package/models/components/metricslimits.d.ts +1 -1
  118. package/models/components/metricsresponse.d.ts +0 -3
  119. package/models/components/metricsresponse.d.ts.map +1 -1
  120. package/models/components/metricsresponse.js.map +1 -1
  121. package/models/components/oauth2client.js +2 -2
  122. package/models/components/oauth2client.js.map +1 -1
  123. package/models/components/oauth2clientconfiguration.js +2 -2
  124. package/models/components/oauth2clientconfiguration.js.map +1 -1
  125. package/models/components/oauth2clientconfigurationupdate.js +2 -2
  126. package/models/components/oauth2clientconfigurationupdate.js.map +1 -1
  127. package/models/components/order.d.ts +3 -0
  128. package/models/components/order.d.ts.map +1 -1
  129. package/models/components/order.js +5 -0
  130. package/models/components/order.js.map +1 -1
  131. package/models/components/orderbillingreason.d.ts +34 -0
  132. package/models/components/orderbillingreason.d.ts.map +1 -0
  133. package/models/components/orderbillingreason.js +52 -0
  134. package/models/components/orderbillingreason.js.map +1 -0
  135. package/models/components/pledge.d.ts +0 -9
  136. package/models/components/pledge.d.ts.map +1 -1
  137. package/models/components/pledge.js.map +1 -1
  138. package/models/components/polarcheckoutschemascheckout.d.ts +2 -121
  139. package/models/components/polarcheckoutschemascheckout.d.ts.map +1 -1
  140. package/models/components/polarcheckoutschemascheckout.js +3 -108
  141. package/models/components/polarcheckoutschemascheckout.js.map +1 -1
  142. package/models/components/productpriceonetimecustom.d.ts +5 -0
  143. package/models/components/productpriceonetimecustom.d.ts.map +1 -1
  144. package/models/components/productpriceonetimecustom.js +4 -0
  145. package/models/components/productpriceonetimecustom.js.map +1 -1
  146. package/models/components/productpriceonetimefixed.d.ts +5 -0
  147. package/models/components/productpriceonetimefixed.d.ts.map +1 -1
  148. package/models/components/productpriceonetimefixed.js +4 -0
  149. package/models/components/productpriceonetimefixed.js.map +1 -1
  150. package/models/components/productpriceonetimefree.d.ts +5 -0
  151. package/models/components/productpriceonetimefree.d.ts.map +1 -1
  152. package/models/components/productpriceonetimefree.js +4 -0
  153. package/models/components/productpriceonetimefree.js.map +1 -1
  154. package/models/components/productpricerecurringcustom.d.ts +5 -3
  155. package/models/components/productpricerecurringcustom.d.ts.map +1 -1
  156. package/models/components/productpricerecurringcustom.js +4 -0
  157. package/models/components/productpricerecurringcustom.js.map +1 -1
  158. package/models/components/productpricerecurringfixed.d.ts +5 -3
  159. package/models/components/productpricerecurringfixed.d.ts.map +1 -1
  160. package/models/components/productpricerecurringfixed.js +4 -0
  161. package/models/components/productpricerecurringfixed.js.map +1 -1
  162. package/models/components/productpricerecurringfixedcreate.d.ts +0 -3
  163. package/models/components/productpricerecurringfixedcreate.d.ts.map +1 -1
  164. package/models/components/productpricerecurringfixedcreate.js.map +1 -1
  165. package/models/components/productpricerecurringfree.d.ts +5 -3
  166. package/models/components/productpricerecurringfree.d.ts.map +1 -1
  167. package/models/components/productpricerecurringfree.js +4 -0
  168. package/models/components/productpricerecurringfree.js.map +1 -1
  169. package/models/components/productpricerecurringfreecreate.d.ts +0 -3
  170. package/models/components/productpricerecurringfreecreate.d.ts.map +1 -1
  171. package/models/components/productpricerecurringfreecreate.js.map +1 -1
  172. package/models/components/validatedlicensekey.d.ts +3 -0
  173. package/models/components/validatedlicensekey.d.ts.map +1 -1
  174. package/models/components/validatedlicensekey.js +3 -0
  175. package/models/components/validatedlicensekey.js.map +1 -1
  176. package/models/components/webhookbenefitcreatedpayload.d.ts +3 -28
  177. package/models/components/webhookbenefitcreatedpayload.d.ts.map +1 -1
  178. package/models/components/webhookbenefitcreatedpayload.js +4 -57
  179. package/models/components/webhookbenefitcreatedpayload.js.map +1 -1
  180. package/models/components/webhookbenefitupdatedpayload.d.ts +3 -28
  181. package/models/components/webhookbenefitupdatedpayload.d.ts.map +1 -1
  182. package/models/components/webhookbenefitupdatedpayload.js +4 -57
  183. package/models/components/webhookbenefitupdatedpayload.js.map +1 -1
  184. package/models/components/webhookcheckoutcreatedpayload.d.ts +3 -3
  185. package/models/components/webhookcheckoutcreatedpayload.d.ts.map +1 -1
  186. package/models/components/webhookcheckoutcreatedpayload.js +2 -2
  187. package/models/components/webhookcheckoutcreatedpayload.js.map +1 -1
  188. package/models/components/webhookcheckoutupdatedpayload.d.ts +3 -3
  189. package/models/components/webhookcheckoutupdatedpayload.d.ts.map +1 -1
  190. package/models/components/webhookcheckoutupdatedpayload.js +2 -2
  191. package/models/components/webhookcheckoutupdatedpayload.js.map +1 -1
  192. package/models/components/webhooksubscriptionactivepayload.d.ts +59 -0
  193. package/models/components/webhooksubscriptionactivepayload.d.ts.map +1 -0
  194. package/models/components/webhooksubscriptionactivepayload.js +71 -0
  195. package/models/components/webhooksubscriptionactivepayload.js.map +1 -0
  196. package/models/components/webhooksubscriptioncanceledpayload.d.ts +59 -0
  197. package/models/components/webhooksubscriptioncanceledpayload.d.ts.map +1 -0
  198. package/models/components/webhooksubscriptioncanceledpayload.js +71 -0
  199. package/models/components/webhooksubscriptioncanceledpayload.js.map +1 -0
  200. package/models/components/webhooksubscriptionrevokedpayload.d.ts +59 -0
  201. package/models/components/webhooksubscriptionrevokedpayload.d.ts.map +1 -0
  202. package/models/components/webhooksubscriptionrevokedpayload.js +71 -0
  203. package/models/components/webhooksubscriptionrevokedpayload.js.map +1 -0
  204. package/models/components/webhooksubscriptionupdatedpayload.d.ts +6 -2
  205. package/models/components/webhooksubscriptionupdatedpayload.d.ts.map +1 -1
  206. package/models/components/webhooksubscriptionupdatedpayload.js.map +1 -1
  207. package/models/operations/articlesexport.d.ts +25 -0
  208. package/models/operations/articlesexport.d.ts.map +1 -0
  209. package/models/operations/articlesexport.js +59 -0
  210. package/models/operations/articlesexport.js.map +1 -0
  211. package/models/operations/benefitscreate.d.ts +0 -22
  212. package/models/operations/benefitscreate.d.ts.map +1 -1
  213. package/models/operations/benefitscreate.js +1 -32
  214. package/models/operations/benefitscreate.js.map +1 -1
  215. package/models/operations/benefitsget.d.ts +0 -23
  216. package/models/operations/benefitsget.d.ts.map +1 -1
  217. package/models/operations/benefitsget.js +1 -33
  218. package/models/operations/benefitsget.js.map +1 -1
  219. package/models/operations/benefitsupdate.d.ts +0 -22
  220. package/models/operations/benefitsupdate.d.ts.map +1 -1
  221. package/models/operations/benefitsupdate.js +1 -32
  222. package/models/operations/benefitsupdate.js.map +1 -1
  223. package/models/operations/checkoutlinksdelete.d.ts +28 -0
  224. package/models/operations/checkoutlinksdelete.d.ts.map +1 -0
  225. package/models/operations/checkoutlinksdelete.js +50 -0
  226. package/models/operations/checkoutlinksdelete.js.map +1 -0
  227. package/models/operations/checkoutlinksget.d.ts +28 -0
  228. package/models/operations/checkoutlinksget.d.ts.map +1 -0
  229. package/models/operations/checkoutlinksget.js +50 -0
  230. package/models/operations/checkoutlinksget.js.map +1 -0
  231. package/models/operations/checkoutlinkslist.d.ts +116 -0
  232. package/models/operations/checkoutlinkslist.d.ts.map +1 -0
  233. package/models/operations/checkoutlinkslist.js +129 -0
  234. package/models/operations/checkoutlinkslist.js.map +1 -0
  235. package/models/operations/checkoutlinksupdate.d.ts +31 -0
  236. package/models/operations/checkoutlinksupdate.d.ts.map +1 -0
  237. package/models/operations/checkoutlinksupdate.js +62 -0
  238. package/models/operations/checkoutlinksupdate.js.map +1 -0
  239. package/models/operations/index.d.ts +5 -0
  240. package/models/operations/index.d.ts.map +1 -1
  241. package/models/operations/index.js +5 -0
  242. package/models/operations/index.js.map +1 -1
  243. package/models/operations/metricsget.d.ts +1 -42
  244. package/models/operations/metricsget.d.ts.map +1 -1
  245. package/models/operations/metricsget.js +3 -29
  246. package/models/operations/metricsget.js.map +1 -1
  247. package/package.json +1 -1
  248. package/sdk/articles.d.ts +7 -0
  249. package/sdk/articles.d.ts.map +1 -1
  250. package/sdk/articles.js +10 -0
  251. package/sdk/articles.js.map +1 -1
  252. package/sdk/benefits.d.ts +4 -3
  253. package/sdk/benefits.d.ts.map +1 -1
  254. package/sdk/benefits.js.map +1 -1
  255. package/sdk/checkoutlinks.d.ts +42 -0
  256. package/sdk/checkoutlinks.d.ts.map +1 -0
  257. package/sdk/checkoutlinks.js +63 -0
  258. package/sdk/checkoutlinks.js.map +1 -0
  259. package/sdk/sdk.d.ts +3 -0
  260. package/sdk/sdk.d.ts.map +1 -1
  261. package/sdk/sdk.js +5 -0
  262. package/sdk/sdk.js.map +1 -1
  263. package/src/funcs/articlesExport.ts +129 -0
  264. package/src/funcs/benefitsCreate.ts +4 -3
  265. package/src/funcs/benefitsGet.ts +4 -3
  266. package/src/funcs/benefitsUpdate.ts +4 -3
  267. package/src/funcs/checkoutLinksCreate.ts +124 -0
  268. package/src/funcs/checkoutLinksDelete.ts +135 -0
  269. package/src/funcs/checkoutLinksGet.ts +134 -0
  270. package/src/funcs/checkoutLinksList.ts +189 -0
  271. package/src/funcs/checkoutLinksUpdate.ts +138 -0
  272. package/src/lib/config.ts +3 -3
  273. package/src/models/components/articlecreate.ts +18 -77
  274. package/src/models/components/benefit.ts +106 -0
  275. package/src/models/components/benefitbase.ts +0 -3
  276. package/src/models/components/benefitgrantwebhook.ts +9 -137
  277. package/src/models/components/benefitinput.ts +109 -0
  278. package/src/models/components/checkoutlink.ts +131 -0
  279. package/src/models/components/checkoutlinkcreate.ts +127 -0
  280. package/src/models/components/checkoutlinksortproperty.ts +35 -0
  281. package/src/models/components/checkoutlinkupdate.ts +73 -0
  282. package/src/models/components/checkoutpublic.ts +7 -10
  283. package/src/models/components/index.ts +13 -0
  284. package/src/models/components/interval.ts +34 -0
  285. package/src/models/components/issue.ts +0 -6
  286. package/src/models/components/licensekeyread.ts +10 -0
  287. package/src/models/components/licensekeyuser.ts +68 -0
  288. package/src/models/components/licensekeywithactivations.ts +10 -0
  289. package/src/models/components/listresourcebenefit.ts +9 -140
  290. package/src/models/components/listresourcecheckoutlink.ts +61 -0
  291. package/src/models/components/metric.ts +0 -3
  292. package/src/models/components/metricsintervalslimits.ts +5 -5
  293. package/src/models/components/metricslimits.ts +1 -1
  294. package/src/models/components/metricsresponse.ts +0 -3
  295. package/src/models/components/oauth2client.ts +2 -2
  296. package/src/models/components/oauth2clientconfiguration.ts +2 -2
  297. package/src/models/components/oauth2clientconfigurationupdate.ts +2 -2
  298. package/src/models/components/order.ts +11 -0
  299. package/src/models/components/orderbillingreason.ts +35 -0
  300. package/src/models/components/pledge.ts +0 -9
  301. package/src/models/components/polarcheckoutschemascheckout.ts +4 -229
  302. package/src/models/components/productpriceonetimecustom.ts +9 -0
  303. package/src/models/components/productpriceonetimefixed.ts +9 -0
  304. package/src/models/components/productpriceonetimefree.ts +9 -0
  305. package/src/models/components/productpricerecurringcustom.ts +9 -3
  306. package/src/models/components/productpricerecurringfixed.ts +9 -3
  307. package/src/models/components/productpricerecurringfixedcreate.ts +0 -3
  308. package/src/models/components/productpricerecurringfree.ts +9 -3
  309. package/src/models/components/productpricerecurringfreecreate.ts +0 -3
  310. package/src/models/components/validatedlicensekey.ts +10 -0
  311. package/src/models/components/webhookbenefitcreatedpayload.ts +9 -139
  312. package/src/models/components/webhookbenefitupdatedpayload.ts +9 -139
  313. package/src/models/components/webhookcheckoutcreatedpayload.ts +8 -8
  314. package/src/models/components/webhookcheckoutupdatedpayload.ts +8 -8
  315. package/src/models/components/webhooksubscriptionactivepayload.ts +95 -0
  316. package/src/models/components/webhooksubscriptioncanceledpayload.ts +96 -0
  317. package/src/models/components/webhooksubscriptionrevokedpayload.ts +96 -0
  318. package/src/models/components/webhooksubscriptionupdatedpayload.ts +6 -2
  319. package/src/models/operations/articlesexport.ts +54 -0
  320. package/src/models/operations/benefitscreate.ts +0 -67
  321. package/src/models/operations/benefitsget.ts +0 -66
  322. package/src/models/operations/benefitsupdate.ts +0 -67
  323. package/src/models/operations/checkoutlinksdelete.ts +48 -0
  324. package/src/models/operations/checkoutlinksget.ts +48 -0
  325. package/src/models/operations/checkoutlinkslist.ts +224 -0
  326. package/src/models/operations/checkoutlinksupdate.ts +62 -0
  327. package/src/models/operations/index.ts +5 -0
  328. package/src/models/operations/metricsget.ts +3 -38
  329. package/src/sdk/articles.ts +18 -0
  330. package/src/sdk/benefits.ts +4 -3
  331. package/src/sdk/checkoutlinks.ts +101 -0
  332. package/src/sdk/sdk.ts +6 -0
@@ -9,11 +9,18 @@ import {
9
9
  LicenseKeyStatus$inboundSchema,
10
10
  LicenseKeyStatus$outboundSchema,
11
11
  } from "./licensekeystatus.js";
12
+ import {
13
+ LicenseKeyUser,
14
+ LicenseKeyUser$inboundSchema,
15
+ LicenseKeyUser$Outbound,
16
+ LicenseKeyUser$outboundSchema,
17
+ } from "./licensekeyuser.js";
12
18
 
13
19
  export type LicenseKeyRead = {
14
20
  id: string;
15
21
  organizationId: string;
16
22
  userId: string;
23
+ user: LicenseKeyUser;
17
24
  /**
18
25
  * The benefit ID.
19
26
  */
@@ -38,6 +45,7 @@ export const LicenseKeyRead$inboundSchema: z.ZodType<
38
45
  id: z.string(),
39
46
  organization_id: z.string(),
40
47
  user_id: z.string(),
48
+ user: LicenseKeyUser$inboundSchema,
41
49
  benefit_id: z.string(),
42
50
  key: z.string(),
43
51
  display_key: z.string(),
@@ -70,6 +78,7 @@ export type LicenseKeyRead$Outbound = {
70
78
  id: string;
71
79
  organization_id: string;
72
80
  user_id: string;
81
+ user: LicenseKeyUser$Outbound;
73
82
  benefit_id: string;
74
83
  key: string;
75
84
  display_key: string;
@@ -91,6 +100,7 @@ export const LicenseKeyRead$outboundSchema: z.ZodType<
91
100
  id: z.string(),
92
101
  organizationId: z.string(),
93
102
  userId: z.string(),
103
+ user: LicenseKeyUser$outboundSchema,
94
104
  benefitId: z.string(),
95
105
  key: z.string(),
96
106
  displayKey: z.string(),
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type LicenseKeyUser = {
9
+ id: string;
10
+ publicName: string;
11
+ email: string;
12
+ avatarUrl: string | null;
13
+ };
14
+
15
+ /** @internal */
16
+ export const LicenseKeyUser$inboundSchema: z.ZodType<
17
+ LicenseKeyUser,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ id: z.string(),
22
+ public_name: z.string(),
23
+ email: z.string(),
24
+ avatar_url: z.nullable(z.string()),
25
+ }).transform((v) => {
26
+ return remap$(v, {
27
+ "public_name": "publicName",
28
+ "avatar_url": "avatarUrl",
29
+ });
30
+ });
31
+
32
+ /** @internal */
33
+ export type LicenseKeyUser$Outbound = {
34
+ id: string;
35
+ public_name: string;
36
+ email: string;
37
+ avatar_url: string | null;
38
+ };
39
+
40
+ /** @internal */
41
+ export const LicenseKeyUser$outboundSchema: z.ZodType<
42
+ LicenseKeyUser$Outbound,
43
+ z.ZodTypeDef,
44
+ LicenseKeyUser
45
+ > = z.object({
46
+ id: z.string(),
47
+ publicName: z.string(),
48
+ email: z.string(),
49
+ avatarUrl: z.nullable(z.string()),
50
+ }).transform((v) => {
51
+ return remap$(v, {
52
+ publicName: "public_name",
53
+ avatarUrl: "avatar_url",
54
+ });
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace LicenseKeyUser$ {
62
+ /** @deprecated use `LicenseKeyUser$inboundSchema` instead. */
63
+ export const inboundSchema = LicenseKeyUser$inboundSchema;
64
+ /** @deprecated use `LicenseKeyUser$outboundSchema` instead. */
65
+ export const outboundSchema = LicenseKeyUser$outboundSchema;
66
+ /** @deprecated use `LicenseKeyUser$Outbound` instead. */
67
+ export type Outbound = LicenseKeyUser$Outbound;
68
+ }
@@ -15,11 +15,18 @@ import {
15
15
  LicenseKeyStatus$inboundSchema,
16
16
  LicenseKeyStatus$outboundSchema,
17
17
  } from "./licensekeystatus.js";
18
+ import {
19
+ LicenseKeyUser,
20
+ LicenseKeyUser$inboundSchema,
21
+ LicenseKeyUser$Outbound,
22
+ LicenseKeyUser$outboundSchema,
23
+ } from "./licensekeyuser.js";
18
24
 
19
25
  export type LicenseKeyWithActivations = {
20
26
  id: string;
21
27
  organizationId: string;
22
28
  userId: string;
29
+ user: LicenseKeyUser;
23
30
  /**
24
31
  * The benefit ID.
25
32
  */
@@ -45,6 +52,7 @@ export const LicenseKeyWithActivations$inboundSchema: z.ZodType<
45
52
  id: z.string(),
46
53
  organization_id: z.string(),
47
54
  user_id: z.string(),
55
+ user: LicenseKeyUser$inboundSchema,
48
56
  benefit_id: z.string(),
49
57
  key: z.string(),
50
58
  display_key: z.string(),
@@ -78,6 +86,7 @@ export type LicenseKeyWithActivations$Outbound = {
78
86
  id: string;
79
87
  organization_id: string;
80
88
  user_id: string;
89
+ user: LicenseKeyUser$Outbound;
81
90
  benefit_id: string;
82
91
  key: string;
83
92
  display_key: string;
@@ -100,6 +109,7 @@ export const LicenseKeyWithActivations$outboundSchema: z.ZodType<
100
109
  id: z.string(),
101
110
  organizationId: z.string(),
102
111
  userId: z.string(),
112
+ user: LicenseKeyUser$outboundSchema,
103
113
  benefitId: z.string(),
104
114
  key: z.string(),
105
115
  displayKey: z.string(),
@@ -4,47 +4,11 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import {
7
- BenefitAds,
8
- BenefitAds$inboundSchema,
9
- BenefitAds$Outbound,
10
- BenefitAds$outboundSchema,
11
- } from "./benefitads.js";
12
- import {
13
- BenefitArticles,
14
- BenefitArticles$inboundSchema,
15
- BenefitArticles$Outbound,
16
- BenefitArticles$outboundSchema,
17
- } from "./benefitarticles.js";
18
- import {
19
- BenefitCustom,
20
- BenefitCustom$inboundSchema,
21
- BenefitCustom$Outbound,
22
- BenefitCustom$outboundSchema,
23
- } from "./benefitcustom.js";
24
- import {
25
- BenefitDiscord,
26
- BenefitDiscord$inboundSchema,
27
- BenefitDiscord$Outbound,
28
- BenefitDiscord$outboundSchema,
29
- } from "./benefitdiscord.js";
30
- import {
31
- BenefitDownloadables,
32
- BenefitDownloadables$inboundSchema,
33
- BenefitDownloadables$Outbound,
34
- BenefitDownloadables$outboundSchema,
35
- } from "./benefitdownloadables.js";
36
- import {
37
- BenefitGitHubRepository,
38
- BenefitGitHubRepository$inboundSchema,
39
- BenefitGitHubRepository$Outbound,
40
- BenefitGitHubRepository$outboundSchema,
41
- } from "./benefitgithubrepository.js";
42
- import {
43
- BenefitLicenseKeys,
44
- BenefitLicenseKeys$inboundSchema,
45
- BenefitLicenseKeys$Outbound,
46
- BenefitLicenseKeys$outboundSchema,
47
- } from "./benefitlicensekeys.js";
7
+ Benefit,
8
+ Benefit$inboundSchema,
9
+ Benefit$Outbound,
10
+ Benefit$outboundSchema,
11
+ } from "./benefit.js";
48
12
  import {
49
13
  Pagination,
50
14
  Pagination$inboundSchema,
@@ -52,109 +16,24 @@ import {
52
16
  Pagination$outboundSchema,
53
17
  } from "./pagination.js";
54
18
 
55
- export type Benefit =
56
- | BenefitArticles
57
- | BenefitAds
58
- | BenefitDiscord
59
- | BenefitGitHubRepository
60
- | BenefitDownloadables
61
- | BenefitLicenseKeys
62
- | BenefitCustom;
63
-
64
19
  export type ListResourceBenefit = {
65
- items: Array<
66
- | BenefitArticles
67
- | BenefitAds
68
- | BenefitDiscord
69
- | BenefitGitHubRepository
70
- | BenefitDownloadables
71
- | BenefitLicenseKeys
72
- | BenefitCustom
73
- >;
20
+ items: Array<Benefit>;
74
21
  pagination: Pagination;
75
22
  };
76
23
 
77
- /** @internal */
78
- export const Benefit$inboundSchema: z.ZodType<Benefit, z.ZodTypeDef, unknown> =
79
- z.union([
80
- BenefitArticles$inboundSchema,
81
- BenefitAds$inboundSchema,
82
- BenefitDiscord$inboundSchema,
83
- BenefitGitHubRepository$inboundSchema,
84
- BenefitDownloadables$inboundSchema,
85
- BenefitLicenseKeys$inboundSchema,
86
- BenefitCustom$inboundSchema,
87
- ]);
88
-
89
- /** @internal */
90
- export type Benefit$Outbound =
91
- | BenefitArticles$Outbound
92
- | BenefitAds$Outbound
93
- | BenefitDiscord$Outbound
94
- | BenefitGitHubRepository$Outbound
95
- | BenefitDownloadables$Outbound
96
- | BenefitLicenseKeys$Outbound
97
- | BenefitCustom$Outbound;
98
-
99
- /** @internal */
100
- export const Benefit$outboundSchema: z.ZodType<
101
- Benefit$Outbound,
102
- z.ZodTypeDef,
103
- Benefit
104
- > = z.union([
105
- BenefitArticles$outboundSchema,
106
- BenefitAds$outboundSchema,
107
- BenefitDiscord$outboundSchema,
108
- BenefitGitHubRepository$outboundSchema,
109
- BenefitDownloadables$outboundSchema,
110
- BenefitLicenseKeys$outboundSchema,
111
- BenefitCustom$outboundSchema,
112
- ]);
113
-
114
- /**
115
- * @internal
116
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
117
- */
118
- export namespace Benefit$ {
119
- /** @deprecated use `Benefit$inboundSchema` instead. */
120
- export const inboundSchema = Benefit$inboundSchema;
121
- /** @deprecated use `Benefit$outboundSchema` instead. */
122
- export const outboundSchema = Benefit$outboundSchema;
123
- /** @deprecated use `Benefit$Outbound` instead. */
124
- export type Outbound = Benefit$Outbound;
125
- }
126
-
127
24
  /** @internal */
128
25
  export const ListResourceBenefit$inboundSchema: z.ZodType<
129
26
  ListResourceBenefit,
130
27
  z.ZodTypeDef,
131
28
  unknown
132
29
  > = z.object({
133
- items: z.array(
134
- z.union([
135
- BenefitArticles$inboundSchema,
136
- BenefitAds$inboundSchema,
137
- BenefitDiscord$inboundSchema,
138
- BenefitGitHubRepository$inboundSchema,
139
- BenefitDownloadables$inboundSchema,
140
- BenefitLicenseKeys$inboundSchema,
141
- BenefitCustom$inboundSchema,
142
- ]),
143
- ),
30
+ items: z.array(Benefit$inboundSchema),
144
31
  pagination: Pagination$inboundSchema,
145
32
  });
146
33
 
147
34
  /** @internal */
148
35
  export type ListResourceBenefit$Outbound = {
149
- items: Array<
150
- | BenefitArticles$Outbound
151
- | BenefitAds$Outbound
152
- | BenefitDiscord$Outbound
153
- | BenefitGitHubRepository$Outbound
154
- | BenefitDownloadables$Outbound
155
- | BenefitLicenseKeys$Outbound
156
- | BenefitCustom$Outbound
157
- >;
36
+ items: Array<Benefit$Outbound>;
158
37
  pagination: Pagination$Outbound;
159
38
  };
160
39
 
@@ -164,17 +43,7 @@ export const ListResourceBenefit$outboundSchema: z.ZodType<
164
43
  z.ZodTypeDef,
165
44
  ListResourceBenefit
166
45
  > = z.object({
167
- items: z.array(
168
- z.union([
169
- BenefitArticles$outboundSchema,
170
- BenefitAds$outboundSchema,
171
- BenefitDiscord$outboundSchema,
172
- BenefitGitHubRepository$outboundSchema,
173
- BenefitDownloadables$outboundSchema,
174
- BenefitLicenseKeys$outboundSchema,
175
- BenefitCustom$outboundSchema,
176
- ]),
177
- ),
46
+ items: z.array(Benefit$outboundSchema),
178
47
  pagination: Pagination$outboundSchema,
179
48
  });
180
49
 
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ CheckoutLink,
8
+ CheckoutLink$inboundSchema,
9
+ CheckoutLink$Outbound,
10
+ CheckoutLink$outboundSchema,
11
+ } from "./checkoutlink.js";
12
+ import {
13
+ Pagination,
14
+ Pagination$inboundSchema,
15
+ Pagination$Outbound,
16
+ Pagination$outboundSchema,
17
+ } from "./pagination.js";
18
+
19
+ export type ListResourceCheckoutLink = {
20
+ items: Array<CheckoutLink>;
21
+ pagination: Pagination;
22
+ };
23
+
24
+ /** @internal */
25
+ export const ListResourceCheckoutLink$inboundSchema: z.ZodType<
26
+ ListResourceCheckoutLink,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ items: z.array(CheckoutLink$inboundSchema),
31
+ pagination: Pagination$inboundSchema,
32
+ });
33
+
34
+ /** @internal */
35
+ export type ListResourceCheckoutLink$Outbound = {
36
+ items: Array<CheckoutLink$Outbound>;
37
+ pagination: Pagination$Outbound;
38
+ };
39
+
40
+ /** @internal */
41
+ export const ListResourceCheckoutLink$outboundSchema: z.ZodType<
42
+ ListResourceCheckoutLink$Outbound,
43
+ z.ZodTypeDef,
44
+ ListResourceCheckoutLink
45
+ > = z.object({
46
+ items: z.array(CheckoutLink$outboundSchema),
47
+ pagination: Pagination$outboundSchema,
48
+ });
49
+
50
+ /**
51
+ * @internal
52
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
53
+ */
54
+ export namespace ListResourceCheckoutLink$ {
55
+ /** @deprecated use `ListResourceCheckoutLink$inboundSchema` instead. */
56
+ export const inboundSchema = ListResourceCheckoutLink$inboundSchema;
57
+ /** @deprecated use `ListResourceCheckoutLink$outboundSchema` instead. */
58
+ export const outboundSchema = ListResourceCheckoutLink$outboundSchema;
59
+ /** @deprecated use `ListResourceCheckoutLink$Outbound` instead. */
60
+ export type Outbound = ListResourceCheckoutLink$Outbound;
61
+ }
@@ -22,9 +22,6 @@ export type Metric = {
22
22
  * Human-readable name for the metric.
23
23
  */
24
24
  displayName: string;
25
- /**
26
- * Type of the metric, useful to know the unit or format of the value.
27
- */
28
25
  type: MetricType;
29
26
  };
30
27
 
@@ -15,23 +15,23 @@ import {
15
15
  */
16
16
  export type MetricsIntervalsLimits = {
17
17
  /**
18
- * Limits for the hour interval.
18
+ * Date interval limit to get metrics for a given interval.
19
19
  */
20
20
  hour: MetricsIntervalLimit;
21
21
  /**
22
- * Limits for the day interval.
22
+ * Date interval limit to get metrics for a given interval.
23
23
  */
24
24
  day: MetricsIntervalLimit;
25
25
  /**
26
- * Limits for the week interval.
26
+ * Date interval limit to get metrics for a given interval.
27
27
  */
28
28
  week: MetricsIntervalLimit;
29
29
  /**
30
- * Limits for the month interval.
30
+ * Date interval limit to get metrics for a given interval.
31
31
  */
32
32
  month: MetricsIntervalLimit;
33
33
  /**
34
- * Limits for the year interval.
34
+ * Date interval limit to get metrics for a given interval.
35
35
  */
36
36
  year: MetricsIntervalLimit;
37
37
  };
@@ -21,7 +21,7 @@ export type MetricsLimits = {
21
21
  */
22
22
  minDate: RFCDate;
23
23
  /**
24
- * Limits for each interval.
24
+ * Date interval limits to get metrics for each interval.
25
25
  */
26
26
  intervals: MetricsIntervalsLimits;
27
27
  };
@@ -24,9 +24,6 @@ export type MetricsResponse = {
24
24
  * List of data for each timestamp.
25
25
  */
26
26
  periods: Array<MetricPeriod>;
27
- /**
28
- * Information about the returned metrics.
29
- */
30
27
  metrics: Metrics;
31
28
  };
32
29
 
@@ -125,7 +125,7 @@ export const OAuth2Client$inboundSchema: z.ZodType<
125
125
  grant_types: z.array(GrantTypes$inboundSchema).optional(),
126
126
  response_types: z.array(ResponseTypes$inboundSchema).optional(),
127
127
  scope: z.string().default(
128
- "openid profile email user:read organizations:read organizations:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
128
+ "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
129
129
  ),
130
130
  client_name: z.string(),
131
131
  client_uri: z.nullable(z.string()).optional(),
@@ -193,7 +193,7 @@ export const OAuth2Client$outboundSchema: z.ZodType<
193
193
  grantTypes: z.array(GrantTypes$outboundSchema).optional(),
194
194
  responseTypes: z.array(ResponseTypes$outboundSchema).optional(),
195
195
  scope: z.string().default(
196
- "openid profile email user:read organizations:read organizations:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
196
+ "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
197
197
  ),
198
198
  clientName: z.string(),
199
199
  clientUri: z.nullable(z.string()).optional(),
@@ -131,7 +131,7 @@ export const OAuth2ClientConfiguration$inboundSchema: z.ZodType<
131
131
  response_types: z.array(OAuth2ClientConfigurationResponseTypes$inboundSchema)
132
132
  .optional(),
133
133
  scope: z.string().default(
134
- "openid profile email user:read organizations:read organizations:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
134
+ "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
135
135
  ),
136
136
  client_name: z.string(),
137
137
  client_uri: z.nullable(z.string()).optional(),
@@ -182,7 +182,7 @@ export const OAuth2ClientConfiguration$outboundSchema: z.ZodType<
182
182
  responseTypes: z.array(OAuth2ClientConfigurationResponseTypes$outboundSchema)
183
183
  .optional(),
184
184
  scope: z.string().default(
185
- "openid profile email user:read organizations:read organizations:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
185
+ "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
186
186
  ),
187
187
  clientName: z.string(),
188
188
  clientUri: z.nullable(z.string()).optional(),
@@ -135,7 +135,7 @@ export const OAuth2ClientConfigurationUpdate$inboundSchema: z.ZodType<
135
135
  OAuth2ClientConfigurationUpdateResponseTypes$inboundSchema,
136
136
  ).optional(),
137
137
  scope: z.string().default(
138
- "openid profile email user:read organizations:read organizations:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
138
+ "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
139
139
  ),
140
140
  client_name: z.string(),
141
141
  client_uri: z.nullable(z.string()).optional(),
@@ -189,7 +189,7 @@ export const OAuth2ClientConfigurationUpdate$outboundSchema: z.ZodType<
189
189
  OAuth2ClientConfigurationUpdateResponseTypes$outboundSchema,
190
190
  ).optional(),
191
191
  scope: z.string().default(
192
- "openid profile email user:read organizations:read organizations:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
192
+ "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write",
193
193
  ),
194
194
  clientName: z.string(),
195
195
  clientUri: z.nullable(z.string()).optional(),
@@ -4,6 +4,11 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ OrderBillingReason,
9
+ OrderBillingReason$inboundSchema,
10
+ OrderBillingReason$outboundSchema,
11
+ } from "./orderbillingreason.js";
7
12
  import {
8
13
  OrderProduct,
9
14
  OrderProduct$inboundSchema,
@@ -46,6 +51,7 @@ export type Order = {
46
51
  amount: number;
47
52
  taxAmount: number;
48
53
  currency: string;
54
+ billingReason: OrderBillingReason;
49
55
  userId: string;
50
56
  productId: string;
51
57
  productPriceId: string;
@@ -71,6 +77,7 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
71
77
  amount: z.number().int(),
72
78
  tax_amount: z.number().int(),
73
79
  currency: z.string(),
80
+ billing_reason: OrderBillingReason$inboundSchema,
74
81
  user_id: z.string(),
75
82
  product_id: z.string(),
76
83
  product_price_id: z.string(),
@@ -85,6 +92,7 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
85
92
  "created_at": "createdAt",
86
93
  "modified_at": "modifiedAt",
87
94
  "tax_amount": "taxAmount",
95
+ "billing_reason": "billingReason",
88
96
  "user_id": "userId",
89
97
  "product_id": "productId",
90
98
  "product_price_id": "productPriceId",
@@ -103,6 +111,7 @@ export type Order$Outbound = {
103
111
  amount: number;
104
112
  tax_amount: number;
105
113
  currency: string;
114
+ billing_reason: string;
106
115
  user_id: string;
107
116
  product_id: string;
108
117
  product_price_id: string;
@@ -127,6 +136,7 @@ export const Order$outboundSchema: z.ZodType<
127
136
  amount: z.number().int(),
128
137
  taxAmount: z.number().int(),
129
138
  currency: z.string(),
139
+ billingReason: OrderBillingReason$outboundSchema,
130
140
  userId: z.string(),
131
141
  productId: z.string(),
132
142
  productPriceId: z.string(),
@@ -141,6 +151,7 @@ export const Order$outboundSchema: z.ZodType<
141
151
  createdAt: "created_at",
142
152
  modifiedAt: "modified_at",
143
153
  taxAmount: "tax_amount",
154
+ billingReason: "billing_reason",
144
155
  userId: "user_id",
145
156
  productId: "product_id",
146
157
  productPriceId: "product_price_id",
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const OrderBillingReason = {
9
+ Purchase: "purchase",
10
+ SubscriptionCreate: "subscription_create",
11
+ SubscriptionCycle: "subscription_cycle",
12
+ SubscriptionUpdate: "subscription_update",
13
+ } as const;
14
+ export type OrderBillingReason = ClosedEnum<typeof OrderBillingReason>;
15
+
16
+ /** @internal */
17
+ export const OrderBillingReason$inboundSchema: z.ZodNativeEnum<
18
+ typeof OrderBillingReason
19
+ > = z.nativeEnum(OrderBillingReason);
20
+
21
+ /** @internal */
22
+ export const OrderBillingReason$outboundSchema: z.ZodNativeEnum<
23
+ typeof OrderBillingReason
24
+ > = OrderBillingReason$inboundSchema;
25
+
26
+ /**
27
+ * @internal
28
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
29
+ */
30
+ export namespace OrderBillingReason$ {
31
+ /** @deprecated use `OrderBillingReason$inboundSchema` instead. */
32
+ export const inboundSchema = OrderBillingReason$inboundSchema;
33
+ /** @deprecated use `OrderBillingReason$outboundSchema` instead. */
34
+ export const outboundSchema = OrderBillingReason$outboundSchema;
35
+ }
@@ -45,13 +45,7 @@ export type Pledge = {
45
45
  */
46
46
  amount: number;
47
47
  currency: string;
48
- /**
49
- * Current state of the pledge
50
- */
51
48
  state: PledgeState;
52
- /**
53
- * Type of pledge
54
- */
55
49
  type: PledgeType;
56
50
  /**
57
51
  * If and when the pledge was refunded to the pledger
@@ -61,9 +55,6 @@ export type Pledge = {
61
55
  * When the payout is scheduled to be made to the maintainers behind the issue. Disputes must be made before this date.
62
56
  */
63
57
  scheduledPayoutAt?: Date | null | undefined;
64
- /**
65
- * The issue that the pledge was made towards
66
- */
67
58
  issue: Issue;
68
59
  /**
69
60
  * The user or organization that made this pledge