@polar-sh/sdk 0.29.0 → 0.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/FUNCTIONS.md +5 -1
  2. package/README.md +48 -12
  3. package/bin/mcp-server.js +866 -148
  4. package/bin/mcp-server.js.map +29 -14
  5. package/dist/commonjs/funcs/customersGetState.d.ts +27 -0
  6. package/dist/commonjs/funcs/customersGetState.d.ts.map +1 -0
  7. package/dist/commonjs/funcs/customersGetState.js +121 -0
  8. package/dist/commonjs/funcs/customersGetState.js.map +1 -0
  9. package/dist/commonjs/funcs/customersGetStateExternal.d.ts +27 -0
  10. package/dist/commonjs/funcs/customersGetStateExternal.d.ts.map +1 -0
  11. package/dist/commonjs/funcs/customersGetStateExternal.js +121 -0
  12. package/dist/commonjs/funcs/customersGetStateExternal.js.map +1 -0
  13. package/dist/commonjs/lib/config.d.ts +2 -2
  14. package/dist/commonjs/lib/config.js +2 -2
  15. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  16. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  17. package/dist/commonjs/mcp-server/server.js +5 -1
  18. package/dist/commonjs/mcp-server/server.js.map +1 -1
  19. package/dist/commonjs/mcp-server/tools/customersGetState.d.ts +7 -0
  20. package/dist/commonjs/mcp-server/tools/customersGetState.d.ts.map +1 -0
  21. package/dist/commonjs/mcp-server/tools/customersGetState.js +40 -0
  22. package/dist/commonjs/mcp-server/tools/customersGetState.js.map +1 -0
  23. package/dist/commonjs/mcp-server/tools/customersGetStateExternal.d.ts +7 -0
  24. package/dist/commonjs/mcp-server/tools/customersGetStateExternal.d.ts.map +1 -0
  25. package/dist/commonjs/mcp-server/tools/customersGetStateExternal.js +40 -0
  26. package/dist/commonjs/mcp-server/tools/customersGetStateExternal.js.map +1 -0
  27. package/dist/commonjs/models/components/customer.d.ts +11 -5
  28. package/dist/commonjs/models/components/customer.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/customer.js +2 -2
  30. package/dist/commonjs/models/components/customer.js.map +1 -1
  31. package/dist/commonjs/models/components/customercreate.d.ts +3 -0
  32. package/dist/commonjs/models/components/customercreate.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/customercreate.js.map +1 -1
  34. package/dist/commonjs/models/components/customerordersubscription.d.ts +39 -0
  35. package/dist/commonjs/models/components/customerordersubscription.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/customerordersubscription.js.map +1 -1
  37. package/dist/commonjs/models/components/customerstate.d.ts +143 -0
  38. package/dist/commonjs/models/components/customerstate.d.ts.map +1 -0
  39. package/dist/commonjs/models/components/customerstate.js +162 -0
  40. package/dist/commonjs/models/components/customerstate.js.map +1 -0
  41. package/dist/commonjs/models/components/customerstatebenefitgrant.d.ts +86 -0
  42. package/dist/commonjs/models/components/customerstatebenefitgrant.d.ts.map +1 -0
  43. package/dist/commonjs/models/components/customerstatebenefitgrant.js +141 -0
  44. package/dist/commonjs/models/components/customerstatebenefitgrant.js.map +1 -0
  45. package/dist/commonjs/models/components/customerstatesubscription.d.ts +162 -0
  46. package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -0
  47. package/dist/commonjs/models/components/customerstatesubscription.js +193 -0
  48. package/dist/commonjs/models/components/customerstatesubscription.js.map +1 -0
  49. package/dist/commonjs/models/components/customersubscription.d.ts +9 -0
  50. package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/customersubscription.js.map +1 -1
  52. package/dist/commonjs/models/components/customerupdate.d.ts +3 -0
  53. package/dist/commonjs/models/components/customerupdate.d.ts.map +1 -1
  54. package/dist/commonjs/models/components/customerupdate.js.map +1 -1
  55. package/dist/commonjs/models/components/licensekeycustomer.d.ts +11 -5
  56. package/dist/commonjs/models/components/licensekeycustomer.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/licensekeycustomer.js +2 -2
  58. package/dist/commonjs/models/components/licensekeycustomer.js.map +1 -1
  59. package/dist/commonjs/models/components/ordercustomer.d.ts +11 -5
  60. package/dist/commonjs/models/components/ordercustomer.d.ts.map +1 -1
  61. package/dist/commonjs/models/components/ordercustomer.js +2 -2
  62. package/dist/commonjs/models/components/ordercustomer.js.map +1 -1
  63. package/dist/commonjs/models/components/ordersubscription.d.ts +39 -0
  64. package/dist/commonjs/models/components/ordersubscription.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/ordersubscription.js.map +1 -1
  66. package/dist/commonjs/models/components/subscription.d.ts +39 -0
  67. package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/subscription.js.map +1 -1
  69. package/dist/commonjs/models/components/subscriptioncustomer.d.ts +11 -5
  70. package/dist/commonjs/models/components/subscriptioncustomer.d.ts.map +1 -1
  71. package/dist/commonjs/models/components/subscriptioncustomer.js +2 -2
  72. package/dist/commonjs/models/components/subscriptioncustomer.js.map +1 -1
  73. package/dist/commonjs/models/components/webhookcustomercreatedpayload.d.ts +47 -0
  74. package/dist/commonjs/models/components/webhookcustomercreatedpayload.d.ts.map +1 -0
  75. package/dist/commonjs/models/components/webhookcustomercreatedpayload.js +62 -0
  76. package/dist/commonjs/models/components/webhookcustomercreatedpayload.js.map +1 -0
  77. package/dist/commonjs/models/components/webhookcustomerdeletedpayload.d.ts +42 -0
  78. package/dist/commonjs/models/components/webhookcustomerdeletedpayload.d.ts.map +1 -0
  79. package/dist/commonjs/models/components/webhookcustomerdeletedpayload.js +62 -0
  80. package/dist/commonjs/models/components/webhookcustomerdeletedpayload.js.map +1 -0
  81. package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts +53 -0
  82. package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -0
  83. package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.js +62 -0
  84. package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.js.map +1 -0
  85. package/dist/commonjs/models/components/webhookcustomerupdatedpayload.d.ts +46 -0
  86. package/dist/commonjs/models/components/webhookcustomerupdatedpayload.d.ts.map +1 -0
  87. package/dist/commonjs/models/components/webhookcustomerupdatedpayload.js +62 -0
  88. package/dist/commonjs/models/components/webhookcustomerupdatedpayload.js.map +1 -0
  89. package/dist/commonjs/models/components/webhookordercreatedpayload.d.ts +7 -0
  90. package/dist/commonjs/models/components/webhookordercreatedpayload.d.ts.map +1 -1
  91. package/dist/commonjs/models/components/webhookordercreatedpayload.js.map +1 -1
  92. package/dist/commonjs/models/components/webhooksubscriptioncreatedpayload.d.ts +2 -0
  93. package/dist/commonjs/models/components/webhooksubscriptioncreatedpayload.d.ts.map +1 -1
  94. package/dist/commonjs/models/components/webhooksubscriptioncreatedpayload.js.map +1 -1
  95. package/dist/commonjs/models/operations/customersgetstate.d.ts +32 -0
  96. package/dist/commonjs/models/operations/customersgetstate.d.ts.map +1 -0
  97. package/dist/commonjs/models/operations/customersgetstate.js +59 -0
  98. package/dist/commonjs/models/operations/customersgetstate.js.map +1 -0
  99. package/dist/commonjs/models/operations/customersgetstateexternal.d.ts +32 -0
  100. package/dist/commonjs/models/operations/customersgetstateexternal.d.ts.map +1 -0
  101. package/dist/commonjs/models/operations/customersgetstateexternal.js +68 -0
  102. package/dist/commonjs/models/operations/customersgetstateexternal.js.map +1 -0
  103. package/dist/commonjs/sdk/customers.d.ts +33 -0
  104. package/dist/commonjs/sdk/customers.d.ts.map +1 -1
  105. package/dist/commonjs/sdk/customers.js +36 -0
  106. package/dist/commonjs/sdk/customers.js.map +1 -1
  107. package/dist/commonjs/webhooks.d.ts +2 -2
  108. package/dist/commonjs/webhooks.d.ts.map +1 -1
  109. package/dist/commonjs/webhooks.js +36 -24
  110. package/dist/commonjs/webhooks.js.map +1 -1
  111. package/dist/esm/funcs/customersGetState.d.ts +27 -0
  112. package/dist/esm/funcs/customersGetState.d.ts.map +1 -0
  113. package/dist/esm/funcs/customersGetState.js +95 -0
  114. package/dist/esm/funcs/customersGetState.js.map +1 -0
  115. package/dist/esm/funcs/customersGetStateExternal.d.ts +27 -0
  116. package/dist/esm/funcs/customersGetStateExternal.d.ts.map +1 -0
  117. package/dist/esm/funcs/customersGetStateExternal.js +95 -0
  118. package/dist/esm/funcs/customersGetStateExternal.js.map +1 -0
  119. package/dist/esm/lib/config.d.ts +2 -2
  120. package/dist/esm/lib/config.js +2 -2
  121. package/dist/esm/mcp-server/mcp-server.js +1 -1
  122. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  123. package/dist/esm/mcp-server/server.js +5 -1
  124. package/dist/esm/mcp-server/server.js.map +1 -1
  125. package/dist/esm/mcp-server/tools/customersGetState.d.ts +7 -0
  126. package/dist/esm/mcp-server/tools/customersGetState.d.ts.map +1 -0
  127. package/dist/esm/mcp-server/tools/customersGetState.js +37 -0
  128. package/dist/esm/mcp-server/tools/customersGetState.js.map +1 -0
  129. package/dist/esm/mcp-server/tools/customersGetStateExternal.d.ts +7 -0
  130. package/dist/esm/mcp-server/tools/customersGetStateExternal.d.ts.map +1 -0
  131. package/dist/esm/mcp-server/tools/customersGetStateExternal.js +37 -0
  132. package/dist/esm/mcp-server/tools/customersGetStateExternal.js.map +1 -0
  133. package/dist/esm/models/components/customer.d.ts +11 -5
  134. package/dist/esm/models/components/customer.d.ts.map +1 -1
  135. package/dist/esm/models/components/customer.js +2 -2
  136. package/dist/esm/models/components/customer.js.map +1 -1
  137. package/dist/esm/models/components/customercreate.d.ts +3 -0
  138. package/dist/esm/models/components/customercreate.d.ts.map +1 -1
  139. package/dist/esm/models/components/customercreate.js.map +1 -1
  140. package/dist/esm/models/components/customerordersubscription.d.ts +39 -0
  141. package/dist/esm/models/components/customerordersubscription.d.ts.map +1 -1
  142. package/dist/esm/models/components/customerordersubscription.js.map +1 -1
  143. package/dist/esm/models/components/customerstate.d.ts +143 -0
  144. package/dist/esm/models/components/customerstate.d.ts.map +1 -0
  145. package/dist/esm/models/components/customerstate.js +130 -0
  146. package/dist/esm/models/components/customerstate.js.map +1 -0
  147. package/dist/esm/models/components/customerstatebenefitgrant.d.ts +86 -0
  148. package/dist/esm/models/components/customerstatebenefitgrant.d.ts.map +1 -0
  149. package/dist/esm/models/components/customerstatebenefitgrant.js +111 -0
  150. package/dist/esm/models/components/customerstatebenefitgrant.js.map +1 -0
  151. package/dist/esm/models/components/customerstatesubscription.d.ts +162 -0
  152. package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -0
  153. package/dist/esm/models/components/customerstatesubscription.js +161 -0
  154. package/dist/esm/models/components/customerstatesubscription.js.map +1 -0
  155. package/dist/esm/models/components/customersubscription.d.ts +9 -0
  156. package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
  157. package/dist/esm/models/components/customersubscription.js.map +1 -1
  158. package/dist/esm/models/components/customerupdate.d.ts +3 -0
  159. package/dist/esm/models/components/customerupdate.d.ts.map +1 -1
  160. package/dist/esm/models/components/customerupdate.js.map +1 -1
  161. package/dist/esm/models/components/licensekeycustomer.d.ts +11 -5
  162. package/dist/esm/models/components/licensekeycustomer.d.ts.map +1 -1
  163. package/dist/esm/models/components/licensekeycustomer.js +2 -2
  164. package/dist/esm/models/components/licensekeycustomer.js.map +1 -1
  165. package/dist/esm/models/components/ordercustomer.d.ts +11 -5
  166. package/dist/esm/models/components/ordercustomer.d.ts.map +1 -1
  167. package/dist/esm/models/components/ordercustomer.js +2 -2
  168. package/dist/esm/models/components/ordercustomer.js.map +1 -1
  169. package/dist/esm/models/components/ordersubscription.d.ts +39 -0
  170. package/dist/esm/models/components/ordersubscription.d.ts.map +1 -1
  171. package/dist/esm/models/components/ordersubscription.js.map +1 -1
  172. package/dist/esm/models/components/subscription.d.ts +39 -0
  173. package/dist/esm/models/components/subscription.d.ts.map +1 -1
  174. package/dist/esm/models/components/subscription.js.map +1 -1
  175. package/dist/esm/models/components/subscriptioncustomer.d.ts +11 -5
  176. package/dist/esm/models/components/subscriptioncustomer.d.ts.map +1 -1
  177. package/dist/esm/models/components/subscriptioncustomer.js +2 -2
  178. package/dist/esm/models/components/subscriptioncustomer.js.map +1 -1
  179. package/dist/esm/models/components/webhookcustomercreatedpayload.d.ts +47 -0
  180. package/dist/esm/models/components/webhookcustomercreatedpayload.d.ts.map +1 -0
  181. package/dist/esm/models/components/webhookcustomercreatedpayload.js +34 -0
  182. package/dist/esm/models/components/webhookcustomercreatedpayload.js.map +1 -0
  183. package/dist/esm/models/components/webhookcustomerdeletedpayload.d.ts +42 -0
  184. package/dist/esm/models/components/webhookcustomerdeletedpayload.d.ts.map +1 -0
  185. package/dist/esm/models/components/webhookcustomerdeletedpayload.js +34 -0
  186. package/dist/esm/models/components/webhookcustomerdeletedpayload.js.map +1 -0
  187. package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts +53 -0
  188. package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -0
  189. package/dist/esm/models/components/webhookcustomerstatechangedpayload.js +34 -0
  190. package/dist/esm/models/components/webhookcustomerstatechangedpayload.js.map +1 -0
  191. package/dist/esm/models/components/webhookcustomerupdatedpayload.d.ts +46 -0
  192. package/dist/esm/models/components/webhookcustomerupdatedpayload.d.ts.map +1 -0
  193. package/dist/esm/models/components/webhookcustomerupdatedpayload.js +34 -0
  194. package/dist/esm/models/components/webhookcustomerupdatedpayload.js.map +1 -0
  195. package/dist/esm/models/components/webhookordercreatedpayload.d.ts +7 -0
  196. package/dist/esm/models/components/webhookordercreatedpayload.d.ts.map +1 -1
  197. package/dist/esm/models/components/webhookordercreatedpayload.js.map +1 -1
  198. package/dist/esm/models/components/webhooksubscriptioncreatedpayload.d.ts +2 -0
  199. package/dist/esm/models/components/webhooksubscriptioncreatedpayload.d.ts.map +1 -1
  200. package/dist/esm/models/components/webhooksubscriptioncreatedpayload.js.map +1 -1
  201. package/dist/esm/models/operations/customersgetstate.d.ts +32 -0
  202. package/dist/esm/models/operations/customersgetstate.d.ts.map +1 -0
  203. package/dist/esm/models/operations/customersgetstate.js +31 -0
  204. package/dist/esm/models/operations/customersgetstate.js.map +1 -0
  205. package/dist/esm/models/operations/customersgetstateexternal.d.ts +32 -0
  206. package/dist/esm/models/operations/customersgetstateexternal.d.ts.map +1 -0
  207. package/dist/esm/models/operations/customersgetstateexternal.js +40 -0
  208. package/dist/esm/models/operations/customersgetstateexternal.js.map +1 -0
  209. package/dist/esm/sdk/customers.d.ts +33 -0
  210. package/dist/esm/sdk/customers.d.ts.map +1 -1
  211. package/dist/esm/sdk/customers.js +36 -0
  212. package/dist/esm/sdk/customers.js.map +1 -1
  213. package/dist/esm/webhooks.d.ts +2 -2
  214. package/dist/esm/webhooks.d.ts.map +1 -1
  215. package/dist/esm/webhooks.js +39 -27
  216. package/dist/esm/webhooks.js.map +1 -1
  217. package/docs/sdks/benefitgrants/README.md +10 -2
  218. package/docs/sdks/benefits/README.md +12 -2
  219. package/docs/sdks/checkoutlinks/README.md +10 -2
  220. package/docs/sdks/checkouts/README.md +16 -2
  221. package/docs/sdks/customers/README.md +206 -4
  222. package/docs/sdks/customfields/README.md +12 -2
  223. package/docs/sdks/discounts/README.md +12 -2
  224. package/docs/sdks/downloadables/README.md +10 -2
  225. package/docs/sdks/events/README.md +14 -2
  226. package/docs/sdks/externalorganizations/README.md +10 -2
  227. package/docs/sdks/files/README.md +8 -2
  228. package/docs/sdks/licensekeys/README.md +10 -2
  229. package/docs/sdks/meters/README.md +12 -2
  230. package/docs/sdks/metrics/README.md +6 -0
  231. package/docs/sdks/orders/README.md +10 -2
  232. package/docs/sdks/organizations/README.md +4 -4
  233. package/docs/sdks/polarlicensekeys/README.md +10 -2
  234. package/docs/sdks/polarorders/README.md +10 -2
  235. package/docs/sdks/polarsubscriptions/README.md +10 -2
  236. package/docs/sdks/products/README.md +12 -2
  237. package/docs/sdks/refunds/README.md +10 -2
  238. package/docs/sdks/repositories/README.md +10 -2
  239. package/docs/sdks/subscriptions/README.md +20 -4
  240. package/jsr.json +1 -1
  241. package/package.json +1 -1
  242. package/src/funcs/customersGetState.ts +195 -0
  243. package/src/funcs/customersGetStateExternal.ts +197 -0
  244. package/src/lib/config.ts +2 -2
  245. package/src/mcp-server/mcp-server.ts +1 -1
  246. package/src/mcp-server/server.ts +5 -1
  247. package/src/mcp-server/tools/customersGetState.ts +46 -0
  248. package/src/mcp-server/tools/customersGetStateExternal.ts +46 -0
  249. package/src/models/components/customer.ts +13 -7
  250. package/src/models/components/customercreate.ts +3 -0
  251. package/src/models/components/customerordersubscription.ts +39 -0
  252. package/src/models/components/customerstate.ts +308 -0
  253. package/src/models/components/customerstatebenefitgrant.ts +261 -0
  254. package/src/models/components/customerstatesubscription.ts +389 -0
  255. package/src/models/components/customersubscription.ts +9 -0
  256. package/src/models/components/customerupdate.ts +3 -0
  257. package/src/models/components/licensekeycustomer.ts +13 -7
  258. package/src/models/components/ordercustomer.ts +13 -7
  259. package/src/models/components/ordersubscription.ts +39 -0
  260. package/src/models/components/subscription.ts +39 -0
  261. package/src/models/components/subscriptioncustomer.ts +13 -7
  262. package/src/models/components/webhookcustomercreatedpayload.ts +93 -0
  263. package/src/models/components/webhookcustomerdeletedpayload.ts +88 -0
  264. package/src/models/components/webhookcustomerstatechangedpayload.ts +103 -0
  265. package/src/models/components/webhookcustomerupdatedpayload.ts +92 -0
  266. package/src/models/components/webhookordercreatedpayload.ts +7 -0
  267. package/src/models/components/webhooksubscriptioncreatedpayload.ts +2 -0
  268. package/src/models/operations/customersgetstate.ts +69 -0
  269. package/src/models/operations/customersgetstateexternal.ts +80 -0
  270. package/src/sdk/customers.ts +55 -0
  271. package/src/webhooks.ts +95 -78
