@flexprice/mcp-server 2.1.5 → 2.1.6
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 +70 -574
- package/bin/mcp-server.js.map +19 -32
- package/bun.lock +18 -18
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +1 -7
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/models/createpricerequest.d.ts +1 -1
- package/esm/models/createpricerequest.d.ts.map +1 -1
- package/esm/models/createpricerequest.js +1 -1
- package/esm/models/createpricerequest.js.map +1 -1
- package/esm/models/createsubscriptionrequest.d.ts +1 -2
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +1 -2
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
- package/esm/models/invoicebillingreason.d.ts +2 -0
- package/esm/models/invoicebillingreason.d.ts.map +1 -1
- package/esm/models/invoicebillingreason.js +2 -0
- package/esm/models/invoicebillingreason.js.map +1 -1
- package/esm/models/priceprice.d.ts +1 -1
- package/esm/models/priceprice.d.ts.map +1 -1
- package/esm/models/priceprice.js +1 -1
- package/esm/models/priceprice.js.map +1 -1
- package/esm/models/priceresponse.d.ts +1 -1
- package/esm/models/priceresponse.d.ts.map +1 -1
- package/esm/models/priceresponse.js +1 -1
- package/esm/models/priceresponse.js.map +1 -1
- package/esm/models/subscriptionfilter.d.ts +1 -0
- package/esm/models/subscriptionfilter.d.ts.map +1 -1
- package/esm/models/subscriptionfilter.js +1 -0
- package/esm/models/subscriptionfilter.js.map +1 -1
- package/esm/models/subscriptionlineitemresponse.d.ts +0 -1
- package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
- package/esm/models/subscriptionlineitemresponse.js +0 -1
- package/esm/models/subscriptionlineitemresponse.js.map +1 -1
- package/esm/models/subscriptionpricecreaterequest.d.ts +1 -1
- package/esm/models/subscriptionpricecreaterequest.d.ts.map +1 -1
- package/esm/models/subscriptionpricecreaterequest.js +1 -1
- package/esm/models/subscriptionpricecreaterequest.js.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts +0 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.js +0 -1
- package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
- 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.d.ts.map +1 -1
- package/esm/tool-names.js +0 -12
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/manifest.json +1 -13
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -7
- package/src/models/createpricerequest.ts +2 -2
- package/src/models/createsubscriptionrequest.ts +4 -4
- package/src/models/invoicebillingreason.ts +2 -0
- package/src/models/priceprice.ts +3 -3
- package/src/models/priceresponse.ts +3 -3
- package/src/models/subscriptionfilter.ts +4 -0
- package/src/models/subscriptionlineitemresponse.ts +0 -2
- package/src/models/subscriptionpricecreaterequest.ts +2 -2
- package/src/models/subscriptionsubscriptionlineitem.ts +0 -2
- package/src/models/windowsize.ts +2 -2
- package/src/tool-names.ts +0 -12
- package/esm/funcs/subscriptionsListSubscriptionPauses.d.ts +0 -16
- package/esm/funcs/subscriptionsListSubscriptionPauses.d.ts.map +0 -1
- package/esm/funcs/subscriptionsListSubscriptionPauses.js +0 -87
- package/esm/funcs/subscriptionsListSubscriptionPauses.js.map +0 -1
- package/esm/funcs/subscriptionsPauseSubscription.d.ts +0 -16
- package/esm/funcs/subscriptionsPauseSubscription.d.ts.map +0 -1
- package/esm/funcs/subscriptionsPauseSubscription.js +0 -88
- package/esm/funcs/subscriptionsPauseSubscription.js.map +0 -1
- package/esm/funcs/subscriptionsResumeSubscription.d.ts +0 -16
- package/esm/funcs/subscriptionsResumeSubscription.d.ts.map +0 -1
- package/esm/funcs/subscriptionsResumeSubscription.js +0 -88
- package/esm/funcs/subscriptionsResumeSubscription.js.map +0 -1
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.d.ts +0 -7
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.d.ts.map +0 -1
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.js +0 -35
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.js.map +0 -1
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.d.ts +0 -7
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.d.ts.map +0 -1
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.js +0 -35
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.js.map +0 -1
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.d.ts +0 -7
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.d.ts.map +0 -1
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.js +0 -35
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.js.map +0 -1
- package/esm/models/listsubscriptionpausesop.d.ts +0 -10
- package/esm/models/listsubscriptionpausesop.d.ts.map +0 -1
- package/esm/models/listsubscriptionpausesop.js +0 -14
- package/esm/models/listsubscriptionpausesop.js.map +0 -1
- package/esm/models/listsubscriptionpausesresponse.d.ts +0 -11
- package/esm/models/listsubscriptionpausesresponse.d.ts.map +0 -1
- package/esm/models/listsubscriptionpausesresponse.js +0 -10
- package/esm/models/listsubscriptionpausesresponse.js.map +0 -1
- package/esm/models/pausesubscriptionop.d.ts +0 -12
- package/esm/models/pausesubscriptionop.d.ts.map +0 -1
- package/esm/models/pausesubscriptionop.js +0 -16
- package/esm/models/pausesubscriptionop.js.map +0 -1
- package/esm/models/pausesubscriptionrequest.d.ts +0 -18
- package/esm/models/pausesubscriptionrequest.d.ts.map +0 -1
- package/esm/models/pausesubscriptionrequest.js +0 -15
- package/esm/models/pausesubscriptionrequest.js.map +0 -1
- package/esm/models/resumesubscriptionop.d.ts +0 -12
- package/esm/models/resumesubscriptionop.d.ts.map +0 -1
- package/esm/models/resumesubscriptionop.js +0 -16
- package/esm/models/resumesubscriptionop.js.map +0 -1
- package/esm/models/resumesubscriptionrequest.d.ts +0 -14
- package/esm/models/resumesubscriptionrequest.d.ts.map +0 -1
- package/esm/models/resumesubscriptionrequest.js +0 -11
- package/esm/models/resumesubscriptionrequest.js.map +0 -1
- package/esm/models/subscriptionpauseresponse.d.ts +0 -33
- package/esm/models/subscriptionpauseresponse.d.ts.map +0 -1
- package/esm/models/subscriptionpauseresponse.js +0 -30
- package/esm/models/subscriptionpauseresponse.js.map +0 -1
- package/src/funcs/subscriptionsListSubscriptionPauses.ts +0 -152
- package/src/funcs/subscriptionsPauseSubscription.ts +0 -153
- package/src/funcs/subscriptionsResumeSubscription.ts +0 -153
- package/src/mcp-server/tools/subscriptionsListSubscriptionPauses.ts +0 -45
- package/src/mcp-server/tools/subscriptionsPauseSubscription.ts +0 -44
- package/src/mcp-server/tools/subscriptionsResumeSubscription.ts +0 -44
- package/src/models/listsubscriptionpausesop.ts +0 -29
- package/src/models/listsubscriptionpausesresponse.ts +0 -28
- package/src/models/pausesubscriptionop.ts +0 -39
- package/src/models/pausesubscriptionrequest.ts +0 -45
- package/src/models/resumesubscriptionop.ts +0 -39
- package/src/models/resumesubscriptionrequest.ts +0 -27
- package/src/models/subscriptionpauseresponse.ts +0 -74
package/bin/mcp-server.js
CHANGED
|
@@ -40992,7 +40992,7 @@ var require_core = __commonJS((exports) => {
|
|
|
40992
40992
|
constructor(opts = {}) {
|
|
40993
40993
|
this.schemas = {};
|
|
40994
40994
|
this.refs = {};
|
|
40995
|
-
this.formats =
|
|
40995
|
+
this.formats = Object.create(null);
|
|
40996
40996
|
this._compilations = new Set;
|
|
40997
40997
|
this._loading = {};
|
|
40998
40998
|
this._cache = new Map;
|
|
@@ -46634,7 +46634,7 @@ var require_core3 = __commonJS((exports) => {
|
|
|
46634
46634
|
constructor(opts = {}) {
|
|
46635
46635
|
this.schemas = {};
|
|
46636
46636
|
this.refs = {};
|
|
46637
|
-
this.formats =
|
|
46637
|
+
this.formats = Object.create(null);
|
|
46638
46638
|
this._compilations = new Set;
|
|
46639
46639
|
this._loading = {};
|
|
46640
46640
|
this._cache = new Map;
|
|
@@ -50571,9 +50571,9 @@ var init_config = __esm(() => {
|
|
|
50571
50571
|
SDK_METADATA = {
|
|
50572
50572
|
language: "typescript",
|
|
50573
50573
|
openapiDocVersion: "1.0",
|
|
50574
|
-
sdkVersion: "2.1.
|
|
50574
|
+
sdkVersion: "2.1.6",
|
|
50575
50575
|
genVersion: "2.881.4",
|
|
50576
|
-
userAgent: "speakeasy-sdk/mcp-typescript 2.1.
|
|
50576
|
+
userAgent: "speakeasy-sdk/mcp-typescript 2.1.6 2.881.4 1.0 @flexprice/mcp-server"
|
|
50577
50577
|
};
|
|
50578
50578
|
});
|
|
50579
50579
|
|
|
@@ -52793,7 +52793,6 @@ var WindowSize$zodSchema;
|
|
|
52793
52793
|
var init_windowsize = __esm(() => {
|
|
52794
52794
|
init_zod();
|
|
52795
52795
|
WindowSize$zodSchema = _enum([
|
|
52796
|
-
"MONTH",
|
|
52797
52796
|
"MINUTE",
|
|
52798
52797
|
"15MIN",
|
|
52799
52798
|
"30MIN",
|
|
@@ -52802,7 +52801,8 @@ var init_windowsize = __esm(() => {
|
|
|
52802
52801
|
"6HOUR",
|
|
52803
52802
|
"12HOUR",
|
|
52804
52803
|
"DAY",
|
|
52805
|
-
"WEEK"
|
|
52804
|
+
"WEEK",
|
|
52805
|
+
"MONTH"
|
|
52806
52806
|
]);
|
|
52807
52807
|
});
|
|
52808
52808
|
|
|
@@ -54139,7 +54139,7 @@ For USD: $12.50`),
|
|
|
54139
54139
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
54140
54140
|
tiers: array(PricePriceTier$zodSchema).optional(),
|
|
54141
54141
|
transform_quantity: PriceJSONBTransformQuantity$zodSchema.optional(),
|
|
54142
|
-
|
|
54142
|
+
trial_period_days: int().optional().describe(`TrialPeriodDays is the number of days for the trial period
|
|
54143
54143
|
Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)`),
|
|
54144
54144
|
type: PriceType$zodSchema.optional(),
|
|
54145
54145
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
@@ -54243,7 +54243,6 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54243
54243
|
subscription_id: string2().optional(),
|
|
54244
54244
|
subscription_phase_id: string2().optional(),
|
|
54245
54245
|
tenant_id: string2().optional(),
|
|
54246
|
-
trial_period: int().optional(),
|
|
54247
54246
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
54248
54247
|
updated_by: string2().optional()
|
|
54249
54248
|
});
|
|
@@ -55570,6 +55569,7 @@ var init_invoicebillingreason = __esm(() => {
|
|
|
55570
55569
|
"SUBSCRIPTION_CREATE",
|
|
55571
55570
|
"SUBSCRIPTION_CYCLE",
|
|
55572
55571
|
"SUBSCRIPTION_UPDATE",
|
|
55572
|
+
"SUBSCRIPTION_TRIAL_END",
|
|
55573
55573
|
"PRORATION",
|
|
55574
55574
|
"MANUAL"
|
|
55575
55575
|
]);
|
|
@@ -56547,7 +56547,7 @@ For USD: $12.50`),
|
|
|
56547
56547
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
56548
56548
|
tiers: array(PricePriceTier$zodSchema).optional(),
|
|
56549
56549
|
transform_quantity: PriceJSONBTransformQuantity$zodSchema.optional(),
|
|
56550
|
-
|
|
56550
|
+
trial_period_days: int().optional().describe(`TrialPeriodDays is the number of days for the trial period
|
|
56551
56551
|
Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)`),
|
|
56552
56552
|
type: PriceType$zodSchema.optional(),
|
|
56553
56553
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
@@ -59437,7 +59437,7 @@ var init_createpricerequest = __esm(() => {
|
|
|
59437
59437
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
59438
59438
|
tiers: array(CreatePriceTier$zodSchema).optional(),
|
|
59439
59439
|
transform_quantity: PriceTransformQuantity$zodSchema.optional(),
|
|
59440
|
-
|
|
59440
|
+
trial_period_days: int().optional(),
|
|
59441
59441
|
type: PriceType$zodSchema
|
|
59442
59442
|
});
|
|
59443
59443
|
});
|
|
@@ -61118,7 +61118,7 @@ var init_subscriptionpricecreaterequest = __esm(() => {
|
|
|
61118
61118
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
61119
61119
|
tiers: array(CreatePriceTier$zodSchema).optional(),
|
|
61120
61120
|
transform_quantity: PriceTransformQuantity$zodSchema.optional(),
|
|
61121
|
-
|
|
61121
|
+
trial_period_days: int().optional(),
|
|
61122
61122
|
type: PriceType$zodSchema
|
|
61123
61123
|
});
|
|
61124
61124
|
});
|
|
@@ -61288,8 +61288,8 @@ and must be same as what you provided as external_id while creating the customer
|
|
|
61288
61288
|
start_date: exports_iso.datetime({ offset: true }).optional(),
|
|
61289
61289
|
subscription_status: SubscriptionStatus$zodSchema.optional(),
|
|
61290
61290
|
tax_rate_overrides: array(TaxRateOverride$zodSchema).optional().describe("tax_rate_overrides is the tax rate overrides\tto be applied to the subscription"),
|
|
61291
|
-
|
|
61292
|
-
|
|
61291
|
+
trial_period_days: int().optional().describe(`TrialPeriodDays: nil = inherit trial length from plan recurring-fixed prices (must be uniform).
|
|
61292
|
+
0 = explicitly no trial (overrides catalog). >0 = override duration in days.`)
|
|
61293
61293
|
});
|
|
61294
61294
|
});
|
|
61295
61295
|
|
|
@@ -61450,7 +61450,6 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61450
61450
|
subscription_id: string2().optional(),
|
|
61451
61451
|
subscription_phase_id: string2().optional(),
|
|
61452
61452
|
tenant_id: string2().optional(),
|
|
61453
|
-
trial_period: int().optional(),
|
|
61454
61453
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
61455
61454
|
updated_by: string2().optional()
|
|
61456
61455
|
});
|
|
@@ -63728,179 +63727,6 @@ Use when listing or searching scheduled changes across subscriptions (e.g. admin
|
|
|
63728
63727
|
};
|
|
63729
63728
|
});
|
|
63730
63729
|
|
|
63731
|
-
// src/models/subscriptionpauseresponse.ts
|
|
63732
|
-
var SubscriptionPauseResponse$zodSchema;
|
|
63733
|
-
var init_subscriptionpauseresponse = __esm(() => {
|
|
63734
|
-
init_zod();
|
|
63735
|
-
init_pausemode();
|
|
63736
|
-
init_pausestatus();
|
|
63737
|
-
init_resumemode();
|
|
63738
|
-
init_status();
|
|
63739
|
-
SubscriptionPauseResponse$zodSchema = object({
|
|
63740
|
-
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
63741
|
-
created_by: string2().optional(),
|
|
63742
|
-
environment_id: string2().optional().describe("EnvironmentID is the environment identifier for the pause"),
|
|
63743
|
-
id: string2().optional().describe("ID is the unique identifier for the subscription pause"),
|
|
63744
|
-
metadata: record(string2(), string2()).optional(),
|
|
63745
|
-
original_period_end: exports_iso.datetime({ offset: true }).optional().describe("OriginalPeriodEnd is the end of the billing period when the pause was created"),
|
|
63746
|
-
original_period_start: exports_iso.datetime({ offset: true }).optional().describe("OriginalPeriodStart is the start of the billing period when the pause was created"),
|
|
63747
|
-
pause_end: exports_iso.datetime({ offset: true }).optional().describe("PauseEnd is when the pause will end (null for indefinite)"),
|
|
63748
|
-
pause_mode: PauseMode$zodSchema.optional(),
|
|
63749
|
-
pause_start: exports_iso.datetime({ offset: true }).optional().describe("PauseStart is when the pause actually started"),
|
|
63750
|
-
pause_status: PauseStatus$zodSchema.optional(),
|
|
63751
|
-
reason: string2().optional().describe("Reason is the reason for pausing"),
|
|
63752
|
-
resume_mode: ResumeMode$zodSchema.optional(),
|
|
63753
|
-
resumed_at: exports_iso.datetime({ offset: true }).optional().describe("ResumedAt is when the pause was actually ended (if manually resumed)"),
|
|
63754
|
-
status: Status$zodSchema.optional(),
|
|
63755
|
-
subscription_id: string2().optional().describe("SubscriptionID is the identifier for the subscription"),
|
|
63756
|
-
tenant_id: string2().optional(),
|
|
63757
|
-
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
63758
|
-
updated_by: string2().optional()
|
|
63759
|
-
}).describe("Response object containing subscription pause information");
|
|
63760
|
-
});
|
|
63761
|
-
|
|
63762
|
-
// src/models/listsubscriptionpausesresponse.ts
|
|
63763
|
-
var ListSubscriptionPausesResponse$zodSchema;
|
|
63764
|
-
var init_listsubscriptionpausesresponse = __esm(() => {
|
|
63765
|
-
init_zod();
|
|
63766
|
-
init_subscriptionpauseresponse();
|
|
63767
|
-
ListSubscriptionPausesResponse$zodSchema = object({
|
|
63768
|
-
items: array(SubscriptionPauseResponse$zodSchema).optional().describe(`List of subscription pause objects
|
|
63769
|
-
@Description Array of subscription pauses`),
|
|
63770
|
-
total: int().optional().describe(`Total number of pauses
|
|
63771
|
-
@Description Total count of subscription pauses in the response`)
|
|
63772
|
-
}).describe("Response object for listing subscription pauses with total count");
|
|
63773
|
-
});
|
|
63774
|
-
|
|
63775
|
-
// src/models/listsubscriptionpausesop.ts
|
|
63776
|
-
var ListSubscriptionPausesRequest$zodSchema, ListSubscriptionPausesResponseResponse$zodSchema;
|
|
63777
|
-
var init_listsubscriptionpausesop = __esm(() => {
|
|
63778
|
-
init_zod();
|
|
63779
|
-
init_errorresponse();
|
|
63780
|
-
init_listsubscriptionpausesresponse();
|
|
63781
|
-
ListSubscriptionPausesRequest$zodSchema = object({
|
|
63782
|
-
id: string2().describe("Subscription ID")
|
|
63783
|
-
});
|
|
63784
|
-
ListSubscriptionPausesResponseResponse$zodSchema = union([
|
|
63785
|
-
array(ListSubscriptionPausesResponse$zodSchema).describe("OK"),
|
|
63786
|
-
ErrorResponse$zodSchema
|
|
63787
|
-
]);
|
|
63788
|
-
});
|
|
63789
|
-
|
|
63790
|
-
// src/funcs/subscriptionsListSubscriptionPauses.ts
|
|
63791
|
-
function subscriptionsListSubscriptionPauses(client$, request, options) {
|
|
63792
|
-
return new APIPromise($do64(client$, request, options));
|
|
63793
|
-
}
|
|
63794
|
-
async function $do64(client$, request, options) {
|
|
63795
|
-
const parsed$ = safeParse4(request, (value$) => ListSubscriptionPausesRequest$zodSchema.parse(value$), "Input validation failed");
|
|
63796
|
-
if (!parsed$.ok) {
|
|
63797
|
-
return [parsed$, { status: "invalid" }];
|
|
63798
|
-
}
|
|
63799
|
-
const payload$ = parsed$.value;
|
|
63800
|
-
const body$ = null;
|
|
63801
|
-
const pathParams$ = {
|
|
63802
|
-
id: encodeSimple("id", payload$.id, {
|
|
63803
|
-
explode: false,
|
|
63804
|
-
charEncoding: "percent"
|
|
63805
|
-
})
|
|
63806
|
-
};
|
|
63807
|
-
const path$ = pathToFunc("/subscriptions/{id}/pauses")(pathParams$);
|
|
63808
|
-
const headers$ = new Headers(compactMap({
|
|
63809
|
-
Accept: "application/json"
|
|
63810
|
-
}));
|
|
63811
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
63812
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
63813
|
-
const context = {
|
|
63814
|
-
options: client$._options,
|
|
63815
|
-
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
63816
|
-
operationID: "listSubscriptionPauses",
|
|
63817
|
-
oAuth2Scopes: null,
|
|
63818
|
-
resolvedSecurity: requestSecurity,
|
|
63819
|
-
securitySource: client$._options.security,
|
|
63820
|
-
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
63821
|
-
retryCodes: options?.retryCodes || [
|
|
63822
|
-
"429",
|
|
63823
|
-
"500",
|
|
63824
|
-
"502",
|
|
63825
|
-
"503",
|
|
63826
|
-
"504"
|
|
63827
|
-
]
|
|
63828
|
-
};
|
|
63829
|
-
const requestRes = client$._createRequest(context, {
|
|
63830
|
-
security: requestSecurity,
|
|
63831
|
-
method: "GET",
|
|
63832
|
-
baseURL: options?.serverURL,
|
|
63833
|
-
path: path$,
|
|
63834
|
-
headers: headers$,
|
|
63835
|
-
body: body$,
|
|
63836
|
-
userAgent: client$._options.userAgent,
|
|
63837
|
-
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
63838
|
-
}, options);
|
|
63839
|
-
if (!requestRes.ok) {
|
|
63840
|
-
return [requestRes, { status: "invalid" }];
|
|
63841
|
-
}
|
|
63842
|
-
const req$ = requestRes.value;
|
|
63843
|
-
const doResult = await client$._do(req$, {
|
|
63844
|
-
context,
|
|
63845
|
-
errorCodes: [],
|
|
63846
|
-
retryConfig: context.retryConfig,
|
|
63847
|
-
retryCodes: context.retryCodes
|
|
63848
|
-
});
|
|
63849
|
-
if (!doResult.ok) {
|
|
63850
|
-
return [doResult, { status: "request-error", request: req$ }];
|
|
63851
|
-
}
|
|
63852
|
-
return [doResult, {
|
|
63853
|
-
status: "complete",
|
|
63854
|
-
request: req$,
|
|
63855
|
-
response: doResult.value
|
|
63856
|
-
}];
|
|
63857
|
-
}
|
|
63858
|
-
var init_subscriptionsListSubscriptionPauses = __esm(() => {
|
|
63859
|
-
init_encodings();
|
|
63860
|
-
init_primitives();
|
|
63861
|
-
init_schemas4();
|
|
63862
|
-
init_security();
|
|
63863
|
-
init_url();
|
|
63864
|
-
init_listsubscriptionpausesop();
|
|
63865
|
-
init_async();
|
|
63866
|
-
});
|
|
63867
|
-
|
|
63868
|
-
// src/mcp-server/tools/subscriptionsListSubscriptionPauses.ts
|
|
63869
|
-
var args63, tool$subscriptionsListSubscriptionPauses;
|
|
63870
|
-
var init_subscriptionsListSubscriptionPauses2 = __esm(() => {
|
|
63871
|
-
init_subscriptionsListSubscriptionPauses();
|
|
63872
|
-
init_listsubscriptionpausesop();
|
|
63873
|
-
init_tools();
|
|
63874
|
-
args63 = {
|
|
63875
|
-
request: ListSubscriptionPausesRequest$zodSchema
|
|
63876
|
-
};
|
|
63877
|
-
tool$subscriptionsListSubscriptionPauses = {
|
|
63878
|
-
name: "list-subscription-pauses",
|
|
63879
|
-
description: `List all pauses for a subscription
|
|
63880
|
-
|
|
63881
|
-
Use when showing pause history for a subscription (e.g. support or audit). Returns all past and future pauses.`,
|
|
63882
|
-
scopes: ["read"],
|
|
63883
|
-
annotations: {
|
|
63884
|
-
title: "",
|
|
63885
|
-
destructiveHint: false,
|
|
63886
|
-
idempotentHint: false,
|
|
63887
|
-
openWorldHint: false,
|
|
63888
|
-
readOnlyHint: true
|
|
63889
|
-
},
|
|
63890
|
-
args: args63,
|
|
63891
|
-
tool: async (client, args64, ctx) => {
|
|
63892
|
-
const [result] = await subscriptionsListSubscriptionPauses(client, args64.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63893
|
-
if (!result.ok) {
|
|
63894
|
-
return {
|
|
63895
|
-
content: [{ type: "text", text: result.error.message }],
|
|
63896
|
-
isError: true
|
|
63897
|
-
};
|
|
63898
|
-
}
|
|
63899
|
-
return formatResult(result.value);
|
|
63900
|
-
}
|
|
63901
|
-
};
|
|
63902
|
-
});
|
|
63903
|
-
|
|
63904
63730
|
// src/models/listsubscriptionschedulesop.ts
|
|
63905
63731
|
var ListSubscriptionSchedulesRequest$zodSchema;
|
|
63906
63732
|
var init_listsubscriptionschedulesop = __esm(() => {
|
|
@@ -63912,9 +63738,9 @@ var init_listsubscriptionschedulesop = __esm(() => {
|
|
|
63912
63738
|
|
|
63913
63739
|
// src/funcs/subscriptionsListSubscriptionSchedules.ts
|
|
63914
63740
|
function subscriptionsListSubscriptionSchedules(client$, request, options) {
|
|
63915
|
-
return new APIPromise($
|
|
63741
|
+
return new APIPromise($do64(client$, request, options));
|
|
63916
63742
|
}
|
|
63917
|
-
async function $
|
|
63743
|
+
async function $do64(client$, request, options) {
|
|
63918
63744
|
const parsed$ = safeParse4(request, (value$) => ListSubscriptionSchedulesRequest$zodSchema.parse(value$), "Input validation failed");
|
|
63919
63745
|
if (!parsed$.ok) {
|
|
63920
63746
|
return [parsed$, { status: "invalid" }];
|
|
@@ -63989,12 +63815,12 @@ var init_subscriptionsListSubscriptionSchedules = __esm(() => {
|
|
|
63989
63815
|
});
|
|
63990
63816
|
|
|
63991
63817
|
// src/mcp-server/tools/subscriptionsListSubscriptionSchedules.ts
|
|
63992
|
-
var
|
|
63818
|
+
var args63, tool$subscriptionsListSubscriptionSchedules;
|
|
63993
63819
|
var init_subscriptionsListSubscriptionSchedules2 = __esm(() => {
|
|
63994
63820
|
init_subscriptionsListSubscriptionSchedules();
|
|
63995
63821
|
init_listsubscriptionschedulesop();
|
|
63996
63822
|
init_tools();
|
|
63997
|
-
|
|
63823
|
+
args63 = {
|
|
63998
63824
|
request: ListSubscriptionSchedulesRequest$zodSchema
|
|
63999
63825
|
};
|
|
64000
63826
|
tool$subscriptionsListSubscriptionSchedules = {
|
|
@@ -64010,169 +63836,9 @@ Use when listing scheduled changes for a subscription (e.g. upcoming plan change
|
|
|
64010
63836
|
openWorldHint: false,
|
|
64011
63837
|
readOnlyHint: true
|
|
64012
63838
|
},
|
|
64013
|
-
args:
|
|
64014
|
-
tool: async (client,
|
|
64015
|
-
const [result] = await subscriptionsListSubscriptionSchedules(client,
|
|
64016
|
-
if (!result.ok) {
|
|
64017
|
-
return {
|
|
64018
|
-
content: [{ type: "text", text: result.error.message }],
|
|
64019
|
-
isError: true
|
|
64020
|
-
};
|
|
64021
|
-
}
|
|
64022
|
-
return formatResult(result.value);
|
|
64023
|
-
}
|
|
64024
|
-
};
|
|
64025
|
-
});
|
|
64026
|
-
|
|
64027
|
-
// src/models/pausesubscriptionrequest.ts
|
|
64028
|
-
var PauseSubscriptionRequest$zodSchema;
|
|
64029
|
-
var init_pausesubscriptionrequest = __esm(() => {
|
|
64030
|
-
init_zod();
|
|
64031
|
-
init_pausemode();
|
|
64032
|
-
PauseSubscriptionRequest$zodSchema = object({
|
|
64033
|
-
dry_run: boolean2().optional().describe(`Whether to perform a dry run
|
|
64034
|
-
@Description If true, validates the request and shows impact without actually pausing the subscription
|
|
64035
|
-
@Example false`),
|
|
64036
|
-
metadata: record(string2(), string2()).optional().describe(`Additional metadata as key-value pairs
|
|
64037
|
-
@Description Optional metadata for storing additional information about the pause
|
|
64038
|
-
@Example {"requested_by": "customer", "channel": "support_ticket"}`),
|
|
64039
|
-
pause_days: int().optional().describe(`Duration of the pause in days
|
|
64040
|
-
@Description Number of days to pause the subscription. Cannot be used together with pause_end. Must be greater than 0
|
|
64041
|
-
@Example 30`),
|
|
64042
|
-
pause_end: exports_iso.datetime({ offset: true }).optional().describe(`End date for the subscription pause
|
|
64043
|
-
@Description ISO 8601 timestamp when the pause should end. Cannot be used together with pause_days. Must be after pause_start
|
|
64044
|
-
@Example "2024-02-15T00:00:00Z"`),
|
|
64045
|
-
pause_mode: PauseMode$zodSchema,
|
|
64046
|
-
pause_start: exports_iso.datetime({ offset: true }).optional().describe(`Start date for the subscription pause
|
|
64047
|
-
@Description ISO 8601 timestamp when the pause should begin. Required when pause_mode is "scheduled"
|
|
64048
|
-
@Example "2024-01-15T00:00:00Z"`),
|
|
64049
|
-
reason: string2().optional().describe(`Reason for pausing the subscription
|
|
64050
|
-
@Description Optional reason for the pause. Maximum 255 characters
|
|
64051
|
-
@Example "Customer requested temporary suspension"`)
|
|
64052
|
-
}).describe("Request object for pausing an active subscription with various pause modes and options");
|
|
64053
|
-
});
|
|
64054
|
-
|
|
64055
|
-
// src/models/pausesubscriptionop.ts
|
|
64056
|
-
var PauseSubscriptionRequestRequest$zodSchema, PauseSubscriptionResponse$zodSchema;
|
|
64057
|
-
var init_pausesubscriptionop = __esm(() => {
|
|
64058
|
-
init_zod();
|
|
64059
|
-
init_errorresponse();
|
|
64060
|
-
init_pausesubscriptionrequest();
|
|
64061
|
-
init_subscriptionpauseresponse();
|
|
64062
|
-
PauseSubscriptionRequestRequest$zodSchema = object({
|
|
64063
|
-
body: PauseSubscriptionRequest$zodSchema.describe("Pause subscription request"),
|
|
64064
|
-
id: string2().describe("Subscription ID")
|
|
64065
|
-
});
|
|
64066
|
-
PauseSubscriptionResponse$zodSchema = union([
|
|
64067
|
-
SubscriptionPauseResponse$zodSchema,
|
|
64068
|
-
ErrorResponse$zodSchema
|
|
64069
|
-
]);
|
|
64070
|
-
});
|
|
64071
|
-
|
|
64072
|
-
// src/funcs/subscriptionsPauseSubscription.ts
|
|
64073
|
-
function subscriptionsPauseSubscription(client$, request, options) {
|
|
64074
|
-
return new APIPromise($do66(client$, request, options));
|
|
64075
|
-
}
|
|
64076
|
-
async function $do66(client$, request, options) {
|
|
64077
|
-
const parsed$ = safeParse4(request, (value$) => PauseSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64078
|
-
if (!parsed$.ok) {
|
|
64079
|
-
return [parsed$, { status: "invalid" }];
|
|
64080
|
-
}
|
|
64081
|
-
const payload$ = parsed$.value;
|
|
64082
|
-
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
64083
|
-
const pathParams$ = {
|
|
64084
|
-
id: encodeSimple("id", payload$.id, {
|
|
64085
|
-
explode: false,
|
|
64086
|
-
charEncoding: "percent"
|
|
64087
|
-
})
|
|
64088
|
-
};
|
|
64089
|
-
const path$ = pathToFunc("/subscriptions/{id}/pause")(pathParams$);
|
|
64090
|
-
const headers$ = new Headers(compactMap({
|
|
64091
|
-
"Content-Type": "application/json",
|
|
64092
|
-
Accept: "application/json"
|
|
64093
|
-
}));
|
|
64094
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
64095
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64096
|
-
const context = {
|
|
64097
|
-
options: client$._options,
|
|
64098
|
-
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
64099
|
-
operationID: "pauseSubscription",
|
|
64100
|
-
oAuth2Scopes: null,
|
|
64101
|
-
resolvedSecurity: requestSecurity,
|
|
64102
|
-
securitySource: client$._options.security,
|
|
64103
|
-
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
64104
|
-
retryCodes: options?.retryCodes || [
|
|
64105
|
-
"429",
|
|
64106
|
-
"500",
|
|
64107
|
-
"502",
|
|
64108
|
-
"503",
|
|
64109
|
-
"504"
|
|
64110
|
-
]
|
|
64111
|
-
};
|
|
64112
|
-
const requestRes = client$._createRequest(context, {
|
|
64113
|
-
security: requestSecurity,
|
|
64114
|
-
method: "POST",
|
|
64115
|
-
baseURL: options?.serverURL,
|
|
64116
|
-
path: path$,
|
|
64117
|
-
headers: headers$,
|
|
64118
|
-
body: body$,
|
|
64119
|
-
userAgent: client$._options.userAgent,
|
|
64120
|
-
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
64121
|
-
}, options);
|
|
64122
|
-
if (!requestRes.ok) {
|
|
64123
|
-
return [requestRes, { status: "invalid" }];
|
|
64124
|
-
}
|
|
64125
|
-
const req$ = requestRes.value;
|
|
64126
|
-
const doResult = await client$._do(req$, {
|
|
64127
|
-
context,
|
|
64128
|
-
errorCodes: [],
|
|
64129
|
-
retryConfig: context.retryConfig,
|
|
64130
|
-
retryCodes: context.retryCodes
|
|
64131
|
-
});
|
|
64132
|
-
if (!doResult.ok) {
|
|
64133
|
-
return [doResult, { status: "request-error", request: req$ }];
|
|
64134
|
-
}
|
|
64135
|
-
return [doResult, {
|
|
64136
|
-
status: "complete",
|
|
64137
|
-
request: req$,
|
|
64138
|
-
response: doResult.value
|
|
64139
|
-
}];
|
|
64140
|
-
}
|
|
64141
|
-
var init_subscriptionsPauseSubscription = __esm(() => {
|
|
64142
|
-
init_encodings();
|
|
64143
|
-
init_primitives();
|
|
64144
|
-
init_schemas4();
|
|
64145
|
-
init_security();
|
|
64146
|
-
init_url();
|
|
64147
|
-
init_pausesubscriptionop();
|
|
64148
|
-
init_async();
|
|
64149
|
-
});
|
|
64150
|
-
|
|
64151
|
-
// src/mcp-server/tools/subscriptionsPauseSubscription.ts
|
|
64152
|
-
var args65, tool$subscriptionsPauseSubscription;
|
|
64153
|
-
var init_subscriptionsPauseSubscription2 = __esm(() => {
|
|
64154
|
-
init_subscriptionsPauseSubscription();
|
|
64155
|
-
init_pausesubscriptionop();
|
|
64156
|
-
init_tools();
|
|
64157
|
-
args65 = {
|
|
64158
|
-
request: PauseSubscriptionRequestRequest$zodSchema
|
|
64159
|
-
};
|
|
64160
|
-
tool$subscriptionsPauseSubscription = {
|
|
64161
|
-
name: "pause-subscription",
|
|
64162
|
-
description: `Pause a subscription
|
|
64163
|
-
|
|
64164
|
-
Use when temporarily stopping a subscription (e.g. customer hold or seasonal pause). Billing and access pause; resume when ready.`,
|
|
64165
|
-
scopes: ["write"],
|
|
64166
|
-
annotations: {
|
|
64167
|
-
title: "",
|
|
64168
|
-
destructiveHint: false,
|
|
64169
|
-
idempotentHint: false,
|
|
64170
|
-
openWorldHint: false,
|
|
64171
|
-
readOnlyHint: false
|
|
64172
|
-
},
|
|
64173
|
-
args: args65,
|
|
64174
|
-
tool: async (client, args66, ctx) => {
|
|
64175
|
-
const [result] = await subscriptionsPauseSubscription(client, args66.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63839
|
+
args: args63,
|
|
63840
|
+
tool: async (client, args64, ctx) => {
|
|
63841
|
+
const [result] = await subscriptionsListSubscriptionSchedules(client, args64.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64176
63842
|
if (!result.ok) {
|
|
64177
63843
|
return {
|
|
64178
63844
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64284,9 +63950,9 @@ var init_previewsubscriptionchangeop = __esm(() => {
|
|
|
64284
63950
|
|
|
64285
63951
|
// src/funcs/subscriptionsPreviewSubscriptionChange.ts
|
|
64286
63952
|
function subscriptionsPreviewSubscriptionChange(client$, request, options) {
|
|
64287
|
-
return new APIPromise($
|
|
63953
|
+
return new APIPromise($do65(client$, request, options));
|
|
64288
63954
|
}
|
|
64289
|
-
async function $
|
|
63955
|
+
async function $do65(client$, request, options) {
|
|
64290
63956
|
const parsed$ = safeParse4(request, (value$) => PreviewSubscriptionChangeRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64291
63957
|
if (!parsed$.ok) {
|
|
64292
63958
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64362,12 +64028,12 @@ var init_subscriptionsPreviewSubscriptionChange = __esm(() => {
|
|
|
64362
64028
|
});
|
|
64363
64029
|
|
|
64364
64030
|
// src/mcp-server/tools/subscriptionsPreviewSubscriptionChange.ts
|
|
64365
|
-
var
|
|
64031
|
+
var args64, tool$subscriptionsPreviewSubscriptionChange;
|
|
64366
64032
|
var init_subscriptionsPreviewSubscriptionChange2 = __esm(() => {
|
|
64367
64033
|
init_subscriptionsPreviewSubscriptionChange();
|
|
64368
64034
|
init_previewsubscriptionchangeop();
|
|
64369
64035
|
init_tools();
|
|
64370
|
-
|
|
64036
|
+
args64 = {
|
|
64371
64037
|
request: PreviewSubscriptionChangeRequest$zodSchema
|
|
64372
64038
|
};
|
|
64373
64039
|
tool$subscriptionsPreviewSubscriptionChange = {
|
|
@@ -64383,9 +64049,9 @@ Use when showing a customer the cost of a plan change before they confirm (e.g.
|
|
|
64383
64049
|
openWorldHint: false,
|
|
64384
64050
|
readOnlyHint: false
|
|
64385
64051
|
},
|
|
64386
|
-
args:
|
|
64387
|
-
tool: async (client,
|
|
64388
|
-
const [result] = await subscriptionsPreviewSubscriptionChange(client,
|
|
64052
|
+
args: args64,
|
|
64053
|
+
tool: async (client, args65, ctx) => {
|
|
64054
|
+
const [result] = await subscriptionsPreviewSubscriptionChange(client, args65.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64389
64055
|
if (!result.ok) {
|
|
64390
64056
|
return {
|
|
64391
64057
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64416,9 +64082,9 @@ var init_previewsubscriptionmodifyop = __esm(() => {
|
|
|
64416
64082
|
|
|
64417
64083
|
// src/funcs/subscriptionsPreviewSubscriptionModify.ts
|
|
64418
64084
|
function subscriptionsPreviewSubscriptionModify(client$, request, options) {
|
|
64419
|
-
return new APIPromise($
|
|
64085
|
+
return new APIPromise($do66(client$, request, options));
|
|
64420
64086
|
}
|
|
64421
|
-
async function $
|
|
64087
|
+
async function $do66(client$, request, options) {
|
|
64422
64088
|
const parsed$ = safeParse4(request, (value$) => PreviewSubscriptionModifyRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64423
64089
|
if (!parsed$.ok) {
|
|
64424
64090
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64494,12 +64160,12 @@ var init_subscriptionsPreviewSubscriptionModify = __esm(() => {
|
|
|
64494
64160
|
});
|
|
64495
64161
|
|
|
64496
64162
|
// src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts
|
|
64497
|
-
var
|
|
64163
|
+
var args65, tool$subscriptionsPreviewSubscriptionModify;
|
|
64498
64164
|
var init_subscriptionsPreviewSubscriptionModify2 = __esm(() => {
|
|
64499
64165
|
init_subscriptionsPreviewSubscriptionModify();
|
|
64500
64166
|
init_previewsubscriptionmodifyop();
|
|
64501
64167
|
init_tools();
|
|
64502
|
-
|
|
64168
|
+
args65 = {
|
|
64503
64169
|
request: PreviewSubscriptionModifyRequest$zodSchema
|
|
64504
64170
|
};
|
|
64505
64171
|
tool$subscriptionsPreviewSubscriptionModify = {
|
|
@@ -64515,9 +64181,9 @@ Preview the impact of a mid-cycle subscription modification without committing c
|
|
|
64515
64181
|
openWorldHint: false,
|
|
64516
64182
|
readOnlyHint: true
|
|
64517
64183
|
},
|
|
64518
|
-
args:
|
|
64519
|
-
tool: async (client,
|
|
64520
|
-
const [result] = await subscriptionsPreviewSubscriptionModify(client,
|
|
64184
|
+
args: args65,
|
|
64185
|
+
tool: async (client, args66, ctx) => {
|
|
64186
|
+
const [result] = await subscriptionsPreviewSubscriptionModify(client, args66.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64521
64187
|
if (!result.ok) {
|
|
64522
64188
|
return {
|
|
64523
64189
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64569,15 +64235,17 @@ When nil, period/cancel cutoff logic is not applied by this field (see TimeRange
|
|
|
64569
64235
|
subscription_ids: array(string2()).optional(),
|
|
64570
64236
|
subscription_status: array(SubscriptionStatus$zodSchema).optional().describe("SubscriptionStatus filters by subscription status"),
|
|
64571
64237
|
subscription_type: array(SubscriptionType$zodSchema).optional().describe("SubscriptionType filters by subscription type"),
|
|
64238
|
+
trial_end_due_lte: exports_iso.datetime({ offset: true }).optional().describe(`TrialEndDueLTE, when set, restricts to subscriptions with trial_end not nil and trial_end <= trial_end_due_lte.
|
|
64239
|
+
Use with subscription_status trialing for trial-end cron processing.`),
|
|
64572
64240
|
with_line_items: boolean2().optional().describe("WithLineItems includes line items in the response")
|
|
64573
64241
|
});
|
|
64574
64242
|
});
|
|
64575
64243
|
|
|
64576
64244
|
// src/funcs/subscriptionsQuerySubscription.ts
|
|
64577
64245
|
function subscriptionsQuerySubscription(client$, request, options) {
|
|
64578
|
-
return new APIPromise($
|
|
64246
|
+
return new APIPromise($do67(client$, request, options));
|
|
64579
64247
|
}
|
|
64580
|
-
async function $
|
|
64248
|
+
async function $do67(client$, request, options) {
|
|
64581
64249
|
const parsed$ = safeParse4(request, (value$) => SubscriptionFilter$zodSchema.parse(value$), "Input validation failed");
|
|
64582
64250
|
if (!parsed$.ok) {
|
|
64583
64251
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64647,12 +64315,12 @@ var init_subscriptionsQuerySubscription = __esm(() => {
|
|
|
64647
64315
|
});
|
|
64648
64316
|
|
|
64649
64317
|
// src/mcp-server/tools/subscriptionsQuerySubscription.ts
|
|
64650
|
-
var
|
|
64318
|
+
var args66, tool$subscriptionsQuerySubscription;
|
|
64651
64319
|
var init_subscriptionsQuerySubscription2 = __esm(() => {
|
|
64652
64320
|
init_subscriptionsQuerySubscription();
|
|
64653
64321
|
init_subscriptionfilter();
|
|
64654
64322
|
init_tools();
|
|
64655
|
-
|
|
64323
|
+
args66 = {
|
|
64656
64324
|
request: SubscriptionFilter$zodSchema.describe(`Filter`)
|
|
64657
64325
|
};
|
|
64658
64326
|
tool$subscriptionsQuerySubscription = {
|
|
@@ -64668,9 +64336,9 @@ Use when listing or searching subscriptions (e.g. admin view or customer subscri
|
|
|
64668
64336
|
openWorldHint: false,
|
|
64669
64337
|
readOnlyHint: false
|
|
64670
64338
|
},
|
|
64671
|
-
args:
|
|
64672
|
-
tool: async (client,
|
|
64673
|
-
const [result] = await subscriptionsQuerySubscription(client,
|
|
64339
|
+
args: args66,
|
|
64340
|
+
tool: async (client, args67, ctx) => {
|
|
64341
|
+
const [result] = await subscriptionsQuerySubscription(client, args67.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64674
64342
|
if (!result.ok) {
|
|
64675
64343
|
return {
|
|
64676
64344
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64700,9 +64368,9 @@ values combined with create_prorations will issue a wallet credit for unused tim
|
|
|
64700
64368
|
|
|
64701
64369
|
// src/funcs/subscriptionsRemoveSubscriptionAddon.ts
|
|
64702
64370
|
function subscriptionsRemoveSubscriptionAddon(client$, request, options) {
|
|
64703
|
-
return new APIPromise($
|
|
64371
|
+
return new APIPromise($do68(client$, request, options));
|
|
64704
64372
|
}
|
|
64705
|
-
async function $
|
|
64373
|
+
async function $do68(client$, request, options) {
|
|
64706
64374
|
const parsed$ = safeParse4(request, (value$) => RemoveAddonRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64707
64375
|
if (!parsed$.ok) {
|
|
64708
64376
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64772,12 +64440,12 @@ var init_subscriptionsRemoveSubscriptionAddon = __esm(() => {
|
|
|
64772
64440
|
});
|
|
64773
64441
|
|
|
64774
64442
|
// src/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.ts
|
|
64775
|
-
var
|
|
64443
|
+
var args67, tool$subscriptionsRemoveSubscriptionAddon;
|
|
64776
64444
|
var init_subscriptionsRemoveSubscriptionAddon2 = __esm(() => {
|
|
64777
64445
|
init_subscriptionsRemoveSubscriptionAddon();
|
|
64778
64446
|
init_removeaddonrequest();
|
|
64779
64447
|
init_tools();
|
|
64780
|
-
|
|
64448
|
+
args67 = {
|
|
64781
64449
|
request: RemoveAddonRequest$zodSchema.describe(`Remove Addon Request`)
|
|
64782
64450
|
};
|
|
64783
64451
|
tool$subscriptionsRemoveSubscriptionAddon = {
|
|
@@ -64793,157 +64461,9 @@ Use when removing an add-on from a subscription (e.g. downgrade or opt-out).`,
|
|
|
64793
64461
|
openWorldHint: false,
|
|
64794
64462
|
readOnlyHint: false
|
|
64795
64463
|
},
|
|
64796
|
-
args:
|
|
64797
|
-
tool: async (client,
|
|
64798
|
-
const [result] = await subscriptionsRemoveSubscriptionAddon(client,
|
|
64799
|
-
if (!result.ok) {
|
|
64800
|
-
return {
|
|
64801
|
-
content: [{ type: "text", text: result.error.message }],
|
|
64802
|
-
isError: true
|
|
64803
|
-
};
|
|
64804
|
-
}
|
|
64805
|
-
return formatResult(result.value);
|
|
64806
|
-
}
|
|
64807
|
-
};
|
|
64808
|
-
});
|
|
64809
|
-
|
|
64810
|
-
// src/models/resumesubscriptionrequest.ts
|
|
64811
|
-
var ResumeSubscriptionRequest$zodSchema;
|
|
64812
|
-
var init_resumesubscriptionrequest = __esm(() => {
|
|
64813
|
-
init_zod();
|
|
64814
|
-
init_resumemode();
|
|
64815
|
-
ResumeSubscriptionRequest$zodSchema = object({
|
|
64816
|
-
dry_run: boolean2().optional().describe(`Whether to perform a dry run
|
|
64817
|
-
@Description If true, validates the request and shows impact without actually resuming the subscription
|
|
64818
|
-
@Example false`),
|
|
64819
|
-
metadata: record(string2(), string2()).optional().describe(`Additional metadata as key-value pairs
|
|
64820
|
-
@Description Optional metadata for storing additional information about the resume operation
|
|
64821
|
-
@Example {"resumed_by": "admin", "reason": "issue_resolved"}`),
|
|
64822
|
-
resume_mode: ResumeMode$zodSchema
|
|
64823
|
-
}).describe("Request object for resuming a paused subscription");
|
|
64824
|
-
});
|
|
64825
|
-
|
|
64826
|
-
// src/models/resumesubscriptionop.ts
|
|
64827
|
-
var ResumeSubscriptionRequestRequest$zodSchema, ResumeSubscriptionResponse$zodSchema;
|
|
64828
|
-
var init_resumesubscriptionop = __esm(() => {
|
|
64829
|
-
init_zod();
|
|
64830
|
-
init_errorresponse();
|
|
64831
|
-
init_resumesubscriptionrequest();
|
|
64832
|
-
init_subscriptionpauseresponse();
|
|
64833
|
-
ResumeSubscriptionRequestRequest$zodSchema = object({
|
|
64834
|
-
body: ResumeSubscriptionRequest$zodSchema.describe("Resume subscription request"),
|
|
64835
|
-
id: string2().describe("Subscription ID")
|
|
64836
|
-
});
|
|
64837
|
-
ResumeSubscriptionResponse$zodSchema = union([
|
|
64838
|
-
SubscriptionPauseResponse$zodSchema,
|
|
64839
|
-
ErrorResponse$zodSchema
|
|
64840
|
-
]);
|
|
64841
|
-
});
|
|
64842
|
-
|
|
64843
|
-
// src/funcs/subscriptionsResumeSubscription.ts
|
|
64844
|
-
function subscriptionsResumeSubscription(client$, request, options) {
|
|
64845
|
-
return new APIPromise($do71(client$, request, options));
|
|
64846
|
-
}
|
|
64847
|
-
async function $do71(client$, request, options) {
|
|
64848
|
-
const parsed$ = safeParse4(request, (value$) => ResumeSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64849
|
-
if (!parsed$.ok) {
|
|
64850
|
-
return [parsed$, { status: "invalid" }];
|
|
64851
|
-
}
|
|
64852
|
-
const payload$ = parsed$.value;
|
|
64853
|
-
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
64854
|
-
const pathParams$ = {
|
|
64855
|
-
id: encodeSimple("id", payload$.id, {
|
|
64856
|
-
explode: false,
|
|
64857
|
-
charEncoding: "percent"
|
|
64858
|
-
})
|
|
64859
|
-
};
|
|
64860
|
-
const path$ = pathToFunc("/subscriptions/{id}/resume")(pathParams$);
|
|
64861
|
-
const headers$ = new Headers(compactMap({
|
|
64862
|
-
"Content-Type": "application/json",
|
|
64863
|
-
Accept: "application/json"
|
|
64864
|
-
}));
|
|
64865
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
64866
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64867
|
-
const context = {
|
|
64868
|
-
options: client$._options,
|
|
64869
|
-
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
64870
|
-
operationID: "resumeSubscription",
|
|
64871
|
-
oAuth2Scopes: null,
|
|
64872
|
-
resolvedSecurity: requestSecurity,
|
|
64873
|
-
securitySource: client$._options.security,
|
|
64874
|
-
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
64875
|
-
retryCodes: options?.retryCodes || [
|
|
64876
|
-
"429",
|
|
64877
|
-
"500",
|
|
64878
|
-
"502",
|
|
64879
|
-
"503",
|
|
64880
|
-
"504"
|
|
64881
|
-
]
|
|
64882
|
-
};
|
|
64883
|
-
const requestRes = client$._createRequest(context, {
|
|
64884
|
-
security: requestSecurity,
|
|
64885
|
-
method: "POST",
|
|
64886
|
-
baseURL: options?.serverURL,
|
|
64887
|
-
path: path$,
|
|
64888
|
-
headers: headers$,
|
|
64889
|
-
body: body$,
|
|
64890
|
-
userAgent: client$._options.userAgent,
|
|
64891
|
-
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
64892
|
-
}, options);
|
|
64893
|
-
if (!requestRes.ok) {
|
|
64894
|
-
return [requestRes, { status: "invalid" }];
|
|
64895
|
-
}
|
|
64896
|
-
const req$ = requestRes.value;
|
|
64897
|
-
const doResult = await client$._do(req$, {
|
|
64898
|
-
context,
|
|
64899
|
-
errorCodes: [],
|
|
64900
|
-
retryConfig: context.retryConfig,
|
|
64901
|
-
retryCodes: context.retryCodes
|
|
64902
|
-
});
|
|
64903
|
-
if (!doResult.ok) {
|
|
64904
|
-
return [doResult, { status: "request-error", request: req$ }];
|
|
64905
|
-
}
|
|
64906
|
-
return [doResult, {
|
|
64907
|
-
status: "complete",
|
|
64908
|
-
request: req$,
|
|
64909
|
-
response: doResult.value
|
|
64910
|
-
}];
|
|
64911
|
-
}
|
|
64912
|
-
var init_subscriptionsResumeSubscription = __esm(() => {
|
|
64913
|
-
init_encodings();
|
|
64914
|
-
init_primitives();
|
|
64915
|
-
init_schemas4();
|
|
64916
|
-
init_security();
|
|
64917
|
-
init_url();
|
|
64918
|
-
init_resumesubscriptionop();
|
|
64919
|
-
init_async();
|
|
64920
|
-
});
|
|
64921
|
-
|
|
64922
|
-
// src/mcp-server/tools/subscriptionsResumeSubscription.ts
|
|
64923
|
-
var args70, tool$subscriptionsResumeSubscription;
|
|
64924
|
-
var init_subscriptionsResumeSubscription2 = __esm(() => {
|
|
64925
|
-
init_subscriptionsResumeSubscription();
|
|
64926
|
-
init_resumesubscriptionop();
|
|
64927
|
-
init_tools();
|
|
64928
|
-
args70 = {
|
|
64929
|
-
request: ResumeSubscriptionRequestRequest$zodSchema
|
|
64930
|
-
};
|
|
64931
|
-
tool$subscriptionsResumeSubscription = {
|
|
64932
|
-
name: "resume-subscription",
|
|
64933
|
-
description: `Resume a paused subscription
|
|
64934
|
-
|
|
64935
|
-
Use when reactivating a paused subscription (e.g. end of hold). Billing and access resume from the resume date.`,
|
|
64936
|
-
scopes: ["write"],
|
|
64937
|
-
annotations: {
|
|
64938
|
-
title: "",
|
|
64939
|
-
destructiveHint: false,
|
|
64940
|
-
idempotentHint: false,
|
|
64941
|
-
openWorldHint: false,
|
|
64942
|
-
readOnlyHint: false
|
|
64943
|
-
},
|
|
64944
|
-
args: args70,
|
|
64945
|
-
tool: async (client, args71, ctx) => {
|
|
64946
|
-
const [result] = await subscriptionsResumeSubscription(client, args71.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64464
|
+
args: args67,
|
|
64465
|
+
tool: async (client, args68, ctx) => {
|
|
64466
|
+
const [result] = await subscriptionsRemoveSubscriptionAddon(client, args68.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64947
64467
|
if (!result.ok) {
|
|
64948
64468
|
return {
|
|
64949
64469
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64987,9 +64507,9 @@ var init_updatesubscriptionop = __esm(() => {
|
|
|
64987
64507
|
|
|
64988
64508
|
// src/funcs/subscriptionsUpdateSubscription.ts
|
|
64989
64509
|
function subscriptionsUpdateSubscription(client$, request, options) {
|
|
64990
|
-
return new APIPromise($
|
|
64510
|
+
return new APIPromise($do69(client$, request, options));
|
|
64991
64511
|
}
|
|
64992
|
-
async function $
|
|
64512
|
+
async function $do69(client$, request, options) {
|
|
64993
64513
|
const parsed$ = safeParse4(request, (value$) => UpdateSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64994
64514
|
if (!parsed$.ok) {
|
|
64995
64515
|
return [parsed$, { status: "invalid" }];
|
|
@@ -65065,12 +64585,12 @@ var init_subscriptionsUpdateSubscription = __esm(() => {
|
|
|
65065
64585
|
});
|
|
65066
64586
|
|
|
65067
64587
|
// src/mcp-server/tools/subscriptionsUpdateSubscription.ts
|
|
65068
|
-
var
|
|
64588
|
+
var args68, tool$subscriptionsUpdateSubscription;
|
|
65069
64589
|
var init_subscriptionsUpdateSubscription2 = __esm(() => {
|
|
65070
64590
|
init_subscriptionsUpdateSubscription();
|
|
65071
64591
|
init_updatesubscriptionop();
|
|
65072
64592
|
init_tools();
|
|
65073
|
-
|
|
64593
|
+
args68 = {
|
|
65074
64594
|
request: UpdateSubscriptionRequestRequest$zodSchema
|
|
65075
64595
|
};
|
|
65076
64596
|
tool$subscriptionsUpdateSubscription = {
|
|
@@ -65086,9 +64606,9 @@ Use when changing subscription details (e.g. quantity, billing anchor, or parent
|
|
|
65086
64606
|
openWorldHint: false,
|
|
65087
64607
|
readOnlyHint: false
|
|
65088
64608
|
},
|
|
65089
|
-
args:
|
|
65090
|
-
tool: async (client,
|
|
65091
|
-
const [result] = await subscriptionsUpdateSubscription(client,
|
|
64609
|
+
args: args68,
|
|
64610
|
+
tool: async (client, args69, ctx) => {
|
|
64611
|
+
const [result] = await subscriptionsUpdateSubscription(client, args69.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65092
64612
|
if (!result.ok) {
|
|
65093
64613
|
return {
|
|
65094
64614
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -65147,9 +64667,9 @@ var init_updatesubscriptionlineitemop = __esm(() => {
|
|
|
65147
64667
|
|
|
65148
64668
|
// src/funcs/subscriptionsUpdateSubscriptionLineItem.ts
|
|
65149
64669
|
function subscriptionsUpdateSubscriptionLineItem(client$, request, options) {
|
|
65150
|
-
return new APIPromise($
|
|
64670
|
+
return new APIPromise($do70(client$, request, options));
|
|
65151
64671
|
}
|
|
65152
|
-
async function $
|
|
64672
|
+
async function $do70(client$, request, options) {
|
|
65153
64673
|
const parsed$ = safeParse4(request, (value$) => UpdateSubscriptionLineItemRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
65154
64674
|
if (!parsed$.ok) {
|
|
65155
64675
|
return [parsed$, { status: "invalid" }];
|
|
@@ -65225,12 +64745,12 @@ var init_subscriptionsUpdateSubscriptionLineItem = __esm(() => {
|
|
|
65225
64745
|
});
|
|
65226
64746
|
|
|
65227
64747
|
// src/mcp-server/tools/subscriptionsUpdateSubscriptionLineItem.ts
|
|
65228
|
-
var
|
|
64748
|
+
var args69, tool$subscriptionsUpdateSubscriptionLineItem;
|
|
65229
64749
|
var init_subscriptionsUpdateSubscriptionLineItem2 = __esm(() => {
|
|
65230
64750
|
init_subscriptionsUpdateSubscriptionLineItem();
|
|
65231
64751
|
init_updatesubscriptionlineitemop();
|
|
65232
64752
|
init_tools();
|
|
65233
|
-
|
|
64753
|
+
args69 = {
|
|
65234
64754
|
request: UpdateSubscriptionLineItemRequestRequest$zodSchema
|
|
65235
64755
|
};
|
|
65236
64756
|
tool$subscriptionsUpdateSubscriptionLineItem = {
|
|
@@ -65246,9 +64766,9 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
65246
64766
|
openWorldHint: false,
|
|
65247
64767
|
readOnlyHint: false
|
|
65248
64768
|
},
|
|
65249
|
-
args:
|
|
65250
|
-
tool: async (client,
|
|
65251
|
-
const [result] = await subscriptionsUpdateSubscriptionLineItem(client,
|
|
64769
|
+
args: args69,
|
|
64770
|
+
tool: async (client, args70, ctx) => {
|
|
64771
|
+
const [result] = await subscriptionsUpdateSubscriptionLineItem(client, args70.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65252
64772
|
if (!result.ok) {
|
|
65253
64773
|
return {
|
|
65254
64774
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -65264,16 +64784,16 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
65264
64784
|
function createMCPServer(deps) {
|
|
65265
64785
|
const server = new McpServer({
|
|
65266
64786
|
name: "Flexprice",
|
|
65267
|
-
version: "2.1.
|
|
64787
|
+
version: "2.1.6"
|
|
65268
64788
|
});
|
|
65269
64789
|
const getClient = deps.getSDK || (() => new FlexpriceCore({
|
|
65270
64790
|
security: deps.security,
|
|
65271
64791
|
serverURL: deps.serverURL,
|
|
65272
64792
|
serverIdx: deps.serverIdx,
|
|
65273
64793
|
debugLogger: deps.logger.level === "debug" ? {
|
|
65274
|
-
log: (...
|
|
65275
|
-
group: (...
|
|
65276
|
-
groupEnd: (...
|
|
64794
|
+
log: (...args70) => console.log(...args70),
|
|
64795
|
+
group: (...args70) => console.group(...args70),
|
|
64796
|
+
groupEnd: (...args70) => console.groupEnd(...args70)
|
|
65277
64797
|
} : undefined
|
|
65278
64798
|
}));
|
|
65279
64799
|
const scopes = new Set(deps.scopes);
|
|
@@ -65348,9 +64868,6 @@ function createMCPServer(deps) {
|
|
|
65348
64868
|
tool(tool$subscriptionsCreateSubscriptionLineItem);
|
|
65349
64869
|
tool(tool$subscriptionsExecuteSubscriptionModify);
|
|
65350
64870
|
tool(tool$subscriptionsPreviewSubscriptionModify);
|
|
65351
|
-
tool(tool$subscriptionsPauseSubscription);
|
|
65352
|
-
tool(tool$subscriptionsListSubscriptionPauses);
|
|
65353
|
-
tool(tool$subscriptionsResumeSubscription);
|
|
65354
64871
|
tool(tool$subscriptionsGetSubscriptionV2);
|
|
65355
64872
|
tool(tool$subscriptionsListAllSubscriptionSchedules);
|
|
65356
64873
|
tool(tool$subscriptionsGetSubscriptionSchedule);
|
|
@@ -65429,14 +64946,11 @@ var init_server2 = __esm(() => {
|
|
|
65429
64946
|
init_subscriptionsGetSubscriptionUsage2();
|
|
65430
64947
|
init_subscriptionsGetSubscriptionV22();
|
|
65431
64948
|
init_subscriptionsListAllSubscriptionSchedules2();
|
|
65432
|
-
init_subscriptionsListSubscriptionPauses2();
|
|
65433
64949
|
init_subscriptionsListSubscriptionSchedules2();
|
|
65434
|
-
init_subscriptionsPauseSubscription2();
|
|
65435
64950
|
init_subscriptionsPreviewSubscriptionChange2();
|
|
65436
64951
|
init_subscriptionsPreviewSubscriptionModify2();
|
|
65437
64952
|
init_subscriptionsQuerySubscription2();
|
|
65438
64953
|
init_subscriptionsRemoveSubscriptionAddon2();
|
|
65439
|
-
init_subscriptionsResumeSubscription2();
|
|
65440
64954
|
init_subscriptionsUpdateSubscription2();
|
|
65441
64955
|
init_subscriptionsUpdateSubscriptionLineItem2();
|
|
65442
64956
|
});
|
|
@@ -65834,24 +65348,6 @@ Execute a mid-cycle subscription modification (inheritance or quantity change).`
|
|
|
65834
65348
|
description: `Preview subscription modification
|
|
65835
65349
|
|
|
65836
65350
|
Preview the impact of a mid-cycle subscription modification without committing changes.`
|
|
65837
|
-
},
|
|
65838
|
-
{
|
|
65839
|
-
name: "pause-subscription",
|
|
65840
|
-
description: `Pause a subscription
|
|
65841
|
-
|
|
65842
|
-
Use when temporarily stopping a subscription (e.g. customer hold or seasonal pause). Billing and access pause; resume when ready.`
|
|
65843
|
-
},
|
|
65844
|
-
{
|
|
65845
|
-
name: "list-subscription-pauses",
|
|
65846
|
-
description: `List all pauses for a subscription
|
|
65847
|
-
|
|
65848
|
-
Use when showing pause history for a subscription (e.g. support or audit). Returns all past and future pauses.`
|
|
65849
|
-
},
|
|
65850
|
-
{
|
|
65851
|
-
name: "resume-subscription",
|
|
65852
|
-
description: `Resume a paused subscription
|
|
65853
|
-
|
|
65854
|
-
Use when reactivating a paused subscription (e.g. end of hold). Billing and access resume from the resume date.`
|
|
65855
65351
|
},
|
|
65856
65352
|
{
|
|
65857
65353
|
name: "get-subscription-v2",
|
|
@@ -69427,7 +68923,7 @@ var routes = buildRouteMap({
|
|
|
69427
68923
|
var app = buildApplication(routes, {
|
|
69428
68924
|
name: "mcp",
|
|
69429
68925
|
versionInfo: {
|
|
69430
|
-
currentVersion: "2.1.
|
|
68926
|
+
currentVersion: "2.1.6"
|
|
69431
68927
|
}
|
|
69432
68928
|
});
|
|
69433
68929
|
run(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -69435,5 +68931,5 @@ export {
|
|
|
69435
68931
|
app
|
|
69436
68932
|
};
|
|
69437
68933
|
|
|
69438
|
-
//# debugId=
|
|
68934
|
+
//# debugId=4C70D2B22566A71A64756E2164756E21
|
|
69439
68935
|
//# sourceMappingURL=mcp-server.js.map
|