@flexprice/mcp-server 2.1.4 → 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 +101 -589
- package/bin/mcp-server.js.map +27 -40
- package/bun.lock +40 -38
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/sdks.js +0 -2
- package/esm/lib/sdks.js.map +1 -1
- 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/addaddonrequest.d.ts +4 -0
- package/esm/models/addaddonrequest.d.ts.map +1 -1
- package/esm/models/addaddonrequest.js +4 -0
- package/esm/models/addaddonrequest.js.map +1 -1
- package/esm/models/addaddontosubscriptionrequest.d.ts +4 -0
- package/esm/models/addaddontosubscriptionrequest.d.ts.map +1 -1
- package/esm/models/addaddontosubscriptionrequest.js +4 -0
- package/esm/models/addaddontosubscriptionrequest.js.map +1 -1
- package/esm/models/addon.d.ts +0 -2
- package/esm/models/addon.d.ts.map +1 -1
- package/esm/models/addon.js +0 -2
- package/esm/models/addon.js.map +1 -1
- package/esm/models/addoncadence.d.ts +12 -0
- package/esm/models/addoncadence.d.ts.map +1 -0
- package/esm/models/addoncadence.js +13 -0
- package/esm/models/addoncadence.js.map +1 -0
- package/esm/models/addonresponse.d.ts +0 -2
- package/esm/models/addonresponse.d.ts.map +1 -1
- package/esm/models/addonresponse.js +0 -2
- package/esm/models/addonresponse.js.map +1 -1
- package/esm/models/addonstatus.d.ts +2 -2
- package/esm/models/addonstatus.js +2 -2
- package/esm/models/addonstatus.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/createsubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/createsubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionlineitemrequest.js +2 -0
- package/esm/models/createsubscriptionlineitemrequest.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/deletesubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/deletesubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/deletesubscriptionlineitemrequest.js +2 -0
- package/esm/models/deletesubscriptionlineitemrequest.js.map +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/removeaddonrequest.d.ts +3 -0
- package/esm/models/removeaddonrequest.d.ts.map +1 -1
- package/esm/models/removeaddonrequest.js +3 -0
- package/esm/models/removeaddonrequest.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 +1 -1
- package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
- package/esm/models/subscriptionlineitemresponse.js +1 -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 +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.js +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.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 +3 -3
- package/src/lib/sdks.ts +0 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -7
- package/src/models/addaddonrequest.ts +9 -0
- package/src/models/addaddontosubscriptionrequest.ts +9 -0
- package/src/models/addon.ts +0 -3
- package/src/models/{addontype.ts → addoncadence.ts} +5 -5
- package/src/models/addonresponse.ts +0 -3
- package/src/models/addonstatus.ts +2 -2
- package/src/models/createpricerequest.ts +2 -2
- package/src/models/createsubscriptionlineitemrequest.ts +6 -0
- package/src/models/createsubscriptionrequest.ts +4 -4
- package/src/models/deletesubscriptionlineitemrequest.ts +6 -0
- package/src/models/invoicebillingreason.ts +2 -0
- package/src/models/priceprice.ts +3 -3
- package/src/models/priceresponse.ts +3 -3
- package/src/models/removeaddonrequest.ts +10 -0
- package/src/models/subscriptionfilter.ts +4 -0
- package/src/models/subscriptionlineitemresponse.ts +2 -2
- package/src/models/subscriptionpricecreaterequest.ts +2 -2
- package/src/models/subscriptionsubscriptionlineitem.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/addontype.d.ts +0 -12
- package/esm/models/addontype.d.ts.map +0 -1
- package/esm/models/addontype.js +0 -13
- package/esm/models/addontype.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.
|
|
50575
|
-
genVersion: "2.881.
|
|
50576
|
-
userAgent: "speakeasy-sdk/mcp-typescript 2.1.
|
|
50574
|
+
sdkVersion: "2.1.6",
|
|
50575
|
+
genVersion: "2.881.4",
|
|
50576
|
+
userAgent: "speakeasy-sdk/mcp-typescript 2.1.6 2.881.4 1.0 @flexprice/mcp-server"
|
|
50577
50577
|
};
|
|
50578
50578
|
});
|
|
50579
50579
|
|
|
@@ -51305,8 +51305,6 @@ async function logResponse(logger, res, req) {
|
|
|
51305
51305
|
logger.log(await res.clone().json());
|
|
51306
51306
|
break;
|
|
51307
51307
|
case (matchContentType(res, "application/jsonl") || jsonlLikeContentTypeRE.test(ct)):
|
|
51308
|
-
logger.log(await res.clone().text());
|
|
51309
|
-
break;
|
|
51310
51308
|
case matchContentType(res, "text/event-stream"):
|
|
51311
51309
|
logger.log(`<${contentType}>`);
|
|
51312
51310
|
break;
|
|
@@ -54141,7 +54139,7 @@ For USD: $12.50`),
|
|
|
54141
54139
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
54142
54140
|
tiers: array(PricePriceTier$zodSchema).optional(),
|
|
54143
54141
|
transform_quantity: PriceJSONBTransformQuantity$zodSchema.optional(),
|
|
54144
|
-
|
|
54142
|
+
trial_period_days: int().optional().describe(`TrialPeriodDays is the number of days for the trial period
|
|
54145
54143
|
Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)`),
|
|
54146
54144
|
type: PriceType$zodSchema.optional(),
|
|
54147
54145
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
@@ -54209,6 +54207,7 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54209
54207
|
init_status();
|
|
54210
54208
|
init_subscriptionlineitementitytype();
|
|
54211
54209
|
SubscriptionSubscriptionLineItem$zodSchema = object({
|
|
54210
|
+
addon_association_id: string2().optional(),
|
|
54212
54211
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
54213
54212
|
billing_period_count: int().optional().describe("from price at create; default 1"),
|
|
54214
54213
|
commitment_amount: string2().optional().describe("Commitment fields"),
|
|
@@ -54244,7 +54243,6 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54244
54243
|
subscription_id: string2().optional(),
|
|
54245
54244
|
subscription_phase_id: string2().optional(),
|
|
54246
54245
|
tenant_id: string2().optional(),
|
|
54247
|
-
trial_period: int().optional(),
|
|
54248
54246
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
54249
54247
|
updated_by: string2().optional()
|
|
54250
54248
|
});
|
|
@@ -55571,6 +55569,7 @@ var init_invoicebillingreason = __esm(() => {
|
|
|
55571
55569
|
"SUBSCRIPTION_CREATE",
|
|
55572
55570
|
"SUBSCRIPTION_CYCLE",
|
|
55573
55571
|
"SUBSCRIPTION_UPDATE",
|
|
55572
|
+
"SUBSCRIPTION_TRIAL_END",
|
|
55574
55573
|
"PRORATION",
|
|
55575
55574
|
"MANUAL"
|
|
55576
55575
|
]);
|
|
@@ -56461,16 +56460,6 @@ var init_paymentterms = __esm(() => {
|
|
|
56461
56460
|
]);
|
|
56462
56461
|
});
|
|
56463
56462
|
|
|
56464
|
-
// src/models/addontype.ts
|
|
56465
|
-
var AddonType$zodSchema;
|
|
56466
|
-
var init_addontype = __esm(() => {
|
|
56467
|
-
init_zod();
|
|
56468
|
-
AddonType$zodSchema = _enum([
|
|
56469
|
-
"onetime",
|
|
56470
|
-
"multiple_instance"
|
|
56471
|
-
]);
|
|
56472
|
-
});
|
|
56473
|
-
|
|
56474
56463
|
// src/models/priceunitresponse.ts
|
|
56475
56464
|
var PriceUnitResponse$zodSchema;
|
|
56476
56465
|
var init_priceunitresponse = __esm(() => {
|
|
@@ -56558,7 +56547,7 @@ For USD: $12.50`),
|
|
|
56558
56547
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
56559
56548
|
tiers: array(PricePriceTier$zodSchema).optional(),
|
|
56560
56549
|
transform_quantity: PriceJSONBTransformQuantity$zodSchema.optional(),
|
|
56561
|
-
|
|
56550
|
+
trial_period_days: int().optional().describe(`TrialPeriodDays is the number of days for the trial period
|
|
56562
56551
|
Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)`),
|
|
56563
56552
|
type: PriceType$zodSchema.optional(),
|
|
56564
56553
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
@@ -56570,7 +56559,6 @@ Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)`)
|
|
|
56570
56559
|
var AddonResponse$zodSchema;
|
|
56571
56560
|
var init_addonresponse = __esm(() => {
|
|
56572
56561
|
init_zod();
|
|
56573
|
-
init_addontype();
|
|
56574
56562
|
init_entitlementresponse();
|
|
56575
56563
|
init_priceresponse();
|
|
56576
56564
|
init_status();
|
|
@@ -56587,7 +56575,6 @@ var init_addonresponse = __esm(() => {
|
|
|
56587
56575
|
prices: array(lazy(() => PriceResponse$zodSchema)).optional().describe("Optional expanded fields"),
|
|
56588
56576
|
status: Status$zodSchema.optional(),
|
|
56589
56577
|
tenant_id: string2().optional(),
|
|
56590
|
-
type: AddonType$zodSchema.optional(),
|
|
56591
56578
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
56592
56579
|
updated_by: string2().optional()
|
|
56593
56580
|
});
|
|
@@ -59450,7 +59437,7 @@ var init_createpricerequest = __esm(() => {
|
|
|
59450
59437
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
59451
59438
|
tiers: array(CreatePriceTier$zodSchema).optional(),
|
|
59452
59439
|
transform_quantity: PriceTransformQuantity$zodSchema.optional(),
|
|
59453
|
-
|
|
59440
|
+
trial_period_days: int().optional(),
|
|
59454
59441
|
type: PriceType$zodSchema
|
|
59455
59442
|
});
|
|
59456
59443
|
});
|
|
@@ -60526,6 +60513,16 @@ Use when turning a draft subscription live (e.g. after collecting payment or com
|
|
|
60526
60513
|
};
|
|
60527
60514
|
});
|
|
60528
60515
|
|
|
60516
|
+
// src/models/addoncadence.ts
|
|
60517
|
+
var AddonCadence$zodSchema;
|
|
60518
|
+
var init_addoncadence = __esm(() => {
|
|
60519
|
+
init_zod();
|
|
60520
|
+
AddonCadence$zodSchema = _enum([
|
|
60521
|
+
"onetime",
|
|
60522
|
+
"recurring"
|
|
60523
|
+
]);
|
|
60524
|
+
});
|
|
60525
|
+
|
|
60529
60526
|
// src/models/lineitemcommitmentconfig.ts
|
|
60530
60527
|
var LineItemCommitmentConfig$zodSchema;
|
|
60531
60528
|
var init_lineitemcommitmentconfig = __esm(() => {
|
|
@@ -60547,11 +60544,15 @@ var init_lineitemcommitmentconfig = __esm(() => {
|
|
|
60547
60544
|
var AddAddonRequest$zodSchema;
|
|
60548
60545
|
var init_addaddonrequest = __esm(() => {
|
|
60549
60546
|
init_zod();
|
|
60547
|
+
init_addoncadence();
|
|
60550
60548
|
init_lineitemcommitmentconfig();
|
|
60549
|
+
init_prorationbehavior();
|
|
60551
60550
|
AddAddonRequest$zodSchema = object({
|
|
60552
60551
|
addon_id: string2(),
|
|
60552
|
+
cadence: AddonCadence$zodSchema.optional(),
|
|
60553
60553
|
line_item_commitments: record(string2(), LineItemCommitmentConfig$zodSchema).optional().describe("LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id)"),
|
|
60554
60554
|
metadata: record(string2(), any()).optional(),
|
|
60555
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
60555
60556
|
start_date: exports_iso.datetime({ offset: true }).optional(),
|
|
60556
60557
|
subscription_id: string2()
|
|
60557
60558
|
});
|
|
@@ -61025,11 +61026,15 @@ Use when cancelling a scheduled change (e.g. customer changed mind). Identify by
|
|
|
61025
61026
|
var AddAddonToSubscriptionRequest$zodSchema;
|
|
61026
61027
|
var init_addaddontosubscriptionrequest = __esm(() => {
|
|
61027
61028
|
init_zod();
|
|
61029
|
+
init_addoncadence();
|
|
61028
61030
|
init_lineitemcommitmentconfig();
|
|
61031
|
+
init_prorationbehavior();
|
|
61029
61032
|
AddAddonToSubscriptionRequest$zodSchema = object({
|
|
61030
61033
|
addon_id: string2(),
|
|
61034
|
+
cadence: AddonCadence$zodSchema.optional(),
|
|
61031
61035
|
line_item_commitments: record(string2(), LineItemCommitmentConfig$zodSchema).optional().describe("LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id)"),
|
|
61032
61036
|
metadata: record(string2(), any()).optional(),
|
|
61037
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
61033
61038
|
start_date: exports_iso.datetime({ offset: true }).optional()
|
|
61034
61039
|
});
|
|
61035
61040
|
});
|
|
@@ -61113,7 +61118,7 @@ var init_subscriptionpricecreaterequest = __esm(() => {
|
|
|
61113
61118
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
61114
61119
|
tiers: array(CreatePriceTier$zodSchema).optional(),
|
|
61115
61120
|
transform_quantity: PriceTransformQuantity$zodSchema.optional(),
|
|
61116
|
-
|
|
61121
|
+
trial_period_days: int().optional(),
|
|
61117
61122
|
type: PriceType$zodSchema
|
|
61118
61123
|
});
|
|
61119
61124
|
});
|
|
@@ -61124,6 +61129,7 @@ var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
|
61124
61129
|
init_zod();
|
|
61125
61130
|
init_billingperiod();
|
|
61126
61131
|
init_commitmenttype();
|
|
61132
|
+
init_prorationbehavior();
|
|
61127
61133
|
init_subscriptionpricecreaterequest();
|
|
61128
61134
|
CreateSubscriptionLineItemRequest$zodSchema = object({
|
|
61129
61135
|
commitment_amount: number2().optional().describe("Commitment fields"),
|
|
@@ -61138,6 +61144,7 @@ var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
|
61138
61144
|
metadata: record(string2(), string2()).optional(),
|
|
61139
61145
|
price: SubscriptionPriceCreateRequest$zodSchema.optional(),
|
|
61140
61146
|
price_id: string2().optional().describe("PriceID references an existing price (plan, addon, or subscription-scoped). Exactly one of price_id or price must be set."),
|
|
61147
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
61141
61148
|
quantity: number2().optional(),
|
|
61142
61149
|
start_date: exports_iso.datetime({ offset: true }).optional(),
|
|
61143
61150
|
subscription_phase_id: string2().optional()
|
|
@@ -61281,8 +61288,8 @@ and must be same as what you provided as external_id while creating the customer
|
|
|
61281
61288
|
start_date: exports_iso.datetime({ offset: true }).optional(),
|
|
61282
61289
|
subscription_status: SubscriptionStatus$zodSchema.optional(),
|
|
61283
61290
|
tax_rate_overrides: array(TaxRateOverride$zodSchema).optional().describe("tax_rate_overrides is the tax rate overrides\tto be applied to the subscription"),
|
|
61284
|
-
|
|
61285
|
-
|
|
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.`)
|
|
61286
61293
|
});
|
|
61287
61294
|
});
|
|
61288
61295
|
|
|
@@ -61407,6 +61414,7 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61407
61414
|
init_status();
|
|
61408
61415
|
init_subscriptionlineitementitytype();
|
|
61409
61416
|
SubscriptionLineItemResponse$zodSchema = object({
|
|
61417
|
+
addon_association_id: string2().optional(),
|
|
61410
61418
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
61411
61419
|
billing_period_count: int().optional().describe("from price at create; default 1"),
|
|
61412
61420
|
commitment_amount: string2().optional().describe("Commitment fields"),
|
|
@@ -61442,7 +61450,6 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61442
61450
|
subscription_id: string2().optional(),
|
|
61443
61451
|
subscription_phase_id: string2().optional(),
|
|
61444
61452
|
tenant_id: string2().optional(),
|
|
61445
|
-
trial_period: int().optional(),
|
|
61446
61453
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
61447
61454
|
updated_by: string2().optional()
|
|
61448
61455
|
});
|
|
@@ -61584,8 +61591,10 @@ Use when adding a new charge or seat to a subscription (e.g. extra seat or one-t
|
|
|
61584
61591
|
var DeleteSubscriptionLineItemRequest$zodSchema;
|
|
61585
61592
|
var init_deletesubscriptionlineitemrequest = __esm(() => {
|
|
61586
61593
|
init_zod();
|
|
61594
|
+
init_prorationbehavior();
|
|
61587
61595
|
DeleteSubscriptionLineItemRequest$zodSchema = object({
|
|
61588
|
-
effective_from: string2().optional()
|
|
61596
|
+
effective_from: string2().optional(),
|
|
61597
|
+
proration_behavior: ProrationBehavior$zodSchema.optional()
|
|
61589
61598
|
});
|
|
61590
61599
|
});
|
|
61591
61600
|
|
|
@@ -62691,7 +62700,7 @@ var init_addonstatus = __esm(() => {
|
|
|
62691
62700
|
AddonStatus$zodSchema = _enum([
|
|
62692
62701
|
"active",
|
|
62693
62702
|
"cancelled",
|
|
62694
|
-
"
|
|
62703
|
+
"pending"
|
|
62695
62704
|
]);
|
|
62696
62705
|
});
|
|
62697
62706
|
|
|
@@ -63718,179 +63727,6 @@ Use when listing or searching scheduled changes across subscriptions (e.g. admin
|
|
|
63718
63727
|
};
|
|
63719
63728
|
});
|
|
63720
63729
|
|
|
63721
|
-
// src/models/subscriptionpauseresponse.ts
|
|
63722
|
-
var SubscriptionPauseResponse$zodSchema;
|
|
63723
|
-
var init_subscriptionpauseresponse = __esm(() => {
|
|
63724
|
-
init_zod();
|
|
63725
|
-
init_pausemode();
|
|
63726
|
-
init_pausestatus();
|
|
63727
|
-
init_resumemode();
|
|
63728
|
-
init_status();
|
|
63729
|
-
SubscriptionPauseResponse$zodSchema = object({
|
|
63730
|
-
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
63731
|
-
created_by: string2().optional(),
|
|
63732
|
-
environment_id: string2().optional().describe("EnvironmentID is the environment identifier for the pause"),
|
|
63733
|
-
id: string2().optional().describe("ID is the unique identifier for the subscription pause"),
|
|
63734
|
-
metadata: record(string2(), string2()).optional(),
|
|
63735
|
-
original_period_end: exports_iso.datetime({ offset: true }).optional().describe("OriginalPeriodEnd is the end of the billing period when the pause was created"),
|
|
63736
|
-
original_period_start: exports_iso.datetime({ offset: true }).optional().describe("OriginalPeriodStart is the start of the billing period when the pause was created"),
|
|
63737
|
-
pause_end: exports_iso.datetime({ offset: true }).optional().describe("PauseEnd is when the pause will end (null for indefinite)"),
|
|
63738
|
-
pause_mode: PauseMode$zodSchema.optional(),
|
|
63739
|
-
pause_start: exports_iso.datetime({ offset: true }).optional().describe("PauseStart is when the pause actually started"),
|
|
63740
|
-
pause_status: PauseStatus$zodSchema.optional(),
|
|
63741
|
-
reason: string2().optional().describe("Reason is the reason for pausing"),
|
|
63742
|
-
resume_mode: ResumeMode$zodSchema.optional(),
|
|
63743
|
-
resumed_at: exports_iso.datetime({ offset: true }).optional().describe("ResumedAt is when the pause was actually ended (if manually resumed)"),
|
|
63744
|
-
status: Status$zodSchema.optional(),
|
|
63745
|
-
subscription_id: string2().optional().describe("SubscriptionID is the identifier for the subscription"),
|
|
63746
|
-
tenant_id: string2().optional(),
|
|
63747
|
-
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
63748
|
-
updated_by: string2().optional()
|
|
63749
|
-
}).describe("Response object containing subscription pause information");
|
|
63750
|
-
});
|
|
63751
|
-
|
|
63752
|
-
// src/models/listsubscriptionpausesresponse.ts
|
|
63753
|
-
var ListSubscriptionPausesResponse$zodSchema;
|
|
63754
|
-
var init_listsubscriptionpausesresponse = __esm(() => {
|
|
63755
|
-
init_zod();
|
|
63756
|
-
init_subscriptionpauseresponse();
|
|
63757
|
-
ListSubscriptionPausesResponse$zodSchema = object({
|
|
63758
|
-
items: array(SubscriptionPauseResponse$zodSchema).optional().describe(`List of subscription pause objects
|
|
63759
|
-
@Description Array of subscription pauses`),
|
|
63760
|
-
total: int().optional().describe(`Total number of pauses
|
|
63761
|
-
@Description Total count of subscription pauses in the response`)
|
|
63762
|
-
}).describe("Response object for listing subscription pauses with total count");
|
|
63763
|
-
});
|
|
63764
|
-
|
|
63765
|
-
// src/models/listsubscriptionpausesop.ts
|
|
63766
|
-
var ListSubscriptionPausesRequest$zodSchema, ListSubscriptionPausesResponseResponse$zodSchema;
|
|
63767
|
-
var init_listsubscriptionpausesop = __esm(() => {
|
|
63768
|
-
init_zod();
|
|
63769
|
-
init_errorresponse();
|
|
63770
|
-
init_listsubscriptionpausesresponse();
|
|
63771
|
-
ListSubscriptionPausesRequest$zodSchema = object({
|
|
63772
|
-
id: string2().describe("Subscription ID")
|
|
63773
|
-
});
|
|
63774
|
-
ListSubscriptionPausesResponseResponse$zodSchema = union([
|
|
63775
|
-
array(ListSubscriptionPausesResponse$zodSchema).describe("OK"),
|
|
63776
|
-
ErrorResponse$zodSchema
|
|
63777
|
-
]);
|
|
63778
|
-
});
|
|
63779
|
-
|
|
63780
|
-
// src/funcs/subscriptionsListSubscriptionPauses.ts
|
|
63781
|
-
function subscriptionsListSubscriptionPauses(client$, request, options) {
|
|
63782
|
-
return new APIPromise($do64(client$, request, options));
|
|
63783
|
-
}
|
|
63784
|
-
async function $do64(client$, request, options) {
|
|
63785
|
-
const parsed$ = safeParse4(request, (value$) => ListSubscriptionPausesRequest$zodSchema.parse(value$), "Input validation failed");
|
|
63786
|
-
if (!parsed$.ok) {
|
|
63787
|
-
return [parsed$, { status: "invalid" }];
|
|
63788
|
-
}
|
|
63789
|
-
const payload$ = parsed$.value;
|
|
63790
|
-
const body$ = null;
|
|
63791
|
-
const pathParams$ = {
|
|
63792
|
-
id: encodeSimple("id", payload$.id, {
|
|
63793
|
-
explode: false,
|
|
63794
|
-
charEncoding: "percent"
|
|
63795
|
-
})
|
|
63796
|
-
};
|
|
63797
|
-
const path$ = pathToFunc("/subscriptions/{id}/pauses")(pathParams$);
|
|
63798
|
-
const headers$ = new Headers(compactMap({
|
|
63799
|
-
Accept: "application/json"
|
|
63800
|
-
}));
|
|
63801
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
63802
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
63803
|
-
const context = {
|
|
63804
|
-
options: client$._options,
|
|
63805
|
-
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
63806
|
-
operationID: "listSubscriptionPauses",
|
|
63807
|
-
oAuth2Scopes: null,
|
|
63808
|
-
resolvedSecurity: requestSecurity,
|
|
63809
|
-
securitySource: client$._options.security,
|
|
63810
|
-
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
63811
|
-
retryCodes: options?.retryCodes || [
|
|
63812
|
-
"429",
|
|
63813
|
-
"500",
|
|
63814
|
-
"502",
|
|
63815
|
-
"503",
|
|
63816
|
-
"504"
|
|
63817
|
-
]
|
|
63818
|
-
};
|
|
63819
|
-
const requestRes = client$._createRequest(context, {
|
|
63820
|
-
security: requestSecurity,
|
|
63821
|
-
method: "GET",
|
|
63822
|
-
baseURL: options?.serverURL,
|
|
63823
|
-
path: path$,
|
|
63824
|
-
headers: headers$,
|
|
63825
|
-
body: body$,
|
|
63826
|
-
userAgent: client$._options.userAgent,
|
|
63827
|
-
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
63828
|
-
}, options);
|
|
63829
|
-
if (!requestRes.ok) {
|
|
63830
|
-
return [requestRes, { status: "invalid" }];
|
|
63831
|
-
}
|
|
63832
|
-
const req$ = requestRes.value;
|
|
63833
|
-
const doResult = await client$._do(req$, {
|
|
63834
|
-
context,
|
|
63835
|
-
errorCodes: [],
|
|
63836
|
-
retryConfig: context.retryConfig,
|
|
63837
|
-
retryCodes: context.retryCodes
|
|
63838
|
-
});
|
|
63839
|
-
if (!doResult.ok) {
|
|
63840
|
-
return [doResult, { status: "request-error", request: req$ }];
|
|
63841
|
-
}
|
|
63842
|
-
return [doResult, {
|
|
63843
|
-
status: "complete",
|
|
63844
|
-
request: req$,
|
|
63845
|
-
response: doResult.value
|
|
63846
|
-
}];
|
|
63847
|
-
}
|
|
63848
|
-
var init_subscriptionsListSubscriptionPauses = __esm(() => {
|
|
63849
|
-
init_encodings();
|
|
63850
|
-
init_primitives();
|
|
63851
|
-
init_schemas4();
|
|
63852
|
-
init_security();
|
|
63853
|
-
init_url();
|
|
63854
|
-
init_listsubscriptionpausesop();
|
|
63855
|
-
init_async();
|
|
63856
|
-
});
|
|
63857
|
-
|
|
63858
|
-
// src/mcp-server/tools/subscriptionsListSubscriptionPauses.ts
|
|
63859
|
-
var args63, tool$subscriptionsListSubscriptionPauses;
|
|
63860
|
-
var init_subscriptionsListSubscriptionPauses2 = __esm(() => {
|
|
63861
|
-
init_subscriptionsListSubscriptionPauses();
|
|
63862
|
-
init_listsubscriptionpausesop();
|
|
63863
|
-
init_tools();
|
|
63864
|
-
args63 = {
|
|
63865
|
-
request: ListSubscriptionPausesRequest$zodSchema
|
|
63866
|
-
};
|
|
63867
|
-
tool$subscriptionsListSubscriptionPauses = {
|
|
63868
|
-
name: "list-subscription-pauses",
|
|
63869
|
-
description: `List all pauses for a subscription
|
|
63870
|
-
|
|
63871
|
-
Use when showing pause history for a subscription (e.g. support or audit). Returns all past and future pauses.`,
|
|
63872
|
-
scopes: ["read"],
|
|
63873
|
-
annotations: {
|
|
63874
|
-
title: "",
|
|
63875
|
-
destructiveHint: false,
|
|
63876
|
-
idempotentHint: false,
|
|
63877
|
-
openWorldHint: false,
|
|
63878
|
-
readOnlyHint: true
|
|
63879
|
-
},
|
|
63880
|
-
args: args63,
|
|
63881
|
-
tool: async (client, args64, ctx) => {
|
|
63882
|
-
const [result] = await subscriptionsListSubscriptionPauses(client, args64.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63883
|
-
if (!result.ok) {
|
|
63884
|
-
return {
|
|
63885
|
-
content: [{ type: "text", text: result.error.message }],
|
|
63886
|
-
isError: true
|
|
63887
|
-
};
|
|
63888
|
-
}
|
|
63889
|
-
return formatResult(result.value);
|
|
63890
|
-
}
|
|
63891
|
-
};
|
|
63892
|
-
});
|
|
63893
|
-
|
|
63894
63730
|
// src/models/listsubscriptionschedulesop.ts
|
|
63895
63731
|
var ListSubscriptionSchedulesRequest$zodSchema;
|
|
63896
63732
|
var init_listsubscriptionschedulesop = __esm(() => {
|
|
@@ -63902,9 +63738,9 @@ var init_listsubscriptionschedulesop = __esm(() => {
|
|
|
63902
63738
|
|
|
63903
63739
|
// src/funcs/subscriptionsListSubscriptionSchedules.ts
|
|
63904
63740
|
function subscriptionsListSubscriptionSchedules(client$, request, options) {
|
|
63905
|
-
return new APIPromise($
|
|
63741
|
+
return new APIPromise($do64(client$, request, options));
|
|
63906
63742
|
}
|
|
63907
|
-
async function $
|
|
63743
|
+
async function $do64(client$, request, options) {
|
|
63908
63744
|
const parsed$ = safeParse4(request, (value$) => ListSubscriptionSchedulesRequest$zodSchema.parse(value$), "Input validation failed");
|
|
63909
63745
|
if (!parsed$.ok) {
|
|
63910
63746
|
return [parsed$, { status: "invalid" }];
|
|
@@ -63979,12 +63815,12 @@ var init_subscriptionsListSubscriptionSchedules = __esm(() => {
|
|
|
63979
63815
|
});
|
|
63980
63816
|
|
|
63981
63817
|
// src/mcp-server/tools/subscriptionsListSubscriptionSchedules.ts
|
|
63982
|
-
var
|
|
63818
|
+
var args63, tool$subscriptionsListSubscriptionSchedules;
|
|
63983
63819
|
var init_subscriptionsListSubscriptionSchedules2 = __esm(() => {
|
|
63984
63820
|
init_subscriptionsListSubscriptionSchedules();
|
|
63985
63821
|
init_listsubscriptionschedulesop();
|
|
63986
63822
|
init_tools();
|
|
63987
|
-
|
|
63823
|
+
args63 = {
|
|
63988
63824
|
request: ListSubscriptionSchedulesRequest$zodSchema
|
|
63989
63825
|
};
|
|
63990
63826
|
tool$subscriptionsListSubscriptionSchedules = {
|
|
@@ -64000,169 +63836,9 @@ Use when listing scheduled changes for a subscription (e.g. upcoming plan change
|
|
|
64000
63836
|
openWorldHint: false,
|
|
64001
63837
|
readOnlyHint: true
|
|
64002
63838
|
},
|
|
64003
|
-
args:
|
|
64004
|
-
tool: async (client,
|
|
64005
|
-
const [result] = await subscriptionsListSubscriptionSchedules(client,
|
|
64006
|
-
if (!result.ok) {
|
|
64007
|
-
return {
|
|
64008
|
-
content: [{ type: "text", text: result.error.message }],
|
|
64009
|
-
isError: true
|
|
64010
|
-
};
|
|
64011
|
-
}
|
|
64012
|
-
return formatResult(result.value);
|
|
64013
|
-
}
|
|
64014
|
-
};
|
|
64015
|
-
});
|
|
64016
|
-
|
|
64017
|
-
// src/models/pausesubscriptionrequest.ts
|
|
64018
|
-
var PauseSubscriptionRequest$zodSchema;
|
|
64019
|
-
var init_pausesubscriptionrequest = __esm(() => {
|
|
64020
|
-
init_zod();
|
|
64021
|
-
init_pausemode();
|
|
64022
|
-
PauseSubscriptionRequest$zodSchema = object({
|
|
64023
|
-
dry_run: boolean2().optional().describe(`Whether to perform a dry run
|
|
64024
|
-
@Description If true, validates the request and shows impact without actually pausing the subscription
|
|
64025
|
-
@Example false`),
|
|
64026
|
-
metadata: record(string2(), string2()).optional().describe(`Additional metadata as key-value pairs
|
|
64027
|
-
@Description Optional metadata for storing additional information about the pause
|
|
64028
|
-
@Example {"requested_by": "customer", "channel": "support_ticket"}`),
|
|
64029
|
-
pause_days: int().optional().describe(`Duration of the pause in days
|
|
64030
|
-
@Description Number of days to pause the subscription. Cannot be used together with pause_end. Must be greater than 0
|
|
64031
|
-
@Example 30`),
|
|
64032
|
-
pause_end: exports_iso.datetime({ offset: true }).optional().describe(`End date for the subscription pause
|
|
64033
|
-
@Description ISO 8601 timestamp when the pause should end. Cannot be used together with pause_days. Must be after pause_start
|
|
64034
|
-
@Example "2024-02-15T00:00:00Z"`),
|
|
64035
|
-
pause_mode: PauseMode$zodSchema,
|
|
64036
|
-
pause_start: exports_iso.datetime({ offset: true }).optional().describe(`Start date for the subscription pause
|
|
64037
|
-
@Description ISO 8601 timestamp when the pause should begin. Required when pause_mode is "scheduled"
|
|
64038
|
-
@Example "2024-01-15T00:00:00Z"`),
|
|
64039
|
-
reason: string2().optional().describe(`Reason for pausing the subscription
|
|
64040
|
-
@Description Optional reason for the pause. Maximum 255 characters
|
|
64041
|
-
@Example "Customer requested temporary suspension"`)
|
|
64042
|
-
}).describe("Request object for pausing an active subscription with various pause modes and options");
|
|
64043
|
-
});
|
|
64044
|
-
|
|
64045
|
-
// src/models/pausesubscriptionop.ts
|
|
64046
|
-
var PauseSubscriptionRequestRequest$zodSchema, PauseSubscriptionResponse$zodSchema;
|
|
64047
|
-
var init_pausesubscriptionop = __esm(() => {
|
|
64048
|
-
init_zod();
|
|
64049
|
-
init_errorresponse();
|
|
64050
|
-
init_pausesubscriptionrequest();
|
|
64051
|
-
init_subscriptionpauseresponse();
|
|
64052
|
-
PauseSubscriptionRequestRequest$zodSchema = object({
|
|
64053
|
-
body: PauseSubscriptionRequest$zodSchema.describe("Pause subscription request"),
|
|
64054
|
-
id: string2().describe("Subscription ID")
|
|
64055
|
-
});
|
|
64056
|
-
PauseSubscriptionResponse$zodSchema = union([
|
|
64057
|
-
SubscriptionPauseResponse$zodSchema,
|
|
64058
|
-
ErrorResponse$zodSchema
|
|
64059
|
-
]);
|
|
64060
|
-
});
|
|
64061
|
-
|
|
64062
|
-
// src/funcs/subscriptionsPauseSubscription.ts
|
|
64063
|
-
function subscriptionsPauseSubscription(client$, request, options) {
|
|
64064
|
-
return new APIPromise($do66(client$, request, options));
|
|
64065
|
-
}
|
|
64066
|
-
async function $do66(client$, request, options) {
|
|
64067
|
-
const parsed$ = safeParse4(request, (value$) => PauseSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64068
|
-
if (!parsed$.ok) {
|
|
64069
|
-
return [parsed$, { status: "invalid" }];
|
|
64070
|
-
}
|
|
64071
|
-
const payload$ = parsed$.value;
|
|
64072
|
-
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
64073
|
-
const pathParams$ = {
|
|
64074
|
-
id: encodeSimple("id", payload$.id, {
|
|
64075
|
-
explode: false,
|
|
64076
|
-
charEncoding: "percent"
|
|
64077
|
-
})
|
|
64078
|
-
};
|
|
64079
|
-
const path$ = pathToFunc("/subscriptions/{id}/pause")(pathParams$);
|
|
64080
|
-
const headers$ = new Headers(compactMap({
|
|
64081
|
-
"Content-Type": "application/json",
|
|
64082
|
-
Accept: "application/json"
|
|
64083
|
-
}));
|
|
64084
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
64085
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64086
|
-
const context = {
|
|
64087
|
-
options: client$._options,
|
|
64088
|
-
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
64089
|
-
operationID: "pauseSubscription",
|
|
64090
|
-
oAuth2Scopes: null,
|
|
64091
|
-
resolvedSecurity: requestSecurity,
|
|
64092
|
-
securitySource: client$._options.security,
|
|
64093
|
-
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
64094
|
-
retryCodes: options?.retryCodes || [
|
|
64095
|
-
"429",
|
|
64096
|
-
"500",
|
|
64097
|
-
"502",
|
|
64098
|
-
"503",
|
|
64099
|
-
"504"
|
|
64100
|
-
]
|
|
64101
|
-
};
|
|
64102
|
-
const requestRes = client$._createRequest(context, {
|
|
64103
|
-
security: requestSecurity,
|
|
64104
|
-
method: "POST",
|
|
64105
|
-
baseURL: options?.serverURL,
|
|
64106
|
-
path: path$,
|
|
64107
|
-
headers: headers$,
|
|
64108
|
-
body: body$,
|
|
64109
|
-
userAgent: client$._options.userAgent,
|
|
64110
|
-
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
64111
|
-
}, options);
|
|
64112
|
-
if (!requestRes.ok) {
|
|
64113
|
-
return [requestRes, { status: "invalid" }];
|
|
64114
|
-
}
|
|
64115
|
-
const req$ = requestRes.value;
|
|
64116
|
-
const doResult = await client$._do(req$, {
|
|
64117
|
-
context,
|
|
64118
|
-
errorCodes: [],
|
|
64119
|
-
retryConfig: context.retryConfig,
|
|
64120
|
-
retryCodes: context.retryCodes
|
|
64121
|
-
});
|
|
64122
|
-
if (!doResult.ok) {
|
|
64123
|
-
return [doResult, { status: "request-error", request: req$ }];
|
|
64124
|
-
}
|
|
64125
|
-
return [doResult, {
|
|
64126
|
-
status: "complete",
|
|
64127
|
-
request: req$,
|
|
64128
|
-
response: doResult.value
|
|
64129
|
-
}];
|
|
64130
|
-
}
|
|
64131
|
-
var init_subscriptionsPauseSubscription = __esm(() => {
|
|
64132
|
-
init_encodings();
|
|
64133
|
-
init_primitives();
|
|
64134
|
-
init_schemas4();
|
|
64135
|
-
init_security();
|
|
64136
|
-
init_url();
|
|
64137
|
-
init_pausesubscriptionop();
|
|
64138
|
-
init_async();
|
|
64139
|
-
});
|
|
64140
|
-
|
|
64141
|
-
// src/mcp-server/tools/subscriptionsPauseSubscription.ts
|
|
64142
|
-
var args65, tool$subscriptionsPauseSubscription;
|
|
64143
|
-
var init_subscriptionsPauseSubscription2 = __esm(() => {
|
|
64144
|
-
init_subscriptionsPauseSubscription();
|
|
64145
|
-
init_pausesubscriptionop();
|
|
64146
|
-
init_tools();
|
|
64147
|
-
args65 = {
|
|
64148
|
-
request: PauseSubscriptionRequestRequest$zodSchema
|
|
64149
|
-
};
|
|
64150
|
-
tool$subscriptionsPauseSubscription = {
|
|
64151
|
-
name: "pause-subscription",
|
|
64152
|
-
description: `Pause a subscription
|
|
64153
|
-
|
|
64154
|
-
Use when temporarily stopping a subscription (e.g. customer hold or seasonal pause). Billing and access pause; resume when ready.`,
|
|
64155
|
-
scopes: ["write"],
|
|
64156
|
-
annotations: {
|
|
64157
|
-
title: "",
|
|
64158
|
-
destructiveHint: false,
|
|
64159
|
-
idempotentHint: false,
|
|
64160
|
-
openWorldHint: false,
|
|
64161
|
-
readOnlyHint: false
|
|
64162
|
-
},
|
|
64163
|
-
args: args65,
|
|
64164
|
-
tool: async (client, args66, ctx) => {
|
|
64165
|
-
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();
|
|
64166
63842
|
if (!result.ok) {
|
|
64167
63843
|
return {
|
|
64168
63844
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64274,9 +63950,9 @@ var init_previewsubscriptionchangeop = __esm(() => {
|
|
|
64274
63950
|
|
|
64275
63951
|
// src/funcs/subscriptionsPreviewSubscriptionChange.ts
|
|
64276
63952
|
function subscriptionsPreviewSubscriptionChange(client$, request, options) {
|
|
64277
|
-
return new APIPromise($
|
|
63953
|
+
return new APIPromise($do65(client$, request, options));
|
|
64278
63954
|
}
|
|
64279
|
-
async function $
|
|
63955
|
+
async function $do65(client$, request, options) {
|
|
64280
63956
|
const parsed$ = safeParse4(request, (value$) => PreviewSubscriptionChangeRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64281
63957
|
if (!parsed$.ok) {
|
|
64282
63958
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64352,12 +64028,12 @@ var init_subscriptionsPreviewSubscriptionChange = __esm(() => {
|
|
|
64352
64028
|
});
|
|
64353
64029
|
|
|
64354
64030
|
// src/mcp-server/tools/subscriptionsPreviewSubscriptionChange.ts
|
|
64355
|
-
var
|
|
64031
|
+
var args64, tool$subscriptionsPreviewSubscriptionChange;
|
|
64356
64032
|
var init_subscriptionsPreviewSubscriptionChange2 = __esm(() => {
|
|
64357
64033
|
init_subscriptionsPreviewSubscriptionChange();
|
|
64358
64034
|
init_previewsubscriptionchangeop();
|
|
64359
64035
|
init_tools();
|
|
64360
|
-
|
|
64036
|
+
args64 = {
|
|
64361
64037
|
request: PreviewSubscriptionChangeRequest$zodSchema
|
|
64362
64038
|
};
|
|
64363
64039
|
tool$subscriptionsPreviewSubscriptionChange = {
|
|
@@ -64373,9 +64049,9 @@ Use when showing a customer the cost of a plan change before they confirm (e.g.
|
|
|
64373
64049
|
openWorldHint: false,
|
|
64374
64050
|
readOnlyHint: false
|
|
64375
64051
|
},
|
|
64376
|
-
args:
|
|
64377
|
-
tool: async (client,
|
|
64378
|
-
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();
|
|
64379
64055
|
if (!result.ok) {
|
|
64380
64056
|
return {
|
|
64381
64057
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64406,9 +64082,9 @@ var init_previewsubscriptionmodifyop = __esm(() => {
|
|
|
64406
64082
|
|
|
64407
64083
|
// src/funcs/subscriptionsPreviewSubscriptionModify.ts
|
|
64408
64084
|
function subscriptionsPreviewSubscriptionModify(client$, request, options) {
|
|
64409
|
-
return new APIPromise($
|
|
64085
|
+
return new APIPromise($do66(client$, request, options));
|
|
64410
64086
|
}
|
|
64411
|
-
async function $
|
|
64087
|
+
async function $do66(client$, request, options) {
|
|
64412
64088
|
const parsed$ = safeParse4(request, (value$) => PreviewSubscriptionModifyRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64413
64089
|
if (!parsed$.ok) {
|
|
64414
64090
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64484,12 +64160,12 @@ var init_subscriptionsPreviewSubscriptionModify = __esm(() => {
|
|
|
64484
64160
|
});
|
|
64485
64161
|
|
|
64486
64162
|
// src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts
|
|
64487
|
-
var
|
|
64163
|
+
var args65, tool$subscriptionsPreviewSubscriptionModify;
|
|
64488
64164
|
var init_subscriptionsPreviewSubscriptionModify2 = __esm(() => {
|
|
64489
64165
|
init_subscriptionsPreviewSubscriptionModify();
|
|
64490
64166
|
init_previewsubscriptionmodifyop();
|
|
64491
64167
|
init_tools();
|
|
64492
|
-
|
|
64168
|
+
args65 = {
|
|
64493
64169
|
request: PreviewSubscriptionModifyRequest$zodSchema
|
|
64494
64170
|
};
|
|
64495
64171
|
tool$subscriptionsPreviewSubscriptionModify = {
|
|
@@ -64505,9 +64181,9 @@ Preview the impact of a mid-cycle subscription modification without committing c
|
|
|
64505
64181
|
openWorldHint: false,
|
|
64506
64182
|
readOnlyHint: true
|
|
64507
64183
|
},
|
|
64508
|
-
args:
|
|
64509
|
-
tool: async (client,
|
|
64510
|
-
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();
|
|
64511
64187
|
if (!result.ok) {
|
|
64512
64188
|
return {
|
|
64513
64189
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64559,15 +64235,17 @@ When nil, period/cancel cutoff logic is not applied by this field (see TimeRange
|
|
|
64559
64235
|
subscription_ids: array(string2()).optional(),
|
|
64560
64236
|
subscription_status: array(SubscriptionStatus$zodSchema).optional().describe("SubscriptionStatus filters by subscription status"),
|
|
64561
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.`),
|
|
64562
64240
|
with_line_items: boolean2().optional().describe("WithLineItems includes line items in the response")
|
|
64563
64241
|
});
|
|
64564
64242
|
});
|
|
64565
64243
|
|
|
64566
64244
|
// src/funcs/subscriptionsQuerySubscription.ts
|
|
64567
64245
|
function subscriptionsQuerySubscription(client$, request, options) {
|
|
64568
|
-
return new APIPromise($
|
|
64246
|
+
return new APIPromise($do67(client$, request, options));
|
|
64569
64247
|
}
|
|
64570
|
-
async function $
|
|
64248
|
+
async function $do67(client$, request, options) {
|
|
64571
64249
|
const parsed$ = safeParse4(request, (value$) => SubscriptionFilter$zodSchema.parse(value$), "Input validation failed");
|
|
64572
64250
|
if (!parsed$.ok) {
|
|
64573
64251
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64637,12 +64315,12 @@ var init_subscriptionsQuerySubscription = __esm(() => {
|
|
|
64637
64315
|
});
|
|
64638
64316
|
|
|
64639
64317
|
// src/mcp-server/tools/subscriptionsQuerySubscription.ts
|
|
64640
|
-
var
|
|
64318
|
+
var args66, tool$subscriptionsQuerySubscription;
|
|
64641
64319
|
var init_subscriptionsQuerySubscription2 = __esm(() => {
|
|
64642
64320
|
init_subscriptionsQuerySubscription();
|
|
64643
64321
|
init_subscriptionfilter();
|
|
64644
64322
|
init_tools();
|
|
64645
|
-
|
|
64323
|
+
args66 = {
|
|
64646
64324
|
request: SubscriptionFilter$zodSchema.describe(`Filter`)
|
|
64647
64325
|
};
|
|
64648
64326
|
tool$subscriptionsQuerySubscription = {
|
|
@@ -64658,9 +64336,9 @@ Use when listing or searching subscriptions (e.g. admin view or customer subscri
|
|
|
64658
64336
|
openWorldHint: false,
|
|
64659
64337
|
readOnlyHint: false
|
|
64660
64338
|
},
|
|
64661
|
-
args:
|
|
64662
|
-
tool: async (client,
|
|
64663
|
-
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();
|
|
64664
64342
|
if (!result.ok) {
|
|
64665
64343
|
return {
|
|
64666
64344
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64676,17 +64354,23 @@ Use when listing or searching subscriptions (e.g. admin view or customer subscri
|
|
|
64676
64354
|
var RemoveAddonRequest$zodSchema;
|
|
64677
64355
|
var init_removeaddonrequest = __esm(() => {
|
|
64678
64356
|
init_zod();
|
|
64357
|
+
init_prorationbehavior();
|
|
64679
64358
|
RemoveAddonRequest$zodSchema = object({
|
|
64680
64359
|
addon_association_id: string2(),
|
|
64360
|
+
effective_date: exports_iso.datetime({ offset: true }).optional().describe(`EffectiveDate is the date the cancellation takes effect.
|
|
64361
|
+
When nil the addon is cancelled at the end of the current period.
|
|
64362
|
+
When provided it must fall within [CurrentPeriodStart, CurrentPeriodEnd]; mid-period
|
|
64363
|
+
values combined with create_prorations will issue a wallet credit for unused time.`),
|
|
64364
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
64681
64365
|
reason: string2().optional()
|
|
64682
64366
|
});
|
|
64683
64367
|
});
|
|
64684
64368
|
|
|
64685
64369
|
// src/funcs/subscriptionsRemoveSubscriptionAddon.ts
|
|
64686
64370
|
function subscriptionsRemoveSubscriptionAddon(client$, request, options) {
|
|
64687
|
-
return new APIPromise($
|
|
64371
|
+
return new APIPromise($do68(client$, request, options));
|
|
64688
64372
|
}
|
|
64689
|
-
async function $
|
|
64373
|
+
async function $do68(client$, request, options) {
|
|
64690
64374
|
const parsed$ = safeParse4(request, (value$) => RemoveAddonRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64691
64375
|
if (!parsed$.ok) {
|
|
64692
64376
|
return [parsed$, { status: "invalid" }];
|
|
@@ -64756,12 +64440,12 @@ var init_subscriptionsRemoveSubscriptionAddon = __esm(() => {
|
|
|
64756
64440
|
});
|
|
64757
64441
|
|
|
64758
64442
|
// src/mcp-server/tools/subscriptionsRemoveSubscriptionAddon.ts
|
|
64759
|
-
var
|
|
64443
|
+
var args67, tool$subscriptionsRemoveSubscriptionAddon;
|
|
64760
64444
|
var init_subscriptionsRemoveSubscriptionAddon2 = __esm(() => {
|
|
64761
64445
|
init_subscriptionsRemoveSubscriptionAddon();
|
|
64762
64446
|
init_removeaddonrequest();
|
|
64763
64447
|
init_tools();
|
|
64764
|
-
|
|
64448
|
+
args67 = {
|
|
64765
64449
|
request: RemoveAddonRequest$zodSchema.describe(`Remove Addon Request`)
|
|
64766
64450
|
};
|
|
64767
64451
|
tool$subscriptionsRemoveSubscriptionAddon = {
|
|
@@ -64777,157 +64461,9 @@ Use when removing an add-on from a subscription (e.g. downgrade or opt-out).`,
|
|
|
64777
64461
|
openWorldHint: false,
|
|
64778
64462
|
readOnlyHint: false
|
|
64779
64463
|
},
|
|
64780
|
-
args:
|
|
64781
|
-
tool: async (client,
|
|
64782
|
-
const [result] = await subscriptionsRemoveSubscriptionAddon(client,
|
|
64783
|
-
if (!result.ok) {
|
|
64784
|
-
return {
|
|
64785
|
-
content: [{ type: "text", text: result.error.message }],
|
|
64786
|
-
isError: true
|
|
64787
|
-
};
|
|
64788
|
-
}
|
|
64789
|
-
return formatResult(result.value);
|
|
64790
|
-
}
|
|
64791
|
-
};
|
|
64792
|
-
});
|
|
64793
|
-
|
|
64794
|
-
// src/models/resumesubscriptionrequest.ts
|
|
64795
|
-
var ResumeSubscriptionRequest$zodSchema;
|
|
64796
|
-
var init_resumesubscriptionrequest = __esm(() => {
|
|
64797
|
-
init_zod();
|
|
64798
|
-
init_resumemode();
|
|
64799
|
-
ResumeSubscriptionRequest$zodSchema = object({
|
|
64800
|
-
dry_run: boolean2().optional().describe(`Whether to perform a dry run
|
|
64801
|
-
@Description If true, validates the request and shows impact without actually resuming the subscription
|
|
64802
|
-
@Example false`),
|
|
64803
|
-
metadata: record(string2(), string2()).optional().describe(`Additional metadata as key-value pairs
|
|
64804
|
-
@Description Optional metadata for storing additional information about the resume operation
|
|
64805
|
-
@Example {"resumed_by": "admin", "reason": "issue_resolved"}`),
|
|
64806
|
-
resume_mode: ResumeMode$zodSchema
|
|
64807
|
-
}).describe("Request object for resuming a paused subscription");
|
|
64808
|
-
});
|
|
64809
|
-
|
|
64810
|
-
// src/models/resumesubscriptionop.ts
|
|
64811
|
-
var ResumeSubscriptionRequestRequest$zodSchema, ResumeSubscriptionResponse$zodSchema;
|
|
64812
|
-
var init_resumesubscriptionop = __esm(() => {
|
|
64813
|
-
init_zod();
|
|
64814
|
-
init_errorresponse();
|
|
64815
|
-
init_resumesubscriptionrequest();
|
|
64816
|
-
init_subscriptionpauseresponse();
|
|
64817
|
-
ResumeSubscriptionRequestRequest$zodSchema = object({
|
|
64818
|
-
body: ResumeSubscriptionRequest$zodSchema.describe("Resume subscription request"),
|
|
64819
|
-
id: string2().describe("Subscription ID")
|
|
64820
|
-
});
|
|
64821
|
-
ResumeSubscriptionResponse$zodSchema = union([
|
|
64822
|
-
SubscriptionPauseResponse$zodSchema,
|
|
64823
|
-
ErrorResponse$zodSchema
|
|
64824
|
-
]);
|
|
64825
|
-
});
|
|
64826
|
-
|
|
64827
|
-
// src/funcs/subscriptionsResumeSubscription.ts
|
|
64828
|
-
function subscriptionsResumeSubscription(client$, request, options) {
|
|
64829
|
-
return new APIPromise($do71(client$, request, options));
|
|
64830
|
-
}
|
|
64831
|
-
async function $do71(client$, request, options) {
|
|
64832
|
-
const parsed$ = safeParse4(request, (value$) => ResumeSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64833
|
-
if (!parsed$.ok) {
|
|
64834
|
-
return [parsed$, { status: "invalid" }];
|
|
64835
|
-
}
|
|
64836
|
-
const payload$ = parsed$.value;
|
|
64837
|
-
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
64838
|
-
const pathParams$ = {
|
|
64839
|
-
id: encodeSimple("id", payload$.id, {
|
|
64840
|
-
explode: false,
|
|
64841
|
-
charEncoding: "percent"
|
|
64842
|
-
})
|
|
64843
|
-
};
|
|
64844
|
-
const path$ = pathToFunc("/subscriptions/{id}/resume")(pathParams$);
|
|
64845
|
-
const headers$ = new Headers(compactMap({
|
|
64846
|
-
"Content-Type": "application/json",
|
|
64847
|
-
Accept: "application/json"
|
|
64848
|
-
}));
|
|
64849
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
64850
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64851
|
-
const context = {
|
|
64852
|
-
options: client$._options,
|
|
64853
|
-
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
64854
|
-
operationID: "resumeSubscription",
|
|
64855
|
-
oAuth2Scopes: null,
|
|
64856
|
-
resolvedSecurity: requestSecurity,
|
|
64857
|
-
securitySource: client$._options.security,
|
|
64858
|
-
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
64859
|
-
retryCodes: options?.retryCodes || [
|
|
64860
|
-
"429",
|
|
64861
|
-
"500",
|
|
64862
|
-
"502",
|
|
64863
|
-
"503",
|
|
64864
|
-
"504"
|
|
64865
|
-
]
|
|
64866
|
-
};
|
|
64867
|
-
const requestRes = client$._createRequest(context, {
|
|
64868
|
-
security: requestSecurity,
|
|
64869
|
-
method: "POST",
|
|
64870
|
-
baseURL: options?.serverURL,
|
|
64871
|
-
path: path$,
|
|
64872
|
-
headers: headers$,
|
|
64873
|
-
body: body$,
|
|
64874
|
-
userAgent: client$._options.userAgent,
|
|
64875
|
-
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
64876
|
-
}, options);
|
|
64877
|
-
if (!requestRes.ok) {
|
|
64878
|
-
return [requestRes, { status: "invalid" }];
|
|
64879
|
-
}
|
|
64880
|
-
const req$ = requestRes.value;
|
|
64881
|
-
const doResult = await client$._do(req$, {
|
|
64882
|
-
context,
|
|
64883
|
-
errorCodes: [],
|
|
64884
|
-
retryConfig: context.retryConfig,
|
|
64885
|
-
retryCodes: context.retryCodes
|
|
64886
|
-
});
|
|
64887
|
-
if (!doResult.ok) {
|
|
64888
|
-
return [doResult, { status: "request-error", request: req$ }];
|
|
64889
|
-
}
|
|
64890
|
-
return [doResult, {
|
|
64891
|
-
status: "complete",
|
|
64892
|
-
request: req$,
|
|
64893
|
-
response: doResult.value
|
|
64894
|
-
}];
|
|
64895
|
-
}
|
|
64896
|
-
var init_subscriptionsResumeSubscription = __esm(() => {
|
|
64897
|
-
init_encodings();
|
|
64898
|
-
init_primitives();
|
|
64899
|
-
init_schemas4();
|
|
64900
|
-
init_security();
|
|
64901
|
-
init_url();
|
|
64902
|
-
init_resumesubscriptionop();
|
|
64903
|
-
init_async();
|
|
64904
|
-
});
|
|
64905
|
-
|
|
64906
|
-
// src/mcp-server/tools/subscriptionsResumeSubscription.ts
|
|
64907
|
-
var args70, tool$subscriptionsResumeSubscription;
|
|
64908
|
-
var init_subscriptionsResumeSubscription2 = __esm(() => {
|
|
64909
|
-
init_subscriptionsResumeSubscription();
|
|
64910
|
-
init_resumesubscriptionop();
|
|
64911
|
-
init_tools();
|
|
64912
|
-
args70 = {
|
|
64913
|
-
request: ResumeSubscriptionRequestRequest$zodSchema
|
|
64914
|
-
};
|
|
64915
|
-
tool$subscriptionsResumeSubscription = {
|
|
64916
|
-
name: "resume-subscription",
|
|
64917
|
-
description: `Resume a paused subscription
|
|
64918
|
-
|
|
64919
|
-
Use when reactivating a paused subscription (e.g. end of hold). Billing and access resume from the resume date.`,
|
|
64920
|
-
scopes: ["write"],
|
|
64921
|
-
annotations: {
|
|
64922
|
-
title: "",
|
|
64923
|
-
destructiveHint: false,
|
|
64924
|
-
idempotentHint: false,
|
|
64925
|
-
openWorldHint: false,
|
|
64926
|
-
readOnlyHint: false
|
|
64927
|
-
},
|
|
64928
|
-
args: args70,
|
|
64929
|
-
tool: async (client, args71, ctx) => {
|
|
64930
|
-
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();
|
|
64931
64467
|
if (!result.ok) {
|
|
64932
64468
|
return {
|
|
64933
64469
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -64971,9 +64507,9 @@ var init_updatesubscriptionop = __esm(() => {
|
|
|
64971
64507
|
|
|
64972
64508
|
// src/funcs/subscriptionsUpdateSubscription.ts
|
|
64973
64509
|
function subscriptionsUpdateSubscription(client$, request, options) {
|
|
64974
|
-
return new APIPromise($
|
|
64510
|
+
return new APIPromise($do69(client$, request, options));
|
|
64975
64511
|
}
|
|
64976
|
-
async function $
|
|
64512
|
+
async function $do69(client$, request, options) {
|
|
64977
64513
|
const parsed$ = safeParse4(request, (value$) => UpdateSubscriptionRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
64978
64514
|
if (!parsed$.ok) {
|
|
64979
64515
|
return [parsed$, { status: "invalid" }];
|
|
@@ -65049,12 +64585,12 @@ var init_subscriptionsUpdateSubscription = __esm(() => {
|
|
|
65049
64585
|
});
|
|
65050
64586
|
|
|
65051
64587
|
// src/mcp-server/tools/subscriptionsUpdateSubscription.ts
|
|
65052
|
-
var
|
|
64588
|
+
var args68, tool$subscriptionsUpdateSubscription;
|
|
65053
64589
|
var init_subscriptionsUpdateSubscription2 = __esm(() => {
|
|
65054
64590
|
init_subscriptionsUpdateSubscription();
|
|
65055
64591
|
init_updatesubscriptionop();
|
|
65056
64592
|
init_tools();
|
|
65057
|
-
|
|
64593
|
+
args68 = {
|
|
65058
64594
|
request: UpdateSubscriptionRequestRequest$zodSchema
|
|
65059
64595
|
};
|
|
65060
64596
|
tool$subscriptionsUpdateSubscription = {
|
|
@@ -65070,9 +64606,9 @@ Use when changing subscription details (e.g. quantity, billing anchor, or parent
|
|
|
65070
64606
|
openWorldHint: false,
|
|
65071
64607
|
readOnlyHint: false
|
|
65072
64608
|
},
|
|
65073
|
-
args:
|
|
65074
|
-
tool: async (client,
|
|
65075
|
-
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();
|
|
65076
64612
|
if (!result.ok) {
|
|
65077
64613
|
return {
|
|
65078
64614
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -65131,9 +64667,9 @@ var init_updatesubscriptionlineitemop = __esm(() => {
|
|
|
65131
64667
|
|
|
65132
64668
|
// src/funcs/subscriptionsUpdateSubscriptionLineItem.ts
|
|
65133
64669
|
function subscriptionsUpdateSubscriptionLineItem(client$, request, options) {
|
|
65134
|
-
return new APIPromise($
|
|
64670
|
+
return new APIPromise($do70(client$, request, options));
|
|
65135
64671
|
}
|
|
65136
|
-
async function $
|
|
64672
|
+
async function $do70(client$, request, options) {
|
|
65137
64673
|
const parsed$ = safeParse4(request, (value$) => UpdateSubscriptionLineItemRequestRequest$zodSchema.parse(value$), "Input validation failed");
|
|
65138
64674
|
if (!parsed$.ok) {
|
|
65139
64675
|
return [parsed$, { status: "invalid" }];
|
|
@@ -65209,12 +64745,12 @@ var init_subscriptionsUpdateSubscriptionLineItem = __esm(() => {
|
|
|
65209
64745
|
});
|
|
65210
64746
|
|
|
65211
64747
|
// src/mcp-server/tools/subscriptionsUpdateSubscriptionLineItem.ts
|
|
65212
|
-
var
|
|
64748
|
+
var args69, tool$subscriptionsUpdateSubscriptionLineItem;
|
|
65213
64749
|
var init_subscriptionsUpdateSubscriptionLineItem2 = __esm(() => {
|
|
65214
64750
|
init_subscriptionsUpdateSubscriptionLineItem();
|
|
65215
64751
|
init_updatesubscriptionlineitemop();
|
|
65216
64752
|
init_tools();
|
|
65217
|
-
|
|
64753
|
+
args69 = {
|
|
65218
64754
|
request: UpdateSubscriptionLineItemRequestRequest$zodSchema
|
|
65219
64755
|
};
|
|
65220
64756
|
tool$subscriptionsUpdateSubscriptionLineItem = {
|
|
@@ -65230,9 +64766,9 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
65230
64766
|
openWorldHint: false,
|
|
65231
64767
|
readOnlyHint: false
|
|
65232
64768
|
},
|
|
65233
|
-
args:
|
|
65234
|
-
tool: async (client,
|
|
65235
|
-
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();
|
|
65236
64772
|
if (!result.ok) {
|
|
65237
64773
|
return {
|
|
65238
64774
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -65248,16 +64784,16 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
65248
64784
|
function createMCPServer(deps) {
|
|
65249
64785
|
const server = new McpServer({
|
|
65250
64786
|
name: "Flexprice",
|
|
65251
|
-
version: "2.1.
|
|
64787
|
+
version: "2.1.6"
|
|
65252
64788
|
});
|
|
65253
64789
|
const getClient = deps.getSDK || (() => new FlexpriceCore({
|
|
65254
64790
|
security: deps.security,
|
|
65255
64791
|
serverURL: deps.serverURL,
|
|
65256
64792
|
serverIdx: deps.serverIdx,
|
|
65257
64793
|
debugLogger: deps.logger.level === "debug" ? {
|
|
65258
|
-
log: (...
|
|
65259
|
-
group: (...
|
|
65260
|
-
groupEnd: (...
|
|
64794
|
+
log: (...args70) => console.log(...args70),
|
|
64795
|
+
group: (...args70) => console.group(...args70),
|
|
64796
|
+
groupEnd: (...args70) => console.groupEnd(...args70)
|
|
65261
64797
|
} : undefined
|
|
65262
64798
|
}));
|
|
65263
64799
|
const scopes = new Set(deps.scopes);
|
|
@@ -65332,9 +64868,6 @@ function createMCPServer(deps) {
|
|
|
65332
64868
|
tool(tool$subscriptionsCreateSubscriptionLineItem);
|
|
65333
64869
|
tool(tool$subscriptionsExecuteSubscriptionModify);
|
|
65334
64870
|
tool(tool$subscriptionsPreviewSubscriptionModify);
|
|
65335
|
-
tool(tool$subscriptionsPauseSubscription);
|
|
65336
|
-
tool(tool$subscriptionsListSubscriptionPauses);
|
|
65337
|
-
tool(tool$subscriptionsResumeSubscription);
|
|
65338
64871
|
tool(tool$subscriptionsGetSubscriptionV2);
|
|
65339
64872
|
tool(tool$subscriptionsListAllSubscriptionSchedules);
|
|
65340
64873
|
tool(tool$subscriptionsGetSubscriptionSchedule);
|
|
@@ -65413,14 +64946,11 @@ var init_server2 = __esm(() => {
|
|
|
65413
64946
|
init_subscriptionsGetSubscriptionUsage2();
|
|
65414
64947
|
init_subscriptionsGetSubscriptionV22();
|
|
65415
64948
|
init_subscriptionsListAllSubscriptionSchedules2();
|
|
65416
|
-
init_subscriptionsListSubscriptionPauses2();
|
|
65417
64949
|
init_subscriptionsListSubscriptionSchedules2();
|
|
65418
|
-
init_subscriptionsPauseSubscription2();
|
|
65419
64950
|
init_subscriptionsPreviewSubscriptionChange2();
|
|
65420
64951
|
init_subscriptionsPreviewSubscriptionModify2();
|
|
65421
64952
|
init_subscriptionsQuerySubscription2();
|
|
65422
64953
|
init_subscriptionsRemoveSubscriptionAddon2();
|
|
65423
|
-
init_subscriptionsResumeSubscription2();
|
|
65424
64954
|
init_subscriptionsUpdateSubscription2();
|
|
65425
64955
|
init_subscriptionsUpdateSubscriptionLineItem2();
|
|
65426
64956
|
});
|
|
@@ -65818,24 +65348,6 @@ Execute a mid-cycle subscription modification (inheritance or quantity change).`
|
|
|
65818
65348
|
description: `Preview subscription modification
|
|
65819
65349
|
|
|
65820
65350
|
Preview the impact of a mid-cycle subscription modification without committing changes.`
|
|
65821
|
-
},
|
|
65822
|
-
{
|
|
65823
|
-
name: "pause-subscription",
|
|
65824
|
-
description: `Pause a subscription
|
|
65825
|
-
|
|
65826
|
-
Use when temporarily stopping a subscription (e.g. customer hold or seasonal pause). Billing and access pause; resume when ready.`
|
|
65827
|
-
},
|
|
65828
|
-
{
|
|
65829
|
-
name: "list-subscription-pauses",
|
|
65830
|
-
description: `List all pauses for a subscription
|
|
65831
|
-
|
|
65832
|
-
Use when showing pause history for a subscription (e.g. support or audit). Returns all past and future pauses.`
|
|
65833
|
-
},
|
|
65834
|
-
{
|
|
65835
|
-
name: "resume-subscription",
|
|
65836
|
-
description: `Resume a paused subscription
|
|
65837
|
-
|
|
65838
|
-
Use when reactivating a paused subscription (e.g. end of hold). Billing and access resume from the resume date.`
|
|
65839
65351
|
},
|
|
65840
65352
|
{
|
|
65841
65353
|
name: "get-subscription-v2",
|
|
@@ -69411,7 +68923,7 @@ var routes = buildRouteMap({
|
|
|
69411
68923
|
var app = buildApplication(routes, {
|
|
69412
68924
|
name: "mcp",
|
|
69413
68925
|
versionInfo: {
|
|
69414
|
-
currentVersion: "2.1.
|
|
68926
|
+
currentVersion: "2.1.6"
|
|
69415
68927
|
}
|
|
69416
68928
|
});
|
|
69417
68929
|
run(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -69419,5 +68931,5 @@ export {
|
|
|
69419
68931
|
app
|
|
69420
68932
|
};
|
|
69421
68933
|
|
|
69422
|
-
//# debugId=
|
|
68934
|
+
//# debugId=4C70D2B22566A71A64756E2164756E21
|
|
69423
68935
|
//# sourceMappingURL=mcp-server.js.map
|