@flexprice/mcp-server 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/bin/mcp-server.js +343 -175
  2. package/bin/mcp-server.js.map +25 -21
  3. package/bun.lock +14 -14
  4. package/esm/funcs/invoicesRecalculateInvoice.d.ts +2 -2
  5. package/esm/funcs/invoicesRecalculateInvoice.js +3 -7
  6. package/esm/funcs/invoicesRecalculateInvoice.js.map +1 -1
  7. package/esm/funcs/invoicesRecalculateInvoiceV2.d.ts +16 -0
  8. package/esm/funcs/invoicesRecalculateInvoiceV2.d.ts.map +1 -0
  9. package/esm/funcs/invoicesRecalculateInvoiceV2.js +91 -0
  10. package/esm/funcs/invoicesRecalculateInvoiceV2.js.map +1 -0
  11. package/esm/landing-page.js +9 -9
  12. package/esm/landing-page.js.map +1 -1
  13. package/esm/lib/config.d.ts +6 -6
  14. package/esm/lib/config.d.ts.map +1 -1
  15. package/esm/lib/config.js +11 -4
  16. package/esm/lib/config.js.map +1 -1
  17. package/esm/lib/sdks.d.ts +1 -1
  18. package/esm/lib/sdks.d.ts.map +1 -1
  19. package/esm/lib/sdks.js +1 -1
  20. package/esm/lib/sdks.js.map +1 -1
  21. package/esm/mcp-server/cli/serve/command.js +1 -1
  22. package/esm/mcp-server/cli/serve/command.js.map +1 -1
  23. package/esm/mcp-server/cli/start/command.js +1 -1
  24. package/esm/mcp-server/cli/start/command.js.map +1 -1
  25. package/esm/mcp-server/flags.d.ts +1 -1
  26. package/esm/mcp-server/flags.d.ts.map +1 -1
  27. package/esm/mcp-server/mcp-server.js +1 -1
  28. package/esm/mcp-server/server.d.ts +1 -1
  29. package/esm/mcp-server/server.d.ts.map +1 -1
  30. package/esm/mcp-server/server.js +3 -1
  31. package/esm/mcp-server/server.js.map +1 -1
  32. package/esm/mcp-server/tools/invoicesRecalculateInvoice.js +2 -2
  33. package/esm/mcp-server/tools/invoicesRecalculateInvoice.js.map +1 -1
  34. package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.d.ts +7 -0
  35. package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.d.ts.map +1 -0
  36. package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.js +34 -0
  37. package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.js.map +1 -0
  38. package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
  39. package/esm/models/dtofeatureresponse.d.ts +2 -0
  40. package/esm/models/dtofeatureresponse.d.ts.map +1 -1
  41. package/esm/models/dtofeatureresponse.js +2 -0
  42. package/esm/models/dtofeatureresponse.js.map +1 -1
  43. package/esm/models/dtoinvoiceresponse.d.ts +1 -0
  44. package/esm/models/dtoinvoiceresponse.d.ts.map +1 -1
  45. package/esm/models/dtoinvoiceresponse.js +1 -0
  46. package/esm/models/dtoinvoiceresponse.js.map +1 -1
  47. package/esm/models/dtousageanalyticitem.d.ts +3 -0
  48. package/esm/models/dtousageanalyticitem.d.ts.map +1 -1
  49. package/esm/models/dtousageanalyticitem.js +3 -0
  50. package/esm/models/dtousageanalyticitem.js.map +1 -1
  51. package/esm/models/filtercondition.d.ts +2 -2
  52. package/esm/models/filtercondition.d.ts.map +1 -1
  53. package/esm/models/filtercondition.js +2 -2
  54. package/esm/models/filtercondition.js.map +1 -1
  55. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.d.ts +2 -0
  56. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.d.ts.map +1 -1
  57. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.js +2 -0
  58. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.js.map +1 -1
  59. package/esm/models/meteraggregation.d.ts +1 -0
  60. package/esm/models/meteraggregation.d.ts.map +1 -1
  61. package/esm/models/meteraggregation.js +1 -0
  62. package/esm/models/meteraggregation.js.map +1 -1
  63. package/esm/models/recalculateinvoiceop.d.ts +0 -1
  64. package/esm/models/recalculateinvoiceop.d.ts.map +1 -1
  65. package/esm/models/recalculateinvoiceop.js +0 -1
  66. package/esm/models/recalculateinvoiceop.js.map +1 -1
  67. package/esm/models/recalculateinvoicev2op.d.ts +11 -0
  68. package/esm/models/recalculateinvoicev2op.d.ts.map +1 -0
  69. package/esm/models/recalculateinvoicev2op.js +15 -0
  70. package/esm/models/recalculateinvoicev2op.js.map +1 -0
  71. package/esm/models/reportingunit.d.ts +8 -0
  72. package/esm/models/reportingunit.d.ts.map +1 -0
  73. package/esm/models/reportingunit.js +10 -0
  74. package/esm/models/reportingunit.js.map +1 -0
  75. package/esm/models/value.d.ts +10 -0
  76. package/esm/models/value.d.ts.map +1 -0
  77. package/esm/models/{githubcomflexpriceflexpriceinternaltypesvalue.js → value.js} +2 -2
  78. package/esm/models/value.js.map +1 -0
  79. package/esm/models/windowsize.d.ts +2 -2
  80. package/esm/models/windowsize.js +2 -2
  81. package/esm/models/windowsize.js.map +1 -1
  82. package/esm/tool-names.d.ts.map +1 -1
  83. package/esm/tool-names.js +5 -1
  84. package/esm/tool-names.js.map +1 -1
  85. package/esm/tsconfig.tsbuildinfo +1 -1
  86. package/manifest.json +17 -11
  87. package/package.json +1 -1
  88. package/src/funcs/invoicesRecalculateInvoice.ts +3 -7
  89. package/src/funcs/invoicesRecalculateInvoiceV2.ts +156 -0
  90. package/src/landing-page.ts +9 -9
  91. package/src/lib/config.ts +13 -6
  92. package/src/lib/sdks.ts +1 -1
  93. package/src/mcp-server/cli/serve/command.ts +1 -1
  94. package/src/mcp-server/cli/start/command.ts +1 -1
  95. package/src/mcp-server/flags.ts +1 -1
  96. package/src/mcp-server/mcp-server.ts +1 -1
  97. package/src/mcp-server/server.ts +4 -2
  98. package/src/mcp-server/tools/invoicesRecalculateInvoice.ts +2 -2
  99. package/src/mcp-server/tools/invoicesRecalculateInvoiceV2.ts +42 -0
  100. package/src/models/dtofeatureresponse.ts +3 -0
  101. package/src/models/dtoinvoiceresponse.ts +2 -0
  102. package/src/models/dtousageanalyticitem.ts +5 -0
  103. package/src/models/filtercondition.ts +3 -6
  104. package/src/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.ts +3 -0
  105. package/src/models/meteraggregation.ts +2 -0
  106. package/src/models/recalculateinvoiceop.ts +1 -7
  107. package/src/models/recalculateinvoicev2op.ts +38 -0
  108. package/src/models/reportingunit.ts +17 -0
  109. package/src/models/{githubcomflexpriceflexpriceinternaltypesvalue.ts → value.ts} +2 -4
  110. package/src/models/windowsize.ts +2 -2
  111. package/src/tool-names.ts +5 -1
  112. package/esm/models/githubcomflexpriceflexpriceinternaltypesvalue.d.ts +0 -10
  113. package/esm/models/githubcomflexpriceflexpriceinternaltypesvalue.d.ts.map +0 -1
  114. package/esm/models/githubcomflexpriceflexpriceinternaltypesvalue.js.map +0 -1
package/bin/mcp-server.js CHANGED
@@ -5597,15 +5597,32 @@ var RequestError, toRequestError = (e) => {
5597
5597
  }
