@flexprice/mcp-server 2.1.20 → 2.1.25

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 (609) hide show
  1. package/bin/mcp-server.js +5454 -3805
  2. package/bin/mcp-server.js.map +188 -139
  3. package/bun.lock +46 -39
  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 +22 -0
  30. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts.map +1 -0
  31. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.js +94 -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/security.d.ts +5 -4
  50. package/esm/lib/security.d.ts.map +1 -1
  51. package/esm/lib/security.js +4 -5
  52. package/esm/lib/security.js.map +1 -1
  53. package/esm/mcp-server/mcp-server.js +1 -1
  54. package/esm/mcp-server/server.d.ts.map +1 -1
  55. package/esm/mcp-server/server.js +10 -2
  56. package/esm/mcp-server/server.js.map +1 -1
  57. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.d.ts +7 -0
  58. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.d.ts.map +1 -0
  59. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.js +35 -0
  60. package/esm/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.js.map +1 -0
  61. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.d.ts +7 -0
  62. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.d.ts.map +1 -0
  63. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.js +35 -0
  64. package/esm/mcp-server/tools/customersGetSubscriptionsForCustomer.js.map +1 -0
  65. package/esm/mcp-server/tools/eventsGetEvent.js +1 -1
  66. package/esm/mcp-server/tools/eventsGetEvent.js.map +1 -1
  67. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.d.ts +5 -1
  68. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.d.ts.map +1 -1
  69. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.js +8 -3
  70. package/esm/mcp-server/tools/eventsGetHuggingfaceInferenceData.js.map +1 -1
  71. package/esm/mcp-server/tools/invoicesUpdateInvoice.js +1 -1
  72. package/esm/mcp-server/tools/invoicesUpdateInvoice.js.map +1 -1
  73. package/esm/mcp-server/tools/subscriptionsAddSubscriptionAddon.d.ts.map +1 -1
  74. package/esm/mcp-server/tools/subscriptionsAddSubscriptionAddon.js +1 -0
  75. package/esm/mcp-server/tools/subscriptionsAddSubscriptionAddon.js.map +1 -1
  76. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js +1 -1
  77. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js.map +1 -1
  78. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts +7 -0
  79. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts.map +1 -0
  80. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.js +41 -0
  81. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.js.map +1 -0
  82. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js +1 -1
  83. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js.map +1 -1
  84. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.d.ts +7 -0
  85. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.d.ts.map +1 -0
  86. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.js +35 -0
  87. package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.js.map +1 -0
  88. package/esm/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.d.ts.map +1 -1
  89. package/esm/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.js +1 -0
  90. package/esm/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.js.map +1 -1
  91. package/esm/mcp-server/tools.d.ts.map +1 -1
  92. package/esm/mcp-server/tools.js +2 -0
  93. package/esm/mcp-server/tools.js.map +1 -1
  94. package/esm/models/addaddonparams.d.ts +8 -0
  95. package/esm/models/addaddonparams.d.ts.map +1 -0
  96. package/esm/models/addaddonparams.js +10 -0
  97. package/esm/models/addaddonparams.js.map +1 -0
  98. package/esm/models/addaddonref.d.ts +12 -0
  99. package/esm/models/addaddonref.d.ts.map +1 -0
  100. package/esm/models/addaddonref.js +14 -0
  101. package/esm/models/addaddonref.js.map +1 -0
  102. package/esm/models/addaddonrequest.d.ts +4 -0
  103. package/esm/models/addaddonrequest.d.ts.map +1 -1
  104. package/esm/models/addaddonrequest.js +5 -0
  105. package/esm/models/addaddonrequest.js.map +1 -1
  106. package/esm/models/addaddontosubscriptionrequest.d.ts +2 -0
  107. package/esm/models/addaddontosubscriptionrequest.d.ts.map +1 -1
  108. package/esm/models/addaddontosubscriptionrequest.js +3 -0
  109. package/esm/models/addaddontosubscriptionrequest.js.map +1 -1
  110. package/esm/models/addaddontosubscriptionresponse.d.ts +31 -0
  111. package/esm/models/addaddontosubscriptionresponse.d.ts.map +1 -0
  112. package/esm/models/addaddontosubscriptionresponse.js +31 -0
  113. package/esm/models/addaddontosubscriptionresponse.js.map +1 -0
  114. package/esm/models/addonresponse.d.ts +2 -0
  115. package/esm/models/addonresponse.d.ts.map +1 -1
  116. package/esm/models/addonresponse.js +2 -0
  117. package/esm/models/addonresponse.js.map +1 -1
  118. package/esm/models/addonstatus.d.ts +1 -1
  119. package/esm/models/addsubscriptionaddonop.d.ts +2 -2
  120. package/esm/models/addsubscriptionaddonop.d.ts.map +1 -1
  121. package/esm/models/addsubscriptionaddonop.js +2 -2
  122. package/esm/models/addsubscriptionaddonop.js.map +1 -1
  123. package/esm/models/aggregatedentitlement.d.ts +9 -0
  124. package/esm/models/aggregatedentitlement.d.ts.map +1 -1
  125. package/esm/models/aggregatedentitlement.js +7 -1
  126. package/esm/models/aggregatedentitlement.js.map +1 -1
  127. package/esm/models/aggregatedentitlementbucket.d.ts +14 -0
  128. package/esm/models/aggregatedentitlementbucket.d.ts.map +1 -0
  129. package/esm/models/aggregatedentitlementbucket.js +16 -0
  130. package/esm/models/aggregatedentitlementbucket.js.map +1 -0
  131. package/esm/models/alertthreshold.d.ts +1 -1
  132. package/esm/models/alertthreshold.js +1 -1
  133. package/esm/models/applicationstatus.d.ts +3 -3
  134. package/esm/models/autotopup.d.ts +7 -0
  135. package/esm/models/autotopup.d.ts.map +1 -1
  136. package/esm/models/autotopup.js +7 -0
  137. package/esm/models/autotopup.js.map +1 -1
  138. package/esm/models/checkoutaction.d.ts +16 -0
  139. package/esm/models/checkoutaction.d.ts.map +1 -0
  140. package/esm/models/checkoutaction.js +17 -0
  141. package/esm/models/checkoutaction.js.map +1 -0
  142. package/esm/models/checkoutjsonbcheckoutconfiguration.d.ts +13 -0
  143. package/esm/models/checkoutjsonbcheckoutconfiguration.d.ts.map +1 -0
  144. package/esm/models/checkoutjsonbcheckoutconfiguration.js +15 -0
  145. package/esm/models/checkoutjsonbcheckoutconfiguration.js.map +1 -0
  146. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.d.ts +10 -0
  147. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.d.ts.map +1 -0
  148. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.js +12 -0
  149. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.js.map +1 -0
  150. package/esm/models/checkoutjsonbcheckoutproviderresult.d.ts +13 -0
  151. package/esm/models/checkoutjsonbcheckoutproviderresult.d.ts.map +1 -0
  152. package/esm/models/checkoutjsonbcheckoutproviderresult.js +13 -0
  153. package/esm/models/checkoutjsonbcheckoutproviderresult.js.map +1 -0
  154. package/esm/models/checkoutjsonbcheckoutresult.d.ts +7 -0
  155. package/esm/models/checkoutjsonbcheckoutresult.d.ts.map +1 -0
  156. package/esm/models/checkoutjsonbcheckoutresult.js +9 -0
  157. package/esm/models/checkoutjsonbcheckoutresult.js.map +1 -0
  158. package/esm/models/checkoutparams.d.ts +16 -0
  159. package/esm/models/checkoutparams.d.ts.map +1 -0
  160. package/esm/models/checkoutparams.js +16 -0
  161. package/esm/models/checkoutparams.js.map +1 -0
  162. package/esm/models/checkoutpaymentprovider.d.ts +10 -0
  163. package/esm/models/checkoutpaymentprovider.d.ts.map +1 -0
  164. package/esm/models/checkoutpaymentprovider.js +11 -0
  165. package/esm/models/checkoutpaymentprovider.js.map +1 -0
  166. package/esm/models/checkoutpaymentproviderconfig.d.ts +10 -0
  167. package/esm/models/checkoutpaymentproviderconfig.d.ts.map +1 -0
  168. package/esm/models/checkoutpaymentproviderconfig.js +12 -0
  169. package/esm/models/checkoutpaymentproviderconfig.js.map +1 -0
  170. package/esm/models/checkoutsessionresponse.d.ts +44 -0
  171. package/esm/models/checkoutsessionresponse.d.ts.map +1 -0
  172. package/esm/models/checkoutsessionresponse.js +45 -0
  173. package/esm/models/checkoutsessionresponse.js.map +1 -0
  174. package/esm/models/checkoutstatus.d.ts +18 -0
  175. package/esm/models/checkoutstatus.d.ts.map +1 -0
  176. package/esm/models/checkoutstatus.js +19 -0
  177. package/esm/models/checkoutstatus.js.map +1 -0
  178. package/esm/models/couponassociationresponse.d.ts +4 -2
  179. package/esm/models/couponassociationresponse.d.ts.map +1 -1
  180. package/esm/models/couponassociationresponse.js +4 -2
  181. package/esm/models/couponassociationresponse.js.map +1 -1
  182. package/esm/models/{coupon.d.ts → couponresponse.d.ts} +3 -3
  183. package/esm/models/couponresponse.d.ts.map +1 -0
  184. package/esm/models/{coupon.js → couponresponse.js} +2 -2
  185. package/esm/models/couponresponse.js.map +1 -0
  186. package/esm/models/createcreditgrantrequest.d.ts +1 -0
  187. package/esm/models/createcreditgrantrequest.d.ts.map +1 -1
  188. package/esm/models/createcreditgrantrequest.js +1 -0
  189. package/esm/models/createcreditgrantrequest.js.map +1 -1
  190. package/esm/models/createcustomerrequest.d.ts +4 -1
  191. package/esm/models/createcustomerrequest.d.ts.map +1 -1
  192. package/esm/models/createcustomerrequest.js +4 -1
  193. package/esm/models/createcustomerrequest.js.map +1 -1
  194. package/esm/models/createinvoicerequest.d.ts +1 -0
  195. package/esm/models/createinvoicerequest.d.ts.map +1 -1
  196. package/esm/models/createinvoicerequest.js +1 -0
  197. package/esm/models/createinvoicerequest.js.map +1 -1
  198. package/esm/models/createsubscriptionparams.d.ts +16 -0
  199. package/esm/models/createsubscriptionparams.d.ts.map +1 -0
  200. package/esm/models/createsubscriptionparams.js +16 -0
  201. package/esm/models/createsubscriptionparams.js.map +1 -0
  202. package/esm/models/createsubscriptionrequest.d.ts +3 -1
  203. package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
  204. package/esm/models/createsubscriptionrequest.js +19 -18
  205. package/esm/models/createsubscriptionrequest.js.map +1 -1
  206. package/esm/models/createsubscriptionresult.d.ts +8 -0
  207. package/esm/models/createsubscriptionresult.d.ts.map +1 -0
  208. package/esm/models/createsubscriptionresult.js +10 -0
  209. package/esm/models/createsubscriptionresult.js.map +1 -0
  210. package/esm/models/creditgrantresponse.d.ts +1 -0
  211. package/esm/models/creditgrantresponse.d.ts.map +1 -1
  212. package/esm/models/creditgrantresponse.js +1 -0
  213. package/esm/models/creditgrantresponse.js.map +1 -1
  214. package/esm/models/creditgrantscope.d.ts +2 -0
  215. package/esm/models/creditgrantscope.d.ts.map +1 -1
  216. package/esm/models/creditgrantscope.js +2 -0
  217. package/esm/models/creditgrantscope.js.map +1 -1
  218. package/esm/models/customer.d.ts +2 -0
  219. package/esm/models/customer.d.ts.map +1 -1
  220. package/esm/models/customer.js +2 -0
  221. package/esm/models/customer.js.map +1 -1
  222. package/esm/models/customerentitlementsresponse.d.ts +2 -0
  223. package/esm/models/customerentitlementsresponse.d.ts.map +1 -1
  224. package/esm/models/customerentitlementsresponse.js +2 -0
  225. package/esm/models/customerentitlementsresponse.js.map +1 -1
  226. package/esm/models/customerresponse.d.ts +2 -0
  227. package/esm/models/customerresponse.d.ts.map +1 -1
  228. package/esm/models/customerresponse.js +2 -0
  229. package/esm/models/customerresponse.js.map +1 -1
  230. package/esm/models/durationunit.d.ts +16 -0
  231. package/esm/models/durationunit.d.ts.map +1 -0
  232. package/esm/models/durationunit.js +17 -0
  233. package/esm/models/durationunit.js.map +1 -0
  234. package/esm/models/entitlementaggregationmode.d.ts +12 -0
  235. package/esm/models/entitlementaggregationmode.d.ts.map +1 -0
  236. package/esm/models/entitlementaggregationmode.js +13 -0
  237. package/esm/models/entitlementaggregationmode.js.map +1 -0
  238. package/esm/models/entitlementgrantallocationbehavior.d.ts +12 -0
  239. package/esm/models/entitlementgrantallocationbehavior.d.ts.map +1 -0
  240. package/esm/models/entitlementgrantallocationbehavior.js +13 -0
  241. package/esm/models/entitlementgrantallocationbehavior.js.map +1 -0
  242. package/esm/models/entitlementgrantdurationunit.d.ts +16 -0
  243. package/esm/models/entitlementgrantdurationunit.d.ts.map +1 -0
  244. package/esm/models/entitlementgrantdurationunit.js +17 -0
  245. package/esm/models/entitlementgrantdurationunit.js.map +1 -0
  246. package/esm/models/entitlementgrantmeasure.d.ts +12 -0
  247. package/esm/models/entitlementgrantmeasure.d.ts.map +1 -0
  248. package/esm/models/entitlementgrantmeasure.js +13 -0
  249. package/esm/models/entitlementgrantmeasure.js.map +1 -0
  250. package/esm/models/entitlementresponse.d.ts +13 -0
  251. package/esm/models/entitlementresponse.d.ts.map +1 -1
  252. package/esm/models/entitlementresponse.js +12 -0
  253. package/esm/models/entitlementresponse.js.map +1 -1
  254. package/esm/models/entitlementsource.d.ts +3 -0
  255. package/esm/models/entitlementsource.d.ts.map +1 -1
  256. package/esm/models/entitlementsource.js +1 -0
  257. package/esm/models/entitlementsource.js.map +1 -1
  258. package/esm/models/entitychangebehaviour.d.ts +12 -0
  259. package/esm/models/entitychangebehaviour.d.ts.map +1 -0
  260. package/esm/models/entitychangebehaviour.js +13 -0
  261. package/esm/models/entitychangebehaviour.js.map +1 -0
  262. package/esm/models/entitychangepolicy.d.ts +10 -0
  263. package/esm/models/entitychangepolicy.d.ts.map +1 -0
  264. package/esm/models/entitychangepolicy.js +12 -0
  265. package/esm/models/entitychangepolicy.js.map +1 -0
  266. package/esm/models/entitychangeresult.d.ts +11 -0
  267. package/esm/models/entitychangeresult.d.ts.map +1 -0
  268. package/esm/models/entitychangeresult.js +14 -0
  269. package/esm/models/entitychangeresult.js.map +1 -0
  270. package/esm/models/errorcode.d.ts +2 -0
  271. package/esm/models/errorcode.d.ts.map +1 -1
  272. package/esm/models/errorcode.js +2 -0
  273. package/esm/models/errorcode.js.map +1 -1
  274. package/esm/models/executesubscriptionmodifyrequest.d.ts +4 -0
  275. package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
  276. package/esm/models/executesubscriptionmodifyrequest.js +4 -0
  277. package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
  278. package/esm/models/executesubscriptionplanchangev2op.d.ts +12 -0
  279. package/esm/models/executesubscriptionplanchangev2op.d.ts.map +1 -0
  280. package/esm/models/executesubscriptionplanchangev2op.js +16 -0
  281. package/esm/models/executesubscriptionplanchangev2op.js.map +1 -0
  282. package/esm/models/featuretype.d.ts +2 -0
  283. package/esm/models/featuretype.d.ts.map +1 -1
  284. package/esm/models/featuretype.js +2 -0
  285. package/esm/models/featuretype.js.map +1 -1
  286. package/esm/models/filteroperatortype.d.ts +2 -0
  287. package/esm/models/filteroperatortype.d.ts.map +1 -1
  288. package/esm/models/filteroperatortype.js +2 -0
  289. package/esm/models/filteroperatortype.js.map +1 -1
  290. package/esm/models/getcustomerentitlementsbyexternalidop.d.ts +10 -0
  291. package/esm/models/getcustomerentitlementsbyexternalidop.d.ts.map +1 -0
  292. package/esm/models/getcustomerentitlementsbyexternalidop.js +14 -0
  293. package/esm/models/getcustomerentitlementsbyexternalidop.js.map +1 -0
  294. package/esm/models/gethuggingfacebillingdatarequest.d.ts +6 -0
  295. package/esm/models/gethuggingfacebillingdatarequest.d.ts.map +1 -0
  296. package/esm/models/gethuggingfacebillingdatarequest.js +8 -0
  297. package/esm/models/gethuggingfacebillingdatarequest.js.map +1 -0
  298. package/esm/models/getinvoiceop.d.ts +1 -0
  299. package/esm/models/getinvoiceop.d.ts.map +1 -1
  300. package/esm/models/getinvoiceop.js +1 -0
  301. package/esm/models/getinvoiceop.js.map +1 -1
  302. package/esm/models/getsubscriptionsforcustomerop.d.ts +11 -0
  303. package/esm/models/getsubscriptionsforcustomerop.d.ts.map +1 -0
  304. package/esm/models/getsubscriptionsforcustomerop.js +15 -0
  305. package/esm/models/getsubscriptionsforcustomerop.js.map +1 -0
  306. package/esm/models/getusageanalyticsresponse.d.ts +2 -0
  307. package/esm/models/getusageanalyticsresponse.d.ts.map +1 -1
  308. package/esm/models/getusageanalyticsresponse.js +3 -1
  309. package/esm/models/getusageanalyticsresponse.js.map +1 -1
  310. package/esm/models/getusagebymeterrequest.d.ts +1 -0
  311. package/esm/models/getusagebymeterrequest.d.ts.map +1 -1
  312. package/esm/models/getusagebymeterrequest.js +1 -0
  313. package/esm/models/getusagebymeterrequest.js.map +1 -1
  314. package/esm/models/getusagerequest.d.ts +1 -0
  315. package/esm/models/getusagerequest.d.ts.map +1 -1
  316. package/esm/models/getusagerequest.js +1 -0
  317. package/esm/models/getusagerequest.js.map +1 -1
  318. package/esm/models/groupedinvoicingchildrequest.d.ts +37 -0
  319. package/esm/models/groupedinvoicingchildrequest.d.ts.map +1 -0
  320. package/esm/models/groupedinvoicingchildrequest.js +40 -0
  321. package/esm/models/groupedinvoicingchildrequest.js.map +1 -0
  322. package/esm/models/integrationentitytype.d.ts +4 -0
  323. package/esm/models/integrationentitytype.d.ts.map +1 -1
  324. package/esm/models/integrationentitytype.js +4 -0
  325. package/esm/models/integrationentitytype.js.map +1 -1
  326. package/esm/models/invoicelineitemcoupon.d.ts +1 -0
  327. package/esm/models/invoicelineitemcoupon.d.ts.map +1 -1
  328. package/esm/models/invoicelineitemcoupon.js +1 -0
  329. package/esm/models/invoicelineitemcoupon.js.map +1 -1
  330. package/esm/models/invoicelineitemresponse.d.ts +1 -0
  331. package/esm/models/invoicelineitemresponse.d.ts.map +1 -1
  332. package/esm/models/invoicelineitemresponse.js +1 -0
  333. package/esm/models/invoicelineitemresponse.js.map +1 -1
  334. package/esm/models/invoiceresponse.d.ts +1 -0
  335. package/esm/models/invoiceresponse.d.ts.map +1 -1
  336. package/esm/models/invoiceresponse.js +1 -0
  337. package/esm/models/invoiceresponse.js.map +1 -1
  338. package/esm/models/lineitemcommitmentconfig.d.ts.map +1 -1
  339. package/esm/models/lineitemcommitmentconfig.js +6 -6
  340. package/esm/models/lineitemcommitmentconfig.js.map +1 -1
  341. package/esm/models/lineitemquantitychange.d.ts +1 -1
  342. package/esm/models/lineitemquantitychange.d.ts.map +1 -1
  343. package/esm/models/lineitemquantitychange.js +1 -1
  344. package/esm/models/lineitemquantitychange.js.map +1 -1
  345. package/esm/models/modifysubscriptionlineitem.d.ts +8 -0
  346. package/esm/models/modifysubscriptionlineitem.d.ts.map +1 -0
  347. package/esm/models/modifysubscriptionlineitem.js +10 -0
  348. package/esm/models/modifysubscriptionlineitem.js.map +1 -0
  349. package/esm/models/modifysubscriptionparams.d.ts +8 -0
  350. package/esm/models/modifysubscriptionparams.d.ts.map +1 -0
  351. package/esm/models/modifysubscriptionparams.js +11 -0
  352. package/esm/models/modifysubscriptionparams.js.map +1 -0
  353. package/esm/models/overrideentitlementrequest.d.ts +3 -0
  354. package/esm/models/overrideentitlementrequest.d.ts.map +1 -1
  355. package/esm/models/overrideentitlementrequest.js +1 -0
  356. package/esm/models/overrideentitlementrequest.js.map +1 -1
  357. package/esm/models/pausestatus.d.ts +2 -2
  358. package/esm/models/paymentaction.d.ts +8 -0
  359. package/esm/models/paymentaction.d.ts.map +1 -0
  360. package/esm/models/paymentaction.js +10 -0
  361. package/esm/models/paymentaction.js.map +1 -0
  362. package/esm/models/paymentactiontype.d.ts +12 -0
  363. package/esm/models/paymentactiontype.d.ts.map +1 -0
  364. package/esm/models/paymentactiontype.js +13 -0
  365. package/esm/models/paymentactiontype.js.map +1 -0
  366. package/esm/models/paymentmethodtype.d.ts +20 -0
  367. package/esm/models/paymentmethodtype.d.ts.map +1 -0
  368. package/esm/models/paymentmethodtype.js +21 -0
  369. package/esm/models/paymentmethodtype.js.map +1 -0
  370. package/esm/models/paymentstatus.d.ts +2 -0
  371. package/esm/models/paymentstatus.d.ts.map +1 -1
  372. package/esm/models/paymentstatus.js +2 -0
  373. package/esm/models/paymentstatus.js.map +1 -1
  374. package/esm/models/previewsubscriptionplanchangev2op.d.ts +12 -0
  375. package/esm/models/previewsubscriptionplanchangev2op.d.ts.map +1 -0
  376. package/esm/models/previewsubscriptionplanchangev2op.js +16 -0
  377. package/esm/models/previewsubscriptionplanchangev2op.js.map +1 -0
  378. package/esm/models/removeaddonrequest.js +1 -1
  379. package/esm/models/removeaddonrequest.js.map +1 -1
  380. package/esm/models/schedulestatus.d.ts +1 -1
  381. package/esm/models/submodifyaddonparams.d.ts +11 -0
  382. package/esm/models/submodifyaddonparams.d.ts.map +1 -0
  383. package/esm/models/submodifyaddonparams.js +14 -0
  384. package/esm/models/submodifyaddonparams.js.map +1 -0
  385. package/esm/models/subscriptionchangeentitypolicies.d.ts +7 -0
  386. package/esm/models/subscriptionchangeentitypolicies.d.ts.map +1 -0
  387. package/esm/models/subscriptionchangeentitypolicies.js +9 -0
  388. package/esm/models/subscriptionchangeentitypolicies.js.map +1 -0
  389. package/esm/models/subscriptionchangev2request.d.ts +16 -0
  390. package/esm/models/subscriptionchangev2request.d.ts.map +1 -0
  391. package/esm/models/subscriptionchangev2request.js +16 -0
  392. package/esm/models/subscriptionchangev2request.js.map +1 -0
  393. package/esm/models/subscriptionchangev2response.d.ts +24 -0
  394. package/esm/models/subscriptionchangev2response.d.ts.map +1 -0
  395. package/esm/models/subscriptionchangev2response.js +24 -0
  396. package/esm/models/subscriptionchangev2response.js.map +1 -0
  397. package/esm/models/subscriptioncouponinput.d.ts.map +1 -1
  398. package/esm/models/subscriptioncouponinput.js +4 -4
  399. package/esm/models/subscriptioncouponinput.js.map +1 -1
  400. package/esm/models/subscriptionfilter.d.ts +1 -0
  401. package/esm/models/subscriptionfilter.d.ts.map +1 -1
  402. package/esm/models/subscriptionfilter.js +2 -1
  403. package/esm/models/subscriptionfilter.js.map +1 -1
  404. package/esm/models/subscriptioninheritanceconfig.d.ts +2 -0
  405. package/esm/models/subscriptioninheritanceconfig.d.ts.map +1 -1
  406. package/esm/models/subscriptioninheritanceconfig.js +6 -4
  407. package/esm/models/subscriptioninheritanceconfig.js.map +1 -1
  408. package/esm/models/subscriptionlineitemfilter.d.ts +1 -0
  409. package/esm/models/subscriptionlineitemfilter.d.ts.map +1 -1
  410. package/esm/models/subscriptionlineitemfilter.js +2 -1
  411. package/esm/models/subscriptionlineitemfilter.js.map +1 -1
  412. package/esm/models/subscriptionlineitemresponse.d.ts +2 -0
  413. package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
  414. package/esm/models/subscriptionlineitemresponse.js +2 -0
  415. package/esm/models/subscriptionlineitemresponse.js.map +1 -1
  416. package/esm/models/subscriptionmodificationaction.d.ts +12 -0
  417. package/esm/models/subscriptionmodificationaction.d.ts.map +1 -0
  418. package/esm/models/subscriptionmodificationaction.js +13 -0
  419. package/esm/models/subscriptionmodificationaction.js.map +1 -0
  420. package/esm/models/subscriptionmodifyresponse.d.ts +2 -0
  421. package/esm/models/subscriptionmodifyresponse.d.ts.map +1 -1
  422. package/esm/models/subscriptionmodifyresponse.js +2 -0
  423. package/esm/models/subscriptionmodifyresponse.js.map +1 -1
  424. package/esm/models/subscriptionmodifytype.d.ts +2 -0
  425. package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
  426. package/esm/models/subscriptionmodifytype.js +2 -0
  427. package/esm/models/subscriptionmodifytype.js.map +1 -1
  428. package/esm/models/subscriptionphasecreaterequest.js +2 -2
  429. package/esm/models/subscriptionphasecreaterequest.js.map +1 -1
  430. package/esm/models/subscriptionresponse.d.ts +5 -1
  431. package/esm/models/subscriptionresponse.d.ts.map +1 -1
  432. package/esm/models/subscriptionresponse.js +5 -1
  433. package/esm/models/subscriptionresponse.js.map +1 -1
  434. package/esm/models/subscriptionresponsev2.d.ts +1 -1
  435. package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
  436. package/esm/models/subscriptionresponsev2.js +1 -1
  437. package/esm/models/subscriptionresponsev2.js.map +1 -1
  438. package/esm/models/subscriptionstatus.d.ts +1 -1
  439. package/esm/models/subscriptionsubscriptionlineitem.d.ts +2 -0
  440. package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
  441. package/esm/models/subscriptionsubscriptionlineitem.js +2 -0
  442. package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
  443. package/esm/models/transactionreason.d.ts +2 -0
  444. package/esm/models/transactionreason.d.ts.map +1 -1
  445. package/esm/models/transactionreason.js +2 -0
  446. package/esm/models/transactionreason.js.map +1 -1
  447. package/esm/models/transactionstatus.d.ts +1 -1
  448. package/esm/models/updatecustomerrequest.d.ts +2 -0
  449. package/esm/models/updatecustomerrequest.d.ts.map +1 -1
  450. package/esm/models/updatecustomerrequest.js +2 -0
  451. package/esm/models/updatecustomerrequest.js.map +1 -1
  452. package/esm/models/updateinvoicerequest.d.ts +1 -0
  453. package/esm/models/updateinvoicerequest.d.ts.map +1 -1
  454. package/esm/models/updateinvoicerequest.js +1 -0
  455. package/esm/models/updateinvoicerequest.js.map +1 -1
  456. package/esm/models/usageanalyticitem.d.ts +2 -0
  457. package/esm/models/usageanalyticitem.d.ts.map +1 -1
  458. package/esm/models/usageanalyticitem.js +3 -1
  459. package/esm/models/usageanalyticitem.js.map +1 -1
  460. package/esm/models/usageanalyticpoint.d.ts +2 -0
  461. package/esm/models/usageanalyticpoint.d.ts.map +1 -1
  462. package/esm/models/usageanalyticpoint.js +3 -1
  463. package/esm/models/usageanalyticpoint.js.map +1 -1
  464. package/esm/models/walletresponse.d.ts +2 -0
  465. package/esm/models/walletresponse.d.ts.map +1 -1
  466. package/esm/models/walletresponse.js +2 -0
  467. package/esm/models/walletresponse.js.map +1 -1
  468. package/esm/models/wallettopupparams.d.ts +7 -0
  469. package/esm/models/wallettopupparams.d.ts.map +1 -0
  470. package/esm/models/wallettopupparams.js +10 -0
  471. package/esm/models/wallettopupparams.js.map +1 -0
  472. package/esm/models/wallettransactionresponse.d.ts +1 -0
  473. package/esm/models/wallettransactionresponse.d.ts.map +1 -1
  474. package/esm/models/wallettransactionresponse.js +1 -0
  475. package/esm/models/wallettransactionresponse.js.map +1 -1
  476. package/esm/tool-names.d.ts.map +1 -1
  477. package/esm/tool-names.js +26 -10
  478. package/esm/tool-names.js.map +1 -1
  479. package/esm/tsconfig.tsbuildinfo +1 -1
  480. package/manifest.json +27 -11
  481. package/package.json +9 -2
  482. package/src/funcs/customersGetCustomerEntitlementsByExternalID.ts +153 -0
  483. package/src/funcs/customersGetSubscriptionsForCustomer.ts +156 -0
  484. package/src/funcs/eventsGetEvent.ts +7 -12
  485. package/src/funcs/eventsGetHuggingfaceInferenceData.ts +22 -1
  486. package/src/funcs/invoicesGetInvoice.ts +1 -0
  487. package/src/funcs/invoicesUpdateInvoice.ts +1 -1
  488. package/src/funcs/subscriptionsAddSubscriptionAddon.ts +3 -0
  489. package/src/funcs/subscriptionsExecuteSubscriptionModify.ts +1 -1
  490. package/src/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.ts +159 -0
  491. package/src/funcs/subscriptionsPreviewSubscriptionModify.ts +1 -1
  492. package/src/funcs/subscriptionsPreviewSubscriptionPlanChangeV2.ts +153 -0
  493. package/src/funcs/subscriptionsRemoveSubscriptionAddon.ts +3 -0
  494. package/src/lib/config.ts +3 -3
  495. package/src/lib/http.ts +3 -1
  496. package/src/lib/security.ts +10 -5
  497. package/src/mcp-server/mcp-server.ts +1 -1
  498. package/src/mcp-server/server.ts +10 -2
  499. package/src/mcp-server/tools/customersGetCustomerEntitlementsByExternalID.ts +45 -0
  500. package/src/mcp-server/tools/customersGetSubscriptionsForCustomer.ts +45 -0
  501. package/src/mcp-server/tools/eventsGetEvent.ts +1 -1
  502. package/src/mcp-server/tools/eventsGetHuggingfaceInferenceData.ts +12 -3
  503. package/src/mcp-server/tools/invoicesUpdateInvoice.ts +1 -1
  504. package/src/mcp-server/tools/subscriptionsAddSubscriptionAddon.ts +1 -0
  505. package/src/mcp-server/tools/subscriptionsExecuteSubscriptionModify.ts +1 -1
  506. package/src/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.ts +51 -0
  507. package/src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts +1 -1
  508. package/src/mcp-server/tools/subscriptionsPreviewSubscriptionPlanChangeV2.ts +45 -0
  509. package/src/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.ts +1 -0
  510. package/src/mcp-server/tools.ts +2 -0
  511. package/src/models/addaddonparams.ts +16 -0
  512. package/src/models/addaddonref.ts +26 -0
  513. package/src/models/addaddonrequest.ts +12 -0
  514. package/src/models/addaddontosubscriptionrequest.ts +9 -0
  515. package/src/models/addaddontosubscriptionresponse.ts +65 -0
  516. package/src/models/addonresponse.ts +6 -0
  517. package/src/models/addsubscriptionaddonop.ts +5 -5
  518. package/src/models/aggregatedentitlement.ts +21 -3
  519. package/src/models/aggregatedentitlementbucket.ts +35 -0
  520. package/src/models/alertthreshold.ts +2 -2
  521. package/src/models/autotopup.ts +14 -0
  522. package/src/models/checkoutaction.ts +21 -0
  523. package/src/models/checkoutjsonbcheckoutconfiguration.ts +34 -0
  524. package/src/models/checkoutjsonbcheckoutpaymentproviderconfig.ts +27 -0
  525. package/src/models/checkoutjsonbcheckoutproviderresult.ts +32 -0
  526. package/src/models/checkoutjsonbcheckoutresult.ts +19 -0
  527. package/src/models/checkoutparams.ts +33 -0
  528. package/src/models/checkoutpaymentprovider.ts +17 -0
  529. package/src/models/checkoutpaymentproviderconfig.ts +27 -0
  530. package/src/models/checkoutsessionresponse.ts +106 -0
  531. package/src/models/checkoutstatus.ts +23 -0
  532. package/src/models/couponassociationresponse.ts +9 -3
  533. package/src/models/{coupon.ts → couponresponse.ts} +2 -2
  534. package/src/models/createcreditgrantrequest.ts +2 -0
  535. package/src/models/createcustomerrequest.ts +14 -2
  536. package/src/models/createinvoicerequest.ts +4 -0
  537. package/src/models/createsubscriptionparams.ts +30 -0
  538. package/src/models/createsubscriptionrequest.ts +21 -39
  539. package/src/models/createsubscriptionresult.ts +19 -0
  540. package/src/models/creditgrantresponse.ts +2 -0
  541. package/src/models/creditgrantscope.ts +2 -0
  542. package/src/models/customer.ts +8 -0
  543. package/src/models/customerentitlementsresponse.ts +6 -0
  544. package/src/models/customerresponse.ts +8 -0
  545. package/src/models/durationunit.ts +21 -0
  546. package/src/models/entitlementaggregationmode.ts +19 -0
  547. package/src/models/entitlementgrantallocationbehavior.ts +19 -0
  548. package/src/models/entitlementgrantdurationunit.ts +23 -0
  549. package/src/models/entitlementgrantmeasure.ts +19 -0
  550. package/src/models/entitlementresponse.ts +31 -0
  551. package/src/models/entitlementsource.ts +2 -0
  552. package/src/models/entitychangebehaviour.ts +17 -0
  553. package/src/models/entitychangepolicy.ts +23 -0
  554. package/src/models/entitychangeresult.ts +28 -0
  555. package/src/models/errorcode.ts +2 -0
  556. package/src/models/executesubscriptionmodifyrequest.ts +9 -0
  557. package/src/models/executesubscriptionplanchangev2op.ts +37 -0
  558. package/src/models/featuretype.ts +2 -0
  559. package/src/models/filteroperatortype.ts +2 -0
  560. package/src/models/getcustomerentitlementsbyexternalidop.ts +31 -0
  561. package/src/models/gethuggingfacebillingdatarequest.ts +13 -0
  562. package/src/models/getinvoiceop.ts +4 -0
  563. package/src/models/getsubscriptionsforcustomerop.ts +35 -0
  564. package/src/models/getusageanalyticsresponse.ts +7 -1
  565. package/src/models/getusagebymeterrequest.ts +2 -0
  566. package/src/models/getusagerequest.ts +2 -0
  567. package/src/models/groupedinvoicingchildrequest.ts +104 -0
  568. package/src/models/integrationentitytype.ts +4 -0
  569. package/src/models/invoicelineitemcoupon.ts +2 -0
  570. package/src/models/invoicelineitemresponse.ts +4 -0
  571. package/src/models/invoiceresponse.ts +4 -0
  572. package/src/models/lineitemcommitmentconfig.ts +6 -10
  573. package/src/models/lineitemquantitychange.ts +2 -2
  574. package/src/models/modifysubscriptionlineitem.ts +19 -0
  575. package/src/models/modifysubscriptionparams.ts +22 -0
  576. package/src/models/overrideentitlementrequest.ts +4 -0
  577. package/src/models/paymentaction.ts +19 -0
  578. package/src/models/paymentactiontype.ts +17 -0
  579. package/src/models/paymentmethodtype.ts +25 -0
  580. package/src/models/paymentstatus.ts +2 -0
  581. package/src/models/previewsubscriptionplanchangev2op.ts +37 -0
  582. package/src/models/removeaddonrequest.ts +1 -1
  583. package/src/models/submodifyaddonparams.ts +30 -0
  584. package/src/models/subscriptionchangeentitypolicies.ts +19 -0
  585. package/src/models/subscriptionchangev2request.ts +34 -0
  586. package/src/models/subscriptionchangev2response.ts +56 -0
  587. package/src/models/subscriptioncouponinput.ts +4 -12
  588. package/src/models/subscriptionfilter.ts +5 -1
  589. package/src/models/subscriptioninheritanceconfig.ts +14 -4
  590. package/src/models/subscriptionlineitemfilter.ts +5 -1
  591. package/src/models/subscriptionlineitemresponse.ts +3 -0
  592. package/src/models/subscriptionmodificationaction.ts +19 -0
  593. package/src/models/subscriptionmodifyresponse.ts +6 -0
  594. package/src/models/subscriptionmodifytype.ts +2 -0
  595. package/src/models/subscriptionphasecreaterequest.ts +2 -2
  596. package/src/models/subscriptionresponse.ts +16 -2
  597. package/src/models/subscriptionresponsev2.ts +2 -2
  598. package/src/models/subscriptionsubscriptionlineitem.ts +3 -0
  599. package/src/models/transactionreason.ts +2 -0
  600. package/src/models/updatecustomerrequest.ts +8 -0
  601. package/src/models/updateinvoicerequest.ts +4 -0
  602. package/src/models/usageanalyticitem.ts +7 -1
  603. package/src/models/usageanalyticpoint.ts +7 -1
  604. package/src/models/walletresponse.ts +4 -0
  605. package/src/models/wallettopupparams.ts +16 -0
  606. package/src/models/wallettransactionresponse.ts +4 -0
  607. package/src/tool-names.ts +26 -10
  608. package/esm/models/coupon.d.ts.map +0 -1
  609. package/esm/models/coupon.js.map +0 -1
