@flexprice/mcp-server 2.1.2 → 2.1.3
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.
- package/bin/mcp-server.js +518 -153
- package/bin/mcp-server.js.map +39 -17
- package/bun.lock +14 -14
- package/esm/funcs/{plansPostPlansIdClone.d.ts → plansClonePlan.d.ts} +3 -3
- package/esm/funcs/plansClonePlan.d.ts.map +1 -0
- package/esm/funcs/{plansPostPlansIdClone.js → plansClonePlan.js} +5 -5
- package/esm/funcs/plansClonePlan.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +3 -3
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/plansClonePlan.d.ts +7 -0
- package/esm/mcp-server/tools/plansClonePlan.d.ts.map +1 -0
- package/esm/mcp-server/tools/{plansPostPlansIdClone.js → plansClonePlan.js} +7 -7
- package/esm/mcp-server/tools/plansClonePlan.js.map +1 -0
- package/esm/models/address.d.ts +11 -0
- package/esm/models/address.d.ts.map +1 -0
- package/esm/models/address.js +13 -0
- package/esm/models/address.js.map +1 -0
- package/esm/models/alertstate.d.ts +16 -0
- package/esm/models/alertstate.d.ts.map +1 -0
- package/esm/models/alertstate.js +17 -0
- package/esm/models/alertstate.js.map +1 -0
- package/esm/models/autotopup.d.ts +9 -0
- package/esm/models/autotopup.d.ts.map +1 -0
- package/esm/models/autotopup.js +11 -0
- package/esm/models/autotopup.js.map +1 -0
- package/esm/models/changedinvoice.d.ts +8 -2
- package/esm/models/changedinvoice.d.ts.map +1 -1
- package/esm/models/changedinvoice.js +8 -2
- package/esm/models/changedinvoice.js.map +1 -1
- package/esm/models/changedinvoiceaction.d.ts +18 -0
- package/esm/models/changedinvoiceaction.d.ts.map +1 -0
- package/esm/models/changedinvoiceaction.js +16 -0
- package/esm/models/changedinvoiceaction.js.map +1 -0
- package/esm/models/changedinvoicestatus.d.ts +18 -0
- package/esm/models/changedinvoicestatus.d.ts.map +1 -0
- package/esm/models/changedinvoicestatus.js +16 -0
- package/esm/models/changedinvoicestatus.js.map +1 -0
- package/esm/models/changedlineitem.d.ts +2 -1
- package/esm/models/changedlineitem.d.ts.map +1 -1
- package/esm/models/changedlineitem.js +2 -1
- package/esm/models/changedlineitem.js.map +1 -1
- package/esm/models/changedlineitemaction.d.ts +20 -0
- package/esm/models/changedlineitemaction.d.ts.map +1 -0
- package/esm/models/changedlineitemaction.js +18 -0
- package/esm/models/changedlineitemaction.js.map +1 -0
- package/esm/models/changedsubscription.d.ts +2 -1
- package/esm/models/changedsubscription.d.ts.map +1 -1
- package/esm/models/changedsubscription.js +2 -1
- package/esm/models/changedsubscription.js.map +1 -1
- package/esm/models/changedsubscriptionaction.d.ts +18 -0
- package/esm/models/changedsubscriptionaction.d.ts.map +1 -0
- package/esm/models/changedsubscriptionaction.js +16 -0
- package/esm/models/changedsubscriptionaction.js.map +1 -0
- package/esm/models/cloneplanop.d.ts +12 -0
- package/esm/models/cloneplanop.d.ts.map +1 -0
- package/esm/models/{postplansidcloneop.js → cloneplanop.js} +4 -3
- package/esm/models/cloneplanop.js.map +1 -0
- package/esm/models/createsubscriptionrequest.d.ts +1 -0
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +1 -0
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/creditbreakdown.d.ts +7 -0
- package/esm/models/creditbreakdown.d.ts.map +1 -0
- package/esm/models/creditbreakdown.js +9 -0
- package/esm/models/creditbreakdown.js.map +1 -0
- package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
- package/esm/models/tenantbillingdetails.d.ts +10 -0
- package/esm/models/tenantbillingdetails.d.ts.map +1 -0
- package/esm/models/tenantbillingdetails.js +13 -0
- package/esm/models/tenantbillingdetails.js.map +1 -0
- package/esm/models/tenantresponse.d.ts +15 -0
- package/esm/models/tenantresponse.d.ts.map +1 -0
- package/esm/models/tenantresponse.js +15 -0
- package/esm/models/tenantresponse.js.map +1 -0
- package/esm/models/transactionreason.d.ts +30 -0
- package/esm/models/transactionreason.d.ts.map +1 -0
- package/esm/models/transactionreason.js +31 -0
- package/esm/models/transactionreason.js.map +1 -0
- package/esm/models/transactionstatus.d.ts +14 -0
- package/esm/models/transactionstatus.d.ts.map +1 -0
- package/esm/models/transactionstatus.js +15 -0
- package/esm/models/transactionstatus.js.map +1 -0
- package/esm/models/transactiontype.d.ts +12 -0
- package/esm/models/transactiontype.d.ts.map +1 -0
- package/esm/models/transactiontype.js +13 -0
- package/esm/models/transactiontype.js.map +1 -0
- package/esm/models/userresponse.d.ts +12 -0
- package/esm/models/userresponse.d.ts.map +1 -0
- package/esm/models/userresponse.js +14 -0
- package/esm/models/userresponse.js.map +1 -0
- package/esm/models/usertype.d.ts +12 -0
- package/esm/models/usertype.d.ts.map +1 -0
- package/esm/models/usertype.js +13 -0
- package/esm/models/usertype.js.map +1 -0
- package/esm/models/walletconfig.d.ts +7 -0
- package/esm/models/walletconfig.d.ts.map +1 -0
- package/esm/models/walletconfig.js +10 -0
- package/esm/models/walletconfig.js.map +1 -0
- package/esm/models/walletconfigpricetype.d.ts +14 -0
- package/esm/models/walletconfigpricetype.d.ts.map +1 -0
- package/esm/models/walletconfigpricetype.js +15 -0
- package/esm/models/walletconfigpricetype.js.map +1 -0
- package/esm/models/walletresponse.d.ts +39 -0
- package/esm/models/walletresponse.d.ts.map +1 -0
- package/esm/models/walletresponse.js +39 -0
- package/esm/models/walletresponse.js.map +1 -0
- package/esm/models/walletstatus.d.ts +14 -0
- package/esm/models/walletstatus.d.ts.map +1 -0
- package/esm/models/walletstatus.js +15 -0
- package/esm/models/walletstatus.js.map +1 -0
- package/esm/models/wallettransactionresponse.d.ts +46 -0
- package/esm/models/wallettransactionresponse.d.ts.map +1 -0
- package/esm/models/wallettransactionresponse.js +46 -0
- package/esm/models/wallettransactionresponse.js.map +1 -0
- package/esm/models/wallettxreferencetype.d.ts +16 -0
- package/esm/models/wallettxreferencetype.d.ts.map +1 -0
- package/esm/models/wallettxreferencetype.js +17 -0
- package/esm/models/wallettxreferencetype.js.map +1 -0
- package/esm/models/wallettype.d.ts +12 -0
- package/esm/models/wallettype.d.ts.map +1 -0
- package/esm/models/wallettype.js +13 -0
- package/esm/models/wallettype.js.map +1 -0
- package/esm/models/windowsize.d.ts +2 -2
- package/esm/models/windowsize.js +2 -2
- package/esm/models/windowsize.js.map +1 -1
- package/esm/tool-names.js +1 -1
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/src/funcs/{plansPostPlansIdClone.ts → plansClonePlan.ts} +9 -9
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -3
- package/src/mcp-server/tools/{plansPostPlansIdClone.ts → plansClonePlan.ts} +6 -6
- package/src/models/address.ts +23 -0
- package/src/models/alertstate.ts +21 -0
- package/src/models/autotopup.ts +19 -0
- package/src/models/changedinvoice.ts +28 -4
- package/src/models/changedinvoiceaction.ts +23 -0
- package/src/models/changedinvoicestatus.ts +25 -0
- package/src/models/changedlineitem.ts +7 -3
- package/src/models/changedlineitemaction.ts +25 -0
- package/src/models/changedsubscription.ts +8 -2
- package/src/models/changedsubscriptionaction.ts +25 -0
- package/src/models/{postplansidcloneop.ts → cloneplanop.ts} +9 -10
- package/src/models/createsubscriptionrequest.ts +4 -0
- package/src/models/creditbreakdown.ts +15 -0
- package/src/models/tenantbillingdetails.ts +21 -0
- package/src/models/tenantresponse.ts +29 -0
- package/src/models/transactionreason.ts +35 -0
- package/src/models/transactionstatus.ts +19 -0
- package/src/models/transactiontype.ts +17 -0
- package/src/models/userresponse.ts +23 -0
- package/src/models/usertype.ts +17 -0
- package/src/models/walletconfig.ts +20 -0
- package/src/models/walletconfigpricetype.ts +19 -0
- package/src/models/walletresponse.ts +74 -0
- package/src/models/walletstatus.ts +19 -0
- package/src/models/wallettransactionresponse.ts +104 -0
- package/src/models/wallettxreferencetype.ts +21 -0
- package/src/models/wallettype.ts +17 -0
- package/src/models/windowsize.ts +2 -2
- package/src/tool-names.ts +1 -1
- package/esm/funcs/plansPostPlansIdClone.d.ts.map +0 -1
- package/esm/funcs/plansPostPlansIdClone.js.map +0 -1
- package/esm/mcp-server/tools/plansPostPlansIdClone.d.ts +0 -7
- package/esm/mcp-server/tools/plansPostPlansIdClone.d.ts.map +0 -1
- package/esm/mcp-server/tools/plansPostPlansIdClone.js.map +0 -1
- package/esm/models/postplansidcloneop.d.ts +0 -12
- package/esm/models/postplansidcloneop.d.ts.map +0 -1
- package/esm/models/postplansidcloneop.js.map +0 -1
package/bin/mcp-server.js
CHANGED
|
@@ -5911,6 +5911,17 @@ var init_dist = __esm(() => {
|
|
|
5911
5911
|
}
|
|
5912
5912
|
});
|
|
5913
5913
|
});
|
|
5914
|
+
Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
5915
|
+
value: function(depth, options, inspectFn) {
|
|
5916
|
+
const props = {
|
|
5917
|
+
method: this.method,
|
|
5918
|
+
url: this.url,
|
|
5919
|
+
headers: this.headers,
|
|
5920
|
+
nativeRequest: this[requestCache]
|
|
5921
|
+
};
|
|
5922
|
+
return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
5923
|
+
}
|
|
5924
|
+
});
|
|
5914
5925
|
Object.setPrototypeOf(requestPrototype, Request2.prototype);
|
|
5915
5926
|
responseCache = Symbol("responseCache");
|
|
5916
5927
|
getResponseCache = Symbol("getResponseCache");
|
|
@@ -5975,6 +5986,17 @@ var init_dist = __esm(() => {
|
|
|
5975
5986
|
}
|
|
5976
5987
|
});
|
|
5977
5988
|
});
|
|
5989
|
+
Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
5990
|
+
value: function(depth, options, inspectFn) {
|
|
5991
|
+
const props = {
|
|
5992
|
+
status: this.status,
|
|
5993
|
+
headers: this.headers,
|
|
5994
|
+
ok: this.ok,
|
|
5995
|
+
nativeResponse: this[responseCache]
|
|
5996
|
+
};
|
|
5997
|
+
return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
5998
|
+
}
|
|
5999
|
+
});
|
|
5978
6000
|
Object.setPrototypeOf(Response2, GlobalResponse);
|
|
5979
6001
|
Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
|
|
5980
6002
|
if (typeof global.crypto === "undefined") {
|
|
@@ -50549,9 +50571,9 @@ var init_config = __esm(() => {
|
|
|
50549
50571
|
SDK_METADATA = {
|
|
50550
50572
|
language: "typescript",
|
|
50551
50573
|
openapiDocVersion: "1.0",
|
|
50552
|
-
sdkVersion: "2.1.
|
|
50553
|
-
genVersion: "2.879.
|
|
50554
|
-
userAgent: "speakeasy-sdk/mcp-typescript 2.1.
|
|
50574
|
+
sdkVersion: "2.1.3",
|
|
50575
|
+
genVersion: "2.879.13",
|
|
50576
|
+
userAgent: "speakeasy-sdk/mcp-typescript 2.1.3 2.879.13 1.0 @flexprice/mcp-server"
|
|
50555
50577
|
};
|
|
50556
50578
|
});
|
|
50557
50579
|
|
|
@@ -52773,6 +52795,7 @@ var WindowSize$zodSchema;
|
|
|
52773
52795
|
var init_windowsize = __esm(() => {
|
|
52774
52796
|
init_zod();
|
|
52775
52797
|
WindowSize$zodSchema = _enum([
|
|
52798
|
+
"MONTH",
|
|
52776
52799
|
"MINUTE",
|
|
52777
52800
|
"15MIN",
|
|
52778
52801
|
"30MIN",
|
|
@@ -52781,8 +52804,7 @@ var init_windowsize = __esm(() => {
|
|
|
52781
52804
|
"6HOUR",
|
|
52782
52805
|
"12HOUR",
|
|
52783
52806
|
"DAY",
|
|
52784
|
-
"WEEK"
|
|
52785
|
-
"MONTH"
|
|
52807
|
+
"WEEK"
|
|
52786
52808
|
]);
|
|
52787
52809
|
});
|
|
52788
52810
|
|
|
@@ -58418,31 +58440,54 @@ Use when cancelling an invoice (e.g. order cancelled or duplicate). Only unpaid
|
|
|
58418
58440
|
};
|
|
58419
58441
|
});
|
|
58420
58442
|
|
|
58421
|
-
// src/models/
|
|
58422
|
-
var
|
|
58423
|
-
var
|
|
58443
|
+
// src/models/cloneplanrequest.ts
|
|
58444
|
+
var ClonePlanRequest$zodSchema;
|
|
58445
|
+
var init_cloneplanrequest = __esm(() => {
|
|
58424
58446
|
init_zod();
|
|
58425
|
-
|
|
58426
|
-
description: string2().optional(),
|
|
58427
|
-
display_order: int().optional(),
|
|
58428
|
-
lookup_key: string2().optional(),
|
|
58447
|
+
ClonePlanRequest$zodSchema = object({
|
|
58448
|
+
description: string2().optional().describe("Description overrides the source plan's description when provided"),
|
|
58449
|
+
display_order: int().optional().describe("DisplayOrder overrides the source plan's display order when provided"),
|
|
58450
|
+
lookup_key: string2().optional().describe("LookupKey is required and must be unique across published plans"),
|
|
58429
58451
|
metadata: record(string2(), string2()).optional(),
|
|
58430
|
-
name: string2()
|
|
58452
|
+
name: string2().optional().describe("Name is required and must be different from the source plan's name")
|
|
58431
58453
|
});
|
|
58432
58454
|
});
|
|
58433
58455
|
|
|
58434
|
-
// src/
|
|
58435
|
-
|
|
58456
|
+
// src/models/cloneplanop.ts
|
|
58457
|
+
var ClonePlanRequestRequest$zodSchema, ClonePlanResponse$zodSchema;
|
|
58458
|
+
var init_cloneplanop = __esm(() => {
|
|
58459
|
+
init_zod();
|
|
58460
|
+
init_cloneplanrequest();
|
|
58461
|
+
init_errorresponse();
|
|
58462
|
+
init_planresponse();
|
|
58463
|
+
ClonePlanRequestRequest$zodSchema = object({
|
|
58464
|
+
body: ClonePlanRequest$zodSchema.describe("Clone configuration"),
|
|
58465
|
+
id: string2().describe("Source Plan ID")
|
|
58466
|
+
});
|
|
58467
|
+
ClonePlanResponse$zodSchema = union([
|
|
58468
|
+
PlanResponse$zodSchema,
|
|
58469
|
+
ErrorResponse$zodSchema
|
|
58470
|
+
]);
|
|
58471
|
+
});
|
|
58472
|
+
|
|
58473
|
+
// src/funcs/plansClonePlan.ts
|
|
58474
|
+
function plansClonePlan(client$, request, options) {
|
|
58436
58475
|
return new APIPromise($do33(client$, request, options));
|
|
58437
58476
|
}
|
|
58438
58477
|
async function $do33(client$, request, options) {
|
|
58439
|
-
const parsed$ = safeParse4(request, (value$) =>
|
|
58478
|
+
const parsed$ = safeParse4(request, (value$) => ClonePlanRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
58440
58479
|
if (!parsed$.ok) {
|
|
58441
58480
|
return [parsed$, { status: "invalid" }];
|
|
58442
58481
|
}
|
|
58443
58482
|
const payload$ = parsed$.value;
|
|
58444
|
-
const body$ = encodeJSON("body", payload
|
|
58445
|
-
const
|
|
58483
|
+
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
58484
|
+
const pathParams$ = {
|
|
58485
|
+
id: encodeSimple("id", payload$.id, {
|
|
58486
|
+
explode: false,
|
|
58487
|
+
charEncoding: "percent"
|
|
58488
|
+
})
|
|
58489
|
+
};
|
|
58490
|
+
const path$ = pathToFunc("/plans/{id}/clone")(pathParams$);
|
|
58446
58491
|
const headers$ = new Headers(compactMap({
|
|
58447
58492
|
"Content-Type": "application/json",
|
|
58448
58493
|
Accept: "application/json"
|
|
@@ -58452,7 +58497,7 @@ async function $do33(client$, request, options) {
|
|
|
58452
58497
|
const context = {
|
|
58453
58498
|
options: client$._options,
|
|
58454
58499
|
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
58455
|
-
operationID: "
|
|
58500
|
+
operationID: "clonePlan",
|
|
58456
58501
|
oAuth2Scopes: null,
|
|
58457
58502
|
resolvedSecurity: requestSecurity,
|
|
58458
58503
|
securitySource: client$._options.security,
|
|
@@ -58494,30 +58539,30 @@ async function $do33(client$, request, options) {
|
|
|
58494
58539
|
response: doResult.value
|
|
58495
58540
|
}];
|
|
58496
58541
|
}
|
|
58497
|
-
var
|
|
58542
|
+
var init_plansClonePlan = __esm(() => {
|
|
58498
58543
|
init_encodings();
|
|
58499
58544
|
init_primitives();
|
|
58500
58545
|
init_schemas4();
|
|
58501
58546
|
init_security();
|
|
58502
58547
|
init_url();
|
|
58503
|
-
|
|
58548
|
+
init_cloneplanop();
|
|
58504
58549
|
init_async();
|
|
58505
58550
|
});
|
|
58506
58551
|
|
|
58507
|
-
// src/mcp-server/tools/
|
|
58508
|
-
var args32, tool$
|
|
58509
|
-
var
|
|
58510
|
-
|
|
58511
|
-
|
|
58552
|
+
// src/mcp-server/tools/plansClonePlan.ts
|
|
58553
|
+
var args32, tool$plansClonePlan;
|
|
58554
|
+
var init_plansClonePlan2 = __esm(() => {
|
|
58555
|
+
init_plansClonePlan();
|
|
58556
|
+
init_cloneplanop();
|
|
58512
58557
|
init_tools();
|
|
58513
58558
|
args32 = {
|
|
58514
|
-
request:
|
|
58559
|
+
request: ClonePlanRequestRequest$zodSchema
|
|
58515
58560
|
};
|
|
58516
|
-
tool$
|
|
58517
|
-
name: "
|
|
58518
|
-
description: `
|
|
58561
|
+
tool$plansClonePlan = {
|
|
58562
|
+
name: "clone-plan",
|
|
58563
|
+
description: `Clone a plan
|
|
58519
58564
|
|
|
58520
|
-
|
|
58565
|
+
Clone an existing plan, copying its active prices, published entitlements, and published credit grants`,
|
|
58521
58566
|
scopes: ["write"],
|
|
58522
58567
|
annotations: {
|
|
58523
58568
|
title: "",
|
|
@@ -58528,7 +58573,7 @@ Use when defining a new pricing plan (e.g. Free, Pro, Enterprise). Attach prices
|
|
|
58528
58573
|
},
|
|
58529
58574
|
args: args32,
|
|
58530
58575
|
tool: async (client, args33, ctx) => {
|
|
58531
|
-
const [result] = await
|
|
58576
|
+
const [result] = await plansClonePlan(client, args33.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
58532
58577
|
if (!result.ok) {
|
|
58533
58578
|
return {
|
|
58534
58579
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -58540,40 +58585,33 @@ Use when defining a new pricing plan (e.g. Free, Pro, Enterprise). Attach prices
|
|
|
58540
58585
|
};
|
|
58541
58586
|
});
|
|
58542
58587
|
|
|
58543
|
-
// src/models/
|
|
58544
|
-
var
|
|
58545
|
-
var
|
|
58588
|
+
// src/models/createplanrequest.ts
|
|
58589
|
+
var CreatePlanRequest$zodSchema;
|
|
58590
|
+
var init_createplanrequest = __esm(() => {
|
|
58546
58591
|
init_zod();
|
|
58547
|
-
|
|
58548
|
-
|
|
58549
|
-
|
|
58550
|
-
|
|
58592
|
+
CreatePlanRequest$zodSchema = object({
|
|
58593
|
+
description: string2().optional(),
|
|
58594
|
+
display_order: int().optional(),
|
|
58595
|
+
lookup_key: string2().optional(),
|
|
58596
|
+
metadata: record(string2(), string2()).optional(),
|
|
58597
|
+
name: string2()
|
|
58551
58598
|
});
|
|
58552
|
-
DeletePlanResponse$zodSchema = union([
|
|
58553
|
-
SuccessResponse$zodSchema,
|
|
58554
|
-
ErrorResponse$zodSchema
|
|
58555
|
-
]);
|
|
58556
58599
|
});
|
|
58557
58600
|
|
|
58558
|
-
// src/funcs/
|
|
58559
|
-
function
|
|
58601
|
+
// src/funcs/plansCreatePlan.ts
|
|
58602
|
+
function plansCreatePlan(client$, request, options) {
|
|
58560
58603
|
return new APIPromise($do34(client$, request, options));
|
|
58561
58604
|
}
|
|
58562
58605
|
async function $do34(client$, request, options) {
|
|
58563
|
-
const parsed$ = safeParse4(request, (value$) =>
|
|
58606
|
+
const parsed$ = safeParse4(request, (value$) => CreatePlanRequest$zodSchema.parse(value$), "Input validation failed");
|
|
58564
58607
|
if (!parsed$.ok) {
|
|
58565
58608
|
return [parsed$, { status: "invalid" }];
|
|
58566
58609
|
}
|
|
58567
58610
|
const payload$ = parsed$.value;
|
|
58568
|
-
const body$ =
|
|
58569
|
-
const
|
|
58570
|
-
id: encodeSimple("id", payload$.id, {
|
|
58571
|
-
explode: false,
|
|
58572
|
-
charEncoding: "percent"
|
|
58573
|
-
})
|
|
58574
|
-
};
|
|
58575
|
-
const path$ = pathToFunc("/plans/{id}")(pathParams$);
|
|
58611
|
+
const body$ = encodeJSON("body", payload$, { explode: true });
|
|
58612
|
+
const path$ = pathToFunc("/plans")();
|
|
58576
58613
|
const headers$ = new Headers(compactMap({
|
|
58614
|
+
"Content-Type": "application/json",
|
|
58577
58615
|
Accept: "application/json"
|
|
58578
58616
|
}));
|
|
58579
58617
|
const securityInput = await extractSecurity(client$._options.security);
|
|
@@ -58581,7 +58619,7 @@ async function $do34(client$, request, options) {
|
|
|
58581
58619
|
const context = {
|
|
58582
58620
|
options: client$._options,
|
|
58583
58621
|
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
58584
|
-
operationID: "
|
|
58622
|
+
operationID: "createPlan",
|
|
58585
58623
|
oAuth2Scopes: null,
|
|
58586
58624
|
resolvedSecurity: requestSecurity,
|
|
58587
58625
|
securitySource: client$._options.security,
|
|
@@ -58596,7 +58634,7 @@ async function $do34(client$, request, options) {
|
|
|
58596
58634
|
};
|
|
58597
58635
|
const requestRes = client$._createRequest(context, {
|
|
58598
58636
|
security: requestSecurity,
|
|
58599
|
-
method: "
|
|
58637
|
+
method: "POST",
|
|
58600
58638
|
baseURL: options?.serverURL,
|
|
58601
58639
|
path: path$,
|
|
58602
58640
|
headers: headers$,
|
|
@@ -58623,41 +58661,41 @@ async function $do34(client$, request, options) {
|
|
|
58623
58661
|
response: doResult.value
|
|
58624
58662
|
}];
|
|
58625
58663
|
}
|
|
58626
|
-
var
|
|
58664
|
+
var init_plansCreatePlan = __esm(() => {
|
|
58627
58665
|
init_encodings();
|
|
58628
58666
|
init_primitives();
|
|
58629
58667
|
init_schemas4();
|
|
58630
58668
|
init_security();
|
|
58631
58669
|
init_url();
|
|
58632
|
-
|
|
58670
|
+
init_createplanrequest();
|
|
58633
58671
|
init_async();
|
|
58634
58672
|
});
|
|
58635
58673
|
|
|
58636
|
-
// src/mcp-server/tools/
|
|
58637
|
-
var args33, tool$
|
|
58638
|
-
var
|
|
58639
|
-
|
|
58640
|
-
|
|
58674
|
+
// src/mcp-server/tools/plansCreatePlan.ts
|
|
58675
|
+
var args33, tool$plansCreatePlan;
|
|
58676
|
+
var init_plansCreatePlan2 = __esm(() => {
|
|
58677
|
+
init_plansCreatePlan();
|
|
58678
|
+
init_createplanrequest();
|
|
58641
58679
|
init_tools();
|
|
58642
58680
|
args33 = {
|
|
58643
|
-
request:
|
|
58681
|
+
request: CreatePlanRequest$zodSchema.describe(`Plan configuration`)
|
|
58644
58682
|
};
|
|
58645
|
-
tool$
|
|
58646
|
-
name: "
|
|
58647
|
-
description: `
|
|
58683
|
+
tool$plansCreatePlan = {
|
|
58684
|
+
name: "create-plan",
|
|
58685
|
+
description: `Create plan
|
|
58648
58686
|
|
|
58649
|
-
Use when
|
|
58650
|
-
scopes: ["
|
|
58687
|
+
Use when defining a new pricing plan (e.g. Free, Pro, Enterprise). Attach prices and entitlements; customers subscribe to plans.`,
|
|
58688
|
+
scopes: ["write"],
|
|
58651
58689
|
annotations: {
|
|
58652
58690
|
title: "",
|
|
58653
|
-
destructiveHint:
|
|
58691
|
+
destructiveHint: false,
|
|
58654
58692
|
idempotentHint: false,
|
|
58655
58693
|
openWorldHint: false,
|
|
58656
58694
|
readOnlyHint: false
|
|
58657
58695
|
},
|
|
58658
58696
|
args: args33,
|
|
58659
58697
|
tool: async (client, args34, ctx) => {
|
|
58660
|
-
const [result] = await
|
|
58698
|
+
const [result] = await plansCreatePlan(client, args34.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
58661
58699
|
if (!result.ok) {
|
|
58662
58700
|
return {
|
|
58663
58701
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -58669,27 +58707,27 @@ Use when retiring a plan (e.g. end-of-life). Existing subscriptions may be affec
|
|
|
58669
58707
|
};
|
|
58670
58708
|
});
|
|
58671
58709
|
|
|
58672
|
-
// src/models/
|
|
58673
|
-
var
|
|
58674
|
-
var
|
|
58710
|
+
// src/models/deleteplanop.ts
|
|
58711
|
+
var DeletePlanRequest$zodSchema, DeletePlanResponse$zodSchema;
|
|
58712
|
+
var init_deleteplanop = __esm(() => {
|
|
58675
58713
|
init_zod();
|
|
58676
58714
|
init_errorresponse();
|
|
58677
|
-
|
|
58678
|
-
|
|
58715
|
+
init_successresponse();
|
|
58716
|
+
DeletePlanRequest$zodSchema = object({
|
|
58679
58717
|
id: string2().describe("Plan ID")
|
|
58680
58718
|
});
|
|
58681
|
-
|
|
58682
|
-
|
|
58719
|
+
DeletePlanResponse$zodSchema = union([
|
|
58720
|
+
SuccessResponse$zodSchema,
|
|
58683
58721
|
ErrorResponse$zodSchema
|
|
58684
58722
|
]);
|
|
58685
58723
|
});
|
|
58686
58724
|
|
|
58687
|
-
// src/funcs/
|
|
58688
|
-
function
|
|
58725
|
+
// src/funcs/plansDeletePlan.ts
|
|
58726
|
+
function plansDeletePlan(client$, request, options) {
|
|
58689
58727
|
return new APIPromise($do35(client$, request, options));
|
|
58690
58728
|
}
|
|
58691
58729
|
async function $do35(client$, request, options) {
|
|
58692
|
-
const parsed$ = safeParse4(request, (value$) =>
|
|
58730
|
+
const parsed$ = safeParse4(request, (value$) => DeletePlanRequest$zodSchema.parse(value$), "Input validation failed");
|
|
58693
58731
|
if (!parsed$.ok) {
|
|
58694
58732
|
return [parsed$, { status: "invalid" }];
|
|
58695
58733
|
}
|
|
@@ -58710,7 +58748,7 @@ async function $do35(client$, request, options) {
|
|
|
58710
58748
|
const context = {
|
|
58711
58749
|
options: client$._options,
|
|
58712
58750
|
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
58713
|
-
operationID: "
|
|
58751
|
+
operationID: "deletePlan",
|
|
58714
58752
|
oAuth2Scopes: null,
|
|
58715
58753
|
resolvedSecurity: requestSecurity,
|
|
58716
58754
|
securitySource: client$._options.security,
|
|
@@ -58725,7 +58763,7 @@ async function $do35(client$, request, options) {
|
|
|
58725
58763
|
};
|
|
58726
58764
|
const requestRes = client$._createRequest(context, {
|
|
58727
58765
|
security: requestSecurity,
|
|
58728
|
-
method: "
|
|
58766
|
+
method: "DELETE",
|
|
58729
58767
|
baseURL: options?.serverURL,
|
|
58730
58768
|
path: path$,
|
|
58731
58769
|
headers: headers$,
|
|
@@ -58752,41 +58790,41 @@ async function $do35(client$, request, options) {
|
|
|
58752
58790
|
response: doResult.value
|
|
58753
58791
|
}];
|
|
58754
58792
|
}
|
|
58755
|
-
var
|
|
58793
|
+
var init_plansDeletePlan = __esm(() => {
|
|
58756
58794
|
init_encodings();
|
|
58757
58795
|
init_primitives();
|
|
58758
58796
|
init_schemas4();
|
|
58759
58797
|
init_security();
|
|
58760
58798
|
init_url();
|
|
58761
|
-
|
|
58799
|
+
init_deleteplanop();
|
|
58762
58800
|
init_async();
|
|
58763
58801
|
});
|
|
58764
58802
|
|
|
58765
|
-
// src/mcp-server/tools/
|
|
58766
|
-
var args34, tool$
|
|
58767
|
-
var
|
|
58768
|
-
|
|
58769
|
-
|
|
58803
|
+
// src/mcp-server/tools/plansDeletePlan.ts
|
|
58804
|
+
var args34, tool$plansDeletePlan;
|
|
58805
|
+
var init_plansDeletePlan2 = __esm(() => {
|
|
58806
|
+
init_plansDeletePlan();
|
|
58807
|
+
init_deleteplanop();
|
|
58770
58808
|
init_tools();
|
|
58771
58809
|
args34 = {
|
|
58772
|
-
request:
|
|
58810
|
+
request: DeletePlanRequest$zodSchema
|
|
58773
58811
|
};
|
|
58774
|
-
tool$
|
|
58775
|
-
name: "
|
|
58776
|
-
description: `
|
|
58812
|
+
tool$plansDeletePlan = {
|
|
58813
|
+
name: "delete-plan",
|
|
58814
|
+
description: `Delete plan
|
|
58777
58815
|
|
|
58778
|
-
Use when
|
|
58779
|
-
scopes: ["
|
|
58816
|
+
Use when retiring a plan (e.g. end-of-life). Existing subscriptions may be affected. Returns 200 with success message.`,
|
|
58817
|
+
scopes: ["delete"],
|
|
58780
58818
|
annotations: {
|
|
58781
58819
|
title: "",
|
|
58782
|
-
destructiveHint:
|
|
58820
|
+
destructiveHint: true,
|
|
58783
58821
|
idempotentHint: false,
|
|
58784
58822
|
openWorldHint: false,
|
|
58785
|
-
readOnlyHint:
|
|
58823
|
+
readOnlyHint: false
|
|
58786
58824
|
},
|
|
58787
58825
|
args: args34,
|
|
58788
58826
|
tool: async (client, args35, ctx) => {
|
|
58789
|
-
const [result] = await
|
|
58827
|
+
const [result] = await plansDeletePlan(client, args35.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
58790
58828
|
if (!result.ok) {
|
|
58791
58829
|
return {
|
|
58792
58830
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -58798,56 +58836,40 @@ Use when you need to load a single plan (e.g. for display or to create a subscri
|
|
|
58798
58836
|
};
|
|
58799
58837
|
});
|
|
58800
58838
|
|
|
58801
|
-
// src/models/
|
|
58802
|
-
var
|
|
58803
|
-
var
|
|
58804
|
-
init_zod();
|
|
58805
|
-
ClonePlanRequest$zodSchema = object({
|
|
58806
|
-
description: string2().optional().describe("Description overrides the source plan's description when provided"),
|
|
58807
|
-
display_order: int().optional().describe("DisplayOrder overrides the source plan's display order when provided"),
|
|
58808
|
-
lookup_key: string2().optional().describe("LookupKey is required and must be unique across published plans"),
|
|
58809
|
-
metadata: record(string2(), string2()).optional(),
|
|
58810
|
-
name: string2().optional().describe("Name is required and must be different from the source plan's name")
|
|
58811
|
-
});
|
|
58812
|
-
});
|
|
58813
|
-
|
|
58814
|
-
// src/models/postplansidcloneop.ts
|
|
58815
|
-
var PostPlansIdCloneRequest$zodSchema, PostPlansIdCloneResponse$zodSchema;
|
|
58816
|
-
var init_postplansidcloneop = __esm(() => {
|
|
58839
|
+
// src/models/getplanop.ts
|
|
58840
|
+
var GetPlanRequest$zodSchema, GetPlanResponse$zodSchema;
|
|
58841
|
+
var init_getplanop = __esm(() => {
|
|
58817
58842
|
init_zod();
|
|
58818
|
-
init_cloneplanrequest();
|
|
58819
58843
|
init_errorresponse();
|
|
58820
58844
|
init_planresponse();
|
|
58821
|
-
|
|
58822
|
-
|
|
58823
|
-
id: string2().describe("Source Plan ID")
|
|
58845
|
+
GetPlanRequest$zodSchema = object({
|
|
58846
|
+
id: string2().describe("Plan ID")
|
|
58824
58847
|
});
|
|
58825
|
-
|
|
58848
|
+
GetPlanResponse$zodSchema = union([
|
|
58826
58849
|
PlanResponse$zodSchema,
|
|
58827
58850
|
ErrorResponse$zodSchema
|
|
58828
58851
|
]);
|
|
58829
58852
|
});
|
|
58830
58853
|
|
|
58831
|
-
// src/funcs/
|
|
58832
|
-
function
|
|
58854
|
+
// src/funcs/plansGetPlan.ts
|
|
58855
|
+
function plansGetPlan(client$, request, options) {
|
|
58833
58856
|
return new APIPromise($do36(client$, request, options));
|
|
58834
58857
|
}
|
|
58835
58858
|
async function $do36(client$, request, options) {
|
|
58836
|
-
const parsed$ = safeParse4(request, (value$) =>
|
|
58859
|
+
const parsed$ = safeParse4(request, (value$) => GetPlanRequest$zodSchema.parse(value$), "Input validation failed");
|
|
58837
58860
|
if (!parsed$.ok) {
|
|
58838
58861
|
return [parsed$, { status: "invalid" }];
|
|
58839
58862
|
}
|
|
58840
58863
|
const payload$ = parsed$.value;
|
|
58841
|
-
const body$ =
|
|
58864
|
+
const body$ = null;
|
|
58842
58865
|
const pathParams$ = {
|
|
58843
58866
|
id: encodeSimple("id", payload$.id, {
|
|
58844
58867
|
explode: false,
|
|
58845
58868
|
charEncoding: "percent"
|
|
58846
58869
|
})
|
|
58847
58870
|
};
|
|
58848
|
-
const path$ = pathToFunc("/plans/{id}
|
|
58871
|
+
const path$ = pathToFunc("/plans/{id}")(pathParams$);
|
|
58849
58872
|
const headers$ = new Headers(compactMap({
|
|
58850
|
-
"Content-Type": "application/json",
|
|
58851
58873
|
Accept: "application/json"
|
|
58852
58874
|
}));
|
|
58853
58875
|
const securityInput = await extractSecurity(client$._options.security);
|
|
@@ -58855,7 +58877,7 @@ async function $do36(client$, request, options) {
|
|
|
58855
58877
|
const context = {
|
|
58856
58878
|
options: client$._options,
|
|
58857
58879
|
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
58858
|
-
operationID: "
|
|
58880
|
+
operationID: "getPlan",
|
|
58859
58881
|
oAuth2Scopes: null,
|
|
58860
58882
|
resolvedSecurity: requestSecurity,
|
|
58861
58883
|
securitySource: client$._options.security,
|
|
@@ -58870,7 +58892,7 @@ async function $do36(client$, request, options) {
|
|
|
58870
58892
|
};
|
|
58871
58893
|
const requestRes = client$._createRequest(context, {
|
|
58872
58894
|
security: requestSecurity,
|
|
58873
|
-
method: "
|
|
58895
|
+
method: "GET",
|
|
58874
58896
|
baseURL: options?.serverURL,
|
|
58875
58897
|
path: path$,
|
|
58876
58898
|
headers: headers$,
|
|
@@ -58897,41 +58919,41 @@ async function $do36(client$, request, options) {
|
|
|
58897
58919
|
response: doResult.value
|
|
58898
58920
|
}];
|
|
58899
58921
|
}
|
|
58900
|
-
var
|
|
58922
|
+
var init_plansGetPlan = __esm(() => {
|
|
58901
58923
|
init_encodings();
|
|
58902
58924
|
init_primitives();
|
|
58903
58925
|
init_schemas4();
|
|
58904
58926
|
init_security();
|
|
58905
58927
|
init_url();
|
|
58906
|
-
|
|
58928
|
+
init_getplanop();
|
|
58907
58929
|
init_async();
|
|
58908
58930
|
});
|
|
58909
58931
|
|
|
58910
|
-
// src/mcp-server/tools/
|
|
58911
|
-
var args35, tool$
|
|
58912
|
-
var
|
|
58913
|
-
|
|
58914
|
-
|
|
58932
|
+
// src/mcp-server/tools/plansGetPlan.ts
|
|
58933
|
+
var args35, tool$plansGetPlan;
|
|
58934
|
+
var init_plansGetPlan2 = __esm(() => {
|
|
58935
|
+
init_plansGetPlan();
|
|
58936
|
+
init_getplanop();
|
|
58915
58937
|
init_tools();
|
|
58916
58938
|
args35 = {
|
|
58917
|
-
request:
|
|
58939
|
+
request: GetPlanRequest$zodSchema
|
|
58918
58940
|
};
|
|
58919
|
-
tool$
|
|
58920
|
-
name: "
|
|
58921
|
-
description: `
|
|
58941
|
+
tool$plansGetPlan = {
|
|
58942
|
+
name: "get-plan",
|
|
58943
|
+
description: `Get plan
|
|
58922
58944
|
|
|
58923
|
-
|
|
58924
|
-
scopes: ["
|
|
58945
|
+
Use when you need to load a single plan (e.g. for display or to create a subscription).`,
|
|
58946
|
+
scopes: ["read"],
|
|
58925
58947
|
annotations: {
|
|
58926
58948
|
title: "",
|
|
58927
58949
|
destructiveHint: false,
|
|
58928
58950
|
idempotentHint: false,
|
|
58929
58951
|
openWorldHint: false,
|
|
58930
|
-
readOnlyHint:
|
|
58952
|
+
readOnlyHint: true
|
|
58931
58953
|
},
|
|
58932
58954
|
args: args35,
|
|
58933
58955
|
tool: async (client, args36, ctx) => {
|
|
58934
|
-
const [result] = await
|
|
58956
|
+
const [result] = await plansGetPlan(client, args36.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
58935
58957
|
if (!result.ok) {
|
|
58936
58958
|
return {
|
|
58937
58959
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -61220,6 +61242,10 @@ var init_createsubscriptionrequest = __esm(() => {
|
|
|
61220
61242
|
init_taxrateoverride();
|
|
61221
61243
|
CreateSubscriptionRequest$zodSchema = object({
|
|
61222
61244
|
addons: array(AddAddonToSubscriptionRequest$zodSchema).optional().describe("Addons represents addons to be added to the subscription during creation"),
|
|
61245
|
+
billing_anchor: exports_iso.datetime({ offset: true }).optional().describe(`BillingAnchor overrides the derived billing anchor when billing_cycle is anniversary.
|
|
61246
|
+
For monthly billing, the day-of-month (and time-of-day) define cycle boundaries: if start_date
|
|
61247
|
+
is before that day in the month, the first billing period ends on the next occurrence of that
|
|
61248
|
+
day in the same month (a shorter first period); subsequent periods follow the usual interval.`),
|
|
61223
61249
|
billing_cycle: BillingCycle$zodSchema.optional(),
|
|
61224
61250
|
billing_period: BillingPeriod$zodSchema,
|
|
61225
61251
|
billing_period_count: int().optional(),
|
|
@@ -61984,23 +62010,351 @@ var init_executesubscriptionmodifyrequest = __esm(() => {
|
|
|
61984
62010
|
});
|
|
61985
62011
|
});
|
|
61986
62012
|
|
|
62013
|
+
// src/models/changedinvoiceaction.ts
|
|
62014
|
+
var ChangedInvoiceAction$zodSchema;
|
|
62015
|
+
var init_changedinvoiceaction = __esm(() => {
|
|
62016
|
+
init_zod();
|
|
62017
|
+
ChangedInvoiceAction$zodSchema = _enum([
|
|
62018
|
+
"created",
|
|
62019
|
+
"wallet_credit"
|
|
62020
|
+
]).describe("created (proration invoice) | wallet_credit (downgrade credit)");
|
|
62021
|
+
});
|
|
62022
|
+
|
|
62023
|
+
// src/models/changedinvoicestatus.ts
|
|
62024
|
+
var ChangedInvoiceStatus$zodSchema;
|
|
62025
|
+
var init_changedinvoicestatus = __esm(() => {
|
|
62026
|
+
init_zod();
|
|
62027
|
+
ChangedInvoiceStatus$zodSchema = _enum([
|
|
62028
|
+
"preview",
|
|
62029
|
+
"issued"
|
|
62030
|
+
]).describe("preview | issued | INITIATED | PENDING | PROCESSING | SUCCEEDED | OVERPAID | FAILED | REFUNDED | PARTIALLY_REFUNDED");
|
|
62031
|
+
});
|
|
62032
|
+
|
|
62033
|
+
// src/models/transactionreason.ts
|
|
62034
|
+
var TransactionReason$zodSchema;
|
|
62035
|
+
var init_transactionreason = __esm(() => {
|
|
62036
|
+
init_zod();
|
|
62037
|
+
TransactionReason$zodSchema = _enum([
|
|
62038
|
+
"INVOICE_PAYMENT",
|
|
62039
|
+
"FREE_CREDIT_GRANT",
|
|
62040
|
+
"SUBSCRIPTION_CREDIT_GRANT",
|
|
62041
|
+
"PURCHASED_CREDIT_INVOICED",
|
|
62042
|
+
"PURCHASED_CREDIT_DIRECT",
|
|
62043
|
+
"CREDIT_NOTE",
|
|
62044
|
+
"CREDIT_EXPIRED",
|
|
62045
|
+
"WALLET_TERMINATION",
|
|
62046
|
+
"MANUAL_BALANCE_DEBIT",
|
|
62047
|
+
"CREDIT_ADJUSTMENT",
|
|
62048
|
+
"INVOICE_VOID_REFUND"
|
|
62049
|
+
]);
|
|
62050
|
+
});
|
|
62051
|
+
|
|
62052
|
+
// src/models/transactionstatus.ts
|
|
62053
|
+
var TransactionStatus$zodSchema;
|
|
62054
|
+
var init_transactionstatus = __esm(() => {
|
|
62055
|
+
init_zod();
|
|
62056
|
+
TransactionStatus$zodSchema = _enum([
|
|
62057
|
+
"pending",
|
|
62058
|
+
"completed",
|
|
62059
|
+
"failed"
|
|
62060
|
+
]);
|
|
62061
|
+
});
|
|
62062
|
+
|
|
62063
|
+
// src/models/transactiontype.ts
|
|
62064
|
+
var TransactionType$zodSchema;
|
|
62065
|
+
var init_transactiontype = __esm(() => {
|
|
62066
|
+
init_zod();
|
|
62067
|
+
TransactionType$zodSchema = _enum([
|
|
62068
|
+
"credit",
|
|
62069
|
+
"debit"
|
|
62070
|
+
]);
|
|
62071
|
+
});
|
|
62072
|
+
|
|
62073
|
+
// src/models/address.ts
|
|
62074
|
+
var Address$zodSchema;
|
|
62075
|
+
var init_address = __esm(() => {
|
|
62076
|
+
init_zod();
|
|
62077
|
+
Address$zodSchema = object({
|
|
62078
|
+
address_city: string2().optional(),
|
|
62079
|
+
address_country: string2().optional(),
|
|
62080
|
+
address_line1: string2().optional(),
|
|
62081
|
+
address_line2: string2().optional(),
|
|
62082
|
+
address_postal_code: string2().optional(),
|
|
62083
|
+
address_state: string2().optional()
|
|
62084
|
+
});
|
|
62085
|
+
});
|
|
62086
|
+
|
|
62087
|
+
// src/models/tenantbillingdetails.ts
|
|
62088
|
+
var TenantBillingDetails$zodSchema;
|
|
62089
|
+
var init_tenantbillingdetails = __esm(() => {
|
|
62090
|
+
init_zod();
|
|
62091
|
+
init_address();
|
|
62092
|
+
TenantBillingDetails$zodSchema = object({
|
|
62093
|
+
address: Address$zodSchema.optional(),
|
|
62094
|
+
email: string2().optional(),
|
|
62095
|
+
help_email: string2().optional(),
|
|
62096
|
+
phone: string2().optional()
|
|
62097
|
+
});
|
|
62098
|
+
});
|
|
62099
|
+
|
|
62100
|
+
// src/models/tenantresponse.ts
|
|
62101
|
+
var TenantResponse$zodSchema;
|
|
62102
|
+
var init_tenantresponse = __esm(() => {
|
|
62103
|
+
init_zod();
|
|
62104
|
+
init_tenantbillingdetails();
|
|
62105
|
+
TenantResponse$zodSchema = object({
|
|
62106
|
+
billing_details: TenantBillingDetails$zodSchema.optional(),
|
|
62107
|
+
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
62108
|
+
id: string2().optional(),
|
|
62109
|
+
metadata: record(string2(), string2()).optional(),
|
|
62110
|
+
name: string2().optional(),
|
|
62111
|
+
status: string2().optional(),
|
|
62112
|
+
updated_at: exports_iso.datetime({ offset: true }).optional()
|
|
62113
|
+
});
|
|
62114
|
+
});
|
|
62115
|
+
|
|
62116
|
+
// src/models/usertype.ts
|
|
62117
|
+
var UserType$zodSchema;
|
|
62118
|
+
var init_usertype = __esm(() => {
|
|
62119
|
+
init_zod();
|
|
62120
|
+
UserType$zodSchema = _enum([
|
|
62121
|
+
"user",
|
|
62122
|
+
"service_account"
|
|
62123
|
+
]);
|
|
62124
|
+
});
|
|
62125
|
+
|
|
62126
|
+
// src/models/userresponse.ts
|
|
62127
|
+
var UserResponse$zodSchema;
|
|
62128
|
+
var init_userresponse = __esm(() => {
|
|
62129
|
+
init_zod();
|
|
62130
|
+
init_tenantresponse();
|
|
62131
|
+
init_usertype();
|
|
62132
|
+
UserResponse$zodSchema = object({
|
|
62133
|
+
email: string2().optional().describe("Empty for service accounts"),
|
|
62134
|
+
id: string2().optional(),
|
|
62135
|
+
roles: array(string2()).optional(),
|
|
62136
|
+
tenant: TenantResponse$zodSchema.optional(),
|
|
62137
|
+
type: UserType$zodSchema.optional()
|
|
62138
|
+
});
|
|
62139
|
+
});
|
|
62140
|
+
|
|
62141
|
+
// src/models/alertstate.ts
|
|
62142
|
+
var AlertState$zodSchema;
|
|
62143
|
+
var init_alertstate = __esm(() => {
|
|
62144
|
+
init_zod();
|
|
62145
|
+
AlertState$zodSchema = _enum([
|
|
62146
|
+
"ok",
|
|
62147
|
+
"info",
|
|
62148
|
+
"warning",
|
|
62149
|
+
"in_alarm"
|
|
62150
|
+
]);
|
|
62151
|
+
});
|
|
62152
|
+
|
|
62153
|
+
// src/models/autotopup.ts
|
|
62154
|
+
var AutoTopup$zodSchema;
|
|
62155
|
+
var init_autotopup = __esm(() => {
|
|
62156
|
+
init_zod();
|
|
62157
|
+
AutoTopup$zodSchema = object({
|
|
62158
|
+
amount: number2().optional(),
|
|
62159
|
+
enabled: boolean2().optional(),
|
|
62160
|
+
invoicing: boolean2().optional(),
|
|
62161
|
+
threshold: number2().optional()
|
|
62162
|
+
});
|
|
62163
|
+
});
|
|
62164
|
+
|
|
62165
|
+
// src/models/creditbreakdown.ts
|
|
62166
|
+
var CreditBreakdown$zodSchema;
|
|
62167
|
+
var init_creditbreakdown = __esm(() => {
|
|
62168
|
+
init_zod();
|
|
62169
|
+
CreditBreakdown$zodSchema = object({
|
|
62170
|
+
free: string2().optional(),
|
|
62171
|
+
purchased: string2().optional()
|
|
62172
|
+
});
|
|
62173
|
+
});
|
|
62174
|
+
|
|
62175
|
+
// src/models/walletconfigpricetype.ts
|
|
62176
|
+
var WalletConfigPriceType$zodSchema;
|
|
62177
|
+
var init_walletconfigpricetype = __esm(() => {
|
|
62178
|
+
init_zod();
|
|
62179
|
+
WalletConfigPriceType$zodSchema = _enum([
|
|
62180
|
+
"ALL",
|
|
62181
|
+
"USAGE",
|
|
62182
|
+
"FIXED"
|
|
62183
|
+
]);
|
|
62184
|
+
});
|
|
62185
|
+
|
|
62186
|
+
// src/models/walletconfig.ts
|
|
62187
|
+
var WalletConfig$zodSchema;
|
|
62188
|
+
var init_walletconfig = __esm(() => {
|
|
62189
|
+
init_zod();
|
|
62190
|
+
init_walletconfigpricetype();
|
|
62191
|
+
WalletConfig$zodSchema = object({
|
|
62192
|
+
allowed_price_types: array(WalletConfigPriceType$zodSchema).optional().describe(`AllowedPriceTypes is a list of price types that are allowed for the wallet
|
|
62193
|
+
nil means all price types are allowed`)
|
|
62194
|
+
});
|
|
62195
|
+
});
|
|
62196
|
+
|
|
62197
|
+
// src/models/walletstatus.ts
|
|
62198
|
+
var WalletStatus$zodSchema;
|
|
62199
|
+
var init_walletstatus = __esm(() => {
|
|
62200
|
+
init_zod();
|
|
62201
|
+
WalletStatus$zodSchema = _enum([
|
|
62202
|
+
"active",
|
|
62203
|
+
"frozen",
|
|
62204
|
+
"closed"
|
|
62205
|
+
]);
|
|
62206
|
+
});
|
|
62207
|
+
|
|
62208
|
+
// src/models/wallettype.ts
|
|
62209
|
+
var WalletType$zodSchema;
|
|
62210
|
+
var init_wallettype = __esm(() => {
|
|
62211
|
+
init_zod();
|
|
62212
|
+
WalletType$zodSchema = _enum([
|
|
62213
|
+
"PRE_PAID",
|
|
62214
|
+
"POST_PAID"
|
|
62215
|
+
]);
|
|
62216
|
+
});
|
|
62217
|
+
|
|
62218
|
+
// src/models/walletresponse.ts
|
|
62219
|
+
var WalletResponse$zodSchema;
|
|
62220
|
+
var init_walletresponse = __esm(() => {
|
|
62221
|
+
init_zod();
|
|
62222
|
+
init_alertsettings();
|
|
62223
|
+
init_alertstate();
|
|
62224
|
+
init_autotopup();
|
|
62225
|
+
init_creditbreakdown();
|
|
62226
|
+
init_status();
|
|
62227
|
+
init_walletconfig();
|
|
62228
|
+
init_walletstatus();
|
|
62229
|
+
init_wallettype();
|
|
62230
|
+
WalletResponse$zodSchema = object({
|
|
62231
|
+
alert_settings: AlertSettings$zodSchema.optional(),
|
|
62232
|
+
alert_state: AlertState$zodSchema.optional(),
|
|
62233
|
+
auto_topup: AutoTopup$zodSchema.optional(),
|
|
62234
|
+
balance: string2().optional(),
|
|
62235
|
+
config: WalletConfig$zodSchema.optional(),
|
|
62236
|
+
conversion_rate: string2().optional().describe(`amount in the currency = number of credits * conversion_rate
|
|
62237
|
+
ex if conversion_rate is 1, then 1 USD = 1 credit
|
|
62238
|
+
ex if conversion_rate is 2, then 1 USD = 0.5 credits
|
|
62239
|
+
ex if conversion_rate is 0.5, then 1 USD = 2 credits`),
|
|
62240
|
+
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
62241
|
+
created_by: string2().optional(),
|
|
62242
|
+
credit_balance: string2().optional(),
|
|
62243
|
+
credits_available_breakdown: CreditBreakdown$zodSchema.optional(),
|
|
62244
|
+
currency: string2().optional(),
|
|
62245
|
+
customer_id: string2().optional(),
|
|
62246
|
+
description: string2().optional(),
|
|
62247
|
+
environment_id: string2().optional(),
|
|
62248
|
+
id: string2().optional(),
|
|
62249
|
+
metadata: record(string2(), string2()).optional(),
|
|
62250
|
+
name: string2().optional(),
|
|
62251
|
+
status: Status$zodSchema.optional(),
|
|
62252
|
+
tenant_id: string2().optional(),
|
|
62253
|
+
topup_conversion_rate: string2().optional().describe(`topup_conversion_rate is the conversion rate for the topup to the currency
|
|
62254
|
+
ex if topup_conversion_rate is 1, then 1 USD = 1 credit
|
|
62255
|
+
ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits
|
|
62256
|
+
ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits`),
|
|
62257
|
+
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
62258
|
+
updated_by: string2().optional(),
|
|
62259
|
+
wallet_status: WalletStatus$zodSchema.optional(),
|
|
62260
|
+
wallet_type: WalletType$zodSchema.optional()
|
|
62261
|
+
});
|
|
62262
|
+
});
|
|
62263
|
+
|
|
62264
|
+
// src/models/wallettxreferencetype.ts
|
|
62265
|
+
var WalletTxReferenceType$zodSchema;
|
|
62266
|
+
var init_wallettxreferencetype = __esm(() => {
|
|
62267
|
+
init_zod();
|
|
62268
|
+
WalletTxReferenceType$zodSchema = _enum([
|
|
62269
|
+
"PAYMENT",
|
|
62270
|
+
"EXTERNAL",
|
|
62271
|
+
"REQUEST",
|
|
62272
|
+
"INVOICE"
|
|
62273
|
+
]);
|
|
62274
|
+
});
|
|
62275
|
+
|
|
62276
|
+
// src/models/wallettransactionresponse.ts
|
|
62277
|
+
var WalletTransactionResponse$zodSchema;
|
|
62278
|
+
var init_wallettransactionresponse = __esm(() => {
|
|
62279
|
+
init_zod();
|
|
62280
|
+
init_customerresponse();
|
|
62281
|
+
init_status();
|
|
62282
|
+
init_transactionreason();
|
|
62283
|
+
init_transactionstatus();
|
|
62284
|
+
init_transactiontype();
|
|
62285
|
+
init_userresponse();
|
|
62286
|
+
init_walletresponse();
|
|
62287
|
+
init_wallettxreferencetype();
|
|
62288
|
+
WalletTransactionResponse$zodSchema = object({
|
|
62289
|
+
amount: string2().optional(),
|
|
62290
|
+
conversion_rate: string2().optional().describe("conversion_rate is the conversion rate for the transaction to the currency"),
|
|
62291
|
+
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
62292
|
+
created_by: string2().optional(),
|
|
62293
|
+
created_by_user: UserResponse$zodSchema.optional(),
|
|
62294
|
+
credit_amount: string2().optional(),
|
|
62295
|
+
credit_balance_after: string2().optional(),
|
|
62296
|
+
credit_balance_before: string2().optional(),
|
|
62297
|
+
credits_available: string2().optional(),
|
|
62298
|
+
currency: string2().optional(),
|
|
62299
|
+
customer: CustomerResponse$zodSchema.optional().describe("Customer response object containing all customer information"),
|
|
62300
|
+
customer_id: string2().optional(),
|
|
62301
|
+
description: string2().optional(),
|
|
62302
|
+
environment_id: string2().optional(),
|
|
62303
|
+
expiry_date: exports_iso.datetime({ offset: true }).optional(),
|
|
62304
|
+
id: string2().optional(),
|
|
62305
|
+
idempotency_key: string2().optional(),
|
|
62306
|
+
metadata: record(string2(), string2()).optional(),
|
|
62307
|
+
priority: int().optional(),
|
|
62308
|
+
reference_id: string2().optional(),
|
|
62309
|
+
reference_type: WalletTxReferenceType$zodSchema.optional(),
|
|
62310
|
+
status: Status$zodSchema.optional(),
|
|
62311
|
+
tenant_id: string2().optional(),
|
|
62312
|
+
topup_conversion_rate: string2().optional().describe("topup_conversion_rate is the conversion rate for the topup to the currency"),
|
|
62313
|
+
transaction_reason: TransactionReason$zodSchema.optional(),
|
|
62314
|
+
transaction_status: TransactionStatus$zodSchema.optional(),
|
|
62315
|
+
type: TransactionType$zodSchema.optional(),
|
|
62316
|
+
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
62317
|
+
updated_by: string2().optional(),
|
|
62318
|
+
wallet: WalletResponse$zodSchema.optional(),
|
|
62319
|
+
wallet_id: string2().optional()
|
|
62320
|
+
});
|
|
62321
|
+
});
|
|
62322
|
+
|
|
61987
62323
|
// src/models/changedinvoice.ts
|
|
61988
62324
|
var ChangedInvoice$zodSchema;
|
|
61989
62325
|
var init_changedinvoice = __esm(() => {
|
|
61990
62326
|
init_zod();
|
|
62327
|
+
init_changedinvoiceaction();
|
|
62328
|
+
init_changedinvoicestatus();
|
|
62329
|
+
init_invoiceresponse();
|
|
62330
|
+
init_wallettransactionresponse();
|
|
61991
62331
|
ChangedInvoice$zodSchema = object({
|
|
61992
|
-
action:
|
|
62332
|
+
action: ChangedInvoiceAction$zodSchema.optional().describe("created (proration invoice) | wallet_credit (downgrade credit)"),
|
|
61993
62333
|
id: string2().optional(),
|
|
61994
|
-
|
|
62334
|
+
invoice: InvoiceResponse$zodSchema.optional(),
|
|
62335
|
+
status: ChangedInvoiceStatus$zodSchema.optional().describe("preview | issued | INITIATED | PENDING | PROCESSING | SUCCEEDED | OVERPAID | FAILED | REFUNDED | PARTIALLY_REFUNDED"),
|
|
62336
|
+
wallet_transaction: WalletTransactionResponse$zodSchema.optional()
|
|
61995
62337
|
});
|
|
61996
62338
|
});
|
|
61997
62339
|
|
|
62340
|
+
// src/models/changedlineitemaction.ts
|
|
62341
|
+
var ChangedLineItemAction$zodSchema;
|
|
62342
|
+
var init_changedlineitemaction = __esm(() => {
|
|
62343
|
+
init_zod();
|
|
62344
|
+
ChangedLineItemAction$zodSchema = _enum([
|
|
62345
|
+
"created",
|
|
62346
|
+
"updated",
|
|
62347
|
+
"ended"
|
|
62348
|
+
]).describe("created | updated | ended");
|
|
62349
|
+
});
|
|
62350
|
+
|
|
61998
62351
|
// src/models/changedlineitem.ts
|
|
61999
62352
|
var ChangedLineItem$zodSchema;
|
|
62000
62353
|
var init_changedlineitem = __esm(() => {
|
|
62001
62354
|
init_zod();
|
|
62355
|
+
init_changedlineitemaction();
|
|
62002
62356
|
ChangedLineItem$zodSchema = object({
|
|
62003
|
-
change_action:
|
|
62357
|
+
change_action: ChangedLineItemAction$zodSchema.optional().describe("created | updated | ended"),
|
|
62004
62358
|
end_date: exports_iso.datetime({ offset: true }).optional(),
|
|
62005
62359
|
id: string2().optional(),
|
|
62006
62360
|
price_id: string2().optional(),
|
|
@@ -62009,13 +62363,24 @@ var init_changedlineitem = __esm(() => {
|
|
|
62009
62363
|
});
|
|
62010
62364
|
});
|
|
62011
62365
|
|
|
62366
|
+
// src/models/changedsubscriptionaction.ts
|
|
62367
|
+
var ChangedSubscriptionAction$zodSchema;
|
|
62368
|
+
var init_changedsubscriptionaction = __esm(() => {
|
|
62369
|
+
init_zod();
|
|
62370
|
+
ChangedSubscriptionAction$zodSchema = _enum([
|
|
62371
|
+
"created",
|
|
62372
|
+
"updated"
|
|
62373
|
+
]).describe("created | updated");
|
|
62374
|
+
});
|
|
62375
|
+
|
|
62012
62376
|
// src/models/changedsubscription.ts
|
|
62013
62377
|
var ChangedSubscription$zodSchema;
|
|
62014
62378
|
var init_changedsubscription = __esm(() => {
|
|
62015
62379
|
init_zod();
|
|
62380
|
+
init_changedsubscriptionaction();
|
|
62016
62381
|
init_subscriptionstatus();
|
|
62017
62382
|
ChangedSubscription$zodSchema = object({
|
|
62018
|
-
action:
|
|
62383
|
+
action: ChangedSubscriptionAction$zodSchema.optional().describe("created | updated"),
|
|
62019
62384
|
id: string2().optional(),
|
|
62020
62385
|
status: SubscriptionStatus$zodSchema.optional()
|
|
62021
62386
|
});
|
|
@@ -64883,7 +65248,7 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
64883
65248
|
function createMCPServer(deps) {
|
|
64884
65249
|
const server = new McpServer({
|
|
64885
65250
|
name: "Flexprice",
|
|
64886
|
-
version: "2.1.
|
|
65251
|
+
version: "2.1.3"
|
|
64887
65252
|
});
|
|
64888
65253
|
const getClient = deps.getSDK || (() => new FlexpriceCore({
|
|
64889
65254
|
security: deps.security,
|
|
@@ -64939,7 +65304,7 @@ function createMCPServer(deps) {
|
|
|
64939
65304
|
tool(tool$plansGetPlan);
|
|
64940
65305
|
tool(tool$plansUpdatePlan);
|
|
64941
65306
|
tool(tool$plansDeletePlan);
|
|
64942
|
-
tool(tool$
|
|
65307
|
+
tool(tool$plansClonePlan);
|
|
64943
65308
|
tool(tool$plansSyncPlanPrices);
|
|
64944
65309
|
tool(tool$pricesCreatePrice);
|
|
64945
65310
|
tool(tool$pricesCreatePricesBulk);
|
|
@@ -65017,10 +65382,10 @@ var init_server2 = __esm(() => {
|
|
|
65017
65382
|
init_invoicesUpdateInvoice2();
|
|
65018
65383
|
init_invoicesUpdateInvoicePaymentStatus2();
|
|
65019
65384
|
init_invoicesVoidInvoice2();
|
|
65385
|
+
init_plansClonePlan2();
|
|
65020
65386
|
init_plansCreatePlan2();
|
|
65021
65387
|
init_plansDeletePlan2();
|
|
65022
65388
|
init_plansGetPlan2();
|
|
65023
|
-
init_plansPostPlansIdClone2();
|
|
65024
65389
|
init_plansQueryPlan2();
|
|
65025
65390
|
init_plansSyncPlanPrices2();
|
|
65026
65391
|
init_plansUpdatePlan2();
|
|
@@ -65287,7 +65652,7 @@ Use when changing plan details (e.g. name, interval, or metadata). Partial updat
|
|
|
65287
65652
|
Use when retiring a plan (e.g. end-of-life). Existing subscriptions may be affected. Returns 200 with success message.`
|
|
65288
65653
|
},
|
|
65289
65654
|
{
|
|
65290
|
-
name: "
|
|
65655
|
+
name: "clone-plan",
|
|
65291
65656
|
description: `Clone a plan
|
|
65292
65657
|
|
|
65293
65658
|
Clone an existing plan, copying its active prices, published entitlements, and published credit grants`
|
|
@@ -69046,7 +69411,7 @@ var routes = buildRouteMap({
|
|
|
69046
69411
|
var app = buildApplication(routes, {
|
|
69047
69412
|
name: "mcp",
|
|
69048
69413
|
versionInfo: {
|
|
69049
|
-
currentVersion: "2.1.
|
|
69414
|
+
currentVersion: "2.1.3"
|
|
69050
69415
|
}
|
|
69051
69416
|
});
|
|
69052
69417
|
run(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -69054,5 +69419,5 @@ export {
|
|
|
69054
69419
|
app
|
|
69055
69420
|
};
|
|
69056
69421
|
|
|
69057
|
-
//# debugId=
|
|
69422
|
+
//# debugId=AA4FC1138BDCFCDB64756E2164756E21
|
|
69058
69423
|
//# sourceMappingURL=mcp-server.js.map
|