5598
5598
  }, responseViaCache = async (res, outgoing) => {
5599
5599
  let [status, body, header] = res[cacheKey];
5600
- if (header instanceof Headers) {
5600
+ let hasContentLength = false;
5601
+ if (!header) {
5602
+ header = { "content-type": "text/plain; charset=UTF-8" };
5603
+ } else if (header instanceof Headers) {
5604
+ hasContentLength = header.has("content-length");
5601
5605
  header = buildOutgoingHttpHeaders(header);
5606
+ } else if (Array.isArray(header)) {
5607
+ const headerObj = new Headers(header);
5608
+ hasContentLength = headerObj.has("content-length");
5609
+ header = buildOutgoingHttpHeaders(headerObj);
5610
+ } else {
5611
+ for (const key in header) {
5612
+ if (key.length === 14 && key.toLowerCase() === "content-length") {
5613
+ hasContentLength = true;
5614
+ break;
5615
+ }
5616
+ }
5602
5617
  }
5603
- if (typeof body === "string") {
5604
- header["Content-Length"] = Buffer.byteLength(body);
5605
- } else if (body instanceof Uint8Array) {
5606
- header["Content-Length"] = body.byteLength;
5607
- } else if (body instanceof Blob) {
5608
- header["Content-Length"] = body.size;
5618
+ if (!hasContentLength) {
5619
+ if (typeof body === "string") {
5620
+ header["Content-Length"] = Buffer.byteLength(body);
5621
+ } else if (body instanceof Uint8Array) {
5622
+ header["Content-Length"] = body.byteLength;
5623
+ } else if (body instanceof Blob) {
5624
+ header["Content-Length"] = body.size;
5625
+ }
5609
5626
  }
5610
5627
  outgoing.writeHead(status, header);
5611
5628
  if (typeof body === "string" || body instanceof Uint8Array) {
@@ -5871,15 +5888,14 @@ var init_dist = __esm(() => {
5871
5888
  this.#init = init;
5872
5889
  }
5873
5890
  if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
5874
- headers ||= init?.headers || { "content-type": "text/plain; charset=UTF-8" };
5875
- this[cacheKey] = [init?.status || 200, body, headers];
5891
+ this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
5876
5892
  }
5877
5893
  }
5878
5894
  get headers() {
5879
5895
  const cache = this[cacheKey];
5880
5896
  if (cache) {
5881
5897
  if (!(cache[2] instanceof Headers)) {
5882
- cache[2] = new Headers(cache[2]);
5898
+ cache[2] = new Headers(cache[2] || { "content-type": "text/plain; charset=UTF-8" });
5883
5899
  }
5884
5900
  return cache[2];
5885
5901
  }
@@ -50413,14 +50429,15 @@ var ServerList, SDK_METADATA;
50413
50429
  var init_config = __esm(() => {
50414
50430
  init_url();
50415
50431
  ServerList = [
50416
- "/v1"
50432
+ "https://us.api.flexprice.io/v1",
50433
+ "https://api.cloud.flexprice.io/v1"
50417
50434
  ];
50418
50435
  SDK_METADATA = {
50419
50436
  language: "typescript",
50420
50437
  openapiDocVersion: "1.0",
50421
- sdkVersion: "2.0.0",
50422
- genVersion: "2.845.12",
50423
- userAgent: "speakeasy-sdk/mcp-typescript 2.0.0 2.845.12 1.0 @flexprice/mcp-server"
50438
+ sdkVersion: "2.0.2",
50439
+ genVersion: "2.852.1",
50440
+ userAgent: "speakeasy-sdk/mcp-typescript 2.0.2 2.852.1 1.0 @flexprice/mcp-server"
50424
50441
  };
50425
50442
  });
50426
50443
 
@@ -50961,7 +50978,7 @@ class ClientSDK {
50961
50978
  #logger;
50962
50979
  _baseURL;
50963
50980
  _options;
50964
- constructor(options) {
50981
+ constructor(options = {}) {
50965
50982
  const opt = options;
50966
50983
  if (typeof opt === "object" && opt != null && "hooks" in opt && opt.hooks instanceof SDKHooks) {
50967
50984
  this.#hooks = opt.hooks;
@@ -52517,7 +52534,6 @@ var WindowSize$zodSchema;
52517
52534
  var init_windowsize = __esm(() => {
52518
52535
  init_zod();
52519
52536
  WindowSize$zodSchema = _enum([
52520
- "MONTH",
52521
52537
  "MINUTE",
52522
52538
  "15MIN",
52523
52539
  "30MIN",
@@ -52526,7 +52542,8 @@ var init_windowsize = __esm(() => {
52526
52542
  "6HOUR",
52527
52543
  "12HOUR",
52528
52544
  "DAY",
52529
- "WEEK"
52545
+ "WEEK",
52546
+ "MONTH"
52530
52547
  ]);
52531
52548
  });
52532
52549
 
@@ -52538,6 +52555,7 @@ var init_meteraggregation = __esm(() => {
52538
52555
  init_windowsize();
52539
52556
  MeterAggregation$zodSchema = object({
52540
52557
  bucket_size: WindowSize$zodSchema.optional(),
52558
+ expression: string2().optional(),
52541
52559
  field: string2().optional(),
52542
52560
  group_by: string2().optional(),
52543
52561
  multiplier: string2().optional(),
@@ -52597,6 +52615,17 @@ var init_featuretype = __esm(() => {
52597
52615
  ]);
52598
52616
  });
52599
52617
 
52618
+ // src/models/reportingunit.ts
52619
+ var ReportingUnit$zodSchema;
52620
+ var init_reportingunit = __esm(() => {
52621
+ init_zod();
52622
+ ReportingUnit$zodSchema = object({
52623
+ conversion_rate: number2().optional(),
52624
+ unit_plural: string2().optional(),
52625
+ unit_singular: string2().optional()
52626
+ });
52627
+ });
52628
+
52600
52629
  // src/models/dtofeatureresponse.ts
52601
52630
  var DtoFeatureResponse$zodSchema;
52602
52631
  var init_dtofeatureresponse = __esm(() => {
@@ -52604,6 +52633,7 @@ var init_dtofeatureresponse = __esm(() => {
52604
52633
  init_alertsettings();
52605
52634
  init_dtometerresponse();
52606
52635
  init_featuretype();
52636
+ init_reportingunit();
52607
52637
  init_status();
52608
52638
  DtoFeatureResponse$zodSchema = object({
52609
52639
  alert_settings: AlertSettings$zodSchema.optional(),
@@ -52617,6 +52647,7 @@ var init_dtofeatureresponse = __esm(() => {
52617
52647
  meter: DtoMeterResponse$zodSchema.optional(),
52618
52648
  meter_id: string2().optional(),
52619
52649
  name: string2().optional(),
52650
+ reporting_unit: ReportingUnit$zodSchema.optional(),
52620
52651
  status: Status$zodSchema.optional(),
52621
52652
  tenant_id: string2().optional(),
52622
52653
  type: FeatureType$zodSchema.optional(),
@@ -53212,11 +53243,11 @@ var init_filteroperatortype = __esm(() => {
53212
53243
  ]);
53213
53244
  });
53214
53245
 
53215
- // src/models/githubcomflexpriceflexpriceinternaltypesvalue.ts
53216
- var GithubComFlexpriceFlexpriceInternalTypesValue$zodSchema;
53217
- var init_githubcomflexpriceflexpriceinternaltypesvalue = __esm(() => {
53246
+ // src/models/value.ts
53247
+ var Value$zodSchema;
53248
+ var init_value = __esm(() => {
53218
53249
  init_zod();
53219
- GithubComFlexpriceFlexpriceInternalTypesValue$zodSchema = object({
53250
+ Value$zodSchema = object({
53220
53251
  array: array(string2()).optional(),
53221
53252
  boolean: boolean2().optional(),
53222
53253
  date: string2().optional(),
@@ -53231,12 +53262,12 @@ var init_filtercondition = __esm(() => {
53231
53262
  init_zod();
53232
53263
  init_datatype();
53233
53264
  init_filteroperatortype();
53234
- init_githubcomflexpriceflexpriceinternaltypesvalue();
53265
+ init_value();
53235
53266
  FilterCondition$zodSchema = object({
53236
53267
  data_type: DataType$zodSchema.optional(),
53237
53268
  field: string2().optional(),
53238
53269
  operator: FilterOperatorType$zodSchema.optional(),
53239
- value: GithubComFlexpriceFlexpriceInternalTypesValue$zodSchema.optional()
53270
+ value: Value$zodSchema.optional()
53240
53271
  });
53241
53272
  });
53242
53273
 
@@ -56571,6 +56602,7 @@ var init_dtoinvoiceresponse = __esm(() => {
56571
56602
  payment_status: PaymentStatus$zodSchema.optional(),
56572
56603
  period_end: string2().optional(),
56573
56604
  period_start: string2().optional(),
56605
+ recalculated_invoice_id: string2().optional(),
56574
56606
  refunded_amount: string2().optional(),
56575
56607
  status: Status$zodSchema.optional(),
56576
56608
  subscription: lazy(() => DtoSubscriptionResponse$zodSchema).optional(),
@@ -57132,7 +57164,6 @@ var init_recalculateinvoiceop = __esm(() => {
57132
57164
  init_dtoinvoiceresponse();
57133
57165
  init_errorserrorresponse();
57134
57166
  RecalculateInvoiceRequest$zodSchema = object({
57135
- finalize: boolean2().describe("Whether to finalize the invoice after recalculation (default: true)").optional(),
57136
57167
  id: string2().describe("Invoice ID")
57137
57168
  });
57138
57169
  RecalculateInvoiceResponse$zodSchema = union([
@@ -57159,9 +57190,6 @@ async function $do26(client$, request, options) {
57159
57190
  })
57160
57191
  };
57161
57192
  const path$ = pathToFunc("/invoices/{id}/recalculate")(pathParams$);
57162
- const query$ = encodeFormQuery({
57163
- finalize: payload$.finalize
57164
- });
57165
57193
  const headers$ = new Headers(compactMap({
57166
57194
  Accept: "application/json"
57167
57195
  }));
@@ -57189,7 +57217,6 @@ async function $do26(client$, request, options) {
57189
57217
  baseURL: options?.serverURL,
57190
57218
  path: path$,
57191
57219
  headers: headers$,
57192
- query: query$,
57193
57220
  body: body$,
57194
57221
  userAgent: client$._options.userAgent,
57195
57222
  timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
@@ -57234,9 +57261,9 @@ var init_invoicesRecalculateInvoice2 = __esm(() => {
57234
57261
  };
57235
57262
  tool$invoicesRecalculateInvoice = {
57236
57263
  name: "recalculate-invoice",
57237
- description: `Recalculate invoice
57264
+ description: `Recalculate invoice (default: voided invoice)
57238
57265
 
57239
- Use when subscription or usage data changed and you need to refresh a draft invoice before finalizing. Optional finalize=true to lock after recalc.`,
57266
+ Creates a fresh replacement invoice for a voided SUBSCRIPTION invoice covering the same billing period. The original voided invoice is linked to the new invoice via recalculated_invoice_id. Can only be called once per voided invoice.`,
57240
57267
  annotations: {
57241
57268
  title: "",
57242
57269
  destructiveHint: false,
@@ -57258,6 +57285,139 @@ Use when subscription or usage data changed and you need to refresh a draft invo
57258
57285
  };
57259
57286
  });
57260
57287
 
57288
+ // src/models/recalculateinvoicev2op.ts
57289
+ var RecalculateInvoiceV2Request$zodSchema, RecalculateInvoiceV2Response$zodSchema;
57290
+ var init_recalculateinvoicev2op = __esm(() => {
57291
+ init_zod();
57292
+ init_dtoinvoiceresponse();
57293
+ init_errorserrorresponse();
57294
+ RecalculateInvoiceV2Request$zodSchema = object({
57295
+ finalize: boolean2().describe("Whether to finalize the invoice after recalculation (default: true)").optional(),
57296
+ id: string2().describe("Invoice ID")
57297
+ });
57298
+ RecalculateInvoiceV2Response$zodSchema = union([
57299
+ DtoInvoiceResponse$zodSchema,
57300
+ ErrorsErrorResponse$zodSchema
57301
+ ]);
57302
+ });
57303
+
57304
+ // src/funcs/invoicesRecalculateInvoiceV2.ts
57305
+ function invoicesRecalculateInvoiceV2(client$, request, options) {
57306
+ return new APIPromise($do27(client$, request, options));
57307
+ }
57308
+ async function $do27(client$, request, options) {
57309
+ const parsed$ = safeParse4(request, (value$) => RecalculateInvoiceV2Request$zodSchema.parse(value$), "Input validation failed");
57310
+ if (!parsed$.ok) {
57311
+ return [parsed$, { status: "invalid" }];
57312
+ }
57313
+ const payload$ = parsed$.value;
57314
+ const body$ = null;
57315
+ const pathParams$ = {
57316
+ id: encodeSimple("id", payload$.id, {
57317
+ explode: false,
57318
+ charEncoding: "percent"
57319
+ })
57320
+ };
57321
+ const path$ = pathToFunc("/invoices/{id}/recalculate-v2")(pathParams$);
57322
+ const query$ = encodeFormQuery({
57323
+ finalize: payload$.finalize
57324
+ });
57325
+ const headers$ = new Headers(compactMap({
57326
+ Accept: "application/json"
57327
+ }));
57328
+ const securityInput = await extractSecurity(client$._options.security);
57329
+ const requestSecurity = resolveGlobalSecurity(securityInput);
57330
+ const context = {
57331
+ options: client$._options,
57332
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
57333
+ operationID: "recalculateInvoiceV2",
57334
+ oAuth2Scopes: null,
57335
+ resolvedSecurity: requestSecurity,
57336
+ securitySource: client$._options.security,
57337
+ retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
57338
+ retryCodes: options?.retryCodes || [
57339
+ "429",
57340
+ "500",
57341
+ "502",
57342
+ "503",
57343
+ "504"
57344
+ ]
57345
+ };
57346
+ const requestRes = client$._createRequest(context, {
57347
+ security: requestSecurity,
57348
+ method: "POST",
57349
+ baseURL: options?.serverURL,
57350
+ path: path$,
57351
+ headers: headers$,
57352
+ query: query$,
57353
+ body: body$,
57354
+ userAgent: client$._options.userAgent,
57355
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
57356
+ }, options);
57357
+ if (!requestRes.ok) {
57358
+ return [requestRes, { status: "invalid" }];
57359
+ }
57360
+ const req$ = requestRes.value;
57361
+ const doResult = await client$._do(req$, {
57362
+ context,
57363
+ errorCodes: [],
57364
+ retryConfig: context.retryConfig,
57365
+ retryCodes: context.retryCodes
57366
+ });
57367
+ if (!doResult.ok) {
57368
+ return [doResult, { status: "request-error", request: req$ }];
57369
+ }
57370
+ return [doResult, {
57371
+ status: "complete",
57372
+ request: req$,
57373
+ response: doResult.value
57374
+ }];
57375
+ }
57376
+ var init_invoicesRecalculateInvoiceV2 = __esm(() => {
57377
+ init_encodings();
57378
+ init_primitives();
57379
+ init_schemas4();
57380
+ init_security();
57381
+ init_url();
57382
+ init_recalculateinvoicev2op();
57383
+ init_async();
57384
+ });
57385
+
57386
+ // src/mcp-server/tools/invoicesRecalculateInvoiceV2.ts
57387
+ var args26, tool$invoicesRecalculateInvoiceV2;
57388
+ var init_invoicesRecalculateInvoiceV22 = __esm(() => {
57389
+ init_invoicesRecalculateInvoiceV2();
57390
+ init_recalculateinvoicev2op();
57391
+ init_tools();
57392
+ args26 = {
57393
+ request: RecalculateInvoiceV2Request$zodSchema
57394
+ };
57395
+ tool$invoicesRecalculateInvoiceV2 = {
57396
+ name: "recalculate-invoice-v2",
57397
+ description: `Recalculate draft invoice (v2)
57398
+
57399
+ Recalculates a draft SUBSCRIPTION invoice in-place (replaces line items, reapplies credits/coupons/taxes). Use when subscription or usage data changed before finalizing.`,
57400
+ annotations: {
57401
+ title: "",
57402
+ destructiveHint: false,
57403
+ idempotentHint: false,
57404
+ openWorldHint: false,
57405
+ readOnlyHint: false
57406
+ },
57407
+ args: args26,
57408
+ tool: async (client, args27, ctx) => {
57409
+ const [result] = await invoicesRecalculateInvoiceV2(client, args27.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57410
+ if (!result.ok) {
57411
+ return {
57412
+ content: [{ type: "text", text: result.error.message }],
57413
+ isError: true
57414
+ };
57415
+ }
57416
+ return formatResult(result.value);
57417
+ }
57418
+ };
57419
+ });
57420
+
57261
57421
  // src/models/triggerinvoicecommswebhookop.ts
57262
57422
  var TriggerInvoiceCommsWebhookRequest$zodSchema, TriggerInvoiceCommsWebhookResponse$zodSchema;
57263
57423
  var init_triggerinvoicecommswebhookop = __esm(() => {
@@ -57275,9 +57435,9 @@ var init_triggerinvoicecommswebhookop = __esm(() => {
57275
57435
 
57276
57436
  // src/funcs/invoicesTriggerInvoiceCommsWebhook.ts
57277
57437
  function invoicesTriggerInvoiceCommsWebhook(client$, request, options) {
57278
- return new APIPromise($do27(client$, request, options));
57438
+ return new APIPromise($do28(client$, request, options));
57279
57439
  }
57280
- async function $do27(client$, request, options) {
57440
+ async function $do28(client$, request, options) {
57281
57441
  const parsed$ = safeParse4(request, (value$) => TriggerInvoiceCommsWebhookRequest$zodSchema.parse(value$), "Input validation failed");
57282
57442
  if (!parsed$.ok) {
57283
57443
  return [parsed$, { status: "invalid" }];
@@ -57352,12 +57512,12 @@ var init_invoicesTriggerInvoiceCommsWebhook = __esm(() => {
57352
57512
  });
57353
57513
 
57354
57514
  // src/mcp-server/tools/invoicesTriggerInvoiceCommsWebhook.ts
57355
- var args26, tool$invoicesTriggerInvoiceCommsWebhook;
57515
+ var args27, tool$invoicesTriggerInvoiceCommsWebhook;
57356
57516
  var init_invoicesTriggerInvoiceCommsWebhook2 = __esm(() => {
57357
57517
  init_invoicesTriggerInvoiceCommsWebhook();
57358
57518
  init_triggerinvoicecommswebhookop();
57359
57519
  init_tools();
57360
- args26 = {
57520
+ args27 = {
57361
57521
  request: TriggerInvoiceCommsWebhookRequest$zodSchema
57362
57522
  };
57363
57523
  tool$invoicesTriggerInvoiceCommsWebhook = {
@@ -57372,9 +57532,9 @@ Use when sending an invoice to the customer (e.g. trigger email or Slack). Paylo
57372
57532
  openWorldHint: false,
57373
57533
  readOnlyHint: false
57374
57534
  },
57375
- args: args26,
57376
- tool: async (client, args27, ctx) => {
57377
- const [result] = await invoicesTriggerInvoiceCommsWebhook(client, args27.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57535
+ args: args27,
57536
+ tool: async (client, args28, ctx) => {
57537
+ const [result] = await invoicesTriggerInvoiceCommsWebhook(client, args28.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57378
57538
  if (!result.ok) {
57379
57539
  return {
57380
57540
  content: [{ type: "text", text: result.error.message }],
@@ -57416,9 +57576,9 @@ var init_updateinvoiceop = __esm(() => {
57416
57576
 
57417
57577
  // src/funcs/invoicesUpdateInvoice.ts
57418
57578
  function invoicesUpdateInvoice(client$, request, options) {
57419
- return new APIPromise($do28(client$, request, options));
57579
+ return new APIPromise($do29(client$, request, options));
57420
57580
  }
57421
- async function $do28(client$, request, options) {
57581
+ async function $do29(client$, request, options) {
57422
57582
  const parsed$ = safeParse4(request, (value$) => UpdateInvoiceRequest$zodSchema.parse(value$), "Input validation failed");
57423
57583
  if (!parsed$.ok) {
57424
57584
  return [parsed$, { status: "invalid" }];
@@ -57494,12 +57654,12 @@ var init_invoicesUpdateInvoice = __esm(() => {
57494
57654
  });
57495
57655
 
57496
57656
  // src/mcp-server/tools/invoicesUpdateInvoice.ts
57497
- var args27, tool$invoicesUpdateInvoice;
57657
+ var args28, tool$invoicesUpdateInvoice;
57498
57658
  var init_invoicesUpdateInvoice2 = __esm(() => {
57499
57659
  init_invoicesUpdateInvoice();
57500
57660
  init_updateinvoiceop();
57501
57661
  init_tools();
57502
- args27 = {
57662
+ args28 = {
57503
57663
  request: UpdateInvoiceRequest$zodSchema
57504
57664
  };
57505
57665
  tool$invoicesUpdateInvoice = {
@@ -57514,9 +57674,9 @@ Use when updating invoice metadata or due date (e.g. PDF URL, net terms). For pa
57514
57674
  openWorldHint: false,
57515
57675
  readOnlyHint: false
57516
57676
  },
57517
- args: args27,
57518
- tool: async (client, args28, ctx) => {
57519
- const [result] = await invoicesUpdateInvoice(client, args28.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57677
+ args: args28,
57678
+ tool: async (client, args29, ctx) => {
57679
+ const [result] = await invoicesUpdateInvoice(client, args29.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57520
57680
  if (!result.ok) {
57521
57681
  return {
57522
57682
  content: [{ type: "text", text: result.error.message }],
@@ -57558,9 +57718,9 @@ var init_updateinvoicepaymentstatusop = __esm(() => {
57558
57718
 
57559
57719
  // src/funcs/invoicesUpdateInvoicePaymentStatus.ts
57560
57720
  function invoicesUpdateInvoicePaymentStatus(client$, request, options) {
57561
- return new APIPromise($do29(client$, request, options));
57721
+ return new APIPromise($do30(client$, request, options));
57562
57722
  }
57563
- async function $do29(client$, request, options) {
57723
+ async function $do30(client$, request, options) {
57564
57724
  const parsed$ = safeParse4(request, (value$) => UpdateInvoicePaymentStatusRequest$zodSchema.parse(value$), "Input validation failed");
57565
57725
  if (!parsed$.ok) {
57566
57726
  return [parsed$, { status: "invalid" }];
@@ -57636,12 +57796,12 @@ var init_invoicesUpdateInvoicePaymentStatus = __esm(() => {
57636
57796
  });
57637
57797
 
57638
57798
  // src/mcp-server/tools/invoicesUpdateInvoicePaymentStatus.ts
57639
- var args28, tool$invoicesUpdateInvoicePaymentStatus;
57799
+ var args29, tool$invoicesUpdateInvoicePaymentStatus;
57640
57800
  var init_invoicesUpdateInvoicePaymentStatus2 = __esm(() => {
57641
57801
  init_invoicesUpdateInvoicePaymentStatus();
57642
57802
  init_updateinvoicepaymentstatusop();
57643
57803
  init_tools();
57644
- args28 = {
57804
+ args29 = {
57645
57805
  request: UpdateInvoicePaymentStatusRequest$zodSchema
57646
57806
  };
57647
57807
  tool$invoicesUpdateInvoicePaymentStatus = {
@@ -57656,9 +57816,9 @@ Use when reconciling payment status from an external gateway or manual entry (e.
57656
57816
  openWorldHint: false,
57657
57817
  readOnlyHint: false
57658
57818
  },
57659
- args: args28,
57660
- tool: async (client, args29, ctx) => {
57661
- const [result] = await invoicesUpdateInvoicePaymentStatus(client, args29.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57819
+ args: args29,
57820
+ tool: async (client, args30, ctx) => {
57821
+ const [result] = await invoicesUpdateInvoicePaymentStatus(client, args30.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57662
57822
  if (!result.ok) {
57663
57823
  return {
57664
57824
  content: [{ type: "text", text: result.error.message }],
@@ -57687,9 +57847,9 @@ var init_voidinvoiceop = __esm(() => {
57687
57847
 
57688
57848
  // src/funcs/invoicesVoidInvoice.ts
57689
57849
  function invoicesVoidInvoice(client$, request, options) {
57690
- return new APIPromise($do30(client$, request, options));
57850
+ return new APIPromise($do31(client$, request, options));
57691
57851
  }
57692
- async function $do30(client$, request, options) {
57852
+ async function $do31(client$, request, options) {
57693
57853
  const parsed$ = safeParse4(request, (value$) => VoidInvoiceRequest$zodSchema.parse(value$), "Input validation failed");
57694
57854
  if (!parsed$.ok) {
57695
57855
  return [parsed$, { status: "invalid" }];
@@ -57764,12 +57924,12 @@ var init_invoicesVoidInvoice = __esm(() => {
57764
57924
  });
57765
57925
 
57766
57926
  // src/mcp-server/tools/invoicesVoidInvoice.ts
57767
- var args29, tool$invoicesVoidInvoice;
57927
+ var args30, tool$invoicesVoidInvoice;
57768
57928
  var init_invoicesVoidInvoice2 = __esm(() => {
57769
57929
  init_invoicesVoidInvoice();
57770
57930
  init_voidinvoiceop();
57771
57931
  init_tools();
57772
- args29 = {
57932
+ args30 = {
57773
57933
  request: VoidInvoiceRequest$zodSchema
57774
57934
  };
57775
57935
  tool$invoicesVoidInvoice = {
@@ -57784,9 +57944,9 @@ Use when cancelling an invoice (e.g. order cancelled or duplicate). Only unpaid
57784
57944
  openWorldHint: false,
57785
57945
  readOnlyHint: false
57786
57946
  },
57787
- args: args29,
57788
- tool: async (client, args30, ctx) => {
57789
- const [result] = await invoicesVoidInvoice(client, args30.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57947
+ args: args30,
57948
+ tool: async (client, args31, ctx) => {
57949
+ const [result] = await invoicesVoidInvoice(client, args31.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57790
57950
  if (!result.ok) {
57791
57951
  return {
57792
57952
  content: [{ type: "text", text: result.error.message }],
@@ -57813,9 +57973,9 @@ var init_dtocreateplanrequest = __esm(() => {
57813
57973
 
57814
57974
  // src/funcs/plansCreatePlan.ts
57815
57975
  function plansCreatePlan(client$, request, options) {
57816
- return new APIPromise($do31(client$, request, options));
57976
+ return new APIPromise($do32(client$, request, options));
57817
57977
  }
57818
- async function $do31(client$, request, options) {
57978
+ async function $do32(client$, request, options) {
57819
57979
  const parsed$ = safeParse4(request, (value$) => DtoCreatePlanRequest$zodSchema.parse(value$), "Input validation failed");
57820
57980
  if (!parsed$.ok) {
57821
57981
  return [parsed$, { status: "invalid" }];
@@ -57885,12 +58045,12 @@ var init_plansCreatePlan = __esm(() => {
57885
58045
  });
57886
58046
 
57887
58047
  // src/mcp-server/tools/plansCreatePlan.ts
57888
- var args30, tool$plansCreatePlan;
58048
+ var args31, tool$plansCreatePlan;
57889
58049
  var init_plansCreatePlan2 = __esm(() => {
57890
58050
  init_plansCreatePlan();
57891
58051
  init_dtocreateplanrequest();
57892
58052
  init_tools();
57893
- args30 = {
58053
+ args31 = {
57894
58054
  request: DtoCreatePlanRequest$zodSchema
57895
58055
  };
57896
58056
  tool$plansCreatePlan = {
@@ -57905,9 +58065,9 @@ Use when defining a new pricing plan (e.g. Free, Pro, Enterprise). Attach prices
57905
58065
  openWorldHint: false,
57906
58066
  readOnlyHint: false
57907
58067
  },
57908
- args: args30,
57909
- tool: async (client, args31, ctx) => {
57910
- const [result] = await plansCreatePlan(client, args31.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58068
+ args: args31,
58069
+ tool: async (client, args32, ctx) => {
58070
+ const [result] = await plansCreatePlan(client, args32.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
57911
58071
  if (!result.ok) {
57912
58072
  return {
57913
58073
  content: [{ type: "text", text: result.error.message }],
@@ -57936,9 +58096,9 @@ var init_deleteplanop = __esm(() => {
57936
58096
 
57937
58097
  // src/funcs/plansDeletePlan.ts
57938
58098
  function plansDeletePlan(client$, request, options) {
57939
- return new APIPromise($do32(client$, request, options));
58099
+ return new APIPromise($do33(client$, request, options));
57940
58100
  }
57941
- async function $do32(client$, request, options) {
58101
+ async function $do33(client$, request, options) {
57942
58102
  const parsed$ = safeParse4(request, (value$) => DeletePlanRequest$zodSchema.parse(value$), "Input validation failed");
57943
58103
  if (!parsed$.ok) {
57944
58104
  return [parsed$, { status: "invalid" }];
@@ -58013,12 +58173,12 @@ var init_plansDeletePlan = __esm(() => {
58013
58173
  });
58014
58174
 
58015
58175
  // src/mcp-server/tools/plansDeletePlan.ts
58016
- var args31, tool$plansDeletePlan;
58176
+ var args32, tool$plansDeletePlan;
58017
58177
  var init_plansDeletePlan2 = __esm(() => {
58018
58178
  init_plansDeletePlan();
58019
58179
  init_deleteplanop();
58020
58180
  init_tools();
58021
- args31 = {
58181
+ args32 = {
58022
58182
  request: DeletePlanRequest$zodSchema
58023
58183
  };
58024
58184
  tool$plansDeletePlan = {
@@ -58033,9 +58193,9 @@ Use when retiring a plan (e.g. end-of-life). Existing subscriptions may be affec
58033
58193
  openWorldHint: false,
58034
58194
  readOnlyHint: false
58035
58195
  },
58036
- args: args31,
58037
- tool: async (client, args32, ctx) => {
58038
- const [result] = await plansDeletePlan(client, args32.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58196
+ args: args32,
58197
+ tool: async (client, args33, ctx) => {
58198
+ const [result] = await plansDeletePlan(client, args33.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58039
58199
  if (!result.ok) {
58040
58200
  return {
58041
58201
  content: [{ type: "text", text: result.error.message }],
@@ -58064,9 +58224,9 @@ var init_getplanop = __esm(() => {
58064
58224
 
58065
58225
  // src/funcs/plansGetPlan.ts
58066
58226
  function plansGetPlan(client$, request, options) {
58067
- return new APIPromise($do33(client$, request, options));
58227
+ return new APIPromise($do34(client$, request, options));
58068
58228
  }
58069
- async function $do33(client$, request, options) {
58229
+ async function $do34(client$, request, options) {
58070
58230
  const parsed$ = safeParse4(request, (value$) => GetPlanRequest$zodSchema.parse(value$), "Input validation failed");
58071
58231
  if (!parsed$.ok) {
58072
58232
  return [parsed$, { status: "invalid" }];
@@ -58141,12 +58301,12 @@ var init_plansGetPlan = __esm(() => {
58141
58301
  });
58142
58302
 
58143
58303
  // src/mcp-server/tools/plansGetPlan.ts
58144
- var args32, tool$plansGetPlan;
58304
+ var args33, tool$plansGetPlan;
58145
58305
  var init_plansGetPlan2 = __esm(() => {
58146
58306
  init_plansGetPlan();
58147
58307
  init_getplanop();
58148
58308
  init_tools();
58149
- args32 = {
58309
+ args33 = {
58150
58310
  request: GetPlanRequest$zodSchema
58151
58311
  };
58152
58312
  tool$plansGetPlan = {
@@ -58161,9 +58321,9 @@ Use when you need to load a single plan (e.g. for display or to create a subscri
58161
58321
  openWorldHint: false,
58162
58322
  readOnlyHint: false
58163
58323
  },
58164
- args: args32,
58165
- tool: async (client, args33, ctx) => {
58166
- const [result] = await plansGetPlan(client, args33.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58324
+ args: args33,
58325
+ tool: async (client, args34, ctx) => {
58326
+ const [result] = await plansGetPlan(client, args34.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58167
58327
  if (!result.ok) {
58168
58328
  return {
58169
58329
  content: [{ type: "text", text: result.error.message }],
@@ -58207,9 +58367,9 @@ var init_postplansidcloneop = __esm(() => {
58207
58367
 
58208
58368
  // src/funcs/plansPostPlansIdClone.ts
58209
58369
  function plansPostPlansIdClone(client$, request, options) {
58210
- return new APIPromise($do34(client$, request, options));
58370
+ return new APIPromise($do35(client$, request, options));
58211
58371
  }
58212
- async function $do34(client$, request, options) {
58372
+ async function $do35(client$, request, options) {
58213
58373
  const parsed$ = safeParse4(request, (value$) => PostPlansIdCloneRequest$zodSchema.parse(value$), "Input validation failed");
58214
58374
  if (!parsed$.ok) {
58215
58375
  return [parsed$, { status: "invalid" }];
@@ -58285,12 +58445,12 @@ var init_plansPostPlansIdClone = __esm(() => {
58285
58445
  });
58286
58446
 
58287
58447
  // src/mcp-server/tools/plansPostPlansIdClone.ts
58288
- var args33, tool$plansPostPlansIdClone;
58448
+ var args34, tool$plansPostPlansIdClone;
58289
58449
  var init_plansPostPlansIdClone2 = __esm(() => {
58290
58450
  init_plansPostPlansIdClone();
58291
58451
  init_postplansidcloneop();
58292
58452
  init_tools();
58293
- args33 = {
58453
+ args34 = {
58294
58454
  request: PostPlansIdCloneRequest$zodSchema
58295
58455
  };
58296
58456
  tool$plansPostPlansIdClone = {
@@ -58305,9 +58465,9 @@ Clone an existing plan, copying its active prices, published entitlements, and p
58305
58465
  openWorldHint: false,
58306
58466
  readOnlyHint: false
58307
58467
  },
58308
- args: args33,
58309
- tool: async (client, args34, ctx) => {
58310
- const [result] = await plansPostPlansIdClone(client, args34.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58468
+ args: args34,
58469
+ tool: async (client, args35, ctx) => {
58470
+ const [result] = await plansPostPlansIdClone(client, args35.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58311
58471
  if (!result.ok) {
58312
58472
  return {
58313
58473
  content: [{ type: "text", text: result.error.message }],
@@ -58347,9 +58507,9 @@ var init_planfilter = __esm(() => {
58347
58507
 
58348
58508
  // src/funcs/plansQueryPlan.ts
58349
58509
  function plansQueryPlan(client$, request, options) {
58350
- return new APIPromise($do35(client$, request, options));
58510
+ return new APIPromise($do36(client$, request, options));
58351
58511
  }
58352
- async function $do35(client$, request, options) {
58512
+ async function $do36(client$, request, options) {
58353
58513
  const parsed$ = safeParse4(request, (value$) => PlanFilter$zodSchema.parse(value$), "Input validation failed");
58354
58514
  if (!parsed$.ok) {
58355
58515
  return [parsed$, { status: "invalid" }];
@@ -58419,12 +58579,12 @@ var init_plansQueryPlan = __esm(() => {
58419
58579
  });
58420
58580
 
58421
58581
  // src/mcp-server/tools/plansQueryPlan.ts
58422
- var args34, tool$plansQueryPlan;
58582
+ var args35, tool$plansQueryPlan;
58423
58583
  var init_plansQueryPlan2 = __esm(() => {
58424
58584
  init_plansQueryPlan();
58425
58585
  init_planfilter();
58426
58586
  init_tools();
58427
- args34 = {
58587
+ args35 = {
58428
58588
  request: PlanFilter$zodSchema
58429
58589
  };
58430
58590
  tool$plansQueryPlan = {
@@ -58439,9 +58599,9 @@ Use when listing or searching plans (e.g. plan picker or admin catalog). Returns
58439
58599
  openWorldHint: false,
58440
58600
  readOnlyHint: false
58441
58601
  },
58442
- args: args34,
58443
- tool: async (client, args35, ctx) => {
58444
- const [result] = await plansQueryPlan(client, args35.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58602
+ args: args35,
58603
+ tool: async (client, args36, ctx) => {
58604
+ const [result] = await plansQueryPlan(client, args36.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58445
58605
  if (!result.ok) {
58446
58606
  return {
58447
58607
  content: [{ type: "text", text: result.error.message }],
@@ -58481,9 +58641,9 @@ var init_syncplanpricesop = __esm(() => {
58481
58641
 
58482
58642
  // src/funcs/plansSyncPlanPrices.ts
58483
58643
  function plansSyncPlanPrices(client$, request, options) {
58484
- return new APIPromise($do36(client$, request, options));
58644
+ return new APIPromise($do37(client$, request, options));
58485
58645
  }
58486
- async function $do36(client$, request, options) {
58646
+ async function $do37(client$, request, options) {
58487
58647
  const parsed$ = safeParse4(request, (value$) => SyncPlanPricesRequest$zodSchema.parse(value$), "Input validation failed");
58488
58648
  if (!parsed$.ok) {
58489
58649
  return [parsed$, { status: "invalid" }];
@@ -58558,12 +58718,12 @@ var init_plansSyncPlanPrices = __esm(() => {
58558
58718
  });
58559
58719
 
58560
58720
  // src/mcp-server/tools/plansSyncPlanPrices.ts
58561
- var args35, tool$plansSyncPlanPrices;
58721
+ var args36, tool$plansSyncPlanPrices;
58562
58722
  var init_plansSyncPlanPrices2 = __esm(() => {
58563
58723
  init_plansSyncPlanPrices();
58564
58724
  init_syncplanpricesop();
58565
58725
  init_tools();
58566
- args35 = {
58726
+ args36 = {
58567
58727
  request: SyncPlanPricesRequest$zodSchema
58568
58728
  };
58569
58729
  tool$plansSyncPlanPrices = {
@@ -58578,9 +58738,9 @@ Use when you have changed plan prices and need to push them to all active subscr
58578
58738
  openWorldHint: false,
58579
58739
  readOnlyHint: false
58580
58740
  },
58581
- args: args35,
58582
- tool: async (client, args36, ctx) => {
58583
- const [result] = await plansSyncPlanPrices(client, args36.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58741
+ args: args36,
58742
+ tool: async (client, args37, ctx) => {
58743
+ const [result] = await plansSyncPlanPrices(client, args37.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58584
58744
  if (!result.ok) {
58585
58745
  return {
58586
58746
  content: [{ type: "text", text: result.error.message }],
@@ -58624,9 +58784,9 @@ var init_updateplanop = __esm(() => {
58624
58784
 
58625
58785
  // src/funcs/plansUpdatePlan.ts
58626
58786
  function plansUpdatePlan(client$, request, options) {
58627
- return new APIPromise($do37(client$, request, options));
58787
+ return new APIPromise($do38(client$, request, options));
58628
58788
  }
58629
- async function $do37(client$, request, options) {
58789
+ async function $do38(client$, request, options) {
58630
58790
  const parsed$ = safeParse4(request, (value$) => UpdatePlanRequest$zodSchema.parse(value$), "Input validation failed");
58631
58791
  if (!parsed$.ok) {
58632
58792
  return [parsed$, { status: "invalid" }];
@@ -58702,12 +58862,12 @@ var init_plansUpdatePlan = __esm(() => {
58702
58862
  });
58703
58863
 
58704
58864
  // src/mcp-server/tools/plansUpdatePlan.ts
58705
- var args36, tool$plansUpdatePlan;
58865
+ var args37, tool$plansUpdatePlan;
58706
58866
  var init_plansUpdatePlan2 = __esm(() => {
58707
58867
  init_plansUpdatePlan();
58708
58868
  init_updateplanop();
58709
58869
  init_tools();
58710
- args36 = {
58870
+ args37 = {
58711
58871
  request: UpdatePlanRequest$zodSchema
58712
58872
  };
58713
58873
  tool$plansUpdatePlan = {
@@ -58722,9 +58882,9 @@ Use when changing plan details (e.g. name, interval, or metadata). Partial updat
58722
58882
  openWorldHint: false,
58723
58883
  readOnlyHint: false
58724
58884
  },
58725
- args: args36,
58726
- tool: async (client, args37, ctx) => {
58727
- const [result] = await plansUpdatePlan(client, args37.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58885
+ args: args37,
58886
+ tool: async (client, args38, ctx) => {
58887
+ const [result] = await plansUpdatePlan(client, args38.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58728
58888
  if (!result.ok) {
58729
58889
  return {
58730
58890
  content: [{ type: "text", text: result.error.message }],
@@ -58817,9 +58977,9 @@ var init_dtocreatepricerequest = __esm(() => {
58817
58977
 
58818
58978
  // src/funcs/pricesCreatePrice.ts
58819
58979
  function pricesCreatePrice(client$, request, options) {
58820
- return new APIPromise($do38(client$, request, options));
58980
+ return new APIPromise($do39(client$, request, options));
58821
58981
  }
58822
- async function $do38(client$, request, options) {
58982
+ async function $do39(client$, request, options) {
58823
58983
  const parsed$ = safeParse4(request, (value$) => DtoCreatePriceRequest$zodSchema.parse(value$), "Input validation failed");
58824
58984
  if (!parsed$.ok) {
58825
58985
  return [parsed$, { status: "invalid" }];
@@ -58889,12 +59049,12 @@ var init_pricesCreatePrice = __esm(() => {
58889
59049
  });
58890
59050
 
58891
59051
  // src/mcp-server/tools/pricesCreatePrice.ts
58892
- var args37, tool$pricesCreatePrice;
59052
+ var args38, tool$pricesCreatePrice;
58893
59053
  var init_pricesCreatePrice2 = __esm(() => {
58894
59054
  init_pricesCreatePrice();
58895
59055
  init_dtocreatepricerequest();
58896
59056
  init_tools();
58897
- args37 = {
59057
+ args38 = {
58898
59058
  request: DtoCreatePriceRequest$zodSchema
58899
59059
  };
58900
59060
  tool$pricesCreatePrice = {
@@ -58909,9 +59069,9 @@ Use when adding a new price to a plan or catalog (e.g. per-seat, flat, or metere
58909
59069
  openWorldHint: false,
58910
59070
  readOnlyHint: false
58911
59071
  },
58912
- args: args37,
58913
- tool: async (client, args38, ctx) => {
58914
- const [result] = await pricesCreatePrice(client, args38.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59072
+ args: args38,
59073
+ tool: async (client, args39, ctx) => {
59074
+ const [result] = await pricesCreatePrice(client, args39.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58915
59075
  if (!result.ok) {
58916
59076
  return {
58917
59077
  content: [{ type: "text", text: result.error.message }],
@@ -58935,9 +59095,9 @@ var init_dtocreatebulkpricerequest = __esm(() => {
58935
59095
 
58936
59096
  // src/funcs/pricesCreatePricesBulk.ts
58937
59097
  function pricesCreatePricesBulk(client$, request, options) {
58938
- return new APIPromise($do39(client$, request, options));
59098
+ return new APIPromise($do40(client$, request, options));
58939
59099
  }
58940
- async function $do39(client$, request, options) {
59100
+ async function $do40(client$, request, options) {
58941
59101
  const parsed$ = safeParse4(request, (value$) => DtoCreateBulkPriceRequest$zodSchema.parse(value$), "Input validation failed");
58942
59102
  if (!parsed$.ok) {
58943
59103
  return [parsed$, { status: "invalid" }];
@@ -59007,12 +59167,12 @@ var init_pricesCreatePricesBulk = __esm(() => {
59007
59167
  });
59008
59168
 
59009
59169
  // src/mcp-server/tools/pricesCreatePricesBulk.ts
59010
- var args38, tool$pricesCreatePricesBulk;
59170
+ var args39, tool$pricesCreatePricesBulk;
59011
59171
  var init_pricesCreatePricesBulk2 = __esm(() => {
59012
59172
  init_pricesCreatePricesBulk();
59013
59173
  init_dtocreatebulkpricerequest();
59014
59174
  init_tools();
59015
- args38 = {
59175
+ args39 = {
59016
59176
  request: DtoCreateBulkPriceRequest$zodSchema
59017
59177
  };
59018
59178
  tool$pricesCreatePricesBulk = {
@@ -59027,9 +59187,9 @@ Use when creating many prices at once (e.g. importing a catalog or setting up a
59027
59187
  openWorldHint: false,
59028
59188
  readOnlyHint: false
59029
59189
  },
59030
- args: args38,
59031
- tool: async (client, args39, ctx) => {
59032
- const [result] = await pricesCreatePricesBulk(client, args39.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59190
+ args: args39,
59191
+ tool: async (client, args40, ctx) => {
59192
+ const [result] = await pricesCreatePricesBulk(client, args40.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59033
59193
  if (!result.ok) {
59034
59194
  return {
59035
59195
  content: [{ type: "text", text: result.error.message }],
@@ -59069,9 +59229,9 @@ var init_deletepriceop = __esm(() => {
59069
59229
 
59070
59230
  // src/funcs/pricesDeletePrice.ts
59071
59231
  function pricesDeletePrice(client$, request, options) {
59072
- return new APIPromise($do40(client$, request, options));
59232
+ return new APIPromise($do41(client$, request, options));
59073
59233
  }
59074
- async function $do40(client$, request, options) {
59234
+ async function $do41(client$, request, options) {
59075
59235
  const parsed$ = safeParse4(request, (value$) => DeletePriceRequest$zodSchema.parse(value$), "Input validation failed");
59076
59236
  if (!parsed$.ok) {
59077
59237
  return [parsed$, { status: "invalid" }];
@@ -59147,12 +59307,12 @@ var init_pricesDeletePrice = __esm(() => {
59147
59307
  });
59148
59308
 
59149
59309
  // src/mcp-server/tools/pricesDeletePrice.ts
59150
- var args39, tool$pricesDeletePrice;
59310
+ var args40, tool$pricesDeletePrice;
59151
59311
  var init_pricesDeletePrice2 = __esm(() => {
59152
59312
  init_pricesDeletePrice();
59153
59313
  init_deletepriceop();
59154
59314
  init_tools();
59155
- args39 = {
59315
+ args40 = {
59156
59316
  request: DeletePriceRequest$zodSchema
59157
59317
  };
59158
59318
  tool$pricesDeletePrice = {
@@ -59167,9 +59327,9 @@ Use when retiring a price (e.g. end-of-life or replacement). Optional effective
59167
59327
  openWorldHint: false,
59168
59328
  readOnlyHint: false
59169
59329
  },
59170
- args: args39,
59171
- tool: async (client, args40, ctx) => {
59172
- const [result] = await pricesDeletePrice(client, args40.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59330
+ args: args40,
59331
+ tool: async (client, args41, ctx) => {
59332
+ const [result] = await pricesDeletePrice(client, args41.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59173
59333
  if (!result.ok) {
59174
59334
  return {
59175
59335
  content: [{ type: "text", text: result.error.message }],
@@ -59198,9 +59358,9 @@ var init_getpriceop = __esm(() => {
59198
59358
 
59199
59359
  // src/funcs/pricesGetPrice.ts
59200
59360
  function pricesGetPrice(client$, request, options) {
59201
- return new APIPromise($do41(client$, request, options));
59361
+ return new APIPromise($do42(client$, request, options));
59202
59362
  }
59203
- async function $do41(client$, request, options) {
59363
+ async function $do42(client$, request, options) {
59204
59364
  const parsed$ = safeParse4(request, (value$) => GetPriceRequest$zodSchema.parse(value$), "Input validation failed");
59205
59365
  if (!parsed$.ok) {
59206
59366
  return [parsed$, { status: "invalid" }];
@@ -59275,12 +59435,12 @@ var init_pricesGetPrice = __esm(() => {
59275
59435
  });
59276
59436
 
59277
59437
  // src/mcp-server/tools/pricesGetPrice.ts
59278
- var args40, tool$pricesGetPrice;
59438
+ var args41, tool$pricesGetPrice;
59279
59439
  var init_pricesGetPrice2 = __esm(() => {
59280
59440
  init_pricesGetPrice();
59281
59441
  init_getpriceop();
59282
59442
  init_tools();
59283
- args40 = {
59443
+ args41 = {
59284
59444
  request: GetPriceRequest$zodSchema
59285
59445
  };
59286
59446
  tool$pricesGetPrice = {
@@ -59295,9 +59455,9 @@ Use when you need to load a single price (e.g. for display or editing). Response
59295
59455
  openWorldHint: false,
59296
59456
  readOnlyHint: false
59297
59457
  },
59298
- args: args40,
59299
- tool: async (client, args41, ctx) => {
59300
- const [result] = await pricesGetPrice(client, args41.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59458
+ args: args41,
59459
+ tool: async (client, args42, ctx) => {
59460
+ const [result] = await pricesGetPrice(client, args42.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59301
59461
  if (!result.ok) {
59302
59462
  return {
59303
59463
  content: [{ type: "text", text: result.error.message }],
@@ -59326,9 +59486,9 @@ var init_getpricebylookupkeyop = __esm(() => {
59326
59486
 
59327
59487
  // src/funcs/pricesGetPriceByLookupKey.ts
59328
59488
  function pricesGetPriceByLookupKey(client$, request, options) {
59329
- return new APIPromise($do42(client$, request, options));
59489
+ return new APIPromise($do43(client$, request, options));
59330
59490
  }
59331
- async function $do42(client$, request, options) {
59491
+ async function $do43(client$, request, options) {
59332
59492
  const parsed$ = safeParse4(request, (value$) => GetPriceByLookupKeyRequest$zodSchema.parse(value$), "Input validation failed");
59333
59493
  if (!parsed$.ok) {
59334
59494
  return [parsed$, { status: "invalid" }];
@@ -59403,12 +59563,12 @@ var init_pricesGetPriceByLookupKey = __esm(() => {
59403
59563
  });
59404
59564
 
59405
59565
  // src/mcp-server/tools/pricesGetPriceByLookupKey.ts
59406
- var args41, tool$pricesGetPriceByLookupKey;
59566
+ var args42, tool$pricesGetPriceByLookupKey;
59407
59567
  var init_pricesGetPriceByLookupKey2 = __esm(() => {
59408
59568
  init_pricesGetPriceByLookupKey();
59409
59569
  init_getpricebylookupkeyop();
59410
59570
  init_tools();
59411
- args41 = {
59571
+ args42 = {
59412
59572
  request: GetPriceByLookupKeyRequest$zodSchema
59413
59573
  };
59414
59574
  tool$pricesGetPriceByLookupKey = {
@@ -59423,9 +59583,9 @@ Use when resolving a price by external id (e.g. from your catalog or CMS). Ideal
59423
59583
  openWorldHint: false,
59424
59584
  readOnlyHint: false
59425
59585
  },
59426
- args: args41,
59427
- tool: async (client, args42, ctx) => {
59428
- const [result] = await pricesGetPriceByLookupKey(client, args42.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59586
+ args: args42,
59587
+ tool: async (client, args43, ctx) => {
59588
+ const [result] = await pricesGetPriceByLookupKey(client, args43.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59429
59589
  if (!result.ok) {
59430
59590
  return {
59431
59591
  content: [{ type: "text", text: result.error.message }],
@@ -59472,9 +59632,9 @@ var init_pricefilter = __esm(() => {
59472
59632
 
59473
59633
  // src/funcs/pricesQueryPrice.ts
59474
59634
  function pricesQueryPrice(client$, request, options) {
59475
- return new APIPromise($do43(client$, request, options));
59635
+ return new APIPromise($do44(client$, request, options));
59476
59636
  }
59477
- async function $do43(client$, request, options) {
59637
+ async function $do44(client$, request, options) {
59478
59638
  const parsed$ = safeParse4(request, (value$) => PriceFilter$zodSchema.parse(value$), "Input validation failed");
59479
59639
  if (!parsed$.ok) {
59480
59640
  return [parsed$, { status: "invalid" }];
@@ -59544,12 +59704,12 @@ var init_pricesQueryPrice = __esm(() => {
59544
59704
  });
59545
59705
 
59546
59706
  // src/mcp-server/tools/pricesQueryPrice.ts
59547
- var args42, tool$pricesQueryPrice;
59707
+ var args43, tool$pricesQueryPrice;
59548
59708
  var init_pricesQueryPrice2 = __esm(() => {
59549
59709
  init_pricesQueryPrice();
59550
59710
  init_pricefilter();
59551
59711
  init_tools();
59552
- args42 = {
59712
+ args43 = {
59553
59713
  request: PriceFilter$zodSchema
59554
59714
  };
59555
59715
  tool$pricesQueryPrice = {
@@ -59564,9 +59724,9 @@ Use when listing or searching prices (e.g. plan builder or catalog). Returns a p
59564
59724
  openWorldHint: false,
59565
59725
  readOnlyHint: false
59566
59726
  },
59567
- args: args42,
59568
- tool: async (client, args43, ctx) => {
59569
- const [result] = await pricesQueryPrice(client, args43.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59727
+ args: args43,
59728
+ tool: async (client, args44, ctx) => {
59729
+ const [result] = await pricesQueryPrice(client, args44.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59570
59730
  if (!result.ok) {
59571
59731
  return {
59572
59732
  content: [{ type: "text", text: result.error.message }],
@@ -59622,9 +59782,9 @@ var init_updatepriceop = __esm(() => {
59622
59782
 
59623
59783
  // src/funcs/pricesUpdatePrice.ts
59624
59784
  function pricesUpdatePrice(client$, request, options) {
59625
- return new APIPromise($do44(client$, request, options));
59785
+ return new APIPromise($do45(client$, request, options));
59626
59786
  }
59627
- async function $do44(client$, request, options) {
59787
+ async function $do45(client$, request, options) {
59628
59788
  const parsed$ = safeParse4(request, (value$) => UpdatePriceRequest$zodSchema.parse(value$), "Input validation failed");
59629
59789
  if (!parsed$.ok) {
59630
59790
  return [parsed$, { status: "invalid" }];
@@ -59700,12 +59860,12 @@ var init_pricesUpdatePrice = __esm(() => {
59700
59860
  });
59701
59861
 
59702
59862
  // src/mcp-server/tools/pricesUpdatePrice.ts
59703
- var args43, tool$pricesUpdatePrice;
59863
+ var args44, tool$pricesUpdatePrice;
59704
59864
  var init_pricesUpdatePrice2 = __esm(() => {
59705
59865
  init_pricesUpdatePrice();
59706
59866
  init_updatepriceop();
59707
59867
  init_tools();
59708
- args43 = {
59868
+ args44 = {
59709
59869
  request: UpdatePriceRequest$zodSchema
59710
59870
  };
59711
59871
  tool$pricesUpdatePrice = {
@@ -59720,9 +59880,9 @@ Use when changing price configuration (e.g. amount, billing scheme, or metadata)
59720
59880
  openWorldHint: false,
59721
59881
  readOnlyHint: false
59722
59882
  },
59723
- args: args43,
59724
- tool: async (client, args44, ctx) => {
59725
- const [result] = await pricesUpdatePrice(client, args44.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59883
+ args: args44,
59884
+ tool: async (client, args45, ctx) => {
59885
+ const [result] = await pricesUpdatePrice(client, args45.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59726
59886
  if (!result.ok) {
59727
59887
  return {
59728
59888
  content: [{ type: "text", text: result.error.message }],
@@ -59738,16 +59898,16 @@ Use when changing price configuration (e.g. amount, billing scheme, or metadata)
59738
59898
  function createMCPServer(deps) {
59739
59899
  const server = new McpServer({
59740
59900
  name: "Flexprice",
59741
- version: "2.0.0"
59901
+ version: "2.0.2"
59742
59902
  });
59743
59903
  const getClient = deps.getSDK || (() => new FlexpriceCore({
59744
59904
  security: deps.security,
59745
59905
  serverURL: deps.serverURL,
59746
59906
  serverIdx: deps.serverIdx,
59747
59907
  debugLogger: deps.logger.level === "debug" ? {
59748
- log: (...args44) => console.log(...args44),
59749
- group: (...args44) => console.group(...args44),
59750
- groupEnd: (...args44) => console.groupEnd(...args44)
59908
+ log: (...args45) => console.log(...args45),
59909
+ group: (...args45) => console.group(...args45),
59910
+ groupEnd: (...args45) => console.groupEnd(...args45)
59751
59911
  } : undefined
59752
59912
  }));
59753
59913
  const scopes = new Set(deps.scopes);
@@ -59778,6 +59938,7 @@ function createMCPServer(deps) {
59778
59938
  tool(tool$invoicesAttemptInvoicePayment);
59779
59939
  tool(tool$invoicesGetInvoicePdf);
59780
59940
  tool(tool$invoicesRecalculateInvoice);
59941
+ tool(tool$invoicesRecalculateInvoiceV2);
59781
59942
  tool(tool$invoicesVoidInvoice);
59782
59943
  tool(tool$eventsIngestEvent);
59783
59944
  tool(tool$eventsGetUsageAnalytics);
@@ -59837,6 +59998,7 @@ var init_server2 = __esm(() => {
59837
59998
  init_invoicesGetInvoicePreview2();
59838
59999
  init_invoicesQueryInvoice2();
59839
60000
  init_invoicesRecalculateInvoice2();
60001
+ init_invoicesRecalculateInvoiceV22();
59840
60002
  init_invoicesTriggerInvoiceCommsWebhook2();
59841
60003
  init_invoicesUpdateInvoice2();
59842
60004
  init_invoicesUpdateInvoicePaymentStatus2();
@@ -59983,9 +60145,15 @@ Use when delivering an invoice PDF to the customer (e.g. email attachment or dow
59983
60145
  },
59984
60146
  {
59985
60147
  name: "recalculate-invoice",
59986
- description: `Recalculate invoice
60148
+ description: `Recalculate invoice (default: voided invoice)
59987
60149
 
59988
- Use when subscription or usage data changed and you need to refresh a draft invoice before finalizing. Optional finalize=true to lock after recalc.`
60150
+ Creates a fresh replacement invoice for a voided SUBSCRIPTION invoice covering the same billing period. The original voided invoice is linked to the new invoice via recalculated_invoice_id. Can only be called once per voided invoice.`
60151
+ },
60152
+ {
60153
+ name: "recalculate-invoice-v2",
60154
+ description: `Recalculate draft invoice (v2)
60155
+
60156
+ Recalculates a draft SUBSCRIPTION invoice in-place (replaces line items, reapplies credits/coupons/taxes). Use when subscription or usage data changed before finalizing.`
59989
60157
  },
59990
60158
  {
59991
60159
  name: "void-invoice",
@@ -60142,18 +60310,18 @@ function landingPageHTML(origin) {
60142
60310
  "mcp-remote@0.1.25",
60143
60311
  `${o}/sse`,
60144
60312
  "--header",
60145
- "server-url:${SERVER_URL}",
60313
+ "server-index:${SERVER_INDEX}",
60146
60314
  "--header",
60147
60315
  "api-key-auth:${API_KEY_AUTH}"
60148
60316
  ],
60149
60317
  env: {
60150
- SERVER_URL: "YOUR_VALUE_HERE",
60318
+ SERVER_INDEX: "YOUR_VALUE_HERE",
60151
60319
  API_KEY_AUTH: "YOUR_VALUE_HERE"
60152
60320
  }
60153
60321
  };
60154
60322
  const codexConfig = `[mcp_servers.Flexprice]
60155
60323
  url = "${o}/sse"
60156
- http_headers = { "server-url" = "YOUR_SERVER_URL", "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
60324
+ http_headers = { "server-index" = "YOUR_SERVER_INDEX", "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
60157
60325
  return `
60158
60326
  <!DOCTYPE html>
60159
60327
  <html lang="en">
@@ -60790,7 +60958,7 @@ http_headers = { "server-url" = "YOUR_SERVER_URL", "api-key-auth" = "YOUR_API_KE
60790
60958
  </svg>
60791
60959
  </button>
60792
60960
  <div class="popover-menu hidden" id="popover-menu">
60793
- <a class="popover-button install-link" href="cursor://anysphere.cursor-deeplink/mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLXVybCIsIiIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
60961
+ <a class="popover-button install-link" href="cursor://anysphere.cursor-deeplink/mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLWluZGV4IiwiMCIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
60794
60962
  Cursor
60795
60963
  </a>
60796
60964
  <button class="popover-button" onclick="showModal('claude-code')">
@@ -60799,7 +60967,7 @@ http_headers = { "server-url" = "YOUR_SERVER_URL", "api-key-auth" = "YOUR_API_KE
60799
60967
  <button class="popover-button" onclick="showModal('claude-desktop')">
60800
60968
  Claude Desktop
60801
60969
  </button>
60802
- <a class="popover-button install-link" href="vscode://ms-vscode.vscode-mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLXVybCIsIiIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
60970
+ <a class="popover-button install-link" href="vscode://ms-vscode.vscode-mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLWluZGV4IiwiMCIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
60803
60971
  VS Code
60804
60972
  </a>
60805
60973
  <button class="popover-button" onclick="showModal('gemini')">
@@ -60822,7 +60990,7 @@ http_headers = { "server-url" = "YOUR_SERVER_URL", "api-key-auth" = "YOUR_API_KE
60822
60990
  </div>
60823
60991
  </header>
60824
60992
  <div class="install-targets">
60825
- <a tabindex="0" class="card install-target install-link" href="cursor://anysphere.cursor-deeplink/mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLXVybCIsIiIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
60993
+ <a tabindex="0" class="card install-target install-link" href="cursor://anysphere.cursor-deeplink/mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLWluZGV4IiwiMCIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
60826
60994
  <div class="target">
60827
60995
  <img src="https://cursor.com/assets/images/logo.svg" alt="Cursor">
60828
60996
  <span>Cursor</span>
@@ -60844,7 +61012,7 @@ http_headers = { "server-url" = "YOUR_SERVER_URL", "api-key-auth" = "YOUR_API_KE
60844
61012
  <span>Claude Desktop</span>
60845
61013
  </div>
60846
61014
  </div>
60847
- <a tabindex="0" class="card install-target install-link" href="vscode://ms-vscode.vscode-mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLXVybCIsIiIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
61015
+ <a tabindex="0" class="card install-target install-link" href="vscode://ms-vscode.vscode-mcp/install?name=Flexprice&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAZmxleHByaWNlL21jcC1zZXJ2ZXIiLCJzdGFydCIsIi0tc2VydmVyLWluZGV4IiwiMCIsIi0tYXBpLWtleS1hdXRoIiwiIl19">
60848
61016
  <div class="target">
60849
61017
  <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
60850
61018
  <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
@@ -61015,7 +61183,7 @@ http_headers = { "server-url" = "YOUR_SERVER_URL", "api-key-auth" = "YOUR_API_KE
61015
61183
  <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>
61016
61184
  </svg>
61017
61185
  </button>
61018
- <code class="code-snippet language-json" id="claude-cli-cmd">claude mcp add Flexprice -- npx -y @flexprice/mcp-server start --server-url --api-key-auth </code>
61186
+ <code class="code-snippet language-json" id="claude-cli-cmd">claude mcp add Flexprice -- npx -y @flexprice/mcp-server start --server-index 0 --api-key-auth </code>
61019
61187
  </div>
61020
61188
  </div>
61021
61189
  </div>
@@ -61066,7 +61234,7 @@ http_headers = { "server-url" = "YOUR_SERVER_URL", "api-key-auth" = "YOUR_API_KE
61066
61234
  <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>
61067
61235
  </svg>
61068
61236
  </button>
61069
- <code class="code-snippet language-json" id="gemini-config">gemini mcp add Flexprice -- npx -y @flexprice/mcp-server start --server-url --api-key-auth </code>
61237
+ <code class="code-snippet language-json" id="gemini-config">gemini mcp add Flexprice -- npx -y @flexprice/mcp-server start --server-index 0 --api-key-auth </code>
61070
61238
  </div>
61071
61239
  </div>
61072
61240
  </div>
@@ -63484,7 +63652,7 @@ var serveCommand = buildCommand({
63484
63652
  "server-url": {
63485
63653
  kind: "parsed",
63486
63654
  brief: "Overrides the default server URL used by the SDK",
63487
- optional: false,
63655
+ optional: true,
63488
63656
  parse: (value) => new URL(value).toString()
63489
63657
  },
63490
63658
  "server-index": {
@@ -63576,7 +63744,7 @@ var startCommand = buildCommand({
63576
63744
  "server-url": {
63577
63745
  kind: "parsed",
63578
63746
  brief: "Overrides the default server URL used by the SDK",
63579
- optional: false,
63747
+ optional: true,
63580
63748
  parse: (value) => new URL(value).toString()
63581
63749
  },
63582
63750
  "server-index": {
@@ -63633,7 +63801,7 @@ var routes = buildRouteMap({
63633
63801
  var app = buildApplication(routes, {
63634
63802
  name: "mcp",
63635
63803
  versionInfo: {
63636
- currentVersion: "2.0.0"
63804
+ currentVersion: "2.0.2"
63637
63805
  }
63638
63806
  });
63639
63807
  run(app, process4.argv.slice(2), buildContext(process4));
@@ -63641,5 +63809,5 @@ export {
63641
63809
  app
63642
63810
  };
63643
63811
 
63644
- //# debugId=CE3907FA87151A9064756E2164756E21
63812
+ //# debugId=E81E49EB1E0AC8CC64756E2164756E21
63645
63813
  //# sourceMappingURL=mcp-server.js.map