@flexprice/mcp-server 2.1.25 → 2.1.30

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 (413) hide show
  1. package/bin/mcp-server.js +6117 -4614
  2. package/bin/mcp-server.js.map +128 -107
  3. package/bun.lock +50 -56
  4. package/esm/funcs/invoicesExecuteInvoiceModify.d.ts +16 -0
  5. package/esm/funcs/invoicesExecuteInvoiceModify.d.ts.map +1 -0
  6. package/esm/funcs/invoicesExecuteInvoiceModify.js +88 -0
  7. package/esm/funcs/invoicesExecuteInvoiceModify.js.map +1 -0
  8. package/esm/funcs/subscriptionsCancelSubscriptionSchedule.js +1 -1
  9. package/esm/funcs/subscriptionsCancelSubscriptionSchedule.js.map +1 -1
  10. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts +3 -1
  11. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts.map +1 -1
  12. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.js +3 -1
  13. package/esm/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.js.map +1 -1
  14. package/esm/funcs/subscriptionsGetSubscriptionSchedule.js +2 -2
  15. package/esm/funcs/subscriptionsGetSubscriptionSchedule.js.map +1 -1
  16. package/esm/funcs/subscriptionsListAllSubscriptionSchedules.js +1 -1
  17. package/esm/funcs/subscriptionsListAllSubscriptionSchedules.js.map +1 -1
  18. package/esm/funcs/subscriptionsListSubscriptionSchedules.js +2 -2
  19. package/esm/funcs/subscriptionsListSubscriptionSchedules.js.map +1 -1
  20. package/esm/lib/config.d.ts +3 -3
  21. package/esm/lib/config.js +3 -3
  22. package/esm/mcp-server/mcp-server.js +1 -1
  23. package/esm/mcp-server/server.d.ts.map +1 -1
  24. package/esm/mcp-server/server.js +7 -5
  25. package/esm/mcp-server/server.js.map +1 -1
  26. package/esm/mcp-server/tools/invoicesExecuteInvoiceModify.d.ts +7 -0
  27. package/esm/mcp-server/tools/invoicesExecuteInvoiceModify.d.ts.map +1 -0
  28. package/esm/mcp-server/tools/invoicesExecuteInvoiceModify.js +35 -0
  29. package/esm/mcp-server/tools/invoicesExecuteInvoiceModify.js.map +1 -0
  30. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.d.ts.map +1 -1
  31. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.js +3 -1
  32. package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.js.map +1 -1
  33. package/esm/models/addlineitemrequest.d.ts +11 -0
  34. package/esm/models/addlineitemrequest.d.ts.map +1 -0
  35. package/esm/models/addlineitemrequest.js +14 -0
  36. package/esm/models/addlineitemrequest.js.map +1 -0
  37. package/esm/models/alertsettings.d.ts +2 -0
  38. package/esm/models/alertsettings.d.ts.map +1 -1
  39. package/esm/models/alertsettings.js +2 -0
  40. package/esm/models/alertsettings.js.map +1 -1
  41. package/esm/models/alertthresholdtype.d.ts +12 -0
  42. package/esm/models/alertthresholdtype.d.ts.map +1 -0
  43. package/esm/models/alertthresholdtype.js +13 -0
  44. package/esm/models/alertthresholdtype.js.map +1 -0
  45. package/esm/models/billingperiodbehaviour.d.ts +14 -0
  46. package/esm/models/billingperiodbehaviour.d.ts.map +1 -0
  47. package/esm/models/billingperiodbehaviour.js +15 -0
  48. package/esm/models/billingperiodbehaviour.js.map +1 -0
  49. package/esm/models/billingperiodconfig.d.ts +11 -0
  50. package/esm/models/billingperiodconfig.d.ts.map +1 -0
  51. package/esm/models/billingperiodconfig.js +14 -0
  52. package/esm/models/billingperiodconfig.js.map +1 -0
  53. package/esm/models/changedinvoice.d.ts.map +1 -1
  54. package/esm/models/changedinvoice.js +1 -1
  55. package/esm/models/changedinvoice.js.map +1 -1
  56. package/esm/models/changedinvoicestatus.d.ts +0 -6
  57. package/esm/models/changedinvoicestatus.d.ts.map +1 -1
  58. package/esm/models/changedinvoicestatus.js +1 -4
  59. package/esm/models/changedinvoicestatus.js.map +1 -1
  60. package/esm/models/checkoutpaymentblock.d.ts +9 -0
  61. package/esm/models/checkoutpaymentblock.d.ts.map +1 -0
  62. package/esm/models/checkoutpaymentblock.js +12 -0
  63. package/esm/models/checkoutpaymentblock.js.map +1 -0
  64. package/esm/models/checkoutpaymentprovider.d.ts +2 -0
  65. package/esm/models/checkoutpaymentprovider.d.ts.map +1 -1
  66. package/esm/models/checkoutpaymentprovider.js +2 -0
  67. package/esm/models/checkoutpaymentprovider.js.map +1 -1
  68. package/esm/models/checkoutpaymentproviderconfig.d.ts +1 -0
  69. package/esm/models/checkoutpaymentproviderconfig.d.ts.map +1 -1
  70. package/esm/models/checkoutpaymentproviderconfig.js +1 -0
  71. package/esm/models/checkoutpaymentproviderconfig.js.map +1 -1
  72. package/esm/models/checkoutsessionresponse.d.ts +5 -14
  73. package/esm/models/checkoutsessionresponse.d.ts.map +1 -1
  74. package/esm/models/checkoutsessionresponse.js +10 -20
  75. package/esm/models/checkoutsessionresponse.js.map +1 -1
  76. package/esm/models/createcustomerrequest.d.ts +2 -0
  77. package/esm/models/createcustomerrequest.d.ts.map +1 -1
  78. package/esm/models/createcustomerrequest.js +2 -0
  79. package/esm/models/createcustomerrequest.js.map +1 -1
  80. package/esm/models/createinvoicerequest.d.ts +0 -2
  81. package/esm/models/createinvoicerequest.d.ts.map +1 -1
  82. package/esm/models/createinvoicerequest.js +0 -2
  83. package/esm/models/createinvoicerequest.js.map +1 -1
  84. package/esm/models/createpricerequest.d.ts +2 -0
  85. package/esm/models/createpricerequest.d.ts.map +1 -1
  86. package/esm/models/createpricerequest.js +2 -0
  87. package/esm/models/createpricerequest.js.map +1 -1
  88. package/esm/models/createsubscriptionrequest.d.ts +1 -0
  89. package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
  90. package/esm/models/createsubscriptionrequest.js +1 -0
  91. package/esm/models/createsubscriptionrequest.js.map +1 -1
  92. package/esm/models/creditgrantapplicationresponse.d.ts +1 -1
  93. package/esm/models/creditgrantapplicationresponse.js +1 -1
  94. package/esm/models/customcurrency.d.ts +13 -0
  95. package/esm/models/customcurrency.d.ts.map +1 -0
  96. package/esm/models/customcurrency.js +15 -0
  97. package/esm/models/customcurrency.js.map +1 -0
  98. package/esm/models/customcurrencylineitem.d.ts +9 -0
  99. package/esm/models/customcurrencylineitem.d.ts.map +1 -0
  100. package/esm/models/customcurrencylineitem.js +11 -0
  101. package/esm/models/customcurrencylineitem.js.map +1 -0
  102. package/esm/models/customer.d.ts +2 -0
  103. package/esm/models/customer.d.ts.map +1 -1
  104. package/esm/models/customer.js +2 -0
  105. package/esm/models/customer.js.map +1 -1
  106. package/esm/models/customerresponse.d.ts +2 -0
  107. package/esm/models/customerresponse.d.ts.map +1 -1
  108. package/esm/models/customerresponse.js +2 -0
  109. package/esm/models/customerresponse.js.map +1 -1
  110. package/esm/models/entitlementresponse.d.ts +1 -1
  111. package/esm/models/entitlementresponse.js +1 -1
  112. package/esm/models/entitychangebehaviour.d.ts +2 -0
  113. package/esm/models/entitychangebehaviour.d.ts.map +1 -1
  114. package/esm/models/entitychangebehaviour.js +2 -0
  115. package/esm/models/entitychangebehaviour.js.map +1 -1
  116. package/esm/models/entitychangepolicy.js +1 -1
  117. package/esm/models/entitychangepolicy.js.map +1 -1
  118. package/esm/models/entitychangeresult.d.ts +2 -2
  119. package/esm/models/entitychangeresult.d.ts.map +1 -1
  120. package/esm/models/entitychangeresult.js +2 -2
  121. package/esm/models/entitychangeresult.js.map +1 -1
  122. package/esm/models/executeinvoicemodifyop.d.ts +12 -0
  123. package/esm/models/executeinvoicemodifyop.d.ts.map +1 -0
  124. package/esm/models/executeinvoicemodifyop.js +16 -0
  125. package/esm/models/executeinvoicemodifyop.js.map +1 -0
  126. package/esm/models/executeinvoicemodifyrequest.d.ts +9 -0
  127. package/esm/models/executeinvoicemodifyrequest.d.ts.map +1 -0
  128. package/esm/models/executeinvoicemodifyrequest.js +11 -0
  129. package/esm/models/executeinvoicemodifyrequest.js.map +1 -0
  130. package/esm/models/getsubscriptionaddonassociationsop.d.ts +2 -2
  131. package/esm/models/getsubscriptionaddonassociationsop.d.ts.map +1 -1
  132. package/esm/models/getsubscriptionaddonassociationsop.js +2 -2
  133. package/esm/models/getsubscriptionaddonassociationsop.js.map +1 -1
  134. package/esm/models/getsubscriptionscheduleop.d.ts +1 -1
  135. package/esm/models/getsubscriptionscheduleop.d.ts.map +1 -1
  136. package/esm/models/getsubscriptionscheduleop.js +1 -1
  137. package/esm/models/getsubscriptionscheduleop.js.map +1 -1
  138. package/esm/models/invoicelineitemresponse.d.ts +2 -0
  139. package/esm/models/invoicelineitemresponse.d.ts.map +1 -1
  140. package/esm/models/invoicelineitemresponse.js +2 -0
  141. package/esm/models/invoicelineitemresponse.js.map +1 -1
  142. package/esm/models/invoicemodifylineitemaction.d.ts +14 -0
  143. package/esm/models/invoicemodifylineitemaction.d.ts.map +1 -0
  144. package/esm/models/invoicemodifylineitemaction.js +15 -0
  145. package/esm/models/invoicemodifylineitemaction.js.map +1 -0
  146. package/esm/models/invoicemodifylineitemparams.d.ts +13 -0
  147. package/esm/models/invoicemodifylineitemparams.d.ts.map +1 -0
  148. package/esm/models/invoicemodifylineitemparams.js +15 -0
  149. package/esm/models/invoicemodifylineitemparams.js.map +1 -0
  150. package/esm/models/invoicemodifyresponse.d.ts +7 -0
  151. package/esm/models/invoicemodifyresponse.d.ts.map +1 -0
  152. package/esm/models/invoicemodifyresponse.js +9 -0
  153. package/esm/models/invoicemodifyresponse.js.map +1 -0
  154. package/esm/models/invoicemodifytype.d.ts +10 -0
  155. package/esm/models/invoicemodifytype.d.ts.map +1 -0
  156. package/esm/models/invoicemodifytype.js +11 -0
  157. package/esm/models/invoicemodifytype.js.map +1 -0
  158. package/esm/models/invoiceresponse.d.ts +6 -0
  159. package/esm/models/invoiceresponse.d.ts.map +1 -1
  160. package/esm/models/invoiceresponse.js +6 -0
  161. package/esm/models/invoiceresponse.js.map +1 -1
  162. package/esm/models/invoicestatus.d.ts +1 -1
  163. package/esm/models/listaddonassociationsresponse.d.ts +9 -0
  164. package/esm/models/listaddonassociationsresponse.d.ts.map +1 -0
  165. package/esm/models/listaddonassociationsresponse.js +11 -0
  166. package/esm/models/listaddonassociationsresponse.js.map +1 -0
  167. package/esm/models/listsubscriptionschedulesop.d.ts +1 -1
  168. package/esm/models/listsubscriptionschedulesop.d.ts.map +1 -1
  169. package/esm/models/listsubscriptionschedulesop.js +1 -1
  170. package/esm/models/listsubscriptionschedulesop.js.map +1 -1
  171. package/esm/models/meteraggregation.js +1 -1
  172. package/esm/models/meteraggregation.js.map +1 -1
  173. package/esm/models/onpendingschedulepolicy.d.ts +12 -0
  174. package/esm/models/onpendingschedulepolicy.d.ts.map +1 -0
  175. package/esm/models/onpendingschedulepolicy.js +13 -0
  176. package/esm/models/onpendingschedulepolicy.js.map +1 -0
  177. package/esm/models/overridelineitemrequest.d.ts +2 -0
  178. package/esm/models/overridelineitemrequest.d.ts.map +1 -1
  179. package/esm/models/overridelineitemrequest.js +2 -0
  180. package/esm/models/overridelineitemrequest.js.map +1 -1
  181. package/esm/models/paymentstatus.d.ts +1 -1
  182. package/esm/models/planpricesyncstatusresponse.d.ts +8 -0
  183. package/esm/models/planpricesyncstatusresponse.d.ts.map +1 -0
  184. package/esm/models/planpricesyncstatusresponse.js +10 -0
  185. package/esm/models/planpricesyncstatusresponse.js.map +1 -0
  186. package/esm/models/planresponse.d.ts +2 -0
  187. package/esm/models/planresponse.d.ts.map +1 -1
  188. package/esm/models/planresponse.js +2 -0
  189. package/esm/models/planresponse.js.map +1 -1
  190. package/esm/models/pricefeatureresponse.d.ts +7 -0
  191. package/esm/models/pricefeatureresponse.d.ts.map +1 -0
  192. package/esm/models/pricefeatureresponse.js +10 -0
  193. package/esm/models/pricefeatureresponse.js.map +1 -0
  194. package/esm/models/priceprice.d.ts +2 -0
  195. package/esm/models/priceprice.d.ts.map +1 -1
  196. package/esm/models/priceprice.js +2 -0
  197. package/esm/models/priceprice.js.map +1 -1
  198. package/esm/models/priceresponse.d.ts +4 -0
  199. package/esm/models/priceresponse.d.ts.map +1 -1
  200. package/esm/models/priceresponse.js +4 -0
  201. package/esm/models/priceresponse.js.map +1 -1
  202. package/esm/models/subscriptionchangebillingperiodresult.d.ts +10 -0
  203. package/esm/models/subscriptionchangebillingperiodresult.d.ts.map +1 -0
  204. package/esm/models/subscriptionchangebillingperiodresult.js +12 -0
  205. package/esm/models/subscriptionchangebillingperiodresult.js.map +1 -0
  206. package/esm/models/subscriptionchangeconflictpolicies.d.ts +7 -0
  207. package/esm/models/subscriptionchangeconflictpolicies.d.ts.map +1 -0
  208. package/esm/models/subscriptionchangeconflictpolicies.js +9 -0
  209. package/esm/models/subscriptionchangeconflictpolicies.js.map +1 -0
  210. package/esm/models/subscriptionchangeentitytype.d.ts +18 -0
  211. package/esm/models/subscriptionchangeentitytype.d.ts.map +1 -0
  212. package/esm/models/subscriptionchangeentitytype.js +19 -0
  213. package/esm/models/subscriptionchangeentitytype.js.map +1 -0
  214. package/esm/models/subscriptionchangev2request.d.ts +6 -0
  215. package/esm/models/subscriptionchangev2request.d.ts.map +1 -1
  216. package/esm/models/subscriptionchangev2request.js +6 -0
  217. package/esm/models/subscriptionchangev2request.js.map +1 -1
  218. package/esm/models/subscriptionchangev2response.d.ts +3 -0
  219. package/esm/models/subscriptionchangev2response.d.ts.map +1 -1
  220. package/esm/models/subscriptionchangev2response.js +3 -0
  221. package/esm/models/subscriptionchangev2response.js.map +1 -1
  222. package/esm/models/subscriptionpricecreaterequest.d.ts +2 -0
  223. package/esm/models/subscriptionpricecreaterequest.d.ts.map +1 -1
  224. package/esm/models/subscriptionpricecreaterequest.js +2 -0
  225. package/esm/models/subscriptionpricecreaterequest.js.map +1 -1
  226. package/esm/models/taxappliedresponse.d.ts +2 -0
  227. package/esm/models/taxappliedresponse.d.ts.map +1 -1
  228. package/esm/models/taxappliedresponse.js +2 -0
  229. package/esm/models/taxappliedresponse.js.map +1 -1
  230. package/esm/models/taxbehavior.d.ts +12 -0
  231. package/esm/models/taxbehavior.d.ts.map +1 -0
  232. package/esm/models/taxbehavior.js +13 -0
  233. package/esm/models/taxbehavior.js.map +1 -0
  234. package/esm/models/taxexemptionreasoncode.d.ts +12 -0
  235. package/esm/models/taxexemptionreasoncode.d.ts.map +1 -0
  236. package/esm/models/taxexemptionreasoncode.js +13 -0
  237. package/esm/models/taxexemptionreasoncode.js.map +1 -0
  238. package/esm/models/taxexemptionsummary.d.ts +8 -0
  239. package/esm/models/taxexemptionsummary.d.ts.map +1 -0
  240. package/esm/models/taxexemptionsummary.js +11 -0
  241. package/esm/models/taxexemptionsummary.js.map +1 -0
  242. package/esm/models/taxrateoverride.d.ts +2 -0
  243. package/esm/models/taxrateoverride.d.ts.map +1 -1
  244. package/esm/models/taxrateoverride.js +2 -0
  245. package/esm/models/taxrateoverride.js.map +1 -1
  246. package/esm/models/taxrateresponse.d.ts +0 -1
  247. package/esm/models/taxrateresponse.d.ts.map +1 -1
  248. package/esm/models/taxrateresponse.js +0 -1
  249. package/esm/models/taxrateresponse.js.map +1 -1
  250. package/esm/models/taxratetype.d.ts +0 -2
  251. package/esm/models/taxratetype.d.ts.map +1 -1
  252. package/esm/models/taxratetype.js +0 -2
  253. package/esm/models/taxratetype.js.map +1 -1
  254. package/esm/models/taxsummary.d.ts +10 -0
  255. package/esm/models/taxsummary.d.ts.map +1 -0
  256. package/esm/models/taxsummary.js +12 -0
  257. package/esm/models/taxsummary.js.map +1 -0
  258. package/esm/models/taxtreatment.d.ts +12 -0
  259. package/esm/models/taxtreatment.d.ts.map +1 -0
  260. package/esm/models/taxtreatment.js +13 -0
  261. package/esm/models/taxtreatment.js.map +1 -0
  262. package/esm/models/updatecustomerrequest.d.ts +2 -0
  263. package/esm/models/updatecustomerrequest.d.ts.map +1 -1
  264. package/esm/models/updatecustomerrequest.js +2 -0
  265. package/esm/models/updatecustomerrequest.js.map +1 -1
  266. package/esm/models/updatelineitemrequest.d.ts +11 -0
  267. package/esm/models/updatelineitemrequest.d.ts.map +1 -0
  268. package/esm/models/updatelineitemrequest.js +13 -0
  269. package/esm/models/updatelineitemrequest.js.map +1 -0
  270. package/esm/models/updatepricerequest.d.ts +2 -0
  271. package/esm/models/updatepricerequest.d.ts.map +1 -1
  272. package/esm/models/updatepricerequest.js +2 -0
  273. package/esm/models/updatepricerequest.js.map +1 -1
  274. package/esm/models/updatesubscriptionlineitemrequest.d.ts +2 -0
  275. package/esm/models/updatesubscriptionlineitemrequest.d.ts.map +1 -1
  276. package/esm/models/updatesubscriptionlineitemrequest.js +2 -0
  277. package/esm/models/updatesubscriptionlineitemrequest.js.map +1 -1
  278. package/esm/tool-names.d.ts.map +1 -1
  279. package/esm/tool-names.js +21 -17
  280. package/esm/tool-names.js.map +1 -1
  281. package/esm/tsconfig.tsbuildinfo +1 -1
  282. package/manifest.json +22 -18
  283. package/package.json +1 -1
  284. package/src/funcs/invoicesExecuteInvoiceModify.ts +153 -0
  285. package/src/funcs/subscriptionsCancelSubscriptionSchedule.ts +1 -1
  286. package/src/funcs/subscriptionsExecuteSubscriptionPlanChangeV2.ts +3 -1
  287. package/src/funcs/subscriptionsGetSubscriptionSchedule.ts +2 -2
  288. package/src/funcs/subscriptionsListAllSubscriptionSchedules.ts +1 -1
  289. package/src/funcs/subscriptionsListSubscriptionSchedules.ts +2 -2
  290. package/src/lib/config.ts +3 -3
  291. package/src/mcp-server/mcp-server.ts +1 -1
  292. package/src/mcp-server/server.ts +7 -5
  293. package/src/mcp-server/tools/invoicesExecuteInvoiceModify.ts +43 -0
  294. package/src/mcp-server/tools/subscriptionsExecuteSubscriptionPlanChangeV2.ts +3 -1
  295. package/src/models/addlineitemrequest.ts +24 -0
  296. package/src/models/alertsettings.ts +6 -0
  297. package/src/models/alertthresholdtype.ts +17 -0
  298. package/src/models/billingperiodbehaviour.ts +19 -0
  299. package/src/models/billingperiodconfig.ts +22 -0
  300. package/src/models/changedinvoice.ts +1 -3
  301. package/src/models/changedinvoicestatus.ts +1 -9
  302. package/src/models/checkoutpaymentblock.ts +19 -0
  303. package/src/models/checkoutpaymentprovider.ts +2 -0
  304. package/src/models/checkoutpaymentproviderconfig.ts +4 -0
  305. package/src/models/checkoutsessionresponse.ts +21 -51
  306. package/src/models/createcustomerrequest.ts +3 -0
  307. package/src/models/createinvoicerequest.ts +0 -8
  308. package/src/models/createpricerequest.ts +3 -0
  309. package/src/models/createsubscriptionrequest.ts +4 -0
  310. package/src/models/creditgrantapplicationresponse.ts +2 -2
  311. package/src/models/customcurrency.ts +29 -0
  312. package/src/models/customcurrencylineitem.ts +21 -0
  313. package/src/models/customer.ts +3 -0
  314. package/src/models/customerresponse.ts +3 -0
  315. package/src/models/entitlementresponse.ts +2 -2
  316. package/src/models/entitychangebehaviour.ts +2 -0
  317. package/src/models/entitychangepolicy.ts +1 -1
  318. package/src/models/entitychangeresult.ts +5 -5
  319. package/src/models/executeinvoicemodifyop.ts +37 -0
  320. package/src/models/executeinvoicemodifyrequest.ts +25 -0
  321. package/src/models/getsubscriptionaddonassociationsop.ts +6 -6
  322. package/src/models/getsubscriptionscheduleop.ts +2 -2
  323. package/src/models/invoicelineitemresponse.ts +6 -0
  324. package/src/models/invoicemodifylineitemaction.ts +21 -0
  325. package/src/models/invoicemodifylineitemparams.ts +41 -0
  326. package/src/models/invoicemodifyresponse.ts +16 -0
  327. package/src/models/invoicemodifytype.ts +15 -0
  328. package/src/models/invoiceresponse.ts +12 -0
  329. package/src/models/listaddonassociationsresponse.ts +25 -0
  330. package/src/models/listsubscriptionschedulesop.ts +2 -2
  331. package/src/models/meteraggregation.ts +1 -1
  332. package/src/models/onpendingschedulepolicy.ts +19 -0
  333. package/src/models/overridelineitemrequest.ts +3 -0
  334. package/src/models/planpricesyncstatusresponse.ts +19 -0
  335. package/src/models/planresponse.ts +6 -0
  336. package/src/models/pricefeatureresponse.ts +15 -0
  337. package/src/models/priceprice.ts +3 -0
  338. package/src/models/priceresponse.ts +9 -0
  339. package/src/models/subscriptionchangebillingperiodresult.ts +25 -0
  340. package/src/models/subscriptionchangeconflictpolicies.ts +19 -0
  341. package/src/models/subscriptionchangeentitytype.ts +25 -0
  342. package/src/models/subscriptionchangev2request.ts +18 -0
  343. package/src/models/subscriptionchangev2response.ts +10 -0
  344. package/src/models/subscriptionpricecreaterequest.ts +3 -0
  345. package/src/models/taxappliedresponse.ts +3 -0
  346. package/src/models/taxbehavior.ts +17 -0
  347. package/src/models/taxexemptionreasoncode.ts +17 -0
  348. package/src/models/taxexemptionsummary.ts +20 -0
  349. package/src/models/taxrateoverride.ts +3 -0
  350. package/src/models/taxrateresponse.ts +0 -2
  351. package/src/models/taxratetype.ts +0 -2
  352. package/src/models/taxsummary.ts +23 -0
  353. package/src/models/taxtreatment.ts +17 -0
  354. package/src/models/updatecustomerrequest.ts +3 -0
  355. package/src/models/updatelineitemrequest.ts +24 -0
  356. package/src/models/updatepricerequest.ts +3 -0
  357. package/src/models/updatesubscriptionlineitemrequest.ts +3 -0
  358. package/src/tool-names.ts +21 -17
  359. package/esm/models/addaddonparams.d.ts +0 -8
  360. package/esm/models/addaddonparams.d.ts.map +0 -1
  361. package/esm/models/addaddonparams.js +0 -10
  362. package/esm/models/addaddonparams.js.map +0 -1
  363. package/esm/models/addaddonref.d.ts +0 -12
  364. package/esm/models/addaddonref.d.ts.map +0 -1
  365. package/esm/models/addaddonref.js +0 -14
  366. package/esm/models/addaddonref.js.map +0 -1
  367. package/esm/models/checkoutjsonbcheckoutconfiguration.d.ts +0 -13
  368. package/esm/models/checkoutjsonbcheckoutconfiguration.d.ts.map +0 -1
  369. package/esm/models/checkoutjsonbcheckoutconfiguration.js +0 -15
  370. package/esm/models/checkoutjsonbcheckoutconfiguration.js.map +0 -1
  371. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.d.ts +0 -10
  372. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.d.ts.map +0 -1
  373. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.js +0 -12
  374. package/esm/models/checkoutjsonbcheckoutpaymentproviderconfig.js.map +0 -1
  375. package/esm/models/checkoutjsonbcheckoutproviderresult.d.ts +0 -13
  376. package/esm/models/checkoutjsonbcheckoutproviderresult.d.ts.map +0 -1
  377. package/esm/models/checkoutjsonbcheckoutproviderresult.js +0 -13
  378. package/esm/models/checkoutjsonbcheckoutproviderresult.js.map +0 -1
  379. package/esm/models/checkoutjsonbcheckoutresult.d.ts +0 -7
  380. package/esm/models/checkoutjsonbcheckoutresult.d.ts.map +0 -1
  381. package/esm/models/checkoutjsonbcheckoutresult.js +0 -9
  382. package/esm/models/checkoutjsonbcheckoutresult.js.map +0 -1
  383. package/esm/models/createsubscriptionparams.d.ts +0 -16
  384. package/esm/models/createsubscriptionparams.d.ts.map +0 -1
  385. package/esm/models/createsubscriptionparams.js +0 -16
  386. package/esm/models/createsubscriptionparams.js.map +0 -1
  387. package/esm/models/createsubscriptionresult.d.ts +0 -8
  388. package/esm/models/createsubscriptionresult.d.ts.map +0 -1
  389. package/esm/models/createsubscriptionresult.js +0 -10
  390. package/esm/models/createsubscriptionresult.js.map +0 -1
  391. package/esm/models/modifysubscriptionlineitem.d.ts +0 -8
  392. package/esm/models/modifysubscriptionlineitem.d.ts.map +0 -1
  393. package/esm/models/modifysubscriptionlineitem.js +0 -10
  394. package/esm/models/modifysubscriptionlineitem.js.map +0 -1
  395. package/esm/models/modifysubscriptionparams.d.ts +0 -8
  396. package/esm/models/modifysubscriptionparams.d.ts.map +0 -1
  397. package/esm/models/modifysubscriptionparams.js +0 -11
  398. package/esm/models/modifysubscriptionparams.js.map +0 -1
  399. package/esm/models/wallettopupparams.d.ts +0 -7
  400. package/esm/models/wallettopupparams.d.ts.map +0 -1
  401. package/esm/models/wallettopupparams.js +0 -10
  402. package/esm/models/wallettopupparams.js.map +0 -1
  403. package/src/models/addaddonparams.ts +0 -16
  404. package/src/models/addaddonref.ts +0 -26
  405. package/src/models/checkoutjsonbcheckoutconfiguration.ts +0 -34
  406. package/src/models/checkoutjsonbcheckoutpaymentproviderconfig.ts +0 -27
  407. package/src/models/checkoutjsonbcheckoutproviderresult.ts +0 -32
  408. package/src/models/checkoutjsonbcheckoutresult.ts +0 -19
  409. package/src/models/createsubscriptionparams.ts +0 -30
  410. package/src/models/createsubscriptionresult.ts +0 -19
  411. package/src/models/modifysubscriptionlineitem.ts +0 -19
  412. package/src/models/modifysubscriptionparams.ts +0 -22
  413. package/src/models/wallettopupparams.ts +0 -16
