@flexprice/mcp-server 2.1.10 → 2.1.17

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 (134) hide show
  1. package/bin/mcp-server.js +720 -610
  2. package/bin/mcp-server.js.map +33 -31
  3. package/bun.lock +26 -24
  4. package/esm/lib/config.d.ts +3 -3
  5. package/esm/lib/config.js +3 -3
  6. package/esm/mcp-server/mcp-server.js +1 -1
  7. package/esm/mcp-server/server.d.ts.map +1 -1
  8. package/esm/mcp-server/server.js +1 -3
  9. package/esm/mcp-server/server.js.map +1 -1
  10. package/esm/models/changedsubscription.d.ts +2 -0
  11. package/esm/models/changedsubscription.d.ts.map +1 -1
  12. package/esm/models/changedsubscription.js +2 -0
  13. package/esm/models/changedsubscription.js.map +1 -1
  14. package/esm/models/createinvoicelineitemrequest.d.ts +3 -0
  15. package/esm/models/createinvoicelineitemrequest.d.ts.map +1 -1
  16. package/esm/models/createinvoicelineitemrequest.js +3 -0
  17. package/esm/models/createinvoicelineitemrequest.js.map +1 -1
  18. package/esm/models/createinvoicerequest.d.ts +1 -0
  19. package/esm/models/createinvoicerequest.d.ts.map +1 -1
  20. package/esm/models/createinvoicerequest.js +1 -0
  21. package/esm/models/createinvoicerequest.js.map +1 -1
  22. package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
  23. package/esm/models/entityintegrationmappingresponse.d.ts +3 -0
  24. package/esm/models/entityintegrationmappingresponse.d.ts.map +1 -1
  25. package/esm/models/entityintegrationmappingresponse.js +1 -0
  26. package/esm/models/entityintegrationmappingresponse.js.map +1 -1
  27. package/esm/models/errorcode.d.ts +32 -0
  28. package/esm/models/errorcode.d.ts.map +1 -0
  29. package/esm/models/errorcode.js +33 -0
  30. package/esm/models/errorcode.js.map +1 -0
  31. package/esm/models/errorresponse.d.ts +2 -34
  32. package/esm/models/errorresponse.d.ts.map +1 -1
  33. package/esm/models/errorresponse.js +2 -29
  34. package/esm/models/errorresponse.js.map +1 -1
  35. package/esm/models/executesubscriptionmodifyrequest.d.ts +2 -0
  36. package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
  37. package/esm/models/executesubscriptionmodifyrequest.js +2 -0
  38. package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
  39. package/esm/models/invoicebillingreason.d.ts +2 -0
  40. package/esm/models/invoicebillingreason.d.ts.map +1 -1
  41. package/esm/models/invoicebillingreason.js +2 -0
  42. package/esm/models/invoicebillingreason.js.map +1 -1
  43. package/esm/models/invoicefilter.d.ts +3 -0
  44. package/esm/models/invoicefilter.d.ts.map +1 -1
  45. package/esm/models/invoicefilter.js +3 -0
  46. package/esm/models/invoicefilter.js.map +1 -1
  47. package/esm/models/invoicelineitemresponse.d.ts +2 -0
  48. package/esm/models/invoicelineitemresponse.d.ts.map +1 -1
  49. package/esm/models/invoicelineitemresponse.js +2 -0
  50. package/esm/models/invoicelineitemresponse.js.map +1 -1
  51. package/esm/models/invoiceresponse.d.ts +1 -0
  52. package/esm/models/invoiceresponse.d.ts.map +1 -1
  53. package/esm/models/invoiceresponse.js +1 -0
  54. package/esm/models/invoiceresponse.js.map +1 -1
  55. package/esm/models/priceprice.d.ts +1 -0
  56. package/esm/models/priceprice.d.ts.map +1 -1
  57. package/esm/models/priceprice.js +1 -0
  58. package/esm/models/priceprice.js.map +1 -1
  59. package/esm/models/priceresponse.d.ts +1 -0
  60. package/esm/models/priceresponse.d.ts.map +1 -1
  61. package/esm/models/priceresponse.js +1 -0
  62. package/esm/models/priceresponse.js.map +1 -1
  63. package/esm/models/submodifytrialendrequest.d.ts +8 -0
  64. package/esm/models/submodifytrialendrequest.d.ts.map +1 -0
  65. package/esm/models/submodifytrialendrequest.js +10 -0
  66. package/esm/models/submodifytrialendrequest.js.map +1 -0
  67. package/esm/models/subscriptionmodifytype.d.ts +2 -0
  68. package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
  69. package/esm/models/subscriptionmodifytype.js +2 -0
  70. package/esm/models/subscriptionmodifytype.js.map +1 -1
  71. package/esm/models/subscriptionresponse.d.ts +1 -0
  72. package/esm/models/subscriptionresponse.d.ts.map +1 -1
  73. package/esm/models/subscriptionresponse.js +1 -0
  74. package/esm/models/subscriptionresponse.js.map +1 -1
  75. package/esm/models/subscriptionresponsev2.d.ts +2 -0
  76. package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
  77. package/esm/models/subscriptionresponsev2.js +2 -0
  78. package/esm/models/subscriptionresponsev2.js.map +1 -1
  79. package/esm/models/trialendaction.d.ts +12 -0
  80. package/esm/models/trialendaction.d.ts.map +1 -0
  81. package/esm/models/trialendaction.js +13 -0
  82. package/esm/models/trialendaction.js.map +1 -0
  83. package/esm/models/userresponse.d.ts +3 -0
  84. package/esm/models/userresponse.d.ts.map +1 -1
  85. package/esm/models/userresponse.js +1 -0
  86. package/esm/models/userresponse.js.map +1 -1
  87. package/esm/models/windowsize.d.ts +2 -2
  88. package/esm/models/windowsize.js +2 -2
  89. package/esm/models/windowsize.js.map +1 -1
  90. package/esm/tool-names.d.ts.map +1 -1
  91. package/esm/tool-names.js +0 -4
  92. package/esm/tool-names.js.map +1 -1
  93. package/esm/tsconfig.tsbuildinfo +1 -1
  94. package/manifest.json +1 -5
  95. package/package.json +1 -1
  96. package/src/lib/config.ts +3 -3
  97. package/src/mcp-server/mcp-server.ts +1 -1
  98. package/src/mcp-server/server.ts +1 -3
  99. package/src/models/changedsubscription.ts +4 -0
  100. package/src/models/createinvoicelineitemrequest.ts +12 -0
  101. package/src/models/createinvoicerequest.ts +4 -0
  102. package/src/models/entityintegrationmappingresponse.ts +2 -0
  103. package/src/models/errorcode.ts +37 -0
  104. package/src/models/errorresponse.ts +3 -38
  105. package/src/models/executesubscriptionmodifyrequest.ts +6 -0
  106. package/src/models/invoicebillingreason.ts +2 -0
  107. package/src/models/invoicefilter.ts +10 -0
  108. package/src/models/invoicelineitemresponse.ts +8 -0
  109. package/src/models/invoiceresponse.ts +4 -0
  110. package/src/models/priceprice.ts +4 -0
  111. package/src/models/priceresponse.ts +4 -0
  112. package/src/models/submodifytrialendrequest.ts +20 -0
  113. package/src/models/subscriptionmodifytype.ts +2 -0
  114. package/src/models/subscriptionresponse.ts +4 -0
  115. package/src/models/subscriptionresponsev2.ts +8 -0
  116. package/src/models/trialendaction.ts +17 -0
  117. package/src/models/userresponse.ts +2 -0
  118. package/src/models/windowsize.ts +2 -2
  119. package/src/tool-names.ts +0 -4
  120. package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.d.ts +0 -16
  121. package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.d.ts.map +0 -1
  122. package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.js +0 -82
  123. package/esm/funcs/invoicesGetMeterUsagePreviewInvoice.js.map +0 -1
  124. package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.d.ts +0 -7
  125. package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.d.ts.map +0 -1
  126. package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.js +0 -35
  127. package/esm/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.js.map +0 -1
  128. package/esm/models/getmeterusagepreviewinvoiceop.d.ts +0 -6
  129. package/esm/models/getmeterusagepreviewinvoiceop.d.ts.map +0 -1
  130. package/esm/models/getmeterusagepreviewinvoiceop.js +0 -11
  131. package/esm/models/getmeterusagepreviewinvoiceop.js.map +0 -1
  132. package/src/funcs/invoicesGetMeterUsagePreviewInvoice.ts +0 -144
  133. package/src/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.ts +0 -47
  134. package/src/models/getmeterusagepreviewinvoiceop.ts +0 -21
package/bin/mcp-server.js CHANGED
@@ -13338,109 +13338,136 @@ var require_on_finished = __commonJS((exports, module) => {
13338
13338
  }
13339
13339
  });
13340
13340
 