package/bin/mcp-server.js CHANGED
@@ -4018,9 +4018,9 @@ var init_config = __esm(() => {
4018
4018
  SDK_METADATA = {
4019
4019
  language: "typescript",
4020
4020
  openapiDocVersion: "0.1.0",
4021
- sdkVersion: "0.29.0",
4021
+ sdkVersion: "0.29.2",
4022
4022
  genVersion: "2.539.1",
4023
- userAgent: "speakeasy-sdk/typescript 0.29.0 2.539.1 0.1.0 @polar-sh/sdk"
4023
+ userAgent: "speakeasy-sdk/typescript 0.29.2 2.539.1 0.1.0 @polar-sh/sdk"
4024
4024
  };
4025
4025
  });
4026
4026
 
@@ -35661,9 +35661,9 @@ var init_customer = __esm(() => {
35661
35661
  CustomerTaxId$.outboundSchema = CustomerTaxId$outboundSchema;
35662
35662
  })(CustomerTaxId$ ||= {});
35663
35663
  Customer$inboundSchema = objectType({
35664
+ id: stringType(),
35664
35665
  created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
35665
35666
  modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
35666
- id: stringType(),
35667
35667
  metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
35668
35668
  external_id: nullableType(stringType()),
35669
35669
  email: stringType(),
@@ -35686,9 +35686,9 @@ var init_customer = __esm(() => {
35686
35686
  });
35687
35687
  });
35688
35688
  Customer$outboundSchema = objectType({
35689
+ id: stringType(),
35689
35690
  createdAt: dateType().transform((v2) => v2.toISOString()),
35690
35691
  modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
35691
- id: stringType(),
35692
35692
  metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
35693
35693
  externalId: nullableType(stringType()),
35694
35694
  email: stringType(),
@@ -36522,6 +36522,736 @@ Get a customer by external ID.
36522
36522
  };
36523
36523
  });
36524
36524
 
