@polar-sh/sdk 1.0.0-alpha.19 → 1.0.0-alpha.21

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 (446) hide show
  1. package/README.md +8 -0
  2. package/dist/2026-04/index.cjs +4 -6
  3. package/dist/2026-04/index.cjs.map +1 -1
  4. package/dist/2026-04/index.d.cts +3 -3
  5. package/dist/2026-04/index.d.mts +3 -3
  6. package/dist/2026-04/index.mjs +4 -6
  7. package/dist/2026-04/index.mjs.map +1 -1
  8. package/dist/2026-04/services/benefit_grants.cjs +1 -1
  9. package/dist/2026-04/services/benefit_grants.d.cts +2 -2
  10. package/dist/2026-04/services/benefit_grants.d.mts +2 -2
  11. package/dist/2026-04/services/benefit_grants.mjs +1 -1
  12. package/dist/2026-04/services/benefits.cjs +1 -1
  13. package/dist/2026-04/services/benefits.d.cts +2 -2
  14. package/dist/2026-04/services/benefits.d.mts +2 -2
  15. package/dist/2026-04/services/benefits.mjs +1 -1
  16. package/dist/2026-04/services/checkout_links.cjs +1 -1
  17. package/dist/2026-04/services/checkout_links.d.cts +2 -2
  18. package/dist/2026-04/services/checkout_links.d.mts +2 -2
  19. package/dist/2026-04/services/checkout_links.mjs +1 -1
  20. package/dist/2026-04/services/checkouts.cjs +1 -1
  21. package/dist/2026-04/services/checkouts.d.cts +2 -2
  22. package/dist/2026-04/services/checkouts.d.mts +2 -2
  23. package/dist/2026-04/services/checkouts.mjs +1 -1
  24. package/dist/2026-04/services/custom_fields.cjs +1 -1
  25. package/dist/2026-04/services/custom_fields.d.cts +2 -2
  26. package/dist/2026-04/services/custom_fields.d.mts +2 -2
  27. package/dist/2026-04/services/custom_fields.mjs +1 -1
  28. package/dist/2026-04/services/customer_meters.cjs +1 -1
  29. package/dist/2026-04/services/customer_meters.d.cts +2 -2
  30. package/dist/2026-04/services/customer_meters.d.mts +2 -2
  31. package/dist/2026-04/services/customer_meters.mjs +1 -1
  32. package/dist/2026-04/services/customer_portal/benefit_grants.cjs +1 -1
  33. package/dist/2026-04/services/customer_portal/benefit_grants.d.cts +2 -2
  34. package/dist/2026-04/services/customer_portal/benefit_grants.d.mts +2 -2
  35. package/dist/2026-04/services/customer_portal/benefit_grants.mjs +1 -1
  36. package/dist/2026-04/services/customer_portal/customer_meters.cjs +1 -1
  37. package/dist/2026-04/services/customer_portal/customer_meters.d.cts +2 -2
  38. package/dist/2026-04/services/customer_portal/customer_meters.d.mts +2 -2
  39. package/dist/2026-04/services/customer_portal/customer_meters.mjs +1 -1
  40. package/dist/2026-04/services/customer_portal/customer_session.d.cts +2 -2
  41. package/dist/2026-04/services/customer_portal/customer_session.d.mts +2 -2
  42. package/dist/2026-04/services/customer_portal/customers.cjs +1 -1
  43. package/dist/2026-04/services/customer_portal/customers.d.cts +2 -2
  44. package/dist/2026-04/services/customer_portal/customers.d.mts +2 -2
  45. package/dist/2026-04/services/customer_portal/customers.mjs +1 -1
  46. package/dist/2026-04/services/customer_portal/downloadables.cjs +1 -1
  47. package/dist/2026-04/services/customer_portal/downloadables.d.cts +2 -2
  48. package/dist/2026-04/services/customer_portal/downloadables.d.mts +2 -2
  49. package/dist/2026-04/services/customer_portal/downloadables.mjs +1 -1
  50. package/dist/2026-04/services/customer_portal/index.d.cts +2 -2
  51. package/dist/2026-04/services/customer_portal/index.d.cts.map +1 -1
  52. package/dist/2026-04/services/customer_portal/index.d.mts +2 -2
  53. package/dist/2026-04/services/customer_portal/index.d.mts.map +1 -1
  54. package/dist/2026-04/services/customer_portal/license_keys.cjs +1 -1
  55. package/dist/2026-04/services/customer_portal/license_keys.d.cts +2 -2
  56. package/dist/2026-04/services/customer_portal/license_keys.d.mts +2 -2
  57. package/dist/2026-04/services/customer_portal/license_keys.mjs +1 -1
  58. package/dist/2026-04/services/customer_portal/members.cjs +1 -1
  59. package/dist/2026-04/services/customer_portal/members.d.cts +2 -2
  60. package/dist/2026-04/services/customer_portal/members.d.mts +2 -2
  61. package/dist/2026-04/services/customer_portal/members.mjs +1 -1
  62. package/dist/2026-04/services/customer_portal/orders.cjs +1 -1
  63. package/dist/2026-04/services/customer_portal/orders.d.cts +2 -2
  64. package/dist/2026-04/services/customer_portal/orders.d.mts +2 -2
  65. package/dist/2026-04/services/customer_portal/orders.mjs +1 -1
  66. package/dist/2026-04/services/customer_portal/organizations.cjs +1 -1
  67. package/dist/2026-04/services/customer_portal/organizations.d.cts +2 -2
  68. package/dist/2026-04/services/customer_portal/organizations.d.mts +2 -2
  69. package/dist/2026-04/services/customer_portal/organizations.mjs +1 -1
  70. package/dist/2026-04/services/customer_portal/seats.cjs +5 -5
  71. package/dist/2026-04/services/customer_portal/seats.cjs.map +1 -1
  72. package/dist/2026-04/services/customer_portal/seats.d.cts +2 -2
  73. package/dist/2026-04/services/customer_portal/seats.d.mts +2 -2
  74. package/dist/2026-04/services/customer_portal/seats.mjs +5 -5
  75. package/dist/2026-04/services/customer_portal/seats.mjs.map +1 -1
  76. package/dist/2026-04/services/customer_portal/subscriptions.cjs +3 -3
  77. package/dist/2026-04/services/customer_portal/subscriptions.cjs.map +1 -1
  78. package/dist/2026-04/services/customer_portal/subscriptions.d.cts +2 -2
  79. package/dist/2026-04/services/customer_portal/subscriptions.d.mts +2 -2
  80. package/dist/2026-04/services/customer_portal/subscriptions.mjs +3 -3
  81. package/dist/2026-04/services/customer_portal/subscriptions.mjs.map +1 -1
  82. package/dist/2026-04/services/customer_portal/wallets.cjs +1 -1
  83. package/dist/2026-04/services/customer_portal/wallets.d.cts +2 -2
  84. package/dist/2026-04/services/customer_portal/wallets.d.mts +2 -2
  85. package/dist/2026-04/services/customer_portal/wallets.mjs +1 -1
  86. package/dist/2026-04/services/customer_seats.cjs +5 -5
  87. package/dist/2026-04/services/customer_seats.cjs.map +1 -1
  88. package/dist/2026-04/services/customer_seats.d.cts +2 -2
  89. package/dist/2026-04/services/customer_seats.d.mts +2 -2
  90. package/dist/2026-04/services/customer_seats.mjs +5 -5
  91. package/dist/2026-04/services/customer_seats.mjs.map +1 -1
  92. package/dist/2026-04/services/customer_sessions.cjs +6 -2
  93. package/dist/2026-04/services/customer_sessions.cjs.map +1 -1
  94. package/dist/2026-04/services/customer_sessions.d.cts +2 -2
  95. package/dist/2026-04/services/customer_sessions.d.cts.map +1 -1
  96. package/dist/2026-04/services/customer_sessions.d.mts +2 -2
  97. package/dist/2026-04/services/customer_sessions.d.mts.map +1 -1
  98. package/dist/2026-04/services/customer_sessions.mjs +6 -2
  99. package/dist/2026-04/services/customer_sessions.mjs.map +1 -1
  100. package/dist/2026-04/services/customers/index.cjs +1 -1
  101. package/dist/2026-04/services/customers/index.d.cts +26 -2
  102. package/dist/2026-04/services/customers/index.d.cts.map +1 -1
  103. package/dist/2026-04/services/customers/index.d.mts +26 -2
  104. package/dist/2026-04/services/customers/index.d.mts.map +1 -1
  105. package/dist/2026-04/services/customers/index.mjs +1 -1
  106. package/dist/2026-04/services/customers/members.cjs +143 -2
  107. package/dist/2026-04/services/customers/members.cjs.map +1 -1
  108. package/dist/2026-04/services/customers/members.d.cts +82 -3
  109. package/dist/2026-04/services/customers/members.d.cts.map +1 -1
  110. package/dist/2026-04/services/customers/members.d.mts +82 -3
  111. package/dist/2026-04/services/customers/members.d.mts.map +1 -1
  112. package/dist/2026-04/services/customers/members.mjs +140 -3
  113. package/dist/2026-04/services/customers/members.mjs.map +1 -1
  114. package/dist/2026-04/services/discounts.cjs +1 -1
  115. package/dist/2026-04/services/discounts.d.cts +2 -2
  116. package/dist/2026-04/services/discounts.d.mts +2 -2
  117. package/dist/2026-04/services/discounts.mjs +1 -1
  118. package/dist/2026-04/services/disputes.cjs +1 -1
  119. package/dist/2026-04/services/disputes.d.cts +2 -2
  120. package/dist/2026-04/services/disputes.d.mts +2 -2
  121. package/dist/2026-04/services/disputes.mjs +1 -1
  122. package/dist/2026-04/services/event_types.cjs +1 -1
  123. package/dist/2026-04/services/event_types.d.cts +2 -2
  124. package/dist/2026-04/services/event_types.d.mts +2 -2
  125. package/dist/2026-04/services/event_types.mjs +1 -1
  126. package/dist/2026-04/services/events.cjs +1 -1
  127. package/dist/2026-04/services/events.d.cts +2 -2
  128. package/dist/2026-04/services/events.d.mts +2 -2
  129. package/dist/2026-04/services/events.mjs +1 -1
  130. package/dist/2026-04/services/files.cjs +1 -1
  131. package/dist/2026-04/services/files.d.cts +2 -2
  132. package/dist/2026-04/services/files.d.mts +2 -2
  133. package/dist/2026-04/services/files.mjs +1 -1
  134. package/dist/2026-04/services/license_keys.cjs +1 -1
  135. package/dist/2026-04/services/license_keys.d.cts +2 -2
  136. package/dist/2026-04/services/license_keys.d.mts +2 -2
  137. package/dist/2026-04/services/license_keys.mjs +1 -1
  138. package/dist/2026-04/services/meters.cjs +1 -1
  139. package/dist/2026-04/services/meters.d.cts +2 -2
  140. package/dist/2026-04/services/meters.d.mts +2 -2
  141. package/dist/2026-04/services/meters.mjs +1 -1
  142. package/dist/2026-04/services/metrics.cjs +1 -1
  143. package/dist/2026-04/services/metrics.d.cts +2 -2
  144. package/dist/2026-04/services/metrics.d.mts +2 -2
  145. package/dist/2026-04/services/metrics.mjs +1 -1
  146. package/dist/2026-04/services/oauth2/clients/index.d.cts +2 -2
  147. package/dist/2026-04/services/oauth2/clients/index.d.mts +2 -2
  148. package/dist/2026-04/services/oauth2/clients/oauth2.cjs +1 -1
  149. package/dist/2026-04/services/oauth2/clients/oauth2.d.cts +2 -2
  150. package/dist/2026-04/services/oauth2/clients/oauth2.d.mts +2 -2
  151. package/dist/2026-04/services/oauth2/clients/oauth2.mjs +1 -1
  152. package/dist/2026-04/services/oauth2/index.d.cts +2 -2
  153. package/dist/2026-04/services/oauth2/index.d.mts +2 -2
  154. package/dist/2026-04/services/orders.cjs +1 -1
  155. package/dist/2026-04/services/orders.d.cts +2 -2
  156. package/dist/2026-04/services/orders.d.mts +2 -2
  157. package/dist/2026-04/services/orders.mjs +1 -1
  158. package/dist/2026-04/services/organizations.cjs +1 -1
  159. package/dist/2026-04/services/organizations.d.cts +2 -2
  160. package/dist/2026-04/services/organizations.d.mts +2 -2
  161. package/dist/2026-04/services/organizations.mjs +1 -1
  162. package/dist/2026-04/services/payments.cjs +1 -1
  163. package/dist/2026-04/services/payments.d.cts +2 -2
  164. package/dist/2026-04/services/payments.d.mts +2 -2
  165. package/dist/2026-04/services/payments.mjs +1 -1
  166. package/dist/2026-04/services/products.cjs +1 -1
  167. package/dist/2026-04/services/products.d.cts +2 -2
  168. package/dist/2026-04/services/products.d.mts +2 -2
  169. package/dist/2026-04/services/products.mjs +1 -1
  170. package/dist/2026-04/services/refunds.cjs +1 -1
  171. package/dist/2026-04/services/refunds.d.cts +2 -2
  172. package/dist/2026-04/services/refunds.d.mts +2 -2
  173. package/dist/2026-04/services/refunds.mjs +1 -1
  174. package/dist/2026-04/services/subscriptions.cjs +3 -3
  175. package/dist/2026-04/services/subscriptions.cjs.map +1 -1
  176. package/dist/2026-04/services/subscriptions.d.cts +2 -2
  177. package/dist/2026-04/services/subscriptions.d.cts.map +1 -1
  178. package/dist/2026-04/services/subscriptions.d.mts +2 -2
  179. package/dist/2026-04/services/subscriptions.d.mts.map +1 -1
  180. package/dist/2026-04/services/subscriptions.mjs +3 -3
  181. package/dist/2026-04/services/subscriptions.mjs.map +1 -1
  182. package/dist/2026-04/services/webhooks.cjs +1 -1
  183. package/dist/2026-04/services/webhooks.d.cts +2 -2
  184. package/dist/2026-04/services/webhooks.d.mts +2 -2
  185. package/dist/2026-04/services/webhooks.mjs +1 -1
  186. package/dist/2026-10/index.cjs +4 -6
  187. package/dist/2026-10/index.cjs.map +1 -1
  188. package/dist/2026-10/index.d.cts +3 -3
  189. package/dist/2026-10/index.d.mts +3 -3
  190. package/dist/2026-10/index.mjs +4 -6
  191. package/dist/2026-10/index.mjs.map +1 -1
  192. package/dist/2026-10/services/benefit_grants.cjs +1 -1
  193. package/dist/2026-10/services/benefit_grants.d.cts +2 -2
  194. package/dist/2026-10/services/benefit_grants.d.mts +2 -2
  195. package/dist/2026-10/services/benefit_grants.mjs +1 -1
  196. package/dist/2026-10/services/benefits.cjs +1 -1
  197. package/dist/2026-10/services/benefits.d.cts +2 -2
  198. package/dist/2026-10/services/benefits.d.mts +2 -2
  199. package/dist/2026-10/services/benefits.mjs +1 -1
  200. package/dist/2026-10/services/checkout_links.cjs +1 -1
  201. package/dist/2026-10/services/checkout_links.d.cts +2 -2
  202. package/dist/2026-10/services/checkout_links.d.mts +2 -2
  203. package/dist/2026-10/services/checkout_links.mjs +1 -1
  204. package/dist/2026-10/services/checkouts.cjs +1 -1
  205. package/dist/2026-10/services/checkouts.d.cts +2 -2
  206. package/dist/2026-10/services/checkouts.d.mts +2 -2
  207. package/dist/2026-10/services/checkouts.mjs +1 -1
  208. package/dist/2026-10/services/custom_fields.cjs +1 -1
  209. package/dist/2026-10/services/custom_fields.d.cts +2 -2
  210. package/dist/2026-10/services/custom_fields.d.mts +2 -2
  211. package/dist/2026-10/services/custom_fields.mjs +1 -1
  212. package/dist/2026-10/services/customer_meters.cjs +1 -1
  213. package/dist/2026-10/services/customer_meters.d.cts +2 -2
  214. package/dist/2026-10/services/customer_meters.d.mts +2 -2
  215. package/dist/2026-10/services/customer_meters.mjs +1 -1
  216. package/dist/2026-10/services/customer_portal/benefit_grants.cjs +1 -1
  217. package/dist/2026-10/services/customer_portal/benefit_grants.d.cts +2 -2
  218. package/dist/2026-10/services/customer_portal/benefit_grants.d.mts +2 -2
  219. package/dist/2026-10/services/customer_portal/benefit_grants.mjs +1 -1
  220. package/dist/2026-10/services/customer_portal/customer_meters.cjs +1 -1
  221. package/dist/2026-10/services/customer_portal/customer_meters.d.cts +2 -2
  222. package/dist/2026-10/services/customer_portal/customer_meters.d.mts +2 -2
  223. package/dist/2026-10/services/customer_portal/customer_meters.mjs +1 -1
  224. package/dist/2026-10/services/customer_portal/customer_session.d.cts +2 -2
  225. package/dist/2026-10/services/customer_portal/customer_session.d.mts +2 -2
  226. package/dist/2026-10/services/customer_portal/customers.cjs +1 -1
  227. package/dist/2026-10/services/customer_portal/customers.d.cts +2 -2
  228. package/dist/2026-10/services/customer_portal/customers.d.mts +2 -2
  229. package/dist/2026-10/services/customer_portal/customers.mjs +1 -1
  230. package/dist/2026-10/services/customer_portal/downloadables.cjs +1 -1
  231. package/dist/2026-10/services/customer_portal/downloadables.d.cts +2 -2
  232. package/dist/2026-10/services/customer_portal/downloadables.d.mts +2 -2
  233. package/dist/2026-10/services/customer_portal/downloadables.mjs +1 -1
  234. package/dist/2026-10/services/customer_portal/index.d.cts +2 -2
  235. package/dist/2026-10/services/customer_portal/index.d.cts.map +1 -1
  236. package/dist/2026-10/services/customer_portal/index.d.mts +2 -2
  237. package/dist/2026-10/services/customer_portal/index.d.mts.map +1 -1
  238. package/dist/2026-10/services/customer_portal/license_keys.cjs +1 -1
  239. package/dist/2026-10/services/customer_portal/license_keys.d.cts +2 -2
  240. package/dist/2026-10/services/customer_portal/license_keys.d.mts +2 -2
  241. package/dist/2026-10/services/customer_portal/license_keys.mjs +1 -1
  242. package/dist/2026-10/services/customer_portal/members.cjs +1 -1
  243. package/dist/2026-10/services/customer_portal/members.d.cts +2 -2
  244. package/dist/2026-10/services/customer_portal/members.d.mts +2 -2
  245. package/dist/2026-10/services/customer_portal/members.mjs +1 -1
  246. package/dist/2026-10/services/customer_portal/orders.cjs +1 -1
  247. package/dist/2026-10/services/customer_portal/orders.d.cts +2 -2
  248. package/dist/2026-10/services/customer_portal/orders.d.mts +2 -2
  249. package/dist/2026-10/services/customer_portal/orders.mjs +1 -1
  250. package/dist/2026-10/services/customer_portal/organizations.cjs +1 -1
  251. package/dist/2026-10/services/customer_portal/organizations.d.cts +2 -2
  252. package/dist/2026-10/services/customer_portal/organizations.d.mts +2 -2
  253. package/dist/2026-10/services/customer_portal/organizations.mjs +1 -1
  254. package/dist/2026-10/services/customer_portal/seats.cjs +5 -5
  255. package/dist/2026-10/services/customer_portal/seats.cjs.map +1 -1
  256. package/dist/2026-10/services/customer_portal/seats.d.cts +2 -2
  257. package/dist/2026-10/services/customer_portal/seats.d.mts +2 -2
  258. package/dist/2026-10/services/customer_portal/seats.mjs +5 -5
  259. package/dist/2026-10/services/customer_portal/seats.mjs.map +1 -1
  260. package/dist/2026-10/services/customer_portal/subscriptions.cjs +3 -3
  261. package/dist/2026-10/services/customer_portal/subscriptions.cjs.map +1 -1
  262. package/dist/2026-10/services/customer_portal/subscriptions.d.cts +2 -2
  263. package/dist/2026-10/services/customer_portal/subscriptions.d.mts +2 -2
  264. package/dist/2026-10/services/customer_portal/subscriptions.mjs +3 -3
  265. package/dist/2026-10/services/customer_portal/subscriptions.mjs.map +1 -1
  266. package/dist/2026-10/services/customer_portal/wallets.cjs +1 -1
  267. package/dist/2026-10/services/customer_portal/wallets.d.cts +2 -2
  268. package/dist/2026-10/services/customer_portal/wallets.d.mts +2 -2
  269. package/dist/2026-10/services/customer_portal/wallets.mjs +1 -1
  270. package/dist/2026-10/services/customer_seats.cjs +5 -5
  271. package/dist/2026-10/services/customer_seats.cjs.map +1 -1
  272. package/dist/2026-10/services/customer_seats.d.cts +2 -2
  273. package/dist/2026-10/services/customer_seats.d.mts +2 -2
  274. package/dist/2026-10/services/customer_seats.mjs +5 -5
  275. package/dist/2026-10/services/customer_seats.mjs.map +1 -1
  276. package/dist/2026-10/services/customer_sessions.cjs +6 -2
  277. package/dist/2026-10/services/customer_sessions.cjs.map +1 -1
  278. package/dist/2026-10/services/customer_sessions.d.cts +2 -2
  279. package/dist/2026-10/services/customer_sessions.d.cts.map +1 -1
  280. package/dist/2026-10/services/customer_sessions.d.mts +2 -2
  281. package/dist/2026-10/services/customer_sessions.d.mts.map +1 -1
  282. package/dist/2026-10/services/customer_sessions.mjs +6 -2
  283. package/dist/2026-10/services/customer_sessions.mjs.map +1 -1
  284. package/dist/2026-10/services/customers/index.cjs +1 -1
  285. package/dist/2026-10/services/customers/index.d.cts +26 -2
  286. package/dist/2026-10/services/customers/index.d.cts.map +1 -1
  287. package/dist/2026-10/services/customers/index.d.mts +26 -2
  288. package/dist/2026-10/services/customers/index.d.mts.map +1 -1
  289. package/dist/2026-10/services/customers/index.mjs +1 -1
  290. package/dist/2026-10/services/customers/members.cjs +143 -2
  291. package/dist/2026-10/services/customers/members.cjs.map +1 -1
  292. package/dist/2026-10/services/customers/members.d.cts +82 -3
  293. package/dist/2026-10/services/customers/members.d.cts.map +1 -1
  294. package/dist/2026-10/services/customers/members.d.mts +82 -3
  295. package/dist/2026-10/services/customers/members.d.mts.map +1 -1
  296. package/dist/2026-10/services/customers/members.mjs +140 -3
  297. package/dist/2026-10/services/customers/members.mjs.map +1 -1
  298. package/dist/2026-10/services/discounts.cjs +1 -1
  299. package/dist/2026-10/services/discounts.d.cts +2 -2
  300. package/dist/2026-10/services/discounts.d.mts +2 -2
  301. package/dist/2026-10/services/discounts.mjs +1 -1
  302. package/dist/2026-10/services/disputes.cjs +1 -1
  303. package/dist/2026-10/services/disputes.d.cts +2 -2
  304. package/dist/2026-10/services/disputes.d.mts +2 -2
  305. package/dist/2026-10/services/disputes.mjs +1 -1
  306. package/dist/2026-10/services/event_types.cjs +1 -1
  307. package/dist/2026-10/services/event_types.d.cts +2 -2
  308. package/dist/2026-10/services/event_types.d.mts +2 -2
  309. package/dist/2026-10/services/event_types.mjs +1 -1
  310. package/dist/2026-10/services/events.cjs +1 -1
  311. package/dist/2026-10/services/events.d.cts +2 -2
  312. package/dist/2026-10/services/events.d.mts +2 -2
  313. package/dist/2026-10/services/events.mjs +1 -1
  314. package/dist/2026-10/services/files.cjs +1 -1
  315. package/dist/2026-10/services/files.d.cts +2 -2
  316. package/dist/2026-10/services/files.d.mts +2 -2
  317. package/dist/2026-10/services/files.mjs +1 -1
  318. package/dist/2026-10/services/license_keys.cjs +1 -1
  319. package/dist/2026-10/services/license_keys.d.cts +2 -2
  320. package/dist/2026-10/services/license_keys.d.mts +2 -2
  321. package/dist/2026-10/services/license_keys.mjs +1 -1
  322. package/dist/2026-10/services/meters.cjs +1 -1
  323. package/dist/2026-10/services/meters.d.cts +2 -2
  324. package/dist/2026-10/services/meters.d.mts +2 -2
  325. package/dist/2026-10/services/meters.mjs +1 -1
  326. package/dist/2026-10/services/metrics.cjs +1 -1
  327. package/dist/2026-10/services/metrics.d.cts +2 -2
  328. package/dist/2026-10/services/metrics.d.mts +2 -2
  329. package/dist/2026-10/services/metrics.mjs +1 -1
  330. package/dist/2026-10/services/oauth2/clients/index.d.cts +2 -2
  331. package/dist/2026-10/services/oauth2/clients/index.d.mts +2 -2
  332. package/dist/2026-10/services/oauth2/clients/oauth2.cjs +1 -1
  333. package/dist/2026-10/services/oauth2/clients/oauth2.d.cts +2 -2
  334. package/dist/2026-10/services/oauth2/clients/oauth2.d.mts +2 -2
  335. package/dist/2026-10/services/oauth2/clients/oauth2.mjs +1 -1
  336. package/dist/2026-10/services/oauth2/index.d.cts +2 -2
  337. package/dist/2026-10/services/oauth2/index.d.mts +2 -2
  338. package/dist/2026-10/services/orders.cjs +1 -1
  339. package/dist/2026-10/services/orders.d.cts +2 -2
  340. package/dist/2026-10/services/orders.d.mts +2 -2
  341. package/dist/2026-10/services/orders.mjs +1 -1
  342. package/dist/2026-10/services/organizations.cjs +1 -1
  343. package/dist/2026-10/services/organizations.d.cts +2 -2
  344. package/dist/2026-10/services/organizations.d.mts +2 -2
  345. package/dist/2026-10/services/organizations.mjs +1 -1
  346. package/dist/2026-10/services/payments.cjs +1 -1
  347. package/dist/2026-10/services/payments.d.cts +2 -2
  348. package/dist/2026-10/services/payments.d.mts +2 -2
  349. package/dist/2026-10/services/payments.mjs +1 -1
  350. package/dist/2026-10/services/products.cjs +1 -1
  351. package/dist/2026-10/services/products.d.cts +2 -2
  352. package/dist/2026-10/services/products.d.mts +2 -2
  353. package/dist/2026-10/services/products.mjs +1 -1
  354. package/dist/2026-10/services/refunds.cjs +1 -1
  355. package/dist/2026-10/services/refunds.d.cts +2 -2
  356. package/dist/2026-10/services/refunds.d.mts +2 -2
  357. package/dist/2026-10/services/refunds.mjs +1 -1
  358. package/dist/2026-10/services/subscriptions.cjs +3 -3
  359. package/dist/2026-10/services/subscriptions.cjs.map +1 -1
  360. package/dist/2026-10/services/subscriptions.d.cts +2 -2
  361. package/dist/2026-10/services/subscriptions.d.cts.map +1 -1
  362. package/dist/2026-10/services/subscriptions.d.mts +2 -2
  363. package/dist/2026-10/services/subscriptions.d.mts.map +1 -1
  364. package/dist/2026-10/services/subscriptions.mjs +3 -3
  365. package/dist/2026-10/services/subscriptions.mjs.map +1 -1
  366. package/dist/2026-10/services/webhooks.cjs +1 -1
  367. package/dist/2026-10/services/webhooks.d.cts +2 -2
  368. package/dist/2026-10/services/webhooks.d.mts +2 -2
  369. package/dist/2026-10/services/webhooks.mjs +1 -1
  370. package/dist/{base-B0J2UyGW.d.cts → base-C5EE71lz.d.cts} +3 -1
  371. package/dist/base-C5EE71lz.d.cts.map +1 -0
  372. package/dist/{base-B0J2UyGW.d.mts → base-C5EE71lz.d.mts} +3 -1
  373. package/dist/base-C5EE71lz.d.mts.map +1 -0
  374. package/dist/{base-Y8hBtwet.mjs → base-CpxoQZCZ.mjs} +11 -1
  375. package/dist/base-CpxoQZCZ.mjs.map +1 -0
  376. package/dist/{base-CKGG5bHP.cjs → base-D83CMR-Q.cjs} +11 -1
  377. package/dist/base-D83CMR-Q.cjs.map +1 -0
  378. package/dist/{errors-BNIKOTCQ.cjs → errors-BfEghQ77.cjs} +40 -20
  379. package/dist/errors-BfEghQ77.cjs.map +1 -0
  380. package/dist/{errors-uRD_PnoN.cjs → errors-CPJ329AT.cjs} +40 -20
  381. package/dist/errors-CPJ329AT.cjs.map +1 -0
  382. package/dist/{errors-jmLqKeis.mjs → errors-D1yM2ZQm.mjs} +29 -15
  383. package/dist/errors-D1yM2ZQm.mjs.map +1 -0
  384. package/dist/{errors-DoC8Fjy1.mjs → errors-hhbDe5ap.mjs} +29 -15
  385. package/dist/errors-hhbDe5ap.mjs.map +1 -0
  386. package/dist/{index-C13yiYYK.d.mts → index-BDWUg8uj.d.cts} +216 -39
  387. package/dist/index-BDWUg8uj.d.cts.map +1 -0
  388. package/dist/{index-DQXVH4sq.d.mts → index-BamOUZl1.d.cts} +216 -39
  389. package/dist/index-BamOUZl1.d.cts.map +1 -0
  390. package/dist/{index-DtE3a4EG.d.cts → index-BkTZ8a-R.d.mts} +216 -39
  391. package/dist/index-BkTZ8a-R.d.mts.map +1 -0
  392. package/dist/{index-ileuxVoT.d.cts → index-JEL0D7T4.d.mts} +216 -39
  393. package/dist/index-JEL0D7T4.d.mts.map +1 -0
  394. package/dist/index.cjs +1 -1
  395. package/dist/index.d.cts +1 -1
  396. package/dist/index.d.mts +1 -1
  397. package/dist/index.mjs +1 -1
  398. package/dist/{models-1oBCLxA2.d.cts → models-D3N1jo2G.d.cts} +107 -37
  399. package/dist/models-D3N1jo2G.d.cts.map +1 -0
  400. package/dist/{models-1oBCLxA2.d.mts → models-D3N1jo2G.d.mts} +107 -37
  401. package/dist/models-D3N1jo2G.d.mts.map +1 -0
  402. package/dist/{models-Q5YkSsr_.d.cts → models-f2_talp6.d.cts} +107 -37
  403. package/dist/models-f2_talp6.d.cts.map +1 -0
  404. package/dist/{models-Q5YkSsr_.d.mts → models-f2_talp6.d.mts} +107 -37
  405. package/dist/models-f2_talp6.d.mts.map +1 -0
  406. package/dist/{webhooks-B6f91AP6.d.cts → webhooks-BIIRAEZ9.d.mts} +2 -2
  407. package/dist/{webhooks-B6f91AP6.d.cts.map → webhooks-BIIRAEZ9.d.mts.map} +1 -1
  408. package/dist/{webhooks-B34uKwcx.cjs → webhooks-CJ5fgGEO.cjs} +2 -2
  409. package/dist/{webhooks-B34uKwcx.cjs.map → webhooks-CJ5fgGEO.cjs.map} +1 -1
  410. package/dist/{webhooks-C1yqArDl.d.mts → webhooks-DfOgc4VC.d.cts} +2 -2
  411. package/dist/{webhooks-C1yqArDl.d.mts.map → webhooks-DfOgc4VC.d.cts.map} +1 -1
  412. package/dist/{webhooks-Y_e5BsDW.mjs → webhooks-lgh0ADeT.mjs} +2 -2
  413. package/dist/{webhooks-Y_e5BsDW.mjs.map → webhooks-lgh0ADeT.mjs.map} +1 -1
  414. package/package.json +1 -1
  415. package/dist/2026-04/services/members.cjs +0 -75
  416. package/dist/2026-04/services/members.cjs.map +0 -1
  417. package/dist/2026-04/services/members.d.cts +0 -54
  418. package/dist/2026-04/services/members.d.cts.map +0 -1
  419. package/dist/2026-04/services/members.d.mts +0 -54
  420. package/dist/2026-04/services/members.d.mts.map +0 -1
  421. package/dist/2026-04/services/members.mjs +0 -72
  422. package/dist/2026-04/services/members.mjs.map +0 -1
  423. package/dist/2026-10/services/members.cjs +0 -75
  424. package/dist/2026-10/services/members.cjs.map +0 -1
  425. package/dist/2026-10/services/members.d.cts +0 -54
  426. package/dist/2026-10/services/members.d.cts.map +0 -1
  427. package/dist/2026-10/services/members.d.mts +0 -54
  428. package/dist/2026-10/services/members.d.mts.map +0 -1
  429. package/dist/2026-10/services/members.mjs +0 -72
  430. package/dist/2026-10/services/members.mjs.map +0 -1
  431. package/dist/base-B0J2UyGW.d.cts.map +0 -1
  432. package/dist/base-B0J2UyGW.d.mts.map +0 -1
  433. package/dist/base-CKGG5bHP.cjs.map +0 -1
  434. package/dist/base-Y8hBtwet.mjs.map +0 -1
  435. package/dist/errors-BNIKOTCQ.cjs.map +0 -1
  436. package/dist/errors-DoC8Fjy1.mjs.map +0 -1
  437. package/dist/errors-jmLqKeis.mjs.map +0 -1
  438. package/dist/errors-uRD_PnoN.cjs.map +0 -1
  439. package/dist/index-C13yiYYK.d.mts.map +0 -1
  440. package/dist/index-DQXVH4sq.d.mts.map +0 -1
  441. package/dist/index-DtE3a4EG.d.cts.map +0 -1
  442. package/dist/index-ileuxVoT.d.cts.map +0 -1
  443. package/dist/models-1oBCLxA2.d.cts.map +0 -1
  444. package/dist/models-1oBCLxA2.d.mts.map +0 -1
  445. package/dist/models-Q5YkSsr_.d.cts.map +0 -1
  446. package/dist/models-Q5YkSsr_.d.mts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_errors = require("../../../errors-uRD_PnoN.cjs");
