@polar-sh/sdk 0.46.3 → 0.46.5

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 (383) hide show
  1. package/README.md +2 -1
  2. package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.d.ts +2 -1
  3. package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.js +3 -2
  5. package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.js.map +1 -1
  6. package/dist/commonjs/funcs/membersListMembers.js +1 -0
  7. package/dist/commonjs/funcs/membersListMembers.js.map +1 -1
  8. package/dist/commonjs/funcs/subscriptionsUpdate.d.ts +2 -1
  9. package/dist/commonjs/funcs/subscriptionsUpdate.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/subscriptionsUpdate.js +3 -2
  11. package/dist/commonjs/funcs/subscriptionsUpdate.js.map +1 -1
  12. package/dist/commonjs/lib/config.d.ts +3 -3
  13. package/dist/commonjs/lib/config.js +3 -3
  14. package/dist/commonjs/lib/files.d.ts +13 -0
  15. package/dist/commonjs/lib/files.d.ts.map +1 -1
  16. package/dist/commonjs/lib/files.js +19 -0
  17. package/dist/commonjs/lib/files.js.map +1 -1
  18. package/dist/commonjs/models/components/address.d.ts +5 -5
  19. package/dist/commonjs/models/components/address.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/address.js +6 -6
  21. package/dist/commonjs/models/components/address.js.map +1 -1
  22. package/dist/commonjs/models/components/addressinput.d.ts +4 -4
  23. package/dist/commonjs/models/components/addressinput.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/addressinput.js +4 -4
  25. package/dist/commonjs/models/components/addressinput.js.map +1 -1
  26. package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.d.ts +15 -0
  27. package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.js +2 -0
  29. package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.js.map +1 -1
  30. package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.d.ts +15 -0
  31. package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.js +2 -0
  33. package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.js.map +1 -1
  34. package/dist/commonjs/models/components/customersubscription.d.ts +5 -0
  35. package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/customersubscription.js +3 -0
  37. package/dist/commonjs/models/components/customersubscription.js.map +1 -1
  38. package/dist/commonjs/models/components/discountcreate.d.ts +2 -2
  39. package/dist/commonjs/models/components/discountcreate.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/discountcreate.js +2 -2
  41. package/dist/commonjs/models/components/discountcreate.js.map +1 -1
  42. package/dist/commonjs/models/components/discountfixedonceforeverduration.d.ts +12 -0
  43. package/dist/commonjs/models/components/discountfixedonceforeverduration.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/discountfixedonceforeverduration.js +1 -0
  45. package/dist/commonjs/models/components/discountfixedonceforeverduration.js.map +1 -1
  46. package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.d.ts +15 -0
  47. package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.js +2 -0
  49. package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.js.map +1 -1
  50. package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.d.ts +14 -5
  51. package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.d.ts.map +1 -1
  52. package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.js +3 -2
  53. package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.js.map +1 -1
  54. package/dist/commonjs/models/components/discountfixedrepeatduration.d.ts +12 -0
  55. package/dist/commonjs/models/components/discountfixedrepeatduration.d.ts.map +1 -1
  56. package/dist/commonjs/models/components/discountfixedrepeatduration.js +1 -0
  57. package/dist/commonjs/models/components/discountfixedrepeatduration.js.map +1 -1
  58. package/dist/commonjs/models/components/discountfixedrepeatdurationbase.d.ts +15 -0
  59. package/dist/commonjs/models/components/discountfixedrepeatdurationbase.d.ts.map +1 -1
  60. package/dist/commonjs/models/components/discountfixedrepeatdurationbase.js +2 -0
  61. package/dist/commonjs/models/components/discountfixedrepeatdurationbase.js.map +1 -1
  62. package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.d.ts +14 -5
  63. package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.d.ts.map +1 -1
  64. package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.js +3 -2
  65. package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.js.map +1 -1
  66. package/dist/commonjs/models/components/discountupdate.d.ts +12 -0
  67. package/dist/commonjs/models/components/discountupdate.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/discountupdate.js +1 -0
  69. package/dist/commonjs/models/components/discountupdate.js.map +1 -1
  70. package/dist/commonjs/models/components/metricperiod.d.ts +9 -9
  71. package/dist/commonjs/models/components/metricperiod.d.ts.map +1 -1
  72. package/dist/commonjs/models/components/metricperiod.js +15 -15
  73. package/dist/commonjs/models/components/metricperiod.js.map +1 -1
  74. package/dist/commonjs/models/components/metrics.d.ts +2 -2
  75. package/dist/commonjs/models/components/metrics.d.ts.map +1 -1
  76. package/dist/commonjs/models/components/metrics.js +4 -4
  77. package/dist/commonjs/models/components/metrics.js.map +1 -1
  78. package/dist/commonjs/models/components/metricstotals.d.ts +9 -9
  79. package/dist/commonjs/models/components/metricstotals.d.ts.map +1 -1
  80. package/dist/commonjs/models/components/metricstotals.js +15 -15
  81. package/dist/commonjs/models/components/metricstotals.js.map +1 -1
  82. package/dist/commonjs/models/components/organization.d.ts +262 -0
  83. package/dist/commonjs/models/components/organization.d.ts.map +1 -1
  84. package/dist/commonjs/models/components/organization.js +259 -1
  85. package/dist/commonjs/models/components/organization.js.map +1 -1
  86. package/dist/commonjs/models/components/organizationcompanylegalentityschema.d.ts +14 -0
  87. package/dist/commonjs/models/components/organizationcompanylegalentityschema.d.ts.map +1 -0
  88. package/dist/commonjs/models/components/organizationcompanylegalentityschema.js +55 -0
  89. package/dist/commonjs/models/components/organizationcompanylegalentityschema.js.map +1 -0
  90. package/dist/commonjs/models/components/organizationcreate.d.ts +265 -0
  91. package/dist/commonjs/models/components/organizationcreate.d.ts.map +1 -1
  92. package/dist/commonjs/models/components/organizationcreate.js +266 -1
  93. package/dist/commonjs/models/components/organizationcreate.js.map +1 -1
  94. package/dist/commonjs/models/components/organizationcustomeremailsettings.d.ts +4 -0
  95. package/dist/commonjs/models/components/organizationcustomeremailsettings.d.ts.map +1 -1
  96. package/dist/commonjs/models/components/organizationcustomeremailsettings.js +8 -0
  97. package/dist/commonjs/models/components/organizationcustomeremailsettings.js.map +1 -1
  98. package/dist/commonjs/models/components/organizationdetails.d.ts +7 -7
  99. package/dist/commonjs/models/components/organizationdetails.d.ts.map +1 -1
  100. package/dist/commonjs/models/components/organizationdetails.js +4 -4
  101. package/dist/commonjs/models/components/organizationdetails.js.map +1 -1
  102. package/dist/commonjs/models/components/organizationindividuallegalentityschema.d.ts +12 -0
  103. package/dist/commonjs/models/components/organizationindividuallegalentityschema.d.ts.map +1 -0
  104. package/dist/commonjs/models/components/organizationindividuallegalentityschema.js +49 -0
  105. package/dist/commonjs/models/components/organizationindividuallegalentityschema.js.map +1 -0
  106. package/dist/commonjs/models/components/organizationupdate.d.ts +255 -0
  107. package/dist/commonjs/models/components/organizationupdate.d.ts.map +1 -1
  108. package/dist/commonjs/models/components/organizationupdate.js +250 -1
  109. package/dist/commonjs/models/components/organizationupdate.js.map +1 -1
  110. package/dist/commonjs/models/components/pendingsubscriptionupdate.d.ts +48 -0
  111. package/dist/commonjs/models/components/pendingsubscriptionupdate.d.ts.map +1 -0
  112. package/dist/commonjs/models/components/pendingsubscriptionupdate.js +83 -0
  113. package/dist/commonjs/models/components/pendingsubscriptionupdate.js.map +1 -0
  114. package/dist/commonjs/models/components/presentmentcurrency.d.ts +27 -1
  115. package/dist/commonjs/models/components/presentmentcurrency.d.ts.map +1 -1
  116. package/dist/commonjs/models/components/presentmentcurrency.js +27 -1
  117. package/dist/commonjs/models/components/presentmentcurrency.js.map +1 -1
  118. package/dist/commonjs/models/components/productpricefixedcreate.d.ts +34 -0
  119. package/dist/commonjs/models/components/productpricefixedcreate.d.ts.map +1 -1
  120. package/dist/commonjs/models/components/productpricefixedcreate.js.map +1 -1
  121. package/dist/commonjs/models/components/seatassign.d.ts +2 -2
  122. package/dist/commonjs/models/components/subscription.d.ts +6 -0
  123. package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
  124. package/dist/commonjs/models/components/subscription.js +5 -0
  125. package/dist/commonjs/models/components/subscription.js.map +1 -1
  126. package/dist/commonjs/models/components/subscriptionprorationbehavior.d.ts +1 -0
  127. package/dist/commonjs/models/components/subscriptionprorationbehavior.d.ts.map +1 -1
  128. package/dist/commonjs/models/components/subscriptionprorationbehavior.js +1 -0
  129. package/dist/commonjs/models/components/subscriptionprorationbehavior.js.map +1 -1
  130. package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.d.ts +11 -0
  131. package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.d.ts.map +1 -0
  132. package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.js +57 -0
  133. package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.js.map +1 -0
  134. package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.d.ts +11 -0
  135. package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.d.ts.map +1 -0
  136. package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.js +57 -0
  137. package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.js.map +1 -0
  138. package/dist/commonjs/models/components/subscriptionupdatedevent.d.ts +75 -0
  139. package/dist/commonjs/models/components/subscriptionupdatedevent.d.ts.map +1 -0
  140. package/dist/commonjs/models/components/subscriptionupdatedevent.js +99 -0
  141. package/dist/commonjs/models/components/subscriptionupdatedevent.js.map +1 -0
  142. package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.d.ts +13 -0
  143. package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.d.ts.map +1 -0
  144. package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.js +60 -0
  145. package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.js.map +1 -0
  146. package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.d.ts +13 -0
  147. package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.d.ts.map +1 -0
  148. package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.js +59 -0
  149. package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.js.map +1 -0
  150. package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.d.ts +11 -0
  151. package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.d.ts.map +1 -0
  152. package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.js +57 -0
  153. package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.js.map +1 -0
  154. package/dist/commonjs/models/components/systemevent.d.ts +2 -1
  155. package/dist/commonjs/models/components/systemevent.d.ts.map +1 -1
  156. package/dist/commonjs/models/components/systemevent.js +2 -0
  157. package/dist/commonjs/models/components/systemevent.js.map +1 -1
  158. package/dist/commonjs/models/errors/paymentfailed.d.ts +20 -0
  159. package/dist/commonjs/models/errors/paymentfailed.d.ts.map +1 -0
  160. package/dist/commonjs/models/errors/paymentfailed.js +69 -0
  161. package/dist/commonjs/models/errors/paymentfailed.js.map +1 -0
  162. package/dist/commonjs/models/operations/memberslistmembers.d.ts +6 -0
  163. package/dist/commonjs/models/operations/memberslistmembers.d.ts.map +1 -1
  164. package/dist/commonjs/models/operations/memberslistmembers.js +2 -0
  165. package/dist/commonjs/models/operations/memberslistmembers.js.map +1 -1
  166. package/dist/commonjs/webhooks.d.ts +1 -1
  167. package/dist/commonjs/webhooks.d.ts.map +1 -1
  168. package/dist/commonjs/webhooks.js +15 -0
  169. package/dist/commonjs/webhooks.js.map +1 -1
  170. package/dist/esm/funcs/customerPortalSubscriptionsUpdate.d.ts +2 -1
  171. package/dist/esm/funcs/customerPortalSubscriptionsUpdate.d.ts.map +1 -1
  172. package/dist/esm/funcs/customerPortalSubscriptionsUpdate.js +3 -2
  173. package/dist/esm/funcs/customerPortalSubscriptionsUpdate.js.map +1 -1
  174. package/dist/esm/funcs/membersListMembers.js +1 -0
  175. package/dist/esm/funcs/membersListMembers.js.map +1 -1
  176. package/dist/esm/funcs/subscriptionsUpdate.d.ts +2 -1
  177. package/dist/esm/funcs/subscriptionsUpdate.d.ts.map +1 -1
  178. package/dist/esm/funcs/subscriptionsUpdate.js +3 -2
  179. package/dist/esm/funcs/subscriptionsUpdate.js.map +1 -1
  180. package/dist/esm/lib/config.d.ts +3 -3
  181. package/dist/esm/lib/config.js +3 -3
  182. package/dist/esm/lib/files.d.ts +13 -0
  183. package/dist/esm/lib/files.d.ts.map +1 -1
  184. package/dist/esm/lib/files.js +18 -0
  185. package/dist/esm/lib/files.js.map +1 -1
  186. package/dist/esm/models/components/address.d.ts +5 -5
  187. package/dist/esm/models/components/address.d.ts.map +1 -1
  188. package/dist/esm/models/components/address.js +5 -5
  189. package/dist/esm/models/components/address.js.map +1 -1
  190. package/dist/esm/models/components/addressinput.d.ts +4 -4
  191. package/dist/esm/models/components/addressinput.d.ts.map +1 -1
  192. package/dist/esm/models/components/addressinput.js +3 -3
  193. package/dist/esm/models/components/addressinput.js.map +1 -1
  194. package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.d.ts +15 -0
  195. package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.d.ts.map +1 -1
  196. package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.js +2 -0
  197. package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.js.map +1 -1
  198. package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.d.ts +15 -0
  199. package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.d.ts.map +1 -1
  200. package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.js +2 -0
  201. package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.js.map +1 -1
  202. package/dist/esm/models/components/customersubscription.d.ts +5 -0
  203. package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
  204. package/dist/esm/models/components/customersubscription.js +3 -0
  205. package/dist/esm/models/components/customersubscription.js.map +1 -1
  206. package/dist/esm/models/components/discountcreate.d.ts +2 -2
  207. package/dist/esm/models/components/discountcreate.d.ts.map +1 -1
  208. package/dist/esm/models/components/discountcreate.js +2 -2
  209. package/dist/esm/models/components/discountcreate.js.map +1 -1
  210. package/dist/esm/models/components/discountfixedonceforeverduration.d.ts +12 -0
  211. package/dist/esm/models/components/discountfixedonceforeverduration.d.ts.map +1 -1
  212. package/dist/esm/models/components/discountfixedonceforeverduration.js +1 -0
  213. package/dist/esm/models/components/discountfixedonceforeverduration.js.map +1 -1
  214. package/dist/esm/models/components/discountfixedonceforeverdurationbase.d.ts +15 -0
  215. package/dist/esm/models/components/discountfixedonceforeverdurationbase.d.ts.map +1 -1
  216. package/dist/esm/models/components/discountfixedonceforeverdurationbase.js +2 -0
  217. package/dist/esm/models/components/discountfixedonceforeverdurationbase.js.map +1 -1
  218. package/dist/esm/models/components/discountfixedonceforeverdurationcreate.d.ts +14 -5
  219. package/dist/esm/models/components/discountfixedonceforeverdurationcreate.d.ts.map +1 -1
  220. package/dist/esm/models/components/discountfixedonceforeverdurationcreate.js +3 -2
  221. package/dist/esm/models/components/discountfixedonceforeverdurationcreate.js.map +1 -1
  222. package/dist/esm/models/components/discountfixedrepeatduration.d.ts +12 -0
  223. package/dist/esm/models/components/discountfixedrepeatduration.d.ts.map +1 -1
  224. package/dist/esm/models/components/discountfixedrepeatduration.js +1 -0
  225. package/dist/esm/models/components/discountfixedrepeatduration.js.map +1 -1
  226. package/dist/esm/models/components/discountfixedrepeatdurationbase.d.ts +15 -0
  227. package/dist/esm/models/components/discountfixedrepeatdurationbase.d.ts.map +1 -1
  228. package/dist/esm/models/components/discountfixedrepeatdurationbase.js +2 -0
  229. package/dist/esm/models/components/discountfixedrepeatdurationbase.js.map +1 -1
  230. package/dist/esm/models/components/discountfixedrepeatdurationcreate.d.ts +14 -5
  231. package/dist/esm/models/components/discountfixedrepeatdurationcreate.d.ts.map +1 -1
  232. package/dist/esm/models/components/discountfixedrepeatdurationcreate.js +3 -2
  233. package/dist/esm/models/components/discountfixedrepeatdurationcreate.js.map +1 -1
  234. package/dist/esm/models/components/discountupdate.d.ts +12 -0
  235. package/dist/esm/models/components/discountupdate.d.ts.map +1 -1
  236. package/dist/esm/models/components/discountupdate.js +1 -0
  237. package/dist/esm/models/components/discountupdate.js.map +1 -1
  238. package/dist/esm/models/components/metricperiod.d.ts +9 -9
  239. package/dist/esm/models/components/metricperiod.d.ts.map +1 -1
  240. package/dist/esm/models/components/metricperiod.js +12 -12
  241. package/dist/esm/models/components/metricperiod.js.map +1 -1
  242. package/dist/esm/models/components/metrics.d.ts +2 -2
  243. package/dist/esm/models/components/metrics.d.ts.map +1 -1
  244. package/dist/esm/models/components/metrics.js +4 -4
  245. package/dist/esm/models/components/metrics.js.map +1 -1
  246. package/dist/esm/models/components/metricstotals.d.ts +9 -9
  247. package/dist/esm/models/components/metricstotals.d.ts.map +1 -1
  248. package/dist/esm/models/components/metricstotals.js +12 -12
  249. package/dist/esm/models/components/metricstotals.js.map +1 -1
  250. package/dist/esm/models/components/organization.d.ts +262 -0
  251. package/dist/esm/models/components/organization.d.ts.map +1 -1
  252. package/dist/esm/models/components/organization.js +258 -0
  253. package/dist/esm/models/components/organization.js.map +1 -1
  254. package/dist/esm/models/components/organizationcompanylegalentityschema.d.ts +14 -0
  255. package/dist/esm/models/components/organizationcompanylegalentityschema.d.ts.map +1 -0
  256. package/dist/esm/models/components/organizationcompanylegalentityschema.js +18 -0
  257. package/dist/esm/models/components/organizationcompanylegalentityschema.js.map +1 -0
  258. package/dist/esm/models/components/organizationcreate.d.ts +265 -0
  259. package/dist/esm/models/components/organizationcreate.d.ts.map +1 -1
  260. package/dist/esm/models/components/organizationcreate.js +264 -0
  261. package/dist/esm/models/components/organizationcreate.js.map +1 -1
  262. package/dist/esm/models/components/organizationcustomeremailsettings.d.ts +4 -0
  263. package/dist/esm/models/components/organizationcustomeremailsettings.d.ts.map +1 -1
  264. package/dist/esm/models/components/organizationcustomeremailsettings.js +8 -0
  265. package/dist/esm/models/components/organizationcustomeremailsettings.js.map +1 -1
  266. package/dist/esm/models/components/organizationdetails.d.ts +7 -7
  267. package/dist/esm/models/components/organizationdetails.d.ts.map +1 -1
  268. package/dist/esm/models/components/organizationdetails.js +4 -4
  269. package/dist/esm/models/components/organizationdetails.js.map +1 -1
  270. package/dist/esm/models/components/organizationindividuallegalentityschema.d.ts +12 -0
  271. package/dist/esm/models/components/organizationindividuallegalentityschema.d.ts.map +1 -0
  272. package/dist/esm/models/components/organizationindividuallegalentityschema.js +12 -0
  273. package/dist/esm/models/components/organizationindividuallegalentityschema.js.map +1 -0
  274. package/dist/esm/models/components/organizationupdate.d.ts +255 -0
  275. package/dist/esm/models/components/organizationupdate.d.ts.map +1 -1
  276. package/dist/esm/models/components/organizationupdate.js +249 -0
  277. package/dist/esm/models/components/organizationupdate.js.map +1 -1
  278. package/dist/esm/models/components/pendingsubscriptionupdate.d.ts +48 -0
  279. package/dist/esm/models/components/pendingsubscriptionupdate.d.ts.map +1 -0
  280. package/dist/esm/models/components/pendingsubscriptionupdate.js +45 -0
  281. package/dist/esm/models/components/pendingsubscriptionupdate.js.map +1 -0
  282. package/dist/esm/models/components/presentmentcurrency.d.ts +27 -1
  283. package/dist/esm/models/components/presentmentcurrency.d.ts.map +1 -1
  284. package/dist/esm/models/components/presentmentcurrency.js +27 -1
  285. package/dist/esm/models/components/presentmentcurrency.js.map +1 -1
  286. package/dist/esm/models/components/productpricefixedcreate.d.ts +34 -0
  287. package/dist/esm/models/components/productpricefixedcreate.d.ts.map +1 -1
  288. package/dist/esm/models/components/productpricefixedcreate.js.map +1 -1
  289. package/dist/esm/models/components/seatassign.d.ts +2 -2
  290. package/dist/esm/models/components/subscription.d.ts +6 -0
  291. package/dist/esm/models/components/subscription.d.ts.map +1 -1
  292. package/dist/esm/models/components/subscription.js +5 -0
  293. package/dist/esm/models/components/subscription.js.map +1 -1
  294. package/dist/esm/models/components/subscriptionprorationbehavior.d.ts +1 -0
  295. package/dist/esm/models/components/subscriptionprorationbehavior.d.ts.map +1 -1
  296. package/dist/esm/models/components/subscriptionprorationbehavior.js +1 -0
  297. package/dist/esm/models/components/subscriptionprorationbehavior.js.map +1 -1
  298. package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.d.ts +11 -0
  299. package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.d.ts.map +1 -0
  300. package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.js +20 -0
  301. package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.js.map +1 -0
  302. package/dist/esm/models/components/subscriptionupdateddiscountmetadata.d.ts +11 -0
  303. package/dist/esm/models/components/subscriptionupdateddiscountmetadata.d.ts.map +1 -0
  304. package/dist/esm/models/components/subscriptionupdateddiscountmetadata.js +20 -0
  305. package/dist/esm/models/components/subscriptionupdateddiscountmetadata.js.map +1 -0
  306. package/dist/esm/models/components/subscriptionupdatedevent.d.ts +75 -0
  307. package/dist/esm/models/components/subscriptionupdatedevent.d.ts.map +1 -0
  308. package/dist/esm/models/components/subscriptionupdatedevent.js +61 -0
  309. package/dist/esm/models/components/subscriptionupdatedevent.js.map +1 -0
  310. package/dist/esm/models/components/subscriptionupdatedproductmetadata.d.ts +13 -0
  311. package/dist/esm/models/components/subscriptionupdatedproductmetadata.d.ts.map +1 -0
  312. package/dist/esm/models/components/subscriptionupdatedproductmetadata.js +23 -0
  313. package/dist/esm/models/components/subscriptionupdatedproductmetadata.js.map +1 -0
  314. package/dist/esm/models/components/subscriptionupdatedseatsmetadata.d.ts +13 -0
  315. package/dist/esm/models/components/subscriptionupdatedseatsmetadata.d.ts.map +1 -0
  316. package/dist/esm/models/components/subscriptionupdatedseatsmetadata.js +22 -0
  317. package/dist/esm/models/components/subscriptionupdatedseatsmetadata.js.map +1 -0
  318. package/dist/esm/models/components/subscriptionupdatedtrialmetadata.d.ts +11 -0
  319. package/dist/esm/models/components/subscriptionupdatedtrialmetadata.d.ts.map +1 -0
  320. package/dist/esm/models/components/subscriptionupdatedtrialmetadata.js +20 -0
  321. package/dist/esm/models/components/subscriptionupdatedtrialmetadata.js.map +1 -0
  322. package/dist/esm/models/components/systemevent.d.ts +2 -1
  323. package/dist/esm/models/components/systemevent.d.ts.map +1 -1
  324. package/dist/esm/models/components/systemevent.js +2 -0
  325. package/dist/esm/models/components/systemevent.js.map +1 -1
  326. package/dist/esm/models/errors/paymentfailed.d.ts +20 -0
  327. package/dist/esm/models/errors/paymentfailed.d.ts.map +1 -0
  328. package/dist/esm/models/errors/paymentfailed.js +32 -0
  329. package/dist/esm/models/errors/paymentfailed.js.map +1 -0
  330. package/dist/esm/models/operations/memberslistmembers.d.ts +6 -0
  331. package/dist/esm/models/operations/memberslistmembers.d.ts.map +1 -1
  332. package/dist/esm/models/operations/memberslistmembers.js +2 -0
  333. package/dist/esm/models/operations/memberslistmembers.js.map +1 -1
  334. package/dist/esm/webhooks.d.ts +1 -1
  335. package/dist/esm/webhooks.d.ts.map +1 -1
  336. package/dist/esm/webhooks.js +15 -0
  337. package/dist/esm/webhooks.js.map +1 -1
  338. package/jsr.json +1 -1
  339. package/package.json +1 -1
  340. package/src/funcs/customerPortalSubscriptionsUpdate.ts +9 -1
  341. package/src/funcs/membersListMembers.ts +1 -0
  342. package/src/funcs/subscriptionsUpdate.ts +9 -1
  343. package/src/lib/config.ts +3 -3
  344. package/src/lib/files.ts +22 -0
  345. package/src/models/components/address.ts +11 -11
  346. package/src/models/components/addressinput.ts +9 -7
  347. package/src/models/components/checkoutdiscountfixedonceforeverduration.ts +13 -0
  348. package/src/models/components/checkoutdiscountfixedrepeatduration.ts +13 -0
  349. package/src/models/components/customersubscription.ts +10 -0
  350. package/src/models/components/discountcreate.ts +8 -8
  351. package/src/models/components/discountfixedonceforeverduration.ts +11 -0
  352. package/src/models/components/discountfixedonceforeverdurationbase.ts +13 -0
  353. package/src/models/components/discountfixedonceforeverdurationcreate.ts +13 -7
  354. package/src/models/components/discountfixedrepeatduration.ts +11 -0
  355. package/src/models/components/discountfixedrepeatdurationbase.ts +13 -0
  356. package/src/models/components/discountfixedrepeatdurationcreate.ts +13 -7
  357. package/src/models/components/discountupdate.ts +9 -0
  358. package/src/models/components/metricperiod.ts +31 -31
  359. package/src/models/components/metrics.ts +6 -6
  360. package/src/models/components/metricstotals.ts +29 -29
  361. package/src/models/components/organization.ts +273 -0
  362. package/src/models/components/organizationcompanylegalentityschema.ts +43 -0
  363. package/src/models/components/organizationcreate.ts +311 -0
  364. package/src/models/components/organizationcustomeremailsettings.ts +14 -0
  365. package/src/models/components/organizationdetails.ts +11 -11
  366. package/src/models/components/organizationindividuallegalentityschema.ts +34 -0
  367. package/src/models/components/organizationupdate.ts +262 -0
  368. package/src/models/components/pendingsubscriptionupdate.ts +119 -0
  369. package/src/models/components/presentmentcurrency.ts +27 -1
  370. package/src/models/components/productpricefixedcreate.ts +34 -0
  371. package/src/models/components/seatassign.ts +2 -2
  372. package/src/models/components/subscription.ts +15 -0
  373. package/src/models/components/subscriptionprorationbehavior.ts +1 -0
  374. package/src/models/components/subscriptionupdatedbillingperiodmetadata.ts +45 -0
  375. package/src/models/components/subscriptionupdateddiscountmetadata.ts +42 -0
  376. package/src/models/components/subscriptionupdatedevent.ts +177 -0
  377. package/src/models/components/subscriptionupdatedproductmetadata.ts +49 -0
  378. package/src/models/components/subscriptionupdatedseatsmetadata.ts +47 -0
  379. package/src/models/components/subscriptionupdatedtrialmetadata.ts +41 -0
  380. package/src/models/components/systemevent.ts +7 -1
  381. package/src/models/errors/paymentfailed.ts +55 -0
  382. package/src/models/operations/memberslistmembers.ts +10 -0
  383. package/src/webhooks.ts +15 -0