package/manifest.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "sensitive": true
49
49
  }
50
50
  },
51
- "version": "2.1.25",
51
+ "version": "2.1.30",
52
52
  "tools": [
53
53
  {
54
54
  "name": "update-customer",
@@ -126,6 +126,10 @@
126
126
  "name": "finalize-invoice",
127
127
  "description": "Finalize invoice\n\nUse when locking an invoice for payment (e.g. after review). Once finalized, line items are locked; invoice can be paid or voided."
128
128
  },
129
+ {
130
+ "name": "execute-invoice-modify",
131
+ "description": "Execute invoice modification\n\nExecute a modification on a draft or finalized invoice. Supports line item changes: add (bulk), update (one line item per call; the edit is versioned, so the line item id changes), and remove (bulk, soft delete). Totals are recalculated from the remaining line items; a manual edit marks the invoice as manually edited, which disables recompute. Modifying a FINALIZED invoice voids it and recreates it as a draft copy carrying all current data (description, billing period, due date, metadata, line items); the modification lands on the copy and the response returns the new draft — chain subsequent calls to the returned invoice id; a call that still targets the voided original is rejected with an error naming the replacement."
132
+ },
129
133
  {
130
134
  "name": "update-invoice-payment-status",
131
135
  "description": "Update invoice payment status\n\nUse when reconciling payment status from an external gateway or manual entry (e.g. mark paid after bank confirmation)."
@@ -262,6 +266,18 @@
262
266
  "name": "delete-subscription-line-item",
263
267
  "description": "Delete subscription line item\n\nUse when removing a charge or seat from a subscription (e.g. downgrade). Line item ends; retained for history but no longer billed."
264
268
  },
269
+ {
270
+ "name": "list-all-subscription-schedules",
271
+ "description": "List all subscription schedules\n\nUse when listing or searching scheduled changes across subscriptions (e.g. admin view). Returns schedules with optional filtering."
272
+ },
273
+ {
274
+ "name": "get-subscription-schedule",
275
+ "description": "Get subscription schedule\n\nUse when you need to load a single scheduled change (e.g. to show when a plan change or renewal takes effect)."
276
+ },
277
+ {
278
+ "name": "cancel-subscription-schedule",
279
+ "description": "Cancel subscription schedule\n\nUse when cancelling a scheduled change (e.g. customer changed mind). Identify by schedule ID in path or by subscription ID + schedule type in body."
280
+ },
265
281
  {
266
282
  "name": "query-subscription",
267
283
  "description": "Query subscriptions\n\nUse when listing or searching subscriptions (e.g. admin view or customer subscription list). Returns a paginated list; supports filtering by customer, plan, status."
@@ -300,7 +316,7 @@
300
316
  },
301
317
  {
302
318
  "name": "execute-subscription-plan-change-v2",
303
- "description": "Execute a plan change (v2, swap in place)\n\nChange a subscription's plan in place. Subscription id, billing anchor and period bounds are preserved; line items are sliced and settled in one transaction.\n\nchange_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.\n\nscheduled_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.\n\nOnly 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."
319
+ "description": "Execute a plan change (v2, swap in place)\n\nChange a subscription's plan in place. Subscription id, billing anchor and period bounds are preserved; line items are sliced and settled in one transaction.\n\nchange_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.\n\nscheduled_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.\n\nOnly one plan change may be pending per subscription. By default (on_conflict_policies.on_pending_schedule = 'reject') a second request returns 400; cancel the existing schedule via POST /subscriptions/schedules/{schedule_id}/cancel first. Pending schedules are listable via GET /subscriptions/{id}/schedules.\n\nSet on_conflict_policies.on_pending_schedule to 'supersede' to replace the queued change instead: the pending schedule is cancelled and this request applied in the same transaction, so both land or neither does. The cancelled schedule ids are returned in superseded_schedules, and preview reports the same list without writing."
304
320
  },
305
321
  {
306
322
  "name": "preview-subscription-plan-change-v2",
@@ -326,25 +342,13 @@
326
342
  "name": "preview-subscription-modify",
327
343
  "description": "Preview subscription modification\n\nPreview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, tax, or addon add/remove) without committing changes."
328
344
  },
329
- {
330
- "name": "get-subscription-v2",
331
- "description": "Get subscription (V2)\n\nUse when you need a subscription with related data (line items, prices, plan). Supports expand for detailed payloads without extra round-trips."
332
- },
333
- {
334
- "name": "list-all-subscription-schedules",
335
- "description": "List all subscription schedules\n\nUse when listing or searching scheduled changes across subscriptions (e.g. admin view). Returns schedules with optional filtering."
336
- },
337
- {
338
- "name": "get-subscription-schedule",
339
- "description": "Get subscription schedule\n\nUse when you need to load a single scheduled change (e.g. to show when a plan change or renewal takes effect)."
340
- },
341
- {
342
- "name": "cancel-subscription-schedule",
343
- "description": "Cancel subscription schedule\n\nUse when cancelling a scheduled change (e.g. customer changed mind). Identify by schedule ID in path or by subscription ID + schedule type in body."
344
- },
345
345
  {
346
346
  "name": "list-subscription-schedules",
347
347
  "description": "List subscription schedules\n\nUse when listing scheduled changes for a subscription (e.g. upcoming plan change or renewal). Returns all schedules for that subscription."
348
+ },
349
+ {
350
+ "name": "get-subscription-v2",
351
+ "description": "Get subscription (V2)\n\nUse when you need a subscription with related data (line items, prices, plan). Supports expand for detailed payloads without extra round-trips."
348
352
  }
349
353
  ]
