@flexprice/mcp-server 2.1.19 → 2.1.24

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 (622) hide show
  1. package/bin/mcp-server.js +5440 -3801
  2. package/bin/mcp-server.js.map +190 -142
  3. package/bun.lock +47 -40
  4. package/esm/funcs/customersGetCustomerEntitlementsByExternalID.d.ts +16 -0
  5. package/esm/funcs/customersGetCustomerEntitlementsByExternalID.d.ts.map +1 -0
  6. package/esm/funcs/customersGetCustomerEntitlementsByExternalID.js +87 -0
  7. package/esm/funcs/customersGetCustomerEntitlementsByExternalID.js.map +1 -0
  8. package/esm/funcs/customersGetSubscriptionsForCustomer.d.ts +16 -0
  9. package/esm/funcs/customersGetSubscriptionsForCustomer.d.ts.map +1 -0
  10. package/esm/funcs/customersGetSubscriptionsForCustomer.js +91 -0
  11. package/esm/funcs/customersGetSubscriptionsForCustomer.js.map +1 -0
  12. package/esm/funcs/eventsGetEvent.d.ts +1 -1
  13. package/esm/funcs/eventsGetEvent.js +7 -9
  14. package/esm/funcs/eventsGetEvent.js.map +1 -1
  15. package/esm/funcs/eventsGetHuggingfaceInferenceData.d.ts +3 -2
  16. package/esm/funcs/eventsGetHuggingfaceInferenceData.d.ts.map +1 -1
  17. package/esm/funcs/eventsGetHuggingfaceInferenceData.js +15 -4
  18. package/esm/funcs/eventsGetHuggingfaceInferenceData.js.map +1 -1
  19. package/esm/funcs/invoicesGetInvoice.js +1 -0
  20. package/esm/funcs/invoicesGetInvoice.js.map +1 -1
  21. package/esm/funcs/invoicesUpdateInvoice.d.ts +1 -1
  22. package/esm/funcs/invoicesUpdateInvoice.js +1 -1
  23. package/esm/funcs/subscriptionsAddSubscriptionAddon.d.ts +3 -0
  24. package/esm/funcs/subscriptionsAddSubscriptionAddon.d.ts.map +1 -1
  25. package/esm/funcs/subscriptionsAddSubscriptionAddon.js +3 -0
  26. package/esm/funcs/subscriptionsAddSubscriptionAddon.js.map +1 -1
  27. package/esm/funcs/subscriptionsExecuteSubscriptionModify.d.ts +1 -1
  28. package/esm/funcs/subscriptionsExecuteSubscriptionModify.js +1 -1
  29. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts +16 -0
  30. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts.map +1 -0
  31. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.js +88 -0
  32. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.js.map +1 -0
  33. package/esm/funcs/subscriptionsPreviewSubscriptionModify.d.ts +1 -1
  34. package/esm/funcs/subscriptionsPreviewSubscriptionModify.js +1 -1
  35. package/esm/funcs/subscriptionsPreviewSubscriptionPlanChangeV2.d.ts +16 -0
  36. package/esm/funcs/subscriptionsPreviewSubscriptionPlanChangeV2.d.ts.map +1 -0
  37. package/esm/funcs/subscriptionsPreviewSubscriptionPlanChangeV2.js +88 -0
  38. package/esm/funcs/subscriptionsPreviewSubscriptionPlanChangeV2.js.map +1 -0
  39. package/esm/funcs/subscriptionsRemoveSubscriptionAddon.d.ts +3 -0
  40. package/esm/funcs/subscriptionsRemoveSubscriptionAddon.d.ts.map +1 -1
  41. package/esm/funcs/subscriptionsRemoveSubscriptionAddon.js +3 -0
  42. package/esm/funcs/subscriptionsRemoveSubscriptionAddon.js.map +1 -1
  43. package/esm/lib/config.d.ts +3 -3
  44. package/esm/lib/config.js +3 -3
  45. package/esm/lib/http.d.ts +1 -1
  46. package/esm/lib/http.d.ts.map +1 -1
  47. package/esm/lib/http.js +1 -1
  48. package/esm/lib/http.js.map +1 -1
  49. package/esm/lib/retries.js +7 -0
  50. package/esm/lib/retries.js.map +1 -1
  51. package/esm/lib/security.d.ts +5 -4
  52. package/esm/lib/security.d.ts.map +1 -1
  53. package/esm/lib/security.js +4 -5
  54. package/esm/lib/security.js.map +1 -1
  55. package/esm/mcp-server/mcp-server.js +1 -1
  56. package/esm/mcp-server/server.d.ts.map +1 -1
  57. package/esm/mcp-server/server.js +10 -2
  58. package/esm/mcp-server/server.js.map +1 -1
  59. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.d.ts +7 -0
  60. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.d.ts.map +1 -0
  61. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.js +35 -0
  62. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.js.map +1 -0
  63. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.d.ts +7 -0
  64. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.d.ts.map +1 -0
  65. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.js +35 -0
  66. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.js.map +1 -0
  67. package/esm/mcp-server/tools/eventsGetEvent.js +1 -1
  68. package/esm/mcp-server/tools/eventsGetEvent.js.map +1 -1
  69. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.d.ts +5 -1
  70. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.d.ts.map +1 -1
  71. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.js +8 -3
  72. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.js.map +1 -1
  73. package/esm/mcp-server/tools/invoicesUpdateInvoice.js +1 -1
  74. package/esm/mcp-server/tools/invoicesUpdateInvoice.js.map +1 -1
  75. package/esm/mcp-server/tools/subscriptionsAddSubscriptionAddon.d.ts.map +1 -1
  76. package/esm/mcp-server/tools/subscriptionsAddSubscriptionAddon.js +1 -0
  77. package/esm/mcp-server/tools/subscriptionsAddSubscriptionAddon.js.map +1 -1
  78. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js +1 -1
  79. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js.map +1 -1
  80. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts +7 -0
  81. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts.map +1 -0
  82. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.js +35 -0
  83. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.js.map +1 -0
  84. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js +1 -1
  85. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js.map +1 -1
  86. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.d.ts +7 -0
  87. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.d.ts.map +1 -0
  88. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.js +35 -0
  89. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.js.map +1 -0
  90. package/esm/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.d.ts.map +1 -1
  91. package/esm/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.js +1 -0
  92. package/esm/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.js.map +1 -1
  93. package/esm/mcp-server/tools.d.ts.map +1 -1
  94. package/esm/mcp-server/tools.js +2 -0
  95. package/esm/mcp-server/tools.js.map +1 -1
  96. package/esm/models/addaddonparams.d.ts +8 -0
  97. package/esm/models/addaddonparams.d.ts.map +1 -0
  98. package/esm/models/addaddonparams.js +10 -0
  99. package/esm/models/addaddonparams.js.map +1 -0
  100. package/esm/models/addaddonref.d.ts +12 -0
  101. package/esm/models/addaddonref.d.ts.map +1 -0
  102. package/esm/models/addaddonref.js +14 -0
  103. package/esm/models/addaddonref.js.map +1 -0
  104. package/esm/models/addaddonrequest.d.ts +4 -0
  105. package/esm/models/addaddonrequest.d.ts.map +1 -1
  106. package/esm/models/addaddonrequest.js +5 -0
  107. package/esm/models/addaddonrequest.js.map +1 -1
  108. package/esm/models/addaddontosubscriptionrequest.d.ts +2 -0
  109. package/esm/models/addaddontosubscriptionrequest.d.ts.map +1 -1
  110. package/esm/models/addaddontosubscriptionrequest.js +3 -0
  111. package/esm/models/addaddontosubscriptionrequest.js.map +1 -1
  112. package/esm/models/addaddontosubscriptionresponse.d.ts +31 -0
  113. package/esm/models/addaddontosubscriptionresponse.d.ts.map +1 -0
  114. package/esm/models/addaddontosubscriptionresponse.js +31 -0
  115. package/esm/models/addaddontosubscriptionresponse.js.map +1 -0
  116. package/esm/models/addonresponse.d.ts +2 -0
  117. package/esm/models/addonresponse.d.ts.map +1 -1
  118. package/esm/models/addonresponse.js +2 -0
  119. package/esm/models/addonresponse.js.map +1 -1
  120. package/esm/models/addonstatus.d.ts +1 -1
  121. package/esm/models/addsubscriptionaddonop.d.ts +2 -2
  122. package/esm/models/addsubscriptionaddonop.d.ts.map +1 -1
  123. package/esm/models/addsubscriptionaddonop.js +2 -2
  124. package/esm/models/addsubscriptionaddonop.js.map +1 -1
  125. package/esm/models/aggregatedentitlement.d.ts +9 -0
  126. package/esm/models/aggregatedentitlement.d.ts.map +1 -1
  127. package/esm/models/aggregatedentitlement.js +7 -1
  128. package/esm/models/aggregatedentitlement.js.map +1 -1
  129. package/esm/models/aggregatedentitlementbucket.d.ts +14 -0
  130. package/esm/models/aggregatedentitlementbucket.d.ts.map +1 -0
  131. package/esm/models/aggregatedentitlementbucket.js +16 -0
  132. package/esm/models/aggregatedentitlementbucket.js.map +1 -0
  133. package/esm/models/alertthreshold.d.ts +1 -1
  134. package/esm/models/alertthreshold.js +1 -1
  135. package/esm/models/applicationstatus.d.ts +3 -3
  136. package/esm/models/autotopup.d.ts +7 -0
  137. package/esm/models/autotopup.d.ts.map +1 -1
  138. package/esm/models/autotopup.js +7 -0
  139. package/esm/models/autotopup.js.map +1 -1
  140. package/esm/models/checkoutaction.d.ts +16 -0
  141. package/esm/models/checkoutaction.d.ts.map +1 -0
  142. package/esm/models/checkoutaction.js +17 -0
  143. package/esm/models/checkoutaction.js.map +1 -0
  144. package/esm/models/checkoutjsonbcheckoutconfiguration.d.ts +13 -0
  145. package/esm/models/checkoutjsonbcheckoutconfiguration.d.ts.map +1 -0
  146. package/esm/models/checkoutjsonbcheckoutconfiguration.js +15 -0
  147. package/esm/models/checkoutjsonbcheckoutconfiguration.js.map +1 -0
  148. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.d.ts +10 -0
  149. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.d.ts.map +1 -0
  150. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.js +12 -0
  151. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.js.map +1 -0
  152. package/esm/models/checkoutjsonbcheckoutproviderresult.d.ts +13 -0
  153. package/esm/models/checkoutjsonbcheckoutproviderresult.d.ts.map +1 -0
  154. package/esm/models/checkoutjsonbcheckoutproviderresult.js +13 -0
  155. package/esm/models/checkoutjsonbcheckoutproviderresult.js.map +1 -0
  156. package/esm/models/checkoutjsonbcheckoutresult.d.ts +7 -0
  157. package/esm/models/checkoutjsonbcheckoutresult.d.ts.map +1 -0
  158. package/esm/models/checkoutjsonbcheckoutresult.js +9 -0
  159. package/esm/models/checkoutjsonbcheckoutresult.js.map +1 -0
  160. package/esm/models/checkoutparams.d.ts +16 -0
  161. package/esm/models/checkoutparams.d.ts.map +1 -0
  162. package/esm/models/checkoutparams.js +16 -0
  163. package/esm/models/checkoutparams.js.map +1 -0
  164. package/esm/models/checkoutpaymentprovider.d.ts +10 -0
  165. package/esm/models/checkoutpaymentprovider.d.ts.map +1 -0
  166. package/esm/models/checkoutpaymentprovider.js +11 -0
  167. package/esm/models/checkoutpaymentprovider.js.map +1 -0
  168. package/esm/models/checkoutpaymentproviderconfig.d.ts +10 -0
  169. package/esm/models/checkoutpaymentproviderconfig.d.ts.map +1 -0
  170. package/esm/models/checkoutpaymentproviderconfig.js +12 -0
  171. package/esm/models/checkoutpaymentproviderconfig.js.map +1 -0
  172. package/esm/models/checkoutsessionresponse.d.ts +44 -0
  173. package/esm/models/checkoutsessionresponse.d.ts.map +1 -0
  174. package/esm/models/checkoutsessionresponse.js +45 -0
  175. package/esm/models/checkoutsessionresponse.js.map +1 -0
  176. package/esm/models/checkoutstatus.d.ts +18 -0
  177. package/esm/models/checkoutstatus.d.ts.map +1 -0
  178. package/esm/models/checkoutstatus.js +19 -0
  179. package/esm/models/checkoutstatus.js.map +1 -0
  180. package/esm/models/couponassociationresponse.d.ts +4 -2
  181. package/esm/models/couponassociationresponse.d.ts.map +1 -1
  182. package/esm/models/couponassociationresponse.js +4 -2
  183. package/esm/models/couponassociationresponse.js.map +1 -1
  184. package/esm/models/{coupon.d.ts → couponresponse.d.ts} +3 -3
  185. package/esm/models/couponresponse.d.ts.map +1 -0
  186. package/esm/models/{coupon.js → couponresponse.js} +2 -2
  187. package/esm/models/couponresponse.js.map +1 -0
  188. package/esm/models/createcreditgrantrequest.d.ts +1 -0
  189. package/esm/models/createcreditgrantrequest.d.ts.map +1 -1
  190. package/esm/models/createcreditgrantrequest.js +1 -0
  191. package/esm/models/createcreditgrantrequest.js.map +1 -1
  192. package/esm/models/createcustomerrequest.d.ts +4 -1
  193. package/esm/models/createcustomerrequest.d.ts.map +1 -1
  194. package/esm/models/createcustomerrequest.js +4 -1
  195. package/esm/models/createcustomerrequest.js.map +1 -1
  196. package/esm/models/createinvoicerequest.d.ts +1 -0
  197. package/esm/models/createinvoicerequest.d.ts.map +1 -1
  198. package/esm/models/createinvoicerequest.js +1 -0
  199. package/esm/models/createinvoicerequest.js.map +1 -1
  200. package/esm/models/createsubscriptionparams.d.ts +16 -0
  201. package/esm/models/createsubscriptionparams.d.ts.map +1 -0
  202. package/esm/models/createsubscriptionparams.js +16 -0
  203. package/esm/models/createsubscriptionparams.js.map +1 -0
  204. package/esm/models/createsubscriptionrequest.d.ts +3 -1
  205. package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
  206. package/esm/models/createsubscriptionrequest.js +19 -18
  207. package/esm/models/createsubscriptionrequest.js.map +1 -1
  208. package/esm/models/createsubscriptionresult.d.ts +8 -0
  209. package/esm/models/createsubscriptionresult.d.ts.map +1 -0
  210. package/esm/models/createsubscriptionresult.js +10 -0
  211. package/esm/models/createsubscriptionresult.js.map +1 -0
  212. package/esm/models/creditgrantresponse.d.ts +1 -0
  213. package/esm/models/creditgrantresponse.d.ts.map +1 -1
  214. package/esm/models/creditgrantresponse.js +1 -0
  215. package/esm/models/creditgrantresponse.js.map +1 -1
  216. package/esm/models/creditgrantscope.d.ts +2 -0
  217. package/esm/models/creditgrantscope.d.ts.map +1 -1
  218. package/esm/models/creditgrantscope.js +2 -0
  219. package/esm/models/creditgrantscope.js.map +1 -1
  220. package/esm/models/customer.d.ts +2 -0
  221. package/esm/models/customer.d.ts.map +1 -1
  222. package/esm/models/customer.js +2 -0
  223. package/esm/models/customer.js.map +1 -1
  224. package/esm/models/customerentitlementsresponse.d.ts +2 -0
  225. package/esm/models/customerentitlementsresponse.d.ts.map +1 -1
  226. package/esm/models/customerentitlementsresponse.js +2 -0
  227. package/esm/models/customerentitlementsresponse.js.map +1 -1
  228. package/esm/models/customerresponse.d.ts +2 -0
  229. package/esm/models/customerresponse.d.ts.map +1 -1
  230. package/esm/models/customerresponse.js +2 -0
  231. package/esm/models/customerresponse.js.map +1 -1
  232. package/esm/models/durationunit.d.ts +16 -0
  233. package/esm/models/durationunit.d.ts.map +1 -0
  234. package/esm/models/durationunit.js +17 -0
  235. package/esm/models/durationunit.js.map +1 -0
  236. package/esm/models/entitlementaggregationmode.d.ts +12 -0
  237. package/esm/models/entitlementaggregationmode.d.ts.map +1 -0
  238. package/esm/models/entitlementaggregationmode.js +13 -0
  239. package/esm/models/entitlementaggregationmode.js.map +1 -0
  240. package/esm/models/entitlementgrantdurationunit.d.ts +14 -0
  241. package/esm/models/entitlementgrantdurationunit.d.ts.map +1 -0
  242. package/esm/models/entitlementgrantdurationunit.js +15 -0
  243. package/esm/models/entitlementgrantdurationunit.js.map +1 -0
  244. package/esm/models/entitlementgrantmeasure.d.ts +12 -0
  245. package/esm/models/entitlementgrantmeasure.d.ts.map +1 -0
  246. package/esm/models/entitlementgrantmeasure.js +13 -0
  247. package/esm/models/entitlementgrantmeasure.js.map +1 -0
  248. package/esm/models/entitlementresponse.d.ts +11 -0
  249. package/esm/models/entitlementresponse.d.ts.map +1 -1
  250. package/esm/models/entitlementresponse.js +9 -0
  251. package/esm/models/entitlementresponse.js.map +1 -1
  252. package/esm/models/entitlementsource.d.ts +3 -0
  253. package/esm/models/entitlementsource.d.ts.map +1 -1
  254. package/esm/models/entitlementsource.js +1 -0
  255. package/esm/models/entitlementsource.js.map +1 -1
  256. package/esm/models/entitychangebehaviour.d.ts +12 -0
  257. package/esm/models/entitychangebehaviour.d.ts.map +1 -0
  258. package/esm/models/entitychangebehaviour.js +13 -0
  259. package/esm/models/entitychangebehaviour.js.map +1 -0
  260. package/esm/models/entitychangepolicy.d.ts +10 -0
  261. package/esm/models/entitychangepolicy.d.ts.map +1 -0
  262. package/esm/models/entitychangepolicy.js +12 -0
  263. package/esm/models/entitychangepolicy.js.map +1 -0
  264. package/esm/models/entitychangeresult.d.ts +11 -0
  265. package/esm/models/entitychangeresult.d.ts.map +1 -0
  266. package/esm/models/entitychangeresult.js +14 -0
  267. package/esm/models/entitychangeresult.js.map +1 -0
  268. package/esm/models/errorcode.d.ts +2 -0
  269. package/esm/models/errorcode.d.ts.map +1 -1
  270. package/esm/models/errorcode.js +2 -0
  271. package/esm/models/errorcode.js.map +1 -1
  272. package/esm/models/executesubscriptionmodifyrequest.d.ts +4 -0
  273. package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
  274. package/esm/models/executesubscriptionmodifyrequest.js +4 -0
  275. package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
  276. package/esm/models/executesubscriptionplanchangev2op.d.ts +12 -0
  277. package/esm/models/executesubscriptionplanchangev2op.d.ts.map +1 -0
  278. package/esm/models/executesubscriptionplanchangev2op.js +16 -0
  279. package/esm/models/executesubscriptionplanchangev2op.js.map +1 -0
  280. package/esm/models/featuretype.d.ts +2 -0
  281. package/esm/models/featuretype.d.ts.map +1 -1
  282. package/esm/models/featuretype.js +2 -0
  283. package/esm/models/featuretype.js.map +1 -1
  284. package/esm/models/filteroperatortype.d.ts +2 -0
  285. package/esm/models/filteroperatortype.d.ts.map +1 -1
  286. package/esm/models/filteroperatortype.js +2 -0
  287. package/esm/models/filteroperatortype.js.map +1 -1
  288. package/esm/models/getcustomerentitlementsbyexternalidop.d.ts +10 -0
  289. package/esm/models/getcustomerentitlementsbyexternalidop.d.ts.map +1 -0
  290. package/esm/models/getcustomerentitlementsbyexternalidop.js +14 -0
  291. package/esm/models/getcustomerentitlementsbyexternalidop.js.map +1 -0
  292. package/esm/models/gethuggingfacebillingdatarequest.d.ts +6 -0
  293. package/esm/models/gethuggingfacebillingdatarequest.d.ts.map +1 -0
  294. package/esm/models/gethuggingfacebillingdatarequest.js +8 -0
  295. package/esm/models/gethuggingfacebillingdatarequest.js.map +1 -0
  296. package/esm/models/getinvoiceop.d.ts +1 -0
  297. package/esm/models/getinvoiceop.d.ts.map +1 -1
  298. package/esm/models/getinvoiceop.js +1 -0
  299. package/esm/models/getinvoiceop.js.map +1 -1
  300. package/esm/models/getsubscriptionsforcustomerop.d.ts +11 -0
  301. package/esm/models/getsubscriptionsforcustomerop.d.ts.map +1 -0
  302. package/esm/models/getsubscriptionsforcustomerop.js +15 -0
  303. package/esm/models/getsubscriptionsforcustomerop.js.map +1 -0
  304. package/esm/models/getusageanalyticsresponse.d.ts +2 -0
  305. package/esm/models/getusageanalyticsresponse.d.ts.map +1 -1
  306. package/esm/models/getusageanalyticsresponse.js +3 -1
  307. package/esm/models/getusageanalyticsresponse.js.map +1 -1
  308. package/esm/models/getusagebymeterrequest.d.ts +1 -0
  309. package/esm/models/getusagebymeterrequest.d.ts.map +1 -1
  310. package/esm/models/getusagebymeterrequest.js +1 -0
  311. package/esm/models/getusagebymeterrequest.js.map +1 -1
  312. package/esm/models/getusagerequest.d.ts +2 -0
  313. package/esm/models/getusagerequest.d.ts.map +1 -1
  314. package/esm/models/getusagerequest.js +3 -1
  315. package/esm/models/getusagerequest.js.map +1 -1
  316. package/esm/models/groupedinvoicingchildrequest.d.ts +37 -0
  317. package/esm/models/groupedinvoicingchildrequest.d.ts.map +1 -0
  318. package/esm/models/groupedinvoicingchildrequest.js +40 -0
  319. package/esm/models/groupedinvoicingchildrequest.js.map +1 -0
  320. package/esm/models/integrationentitytype.d.ts +2 -0
  321. package/esm/models/integrationentitytype.d.ts.map +1 -1
  322. package/esm/models/integrationentitytype.js +2 -0
  323. package/esm/models/integrationentitytype.js.map +1 -1
  324. package/esm/models/invoicelineitemcoupon.d.ts +1 -0
  325. package/esm/models/invoicelineitemcoupon.d.ts.map +1 -1
  326. package/esm/models/invoicelineitemcoupon.js +1 -0
  327. package/esm/models/invoicelineitemcoupon.js.map +1 -1
  328. package/esm/models/invoicelineitemresponse.d.ts +1 -0
  329. package/esm/models/invoicelineitemresponse.d.ts.map +1 -1
  330. package/esm/models/invoicelineitemresponse.js +1 -0
  331. package/esm/models/invoicelineitemresponse.js.map +1 -1
  332. package/esm/models/invoiceresponse.d.ts +1 -0
  333. package/esm/models/invoiceresponse.d.ts.map +1 -1
  334. package/esm/models/invoiceresponse.js +1 -0
  335. package/esm/models/invoiceresponse.js.map +1 -1
  336. package/esm/models/lineitemcommitmentconfig.d.ts.map +1 -1
  337. package/esm/models/lineitemcommitmentconfig.js +6 -6
  338. package/esm/models/lineitemcommitmentconfig.js.map +1 -1
  339. package/esm/models/lineitemquantitychange.d.ts +1 -1
  340. package/esm/models/lineitemquantitychange.d.ts.map +1 -1
  341. package/esm/models/lineitemquantitychange.js +1 -1
  342. package/esm/models/lineitemquantitychange.js.map +1 -1
  343. package/esm/models/modifysubscriptionlineitem.d.ts +8 -0
  344. package/esm/models/modifysubscriptionlineitem.d.ts.map +1 -0
  345. package/esm/models/modifysubscriptionlineitem.js +10 -0
  346. package/esm/models/modifysubscriptionlineitem.js.map +1 -0
  347. package/esm/models/modifysubscriptionparams.d.ts +8 -0
  348. package/esm/models/modifysubscriptionparams.d.ts.map +1 -0
  349. package/esm/models/modifysubscriptionparams.js +11 -0
  350. package/esm/models/modifysubscriptionparams.js.map +1 -0
  351. package/esm/models/overrideentitlementrequest.d.ts +3 -0
  352. package/esm/models/overrideentitlementrequest.d.ts.map +1 -1
  353. package/esm/models/overrideentitlementrequest.js +1 -0
  354. package/esm/models/overrideentitlementrequest.js.map +1 -1
  355. package/esm/models/pausestatus.d.ts +2 -2
  356. package/esm/models/paymentaction.d.ts +8 -0
  357. package/esm/models/paymentaction.d.ts.map +1 -0
  358. package/esm/models/paymentaction.js +10 -0
  359. package/esm/models/paymentaction.js.map +1 -0
  360. package/esm/models/paymentactiontype.d.ts +12 -0
  361. package/esm/models/paymentactiontype.d.ts.map +1 -0
  362. package/esm/models/paymentactiontype.js +13 -0
  363. package/esm/models/paymentactiontype.js.map +1 -0
  364. package/esm/models/paymentmethodtype.d.ts +20 -0
  365. package/esm/models/paymentmethodtype.d.ts.map +1 -0
  366. package/esm/models/paymentmethodtype.js +21 -0
  367. package/esm/models/paymentmethodtype.js.map +1 -0
  368. package/esm/models/paymentstatus.d.ts +2 -0
  369. package/esm/models/paymentstatus.d.ts.map +1 -1
  370. package/esm/models/paymentstatus.js +2 -0
  371. package/esm/models/paymentstatus.js.map +1 -1
  372. package/esm/models/pointbucket.d.ts +7 -0
  373. package/esm/models/pointbucket.d.ts.map +1 -0
  374. package/esm/models/pointbucket.js +9 -0
  375. package/esm/models/pointbucket.js.map +1 -0
  376. package/esm/models/previewsubscriptionplanchangev2op.d.ts +12 -0
  377. package/esm/models/previewsubscriptionplanchangev2op.d.ts.map +1 -0
  378. package/esm/models/previewsubscriptionplanchangev2op.js +16 -0
  379. package/esm/models/previewsubscriptionplanchangev2op.js.map +1 -0
  380. package/esm/models/removeaddonrequest.js +1 -1
  381. package/esm/models/removeaddonrequest.js.map +1 -1
  382. package/esm/models/schedulestatus.d.ts +1 -1
  383. package/esm/models/submodifyaddonparams.d.ts +11 -0
  384. package/esm/models/submodifyaddonparams.d.ts.map +1 -0
  385. package/esm/models/submodifyaddonparams.js +14 -0
  386. package/esm/models/submodifyaddonparams.js.map +1 -0
  387. package/esm/models/submodifycouponparams.d.ts +1 -1
  388. package/esm/models/submodifycouponparams.d.ts.map +1 -1
  389. package/esm/models/submodifycouponparams.js +1 -1
  390. package/esm/models/submodifycouponparams.js.map +1 -1
  391. package/esm/models/submodifytaxparams.d.ts +1 -1
  392. package/esm/models/submodifytaxparams.d.ts.map +1 -1
  393. package/esm/models/submodifytaxparams.js +1 -1
  394. package/esm/models/submodifytaxparams.js.map +1 -1
  395. package/esm/models/subscriptionchangeentitypolicies.d.ts +7 -0
  396. package/esm/models/subscriptionchangeentitypolicies.d.ts.map +1 -0
  397. package/esm/models/subscriptionchangeentitypolicies.js +9 -0
  398. package/esm/models/subscriptionchangeentitypolicies.js.map +1 -0
  399. package/esm/models/subscriptionchangev2request.d.ts +14 -0
  400. package/esm/models/subscriptionchangev2request.d.ts.map +1 -0
  401. package/esm/models/subscriptionchangev2request.js +14 -0
  402. package/esm/models/subscriptionchangev2request.js.map +1 -0
  403. package/esm/models/subscriptionchangev2response.d.ts +21 -0
  404. package/esm/models/subscriptionchangev2response.d.ts.map +1 -0
  405. package/esm/models/subscriptionchangev2response.js +21 -0
  406. package/esm/models/subscriptionchangev2response.js.map +1 -0
  407. package/esm/models/subscriptioncouponinput.d.ts.map +1 -1
  408. package/esm/models/subscriptioncouponinput.js +4 -4
  409. package/esm/models/subscriptioncouponinput.js.map +1 -1
  410. package/esm/models/subscriptionfilter.d.ts +1 -0
  411. package/esm/models/subscriptionfilter.d.ts.map +1 -1
  412. package/esm/models/subscriptionfilter.js +2 -1
  413. package/esm/models/subscriptionfilter.js.map +1 -1
  414. package/esm/models/subscriptioninheritanceconfig.d.ts +2 -0
  415. package/esm/models/subscriptioninheritanceconfig.d.ts.map +1 -1
  416. package/esm/models/subscriptioninheritanceconfig.js +6 -4
  417. package/esm/models/subscriptioninheritanceconfig.js.map +1 -1
  418. package/esm/models/subscriptionlineitemfilter.d.ts +1 -0
  419. package/esm/models/subscriptionlineitemfilter.d.ts.map +1 -1
  420. package/esm/models/subscriptionlineitemfilter.js +2 -1
  421. package/esm/models/subscriptionlineitemfilter.js.map +1 -1
  422. package/esm/models/subscriptionlineitemresponse.d.ts +2 -0
  423. package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
  424. package/esm/models/subscriptionlineitemresponse.js +2 -0
  425. package/esm/models/subscriptionlineitemresponse.js.map +1 -1
  426. package/esm/models/subscriptionmodificationaction.d.ts +12 -0
  427. package/esm/models/subscriptionmodificationaction.d.ts.map +1 -0
  428. package/esm/models/subscriptionmodificationaction.js +13 -0
  429. package/esm/models/subscriptionmodificationaction.js.map +1 -0
  430. package/esm/models/subscriptionmodifyresponse.d.ts +2 -0
  431. package/esm/models/subscriptionmodifyresponse.d.ts.map +1 -1
  432. package/esm/models/subscriptionmodifyresponse.js +2 -0
  433. package/esm/models/subscriptionmodifyresponse.js.map +1 -1
  434. package/esm/models/subscriptionmodifytype.d.ts +2 -0
  435. package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
  436. package/esm/models/subscriptionmodifytype.js +2 -0
  437. package/esm/models/subscriptionmodifytype.js.map +1 -1
  438. package/esm/models/subscriptionphasecreaterequest.js +2 -2
  439. package/esm/models/subscriptionphasecreaterequest.js.map +1 -1
  440. package/esm/models/subscriptionresponse.d.ts +5 -1
  441. package/esm/models/subscriptionresponse.d.ts.map +1 -1
  442. package/esm/models/subscriptionresponse.js +5 -1
  443. package/esm/models/subscriptionresponse.js.map +1 -1
  444. package/esm/models/subscriptionresponsev2.d.ts +1 -1
  445. package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
  446. package/esm/models/subscriptionresponsev2.js +1 -1
  447. package/esm/models/subscriptionresponsev2.js.map +1 -1
  448. package/esm/models/subscriptionstatus.d.ts +1 -1
  449. package/esm/models/subscriptionsubscriptionlineitem.d.ts +2 -0
  450. package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
  451. package/esm/models/subscriptionsubscriptionlineitem.js +2 -0
  452. package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
  453. package/esm/models/transactionreason.d.ts +2 -0
  454. package/esm/models/transactionreason.d.ts.map +1 -1
  455. package/esm/models/transactionreason.js +2 -0
  456. package/esm/models/transactionreason.js.map +1 -1
  457. package/esm/models/transactionstatus.d.ts +1 -1
  458. package/esm/models/updatecustomerrequest.d.ts +2 -0
  459. package/esm/models/updatecustomerrequest.d.ts.map +1 -1
  460. package/esm/models/updatecustomerrequest.js +2 -0
  461. package/esm/models/updatecustomerrequest.js.map +1 -1
  462. package/esm/models/updateinvoicerequest.d.ts +1 -0
  463. package/esm/models/updateinvoicerequest.d.ts.map +1 -1
  464. package/esm/models/updateinvoicerequest.js +1 -0
  465. package/esm/models/updateinvoicerequest.js.map +1 -1
  466. package/esm/models/usageanalyticitem.d.ts +2 -0
  467. package/esm/models/usageanalyticitem.d.ts.map +1 -1
  468. package/esm/models/usageanalyticitem.js +3 -1
  469. package/esm/models/usageanalyticitem.js.map +1 -1
  470. package/esm/models/usageanalyticpoint.d.ts +4 -2
  471. package/esm/models/usageanalyticpoint.d.ts.map +1 -1
  472. package/esm/models/usageanalyticpoint.js +5 -3
  473. package/esm/models/usageanalyticpoint.js.map +1 -1
  474. package/esm/models/walletresponse.d.ts +2 -0
  475. package/esm/models/walletresponse.d.ts.map +1 -1
  476. package/esm/models/walletresponse.js +2 -0
  477. package/esm/models/walletresponse.js.map +1 -1
  478. package/esm/models/wallettopupparams.d.ts +7 -0
  479. package/esm/models/wallettopupparams.d.ts.map +1 -0
  480. package/esm/models/wallettopupparams.js +10 -0
  481. package/esm/models/wallettopupparams.js.map +1 -0
  482. package/esm/models/wallettransactionresponse.d.ts +1 -0
  483. package/esm/models/wallettransactionresponse.d.ts.map +1 -1
  484. package/esm/models/wallettransactionresponse.js +1 -0
  485. package/esm/models/wallettransactionresponse.js.map +1 -1
  486. package/esm/tool-names.d.ts.map +1 -1
  487. package/esm/tool-names.js +26 -10
  488. package/esm/tool-names.js.map +1 -1
  489. package/esm/tsconfig.tsbuildinfo +1 -1
  490. package/manifest.json +27 -11
  491. package/package.json +9 -2
  492. package/src/funcs/customersGetCustomerEntitlementsByExternalID.ts +153 -0
  493. package/src/funcs/customersGetSubscriptionsForCustomer.ts +156 -0
  494. package/src/funcs/eventsGetEvent.ts +7 -12
  495. package/src/funcs/eventsGetHuggingfaceInferenceData.ts +22 -1
  496. package/src/funcs/invoicesGetInvoice.ts +1 -0
  497. package/src/funcs/invoicesUpdateInvoice.ts +1 -1
  498. package/src/funcs/subscriptionsAddSubscriptionAddon.ts +3 -0
  499. package/src/funcs/subscriptionsExecuteSubscriptionModify.ts +1 -1
  500. package/src/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.ts +153 -0
  501. package/src/funcs/subscriptionsPreviewSubscriptionModify.ts +1 -1
  502. package/src/funcs/subscriptionsPreviewSubscriptionPlanChangeV2.ts +153 -0
  503. package/src/funcs/subscriptionsRemoveSubscriptionAddon.ts +3 -0
  504. package/src/lib/config.ts +3 -3
  505. package/src/lib/http.ts +3 -1
  506. package/src/lib/retries.ts +8 -0
  507. package/src/lib/security.ts +10 -5
  508. package/src/mcp-server/mcp-server.ts +1 -1
  509. package/src/mcp-server/server.ts +10 -2
  510. package/src/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.ts +45 -0
  511. package/src/mcp-server/tools/customersGetSubscriptionsForCustomer.ts +45 -0
  512. package/src/mcp-server/tools/eventsGetEvent.ts +1 -1
  513. package/src/mcp-server/tools/eventsGetHuggingfaceInferenceData.ts +12 -3
  514. package/src/mcp-server/tools/invoicesUpdateInvoice.ts +1 -1
  515. package/src/mcp-server/tools/subscriptionsAddSubscriptionAddon.ts +1 -0
  516. package/src/mcp-server/tools/subscriptionsExecuteSubscriptionModify.ts +1 -1
  517. package/src/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.ts +45 -0
  518. package/src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts +1 -1
  519. package/src/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.ts +45 -0
  520. package/src/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.ts +1 -0
  521. package/src/mcp-server/tools.ts +2 -0
  522. package/src/models/addaddonparams.ts +16 -0
  523. package/src/models/addaddonref.ts +26 -0
  524. package/src/models/addaddonrequest.ts +12 -0
  525. package/src/models/addaddontosubscriptionrequest.ts +9 -0
  526. package/src/models/addaddontosubscriptionresponse.ts +65 -0
  527. package/src/models/addonresponse.ts +6 -0
  528. package/src/models/addsubscriptionaddonop.ts +5 -5
  529. package/src/models/aggregatedentitlement.ts +21 -3
  530. package/src/models/aggregatedentitlementbucket.ts +35 -0
  531. package/src/models/alertthreshold.ts +2 -2
  532. package/src/models/autotopup.ts +14 -0
  533. package/src/models/checkoutaction.ts +21 -0
  534. package/src/models/checkoutjsonbcheckoutconfiguration.ts +34 -0
  535. package/src/models/checkoutjsonbcheckoutpaymentproviderconfig.ts +27 -0
  536. package/src/models/checkoutjsonbcheckoutproviderresult.ts +32 -0
  537. package/src/models/checkoutjsonbcheckoutresult.ts +19 -0
  538. package/src/models/checkoutparams.ts +33 -0
  539. package/src/models/checkoutpaymentprovider.ts +17 -0
  540. package/src/models/checkoutpaymentproviderconfig.ts +27 -0
  541. package/src/models/checkoutsessionresponse.ts +106 -0
  542. package/src/models/checkoutstatus.ts +23 -0
  543. package/src/models/couponassociationresponse.ts +9 -3
  544. package/src/models/{coupon.ts → couponresponse.ts} +2 -2
  545. package/src/models/createcreditgrantrequest.ts +2 -0
  546. package/src/models/createcustomerrequest.ts +14 -2
  547. package/src/models/createinvoicerequest.ts +4 -0
  548. package/src/models/createsubscriptionparams.ts +30 -0
  549. package/src/models/createsubscriptionrequest.ts +21 -39
  550. package/src/models/createsubscriptionresult.ts +19 -0
  551. package/src/models/creditgrantresponse.ts +2 -0
  552. package/src/models/creditgrantscope.ts +2 -0
  553. package/src/models/customer.ts +8 -0
  554. package/src/models/customerentitlementsresponse.ts +6 -0
  555. package/src/models/customerresponse.ts +8 -0
  556. package/src/models/durationunit.ts +21 -0
  557. package/src/models/entitlementaggregationmode.ts +19 -0
  558. package/src/models/entitlementgrantdurationunit.ts +21 -0
  559. package/src/models/entitlementgrantmeasure.ts +19 -0
  560. package/src/models/entitlementresponse.ts +24 -0
  561. package/src/models/entitlementsource.ts +2 -0
  562. package/src/models/entitychangebehaviour.ts +17 -0
  563. package/src/models/entitychangepolicy.ts +23 -0
  564. package/src/models/entitychangeresult.ts +28 -0
  565. package/src/models/errorcode.ts +2 -0
  566. package/src/models/executesubscriptionmodifyrequest.ts +9 -0
  567. package/src/models/executesubscriptionplanchangev2op.ts +37 -0
  568. package/src/models/featuretype.ts +2 -0
  569. package/src/models/filteroperatortype.ts +2 -0
  570. package/src/models/getcustomerentitlementsbyexternalidop.ts +31 -0
  571. package/src/models/gethuggingfacebillingdatarequest.ts +13 -0
  572. package/src/models/getinvoiceop.ts +4 -0
  573. package/src/models/getsubscriptionsforcustomerop.ts +35 -0
  574. package/src/models/getusageanalyticsresponse.ts +7 -1
  575. package/src/models/getusagebymeterrequest.ts +2 -0
  576. package/src/models/getusagerequest.ts +7 -1
  577. package/src/models/groupedinvoicingchildrequest.ts +104 -0
  578. package/src/models/integrationentitytype.ts +2 -0
  579. package/src/models/invoicelineitemcoupon.ts +2 -0
  580. package/src/models/invoicelineitemresponse.ts +4 -0
  581. package/src/models/invoiceresponse.ts +4 -0
  582. package/src/models/lineitemcommitmentconfig.ts +6 -10
  583. package/src/models/lineitemquantitychange.ts +2 -2
  584. package/src/models/modifysubscriptionlineitem.ts +19 -0
  585. package/src/models/modifysubscriptionparams.ts +22 -0
  586. package/src/models/overrideentitlementrequest.ts +4 -0
  587. package/src/models/paymentaction.ts +19 -0
  588. package/src/models/paymentactiontype.ts +17 -0
  589. package/src/models/paymentmethodtype.ts +25 -0
  590. package/src/models/paymentstatus.ts +2 -0
  591. package/src/models/pointbucket.ts +15 -0
  592. package/src/models/previewsubscriptionplanchangev2op.ts +37 -0
  593. package/src/models/removeaddonrequest.ts +1 -1
  594. package/src/models/submodifyaddonparams.ts +30 -0
  595. package/src/models/submodifycouponparams.ts +2 -2
  596. package/src/models/submodifytaxparams.ts +4 -4
  597. package/src/models/subscriptionchangeentitypolicies.ts +19 -0
  598. package/src/models/subscriptionchangev2request.ts +31 -0
  599. package/src/models/subscriptionchangev2response.ts +48 -0
  600. package/src/models/subscriptioncouponinput.ts +4 -12
  601. package/src/models/subscriptionfilter.ts +5 -1
  602. package/src/models/subscriptioninheritanceconfig.ts +14 -4
  603. package/src/models/subscriptionlineitemfilter.ts +5 -1
  604. package/src/models/subscriptionlineitemresponse.ts +3 -0
  605. package/src/models/subscriptionmodificationaction.ts +19 -0
  606. package/src/models/subscriptionmodifyresponse.ts +6 -0
  607. package/src/models/subscriptionmodifytype.ts +2 -0
  608. package/src/models/subscriptionphasecreaterequest.ts +2 -2
  609. package/src/models/subscriptionresponse.ts +16 -2
  610. package/src/models/subscriptionresponsev2.ts +2 -2
  611. package/src/models/subscriptionsubscriptionlineitem.ts +3 -0
  612. package/src/models/transactionreason.ts +2 -0
  613. package/src/models/updatecustomerrequest.ts +8 -0
  614. package/src/models/updateinvoicerequest.ts +4 -0
  615. package/src/models/usageanalyticitem.ts +7 -1
  616. package/src/models/usageanalyticpoint.ts +11 -6
  617. package/src/models/walletresponse.ts +4 -0
  618. package/src/models/wallettopupparams.ts +16 -0
  619. package/src/models/wallettransactionresponse.ts +4 -0
  620. package/src/tool-names.ts +26 -10
  621. package/esm/models/coupon.d.ts.map +0 -1
  622. package/esm/models/coupon.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ export const CheckoutPaymentProvider = {
9
+ Razorpay: "razorpay",
10
+ } as const;
11
+ export type CheckoutPaymentProvider = ClosedEnum<
12
+ typeof CheckoutPaymentProvider
13
+ >;
14
+
15
+ export const CheckoutPaymentProvider$zodSchema = z.enum([
16
+ "razorpay",
17
+ ]);
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ CollectionMethod,
8
+ CollectionMethod$zodSchema,
9
+ } from "./collectionmethod.js";
10
+ import {
11
+ PaymentMethodType,
12
+ PaymentMethodType$zodSchema,
13
+ } from "./paymentmethodtype.js";
14
+
15
+ export type CheckoutPaymentProviderConfig = {
16
+ collection_method?: CollectionMethod | undefined;
17
+ max_mandate_limit?: string | undefined;
18
+ payment_method?: PaymentMethodType | undefined;
19
+ };
20
+
21
+ export const CheckoutPaymentProviderConfig$zodSchema: z.ZodType<
22
+ CheckoutPaymentProviderConfig
23
+ > = z.object({
24
+ collection_method: CollectionMethod$zodSchema.optional(),
25
+ max_mandate_limit: z.string().optional(),
26
+ payment_method: PaymentMethodType$zodSchema.optional(),
27
+ });
@@ -0,0 +1,106 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { CheckoutAction, CheckoutAction$zodSchema } from "./checkoutaction.js";
7
+ import {
8
+ CheckoutJSONBCheckoutConfiguration,
9
+ CheckoutJSONBCheckoutConfiguration$zodSchema,
10
+ } from "./checkoutjsonbcheckoutconfiguration.js";
11
+ import {
12
+ CheckoutJSONBCheckoutPaymentProviderConfig,
13
+ CheckoutJSONBCheckoutPaymentProviderConfig$zodSchema,
14
+ } from "./checkoutjsonbcheckoutpaymentproviderconfig.js";
15
+ import {
16
+ CheckoutJSONBCheckoutProviderResult,
17
+ CheckoutJSONBCheckoutProviderResult$zodSchema,
18
+ } from "./checkoutjsonbcheckoutproviderresult.js";
19
+ import {
20
+ CheckoutJSONBCheckoutResult,
21
+ CheckoutJSONBCheckoutResult$zodSchema,
22
+ } from "./checkoutjsonbcheckoutresult.js";
23
+ import {
24
+ CheckoutPaymentProvider,
25
+ CheckoutPaymentProvider$zodSchema,
26
+ } from "./checkoutpaymentprovider.js";
27
+ import { CheckoutStatus, CheckoutStatus$zodSchema } from "./checkoutstatus.js";
28
+ import { PaymentAction, PaymentAction$zodSchema } from "./paymentaction.js";
29
+ import { Status, Status$zodSchema } from "./status.js";
30
+
31
+ export type CheckoutSessionResponse = {
32
+ action?: CheckoutAction | undefined;
33
+ cancel_url?: string | undefined;
34
+ cancelled_at?: string | undefined;
35
+ checkout_invoice_id?: string | undefined;
36
+ checkout_payment_id?: string | undefined;
37
+ checkout_status?: CheckoutStatus | undefined;
38
+ completed_at?: string | undefined;
39
+ configuration?: CheckoutJSONBCheckoutConfiguration | undefined;
40
+ created_at?: string | undefined;
41
+ created_by?: string | undefined;
42
+ customer_id?: string | undefined;
43
+ environment_id?: string | undefined;
44
+ expires_at?: string | undefined;
45
+ failure_reason?: string | undefined;
46
+ failure_url?: string | undefined;
47
+ id?: string | undefined;
48
+ idempotency_key?: string | undefined;
49
+ metadata?: { [k: string]: string } | undefined;
50
+ payment_action?: PaymentAction | undefined;
51
+ payment_provider?: CheckoutPaymentProvider | undefined;
52
+ payment_provider_config?:
53
+ | CheckoutJSONBCheckoutPaymentProviderConfig
54
+ | undefined;
55
+ provider_result?: CheckoutJSONBCheckoutProviderResult | undefined;
56
+ result?: CheckoutJSONBCheckoutResult | undefined;
57
+ status?: Status | undefined;
58
+ success_url?: string | undefined;
59
+ tenant_id?: string | undefined;
60
+ updated_at?: string | undefined;
61
+ updated_by?: string | undefined;
62
+ };
63
+
64
+ export const CheckoutSessionResponse$zodSchema: z.ZodType<
65
+ CheckoutSessionResponse
66
+ > = z.object({
67
+ action: CheckoutAction$zodSchema.optional(),
68
+ cancel_url: z.string().optional(),
69
+ cancelled_at: z.iso.datetime({ offset: true }).optional(),
70
+ checkout_invoice_id: z.string().optional().describe(
71
+ "CheckoutInvoiceID and CheckoutPaymentID are set once the apply step\ncreates the corresponding Flexprice entities (completed sessions only).",
72
+ ),
73
+ checkout_payment_id: z.string().optional(),
74
+ checkout_status: CheckoutStatus$zodSchema.optional(),
75
+ completed_at: z.iso.datetime({ offset: true }).optional(),
76
+ configuration: CheckoutJSONBCheckoutConfiguration$zodSchema.optional(),
77
+ created_at: z.iso.datetime({ offset: true }).optional(),
78
+ created_by: z.string().optional(),
79
+ customer_id: z.string().optional(),
80
+ environment_id: z.string().optional(),
81
+ expires_at: z.iso.datetime({ offset: true }).optional().describe(
82
+ "ExpiresAt is required. A Temporal timer fires at this time for any\nsession still in initiated|pending, marking it expired. The caller\nmust create a new session after expiry (expire-and-restart model).",
83
+ ),
84
+ failure_reason: z.string().optional().describe(
85
+ "FailureReason is a human-readable string set on failed sessions.",
86
+ ),
87
+ failure_url: z.string().optional(),
88
+ id: z.string().optional(),
89
+ idempotency_key: z.string().optional().describe(
90
+ "IdempotencyKey is caller-supplied. It is unique only while the session\nis active (initiated|pending). The same key may be reused once the\nsession reaches a terminal state (completed|failed|expired).",
91
+ ),
92
+ metadata: z.record(z.string(), z.string()).optional(),
93
+ payment_action: PaymentAction$zodSchema.optional(),
94
+ payment_provider: CheckoutPaymentProvider$zodSchema.optional(),
95
+ payment_provider_config: CheckoutJSONBCheckoutPaymentProviderConfig$zodSchema
96
+ .optional(),
97
+ provider_result: CheckoutJSONBCheckoutProviderResult$zodSchema.optional(),
98
+ result: CheckoutJSONBCheckoutResult$zodSchema.optional(),
99
+ status: Status$zodSchema.optional(),
100
+ success_url: z.string().optional().describe(
101
+ "Redirect URLs sent to the payment provider. The provider redirects the\nuser browser to the appropriate URL after the payment flow completes.",
102
+ ),
103
+ tenant_id: z.string().optional(),
104
+ updated_at: z.iso.datetime({ offset: true }).optional(),
105
+ updated_by: z.string().optional(),
106
+ });
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ export const CheckoutStatus = {
9
+ Initiated: "initiated",
10
+ Pending: "pending",
11
+ Completed: "completed",
12
+ Failed: "failed",
13
+ Expired: "expired",
14
+ } as const;
15
+ export type CheckoutStatus = ClosedEnum<typeof CheckoutStatus>;
16
+
17
+ export const CheckoutStatus$zodSchema = z.enum([
18
+ "initiated",
19
+ "pending",
20
+ "completed",
21
+ "failed",
22
+ "expired",
23
+ ]);
@@ -3,11 +3,15 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import { Coupon, Coupon$zodSchema } from "./coupon.js";
6
+ import { CouponResponse, CouponResponse$zodSchema } from "./couponresponse.js";
7
7
  import { Status, Status$zodSchema } from "./status.js";