@@ -0,0 +1,177 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { smartUnion } from "../../types/smartUnion.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import { Customer, Customer$inboundSchema } from "./customer.js";
12
+ import {
13
+ SubscriptionUpdatedBillingPeriodMetadata,
14
+ SubscriptionUpdatedBillingPeriodMetadata$inboundSchema,
15
+ } from "./subscriptionupdatedbillingperiodmetadata.js";
16
+ import {
17
+ SubscriptionUpdatedDiscountMetadata,
18
+ SubscriptionUpdatedDiscountMetadata$inboundSchema,
19
+ } from "./subscriptionupdateddiscountmetadata.js";
20
+ import {
21
+ SubscriptionUpdatedProductMetadata,
22
+ SubscriptionUpdatedProductMetadata$inboundSchema,
23
+ } from "./subscriptionupdatedproductmetadata.js";
24
+ import {
25
+ SubscriptionUpdatedSeatsMetadata,
26
+ SubscriptionUpdatedSeatsMetadata$inboundSchema,
27
+ } from "./subscriptionupdatedseatsmetadata.js";
28
+ import {
29
+ SubscriptionUpdatedTrialMetadata,
30
+ SubscriptionUpdatedTrialMetadata$inboundSchema,
31
+ } from "./subscriptionupdatedtrialmetadata.js";
32
+
33
+ export type SubscriptionUpdatedEventMetadata =
34
+ | SubscriptionUpdatedProductMetadata
35
+ | SubscriptionUpdatedSeatsMetadata
36
+ | SubscriptionUpdatedDiscountMetadata
37
+ | SubscriptionUpdatedTrialMetadata
38
+ | SubscriptionUpdatedBillingPeriodMetadata;
39
+
40
+ /**
41
+ * An event created by Polar when a subscription is updated.
42
+ */
43
+ export type SubscriptionUpdatedEvent = {
44
+ /**
45
+ * The ID of the object.
46
+ */
47
+ id: string;
48
+ /**
49
+ * The timestamp of the event.
50
+ */
51
+ timestamp: Date;
52
+ /**
53
+ * The ID of the organization owning the event.
54
+ */
55
+ organizationId: string;
56
+ /**
57
+ * ID of the customer in your Polar organization associated with the event.
58
+ */
59
+ customerId: string | null;
60
+ /**
61
+ * The customer associated with the event.
62
+ */
63
+ customer: Customer | null;
64
+ /**
65
+ * ID of the customer in your system associated with the event.
66
+ */
67
+ externalCustomerId: string | null;
68
+ /**
69
+ * ID of the member within the customer's organization who performed the action inside B2B.
70
+ */
71
+ memberId?: string | null | undefined;
72
+ /**
73
+ * ID of the member in your system within the customer's organization who performed the action inside B2B.
74
+ */
75
+ externalMemberId?: string | null | undefined;
76
+ /**
77
+ * Number of direct child events linked to this event.
78
+ */
79
+ childCount: number;
80
+ /**
81
+ * The ID of the parent event.
82
+ */
83
+ parentId?: string | null | undefined;
84
+ /**
85
+ * Human readable label of the event type.
86
+ */
87
+ label: string;
88
+ /**
89
+ * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
90
+ */
91
+ source: "system";
92
+ /**
93
+ * The name of the event.
94
+ */
95
+ name: "subscription.updated";
96
+ metadata:
97
+ | SubscriptionUpdatedProductMetadata
98
+ | SubscriptionUpdatedSeatsMetadata
99
+ | SubscriptionUpdatedDiscountMetadata
100
+ | SubscriptionUpdatedTrialMetadata
101
+ | SubscriptionUpdatedBillingPeriodMetadata;
102
+ };
103
+
104
+ /** @internal */
105
+ export const SubscriptionUpdatedEventMetadata$inboundSchema: z.ZodMiniType<
106
+ SubscriptionUpdatedEventMetadata,
107
+ unknown
108
+ > = smartUnion([
109
+ SubscriptionUpdatedProductMetadata$inboundSchema,
110
+ SubscriptionUpdatedSeatsMetadata$inboundSchema,
111
+ SubscriptionUpdatedDiscountMetadata$inboundSchema,
112
+ SubscriptionUpdatedTrialMetadata$inboundSchema,
113
+ SubscriptionUpdatedBillingPeriodMetadata$inboundSchema,
114
+ ]);
115
+
116
+ export function subscriptionUpdatedEventMetadataFromJSON(
117
+ jsonString: string,
118
+ ): SafeParseResult<SubscriptionUpdatedEventMetadata, SDKValidationError> {
119
+ return safeParse(
120
+ jsonString,
121
+ (x) => SubscriptionUpdatedEventMetadata$inboundSchema.parse(JSON.parse(x)),
122
+ `Failed to parse 'SubscriptionUpdatedEventMetadata' from JSON`,
123
+ );
124
+ }
125
+
126
+ /** @internal */
127
+ export const SubscriptionUpdatedEvent$inboundSchema: z.ZodMiniType<
128
+ SubscriptionUpdatedEvent,
129
+ unknown
130
+ > = z.pipe(
131
+ z.object({
132
+ id: z.string(),
133
+ timestamp: z.pipe(
134
+ z.iso.datetime({ offset: true }),
135
+ z.transform(v => new Date(v)),
136
+ ),
137
+ organization_id: z.string(),
138
+ customer_id: z.nullable(z.string()),
139
+ customer: z.nullable(Customer$inboundSchema),
140
+ external_customer_id: z.nullable(z.string()),
141
+ member_id: z.optional(z.nullable(z.string())),
142
+ external_member_id: z.optional(z.nullable(z.string())),
143
+ child_count: z._default(z.int(), 0),
144
+ parent_id: z.optional(z.nullable(z.string())),
145
+ label: z.string(),
146
+ source: z.literal("system"),
147
+ name: z.literal("subscription.updated"),
148
+ metadata: smartUnion([
149
+ SubscriptionUpdatedProductMetadata$inboundSchema,
150
+ SubscriptionUpdatedSeatsMetadata$inboundSchema,
151
+ SubscriptionUpdatedDiscountMetadata$inboundSchema,
152
+ SubscriptionUpdatedTrialMetadata$inboundSchema,
153
+ SubscriptionUpdatedBillingPeriodMetadata$inboundSchema,
154
+ ]),
155
+ }),
156
+ z.transform((v) => {
157
+ return remap$(v, {
158
+ "organization_id": "organizationId",
159
+ "customer_id": "customerId",
160
+ "external_customer_id": "externalCustomerId",
161
+ "member_id": "memberId",
162
+ "external_member_id": "externalMemberId",
163
+ "child_count": "childCount",
164
+ "parent_id": "parentId",
165
+ });
166
+ }),
167
+ );
168
+
169
+ export function subscriptionUpdatedEventFromJSON(
170
+ jsonString: string,
171
+ ): SafeParseResult<SubscriptionUpdatedEvent, SDKValidationError> {
172
+ return safeParse(
173
+ jsonString,
174
+ (x) => SubscriptionUpdatedEvent$inboundSchema.parse(JSON.parse(x)),
175
+ `Failed to parse 'SubscriptionUpdatedEvent' from JSON`,
176
+ );
177
+ }
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ SubscriptionProrationBehavior,
12
+ SubscriptionProrationBehavior$inboundSchema,
13
+ } from "./subscriptionprorationbehavior.js";
14
+
15
+ export type SubscriptionUpdatedProductMetadata = {
16
+ subscriptionId: string;
17
+ productId: string;
18
+ prorationBehavior: SubscriptionProrationBehavior;
19
+ };
20
+
21
+ /** @internal */
22
+ export const SubscriptionUpdatedProductMetadata$inboundSchema: z.ZodMiniType<
23
+ SubscriptionUpdatedProductMetadata,
24
+ unknown
25
+ > = z.pipe(
26
+ z.object({
27
+ subscription_id: z.string(),
28
+ product_id: z.string(),
29
+ proration_behavior: SubscriptionProrationBehavior$inboundSchema,
30
+ }),
31
+ z.transform((v) => {
32
+ return remap$(v, {
33
+ "subscription_id": "subscriptionId",
34
+ "product_id": "productId",
35
+ "proration_behavior": "prorationBehavior",
36
+ });
37
+ }),
38
+ );
39
+
40
+ export function subscriptionUpdatedProductMetadataFromJSON(
41
+ jsonString: string,
42
+ ): SafeParseResult<SubscriptionUpdatedProductMetadata, SDKValidationError> {
43
+ return safeParse(
44
+ jsonString,
45
+ (x) =>
46
+ SubscriptionUpdatedProductMetadata$inboundSchema.parse(JSON.parse(x)),
47
+ `Failed to parse 'SubscriptionUpdatedProductMetadata' from JSON`,
48
+ );
49
+ }
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ SubscriptionProrationBehavior,
12
+ SubscriptionProrationBehavior$inboundSchema,
13
+ } from "./subscriptionprorationbehavior.js";
14
+
15
+ export type SubscriptionUpdatedSeatsMetadata = {
16
+ subscriptionId: string;
17
+ seats: number;
18
+ prorationBehavior: SubscriptionProrationBehavior;
19
+ };
20
+
21
+ /** @internal */
22
+ export const SubscriptionUpdatedSeatsMetadata$inboundSchema: z.ZodMiniType<
23
+ SubscriptionUpdatedSeatsMetadata,
24
+ unknown
25
+ > = z.pipe(
26
+ z.object({
27
+ subscription_id: z.string(),
28
+ seats: z.int(),
29
+ proration_behavior: SubscriptionProrationBehavior$inboundSchema,
30
+ }),
31
+ z.transform((v) => {
32
+ return remap$(v, {
33
+ "subscription_id": "subscriptionId",
34
+ "proration_behavior": "prorationBehavior",
35
+ });
36
+ }),
37
+ );
38
+
39
+ export function subscriptionUpdatedSeatsMetadataFromJSON(
40
+ jsonString: string,
41
+ ): SafeParseResult<SubscriptionUpdatedSeatsMetadata, SDKValidationError> {
42
+ return safeParse(
43
+ jsonString,
44
+ (x) => SubscriptionUpdatedSeatsMetadata$inboundSchema.parse(JSON.parse(x)),
45
+ `Failed to parse 'SubscriptionUpdatedSeatsMetadata' from JSON`,
46
+ );
47
+ }
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type SubscriptionUpdatedTrialMetadata = {
12
+ subscriptionId: string;
13
+ trialEnd: string;
14
+ };
15
+
16
+ /** @internal */
17
+ export const SubscriptionUpdatedTrialMetadata$inboundSchema: z.ZodMiniType<
18
+ SubscriptionUpdatedTrialMetadata,
19
+ unknown
20
+ > = z.pipe(
21
+ z.object({
22
+ subscription_id: z.string(),
23
+ trial_end: z.string(),
24
+ }),
25
+ z.transform((v) => {
26
+ return remap$(v, {
27
+ "subscription_id": "subscriptionId",
28
+ "trial_end": "trialEnd",
29
+ });
30
+ }),
31
+ );
32
+
33
+ export function subscriptionUpdatedTrialMetadataFromJSON(
34
+ jsonString: string,
35
+ ): SafeParseResult<SubscriptionUpdatedTrialMetadata, SDKValidationError> {
36
+ return safeParse(
37
+ jsonString,
38
+ (x) => SubscriptionUpdatedTrialMetadata$inboundSchema.parse(JSON.parse(x)),
39
+ `Failed to parse 'SubscriptionUpdatedTrialMetadata' from JSON`,
40
+ );
41
+ }
@@ -110,6 +110,10 @@ import {
110
110
  SubscriptionUncanceledEvent,
111
111
  SubscriptionUncanceledEvent$inboundSchema,
112
112
  } from "./subscriptionuncanceledevent.js";
