@flexprice/mcp-server 2.1.11 → 2.1.18
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 +604 -213
- package/bin/mcp-server.js.map +66 -53
- package/bun.lock +25 -23
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.d.ts +1 -1
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.js +1 -1
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.d.ts +1 -1
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js +1 -1
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js.map +1 -1
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js +1 -1
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js.map +1 -1
- package/esm/models/attributedtocustomerresult.d.ts +11 -0
- package/esm/models/attributedtocustomerresult.d.ts.map +1 -0
- package/esm/models/attributedtocustomerresult.js +13 -0
- package/esm/models/attributedtocustomerresult.js.map +1 -0
- package/esm/models/bucket.d.ts +7 -0
- package/esm/models/bucket.d.ts.map +1 -0
- package/esm/models/bucket.js +9 -0
- package/esm/models/bucket.js.map +1 -0
- package/esm/models/bucketsummary.d.ts +18 -0
- package/esm/models/bucketsummary.d.ts.map +1 -0
- package/esm/models/bucketsummary.js +20 -0
- package/esm/models/bucketsummary.js.map +1 -0
- package/esm/models/cancelsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/cancelsubscriptionrequest.js +1 -1
- package/esm/models/cancelsubscriptionrequest.js.map +1 -1
- package/esm/models/changedsubscription.d.ts +2 -0
- package/esm/models/changedsubscription.d.ts.map +1 -1
- package/esm/models/changedsubscription.js +2 -0
- package/esm/models/changedsubscription.js.map +1 -1
- package/esm/models/commitmentbucketrequest.d.ts +16 -0
- package/esm/models/commitmentbucketrequest.d.ts.map +1 -0
- package/esm/models/commitmentbucketrequest.js +18 -0
- package/esm/models/commitmentbucketrequest.js.map +1 -0
- package/esm/models/coupon.d.ts +1 -0
- package/esm/models/coupon.d.ts.map +1 -1
- package/esm/models/coupon.js +1 -0
- package/esm/models/coupon.js.map +1 -1
- package/esm/models/createinvoicelineitemrequest.d.ts +3 -0
- package/esm/models/createinvoicelineitemrequest.d.ts.map +1 -1
- package/esm/models/createinvoicelineitemrequest.js +3 -0
- package/esm/models/createinvoicelineitemrequest.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 +3 -0
- package/esm/models/createsubscriptionlineitemrequest.js.map +1 -1
- package/esm/models/createsubscriptionrequest.d.ts +2 -0
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +6 -2
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
- package/esm/models/debugtracker.d.ts +2 -0
- package/esm/models/debugtracker.d.ts.map +1 -1
- package/esm/models/debugtracker.js +2 -0
- package/esm/models/debugtracker.js.map +1 -1
- package/esm/models/debugtrackerstatus.d.ts +4 -0
- package/esm/models/debugtrackerstatus.d.ts.map +1 -1
- package/esm/models/debugtrackerstatus.js +4 -0
- package/esm/models/debugtrackerstatus.js.map +1 -1
- package/esm/models/entityintegrationmappingresponse.d.ts +3 -0
- package/esm/models/entityintegrationmappingresponse.d.ts.map +1 -1
- package/esm/models/entityintegrationmappingresponse.js +1 -0
- package/esm/models/entityintegrationmappingresponse.js.map +1 -1
- package/esm/models/eventprocessingstatustype.d.ts +1 -1
- package/esm/models/executesubscriptionmodifyrequest.d.ts +6 -0
- package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.js +6 -0
- package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
- package/esm/models/failurepointtype.d.ts +2 -0
- package/esm/models/failurepointtype.d.ts.map +1 -1
- package/esm/models/failurepointtype.js +2 -0
- package/esm/models/failurepointtype.js.map +1 -1
- package/esm/models/getusageanalyticsrequest.d.ts +1 -0
- package/esm/models/getusageanalyticsrequest.d.ts.map +1 -1
- package/esm/models/getusageanalyticsrequest.js +1 -0
- package/esm/models/getusageanalyticsrequest.js.map +1 -1
- package/esm/models/inheritanceaction.d.ts +12 -0
- package/esm/models/inheritanceaction.d.ts.map +1 -0
- package/esm/models/inheritanceaction.js +13 -0
- package/esm/models/inheritanceaction.js.map +1 -0
- 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/invoicefilter.d.ts +3 -0
- package/esm/models/invoicefilter.d.ts.map +1 -1
- package/esm/models/invoicefilter.js +3 -0
- package/esm/models/invoicefilter.js.map +1 -1
- package/esm/models/invoicelineitemresponse.d.ts +2 -0
- package/esm/models/invoicelineitemresponse.d.ts.map +1 -1
- package/esm/models/invoicelineitemresponse.js +2 -0
- package/esm/models/invoicelineitemresponse.js.map +1 -1
- package/esm/models/lineitemcommitmentconfig.d.ts +2 -0
- package/esm/models/lineitemcommitmentconfig.d.ts.map +1 -1
- package/esm/models/lineitemcommitmentconfig.js +3 -0
- package/esm/models/lineitemcommitmentconfig.js.map +1 -1
- package/esm/models/meterusageattribution.d.ts +8 -0
- package/esm/models/meterusageattribution.d.ts.map +1 -0
- package/esm/models/meterusageattribution.js +10 -0
- package/esm/models/meterusageattribution.js.map +1 -0
- package/esm/models/pricefilter.d.ts +2 -0
- package/esm/models/pricefilter.d.ts.map +1 -1
- package/esm/models/pricefilter.js +2 -0
- package/esm/models/pricefilter.js.map +1 -1
- package/esm/models/priceprice.d.ts +1 -0
- package/esm/models/priceprice.d.ts.map +1 -1
- package/esm/models/priceprice.js +1 -0
- package/esm/models/priceprice.js.map +1 -1
- package/esm/models/priceresponse.d.ts +1 -0
- package/esm/models/priceresponse.d.ts.map +1 -1
- package/esm/models/priceresponse.js +1 -0
- package/esm/models/priceresponse.js.map +1 -1
- package/esm/models/submodifycouponaction.d.ts +12 -0
- package/esm/models/submodifycouponaction.d.ts.map +1 -0
- package/esm/models/submodifycouponaction.js +13 -0
- package/esm/models/submodifycouponaction.js.map +1 -0
- package/esm/models/submodifycouponparams.d.ts +14 -0
- package/esm/models/submodifycouponparams.d.ts.map +1 -0
- package/esm/models/submodifycouponparams.js +16 -0
- package/esm/models/submodifycouponparams.js.map +1 -0
- package/esm/models/submodifyinheritancerequest.d.ts +3 -0
- package/esm/models/submodifyinheritancerequest.d.ts.map +1 -1
- package/esm/models/submodifyinheritancerequest.js +5 -1
- package/esm/models/submodifyinheritancerequest.js.map +1 -1
- package/esm/models/submodifytaxaction.d.ts +12 -0
- package/esm/models/submodifytaxaction.d.ts.map +1 -0
- package/esm/models/submodifytaxaction.js +13 -0
- package/esm/models/submodifytaxaction.js.map +1 -0
- package/esm/models/submodifytaxparams.d.ts +10 -0
- package/esm/models/submodifytaxparams.d.ts.map +1 -0
- package/esm/models/submodifytaxparams.js +13 -0
- package/esm/models/submodifytaxparams.js.map +1 -0
- package/esm/models/submodifytrialendrequest.d.ts +8 -0
- package/esm/models/submodifytrialendrequest.d.ts.map +1 -0
- package/esm/models/submodifytrialendrequest.js +10 -0
- package/esm/models/submodifytrialendrequest.js.map +1 -0
- package/esm/models/subscriptioncouponinput.d.ts +9 -0
- package/esm/models/subscriptioncouponinput.d.ts.map +1 -0
- package/esm/models/subscriptioncouponinput.js +11 -0
- package/esm/models/subscriptioncouponinput.js.map +1 -0
- package/esm/models/subscriptionlineitemresponse.d.ts +2 -0
- package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
- package/esm/models/subscriptionlineitemresponse.js +2 -0
- package/esm/models/subscriptionlineitemresponse.js.map +1 -1
- package/esm/models/subscriptionmodifytype.d.ts +6 -0
- package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
- package/esm/models/subscriptionmodifytype.js +6 -0
- package/esm/models/subscriptionmodifytype.js.map +1 -1
- package/esm/models/subscriptionphasecreaterequest.d.ts +2 -0
- package/esm/models/subscriptionphasecreaterequest.d.ts.map +1 -1
- package/esm/models/subscriptionphasecreaterequest.js +5 -2
- package/esm/models/subscriptionphasecreaterequest.js.map +1 -1
- package/esm/models/subscriptionresponse.d.ts +1 -0
- package/esm/models/subscriptionresponse.d.ts.map +1 -1
- package/esm/models/subscriptionresponse.js +1 -0
- package/esm/models/subscriptionresponse.js.map +1 -1
- package/esm/models/subscriptionresponsev2.d.ts +2 -0
- package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
- package/esm/models/subscriptionresponsev2.js +2 -0
- package/esm/models/subscriptionresponsev2.js.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts +2 -0
- package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.js +2 -0
- package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
- package/esm/models/timeofdaybucket.d.ts +15 -0
- package/esm/models/timeofdaybucket.d.ts.map +1 -0
- package/esm/models/timeofdaybucket.js +17 -0
- package/esm/models/timeofdaybucket.js.map +1 -0
- package/esm/models/trialendaction.d.ts +12 -0
- package/esm/models/trialendaction.d.ts.map +1 -0
- package/esm/models/trialendaction.js +13 -0
- package/esm/models/trialendaction.js.map +1 -0
- package/esm/models/updatesubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/updatesubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/updatesubscriptionlineitemrequest.js +3 -0
- package/esm/models/updatesubscriptionlineitemrequest.js.map +1 -1
- package/esm/models/usageanalyticitem.d.ts +2 -0
- package/esm/models/usageanalyticitem.d.ts.map +1 -1
- package/esm/models/usageanalyticitem.js +2 -0
- package/esm/models/usageanalyticitem.js.map +1 -1
- package/esm/models/usageanalyticpoint.d.ts +2 -0
- package/esm/models/usageanalyticpoint.d.ts.map +1 -1
- package/esm/models/usageanalyticpoint.js +2 -0
- package/esm/models/usageanalyticpoint.js.map +1 -1
- package/esm/models/userresponse.d.ts +4 -0
- package/esm/models/userresponse.d.ts.map +1 -1
- package/esm/models/userresponse.js +2 -0
- package/esm/models/userresponse.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.js +2 -2
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +6 -6
- package/esm/types/async.js.map +1 -1
- package/manifest.json +3 -3
- package/package.json +1 -1
- package/src/funcs/subscriptionsExecuteSubscriptionModify.ts +1 -1
- package/src/funcs/subscriptionsPreviewSubscriptionModify.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/subscriptionsExecuteSubscriptionModify.ts +1 -1
- package/src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts +1 -1
- package/src/models/attributedtocustomerresult.ts +28 -0
- package/src/models/bucket.ts +12 -0
- package/src/models/bucketsummary.ts +40 -0
- package/src/models/cancelsubscriptionrequest.ts +3 -1
- package/src/models/changedsubscription.ts +4 -0
- package/src/models/commitmentbucketrequest.ts +35 -0
- package/src/models/coupon.ts +2 -0
- package/src/models/createinvoicelineitemrequest.ts +12 -0
- package/src/models/createsubscriptionlineitemrequest.ts +7 -0
- package/src/models/createsubscriptionrequest.ts +14 -2
- package/src/models/debugtracker.ts +6 -0
- package/src/models/debugtrackerstatus.ts +4 -0
- package/src/models/entityintegrationmappingresponse.ts +2 -0
- package/src/models/executesubscriptionmodifyrequest.ts +18 -0
- package/src/models/failurepointtype.ts +2 -0
- package/src/models/getusageanalyticsrequest.ts +4 -0
- package/src/models/inheritanceaction.ts +17 -0
- package/src/models/invoicebillingreason.ts +2 -0
- package/src/models/invoicefilter.ts +10 -0
- package/src/models/invoicelineitemresponse.ts +8 -0
- package/src/models/lineitemcommitmentconfig.ts +9 -0
- package/src/models/meterusageattribution.ts +18 -0
- package/src/models/pricefilter.ts +3 -0
- package/src/models/priceprice.ts +4 -0
- package/src/models/priceresponse.ts +4 -0
- package/src/models/submodifycouponaction.ts +17 -0
- package/src/models/submodifycouponparams.ts +46 -0
- package/src/models/submodifyinheritancerequest.ts +14 -1
- package/src/models/submodifytaxaction.ts +17 -0
- package/src/models/submodifytaxparams.ts +30 -0
- package/src/models/submodifytrialendrequest.ts +20 -0
- package/src/models/subscriptioncouponinput.ts +29 -0
- package/src/models/subscriptionlineitemresponse.ts +6 -0
- package/src/models/subscriptionmodifytype.ts +6 -0
- package/src/models/subscriptionphasecreaterequest.ts +11 -4
- package/src/models/subscriptionresponse.ts +4 -0
- package/src/models/subscriptionresponsev2.ts +8 -0
- package/src/models/subscriptionsubscriptionlineitem.ts +6 -0
- package/src/models/timeofdaybucket.ts +33 -0
- package/src/models/trialendaction.ts +17 -0
- package/src/models/updatesubscriptionlineitemrequest.ts +9 -0
- package/src/models/usageanalyticitem.ts +5 -0
- package/src/models/usageanalyticpoint.ts +6 -0
- package/src/models/userresponse.ts +4 -0
- package/src/models/windowsize.ts +2 -2
- package/src/tool-names.ts +2 -2
- package/src/types/async.ts +8 -7
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.d.ts.map +0 -1
- package/esm/lib/dlv.js +0 -46
- package/esm/lib/dlv.js.map +0 -1
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.d.ts.map +0 -1
- package/esm/lib/is-plain-object.js +0 -38
- package/esm/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
package/bin/mcp-server.js
CHANGED
|
@@ -23127,116 +23127,143 @@ var require_type_is = __commonJS((exports, module) => {
|
|
|
23127
23127
|
}
|
|
23128
23128
|
});
|
|
23129
23129
|
|
|
23130
|
-
// node_modules/content-type/index.js
|
|
23131
|
-
var
|
|
23130
|
+
// node_modules/body-parser/node_modules/content-type/dist/index.js
|
|
23131
|
+
var require_dist2 = __commonJS((exports) => {
|
|
23132
23132
|
/*!
|
|
23133
23133
|
* content-type
|
|
23134
23134
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
23135
23135
|
* MIT Licensed
|
|
23136
23136
|
*/
|
|
23137
|
-
|
|
23138
|
-
var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
|
|
23139
|
-
var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
23140
|
-
var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
|
|
23141
|
-
var QUOTE_REGEXP = /([\\"])/g;
|
|
23142
|
-
var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
23137
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23143
23138
|
exports.format = format;
|
|
23144
23139
|
exports.parse = parse5;
|
|
23140
|
+
var TEXT_REGEXP = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/;
|
|
23141
|
+
var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
23142
|
+
var QUOTE_REGEXP = /[\\"]/g;
|
|
23143
|
+
var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
23144
|
+
var NullObject = /* @__PURE__ */ (() => {
|
|
23145
|
+
const C = function() {};
|
|
23146
|
+
C.prototype = Object.create(null);
|
|
23147
|
+
return C;
|
|
23148
|
+
})();
|
|
23145
23149
|
function format(obj) {
|
|
23146
|
-
|
|
23147
|
-
throw new TypeError("argument obj is required");
|
|
23148
|
-
}
|
|
23149
|
-
var parameters = obj.parameters;
|
|
23150
|
-
var type = obj.type;
|
|
23150
|
+
const { type, parameters } = obj;
|
|
23151
23151
|
if (!type || !TYPE_REGEXP.test(type)) {
|
|
23152
|
-
throw new TypeError(
|
|
23152
|
+
throw new TypeError(`Invalid type: ${type}`);
|
|
23153
23153
|
}
|
|
23154
|
-
|
|
23155
|
-
if (parameters
|
|
23156
|
-
|
|
23157
|
-
var params = Object.keys(parameters).sort();
|
|
23158
|
-
for (var i = 0;i < params.length; i++) {
|
|
23159
|
-
param = params[i];
|
|
23154
|
+
let result = type;
|
|
23155
|
+
if (parameters) {
|
|
23156
|
+
for (const param of Object.keys(parameters)) {
|
|
23160
23157
|
if (!TOKEN_REGEXP.test(param)) {
|
|
23161
|
-
throw new TypeError(
|
|
23158
|
+
throw new TypeError(`Invalid parameter name: ${param}`);
|
|
23162
23159
|
}
|
|
23163
|
-
|
|
23160
|
+
result += `; ${param}=${qstring(parameters[param])}`;
|
|
23164
23161
|
}
|
|
23165
23162
|
}
|
|
23166
|
-
return
|
|
23163
|
+
return result;
|
|
23167
23164
|
}
|
|
23168
|
-
function parse5(
|
|
23169
|
-
|
|
23170
|
-
|
|
23171
|
-
|
|
23172
|
-
|
|
23173
|
-
|
|
23174
|
-
|
|
23175
|
-
|
|
23176
|
-
|
|
23177
|
-
|
|
23178
|
-
|
|
23179
|
-
|
|
23180
|
-
|
|
23181
|
-
|
|
23182
|
-
|
|
23183
|
-
|
|
23184
|
-
|
|
23185
|
-
|
|
23186
|
-
|
|
23187
|
-
while (
|
|
23188
|
-
|
|
23189
|
-
|
|
23190
|
-
|
|
23191
|
-
|
|
23192
|
-
|
|
23193
|
-
|
|
23194
|
-
|
|
23195
|
-
|
|
23196
|
-
|
|
23197
|
-
|
|
23165
|
+
function parse5(header, options) {
|
|
23166
|
+
const len = header.length;
|
|
23167
|
+
let index = skipOWS(header, 0, len);
|
|
23168
|
+
const valueStart = index;
|
|
23169
|
+
index = skipValue(header, index, len);
|
|
23170
|
+
const valueEnd = trailingOWS(header, valueStart, index);
|
|
23171
|
+
const type = header.slice(valueStart, valueEnd).toLowerCase();
|
|
23172
|
+
const parameters = options?.parameters === false ? new NullObject : parseParameters(header, index, len);
|
|
23173
|
+
return { type, parameters };
|
|
23174
|
+
}
|
|
23175
|
+
var SP = 32;
|
|
23176
|
+
var HTAB = 9;
|
|
23177
|
+
var SEMI = 59;
|
|
23178
|
+
var EQ = 61;
|
|
23179
|
+
var DQUOTE = 34;
|
|
23180
|
+
var BSLASH = 92;
|
|
23181
|
+
function parseParameters(header, index, len) {
|
|
23182
|
+
const parameters = new NullObject;
|
|
23183
|
+
parameter:
|
|
23184
|
+
while (index < len) {
|
|
23185
|
+
index = skipOWS(header, index + 1, len);
|
|
23186
|
+
const keyStart = index;
|
|
23187
|
+
while (index < len) {
|
|
23188
|
+
const code = header.charCodeAt(index);
|
|
23189
|
+
if (code === SEMI)
|
|
23190
|
+
continue parameter;
|
|
23191
|
+
if (code === EQ) {
|
|
23192
|
+
const keyEnd = trailingOWS(header, keyStart, index);
|
|
23193
|
+
const key = header.slice(keyStart, keyEnd).toLowerCase();
|
|
23194
|
+
index = skipOWS(header, index + 1, len);
|
|
23195
|
+
if (index < len && header.charCodeAt(index) === DQUOTE) {
|
|
23196
|
+
index++;
|
|
23197
|
+
let value = "";
|
|
23198
|
+
while (index < len) {
|
|
23199
|
+
const code2 = header.charCodeAt(index++);
|
|
23200
|
+
if (code2 === DQUOTE) {
|
|
23201
|
+
index = skipValue(header, index, len);
|
|
23202
|
+
if (parameters[key] === undefined)
|
|
23203
|
+
parameters[key] = value;
|
|
23204
|
+
break;
|
|
23205
|
+
}
|
|
23206
|
+
if (code2 === BSLASH && index < len) {
|
|
23207
|
+
value += header[index++];
|
|
23208
|
+
continue;
|
|
23209
|
+
}
|
|
23210
|
+
value += String.fromCharCode(code2);
|
|
23211
|
+
}
|
|
23212
|
+
continue parameter;
|
|
23213
|
+
}
|
|
23214
|
+
const valueStart = index;
|
|
23215
|
+
index = skipValue(header, index, len);
|
|
23216
|
+
if (parameters[key] === undefined) {
|
|
23217
|
+
const valueEnd = trailingOWS(header, valueStart, index);
|
|
23218
|
+
parameters[key] = header.slice(valueStart, valueEnd);
|
|
23219
|
+
}
|
|
23220
|
+
continue parameter;
|
|
23198
23221
|
}
|
|
23222
|
+
index++;
|
|
23199
23223
|
}
|
|
23200
|
-
obj.parameters[key] = value;
|
|
23201
23224
|
}
|
|
23202
|
-
|
|
23203
|
-
throw new TypeError("invalid parameter format");
|
|
23204
|
-
}
|
|
23205
|
-
}
|
|
23206
|
-
return obj;
|
|
23225
|
+
return parameters;
|
|
23207
23226
|
}
|
|
23208
|
-
function
|
|
23209
|
-
|
|
23210
|
-
|
|
23211
|
-
|
|
23212
|
-
|
|
23213
|
-
|
|
23214
|
-
}
|
|
23215
|
-
if (typeof header !== "string") {
|
|
23216
|
-
throw new TypeError("content-type header is missing from object");
|
|
23227
|
+
function skipValue(str, index, len) {
|
|
23228
|
+
while (index < len) {
|
|
23229
|
+
const char = str.charCodeAt(index);
|
|
23230
|
+
if (char === SEMI)
|
|
23231
|
+
break;
|
|
23232
|
+
index++;
|
|
23217
23233
|
}
|
|
23218
|
-
return
|
|
23234
|
+
return index;
|
|
23219
23235
|
}
|
|
23220
|
-
function
|
|
23221
|
-
|
|
23222
|
-
|
|
23223
|
-
|
|
23236
|
+
function skipOWS(header, index, len) {
|
|
23237
|
+
while (index < len) {
|
|
23238
|
+
const char = header.charCodeAt(index);
|
|
23239
|
+
if (char !== SP && char !== HTAB)
|
|
23240
|
+
break;
|
|
23241
|
+
index++;
|
|
23224
23242
|
}
|
|
23225
|
-
|
|
23226
|
-
|
|
23243
|
+
return index;
|
|
23244
|
+
}
|
|
23245
|
+
function trailingOWS(header, start, end) {
|
|
23246
|
+
while (end > start) {
|
|
23247
|
+
const char = header.charCodeAt(end - 1);
|
|
23248
|
+
if (char !== SP && char !== HTAB)
|
|
23249
|
+
break;
|
|
23250
|
+
end--;
|
|
23227
23251
|
}
|
|
23228
|
-
return
|
|
23252
|
+
return end;
|
|
23229
23253
|
}
|
|
23230
|
-
function
|
|
23231
|
-
|
|
23232
|
-
|
|
23254
|
+
function qstring(str) {
|
|
23255
|
+
if (TOKEN_REGEXP.test(str))
|
|
23256
|
+
return str;
|
|
23257
|
+
if (TEXT_REGEXP.test(str))
|
|
23258
|
+
return `"${str.replace(QUOTE_REGEXP, "\\$&")}"`;
|
|
23259
|
+
throw new TypeError(`Invalid parameter value: ${str}`);
|
|
23233
23260
|
}
|
|
23234
23261
|
});
|
|
23235
23262
|
|
|
23236
23263
|
// node_modules/body-parser/lib/utils.js
|
|
23237
23264
|
var require_utils = __commonJS((exports, module) => {
|
|
23238
23265
|
var bytes = require_bytes();
|
|
23239
|
-
var contentType =
|
|
23266
|
+
var contentType = require_dist2();
|
|
23240
23267
|
var typeis = require_type_is();
|
|
23241
23268
|
module.exports = {
|
|
23242
23269
|
getCharset,
|
|
@@ -23244,11 +23271,10 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
23244
23271
|
passthrough
|
|
23245
23272
|
};
|
|
23246
23273
|
function getCharset(req) {
|
|
23247
|
-
|
|
23248
|
-
|
|
23249
|
-
} catch {
|
|
23274
|
+
const header = req.headers["content-type"];
|
|
23275
|
+
if (!header)
|
|
23250
23276
|
return;
|
|
23251
|
-
|
|
23277
|
+
return contentType.parse(header).parameters.charset?.toLowerCase();
|
|
23252
23278
|
}
|
|
23253
23279
|
function typeChecker(type) {
|
|
23254
23280
|
return function checkType(req) {
|
|
@@ -23259,15 +23285,18 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
23259
23285
|
if (!defaultType) {
|
|
23260
23286
|
throw new TypeError("defaultType must be provided");
|
|
23261
23287
|
}
|
|
23262
|
-
|
|
23263
|
-
|
|
23264
|
-
|
|
23265
|
-
|
|
23266
|
-
|
|
23288
|
+
const inflate = options?.inflate !== false;
|
|
23289
|
+
const limit = typeof options?.limit === "undefined" || options?.limit === null ? 102400 : bytes.parse(options.limit);
|
|
23290
|
+
const type = options?.type || defaultType;
|
|
23291
|
+
const verify = options?.verify || false;
|
|
23292
|
+
const defaultCharset = options?.defaultCharset || "utf-8";
|
|
23293
|
+
if (limit === null) {
|
|
23294
|
+
throw new TypeError(`option limit "${String(options.limit)}" is invalid`);
|
|
23295
|
+
}
|
|
23267
23296
|
if (verify !== false && typeof verify !== "function") {
|
|
23268
23297
|
throw new TypeError("option verify must be function");
|
|
23269
23298
|
}
|
|
23270
|
-
|
|
23299
|
+
const shouldParse = typeof type !== "function" ? typeChecker(type) : type;
|
|
23271
23300
|
return {
|
|
23272
23301
|
inflate,
|
|
23273
23302
|
limit,
|
|
@@ -23316,7 +23345,7 @@ var require_read = __commonJS((exports, module) => {
|
|
|
23316
23345
|
next();
|
|
23317
23346
|
return;
|
|
23318
23347
|
}
|
|
23319
|
-
|
|
23348
|
+
let encoding = null;
|
|
23320
23349
|
if (options?.skipCharset !== true) {
|
|
23321
23350
|
encoding = getCharset(req) || options.defaultCharset;
|
|
23322
23351
|
if (!!options?.isValidCharset && !options.isValidCharset(encoding)) {
|
|
@@ -23328,10 +23357,10 @@ var require_read = __commonJS((exports, module) => {
|
|
|
23328
23357
|
return;
|
|
23329
23358
|
}
|
|
23330
23359
|
}
|
|
23331
|
-
|
|
23332
|
-
|
|
23333
|
-
|
|
23334
|
-
|
|
23360
|
+
let length;
|
|
23361
|
+
const opts = options;
|
|
23362
|
+
let stream;
|
|
23363
|
+
const verify = opts.verify;
|
|
23335
23364
|
try {
|
|
23336
23365
|
stream = contentstream(req, debug, opts.inflate);
|
|
23337
23366
|
length = stream.length;
|
|
@@ -23350,7 +23379,7 @@ var require_read = __commonJS((exports, module) => {
|
|
|
23350
23379
|
debug("read body");
|
|
23351
23380
|
getBody(stream, opts, function(error2, body) {
|
|
23352
23381
|
if (error2) {
|
|
23353
|
-
|
|
23382
|
+
let _error;
|
|
23354
23383
|
if (error2.type === "encoding.unsupported") {
|
|
23355
23384
|
_error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
|
|
23356
23385
|
charset: encoding.toLowerCase(),
|
|
@@ -23380,7 +23409,7 @@ var require_read = __commonJS((exports, module) => {
|
|
|
23380
23409
|
return;
|
|
23381
23410
|
}
|
|
23382
23411
|
}
|
|
23383
|
-
|
|
23412
|
+
let str = body;
|
|
23384
23413
|
try {
|
|
23385
23414
|
debug("parse body");
|
|
23386
23415
|
str = typeof body !== "string" && encoding !== null ? iconv.decode(body, encoding) : body;
|
|
@@ -23396,8 +23425,8 @@ var require_read = __commonJS((exports, module) => {
|
|
|
23396
23425
|
});
|
|
23397
23426
|
}
|
|
23398
23427
|
function contentstream(req, debug, inflate) {
|
|
23399
|
-
|
|
23400
|
-
|
|
23428
|
+
const encoding = (req.headers["content-encoding"] || "identity").toLowerCase();
|
|
23429
|
+
const length = req.headers["content-length"];
|
|
23401
23430
|
debug('content-encoding "%s"', encoding);
|
|
23402
23431
|
if (inflate === false && encoding !== "identity") {
|
|
23403
23432
|
throw createError(415, "content encoding unsupported", {
|
|
@@ -23409,7 +23438,7 @@ var require_read = __commonJS((exports, module) => {
|
|
|
23409
23438
|
req.length = length;
|
|
23410
23439
|
return req;
|
|
23411
23440
|
}
|
|
23412
|
-
|
|
23441
|
+
const stream = createDecompressionStream(encoding, debug);
|
|
23413
23442
|
req.pipe(stream);
|
|
23414
23443
|
return stream;
|
|
23415
23444
|
}
|
|
@@ -23458,18 +23487,42 @@ var require_json = __commonJS((exports, module) => {
|
|
|
23458
23487
|
var JSON_SYNTAX_REGEXP = /#+/g;
|
|
23459
23488
|
function json(options) {
|
|
23460
23489
|
const normalizedOptions = normalizeOptions(options, "application/json");
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
|
|
23464
|
-
|
|
23465
|
-
|
|
23466
|
-
|
|
23467
|
-
|
|
23468
|
-
|
|
23490
|
+
const parse5 = createJsonParser(options);
|
|
23491
|
+
const readOptions = {
|
|
23492
|
+
...normalizedOptions,
|
|
23493
|
+
isValidCharset: (charset) => charset.slice(0, 4) === "utf-"
|
|
23494
|
+
};
|
|
23495
|
+
return function jsonParser(req, res, next) {
|
|
23496
|
+
read(req, res, next, parse5, debug, readOptions);
|
|
23497
|
+
};
|
|
23498
|
+
}
|
|
23499
|
+
function createJsonParser(options) {
|
|
23500
|
+
const reviver = options?.reviver;
|
|
23501
|
+
const strict = options?.strict !== false;
|
|
23502
|
+
if (strict) {
|
|
23503
|
+
return function parse5(body) {
|
|
23504
|
+
if (body.length === 0) {
|
|
23505
|
+
return {};
|
|
23506
|
+
}
|
|
23507
|
+
const first = firstchar(body);
|
|
23469
23508
|
if (first !== "{" && first !== "[") {
|
|
23470
23509
|
debug("strict violation");
|
|
23471
23510
|
throw createStrictSyntaxError(body, first);
|
|
23472
23511
|
}
|
|
23512
|
+
try {
|
|
23513
|
+
debug("parse json");
|
|
23514
|
+
return JSON.parse(body, reviver);
|
|
23515
|
+
} catch (e) {
|
|
23516
|
+
throw normalizeJsonSyntaxError(e, {
|
|
23517
|
+
message: e.message,
|
|
23518
|
+
stack: e.stack
|
|
23519
|
+
});
|
|
23520
|
+
}
|
|
23521
|
+
};
|
|
23522
|
+
}
|
|
23523
|
+
return function parse5(body) {
|
|
23524
|
+
if (body.length === 0) {
|
|
23525
|
+
return {};
|
|
23473
23526
|
}
|
|
23474
23527
|
try {
|
|
23475
23528
|
debug("parse json");
|
|
@@ -23480,18 +23533,11 @@ var require_json = __commonJS((exports, module) => {
|
|
|
23480
23533
|
stack: e.stack
|
|
23481
23534
|
});
|
|
23482
23535
|
}
|
|
23483
|
-
}
|
|
23484
|
-
const readOptions = {
|
|
23485
|
-
...normalizedOptions,
|
|
23486
|
-
isValidCharset: (charset) => charset.slice(0, 4) === "utf-"
|
|
23487
|
-
};
|
|
23488
|
-
return function jsonParser(req, res, next) {
|
|
23489
|
-
read(req, res, next, parse5, debug, readOptions);
|
|
23490
23536
|
};
|
|
23491
23537
|
}
|
|
23492
23538
|
function createStrictSyntaxError(str, char) {
|
|
23493
|
-
|
|
23494
|
-
|
|
23539
|
+
const index = str.indexOf(char);
|
|
23540
|
+
let partial2 = "";
|
|
23495
23541
|
if (index !== -1) {
|
|
23496
23542
|
partial2 = str.substring(0, index) + JSON_SYNTAX_CHAR.repeat(str.length - index);
|
|
23497
23543
|
}
|
|
@@ -23508,13 +23554,13 @@ var require_json = __commonJS((exports, module) => {
|
|
|
23508
23554
|
}
|
|
23509
23555
|
}
|
|
23510
23556
|
function firstchar(str) {
|
|
23511
|
-
|
|
23557
|
+
const match = FIRST_CHAR_REGEXP.exec(str);
|
|
23512
23558
|
return match ? match[1] : undefined;
|
|
23513
23559
|
}
|
|
23514
23560
|
function normalizeJsonSyntaxError(error2, obj) {
|
|
23515
|
-
|
|
23516
|
-
for (
|
|
23517
|
-
|
|
23561
|
+
const keys = Object.getOwnPropertyNames(error2);
|
|
23562
|
+
for (let i = 0;i < keys.length; i++) {
|
|
23563
|
+
const key = keys[i];
|
|
23518
23564
|
if (key !== "stack" && key !== "message") {
|
|
23519
23565
|
delete error2[key];
|
|
23520
23566
|
}
|
|
@@ -25006,7 +25052,8 @@ var require_side_channel = __commonJS((exports, module) => {
|
|
|
25006
25052
|
var channel = {
|
|
25007
25053
|
assert: function(key) {
|
|
25008
25054
|
if (!channel.has(key)) {
|
|
25009
|
-
|
|
25055
|
+
var keyDesc = key && Object(key) === key ? "the given object key" : inspect(key);
|
|
25056
|
+
throw new $TypeError("Side channel does not contain " + keyDesc);
|
|
25010
25057
|
}
|
|
25011
25058
|
},
|
|
25012
25059
|
delete: function(key) {
|
|
@@ -25884,10 +25931,7 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
25884
25931
|
if (normalizedOptions.defaultCharset !== "utf-8" && normalizedOptions.defaultCharset !== "iso-8859-1") {
|
|
25885
25932
|
throw new TypeError("option defaultCharset must be either utf-8 or iso-8859-1");
|
|
25886
25933
|
}
|
|
25887
|
-
|
|
25888
|
-
function parse5(body, encoding) {
|
|
25889
|
-
return body.length ? queryparse(body, encoding) : {};
|
|
25890
|
-
}
|
|
25934
|
+
const parse5 = createQueryParser(options);
|
|
25891
25935
|
const readOptions = {
|
|
25892
25936
|
...normalizedOptions,
|
|
25893
25937
|
isValidCharset: (charset) => charset === "utf-8" || charset === "iso-8859-1"
|
|
@@ -25897,11 +25941,11 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
25897
25941
|
};
|
|
25898
25942
|
}
|
|
25899
25943
|
function createQueryParser(options) {
|
|
25900
|
-
|
|
25901
|
-
|
|
25902
|
-
|
|
25903
|
-
|
|
25904
|
-
|
|
25944
|
+
const extended = Boolean(options?.extended);
|
|
25945
|
+
let parameterLimit = options?.parameterLimit !== undefined ? options?.parameterLimit : 1000;
|
|
25946
|
+
const charsetSentinel = options?.charsetSentinel;
|
|
25947
|
+
const interpretNumericEntities = options?.interpretNumericEntities;
|
|
25948
|
+
const depth = extended ? options?.depth !== undefined ? options?.depth : 32 : 0;
|
|
25905
25949
|
if (isNaN(parameterLimit) || parameterLimit < 1) {
|
|
25906
25950
|
throw new TypeError("option parameterLimit must be a positive number");
|
|
25907
25951
|
}
|
|
@@ -25911,15 +25955,17 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
25911
25955
|
if (isFinite(parameterLimit)) {
|
|
25912
25956
|
parameterLimit = parameterLimit | 0;
|
|
25913
25957
|
}
|
|
25914
|
-
return function
|
|
25915
|
-
|
|
25958
|
+
return function parse5(body, encoding) {
|
|
25959
|
+
if (!body.length)
|
|
25960
|
+
return {};
|
|
25961
|
+
const paramCount = parameterCount(body, parameterLimit);
|
|
25916
25962
|
if (paramCount === undefined) {
|
|
25917
25963
|
debug("too many parameters");
|
|
25918
25964
|
throw createError(413, "too many parameters", {
|
|
25919
25965
|
type: "parameters.too.many"
|
|
25920
25966
|
});
|
|
25921
25967
|
}
|
|
25922
|
-
|
|
25968
|
+
const arrayLimit = extended ? Math.max(100, paramCount) : paramCount;
|
|
25923
25969
|
debug("parse " + (extended ? "extended " : "") + "urlencoding");
|
|
25924
25970
|
try {
|
|
25925
25971
|
return qs.parse(body, {
|
|
@@ -25964,26 +26010,10 @@ var require_body_parser = __commonJS((exports, module) => {
|
|
|
25964
26010
|
* MIT Licensed
|
|
25965
26011
|
*/
|
|
25966
26012
|
exports = module.exports = bodyParser;
|
|
25967
|
-
|
|
25968
|
-
|
|
25969
|
-
|
|
25970
|
-
|
|
25971
|
-
});
|
|
25972
|
-
Object.defineProperty(exports, "raw", {
|
|
25973
|
-
configurable: true,
|
|
25974
|
-
enumerable: true,
|
|
25975
|
-
get: () => require_raw()
|
|
25976
|
-
});
|
|
25977
|
-
Object.defineProperty(exports, "text", {
|
|
25978
|
-
configurable: true,
|
|
25979
|
-
enumerable: true,
|
|
25980
|
-
get: () => require_text()
|
|
25981
|
-
});
|
|
25982
|
-
Object.defineProperty(exports, "urlencoded", {
|
|
25983
|
-
configurable: true,
|
|
25984
|
-
enumerable: true,
|
|
25985
|
-
get: () => require_urlencoded()
|
|
25986
|
-
});
|
|
26013
|
+
exports.json = require_json();
|
|
26014
|
+
exports.raw = require_raw();
|
|
26015
|
+
exports.text = require_text();
|
|
26016
|
+
exports.urlencoded = require_urlencoded();
|
|
25987
26017
|
function bodyParser() {
|
|
25988
26018
|
throw new Error("The bodyParser() generic has been split into individual middleware to use instead.");
|
|
25989
26019
|
}
|
|
@@ -26396,6 +26426,112 @@ var require_view = __commonJS((exports, module) => {
|
|
|
26396
26426
|
}
|
|
26397
26427
|
});
|
|
26398
26428
|
|
|
26429
|
+
// node_modules/content-type/index.js
|
|
26430
|
+
var require_content_type = __commonJS((exports) => {
|
|
26431
|
+
/*!
|
|
26432
|
+
* content-type
|
|
26433
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
26434
|
+
* MIT Licensed
|
|
26435
|
+
*/
|
|
26436
|
+
var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
|
|
26437
|
+
var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
|
|
26438
|
+
var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
26439
|
+
var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
|
|
26440
|
+
var QUOTE_REGEXP = /([\\"])/g;
|
|
26441
|
+
var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
26442
|
+
exports.format = format;
|
|
26443
|
+
exports.parse = parse5;
|
|
26444
|
+
function format(obj) {
|
|
26445
|
+
if (!obj || typeof obj !== "object") {
|
|
26446
|
+
throw new TypeError("argument obj is required");
|
|
26447
|
+
}
|
|
26448
|
+
var parameters = obj.parameters;
|
|
26449
|
+
var type = obj.type;
|
|
26450
|
+
if (!type || !TYPE_REGEXP.test(type)) {
|
|
26451
|
+
throw new TypeError("invalid type");
|
|
26452
|
+
}
|
|
26453
|
+
var string4 = type;
|
|
26454
|
+
if (parameters && typeof parameters === "object") {
|
|
26455
|
+
var param;
|
|
26456
|
+
var params = Object.keys(parameters).sort();
|
|
26457
|
+
for (var i = 0;i < params.length; i++) {
|
|
26458
|
+
param = params[i];
|
|
26459
|
+
if (!TOKEN_REGEXP.test(param)) {
|
|
26460
|
+
throw new TypeError("invalid parameter name");
|
|
26461
|
+
}
|
|
26462
|
+
string4 += "; " + param + "=" + qstring(parameters[param]);
|
|
26463
|
+
}
|
|
26464
|
+
}
|
|
26465
|
+
return string4;
|
|
26466
|
+
}
|
|
26467
|
+
function parse5(string4) {
|
|
26468
|
+
if (!string4) {
|
|
26469
|
+
throw new TypeError("argument string is required");
|
|
26470
|
+
}
|
|
26471
|
+
var header = typeof string4 === "object" ? getcontenttype(string4) : string4;
|
|
26472
|
+
if (typeof header !== "string") {
|
|
26473
|
+
throw new TypeError("argument string is required to be a string");
|
|
26474
|
+
}
|
|
26475
|
+
var index = header.indexOf(";");
|
|
26476
|
+
var type = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
26477
|
+
if (!TYPE_REGEXP.test(type)) {
|
|
26478
|
+
throw new TypeError("invalid media type");
|
|
26479
|
+
}
|
|
26480
|
+
var obj = new ContentType(type.toLowerCase());
|
|
26481
|
+
if (index !== -1) {
|
|
26482
|
+
var key;
|
|
26483
|
+
var match;
|
|
26484
|
+
var value;
|
|
26485
|
+
PARAM_REGEXP.lastIndex = index;
|
|
26486
|
+
while (match = PARAM_REGEXP.exec(header)) {
|
|
26487
|
+
if (match.index !== index) {
|
|
26488
|
+
throw new TypeError("invalid parameter format");
|
|
26489
|
+
}
|
|
26490
|
+
index += match[0].length;
|
|
26491
|
+
key = match[1].toLowerCase();
|
|
26492
|
+
value = match[2];
|
|
26493
|
+
if (value.charCodeAt(0) === 34) {
|
|
26494
|
+
value = value.slice(1, -1);
|
|
26495
|
+
if (value.indexOf("\\") !== -1) {
|
|
26496
|
+
value = value.replace(QESC_REGEXP, "$1");
|
|
26497
|
+
}
|
|
26498
|
+
}
|
|
26499
|
+
obj.parameters[key] = value;
|
|
26500
|
+
}
|
|
26501
|
+
if (index !== header.length) {
|
|
26502
|
+
throw new TypeError("invalid parameter format");
|
|
26503
|
+
}
|
|
26504
|
+
}
|
|
26505
|
+
return obj;
|
|
26506
|
+
}
|
|
26507
|
+
function getcontenttype(obj) {
|
|
26508
|
+
var header;
|
|
26509
|
+
if (typeof obj.getHeader === "function") {
|
|
26510
|
+
header = obj.getHeader("content-type");
|
|
26511
|
+
} else if (typeof obj.headers === "object") {
|
|
26512
|
+
header = obj.headers && obj.headers["content-type"];
|
|
26513
|
+
}
|
|
26514
|
+
if (typeof header !== "string") {
|
|
26515
|
+
throw new TypeError("content-type header is missing from object");
|
|
26516
|
+
}
|
|
26517
|
+
return header;
|
|
26518
|
+
}
|
|
26519
|
+
function qstring(val) {
|
|
26520
|
+
var str = String(val);
|
|
26521
|
+
if (TOKEN_REGEXP.test(str)) {
|
|
26522
|
+
return str;
|
|
26523
|
+
}
|
|
26524
|
+
if (str.length > 0 && !TEXT_REGEXP.test(str)) {
|
|
26525
|
+
throw new TypeError("invalid parameter value");
|
|
26526
|
+
}
|
|
26527
|
+
return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"';
|
|
26528
|
+
}
|
|
26529
|
+
function ContentType(type) {
|
|
26530
|
+
this.parameters = Object.create(null);
|
|
26531
|
+
this.type = type;
|
|
26532
|
+
}
|
|
26533
|
+
});
|
|
26534
|
+
|
|
26399
26535
|
// node_modules/etag/index.js
|
|
26400
26536
|
var require_etag = __commonJS((exports, module) => {
|
|
26401
26537
|
/*!
|
|
@@ -27487,7 +27623,7 @@ var require_is_promise = __commonJS((exports, module) => {
|
|
|
27487
27623
|
});
|
|
27488
27624
|
|
|
27489
27625
|
// node_modules/path-to-regexp/dist/index.js
|
|
27490
|
-
var
|
|
27626
|
+
var require_dist3 = __commonJS((exports) => {
|
|
27491
27627
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27492
27628
|
exports.PathError = exports.TokenData = undefined;
|
|
27493
27629
|
exports.parse = parse5;
|
|
@@ -27863,7 +27999,7 @@ var require_layer = __commonJS((exports, module) => {
|
|
|
27863
27999
|
* MIT Licensed
|
|
27864
28000
|
*/
|
|
27865
28001
|
var isPromise2 = require_is_promise();
|
|
27866
|
-
var pathRegexp =
|
|
28002
|
+
var pathRegexp = require_dist3();
|
|
27867
28003
|
var debug = require_src()("router:layer");
|
|
27868
28004
|
var deprecate = require_depd()("router");
|
|
27869
28005
|
var TRAILING_SLASH_REGEXP = /\/+$/;
|
|
@@ -49653,7 +49789,7 @@ var require_limit = __commonJS((exports) => {
|
|
|
49653
49789
|
});
|
|
49654
49790
|
|
|
49655
49791
|
// node_modules/ajv-formats/dist/index.js
|
|
49656
|
-
var
|
|
49792
|
+
var require_dist4 = __commonJS((exports, module) => {
|
|
49657
49793
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49658
49794
|
var formats_1 = require_formats2();
|
|
49659
49795
|
var limit_1 = require_limit();
|
|
@@ -49731,7 +49867,7 @@ class AjvJsonSchemaValidator {
|
|
|
49731
49867
|
var import_ajv, import_ajv_formats;
|
|
49732
49868
|
var init_ajv_provider = __esm(() => {
|
|
49733
49869
|
import_ajv = __toESM(require_ajv(), 1);
|
|
49734
|
-
import_ajv_formats = __toESM(
|
|
49870
|
+
import_ajv_formats = __toESM(require_dist4(), 1);
|
|
49735
49871
|
});
|
|
49736
49872
|
|
|
49737
49873
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
@@ -51134,20 +51270,37 @@ var init_config = __esm(() => {
|
|
|
51134
51270
|
SDK_METADATA = {
|
|
51135
51271
|
language: "typescript",
|
|
51136
51272
|
openapiDocVersion: "1.0",
|
|
51137
|
-
sdkVersion: "2.1.
|
|
51138
|
-
genVersion: "2.
|
|
51139
|
-
userAgent: "speakeasy-sdk/mcp-typescript 2.1.
|
|
51273
|
+
sdkVersion: "2.1.18",
|
|
51274
|
+
genVersion: "2.904.2",
|
|
51275
|
+
userAgent: "speakeasy-sdk/mcp-typescript 2.1.18 2.904.2 1.0 @flexprice/mcp-server"
|
|
51140
51276
|
};
|
|
51141
51277
|
});
|
|
51142
51278
|
|
|
51143
|
-
// src/lib/
|
|
51279
|
+
// src/lib/primitives.ts
|
|
51280
|
+
function compactMap(values) {
|
|
51281
|
+
const out = {};
|
|
51282
|
+
for (const [k, v] of Object.entries(values)) {
|
|
51283
|
+
if (typeof v !== "undefined") {
|
|
51284
|
+
out[k] = v;
|
|
51285
|
+
}
|
|
51286
|
+
}
|
|
51287
|
+
return out;
|
|
51288
|
+
}
|
|
51144
51289
|
function isPlainObject3(value) {
|
|
51145
|
-
if (typeof value !== "object"
|
|
51290
|
+
if (value === null || typeof value !== "object")
|
|
51291
|
+
return false;
|
|
51292
|
+
if (Object.prototype.toString.call(value) !== "[object Object]")
|
|
51293
|
+
return false;
|
|
51294
|
+
const proto = Object.getPrototypeOf(value);
|
|
51295
|
+
if (proto === null || proto === Object.prototype)
|
|
51296
|
+
return true;
|
|
51297
|
+
try {
|
|
51298
|
+
return Object.getPrototypeOf(proto) === null;
|
|
51299
|
+
} catch {
|
|
51146
51300
|
return false;
|
|
51147
51301
|
}
|
|
51148
|
-
const prototype = Object.getPrototypeOf(value);
|
|
51149
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
51150
51302
|
}
|
|
51303
|
+
var init_primitives = () => {};
|
|
51151
51304
|
|
|
51152
51305
|
// src/lib/encodings.ts
|
|
51153
51306
|
function formEncoder(sep) {
|
|
@@ -51346,6 +51499,7 @@ var EncodingError, encodeForm, encodeSpaceDelimited, encodePipeDelimited, encode
|
|
|
51346
51499
|
}, encodeJSONQuery, encodeFormQuery, encodeSpaceDelimitedQuery, encodePipeDelimitedQuery, encodeDeepObjectQuery;
|
|
51347
51500
|
var init_encodings = __esm(() => {
|
|
51348
51501
|
init_base64();
|
|
51502
|
+
init_primitives();
|
|
51349
51503
|
EncodingError = class EncodingError extends Error {
|
|
51350
51504
|
constructor(message) {
|
|
51351
51505
|
super(message);
|
|
@@ -52328,18 +52482,6 @@ var init_tools = __esm(() => {
|
|
|
52328
52482
|
};
|
|
52329
52483
|
});
|
|
52330
52484
|
|
|
52331
|
-
// src/lib/primitives.ts
|
|
52332
|
-
function compactMap(values) {
|
|
52333
|
-
const out = {};
|
|
52334
|
-
for (const [k, v] of Object.entries(values)) {
|
|
52335
|
-
if (typeof v !== "undefined") {
|
|
52336
|
-
out[k] = v;
|
|
52337
|
-
}
|
|
52338
|
-
}
|
|
52339
|
-
return out;
|
|
52340
|
-
}
|
|
52341
|
-
var init_primitives = () => {};
|
|
52342
|
-
|
|
52343
52485
|
// src/models/errors/sdkvalidationerror.ts
|
|
52344
52486
|
function formatZodError(err) {
|
|
52345
52487
|
return prettifyError(err);
|
|
@@ -52603,16 +52745,19 @@ var init_async = __esm(() => {
|
|
|
52603
52745
|
[Symbol.toStringTag] = "APIPromise";
|
|
52604
52746
|
constructor(p) {
|
|
52605
52747
|
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
52606
|
-
this.#unwrapped = p instanceof Promise ?
|
|
52748
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
52749
|
+
}
|
|
52750
|
+
#getUnwrapped() {
|
|
52751
|
+
return this.#unwrapped ??= this.#promise.then(([value]) => value);
|
|
52607
52752
|
}
|
|
52608
52753
|
then(onfulfilled, onrejected) {
|
|
52609
52754
|
return this.#promise.then(onfulfilled ? ([value]) => onfulfilled(value) : undefined, onrejected);
|
|
52610
52755
|
}
|
|
52611
52756
|
catch(onrejected) {
|
|
52612
|
-
return this.#
|
|
52757
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
52613
52758
|
}
|
|
52614
52759
|
finally(onfinally) {
|
|
52615
|
-
return this.#
|
|
52760
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
52616
52761
|
}
|
|
52617
52762
|
$inspect() {
|
|
52618
52763
|
return this.#promise;
|
|
@@ -52876,6 +53021,7 @@ var init_entityintegrationmappingresponse = __esm(() => {
|
|
|
52876
53021
|
entity_type: IntegrationEntityType$zodSchema.optional(),
|
|
52877
53022
|
environment_id: string2().optional(),
|
|
52878
53023
|
id: string2().optional(),
|
|
53024
|
+
metadata: record(string2(), any()).optional(),
|
|
52879
53025
|
provider_entity_id: string2().optional(),
|
|
52880
53026
|
provider_type: string2().optional(),
|
|
52881
53027
|
status: Status$zodSchema.optional(),
|
|
@@ -53362,7 +53508,6 @@ var WindowSize$zodSchema;
|
|
|
53362
53508
|
var init_windowsize = __esm(() => {
|
|
53363
53509
|
init_zod();
|
|
53364
53510
|
WindowSize$zodSchema = _enum([
|
|
53365
|
-
"MONTH",
|
|
53366
53511
|
"MINUTE",
|
|
53367
53512
|
"15MIN",
|
|
53368
53513
|
"30MIN",
|
|
@@ -53371,7 +53516,8 @@ var init_windowsize = __esm(() => {
|
|
|
53371
53516
|
"6HOUR",
|
|
53372
53517
|
"12HOUR",
|
|
53373
53518
|
"DAY",
|
|
53374
|
-
"WEEK"
|
|
53519
|
+
"WEEK",
|
|
53520
|
+
"MONTH"
|
|
53375
53521
|
]);
|
|
53376
53522
|
});
|
|
53377
53523
|
|
|
@@ -54415,6 +54561,45 @@ Use when updating customer details (e.g. name, email, or metadata). Identify by
|
|
|
54415
54561
|
};
|
|
54416
54562
|
});
|
|
54417
54563
|
|
|
54564
|
+
// src/models/debugtrackerstatus.ts
|
|
54565
|
+
var DebugTrackerStatus$zodSchema;
|
|
54566
|
+
var init_debugtrackerstatus = __esm(() => {
|
|
54567
|
+
init_zod();
|
|
54568
|
+
DebugTrackerStatus$zodSchema = _enum([
|
|
54569
|
+
"unprocessed",
|
|
54570
|
+
"not_found",
|
|
54571
|
+
"found",
|
|
54572
|
+
"error",
|
|
54573
|
+
"processing",
|
|
54574
|
+
"attributed"
|
|
54575
|
+
]);
|
|
54576
|
+
});
|
|
54577
|
+
|
|
54578
|
+
// src/models/meterusageattribution.ts
|
|
54579
|
+
var MeterUsageAttribution$zodSchema;
|
|
54580
|
+
var init_meterusageattribution = __esm(() => {
|
|
54581
|
+
init_zod();
|
|
54582
|
+
MeterUsageAttribution$zodSchema = object({
|
|
54583
|
+
external_customer_id: string2().optional(),
|
|
54584
|
+
meter_id: string2().optional(),
|
|
54585
|
+
qty_total: string2().optional()
|
|
54586
|
+
});
|
|
54587
|
+
});
|
|
54588
|
+
|
|
54589
|
+
// src/models/attributedtocustomerresult.ts
|
|
54590
|
+
var AttributedToCustomerResult$zodSchema;
|
|
54591
|
+
var init_attributedtocustomerresult = __esm(() => {
|
|
54592
|
+
init_zod();
|
|
54593
|
+
init_debugtrackerstatus();
|
|
54594
|
+
init_errorresponse();
|
|
54595
|
+
init_meterusageattribution();
|
|
54596
|
+
AttributedToCustomerResult$zodSchema = object({
|
|
54597
|
+
error: ErrorResponse$zodSchema.optional(),
|
|
54598
|
+
meter_usage: MeterUsageAttribution$zodSchema.optional(),
|
|
54599
|
+
status: DebugTrackerStatus$zodSchema.optional()
|
|
54600
|
+
});
|
|
54601
|
+
});
|
|
54602
|
+
|
|
54418
54603
|
// src/models/customer.ts
|
|
54419
54604
|
var Customer$zodSchema;
|
|
54420
54605
|
var init_customer = __esm(() => {
|
|
@@ -54442,18 +54627,6 @@ var init_customer = __esm(() => {
|
|
|
54442
54627
|
});
|
|
54443
54628
|
});
|
|
54444
54629
|
|
|
54445
|
-
// src/models/debugtrackerstatus.ts
|
|
54446
|
-
var DebugTrackerStatus$zodSchema;
|
|
54447
|
-
var init_debugtrackerstatus = __esm(() => {
|
|
54448
|
-
init_zod();
|
|
54449
|
-
DebugTrackerStatus$zodSchema = _enum([
|
|
54450
|
-
"unprocessed",
|
|
54451
|
-
"not_found",
|
|
54452
|
-
"found",
|
|
54453
|
-
"error"
|
|
54454
|
-
]);
|
|
54455
|
-
});
|
|
54456
|
-
|
|
54457
54630
|
// src/models/customerlookupresult.ts
|
|
54458
54631
|
var CustomerLookupResult$zodSchema;
|
|
54459
54632
|
var init_customerlookupresult = __esm(() => {
|
|
@@ -54476,7 +54649,8 @@ var init_failurepointtype = __esm(() => {
|
|
|
54476
54649
|
"customer_lookup",
|
|
54477
54650
|
"meter_lookup",
|
|
54478
54651
|
"price_lookup",
|
|
54479
|
-
"subscription_line_item_lookup"
|
|
54652
|
+
"subscription_line_item_lookup",
|
|
54653
|
+
"attributed_to_customer"
|
|
54480
54654
|
]);
|
|
54481
54655
|
});
|
|
54482
54656
|
|
|
@@ -54703,6 +54877,10 @@ For USD: $12.50`),
|
|
|
54703
54877
|
price_unit_id: string2().optional().describe("PriceUnitID is the id of the price unit (for CUSTOM type)"),
|
|
54704
54878
|
price_unit_tiers: array(PricePriceTier$zodSchema).optional().describe("PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED"),
|
|
54705
54879
|
price_unit_type: PriceUnitType$zodSchema.optional(),
|
|
54880
|
+
sequence: int().optional().describe(`Sequence is the monotonic stamp bumped on every state change that
|
|
54881
|
+
subscription line items need to react to. Read by the plan-price sync;
|
|
54882
|
+
set by the database (DEFAULT nextval) on create and by the price
|
|
54883
|
+
repository on termination / compatibility-affecting edits.`),
|
|
54706
54884
|
start_date: exports_iso.datetime({ offset: true }).optional().describe("StartDate is the start date of the price"),
|
|
54707
54885
|
status: Status$zodSchema.optional(),
|
|
54708
54886
|
tenant_id: string2().optional(),
|
|
@@ -54765,6 +54943,36 @@ var init_subscriptionlineitementitytype = __esm(() => {
|
|
|
54765
54943
|
]);
|
|
54766
54944
|
});
|
|
54767
54945
|
|
|
54946
|
+
// src/models/bucket.ts
|
|
54947
|
+
var Bucket$zodSchema;
|
|
54948
|
+
var init_bucket = __esm(() => {
|
|
54949
|
+
init_zod();
|
|
54950
|
+
Bucket$zodSchema = object({
|
|
54951
|
+
hour: int().optional(),
|
|
54952
|
+
minute: int().optional()
|
|
54953
|
+
});
|
|
54954
|
+
});
|
|
54955
|
+
|
|
54956
|
+
// src/models/timeofdaybucket.ts
|
|
54957
|
+
var TimeOfDayBucket$zodSchema;
|
|
54958
|
+
var init_timeofdaybucket = __esm(() => {
|
|
54959
|
+
init_zod();
|
|
54960
|
+
init_bucket();
|
|
54961
|
+
init_commitmenttype();
|
|
54962
|
+
TimeOfDayBucket$zodSchema = object({
|
|
54963
|
+
commitment_type: CommitmentType$zodSchema.optional(),
|
|
54964
|
+
commitment_value: string2().optional(),
|
|
54965
|
+
end: Bucket$zodSchema.optional(),
|
|
54966
|
+
id: string2().optional().describe(`ID is server-assigned. Stable for the lifetime of the line item;
|
|
54967
|
+
invoice breakdown and analytics responses reference this ID.`),
|
|
54968
|
+
overage_factor: number2().optional(),
|
|
54969
|
+
price_id: string2().optional().describe(`PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time.
|
|
54970
|
+
Immutable post-create; changing pricing requires a successor line item.`),
|
|
54971
|
+
start: Bucket$zodSchema.optional(),
|
|
54972
|
+
true_up_enabled: boolean2().optional()
|
|
54973
|
+
});
|
|
54974
|
+
});
|
|
54975
|
+
|
|
54768
54976
|
// src/models/subscriptionsubscriptionlineitem.ts
|
|
54769
54977
|
var SubscriptionSubscriptionLineItem$zodSchema;
|
|
54770
54978
|
var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
@@ -54776,6 +54984,7 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54776
54984
|
init_pricetype();
|
|
54777
54985
|
init_status();
|
|
54778
54986
|
init_subscriptionlineitementitytype();
|
|
54987
|
+
init_timeofdaybucket();
|
|
54779
54988
|
SubscriptionSubscriptionLineItem$zodSchema = object({
|
|
54780
54989
|
addon_association_id: string2().optional(),
|
|
54781
54990
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
@@ -54784,6 +54993,7 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54784
54993
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
54785
54994
|
commitment_overage_factor: string2().optional(),
|
|
54786
54995
|
commitment_quantity: string2().optional(),
|
|
54996
|
+
commitment_time_buckets: array(TimeOfDayBucket$zodSchema).optional(),
|
|
54787
54997
|
commitment_true_up_enabled: boolean2().optional(),
|
|
54788
54998
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
54789
54999
|
commitment_windowed: boolean2().optional(),
|
|
@@ -54853,12 +55063,14 @@ var init_subscriptionlineitemlookupresult = __esm(() => {
|
|
|
54853
55063
|
var DebugTracker$zodSchema;
|
|
54854
55064
|
var init_debugtracker = __esm(() => {
|
|
54855
55065
|
init_zod();
|
|
55066
|
+
init_attributedtocustomerresult();
|
|
54856
55067
|
init_customerlookupresult();
|
|
54857
55068
|
init_failurepoint();
|
|
54858
55069
|
init_metermatchingresult();
|
|
54859
55070
|
init_pricelookupresult();
|
|
54860
55071
|
init_subscriptionlineitemlookupresult();
|
|
54861
55072
|
DebugTracker$zodSchema = object({
|
|
55073
|
+
attributed_to_customer: AttributedToCustomerResult$zodSchema.optional(),
|
|
54862
55074
|
customer_lookup: CustomerLookupResult$zodSchema.optional(),
|
|
54863
55075
|
failure_point: FailurePoint$zodSchema.optional(),
|
|
54864
55076
|
meter_matching: MeterMatchingResult$zodSchema.optional(),
|
|
@@ -55154,6 +55366,10 @@ var init_getusageanalyticsrequest = __esm(() => {
|
|
|
55154
55366
|
init_zod();
|
|
55155
55367
|
init_windowsize();
|
|
55156
55368
|
GetUsageAnalyticsRequest$zodSchema = object({
|
|
55369
|
+
breakdown_bucket: boolean2().optional().describe(`BreakdownBucket when true augments each time-series point with BucketID/PriceID
|
|
55370
|
+
and appends a BucketSummaries rollup to each item. Requires WindowSize to be set
|
|
55371
|
+
and the item to be linked to a subscription line item that has CommitmentTimeBuckets.
|
|
55372
|
+
Default: false (opt-in, backward compatible).`),
|
|
55157
55373
|
end_time: exports_iso.datetime({ offset: true }).optional(),
|
|
55158
55374
|
expand: array(string2()).optional().describe('allowed values: "price", "meter", "feature", "subscription_line_item","plan","addon"'),
|
|
55159
55375
|
external_customer_id: string2().optional().describe(`ExternalCustomerID is the single external customer ID.
|
|
@@ -56107,6 +56323,7 @@ var init_createinvoicelineitemrequest = __esm(() => {
|
|
|
56107
56323
|
init_zod();
|
|
56108
56324
|
init_commitmentinfo();
|
|
56109
56325
|
CreateInvoiceLineItemRequest$zodSchema = object({
|
|
56326
|
+
adjusted_entitlement_quantity: string2().optional().describe("adjusted_entitlement_quantity is the entitlement-covered units deducted from raw usage."),
|
|
56110
56327
|
amount: string2().describe("amount is the monetary amount for this line item"),
|
|
56111
56328
|
commitment_info: CommitmentInfo$zodSchema.optional(),
|
|
56112
56329
|
display_name: string2().optional().describe("display_name is the optional human-readable name for this line item"),
|
|
@@ -56127,7 +56344,10 @@ plan_id is the optional unique identifier of the plan associated with this line
|
|
|
56127
56344
|
price_type: string2().optional().describe("price_type indicates the type of pricing (fixed, usage, tiered, etc.)"),
|
|
56128
56345
|
price_unit: string2().optional().describe("price_unit is the optional 3-digit ISO code of the price unit associated with this line item"),
|
|
56129
56346
|
price_unit_amount: string2().optional().describe("price_unit_amount is the optional amount converted to the price unit currency"),
|
|
56130
|
-
quantity: string2().describe("quantity is the quantity of units for this line item")
|
|
56347
|
+
quantity: string2().describe("quantity is the quantity of units for this line item"),
|
|
56348
|
+
subscription_id: string2().optional().describe(`subscription_id overrides the invoice's subscription_id for this specific line item.
|
|
56349
|
+
Used for grouped invoicing where child line items belong to child subscriptions.`),
|
|
56350
|
+
subscription_line_item_id: string2().optional().describe("sub_line_item_id links this line item to the subscription_line_item that generated it.")
|
|
56131
56351
|
});
|
|
56132
56352
|
});
|
|
56133
56353
|
|
|
@@ -56143,7 +56363,8 @@ var init_invoicebillingreason = __esm(() => {
|
|
|
56143
56363
|
"SUBSCRIPTION_TRIAL_START",
|
|
56144
56364
|
"PRORATION",
|
|
56145
56365
|
"MANUAL",
|
|
56146
|
-
"AUTO_INVOICE_THRESHOLD"
|
|
56366
|
+
"AUTO_INVOICE_THRESHOLD",
|
|
56367
|
+
"WALLET_AUTO_TOPUP"
|
|
56147
56368
|
]);
|
|
56148
56369
|
});
|
|
56149
56370
|
|
|
@@ -56788,6 +57009,8 @@ var init_invoicelineitemresponse = __esm(() => {
|
|
|
56788
57009
|
init_status();
|
|
56789
57010
|
init_usagebreakdownitem();
|
|
56790
57011
|
InvoiceLineItemResponse$zodSchema = object({
|
|
57012
|
+
adjusted_entitlement_quantity: string2().optional().describe(`adjusted_entitlement_quantity is the entitlement-covered portion deducted from raw usage.
|
|
57013
|
+
Nil when no entitlement was applied. Raw usage = Quantity + AdjustedEntitlementQuantity.`),
|
|
56791
57014
|
amount: string2().optional(),
|
|
56792
57015
|
commitment_info: CommitmentInfo$zodSchema.optional(),
|
|
56793
57016
|
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
@@ -56817,6 +57040,7 @@ var init_invoicelineitemresponse = __esm(() => {
|
|
|
56817
57040
|
quantity: string2().optional(),
|
|
56818
57041
|
status: Status$zodSchema.optional(),
|
|
56819
57042
|
subscription_id: string2().optional(),
|
|
57043
|
+
subscription_line_item_id: string2().optional().describe("sub_line_item_id links this invoice line item to the subscription_line_item that generated it."),
|
|
56820
57044
|
tenant_id: string2().optional(),
|
|
56821
57045
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
56822
57046
|
updated_by: string2().optional(),
|
|
@@ -56856,6 +57080,7 @@ var init_coupon = __esm(() => {
|
|
|
56856
57080
|
Coupon$zodSchema = object({
|
|
56857
57081
|
amount_off: string2().optional(),
|
|
56858
57082
|
cadence: CouponCadence$zodSchema.optional(),
|
|
57083
|
+
coupon_code: string2().optional(),
|
|
56859
57084
|
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
56860
57085
|
created_by: string2().optional(),
|
|
56861
57086
|
currency: string2().optional(),
|
|
@@ -57115,6 +57340,10 @@ For USD: $12.50`),
|
|
|
57115
57340
|
price_unit_tiers: array(PricePriceTier$zodSchema).optional().describe("PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED"),
|
|
57116
57341
|
price_unit_type: PriceUnitType$zodSchema.optional(),
|
|
57117
57342
|
pricing_unit: PriceUnitResponse$zodSchema.optional(),
|
|
57343
|
+
sequence: int().optional().describe(`Sequence is the monotonic stamp bumped on every state change that
|
|
57344
|
+
subscription line items need to react to. Read by the plan-price sync;
|
|
57345
|
+
set by the database (DEFAULT nextval) on create and by the price
|
|
57346
|
+
repository on termination / compatibility-affecting edits.`),
|
|
57118
57347
|
start_date: exports_iso.datetime({ offset: true }).optional().describe("StartDate is the start date of the price"),
|
|
57119
57348
|
status: Status$zodSchema.optional(),
|
|
57120
57349
|
tenant_id: string2().optional(),
|
|
@@ -57407,6 +57636,9 @@ This can differ from the subscription customer (e.g., parent company invoicing f
|
|
|
57407
57636
|
status: Status$zodSchema.optional(),
|
|
57408
57637
|
subscription_status: SubscriptionStatus$zodSchema.optional(),
|
|
57409
57638
|
subscription_type: SubscriptionType$zodSchema.optional(),
|
|
57639
|
+
synced_price_sequence: int().optional().describe(`SyncedPriceSequence is the plan-price sequence up to which this
|
|
57640
|
+
subscription's line items have been reconciled. Bumped by the
|
|
57641
|
+
plan-price sync after a successful pass.`),
|
|
57410
57642
|
tenant_id: string2().optional(),
|
|
57411
57643
|
trial_end: exports_iso.datetime({ offset: true }).optional().describe("TrialEnd is the end date of the trial period"),
|
|
57412
57644
|
trial_start: exports_iso.datetime({ offset: true }).optional().describe("TrialStart is the start date of the trial period"),
|
|
@@ -57926,6 +58158,7 @@ var InvoiceFilterOrder$zodSchema, InvoiceFilter$zodSchema;
|
|
|
57926
58158
|
var init_invoicefilter = __esm(() => {
|
|
57927
58159
|
init_zod();
|
|
57928
58160
|
init_filtercondition();
|
|
58161
|
+
init_invoicebillingreason();
|
|
57929
58162
|
init_invoicestatus();
|
|
57930
58163
|
init_invoicetype();
|
|
57931
58164
|
init_paymentstatus();
|
|
@@ -57940,6 +58173,9 @@ var init_invoicefilter = __esm(() => {
|
|
|
57940
58173
|
Useful for finding invoices above a certain threshold or identifying high-value invoices`),
|
|
57941
58174
|
amount_remaining_gt: number2().optional().describe(`amount_remaining_gt filters invoices with an outstanding balance greater than the specified value
|
|
57942
58175
|
Useful for finding invoices that still have significant unpaid amounts`),
|
|
58176
|
+
billing_reason: InvoiceBillingReason$zodSchema.optional(),
|
|
58177
|
+
currency: string2().optional().describe(`currency filters invoices by their currency (ISO 4217 code, e.g. "usd", "eur").
|
|
58178
|
+
Matches on the invoices.currency column exactly.`),
|
|
57943
58179
|
customer_id: string2().optional().describe(`customer_id filters invoices for a specific customer using FlexPrice's internal customer ID
|
|
57944
58180
|
This is the ID returned by FlexPrice when creating or retrieving customers`),
|
|
57945
58181
|
end_time: exports_iso.datetime({ offset: true }).optional(),
|
|
@@ -60545,6 +60781,7 @@ Use when resolving a price by external id (e.g. from your catalog or CMS). Ideal
|
|
|
60545
60781
|
var PriceFilterOrder$zodSchema, PriceFilter$zodSchema;
|
|
60546
60782
|
var init_pricefilter = __esm(() => {
|
|
60547
60783
|
init_zod();
|
|
60784
|
+
init_billingperiod();
|
|
60548
60785
|
init_filtercondition();
|
|
60549
60786
|
init_priceentitytype();
|
|
60550
60787
|
init_status();
|
|
@@ -60554,6 +60791,7 @@ var init_pricefilter = __esm(() => {
|
|
|
60554
60791
|
]);
|
|
60555
60792
|
PriceFilter$zodSchema = object({
|
|
60556
60793
|
allow_expired_prices: boolean2().default(false),
|
|
60794
|
+
billing_periods: array(BillingPeriod$zodSchema).optional(),
|
|
60557
60795
|
end_time: exports_iso.datetime({ offset: true }).optional(),
|
|
60558
60796
|
entity_ids: array(string2()).optional(),
|
|
60559
60797
|
entity_type: PriceEntityType$zodSchema.optional(),
|
|
@@ -60995,16 +61233,40 @@ var init_addoncadence = __esm(() => {
|
|
|
60995
61233
|
]);
|
|
60996
61234
|
});
|
|
60997
61235
|
|
|
61236
|
+
// src/models/commitmentbucketrequest.ts
|
|
61237
|
+
var CommitmentBucketRequest$zodSchema;
|
|
61238
|
+
var init_commitmentbucketrequest = __esm(() => {
|
|
61239
|
+
init_zod();
|
|
61240
|
+
init_bucket();
|
|
61241
|
+
init_commitmenttype();
|
|
61242
|
+
init_createpricerequest();
|
|
61243
|
+
CommitmentBucketRequest$zodSchema = object({
|
|
61244
|
+
commitment_type: CommitmentType$zodSchema.optional(),
|
|
61245
|
+
commitment_value: string2().optional(),
|
|
61246
|
+
end: Bucket$zodSchema.optional(),
|
|
61247
|
+
id: string2().optional(),
|
|
61248
|
+
overage_factor: string2().optional(),
|
|
61249
|
+
price: CreatePriceRequest$zodSchema.optional(),
|
|
61250
|
+
start: Bucket$zodSchema.optional(),
|
|
61251
|
+
true_up_enabled: boolean2().optional()
|
|
61252
|
+
});
|
|
61253
|
+
});
|
|
61254
|
+
|
|
60998
61255
|
// src/models/lineitemcommitmentconfig.ts
|
|
60999
61256
|
var LineItemCommitmentConfig$zodSchema;
|
|
61000
61257
|
var init_lineitemcommitmentconfig = __esm(() => {
|
|
61001
61258
|
init_zod();
|
|
61002
61259
|
init_billingperiod();
|
|
61260
|
+
init_commitmentbucketrequest();
|
|
61003
61261
|
init_commitmenttype();
|
|
61004
61262
|
LineItemCommitmentConfig$zodSchema = object({
|
|
61005
61263
|
commitment_amount: number2().optional().describe("CommitmentAmount is the minimum amount committed for this line item"),
|
|
61006
61264
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61007
61265
|
commitment_quantity: number2().optional().describe("CommitmentQuantity is the minimum quantity committed for this line item"),
|
|
61266
|
+
commitment_time_buckets: array(CommitmentBucketRequest$zodSchema).optional().describe(`CommitmentTimeBuckets defines per-bucket commitment + inline price for
|
|
61267
|
+
windows whose start UTC hour falls within each configured bucket. Each
|
|
61268
|
+
bucket carries its own price (materialized by the service). Requires
|
|
61269
|
+
IsWindowCommitment=true.`),
|
|
61008
61270
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
61009
61271
|
enable_true_up: boolean2().optional().describe("EnableTrueUp determines if true-up fee should be applied when usage is below commitment"),
|
|
61010
61272
|
is_window_commitment: boolean2().optional().describe("IsWindowCommitment determines if commitment is applied per window (e.g., per day) rather than per billing period"),
|
|
@@ -61168,7 +61430,10 @@ var init_cancelsubscriptionrequest = __esm(() => {
|
|
|
61168
61430
|
init_cancellationtype();
|
|
61169
61431
|
init_prorationbehavior();
|
|
61170
61432
|
CancelSubscriptionRequest$zodSchema = object({
|
|
61171
|
-
cancel_at: exports_iso.datetime({ offset: true }).optional()
|
|
61433
|
+
cancel_at: exports_iso.datetime({ offset: true }).optional().describe(`CancelAt is the exact date/time when the subscription should be cancelled.
|
|
61434
|
+
Required for cancellation_type "scheduled_date"; optional for "immediate" (past dates only — backdated cancellation).
|
|
61435
|
+
For "scheduled_date", accepts both future dates (deferred cancellation) and past dates (backdated cancellation).
|
|
61436
|
+
For "immediate", accepts past/current dates only; use "scheduled_date" for future dates.`),
|
|
61172
61437
|
cancel_immediately_inovice_policy: CancelImmediatelyInvoicePolicy$zodSchema.optional(),
|
|
61173
61438
|
cancellation_type: CancellationType$zodSchema,
|
|
61174
61439
|
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
@@ -61600,6 +61865,7 @@ var CreateSubscriptionLineItemRequest$zodSchema;
|
|
|
61600
61865
|
var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
61601
61866
|
init_zod();
|
|
61602
61867
|
init_billingperiod();
|
|
61868
|
+
init_commitmentbucketrequest();
|
|
61603
61869
|
init_commitmenttype();
|
|
61604
61870
|
init_prorationbehavior();
|
|
61605
61871
|
init_subscriptionpricecreaterequest();
|
|
@@ -61608,6 +61874,7 @@ var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
|
61608
61874
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61609
61875
|
commitment_overage_factor: number2().optional(),
|
|
61610
61876
|
commitment_quantity: number2().optional(),
|
|
61877
|
+
commitment_time_buckets: array(CommitmentBucketRequest$zodSchema).optional(),
|
|
61611
61878
|
commitment_true_up_enabled: boolean2().optional(),
|
|
61612
61879
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
61613
61880
|
commitment_windowed: boolean2().optional(),
|
|
@@ -61669,6 +61936,18 @@ var init_paymentbehavior = __esm(() => {
|
|
|
61669
61936
|
]);
|
|
61670
61937
|
});
|
|
61671
61938
|
|
|
61939
|
+
// src/models/subscriptioncouponinput.ts
|
|
61940
|
+
var SubscriptionCouponInput$zodSchema;
|
|
61941
|
+
var init_subscriptioncouponinput = __esm(() => {
|
|
61942
|
+
init_zod();
|
|
61943
|
+
SubscriptionCouponInput$zodSchema = object({
|
|
61944
|
+
coupon_code: string2().describe("CouponCode is the coupon's human-readable code (case-insensitive). Required."),
|
|
61945
|
+
end_date: exports_iso.datetime({ offset: true }).optional().describe("EndDate is when the coupon ends; overrides duration_in_periods calculation."),
|
|
61946
|
+
price_id: string2().optional().describe("PriceID is the price ID of the line item to target; omit for subscription-level."),
|
|
61947
|
+
start_date: exports_iso.datetime({ offset: true }).optional().describe("StartDate is when the coupon starts; defaults to subscription/phase StartDate.")
|
|
61948
|
+
});
|
|
61949
|
+
});
|
|
61950
|
+
|
|
61672
61951
|
// src/models/subscriptioninheritanceconfig.ts
|
|
61673
61952
|
var SubscriptionInheritanceConfig$zodSchema;
|
|
61674
61953
|
var init_subscriptioninheritanceconfig = __esm(() => {
|
|
@@ -61691,16 +61970,18 @@ var init_subscriptionphasecreaterequest = __esm(() => {
|
|
|
61691
61970
|
init_zod();
|
|
61692
61971
|
init_createsubscriptionlineitemrequest();
|
|
61693
61972
|
init_overridelineitemrequest();
|
|
61973
|
+
init_subscriptioncouponinput();
|
|
61694
61974
|
SubscriptionPhaseCreateRequest$zodSchema = object({
|
|
61695
|
-
coupons: array(string2()).optional().describe("
|
|
61975
|
+
coupons: array(string2()).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61696
61976
|
end_date: exports_iso.datetime({ offset: true }).optional(),
|
|
61697
|
-
line_item_coupons: record(string2(), array(string2())).optional().describe("
|
|
61977
|
+
line_item_coupons: record(string2(), array(string2())).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61698
61978
|
line_items: array(CreateSubscriptionLineItemRequest$zodSchema).optional().describe(`LineItems are extra line items to add during this phase, primarily one-time charges.
|
|
61699
61979
|
Each item's start_date defaults to the phase's start_date when not provided.`),
|
|
61700
61980
|
metadata: record(string2(), string2()).optional(),
|
|
61701
61981
|
override_line_items: array(OverrideLineItemRequest$zodSchema).optional().describe(`OverrideLineItems allows customizing specific prices for this phase
|
|
61702
61982
|
If not provided, phase will use the same line items as the subscription (plan prices)`),
|
|
61703
|
-
start_date: exports_iso.datetime({ offset: true })
|
|
61983
|
+
start_date: exports_iso.datetime({ offset: true }),
|
|
61984
|
+
subscription_coupons: array(SubscriptionCouponInput$zodSchema).optional().describe("SubscriptionCoupons is the preferred way to attach coupons to this phase.")
|
|
61704
61985
|
});
|
|
61705
61986
|
});
|
|
61706
61987
|
|
|
@@ -61720,6 +62001,7 @@ var init_createsubscriptionrequest = __esm(() => {
|
|
|
61720
62001
|
init_paymentbehavior();
|
|
61721
62002
|
init_paymentterms();
|
|
61722
62003
|
init_prorationbehavior();
|
|
62004
|
+
init_subscriptioncouponinput();
|
|
61723
62005
|
init_subscriptioninheritanceconfig();
|
|
61724
62006
|
init_subscriptionphasecreaterequest();
|
|
61725
62007
|
init_subscriptionstatus();
|
|
@@ -61741,7 +62023,7 @@ day in the same month (a shorter first period); subsequent periods follow the us
|
|
|
61741
62023
|
collection_method: CollectionMethod$zodSchema.optional(),
|
|
61742
62024
|
commitment_amount: string2().optional().describe("CommitmentAmount is the minimum amount a customer commits to paying for a billing period"),
|
|
61743
62025
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61744
|
-
coupons: array(string2()).optional(),
|
|
62026
|
+
coupons: array(string2()).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61745
62027
|
credit_grants: array(CreateCreditGrantRequest$zodSchema).optional().describe("Credit grants to be applied when subscription is created"),
|
|
61746
62028
|
currency: string2(),
|
|
61747
62029
|
customer_id: string2().optional().describe(`customer_id is the flexprice customer id
|
|
@@ -61755,7 +62037,7 @@ and must be same as what you provided as external_id while creating the customer
|
|
|
61755
62037
|
gateway_payment_method_id: string2().optional(),
|
|
61756
62038
|
inheritance: SubscriptionInheritanceConfig$zodSchema.optional(),
|
|
61757
62039
|
line_item_commitments: record(string2(), LineItemCommitmentConfig$zodSchema).optional().describe("LineItemCommitments allows setting commitment configuration per line item (keyed by price_id)"),
|
|
61758
|
-
line_item_coupons: record(string2(), array(string2())).optional(),
|
|
62040
|
+
line_item_coupons: record(string2(), array(string2())).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61759
62041
|
line_items: array(CreateSubscriptionLineItemRequest$zodSchema).optional().describe("LineItems are extra line items to add at creation (each with price_id or price), in addition to plan prices"),
|
|
61760
62042
|
lookup_key: string2().optional(),
|
|
61761
62043
|
metadata: record(string2(), string2()).optional(),
|
|
@@ -61768,6 +62050,8 @@ and must be same as what you provided as external_id while creating the customer
|
|
|
61768
62050
|
plan_id: string2(),
|
|
61769
62051
|
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
61770
62052
|
start_date: exports_iso.datetime({ offset: true }).optional(),
|
|
62053
|
+
subscription_coupons: array(SubscriptionCouponInput$zodSchema).optional().describe(`SubscriptionCoupons is the preferred way to attach coupons at creation.
|
|
62054
|
+
Accepts coupon_code; optionally targets a line item via price_id.`),
|
|
61771
62055
|
subscription_status: SubscriptionStatus$zodSchema.optional(),
|
|
61772
62056
|
tax_rate_overrides: array(TaxRateOverride$zodSchema).optional().describe("tax_rate_overrides is the tax rate overrides\tto be applied to the subscription"),
|
|
61773
62057
|
trial_period_days: int().optional().describe(`TrialPeriodDays: nil = inherit trial length from plan recurring-fixed prices (must be uniform).
|
|
@@ -61895,6 +62179,7 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61895
62179
|
init_pricetype();
|
|
61896
62180
|
init_status();
|
|
61897
62181
|
init_subscriptionlineitementitytype();
|
|
62182
|
+
init_timeofdaybucket();
|
|
61898
62183
|
SubscriptionLineItemResponse$zodSchema = object({
|
|
61899
62184
|
addon_association_id: string2().optional(),
|
|
61900
62185
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
@@ -61903,6 +62188,7 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61903
62188
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61904
62189
|
commitment_overage_factor: string2().optional(),
|
|
61905
62190
|
commitment_quantity: string2().optional(),
|
|
62191
|
+
commitment_time_buckets: array(TimeOfDayBucket$zodSchema).optional(),
|
|
61906
62192
|
commitment_true_up_enabled: boolean2().optional(),
|
|
61907
62193
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
61908
62194
|
commitment_windowed: boolean2().optional(),
|
|
@@ -62446,6 +62732,33 @@ Use when applying a plan change (e.g. upgrade or downgrade). Executes proration
|
|
|
62446
62732
|
};
|
|
62447
62733
|
});
|
|
62448
62734
|
|
|
62735
|
+
// src/models/submodifycouponaction.ts
|
|
62736
|
+
var SubModifyCouponAction$zodSchema;
|
|
62737
|
+
var init_submodifycouponaction = __esm(() => {
|
|
62738
|
+
init_zod();
|
|
62739
|
+
SubModifyCouponAction$zodSchema = _enum([
|
|
62740
|
+
"add",
|
|
62741
|
+
"remove"
|
|
62742
|
+
]);
|
|
62743
|
+
});
|
|
62744
|
+
|
|
62745
|
+
// src/models/submodifycouponparams.ts
|
|
62746
|
+
var SubModifyCouponParams$zodSchema;
|
|
62747
|
+
var init_submodifycouponparams = __esm(() => {
|
|
62748
|
+
init_zod();
|
|
62749
|
+
init_submodifycouponaction();
|
|
62750
|
+
SubModifyCouponParams$zodSchema = object({
|
|
62751
|
+
action: SubModifyCouponAction$zodSchema,
|
|
62752
|
+
association_id: string2().optional().describe('Required when action="remove". ID of the CouponAssociation to soft-delete.'),
|
|
62753
|
+
coupon_code: string2().optional().describe('Required for action="add". Coupon code of the coupon to attach.'),
|
|
62754
|
+
effective_date: exports_iso.datetime({ offset: true }).optional().describe("Optional. When to apply the change; defaults to now if omitted."),
|
|
62755
|
+
end_date: exports_iso.datetime({ offset: true }).optional().describe("Optional. When the coupon association ends."),
|
|
62756
|
+
start_date: exports_iso.datetime({ offset: true }).optional().describe("Optional. When the coupon association starts; defaults to EffectiveDate."),
|
|
62757
|
+
subscription_id: string2().optional().describe("Optional. Apply at subscription level. Mutually exclusive with SubscriptionLineItemID."),
|
|
62758
|
+
subscription_line_item_id: string2().optional().describe("Optional. Apply at a specific line item. Mutually exclusive with SubscriptionID.")
|
|
62759
|
+
});
|
|
62760
|
+
});
|
|
62761
|
+
|
|
62449
62762
|
// src/models/groupedinvoicingaction.ts
|
|
62450
62763
|
var GroupedInvoicingAction$zodSchema;
|
|
62451
62764
|
var init_groupedinvoicingaction = __esm(() => {
|
|
@@ -62468,12 +62781,25 @@ var init_submodifygroupedinvoicingparams = __esm(() => {
|
|
|
62468
62781
|
});
|
|
62469
62782
|
});
|
|
62470
62783
|
|
|
62784
|
+
// src/models/inheritanceaction.ts
|
|
62785
|
+
var InheritanceAction$zodSchema;
|
|
62786
|
+
var init_inheritanceaction = __esm(() => {
|
|
62787
|
+
init_zod();
|
|
62788
|
+
InheritanceAction$zodSchema = _enum([
|
|
62789
|
+
"add",
|
|
62790
|
+
"remove"
|
|
62791
|
+
]);
|
|
62792
|
+
});
|
|
62793
|
+
|
|
62471
62794
|
// src/models/submodifyinheritancerequest.ts
|
|
62472
62795
|
var SubModifyInheritanceRequest$zodSchema;
|
|
62473
62796
|
var init_submodifyinheritancerequest = __esm(() => {
|
|
62474
62797
|
init_zod();
|
|
62798
|
+
init_inheritanceaction();
|
|
62475
62799
|
SubModifyInheritanceRequest$zodSchema = object({
|
|
62476
|
-
|
|
62800
|
+
action: InheritanceAction$zodSchema.optional(),
|
|
62801
|
+
external_customer_ids_to_inherit_subscription: array(string2()).optional().describe('ExternalCustomerIDsToInheritSubscription is used for action="add".'),
|
|
62802
|
+
external_customer_ids_to_remove: array(string2()).optional().describe('ExternalCustomerIDsToRemove is used for action="remove".')
|
|
62477
62803
|
});
|
|
62478
62804
|
});
|
|
62479
62805
|
|
|
@@ -62499,6 +62825,50 @@ var init_submodifyquantitychangerequest = __esm(() => {
|
|
|
62499
62825
|
});
|
|
62500
62826
|
});
|
|
62501
62827
|
|
|
62828
|
+
// src/models/submodifytaxaction.ts
|
|
62829
|
+
var SubModifyTaxAction$zodSchema;
|
|
62830
|
+
var init_submodifytaxaction = __esm(() => {
|
|
62831
|
+
init_zod();
|
|
62832
|
+
SubModifyTaxAction$zodSchema = _enum([
|
|
62833
|
+
"add",
|
|
62834
|
+
"remove"
|
|
62835
|
+
]);
|
|
62836
|
+
});
|
|
62837
|
+
|
|
62838
|
+
// src/models/submodifytaxparams.ts
|
|
62839
|
+
var SubModifyTaxParams$zodSchema;
|
|
62840
|
+
var init_submodifytaxparams = __esm(() => {
|
|
62841
|
+
init_zod();
|
|
62842
|
+
init_submodifytaxaction();
|
|
62843
|
+
SubModifyTaxParams$zodSchema = object({
|
|
62844
|
+
action: SubModifyTaxAction$zodSchema,
|
|
62845
|
+
association_id: string2().optional().describe('Required when action="remove". ID of the TaxAssociation to soft-delete.'),
|
|
62846
|
+
effective_date: exports_iso.datetime({ offset: true }).optional().describe("Optional. When to apply the change; defaults to now if omitted."),
|
|
62847
|
+
tax_rate_id: string2().optional().describe('Required when action="add". ID of the active tax rate to attach.')
|
|
62848
|
+
});
|
|
62849
|
+
});
|
|
62850
|
+
|
|
62851
|
+
// src/models/trialendaction.ts
|
|
62852
|
+
var TrialEndAction$zodSchema;
|
|
62853
|
+
var init_trialendaction = __esm(() => {
|
|
62854
|
+
init_zod();
|
|
62855
|
+
TrialEndAction$zodSchema = _enum([
|
|
62856
|
+
"immediate",
|
|
62857
|
+
"scheduled_date"
|
|
62858
|
+
]);
|
|
62859
|
+
});
|
|
62860
|
+
|
|
62861
|
+
// src/models/submodifytrialendrequest.ts
|
|
62862
|
+
var SubModifyTrialEndRequest$zodSchema;
|
|
62863
|
+
var init_submodifytrialendrequest = __esm(() => {
|
|
62864
|
+
init_zod();
|
|
62865
|
+
init_trialendaction();
|
|
62866
|
+
SubModifyTrialEndRequest$zodSchema = object({
|
|
62867
|
+
action: TrialEndAction$zodSchema,
|
|
62868
|
+
new_trial_end: exports_iso.datetime({ offset: true }).optional().describe('NewTrialEnd is the new trial end date. Required when action is "scheduled_date".')
|
|
62869
|
+
});
|
|
62870
|
+
});
|
|
62871
|
+
|
|
62502
62872
|
// src/models/subscriptionmodifytype.ts
|
|
62503
62873
|
var SubscriptionModifyType$zodSchema;
|
|
62504
62874
|
var init_subscriptionmodifytype = __esm(() => {
|
|
@@ -62506,7 +62876,10 @@ var init_subscriptionmodifytype = __esm(() => {
|
|
|
62506
62876
|
SubscriptionModifyType$zodSchema = _enum([
|
|
62507
62877
|
"inheritance",
|
|
62508
62878
|
"quantity_change",
|
|
62509
|
-
"grouped_invoicing"
|
|
62879
|
+
"grouped_invoicing",
|
|
62880
|
+
"trial_end",
|
|
62881
|
+
"coupon",
|
|
62882
|
+
"tax"
|
|
62510
62883
|
]);
|
|
62511
62884
|
});
|
|
62512
62885
|
|
|
@@ -62514,14 +62887,20 @@ var init_subscriptionmodifytype = __esm(() => {
|
|
|
62514
62887
|
var ExecuteSubscriptionModifyRequest$zodSchema;
|
|
62515
62888
|
var init_executesubscriptionmodifyrequest = __esm(() => {
|
|
62516
62889
|
init_zod();
|
|
62890
|
+
init_submodifycouponparams();
|
|
62517
62891
|
init_submodifygroupedinvoicingparams();
|
|
62518
62892
|
init_submodifyinheritancerequest();
|
|
62519
62893
|
init_submodifyquantitychangerequest();
|
|
62894
|
+
init_submodifytaxparams();
|
|
62895
|
+
init_submodifytrialendrequest();
|
|
62520
62896
|
init_subscriptionmodifytype();
|
|
62521
62897
|
ExecuteSubscriptionModifyRequest$zodSchema = object({
|
|
62898
|
+
coupon_params: SubModifyCouponParams$zodSchema.optional(),
|
|
62522
62899
|
grouped_invoicing_params: SubModifyGroupedInvoicingParams$zodSchema.optional(),
|
|
62523
62900
|
inheritance_params: SubModifyInheritanceRequest$zodSchema.optional(),
|
|
62524
62901
|
quantity_change_params: SubModifyQuantityChangeRequest$zodSchema.optional(),
|
|
62902
|
+
tax_params: SubModifyTaxParams$zodSchema.optional(),
|
|
62903
|
+
trial_end_params: SubModifyTrialEndRequest$zodSchema.optional(),
|
|
62525
62904
|
type: SubscriptionModifyType$zodSchema
|
|
62526
62905
|
});
|
|
62527
62906
|
});
|
|
@@ -62648,6 +63027,8 @@ var init_userresponse = __esm(() => {
|
|
|
62648
63027
|
UserResponse$zodSchema = object({
|
|
62649
63028
|
email: string2().optional().describe("Empty for service accounts"),
|
|
62650
63029
|
id: string2().optional(),
|
|
63030
|
+
metadata: record(string2(), string2()).optional(),
|
|
63031
|
+
name: string2().optional(),
|
|
62651
63032
|
roles: array(string2()).optional(),
|
|
62652
63033
|
tenant: TenantResponse$zodSchema.optional(),
|
|
62653
63034
|
type: UserType$zodSchema.optional()
|
|
@@ -62897,8 +63278,10 @@ var init_changedsubscription = __esm(() => {
|
|
|
62897
63278
|
init_subscriptionstatus();
|
|
62898
63279
|
ChangedSubscription$zodSchema = object({
|
|
62899
63280
|
action: ChangedSubscriptionAction$zodSchema.optional().describe("created | updated"),
|
|
63281
|
+
current_period_end: exports_iso.datetime({ offset: true }).optional(),
|
|
62900
63282
|
id: string2().optional(),
|
|
62901
|
-
status: SubscriptionStatus$zodSchema.optional()
|
|
63283
|
+
status: SubscriptionStatus$zodSchema.optional(),
|
|
63284
|
+
trial_end: exports_iso.datetime({ offset: true }).optional()
|
|
62902
63285
|
});
|
|
62903
63286
|
});
|
|
62904
63287
|
|
|
@@ -63037,7 +63420,7 @@ var init_subscriptionsExecuteSubscriptionModify2 = __esm(() => {
|
|
|
63037
63420
|
name: "execute-subscription-modify",
|
|
63038
63421
|
description: `Execute subscription modification
|
|
63039
63422
|
|
|
63040
|
-
Execute a mid-cycle subscription modification (inheritance
|
|
63423
|
+
Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax).`,
|
|
63041
63424
|
scopes: ["write"],
|
|
63042
63425
|
annotations: {
|
|
63043
63426
|
title: "",
|
|
@@ -63962,11 +64345,17 @@ Each line item can optionally include expanded price data`),
|
|
|
63962
64345
|
phases: array(SubscriptionPhaseResponse$zodSchema).optional().describe('Phases are included when "phases" is in expand parameter'),
|
|
63963
64346
|
plan: PlanResponse$zodSchema.optional(),
|
|
63964
64347
|
plan_id: string2().optional().describe("PlanID is the identifier for the plan in our system"),
|
|
64348
|
+
plan_prices_out_of_sync: boolean2().optional().describe(`PlanPricesOutOfSync is true when the subscription's synced_price_sequence
|
|
64349
|
+
is behind the plan's current max prices.sequence — i.e. plan-price
|
|
64350
|
+
changes have not yet been reconciled into this subscription's line items.`),
|
|
63965
64351
|
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
63966
64352
|
start_date: exports_iso.datetime({ offset: true }).optional().describe("StartDate is the start date of the subscription"),
|
|
63967
64353
|
status: Status$zodSchema.optional(),
|
|
63968
64354
|
subscription_status: SubscriptionStatus$zodSchema.optional(),
|
|
63969
64355
|
subscription_type: SubscriptionType$zodSchema.optional(),
|
|
64356
|
+
synced_price_sequence: int().optional().describe(`SyncedPriceSequence is the plan-price sequence up to which this
|
|
64357
|
+
subscription's line items have been reconciled. Bumped by the
|
|
64358
|
+
plan-price sync after a successful pass.`),
|
|
63970
64359
|
tenant_id: string2().optional(),
|
|
63971
64360
|
trial_end: exports_iso.datetime({ offset: true }).optional().describe("TrialEnd is the end date of the trial period"),
|
|
63972
64361
|
trial_start: exports_iso.datetime({ offset: true }).optional().describe("TrialStart is the start date of the trial period"),
|
|
@@ -64682,7 +65071,7 @@ var init_subscriptionsPreviewSubscriptionModify2 = __esm(() => {
|
|
|
64682
65071
|
name: "preview-subscription-modify",
|
|
64683
65072
|
description: `Preview subscription modification
|
|
64684
65073
|
|
|
64685
|
-
Preview the impact of a mid-cycle subscription modification without committing changes.`,
|
|
65074
|
+
Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes.`,
|
|
64686
65075
|
scopes: ["read"],
|
|
64687
65076
|
annotations: {
|
|
64688
65077
|
title: "",
|
|
@@ -65282,6 +65671,7 @@ var init_updatesubscriptionlineitemrequest = __esm(() => {
|
|
|
65282
65671
|
init_billingmodel();
|
|
65283
65672
|
init_billingperiod();
|
|
65284
65673
|
init_billingtier();
|
|
65674
|
+
init_commitmentbucketrequest();
|
|
65285
65675
|
init_commitmenttype();
|
|
65286
65676
|
init_createpricetier();
|
|
65287
65677
|
init_pricetransformquantity();
|
|
@@ -65292,6 +65682,7 @@ var init_updatesubscriptionlineitemrequest = __esm(() => {
|
|
|
65292
65682
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
65293
65683
|
commitment_overage_factor: number2().optional(),
|
|
65294
65684
|
commitment_quantity: number2().optional(),
|
|
65685
|
+
commitment_time_buckets: array(CommitmentBucketRequest$zodSchema).optional().describe("Pointer so an explicit empty array can clear existing buckets (omission keeps them)."),
|
|
65295
65686
|
commitment_true_up_enabled: boolean2().optional(),
|
|
65296
65687
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
65297
65688
|
commitment_windowed: boolean2().optional(),
|
|
@@ -65439,7 +65830,7 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
65439
65830
|
function createMCPServer(deps) {
|
|
65440
65831
|
const server = new McpServer({
|
|
65441
65832
|
name: "Flexprice",
|
|
65442
|
-
version: "2.1.
|
|
65833
|
+
version: "2.1.18"
|
|
65443
65834
|
});
|
|
65444
65835
|
const getClient = deps.getSDK || (() => new FlexpriceCore({
|
|
65445
65836
|
security: deps.security,
|
|
@@ -65996,13 +66387,13 @@ Use when adding a new charge or seat to a subscription (e.g. extra seat or one-t
|
|
|
65996
66387
|
name: "execute-subscription-modify",
|
|
65997
66388
|
description: `Execute subscription modification
|
|
65998
66389
|
|
|
65999
|
-
Execute a mid-cycle subscription modification (inheritance
|
|
66390
|
+
Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax).`
|
|
66000
66391
|
},
|
|
66001
66392
|
{
|
|
66002
66393
|
name: "preview-subscription-modify",
|
|
66003
66394
|
description: `Preview subscription modification
|
|
66004
66395
|
|
|
66005
|
-
Preview the impact of a mid-cycle subscription modification without committing changes.`
|
|
66396
|
+
Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes.`
|
|
66006
66397
|
},
|
|
66007
66398
|
{
|
|
66008
66399
|
name: "get-subscription-v2",
|
|
@@ -69589,7 +69980,7 @@ var routes = buildRouteMap({
|
|
|
69589
69980
|
var app = buildApplication(routes, {
|
|
69590
69981
|
name: "mcp",
|
|
69591
69982
|
versionInfo: {
|
|
69592
|
-
currentVersion: "2.1.
|
|
69983
|
+
currentVersion: "2.1.18"
|
|
69593
69984
|
}
|
|
69594
69985
|
});
|
|
69595
69986
|
run(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -69597,5 +69988,5 @@ export {
|
|
|
69597
69988
|
app
|
|
69598
69989
|
};
|
|
69599
69990
|
|
|
69600
|
-
//# debugId=
|
|
69991
|
+
//# debugId=CF5800504FB646C764756E2164756E21
|
|
69601
69992
|
//# sourceMappingURL=mcp-server.js.map
|