8
+ import {
9
+ SubscriptionLineItemResponse,
10
+ SubscriptionLineItemResponse$zodSchema,
11
+ } from "./subscriptionlineitemresponse.js";
8
12
 
9
13
  export type CouponAssociationResponse = {
10
- coupon?: Coupon | undefined;
14
+ coupon?: CouponResponse | undefined;
11
15
  coupon_id?: string | undefined;
12
16
  created_at?: string | undefined;
13
17
  created_by?: string | undefined;
@@ -18,6 +22,7 @@ export type CouponAssociationResponse = {
18
22
  start_date?: string | undefined;
19
23
  status?: Status | undefined;
20
24
  subscription_id?: string | undefined;
25
+ subscription_line_item?: SubscriptionLineItemResponse | undefined;
21
26
  subscription_line_item_id?: string | undefined;
22
27
  subscription_phase_id?: string | undefined;
23
28
  tenant_id?: string | undefined;
@@ -28,7 +33,7 @@ export type CouponAssociationResponse = {
28
33
  export const CouponAssociationResponse$zodSchema: z.ZodType<
29
34
  CouponAssociationResponse
30
35
  > = z.object({
31
- coupon: Coupon$zodSchema.optional(),
36
+ coupon: CouponResponse$zodSchema.optional(),
32
37
  coupon_id: z.string().optional(),
33
38
  created_at: z.iso.datetime({ offset: true }).optional(),
34
39
  created_by: z.string().optional(),
@@ -39,6 +44,7 @@ export const CouponAssociationResponse$zodSchema: z.ZodType<
39
44
  start_date: z.iso.datetime({ offset: true }).optional(),
40
45
  status: Status$zodSchema.optional(),
41
46
  subscription_id: z.string().optional().describe("Mandatory"),
47
+ subscription_line_item: SubscriptionLineItemResponse$zodSchema.optional(),
42
48
  subscription_line_item_id: z.string().optional().describe("Optional"),
43
49
  subscription_phase_id: z.string().optional().describe("Optional"),
44
50
  tenant_id: z.string().optional(),
@@ -7,7 +7,7 @@ import { CouponCadence, CouponCadence$zodSchema } from "./couponcadence.js";
7
7
  import { CouponType, CouponType$zodSchema } from "./coupontype.js";
8
8
  import { Status, Status$zodSchema } from "./status.js";
9
9
 
10
- export type Coupon = {
10
+ export type CouponResponse = {
11
11
  amount_off?: string | undefined;
12
12
  cadence?: CouponCadence | undefined;
13
13
  coupon_code?: string | undefined;
@@ -32,7 +32,7 @@ export type Coupon = {
32
32
  updated_by?: string | undefined;
33
33
  };
34
34
 
35
- export const Coupon$zodSchema: z.ZodType<Coupon> = z.object({
35
+ export const CouponResponse$zodSchema: z.ZodType<CouponResponse> = z.object({
36
36
  amount_off: z.string().optional(),
37
37
  cadence: CouponCadence$zodSchema.optional(),
38
38
  coupon_code: z.string().optional(),
@@ -25,6 +25,7 @@ import {
25
25
  } from "./creditgrantscope.js";
26
26
 
27
27
  export type CreateCreditGrantRequest = {
28
+ addon_id?: string | undefined;
28
29
  cadence: CreditGrantCadence;
29
30
  conversion_rate?: string | undefined;
30
31
  credits: string;
@@ -47,6 +48,7 @@ export type CreateCreditGrantRequest = {
47
48
  export const CreateCreditGrantRequest$zodSchema: z.ZodType<
48
49
  CreateCreditGrantRequest
49
50
  > = z.object({
51
+ addon_id: z.string().optional(),
50
52
  cadence: CreditGrantCadence$zodSchema,
51
53
  conversion_rate: z.string().optional().describe(
52
54
  "amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits",
@@ -22,15 +22,18 @@ export type CreateCustomerRequest = {
22
22
  address_line2?: string | undefined;
23
23
  address_postal_code?: string | undefined;
24
24
  address_state?: string | undefined;
25
+ contact?: string | undefined;
25
26
  email?: string | undefined;
26
27
  external_id: string;
27
28
  integration_entity_mapping?:
28
29
  | Array<CreateEntityIntegrationMappingRequest>
29
30
  | undefined;
30
31
  metadata?: { [k: string]: string } | undefined;
31
- name?: string | undefined;
32
+ name: string;
33
+ onboarding_workflow_name?: string | undefined;
32
34
  skip_onboarding_workflow?: boolean | undefined;
33
35
  tax_rate_overrides?: Array<TaxRateOverride> | undefined;
36
+ timezone?: string | undefined;
34
37
  };
35
38
 
36
39
  export const CreateCustomerRequest$zodSchema: z.ZodType<CreateCustomerRequest> =
@@ -53,6 +56,9 @@ export const CreateCustomerRequest$zodSchema: z.ZodType<CreateCustomerRequest> =
53
56
  address_state: z.string().optional().describe(
54
57
  "address_state is the state, province, or region name with maximum 100 characters",
55
58
  ),
59
+ contact: z.string().optional().describe(
60
+ "contact is an optional contact number for the customer (e.g. phone)",
61
+ ),
56
62
  email: z.string().optional().describe(
57
63
  "email is the customer's email address and must be a valid email format if provided",
58
64
  ),
@@ -67,13 +73,19 @@ export const CreateCustomerRequest$zodSchema: z.ZodType<CreateCustomerRequest> =
67
73
  metadata: z.record(z.string(), z.string()).optional().describe(
68
74
  "metadata contains additional key-value pairs for storing extra information",
69
75
  ),
70
- name: z.string().optional().describe(
76
+ name: z.string().describe(
71
77
  "name is the full name or company name of the customer",
72
78
  ),
79
+ onboarding_workflow_name: z.string().optional().describe(
80
+ "onboarding_workflow_name is given if a custom onboarding workflow is to be triggered for this customer",
81
+ ),
73
82
  skip_onboarding_workflow: z.boolean().optional().describe(
74
83
  "skip_onboarding_workflow when true, prevents the customer onboarding workflow from being triggered\nThis is used internally when a customer is created via a workflow to prevent infinite loops\nDefault: false",
75
84
  ),
76
85
  tax_rate_overrides: z.array(TaxRateOverride$zodSchema).optional().describe(
77
86
  "tax_rate_overrides contains tax rate configurations to be linked to this customer",
78
87
  ),
88
+ timezone: z.string().optional().describe(
89
+ "timezone is the customer's IANA timezone name (e.g. \"Asia/Kolkata\", \"America/New_York\")\nDefaults to \"UTC\" if not provided",
90
+ ),
79
91
  }).describe("Request object for creating a new customer in the system");
@@ -38,6 +38,7 @@ export type CreateInvoiceRequest = {
38
38
  customer_id: string;
39
39
  description?: string | undefined;
40
40
  due_date?: string | undefined;
41
+ force_sync_invoice?: boolean | undefined;
41
42
  idempotency_key?: string | undefined;
42
43
  invoice_coupons?: Array<InvoiceCoupon> | undefined;
43
44
  invoice_number?: string | undefined;
@@ -85,6 +86,9 @@ export const CreateInvoiceRequest$zodSchema: z.ZodType<CreateInvoiceRequest> = z
85
86
  due_date: z.iso.datetime({ offset: true }).optional().describe(
86
87
  "due_date is the date by which payment is expected",
87
88
  ),
89
+ force_sync_invoice: z.boolean().optional().describe(
90
+ "force_sync_invoice, when true, attempts to synchronously sync this invoice to\nMoyasar (if enabled) before returning, instead of relying solely on the async\nKafka + Temporal vendor-sync pipeline. Only honored by CreateOneOffInvoice.\nBest-effort: sync failures do not fail invoice creation.",
91
+ ),
88
92
  idempotency_key: z.string().optional().describe(
89
93
  "idempotency_key is an optional key used to prevent duplicate invoice creation",
90
94
  ),
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { BillingPeriod, BillingPeriod$zodSchema } from "./billingperiod.js";
7
+
8
+ export type CreateSubscriptionParams = {
9
+ billing_period?: BillingPeriod | undefined;
10
+ currency?: string | undefined;
11
+ end_date?: string | undefined;
12
+ lookup_key?: string | undefined;
13
+ metadata?: { [k: string]: string } | undefined;
14
+ plan_id?: string | undefined;
15
+ start_date?: string | undefined;
16
+ subscription_id?: string | undefined;
17
+ };
18
+
19
+ export const CreateSubscriptionParams$zodSchema: z.ZodType<
20
+ CreateSubscriptionParams
21
+ > = z.object({
22
+ billing_period: BillingPeriod$zodSchema.optional(),
23
+ currency: z.string().optional(),
24
+ end_date: z.iso.datetime({ offset: true }).optional(),
25
+ lookup_key: z.string().optional(),
26
+ metadata: z.record(z.string(), z.string()).optional(),
27
+ plan_id: z.string().optional(),
28
+ start_date: z.iso.datetime({ offset: true }).optional(),
29
+ subscription_id: z.string().optional(),
30
+ });
@@ -9,6 +9,7 @@ import {
9
9
  } from "./addaddontosubscriptionrequest.js";
10
10
  import { BillingCycle, BillingCycle$zodSchema } from "./billingcycle.js";
11
11
  import { BillingPeriod, BillingPeriod$zodSchema } from "./billingperiod.js";
12
+ import { CheckoutParams, CheckoutParams$zodSchema } from "./checkoutparams.js";
12
13
  import {
13
14
  CollectionMethod,
14
15
  CollectionMethod$zodSchema,
@@ -70,6 +71,7 @@ export type CreateSubscriptionRequest = {
70
71
  billing_cycle?: BillingCycle | undefined;
71
72
  billing_period: BillingPeriod;
72
73
  billing_period_count?: number | undefined;
74
+ checkout?: CheckoutParams | undefined;
73
75
  collection_method?: CollectionMethod | undefined;
74
76
  commitment_amount?: string | undefined;
75
77
  commitment_duration?: BillingPeriod | undefined;
@@ -77,7 +79,6 @@ export type CreateSubscriptionRequest = {
77
79
  credit_grants?: Array<CreateCreditGrantRequest> | undefined;
78
80
  currency: string;
79
81
  customer_id?: string | undefined;
80
- customer_timezone?: string | undefined;
81
82
  enable_true_up?: boolean | undefined;
82
83
  end_date?: string | undefined;
83
84
  external_customer_id?: string | undefined;
@@ -100,80 +101,62 @@ export type CreateSubscriptionRequest = {
100
101
  subscription_coupons?: Array<SubscriptionCouponInput> | undefined;
101
102
  subscription_status?: SubscriptionStatus | undefined;
102
103
  tax_rate_overrides?: Array<TaxRateOverride> | undefined;
104
+ timezone?: string | undefined;
103
105
  trial_period_days?: number | undefined;
104
106
  };
105
107
 
106
108
  export const CreateSubscriptionRequest$zodSchema: z.ZodType<
107
109
  CreateSubscriptionRequest
108
110
  > = z.object({
109
- addons: z.array(AddAddonToSubscriptionRequest$zodSchema).optional().describe(
110
- "Addons represents addons to be added to the subscription during creation",
111
- ),
111
+ addons: z.array(AddAddonToSubscriptionRequest$zodSchema).optional(),
112
112
  auto_invoice_threshold: z.string().optional().describe(
113
- "AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers\nan intermediate invoice mid-period. Set once at creation; cannot be changed later.\nAllowed only when the subscription resolves to type standalone (no parent hierarchy rows).\nPlan line items must be usage-based only (no fixed or other non-usage plan prices).\nNil means auto invoice threshold billing is disabled for this subscription.",
113
+ "AutoInvoiceThreshold triggers a mid-period invoice when usage (in subscription currency) exceeds this amount.\nStandalone subscriptions only; all plan prices must be usage-based. Immutable after creation.",
114
114
  ),
115
115
  billing_anchor: z.iso.datetime({ offset: true }).optional().describe(
116
- "BillingAnchor overrides the derived billing anchor when billing_cycle is anniversary.\nFor monthly billing, the day-of-month (and time-of-day) define cycle boundaries: if start_date\nis before that day in the month, the first billing period ends on the next occurrence of that\nday in the same month (a shorter first period); subsequent periods follow the usual interval.",
116
+ "BillingAnchor overrides the derived anchor for anniversary billing. For monthly billing,\nthe day-of-month defines cycle boundaries (shorter first period if start is before that day).",
117
117
  ),
118
118
  billing_cycle: BillingCycle$zodSchema.optional(),
119
119
  billing_period: BillingPeriod$zodSchema,
120
120
  billing_period_count: z.int().optional(),
121
+ checkout: CheckoutParams$zodSchema.optional(),
121
122
  collection_method: CollectionMethod$zodSchema.optional(),
122
- commitment_amount: z.string().optional().describe(
123
- "CommitmentAmount is the minimum amount a customer commits to paying for a billing period",
124
- ),
123
+ commitment_amount: z.string().optional(),
125
124
  commitment_duration: BillingPeriod$zodSchema.optional(),
126
125
  coupons: z.array(z.string()).optional().describe(
127
126
  "Deprecated: use SubscriptionCoupons instead.",
128
127
  ),
129
- credit_grants: z.array(CreateCreditGrantRequest$zodSchema).optional()
130
- .describe("Credit grants to be applied when subscription is created"),
128
+ credit_grants: z.array(CreateCreditGrantRequest$zodSchema).optional(),
131
129
  currency: z.string(),
132
130
  customer_id: z.string().optional().describe(
133
- "customer_id is the flexprice customer id\nand it is prioritized over external_customer_id in case both are provided.",
134
- ),
135
- customer_timezone: z.string().optional().describe(
136
- "Timezone of the customer.\nIf not set, the default value is UTC.",
137
- ),
138
- enable_true_up: z.boolean().optional().describe(
139
- "Enable Commitment True Up Fee",
131
+ "CustomerID takes priority over ExternalCustomerID when both are provided.",
140
132
  ),
133
+ enable_true_up: z.boolean().optional(),
141
134
  end_date: z.iso.datetime({ offset: true }).optional(),
142
- external_customer_id: z.string().optional().describe(
143
- "external_customer_id is the customer id in your DB\nand must be same as what you provided as external_id while creating the customer in flexprice.",
144
- ),
135
+ external_customer_id: z.string().optional(),
145
136
  gateway_payment_method_id: z.string().optional(),
146
137
  inheritance: SubscriptionInheritanceConfig$zodSchema.optional(),
147
138
  line_item_commitments: z.record(
148
139
  z.string(),
149
140
  LineItemCommitmentConfig$zodSchema,
150
141
  ).optional().describe(
151
- "LineItemCommitments allows setting commitment configuration per line item (keyed by price_id)",
142
+ "LineItemCommitments sets per-line-item commitment config, keyed by price_id.",
152
143
  ),
153
144
  line_item_coupons: z.record(z.string(), z.array(z.string())).optional()
154
145
  .describe("Deprecated: use SubscriptionCoupons instead."),
155
146
  line_items: z.array(CreateSubscriptionLineItemRequest$zodSchema).optional()
156
- .describe(
157
- "LineItems are extra line items to add at creation (each with price_id or price), in addition to plan prices",
158
- ),
147
+ .describe("LineItems are extra (non-plan) line items added at creation."),
159
148
  lookup_key: z.string().optional(),
160
149
  metadata: z.record(z.string(), z.string()).optional(),
161
- overage_factor: z.string().optional().describe(
162
- "OverageFactor is a multiplier applied to usage beyond the commitment amount",
163
- ),
150
+ overage_factor: z.string().optional(),
164
151
  override_entitlements: z.array(OverrideEntitlementRequest$zodSchema)
165
- .optional().describe(
166
- "OverrideEntitlements allows customizing specific entitlements for this subscription",
167
- ),
152
+ .optional(),
168
153
  override_line_items: z.array(OverrideLineItemRequest$zodSchema).optional()
169
154
  .describe(
170
- "OverrideLineItems allows customizing specific prices for this subscription",
155
+ "OverrideLineItems overrides specific plan prices for this subscription.",
171
156
  ),
172
157
  payment_behavior: PaymentBehavior$zodSchema.optional(),
173
158
  payment_terms: PaymentTerms$zodSchema.optional(),
174
- phases: z.array(SubscriptionPhaseCreateRequest$zodSchema).optional().describe(
175
- "Phases represents subscription phases to be created with the subscription",
176
- ),
159
+ phases: z.array(SubscriptionPhaseCreateRequest$zodSchema).optional(),
177
160
  plan_id: z.string(),
178
161
  proration_behavior: ProrationBehavior$zodSchema.optional(),
179
162
  start_date: z.iso.datetime({ offset: true }).optional(),
@@ -182,10 +165,9 @@ export const CreateSubscriptionRequest$zodSchema: z.ZodType<
182
165
  "SubscriptionCoupons is the preferred way to attach coupons at creation.\nAccepts coupon_code; optionally targets a line item via price_id.",
183
166
  ),
184
167
  subscription_status: SubscriptionStatus$zodSchema.optional(),
185
- tax_rate_overrides: z.array(TaxRateOverride$zodSchema).optional().describe(
186
- "tax_rate_overrides is the tax rate overrides\tto be applied to the subscription",
187
- ),
168
+ tax_rate_overrides: z.array(TaxRateOverride$zodSchema).optional(),
169
+ timezone: z.string().optional(),
188
170
  trial_period_days: z.int().optional().describe(
189
- "TrialPeriodDays: nil = inherit trial length from plan recurring-fixed prices (must be uniform).\n0 = explicitly no trial (overrides catalog). >0 = override duration in days.",
171
+ "TrialPeriodDays: nil = inherit from plan prices, 0 = no trial, >0 = override in days.",
190
172
  ),
191
173
  });
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type CreateSubscriptionResult = {
8
+ invoice_id?: string | undefined;
9
+ payment_id?: string | undefined;
10
+ subscription_id?: string | undefined;
11
+ };
12
+
13
+ export const CreateSubscriptionResult$zodSchema: z.ZodType<
14
+ CreateSubscriptionResult
15
+ > = z.object({
16
+ invoice_id: z.string().optional(),
17
+ payment_id: z.string().optional(),
18
+ subscription_id: z.string().optional(),
19
+ });
@@ -26,6 +26,7 @@ import {
26
26
  import { Status, Status$zodSchema } from "./status.js";
27
27
 
28
28
  export type CreditGrantResponse = {
29
+ addon_id?: string | undefined;
29
30
  cadence?: CreditGrantCadence | undefined;
30
31
  conversion_rate?: string | undefined;
31
32
  created_at?: string | undefined;
@@ -56,6 +57,7 @@ export type CreditGrantResponse = {
56
57
 
57
58
  export const CreditGrantResponse$zodSchema: z.ZodType<CreditGrantResponse> = z
58
59
  .object({
60
+ addon_id: z.string().optional(),
59
61
  cadence: CreditGrantCadence$zodSchema.optional(),
60
62
  conversion_rate: z.string().optional().describe(
61
63
  "amount in the currency = number of credits * conversion_rate\nex if conversion_rate is 1, then 1 USD = 1 credit\nex if conversion_rate is 2, then 1 USD = 0.5 credits\nex if conversion_rate is 0.5, then 1 USD = 2 credits",
@@ -8,10 +8,12 @@ import { ClosedEnum } from "../types/enums.js";
8
8
  export const CreditGrantScope = {
9
9
  Plan: "PLAN",
10
10
  Subscription: "SUBSCRIPTION",
11
+ Addon: "ADDON",
11
12
  } as const;
12
13
  export type CreditGrantScope = ClosedEnum<typeof CreditGrantScope>;
13
14
 
14
15
  export const CreditGrantScope$zodSchema = z.enum([
15
16
  "PLAN",
16
17
  "SUBSCRIPTION",
18
+ "ADDON",
17
19
  ]);
@@ -12,6 +12,7 @@ export type Customer = {
12
12
  address_line2?: string | undefined;
13
13
  address_postal_code?: string | undefined;
14
14
  address_state?: string | undefined;
15
+ contact?: string | undefined;
15
16
  created_at?: string | undefined;
16
17
  created_by?: string | undefined;
17
18
  email?: string | undefined;
@@ -22,6 +23,7 @@ export type Customer = {
22
23
  name?: string | undefined;
23
24
  status?: Status | undefined;
24
25
  tenant_id?: string | undefined;
26
+ timezone?: string | undefined;
25
27
  updated_at?: string | undefined;
26
28
  updated_by?: string | undefined;
27
29
  };
@@ -45,6 +47,9 @@ export const Customer$zodSchema: z.ZodType<Customer> = z.object({
45
47
  address_state: z.string().optional().describe(
46
48
  "AddressState is the state of the customer's address",
47
49
  ),
50
+ contact: z.string().optional().describe(
51
+ "Contact is an optional contact number for the customer (e.g. phone)",
52
+ ),
48
53
  created_at: z.iso.datetime({ offset: true }).optional(),
49
54
  created_by: z.string().optional(),
50
55
  email: z.string().optional().describe("Email is the email of the customer"),
@@ -61,6 +66,9 @@ export const Customer$zodSchema: z.ZodType<Customer> = z.object({
61
66
  name: z.string().optional().describe("Name is the name of the customer"),
62
67
  status: Status$zodSchema.optional(),
63
68
  tenant_id: z.string().optional(),
69
+ timezone: z.string().optional().describe(
70
+ "Timezone is the customer's IANA timezone name (e.g. \"Asia/Kolkata\").\nDefaults to \"UTC\". Inherited by subscriptions at creation time.",
71
+ ),
64
72
  updated_at: z.iso.datetime({ offset: true }).optional(),
65
73
  updated_by: z.string().optional(),
66
74
  });
@@ -7,10 +7,15 @@ import {
7
7
  AggregatedFeature,
8
8
  AggregatedFeature$zodSchema,
9
9
  } from "./aggregatedfeature.js";
10
+ import {
11
+ SubscriptionResponse,
12
+ SubscriptionResponse$zodSchema,
13
+ } from "./subscriptionresponse.js";
10
14
 
11
15
  export type CustomerEntitlementsResponse = {
12
16
  customer_id?: string | undefined;
13
17
  features?: Array<AggregatedFeature> | undefined;
18
+ subscriptions?: Array<SubscriptionResponse> | undefined;
14
19
  };
15
20
 
16
21
  export const CustomerEntitlementsResponse$zodSchema: z.ZodType<
@@ -18,4 +23,5 @@ export const CustomerEntitlementsResponse$zodSchema: z.ZodType<
18
23
  > = z.object({
19
24
  customer_id: z.string().optional(),
20
25
  features: z.array(AggregatedFeature$zodSchema).optional(),
26
+ subscriptions: z.array(SubscriptionResponse$zodSchema).optional(),
21
27
  });
@@ -19,6 +19,7 @@ export type CustomerResponse = {
19
19
  address_line2?: string | undefined;
20
20
  address_postal_code?: string | undefined;
21
21
  address_state?: string | undefined;
22
+ contact?: string | undefined;
22
23
  created_at?: string | undefined;
23
24
  created_by?: string | undefined;
24
25
  email?: string | undefined;
@@ -30,6 +31,7 @@ export type CustomerResponse = {
30
31
  name?: string | undefined;
31
32
  status?: Status | undefined;
32
33
  tenant_id?: string | undefined;
34
+ timezone?: string | undefined;
33
35
  updated_at?: string | undefined;
34
36
  updated_by?: string | undefined;
35
37
  };
@@ -54,6 +56,9 @@ export const CustomerResponse$zodSchema: z.ZodType<CustomerResponse> = z.object(
54
56
  address_state: z.string().optional().describe(
55
57
  "AddressState is the state of the customer's address",
56
58
  ),
59
+ contact: z.string().optional().describe(
60
+ "Contact is an optional contact number for the customer (e.g. phone)",
61
+ ),
57
62
  created_at: z.iso.datetime({ offset: true }).optional(),
58
63
  created_by: z.string().optional(),
59
64
  email: z.string().optional().describe("Email is the email of the customer"),
@@ -72,6 +77,9 @@ export const CustomerResponse$zodSchema: z.ZodType<CustomerResponse> = z.object(
72
77
  name: z.string().optional().describe("Name is the name of the customer"),
73
78
  status: Status$zodSchema.optional(),
74
79
  tenant_id: z.string().optional(),
80
+ timezone: z.string().optional().describe(
81
+ "Timezone is the customer's IANA timezone name (e.g. \"Asia/Kolkata\").\nDefaults to \"UTC\". Inherited by subscriptions at creation time.",
82
+ ),
75
83
  updated_at: z.iso.datetime({ offset: true }).optional(),
76
84
  updated_by: z.string().optional(),
77
85
  },
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ export const DurationUnit = {
9
+ Second: "second",
10
+ Minute: "minute",
11
+ Hour: "hour",
12
+ Day: "day",
13
+ } as const;
14
+ export type DurationUnit = ClosedEnum<typeof DurationUnit>;
15
+
16
+ export const DurationUnit$zodSchema = z.enum([
17
+ "second",
18
+ "minute",
19
+ "hour",
20
+ "day",
21
+ ]);