350
354
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexprice/mcp-server",
3
- "version": "2.1.25",
3
+ "version": "2.1.30",
4
4
  "author": "flexprice",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -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
+ ExecuteInvoiceModifyRequestRequest,
23
+ ExecuteInvoiceModifyRequestRequest$zodSchema,
24
+ } from "../models/executeinvoicemodifyop.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Execute invoice modification
30
+ *
31
+ * @remarks
32
+ * Execute a modification on a draft or finalized invoice. Supports line item changes: add (bulk), update (one line item per call; the edit is versioned, so the line item id changes), and remove (bulk, soft delete). Totals are recalculated from the remaining line items; a manual edit marks the invoice as manually edited, which disables recompute. Modifying a FINALIZED invoice voids it and recreates it as a draft copy carrying all current data (description, billing period, due date, metadata, line items); the modification lands on the copy and the response returns the new draft — chain subsequent calls to the returned invoice id; a call that still targets the voided original is rejected with an error naming the replacement.
33
+ */
34
+ export function invoicesExecuteInvoiceModify(
35
+ client$: FlexpriceCore,
36
+ request: ExecuteInvoiceModifyRequestRequest,
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: ExecuteInvoiceModifyRequestRequest,
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$) => ExecuteInvoiceModifyRequestRequest$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("/invoices/{id}/modify/execute")(
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: "executeInvoiceModify",
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
+ }
@@ -90,7 +90,7 @@ async function $do(
90
90
  charEncoding: "percent",
91
91
  }),