36525
+ // src/models/components/benefitgrantcustomproperties.ts
36526
+ var BenefitGrantCustomProperties$inboundSchema, BenefitGrantCustomProperties$outboundSchema, BenefitGrantCustomProperties$;
36527
+ var init_benefitgrantcustomproperties = __esm(() => {
36528
+ init_lib();
36529
+ BenefitGrantCustomProperties$inboundSchema = objectType({});
36530
+ BenefitGrantCustomProperties$outboundSchema = objectType({});
36531
+ ((BenefitGrantCustomProperties$) => {
36532
+ BenefitGrantCustomProperties$.inboundSchema = BenefitGrantCustomProperties$inboundSchema;
36533
+ BenefitGrantCustomProperties$.outboundSchema = BenefitGrantCustomProperties$outboundSchema;
36534
+ })(BenefitGrantCustomProperties$ ||= {});
36535
+ });
36536
+
36537
+ // src/models/components/benefitgrantdiscordproperties.ts
36538
+ var BenefitGrantDiscordProperties$inboundSchema, BenefitGrantDiscordProperties$outboundSchema, BenefitGrantDiscordProperties$;
36539
+ var init_benefitgrantdiscordproperties = __esm(() => {
36540
+ init_lib();
36541
+ init_primitives();
36542
+ BenefitGrantDiscordProperties$inboundSchema = objectType({
36543
+ account_id: stringType().optional(),
36544
+ guild_id: stringType().optional(),
36545
+ role_id: stringType().optional()
36546
+ }).transform((v2) => {
36547
+ return remap(v2, {
36548
+ account_id: "accountId",
36549
+ guild_id: "guildId",
36550
+ role_id: "roleId"
36551
+ });
36552
+ });
36553
+ BenefitGrantDiscordProperties$outboundSchema = objectType({
36554
+ accountId: stringType().optional(),
36555
+ guildId: stringType().optional(),
36556
+ roleId: stringType().optional()
36557
+ }).transform((v2) => {
36558
+ return remap(v2, {
36559
+ accountId: "account_id",
36560
+ guildId: "guild_id",
36561
+ roleId: "role_id"
36562
+ });
36563
+ });
36564
+ ((BenefitGrantDiscordProperties$) => {
36565
+ BenefitGrantDiscordProperties$.inboundSchema = BenefitGrantDiscordProperties$inboundSchema;
36566
+ BenefitGrantDiscordProperties$.outboundSchema = BenefitGrantDiscordProperties$outboundSchema;
36567
+ })(BenefitGrantDiscordProperties$ ||= {});
36568
+ });
36569
+
36570
+ // src/models/components/benefitgrantdownloadablesproperties.ts
36571
+ var BenefitGrantDownloadablesProperties$inboundSchema, BenefitGrantDownloadablesProperties$outboundSchema, BenefitGrantDownloadablesProperties$;
36572
+ var init_benefitgrantdownloadablesproperties = __esm(() => {
36573
+ init_lib();
36574
+ BenefitGrantDownloadablesProperties$inboundSchema = objectType({
36575
+ files: arrayType(stringType()).optional()
36576
+ });
36577
+ BenefitGrantDownloadablesProperties$outboundSchema = objectType({
36578
+ files: arrayType(stringType()).optional()
36579
+ });
36580
+ ((BenefitGrantDownloadablesProperties$) => {
36581
+ BenefitGrantDownloadablesProperties$.inboundSchema = BenefitGrantDownloadablesProperties$inboundSchema;
36582
+ BenefitGrantDownloadablesProperties$.outboundSchema = BenefitGrantDownloadablesProperties$outboundSchema;
36583
+ })(BenefitGrantDownloadablesProperties$ ||= {});
36584
+ });
36585
+
36586
+ // src/models/components/benefitgrantgithubrepositoryproperties.ts
36587
+ var BenefitGrantGitHubRepositoryPropertiesPermission, BenefitGrantGitHubRepositoryPropertiesPermission$inboundSchema, BenefitGrantGitHubRepositoryPropertiesPermission$outboundSchema, BenefitGrantGitHubRepositoryPropertiesPermission$, BenefitGrantGitHubRepositoryProperties$inboundSchema, BenefitGrantGitHubRepositoryProperties$outboundSchema, BenefitGrantGitHubRepositoryProperties$;
36588
+ var init_benefitgrantgithubrepositoryproperties = __esm(() => {
36589
+ init_lib();
36590
+ init_primitives();
36591
+ BenefitGrantGitHubRepositoryPropertiesPermission = {
36592
+ Pull: "pull",
36593
+ Triage: "triage",
36594
+ Push: "push",
36595
+ Maintain: "maintain",
36596
+ Admin: "admin"
36597
+ };
36598
+ BenefitGrantGitHubRepositoryPropertiesPermission$inboundSchema = nativeEnumType(BenefitGrantGitHubRepositoryPropertiesPermission);
36599
+ BenefitGrantGitHubRepositoryPropertiesPermission$outboundSchema = BenefitGrantGitHubRepositoryPropertiesPermission$inboundSchema;
36600
+ ((BenefitGrantGitHubRepositoryPropertiesPermission$) => {
36601
+ BenefitGrantGitHubRepositoryPropertiesPermission$.inboundSchema = BenefitGrantGitHubRepositoryPropertiesPermission$inboundSchema;
36602
+ BenefitGrantGitHubRepositoryPropertiesPermission$.outboundSchema = BenefitGrantGitHubRepositoryPropertiesPermission$outboundSchema;
36603
+ })(BenefitGrantGitHubRepositoryPropertiesPermission$ ||= {});
36604
+ BenefitGrantGitHubRepositoryProperties$inboundSchema = objectType({
36605
+ account_id: stringType().optional(),
36606
+ repository_owner: stringType().optional(),
36607
+ repository_name: stringType().optional(),
36608
+ permission: BenefitGrantGitHubRepositoryPropertiesPermission$inboundSchema.optional()
36609
+ }).transform((v2) => {
36610
+ return remap(v2, {
36611
+ account_id: "accountId",
36612
+ repository_owner: "repositoryOwner",
36613
+ repository_name: "repositoryName"
36614
+ });
36615
+ });
36616
+ BenefitGrantGitHubRepositoryProperties$outboundSchema = objectType({
36617
+ accountId: stringType().optional(),
36618
+ repositoryOwner: stringType().optional(),
36619
+ repositoryName: stringType().optional(),
36620
+ permission: BenefitGrantGitHubRepositoryPropertiesPermission$outboundSchema.optional()
36621
+ }).transform((v2) => {
36622
+ return remap(v2, {
36623
+ accountId: "account_id",
36624
+ repositoryOwner: "repository_owner",
36625
+ repositoryName: "repository_name"
36626
+ });
36627
+ });
36628
+ ((BenefitGrantGitHubRepositoryProperties$) => {
36629
+ BenefitGrantGitHubRepositoryProperties$.inboundSchema = BenefitGrantGitHubRepositoryProperties$inboundSchema;
36630
+ BenefitGrantGitHubRepositoryProperties$.outboundSchema = BenefitGrantGitHubRepositoryProperties$outboundSchema;
36631
+ })(BenefitGrantGitHubRepositoryProperties$ ||= {});
36632
+ });
36633
+
36634
+ // src/models/components/benefitgrantlicensekeysproperties.ts
36635
+ var BenefitGrantLicenseKeysProperties$inboundSchema, BenefitGrantLicenseKeysProperties$outboundSchema, BenefitGrantLicenseKeysProperties$;
36636
+ var init_benefitgrantlicensekeysproperties = __esm(() => {
36637
+ init_lib();
36638
+ init_primitives();
36639
+ BenefitGrantLicenseKeysProperties$inboundSchema = objectType({
36640
+ license_key_id: stringType().optional(),
36641
+ display_key: stringType().optional()
36642
+ }).transform((v2) => {
36643
+ return remap(v2, {
36644
+ license_key_id: "licenseKeyId",
36645
+ display_key: "displayKey"
36646
+ });
36647
+ });
36648
+ BenefitGrantLicenseKeysProperties$outboundSchema = objectType({
36649
+ licenseKeyId: stringType().optional(),
36650
+ displayKey: stringType().optional()
36651
+ }).transform((v2) => {
36652
+ return remap(v2, {
36653
+ licenseKeyId: "license_key_id",
36654
+ displayKey: "display_key"
36655
+ });
36656
+ });
36657
+ ((BenefitGrantLicenseKeysProperties$) => {
36658
+ BenefitGrantLicenseKeysProperties$.inboundSchema = BenefitGrantLicenseKeysProperties$inboundSchema;
36659
+ BenefitGrantLicenseKeysProperties$.outboundSchema = BenefitGrantLicenseKeysProperties$outboundSchema;
36660
+ })(BenefitGrantLicenseKeysProperties$ ||= {});
36661
+ });
36662
+
36663
+ // src/models/components/benefittype.ts
36664
+ var BenefitType, BenefitType$inboundSchema, BenefitType$outboundSchema, BenefitType$;
36665
+ var init_benefittype = __esm(() => {
36666
+ init_lib();
36667
+ BenefitType = {
36668
+ Custom: "custom",
36669
+ Discord: "discord",
36670
+ GithubRepository: "github_repository",
36671
+ Downloadables: "downloadables",
36672
+ LicenseKeys: "license_keys"
36673
+ };
36674
+ BenefitType$inboundSchema = nativeEnumType(BenefitType);
36675
+ BenefitType$outboundSchema = BenefitType$inboundSchema;
36676
+ ((BenefitType$) => {
36677
+ BenefitType$.inboundSchema = BenefitType$inboundSchema;
36678
+ BenefitType$.outboundSchema = BenefitType$outboundSchema;
36679
+ })(BenefitType$ ||= {});
36680
+ });
36681
+
36682
+ // src/models/components/customerstatebenefitgrant.ts
36683
+ var CustomerStateBenefitGrantProperties$inboundSchema, CustomerStateBenefitGrantProperties$outboundSchema, CustomerStateBenefitGrantProperties$, CustomerStateBenefitGrant$inboundSchema, CustomerStateBenefitGrant$outboundSchema, CustomerStateBenefitGrant$;
36684
+ var init_customerstatebenefitgrant = __esm(() => {
36685
+ init_lib();
36686
+ init_primitives();
36687
+ init_benefitgrantcustomproperties();
36688
+ init_benefitgrantdiscordproperties();
36689
+ init_benefitgrantdownloadablesproperties();
36690
+ init_benefitgrantgithubrepositoryproperties();
36691
+ init_benefitgrantlicensekeysproperties();
36692
+ init_benefittype();
36693
+ CustomerStateBenefitGrantProperties$inboundSchema = unionType([
36694
+ BenefitGrantCustomProperties$inboundSchema,
36695
+ BenefitGrantDownloadablesProperties$inboundSchema,
36696
+ BenefitGrantLicenseKeysProperties$inboundSchema,
36697
+ BenefitGrantDiscordProperties$inboundSchema,
36698
+ BenefitGrantGitHubRepositoryProperties$inboundSchema
36699
+ ]);
36700
+ CustomerStateBenefitGrantProperties$outboundSchema = unionType([
36701
+ BenefitGrantCustomProperties$outboundSchema,
36702
+ BenefitGrantDownloadablesProperties$outboundSchema,
36703
+ BenefitGrantLicenseKeysProperties$outboundSchema,
36704
+ BenefitGrantDiscordProperties$outboundSchema,
36705
+ BenefitGrantGitHubRepositoryProperties$outboundSchema
36706
+ ]);
36707
+ ((CustomerStateBenefitGrantProperties$) => {
36708
+ CustomerStateBenefitGrantProperties$.inboundSchema = CustomerStateBenefitGrantProperties$inboundSchema;
36709
+ CustomerStateBenefitGrantProperties$.outboundSchema = CustomerStateBenefitGrantProperties$outboundSchema;
36710
+ })(CustomerStateBenefitGrantProperties$ ||= {});
36711
+ CustomerStateBenefitGrant$inboundSchema = objectType({
36712
+ id: stringType(),
36713
+ created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
36714
+ modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
36715
+ granted_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
36716
+ benefit_id: stringType(),
36717
+ benefit_type: BenefitType$inboundSchema,
36718
+ properties: unionType([
36719
+ BenefitGrantCustomProperties$inboundSchema,
36720
+ BenefitGrantDownloadablesProperties$inboundSchema,
36721
+ BenefitGrantLicenseKeysProperties$inboundSchema,
36722
+ BenefitGrantDiscordProperties$inboundSchema,
36723
+ BenefitGrantGitHubRepositoryProperties$inboundSchema
36724
+ ])
36725
+ }).transform((v2) => {
36726
+ return remap(v2, {
36727
+ created_at: "createdAt",
36728
+ modified_at: "modifiedAt",
36729
+ granted_at: "grantedAt",
36730
+ benefit_id: "benefitId",
36731
+ benefit_type: "benefitType"
36732
+ });
36733
+ });
36734
+ CustomerStateBenefitGrant$outboundSchema = objectType({
36735
+ id: stringType(),
36736
+ createdAt: dateType().transform((v2) => v2.toISOString()),
36737
+ modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
36738
+ grantedAt: dateType().transform((v2) => v2.toISOString()),
36739
+ benefitId: stringType(),
36740
+ benefitType: BenefitType$outboundSchema,
36741
+ properties: unionType([
36742
+ BenefitGrantCustomProperties$outboundSchema,
36743
+ BenefitGrantDownloadablesProperties$outboundSchema,
36744
+ BenefitGrantLicenseKeysProperties$outboundSchema,
36745
+ BenefitGrantDiscordProperties$outboundSchema,
36746
+ BenefitGrantGitHubRepositoryProperties$outboundSchema
36747
+ ])
36748
+ }).transform((v2) => {
36749
+ return remap(v2, {
36750
+ createdAt: "created_at",
36751
+ modifiedAt: "modified_at",
36752
+ grantedAt: "granted_at",
36753
+ benefitId: "benefit_id",
36754
+ benefitType: "benefit_type"
36755
+ });
36756
+ });
36757
+ ((CustomerStateBenefitGrant$) => {
36758
+ CustomerStateBenefitGrant$.inboundSchema = CustomerStateBenefitGrant$inboundSchema;
36759
+ CustomerStateBenefitGrant$.outboundSchema = CustomerStateBenefitGrant$outboundSchema;
36760
+ })(CustomerStateBenefitGrant$ ||= {});
36761
+ });
36762
+
36763
+ // src/models/components/subscriptionrecurringinterval.ts
36764
+ var SubscriptionRecurringInterval, SubscriptionRecurringInterval$inboundSchema, SubscriptionRecurringInterval$outboundSchema, SubscriptionRecurringInterval$;
36765
+ var init_subscriptionrecurringinterval = __esm(() => {
36766
+ init_lib();
36767
+ SubscriptionRecurringInterval = {
36768
+ Month: "month",
36769
+ Year: "year"
36770
+ };
36771
+ SubscriptionRecurringInterval$inboundSchema = nativeEnumType(SubscriptionRecurringInterval);
36772
+ SubscriptionRecurringInterval$outboundSchema = SubscriptionRecurringInterval$inboundSchema;
36773
+ ((SubscriptionRecurringInterval$) => {
36774
+ SubscriptionRecurringInterval$.inboundSchema = SubscriptionRecurringInterval$inboundSchema;
36775
+ SubscriptionRecurringInterval$.outboundSchema = SubscriptionRecurringInterval$outboundSchema;
36776
+ })(SubscriptionRecurringInterval$ ||= {});
36777
+ });
36778
+
36779
+ // src/models/components/customerstatesubscription.ts
36780
+ var CustomerStateSubscriptionCustomFieldData$inboundSchema, CustomerStateSubscriptionCustomFieldData$outboundSchema, CustomerStateSubscriptionCustomFieldData$, CustomerStateSubscriptionMetadata$inboundSchema, CustomerStateSubscriptionMetadata$outboundSchema, CustomerStateSubscriptionMetadata$, CustomerStateSubscription$inboundSchema, CustomerStateSubscription$outboundSchema, CustomerStateSubscription$;
36781
+ var init_customerstatesubscription = __esm(() => {
36782
+ init_lib();
36783
+ init_primitives();
36784
+ init_subscriptionrecurringinterval();
36785
+ CustomerStateSubscriptionCustomFieldData$inboundSchema = unionType([
36786
+ stringType(),
36787
+ numberType().int(),
36788
+ booleanType(),
36789
+ stringType().datetime({ offset: true }).transform((v2) => new Date(v2))
36790
+ ]);
36791
+ CustomerStateSubscriptionCustomFieldData$outboundSchema = unionType([
36792
+ stringType(),
36793
+ numberType().int(),
36794
+ booleanType(),
36795
+ dateType().transform((v2) => v2.toISOString())
36796
+ ]);
36797
+ ((CustomerStateSubscriptionCustomFieldData$) => {
36798
+ CustomerStateSubscriptionCustomFieldData$.inboundSchema = CustomerStateSubscriptionCustomFieldData$inboundSchema;
36799
+ CustomerStateSubscriptionCustomFieldData$.outboundSchema = CustomerStateSubscriptionCustomFieldData$outboundSchema;
36800
+ })(CustomerStateSubscriptionCustomFieldData$ ||= {});
36801
+ CustomerStateSubscriptionMetadata$inboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
36802
+ CustomerStateSubscriptionMetadata$outboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
36803
+ ((CustomerStateSubscriptionMetadata$) => {
36804
+ CustomerStateSubscriptionMetadata$.inboundSchema = CustomerStateSubscriptionMetadata$inboundSchema;
36805
+ CustomerStateSubscriptionMetadata$.outboundSchema = CustomerStateSubscriptionMetadata$outboundSchema;
36806
+ })(CustomerStateSubscriptionMetadata$ ||= {});
36807
+ CustomerStateSubscription$inboundSchema = objectType({
36808
+ id: stringType(),
36809
+ created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
36810
+ modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
36811
+ custom_field_data: recordType(nullableType(unionType([
36812
+ stringType(),
36813
+ numberType().int(),
36814
+ booleanType(),
36815
+ stringType().datetime({ offset: true }).transform((v2) => new Date(v2))
36816
+ ]))).optional(),
36817
+ metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
36818
+ status: literalType("active").optional(),
36819
+ amount: nullableType(numberType().int()),
36820
+ currency: nullableType(stringType()),
36821
+ recurring_interval: SubscriptionRecurringInterval$inboundSchema,
36822
+ current_period_start: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
36823
+ current_period_end: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
36824
+ cancel_at_period_end: booleanType(),
36825
+ canceled_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
36826
+ started_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
36827
+ ends_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
36828
+ product_id: stringType(),
36829
+ price_id: stringType(),
36830
+ discount_id: nullableType(stringType())
36831
+ }).transform((v2) => {
36832
+ return remap(v2, {
36833
+ created_at: "createdAt",
36834
+ modified_at: "modifiedAt",
36835
+ custom_field_data: "customFieldData",
36836
+ recurring_interval: "recurringInterval",
36837
+ current_period_start: "currentPeriodStart",
36838
+ current_period_end: "currentPeriodEnd",
36839
+ cancel_at_period_end: "cancelAtPeriodEnd",
36840
+ canceled_at: "canceledAt",
36841
+ started_at: "startedAt",
36842
+ ends_at: "endsAt",
36843
+ product_id: "productId",
36844
+ price_id: "priceId",
36845
+ discount_id: "discountId"
36846
+ });
36847
+ });
36848
+ CustomerStateSubscription$outboundSchema = objectType({
36849
+ id: stringType(),
36850
+ createdAt: dateType().transform((v2) => v2.toISOString()),
36851
+ modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
36852
+ customFieldData: recordType(nullableType(unionType([
36853
+ stringType(),
36854
+ numberType().int(),
36855
+ booleanType(),
36856
+ dateType().transform((v2) => v2.toISOString())
36857
+ ]))).optional(),
36858
+ metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
36859
+ status: literalType("active").default("active"),
36860
+ amount: nullableType(numberType().int()),
36861
+ currency: nullableType(stringType()),
36862
+ recurringInterval: SubscriptionRecurringInterval$outboundSchema,
36863
+ currentPeriodStart: dateType().transform((v2) => v2.toISOString()),
36864
+ currentPeriodEnd: nullableType(dateType().transform((v2) => v2.toISOString())),
36865
+ cancelAtPeriodEnd: booleanType(),
36866
+ canceledAt: nullableType(dateType().transform((v2) => v2.toISOString())),
36867
+ startedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
36868
+ endsAt: nullableType(dateType().transform((v2) => v2.toISOString())),
36869
+ productId: stringType(),
36870
+ priceId: stringType(),
36871
+ discountId: nullableType(stringType())
36872
+ }).transform((v2) => {
36873
+ return remap(v2, {
36874
+ createdAt: "created_at",
36875
+ modifiedAt: "modified_at",
36876
+ customFieldData: "custom_field_data",
36877
+ recurringInterval: "recurring_interval",
36878
+ currentPeriodStart: "current_period_start",
36879
+ currentPeriodEnd: "current_period_end",
36880
+ cancelAtPeriodEnd: "cancel_at_period_end",
36881
+ canceledAt: "canceled_at",
36882
+ startedAt: "started_at",
36883
+ endsAt: "ends_at",
36884
+ productId: "product_id",
36885
+ priceId: "price_id",
36886
+ discountId: "discount_id"
36887
+ });
36888
+ });
36889
+ ((CustomerStateSubscription$) => {
36890
+ CustomerStateSubscription$.inboundSchema = CustomerStateSubscription$inboundSchema;
36891
+ CustomerStateSubscription$.outboundSchema = CustomerStateSubscription$outboundSchema;
36892
+ })(CustomerStateSubscription$ ||= {});
36893
+ });
36894
+
36895
+ // src/models/components/customerstate.ts
36896
+ var CustomerStateMetadata$inboundSchema, CustomerStateMetadata$outboundSchema, CustomerStateMetadata$, CustomerStateTaxId$inboundSchema, CustomerStateTaxId$outboundSchema, CustomerStateTaxId$, CustomerState$inboundSchema, CustomerState$outboundSchema, CustomerState$;
36897
+ var init_customerstate = __esm(() => {
36898
+ init_lib();
36899
+ init_primitives();
36900
+ init_address();
36901
+ init_customerstatebenefitgrant();
36902
+ init_customerstatesubscription();
36903
+ init_taxidformat();
36904
+ CustomerStateMetadata$inboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
36905
+ CustomerStateMetadata$outboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
36906
+ ((CustomerStateMetadata$) => {
36907
+ CustomerStateMetadata$.inboundSchema = CustomerStateMetadata$inboundSchema;
36908
+ CustomerStateMetadata$.outboundSchema = CustomerStateMetadata$outboundSchema;
36909
+ })(CustomerStateMetadata$ ||= {});
36910
+ CustomerStateTaxId$inboundSchema = unionType([stringType(), TaxIDFormat$inboundSchema]);
36911
+ CustomerStateTaxId$outboundSchema = unionType([stringType(), TaxIDFormat$outboundSchema]);
36912
+ ((CustomerStateTaxId$) => {
36913
+ CustomerStateTaxId$.inboundSchema = CustomerStateTaxId$inboundSchema;
36914
+ CustomerStateTaxId$.outboundSchema = CustomerStateTaxId$outboundSchema;
36915
+ })(CustomerStateTaxId$ ||= {});
36916
+ CustomerState$inboundSchema = objectType({
36917
+ id: stringType(),
36918
+ created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
36919
+ modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
36920
+ metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
36921
+ external_id: nullableType(stringType()),
36922
+ email: stringType(),
36923
+ email_verified: booleanType(),
36924
+ name: nullableType(stringType()),
36925
+ billing_address: nullableType(Address$inboundSchema),
36926
+ tax_id: nullableType(arrayType(nullableType(unionType([stringType(), TaxIDFormat$inboundSchema])))),
36927
+ organization_id: stringType(),
36928
+ active_subscriptions: arrayType(CustomerStateSubscription$inboundSchema),
36929
+ granted_benefits: arrayType(CustomerStateBenefitGrant$inboundSchema),
36930
+ avatar_url: stringType()
36931
+ }).transform((v2) => {
36932
+ return remap(v2, {
36933
+ created_at: "createdAt",
36934
+ modified_at: "modifiedAt",
36935
+ external_id: "externalId",
36936
+ email_verified: "emailVerified",
36937
+ billing_address: "billingAddress",
36938
+ tax_id: "taxId",
36939
+ organization_id: "organizationId",
36940
+ active_subscriptions: "activeSubscriptions",
36941
+ granted_benefits: "grantedBenefits",
36942
+ avatar_url: "avatarUrl"
36943
+ });
36944
+ });
36945
+ CustomerState$outboundSchema = objectType({
36946
+ id: stringType(),
36947
+ createdAt: dateType().transform((v2) => v2.toISOString()),
36948
+ modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
36949
+ metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
36950
+ externalId: nullableType(stringType()),
36951
+ email: stringType(),
36952
+ emailVerified: booleanType(),
36953
+ name: nullableType(stringType()),
36954
+ billingAddress: nullableType(Address$outboundSchema),
36955
+ taxId: nullableType(arrayType(nullableType(unionType([stringType(), TaxIDFormat$outboundSchema])))),
36956
+ organizationId: stringType(),
36957
+ activeSubscriptions: arrayType(CustomerStateSubscription$outboundSchema),
36958
+ grantedBenefits: arrayType(CustomerStateBenefitGrant$outboundSchema),
36959
+ avatarUrl: stringType()
36960
+ }).transform((v2) => {
36961
+ return remap(v2, {
36962
+ createdAt: "created_at",
36963
+ modifiedAt: "modified_at",
36964
+ externalId: "external_id",
36965
+ emailVerified: "email_verified",
36966
+ billingAddress: "billing_address",
36967
+ taxId: "tax_id",
36968
+ organizationId: "organization_id",
36969
+ activeSubscriptions: "active_subscriptions",
36970
+ grantedBenefits: "granted_benefits",
36971
+ avatarUrl: "avatar_url"
36972
+ });
36973
+ });
36974
+ ((CustomerState$) => {
36975
+ CustomerState$.inboundSchema = CustomerState$inboundSchema;
36976
+ CustomerState$.outboundSchema = CustomerState$outboundSchema;
36977
+ })(CustomerState$ ||= {});
36978
+ });
36979
+
36980
+ // src/models/operations/customersgetstate.ts
36981
+ var CustomersGetStateRequest$inboundSchema, CustomersGetStateRequest$outboundSchema, CustomersGetStateRequest$;
36982
+ var init_customersgetstate = __esm(() => {
36983
+ init_lib();
36984
+ CustomersGetStateRequest$inboundSchema = objectType({
36985
+ id: stringType()
36986
+ });
36987
+ CustomersGetStateRequest$outboundSchema = objectType({
36988
+ id: stringType()
36989
+ });
36990
+ ((CustomersGetStateRequest$) => {
36991
+ CustomersGetStateRequest$.inboundSchema = CustomersGetStateRequest$inboundSchema;
36992
+ CustomersGetStateRequest$.outboundSchema = CustomersGetStateRequest$outboundSchema;
36993
+ })(CustomersGetStateRequest$ ||= {});
36994
+ });
36995
+
36996
+ // src/funcs/customersGetState.ts
36997
+ function customersGetState(client, request, options) {
36998
+ return new APIPromise($do6(client, request, options));
36999
+ }
37000
+ async function $do6(client, request, options) {
37001
+ const parsed = safeParse(request, (value) => CustomersGetStateRequest$outboundSchema.parse(value), "Input validation failed");
37002
+ if (!parsed.ok) {
37003
+ return [parsed, { status: "invalid" }];
37004
+ }
37005
+ const payload = parsed.value;
37006
+ const body = null;
37007
+ const pathParams = {
37008
+ id: encodeSimple("id", payload.id, {
37009
+ explode: false,
37010
+ charEncoding: "percent"
37011
+ })
37012
+ };
37013
+ const path = pathToFunc("/v1/customers/{id}/state")(pathParams);
37014
+ const headers = new Headers(compactMap({
37015
+ Accept: "application/json"
37016
+ }));
37017
+ const secConfig = await extractSecurity(client._options.accessToken);
37018
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
37019
+ const requestSecurity = resolveGlobalSecurity(securityInput);
37020
+ const context = {
37021
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
37022
+ operationID: "customers:get_state",
37023
+ oAuth2Scopes: [],
37024
+ resolvedSecurity: requestSecurity,
37025
+ securitySource: client._options.accessToken,
37026
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
37027
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
37028
+ };
37029
+ const requestRes = client._createRequest(context, {
37030
+ security: requestSecurity,
37031
+ method: "GET",
37032
+ baseURL: options?.serverURL,
37033
+ path,
37034
+ headers,
37035
+ body,
37036
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37037
+ }, options);
37038
+ if (!requestRes.ok) {
37039
+ return [requestRes, { status: "invalid" }];
37040
+ }
37041
+ const req = requestRes.value;
37042
+ const doResult = await client._do(req, {
37043
+ context,
37044
+ errorCodes: ["404", "422", "4XX", "5XX"],
37045
+ retryConfig: context.retryConfig,
37046
+ retryCodes: context.retryCodes
37047
+ });
37048
+ if (!doResult.ok) {
37049
+ return [doResult, { status: "request-error", request: req }];
37050
+ }
37051
+ const response = doResult.value;
37052
+ const responseFields = {
37053
+ HttpMeta: { Response: response, Request: req }
37054
+ };
37055
+ const [result] = await match(json(200, CustomerState$inboundSchema), jsonErr(404, ResourceNotFound$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37056
+ if (!result.ok) {
37057
+ return [result, { status: "complete", request: req, response }];
37058
+ }
37059
+ return [result, { status: "complete", request: req, response }];
37060
+ }
37061
+ var init_customersGetState = __esm(() => {
37062
+ init_encodings();
37063
+ init_matchers();
37064
+ init_primitives();
37065
+ init_schemas();
37066
+ init_security();
37067
+ init_url();
37068
+ init_customerstate();
37069
+ init_httpvalidationerror();
37070
+ init_resourcenotfound();
37071
+ init_customersgetstate();
37072
+ init_async();
37073
+ });
37074
+
37075
+ // src/mcp-server/tools/customersGetState.ts
37076
+ var args6, tool$customersGetState;
37077
+ var init_customersGetState2 = __esm(() => {
37078
+ init_customersGetState();
37079
+ init_customersgetstate();
37080
+ init_tools();
37081
+ args6 = {
37082
+ request: CustomersGetStateRequest$inboundSchema
37083
+ };
37084
+ tool$customersGetState = {
37085
+ name: "customers_get-state",
37086
+ description: `Get Customer State
37087
+
37088
+ Get a customer state by ID.
37089
+
37090
+ The customer state includes information about
37091
+ the customer's active subscriptions and benefits.
37092
+
37093
+ It's the ideal endpoint to use when you need to get a full overview
37094
+ of a customer's status.
37095
+
37096
+ **Scopes**: \`customers:read\` \`customers:write\``,
37097
+ scopes: ["read", "customers"],
37098
+ args: args6,
37099
+ tool: async (client, args7, ctx) => {
37100
+ const [result, apiCall] = await customersGetState(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37101
+ if (!result.ok) {
37102
+ return {
37103
+ content: [{ type: "text", text: result.error.message }],
37104
+ isError: true
37105
+ };
37106
+ }
37107
+ const value = result.value;
37108
+ return formatResult(value, apiCall);
37109
+ }
37110
+ };
37111
+ });
37112
+
37113
+ // src/models/operations/customersgetstateexternal.ts
37114
+ var CustomersGetStateExternalRequest$inboundSchema, CustomersGetStateExternalRequest$outboundSchema, CustomersGetStateExternalRequest$;
37115
+ var init_customersgetstateexternal = __esm(() => {
37116
+ init_lib();
37117
+ init_primitives();
37118
+ CustomersGetStateExternalRequest$inboundSchema = objectType({
37119
+ external_id: stringType()
37120
+ }).transform((v2) => {
37121
+ return remap(v2, {
37122
+ external_id: "externalId"
37123
+ });
37124
+ });
37125
+ CustomersGetStateExternalRequest$outboundSchema = objectType({
37126
+ externalId: stringType()
37127
+ }).transform((v2) => {
37128
+ return remap(v2, {
37129
+ externalId: "external_id"
37130
+ });
37131
+ });
37132
+ ((CustomersGetStateExternalRequest$) => {
37133
+ CustomersGetStateExternalRequest$.inboundSchema = CustomersGetStateExternalRequest$inboundSchema;
37134
+ CustomersGetStateExternalRequest$.outboundSchema = CustomersGetStateExternalRequest$outboundSchema;
37135
+ })(CustomersGetStateExternalRequest$ ||= {});
37136
+ });
37137
+
37138
+ // src/funcs/customersGetStateExternal.ts
37139
+ function customersGetStateExternal(client, request, options) {
37140
+ return new APIPromise($do7(client, request, options));
37141
+ }
37142
+ async function $do7(client, request, options) {
37143
+ const parsed = safeParse(request, (value) => CustomersGetStateExternalRequest$outboundSchema.parse(value), "Input validation failed");
37144
+ if (!parsed.ok) {
37145
+ return [parsed, { status: "invalid" }];
37146
+ }
37147
+ const payload = parsed.value;
37148
+ const body = null;
37149
+ const pathParams = {
37150
+ external_id: encodeSimple("external_id", payload.external_id, {
37151
+ explode: false,
37152
+ charEncoding: "percent"
37153
+ })
37154
+ };
37155
+ const path = pathToFunc("/v1/customers/external/{external_id}/state")(pathParams);
37156
+ const headers = new Headers(compactMap({
37157
+ Accept: "application/json"
37158
+ }));
37159
+ const secConfig = await extractSecurity(client._options.accessToken);
37160
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
37161
+ const requestSecurity = resolveGlobalSecurity(securityInput);
37162
+ const context = {
37163
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
37164
+ operationID: "customers:get_state_external",
37165
+ oAuth2Scopes: [],
37166
+ resolvedSecurity: requestSecurity,
37167
+ securitySource: client._options.accessToken,
37168
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
37169
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
37170
+ };
37171
+ const requestRes = client._createRequest(context, {
37172
+ security: requestSecurity,
37173
+ method: "GET",
37174
+ baseURL: options?.serverURL,
37175
+ path,
37176
+ headers,
37177
+ body,
37178
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37179
+ }, options);
37180
+ if (!requestRes.ok) {
37181
+ return [requestRes, { status: "invalid" }];
37182
+ }
37183
+ const req = requestRes.value;
37184
+ const doResult = await client._do(req, {
37185
+ context,
37186
+ errorCodes: ["404", "422", "4XX", "5XX"],
37187
+ retryConfig: context.retryConfig,
37188
+ retryCodes: context.retryCodes
37189
+ });
37190
+ if (!doResult.ok) {
37191
+ return [doResult, { status: "request-error", request: req }];
37192
+ }
37193
+ const response = doResult.value;
37194
+ const responseFields = {
37195
+ HttpMeta: { Response: response, Request: req }
37196
+ };
37197
+ const [result] = await match(json(200, CustomerState$inboundSchema), jsonErr(404, ResourceNotFound$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37198
+ if (!result.ok) {
37199
+ return [result, { status: "complete", request: req, response }];
37200
+ }
37201
+ return [result, { status: "complete", request: req, response }];
37202
+ }
37203
+ var init_customersGetStateExternal = __esm(() => {
37204
+ init_encodings();
37205
+ init_matchers();
37206
+ init_primitives();
37207
+ init_schemas();
37208
+ init_security();
37209
+ init_url();
37210
+ init_customerstate();
37211
+ init_httpvalidationerror();
37212
+ init_resourcenotfound();
37213
+ init_customersgetstateexternal();
37214
+ init_async();
37215
+ });
37216
+
37217
+ // src/mcp-server/tools/customersGetStateExternal.ts
37218
+ var args7, tool$customersGetStateExternal;
37219
+ var init_customersGetStateExternal2 = __esm(() => {
37220
+ init_customersGetStateExternal();
37221
+ init_customersgetstateexternal();
37222
+ init_tools();
37223
+ args7 = {
37224
+ request: CustomersGetStateExternalRequest$inboundSchema
37225
+ };
37226
+ tool$customersGetStateExternal = {
37227
+ name: "customers_get-state-external",
37228
+ description: `Get Customer State by External ID
37229
+
37230
+ Get a customer state by external ID.
37231
+
37232
+ The customer state includes information about
37233
+ the customer's active subscriptions and benefits.
37234
+
37235
+ It's the ideal endpoint to use when you need to get a full overview
37236
+ of a customer's status.
37237
+
37238
+ **Scopes**: \`customers:read\` \`customers:write\``,
37239
+ scopes: ["read", "customers"],
37240
+ args: args7,
37241
+ tool: async (client, args8, ctx) => {
37242
+ const [result, apiCall] = await customersGetStateExternal(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37243
+ if (!result.ok) {
37244
+ return {
37245
+ content: [{ type: "text", text: result.error.message }],
37246
+ isError: true
37247
+ };
37248
+ }
37249
+ const value = result.value;
37250
+ return formatResult(value, apiCall);
37251
+ }
37252
+ };
37253
+ });
37254
+
36525
37255
  // src/models/components/customerslist.ts
36526
37256
  var MetadataQuery$inboundSchema, MetadataQuery$outboundSchema, MetadataQuery$;
36527
37257
  var init_customerslist = __esm(() => {
@@ -36715,9 +37445,9 @@ var init_operations = __esm(() => {
36715
37445
 
36716
37446
  // src/funcs/customersList.ts
36717
37447
  function customersList(client, request, options) {
36718
- return new APIPromise($do6(client, request, options));
37448
+ return new APIPromise($do8(client, request, options));
36719
37449
  }
36720
- async function $do6(client, request, options) {
37450
+ async function $do8(client, request, options) {
36721
37451
  const parsed = safeParse(request, (value) => CustomersListRequest$outboundSchema.parse(value), "Input validation failed");
36722
37452
  if (!parsed.ok) {
36723
37453
  return [haltIterator(parsed), { status: "invalid" }];
@@ -36830,12 +37560,12 @@ var init_customersList = __esm(() => {
36830
37560
  });
36831
37561
 
36832
37562
  // src/mcp-server/tools/customersList.ts
36833
- var args6, tool$customersList;
37563
+ var args8, tool$customersList;
36834
37564
  var init_customersList2 = __esm(() => {
36835
37565
  init_customersList();
36836
37566
  init_customerslist2();
36837
37567
  init_tools();
36838
- args6 = {
37568
+ args8 = {
36839
37569
  request: CustomersListRequest$inboundSchema
36840
37570
  };
36841
37571
  tool$customersList = {
@@ -36846,9 +37576,9 @@ List customers.
36846
37576
 
36847
37577
  **Scopes**: \`customers:read\` \`customers:write\``,
36848
37578
  scopes: ["read", "customers"],
36849
- args: args6,
36850
- tool: async (client, args7, ctx) => {
36851
- const [result, apiCall] = await customersList(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37579
+ args: args8,
37580
+ tool: async (client, args9, ctx) => {
37581
+ const [result, apiCall] = await customersList(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
36852
37582
  if (!result.ok) {
36853
37583
  return {
36854
37584
  content: [{ type: "text", text: result.error.message }],
@@ -36944,9 +37674,9 @@ var init_customersupdate = __esm(() => {
36944
37674
 
36945
37675
  // src/funcs/customersUpdate.ts
36946
37676
  function customersUpdate(client, request, options) {
36947
- return new APIPromise($do7(client, request, options));
37677
+ return new APIPromise($do9(client, request, options));
36948
37678
  }
36949
- async function $do7(client, request, options) {
37679
+ async function $do9(client, request, options) {
36950
37680
  const parsed = safeParse(request, (value) => CustomersUpdateRequest$outboundSchema.parse(value), "Input validation failed");
36951
37681
  if (!parsed.ok) {
36952
37682
  return [parsed, { status: "invalid" }];
@@ -37023,12 +37753,12 @@ var init_customersUpdate = __esm(() => {
37023
37753
  });
37024
37754
 
37025
37755
  // src/mcp-server/tools/customersUpdate.ts
37026
- var args7, tool$customersUpdate;
37756
+ var args9, tool$customersUpdate;
37027
37757
  var init_customersUpdate2 = __esm(() => {
37028
37758
  init_customersUpdate();
37029
37759
  init_customersupdate();
37030
37760
  init_tools();
37031
- args7 = {
37761
+ args9 = {
37032
37762
  request: CustomersUpdateRequest$inboundSchema
37033
37763
  };
37034
37764
  tool$customersUpdate = {
@@ -37039,9 +37769,9 @@ Update a customer.
37039
37769
 
37040
37770
  **Scopes**: \`customers:write\``,
37041
37771
  scopes: ["write", "customers"],
37042
- args: args7,
37043
- tool: async (client, args8, ctx) => {
37044
- const [result, apiCall] = await customersUpdate(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37772
+ args: args9,
37773
+ tool: async (client, args10, ctx) => {
37774
+ const [result, apiCall] = await customersUpdate(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37045
37775
  if (!result.ok) {
37046
37776
  return {
37047
37777
  content: [{ type: "text", text: result.error.message }],
@@ -37086,9 +37816,9 @@ var init_customersupdateexternal = __esm(() => {
37086
37816
 
37087
37817
  // src/funcs/customersUpdateExternal.ts
37088
37818
  function customersUpdateExternal(client, request, options) {
37089
- return new APIPromise($do8(client, request, options));
37819
+ return new APIPromise($do10(client, request, options));
37090
37820
  }
37091
- async function $do8(client, request, options) {
37821
+ async function $do10(client, request, options) {
37092
37822
  const parsed = safeParse(request, (value) => CustomersUpdateExternalRequest$outboundSchema.parse(value), "Input validation failed");
37093
37823
  if (!parsed.ok) {
37094
37824
  return [parsed, { status: "invalid" }];
@@ -37165,12 +37895,12 @@ var init_customersUpdateExternal = __esm(() => {
37165
37895
  });
37166
37896
 
37167
37897
  // src/mcp-server/tools/customersUpdateExternal.ts
37168
- var args8, tool$customersUpdateExternal;
37898
+ var args10, tool$customersUpdateExternal;
37169
37899
  var init_customersUpdateExternal2 = __esm(() => {
37170
37900
  init_customersUpdateExternal();
37171
37901
  init_customersupdateexternal();
37172
37902
  init_tools();
37173
- args8 = {
37903
+ args10 = {
37174
37904
  request: CustomersUpdateExternalRequest$inboundSchema
37175
37905
  };
37176
37906
  tool$customersUpdateExternal = {
@@ -37181,9 +37911,9 @@ Update a customer by external ID.
37181
37911
 
37182
37912
  **Scopes**: \`customers:write\``,
37183
37913
  scopes: ["write", "customers"],
37184
- args: args8,
37185
- tool: async (client, args9, ctx) => {
37186
- const [result, apiCall] = await customersUpdateExternal(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37914
+ args: args10,
37915
+ tool: async (client, args11, ctx) => {
37916
+ const [result, apiCall] = await customersUpdateExternal(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37187
37917
  if (!result.ok) {
37188
37918
  return {
37189
37919
  content: [{ type: "text", text: result.error.message }],
@@ -37549,9 +38279,9 @@ var init_metricsget = __esm(() => {
37549
38279
 
37550
38280
  // src/funcs/metricsGet.ts
37551
38281
  function metricsGet(client, request, options) {
37552
- return new APIPromise($do9(client, request, options));
38282
+ return new APIPromise($do11(client, request, options));
37553
38283
  }
37554
- async function $do9(client, request, options) {
38284
+ async function $do11(client, request, options) {
37555
38285
  const parsed = safeParse(request, (value) => MetricsGetRequest$outboundSchema.parse(value), "Input validation failed");
37556
38286
  if (!parsed.ok) {
37557
38287
  return [parsed, { status: "invalid" }];
@@ -37630,12 +38360,12 @@ var init_metricsGet = __esm(() => {
37630
38360
  });
37631
38361
 
37632
38362
  // src/mcp-server/tools/metricsGet.ts
37633
- var args9, tool$metricsGet;
38363
+ var args11, tool$metricsGet;
37634
38364
  var init_metricsGet2 = __esm(() => {
37635
38365
  init_metricsGet();
37636
38366
  init_metricsget();
37637
38367
  init_tools();
37638
- args9 = {
38368
+ args11 = {
37639
38369
  request: MetricsGetRequest$inboundSchema
37640
38370
  };
37641
38371
  tool$metricsGet = {
@@ -37648,9 +38378,9 @@ Currency values are output in cents.
37648
38378
 
37649
38379
  **Scopes**: \`metrics:read\``,
37650
38380
  scopes: ["read", "metrics"],
37651
- args: args9,
37652
- tool: async (client, args10, ctx) => {
37653
- const [result, apiCall] = await metricsGet(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38381
+ args: args11,
38382
+ tool: async (client, args12, ctx) => {
38383
+ const [result, apiCall] = await metricsGet(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37654
38384
  if (!result.ok) {
37655
38385
  return {
37656
38386
  content: [{ type: "text", text: result.error.message }],
@@ -37744,9 +38474,9 @@ var init_metricslimits = __esm(() => {
37744
38474
 
37745
38475
  // src/funcs/metricsLimits.ts
37746
38476
  function metricsLimits(client, options) {
37747
- return new APIPromise($do10(client, options));
38477
+ return new APIPromise($do12(client, options));
37748
38478
  }
37749
- async function $do10(client, options) {
38479
+ async function $do12(client, options) {
37750
38480
  const path = pathToFunc("/v1/metrics/limits")();
37751
38481
  const headers = new Headers(compactMap({
37752
38482
  Accept: "application/json"
@@ -38160,22 +38890,6 @@ var init_discountpercentagerepeatdurationbase = __esm(() => {
38160
38890
  })(DiscountPercentageRepeatDurationBase$ ||= {});
38161
38891
  });
38162
38892
 
38163
- // src/models/components/subscriptionrecurringinterval.ts
38164
- var SubscriptionRecurringInterval, SubscriptionRecurringInterval$inboundSchema, SubscriptionRecurringInterval$outboundSchema, SubscriptionRecurringInterval$;
38165
- var init_subscriptionrecurringinterval = __esm(() => {
38166
- init_lib();
38167
- SubscriptionRecurringInterval = {
38168
- Month: "month",
38169
- Year: "year"
38170
- };
38171
- SubscriptionRecurringInterval$inboundSchema = nativeEnumType(SubscriptionRecurringInterval);
38172
- SubscriptionRecurringInterval$outboundSchema = SubscriptionRecurringInterval$inboundSchema;
38173
- ((SubscriptionRecurringInterval$) => {
38174
- SubscriptionRecurringInterval$.inboundSchema = SubscriptionRecurringInterval$inboundSchema;
38175
- SubscriptionRecurringInterval$.outboundSchema = SubscriptionRecurringInterval$outboundSchema;
38176
- })(SubscriptionRecurringInterval$ ||= {});
38177
- });
38178
-
38179
38893
  // src/models/components/legacyrecurringproductpricecustom.ts
38180
38894
  var LegacyRecurringProductPriceCustom$inboundSchema, LegacyRecurringProductPriceCustom$outboundSchema, LegacyRecurringProductPriceCustom$;
38181
38895
  var init_legacyrecurringproductpricecustom = __esm(() => {
@@ -38429,9 +39143,9 @@ var init_ordercustomer = __esm(() => {
38429
39143
  OrderCustomerTaxId$.outboundSchema = OrderCustomerTaxId$outboundSchema;
38430
39144
  })(OrderCustomerTaxId$ ||= {});
38431
39145
  OrderCustomer$inboundSchema = objectType({
39146
+ id: stringType(),
38432
39147
  created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
38433
39148
  modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
38434
- id: stringType(),
38435
39149
  metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
38436
39150
  external_id: nullableType(stringType()),
38437
39151
  email: stringType(),
@@ -38454,9 +39168,9 @@ var init_ordercustomer = __esm(() => {
38454
39168
  });
38455
39169
  });
38456
39170
  OrderCustomer$outboundSchema = objectType({
39171
+ id: stringType(),
38457
39172
  createdAt: dateType().transform((v2) => v2.toISOString()),
38458
39173
  modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
38459
- id: stringType(),
38460
39174
  metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
38461
39175
  externalId: nullableType(stringType()),
38462
39176
  email: stringType(),
@@ -39155,9 +39869,9 @@ var init_ordersget = __esm(() => {
39155
39869
 
39156
39870
  // src/funcs/ordersGet.ts
39157
39871
  function ordersGet(client, request, options) {
39158
- return new APIPromise($do11(client, request, options));
39872
+ return new APIPromise($do13(client, request, options));
39159
39873
  }
39160
- async function $do11(client, request, options) {
39874
+ async function $do13(client, request, options) {
39161
39875
  const parsed = safeParse(request, (value) => OrdersGetRequest$outboundSchema.parse(value), "Input validation failed");
39162
39876
  if (!parsed.ok) {
39163
39877
  return [parsed, { status: "invalid" }];
@@ -39233,12 +39947,12 @@ var init_ordersGet = __esm(() => {
39233
39947
  });
39234
39948
 
39235
39949
  // src/mcp-server/tools/ordersGet.ts
39236
- var args10, tool$ordersGet;
39950
+ var args12, tool$ordersGet;
39237
39951
  var init_ordersGet2 = __esm(() => {
39238
39952
  init_ordersGet();
39239
39953
  init_ordersget();
39240
39954
  init_tools();
39241
- args10 = {
39955
+ args12 = {
39242
39956
  request: OrdersGetRequest$inboundSchema
39243
39957
  };
39244
39958
  tool$ordersGet = {
@@ -39249,9 +39963,9 @@ Get an order by ID.
39249
39963
 
39250
39964
  **Scopes**: \`orders:read\``,
39251
39965
  scopes: ["read", "orders"],
39252
- args: args10,
39253
- tool: async (client, args11, ctx) => {
39254
- const [result, apiCall] = await ordersGet(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39966
+ args: args12,
39967
+ tool: async (client, args13, ctx) => {
39968
+ const [result, apiCall] = await ordersGet(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39255
39969
  if (!result.ok) {
39256
39970
  return {
39257
39971
  content: [{ type: "text", text: result.error.message }],
@@ -39298,9 +40012,9 @@ var init_ordersinvoice = __esm(() => {
39298
40012
 
39299
40013
  // src/funcs/ordersInvoice.ts
39300
40014
  function ordersInvoice(client, request, options) {
39301
- return new APIPromise($do12(client, request, options));
40015
+ return new APIPromise($do14(client, request, options));
39302
40016
  }
39303
- async function $do12(client, request, options) {
40017
+ async function $do14(client, request, options) {
39304
40018
  const parsed = safeParse(request, (value) => OrdersInvoiceRequest$outboundSchema.parse(value), "Input validation failed");
39305
40019
  if (!parsed.ok) {
39306
40020
  return [parsed, { status: "invalid" }];
@@ -39376,12 +40090,12 @@ var init_ordersInvoice = __esm(() => {
39376
40090
  });
39377
40091
 
39378
40092
  // src/mcp-server/tools/ordersInvoice.ts
39379
- var args11, tool$ordersInvoice;
40093
+ var args13, tool$ordersInvoice;
39380
40094
  var init_ordersInvoice2 = __esm(() => {
39381
40095
  init_ordersInvoice();
39382
40096
  init_ordersinvoice();
39383
40097
  init_tools();
39384
- args11 = {
40098
+ args13 = {
39385
40099
  request: OrdersInvoiceRequest$inboundSchema
39386
40100
  };
39387
40101
  tool$ordersInvoice = {
@@ -39392,9 +40106,9 @@ Get an order's invoice data.
39392
40106
 
39393
40107
  **Scopes**: \`orders:read\``,
39394
40108
  scopes: ["read", "orders"],
39395
- args: args11,
39396
- tool: async (client, args12, ctx) => {
39397
- const [result, apiCall] = await ordersInvoice(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
40109
+ args: args13,
40110
+ tool: async (client, args14, ctx) => {
40111
+ const [result, apiCall] = await ordersInvoice(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39398
40112
  if (!result.ok) {
39399
40113
  return {
39400
40114
  content: [{ type: "text", text: result.error.message }],
@@ -39598,9 +40312,9 @@ var init_orderslist = __esm(() => {
39598
40312
 
39599
40313
  // src/funcs/ordersList.ts
39600
40314
  function ordersList(client, request, options) {
39601
- return new APIPromise($do13(client, request, options));
40315
+ return new APIPromise($do15(client, request, options));
39602
40316
  }
39603
- async function $do13(client, request, options) {
40317
+ async function $do15(client, request, options) {
39604
40318
  const parsed = safeParse(request, (value) => OrdersListRequest$outboundSchema.parse(value), "Input validation failed");
39605
40319
  if (!parsed.ok) {
39606
40320
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39715,12 +40429,12 @@ var init_ordersList = __esm(() => {
39715
40429
  });
39716
40430
 
39717
40431
  // src/mcp-server/tools/ordersList.ts
39718
- var args12, tool$ordersList;
40432
+ var args14, tool$ordersList;
39719
40433
  var init_ordersList2 = __esm(() => {
39720
40434
  init_ordersList();
39721
40435
  init_orderslist();
39722
40436
  init_tools();
39723
- args12 = {
40437
+ args14 = {
39724
40438
  request: OrdersListRequest$inboundSchema
39725
40439
  };
39726
40440
  tool$ordersList = {
@@ -39731,9 +40445,9 @@ List orders.
39731
40445
 
39732
40446
  **Scopes**: \`orders:read\``,
39733
40447
  scopes: ["read", "orders"],
39734
- args: args12,
39735
- tool: async (client, args13, ctx) => {
39736
- const [result, apiCall] = await ordersList(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
40448
+ args: args14,
40449
+ tool: async (client, args15, ctx) => {
40450
+ const [result, apiCall] = await ordersList(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39737
40451
  if (!result.ok) {
39738
40452
  return {
39739
40453
  content: [{ type: "text", text: result.error.message }],
@@ -41126,9 +41840,9 @@ var init_productcreate = __esm(() => {
41126
41840
 
41127
41841
  // src/funcs/productsCreate.ts
41128
41842
  function productsCreate(client, request, options) {
41129
- return new APIPromise($do14(client, request, options));
41843
+ return new APIPromise($do16(client, request, options));
41130
41844
  }
41131
- async function $do14(client, request, options) {
41845
+ async function $do16(client, request, options) {
41132
41846
  const parsed = safeParse(request, (value) => ProductCreate$outboundSchema.parse(value), "Input validation failed");
41133
41847
  if (!parsed.ok) {
41134
41848
  return [parsed, { status: "invalid" }];
@@ -41198,12 +41912,12 @@ var init_productsCreate = __esm(() => {
41198
41912
  });
41199
41913
 
41200
41914
  // src/mcp-server/tools/productsCreate.ts
41201
- var args13, tool$productsCreate;
41915
+ var args15, tool$productsCreate;
41202
41916
  var init_productsCreate2 = __esm(() => {
41203
41917
  init_productsCreate();
41204
41918
  init_productcreate();
41205
41919
  init_tools();
41206
- args13 = {
41920
+ args15 = {
41207
41921
  request: ProductCreate$inboundSchema
41208
41922
  };
41209
41923
  tool$productsCreate = {
@@ -41214,9 +41928,9 @@ Create a product.
41214
41928
 
41215
41929
  **Scopes**: \`products:write\``,
41216
41930
  scopes: ["write", "products"],
41217
- args: args13,
41218
- tool: async (client, args14, ctx) => {
41219
- const [result, apiCall] = await productsCreate(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41931
+ args: args15,
41932
+ tool: async (client, args16, ctx) => {
41933
+ const [result, apiCall] = await productsCreate(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41220
41934
  if (!result.ok) {
41221
41935
  return {
41222
41936
  content: [{ type: "text", text: result.error.message }],
@@ -41247,9 +41961,9 @@ var init_productsget = __esm(() => {
41247
41961
 
41248
41962
  // src/funcs/productsGet.ts
41249
41963
  function productsGet(client, request, options) {
41250
- return new APIPromise($do15(client, request, options));
41964
+ return new APIPromise($do17(client, request, options));
41251
41965
  }
41252
- async function $do15(client, request, options) {
41966
+ async function $do17(client, request, options) {
41253
41967
  const parsed = safeParse(request, (value) => ProductsGetRequest$outboundSchema.parse(value), "Input validation failed");
41254
41968
  if (!parsed.ok) {
41255
41969
  return [parsed, { status: "invalid" }];
@@ -41325,12 +42039,12 @@ var init_productsGet = __esm(() => {
41325
42039
  });
41326
42040
 
41327
42041
  // src/mcp-server/tools/productsGet.ts
41328
- var args14, tool$productsGet;
42042
+ var args16, tool$productsGet;
41329
42043
  var init_productsGet2 = __esm(() => {
41330
42044
  init_productsGet();
41331
42045
  init_productsget();
41332
42046
  init_tools();
41333
- args14 = {
42047
+ args16 = {
41334
42048
  request: ProductsGetRequest$inboundSchema
41335
42049
  };
41336
42050
  tool$productsGet = {
@@ -41341,9 +42055,9 @@ Get a product by ID.
41341
42055
 
41342
42056
  **Scopes**: \`products:read\` \`products:write\``,
41343
42057
  scopes: ["read", "products"],
41344
- args: args14,
41345
- tool: async (client, args15, ctx) => {
41346
- const [result, apiCall] = await productsGet(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42058
+ args: args16,
42059
+ tool: async (client, args17, ctx) => {
42060
+ const [result, apiCall] = await productsGet(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41347
42061
  if (!result.ok) {
41348
42062
  return {
41349
42063
  content: [{ type: "text", text: result.error.message }],
@@ -41485,9 +42199,9 @@ var init_productslist = __esm(() => {
41485
42199
 
41486
42200
  // src/funcs/productsList.ts
41487
42201
  function productsList(client, request, options) {
41488
- return new APIPromise($do16(client, request, options));
42202
+ return new APIPromise($do18(client, request, options));
41489
42203
  }
41490
- async function $do16(client, request, options) {
42204
+ async function $do18(client, request, options) {
41491
42205
  const parsed = safeParse(request, (value) => ProductsListRequest$outboundSchema.parse(value), "Input validation failed");
41492
42206
  if (!parsed.ok) {
41493
42207
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41601,12 +42315,12 @@ var init_productsList = __esm(() => {
41601
42315
  });
41602
42316
 
41603
42317
  // src/mcp-server/tools/productsList.ts
41604
- var args15, tool$productsList;
42318
+ var args17, tool$productsList;
41605
42319
  var init_productsList2 = __esm(() => {
41606
42320
  init_productsList();
41607
42321
  init_productslist();
41608
42322
  init_tools();
41609
- args15 = {
42323
+ args17 = {
41610
42324
  request: ProductsListRequest$inboundSchema
41611
42325
  };
41612
42326
  tool$productsList = {
@@ -41617,9 +42331,9 @@ List products.
41617
42331
 
41618
42332
  **Scopes**: \`products:read\` \`products:write\``,
41619
42333
  scopes: ["read", "products"],
41620
- args: args15,
41621
- tool: async (client, args16, ctx) => {
41622
- const [result, apiCall] = await productsList(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42334
+ args: args17,
42335
+ tool: async (client, args18, ctx) => {
42336
+ const [result, apiCall] = await productsList(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41623
42337
  if (!result.ok) {
41624
42338
  return {
41625
42339
  content: [{ type: "text", text: result.error.message }],
@@ -41792,9 +42506,9 @@ var init_productsupdate = __esm(() => {
41792
42506
 
41793
42507
  // src/funcs/productsUpdate.ts
41794
42508
  function productsUpdate(client, request, options) {
41795
- return new APIPromise($do17(client, request, options));
42509
+ return new APIPromise($do19(client, request, options));
41796
42510
  }
41797
- async function $do17(client, request, options) {
42511
+ async function $do19(client, request, options) {
41798
42512
  const parsed = safeParse(request, (value) => ProductsUpdateRequest$outboundSchema.parse(value), "Input validation failed");
41799
42513
  if (!parsed.ok) {
41800
42514
  return [parsed, { status: "invalid" }];
@@ -41872,12 +42586,12 @@ var init_productsUpdate = __esm(() => {
41872
42586
  });
41873
42587
 
41874
42588
  // src/mcp-server/tools/productsUpdate.ts
41875
- var args16, tool$productsUpdate;
42589
+ var args18, tool$productsUpdate;
41876
42590
  var init_productsUpdate2 = __esm(() => {
41877
42591
  init_productsUpdate();
41878
42592
  init_productsupdate();
41879
42593
  init_tools();
41880
- args16 = {
42594
+ args18 = {
41881
42595
  request: ProductsUpdateRequest$inboundSchema
41882
42596
  };
41883
42597
  tool$productsUpdate = {
@@ -41888,9 +42602,9 @@ Update a product.
41888
42602
 
41889
42603
  **Scopes**: \`products:write\``,
41890
42604
  scopes: ["write", "products"],
41891
- args: args16,
41892
- tool: async (client, args17, ctx) => {
41893
- const [result, apiCall] = await productsUpdate(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42605
+ args: args18,
42606
+ tool: async (client, args19, ctx) => {
42607
+ const [result, apiCall] = await productsUpdate(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41894
42608
  if (!result.ok) {
41895
42609
  return {
41896
42610
  content: [{ type: "text", text: result.error.message }],
@@ -41949,9 +42663,9 @@ var init_productsupdatebenefits = __esm(() => {
41949
42663
 
41950
42664
  // src/funcs/productsUpdateBenefits.ts
41951
42665
  function productsUpdateBenefits(client, request, options) {
41952
- return new APIPromise($do18(client, request, options));
42666
+ return new APIPromise($do20(client, request, options));
41953
42667
  }
41954
- async function $do18(client, request, options) {
42668
+ async function $do20(client, request, options) {
41955
42669
  const parsed = safeParse(request, (value) => ProductsUpdateBenefitsRequest$outboundSchema.parse(value), "Input validation failed");
41956
42670
  if (!parsed.ok) {
41957
42671
  return [parsed, { status: "invalid" }];
@@ -42031,12 +42745,12 @@ var init_productsUpdateBenefits = __esm(() => {
42031
42745
  });
42032
42746
 
42033
42747
  // src/mcp-server/tools/productsUpdateBenefits.ts
42034
- var args17, tool$productsUpdateBenefits;
42748
+ var args19, tool$productsUpdateBenefits;
42035
42749
  var init_productsUpdateBenefits2 = __esm(() => {
42036
42750
  init_productsUpdateBenefits();
42037
42751
  init_productsupdatebenefits();
42038
42752
  init_tools();
42039
- args17 = {
42753
+ args19 = {
42040
42754
  request: ProductsUpdateBenefitsRequest$inboundSchema
42041
42755
  };
42042
42756
  tool$productsUpdateBenefits = {
@@ -42047,9 +42761,9 @@ Update benefits granted by a product.
42047
42761
 
42048
42762
  **Scopes**: \`products:write\``,
42049
42763
  scopes: ["write", "products"],
42050
- args: args17,
42051
- tool: async (client, args18, ctx) => {
42052
- const [result, apiCall] = await productsUpdateBenefits(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42764
+ args: args19,
42765
+ tool: async (client, args20, ctx) => {
42766
+ const [result, apiCall] = await productsUpdateBenefits(client, args20.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42053
42767
  if (!result.ok) {
42054
42768
  return {
42055
42769
  content: [{ type: "text", text: result.error.message }],
@@ -42095,9 +42809,9 @@ var init_subscriptionsexport = __esm(() => {
42095
42809
 
42096
42810
  // src/funcs/subscriptionsExport.ts
42097
42811
  function subscriptionsExport(client, request, options) {
42098
- return new APIPromise($do19(client, request, options));
42812
+ return new APIPromise($do21(client, request, options));
42099
42813
  }
42100
- async function $do19(client, request, options) {
42814
+ async function $do21(client, request, options) {
42101
42815
  const parsed = safeParse(request, (value) => SubscriptionsExportRequest$outboundSchema.parse(value), "Input validation failed");
42102
42816
  if (!parsed.ok) {
42103
42817
  return [parsed, { status: "invalid" }];
@@ -42170,12 +42884,12 @@ var init_subscriptionsExport = __esm(() => {
42170
42884
  });
42171
42885
 
42172
42886
  // src/mcp-server/tools/subscriptionsExport.ts
42173
- var args18, tool$subscriptionsExport;
42887
+ var args20, tool$subscriptionsExport;
42174
42888
  var init_subscriptionsExport2 = __esm(() => {
42175
42889
  init_subscriptionsExport();
42176
42890
  init_subscriptionsexport();
42177
42891
  init_tools();
42178
- args18 = {
42892
+ args20 = {
42179
42893
  request: SubscriptionsExportRequest$inboundSchema
42180
42894
  };
42181
42895
  tool$subscriptionsExport = {
@@ -42186,9 +42900,9 @@ Export subscriptions as a CSV file.
42186
42900
 
42187
42901
  **Scopes**: \`subscriptions:read\` \`subscriptions:write\``,
42188
42902
  scopes: ["read", "subscriptions"],
42189
- args: args18,
42190
- tool: async (client, args19, ctx) => {
42191
- const [result, apiCall] = await subscriptionsExport(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42903
+ args: args20,
42904
+ tool: async (client, args21, ctx) => {
42905
+ const [result, apiCall] = await subscriptionsExport(client, args21.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42192
42906
  if (!result.ok) {
42193
42907
  return {
42194
42908
  content: [{ type: "text", text: result.error.message }],
@@ -42221,9 +42935,9 @@ var init_subscriptioncustomer = __esm(() => {
42221
42935
  SubscriptionCustomerTaxId$.outboundSchema = SubscriptionCustomerTaxId$outboundSchema;
42222
42936
  })(SubscriptionCustomerTaxId$ ||= {});
42223
42937
  SubscriptionCustomer$inboundSchema = objectType({
42938
+ id: stringType(),
42224
42939
  created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
42225
42940
  modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
42226
- id: stringType(),
42227
42941
  metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
42228
42942
  external_id: nullableType(stringType()),
42229
42943
  email: stringType(),
@@ -42246,9 +42960,9 @@ var init_subscriptioncustomer = __esm(() => {
42246
42960
  });
42247
42961
  });
42248
42962
  SubscriptionCustomer$outboundSchema = objectType({
42963
+ id: stringType(),
42249
42964
  createdAt: dateType().transform((v2) => v2.toISOString()),
42250
42965
  modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
42251
- id: stringType(),
42252
42966
  metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
42253
42967
  externalId: nullableType(stringType()),
42254
42968
  email: stringType(),
@@ -42536,9 +43250,9 @@ var init_subscriptionsget = __esm(() => {
42536
43250
 
42537
43251
  // src/funcs/subscriptionsGet.ts
42538
43252
  function subscriptionsGet(client, request, options) {
42539
- return new APIPromise($do20(client, request, options));
43253
+ return new APIPromise($do22(client, request, options));
42540
43254
  }
42541
- async function $do20(client, request, options) {
43255
+ async function $do22(client, request, options) {
42542
43256
  const parsed = safeParse(request, (value) => SubscriptionsGetRequest$outboundSchema.parse(value), "Input validation failed");
42543
43257
  if (!parsed.ok) {
42544
43258
  return [parsed, { status: "invalid" }];
@@ -42614,12 +43328,12 @@ var init_subscriptionsGet = __esm(() => {
42614
43328
  });
42615
43329
 
42616
43330
  // src/mcp-server/tools/subscriptionsGet.ts
42617
- var args19, tool$subscriptionsGet;
43331
+ var args21, tool$subscriptionsGet;
42618
43332
  var init_subscriptionsGet2 = __esm(() => {
42619
43333
  init_subscriptionsGet();
42620
43334
  init_subscriptionsget();
42621
43335
  init_tools();
42622
- args19 = {
43336
+ args21 = {
42623
43337
  request: SubscriptionsGetRequest$inboundSchema
42624
43338
  };
42625
43339
  tool$subscriptionsGet = {
@@ -42630,9 +43344,9 @@ Get a subscription by ID.
42630
43344
 
42631
43345
  **Scopes**: \`subscriptions:write\``,
42632
43346
  scopes: ["read", "subscriptions"],
42633
- args: args19,
42634
- tool: async (client, args20, ctx) => {
42635
- const [result, apiCall] = await subscriptionsGet(client, args20.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43347
+ args: args21,
43348
+ tool: async (client, args22, ctx) => {
43349
+ const [result, apiCall] = await subscriptionsGet(client, args22.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42636
43350
  if (!result.ok) {
42637
43351
  return {
42638
43352
  content: [{ type: "text", text: result.error.message }],
@@ -42784,9 +43498,9 @@ var init_subscriptionslist = __esm(() => {
42784
43498
 
42785
43499
  // src/funcs/subscriptionsList.ts
42786
43500
  function subscriptionsList(client, request, options) {
42787
- return new APIPromise($do21(client, request, options));
43501
+ return new APIPromise($do23(client, request, options));
42788
43502
  }
42789
- async function $do21(client, request, options) {
43503
+ async function $do23(client, request, options) {
42790
43504
  const parsed = safeParse(request, (value) => SubscriptionsListRequest$outboundSchema.parse(value), "Input validation failed");
42791
43505
  if (!parsed.ok) {
42792
43506
  return [haltIterator(parsed), { status: "invalid" }];
@@ -42899,12 +43613,12 @@ var init_subscriptionsList = __esm(() => {
42899
43613
  });
42900
43614
 
42901
43615
  // src/mcp-server/tools/subscriptionsList.ts
42902
- var args20, tool$subscriptionsList;
43616
+ var args22, tool$subscriptionsList;
42903
43617
  var init_subscriptionsList2 = __esm(() => {
42904
43618
  init_subscriptionsList();
42905
43619
  init_subscriptionslist();
42906
43620
  init_tools();
42907
- args20 = {
43621
+ args22 = {
42908
43622
  request: SubscriptionsListRequest$inboundSchema
42909
43623
  };
42910
43624
  tool$subscriptionsList = {
@@ -42915,9 +43629,9 @@ List subscriptions.
42915
43629
 
42916
43630
  **Scopes**: \`subscriptions:read\` \`subscriptions:write\``,
42917
43631
  scopes: ["read", "subscriptions"],
42918
- args: args20,
42919
- tool: async (client, args21, ctx) => {
42920
- const [result, apiCall] = await subscriptionsList(client, args21.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43632
+ args: args22,
43633
+ tool: async (client, args23, ctx) => {
43634
+ const [result, apiCall] = await subscriptionsList(client, args23.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42921
43635
  if (!result.ok) {
42922
43636
  return {
42923
43637
  content: [{ type: "text", text: result.error.message }],
@@ -42981,9 +43695,9 @@ var init_subscriptionsrevoke = __esm(() => {
42981
43695
 
42982
43696
  // src/funcs/subscriptionsRevoke.ts
42983
43697
  function subscriptionsRevoke(client, request, options) {
42984
- return new APIPromise($do22(client, request, options));
43698
+ return new APIPromise($do24(client, request, options));
42985
43699
  }
42986
- async function $do22(client, request, options) {
43700
+ async function $do24(client, request, options) {
42987
43701
  const parsed = safeParse(request, (value) => SubscriptionsRevokeRequest$outboundSchema.parse(value), "Input validation failed");
42988
43702
  if (!parsed.ok) {
42989
43703
  return [parsed, { status: "invalid" }];
@@ -43060,12 +43774,12 @@ var init_subscriptionsRevoke = __esm(() => {
43060
43774
  });
43061
43775
 
43062
43776
  // src/mcp-server/tools/subscriptionsRevoke.ts
43063
- var args21, tool$subscriptionsRevoke;
43777
+ var args23, tool$subscriptionsRevoke;
43064
43778
  var init_subscriptionsRevoke2 = __esm(() => {
43065
43779
  init_subscriptionsRevoke();
43066
43780
  init_subscriptionsrevoke();
43067
43781
  init_tools();
43068
- args21 = {
43782
+ args23 = {
43069
43783
  request: SubscriptionsRevokeRequest$inboundSchema
43070
43784
  };
43071
43785
  tool$subscriptionsRevoke = {
@@ -43076,9 +43790,9 @@ Revoke a subscription, i.e cancel immediately.
43076
43790
 
43077
43791
  **Scopes**: \`subscriptions:write\``,
43078
43792
  scopes: ["write", "subscriptions"],
43079
- args: args21,
43080
- tool: async (client, args22, ctx) => {
43081
- const [result, apiCall] = await subscriptionsRevoke(client, args22.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43793
+ args: args23,
43794
+ tool: async (client, args24, ctx) => {
43795
+ const [result, apiCall] = await subscriptionsRevoke(client, args24.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43082
43796
  if (!result.ok) {
43083
43797
  return {
43084
43798
  content: [{ type: "text", text: result.error.message }],
@@ -43223,9 +43937,9 @@ var init_subscriptionsupdate = __esm(() => {
43223
43937
 
43224
43938
  // src/funcs/subscriptionsUpdate.ts
43225
43939
  function subscriptionsUpdate(client, request, options) {
43226
- return new APIPromise($do23(client, request, options));
43940
+ return new APIPromise($do25(client, request, options));
43227
43941
  }
43228
- async function $do23(client, request, options) {
43942
+ async function $do25(client, request, options) {
43229
43943
  const parsed = safeParse(request, (value) => SubscriptionsUpdateRequest$outboundSchema.parse(value), "Input validation failed");
43230
43944
  if (!parsed.ok) {
43231
43945
  return [parsed, { status: "invalid" }];
@@ -43305,12 +44019,12 @@ var init_subscriptionsUpdate = __esm(() => {
43305
44019
  });
43306
44020
 
43307
44021
  // src/mcp-server/tools/subscriptionsUpdate.ts
43308
- var args22, tool$subscriptionsUpdate;
44022
+ var args24, tool$subscriptionsUpdate;
43309
44023
  var init_subscriptionsUpdate2 = __esm(() => {
43310
44024
  init_subscriptionsUpdate();
43311
44025
  init_subscriptionsupdate();
43312
44026
  init_tools();
43313
- args22 = {
44027
+ args24 = {
43314
44028
  request: SubscriptionsUpdateRequest$inboundSchema
43315
44029
  };
43316
44030
  tool$subscriptionsUpdate = {
@@ -43321,9 +44035,9 @@ Update a subscription.
43321
44035
 
43322
44036
  **Scopes**: \`subscriptions:write\``,
43323
44037
  scopes: ["write", "subscriptions"],
43324
- args: args22,
43325
- tool: async (client, args23, ctx) => {
43326
- const [result, apiCall] = await subscriptionsUpdate(client, args23.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
44038
+ args: args24,
44039
+ tool: async (client, args25, ctx) => {
44040
+ const [result, apiCall] = await subscriptionsUpdate(client, args25.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43327
44041
  if (!result.ok) {
43328
44042
  return {
43329
44043
  content: [{ type: "text", text: result.error.message }],
@@ -43340,7 +44054,7 @@ Update a subscription.
43340
44054
  function createMCPServer(deps) {
43341
44055
  const server = new McpServer({
43342
44056
  name: "Polar",
43343
- version: "0.29.0"
44057
+ version: "0.29.2"
43344
44058
  });
43345
44059
  const client = new PolarCore({
43346
44060
  accessToken: deps.accessToken,
@@ -43373,6 +44087,8 @@ function createMCPServer(deps) {
43373
44087
  tool(tool$customersGetExternal);
43374
44088
  tool(tool$customersUpdateExternal);
43375
44089
  tool(tool$customersDeleteExternal);
44090
+ tool(tool$customersGetState);
44091
+ tool(tool$customersGetStateExternal);
43376
44092
  return server;
43377
44093
  }
43378
44094
  var init_server2 = __esm(() => {
@@ -43385,6 +44101,8 @@ var init_server2 = __esm(() => {
43385
44101
  init_customersDeleteExternal2();
43386
44102
  init_customersGet2();
43387
44103
  init_customersGetExternal2();
44104
+ init_customersGetState2();
44105
+ init_customersGetStateExternal2();
43388
44106
  init_customersList2();
43389
44107
  init_customersUpdate2();
43390
44108
  init_customersUpdateExternal2();
@@ -44593,7 +45311,7 @@ var routes = rn({
44593
45311
  var app = Ve(routes, {
44594
45312
  name: "mcp",
44595
45313
  versionInfo: {
44596
- currentVersion: "0.29.0"
45314
+ currentVersion: "0.29.2"
44597
45315
  }
44598
45316
  });
44599
45317
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -44601,5 +45319,5 @@ export {
44601
45319
  app
44602
45320
  };
44603
45321
 
44604
- //# debugId=C56C60717D2D9D7764756E2164756E21
45322
+ //# debugId=7B014326B1A40CE864756E2164756E21
44605
45323
  //# sourceMappingURL=mcp-server.js.map