113
+ import {
114
+ SubscriptionUpdatedEvent,
115
+ SubscriptionUpdatedEvent$inboundSchema,
116
+ } from "./subscriptionupdatedevent.js";
113
117
 
114
118
  export type SystemEvent =
115
119
  | BalanceCreditOrderEvent
@@ -137,7 +141,8 @@ export type SystemEvent =
137
141
  | SubscriptionProductUpdatedEvent
138
142
  | SubscriptionRevokedEvent
139
143
  | SubscriptionSeatsUpdatedEvent
140
- | SubscriptionUncanceledEvent;
144
+ | SubscriptionUncanceledEvent
145
+ | SubscriptionUpdatedEvent;
141
146
 
142
147
  /** @internal */
143
148
  export const SystemEvent$inboundSchema: z.ZodMiniType<SystemEvent, unknown> = z
@@ -168,6 +173,7 @@ export const SystemEvent$inboundSchema: z.ZodMiniType<SystemEvent, unknown> = z
168
173
  SubscriptionRevokedEvent$inboundSchema,
169
174
  SubscriptionSeatsUpdatedEvent$inboundSchema,
170
175
  SubscriptionUncanceledEvent$inboundSchema,
176
+ SubscriptionUpdatedEvent$inboundSchema,
171
177
  ]);