13341
- // node_modules/content-type/index.js
13342
- var require_content_type = __commonJS((exports) => {
13341
+ // node_modules/type-is/node_modules/content-type/dist/index.js
13342
+ var require_dist = __commonJS((exports) => {
13343
13343
  /*!
13344
13344
  * content-type
13345
13345
  * Copyright(c) 2015 Douglas Christopher Wilson
13346
13346
  * MIT Licensed
13347
13347
  */
13348
- var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
13349
- var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
13350
- var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
13351
- var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
13352
- var QUOTE_REGEXP = /([\\"])/g;
13353
- var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
13348
+ Object.defineProperty(exports, "__esModule", { value: true });
13354
13349
  exports.format = format;
13355
13350
  exports.parse = parse5;
13351
+ var TEXT_REGEXP = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/;
13352
+ var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
13353
+ var QUOTE_REGEXP = /[\\"]/g;
13354
+ var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
13355
+ var NullObject = /* @__PURE__ */ (() => {
13356
+ const C = function() {};
13357
+ C.prototype = Object.create(null);
13358
+ return C;
13359
+ })();
13356
13360
  function format(obj) {
13357
- if (!obj || typeof obj !== "object") {
13358
- throw new TypeError("argument obj is required");
13359
- }
13360
- var parameters = obj.parameters;
13361
- var type = obj.type;
13361
+ const { type, parameters } = obj;
13362
13362
  if (!type || !TYPE_REGEXP.test(type)) {
13363
- throw new TypeError("invalid type");
13363
+ throw new TypeError(`Invalid type: ${type}`);
13364
13364
  }
13365
- var string4 = type;
13366
- if (parameters && typeof parameters === "object") {
13367
- var param;
13368
- var params = Object.keys(parameters).sort();
13369
- for (var i = 0;i < params.length; i++) {
13370
- param = params[i];
13365
+ let result = type;
13366
+ if (parameters) {
13367
+ for (const param of Object.keys(parameters)) {
13371
13368
  if (!TOKEN_REGEXP.test(param)) {
13372
- throw new TypeError("invalid parameter name");
13369
+ throw new TypeError(`Invalid parameter name: ${param}`);
13373
13370
  }
13374
- string4 += "; " + param + "=" + qstring(parameters[param]);
13371
+ result += `; ${param}=${qstring(parameters[param])}`;
13375
13372
  }
13376
13373
  }
13377
- return string4;
13374
+ return result;
13378
13375
  }
13379
- function parse5(string4) {
13380
- if (!string4) {
13381
- throw new TypeError("argument string is required");
13382
- }
13383
- var header = typeof string4 === "object" ? getcontenttype(string4) : string4;
13384
- if (typeof header !== "string") {
13385
- throw new TypeError("argument string is required to be a string");
13386
- }
13387
- var index = header.indexOf(";");
13388
- var type = index !== -1 ? header.slice(0, index).trim() : header.trim();
13389
- if (!TYPE_REGEXP.test(type)) {
13390
- throw new TypeError("invalid media type");
13391
- }
13392
- var obj = new ContentType(type.toLowerCase());
13393
- if (index !== -1) {
13394
- var key;
13395
- var match;
13396
- var value;
13397
- PARAM_REGEXP.lastIndex = index;
13398
- while (match = PARAM_REGEXP.exec(header)) {
13399
- if (match.index !== index) {
13400
- throw new TypeError("invalid parameter format");
13401
- }
13402
- index += match[0].length;
13403
- key = match[1].toLowerCase();
13404
- value = match[2];
13405
- if (value.charCodeAt(0) === 34) {
13406
- value = value.slice(1, -1);
13407
- if (value.indexOf("\\") !== -1) {
13408
- value = value.replace(QESC_REGEXP, "$1");
13376
+ function parse5(header, options) {
13377
+ const len = header.length;
13378
+ let index = skipOWS(header, 0, len);
13379
+ const valueStart = index;
13380
+ index = skipValue(header, index, len);
13381
+ const valueEnd = trailingOWS(header, valueStart, index);
13382
+ const type = header.slice(valueStart, valueEnd).toLowerCase();
13383
+ const parameters = options?.parameters === false ? new NullObject : parseParameters(header, index, len);
13384
+ return { type, parameters };
13385
+ }
13386
+ var SP = 32;
13387
+ var HTAB = 9;
13388
+ var SEMI = 59;
13389
+ var EQ = 61;
13390
+ var DQUOTE = 34;
13391
+ var BSLASH = 92;
13392
+ function parseParameters(header, index, len) {
13393
+ const parameters = new NullObject;
13394
+ parameter:
13395
+ while (index < len) {
13396
+ index = skipOWS(header, index + 1, len);
13397
+ const keyStart = index;
13398
+ while (index < len) {
13399
+ const code = header.charCodeAt(index);
13400
+ if (code === SEMI)
13401
+ continue parameter;
13402
+ if (code === EQ) {
13403
+ const keyEnd = trailingOWS(header, keyStart, index);
13404
+ const key = header.slice(keyStart, keyEnd).toLowerCase();
13405
+ index = skipOWS(header, index + 1, len);
13406
+ if (index < len && header.charCodeAt(index) === DQUOTE) {
13407
+ index++;
13408
+ let value = "";
13409
+ while (index < len) {
13410
+ const code2 = header.charCodeAt(index++);
13411
+ if (code2 === DQUOTE) {
13412
+ index = skipValue(header, index, len);
13413
+ if (parameters[key] === undefined)
13414
+ parameters[key] = value;
13415
+ break;
13416
+ }
13417
+ if (code2 === BSLASH && index < len) {
13418
+ value += header[index++];
13419
+ continue;
13420
+ }
13421
+ value += String.fromCharCode(code2);
13422
+ }
13423
+ continue parameter;
13424
+ }
13425
+ const valueStart = index;
13426
+ index = skipValue(header, index, len);
13427
+ if (parameters[key] === undefined) {
13428
+ const valueEnd = trailingOWS(header, valueStart, index);
13429
+ parameters[key] = header.slice(valueStart, valueEnd);
13430
+ }
13431
+ continue parameter;
13409
13432
  }
13433
+ index++;
13410
13434
  }
13411
- obj.parameters[key] = value;
13412
13435
  }
13413
- if (index !== header.length) {
13414
- throw new TypeError("invalid parameter format");
13415
- }
13416
- }
13417
- return obj;
13436
+ return parameters;
13418
13437
  }
13419
- function getcontenttype(obj) {
13420
- var header;
13421
- if (typeof obj.getHeader === "function") {
13422
- header = obj.getHeader("content-type");
13423
- } else if (typeof obj.headers === "object") {
13424
- header = obj.headers && obj.headers["content-type"];
13425
- }
13426
- if (typeof header !== "string") {
13427
- throw new TypeError("content-type header is missing from object");
13438
+ function skipValue(str, index, len) {
13439
+ while (index < len) {
13440
+ const char = str.charCodeAt(index);
13441
+ if (char === SEMI)
13442
+ break;
13443
+ index++;
13428
13444
  }
13429
- return header;
13445
+ return index;
13430
13446
  }
13431
- function qstring(val) {
13432
- var str = String(val);
13433
- if (TOKEN_REGEXP.test(str)) {
13434
- return str;
13447
+ function skipOWS(header, index, len) {
13448
+ while (index < len) {
13449
+ const char = header.charCodeAt(index);
13450
+ if (char !== SP && char !== HTAB)
13451
+ break;
13452
+ index++;
13435
13453
  }
13436
- if (str.length > 0 && !TEXT_REGEXP.test(str)) {
13437
- throw new TypeError("invalid parameter value");
13454
+ return index;
13455
+ }
13456
+ function trailingOWS(header, start, end) {
13457
+ while (end > start) {
13458
+ const char = header.charCodeAt(end - 1);
13459
+ if (char !== SP && char !== HTAB)
13460
+ break;
13461
+ end--;
13438
13462
  }
13439
- return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"';
13463
+ return end;
13440
13464
  }
13441
- function ContentType(type) {
13442
- this.parameters = Object.create(null);
13443
- this.type = type;
13465
+ function qstring(str) {
13466
+ if (TOKEN_REGEXP.test(str))
13467
+ return str;
13468
+ if (TEXT_REGEXP.test(str))
13469
+ return `"${str.replace(QUOTE_REGEXP, "\\$&")}"`;
13470
+ throw new TypeError(`Invalid parameter value: ${str}`);
13444
13471
  }
13445
13472
  });
13446
13473
 
@@ -23012,7 +23039,7 @@ var require_type_is = __commonJS((exports, module) => {
23012
23039
  * Copyright(c) 2014-2015 Douglas Christopher Wilson
23013
23040
  * MIT Licensed
23014
23041
  */
23015
- var contentType = require_content_type();
23042
+ var contentType = require_dist();
23016
23043
  var mime = require_mime_types();
23017
23044
  var typer = require_media_typer();
23018
23045
  module.exports = typeofrequest;
@@ -23021,9 +23048,12 @@ var require_type_is = __commonJS((exports, module) => {
23021
23048
  module.exports.normalize = normalize;
23022
23049
  module.exports.match = mimeMatch;
23023
23050
  function typeis(value, types_) {
23051
+ if (value && typeof value === "object") {
23052
+ value = value.headers["content-type"];
23053
+ }
23024
23054
  var i;
23025
23055
  var types = types_;
23026
- var val = tryNormalizeType(value);
23056
+ var val = normalizeType(value);
23027
23057
  if (!val) {
23028
23058
  return false;
23029
23059
  }
@@ -23090,15 +23120,116 @@ var require_type_is = __commonJS((exports, module) => {
23090
23120
  return true;
23091
23121
  }
23092
23122
  function normalizeType(value) {
23093
- var type = contentType.parse(value).type;
23123
+ if (!value)
23124
+ return null;
23125
+ var type = contentType.parse(value, { parameters: false }).type;
23094
23126
  return typer.test(type) ? type : null;
23095
23127
  }
23096
- function tryNormalizeType(value) {
23097
- try {
23098
- return value ? normalizeType(value) : null;
23099
- } catch (err) {
23100
- return null;
23128
+ });
23129
+
23130
+ // node_modules/content-type/index.js
23131
+ var require_content_type = __commonJS((exports) => {
23132
+ /*!
23133
+ * content-type
23134
+ * Copyright(c) 2015 Douglas Christopher Wilson
23135
+ * MIT Licensed
23136
+ */
23137
+ var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
23138
+ var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
23139
+ var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
23140
+ var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
23141
+ var QUOTE_REGEXP = /([\\"])/g;
23142
+ var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
23143
+ exports.format = format;
23144
+ exports.parse = parse5;
23145
+ function format(obj) {
23146
+ if (!obj || typeof obj !== "object") {
23147
+ throw new TypeError("argument obj is required");
23148
+ }
23149
+ var parameters = obj.parameters;
23150
+ var type = obj.type;
23151
+ if (!type || !TYPE_REGEXP.test(type)) {
23152
+ throw new TypeError("invalid type");
23153
+ }
23154
+ var string4 = type;
23155
+ if (parameters && typeof parameters === "object") {
23156
+ var param;
23157
+ var params = Object.keys(parameters).sort();
23158
+ for (var i = 0;i < params.length; i++) {
23159
+ param = params[i];
23160
+ if (!TOKEN_REGEXP.test(param)) {
23161
+ throw new TypeError("invalid parameter name");
23162
+ }
23163
+ string4 += "; " + param + "=" + qstring(parameters[param]);
23164
+ }
23101
23165
  }
23166
+ return string4;
23167
+ }
23168
+ function parse5(string4) {
23169
+ if (!string4) {
23170
+ throw new TypeError("argument string is required");
23171
+ }
23172
+ var header = typeof string4 === "object" ? getcontenttype(string4) : string4;
23173
+ if (typeof header !== "string") {
23174
+ throw new TypeError("argument string is required to be a string");
23175
+ }
23176
+ var index = header.indexOf(";");
23177
+ var type = index !== -1 ? header.slice(0, index).trim() : header.trim();
23178
+ if (!TYPE_REGEXP.test(type)) {
23179
+ throw new TypeError("invalid media type");
23180
+ }
23181
+ var obj = new ContentType(type.toLowerCase());
23182
+ if (index !== -1) {
23183
+ var key;
23184
+ var match;
23185
+ var value;
23186
+ PARAM_REGEXP.lastIndex = index;
23187
+ while (match = PARAM_REGEXP.exec(header)) {
23188
+ if (match.index !== index) {
23189
+ throw new TypeError("invalid parameter format");
23190
+ }
23191
+ index += match[0].length;
23192
+ key = match[1].toLowerCase();
23193
+ value = match[2];
23194
+ if (value.charCodeAt(0) === 34) {
23195
+ value = value.slice(1, -1);
23196
+ if (value.indexOf("\\") !== -1) {
23197
+ value = value.replace(QESC_REGEXP, "$1");
23198
+ }
23199
+ }
23200
+ obj.parameters[key] = value;
23201
+ }
23202
+ if (index !== header.length) {
23203
+ throw new TypeError("invalid parameter format");
23204
+ }
23205
+ }
23206
+ return obj;
23207
+ }
23208
+ function getcontenttype(obj) {
23209
+ var header;
23210
+ if (typeof obj.getHeader === "function") {
23211
+ header = obj.getHeader("content-type");
23212
+ } else if (typeof obj.headers === "object") {
23213
+ header = obj.headers && obj.headers["content-type"];
23214
+ }
23215
+ if (typeof header !== "string") {
23216
+ throw new TypeError("content-type header is missing from object");
23217
+ }
23218
+ return header;
23219
+ }
23220
+ function qstring(val) {
23221
+ var str = String(val);
23222
+ if (TOKEN_REGEXP.test(str)) {
23223
+ return str;
23224
+ }
23225
+ if (str.length > 0 && !TEXT_REGEXP.test(str)) {
23226
+ throw new TypeError("invalid parameter value");
23227
+ }
23228
+ return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"';
23229
+ }
23230
+ function ContentType(type) {
23231
+ this.parameters = Object.create(null);
23232
+ this.type = type;
23102
23233
  }
23103
23234
  });
23104
23235
 
@@ -25267,7 +25398,7 @@ var require_stringify = __commonJS((exports, module) => {
25267
25398
  }
25268
25399
  if (obj === null) {
25269
25400
  if (strictNullHandling) {
25270
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
25401
+ return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix);
25271
25402
  }
25272
25403
  obj = "";
25273
25404
  }
@@ -25285,7 +25416,9 @@ var require_stringify = __commonJS((exports, module) => {
25285
25416
  var objKeys;
25286
25417
  if (generateArrayPrefix === "comma" && isArray(obj)) {
25287
25418
  if (encodeValuesOnly && encoder) {
25288
- obj = utils.maybeMap(obj, encoder);
25419
+ obj = utils.maybeMap(obj, function(v) {
25420
+ return v == null ? v : encoder(v);
25421
+ });
25289
25422
  }
25290
25423
  objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : undefined }];
25291
25424
  } else if (isArray(filter)) {
@@ -25404,6 +25537,9 @@ var require_stringify = __commonJS((exports, module) => {
25404
25537
  var sideChannel = getSideChannel();
25405
25538
  for (var i = 0;i < objKeys.length; ++i) {
25406
25539
  var key = objKeys[i];
25540
+ if (typeof key === "undefined" || key === null) {
25541
+ continue;
25542
+ }
25407
25543
  var value = obj[key];
25408
25544
  if (options.skipNulls && value === null) {
25409
25545
  continue;
@@ -25414,9 +25550,9 @@ var require_stringify = __commonJS((exports, module) => {
25414
25550
  var prefix = options.addQueryPrefix === true ? "?" : "";
25415
25551
  if (options.charsetSentinel) {
25416
25552
  if (options.charset === "iso-8859-1") {
25417
- prefix += "utf8=%26%2310003%3B&";
25553
+ prefix += "utf8=%26%2310003%3B" + options.delimiter;
25418
25554
  } else {
25419
- prefix += "utf8=%E2%9C%93&";
25555
+ prefix += "utf8=%E2%9C%93" + options.delimiter;
25420
25556
  }
25421
25557
  }
25422
25558
  return joined.length > 0 ? prefix + joined : "";
@@ -25576,8 +25712,8 @@ var require_parse = __commonJS((exports, module) => {
25576
25712
  }
25577
25713
  return leaf;
25578
25714
  };
25579
- var splitKeyIntoSegments = function splitKeyIntoSegments2(givenKey, options) {
25580
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
25715
+ var splitKeyIntoSegments = function splitKeyIntoSegments2(originalKey, options) {
25716
+ var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, "[$1]") : originalKey;
25581
25717
  if (options.depth <= 0) {
25582
25718
  if (!options.plainObjects && has.call(Object.prototype, key)) {
25583
25719
  if (!options.allowPrototypes) {
@@ -25586,37 +25722,56 @@ var require_parse = __commonJS((exports, module) => {
25586
25722
  }
25587
25723
  return [key];
25588
25724
  }
25589
- var brackets = /(\[[^[\]]*])/;
25590
- var child = /(\[[^[\]]*])/g;
25591
- var segment = brackets.exec(key);
25592
- var parent = segment ? key.slice(0, segment.index) : key;
25593
- var keys = [];
25725
+ var segments = [];
25726
+ var first = key.indexOf("[");
25727
+ var parent = first >= 0 ? key.slice(0, first) : key;
25594
25728
  if (parent) {
25595
25729
  if (!options.plainObjects && has.call(Object.prototype, parent)) {
25596
25730
  if (!options.allowPrototypes) {
25597
25731
  return;
25598
25732
  }
25599
25733
  }
25600
- keys[keys.length] = parent;
25601
- }
25602
- var i = 0;
25603
- while ((segment = child.exec(key)) !== null && i < options.depth) {
25604
- i += 1;
25605
- var segmentContent = segment[1].slice(1, -1);
25606
- if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
25607
- if (!options.allowPrototypes) {
25608
- return;
25734
+ segments[segments.length] = parent;
25735
+ }
25736
+ var n = key.length;
25737
+ var open = first;
25738
+ var collected = 0;
25739
+ while (open >= 0 && collected < options.depth) {
25740
+ var level = 1;
25741
+ var i = open + 1;
25742
+ var close = -1;
25743
+ while (i < n && close < 0) {
25744
+ var cu = key.charCodeAt(i);
25745
+ if (cu === 91) {
25746
+ level += 1;
25747
+ } else if (cu === 93) {
25748
+ level -= 1;
25749
+ if (level === 0) {
25750
+ close = i;
25751
+ }
25609
25752
  }
25753
+ i += 1;
25610
25754
  }
25611
- keys[keys.length] = segment[1];
25755
+ if (close < 0) {
25756
+ segments[segments.length] = "[" + key.slice(open) + "]";
25757
+ return segments;
25758
+ }
25759
+ var seg = key.slice(open, close + 1);
25760
+ var content = seg.slice(1, -1);
25761
+ if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) {
25762
+ return;
25763
+ }
25764
+ segments[segments.length] = seg;
25765
+ collected += 1;
25766
+ open = key.indexOf("[", close + 1);
25612
25767
  }
25613
- if (segment) {
25768
+ if (open >= 0) {
25614
25769
  if (options.strictDepth === true) {
25615
25770
  throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
25616
25771
  }
25617
- keys[keys.length] = "[" + key.slice(segment.index) + "]";
25772
+ segments[segments.length] = "[" + key.slice(open) + "]";
25618
25773
  }
25619
- return keys;
25774
+ return segments;
25620
25775
  };
25621
25776
  var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
25622
25777
  if (!givenKey) {
@@ -27332,7 +27487,7 @@ var require_is_promise = __commonJS((exports, module) => {
27332
27487
  });
27333
27488
 
27334
27489
  // node_modules/path-to-regexp/dist/index.js
27335
- var require_dist = __commonJS((exports) => {
27490
+ var require_dist2 = __commonJS((exports) => {
27336
27491
  Object.defineProperty(exports, "__esModule", { value: true });
27337
27492
  exports.PathError = exports.TokenData = undefined;
27338
27493
  exports.parse = parse5;
@@ -27708,7 +27863,7 @@ var require_layer = __commonJS((exports, module) => {
27708
27863
  * MIT Licensed
27709
27864
  */
27710
27865
  var isPromise2 = require_is_promise();
27711
- var pathRegexp = require_dist();
27866
+ var pathRegexp = require_dist2();
27712
27867
  var debug = require_src()("router:layer");
27713
27868
  var deprecate = require_depd()("router");
27714
27869
  var TRAILING_SLASH_REGEXP = /\/+$/;
@@ -49498,7 +49653,7 @@ var require_limit = __commonJS((exports) => {
49498
49653
  });
49499
49654
 
49500
49655
  // node_modules/ajv-formats/dist/index.js
49501
- var require_dist2 = __commonJS((exports, module) => {
49656
+ var require_dist3 = __commonJS((exports, module) => {
49502
49657
  Object.defineProperty(exports, "__esModule", { value: true });
49503
49658
  var formats_1 = require_formats2();
49504
49659
  var limit_1 = require_limit();
@@ -49576,7 +49731,7 @@ class AjvJsonSchemaValidator {
49576
49731
  var import_ajv, import_ajv_formats;
49577
49732
  var init_ajv_provider = __esm(() => {
49578
49733
  import_ajv = __toESM(require_ajv(), 1);
49579
- import_ajv_formats = __toESM(require_dist2(), 1);
49734
+ import_ajv_formats = __toESM(require_dist3(), 1);
49580
49735
  });
49581
49736
 
49582
49737
  // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
@@ -50979,9 +51134,9 @@ var init_config = __esm(() => {
50979
51134
  SDK_METADATA = {
50980
51135
  language: "typescript",
50981
51136
  openapiDocVersion: "1.0",
50982
- sdkVersion: "2.1.10",
50983
- genVersion: "2.882.0",
50984
- userAgent: "speakeasy-sdk/mcp-typescript 2.1.10 2.882.0 1.0 @flexprice/mcp-server"
51137
+ sdkVersion: "2.1.17",
51138
+ genVersion: "2.893.0",
51139
+ userAgent: "speakeasy-sdk/mcp-typescript 2.1.17 2.893.0 1.0 @flexprice/mcp-server"
50985
51140
  };
50986
51141
  });
50987
51142
 
@@ -52721,6 +52876,7 @@ var init_entityintegrationmappingresponse = __esm(() => {
52721
52876
  entity_type: IntegrationEntityType$zodSchema.optional(),
52722
52877
  environment_id: string2().optional(),
52723
52878
  id: string2().optional(),
52879
+ metadata: record(string2(), any()).optional(),
52724
52880
  provider_entity_id: string2().optional(),
52725
52881
  provider_type: string2().optional(),
52726
52882
  status: Status$zodSchema.optional(),
@@ -52759,27 +52915,33 @@ var init_customerresponse = __esm(() => {
52759
52915
  }).describe("Customer response object containing all customer information");
52760
52916
  });
52761
52917
 
52762
- // src/models/errorresponse.ts
52763
- var Code$zodSchema, Details$zodSchema, ErrorResponse$zodSchema;
52764
- var init_errorresponse = __esm(() => {
52918
+ // src/models/errorcode.ts
52919
+ var ErrorCode$zodSchema;
52920
+ var init_errorcode = __esm(() => {
52765
52921
  init_zod();
52766
- Code$zodSchema = _enum([
52922
+ ErrorCode$zodSchema = _enum([
52923
+ "http_client_error",
52924
+ "system_error",
52925
+ "internal_error",
52767
52926
  "not_found",
52768
52927
  "already_exists",
52769
52928
  "version_conflict",
52770
52929
  "validation_error",
52771
52930
  "invalid_operation",
52772
52931
  "permission_denied",
52773
- "http_client_error",
52774
52932
  "database_error",
52775
- "system_error",
52776
- "internal_error",
52777
- "service_unavailable"
52933
+ "service_unavailable",
52934
+ "too_many_requests"
52778
52935
  ]);
52779
- Details$zodSchema = object({});
52936
+ });
52937
+
52938
+ // src/models/errorresponse.ts
52939
+ var ErrorResponse$zodSchema;
52940
+ var init_errorresponse = __esm(() => {
52941
+ init_zod();
52942
+ init_errorcode();
52780
52943
  ErrorResponse$zodSchema = object({
52781
- code: Code$zodSchema.optional(),
52782
- details: record(string2(), lazy(() => Details$zodSchema)).optional(),
52944
+ code: ErrorCode$zodSchema.optional(),
52783
52945
  http_status_code: int().optional(),
52784
52946
  message: string2().optional()
52785
52947
  });
@@ -53201,6 +53363,7 @@ var WindowSize$zodSchema;
53201
53363
  var init_windowsize = __esm(() => {
53202
53364
  init_zod();
53203
53365
  WindowSize$zodSchema = _enum([
53366
+ "MONTH",
53204
53367
  "MINUTE",
53205
53368
  "15MIN",
53206
53369
  "30MIN",
@@ -53209,8 +53372,7 @@ var init_windowsize = __esm(() => {
53209
53372
  "6HOUR",
53210
53373
  "12HOUR",
53211
53374
  "DAY",
53212
- "WEEK",
53213
- "MONTH"
53375
+ "WEEK"
53214
53376
  ]);
53215
53377
  });
53216
53378
 
@@ -54542,6 +54704,10 @@ For USD: $12.50`),
54542
54704
  price_unit_id: string2().optional().describe("PriceUnitID is the id of the price unit (for CUSTOM type)"),
54543
54705
  price_unit_tiers: array(PricePriceTier$zodSchema).optional().describe("PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED"),
54544
54706
  price_unit_type: PriceUnitType$zodSchema.optional(),
54707
+ sequence: int().optional().describe(`Sequence is the monotonic stamp bumped on every state change that
54708
+ subscription line items need to react to. Read by the plan-price sync;
54709
+ set by the database (DEFAULT nextval) on create and by the price
54710
+ repository on termination / compatibility-affecting edits.`),
54545
54711
  start_date: exports_iso.datetime({ offset: true }).optional().describe("StartDate is the start date of the price"),
54546
54712
  status: Status$zodSchema.optional(),
54547
54713
  tenant_id: string2().optional(),
@@ -55946,6 +56112,7 @@ var init_createinvoicelineitemrequest = __esm(() => {
55946
56112
  init_zod();
55947
56113
  init_commitmentinfo();
55948
56114
  CreateInvoiceLineItemRequest$zodSchema = object({
56115
+ adjusted_entitlement_quantity: string2().optional().describe("adjusted_entitlement_quantity is the entitlement-covered units deducted from raw usage."),
55949
56116
  amount: string2().describe("amount is the monetary amount for this line item"),
55950
56117
  commitment_info: CommitmentInfo$zodSchema.optional(),
55951
56118
  display_name: string2().optional().describe("display_name is the optional human-readable name for this line item"),
@@ -55966,7 +56133,10 @@ plan_id is the optional unique identifier of the plan associated with this line
55966
56133
  price_type: string2().optional().describe("price_type indicates the type of pricing (fixed, usage, tiered, etc.)"),
55967
56134
  price_unit: string2().optional().describe("price_unit is the optional 3-digit ISO code of the price unit associated with this line item"),
55968
56135
  price_unit_amount: string2().optional().describe("price_unit_amount is the optional amount converted to the price unit currency"),
55969
- quantity: string2().describe("quantity is the quantity of units for this line item")
56136
+ quantity: string2().describe("quantity is the quantity of units for this line item"),
56137
+ subscription_id: string2().optional().describe(`subscription_id overrides the invoice's subscription_id for this specific line item.
56138
+ Used for grouped invoicing where child line items belong to child subscriptions.`),
56139
+ subscription_line_item_id: string2().optional().describe("sub_line_item_id links this line item to the subscription_line_item that generated it.")
55970
56140
  });
55971
56141
  });
55972
56142
 
@@ -55982,7 +56152,8 @@ var init_invoicebillingreason = __esm(() => {
55982
56152
  "SUBSCRIPTION_TRIAL_START",
55983
56153
  "PRORATION",
55984
56154
  "MANUAL",
55985
- "AUTO_INVOICE_THRESHOLD"
56155
+ "AUTO_INVOICE_THRESHOLD",
56156
+ "WALLET_AUTO_TOPUP"
55986
56157
  ]);
55987
56158
  });
55988
56159
 
@@ -56135,6 +56306,8 @@ var init_createinvoicerequest = __esm(() => {
56135
56306
  invoice_pdf_url: string2().optional().describe("invoice_pdf_url is the URL where customers can download the PDF version of this invoice"),
56136
56307
  invoice_status: InvoiceStatus$zodSchema.optional(),
56137
56308
  invoice_type: InvoiceType$zodSchema.optional(),
56309
+ issue_date: exports_iso.datetime({ offset: true }).optional().describe(`issue_date overrides the user-facing date of the invoice.
56310
+ Defaults to created_at if not provided.`),
56138
56311
  line_item_coupons: array(InvoiceLineItemCoupon$zodSchema).optional().describe("Invoice Line Item Coupons"),
56139
56312
  line_items: array(CreateInvoiceLineItemRequest$zodSchema).optional().describe("line_items contains the individual items that make up this invoice"),
56140
56313
  metadata: record(string2(), string2()).optional(),
@@ -56625,6 +56798,8 @@ var init_invoicelineitemresponse = __esm(() => {
56625
56798
  init_status();
56626
56799
  init_usagebreakdownitem();
56627
56800
  InvoiceLineItemResponse$zodSchema = object({
56801
+ adjusted_entitlement_quantity: string2().optional().describe(`adjusted_entitlement_quantity is the entitlement-covered portion deducted from raw usage.
56802
+ Nil when no entitlement was applied. Raw usage = Quantity + AdjustedEntitlementQuantity.`),
56628
56803
  amount: string2().optional(),
56629
56804
  commitment_info: CommitmentInfo$zodSchema.optional(),
56630
56805
  created_at: exports_iso.datetime({ offset: true }).optional(),
@@ -56654,6 +56829,7 @@ var init_invoicelineitemresponse = __esm(() => {
56654
56829
  quantity: string2().optional(),
56655
56830
  status: Status$zodSchema.optional(),
56656
56831
  subscription_id: string2().optional(),
56832
+ subscription_line_item_id: string2().optional().describe("sub_line_item_id links this invoice line item to the subscription_line_item that generated it."),
56657
56833
  tenant_id: string2().optional(),
56658
56834
  updated_at: exports_iso.datetime({ offset: true }).optional(),
56659
56835
  updated_by: string2().optional(),
@@ -56952,6 +57128,10 @@ For USD: $12.50`),
56952
57128
  price_unit_tiers: array(PricePriceTier$zodSchema).optional().describe("PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED"),
56953
57129
  price_unit_type: PriceUnitType$zodSchema.optional(),
56954
57130
  pricing_unit: PriceUnitResponse$zodSchema.optional(),
57131
+ sequence: int().optional().describe(`Sequence is the monotonic stamp bumped on every state change that
57132
+ subscription line items need to react to. Read by the plan-price sync;
57133
+ set by the database (DEFAULT nextval) on create and by the price
57134
+ repository on termination / compatibility-affecting edits.`),
56955
57135
  start_date: exports_iso.datetime({ offset: true }).optional().describe("StartDate is the start date of the price"),
56956
57136
  status: Status$zodSchema.optional(),
56957
57137
  tenant_id: string2().optional(),
@@ -57244,6 +57424,9 @@ This can differ from the subscription customer (e.g., parent company invoicing f
57244
57424
  status: Status$zodSchema.optional(),
57245
57425
  subscription_status: SubscriptionStatus$zodSchema.optional(),
57246
57426
  subscription_type: SubscriptionType$zodSchema.optional(),
57427
+ synced_price_sequence: int().optional().describe(`SyncedPriceSequence is the plan-price sequence up to which this
57428
+ subscription's line items have been reconciled. Bumped by the
57429
+ plan-price sync after a successful pass.`),
57247
57430
  tenant_id: string2().optional(),
57248
57431
  trial_end: exports_iso.datetime({ offset: true }).optional().describe("TrialEnd is the end date of the trial period"),
57249
57432
  trial_start: exports_iso.datetime({ offset: true }).optional().describe("TrialStart is the start date of the trial period"),
@@ -57333,6 +57516,7 @@ These are non-cash reductions applied to the invoice (e.g. goodwill credit, bill
57333
57516
  invoice_pdf_url: string2().optional().describe("invoice_pdf_url is the URL where customers can download the PDF version of this invoice"),
57334
57517
  invoice_status: InvoiceStatus$zodSchema.optional(),
57335
57518
  invoice_type: InvoiceType$zodSchema.optional(),
57519
+ issue_date: exports_iso.datetime({ offset: true }).optional().describe("issue_date is the user-facing date of the invoice. Defaults to created_at if not set."),
57336
57520
  last_computed_at: exports_iso.datetime({ offset: true }).optional().describe("last_computed_at is the timestamp when this invoice was last computed by ComputeInvoice"),
57337
57521
  line_items: array(InvoiceLineItemResponse$zodSchema).optional().describe("line_items contains the individual items that make up this invoice (overrides embedded field)"),
57338
57522
  metadata: record(string2(), string2()).optional(),
@@ -57757,120 +57941,12 @@ Use when showing a customer what they will be charged (e.g. preview before check
57757
57941
  };
57758
57942
  });
57759
57943
 
57760
- // src/funcs/invoicesGetMeterUsagePreviewInvoice.ts
57761
- function invoicesGetMeterUsagePreviewInvoice(client$, request, options) {
57762
- return new APIPromise($do25(client$, request, options));
57763
- }
57764
- async function $do25(client$, request, options) {
57765
- const parsed$ = safeParse4(request, (value$) => GetPreviewInvoiceRequest$zodSchema.parse(value$), "Input validation failed");
57766
- if (!parsed$.ok) {
57767
- return [parsed$, { status: "invalid" }];
57768
- }
57769
- const payload$ = parsed$.value;
57770
- const body$ = encodeJSON("body", payload$, { explode: true });
57771
- const path$ = pathToFunc("/invoices/meter-usage-preview")();
57772
- const headers$ = new Headers(compactMap({
57773
- "Content-Type": "application/json",
57774
- Accept: "application/json"
57775
- }));
57776
- const securityInput = await extractSecurity(client$._options.security);
57777
- const requestSecurity = resolveGlobalSecurity(securityInput);
57778
- const context = {
57779
- options: client$._options,
57780
- baseURL: options?.serverURL ?? client$._baseURL ?? "",
57781
- operationID: "getMeterUsagePreviewInvoice",
57782
- oAuth2Scopes: null,
57783
- resolvedSecurity: requestSecurity,
57784
- securitySource: client$._options.security,
57785
- retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
57786
- retryCodes: options?.retryCodes || [
57787
- "429",
57788
- "500",
57789
- "502",
57790
- "503",
57791
- "504"
57792
- ]
57793
- };
57794
- const requestRes = client$._createRequest(context, {
57795
- security: requestSecurity,
57796
- method: "POST",
57797
- baseURL: options?.serverURL,
57798
- path: path$,
57799
- headers: headers$,
57800
- body: body$,
57801
- userAgent: client$._options.userAgent,
57802
- timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
57803
- }, options);
57804
- if (!requestRes.ok) {
57805
- return [requestRes, { status: "invalid" }];
57806
- }
57807
- const req$ = requestRes.value;
57808
- const doResult = await client$._do(req$, {
57809
- context,
57810
- errorCodes: [],
57811
- retryConfig: context.retryConfig,
57812
- retryCodes: context.retryCodes
57813
- });
57814
- if (!doResult.ok) {
57815
- return [doResult, { status: "request-error", request: req$ }];
57816
- }
57817
- return [doResult, {
57818
- status: "complete",
57819
- request: req$,
57820
- response: doResult.value
57821
- }];
57822
- }
57823
- var init_invoicesGetMeterUsagePreviewInvoice = __esm(() => {
57824
- init_encodings();
57825
- init_primitives();
57826
- init_schemas4();
57827
- init_security();
57828
- init_url();
57829
- init_getpreviewinvoicerequest();
57830
- init_async();
57831
- });
57832
-
57833
- // src/mcp-server/tools/invoicesGetMeterUsagePreviewInvoice.ts
57834
- var args24, tool$invoicesGetMeterUsagePreviewInvoice;
57835
- var init_invoicesGetMeterUsagePreviewInvoice2 = __esm(() => {
57836
- init_invoicesGetMeterUsagePreviewInvoice();
57837
- init_getpreviewinvoicerequest();
57838
- init_tools();
57839
- args24 = {
57840
- request: GetPreviewInvoiceRequest$zodSchema.describe(`Preview Invoice Request`)
57841
- };
57842
- tool$invoicesGetMeterUsagePreviewInvoice = {
57843
- name: "get-meter-usage-preview-invoice",
57844
- description: `Get invoice preview using meter_usage data
57845
-
57846
- Preview invoice using the meter_usage table for usage data instead of feature_usage.`,
57847
- scopes: ["write"],
57848
- annotations: {
57849
- title: "",
57850
- destructiveHint: false,
57851
- idempotentHint: false,
57852
- openWorldHint: false,
57853
- readOnlyHint: false
57854
- },
57855
- args: args24,
57856
- tool: async (client, args25, ctx) => {
57857
- const [result] = await invoicesGetMeterUsagePreviewInvoice(client, args25.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57858
- if (!result.ok) {
57859
- return {
57860
- content: [{ type: "text", text: result.error.message }],
57861
- isError: true
57862
- };
57863
- }
57864
- return formatResult(result.value);
57865
- }
57866
- };
57867
- });
57868
-
57869
57944
  // src/models/invoicefilter.ts
57870
57945
  var InvoiceFilterOrder$zodSchema, InvoiceFilter$zodSchema;
57871
57946
  var init_invoicefilter = __esm(() => {
57872
57947
  init_zod();
57873
57948
  init_filtercondition();
57949
+ init_invoicebillingreason();
57874
57950
  init_invoicestatus();
57875
57951
  init_invoicetype();
57876
57952
  init_paymentstatus();
@@ -57885,6 +57961,9 @@ var init_invoicefilter = __esm(() => {
57885
57961
  Useful for finding invoices above a certain threshold or identifying high-value invoices`),
57886
57962
  amount_remaining_gt: number2().optional().describe(`amount_remaining_gt filters invoices with an outstanding balance greater than the specified value
57887
57963
  Useful for finding invoices that still have significant unpaid amounts`),
57964
+ billing_reason: InvoiceBillingReason$zodSchema.optional(),
57965
+ currency: string2().optional().describe(`currency filters invoices by their currency (ISO 4217 code, e.g. "usd", "eur").
57966
+ Matches on the invoices.currency column exactly.`),
57888
57967
  customer_id: string2().optional().describe(`customer_id filters invoices for a specific customer using FlexPrice's internal customer ID
57889
57968
  This is the ID returned by FlexPrice when creating or retrieving customers`),
57890
57969
  end_time: exports_iso.datetime({ offset: true }).optional(),
@@ -57918,9 +57997,9 @@ Only returns invoices that were created as part of the specified subscription's
57918
57997
 
57919
57998
  // src/funcs/invoicesQueryInvoice.ts
57920
57999
  function invoicesQueryInvoice(client$, request, options) {
57921
- return new APIPromise($do26(client$, request, options));
58000
+ return new APIPromise($do25(client$, request, options));
57922
58001
  }
57923
- async function $do26(client$, request, options) {
58002
+ async function $do25(client$, request, options) {
57924
58003
  const parsed$ = safeParse4(request, (value$) => InvoiceFilter$zodSchema.parse(value$), "Input validation failed");
57925
58004
  if (!parsed$.ok) {
57926
58005
  return [parsed$, { status: "invalid" }];
@@ -57990,12 +58069,12 @@ var init_invoicesQueryInvoice = __esm(() => {
57990
58069
  });
57991
58070
 
57992
58071
  // src/mcp-server/tools/invoicesQueryInvoice.ts
57993
- var args25, tool$invoicesQueryInvoice;
58072
+ var args24, tool$invoicesQueryInvoice;
57994
58073
  var init_invoicesQueryInvoice2 = __esm(() => {
57995
58074
  init_invoicesQueryInvoice();
57996
58075
  init_invoicefilter();
57997
58076
  init_tools();
57998
- args25 = {
58077
+ args24 = {
57999
58078
  request: InvoiceFilter$zodSchema.describe(`Filter`)
58000
58079
  };
58001
58080
  tool$invoicesQueryInvoice = {
@@ -58011,9 +58090,9 @@ Use when listing or searching invoices (e.g. admin view or customer history). Re
58011
58090
  openWorldHint: false,
58012
58091
  readOnlyHint: false
58013
58092
  },
58014
- args: args25,
58015
- tool: async (client, args26, ctx) => {
58016
- const [result] = await invoicesQueryInvoice(client, args26.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58093
+ args: args24,
58094
+ tool: async (client, args25, ctx) => {
58095
+ const [result] = await invoicesQueryInvoice(client, args25.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58017
58096
  if (!result.ok) {
58018
58097
  return {
58019
58098
  content: [{ type: "text", text: result.error.message }],
@@ -58053,9 +58132,9 @@ var init_recalculateinvoiceop = __esm(() => {
58053
58132
 
58054
58133
  // src/funcs/invoicesRecalculateInvoice.ts
58055
58134
  function invoicesRecalculateInvoice(client$, request, options) {
58056
- return new APIPromise($do27(client$, request, options));
58135
+ return new APIPromise($do26(client$, request, options));
58057
58136
  }
58058
- async function $do27(client$, request, options) {
58137
+ async function $do26(client$, request, options) {
58059
58138
  const parsed$ = safeParse4(request, (value$) => RecalculateInvoiceRequest$zodSchema.parse(value$), "Input validation failed");
58060
58139
  if (!parsed$.ok) {
58061
58140
  return [parsed$, { status: "invalid" }];
@@ -58130,12 +58209,12 @@ var init_invoicesRecalculateInvoice = __esm(() => {
58130
58209
  });
58131
58210
 
58132
58211
  // src/mcp-server/tools/invoicesRecalculateInvoice.ts
58133
- var args26, tool$invoicesRecalculateInvoice;
58212
+ var args25, tool$invoicesRecalculateInvoice;
58134
58213
  var init_invoicesRecalculateInvoice2 = __esm(() => {
58135
58214
  init_invoicesRecalculateInvoice();
58136
58215
  init_recalculateinvoiceop();
58137
58216
  init_tools();
58138
- args26 = {
58217
+ args25 = {
58139
58218
  request: RecalculateInvoiceRequest$zodSchema
58140
58219
  };
58141
58220
  tool$invoicesRecalculateInvoice = {
@@ -58151,9 +58230,9 @@ Starts an async workflow that creates a fresh replacement invoice for a voided S
58151
58230
  openWorldHint: false,
58152
58231
  readOnlyHint: false
58153
58232
  },
58154
- args: args26,
58155
- tool: async (client, args27, ctx) => {
58156
- const [result] = await invoicesRecalculateInvoice(client, args27.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58233
+ args: args25,
58234
+ tool: async (client, args26, ctx) => {
58235
+ const [result] = await invoicesRecalculateInvoice(client, args26.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58157
58236
  if (!result.ok) {
58158
58237
  return {
58159
58238
  content: [{ type: "text", text: result.error.message }],
@@ -58183,9 +58262,9 @@ var init_recalculateinvoicev2op = __esm(() => {
58183
58262
 
58184
58263
  // src/funcs/invoicesRecalculateInvoiceV2.ts
58185
58264
  function invoicesRecalculateInvoiceV2(client$, request, options) {
58186
- return new APIPromise($do28(client$, request, options));
58265
+ return new APIPromise($do27(client$, request, options));
58187
58266
  }
58188
- async function $do28(client$, request, options) {
58267
+ async function $do27(client$, request, options) {
58189
58268
  const parsed$ = safeParse4(request, (value$) => RecalculateInvoiceV2Request$zodSchema.parse(value$), "Input validation failed");
58190
58269
  if (!parsed$.ok) {
58191
58270
  return [parsed$, { status: "invalid" }];
@@ -58264,12 +58343,12 @@ var init_invoicesRecalculateInvoiceV2 = __esm(() => {
58264
58343
  });
58265
58344
 
58266
58345
  // src/mcp-server/tools/invoicesRecalculateInvoiceV2.ts
58267
- var args27, tool$invoicesRecalculateInvoiceV2;
58346
+ var args26, tool$invoicesRecalculateInvoiceV2;
58268
58347
  var init_invoicesRecalculateInvoiceV22 = __esm(() => {
58269
58348
  init_invoicesRecalculateInvoiceV2();
58270
58349
  init_recalculateinvoicev2op();
58271
58350
  init_tools();
58272
- args27 = {
58351
+ args26 = {
58273
58352
  request: RecalculateInvoiceV2Request$zodSchema
58274
58353
  };
58275
58354
  tool$invoicesRecalculateInvoiceV2 = {
@@ -58285,9 +58364,9 @@ Recalculates a draft SUBSCRIPTION invoice in-place (replaces line items, reappli
58285
58364
  openWorldHint: false,
58286
58365
  readOnlyHint: false
58287
58366
  },
58288
- args: args27,
58289
- tool: async (client, args28, ctx) => {
58290
- const [result] = await invoicesRecalculateInvoiceV2(client, args28.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58367
+ args: args26,
58368
+ tool: async (client, args27, ctx) => {
58369
+ const [result] = await invoicesRecalculateInvoiceV2(client, args27.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58291
58370
  if (!result.ok) {
58292
58371
  return {
58293
58372
  content: [{ type: "text", text: result.error.message }],
@@ -58316,9 +58395,9 @@ var init_triggerinvoicecommswebhookop = __esm(() => {
58316
58395
 
58317
58396
  // src/funcs/invoicesTriggerInvoiceCommsWebhook.ts
58318
58397
  function invoicesTriggerInvoiceCommsWebhook(client$, request, options) {
58319
- return new APIPromise($do29(client$, request, options));
58398
+ return new APIPromise($do28(client$, request, options));
58320
58399
  }
58321
- async function $do29(client$, request, options) {
58400
+ async function $do28(client$, request, options) {
58322
58401
  const parsed$ = safeParse4(request, (value$) => TriggerInvoiceCommsWebhookRequest$zodSchema.parse(value$), "Input validation failed");
58323
58402
  if (!parsed$.ok) {
58324
58403
  return [parsed$, { status: "invalid" }];
@@ -58393,12 +58472,12 @@ var init_invoicesTriggerInvoiceCommsWebhook = __esm(() => {
58393
58472
  });
58394
58473
 
58395
58474
  // src/mcp-server/tools/invoicesTriggerInvoiceCommsWebhook.ts
58396
- var args28, tool$invoicesTriggerInvoiceCommsWebhook;
58475
+ var args27, tool$invoicesTriggerInvoiceCommsWebhook;
58397
58476
  var init_invoicesTriggerInvoiceCommsWebhook2 = __esm(() => {
58398
58477
  init_invoicesTriggerInvoiceCommsWebhook();
58399
58478
  init_triggerinvoicecommswebhookop();
58400
58479
  init_tools();
58401
- args28 = {
58480
+ args27 = {
58402
58481
  request: TriggerInvoiceCommsWebhookRequest$zodSchema
58403
58482
  };
58404
58483
  tool$invoicesTriggerInvoiceCommsWebhook = {
@@ -58414,9 +58493,9 @@ Use when sending an invoice to the customer (e.g. trigger email or Slack). Paylo
58414
58493
  openWorldHint: false,
58415
58494
  readOnlyHint: false
58416
58495
  },
58417
- args: args28,
58418
- tool: async (client, args29, ctx) => {
58419
- const [result] = await invoicesTriggerInvoiceCommsWebhook(client, args29.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58496
+ args: args27,
58497
+ tool: async (client, args28, ctx) => {
58498
+ const [result] = await invoicesTriggerInvoiceCommsWebhook(client, args28.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58420
58499
  if (!result.ok) {
58421
58500
  return {
58422
58501
  content: [{ type: "text", text: result.error.message }],
@@ -58458,9 +58537,9 @@ var init_updateinvoiceop = __esm(() => {
58458
58537
 
58459
58538
  // src/funcs/invoicesUpdateInvoice.ts
58460
58539
  function invoicesUpdateInvoice(client$, request, options) {
58461
- return new APIPromise($do30(client$, request, options));
58540
+ return new APIPromise($do29(client$, request, options));
58462
58541
  }
58463
- async function $do30(client$, request, options) {
58542
+ async function $do29(client$, request, options) {
58464
58543
  const parsed$ = safeParse4(request, (value$) => UpdateInvoiceRequestRequest$zodSchema.parse(value$), "Input validation failed");
58465
58544
  if (!parsed$.ok) {
58466
58545
  return [parsed$, { status: "invalid" }];
@@ -58536,12 +58615,12 @@ var init_invoicesUpdateInvoice = __esm(() => {
58536
58615
  });
58537
58616
 
58538
58617
  // src/mcp-server/tools/invoicesUpdateInvoice.ts
58539
- var args29, tool$invoicesUpdateInvoice;
58618
+ var args28, tool$invoicesUpdateInvoice;
58540
58619
  var init_invoicesUpdateInvoice2 = __esm(() => {
58541
58620
  init_invoicesUpdateInvoice();
58542
58621
  init_updateinvoiceop();
58543
58622
  init_tools();
58544
- args29 = {
58623
+ args28 = {
58545
58624
  request: UpdateInvoiceRequestRequest$zodSchema
58546
58625
  };
58547
58626
  tool$invoicesUpdateInvoice = {
@@ -58557,9 +58636,9 @@ Use when updating invoice metadata or due date (e.g. PDF URL, net terms). For pa
58557
58636
  openWorldHint: false,
58558
58637
  readOnlyHint: false
58559
58638
  },
58560
- args: args29,
58561
- tool: async (client, args30, ctx) => {
58562
- const [result] = await invoicesUpdateInvoice(client, args30.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58639
+ args: args28,
58640
+ tool: async (client, args29, ctx) => {
58641
+ const [result] = await invoicesUpdateInvoice(client, args29.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58563
58642
  if (!result.ok) {
58564
58643
  return {
58565
58644
  content: [{ type: "text", text: result.error.message }],
@@ -58601,9 +58680,9 @@ var init_updateinvoicepaymentstatusop = __esm(() => {
58601
58680
 
58602
58681
  // src/funcs/invoicesUpdateInvoicePaymentStatus.ts
58603
58682
  function invoicesUpdateInvoicePaymentStatus(client$, request, options) {
58604
- return new APIPromise($do31(client$, request, options));
58683
+ return new APIPromise($do30(client$, request, options));
58605
58684
  }
58606
- async function $do31(client$, request, options) {
58685
+ async function $do30(client$, request, options) {
58607
58686
  const parsed$ = safeParse4(request, (value$) => UpdateInvoicePaymentStatusRequest$zodSchema.parse(value$), "Input validation failed");
58608
58687
  if (!parsed$.ok) {
58609
58688
  return [parsed$, { status: "invalid" }];
@@ -58679,12 +58758,12 @@ var init_invoicesUpdateInvoicePaymentStatus = __esm(() => {
58679
58758
  });
58680
58759
 
58681
58760
  // src/mcp-server/tools/invoicesUpdateInvoicePaymentStatus.ts
58682
- var args30, tool$invoicesUpdateInvoicePaymentStatus;
58761
+ var args29, tool$invoicesUpdateInvoicePaymentStatus;
58683
58762
  var init_invoicesUpdateInvoicePaymentStatus2 = __esm(() => {
58684
58763
  init_invoicesUpdateInvoicePaymentStatus();
58685
58764
  init_updateinvoicepaymentstatusop();
58686
58765
  init_tools();
58687
- args30 = {
58766
+ args29 = {
58688
58767
  request: UpdateInvoicePaymentStatusRequest$zodSchema
58689
58768
  };
58690
58769
  tool$invoicesUpdateInvoicePaymentStatus = {
@@ -58700,9 +58779,9 @@ Use when reconciling payment status from an external gateway or manual entry (e.
58700
58779
  openWorldHint: false,
58701
58780
  readOnlyHint: false
58702
58781
  },
58703
- args: args30,
58704
- tool: async (client, args31, ctx) => {
58705
- const [result] = await invoicesUpdateInvoicePaymentStatus(client, args31.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58782
+ args: args29,
58783
+ tool: async (client, args30, ctx) => {
58784
+ const [result] = await invoicesUpdateInvoicePaymentStatus(client, args30.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58706
58785
  if (!result.ok) {
58707
58786
  return {
58708
58787
  content: [{ type: "text", text: result.error.message }],
@@ -58731,9 +58810,9 @@ var init_voidinvoiceop = __esm(() => {
58731
58810
 
58732
58811
  // src/funcs/invoicesVoidInvoice.ts
58733
58812
  function invoicesVoidInvoice(client$, request, options) {
58734
- return new APIPromise($do32(client$, request, options));
58813
+ return new APIPromise($do31(client$, request, options));
58735
58814
  }
58736
- async function $do32(client$, request, options) {
58815
+ async function $do31(client$, request, options) {
58737
58816
  const parsed$ = safeParse4(request, (value$) => VoidInvoiceRequest$zodSchema.parse(value$), "Input validation failed");
58738
58817
  if (!parsed$.ok) {
58739
58818
  return [parsed$, { status: "invalid" }];
@@ -58808,12 +58887,12 @@ var init_invoicesVoidInvoice = __esm(() => {
58808
58887
  });
58809
58888
 
58810
58889
  // src/mcp-server/tools/invoicesVoidInvoice.ts
58811
- var args31, tool$invoicesVoidInvoice;
58890
+ var args30, tool$invoicesVoidInvoice;
58812
58891
  var init_invoicesVoidInvoice2 = __esm(() => {
58813
58892
  init_invoicesVoidInvoice();
58814
58893
  init_voidinvoiceop();
58815
58894
  init_tools();
58816
- args31 = {
58895
+ args30 = {
58817
58896
  request: VoidInvoiceRequest$zodSchema
58818
58897
  };
58819
58898
  tool$invoicesVoidInvoice = {
@@ -58829,9 +58908,9 @@ Use when cancelling an invoice (e.g. order cancelled or duplicate). Only unpaid
58829
58908
  openWorldHint: false,
58830
58909
  readOnlyHint: false
58831
58910
  },
58832
- args: args31,
58833
- tool: async (client, args32, ctx) => {
58834
- const [result] = await invoicesVoidInvoice(client, args32.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58911
+ args: args30,
58912
+ tool: async (client, args31, ctx) => {
58913
+ const [result] = await invoicesVoidInvoice(client, args31.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58835
58914
  if (!result.ok) {
58836
58915
  return {
58837
58916
  content: [{ type: "text", text: result.error.message }],
@@ -58875,9 +58954,9 @@ var init_cloneplanop = __esm(() => {
58875
58954
 
58876
58955
  // src/funcs/plansClonePlan.ts
58877
58956
  function plansClonePlan(client$, request, options) {
58878
- return new APIPromise($do33(client$, request, options));
58957
+ return new APIPromise($do32(client$, request, options));
58879
58958
  }
58880
- async function $do33(client$, request, options) {
58959
+ async function $do32(client$, request, options) {
58881
58960
  const parsed$ = safeParse4(request, (value$) => ClonePlanRequestRequest$zodSchema.parse(value$), "Input validation failed");
58882
58961
  if (!parsed$.ok) {
58883
58962
  return [parsed$, { status: "invalid" }];
@@ -58953,12 +59032,12 @@ var init_plansClonePlan = __esm(() => {
58953
59032
  });
58954
59033
 
58955
59034
  // src/mcp-server/tools/plansClonePlan.ts
58956
- var args32, tool$plansClonePlan;
59035
+ var args31, tool$plansClonePlan;
58957
59036
  var init_plansClonePlan2 = __esm(() => {
58958
59037
  init_plansClonePlan();
58959
59038
  init_cloneplanop();
58960
59039
  init_tools();
58961
- args32 = {
59040
+ args31 = {
58962
59041
  request: ClonePlanRequestRequest$zodSchema
58963
59042
  };
58964
59043
  tool$plansClonePlan = {
@@ -58974,9 +59053,9 @@ Clone an existing plan, copying its active prices, published entitlements, and p
58974
59053
  openWorldHint: false,
58975
59054
  readOnlyHint: false
58976
59055
  },
58977
- args: args32,
58978
- tool: async (client, args33, ctx) => {
58979
- const [result] = await plansClonePlan(client, args33.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59056
+ args: args31,
59057
+ tool: async (client, args32, ctx) => {
59058
+ const [result] = await plansClonePlan(client, args32.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58980
59059
  if (!result.ok) {
58981
59060
  return {
58982
59061
  content: [{ type: "text", text: result.error.message }],
@@ -59003,9 +59082,9 @@ var init_createplanrequest = __esm(() => {
59003
59082
 
59004
59083
  // src/funcs/plansCreatePlan.ts
59005
59084
  function plansCreatePlan(client$, request, options) {
59006
- return new APIPromise($do34(client$, request, options));
59085
+ return new APIPromise($do33(client$, request, options));
59007
59086
  }
59008
- async function $do34(client$, request, options) {
59087
+ async function $do33(client$, request, options) {
59009
59088
  const parsed$ = safeParse4(request, (value$) => CreatePlanRequest$zodSchema.parse(value$), "Input validation failed");
59010
59089
  if (!parsed$.ok) {
59011
59090
  return [parsed$, { status: "invalid" }];
@@ -59075,12 +59154,12 @@ var init_plansCreatePlan = __esm(() => {
59075
59154
  });
59076
59155
 
59077
59156
  // src/mcp-server/tools/plansCreatePlan.ts
59078
- var args33, tool$plansCreatePlan;
59157
+ var args32, tool$plansCreatePlan;
59079
59158
  var init_plansCreatePlan2 = __esm(() => {
59080
59159
  init_plansCreatePlan();
59081
59160
  init_createplanrequest();
59082
59161
  init_tools();
59083
- args33 = {
59162
+ args32 = {
59084
59163
  request: CreatePlanRequest$zodSchema.describe(`Plan configuration`)
59085
59164
  };
59086
59165
  tool$plansCreatePlan = {
@@ -59096,9 +59175,9 @@ Use when defining a new pricing plan (e.g. Free, Pro, Enterprise). Attach prices
59096
59175
  openWorldHint: false,
59097
59176
  readOnlyHint: false
59098
59177
  },
59099
- args: args33,
59100
- tool: async (client, args34, ctx) => {
59101
- const [result] = await plansCreatePlan(client, args34.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59178
+ args: args32,
59179
+ tool: async (client, args33, ctx) => {
59180
+ const [result] = await plansCreatePlan(client, args33.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59102
59181
  if (!result.ok) {
59103
59182
  return {
59104
59183
  content: [{ type: "text", text: result.error.message }],
@@ -59127,9 +59206,9 @@ var init_deleteplanop = __esm(() => {
59127
59206
 
59128
59207
  // src/funcs/plansDeletePlan.ts
59129
59208
  function plansDeletePlan(client$, request, options) {
59130
- return new APIPromise($do35(client$, request, options));
59209
+ return new APIPromise($do34(client$, request, options));
59131
59210
  }
59132
- async function $do35(client$, request, options) {
59211
+ async function $do34(client$, request, options) {
59133
59212
  const parsed$ = safeParse4(request, (value$) => DeletePlanRequest$zodSchema.parse(value$), "Input validation failed");
59134
59213
  if (!parsed$.ok) {
59135
59214
  return [parsed$, { status: "invalid" }];
@@ -59204,12 +59283,12 @@ var init_plansDeletePlan = __esm(() => {
59204
59283
  });
59205
59284
 
59206
59285
  // src/mcp-server/tools/plansDeletePlan.ts
59207
- var args34, tool$plansDeletePlan;
59286
+ var args33, tool$plansDeletePlan;
59208
59287
  var init_plansDeletePlan2 = __esm(() => {
59209
59288
  init_plansDeletePlan();
59210
59289
  init_deleteplanop();
59211
59290
  init_tools();
59212
- args34 = {
59291
+ args33 = {
59213
59292
  request: DeletePlanRequest$zodSchema
59214
59293
  };
59215
59294
  tool$plansDeletePlan = {
@@ -59225,9 +59304,9 @@ Use when retiring a plan (e.g. end-of-life). Existing subscriptions may be affec
59225
59304
  openWorldHint: false,
59226
59305
  readOnlyHint: false
59227
59306
  },
59228
- args: args34,
59229
- tool: async (client, args35, ctx) => {
59230
- const [result] = await plansDeletePlan(client, args35.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59307
+ args: args33,
59308
+ tool: async (client, args34, ctx) => {
59309
+ const [result] = await plansDeletePlan(client, args34.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59231
59310
  if (!result.ok) {
59232
59311
  return {
59233
59312
  content: [{ type: "text", text: result.error.message }],
@@ -59256,9 +59335,9 @@ var init_getplanop = __esm(() => {
59256
59335
 
59257
59336
  // src/funcs/plansGetPlan.ts
59258
59337
  function plansGetPlan(client$, request, options) {
59259
- return new APIPromise($do36(client$, request, options));
59338
+ return new APIPromise($do35(client$, request, options));
59260
59339
  }
59261
- async function $do36(client$, request, options) {
59340
+ async function $do35(client$, request, options) {
59262
59341
  const parsed$ = safeParse4(request, (value$) => GetPlanRequest$zodSchema.parse(value$), "Input validation failed");
59263
59342
  if (!parsed$.ok) {
59264
59343
  return [parsed$, { status: "invalid" }];
@@ -59333,12 +59412,12 @@ var init_plansGetPlan = __esm(() => {
59333
59412
  });
59334
59413
 
59335
59414
  // src/mcp-server/tools/plansGetPlan.ts
59336
- var args35, tool$plansGetPlan;
59415
+ var args34, tool$plansGetPlan;
59337
59416
  var init_plansGetPlan2 = __esm(() => {
59338
59417
  init_plansGetPlan();
59339
59418
  init_getplanop();
59340
59419
  init_tools();
59341
- args35 = {
59420
+ args34 = {
59342
59421
  request: GetPlanRequest$zodSchema
59343
59422
  };
59344
59423
  tool$plansGetPlan = {
@@ -59354,9 +59433,9 @@ Use when you need to load a single plan (e.g. for display or to create a subscri
59354
59433
  openWorldHint: false,
59355
59434
  readOnlyHint: true
59356
59435
  },
59357
- args: args35,
59358
- tool: async (client, args36, ctx) => {
59359
- const [result] = await plansGetPlan(client, args36.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59436
+ args: args34,
59437
+ tool: async (client, args35, ctx) => {
59438
+ const [result] = await plansGetPlan(client, args35.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59360
59439
  if (!result.ok) {
59361
59440
  return {
59362
59441
  content: [{ type: "text", text: result.error.message }],
@@ -59397,9 +59476,9 @@ var init_planfilter = __esm(() => {
59397
59476
 
59398
59477
  // src/funcs/plansQueryPlan.ts
59399
59478
  function plansQueryPlan(client$, request, options) {
59400
- return new APIPromise($do37(client$, request, options));
59479
+ return new APIPromise($do36(client$, request, options));
59401
59480
  }
59402
- async function $do37(client$, request, options) {
59481
+ async function $do36(client$, request, options) {
59403
59482
  const parsed$ = safeParse4(request, (value$) => PlanFilter$zodSchema.parse(value$), "Input validation failed");
59404
59483
  if (!parsed$.ok) {
59405
59484
  return [parsed$, { status: "invalid" }];
@@ -59469,12 +59548,12 @@ var init_plansQueryPlan = __esm(() => {
59469
59548
  });
59470
59549
 
59471
59550
  // src/mcp-server/tools/plansQueryPlan.ts
59472
- var args36, tool$plansQueryPlan;
59551
+ var args35, tool$plansQueryPlan;
59473
59552
  var init_plansQueryPlan2 = __esm(() => {
59474
59553
  init_plansQueryPlan();
59475
59554
  init_planfilter();
59476
59555
  init_tools();
59477
- args36 = {
59556
+ args35 = {
59478
59557
  request: PlanFilter$zodSchema.describe(`Filter`)
59479
59558
  };
59480
59559
  tool$plansQueryPlan = {
@@ -59490,9 +59569,9 @@ Use when listing or searching plans (e.g. plan picker or admin catalog). Returns
59490
59569
  openWorldHint: false,
59491
59570
  readOnlyHint: false
59492
59571
  },
59493
- args: args36,
59494
- tool: async (client, args37, ctx) => {
59495
- const [result] = await plansQueryPlan(client, args37.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59572
+ args: args35,
59573
+ tool: async (client, args36, ctx) => {
59574
+ const [result] = await plansQueryPlan(client, args36.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59496
59575
  if (!result.ok) {
59497
59576
  return {
59498
59577
  content: [{ type: "text", text: result.error.message }],
@@ -59521,9 +59600,9 @@ var init_syncplanpricesop = __esm(() => {
59521
59600
 
59522
59601
  // src/funcs/plansSyncPlanPrices.ts
59523
59602
  function plansSyncPlanPrices(client$, request, options) {
59524
- return new APIPromise($do38(client$, request, options));
59603
+ return new APIPromise($do37(client$, request, options));
59525
59604
  }
59526
- async function $do38(client$, request, options) {
59605
+ async function $do37(client$, request, options) {
59527
59606
  const parsed$ = safeParse4(request, (value$) => SyncPlanPricesRequest$zodSchema.parse(value$), "Input validation failed");
59528
59607
  if (!parsed$.ok) {
59529
59608
  return [parsed$, { status: "invalid" }];
@@ -59598,12 +59677,12 @@ var init_plansSyncPlanPrices = __esm(() => {
59598
59677
  });
59599
59678
 
59600
59679
  // src/mcp-server/tools/plansSyncPlanPrices.ts
59601
- var args37, tool$plansSyncPlanPrices;
59680
+ var args36, tool$plansSyncPlanPrices;
59602
59681
  var init_plansSyncPlanPrices2 = __esm(() => {
59603
59682
  init_plansSyncPlanPrices();
59604
59683
  init_syncplanpricesop();
59605
59684
  init_tools();
59606
- args37 = {
59685
+ args36 = {
59607
59686
  request: SyncPlanPricesRequest$zodSchema
59608
59687
  };
59609
59688
  tool$plansSyncPlanPrices = {
@@ -59619,9 +59698,9 @@ Use when you have changed plan prices and need to push them to all active subscr
59619
59698
  openWorldHint: false,
59620
59699
  readOnlyHint: false
59621
59700
  },
59622
- args: args37,
59623
- tool: async (client, args38, ctx) => {
59624
- const [result] = await plansSyncPlanPrices(client, args38.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59701
+ args: args36,
59702
+ tool: async (client, args37, ctx) => {
59703
+ const [result] = await plansSyncPlanPrices(client, args37.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59625
59704
  if (!result.ok) {
59626
59705
  return {
59627
59706
  content: [{ type: "text", text: result.error.message }],
@@ -59665,9 +59744,9 @@ var init_updateplanop = __esm(() => {
59665
59744
 
59666
59745
  // src/funcs/plansUpdatePlan.ts
59667
59746
  function plansUpdatePlan(client$, request, options) {
59668
- return new APIPromise($do39(client$, request, options));
59747
+ return new APIPromise($do38(client$, request, options));
59669
59748
  }
59670
- async function $do39(client$, request, options) {
59749
+ async function $do38(client$, request, options) {
59671
59750
  const parsed$ = safeParse4(request, (value$) => UpdatePlanRequestRequest$zodSchema.parse(value$), "Input validation failed");
59672
59751
  if (!parsed$.ok) {
59673
59752
  return [parsed$, { status: "invalid" }];
@@ -59743,12 +59822,12 @@ var init_plansUpdatePlan = __esm(() => {
59743
59822
  });
59744
59823
 
59745
59824
  // src/mcp-server/tools/plansUpdatePlan.ts
59746
- var args38, tool$plansUpdatePlan;
59825
+ var args37, tool$plansUpdatePlan;
59747
59826
  var init_plansUpdatePlan2 = __esm(() => {
59748
59827
  init_plansUpdatePlan();
59749
59828
  init_updateplanop();
59750
59829
  init_tools();
59751
- args38 = {
59830
+ args37 = {
59752
59831
  request: UpdatePlanRequestRequest$zodSchema
59753
59832
  };
59754
59833
  tool$plansUpdatePlan = {
@@ -59764,9 +59843,9 @@ Use when changing plan details (e.g. name, interval, or metadata). Partial updat
59764
59843
  openWorldHint: false,
59765
59844
  readOnlyHint: false
59766
59845
  },
59767
- args: args38,
59768
- tool: async (client, args39, ctx) => {
59769
- const [result] = await plansUpdatePlan(client, args39.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59846
+ args: args37,
59847
+ tool: async (client, args38, ctx) => {
59848
+ const [result] = await plansUpdatePlan(client, args38.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59770
59849
  if (!result.ok) {
59771
59850
  return {
59772
59851
  content: [{ type: "text", text: result.error.message }],
@@ -59861,9 +59940,9 @@ var init_createpricerequest = __esm(() => {
59861
59940
 
59862
59941
  // src/funcs/pricesCreatePrice.ts
59863
59942
  function pricesCreatePrice(client$, request, options) {
59864
- return new APIPromise($do40(client$, request, options));
59943
+ return new APIPromise($do39(client$, request, options));
59865
59944
  }
59866
- async function $do40(client$, request, options) {
59945
+ async function $do39(client$, request, options) {
59867
59946
  const parsed$ = safeParse4(request, (value$) => CreatePriceRequest$zodSchema.parse(value$), "Input validation failed");
59868
59947
  if (!parsed$.ok) {
59869
59948
  return [parsed$, { status: "invalid" }];
@@ -59933,12 +60012,12 @@ var init_pricesCreatePrice = __esm(() => {
59933
60012
  });
59934
60013
 
59935
60014
  // src/mcp-server/tools/pricesCreatePrice.ts
59936
- var args39, tool$pricesCreatePrice;
60015
+ var args38, tool$pricesCreatePrice;
59937
60016
  var init_pricesCreatePrice2 = __esm(() => {
59938
60017
  init_pricesCreatePrice();
59939
60018
  init_createpricerequest();
59940
60019
  init_tools();
59941
- args39 = {
60020
+ args38 = {
59942
60021
  request: CreatePriceRequest$zodSchema.describe(`Price configuration`)
59943
60022
  };
59944
60023
  tool$pricesCreatePrice = {
@@ -59954,9 +60033,9 @@ Use when adding a new price to a plan or catalog (e.g. per-seat, flat, or metere
59954
60033
  openWorldHint: false,
59955
60034
  readOnlyHint: false
59956
60035
  },
59957
- args: args39,
59958
- tool: async (client, args40, ctx) => {
59959
- const [result] = await pricesCreatePrice(client, args40.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60036
+ args: args38,
60037
+ tool: async (client, args39, ctx) => {
60038
+ const [result] = await pricesCreatePrice(client, args39.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59960
60039
  if (!result.ok) {
59961
60040
  return {
59962
60041
  content: [{ type: "text", text: result.error.message }],
@@ -59980,9 +60059,9 @@ var init_createbulkpricerequest = __esm(() => {
59980
60059
 
59981
60060
  // src/funcs/pricesCreatePricesBulk.ts
59982
60061
  function pricesCreatePricesBulk(client$, request, options) {
59983
- return new APIPromise($do41(client$, request, options));
60062
+ return new APIPromise($do40(client$, request, options));
59984
60063
  }
59985
- async function $do41(client$, request, options) {
60064
+ async function $do40(client$, request, options) {
59986
60065
  const parsed$ = safeParse4(request, (value$) => CreateBulkPriceRequest$zodSchema.parse(value$), "Input validation failed");
59987
60066
  if (!parsed$.ok) {
59988
60067
  return [parsed$, { status: "invalid" }];
@@ -60052,12 +60131,12 @@ var init_pricesCreatePricesBulk = __esm(() => {
60052
60131
  });
60053
60132
 
60054
60133
  // src/mcp-server/tools/pricesCreatePricesBulk.ts
60055
- var args40, tool$pricesCreatePricesBulk;
60134
+ var args39, tool$pricesCreatePricesBulk;
60056
60135
  var init_pricesCreatePricesBulk2 = __esm(() => {
60057
60136
  init_pricesCreatePricesBulk();
60058
60137
  init_createbulkpricerequest();
60059
60138
  init_tools();
60060
- args40 = {
60139
+ args39 = {
60061
60140
  request: CreateBulkPriceRequest$zodSchema.describe(`Bulk price configuration`)
60062
60141
  };
60063
60142
  tool$pricesCreatePricesBulk = {
@@ -60073,9 +60152,9 @@ Use when creating many prices at once (e.g. importing a catalog or setting up a
60073
60152
  openWorldHint: false,
60074
60153
  readOnlyHint: false
60075
60154
  },
60076
- args: args40,
60077
- tool: async (client, args41, ctx) => {
60078
- const [result] = await pricesCreatePricesBulk(client, args41.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60155
+ args: args39,
60156
+ tool: async (client, args40, ctx) => {
60157
+ const [result] = await pricesCreatePricesBulk(client, args40.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60079
60158
  if (!result.ok) {
60080
60159
  return {
60081
60160
  content: [{ type: "text", text: result.error.message }],
@@ -60115,9 +60194,9 @@ var init_deletepriceop = __esm(() => {
60115
60194
 
60116
60195
  // src/funcs/pricesDeletePrice.ts
60117
60196
  function pricesDeletePrice(client$, request, options) {
60118
- return new APIPromise($do42(client$, request, options));
60197
+ return new APIPromise($do41(client$, request, options));
60119
60198
  }
60120
- async function $do42(client$, request, options) {
60199
+ async function $do41(client$, request, options) {
60121
60200
  const parsed$ = safeParse4(request, (value$) => DeletePriceRequestRequest$zodSchema.parse(value$), "Input validation failed");
60122
60201
  if (!parsed$.ok) {
60123
60202
  return [parsed$, { status: "invalid" }];
@@ -60193,12 +60272,12 @@ var init_pricesDeletePrice = __esm(() => {
60193
60272
  });
60194
60273
 
60195
60274
  // src/mcp-server/tools/pricesDeletePrice.ts
60196
- var args41, tool$pricesDeletePrice;
60275
+ var args40, tool$pricesDeletePrice;
60197
60276
  var init_pricesDeletePrice2 = __esm(() => {
60198
60277
  init_pricesDeletePrice();
60199
60278
  init_deletepriceop();
60200
60279
  init_tools();
60201
- args41 = {
60280
+ args40 = {
60202
60281
  request: DeletePriceRequestRequest$zodSchema
60203
60282
  };
60204
60283
  tool$pricesDeletePrice = {
@@ -60214,9 +60293,9 @@ Use when retiring a price (e.g. end-of-life or replacement). Optional effective
60214
60293
  openWorldHint: false,
60215
60294
  readOnlyHint: false
60216
60295
  },
60217
- args: args41,
60218
- tool: async (client, args42, ctx) => {
60219
- const [result] = await pricesDeletePrice(client, args42.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60296
+ args: args40,
60297
+ tool: async (client, args41, ctx) => {
60298
+ const [result] = await pricesDeletePrice(client, args41.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60220
60299
  if (!result.ok) {
60221
60300
  return {
60222
60301
  content: [{ type: "text", text: result.error.message }],
@@ -60245,9 +60324,9 @@ var init_getpriceop = __esm(() => {
60245
60324
 
60246
60325
  // src/funcs/pricesGetPrice.ts
60247
60326
  function pricesGetPrice(client$, request, options) {
60248
- return new APIPromise($do43(client$, request, options));
60327
+ return new APIPromise($do42(client$, request, options));
60249
60328
  }
60250
- async function $do43(client$, request, options) {
60329
+ async function $do42(client$, request, options) {
60251
60330
  const parsed$ = safeParse4(request, (value$) => GetPriceRequest$zodSchema.parse(value$), "Input validation failed");
60252
60331
  if (!parsed$.ok) {
60253
60332
  return [parsed$, { status: "invalid" }];
@@ -60322,12 +60401,12 @@ var init_pricesGetPrice = __esm(() => {
60322
60401
  });
60323
60402
 
60324
60403
  // src/mcp-server/tools/pricesGetPrice.ts
60325
- var args42, tool$pricesGetPrice;
60404
+ var args41, tool$pricesGetPrice;
60326
60405
  var init_pricesGetPrice2 = __esm(() => {
60327
60406
  init_pricesGetPrice();
60328
60407
  init_getpriceop();
60329
60408
  init_tools();
60330
- args42 = {
60409
+ args41 = {
60331
60410
  request: GetPriceRequest$zodSchema
60332
60411
  };
60333
60412
  tool$pricesGetPrice = {
@@ -60343,9 +60422,9 @@ Use when you need to load a single price (e.g. for display or editing). Response
60343
60422
  openWorldHint: false,
60344
60423
  readOnlyHint: true
60345
60424
  },
60346
- args: args42,
60347
- tool: async (client, args43, ctx) => {
60348
- const [result] = await pricesGetPrice(client, args43.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60425
+ args: args41,
60426
+ tool: async (client, args42, ctx) => {
60427
+ const [result] = await pricesGetPrice(client, args42.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60349
60428
  if (!result.ok) {
60350
60429
  return {
60351
60430
  content: [{ type: "text", text: result.error.message }],
@@ -60374,9 +60453,9 @@ var init_getpricebylookupkeyop = __esm(() => {
60374
60453
 
60375
60454
  // src/funcs/pricesGetPriceByLookupKey.ts
60376
60455
  function pricesGetPriceByLookupKey(client$, request, options) {
60377
- return new APIPromise($do44(client$, request, options));
60456
+ return new APIPromise($do43(client$, request, options));
60378
60457
  }
60379
- async function $do44(client$, request, options) {
60458
+ async function $do43(client$, request, options) {
60380
60459
  const parsed$ = safeParse4(request, (value$) => GetPriceByLookupKeyRequest$zodSchema.parse(value$), "Input validation failed");
60381
60460
  if (!parsed$.ok) {
60382
60461
  return [parsed$, { status: "invalid" }];
@@ -60451,12 +60530,12 @@ var init_pricesGetPriceByLookupKey = __esm(() => {
60451
60530
  });
60452
60531
 
60453
60532
  // src/mcp-server/tools/pricesGetPriceByLookupKey.ts
60454
- var args43, tool$pricesGetPriceByLookupKey;
60533
+ var args42, tool$pricesGetPriceByLookupKey;
60455
60534
  var init_pricesGetPriceByLookupKey2 = __esm(() => {
60456
60535
  init_pricesGetPriceByLookupKey();
60457
60536
  init_getpricebylookupkeyop();
60458
60537
  init_tools();
60459
- args43 = {
60538
+ args42 = {
60460
60539
  request: GetPriceByLookupKeyRequest$zodSchema
60461
60540
  };
60462
60541
  tool$pricesGetPriceByLookupKey = {
@@ -60472,9 +60551,9 @@ Use when resolving a price by external id (e.g. from your catalog or CMS). Ideal
60472
60551
  openWorldHint: false,
60473
60552
  readOnlyHint: true
60474
60553
  },
60475
- args: args43,
60476
- tool: async (client, args44, ctx) => {
60477
- const [result] = await pricesGetPriceByLookupKey(client, args44.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60554
+ args: args42,
60555
+ tool: async (client, args43, ctx) => {
60556
+ const [result] = await pricesGetPriceByLookupKey(client, args43.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60478
60557
  if (!result.ok) {
60479
60558
  return {
60480
60559
  content: [{ type: "text", text: result.error.message }],
@@ -60521,9 +60600,9 @@ var init_pricefilter = __esm(() => {
60521
60600
 
60522
60601
  // src/funcs/pricesQueryPrice.ts
60523
60602
  function pricesQueryPrice(client$, request, options) {
60524
- return new APIPromise($do45(client$, request, options));
60603
+ return new APIPromise($do44(client$, request, options));
60525
60604
  }
60526
- async function $do45(client$, request, options) {
60605
+ async function $do44(client$, request, options) {
60527
60606
  const parsed$ = safeParse4(request, (value$) => PriceFilter$zodSchema.parse(value$), "Input validation failed");
60528
60607
  if (!parsed$.ok) {
60529
60608
  return [parsed$, { status: "invalid" }];
@@ -60593,12 +60672,12 @@ var init_pricesQueryPrice = __esm(() => {
60593
60672
  });
60594
60673
 
60595
60674
  // src/mcp-server/tools/pricesQueryPrice.ts
60596
- var args44, tool$pricesQueryPrice;
60675
+ var args43, tool$pricesQueryPrice;
60597
60676
  var init_pricesQueryPrice2 = __esm(() => {
60598
60677
  init_pricesQueryPrice();
60599
60678
  init_pricefilter();
60600
60679
  init_tools();
60601
- args44 = {
60680
+ args43 = {
60602
60681
  request: PriceFilter$zodSchema.describe(`Filter`)
60603
60682
  };
60604
60683
  tool$pricesQueryPrice = {
@@ -60614,9 +60693,9 @@ Use when listing or searching prices (e.g. plan builder or catalog). Returns a p
60614
60693
  openWorldHint: false,
60615
60694
  readOnlyHint: false
60616
60695
  },
60617
- args: args44,
60618
- tool: async (client, args45, ctx) => {
60619
- const [result] = await pricesQueryPrice(client, args45.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60696
+ args: args43,
60697
+ tool: async (client, args44, ctx) => {
60698
+ const [result] = await pricesQueryPrice(client, args44.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60620
60699
  if (!result.ok) {
60621
60700
  return {
60622
60701
  content: [{ type: "text", text: result.error.message }],
@@ -60676,9 +60755,9 @@ var init_updatepriceop = __esm(() => {
60676
60755
 
60677
60756
  // src/funcs/pricesUpdatePrice.ts
60678
60757
  function pricesUpdatePrice(client$, request, options) {
60679
- return new APIPromise($do46(client$, request, options));
60758
+ return new APIPromise($do45(client$, request, options));
60680
60759
  }
60681
- async function $do46(client$, request, options) {
60760
+ async function $do45(client$, request, options) {
60682
60761
  const parsed$ = safeParse4(request, (value$) => UpdatePriceRequestRequest$zodSchema.parse(value$), "Input validation failed");
60683
60762
  if (!parsed$.ok) {
60684
60763
  return [parsed$, { status: "invalid" }];
@@ -60754,12 +60833,12 @@ var init_pricesUpdatePrice = __esm(() => {
60754
60833
  });
60755
60834
 
60756
60835
  // src/mcp-server/tools/pricesUpdatePrice.ts
60757
- var args45, tool$pricesUpdatePrice;
60836
+ var args44, tool$pricesUpdatePrice;
60758
60837
  var init_pricesUpdatePrice2 = __esm(() => {
60759
60838
  init_pricesUpdatePrice();
60760
60839
  init_updatepriceop();
60761
60840
  init_tools();
60762
- args45 = {
60841
+ args44 = {
60763
60842
  request: UpdatePriceRequestRequest$zodSchema
60764
60843
  };
60765
60844
  tool$pricesUpdatePrice = {
@@ -60775,9 +60854,9 @@ Use when changing price configuration (e.g. amount, billing scheme, or metadata)
60775
60854
  openWorldHint: false,
60776
60855
  readOnlyHint: false
60777
60856
  },
60778
- args: args45,
60779
- tool: async (client, args46, ctx) => {
60780
- const [result] = await pricesUpdatePrice(client, args46.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60857
+ args: args44,
60858
+ tool: async (client, args45, ctx) => {
60859
+ const [result] = await pricesUpdatePrice(client, args45.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60781
60860
  if (!result.ok) {
60782
60861
  return {
60783
60862
  content: [{ type: "text", text: result.error.message }],
@@ -60817,9 +60896,9 @@ var init_activatesubscriptionop = __esm(() => {
60817
60896
 
60818
60897
  // src/funcs/subscriptionsActivateSubscription.ts
60819
60898
  function subscriptionsActivateSubscription(client$, request, options) {
60820
- return new APIPromise($do47(client$, request, options));
60899
+ return new APIPromise($do46(client$, request, options));
60821
60900
  }
60822
- async function $do47(client$, request, options) {
60901
+ async function $do46(client$, request, options) {
60823
60902
  const parsed$ = safeParse4(request, (value$) => ActivateSubscriptionRequest$zodSchema.parse(value$), "Input validation failed");
60824
60903
  if (!parsed$.ok) {
60825
60904
  return [parsed$, { status: "invalid" }];
@@ -60895,12 +60974,12 @@ var init_subscriptionsActivateSubscription = __esm(() => {
60895
60974
  });
60896
60975
 
60897
60976
  // src/mcp-server/tools/subscriptionsActivateSubscription.ts
60898
- var args46, tool$subscriptionsActivateSubscription;
60977
+ var args45, tool$subscriptionsActivateSubscription;
60899
60978
  var init_subscriptionsActivateSubscription2 = __esm(() => {
60900
60979
  init_subscriptionsActivateSubscription();
60901
60980
  init_activatesubscriptionop();
60902
60981
  init_tools();
60903
- args46 = {
60982
+ args45 = {
60904
60983
  request: ActivateSubscriptionRequest$zodSchema
60905
60984
  };
60906
60985
  tool$subscriptionsActivateSubscription = {
@@ -60916,9 +60995,9 @@ Use when turning a draft subscription live (e.g. after collecting payment or com
60916
60995
  openWorldHint: false,
60917
60996
  readOnlyHint: false
60918
60997
  },
60919
- args: args46,
60920
- tool: async (client, args47, ctx) => {
60921
- const [result] = await subscriptionsActivateSubscription(client, args47.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60998
+ args: args45,
60999
+ tool: async (client, args46, ctx) => {
61000
+ const [result] = await subscriptionsActivateSubscription(client, args46.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60922
61001
  if (!result.ok) {
60923
61002
  return {
60924
61003
  content: [{ type: "text", text: result.error.message }],
@@ -60977,9 +61056,9 @@ var init_addaddonrequest = __esm(() => {
60977
61056
 
60978
61057
  // src/funcs/subscriptionsAddSubscriptionAddon.ts
60979
61058
  function subscriptionsAddSubscriptionAddon(client$, request, options) {
60980
- return new APIPromise($do48(client$, request, options));
61059
+ return new APIPromise($do47(client$, request, options));
60981
61060
  }
60982
- async function $do48(client$, request, options) {
61061
+ async function $do47(client$, request, options) {
60983
61062
  const parsed$ = safeParse4(request, (value$) => AddAddonRequest$zodSchema.parse(value$), "Input validation failed");
60984
61063
  if (!parsed$.ok) {
60985
61064
  return [parsed$, { status: "invalid" }];
@@ -61049,12 +61128,12 @@ var init_subscriptionsAddSubscriptionAddon = __esm(() => {
61049
61128
  });
61050
61129
 
61051
61130
  // src/mcp-server/tools/subscriptionsAddSubscriptionAddon.ts
61052
- var args47, tool$subscriptionsAddSubscriptionAddon;
61131
+ var args46, tool$subscriptionsAddSubscriptionAddon;
61053
61132
  var init_subscriptionsAddSubscriptionAddon2 = __esm(() => {
61054
61133
  init_subscriptionsAddSubscriptionAddon();
61055
61134
  init_addaddonrequest();
61056
61135
  init_tools();
61057
- args47 = {
61136
+ args46 = {
61058
61137
  request: AddAddonRequest$zodSchema.describe(`Add Addon Request`)
61059
61138
  };
61060
61139
  tool$subscriptionsAddSubscriptionAddon = {
@@ -61070,9 +61149,9 @@ Use when adding an optional product or add-on to an existing subscription (e.g.
61070
61149
  openWorldHint: false,
61071
61150
  readOnlyHint: false
61072
61151
  },
61073
- args: args47,
61074
- tool: async (client, args48, ctx) => {
61075
- const [result] = await subscriptionsAddSubscriptionAddon(client, args48.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61152
+ args: args46,
61153
+ tool: async (client, args47, ctx) => {
61154
+ const [result] = await subscriptionsAddSubscriptionAddon(client, args47.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61076
61155
  if (!result.ok) {
61077
61156
  return {
61078
61157
  content: [{ type: "text", text: result.error.message }],
@@ -61178,9 +61257,9 @@ var init_cancelsubscriptionop = __esm(() => {
61178
61257
 
61179
61258
  // src/funcs/subscriptionsCancelSubscription.ts
61180
61259
  function subscriptionsCancelSubscription(client$, request, options) {
61181
- return new APIPromise($do49(client$, request, options));
61260
+ return new APIPromise($do48(client$, request, options));
61182
61261
  }
61183
- async function $do49(client$, request, options) {
61262
+ async function $do48(client$, request, options) {
61184
61263
  const parsed$ = safeParse4(request, (value$) => CancelSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
61185
61264
  if (!parsed$.ok) {
61186
61265
  return [parsed$, { status: "invalid" }];
@@ -61256,12 +61335,12 @@ var init_subscriptionsCancelSubscription = __esm(() => {
61256
61335
  });
61257
61336
 
61258
61337
  // src/mcp-server/tools/subscriptionsCancelSubscription.ts
61259
- var args48, tool$subscriptionsCancelSubscription;
61338
+ var args47, tool$subscriptionsCancelSubscription;
61260
61339
  var init_subscriptionsCancelSubscription2 = __esm(() => {
61261
61340
  init_subscriptionsCancelSubscription();
61262
61341
  init_cancelsubscriptionop();
61263
61342
  init_tools();
61264
- args48 = {
61343
+ args47 = {
61265
61344
  request: CancelSubscriptionRequestRequest$zodSchema
61266
61345
  };
61267
61346
  tool$subscriptionsCancelSubscription = {
@@ -61277,9 +61356,9 @@ Use when a customer churns or downgrades. Supports immediate or end-of-period ca
61277
61356
  openWorldHint: false,
61278
61357
  readOnlyHint: false
61279
61358
  },
61280
- args: args48,
61281
- tool: async (client, args49, ctx) => {
61282
- const [result] = await subscriptionsCancelSubscription(client, args49.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61359
+ args: args47,
61360
+ tool: async (client, args48, ctx) => {
61361
+ const [result] = await subscriptionsCancelSubscription(client, args48.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61283
61362
  if (!result.ok) {
61284
61363
  return {
61285
61364
  content: [{ type: "text", text: result.error.message }],
@@ -61326,9 +61405,9 @@ var init_cancelsubscriptionscheduleop = __esm(() => {
61326
61405
 
61327
61406
  // src/funcs/subscriptionsCancelSubscriptionSchedule.ts
61328
61407
  function subscriptionsCancelSubscriptionSchedule(client$, request, options) {
61329
- return new APIPromise($do50(client$, request, options));
61408
+ return new APIPromise($do49(client$, request, options));
61330
61409
  }
61331
- async function $do50(client$, request, options) {
61410
+ async function $do49(client$, request, options) {
61332
61411
  const parsed$ = safeParse4(request, (value$) => CancelSubscriptionScheduleRequest$zodSchema.parse(value$), "Input validation failed");
61333
61412
  if (!parsed$.ok) {
61334
61413
  return [parsed$, { status: "invalid" }];
@@ -61404,12 +61483,12 @@ var init_subscriptionsCancelSubscriptionSchedule = __esm(() => {
61404
61483
  });
61405
61484
 
61406
61485
  // src/mcp-server/tools/subscriptionsCancelSubscriptionSchedule.ts
61407
- var args49, tool$subscriptionsCancelSubscriptionSchedule;
61486
+ var args48, tool$subscriptionsCancelSubscriptionSchedule;
61408
61487
  var init_subscriptionsCancelSubscriptionSchedule2 = __esm(() => {
61409
61488
  init_subscriptionsCancelSubscriptionSchedule();
61410
61489
  init_cancelsubscriptionscheduleop();
61411
61490
  init_tools();
61412
- args49 = {
61491
+ args48 = {
61413
61492
  request: CancelSubscriptionScheduleRequest$zodSchema
61414
61493
  };
61415
61494
  tool$subscriptionsCancelSubscriptionSchedule = {
@@ -61425,9 +61504,9 @@ Use when cancelling a scheduled change (e.g. customer changed mind). Identify by
61425
61504
  openWorldHint: false,
61426
61505
  readOnlyHint: false
61427
61506
  },
61428
- args: args49,
61429
- tool: async (client, args50, ctx) => {
61430
- const [result] = await subscriptionsCancelSubscriptionSchedule(client, args50.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61507
+ args: args48,
61508
+ tool: async (client, args49, ctx) => {
61509
+ const [result] = await subscriptionsCancelSubscriptionSchedule(client, args49.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61431
61510
  if (!result.ok) {
61432
61511
  return {
61433
61512
  content: [{ type: "text", text: result.error.message }],
@@ -61722,9 +61801,9 @@ and must be same as what you provided as external_id while creating the customer
61722
61801
 
61723
61802
  // src/funcs/subscriptionsCreateSubscription.ts
61724
61803
  function subscriptionsCreateSubscription(client$, request, options) {
61725
- return new APIPromise($do51(client$, request, options));
61804
+ return new APIPromise($do50(client$, request, options));
61726
61805
  }
61727
- async function $do51(client$, request, options) {
61806
+ async function $do50(client$, request, options) {
61728
61807
  const parsed$ = safeParse4(request, (value$) => CreateSubscriptionRequest$zodSchema.parse(value$), "Input validation failed");
61729
61808
  if (!parsed$.ok) {
61730
61809
  return [parsed$, { status: "invalid" }];
@@ -61794,12 +61873,12 @@ var init_subscriptionsCreateSubscription = __esm(() => {
61794
61873
  });
61795
61874
 
61796
61875
  // src/mcp-server/tools/subscriptionsCreateSubscription.ts
61797
- var args50, tool$subscriptionsCreateSubscription;
61876
+ var args49, tool$subscriptionsCreateSubscription;
61798
61877
  var init_subscriptionsCreateSubscription2 = __esm(() => {
61799
61878
  init_subscriptionsCreateSubscription();
61800
61879
  init_createsubscriptionrequest();
61801
61880
  init_tools();
61802
- args50 = {
61881
+ args49 = {
61803
61882
  request: CreateSubscriptionRequest$zodSchema.describe(`Subscription Request`)
61804
61883
  };
61805
61884
  tool$subscriptionsCreateSubscription = {
@@ -61815,9 +61894,9 @@ Use when onboarding a customer to a plan or starting a new subscription. Ideal f
61815
61894
  openWorldHint: false,
61816
61895
  readOnlyHint: false
61817
61896
  },
61818
- args: args50,
61819
- tool: async (client, args51, ctx) => {
61820
- const [result] = await subscriptionsCreateSubscription(client, args51.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61897
+ args: args49,
61898
+ tool: async (client, args50, ctx) => {
61899
+ const [result] = await subscriptionsCreateSubscription(client, args50.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
61821
61900
  if (!result.ok) {
61822
61901
  return {
61823
61902
  content: [{ type: "text", text: result.error.message }],
@@ -61901,9 +61980,9 @@ var init_createsubscriptionlineitemop = __esm(() => {
61901
61980
 
61902
61981
  // src/funcs/subscriptionsCreateSubscriptionLineItem.ts
61903
61982
  function subscriptionsCreateSubscriptionLineItem(client$, request, options) {
61904
- return new APIPromise($do52(client$, request, options));
61983
+ return new APIPromise($do51(client$, request, options));
61905
61984
  }
61906
- async function $do52(client$, request, options) {
61985
+ async function $do51(client$, request, options) {
61907
61986
  const parsed$ = safeParse4(request, (value$) => CreateSubscriptionLineItemRequestRequest$zodSchema.parse(value$), "Input validation failed");
61908
61987
  if (!parsed$.ok) {
61909
61988
  return [parsed$, { status: "invalid" }];
@@ -61979,12 +62058,12 @@ var init_subscriptionsCreateSubscriptionLineItem = __esm(() => {
61979
62058
  });
61980
62059
 
61981
62060
  // src/mcp-server/tools/subscriptionsCreateSubscriptionLineItem.ts
61982
- var args51, tool$subscriptionsCreateSubscriptionLineItem;
62061
+ var args50, tool$subscriptionsCreateSubscriptionLineItem;
61983
62062
  var init_subscriptionsCreateSubscriptionLineItem2 = __esm(() => {
61984
62063
  init_subscriptionsCreateSubscriptionLineItem();
61985
62064
  init_createsubscriptionlineitemop();
61986
62065
  init_tools();
61987
- args51 = {
62066
+ args50 = {
61988
62067
  request: CreateSubscriptionLineItemRequestRequest$zodSchema
61989
62068
  };
61990
62069
  tool$subscriptionsCreateSubscriptionLineItem = {
@@ -62000,9 +62079,9 @@ Use when adding a new charge or seat to a subscription (e.g. extra seat or one-t
62000
62079
  openWorldHint: false,
62001
62080
  readOnlyHint: false
62002
62081
  },
62003
- args: args51,
62004
- tool: async (client, args52, ctx) => {
62005
- const [result] = await subscriptionsCreateSubscriptionLineItem(client, args52.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62082
+ args: args50,
62083
+ tool: async (client, args51, ctx) => {
62084
+ const [result] = await subscriptionsCreateSubscriptionLineItem(client, args51.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62006
62085
  if (!result.ok) {
62007
62086
  return {
62008
62087
  content: [{ type: "text", text: result.error.message }],
@@ -62044,9 +62123,9 @@ var init_deletesubscriptionlineitemop = __esm(() => {
62044
62123
 
62045
62124
  // src/funcs/subscriptionsDeleteSubscriptionLineItem.ts
62046
62125
  function subscriptionsDeleteSubscriptionLineItem(client$, request, options) {
62047
- return new APIPromise($do53(client$, request, options));
62126
+ return new APIPromise($do52(client$, request, options));
62048
62127
  }
62049
- async function $do53(client$, request, options) {
62128
+ async function $do52(client$, request, options) {
62050
62129
  const parsed$ = safeParse4(request, (value$) => DeleteSubscriptionLineItemRequestRequest$zodSchema.parse(value$), "Input validation failed");
62051
62130
  if (!parsed$.ok) {
62052
62131
  return [parsed$, { status: "invalid" }];
@@ -62122,12 +62201,12 @@ var init_subscriptionsDeleteSubscriptionLineItem = __esm(() => {
62122
62201
  });
62123
62202
 
62124
62203
  // src/mcp-server/tools/subscriptionsDeleteSubscriptionLineItem.ts
62125
- var args52, tool$subscriptionsDeleteSubscriptionLineItem;
62204
+ var args51, tool$subscriptionsDeleteSubscriptionLineItem;
62126
62205
  var init_subscriptionsDeleteSubscriptionLineItem2 = __esm(() => {
62127
62206
  init_subscriptionsDeleteSubscriptionLineItem();
62128
62207
  init_deletesubscriptionlineitemop();
62129
62208
  init_tools();
62130
- args52 = {
62209
+ args51 = {
62131
62210
  request: DeleteSubscriptionLineItemRequestRequest$zodSchema
62132
62211
  };
62133
62212
  tool$subscriptionsDeleteSubscriptionLineItem = {
@@ -62143,9 +62222,9 @@ Use when removing a charge or seat from a subscription (e.g. downgrade). Line it
62143
62222
  openWorldHint: false,
62144
62223
  readOnlyHint: false
62145
62224
  },
62146
- args: args52,
62147
- tool: async (client, args53, ctx) => {
62148
- const [result] = await subscriptionsDeleteSubscriptionLineItem(client, args53.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62225
+ args: args51,
62226
+ tool: async (client, args52, ctx) => {
62227
+ const [result] = await subscriptionsDeleteSubscriptionLineItem(client, args52.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62149
62228
  if (!result.ok) {
62150
62229
  return {
62151
62230
  content: [{ type: "text", text: result.error.message }],
@@ -62278,9 +62357,9 @@ var init_executesubscriptionchangeop = __esm(() => {
62278
62357
 
62279
62358
  // src/funcs/subscriptionsExecuteSubscriptionChange.ts
62280
62359
  function subscriptionsExecuteSubscriptionChange(client$, request, options) {
62281
- return new APIPromise($do54(client$, request, options));
62360
+ return new APIPromise($do53(client$, request, options));
62282
62361
  }
62283
- async function $do54(client$, request, options) {
62362
+ async function $do53(client$, request, options) {
62284
62363
  const parsed$ = safeParse4(request, (value$) => ExecuteSubscriptionChangeRequest$zodSchema.parse(value$), "Input validation failed");
62285
62364
  if (!parsed$.ok) {
62286
62365
  return [parsed$, { status: "invalid" }];
@@ -62356,12 +62435,12 @@ var init_subscriptionsExecuteSubscriptionChange = __esm(() => {
62356
62435
  });
62357
62436
 
62358
62437
  // src/mcp-server/tools/subscriptionsExecuteSubscriptionChange.ts
62359
- var args53, tool$subscriptionsExecuteSubscriptionChange;
62438
+ var args52, tool$subscriptionsExecuteSubscriptionChange;
62360
62439
  var init_subscriptionsExecuteSubscriptionChange2 = __esm(() => {
62361
62440
  init_subscriptionsExecuteSubscriptionChange();
62362
62441
  init_executesubscriptionchangeop();
62363
62442
  init_tools();
62364
- args53 = {
62443
+ args52 = {
62365
62444
  request: ExecuteSubscriptionChangeRequest$zodSchema
62366
62445
  };
62367
62446
  tool$subscriptionsExecuteSubscriptionChange = {
@@ -62377,9 +62456,9 @@ Use when applying a plan change (e.g. upgrade or downgrade). Executes proration
62377
62456
  openWorldHint: false,
62378
62457
  readOnlyHint: false
62379
62458
  },
62380
- args: args53,
62381
- tool: async (client, args54, ctx) => {
62382
- const [result] = await subscriptionsExecuteSubscriptionChange(client, args54.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62459
+ args: args52,
62460
+ tool: async (client, args53, ctx) => {
62461
+ const [result] = await subscriptionsExecuteSubscriptionChange(client, args53.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62383
62462
  if (!result.ok) {
62384
62463
  return {
62385
62464
  content: [{ type: "text", text: result.error.message }],
@@ -62444,6 +62523,27 @@ var init_submodifyquantitychangerequest = __esm(() => {
62444
62523
  });
62445
62524
  });
62446
62525
 
62526
+ // src/models/trialendaction.ts
62527
+ var TrialEndAction$zodSchema;
62528
+ var init_trialendaction = __esm(() => {
62529
+ init_zod();
62530
+ TrialEndAction$zodSchema = _enum([
62531
+ "immediate",
62532
+ "scheduled_date"
62533
+ ]);
62534
+ });
62535
+
62536
+ // src/models/submodifytrialendrequest.ts
62537
+ var SubModifyTrialEndRequest$zodSchema;
62538
+ var init_submodifytrialendrequest = __esm(() => {
62539
+ init_zod();
62540
+ init_trialendaction();
62541
+ SubModifyTrialEndRequest$zodSchema = object({
62542
+ action: TrialEndAction$zodSchema,
62543
+ new_trial_end: exports_iso.datetime({ offset: true }).optional().describe('NewTrialEnd is the new trial end date. Required when action is "scheduled_date".')
62544
+ });
62545
+ });
62546
+
62447
62547
  // src/models/subscriptionmodifytype.ts
62448
62548
  var SubscriptionModifyType$zodSchema;
62449
62549
  var init_subscriptionmodifytype = __esm(() => {
@@ -62451,7 +62551,8 @@ var init_subscriptionmodifytype = __esm(() => {
62451
62551
  SubscriptionModifyType$zodSchema = _enum([
62452
62552
  "inheritance",
62453
62553
  "quantity_change",
62454
- "grouped_invoicing"
62554
+ "grouped_invoicing",
62555
+ "trial_end"
62455
62556
  ]);
62456
62557
  });
62457
62558
 
@@ -62462,11 +62563,13 @@ var init_executesubscriptionmodifyrequest = __esm(() => {
62462
62563
  init_submodifygroupedinvoicingparams();
62463
62564
  init_submodifyinheritancerequest();
62464
62565
  init_submodifyquantitychangerequest();
62566
+ init_submodifytrialendrequest();
62465
62567
  init_subscriptionmodifytype();
62466
62568
  ExecuteSubscriptionModifyRequest$zodSchema = object({
62467
62569
  grouped_invoicing_params: SubModifyGroupedInvoicingParams$zodSchema.optional(),
62468
62570
  inheritance_params: SubModifyInheritanceRequest$zodSchema.optional(),
62469
62571
  quantity_change_params: SubModifyQuantityChangeRequest$zodSchema.optional(),
62572
+ trial_end_params: SubModifyTrialEndRequest$zodSchema.optional(),
62470
62573
  type: SubscriptionModifyType$zodSchema
62471
62574
  });
62472
62575
  });
@@ -62593,6 +62696,7 @@ var init_userresponse = __esm(() => {
62593
62696
  UserResponse$zodSchema = object({
62594
62697
  email: string2().optional().describe("Empty for service accounts"),
62595
62698
  id: string2().optional(),
62699
+ metadata: record(string2(), string2()).optional(),
62596
62700
  roles: array(string2()).optional(),
62597
62701
  tenant: TenantResponse$zodSchema.optional(),
62598
62702
  type: UserType$zodSchema.optional()
@@ -62842,8 +62946,10 @@ var init_changedsubscription = __esm(() => {
62842
62946
  init_subscriptionstatus();
62843
62947
  ChangedSubscription$zodSchema = object({
62844
62948
  action: ChangedSubscriptionAction$zodSchema.optional().describe("created | updated"),
62949
+ current_period_end: exports_iso.datetime({ offset: true }).optional(),
62845
62950
  id: string2().optional(),
62846
- status: SubscriptionStatus$zodSchema.optional()
62951
+ status: SubscriptionStatus$zodSchema.optional(),
62952
+ trial_end: exports_iso.datetime({ offset: true }).optional()
62847
62953
  });
62848
62954
  });
62849
62955
 
@@ -62892,9 +62998,9 @@ var init_executesubscriptionmodifyop = __esm(() => {
62892
62998
 
62893
62999
  // src/funcs/subscriptionsExecuteSubscriptionModify.ts
62894
63000
  function subscriptionsExecuteSubscriptionModify(client$, request, options) {
62895
- return new APIPromise($do55(client$, request, options));
63001
+ return new APIPromise($do54(client$, request, options));
62896
63002
  }
62897
- async function $do55(client$, request, options) {
63003
+ async function $do54(client$, request, options) {
62898
63004
  const parsed$ = safeParse4(request, (value$) => ExecuteSubscriptionModifyRequestRequest$zodSchema.parse(value$), "Input validation failed");
62899
63005
  if (!parsed$.ok) {
62900
63006
  return [parsed$, { status: "invalid" }];
@@ -62970,12 +63076,12 @@ var init_subscriptionsExecuteSubscriptionModify = __esm(() => {
62970
63076
  });
62971
63077
 
62972
63078
  // src/mcp-server/tools/subscriptionsExecuteSubscriptionModify.ts
62973
- var args54, tool$subscriptionsExecuteSubscriptionModify;
63079
+ var args53, tool$subscriptionsExecuteSubscriptionModify;
62974
63080
  var init_subscriptionsExecuteSubscriptionModify2 = __esm(() => {
62975
63081
  init_subscriptionsExecuteSubscriptionModify();
62976
63082
  init_executesubscriptionmodifyop();
62977
63083
  init_tools();
62978
- args54 = {
63084
+ args53 = {
62979
63085
  request: ExecuteSubscriptionModifyRequestRequest$zodSchema
62980
63086
  };
62981
63087
  tool$subscriptionsExecuteSubscriptionModify = {
@@ -62991,9 +63097,9 @@ Execute a mid-cycle subscription modification (inheritance or quantity change).`
62991
63097
  openWorldHint: false,
62992
63098
  readOnlyHint: false
62993
63099
  },
62994
- args: args54,
62995
- tool: async (client, args55, ctx) => {
62996
- const [result] = await subscriptionsExecuteSubscriptionModify(client, args55.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63100
+ args: args53,
63101
+ tool: async (client, args54, ctx) => {
63102
+ const [result] = await subscriptionsExecuteSubscriptionModify(client, args54.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
62997
63103
  if (!result.ok) {
62998
63104
  return {
62999
63105
  content: [{ type: "text", text: result.error.message }],
@@ -63022,9 +63128,9 @@ var init_getsubscriptionop = __esm(() => {
63022
63128
 
63023
63129
  // src/funcs/subscriptionsGetSubscription.ts
63024
63130
  function subscriptionsGetSubscription(client$, request, options) {
63025
- return new APIPromise($do56(client$, request, options));
63131
+ return new APIPromise($do55(client$, request, options));
63026
63132
  }
63027
- async function $do56(client$, request, options) {
63133
+ async function $do55(client$, request, options) {
63028
63134
  const parsed$ = safeParse4(request, (value$) => GetSubscriptionRequest$zodSchema.parse(value$), "Input validation failed");
63029
63135
  if (!parsed$.ok) {
63030
63136
  return [parsed$, { status: "invalid" }];
@@ -63099,12 +63205,12 @@ var init_subscriptionsGetSubscription = __esm(() => {
63099
63205
  });
63100
63206
 
63101
63207
  // src/mcp-server/tools/subscriptionsGetSubscription.ts
63102
- var args55, tool$subscriptionsGetSubscription;
63208
+ var args54, tool$subscriptionsGetSubscription;
63103
63209
  var init_subscriptionsGetSubscription2 = __esm(() => {
63104
63210
  init_subscriptionsGetSubscription();
63105
63211
  init_getsubscriptionop();
63106
63212
  init_tools();
63107
- args55 = {
63213
+ args54 = {
63108
63214
  request: GetSubscriptionRequest$zodSchema
63109
63215
  };
63110
63216
  tool$subscriptionsGetSubscription = {
@@ -63120,9 +63226,9 @@ Use when you need to load a single subscription (e.g. for a billing portal or to
63120
63226
  openWorldHint: false,
63121
63227
  readOnlyHint: true
63122
63228
  },
63123
- args: args55,
63124
- tool: async (client, args56, ctx) => {
63125
- const [result] = await subscriptionsGetSubscription(client, args56.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63229
+ args: args54,
63230
+ tool: async (client, args55, ctx) => {
63231
+ const [result] = await subscriptionsGetSubscription(client, args55.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63126
63232
  if (!result.ok) {
63127
63233
  return {
63128
63234
  content: [{ type: "text", text: result.error.message }],
@@ -63205,9 +63311,9 @@ var init_getsubscriptionaddonassociationsop = __esm(() => {
63205
63311
 
63206
63312
  // src/funcs/subscriptionsGetSubscriptionAddonAssociations.ts
63207
63313
  function subscriptionsGetSubscriptionAddonAssociations(client$, request, options) {
63208
- return new APIPromise($do57(client$, request, options));
63314
+ return new APIPromise($do56(client$, request, options));
63209
63315
  }
63210
- async function $do57(client$, request, options) {
63316
+ async function $do56(client$, request, options) {
63211
63317
  const parsed$ = safeParse4(request, (value$) => GetSubscriptionAddonAssociationsRequest$zodSchema.parse(value$), "Input validation failed");
63212
63318
  if (!parsed$.ok) {
63213
63319
  return [parsed$, { status: "invalid" }];
@@ -63282,12 +63388,12 @@ var init_subscriptionsGetSubscriptionAddonAssociations = __esm(() => {
63282
63388
  });
63283
63389
 
63284
63390
  // src/mcp-server/tools/subscriptionsGetSubscriptionAddonAssociations.ts
63285
- var args56, tool$subscriptionsGetSubscriptionAddonAssociations;
63391
+ var args55, tool$subscriptionsGetSubscriptionAddonAssociations;
63286
63392
  var init_subscriptionsGetSubscriptionAddonAssociations2 = __esm(() => {
63287
63393
  init_subscriptionsGetSubscriptionAddonAssociations();
63288
63394
  init_getsubscriptionaddonassociationsop();
63289
63395
  init_tools();
63290
- args56 = {
63396
+ args55 = {
63291
63397
  request: GetSubscriptionAddonAssociationsRequest$zodSchema
63292
63398
  };
63293
63399
  tool$subscriptionsGetSubscriptionAddonAssociations = {
@@ -63303,9 +63409,9 @@ Use when listing which add-ons are currently attached to a subscription (e.g. fo
63303
63409
  openWorldHint: false,
63304
63410
  readOnlyHint: true
63305
63411
  },
63306
- args: args56,
63307
- tool: async (client, args57, ctx) => {
63308
- const [result] = await subscriptionsGetSubscriptionAddonAssociations(client, args57.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63412
+ args: args55,
63413
+ tool: async (client, args56, ctx) => {
63414
+ const [result] = await subscriptionsGetSubscriptionAddonAssociations(client, args56.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63309
63415
  if (!result.ok) {
63310
63416
  return {
63311
63417
  content: [{ type: "text", text: result.error.message }],
@@ -63347,9 +63453,9 @@ var init_getsubscriptionentitlementsop = __esm(() => {
63347
63453
 
63348
63454
  // src/funcs/subscriptionsGetSubscriptionEntitlements.ts
63349
63455
  function subscriptionsGetSubscriptionEntitlements(client$, request, options) {
63350
- return new APIPromise($do58(client$, request, options));
63456
+ return new APIPromise($do57(client$, request, options));
63351
63457
  }
63352
- async function $do58(client$, request, options) {
63458
+ async function $do57(client$, request, options) {
63353
63459
  const parsed$ = safeParse4(request, (value$) => GetSubscriptionEntitlementsRequest$zodSchema.parse(value$), "Input validation failed");
63354
63460
  if (!parsed$.ok) {
63355
63461
  return [parsed$, { status: "invalid" }];
@@ -63428,12 +63534,12 @@ var init_subscriptionsGetSubscriptionEntitlements = __esm(() => {
63428
63534
  });
63429
63535
 
63430
63536
  // src/mcp-server/tools/subscriptionsGetSubscriptionEntitlements.ts
63431
- var args57, tool$subscriptionsGetSubscriptionEntitlements;
63537
+ var args56, tool$subscriptionsGetSubscriptionEntitlements;
63432
63538
  var init_subscriptionsGetSubscriptionEntitlements2 = __esm(() => {
63433
63539
  init_subscriptionsGetSubscriptionEntitlements();
63434
63540
  init_getsubscriptionentitlementsop();
63435
63541
  init_tools();
63436
- args57 = {
63542
+ args56 = {
63437
63543
  request: GetSubscriptionEntitlementsRequest$zodSchema
63438
63544
  };
63439
63545
  tool$subscriptionsGetSubscriptionEntitlements = {
@@ -63449,9 +63555,9 @@ Use when checking what features or limits a subscription has (e.g. entitlement c
63449
63555
  openWorldHint: false,
63450
63556
  readOnlyHint: true
63451
63557
  },
63452
- args: args57,
63453
- tool: async (client, args58, ctx) => {
63454
- const [result] = await subscriptionsGetSubscriptionEntitlements(client, args58.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63558
+ args: args56,
63559
+ tool: async (client, args57, ctx) => {
63560
+ const [result] = await subscriptionsGetSubscriptionEntitlements(client, args57.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63455
63561
  if (!result.ok) {
63456
63562
  return {
63457
63563
  content: [{ type: "text", text: result.error.message }],
@@ -63474,9 +63580,9 @@ var init_getsubscriptionscheduleop = __esm(() => {
63474
63580
 
63475
63581
  // src/funcs/subscriptionsGetSubscriptionSchedule.ts
63476
63582
  function subscriptionsGetSubscriptionSchedule(client$, request, options) {
63477
- return new APIPromise($do59(client$, request, options));
63583
+ return new APIPromise($do58(client$, request, options));
63478
63584
  }
63479
- async function $do59(client$, request, options) {
63585
+ async function $do58(client$, request, options) {
63480
63586
  const parsed$ = safeParse4(request, (value$) => GetSubscriptionScheduleRequest$zodSchema.parse(value$), "Input validation failed");
63481
63587
  if (!parsed$.ok) {
63482
63588
  return [parsed$, { status: "invalid" }];
@@ -63551,12 +63657,12 @@ var init_subscriptionsGetSubscriptionSchedule = __esm(() => {
63551
63657
  });
63552
63658
 
63553
63659
  // src/mcp-server/tools/subscriptionsGetSubscriptionSchedule.ts
63554
- var args58, tool$subscriptionsGetSubscriptionSchedule;
63660
+ var args57, tool$subscriptionsGetSubscriptionSchedule;
63555
63661
  var init_subscriptionsGetSubscriptionSchedule2 = __esm(() => {
63556
63662
  init_subscriptionsGetSubscriptionSchedule();
63557
63663
  init_getsubscriptionscheduleop();
63558
63664
  init_tools();
63559
- args58 = {
63665
+ args57 = {
63560
63666
  request: GetSubscriptionScheduleRequest$zodSchema
63561
63667
  };
63562
63668
  tool$subscriptionsGetSubscriptionSchedule = {
@@ -63572,9 +63678,9 @@ Use when you need to load a single scheduled change (e.g. to show when a plan ch
63572
63678
  openWorldHint: false,
63573
63679
  readOnlyHint: true
63574
63680
  },
63575
- args: args58,
63576
- tool: async (client, args59, ctx) => {
63577
- const [result] = await subscriptionsGetSubscriptionSchedule(client, args59.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63681
+ args: args57,
63682
+ tool: async (client, args58, ctx) => {
63683
+ const [result] = await subscriptionsGetSubscriptionSchedule(client, args58.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63578
63684
  if (!result.ok) {
63579
63685
  return {
63580
63686
  content: [{ type: "text", text: result.error.message }],
@@ -63603,9 +63709,9 @@ var init_getsubscriptionupcominggrantsop = __esm(() => {
63603
63709
 
63604
63710
  // src/funcs/subscriptionsGetSubscriptionUpcomingGrants.ts
63605
63711
  function subscriptionsGetSubscriptionUpcomingGrants(client$, request, options) {
63606
- return new APIPromise($do60(client$, request, options));
63712
+ return new APIPromise($do59(client$, request, options));
63607
63713
  }
63608
- async function $do60(client$, request, options) {
63714
+ async function $do59(client$, request, options) {
63609
63715
  const parsed$ = safeParse4(request, (value$) => GetSubscriptionUpcomingGrantsRequest$zodSchema.parse(value$), "Input validation failed");
63610
63716
  if (!parsed$.ok) {
63611
63717
  return [parsed$, { status: "invalid" }];
@@ -63680,12 +63786,12 @@ var init_subscriptionsGetSubscriptionUpcomingGrants = __esm(() => {
63680
63786
  });
63681
63787
 
63682
63788
  // src/mcp-server/tools/subscriptionsGetSubscriptionUpcomingGrants.ts
63683
- var args59, tool$subscriptionsGetSubscriptionUpcomingGrants;
63789
+ var args58, tool$subscriptionsGetSubscriptionUpcomingGrants;
63684
63790
  var init_subscriptionsGetSubscriptionUpcomingGrants2 = __esm(() => {
63685
63791
  init_subscriptionsGetSubscriptionUpcomingGrants();
63686
63792
  init_getsubscriptionupcominggrantsop();
63687
63793
  init_tools();
63688
- args59 = {
63794
+ args58 = {
63689
63795
  request: GetSubscriptionUpcomingGrantsRequest$zodSchema
63690
63796
  };
63691
63797
  tool$subscriptionsGetSubscriptionUpcomingGrants = {
@@ -63701,9 +63807,9 @@ Use when showing upcoming or pending credits for a subscription (e.g. in a porta
63701
63807
  openWorldHint: false,
63702
63808
  readOnlyHint: true
63703
63809
  },
63704
- args: args59,
63705
- tool: async (client, args60, ctx) => {
63706
- const [result] = await subscriptionsGetSubscriptionUpcomingGrants(client, args60.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63810
+ args: args58,
63811
+ tool: async (client, args59, ctx) => {
63812
+ const [result] = await subscriptionsGetSubscriptionUpcomingGrants(client, args59.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63707
63813
  if (!result.ok) {
63708
63814
  return {
63709
63815
  content: [{ type: "text", text: result.error.message }],
@@ -63729,9 +63835,9 @@ var init_getusagebysubscriptionrequest = __esm(() => {
63729
63835
 
63730
63836
  // src/funcs/subscriptionsGetSubscriptionUsage.ts
63731
63837
  function subscriptionsGetSubscriptionUsage(client$, request, options) {
63732
- return new APIPromise($do61(client$, request, options));
63838
+ return new APIPromise($do60(client$, request, options));
63733
63839
  }
63734
- async function $do61(client$, request, options) {
63840
+ async function $do60(client$, request, options) {
63735
63841
  const parsed$ = safeParse4(request, (value$) => GetUsageBySubscriptionRequest$zodSchema.parse(value$), "Input validation failed");
63736
63842
  if (!parsed$.ok) {
63737
63843
  return [parsed$, { status: "invalid" }];
@@ -63801,12 +63907,12 @@ var init_subscriptionsGetSubscriptionUsage = __esm(() => {
63801
63907
  });
63802
63908
 
63803
63909
  // src/mcp-server/tools/subscriptionsGetSubscriptionUsage.ts
63804
- var args60, tool$subscriptionsGetSubscriptionUsage;
63910
+ var args59, tool$subscriptionsGetSubscriptionUsage;
63805
63911
  var init_subscriptionsGetSubscriptionUsage2 = __esm(() => {
63806
63912
  init_subscriptionsGetSubscriptionUsage();
63807
63913
  init_getusagebysubscriptionrequest();
63808
63914
  init_tools();
63809
- args60 = {
63915
+ args59 = {
63810
63916
  request: GetUsageBySubscriptionRequest$zodSchema.describe(`Usage request`)
63811
63917
  };
63812
63918
  tool$subscriptionsGetSubscriptionUsage = {
@@ -63822,9 +63928,9 @@ Use when showing usage for a subscription (e.g. in a portal or for overage check
63822
63928
  openWorldHint: false,
63823
63929
  readOnlyHint: false
63824
63930
  },
63825
- args: args60,
63826
- tool: async (client, args61, ctx) => {
63827
- const [result] = await subscriptionsGetSubscriptionUsage(client, args61.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63931
+ args: args59,
63932
+ tool: async (client, args60, ctx) => {
63933
+ const [result] = await subscriptionsGetSubscriptionUsage(client, args60.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
63828
63934
  if (!result.ok) {
63829
63935
  return {
63830
63936
  content: [{ type: "text", text: result.error.message }],
@@ -63907,11 +64013,17 @@ Each line item can optionally include expanded price data`),
63907
64013
  phases: array(SubscriptionPhaseResponse$zodSchema).optional().describe('Phases are included when "phases" is in expand parameter'),
63908
64014
  plan: PlanResponse$zodSchema.optional(),
63909
64015
  plan_id: string2().optional().describe("PlanID is the identifier for the plan in our system"),
64016
+ plan_prices_out_of_sync: boolean2().optional().describe(`PlanPricesOutOfSync is true when the subscription's synced_price_sequence
64017
+ is behind the plan's current max prices.sequence — i.e. plan-price
64018
+ changes have not yet been reconciled into this subscription's line items.`),
63910
64019
  proration_behavior: ProrationBehavior$zodSchema.optional(),
63911
64020
  start_date: exports_iso.datetime({ offset: true }).optional().describe("StartDate is the start date of the subscription"),
63912
64021
  status: Status$zodSchema.optional(),
63913
64022
  subscription_status: SubscriptionStatus$zodSchema.optional(),
63914
64023
  subscription_type: SubscriptionType$zodSchema.optional(),
64024
+ synced_price_sequence: int().optional().describe(`SyncedPriceSequence is the plan-price sequence up to which this
64025
+ subscription's line items have been reconciled. Bumped by the
64026
+ plan-price sync after a successful pass.`),
63915
64027
  tenant_id: string2().optional(),
63916
64028
  trial_end: exports_iso.datetime({ offset: true }).optional().describe("TrialEnd is the end date of the trial period"),
63917
64029
  trial_start: exports_iso.datetime({ offset: true }).optional().describe("TrialStart is the start date of the trial period"),
@@ -63939,9 +64051,9 @@ var init_getsubscriptionv2op = __esm(() => {
63939
64051
 
63940
64052
  // src/funcs/subscriptionsGetSubscriptionV2.ts
63941
64053
  function subscriptionsGetSubscriptionV2(client$, request, options) {
63942
- return new APIPromise($do62(client$, request, options));
64054
+ return new APIPromise($do61(client$, request, options));
63943
64055
  }
63944
- async function $do62(client$, request, options) {
64056
+ async function $do61(client$, request, options) {
63945
64057
  const parsed$ = safeParse4(request, (value$) => GetSubscriptionV2Request$zodSchema.parse(value$), "Input validation failed");
63946
64058
  if (!parsed$.ok) {
63947
64059
  return [parsed$, { status: "invalid" }];
@@ -64020,12 +64132,12 @@ var init_subscriptionsGetSubscriptionV2 = __esm(() => {
64020
64132
  });
64021
64133
 
64022
64134
  // src/mcp-server/tools/subscriptionsGetSubscriptionV2.ts
64023
- var args61, tool$subscriptionsGetSubscriptionV2;
64135
+ var args60, tool$subscriptionsGetSubscriptionV2;
64024
64136
  var init_subscriptionsGetSubscriptionV22 = __esm(() => {
64025
64137
  init_subscriptionsGetSubscriptionV2();
64026
64138
  init_getsubscriptionv2op();
64027
64139
  init_tools();
64028
- args61 = {
64140
+ args60 = {
64029
64141
  request: GetSubscriptionV2Request$zodSchema
64030
64142
  };
64031
64143
  tool$subscriptionsGetSubscriptionV2 = {
@@ -64041,9 +64153,9 @@ Use when you need a subscription with related data (line items, prices, plan). S
64041
64153
  openWorldHint: false,
64042
64154
  readOnlyHint: true
64043
64155
  },
64044
- args: args61,
64045
- tool: async (client, args62, ctx) => {
64046
- const [result] = await subscriptionsGetSubscriptionV2(client, args62.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64156
+ args: args60,
64157
+ tool: async (client, args61, ctx) => {
64158
+ const [result] = await subscriptionsGetSubscriptionV2(client, args61.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64047
64159
  if (!result.ok) {
64048
64160
  return {
64049
64161
  content: [{ type: "text", text: result.error.message }],
@@ -64069,9 +64181,9 @@ var init_listallsubscriptionschedulesop = __esm(() => {
64069
64181
 
64070
64182
  // src/funcs/subscriptionsListAllSubscriptionSchedules.ts
64071
64183
  function subscriptionsListAllSubscriptionSchedules(client$, request, options) {
64072
- return new APIPromise($do63(client$, request, options));
64184
+ return new APIPromise($do62(client$, request, options));
64073
64185
  }
64074
- async function $do63(client$, request, options) {
64186
+ async function $do62(client$, request, options) {
64075
64187
  const parsed$ = safeParse4(request, (value$) => ListAllSubscriptionSchedulesRequest$zodSchema.optional().parse(value$), "Input validation failed");
64076
64188
  if (!parsed$.ok) {
64077
64189
  return [parsed$, { status: "invalid" }];
@@ -64147,12 +64259,12 @@ var init_subscriptionsListAllSubscriptionSchedules = __esm(() => {
64147
64259
  });
64148
64260
 
64149
64261
  // src/mcp-server/tools/subscriptionsListAllSubscriptionSchedules.ts
64150
- var args62, tool$subscriptionsListAllSubscriptionSchedules;
64262
+ var args61, tool$subscriptionsListAllSubscriptionSchedules;
64151
64263
  var init_subscriptionsListAllSubscriptionSchedules2 = __esm(() => {
64152
64264
  init_subscriptionsListAllSubscriptionSchedules();
64153
64265
  init_listallsubscriptionschedulesop();
64154
64266
  init_tools();
64155
- args62 = {
64267
+ args61 = {
64156
64268
  request: ListAllSubscriptionSchedulesRequest$zodSchema.optional()
64157
64269
  };
64158
64270
  tool$subscriptionsListAllSubscriptionSchedules = {
@@ -64168,9 +64280,9 @@ Use when listing or searching scheduled changes across subscriptions (e.g. admin
64168
64280
  openWorldHint: false,
64169
64281
  readOnlyHint: true
64170
64282
  },
64171
- args: args62,
64172
- tool: async (client, args63, ctx) => {
64173
- const [result] = await subscriptionsListAllSubscriptionSchedules(client, args63.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64283
+ args: args61,
64284
+ tool: async (client, args62, ctx) => {
64285
+ const [result] = await subscriptionsListAllSubscriptionSchedules(client, args62.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64174
64286
  if (!result.ok) {
64175
64287
  return {
64176
64288
  content: [{ type: "text", text: result.error.message }],
@@ -64193,9 +64305,9 @@ var init_listsubscriptionschedulesop = __esm(() => {
64193
64305
 
64194
64306
  // src/funcs/subscriptionsListSubscriptionSchedules.ts
64195
64307
  function subscriptionsListSubscriptionSchedules(client$, request, options) {
64196
- return new APIPromise($do64(client$, request, options));
64308
+ return new APIPromise($do63(client$, request, options));
64197
64309
  }
64198
- async function $do64(client$, request, options) {
64310
+ async function $do63(client$, request, options) {
64199
64311
  const parsed$ = safeParse4(request, (value$) => ListSubscriptionSchedulesRequest$zodSchema.parse(value$), "Input validation failed");
64200
64312
  if (!parsed$.ok) {
64201
64313
  return [parsed$, { status: "invalid" }];
@@ -64270,12 +64382,12 @@ var init_subscriptionsListSubscriptionSchedules = __esm(() => {
64270
64382
  });
64271
64383
 
64272
64384
  // src/mcp-server/tools/subscriptionsListSubscriptionSchedules.ts
64273
- var args63, tool$subscriptionsListSubscriptionSchedules;
64385
+ var args62, tool$subscriptionsListSubscriptionSchedules;
64274
64386
  var init_subscriptionsListSubscriptionSchedules2 = __esm(() => {
64275
64387
  init_subscriptionsListSubscriptionSchedules();
64276
64388
  init_listsubscriptionschedulesop();
64277
64389
  init_tools();
64278
- args63 = {
64390
+ args62 = {
64279
64391
  request: ListSubscriptionSchedulesRequest$zodSchema
64280
64392
  };
64281
64393
  tool$subscriptionsListSubscriptionSchedules = {
@@ -64291,9 +64403,9 @@ Use when listing scheduled changes for a subscription (e.g. upcoming plan change
64291
64403
  openWorldHint: false,
64292
64404
  readOnlyHint: true
64293
64405
  },
64294
- args: args63,
64295
- tool: async (client, args64, ctx) => {
64296
- const [result] = await subscriptionsListSubscriptionSchedules(client, args64.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64406
+ args: args62,
64407
+ tool: async (client, args63, ctx) => {
64408
+ const [result] = await subscriptionsListSubscriptionSchedules(client, args63.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64297
64409
  if (!result.ok) {
64298
64410
  return {
64299
64411
  content: [{ type: "text", text: result.error.message }],
@@ -64405,9 +64517,9 @@ var init_previewsubscriptionchangeop = __esm(() => {
64405
64517
 
64406
64518
  // src/funcs/subscriptionsPreviewSubscriptionChange.ts
64407
64519
  function subscriptionsPreviewSubscriptionChange(client$, request, options) {
64408
- return new APIPromise($do65(client$, request, options));
64520
+ return new APIPromise($do64(client$, request, options));
64409
64521
  }
64410
- async function $do65(client$, request, options) {
64522
+ async function $do64(client$, request, options) {
64411
64523
  const parsed$ = safeParse4(request, (value$) => PreviewSubscriptionChangeRequest$zodSchema.parse(value$), "Input validation failed");
64412
64524
  if (!parsed$.ok) {
64413
64525
  return [parsed$, { status: "invalid" }];
@@ -64483,12 +64595,12 @@ var init_subscriptionsPreviewSubscriptionChange = __esm(() => {
64483
64595
  });
64484
64596
 
64485
64597
  // src/mcp-server/tools/subscriptionsPreviewSubscriptionChange.ts
64486
- var args64, tool$subscriptionsPreviewSubscriptionChange;
64598
+ var args63, tool$subscriptionsPreviewSubscriptionChange;
64487
64599
  var init_subscriptionsPreviewSubscriptionChange2 = __esm(() => {
64488
64600
  init_subscriptionsPreviewSubscriptionChange();
64489
64601
  init_previewsubscriptionchangeop();
64490
64602
  init_tools();
64491
- args64 = {
64603
+ args63 = {
64492
64604
  request: PreviewSubscriptionChangeRequest$zodSchema
64493
64605
  };
64494
64606
  tool$subscriptionsPreviewSubscriptionChange = {
@@ -64504,9 +64616,9 @@ Use when showing a customer the cost of a plan change before they confirm (e.g.
64504
64616
  openWorldHint: false,
64505
64617
  readOnlyHint: false
64506
64618
  },
64507
- args: args64,
64508
- tool: async (client, args65, ctx) => {
64509
- const [result] = await subscriptionsPreviewSubscriptionChange(client, args65.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64619
+ args: args63,
64620
+ tool: async (client, args64, ctx) => {
64621
+ const [result] = await subscriptionsPreviewSubscriptionChange(client, args64.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64510
64622
  if (!result.ok) {
64511
64623
  return {
64512
64624
  content: [{ type: "text", text: result.error.message }],
@@ -64537,9 +64649,9 @@ var init_previewsubscriptionmodifyop = __esm(() => {
64537
64649
 
64538
64650
  // src/funcs/subscriptionsPreviewSubscriptionModify.ts
64539
64651
  function subscriptionsPreviewSubscriptionModify(client$, request, options) {
64540
- return new APIPromise($do66(client$, request, options));
64652
+ return new APIPromise($do65(client$, request, options));
64541
64653
  }
64542
- async function $do66(client$, request, options) {
64654
+ async function $do65(client$, request, options) {
64543
64655
  const parsed$ = safeParse4(request, (value$) => PreviewSubscriptionModifyRequest$zodSchema.parse(value$), "Input validation failed");
64544
64656
  if (!parsed$.ok) {
64545
64657
  return [parsed$, { status: "invalid" }];
@@ -64615,12 +64727,12 @@ var init_subscriptionsPreviewSubscriptionModify = __esm(() => {
64615
64727
  });
64616
64728
 
64617
64729
  // src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts
64618
- var args65, tool$subscriptionsPreviewSubscriptionModify;
64730
+ var args64, tool$subscriptionsPreviewSubscriptionModify;
64619
64731
  var init_subscriptionsPreviewSubscriptionModify2 = __esm(() => {
64620
64732
  init_subscriptionsPreviewSubscriptionModify();
64621
64733
  init_previewsubscriptionmodifyop();
64622
64734
  init_tools();
64623
- args65 = {
64735
+ args64 = {
64624
64736
  request: PreviewSubscriptionModifyRequest$zodSchema
64625
64737
  };
64626
64738
  tool$subscriptionsPreviewSubscriptionModify = {
@@ -64636,9 +64748,9 @@ Preview the impact of a mid-cycle subscription modification without committing c
64636
64748
  openWorldHint: false,
64637
64749
  readOnlyHint: true
64638
64750
  },
64639
- args: args65,
64640
- tool: async (client, args66, ctx) => {
64641
- const [result] = await subscriptionsPreviewSubscriptionModify(client, args66.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64751
+ args: args64,
64752
+ tool: async (client, args65, ctx) => {
64753
+ const [result] = await subscriptionsPreviewSubscriptionModify(client, args65.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64642
64754
  if (!result.ok) {
64643
64755
  return {
64644
64756
  content: [{ type: "text", text: result.error.message }],
@@ -64698,9 +64810,9 @@ Use with subscription_status trialing for trial-end cron processing.`),
64698
64810
 
64699
64811
  // src/funcs/subscriptionsQuerySubscription.ts
64700
64812
  function subscriptionsQuerySubscription(client$, request, options) {
64701
- return new APIPromise($do67(client$, request, options));
64813
+ return new APIPromise($do66(client$, request, options));
64702
64814
  }
64703
- async function $do67(client$, request, options) {
64815
+ async function $do66(client$, request, options) {
64704
64816
  const parsed$ = safeParse4(request, (value$) => SubscriptionFilter$zodSchema.parse(value$), "Input validation failed");
64705
64817
  if (!parsed$.ok) {
64706
64818
  return [parsed$, { status: "invalid" }];
@@ -64770,12 +64882,12 @@ var init_subscriptionsQuerySubscription = __esm(() => {
64770
64882
  });
64771
64883
 
64772
64884
  // src/mcp-server/tools/subscriptionsQuerySubscription.ts
64773
- var args66, tool$subscriptionsQuerySubscription;
64885
+ var args65, tool$subscriptionsQuerySubscription;
64774
64886
  var init_subscriptionsQuerySubscription2 = __esm(() => {
64775
64887
  init_subscriptionsQuerySubscription();
64776
64888
  init_subscriptionfilter();
64777
64889
  init_tools();
64778
- args66 = {
64890
+ args65 = {
64779
64891
  request: SubscriptionFilter$zodSchema.describe(`Filter`)
64780
64892
  };
64781
64893
  tool$subscriptionsQuerySubscription = {
@@ -64791,9 +64903,9 @@ Use when listing or searching subscriptions (e.g. admin view or customer subscri
64791
64903
  openWorldHint: false,
64792
64904
  readOnlyHint: false
64793
64905
  },
64794
- args: args66,
64795
- tool: async (client, args67, ctx) => {
64796
- const [result] = await subscriptionsQuerySubscription(client, args67.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64906
+ args: args65,
64907
+ tool: async (client, args66, ctx) => {
64908
+ const [result] = await subscriptionsQuerySubscription(client, args66.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64797
64909
  if (!result.ok) {
64798
64910
  return {
64799
64911
  content: [{ type: "text", text: result.error.message }],
@@ -64843,9 +64955,9 @@ var init_subscriptionlineitemfilter = __esm(() => {
64843
64955
 
64844
64956
  // src/funcs/subscriptionsQuerySubscriptionLineItems.ts
64845
64957
  function subscriptionsQuerySubscriptionLineItems(client$, request, options) {
64846
- return new APIPromise($do68(client$, request, options));
64958
+ return new APIPromise($do67(client$, request, options));
64847
64959
  }
64848
- async function $do68(client$, request, options) {
64960
+ async function $do67(client$, request, options) {
64849
64961
  const parsed$ = safeParse4(request, (value$) => SubscriptionLineItemFilter$zodSchema.parse(value$), "Input validation failed");
64850
64962
  if (!parsed$.ok) {
64851
64963
  return [parsed$, { status: "invalid" }];
@@ -64915,12 +65027,12 @@ var init_subscriptionsQuerySubscriptionLineItems = __esm(() => {
64915
65027
  });
64916
65028
 
64917
65029
  // src/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.ts
64918
- var args67, tool$subscriptionsQuerySubscriptionLineItems;
65030
+ var args66, tool$subscriptionsQuerySubscriptionLineItems;
64919
65031
  var init_subscriptionsQuerySubscriptionLineItems2 = __esm(() => {
64920
65032
  init_subscriptionsQuerySubscriptionLineItems();
64921
65033
  init_subscriptionlineitemfilter();
64922
65034
  init_tools();
64923
- args67 = {
65035
+ args66 = {
64924
65036
  request: SubscriptionLineItemFilter$zodSchema.describe(`Filter`)
64925
65037
  };
64926
65038
  tool$subscriptionsQuerySubscriptionLineItems = {
@@ -64936,9 +65048,9 @@ List subscription line items with a JSON filter (subscription, customer, price,
64936
65048
  openWorldHint: false,
64937
65049
  readOnlyHint: true
64938
65050
  },
64939
- args: args67,
64940
- tool: async (client, args68, ctx) => {
64941
- const [result] = await subscriptionsQuerySubscriptionLineItems(client, args68.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
65051
+ args: args66,
65052
+ tool: async (client, args67, ctx) => {
65053
+ const [result] = await subscriptionsQuerySubscriptionLineItems(client, args67.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64942
65054
  if (!result.ok) {
64943
65055
  return {
64944
65056
  content: [{ type: "text", text: result.error.message }],
@@ -64968,9 +65080,9 @@ values combined with create_prorations will issue a wallet credit for unused tim
64968
65080
 
64969
65081
  // src/funcs/subscriptionsRemoveSubscriptionAddon.ts
64970
65082
  function subscriptionsRemoveSubscriptionAddon(client$, request, options) {
64971
- return new APIPromise($do69(client$, request, options));
65083
+ return new APIPromise($do68(client$, request, options));
64972
65084
  }
64973
- async function $do69(client$, request, options) {
65085
+ async function $do68(client$, request, options) {
64974
65086
  const parsed$ = safeParse4(request, (value$) => RemoveAddonRequest$zodSchema.parse(value$), "Input validation failed");
64975
65087
  if (!parsed$.ok) {
64976
65088
  return [parsed$, { status: "invalid" }];
@@ -65040,12 +65152,12 @@ var init_subscriptionsRemoveSubscriptionAddon = __esm(() => {
65040
65152
  });
65041
65153
 
65042
65154
  // src/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.ts
65043
- var args68, tool$subscriptionsRemoveSubscriptionAddon;
65155
+ var args67, tool$subscriptionsRemoveSubscriptionAddon;
65044
65156
  var init_subscriptionsRemoveSubscriptionAddon2 = __esm(() => {
65045
65157
  init_subscriptionsRemoveSubscriptionAddon();
65046
65158
  init_removeaddonrequest();
65047
65159
  init_tools();
65048
- args68 = {
65160
+ args67 = {
65049
65161
  request: RemoveAddonRequest$zodSchema.describe(`Remove Addon Request`)
65050
65162
  };
65051
65163
  tool$subscriptionsRemoveSubscriptionAddon = {
@@ -65061,9 +65173,9 @@ Use when removing an add-on from a subscription (e.g. downgrade or opt-out).`,
65061
65173
  openWorldHint: false,
65062
65174
  readOnlyHint: false
65063
65175
  },
65064
- args: args68,
65065
- tool: async (client, args69, ctx) => {
65066
- const [result] = await subscriptionsRemoveSubscriptionAddon(client, args69.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
65176
+ args: args67,
65177
+ tool: async (client, args68, ctx) => {
65178
+ const [result] = await subscriptionsRemoveSubscriptionAddon(client, args68.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
65067
65179
  if (!result.ok) {
65068
65180
  return {
65069
65181
  content: [{ type: "text", text: result.error.message }],
@@ -65107,9 +65219,9 @@ var init_updatesubscriptionop = __esm(() => {
65107
65219
 
65108
65220
  // src/funcs/subscriptionsUpdateSubscription.ts
65109
65221
  function subscriptionsUpdateSubscription(client$, request, options) {
65110
- return new APIPromise($do70(client$, request, options));
65222
+ return new APIPromise($do69(client$, request, options));
65111
65223
  }
65112
- async function $do70(client$, request, options) {
65224
+ async function $do69(client$, request, options) {
65113
65225
  const parsed$ = safeParse4(request, (value$) => UpdateSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
65114
65226
  if (!parsed$.ok) {
65115
65227
  return [parsed$, { status: "invalid" }];
@@ -65185,12 +65297,12 @@ var init_subscriptionsUpdateSubscription = __esm(() => {
65185
65297
  });
65186
65298
 
65187
65299
  // src/mcp-server/tools/subscriptionsUpdateSubscription.ts
65188
- var args69, tool$subscriptionsUpdateSubscription;
65300
+ var args68, tool$subscriptionsUpdateSubscription;
65189
65301
  var init_subscriptionsUpdateSubscription2 = __esm(() => {
65190
65302
  init_subscriptionsUpdateSubscription();
65191
65303
  init_updatesubscriptionop();
65192
65304
  init_tools();
65193
- args69 = {
65305
+ args68 = {
65194
65306
  request: UpdateSubscriptionRequestRequest$zodSchema
65195
65307
  };
65196
65308
  tool$subscriptionsUpdateSubscription = {
@@ -65206,9 +65318,9 @@ Use when changing subscription details (e.g. quantity, billing anchor, or parent
65206
65318
  openWorldHint: false,
65207
65319
  readOnlyHint: false
65208
65320
  },
65209
- args: args69,
65210
- tool: async (client, args70, ctx) => {
65211
- const [result] = await subscriptionsUpdateSubscription(client, args70.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
65321
+ args: args68,
65322
+ tool: async (client, args69, ctx) => {
65323
+ const [result] = await subscriptionsUpdateSubscription(client, args69.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
65212
65324
  if (!result.ok) {
65213
65325
  return {
65214
65326
  content: [{ type: "text", text: result.error.message }],
@@ -65267,9 +65379,9 @@ var init_updatesubscriptionlineitemop = __esm(() => {
65267
65379
 
65268
65380
  // src/funcs/subscriptionsUpdateSubscriptionLineItem.ts
65269
65381
  function subscriptionsUpdateSubscriptionLineItem(client$, request, options) {
65270
- return new APIPromise($do71(client$, request, options));
65382
+ return new APIPromise($do70(client$, request, options));
65271
65383
  }
65272
- async function $do71(client$, request, options) {
65384
+ async function $do70(client$, request, options) {
65273
65385
  const parsed$ = safeParse4(request, (value$) => UpdateSubscriptionLineItemRequestRequest$zodSchema.parse(value$), "Input validation failed");
65274
65386
  if (!parsed$.ok) {
65275
65387
  return [parsed$, { status: "invalid" }];
@@ -65345,12 +65457,12 @@ var init_subscriptionsUpdateSubscriptionLineItem = __esm(() => {
65345
65457
  });
65346
65458
 
65347
65459
  // src/mcp-server/tools/subscriptionsUpdateSubscriptionLineItem.ts
65348
- var args70, tool$subscriptionsUpdateSubscriptionLineItem;
65460
+ var args69, tool$subscriptionsUpdateSubscriptionLineItem;
65349
65461
  var init_subscriptionsUpdateSubscriptionLineItem2 = __esm(() => {
65350
65462
  init_subscriptionsUpdateSubscriptionLineItem();
65351
65463
  init_updatesubscriptionlineitemop();
65352
65464
  init_tools();
65353
- args70 = {
65465
+ args69 = {
65354
65466
  request: UpdateSubscriptionLineItemRequestRequest$zodSchema
65355
65467
  };
65356
65468
  tool$subscriptionsUpdateSubscriptionLineItem = {
@@ -65366,9 +65478,9 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
65366
65478
  openWorldHint: false,
65367
65479
  readOnlyHint: false
65368
65480
  },
65369
- args: args70,
65370
- tool: async (client, args71, ctx) => {
65371
- const [result] = await subscriptionsUpdateSubscriptionLineItem(client, args71.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
65481
+ args: args69,
65482
+ tool: async (client, args70, ctx) => {
65483
+ const [result] = await subscriptionsUpdateSubscriptionLineItem(client, args70.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
65372
65484
  if (!result.ok) {
65373
65485
  return {
65374
65486
  content: [{ type: "text", text: result.error.message }],
@@ -65384,16 +65496,16 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
65384
65496
  function createMCPServer(deps) {
65385
65497
  const server = new McpServer({
65386
65498
  name: "Flexprice",
65387
- version: "2.1.10"
65499
+ version: "2.1.17"
65388
65500
  });
65389
65501
  const getClient = deps.getSDK || (() => new FlexpriceCore({
65390
65502
  security: deps.security,
65391
65503
  serverURL: deps.serverURL,
65392
65504
  serverIdx: deps.serverIdx,
65393
65505
  debugLogger: deps.logger.level === "debug" ? {
65394
- log: (...args71) => console.log(...args71),
65395
- group: (...args71) => console.group(...args71),
65396
- groupEnd: (...args71) => console.groupEnd(...args71)
65506
+ log: (...args70) => console.log(...args70),
65507
+ group: (...args70) => console.group(...args70),
65508
+ groupEnd: (...args70) => console.groupEnd(...args70)
65397
65509
  } : undefined
65398
65510
  }));
65399
65511
  const scopes = new Set(deps.scopes);
@@ -65414,7 +65526,6 @@ function createMCPServer(deps) {
65414
65526
  tool(tool$customersGetCustomerUpcomingGrants);
65415
65527
  tool(tool$invoicesGetCustomerInvoiceSummary);
65416
65528
  tool(tool$invoicesCreateInvoice);
65417
- tool(tool$invoicesGetMeterUsagePreviewInvoice);
65418
65529
  tool(tool$invoicesGetInvoicePreview);
65419
65530
  tool(tool$invoicesQueryInvoice);
65420
65531
  tool(tool$invoicesGetInvoice);
@@ -65508,7 +65619,6 @@ var init_server2 = __esm(() => {
65508
65619
  init_invoicesGetInvoice2();
65509
65620
  init_invoicesGetInvoicePdf2();
65510
65621
  init_invoicesGetInvoicePreview2();
65511
- init_invoicesGetMeterUsagePreviewInvoice2();
65512
65622
  init_invoicesQueryInvoice2();
65513
65623
  init_invoicesRecalculateInvoice2();
65514
65624
  init_invoicesRecalculateInvoiceV22();
@@ -65626,12 +65736,6 @@ Use when showing a customer's invoice overview (e.g. billing portal or balance s
65626
65736
  description: `Create one-off invoice
65627
65737
 
65628
65738
  Use when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready.`
65629
- },
65630
- {
65631
- name: "get-meter-usage-preview-invoice",
65632
- description: `Get invoice preview using meter_usage data
65633
-
65634
- Preview invoice using the meter_usage table for usage data instead of feature_usage.`
65635
65739
  },
65636
65740
  {
65637
65741
  name: "get-invoice-preview",
@@ -67509,9 +67613,21 @@ var init_impl2 = __esm(() => {
67509
67613
  });
67510
67614
 
67511
67615
  // node_modules/@stricli/core/dist/index.js
67616
+ var TRUTHY_VALUES = /* @__PURE__ */ new Set(["true", "t", "yes", "y", "on", "1", ""]);
67617
+ var FALSY_VALUES = /* @__PURE__ */ new Set(["false", "f", "no", "n", "off", "0"]);
67618
+ var looseBooleanParser = (input) => {
67619
+ const value = input.toLowerCase();
67620
+ if (TRUTHY_VALUES.has(value)) {
67621
+ return true;
67622
+ }
67623
+ if (FALSY_VALUES.has(value)) {
67624
+ return false;
67625
+ }
67626
+ throw new SyntaxError(`Cannot convert ${input} to a boolean`);
67627
+ };
67512
67628
  function checkEnvironmentVariable(process2, varName) {
67513
67629
  const value = process2.env?.[varName];
67514
- return typeof value === "string" && value !== "0";
67630
+ return typeof value === "string" && looseBooleanParser(value);
67515
67631
  }
67516
67632
  var ExitCode = {
67517
67633
  UnknownCommand: -5,
@@ -67682,18 +67798,6 @@ async function allSettledOrElse(values) {
67682
67798
  }
67683
67799
  return { status: "fulfilled", value: grouped.fulfilled?.map((result) => result.value) ?? [] };
67684
67800
  }
67685
- var TRUTHY_VALUES = /* @__PURE__ */ new Set(["true", "t", "yes", "y", "on", "1"]);
67686
- var FALSY_VALUES = /* @__PURE__ */ new Set(["false", "f", "no", "n", "off", "0"]);
67687
- var looseBooleanParser = (input) => {
67688
- const value = input.toLowerCase();
67689
- if (TRUTHY_VALUES.has(value)) {
67690
- return true;
67691
- }
67692
- if (FALSY_VALUES.has(value)) {
67693
- return false;
67694
- }
67695
- throw new SyntaxError(`Cannot convert ${input} to a boolean`);
67696
- };
67697
67801
  var numberParser = (input) => {
67698
67802
  const value = Number(input);
67699
67803
  if (Number.isNaN(value)) {
@@ -68413,7 +68517,7 @@ var text_en = {
68413
68517
  version: "Print version information and exit",
68414
68518
  argumentEscapeSequence: "All subsequent inputs should be interpreted as arguments"
68415
68519
  },
68416
- noCommandRegisteredForInput: ({ input, corrections }) => {
68520
+ noCommandRegisteredForInput({ input, corrections }) {
68417
68521
  const errorMessage = `No command registered for \`${input}\``;
68418
68522
  if (corrections.length > 0) {
68419
68523
  const formattedCorrections = joinWithGrammar(corrections, {
@@ -68426,28 +68530,28 @@ var text_en = {
68426
68530
  return errorMessage;
68427
68531
  }
68428
68532
  },
68429
- noTextAvailableForLocale: ({ requestedLocale, defaultLocale }) => {
68533
+ noTextAvailableForLocale({ requestedLocale, defaultLocale }) {
68430
68534
  return `Application does not support "${requestedLocale}" locale, defaulting to "${defaultLocale}"`;
68431
68535
  },
68432
- exceptionWhileParsingArguments: (exc) => {
68536
+ exceptionWhileParsingArguments(exc) {
68433
68537
  if (exc instanceof ArgumentScannerError) {
68434
68538
  return formatMessageForArgumentScannerError(exc, {});
68435
68539
  }
68436
- return `Unable to parse arguments, ${formatException(exc)}`;
68540
+ return `Unable to parse arguments, ${(this.formatException ?? formatException)(exc)}`;
68437
68541
  },
68438
- exceptionWhileLoadingCommandFunction: (exc) => {
68439
- return `Unable to load command function, ${formatException(exc)}`;
68542
+ exceptionWhileLoadingCommandFunction(exc) {
68543
+ return `Unable to load command function, ${(this.formatException ?? formatException)(exc)}`;
68440
68544
  },
68441
- exceptionWhileLoadingCommandContext: (exc) => {
68442
- return `Unable to load command context, ${formatException(exc)}`;
68545
+ exceptionWhileLoadingCommandContext(exc) {
68546
+ return `Unable to load command context, ${(this.formatException ?? formatException)(exc)}`;
68443
68547
  },
68444
- exceptionWhileRunningCommand: (exc) => {
68445
- return `Command failed, ${formatException(exc)}`;
68548
+ exceptionWhileRunningCommand(exc) {
68549
+ return `Command failed, ${(this.formatException ?? formatException)(exc)}`;
68446
68550
  },
68447
- commandErrorResult: (err) => {
68551
+ commandErrorResult(err) {
68448
68552
  return err.message;
68449
68553
  },
68450
- currentVersionIsNotLatest: ({ currentVersion, latestVersion, upgradeCommand }) => {
68554
+ currentVersionIsNotLatest({ currentVersion, latestVersion, upgradeCommand }) {
68451
68555
  if (upgradeCommand) {
68452
68556
  return `Latest available version is ${latestVersion} (currently running ${currentVersion}), upgrade with "${upgradeCommand}"`;
68453
68557
  }
@@ -68622,7 +68726,7 @@ function buildRouteScanner(root, config, startingPrefix) {
68622
68726
  }
68623
68727
  async function runApplication({ root, defaultText, config }, rawInputs, context) {
68624
68728
  let text = defaultText;
68625
- if (context.locale) {
68729
+ if (context.locale && "loadText" in config.localization) {
68626
68730
  const localeText = config.localization.loadText(context.locale);
68627
68731
  if (localeText) {
68628
68732
  text = localeText;
@@ -68797,9 +68901,15 @@ function buildApplication(root, appConfig) {
68797
68901
  throw new InternalError("Unable to use command with alias -v as root when version info is supplied");
68798
68902
  }
68799
68903
  }
68800
- const defaultText = config.localization.loadText(config.localization.defaultLocale);
68801
- if (!defaultText) {
68802
- throw new InternalError(`No text available for the default locale "${config.localization.defaultLocale}"`);
68904
+ let defaultText;
68905
+ if ("text" in config.localization) {
68906
+ defaultText = config.localization.text;
68907
+ } else {
68908
+ const text = config.localization.loadText(config.localization.defaultLocale);
68909
+ if (!text) {
68910
+ throw new InternalError(`No text available for the default locale "${config.localization.defaultLocale}"`);
68911
+ }
68912
+ defaultText = text;
68803
68913
  }
68804
68914
  return {
68805
68915
  root,
@@ -69306,7 +69416,7 @@ function buildRouteMap({
69306
69416
  }
69307
69417
  async function run(app, inputs, context) {
69308
69418
  const exitCode = await runApplication(app, inputs, context);
69309
- context.process.exitCode = exitCode;
69419
+ context.process.exitCode ??= exitCode;
69310
69420
  }
69311
69421
 
69312
69422
  // src/mcp-server/mcp-server.ts
@@ -69536,7 +69646,7 @@ var routes = buildRouteMap({
69536
69646
  var app = buildApplication(routes, {
69537
69647
  name: "mcp",
69538
69648
  versionInfo: {
69539
- currentVersion: "2.1.10"
69649
+ currentVersion: "2.1.17"
69540
69650
  }
69541
69651
  });
69542
69652
  run(app, process4.argv.slice(2), buildContext(process4));
@@ -69544,5 +69654,5 @@ export {
69544
69654
  app
69545
69655
  };
69546
69656
 
69547
- //# debugId=9237EEAA0B0D62CA64756E2164756E21
69657
+ //# debugId=0D94551BD458F09264756E2164756E21
69548
69658
  //# sourceMappingURL=mcp-server.js.map