2
+ const require_errors = require("../../../errors-CPJ329AT.cjs");
3
3
  //#region src/2026-04/services/customer_portal/seats.ts
4
4
  const listSeatsSeats = (client) => {
5
5
  /**
@@ -12,7 +12,7 @@ const listSeatsSeats = (client) => {
12
12
  * @throws {PolarRateLimitError} When the rate limit is exceeded
13
13
  * @throws {PolarServerError} When the server returns a 5xx error
14
14
  * @throws {CustomerPortalSeatsListSeats401Error} Authentication required
15
- * @throws {CustomerPortalSeatsListSeats403Error} Not permitted or seat-based pricing not enabled
15
+ * @throws {CustomerPortalSeatsListSeats403Error} Not permitted
16
16
  * @throws {CustomerPortalSeatsListSeats404Error} Subscription or order not found
17
17
  * @throws {HTTPValidationError} Validation Error
18
18
  */
@@ -43,7 +43,7 @@ const assignSeatSeats = (client) => {
43
43
  * @throws {PolarServerError} When the server returns a 5xx error
44
44
  * @throws {CustomerPortalSeatsAssignSeat400Error} No available seats or customer already has a seat
45
45
  * @throws {CustomerPortalSeatsAssignSeat401Error} Authentication required
46
- * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted or seat-based pricing not enabled
46
+ * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted
47
47
  * @throws {CustomerPortalSeatsAssignSeat404Error} Subscription, order, or customer not found
48
48
  * @throws {HTTPValidationError} Validation Error
49
49
  */
@@ -69,7 +69,7 @@ const revokeSeatSeats = (client) => {
69
69
  * @throws {PolarRateLimitError} When the rate limit is exceeded
70
70
  * @throws {PolarServerError} When the server returns a 5xx error
71
71
  * @throws {CustomerPortalSeatsRevokeSeat401Error} Authentication required
72
- * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted or seat-based pricing not enabled
72
+ * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted
73
73
  * @throws {CustomerPortalSeatsRevokeSeat404Error} Seat not found
74
74
  * @throws {HTTPValidationError} Validation Error
75
75
  */
@@ -96,7 +96,7 @@ const resendInvitationSeats = (client) => {
96
96
  * @throws {PolarServerError} When the server returns a 5xx error
97
97
  * @throws {CustomerPortalSeatsResendInvitation400Error} Seat is not pending or already claimed
98
98
  * @throws {CustomerPortalSeatsResendInvitation401Error} Authentication required
99
- * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted or seat-based pricing not enabled
99
+ * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted
100
100
  * @throws {CustomerPortalSeatsResendInvitation404Error} Seat not found
101
101
  * @throws {HTTPValidationError} Validation Error
102
102
  */
@@ -1 +1 @@
1
- {"version":3,"file":"seats.cjs","names":["CustomerPortalSeatsListSeats401Error","CustomerPortalSeatsListSeats403Error","CustomerPortalSeatsListSeats404Error","HTTPValidationError","CustomerPortalSeatsAssignSeat400Error","CustomerPortalSeatsAssignSeat401Error","CustomerPortalSeatsAssignSeat403Error","CustomerPortalSeatsAssignSeat404Error","CustomerPortalSeatsRevokeSeat401Error","CustomerPortalSeatsRevokeSeat403Error","CustomerPortalSeatsRevokeSeat404Error","CustomerPortalSeatsResendInvitation400Error","CustomerPortalSeatsResendInvitation401Error","CustomerPortalSeatsResendInvitation403Error","CustomerPortalSeatsResendInvitation404Error","CustomerPortalSeatsListClaimedSubscriptions401Error"],"sources":["../../../../src/2026-04/services/customer_portal/seats.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSeat,\n CustomerSeatAssign,\n CustomerSubscription,\n ListResourceCustomerSubscription,\n SeatsList,\n} from \"../../models\";\n\nimport {\n CustomerPortalSeatsAssignSeat400Error,\n CustomerPortalSeatsAssignSeat401Error,\n CustomerPortalSeatsAssignSeat403Error,\n CustomerPortalSeatsAssignSeat404Error,\n CustomerPortalSeatsListClaimedSubscriptions401Error,\n CustomerPortalSeatsListSeats401Error,\n CustomerPortalSeatsListSeats403Error,\n CustomerPortalSeatsListSeats404Error,\n CustomerPortalSeatsResendInvitation400Error,\n CustomerPortalSeatsResendInvitation401Error,\n CustomerPortalSeatsResendInvitation403Error,\n CustomerPortalSeatsResendInvitation404Error,\n CustomerPortalSeatsRevokeSeat401Error,\n CustomerPortalSeatsRevokeSeat403Error,\n CustomerPortalSeatsRevokeSeat404Error,\n HTTPValidationError,\n} from \"../../errors\";\n\nexport const listSeatsSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {SeatsList}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListSeats401Error} Authentication required\n * @throws {CustomerPortalSeatsListSeats403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsListSeats404Error} Subscription or order not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n subscription_id?: string | null;\n order_id?: string | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<SeatsList> => {\n const pathParams = {};\n const queryParams = {\n subscription_id: query?.subscription_id,\n order_id: query?.order_id,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatsList>(response, \"json\", {\n 401: CustomerPortalSeatsListSeats401Error,\n 403: CustomerPortalSeatsListSeats403Error,\n 404: CustomerPortalSeatsListSeats404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const assignSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsAssignSeat400Error} No available seats or customer already has a seat\n * @throws {CustomerPortalSeatsAssignSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsAssignSeat404Error} Subscription, order, or customer not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n body: CustomerSeatAssign,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSeat> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsAssignSeat400Error,\n 401: CustomerPortalSeatsAssignSeat401Error,\n 403: CustomerPortalSeatsAssignSeat403Error,\n 404: CustomerPortalSeatsAssignSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const revokeSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsRevokeSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsRevokeSeat404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/seats/{seat_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 401: CustomerPortalSeatsRevokeSeat401Error,\n 403: CustomerPortalSeatsRevokeSeat403Error,\n 404: CustomerPortalSeatsRevokeSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const resendInvitationSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsResendInvitation400Error} Seat is not pending or already claimed\n * @throws {CustomerPortalSeatsResendInvitation401Error} Authentication required\n * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsResendInvitation404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats/{seat_id}/resend\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsResendInvitation400Error,\n 401: CustomerPortalSeatsResendInvitation401Error,\n 403: CustomerPortalSeatsResendInvitation403Error,\n 404: CustomerPortalSeatsResendInvitation404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const listClaimedSubscriptionsSeats = (client: ClientBase) => {\n /**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats/subscriptions\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 401: CustomerPortalSeatsListClaimedSubscriptions401Error,\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListClaimedSubscriptionsSeats = (client: ClientBase) => {\n return async function* (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listClaimedSubscriptionsSeats(client)(\n { ...query, page, limit },\n requestOptions,\n );\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\n\nexport function createSeatsService(client: ClientBase) {\n return {\n listSeats: listSeatsSeats(client),\n assignSeat: assignSeatSeats(client),\n revokeSeat: revokeSeatSeats(client),\n resendInvitation: resendInvitationSeats(client),\n listClaimedSubscriptions: listClaimedSubscriptionsSeats(client),\n iterListClaimedSubscriptions: iterListClaimedSubscriptionsSeats(client),\n };\n}\n\nexport type Seats = ReturnType<typeof createSeatsService>;\n"],"mappings":"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"}
1
+ {"version":3,"file":"seats.cjs","names":["CustomerPortalSeatsListSeats401Error","CustomerPortalSeatsListSeats403Error","CustomerPortalSeatsListSeats404Error","HTTPValidationError","CustomerPortalSeatsAssignSeat400Error","CustomerPortalSeatsAssignSeat401Error","CustomerPortalSeatsAssignSeat403Error","CustomerPortalSeatsAssignSeat404Error","CustomerPortalSeatsRevokeSeat401Error","CustomerPortalSeatsRevokeSeat403Error","CustomerPortalSeatsRevokeSeat404Error","CustomerPortalSeatsResendInvitation400Error","CustomerPortalSeatsResendInvitation401Error","CustomerPortalSeatsResendInvitation403Error","CustomerPortalSeatsResendInvitation404Error","CustomerPortalSeatsListClaimedSubscriptions401Error"],"sources":["../../../../src/2026-04/services/customer_portal/seats.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSeat,\n CustomerSeatAssign,\n CustomerSubscription,\n ListResourceCustomerSubscription,\n SeatsList,\n} from \"../../models\";\n\nimport {\n CustomerPortalSeatsAssignSeat400Error,\n CustomerPortalSeatsAssignSeat401Error,\n CustomerPortalSeatsAssignSeat403Error,\n CustomerPortalSeatsAssignSeat404Error,\n CustomerPortalSeatsListClaimedSubscriptions401Error,\n CustomerPortalSeatsListSeats401Error,\n CustomerPortalSeatsListSeats403Error,\n CustomerPortalSeatsListSeats404Error,\n CustomerPortalSeatsResendInvitation400Error,\n CustomerPortalSeatsResendInvitation401Error,\n CustomerPortalSeatsResendInvitation403Error,\n CustomerPortalSeatsResendInvitation404Error,\n CustomerPortalSeatsRevokeSeat401Error,\n CustomerPortalSeatsRevokeSeat403Error,\n CustomerPortalSeatsRevokeSeat404Error,\n HTTPValidationError,\n} from \"../../errors\";\n\nexport const listSeatsSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {SeatsList}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListSeats401Error} Authentication required\n * @throws {CustomerPortalSeatsListSeats403Error} Not permitted\n * @throws {CustomerPortalSeatsListSeats404Error} Subscription or order not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n subscription_id?: string | null;\n order_id?: string | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<SeatsList> => {\n const pathParams = {};\n const queryParams = {\n subscription_id: query?.subscription_id,\n order_id: query?.order_id,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatsList>(response, \"json\", {\n 401: CustomerPortalSeatsListSeats401Error,\n 403: CustomerPortalSeatsListSeats403Error,\n 404: CustomerPortalSeatsListSeats404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const assignSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsAssignSeat400Error} No available seats or customer already has a seat\n * @throws {CustomerPortalSeatsAssignSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted\n * @throws {CustomerPortalSeatsAssignSeat404Error} Subscription, order, or customer not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n body: CustomerSeatAssign,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSeat> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsAssignSeat400Error,\n 401: CustomerPortalSeatsAssignSeat401Error,\n 403: CustomerPortalSeatsAssignSeat403Error,\n 404: CustomerPortalSeatsAssignSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const revokeSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsRevokeSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted\n * @throws {CustomerPortalSeatsRevokeSeat404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/seats/{seat_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 401: CustomerPortalSeatsRevokeSeat401Error,\n 403: CustomerPortalSeatsRevokeSeat403Error,\n 404: CustomerPortalSeatsRevokeSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const resendInvitationSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsResendInvitation400Error} Seat is not pending or already claimed\n * @throws {CustomerPortalSeatsResendInvitation401Error} Authentication required\n * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted\n * @throws {CustomerPortalSeatsResendInvitation404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats/{seat_id}/resend\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsResendInvitation400Error,\n 401: CustomerPortalSeatsResendInvitation401Error,\n 403: CustomerPortalSeatsResendInvitation403Error,\n 404: CustomerPortalSeatsResendInvitation404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const listClaimedSubscriptionsSeats = (client: ClientBase) => {\n /**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats/subscriptions\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 401: CustomerPortalSeatsListClaimedSubscriptions401Error,\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListClaimedSubscriptionsSeats = (client: ClientBase) => {\n return async function* (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listClaimedSubscriptionsSeats(client)(\n { ...query, page, limit },\n requestOptions,\n );\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\n\nexport function createSeatsService(client: ClientBase) {\n return {\n listSeats: listSeatsSeats(client),\n assignSeat: assignSeatSeats(client),\n revokeSeat: revokeSeatSeats(client),\n resendInvitation: resendInvitationSeats(client),\n listClaimedSubscriptions: listClaimedSubscriptionsSeats(client),\n iterListClaimedSubscriptions: iterListClaimedSubscriptionsSeats(client),\n };\n}\n\nexport type Seats = ReturnType<typeof createSeatsService>;\n"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
- import { Nn as ListResourceCustomerSubscription, St as CustomerSeatAssign, _i as SeatsList, kt as CustomerSubscription, xt as CustomerSeat } from "../../../models-1oBCLxA2.cjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../../base-B0J2UyGW.cjs";
1
+ import { Nn as ListResourceCustomerSubscription, St as CustomerSeatAssign, _i as SeatsList, kt as CustomerSubscription, xt as CustomerSeat } from "../../../models-D3N1jo2G.cjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.cjs";
3
3
  //#region src/2026-04/services/customer_portal/seats.d.ts
4
4
  declare const listSeatsSeats: (client: ClientBase) => (query?: {
5
5
  subscription_id?: string | null;
@@ -1,5 +1,5 @@
1
- import { Nn as ListResourceCustomerSubscription, St as CustomerSeatAssign, _i as SeatsList, kt as CustomerSubscription, xt as CustomerSeat } from "../../../models-1oBCLxA2.mjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../../base-B0J2UyGW.mjs";
1
+ import { Nn as ListResourceCustomerSubscription, St as CustomerSeatAssign, _i as SeatsList, kt as CustomerSubscription, xt as CustomerSeat } from "../../../models-D3N1jo2G.mjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.mjs";
3
3
  //#region src/2026-04/services/customer_portal/seats.d.ts
4
4
  declare const listSeatsSeats: (client: ClientBase) => (query?: {
5
5
  subscription_id?: string | null;
@@ -1,4 +1,4 @@
1
- import { A as CustomerPortalSeatsListSeats403Error, D as CustomerPortalSeatsAssignSeat404Error, E as CustomerPortalSeatsAssignSeat403Error, F as CustomerPortalSeatsResendInvitation404Error, I as CustomerPortalSeatsRevokeSeat401Error, L as CustomerPortalSeatsRevokeSeat403Error, M as CustomerPortalSeatsResendInvitation400Error, N as CustomerPortalSeatsResendInvitation401Error, O as CustomerPortalSeatsListClaimedSubscriptions401Error, P as CustomerPortalSeatsResendInvitation403Error, R as CustomerPortalSeatsRevokeSeat404Error, T as CustomerPortalSeatsAssignSeat401Error, ct as HTTPValidationError, j as CustomerPortalSeatsListSeats404Error, k as CustomerPortalSeatsListSeats401Error, w as CustomerPortalSeatsAssignSeat400Error } from "../../../errors-jmLqKeis.mjs";
1
+ import { A as CustomerPortalSeatsListSeats403Error, D as CustomerPortalSeatsAssignSeat404Error, E as CustomerPortalSeatsAssignSeat403Error, F as CustomerPortalSeatsResendInvitation404Error, I as CustomerPortalSeatsRevokeSeat401Error, L as CustomerPortalSeatsRevokeSeat403Error, M as CustomerPortalSeatsResendInvitation400Error, N as CustomerPortalSeatsResendInvitation401Error, O as CustomerPortalSeatsListClaimedSubscriptions401Error, P as CustomerPortalSeatsResendInvitation403Error, R as CustomerPortalSeatsRevokeSeat404Error, T as CustomerPortalSeatsAssignSeat401Error, j as CustomerPortalSeatsListSeats404Error, k as CustomerPortalSeatsListSeats401Error, lt as HTTPValidationError, w as CustomerPortalSeatsAssignSeat400Error } from "../../../errors-D1yM2ZQm.mjs";
2
2
  //#region src/2026-04/services/customer_portal/seats.ts
3
3
  const listSeatsSeats = (client) => {
4
4
  /**
@@ -11,7 +11,7 @@ const listSeatsSeats = (client) => {
11
11
  * @throws {PolarRateLimitError} When the rate limit is exceeded
12
12
  * @throws {PolarServerError} When the server returns a 5xx error
13
13
  * @throws {CustomerPortalSeatsListSeats401Error} Authentication required
14
- * @throws {CustomerPortalSeatsListSeats403Error} Not permitted or seat-based pricing not enabled
14
+ * @throws {CustomerPortalSeatsListSeats403Error} Not permitted
15
15
  * @throws {CustomerPortalSeatsListSeats404Error} Subscription or order not found
16
16
  * @throws {HTTPValidationError} Validation Error
17
17
  */
@@ -42,7 +42,7 @@ const assignSeatSeats = (client) => {
42
42
  * @throws {PolarServerError} When the server returns a 5xx error
43
43
  * @throws {CustomerPortalSeatsAssignSeat400Error} No available seats or customer already has a seat
44
44
  * @throws {CustomerPortalSeatsAssignSeat401Error} Authentication required
45
- * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted or seat-based pricing not enabled
45
+ * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted
46
46
  * @throws {CustomerPortalSeatsAssignSeat404Error} Subscription, order, or customer not found
47
47
  * @throws {HTTPValidationError} Validation Error
48
48
  */
@@ -68,7 +68,7 @@ const revokeSeatSeats = (client) => {
68
68
  * @throws {PolarRateLimitError} When the rate limit is exceeded
69
69
  * @throws {PolarServerError} When the server returns a 5xx error
70
70
  * @throws {CustomerPortalSeatsRevokeSeat401Error} Authentication required
71
- * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted or seat-based pricing not enabled
71
+ * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted
72
72
  * @throws {CustomerPortalSeatsRevokeSeat404Error} Seat not found
73
73
  * @throws {HTTPValidationError} Validation Error
74
74
  */
@@ -95,7 +95,7 @@ const resendInvitationSeats = (client) => {
95
95
  * @throws {PolarServerError} When the server returns a 5xx error
96
96
  * @throws {CustomerPortalSeatsResendInvitation400Error} Seat is not pending or already claimed
97
97
  * @throws {CustomerPortalSeatsResendInvitation401Error} Authentication required
98
- * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted or seat-based pricing not enabled
98
+ * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted
99
99
  * @throws {CustomerPortalSeatsResendInvitation404Error} Seat not found
100
100
  * @throws {HTTPValidationError} Validation Error
101
101
  */
@@ -1 +1 @@
1
- {"version":3,"file":"seats.mjs","names":[],"sources":["../../../../src/2026-04/services/customer_portal/seats.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSeat,\n CustomerSeatAssign,\n CustomerSubscription,\n ListResourceCustomerSubscription,\n SeatsList,\n} from \"../../models\";\n\nimport {\n CustomerPortalSeatsAssignSeat400Error,\n CustomerPortalSeatsAssignSeat401Error,\n CustomerPortalSeatsAssignSeat403Error,\n CustomerPortalSeatsAssignSeat404Error,\n CustomerPortalSeatsListClaimedSubscriptions401Error,\n CustomerPortalSeatsListSeats401Error,\n CustomerPortalSeatsListSeats403Error,\n CustomerPortalSeatsListSeats404Error,\n CustomerPortalSeatsResendInvitation400Error,\n CustomerPortalSeatsResendInvitation401Error,\n CustomerPortalSeatsResendInvitation403Error,\n CustomerPortalSeatsResendInvitation404Error,\n CustomerPortalSeatsRevokeSeat401Error,\n CustomerPortalSeatsRevokeSeat403Error,\n CustomerPortalSeatsRevokeSeat404Error,\n HTTPValidationError,\n} from \"../../errors\";\n\nexport const listSeatsSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {SeatsList}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListSeats401Error} Authentication required\n * @throws {CustomerPortalSeatsListSeats403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsListSeats404Error} Subscription or order not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n subscription_id?: string | null;\n order_id?: string | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<SeatsList> => {\n const pathParams = {};\n const queryParams = {\n subscription_id: query?.subscription_id,\n order_id: query?.order_id,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatsList>(response, \"json\", {\n 401: CustomerPortalSeatsListSeats401Error,\n 403: CustomerPortalSeatsListSeats403Error,\n 404: CustomerPortalSeatsListSeats404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const assignSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsAssignSeat400Error} No available seats or customer already has a seat\n * @throws {CustomerPortalSeatsAssignSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsAssignSeat404Error} Subscription, order, or customer not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n body: CustomerSeatAssign,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSeat> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsAssignSeat400Error,\n 401: CustomerPortalSeatsAssignSeat401Error,\n 403: CustomerPortalSeatsAssignSeat403Error,\n 404: CustomerPortalSeatsAssignSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const revokeSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsRevokeSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsRevokeSeat404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/seats/{seat_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 401: CustomerPortalSeatsRevokeSeat401Error,\n 403: CustomerPortalSeatsRevokeSeat403Error,\n 404: CustomerPortalSeatsRevokeSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const resendInvitationSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsResendInvitation400Error} Seat is not pending or already claimed\n * @throws {CustomerPortalSeatsResendInvitation401Error} Authentication required\n * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerPortalSeatsResendInvitation404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats/{seat_id}/resend\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsResendInvitation400Error,\n 401: CustomerPortalSeatsResendInvitation401Error,\n 403: CustomerPortalSeatsResendInvitation403Error,\n 404: CustomerPortalSeatsResendInvitation404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const listClaimedSubscriptionsSeats = (client: ClientBase) => {\n /**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats/subscriptions\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 401: CustomerPortalSeatsListClaimedSubscriptions401Error,\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListClaimedSubscriptionsSeats = (client: ClientBase) => {\n return async function* (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listClaimedSubscriptionsSeats(client)(\n { ...query, page, limit },\n requestOptions,\n );\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\n\nexport function createSeatsService(client: ClientBase) {\n return {\n listSeats: listSeatsSeats(client),\n assignSeat: assignSeatSeats(client),\n revokeSeat: revokeSeatSeats(client),\n resendInvitation: resendInvitationSeats(client),\n listClaimedSubscriptions: listClaimedSubscriptionsSeats(client),\n iterListClaimedSubscriptions: iterListClaimedSubscriptionsSeats(client),\n };\n}\n\nexport type Seats = ReturnType<typeof createSeatsService>;\n"],"mappings":";;AA4BA,MAAa,kBAAkB,WAAuB;;;;;;;;;;;;;;;CAepD,OAAO,OACL,OAIA,mBACuB;EACvB,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,iBAAiB,OAAO;GACxB,UAAU,OAAO;EACnB;EACA,MAAM,UAAU,OAAO,aACrB,OACA,6BACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAyB,UAAU,QAAQ;GACvD,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,mBAAmB,WAAuB;;;;;;;;;;;;;;;CAerD,OAAO,OACL,MACA,mBAC0B;EAG1B,MAAM,UAAU,OAAO,aACrB,QACA,6BACA,CAAS,GACT,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,mBAAmB,WAAuB;;;;;;;;;;;;;;CAcrD,OAAO,OAAO,SAAiB,mBAA2D;EACxF,MAAM,aAAa,EACR,QACX;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,uCACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,yBAAyB,WAAuB;;;;;;;;;;;;;;;CAe3D,OAAO,OAAO,SAAiB,mBAA2D;EACxF,MAAM,aAAa,EACR,QACX;EAEA,MAAM,UAAU,OAAO,aACrB,QACA,8CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,iCAAiC,WAAuB;;;;;;;;;;;;;;;CAenE,OAAO,OACL,OAIA,mBAC8C;EAC9C,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;EACzB;EACA,MAAM,UAAU,OAAO,aACrB,OACA,2CACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAgD,UAAU,QAAQ;GAC9E,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;;;;;;;;;;;;;;;AAeA,MAAa,qCAAqC,WAAuB;CACvE,OAAO,iBACL,OAIA,gBACsC;EACtC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,8BAA8B,MAAM,CAAC,CAC1D;IAAE,GAAG;IAAO;IAAM;GAAM,GACxB,cACF;GACA,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AAEA,SAAgB,mBAAmB,QAAoB;CACrD,OAAO;EACL,WAAW,eAAe,MAAM;EAChC,YAAY,gBAAgB,MAAM;EAClC,YAAY,gBAAgB,MAAM;EAClC,kBAAkB,sBAAsB,MAAM;EAC9C,0BAA0B,8BAA8B,MAAM;EAC9D,8BAA8B,kCAAkC,MAAM;CACxE;AACF"}
1
+ {"version":3,"file":"seats.mjs","names":[],"sources":["../../../../src/2026-04/services/customer_portal/seats.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSeat,\n CustomerSeatAssign,\n CustomerSubscription,\n ListResourceCustomerSubscription,\n SeatsList,\n} from \"../../models\";\n\nimport {\n CustomerPortalSeatsAssignSeat400Error,\n CustomerPortalSeatsAssignSeat401Error,\n CustomerPortalSeatsAssignSeat403Error,\n CustomerPortalSeatsAssignSeat404Error,\n CustomerPortalSeatsListClaimedSubscriptions401Error,\n CustomerPortalSeatsListSeats401Error,\n CustomerPortalSeatsListSeats403Error,\n CustomerPortalSeatsListSeats404Error,\n CustomerPortalSeatsResendInvitation400Error,\n CustomerPortalSeatsResendInvitation401Error,\n CustomerPortalSeatsResendInvitation403Error,\n CustomerPortalSeatsResendInvitation404Error,\n CustomerPortalSeatsRevokeSeat401Error,\n CustomerPortalSeatsRevokeSeat403Error,\n CustomerPortalSeatsRevokeSeat404Error,\n HTTPValidationError,\n} from \"../../errors\";\n\nexport const listSeatsSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {SeatsList}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListSeats401Error} Authentication required\n * @throws {CustomerPortalSeatsListSeats403Error} Not permitted\n * @throws {CustomerPortalSeatsListSeats404Error} Subscription or order not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n subscription_id?: string | null;\n order_id?: string | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<SeatsList> => {\n const pathParams = {};\n const queryParams = {\n subscription_id: query?.subscription_id,\n order_id: query?.order_id,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatsList>(response, \"json\", {\n 401: CustomerPortalSeatsListSeats401Error,\n 403: CustomerPortalSeatsListSeats403Error,\n 404: CustomerPortalSeatsListSeats404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const assignSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsAssignSeat400Error} No available seats or customer already has a seat\n * @throws {CustomerPortalSeatsAssignSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsAssignSeat403Error} Not permitted\n * @throws {CustomerPortalSeatsAssignSeat404Error} Subscription, order, or customer not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n body: CustomerSeatAssign,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSeat> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsAssignSeat400Error,\n 401: CustomerPortalSeatsAssignSeat401Error,\n 403: CustomerPortalSeatsAssignSeat403Error,\n 404: CustomerPortalSeatsAssignSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const revokeSeatSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsRevokeSeat401Error} Authentication required\n * @throws {CustomerPortalSeatsRevokeSeat403Error} Not permitted\n * @throws {CustomerPortalSeatsRevokeSeat404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/seats/{seat_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 401: CustomerPortalSeatsRevokeSeat401Error,\n 403: CustomerPortalSeatsRevokeSeat403Error,\n 404: CustomerPortalSeatsRevokeSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const resendInvitationSeats = (client: ClientBase) => {\n /**\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsResendInvitation400Error} Seat is not pending or already claimed\n * @throws {CustomerPortalSeatsResendInvitation401Error} Authentication required\n * @throws {CustomerPortalSeatsResendInvitation403Error} Not permitted\n * @throws {CustomerPortalSeatsResendInvitation404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-portal/seats/{seat_id}/resend\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerPortalSeatsResendInvitation400Error,\n 401: CustomerPortalSeatsResendInvitation401Error,\n 403: CustomerPortalSeatsResendInvitation403Error,\n 404: CustomerPortalSeatsResendInvitation404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const listClaimedSubscriptionsSeats = (client: ClientBase) => {\n /**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/seats/subscriptions\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 401: CustomerPortalSeatsListClaimedSubscriptions401Error,\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List all subscriptions where the authenticated customer has claimed a seat.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerPortalSeatsListClaimedSubscriptions401Error} Authentication required\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListClaimedSubscriptionsSeats = (client: ClientBase) => {\n return async function* (\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listClaimedSubscriptionsSeats(client)(\n { ...query, page, limit },\n requestOptions,\n );\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\n\nexport function createSeatsService(client: ClientBase) {\n return {\n listSeats: listSeatsSeats(client),\n assignSeat: assignSeatSeats(client),\n revokeSeat: revokeSeatSeats(client),\n resendInvitation: resendInvitationSeats(client),\n listClaimedSubscriptions: listClaimedSubscriptionsSeats(client),\n iterListClaimedSubscriptions: iterListClaimedSubscriptionsSeats(client),\n };\n}\n\nexport type Seats = ReturnType<typeof createSeatsService>;\n"],"mappings":";;AA4BA,MAAa,kBAAkB,WAAuB;;;;;;;;;;;;;;;CAepD,OAAO,OACL,OAIA,mBACuB;EACvB,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,iBAAiB,OAAO;GACxB,UAAU,OAAO;EACnB;EACA,MAAM,UAAU,OAAO,aACrB,OACA,6BACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAyB,UAAU,QAAQ;GACvD,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,mBAAmB,WAAuB;;;;;;;;;;;;;;;CAerD,OAAO,OACL,MACA,mBAC0B;EAG1B,MAAM,UAAU,OAAO,aACrB,QACA,6BACA,CAAS,GACT,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,mBAAmB,WAAuB;;;;;;;;;;;;;;CAcrD,OAAO,OAAO,SAAiB,mBAA2D;EACxF,MAAM,aAAa,EACR,QACX;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,uCACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,yBAAyB,WAAuB;;;;;;;;;;;;;;;CAe3D,OAAO,OAAO,SAAiB,mBAA2D;EACxF,MAAM,aAAa,EACR,QACX;EAEA,MAAM,UAAU,OAAO,aACrB,QACA,8CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,iCAAiC,WAAuB;;;;;;;;;;;;;;;CAenE,OAAO,OACL,OAIA,mBAC8C;EAC9C,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;EACzB;EACA,MAAM,UAAU,OAAO,aACrB,OACA,2CACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAgD,UAAU,QAAQ;GAC9E,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;;;;;;;;;;;;;;;AAeA,MAAa,qCAAqC,WAAuB;CACvE,OAAO,iBACL,OAIA,gBACsC;EACtC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,8BAA8B,MAAM,CAAC,CAC1D;IAAE,GAAG;IAAO;IAAM;GAAM,GACxB,cACF;GACA,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AAEA,SAAgB,mBAAmB,QAAoB;CACrD,OAAO;EACL,WAAW,eAAe,MAAM;EAChC,YAAY,gBAAgB,MAAM;EAClC,YAAY,gBAAgB,MAAM;EAClC,kBAAkB,sBAAsB,MAAM;EAC9C,0BAA0B,8BAA8B,MAAM;EAC9D,8BAA8B,kCAAkC,MAAM;CACxE;AACF"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_errors = require("../../../errors-uRD_PnoN.cjs");
2
+ const require_errors = require("../../../errors-CPJ329AT.cjs");
3
3
  //#region src/2026-04/services/customer_portal/subscriptions.ts
4
4
  const listSubscriptions = (client) => {
5
5
  /**
@@ -125,7 +125,7 @@ const updateSubscriptions = (client) => {
125
125
  * @throws {PaymentFailed} Payment required to apply the subscription update.
126
126
  * @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.
127
127
  * @throws {ResourceNotFound} Customer subscription was not found.
128
- * @throws {PaymentMethodRequired} The subscription has no payment method to charge.
128
+ * @throws {CustomerPortalSubscriptionsUpdate409Error} The subscription has no payment method to charge, or is not scheduled to be canceled.
129
129
  * @throws {HTTPValidationError} Validation Error
130
130
  */
131
131
  return async (id, body, requestOptions) => {
@@ -136,7 +136,7 @@ const updateSubscriptions = (client) => {
136
136
  402: require_errors.PaymentFailed,
137
137
  403: require_errors.CustomerPortalSubscriptionsUpdate403Error,
138
138
  404: require_errors.ResourceNotFound,
139
- 409: require_errors.PaymentMethodRequired,
139
+ 409: require_errors.CustomerPortalSubscriptionsUpdate409Error,
140
140
  422: require_errors.HTTPValidationError
141
141
  });
142
142
  };
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.cjs","names":["HTTPValidationError","ResourceNotFound","AlreadyCanceledSubscription","PaymentFailed","CustomerPortalSubscriptionsUpdate403Error","PaymentMethodRequired"],"sources":["../../../../src/2026-04/services/customer_portal/subscriptions.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSubscription,\n CustomerSubscriptionSortProperty,\n CustomerSubscriptionUpdate,\n ListResourceCustomerSubscription,\n} from \"../../models\";\n\nimport {\n AlreadyCanceledSubscription,\n CustomerPortalSubscriptionsUpdate403Error,\n HTTPValidationError,\n PaymentFailed,\n PaymentMethodRequired,\n ResourceNotFound,\n} from \"../../errors\";\n\nexport const listSubscriptions = (client: ClientBase) => {\n /**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n product_id: query?.product_id,\n active: query?.active,\n query: query?.query,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-started_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListSubscriptions = (client: ClientBase) => {\n return async function* (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listSubscriptions(client)({ ...query, page, limit }, requestOptions);\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\nexport const getSubscriptions = (client: ClientBase) => {\n /**\n * Get a subscription for the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const cancelSubscriptions = (client: ClientBase) => {\n /**\n * Cancel a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {AlreadyCanceledSubscription} Customer subscription is already canceled or will be at the end of the period, or the user lacks billing permissions.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 403: AlreadyCanceledSubscription,\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const updateSubscriptions = (client: ClientBase) => {\n /**\n * Update a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {PaymentFailed} Payment required to apply the subscription update.\n * @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {PaymentMethodRequired} The subscription has no payment method to charge.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n body: CustomerSubscriptionUpdate,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 402: PaymentFailed,\n 403: CustomerPortalSubscriptionsUpdate403Error,\n 404: ResourceNotFound,\n 409: PaymentMethodRequired,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createSubscriptionsService(client: ClientBase) {\n return {\n list: listSubscriptions(client),\n get: getSubscriptions(client),\n cancel: cancelSubscriptions(client),\n update: updateSubscriptions(client),\n iterList: iterListSubscriptions(client),\n };\n}\n\nexport type Subscriptions = ReturnType<typeof createSubscriptionsService>;\n"],"mappings":";;;AAiBA,MAAa,qBAAqB,WAAuB;;;;;;;;;;;;;;CAcvD,OAAO,OACL,OAQA,mBAC8C;EAC9C,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,OAAO,OAAO;GACd,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,aAAa;EAC3C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,sCACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAgD,UAAU,QAAQ,EAC9E,KAAKA,eAAAA,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,yBAAyB,WAAuB;CAC3D,OAAO,iBACL,OAQA,gBACsC;EACtC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,kBAAkB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GAC1F,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,oBAAoB,WAAuB;;;;;;;;;;;;;;;CAetD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAKC,eAAAA;GACL,KAAKD,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;CAczD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAKE,eAAAA;GACL,KAAKD,eAAAA;GACL,KAAKD,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;;;;CAiBzD,OAAO,OACL,IACA,MACA,mBACkC;EAClC,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,SACA,0CACA,YACA,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAKG,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKH,eAAAA;GACL,KAAKI,eAAAA;GACL,KAAKL,eAAAA;EACP,CAAC;CACH;AACF;AAEA,SAAgB,2BAA2B,QAAoB;CAC7D,OAAO;EACL,MAAM,kBAAkB,MAAM;EAC9B,KAAK,iBAAiB,MAAM;EAC5B,QAAQ,oBAAoB,MAAM;EAClC,QAAQ,oBAAoB,MAAM;EAClC,UAAU,sBAAsB,MAAM;CACxC;AACF"}
1
+ {"version":3,"file":"subscriptions.cjs","names":["HTTPValidationError","ResourceNotFound","AlreadyCanceledSubscription","PaymentFailed","CustomerPortalSubscriptionsUpdate403Error","CustomerPortalSubscriptionsUpdate409Error"],"sources":["../../../../src/2026-04/services/customer_portal/subscriptions.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSubscription,\n CustomerSubscriptionSortProperty,\n CustomerSubscriptionUpdate,\n ListResourceCustomerSubscription,\n} from \"../../models\";\n\nimport {\n AlreadyCanceledSubscription,\n CustomerPortalSubscriptionsUpdate403Error,\n CustomerPortalSubscriptionsUpdate409Error,\n HTTPValidationError,\n PaymentFailed,\n ResourceNotFound,\n} from \"../../errors\";\n\nexport const listSubscriptions = (client: ClientBase) => {\n /**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n product_id: query?.product_id,\n active: query?.active,\n query: query?.query,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-started_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListSubscriptions = (client: ClientBase) => {\n return async function* (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listSubscriptions(client)({ ...query, page, limit }, requestOptions);\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\nexport const getSubscriptions = (client: ClientBase) => {\n /**\n * Get a subscription for the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const cancelSubscriptions = (client: ClientBase) => {\n /**\n * Cancel a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {AlreadyCanceledSubscription} Customer subscription is already canceled or will be at the end of the period, or the user lacks billing permissions.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 403: AlreadyCanceledSubscription,\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const updateSubscriptions = (client: ClientBase) => {\n /**\n * Update a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {PaymentFailed} Payment required to apply the subscription update.\n * @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {CustomerPortalSubscriptionsUpdate409Error} The subscription has no payment method to charge, or is not scheduled to be canceled.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n body: CustomerSubscriptionUpdate,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 402: PaymentFailed,\n 403: CustomerPortalSubscriptionsUpdate403Error,\n 404: ResourceNotFound,\n 409: CustomerPortalSubscriptionsUpdate409Error,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createSubscriptionsService(client: ClientBase) {\n return {\n list: listSubscriptions(client),\n get: getSubscriptions(client),\n cancel: cancelSubscriptions(client),\n update: updateSubscriptions(client),\n iterList: iterListSubscriptions(client),\n };\n}\n\nexport type Subscriptions = ReturnType<typeof createSubscriptionsService>;\n"],"mappings":";;;AAiBA,MAAa,qBAAqB,WAAuB;;;;;;;;;;;;;;CAcvD,OAAO,OACL,OAQA,mBAC8C;EAC9C,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,OAAO,OAAO;GACd,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,aAAa;EAC3C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,sCACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAgD,UAAU,QAAQ,EAC9E,KAAKA,eAAAA,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,yBAAyB,WAAuB;CAC3D,OAAO,iBACL,OAQA,gBACsC;EACtC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,kBAAkB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GAC1F,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,oBAAoB,WAAuB;;;;;;;;;;;;;;;CAetD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAKC,eAAAA;GACL,KAAKD,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;CAczD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAKE,eAAAA;GACL,KAAKD,eAAAA;GACL,KAAKD,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;;;;CAiBzD,OAAO,OACL,IACA,MACA,mBACkC;EAClC,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,SACA,0CACA,YACA,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAKG,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKH,eAAAA;GACL,KAAKI,eAAAA;GACL,KAAKL,eAAAA;EACP,CAAC;CACH;AACF;AAEA,SAAgB,2BAA2B,QAAoB;CAC7D,OAAO;EACL,MAAM,kBAAkB,MAAM;EAC9B,KAAK,iBAAiB,MAAM;EAC5B,QAAQ,oBAAoB,MAAM;EAClC,QAAQ,oBAAoB,MAAM;EAClC,UAAU,sBAAsB,MAAM;CACxC;AACF"}
@@ -1,5 +1,5 @@
1
- import { At as CustomerSubscriptionSortProperty, Nn as ListResourceCustomerSubscription, jt as CustomerSubscriptionUpdate, kt as CustomerSubscription } from "../../../models-1oBCLxA2.cjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../../base-B0J2UyGW.cjs";
1
+ import { At as CustomerSubscriptionSortProperty, Nn as ListResourceCustomerSubscription, jt as CustomerSubscriptionUpdate, kt as CustomerSubscription } from "../../../models-D3N1jo2G.cjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.cjs";
3
3
  //#region src/2026-04/services/customer_portal/subscriptions.d.ts
4
4
  declare const listSubscriptions: (client: ClientBase) => (query?: {
5
5
  product_id?: string | string[] | null;
@@ -1,5 +1,5 @@
1
- import { At as CustomerSubscriptionSortProperty, Nn as ListResourceCustomerSubscription, jt as CustomerSubscriptionUpdate, kt as CustomerSubscription } from "../../../models-1oBCLxA2.mjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../../base-B0J2UyGW.mjs";
1
+ import { At as CustomerSubscriptionSortProperty, Nn as ListResourceCustomerSubscription, jt as CustomerSubscriptionUpdate, kt as CustomerSubscription } from "../../../models-D3N1jo2G.mjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.mjs";
3
3
  //#region src/2026-04/services/customer_portal/subscriptions.d.ts
4
4
  declare const listSubscriptions: (client: ClientBase) => (query?: {
5
5
  product_id?: string | string[] | null;
@@ -1,4 +1,4 @@
1
- import { St as PaymentMethodRequired, Tt as ResourceNotFound, bt as PaymentFailed, ct as HTTPValidationError, t as AlreadyCanceledSubscription, z as CustomerPortalSubscriptionsUpdate403Error } from "../../../errors-jmLqKeis.mjs";
1
+ import { B as CustomerPortalSubscriptionsUpdate409Error, Tt as ResourceNotFound, lt as HTTPValidationError, t as AlreadyCanceledSubscription, xt as PaymentFailed, z as CustomerPortalSubscriptionsUpdate403Error } from "../../../errors-D1yM2ZQm.mjs";
2
2
  //#region src/2026-04/services/customer_portal/subscriptions.ts
3
3
  const listSubscriptions = (client) => {
4
4
  /**
@@ -124,7 +124,7 @@ const updateSubscriptions = (client) => {
124
124
  * @throws {PaymentFailed} Payment required to apply the subscription update.
125
125
  * @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.
126
126
  * @throws {ResourceNotFound} Customer subscription was not found.
127
- * @throws {PaymentMethodRequired} The subscription has no payment method to charge.
127
+ * @throws {CustomerPortalSubscriptionsUpdate409Error} The subscription has no payment method to charge, or is not scheduled to be canceled.
128
128
  * @throws {HTTPValidationError} Validation Error
129
129
  */
130
130
  return async (id, body, requestOptions) => {
@@ -135,7 +135,7 @@ const updateSubscriptions = (client) => {
135
135
  402: PaymentFailed,
136
136
  403: CustomerPortalSubscriptionsUpdate403Error,
137
137
  404: ResourceNotFound,
138
- 409: PaymentMethodRequired,
138
+ 409: CustomerPortalSubscriptionsUpdate409Error,
139
139
  422: HTTPValidationError
140
140
  });
141
141
  };
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.mjs","names":[],"sources":["../../../../src/2026-04/services/customer_portal/subscriptions.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSubscription,\n CustomerSubscriptionSortProperty,\n CustomerSubscriptionUpdate,\n ListResourceCustomerSubscription,\n} from \"../../models\";\n\nimport {\n AlreadyCanceledSubscription,\n CustomerPortalSubscriptionsUpdate403Error,\n HTTPValidationError,\n PaymentFailed,\n PaymentMethodRequired,\n ResourceNotFound,\n} from \"../../errors\";\n\nexport const listSubscriptions = (client: ClientBase) => {\n /**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n product_id: query?.product_id,\n active: query?.active,\n query: query?.query,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-started_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListSubscriptions = (client: ClientBase) => {\n return async function* (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listSubscriptions(client)({ ...query, page, limit }, requestOptions);\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\nexport const getSubscriptions = (client: ClientBase) => {\n /**\n * Get a subscription for the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const cancelSubscriptions = (client: ClientBase) => {\n /**\n * Cancel a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {AlreadyCanceledSubscription} Customer subscription is already canceled or will be at the end of the period, or the user lacks billing permissions.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 403: AlreadyCanceledSubscription,\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const updateSubscriptions = (client: ClientBase) => {\n /**\n * Update a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {PaymentFailed} Payment required to apply the subscription update.\n * @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {PaymentMethodRequired} The subscription has no payment method to charge.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n body: CustomerSubscriptionUpdate,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 402: PaymentFailed,\n 403: CustomerPortalSubscriptionsUpdate403Error,\n 404: ResourceNotFound,\n 409: PaymentMethodRequired,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createSubscriptionsService(client: ClientBase) {\n return {\n list: listSubscriptions(client),\n get: getSubscriptions(client),\n cancel: cancelSubscriptions(client),\n update: updateSubscriptions(client),\n iterList: iterListSubscriptions(client),\n };\n}\n\nexport type Subscriptions = ReturnType<typeof createSubscriptionsService>;\n"],"mappings":";;AAiBA,MAAa,qBAAqB,WAAuB;;;;;;;;;;;;;;CAcvD,OAAO,OACL,OAQA,mBAC8C;EAC9C,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,OAAO,OAAO;GACd,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,aAAa;EAC3C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,sCACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAgD,UAAU,QAAQ,EAC9E,KAAK,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,yBAAyB,WAAuB;CAC3D,OAAO,iBACL,OAQA,gBACsC;EACtC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,kBAAkB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GAC1F,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,oBAAoB,WAAuB;;;;;;;;;;;;;;;CAetD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;CAczD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;;;;CAiBzD,OAAO,OACL,IACA,MACA,mBACkC;EAClC,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,SACA,0CACA,YACA,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AAEA,SAAgB,2BAA2B,QAAoB;CAC7D,OAAO;EACL,MAAM,kBAAkB,MAAM;EAC9B,KAAK,iBAAiB,MAAM;EAC5B,QAAQ,oBAAoB,MAAM;EAClC,QAAQ,oBAAoB,MAAM;EAClC,UAAU,sBAAsB,MAAM;CACxC;AACF"}
1
+ {"version":3,"file":"subscriptions.mjs","names":[],"sources":["../../../../src/2026-04/services/customer_portal/subscriptions.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSubscription,\n CustomerSubscriptionSortProperty,\n CustomerSubscriptionUpdate,\n ListResourceCustomerSubscription,\n} from \"../../models\";\n\nimport {\n AlreadyCanceledSubscription,\n CustomerPortalSubscriptionsUpdate403Error,\n CustomerPortalSubscriptionsUpdate409Error,\n HTTPValidationError,\n PaymentFailed,\n ResourceNotFound,\n} from \"../../errors\";\n\nexport const listSubscriptions = (client: ClientBase) => {\n /**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n product_id: query?.product_id,\n active: query?.active,\n query: query?.query,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-started_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListSubscriptions = (client: ClientBase) => {\n return async function* (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listSubscriptions(client)({ ...query, page, limit }, requestOptions);\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\nexport const getSubscriptions = (client: ClientBase) => {\n /**\n * Get a subscription for the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const cancelSubscriptions = (client: ClientBase) => {\n /**\n * Cancel a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {AlreadyCanceledSubscription} Customer subscription is already canceled or will be at the end of the period, or the user lacks billing permissions.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 403: AlreadyCanceledSubscription,\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const updateSubscriptions = (client: ClientBase) => {\n /**\n * Update a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {PaymentFailed} Payment required to apply the subscription update.\n * @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {CustomerPortalSubscriptionsUpdate409Error} The subscription has no payment method to charge, or is not scheduled to be canceled.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n body: CustomerSubscriptionUpdate,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 402: PaymentFailed,\n 403: CustomerPortalSubscriptionsUpdate403Error,\n 404: ResourceNotFound,\n 409: CustomerPortalSubscriptionsUpdate409Error,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createSubscriptionsService(client: ClientBase) {\n return {\n list: listSubscriptions(client),\n get: getSubscriptions(client),\n cancel: cancelSubscriptions(client),\n update: updateSubscriptions(client),\n iterList: iterListSubscriptions(client),\n };\n}\n\nexport type Subscriptions = ReturnType<typeof createSubscriptionsService>;\n"],"mappings":";;AAiBA,MAAa,qBAAqB,WAAuB;;;;;;;;;;;;;;CAcvD,OAAO,OACL,OAQA,mBAC8C;EAC9C,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,OAAO,OAAO;GACd,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,aAAa;EAC3C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,sCACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAgD,UAAU,QAAQ,EAC9E,KAAK,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,yBAAyB,WAAuB;CAC3D,OAAO,iBACL,OAQA,gBACsC;EACtC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,kBAAkB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GAC1F,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,oBAAoB,WAAuB;;;;;;;;;;;;;;;CAetD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;CAczD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;;;;CAiBzD,OAAO,OACL,IACA,MACA,mBACkC;EAClC,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,SACA,0CACA,YACA,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AAEA,SAAgB,2BAA2B,QAAoB;CAC7D,OAAO;EACL,MAAM,kBAAkB,MAAM;EAC9B,KAAK,iBAAiB,MAAM;EAC5B,QAAQ,oBAAoB,MAAM;EAClC,QAAQ,oBAAoB,MAAM;EAClC,UAAU,sBAAsB,MAAM;CACxC;AACF"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_errors = require("../../../errors-uRD_PnoN.cjs");
2
+ const require_errors = require("../../../errors-CPJ329AT.cjs");
3
3
  //#region src/2026-04/services/customer_portal/wallets.ts
4
4
  const listWallets = (client) => {
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { Ft as CustomerWalletSortProperty, Pn as ListResourceCustomerWallet, Pt as CustomerWallet } from "../../../models-1oBCLxA2.cjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../../base-B0J2UyGW.cjs";
1
+ import { Ft as CustomerWalletSortProperty, Pn as ListResourceCustomerWallet, Pt as CustomerWallet } from "../../../models-D3N1jo2G.cjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.cjs";
3
3
  //#region src/2026-04/services/customer_portal/wallets.d.ts
4
4
  declare const listWallets: (client: ClientBase) => (query?: {
5
5
  page?: number;
@@ -1,5 +1,5 @@
1
- import { Ft as CustomerWalletSortProperty, Pn as ListResourceCustomerWallet, Pt as CustomerWallet } from "../../../models-1oBCLxA2.mjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../../base-B0J2UyGW.mjs";
1
+ import { Ft as CustomerWalletSortProperty, Pn as ListResourceCustomerWallet, Pt as CustomerWallet } from "../../../models-D3N1jo2G.mjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.mjs";
3
3
  //#region src/2026-04/services/customer_portal/wallets.d.ts
4
4
  declare const listWallets: (client: ClientBase) => (query?: {
5
5
  page?: number;
@@ -1,4 +1,4 @@
1
- import { Tt as ResourceNotFound, ct as HTTPValidationError } from "../../../errors-jmLqKeis.mjs";
1
+ import { Tt as ResourceNotFound, lt as HTTPValidationError } from "../../../errors-D1yM2ZQm.mjs";
2
2
  //#region src/2026-04/services/customer_portal/wallets.ts
3
3
  const listWallets = (client) => {
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_errors = require("../../errors-uRD_PnoN.cjs");
2
+ const require_errors = require("../../errors-CPJ329AT.cjs");
3
3
  //#region src/2026-04/services/customer_seats.ts
4
4
  const listSeatsCustomerSeats = (client) => {
5
5
  /**
@@ -12,7 +12,7 @@ const listSeatsCustomerSeats = (client) => {
12
12
  * @throws {PolarRateLimitError} When the rate limit is exceeded
13
13
  * @throws {PolarServerError} When the server returns a 5xx error
14
14
  * @throws {CustomerSeatsListSeats401Error} Authentication required
15
- * @throws {CustomerSeatsListSeats403Error} Not permitted or seat-based pricing not enabled
15
+ * @throws {CustomerSeatsListSeats403Error} Not permitted
16
16
  * @throws {CustomerSeatsListSeats404Error} Subscription or order not found
17
17
  * @throws {HTTPValidationError} Validation Error
18
18
  */
@@ -44,7 +44,7 @@ const assignSeatCustomerSeats = (client) => {
44
44
  * @throws {PolarServerError} When the server returns a 5xx error
45
45
  * @throws {CustomerSeatsAssignSeat400Error} No available seats or customer already has a seat
46
46
  * @throws {CustomerSeatsAssignSeat401Error} Authentication required
47
- * @throws {CustomerSeatsAssignSeat403Error} Not permitted or seat-based pricing not enabled
47
+ * @throws {CustomerSeatsAssignSeat403Error} Not permitted
48
48
  * @throws {CustomerSeatsAssignSeat404Error} Subscription, order, or customer not found
49
49
  * @throws {HTTPValidationError} Validation Error
50
50
  */
@@ -71,7 +71,7 @@ const revokeSeatCustomerSeats = (client) => {
71
71
  * @throws {PolarRateLimitError} When the rate limit is exceeded
72
72
  * @throws {PolarServerError} When the server returns a 5xx error
73
73
  * @throws {CustomerSeatsRevokeSeat401Error} Authentication required
74
- * @throws {CustomerSeatsRevokeSeat403Error} Not permitted or seat-based pricing not enabled
74
+ * @throws {CustomerSeatsRevokeSeat403Error} Not permitted
75
75
  * @throws {CustomerSeatsRevokeSeat404Error} Seat not found
76
76
  * @throws {HTTPValidationError} Validation Error
77
77
  */
@@ -99,7 +99,7 @@ const resendInvitationCustomerSeats = (client) => {
99
99
  * @throws {PolarServerError} When the server returns a 5xx error
100
100
  * @throws {CustomerSeatsResendInvitation400Error} Seat is not pending or already claimed
101
101
  * @throws {CustomerSeatsResendInvitation401Error} Authentication required
102
- * @throws {CustomerSeatsResendInvitation403Error} Not permitted or seat-based pricing not enabled
102
+ * @throws {CustomerSeatsResendInvitation403Error} Not permitted
103
103
  * @throws {CustomerSeatsResendInvitation404Error} Seat not found
104
104
  * @throws {HTTPValidationError} Validation Error
105
105
  */
@@ -1 +1 @@
1
- {"version":3,"file":"customer_seats.cjs","names":["CustomerSeatsListSeats401Error","CustomerSeatsListSeats403Error","CustomerSeatsListSeats404Error","HTTPValidationError","CustomerSeatsAssignSeat400Error","CustomerSeatsAssignSeat401Error","CustomerSeatsAssignSeat403Error","CustomerSeatsAssignSeat404Error","CustomerSeatsRevokeSeat401Error","CustomerSeatsRevokeSeat403Error","CustomerSeatsRevokeSeat404Error","CustomerSeatsResendInvitation400Error","CustomerSeatsResendInvitation401Error","CustomerSeatsResendInvitation403Error","CustomerSeatsResendInvitation404Error","CustomerSeatsGetClaimInfo400Error","CustomerSeatsGetClaimInfo403Error","CustomerSeatsGetClaimInfo404Error","CustomerSeatsClaimSeat400Error","CustomerSeatsClaimSeat403Error"],"sources":["../../../src/2026-04/services/customer_seats.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../base\";\nimport type {\n CustomerSeat,\n CustomerSeatClaimResponse,\n SeatAssign,\n SeatClaim,\n SeatClaimInfo,\n SeatsList,\n} from \"../models\";\n\nimport {\n CustomerSeatsAssignSeat400Error,\n CustomerSeatsAssignSeat401Error,\n CustomerSeatsAssignSeat403Error,\n CustomerSeatsAssignSeat404Error,\n CustomerSeatsClaimSeat400Error,\n CustomerSeatsClaimSeat403Error,\n CustomerSeatsGetClaimInfo400Error,\n CustomerSeatsGetClaimInfo403Error,\n CustomerSeatsGetClaimInfo404Error,\n CustomerSeatsListSeats401Error,\n CustomerSeatsListSeats403Error,\n CustomerSeatsListSeats404Error,\n CustomerSeatsResendInvitation400Error,\n CustomerSeatsResendInvitation401Error,\n CustomerSeatsResendInvitation403Error,\n CustomerSeatsResendInvitation404Error,\n CustomerSeatsRevokeSeat401Error,\n CustomerSeatsRevokeSeat403Error,\n CustomerSeatsRevokeSeat404Error,\n HTTPValidationError,\n} from \"../errors\";\n\nexport const listSeatsCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:read`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {SeatsList}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsListSeats401Error} Authentication required\n * @throws {CustomerSeatsListSeats403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerSeatsListSeats404Error} Subscription or order not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n subscription_id?: string | null;\n order_id?: string | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<SeatsList> => {\n const pathParams = {};\n const queryParams = {\n subscription_id: query?.subscription_id,\n order_id: query?.order_id,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-seats\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatsList>(response, \"json\", {\n 401: CustomerSeatsListSeats401Error,\n 403: CustomerSeatsListSeats403Error,\n 404: CustomerSeatsListSeats404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const assignSeatCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:write`\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsAssignSeat400Error} No available seats or customer already has a seat\n * @throws {CustomerSeatsAssignSeat401Error} Authentication required\n * @throws {CustomerSeatsAssignSeat403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerSeatsAssignSeat404Error} Subscription, order, or customer not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (body: SeatAssign, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-seats\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerSeatsAssignSeat400Error,\n 401: CustomerSeatsAssignSeat401Error,\n 403: CustomerSeatsAssignSeat403Error,\n 404: CustomerSeatsAssignSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const revokeSeatCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:write`\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsRevokeSeat401Error} Authentication required\n * @throws {CustomerSeatsRevokeSeat403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerSeatsRevokeSeat404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-seats/{seat_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 401: CustomerSeatsRevokeSeat401Error,\n 403: CustomerSeatsRevokeSeat403Error,\n 404: CustomerSeatsRevokeSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const resendInvitationCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:write`\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsResendInvitation400Error} Seat is not pending or already claimed\n * @throws {CustomerSeatsResendInvitation401Error} Authentication required\n * @throws {CustomerSeatsResendInvitation403Error} Not permitted or seat-based pricing not enabled\n * @throws {CustomerSeatsResendInvitation404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-seats/{seat_id}/resend\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerSeatsResendInvitation400Error,\n 401: CustomerSeatsResendInvitation401Error,\n 403: CustomerSeatsResendInvitation403Error,\n 404: CustomerSeatsResendInvitation404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const getClaimInfoCustomerSeats = (client: ClientBase) => {\n /**\n *\n * @param invitation_token\n * @param requestOptions - Request options\n * @returns {SeatClaimInfo}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsGetClaimInfo400Error} Invalid or expired invitation token\n * @throws {CustomerSeatsGetClaimInfo403Error} Seat-based pricing not enabled for organization\n * @throws {CustomerSeatsGetClaimInfo404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n invitation_token: string,\n requestOptions?: RequestOptions,\n ): Promise<SeatClaimInfo> => {\n const pathParams = {\n invitation_token: invitation_token,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-seats/claim/{invitation_token}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatClaimInfo>(response, \"json\", {\n 400: CustomerSeatsGetClaimInfo400Error,\n 403: CustomerSeatsGetClaimInfo403Error,\n 404: CustomerSeatsGetClaimInfo404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const claimSeatCustomerSeats = (client: ClientBase) => {\n /**\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeatClaimResponse}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsClaimSeat400Error} Invalid, expired, or already claimed token\n * @throws {CustomerSeatsClaimSeat403Error} Seat-based pricing not enabled for organization\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n body: SeatClaim,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSeatClaimResponse> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-seats/claim\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeatClaimResponse>(response, \"json\", {\n 400: CustomerSeatsClaimSeat400Error,\n 403: CustomerSeatsClaimSeat403Error,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createCustomerSeatsService(client: ClientBase) {\n return {\n listSeats: listSeatsCustomerSeats(client),\n assignSeat: assignSeatCustomerSeats(client),\n revokeSeat: revokeSeatCustomerSeats(client),\n resendInvitation: resendInvitationCustomerSeats(client),\n getClaimInfo: getClaimInfoCustomerSeats(client),\n claimSeat: claimSeatCustomerSeats(client),\n };\n}\n\nexport type CustomerSeats = ReturnType<typeof createCustomerSeatsService>;\n"],"mappings":"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"}
1
+ {"version":3,"file":"customer_seats.cjs","names":["CustomerSeatsListSeats401Error","CustomerSeatsListSeats403Error","CustomerSeatsListSeats404Error","HTTPValidationError","CustomerSeatsAssignSeat400Error","CustomerSeatsAssignSeat401Error","CustomerSeatsAssignSeat403Error","CustomerSeatsAssignSeat404Error","CustomerSeatsRevokeSeat401Error","CustomerSeatsRevokeSeat403Error","CustomerSeatsRevokeSeat404Error","CustomerSeatsResendInvitation400Error","CustomerSeatsResendInvitation401Error","CustomerSeatsResendInvitation403Error","CustomerSeatsResendInvitation404Error","CustomerSeatsGetClaimInfo400Error","CustomerSeatsGetClaimInfo403Error","CustomerSeatsGetClaimInfo404Error","CustomerSeatsClaimSeat400Error","CustomerSeatsClaimSeat403Error"],"sources":["../../../src/2026-04/services/customer_seats.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../base\";\nimport type {\n CustomerSeat,\n CustomerSeatClaimResponse,\n SeatAssign,\n SeatClaim,\n SeatClaimInfo,\n SeatsList,\n} from \"../models\";\n\nimport {\n CustomerSeatsAssignSeat400Error,\n CustomerSeatsAssignSeat401Error,\n CustomerSeatsAssignSeat403Error,\n CustomerSeatsAssignSeat404Error,\n CustomerSeatsClaimSeat400Error,\n CustomerSeatsClaimSeat403Error,\n CustomerSeatsGetClaimInfo400Error,\n CustomerSeatsGetClaimInfo403Error,\n CustomerSeatsGetClaimInfo404Error,\n CustomerSeatsListSeats401Error,\n CustomerSeatsListSeats403Error,\n CustomerSeatsListSeats404Error,\n CustomerSeatsResendInvitation400Error,\n CustomerSeatsResendInvitation401Error,\n CustomerSeatsResendInvitation403Error,\n CustomerSeatsResendInvitation404Error,\n CustomerSeatsRevokeSeat401Error,\n CustomerSeatsRevokeSeat403Error,\n CustomerSeatsRevokeSeat404Error,\n HTTPValidationError,\n} from \"../errors\";\n\nexport const listSeatsCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:read`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {SeatsList}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsListSeats401Error} Authentication required\n * @throws {CustomerSeatsListSeats403Error} Not permitted\n * @throws {CustomerSeatsListSeats404Error} Subscription or order not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n subscription_id?: string | null;\n order_id?: string | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<SeatsList> => {\n const pathParams = {};\n const queryParams = {\n subscription_id: query?.subscription_id,\n order_id: query?.order_id,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-seats\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatsList>(response, \"json\", {\n 401: CustomerSeatsListSeats401Error,\n 403: CustomerSeatsListSeats403Error,\n 404: CustomerSeatsListSeats404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const assignSeatCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:write`\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsAssignSeat400Error} No available seats or customer already has a seat\n * @throws {CustomerSeatsAssignSeat401Error} Authentication required\n * @throws {CustomerSeatsAssignSeat403Error} Not permitted\n * @throws {CustomerSeatsAssignSeat404Error} Subscription, order, or customer not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (body: SeatAssign, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-seats\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerSeatsAssignSeat400Error,\n 401: CustomerSeatsAssignSeat401Error,\n 403: CustomerSeatsAssignSeat403Error,\n 404: CustomerSeatsAssignSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const revokeSeatCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:write`\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsRevokeSeat401Error} Authentication required\n * @throws {CustomerSeatsRevokeSeat403Error} Not permitted\n * @throws {CustomerSeatsRevokeSeat404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-seats/{seat_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 401: CustomerSeatsRevokeSeat401Error,\n 403: CustomerSeatsRevokeSeat403Error,\n 404: CustomerSeatsRevokeSeat404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const resendInvitationCustomerSeats = (client: ClientBase) => {\n /**\n * **Scopes**: `customer_seats:write`\n *\n * @param seat_id\n * @param requestOptions - Request options\n * @returns {CustomerSeat}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsResendInvitation400Error} Seat is not pending or already claimed\n * @throws {CustomerSeatsResendInvitation401Error} Authentication required\n * @throws {CustomerSeatsResendInvitation403Error} Not permitted\n * @throws {CustomerSeatsResendInvitation404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (seat_id: string, requestOptions?: RequestOptions): Promise<CustomerSeat> => {\n const pathParams = {\n seat_id: seat_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-seats/{seat_id}/resend\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeat>(response, \"json\", {\n 400: CustomerSeatsResendInvitation400Error,\n 401: CustomerSeatsResendInvitation401Error,\n 403: CustomerSeatsResendInvitation403Error,\n 404: CustomerSeatsResendInvitation404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const getClaimInfoCustomerSeats = (client: ClientBase) => {\n /**\n *\n * @param invitation_token\n * @param requestOptions - Request options\n * @returns {SeatClaimInfo}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsGetClaimInfo400Error} Invalid or expired invitation token\n * @throws {CustomerSeatsGetClaimInfo403Error} Seat-based pricing not enabled for organization\n * @throws {CustomerSeatsGetClaimInfo404Error} Seat not found\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n invitation_token: string,\n requestOptions?: RequestOptions,\n ): Promise<SeatClaimInfo> => {\n const pathParams = {\n invitation_token: invitation_token,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-seats/claim/{invitation_token}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<SeatClaimInfo>(response, \"json\", {\n 400: CustomerSeatsGetClaimInfo400Error,\n 403: CustomerSeatsGetClaimInfo403Error,\n 404: CustomerSeatsGetClaimInfo404Error,\n 422: HTTPValidationError,\n });\n };\n};\nexport const claimSeatCustomerSeats = (client: ClientBase) => {\n /**\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSeatClaimResponse}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {CustomerSeatsClaimSeat400Error} Invalid, expired, or already claimed token\n * @throws {CustomerSeatsClaimSeat403Error} Seat-based pricing not enabled for organization\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n body: SeatClaim,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSeatClaimResponse> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/customer-seats/claim\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSeatClaimResponse>(response, \"json\", {\n 400: CustomerSeatsClaimSeat400Error,\n 403: CustomerSeatsClaimSeat403Error,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createCustomerSeatsService(client: ClientBase) {\n return {\n listSeats: listSeatsCustomerSeats(client),\n assignSeat: assignSeatCustomerSeats(client),\n revokeSeat: revokeSeatCustomerSeats(client),\n resendInvitation: resendInvitationCustomerSeats(client),\n getClaimInfo: getClaimInfoCustomerSeats(client),\n claimSeat: claimSeatCustomerSeats(client),\n };\n}\n\nexport type CustomerSeats = ReturnType<typeof createCustomerSeatsService>;\n"],"mappings":";;;AAiCA,MAAa,0BAA0B,WAAuB;;;;;;;;;;;;;;;CAe5D,OAAO,OACL,OAIA,mBACuB;EACvB,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,iBAAiB,OAAO;GACxB,UAAU,OAAO;EACnB;EACA,MAAM,UAAU,OAAO,aACrB,OACA,sBACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAyB,UAAU,QAAQ;GACvD,KAAKA,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,2BAA2B,WAAuB;;;;;;;;;;;;;;;;CAgB7D,OAAO,OAAO,MAAkB,mBAA2D;EAGzF,MAAM,UAAU,OAAO,aACrB,QACA,sBACA,CAAS,GACT,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKJ,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,2BAA2B,WAAuB;;;;;;;;;;;;;;;CAe7D,OAAO,OAAO,SAAiB,mBAA2D;EACxF,MAAM,aAAa,EACR,QACX;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,gCACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAKK,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKP,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,iCAAiC,WAAuB;;;;;;;;;;;;;;;;CAgBnE,OAAO,OAAO,SAAiB,mBAA2D;EACxF,MAAM,aAAa,EACR,QACX;EAEA,MAAM,UAAU,OAAO,aACrB,QACA,uCACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA4B,UAAU,QAAQ;GAC1D,KAAKQ,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKX,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,6BAA6B,WAAuB;;;;;;;;;;;;;;CAc/D,OAAO,OACL,kBACA,mBAC2B;EAC3B,MAAM,aAAa,EACC,iBACpB;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,+CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA6B,UAAU,QAAQ;GAC3D,KAAKY,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKd,eAAAA;EACP,CAAC;CACH;AACF;AACA,MAAa,0BAA0B,WAAuB;;;;;;;;;;;;;CAa5D,OAAO,OACL,MACA,mBACuC;EAGvC,MAAM,UAAU,OAAO,aACrB,QACA,4BACA,CAAS,GACT,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAyC,UAAU,QAAQ;GACvE,KAAKe,eAAAA;GACL,KAAKC,eAAAA;GACL,KAAKhB,eAAAA;EACP,CAAC;CACH;AACF;AAEA,SAAgB,2BAA2B,QAAoB;CAC7D,OAAO;EACL,WAAW,uBAAuB,MAAM;EACxC,YAAY,wBAAwB,MAAM;EAC1C,YAAY,wBAAwB,MAAM;EAC1C,kBAAkB,8BAA8B,MAAM;EACtD,cAAc,0BAA0B,MAAM;EAC9C,WAAW,uBAAuB,MAAM;CAC1C;AACF"}
@@ -1,5 +1,5 @@
1
- import { Ct as CustomerSeatClaimResponse, _i as SeatsList, gi as SeatClaimInfo, hi as SeatClaim, mi as SeatAssign, xt as CustomerSeat } from "../../models-1oBCLxA2.cjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../base-B0J2UyGW.cjs";
1
+ import { Ct as CustomerSeatClaimResponse, _i as SeatsList, gi as SeatClaimInfo, hi as SeatClaim, mi as SeatAssign, xt as CustomerSeat } from "../../models-D3N1jo2G.cjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../base-C5EE71lz.cjs";
3
3
  //#region src/2026-04/services/customer_seats.d.ts
4
4
  declare const listSeatsCustomerSeats: (client: ClientBase) => (query?: {
5
5
  subscription_id?: string | null;
@@ -1,5 +1,5 @@
1
- import { Ct as CustomerSeatClaimResponse, _i as SeatsList, gi as SeatClaimInfo, hi as SeatClaim, mi as SeatAssign, xt as CustomerSeat } from "../../models-1oBCLxA2.mjs";
2
- import { c as RequestOptions, t as ClientBase } from "../../base-B0J2UyGW.mjs";
1
+ import { Ct as CustomerSeatClaimResponse, _i as SeatsList, gi as SeatClaimInfo, hi as SeatClaim, mi as SeatAssign, xt as CustomerSeat } from "../../models-D3N1jo2G.mjs";
2
+ import { c as RequestOptions, t as ClientBase } from "../../base-C5EE71lz.mjs";
3
3
  //#region src/2026-04/services/customer_seats.d.ts
4
4
  declare const listSeatsCustomerSeats: (client: ClientBase) => (query?: {
5
5
  subscription_id?: string | null;