172
178
 
173
179
  export function systemEventFromJSON(
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { PolarError } from "./polarerror.js";
7
+
8
+ export type PaymentFailedData = {
9
+ error: "PaymentFailed";
10
+ detail: string;
11
+ };
12
+
13
+ export class PaymentFailed extends PolarError {
14
+ error: "PaymentFailed";
15
+ detail: string;
16
+
17
+ /** The original data that was passed to this error instance. */
18
+ data$: PaymentFailedData;
19
+
20
+ constructor(
21
+ err: PaymentFailedData,
22
+ httpMeta: { response: Response; request: Request; body: string },
23
+ ) {
24
+ const message = "message" in err && typeof err.message === "string"
25
+ ? err.message
26
+ : `API error occurred: ${JSON.stringify(err)}`;
27
+ super(message, httpMeta);
28
+ this.data$ = err;
29
+ this.error = err.error;
30
+ this.detail = err.detail;
31
+
32
+ this.name = "PaymentFailed";
33
+ }
34
+ }
35
+
36
+ /** @internal */
37
+ export const PaymentFailed$inboundSchema: z.ZodMiniType<
38
+ PaymentFailed,
39
+ unknown
40
+ > = z.pipe(
41
+ z.object({
42
+ error: z.literal("PaymentFailed"),
43
+ detail: z.string(),
44
+ request$: z.custom<Request>(x => x instanceof Request),
45
+ response$: z.custom<Response>(x => x instanceof Response),
46
+ body$: z.string(),
47
+ }),
48
+ z.transform((v) => {
49
+ return new PaymentFailed(v, {
50
+ request: v.request$,
51
+ response: v.response$,
52
+ body: v.body$,
53
+ });
54
+ }),
55
+ );
@@ -10,6 +10,10 @@ import {
10
10
  ListResourceMember,
11
11
  ListResourceMember$inboundSchema,
12
12
  } from "../components/listresourcemember.js";
13
+ import {
14
+ MemberRole,
15
+ MemberRole$outboundSchema,
16
+ } from "../components/memberrole.js";
13
17
  import {
14
18
  MemberSortProperty,
15
19
  MemberSortProperty$outboundSchema,
@@ -25,6 +29,10 @@ export type MembersListMembersRequest = {
25
29
  * Filter by customer external ID.
26
30
  */
27
31
  externalCustomerId?: string | null | undefined;
32
+ /**
33
+ * Filter by member role.
34
+ */
35
+ role?: MemberRole | null | undefined;
28
36
  /**
29
37
  * Page number, defaults to 1.
30
38
  */
@@ -47,6 +55,7 @@ export type MembersListMembersResponse = {
47
55
  export type MembersListMembersRequest$Outbound = {
48
56
  customer_id?: string | null | undefined;
49
57
  external_customer_id?: string | null | undefined;
58
+ role?: string | null | undefined;
50
59
  page: number;
51
60
  limit: number;
52
61
  sorting?: Array<string> | null | undefined;
@@ -60,6 +69,7 @@ export const MembersListMembersRequest$outboundSchema: z.ZodMiniType<
60
69
  z.object({
61
70
  customerId: z.optional(z.nullable(z.string())),
62
71
  externalCustomerId: z.optional(z.nullable(z.string())),
72
+ role: z.optional(z.nullable(MemberRole$outboundSchema)),
63
73
  page: z._default(z.int(), 1),
64
74
  limit: z._default(z.int(), 10),
65
75
  sorting: z.optional(z.nullable(z.array(MemberSortProperty$outboundSchema))),
package/src/webhooks.ts CHANGED
@@ -33,6 +33,11 @@ import { WebhookCustomerStateChangedPayload$inboundSchema } from "./models/compo
33
33
  import { WebhookCustomerSeatAssignedPayload$inboundSchema } from "./models/components/webhookcustomerseatassignedpayload.js";
34
34
  import { WebhookCustomerSeatClaimedPayload$inboundSchema } from "./models/components/webhookcustomerseatclaimedpayload.js";
35
35
  import { WebhookCustomerSeatRevokedPayload$inboundSchema } from "./models/components/webhookcustomerseatrevokedpayload.js";
36
+ import { WebhookMemberCreatedPayload$inboundSchema } from "./models/components/webhookmembercreatedpayload.js";
37
+ import { WebhookMemberUpdatedPayload$inboundSchema } from "./models/components/webhookmemberupdatedpayload.js";
38
+ import { WebhookMemberDeletedPayload$inboundSchema } from "./models/components/webhookmemberdeletedpayload.js";
39
+ import { WebhookCheckoutExpiredPayload$inboundSchema } from "./models/components/webhookcheckoutexpiredpayload.js";
40
+ import { WebhookSubscriptionPastDuePayload$inboundSchema } from "./models/components/webhooksubscriptionpastduepayload.js";
36
41
  import { SDKValidationError } from "./models/errors/sdkvalidationerror.js";
37
42
 
38
43
  class WebhookVerificationError extends Error {
@@ -59,6 +64,12 @@ const parseEvent = (parsed: any) => {
59
64
  return WebhookCustomerSeatClaimedPayload$inboundSchema.parse(parsed);
60
65
  case "customer_seat.revoked":
61
66
  return WebhookCustomerSeatRevokedPayload$inboundSchema.parse(parsed);
67
+ case "member.created":
68
+ return WebhookMemberCreatedPayload$inboundSchema.parse(parsed);
69
+ case "member.updated":
70
+ return WebhookMemberUpdatedPayload$inboundSchema.parse(parsed);
71
+ case "member.deleted":
72
+ return WebhookMemberDeletedPayload$inboundSchema.parse(parsed);
62
73
  case "benefit.created":
63
74
  return WebhookBenefitCreatedPayload$inboundSchema.parse(parsed);
64
75
  case "benefit_grant.created":
@@ -75,6 +86,8 @@ const parseEvent = (parsed: any) => {
75
86
  return WebhookCheckoutCreatedPayload$inboundSchema.parse(parsed);
76
87
  case "checkout.updated":
77
88
  return WebhookCheckoutUpdatedPayload$inboundSchema.parse(parsed);
89
+ case "checkout.expired":
90
+ return WebhookCheckoutExpiredPayload$inboundSchema.parse(parsed);
78
91
  case "order.created":
79
92
  return WebhookOrderCreatedPayload$inboundSchema.parse(parsed);
80
93
  case "order.paid":
@@ -105,6 +118,8 @@ const parseEvent = (parsed: any) => {
105
118
  return WebhookSubscriptionUncanceledPayload$inboundSchema.parse(parsed);
106
119
  case "subscription.updated":
107
120
  return WebhookSubscriptionUpdatedPayload$inboundSchema.parse(parsed);
121
+ case "subscription.past_due":
122
+ return WebhookSubscriptionPastDuePayload$inboundSchema.parse(parsed);
108
123
  default:
109
124
  throw new SDKValidationError(
110
125
  `Unknown event type: ${parsed.type}`,