92
92
  };
93
- const path$ = pathToFunc("/v1/subscriptions/schedules/{schedule_id}/cancel")(
93
+ const path$ = pathToFunc("/subscriptions/schedules/{schedule_id}/cancel")(
94
94
  pathParams$,
95
95
  );
96
96
 
@@ -35,7 +35,9 @@ import { Result } from "../types/fp.js";
35
35
  *
36
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
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.
38
+ * Only one plan change may be pending per subscription. By default (on_conflict_policies.on_pending_schedule = 'reject') a second request 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
+ * Set on_conflict_policies.on_pending_schedule to 'supersede' to replace the queued change instead: the pending schedule is cancelled and this request applied in the same transaction, so both land or neither does. The cancelled schedule ids are returned in superseded_schedules, and preview reports the same list without writing.
39
41
  */
40
42
  export function subscriptionsExecuteSubscriptionPlanChangeV2(
41
43
  client$: FlexpriceCore,
@@ -85,12 +85,12 @@ async function $do(
85
85
  const body$ = null;
86
86
 
87
87
  const pathParams$ = {
88
- id: encodeSimple("id", payload$.id, {
88
+ schedule_id: encodeSimple("schedule_id", payload$.schedule_id, {
89
89
  explode: false,
90
90
  charEncoding: "percent",
91
91
  }),
92
92
  };
93
- const path$ = pathToFunc("/v1/subscription-schedules/{id}")(
93
+ const path$ = pathToFunc("/subscriptions/schedules/{schedule_id}")(
94
94
  pathParams$,
95
95
  );
96
96
 
@@ -84,7 +84,7 @@ async function $do(
84
84
  }
85
85
  const payload$ = parsed$.value;
86
86
  const body$ = null;
87
- const path$ = pathToFunc("/v1/subscription-schedules")();
87
+ const path$ = pathToFunc("/subscriptions/schedules")();
88
88
  const query$ = encodeFormQuery({
89
89
  "limit": payload$?.limit,
90
90
  "offset": payload$?.offset,
@@ -85,12 +85,12 @@ async function $do(
85
85
  const body$ = null;
86
86
 
87
87
  const pathParams$ = {
88
- subscription_id: encodeSimple("subscription_id", payload$.subscription_id, {
88
+ id: encodeSimple("id", payload$.id, {
89
89
  explode: false,
90
90
  charEncoding: "percent",
91
91
  }),
92
92
  };
93
- const path$ = pathToFunc("/v1/subscriptions/{subscription_id}/schedules")(
93
+ const path$ = pathToFunc("/subscriptions/{id}/schedules")(
94
94
  pathParams$,
95
95
  );
96
96
 
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.25",
73
- genVersion: "2.931.0",
72
+ sdkVersion: "2.1.30",
73
+ genVersion: "2.935.1",
74
74
  userAgent:
75
- "speakeasy-sdk/mcp-typescript 2.1.25 2.931.0 1.0 @flexprice/mcp-server",
75
+ "speakeasy-sdk/mcp-typescript 2.1.30 2.935.1 1.0 @flexprice/mcp-server",
76
76
  } as const;
@@ -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.25",
24
+ currentVersion: "2.1.30",
25
25
  },
26
26
  });
27
27
 
@@ -38,6 +38,7 @@ import { tool$eventsIngestEventsBulk } from "./tools/eventsIngestEventsBulk.js";
38
38
  import { tool$eventsListRawEvents } from "./tools/eventsListRawEvents.js";
39
39
  import { tool$invoicesAttemptInvoicePayment } from "./tools/invoicesAttemptInvoicePayment.js";
40
40
  import { tool$invoicesCreateInvoice } from "./tools/invoicesCreateInvoice.js";
41
+ import { tool$invoicesExecuteInvoiceModify } from "./tools/invoicesExecuteInvoiceModify.js";
41
42
  import { tool$invoicesFinalizeInvoice } from "./tools/invoicesFinalizeInvoice.js";
42
43
  import { tool$invoicesGetCustomerInvoiceSummary } from "./tools/invoicesGetCustomerInvoiceSummary.js";
43
44
  import { tool$invoicesGetInvoice } from "./tools/invoicesGetInvoice.js";
@@ -105,7 +106,7 @@ export function createMCPServer(deps: {
105
106
  }) {
106
107
  const server = new McpServer({
107
108
  name: "Flexprice",
108
- version: "2.1.25",
109
+ version: "2.1.30",
109
110
  });
110
111
 
111
112
  const getClient = deps.getSDK || (() =>
@@ -169,6 +170,7 @@ export function createMCPServer(deps: {
169
170
  tool(tool$invoicesUpdateInvoice);
170
171
  tool(tool$invoicesTriggerInvoiceCommsWebhook);
171
172
  tool(tool$invoicesFinalizeInvoice);
173
+ tool(tool$invoicesExecuteInvoiceModify);
172
174
  tool(tool$invoicesUpdateInvoicePaymentStatus);
173
175
  tool(tool$invoicesAttemptInvoicePayment);
174
176
  tool(tool$invoicesGetInvoicePdf);
@@ -203,6 +205,9 @@ export function createMCPServer(deps: {
203
205
  tool(tool$subscriptionsQuerySubscriptionLineItems);
204
206
  tool(tool$subscriptionsUpdateSubscriptionLineItem);
205
207
  tool(tool$subscriptionsDeleteSubscriptionLineItem);
208
+ tool(tool$subscriptionsListAllSubscriptionSchedules);
209
+ tool(tool$subscriptionsGetSubscriptionSchedule);
210
+ tool(tool$subscriptionsCancelSubscriptionSchedule);
206
211
  tool(tool$subscriptionsQuerySubscription);
207
212
  tool(tool$subscriptionsGetSubscriptionUsage);
208
213
  tool(tool$subscriptionsGetSubscription);
@@ -219,11 +224,8 @@ export function createMCPServer(deps: {
219
224
  tool(tool$subscriptionsCreateSubscriptionLineItem);
220
225
  tool(tool$subscriptionsExecuteSubscriptionModify);
221
226
  tool(tool$subscriptionsPreviewSubscriptionModify);
222
- tool(tool$subscriptionsGetSubscriptionV2);
223
- tool(tool$subscriptionsListAllSubscriptionSchedules);
224
- tool(tool$subscriptionsGetSubscriptionSchedule);
225
- tool(tool$subscriptionsCancelSubscriptionSchedule);
226
227
  tool(tool$subscriptionsListSubscriptionSchedules);
228
+ tool(tool$subscriptionsGetSubscriptionV2);
227
229
 
228
230
  if (deps.dynamic) {
229
231
  registerDynamicTools(deps.logger, server, getClient, toolMap, scopes);
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { invoicesExecuteInvoiceModify } from "../../funcs/invoicesExecuteInvoiceModify.js";
6
+ import { ExecuteInvoiceModifyRequestRequest$zodSchema } from "../../models/executeinvoicemodifyop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: ExecuteInvoiceModifyRequestRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$invoicesExecuteInvoiceModify: ToolDefinition<typeof args> = {
14
+ name: "execute-invoice-modify",
15
+ description: `Execute invoice modification
16
+
17
+ Execute a modification on a draft or finalized invoice. Supports line item changes: add (bulk), update (one line item per call; the edit is versioned, so the line item id changes), and remove (bulk, soft delete). Totals are recalculated from the remaining line items; a manual edit marks the invoice as manually edited, which disables recompute. Modifying a FINALIZED invoice voids it and recreates it as a draft copy carrying all current data (description, billing period, due date, metadata, line items); the modification lands on the copy and the response returns the new draft — chain subsequent calls to the returned invoice id; a call that still targets the voided original is rejected with an error naming the replacement.`,
18
+ scopes: ["write"],
19
+ annotations: {
20
+ "title": "",
21
+ "destructiveHint": false,
22
+ "idempotentHint": false,
23
+ "openWorldHint": false,
24
+ "readOnlyHint": false,
25
+ },
26
+ args,
27
+ tool: async (client, args, ctx) => {
28
+ const [result] = await invoicesExecuteInvoiceModify(
29
+ client,
30
+ args.request,
31
+ { fetchOptions: { signal: ctx.signal } },
32
+ ).$inspect();
33
+
34
+ if (!result.ok) {
35
+ return {
36
+ content: [{ type: "text", text: result.error.message }],
37
+ isError: true,
38
+ };
39
+ }
40
+
41
+ return formatResult(result.value);
42
+ },
43
+ };
@@ -22,7 +22,9 @@ change_at controls timing. Omitted or 'immediate' applies the change now. 'end_o
22
22
 
23
23
  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.
24
24
 
25
- 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.`,
25
+ Only one plan change may be pending per subscription. By default (on_conflict_policies.on_pending_schedule = 'reject') a second request returns 400; cancel the existing schedule via POST /subscriptions/schedules/{schedule_id}/cancel first. Pending schedules are listable via GET /subscriptions/{id}/schedules.
26
+
27
+ Set on_conflict_policies.on_pending_schedule to 'supersede' to replace the queued change instead: the pending schedule is cancelled and this request applied in the same transaction, so both land or neither does. The cancelled schedule ids are returned in superseded_schedules, and preview reports the same list without writing.`,
26
28
  scopes: ["write"],
27
29
  annotations: {
28
30
  "title": "",
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type AddLineItemRequest = {
8
+ amount: string;
9
+ description?: string | undefined;
10
+ display_name: string;
11
+ period_end?: string | undefined;
12
+ period_start?: string | undefined;
13
+ quantity: string;
14
+ };
15
+
16
+ export const AddLineItemRequest$zodSchema: z.ZodType<AddLineItemRequest> = z
17
+ .object({
18
+ amount: z.string(),
19
+ description: z.string().optional(),
20
+ display_name: z.string(),
21
+ period_end: z.iso.datetime({ offset: true }).optional(),
22
+ period_start: z.iso.datetime({ offset: true }).optional(),
23
+ quantity: z.string(),
24
+ });
@@ -4,9 +4,14 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { AlertThreshold, AlertThreshold$zodSchema } from "./alertthreshold.js";
7
+ import {
8
+ AlertThresholdType,
9
+ AlertThresholdType$zodSchema,
10
+ } from "./alertthresholdtype.js";
7
11
 
8
12
  export type AlertSettings = {
9
13
  alert_enabled?: boolean | undefined;
14
+ alert_threshold_type?: AlertThresholdType | undefined;
10
15
  critical?: AlertThreshold | undefined;
11
16
  info?: AlertThreshold | undefined;
12
17
  warning?: AlertThreshold | undefined;
@@ -14,6 +19,7 @@ export type AlertSettings = {
14
19
 
15
20
  export const AlertSettings$zodSchema: z.ZodType<AlertSettings> = z.object({
16
21
  alert_enabled: z.boolean().optional(),
22
+ alert_threshold_type: AlertThresholdType$zodSchema.optional(),
17
23
  critical: AlertThreshold$zodSchema.optional(),
18
24
  info: AlertThreshold$zodSchema.optional(),
19
25
  warning: AlertThreshold$zodSchema.optional(),
@@ -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 AlertThresholdType = {
9
+ Absolute: "absolute",
10
+ Percentage: "percentage",
11
+ } as const;
12
+ export type AlertThresholdType = ClosedEnum<typeof AlertThresholdType>;
13
+
14
+ export const AlertThresholdType$zodSchema = z.enum([
15
+ "absolute",
16
+ "percentage",
17
+ ]);
@@ -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
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ export const BillingPeriodBehaviour = {
9
+ Unchanged: "unchanged",
10
+ AnchorAtEffect: "anchor_at_effect",
11
+ AnchorAtConfig: "anchor_at_config",
12
+ } as const;
13
+ export type BillingPeriodBehaviour = ClosedEnum<typeof BillingPeriodBehaviour>;
14
+
15
+ export const BillingPeriodBehaviour$zodSchema = z.enum([
16
+ "unchanged",
17
+ "anchor_at_effect",
18
+ "anchor_at_config",
19
+ ]);
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { BillingCycle, BillingCycle$zodSchema } from "./billingcycle.js";
7
+ import { BillingPeriod, BillingPeriod$zodSchema } from "./billingperiod.js";
8
+
9
+ export type BillingPeriodConfig = {
10
+ billing_anchor?: string | undefined;
11
+ billing_cycle?: BillingCycle | undefined;
12
+ billing_period_count?: number | undefined;
13
+ billing_period_unit?: BillingPeriod | undefined;
14
+ };
15
+
16
+ export const BillingPeriodConfig$zodSchema: z.ZodType<BillingPeriodConfig> = z
17
+ .object({
18
+ billing_anchor: z.iso.datetime({ offset: true }).optional(),
19
+ billing_cycle: BillingCycle$zodSchema.optional(),
20
+ billing_period_count: z.int().optional(),
21
+ billing_period_unit: BillingPeriod$zodSchema.optional(),
22
+ });
@@ -34,8 +34,6 @@ export const ChangedInvoice$zodSchema: z.ZodType<ChangedInvoice> = z.object({
34
34
  ),
35
35
  id: z.string().optional(),
36
36
  invoice: InvoiceResponse$zodSchema.optional(),
37
- status: ChangedInvoiceStatus$zodSchema.optional().describe(
38
- "preview | issued | INITIATED | PENDING | PROCESSING | SUCCEEDED | OVERPAID | FAILED | REFUNDED | PARTIALLY_REFUNDED",
39
- ),
37
+ status: ChangedInvoiceStatus$zodSchema.optional(),
40
38
  wallet_transaction: WalletTransactionResponse$zodSchema.optional(),
41
39
  });
@@ -5,21 +5,13 @@
5
5
  import * as z from "zod";
6
6
  import { ClosedEnum } from "../types/enums.js";
7
7
 
8
- /**
9
- * preview | issued | INITIATED | PENDING | PROCESSING | SUCCEEDED | OVERPAID | FAILED | REFUNDED | PARTIALLY_REFUNDED
10
- */
11
8
  export const ChangedInvoiceStatus = {
12
9
  Preview: "preview",
13
10
  Issued: "issued",
14
11
  } as const;
15
- /**
16
- * preview | issued | INITIATED | PENDING | PROCESSING | SUCCEEDED | OVERPAID | FAILED | REFUNDED | PARTIALLY_REFUNDED
17
- */
18
12
  export type ChangedInvoiceStatus = ClosedEnum<typeof ChangedInvoiceStatus>;
19
13
 
20
14
  export const ChangedInvoiceStatus$zodSchema = z.enum([
21
15
  "preview",
22
16
  "issued",
23
- ]).describe(
24
- "preview | issued | INITIATED | PENDING | PROCESSING | SUCCEEDED | OVERPAID | FAILED | REFUNDED | PARTIALLY_REFUNDED",
25
- );
17
+ ]);
@@ -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
+ import { PaymentStatus, PaymentStatus$zodSchema } from "./paymentstatus.js";
7
+
8
+ export type CheckoutPaymentBlock = {
9
+ gateway?: string | undefined;
10
+ id?: string | undefined;
11
+ status?: PaymentStatus | undefined;
12
+ };
13
+
14
+ export const CheckoutPaymentBlock$zodSchema: z.ZodType<CheckoutPaymentBlock> = z
15
+ .object({
16
+ gateway: z.string().optional(),
17
+ id: z.string().optional(),
18
+ status: PaymentStatus$zodSchema.optional(),
19
+ });
@@ -7,6 +7,7 @@ import { ClosedEnum } from "../types/enums.js";
7
7
 
8
8
  export const CheckoutPaymentProvider = {
9
9
  Razorpay: "razorpay",
10
+ Chargebee: "chargebee",
10
11
  } as const;
11
12
  export type CheckoutPaymentProvider = ClosedEnum<
12
13
  typeof CheckoutPaymentProvider
@@ -14,4 +15,5 @@ export type CheckoutPaymentProvider = ClosedEnum<
14
15
 
15
16
  export const CheckoutPaymentProvider$zodSchema = z.enum([
16
17
  "razorpay",
18
+ "chargebee",
17
19
  ]);
@@ -14,6 +14,7 @@ import {
14
14
 
15
15
  export type CheckoutPaymentProviderConfig = {
16
16
  collection_method?: CollectionMethod | undefined;
17
+ customer_not_present?: boolean | undefined;
17
18
  max_mandate_limit?: string | undefined;
18
19
  payment_method?: PaymentMethodType | undefined;
19
20
  };
@@ -22,6 +23,9 @@ export const CheckoutPaymentProviderConfig$zodSchema: z.ZodType<
22
23
  CheckoutPaymentProviderConfig
23
24
  > = z.object({
24
25
  collection_method: CollectionMethod$zodSchema.optional(),
26
+ customer_not_present: z.boolean().optional().describe(
27
+ "CustomerNotPresent is the unattended/MIT opt-in. Zero value (omitted) means\nthe customer is present, so a missed auto-charge may fall back to a hosted\nauthorization link. Set true only from merchant-initiated paths (auto top-up).",
28
+ ),
25
29
  max_mandate_limit: z.string().optional(),
26
30
  payment_method: PaymentMethodType$zodSchema.optional(),
27
31
  });