@@ -0,0 +1,159 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { FlexpriceCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import { APIError } from "../models/errors/apierror.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ ExecuteSubscriptionPlanChangeV2Request,
23
+ ExecuteSubscriptionPlanChangeV2Request$zodSchema,
24
+ } from "../models/executesubscriptionplanchangev2op.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Execute a plan change (v2, swap in place)
30
+ *
31
+ * @remarks
32
+ * Change a subscription's plan in place. Subscription id, billing anchor and period bounds are preserved; line items are sliced and settled in one transaction.
33
+ *
34
+ * change_at controls timing. Omitted or 'immediate' applies the change now. 'end_of_period' records a pending schedule that executes at the subscription's current period end: the response returns is_scheduled, schedule_id and scheduled_at instead of a completed change, and nothing is swapped or billed until the boundary.
35
+ *
36
+ * scheduled_at is resolved from the subscription's current period end at request time. If that period end is already in the past (a backdated start date, a resumed pause, or worker downtime can all leave a subscription behind), the change is due immediately and fires on the next billing scan rather than a period away — inspect scheduled_at to see this.
37
+ *
38
+ * Only one plan change may be pending per subscription; request a second one and this returns 400. Cancel the existing schedule via POST /subscriptions/schedules/{schedule_id}/cancel first. Pending schedules are listable via GET /subscriptions/{id}/schedules.
39
+ */
40
+ export function subscriptionsExecuteSubscriptionPlanChangeV2(
41
+ client$: FlexpriceCore,
42
+ request: ExecuteSubscriptionPlanChangeV2Request,
43
+ options?: RequestOptions,
44
+ ): APIPromise<
45
+ Result<
46
+ Response,
47
+ | APIError
48
+ | SDKValidationError
49
+ | UnexpectedClientError
50
+ | InvalidRequestError
51
+ | RequestAbortedError
52
+ | RequestTimeoutError
53
+ | ConnectionError
54
+ >
55
+ > {
56
+ return new APIPromise($do(
57
+ client$,
58
+ request,
59
+ options,
60
+ ));
61
+ }
62
+
63
+ async function $do(
64
+ client$: FlexpriceCore,
65
+ request: ExecuteSubscriptionPlanChangeV2Request,
66
+ options?: RequestOptions,
67
+ ): Promise<
68
+ [
69
+ Result<
70
+ Response,
71
+ | APIError
72
+ | SDKValidationError
73
+ | UnexpectedClientError
74
+ | InvalidRequestError
75
+ | RequestAbortedError
76
+ | RequestTimeoutError
77
+ | ConnectionError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed$ = safeParse(
83
+ request,
84
+ (value$) => ExecuteSubscriptionPlanChangeV2Request$zodSchema.parse(value$),
85
+ "Input validation failed",
86
+ );
87
+ if (!parsed$.ok) {
88
+ return [parsed$, { status: "invalid" }];
89
+ }
90
+ const payload$ = parsed$.value;
91
+ const body$ = encodeJSON("body", payload$.body, { explode: true });
92
+
93
+ const pathParams$ = {
94
+ id: encodeSimple("id", payload$.id, {
95
+ explode: false,
96
+ charEncoding: "percent",
97
+ }),
98
+ };
99
+ const path$ = pathToFunc("/subscriptions/{id}/change/v2/execute")(
100
+ pathParams$,
101
+ );
102
+
103
+ const headers$ = new Headers(compactMap({
104
+ "Content-Type": "application/json",
105
+ Accept: "application/json",
106
+ }));
107
+ const securityInput = await extractSecurity(client$._options.security);
108
+ const requestSecurity = resolveGlobalSecurity(securityInput);
109
+
110
+ const context = {
111
+ options: client$._options,
112
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
113
+ operationID: "executeSubscriptionPlanChangeV2",
114
+ oAuth2Scopes: null,
115
+ resolvedSecurity: requestSecurity,
116
+ securitySource: client$._options.security,
117
+ retryConfig: options?.retries
118
+ || client$._options.retryConfig
119
+ || { strategy: "none" },
120
+ retryCodes: options?.retryCodes || [
121
+ "429",
122
+ "500",
123
+ "502",
124
+ "503",
125
+ "504",
126
+ ],
127
+ };
128
+
129
+ const requestRes = client$._createRequest(context, {
130
+ security: requestSecurity,
131
+ method: "POST",
132
+ baseURL: options?.serverURL,
133
+ path: path$,
134
+ headers: headers$,
135
+ body: body$,
136
+ userAgent: client$._options.userAgent,
137
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
138
+ || -1,
139
+ }, options);
140
+ if (!requestRes.ok) {
141
+ return [requestRes, { status: "invalid" }];
142
+ }
143
+ const req$ = requestRes.value;
144
+
145
+ const doResult = await client$._do(req$, {
146
+ context,
147
+ errorCodes: [],
148
+ retryConfig: context.retryConfig,
149
+ retryCodes: context.retryCodes,
150
+ });
151
+ if (!doResult.ok) {
152
+ return [doResult, { status: "request-error", request: req$ }];
153
+ }
154
+ return [doResult, {
155
+ status: "complete",
156
+ "request": req$,
157
+ response: doResult.value,
158
+ }];
159
+ }
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Preview subscription modification
30
30
  *
31
31
  * @remarks
32
- * Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes.
32
+ * Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, tax, or addon add/remove) without committing changes.
33
33
  */
34
34
  export function subscriptionsPreviewSubscriptionModify(
35
35
  client$: FlexpriceCore,
@@ -0,0 +1,153 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { FlexpriceCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import { APIError } from "../models/errors/apierror.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ PreviewSubscriptionPlanChangeV2Request,
23
+ PreviewSubscriptionPlanChangeV2Request$zodSchema,
24
+ } from "../models/previewsubscriptionplanchangev2op.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Preview a plan change (v2, swap in place)
30
+ *
31
+ * @remarks
32
+ * Preview a subscription plan change without writing. Swap-in-place: subscription id, billing anchor and period bounds are preserved.
33
+ */
34
+ export function subscriptionsPreviewSubscriptionPlanChangeV2(
35
+ client$: FlexpriceCore,
36
+ request: PreviewSubscriptionPlanChangeV2Request,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ Response,
41
+ | APIError
42
+ | SDKValidationError
43
+ | UnexpectedClientError
44
+ | InvalidRequestError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | ConnectionError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client$,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client$: FlexpriceCore,
59
+ request: PreviewSubscriptionPlanChangeV2Request,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ Response,
65
+ | APIError
66
+ | SDKValidationError
67
+ | UnexpectedClientError
68
+ | InvalidRequestError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | ConnectionError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed$ = safeParse(
77
+ request,
78
+ (value$) => PreviewSubscriptionPlanChangeV2Request$zodSchema.parse(value$),
79
+ "Input validation failed",
80
+ );
81
+ if (!parsed$.ok) {
82
+ return [parsed$, { status: "invalid" }];
83
+ }
84
+ const payload$ = parsed$.value;
85
+ const body$ = encodeJSON("body", payload$.body, { explode: true });
86
+
87
+ const pathParams$ = {
88
+ id: encodeSimple("id", payload$.id, {
89
+ explode: false,
90
+ charEncoding: "percent",
91
+ }),
92
+ };
93
+ const path$ = pathToFunc("/subscriptions/{id}/change/v2/preview")(
94
+ pathParams$,
95
+ );
96
+
97
+ const headers$ = new Headers(compactMap({
98
+ "Content-Type": "application/json",
99
+ Accept: "application/json",
100
+ }));
101
+ const securityInput = await extractSecurity(client$._options.security);
102
+ const requestSecurity = resolveGlobalSecurity(securityInput);
103
+
104
+ const context = {
105
+ options: client$._options,
106
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
107
+ operationID: "previewSubscriptionPlanChangeV2",
108
+ oAuth2Scopes: null,
109
+ resolvedSecurity: requestSecurity,
110
+ securitySource: client$._options.security,
111
+ retryConfig: options?.retries
112
+ || client$._options.retryConfig
113
+ || { strategy: "none" },
114
+ retryCodes: options?.retryCodes || [
115
+ "429",
116
+ "500",
117
+ "502",
118
+ "503",
119
+ "504",
120
+ ],
121
+ };
122
+
123
+ const requestRes = client$._createRequest(context, {
124
+ security: requestSecurity,
125
+ method: "POST",
126
+ baseURL: options?.serverURL,
127
+ path: path$,
128
+ headers: headers$,
129
+ body: body$,
130
+ userAgent: client$._options.userAgent,
131
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
132
+ || -1,
133
+ }, options);
134
+ if (!requestRes.ok) {
135
+ return [requestRes, { status: "invalid" }];
136
+ }
137
+ const req$ = requestRes.value;
138
+
139
+ const doResult = await client$._do(req$, {
140
+ context,
141
+ errorCodes: [],
142
+ retryConfig: context.retryConfig,
143
+ retryCodes: context.retryCodes,
144
+ });
145
+ if (!doResult.ok) {
146
+ return [doResult, { status: "request-error", request: req$ }];
147
+ }
148
+ return [doResult, {
149
+ status: "complete",
150
+ "request": req$,
151
+ response: doResult.value,
152
+ }];
153
+ }
@@ -29,7 +29,10 @@ import { Result } from "../types/fp.js";
29
29
  * Remove addon from subscription
30
30
  *
31
31
  * @remarks
32
+ * Deprecated: use POST /subscriptions/{id}/modify/execute with type "addon" and action "remove", which also supports previewing the proration credit first.
32
33
  * Use when removing an add-on from a subscription (e.g. downgrade or opt-out).
34
+ *
35
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
33
36
  */
34
37
  export function subscriptionsRemoveSubscriptionAddon(
35
38
  client$: FlexpriceCore,
package/src/lib/config.ts CHANGED
@@ -69,8 +69,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
69
69
  export const SDK_METADATA = {
70
70
  language: "typescript",
71
71
  openapiDocVersion: "1.0",
72
- sdkVersion: "2.1.20",
73
- genVersion: "2.911.0",
72
+ sdkVersion: "2.1.25",
73
+ genVersion: "2.931.0",
74
74
  userAgent:
75
- "speakeasy-sdk/mcp-typescript 2.1.20 2.911.0 1.0 @flexprice/mcp-server",
75
+ "speakeasy-sdk/mcp-typescript 2.1.25 2.931.0 1.0 @flexprice/mcp-server",
76
76
  } as const;
package/src/lib/http.ts CHANGED
@@ -45,8 +45,10 @@ export class HTTPClient {
45
45
  private requestHooks: BeforeRequestHook[] = [];
46
46
  private requestErrorHooks: RequestErrorHook[] = [];
47
47
  private responseHooks: ResponseHook[] = [];
48
+ private options: HTTPClientOptions;
48
49
 
49
- constructor(private options: HTTPClientOptions = {}) {
50
+ constructor(options: HTTPClientOptions = {}) {
51
+ this.options = options;
50
52
  this.fetcher = options.fetcher || DEFAULT_FETCHER;
51
53
  }
52
54
 
@@ -12,17 +12,22 @@ type OAuth2PasswordFlow = {
12
12
  tokenURL: string;
13
13
  };
14
14
 
15
- export enum SecurityErrorCode {
16
- Incomplete = "incomplete",
17
- UnrecognisedSecurityType = "unrecognized_security_type",
18
- }
15
+ export const SecurityErrorCode = {
16
+ Incomplete: "incomplete",
17
+ UnrecognisedSecurityType: "unrecognized_security_type",
18
+ } as const;
19
+ export type SecurityErrorCode =
20
+ (typeof SecurityErrorCode)[keyof typeof SecurityErrorCode];
19
21
 
20
22
  export class SecurityError extends Error {
23
+ public code: SecurityErrorCode;
24
+
21
25
  constructor(
22
- public code: SecurityErrorCode,
26
+ code: SecurityErrorCode,
23
27
  message: string,
24
28
  ) {
25
29
  super(message);
30
+ this.code = code;
26
31
  this.name = "SecurityError";
27
32
  }
28
33
 
@@ -21,7 +21,7 @@ const routes = buildRouteMap({
21
21
  export const app = buildApplication(routes, {
22
22
  name: "mcp",
23
23
  versionInfo: {
24
- currentVersion: "2.1.20",
24
+ currentVersion: "2.1.25",
25
25
  },
26
26
  });
27
27
 
@@ -22,8 +22,10 @@ import { tool$customersDeleteCustomer } from "./tools/customersDeleteCustomer.js
22
22
  import { tool$customersGetCustomer } from "./tools/customersGetCustomer.js";
23
23
  import { tool$customersGetCustomerByExternalId } from "./tools/customersGetCustomerByExternalId.js";
24
24
  import { tool$customersGetCustomerEntitlements } from "./tools/customersGetCustomerEntitlements.js";
25
+ import { tool$customersGetCustomerEntitlementsByExternalID } from "./tools/customersGetCustomerEntitlementsByExternalID.js";
25
26
  import { tool$customersGetCustomerUpcomingGrants } from "./tools/customersGetCustomerUpcomingGrants.js";
26
27
  import { tool$customersGetCustomerUsageSummary } from "./tools/customersGetCustomerUsageSummary.js";
28
+ import { tool$customersGetSubscriptionsForCustomer } from "./tools/customersGetSubscriptionsForCustomer.js";
27
29
  import { tool$customersQueryCustomer } from "./tools/customersQueryCustomer.js";
28
30
  import { tool$customersUpdateCustomer } from "./tools/customersUpdateCustomer.js";
29
31
  import { tool$eventsGetEvent } from "./tools/eventsGetEvent.js";
@@ -71,6 +73,7 @@ import { tool$subscriptionsCreateSubscriptionLineItem } from "./tools/subscripti
71
73
  import { tool$subscriptionsDeleteSubscriptionLineItem } from "./tools/subscriptionsDeleteSubscriptionLineItem.js";
72
74
  import { tool$subscriptionsExecuteSubscriptionChange } from "./tools/subscriptionsExecuteSubscriptionChange.js";
73
75
  import { tool$subscriptionsExecuteSubscriptionModify } from "./tools/subscriptionsExecuteSubscriptionModify.js";
76
+ import { tool$subscriptionsExecuteSubscriptionPlanChangeV2 } from "./tools/subscriptionsExecuteSubscriptionPlanChangeV2.js";
74
77
  import { tool$subscriptionsGetSubscription } from "./tools/subscriptionsGetSubscription.js";
75
78
  import { tool$subscriptionsGetSubscriptionAddonAssociations } from "./tools/subscriptionsGetSubscriptionAddonAssociations.js";
76
79
  import { tool$subscriptionsGetSubscriptionEntitlements } from "./tools/subscriptionsGetSubscriptionEntitlements.js";
@@ -82,6 +85,7 @@ import { tool$subscriptionsListAllSubscriptionSchedules } from "./tools/subscrip
82
85
  import { tool$subscriptionsListSubscriptionSchedules } from "./tools/subscriptionsListSubscriptionSchedules.js";
83
86
  import { tool$subscriptionsPreviewSubscriptionChange } from "./tools/subscriptionsPreviewSubscriptionChange.js";
84
87
  import { tool$subscriptionsPreviewSubscriptionModify } from "./tools/subscriptionsPreviewSubscriptionModify.js";
88
+ import { tool$subscriptionsPreviewSubscriptionPlanChangeV2 } from "./tools/subscriptionsPreviewSubscriptionPlanChangeV2.js";
85
89
  import { tool$subscriptionsQuerySubscription } from "./tools/subscriptionsQuerySubscription.js";
86
90
  import { tool$subscriptionsQuerySubscriptionLineItems } from "./tools/subscriptionsQuerySubscriptionLineItems.js";
87
91
  import { tool$subscriptionsRemoveSubscriptionAddon } from "./tools/subscriptionsRemoveSubscriptionAddon.js";
@@ -101,7 +105,7 @@ export function createMCPServer(deps: {
101
105
  }) {
102
106
  const server = new McpServer({
103
107
  name: "Flexprice",
104
- version: "2.1.20",
108
+ version: "2.1.25",
105
109
  });
106
110
 
107
111
  const getClient = deps.getSDK || (() =>
@@ -149,6 +153,8 @@ export function createMCPServer(deps: {
149
153
  tool(tool$customersUpdateCustomer);
150
154
  tool(tool$customersCreateCustomer);
151
155
  tool(tool$customersGetCustomerByExternalId);
156
+ tool(tool$customersGetCustomerEntitlementsByExternalID);
157
+ tool(tool$customersGetSubscriptionsForCustomer);
152
158
  tool(tool$customersQueryCustomer);
153
159
  tool(tool$customersGetCustomerUsageSummary);
154
160
  tool(tool$customersGetCustomer);
@@ -173,10 +179,10 @@ export function createMCPServer(deps: {
173
179
  tool(tool$eventsGetUsageAnalytics);
174
180
  tool(tool$eventsIngestEventsBulk);
175
181
  tool(tool$eventsGetHuggingfaceInferenceData);
182
+ tool(tool$eventsGetEvent);
176
183
  tool(tool$eventsListRawEvents);
177
184
  tool(tool$eventsGetUsageStatistics);
178
185
  tool(tool$eventsGetUsageByMeter);
179
- tool(tool$eventsGetEvent);
180
186
  tool(tool$plansCreatePlan);
181
187
  tool(tool$plansQueryPlan);
182
188
  tool(tool$plansGetPlan);
@@ -206,6 +212,8 @@ export function createMCPServer(deps: {
206
212
  tool(tool$subscriptionsCancelSubscription);
207
213
  tool(tool$subscriptionsExecuteSubscriptionChange);
208
214
  tool(tool$subscriptionsPreviewSubscriptionChange);
215
+ tool(tool$subscriptionsExecuteSubscriptionPlanChangeV2);
216
+ tool(tool$subscriptionsPreviewSubscriptionPlanChangeV2);
209
217
  tool(tool$subscriptionsGetSubscriptionEntitlements);
210
218
  tool(tool$subscriptionsGetSubscriptionUpcomingGrants);
211
219
  tool(tool$subscriptionsCreateSubscriptionLineItem);
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { customersGetCustomerEntitlementsByExternalID } from "../../funcs/customersGetCustomerEntitlementsByExternalID.js";
6
+ import { GetCustomerEntitlementsByExternalIDRequest$zodSchema } from "../../models/getcustomerentitlementsbyexternalidop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: GetCustomerEntitlementsByExternalIDRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$customersGetCustomerEntitlementsByExternalID: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "get-customer-entitlements-by-external-i-d",
17
+ description: `Get customer entitlements by external ID
18
+
19
+ Use when checking entitlements by your app's customer id (e.g. feature gating at the edge). Supports optional filters (feature_ids, subscription_ids).`,
20
+ scopes: ["read"],
21
+ annotations: {
22
+ "title": "",
23
+ "destructiveHint": false,
24
+ "idempotentHint": false,
25
+ "openWorldHint": false,
26
+ "readOnlyHint": true,
27
+ },
28
+ args,
29
+ tool: async (client, args, ctx) => {
30
+ const [result] = await customersGetCustomerEntitlementsByExternalID(
31
+ client,
32
+ args.request,
33
+ { fetchOptions: { signal: ctx.signal } },
34
+ ).$inspect();
35
+
36
+ if (!result.ok) {
37
+ return {
38
+ content: [{ type: "text", text: result.error.message }],
39
+ isError: true,
40
+ };
41
+ }
42
+
43
+ return formatResult(result.value);
44
+ },
45
+ };
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { customersGetSubscriptionsForCustomer } from "../../funcs/customersGetSubscriptionsForCustomer.js";
6
+ import { GetSubscriptionsForCustomerRequest$zodSchema } from "../../models/getsubscriptionsforcustomerop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: GetSubscriptionsForCustomerRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$customersGetSubscriptionsForCustomer: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "get-subscriptions-for-customer",
17
+ description: `Get subscriptions for customer by external ID
18
+
19
+ Returns all subscriptions for a customer looked up by external_id, with line-item meters and entitlements attached (no pagination).`,
20
+ scopes: ["read"],
21
+ annotations: {
22
+ "title": "",
23
+ "destructiveHint": false,
24
+ "idempotentHint": false,
25
+ "openWorldHint": false,
26
+ "readOnlyHint": true,
27
+ },
28
+ args,
29
+ tool: async (client, args, ctx) => {
30
+ const [result] = await customersGetSubscriptionsForCustomer(
31
+ client,
32
+ args.request,
33
+ { fetchOptions: { signal: ctx.signal } },
34
+ ).$inspect();
35
+
36
+ if (!result.ok) {
37
+ return {
38
+ content: [{ type: "text", text: result.error.message }],
39
+ isError: true,
40
+ };
41
+ }
42
+
43
+ return formatResult(result.value);
44
+ },
45
+ };
@@ -14,7 +14,7 @@ export const tool$eventsGetEvent: ToolDefinition<typeof args> = {
14
14
  name: "get-event",
15
15
  description: `Get event
16
16
 
17
- Use when debugging a specific event (e.g. why it failed or how it was aggregated). Includes processing status and debug info.`,
17
+ Use when debugging a specific event (e.g. why it failed or how it was aggregated). Reads the meter-usage pipeline; includes processing status and step-by-step debug tracker when unprocessed. Uses ?id= query param because event IDs can contain "/".`,
18
18
  scopes: ["read"],
19
19
  annotations: {
20
20
  "title": "",
@@ -3,13 +3,20 @@
3
3
  */
4
4
 
5
5
  import { eventsGetHuggingfaceInferenceData } from "../../funcs/eventsGetHuggingfaceInferenceData.js";
6
+ import { GetHuggingFaceBillingDataRequest$zodSchema } from "../../models/gethuggingfacebillingdatarequest.js";
6
7
  import { formatResult, ToolDefinition } from "../tools.js";
7
8
 
8
- export const tool$eventsGetHuggingfaceInferenceData: ToolDefinition = {
9
+ const args = {
10
+ request: GetHuggingFaceBillingDataRequest$zodSchema.describe(`Request body`),
11
+ };
12
+
13
+ export const tool$eventsGetHuggingfaceInferenceData: ToolDefinition<
14
+ typeof args
15
+ > = {
9
16
  name: "get-huggingface-inference-data",
10
17
  description: `Get Hugging Face inference data
11
18
 
12
- Use when fetching Hugging Face inference usage or billing data (e.g. for HF-specific reporting or reconciliation).`,
19
+ Use when fetching Hugging Face inference usage or billing data (e.g. for HF-specific reporting or reconciliation). Reads the meter-usage pipeline.`,
13
20
  scopes: ["write"],
14
21
  annotations: {
15
22
  "title": "",
@@ -18,9 +25,11 @@ Use when fetching Hugging Face inference usage or billing data (e.g. for HF-spec
18
25
  "openWorldHint": false,
19
26
  "readOnlyHint": false,
20
27
  },
21
- tool: async (client, ctx) => {
28
+ args,
29
+ tool: async (client, args, ctx) => {
22
30
  const [result] = await eventsGetHuggingfaceInferenceData(
23
31
  client,
32
+ args.request,
24
33
  { fetchOptions: { signal: ctx.signal } },
25
34
  ).$inspect();
26
35
 
@@ -14,7 +14,7 @@ export const tool$invoicesUpdateInvoice: ToolDefinition<typeof args> = {
14
14
  name: "update-invoice",
15
15
  description: `Update invoice
16
16
 
17
- Use when updating invoice metadata or due date (e.g. PDF URL, net terms). For paid invoices only safe fields can be updated.`,
17
+ Use when updating invoice metadata or due date (e.g. PDF URL, net terms), or when recalculating this draft invoice's discount from its current standing coupon associations via apply_discount:true (idempotent, does not attach a new coupon). Allowed for invoices in draft or finalized status.`,
18
18
  scopes: ["write"],
19
19
  annotations: {
20
20
  "title": "",
@@ -16,6 +16,7 @@ export const tool$subscriptionsAddSubscriptionAddon: ToolDefinition<
16
16
  name: "add-subscription-addon",
17
17
  description: `Add addon to subscription
18
18
 
19
+ Deprecated: use POST /subscriptions/{id}/modify/execute with type "addon" and action "add", which also supports previewing the proration charge first.
19
20
  Use when adding an optional product or add-on to an existing subscription (e.g. extra storage or support tier).`,
20
21
  scopes: ["write"],
21
22
  annotations: {
@@ -16,7 +16,7 @@ export const tool$subscriptionsExecuteSubscriptionModify: ToolDefinition<
16
16
  name: "execute-subscription-modify",
17
17
  description: `Execute subscription modification
18
18
 
19
- Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax).`,
19
+ Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, tax, or addon add/remove).`,
20
20
  scopes: ["write"],
21
21
  annotations: {
22
22
  "title": "",