@flexprice/mcp-server 2.1.17 → 2.1.19
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 +543 -210
- package/bin/mcp-server.js.map +54 -43
- package/bun.lock +19 -17
- 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/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/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/eventprocessingstatustype.d.ts +1 -1
- package/esm/models/executesubscriptionmodifyrequest.d.ts +4 -0
- package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.js +4 -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/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/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 +13 -0
- package/esm/models/submodifycouponparams.d.ts.map +1 -0
- package/esm/models/submodifycouponparams.js +15 -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/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 +4 -0
- package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
- package/esm/models/subscriptionmodifytype.js +4 -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/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/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 +1 -0
- package/esm/models/userresponse.d.ts.map +1 -1
- package/esm/models/userresponse.js +1 -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/commitmentbucketrequest.ts +35 -0
- package/src/models/coupon.ts +2 -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/executesubscriptionmodifyrequest.ts +12 -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/lineitemcommitmentconfig.ts +9 -0
- package/src/models/meterusageattribution.ts +18 -0
- package/src/models/pricefilter.ts +3 -0
- package/src/models/submodifycouponaction.ts +17 -0
- package/src/models/submodifycouponparams.ts +42 -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/subscriptioncouponinput.ts +29 -0
- package/src/models/subscriptionlineitemresponse.ts +6 -0
- package/src/models/subscriptionmodifytype.ts +4 -0
- package/src/models/subscriptionphasecreaterequest.ts +11 -4
- package/src/models/subscriptionsubscriptionlineitem.ts +6 -0
- package/src/models/timeofdaybucket.ts +33 -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 +2 -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.19",
|
|
51274
|
+
genVersion: "2.904.2",
|
|
51275
|
+
userAgent: "speakeasy-sdk/mcp-typescript 2.1.19 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;
|
|
@@ -53363,7 +53508,6 @@ var WindowSize$zodSchema;
|
|
|
53363
53508
|
var init_windowsize = __esm(() => {
|
|
53364
53509
|
init_zod();
|
|
53365
53510
|
WindowSize$zodSchema = _enum([
|
|
53366
|
-
"MONTH",
|
|
53367
53511
|
"MINUTE",
|
|
53368
53512
|
"15MIN",
|
|
53369
53513
|
"30MIN",
|
|
@@ -53372,7 +53516,8 @@ var init_windowsize = __esm(() => {
|
|
|
53372
53516
|
"6HOUR",
|
|
53373
53517
|
"12HOUR",
|
|
53374
53518
|
"DAY",
|
|
53375
|
-
"WEEK"
|
|
53519
|
+
"WEEK",
|
|
53520
|
+
"MONTH"
|
|
53376
53521
|
]);
|
|
53377
53522
|
});
|
|
53378
53523
|
|
|
@@ -54416,6 +54561,45 @@ Use when updating customer details (e.g. name, email, or metadata). Identify by
|
|
|
54416
54561
|
};
|
|
54417
54562
|
});
|
|
54418
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
|
+
|
|
54419
54603
|
// src/models/customer.ts
|
|
54420
54604
|
var Customer$zodSchema;
|
|
54421
54605
|
var init_customer = __esm(() => {
|
|
@@ -54443,18 +54627,6 @@ var init_customer = __esm(() => {
|
|
|
54443
54627
|
});
|
|
54444
54628
|
});
|
|
54445
54629
|
|
|
54446
|
-
// src/models/debugtrackerstatus.ts
|
|
54447
|
-
var DebugTrackerStatus$zodSchema;
|
|
54448
|
-
var init_debugtrackerstatus = __esm(() => {
|
|
54449
|
-
init_zod();
|
|
54450
|
-
DebugTrackerStatus$zodSchema = _enum([
|
|
54451
|
-
"unprocessed",
|
|
54452
|
-
"not_found",
|
|
54453
|
-
"found",
|
|
54454
|
-
"error"
|
|
54455
|
-
]);
|
|
54456
|
-
});
|
|
54457
|
-
|
|
54458
54630
|
// src/models/customerlookupresult.ts
|
|
54459
54631
|
var CustomerLookupResult$zodSchema;
|
|
54460
54632
|
var init_customerlookupresult = __esm(() => {
|
|
@@ -54477,7 +54649,8 @@ var init_failurepointtype = __esm(() => {
|
|
|
54477
54649
|
"customer_lookup",
|
|
54478
54650
|
"meter_lookup",
|
|
54479
54651
|
"price_lookup",
|
|
54480
|
-
"subscription_line_item_lookup"
|
|
54652
|
+
"subscription_line_item_lookup",
|
|
54653
|
+
"attributed_to_customer"
|
|
54481
54654
|
]);
|
|
54482
54655
|
});
|
|
54483
54656
|
|
|
@@ -54770,6 +54943,36 @@ var init_subscriptionlineitementitytype = __esm(() => {
|
|
|
54770
54943
|
]);
|
|
54771
54944
|
});
|
|
54772
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
|
+
|
|
54773
54976
|
// src/models/subscriptionsubscriptionlineitem.ts
|
|
54774
54977
|
var SubscriptionSubscriptionLineItem$zodSchema;
|
|
54775
54978
|
var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
@@ -54781,6 +54984,7 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54781
54984
|
init_pricetype();
|
|
54782
54985
|
init_status();
|
|
54783
54986
|
init_subscriptionlineitementitytype();
|
|
54987
|
+
init_timeofdaybucket();
|
|
54784
54988
|
SubscriptionSubscriptionLineItem$zodSchema = object({
|
|
54785
54989
|
addon_association_id: string2().optional(),
|
|
54786
54990
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
@@ -54789,6 +54993,7 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54789
54993
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
54790
54994
|
commitment_overage_factor: string2().optional(),
|
|
54791
54995
|
commitment_quantity: string2().optional(),
|
|
54996
|
+
commitment_time_buckets: array(TimeOfDayBucket$zodSchema).optional(),
|
|
54792
54997
|
commitment_true_up_enabled: boolean2().optional(),
|
|
54793
54998
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
54794
54999
|
commitment_windowed: boolean2().optional(),
|
|
@@ -54858,12 +55063,14 @@ var init_subscriptionlineitemlookupresult = __esm(() => {
|
|
|
54858
55063
|
var DebugTracker$zodSchema;
|
|
54859
55064
|
var init_debugtracker = __esm(() => {
|
|
54860
55065
|
init_zod();
|
|
55066
|
+
init_attributedtocustomerresult();
|
|
54861
55067
|
init_customerlookupresult();
|
|
54862
55068
|
init_failurepoint();
|
|
54863
55069
|
init_metermatchingresult();
|
|
54864
55070
|
init_pricelookupresult();
|
|
54865
55071
|
init_subscriptionlineitemlookupresult();
|
|
54866
55072
|
DebugTracker$zodSchema = object({
|
|
55073
|
+
attributed_to_customer: AttributedToCustomerResult$zodSchema.optional(),
|
|
54867
55074
|
customer_lookup: CustomerLookupResult$zodSchema.optional(),
|
|
54868
55075
|
failure_point: FailurePoint$zodSchema.optional(),
|
|
54869
55076
|
meter_matching: MeterMatchingResult$zodSchema.optional(),
|
|
@@ -55159,6 +55366,10 @@ var init_getusageanalyticsrequest = __esm(() => {
|
|
|
55159
55366
|
init_zod();
|
|
55160
55367
|
init_windowsize();
|
|
55161
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).`),
|
|
55162
55373
|
end_time: exports_iso.datetime({ offset: true }).optional(),
|
|
55163
55374
|
expand: array(string2()).optional().describe('allowed values: "price", "meter", "feature", "subscription_line_item","plan","addon"'),
|
|
55164
55375
|
external_customer_id: string2().optional().describe(`ExternalCustomerID is the single external customer ID.
|
|
@@ -56869,6 +57080,7 @@ var init_coupon = __esm(() => {
|
|
|
56869
57080
|
Coupon$zodSchema = object({
|
|
56870
57081
|
amount_off: string2().optional(),
|
|
56871
57082
|
cadence: CouponCadence$zodSchema.optional(),
|
|
57083
|
+
coupon_code: string2().optional(),
|
|
56872
57084
|
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
56873
57085
|
created_by: string2().optional(),
|
|
56874
57086
|
currency: string2().optional(),
|
|
@@ -60569,6 +60781,7 @@ Use when resolving a price by external id (e.g. from your catalog or CMS). Ideal
|
|
|
60569
60781
|
var PriceFilterOrder$zodSchema, PriceFilter$zodSchema;
|
|
60570
60782
|
var init_pricefilter = __esm(() => {
|
|
60571
60783
|
init_zod();
|
|
60784
|
+
init_billingperiod();
|
|
60572
60785
|
init_filtercondition();
|
|
60573
60786
|
init_priceentitytype();
|
|
60574
60787
|
init_status();
|
|
@@ -60578,6 +60791,7 @@ var init_pricefilter = __esm(() => {
|
|
|
60578
60791
|
]);
|
|
60579
60792
|
PriceFilter$zodSchema = object({
|
|
60580
60793
|
allow_expired_prices: boolean2().default(false),
|
|
60794
|
+
billing_periods: array(BillingPeriod$zodSchema).optional(),
|
|
60581
60795
|
end_time: exports_iso.datetime({ offset: true }).optional(),
|
|
60582
60796
|
entity_ids: array(string2()).optional(),
|
|
60583
60797
|
entity_type: PriceEntityType$zodSchema.optional(),
|
|
@@ -61019,16 +61233,40 @@ var init_addoncadence = __esm(() => {
|
|
|
61019
61233
|
]);
|
|
61020
61234
|
});
|
|
61021
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
|
+
|
|
61022
61255
|
// src/models/lineitemcommitmentconfig.ts
|
|
61023
61256
|
var LineItemCommitmentConfig$zodSchema;
|
|
61024
61257
|
var init_lineitemcommitmentconfig = __esm(() => {
|
|
61025
61258
|
init_zod();
|
|
61026
61259
|
init_billingperiod();
|
|
61260
|
+
init_commitmentbucketrequest();
|
|
61027
61261
|
init_commitmenttype();
|
|
61028
61262
|
LineItemCommitmentConfig$zodSchema = object({
|
|
61029
61263
|
commitment_amount: number2().optional().describe("CommitmentAmount is the minimum amount committed for this line item"),
|
|
61030
61264
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61031
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.`),
|
|
61032
61270
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
61033
61271
|
enable_true_up: boolean2().optional().describe("EnableTrueUp determines if true-up fee should be applied when usage is below commitment"),
|
|
61034
61272
|
is_window_commitment: boolean2().optional().describe("IsWindowCommitment determines if commitment is applied per window (e.g., per day) rather than per billing period"),
|
|
@@ -61192,7 +61430,10 @@ var init_cancelsubscriptionrequest = __esm(() => {
|
|
|
61192
61430
|
init_cancellationtype();
|
|
61193
61431
|
init_prorationbehavior();
|
|
61194
61432
|
CancelSubscriptionRequest$zodSchema = object({
|
|
61195
|
-
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.`),
|
|
61196
61437
|
cancel_immediately_inovice_policy: CancelImmediatelyInvoicePolicy$zodSchema.optional(),
|
|
61197
61438
|
cancellation_type: CancellationType$zodSchema,
|
|
61198
61439
|
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
@@ -61624,6 +61865,7 @@ var CreateSubscriptionLineItemRequest$zodSchema;
|
|
|
61624
61865
|
var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
61625
61866
|
init_zod();
|
|
61626
61867
|
init_billingperiod();
|
|
61868
|
+
init_commitmentbucketrequest();
|
|
61627
61869
|
init_commitmenttype();
|
|
61628
61870
|
init_prorationbehavior();
|
|
61629
61871
|
init_subscriptionpricecreaterequest();
|
|
@@ -61632,6 +61874,7 @@ var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
|
61632
61874
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61633
61875
|
commitment_overage_factor: number2().optional(),
|
|
61634
61876
|
commitment_quantity: number2().optional(),
|
|
61877
|
+
commitment_time_buckets: array(CommitmentBucketRequest$zodSchema).optional(),
|
|
61635
61878
|
commitment_true_up_enabled: boolean2().optional(),
|
|
61636
61879
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
61637
61880
|
commitment_windowed: boolean2().optional(),
|
|
@@ -61693,6 +61936,18 @@ var init_paymentbehavior = __esm(() => {
|
|
|
61693
61936
|
]);
|
|
61694
61937
|
});
|
|
61695
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
|
+
|
|
61696
61951
|
// src/models/subscriptioninheritanceconfig.ts
|
|
61697
61952
|
var SubscriptionInheritanceConfig$zodSchema;
|
|
61698
61953
|
var init_subscriptioninheritanceconfig = __esm(() => {
|
|
@@ -61715,16 +61970,18 @@ var init_subscriptionphasecreaterequest = __esm(() => {
|
|
|
61715
61970
|
init_zod();
|
|
61716
61971
|
init_createsubscriptionlineitemrequest();
|
|
61717
61972
|
init_overridelineitemrequest();
|
|
61973
|
+
init_subscriptioncouponinput();
|
|
61718
61974
|
SubscriptionPhaseCreateRequest$zodSchema = object({
|
|
61719
|
-
coupons: array(string2()).optional().describe("
|
|
61975
|
+
coupons: array(string2()).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61720
61976
|
end_date: exports_iso.datetime({ offset: true }).optional(),
|
|
61721
|
-
line_item_coupons: record(string2(), array(string2())).optional().describe("
|
|
61977
|
+
line_item_coupons: record(string2(), array(string2())).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61722
61978
|
line_items: array(CreateSubscriptionLineItemRequest$zodSchema).optional().describe(`LineItems are extra line items to add during this phase, primarily one-time charges.
|
|
61723
61979
|
Each item's start_date defaults to the phase's start_date when not provided.`),
|
|
61724
61980
|
metadata: record(string2(), string2()).optional(),
|
|
61725
61981
|
override_line_items: array(OverrideLineItemRequest$zodSchema).optional().describe(`OverrideLineItems allows customizing specific prices for this phase
|
|
61726
61982
|
If not provided, phase will use the same line items as the subscription (plan prices)`),
|
|
61727
|
-
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.")
|
|
61728
61985
|
});
|
|
61729
61986
|
});
|
|
61730
61987
|
|
|
@@ -61744,6 +62001,7 @@ var init_createsubscriptionrequest = __esm(() => {
|
|
|
61744
62001
|
init_paymentbehavior();
|
|
61745
62002
|
init_paymentterms();
|
|
61746
62003
|
init_prorationbehavior();
|
|
62004
|
+
init_subscriptioncouponinput();
|
|
61747
62005
|
init_subscriptioninheritanceconfig();
|
|
61748
62006
|
init_subscriptionphasecreaterequest();
|
|
61749
62007
|
init_subscriptionstatus();
|
|
@@ -61765,7 +62023,7 @@ day in the same month (a shorter first period); subsequent periods follow the us
|
|
|
61765
62023
|
collection_method: CollectionMethod$zodSchema.optional(),
|
|
61766
62024
|
commitment_amount: string2().optional().describe("CommitmentAmount is the minimum amount a customer commits to paying for a billing period"),
|
|
61767
62025
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61768
|
-
coupons: array(string2()).optional(),
|
|
62026
|
+
coupons: array(string2()).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61769
62027
|
credit_grants: array(CreateCreditGrantRequest$zodSchema).optional().describe("Credit grants to be applied when subscription is created"),
|
|
61770
62028
|
currency: string2(),
|
|
61771
62029
|
customer_id: string2().optional().describe(`customer_id is the flexprice customer id
|
|
@@ -61779,7 +62037,7 @@ and must be same as what you provided as external_id while creating the customer
|
|
|
61779
62037
|
gateway_payment_method_id: string2().optional(),
|
|
61780
62038
|
inheritance: SubscriptionInheritanceConfig$zodSchema.optional(),
|
|
61781
62039
|
line_item_commitments: record(string2(), LineItemCommitmentConfig$zodSchema).optional().describe("LineItemCommitments allows setting commitment configuration per line item (keyed by price_id)"),
|
|
61782
|
-
line_item_coupons: record(string2(), array(string2())).optional(),
|
|
62040
|
+
line_item_coupons: record(string2(), array(string2())).optional().describe("Deprecated: use SubscriptionCoupons instead."),
|
|
61783
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"),
|
|
61784
62042
|
lookup_key: string2().optional(),
|
|
61785
62043
|
metadata: record(string2(), string2()).optional(),
|
|
@@ -61792,6 +62050,8 @@ and must be same as what you provided as external_id while creating the customer
|
|
|
61792
62050
|
plan_id: string2(),
|
|
61793
62051
|
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
61794
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.`),
|
|
61795
62055
|
subscription_status: SubscriptionStatus$zodSchema.optional(),
|
|
61796
62056
|
tax_rate_overrides: array(TaxRateOverride$zodSchema).optional().describe("tax_rate_overrides is the tax rate overrides\tto be applied to the subscription"),
|
|
61797
62057
|
trial_period_days: int().optional().describe(`TrialPeriodDays: nil = inherit trial length from plan recurring-fixed prices (must be uniform).
|
|
@@ -61919,6 +62179,7 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61919
62179
|
init_pricetype();
|
|
61920
62180
|
init_status();
|
|
61921
62181
|
init_subscriptionlineitementitytype();
|
|
62182
|
+
init_timeofdaybucket();
|
|
61922
62183
|
SubscriptionLineItemResponse$zodSchema = object({
|
|
61923
62184
|
addon_association_id: string2().optional(),
|
|
61924
62185
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
@@ -61927,6 +62188,7 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61927
62188
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
61928
62189
|
commitment_overage_factor: string2().optional(),
|
|
61929
62190
|
commitment_quantity: string2().optional(),
|
|
62191
|
+
commitment_time_buckets: array(TimeOfDayBucket$zodSchema).optional(),
|
|
61930
62192
|
commitment_true_up_enabled: boolean2().optional(),
|
|
61931
62193
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
61932
62194
|
commitment_windowed: boolean2().optional(),
|
|
@@ -62470,6 +62732,32 @@ Use when applying a plan change (e.g. upgrade or downgrade). Executes proration
|
|
|
62470
62732
|
};
|
|
62471
62733
|
});
|
|
62472
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
|
+
end_date: exports_iso.datetime({ offset: true }).optional().describe("Optional. When the coupon association ends."),
|
|
62755
|
+
start_date: exports_iso.datetime({ offset: true }).optional().describe("Optional. When the coupon association starts; defaults to now."),
|
|
62756
|
+
subscription_id: string2().optional().describe("Optional. Apply at subscription level. Mutually exclusive with SubscriptionLineItemID."),
|
|
62757
|
+
subscription_line_item_id: string2().optional().describe("Optional. Apply at a specific line item. Mutually exclusive with SubscriptionID.")
|
|
62758
|
+
});
|
|
62759
|
+
});
|
|
62760
|
+
|
|
62473
62761
|
// src/models/groupedinvoicingaction.ts
|
|
62474
62762
|
var GroupedInvoicingAction$zodSchema;
|
|
62475
62763
|
var init_groupedinvoicingaction = __esm(() => {
|
|
@@ -62492,12 +62780,25 @@ var init_submodifygroupedinvoicingparams = __esm(() => {
|
|
|
62492
62780
|
});
|
|
62493
62781
|
});
|
|
62494
62782
|
|
|
62783
|
+
// src/models/inheritanceaction.ts
|
|
62784
|
+
var InheritanceAction$zodSchema;
|
|
62785
|
+
var init_inheritanceaction = __esm(() => {
|
|
62786
|
+
init_zod();
|
|
62787
|
+
InheritanceAction$zodSchema = _enum([
|
|
62788
|
+
"add",
|
|
62789
|
+
"remove"
|
|
62790
|
+
]);
|
|
62791
|
+
});
|
|
62792
|
+
|
|
62495
62793
|
// src/models/submodifyinheritancerequest.ts
|
|
62496
62794
|
var SubModifyInheritanceRequest$zodSchema;
|
|
62497
62795
|
var init_submodifyinheritancerequest = __esm(() => {
|
|
62498
62796
|
init_zod();
|
|
62797
|
+
init_inheritanceaction();
|
|
62499
62798
|
SubModifyInheritanceRequest$zodSchema = object({
|
|
62500
|
-
|
|
62799
|
+
action: InheritanceAction$zodSchema.optional(),
|
|
62800
|
+
external_customer_ids_to_inherit_subscription: array(string2()).optional().describe('ExternalCustomerIDsToInheritSubscription is used for action="add".'),
|
|
62801
|
+
external_customer_ids_to_remove: array(string2()).optional().describe('ExternalCustomerIDsToRemove is used for action="remove".')
|
|
62501
62802
|
});
|
|
62502
62803
|
});
|
|
62503
62804
|
|
|
@@ -62523,6 +62824,29 @@ var init_submodifyquantitychangerequest = __esm(() => {
|
|
|
62523
62824
|
});
|
|
62524
62825
|
});
|
|
62525
62826
|
|
|
62827
|
+
// src/models/submodifytaxaction.ts
|
|
62828
|
+
var SubModifyTaxAction$zodSchema;
|
|
62829
|
+
var init_submodifytaxaction = __esm(() => {
|
|
62830
|
+
init_zod();
|
|
62831
|
+
SubModifyTaxAction$zodSchema = _enum([
|
|
62832
|
+
"add",
|
|
62833
|
+
"remove"
|
|
62834
|
+
]);
|
|
62835
|
+
});
|
|
62836
|
+
|
|
62837
|
+
// src/models/submodifytaxparams.ts
|
|
62838
|
+
var SubModifyTaxParams$zodSchema;
|
|
62839
|
+
var init_submodifytaxparams = __esm(() => {
|
|
62840
|
+
init_zod();
|
|
62841
|
+
init_submodifytaxaction();
|
|
62842
|
+
SubModifyTaxParams$zodSchema = object({
|
|
62843
|
+
action: SubModifyTaxAction$zodSchema,
|
|
62844
|
+
association_id: string2().optional().describe('Required when action="remove". ID of the TaxAssociation to soft-delete.'),
|
|
62845
|
+
effective_date: exports_iso.datetime({ offset: true }).optional().describe("Optional. When to apply the change; defaults to now if omitted."),
|
|
62846
|
+
tax_rate_id: string2().optional().describe('Required when action="add". ID of the active tax rate to attach.')
|
|
62847
|
+
});
|
|
62848
|
+
});
|
|
62849
|
+
|
|
62526
62850
|
// src/models/trialendaction.ts
|
|
62527
62851
|
var TrialEndAction$zodSchema;
|
|
62528
62852
|
var init_trialendaction = __esm(() => {
|
|
@@ -62552,7 +62876,9 @@ var init_subscriptionmodifytype = __esm(() => {
|
|
|
62552
62876
|
"inheritance",
|
|
62553
62877
|
"quantity_change",
|
|
62554
62878
|
"grouped_invoicing",
|
|
62555
|
-
"trial_end"
|
|
62879
|
+
"trial_end",
|
|
62880
|
+
"coupon",
|
|
62881
|
+
"tax"
|
|
62556
62882
|
]);
|
|
62557
62883
|
});
|
|
62558
62884
|
|
|
@@ -62560,15 +62886,19 @@ var init_subscriptionmodifytype = __esm(() => {
|
|
|
62560
62886
|
var ExecuteSubscriptionModifyRequest$zodSchema;
|
|
62561
62887
|
var init_executesubscriptionmodifyrequest = __esm(() => {
|
|
62562
62888
|
init_zod();
|
|
62889
|
+
init_submodifycouponparams();
|
|
62563
62890
|
init_submodifygroupedinvoicingparams();
|
|
62564
62891
|
init_submodifyinheritancerequest();
|
|
62565
62892
|
init_submodifyquantitychangerequest();
|
|
62893
|
+
init_submodifytaxparams();
|
|
62566
62894
|
init_submodifytrialendrequest();
|
|
62567
62895
|
init_subscriptionmodifytype();
|
|
62568
62896
|
ExecuteSubscriptionModifyRequest$zodSchema = object({
|
|
62897
|
+
coupon_params: SubModifyCouponParams$zodSchema.optional(),
|
|
62569
62898
|
grouped_invoicing_params: SubModifyGroupedInvoicingParams$zodSchema.optional(),
|
|
62570
62899
|
inheritance_params: SubModifyInheritanceRequest$zodSchema.optional(),
|
|
62571
62900
|
quantity_change_params: SubModifyQuantityChangeRequest$zodSchema.optional(),
|
|
62901
|
+
tax_params: SubModifyTaxParams$zodSchema.optional(),
|
|
62572
62902
|
trial_end_params: SubModifyTrialEndRequest$zodSchema.optional(),
|
|
62573
62903
|
type: SubscriptionModifyType$zodSchema
|
|
62574
62904
|
});
|
|
@@ -62697,6 +63027,7 @@ var init_userresponse = __esm(() => {
|
|
|
62697
63027
|
email: string2().optional().describe("Empty for service accounts"),
|
|
62698
63028
|
id: string2().optional(),
|
|
62699
63029
|
metadata: record(string2(), string2()).optional(),
|
|
63030
|
+
name: string2().optional(),
|
|
62700
63031
|
roles: array(string2()).optional(),
|
|
62701
63032
|
tenant: TenantResponse$zodSchema.optional(),
|
|
62702
63033
|
type: UserType$zodSchema.optional()
|
|
@@ -63088,7 +63419,7 @@ var init_subscriptionsExecuteSubscriptionModify2 = __esm(() => {
|
|
|
63088
63419
|
name: "execute-subscription-modify",
|
|
63089
63420
|
description: `Execute subscription modification
|
|
63090
63421
|
|
|
63091
|
-
Execute a mid-cycle subscription modification (inheritance
|
|
63422
|
+
Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax).`,
|
|
63092
63423
|
scopes: ["write"],
|
|
63093
63424
|
annotations: {
|
|
63094
63425
|
title: "",
|
|
@@ -64739,7 +65070,7 @@ var init_subscriptionsPreviewSubscriptionModify2 = __esm(() => {
|
|
|
64739
65070
|
name: "preview-subscription-modify",
|
|
64740
65071
|
description: `Preview subscription modification
|
|
64741
65072
|
|
|
64742
|
-
Preview the impact of a mid-cycle subscription modification without committing changes.`,
|
|
65073
|
+
Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes.`,
|
|
64743
65074
|
scopes: ["read"],
|
|
64744
65075
|
annotations: {
|
|
64745
65076
|
title: "",
|
|
@@ -65339,6 +65670,7 @@ var init_updatesubscriptionlineitemrequest = __esm(() => {
|
|
|
65339
65670
|
init_billingmodel();
|
|
65340
65671
|
init_billingperiod();
|
|
65341
65672
|
init_billingtier();
|
|
65673
|
+
init_commitmentbucketrequest();
|
|
65342
65674
|
init_commitmenttype();
|
|
65343
65675
|
init_createpricetier();
|
|
65344
65676
|
init_pricetransformquantity();
|
|
@@ -65349,6 +65681,7 @@ var init_updatesubscriptionlineitemrequest = __esm(() => {
|
|
|
65349
65681
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
65350
65682
|
commitment_overage_factor: number2().optional(),
|
|
65351
65683
|
commitment_quantity: number2().optional(),
|
|
65684
|
+
commitment_time_buckets: array(CommitmentBucketRequest$zodSchema).optional().describe("Pointer so an explicit empty array can clear existing buckets (omission keeps them)."),
|
|
65352
65685
|
commitment_true_up_enabled: boolean2().optional(),
|
|
65353
65686
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
65354
65687
|
commitment_windowed: boolean2().optional(),
|
|
@@ -65496,7 +65829,7 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
65496
65829
|
function createMCPServer(deps) {
|
|
65497
65830
|
const server = new McpServer({
|
|
65498
65831
|
name: "Flexprice",
|
|
65499
|
-
version: "2.1.
|
|
65832
|
+
version: "2.1.19"
|
|
65500
65833
|
});
|
|
65501
65834
|
const getClient = deps.getSDK || (() => new FlexpriceCore({
|
|
65502
65835
|
security: deps.security,
|
|
@@ -66053,13 +66386,13 @@ Use when adding a new charge or seat to a subscription (e.g. extra seat or one-t
|
|
|
66053
66386
|
name: "execute-subscription-modify",
|
|
66054
66387
|
description: `Execute subscription modification
|
|
66055
66388
|
|
|
66056
|
-
Execute a mid-cycle subscription modification (inheritance
|
|
66389
|
+
Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax).`
|
|
66057
66390
|
},
|
|
66058
66391
|
{
|
|
66059
66392
|
name: "preview-subscription-modify",
|
|
66060
66393
|
description: `Preview subscription modification
|
|
66061
66394
|
|
|
66062
|
-
Preview the impact of a mid-cycle subscription modification without committing changes.`
|
|
66395
|
+
Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes.`
|
|
66063
66396
|
},
|
|
66064
66397
|
{
|
|
66065
66398
|
name: "get-subscription-v2",
|
|
@@ -69646,7 +69979,7 @@ var routes = buildRouteMap({
|
|
|
69646
69979
|
var app = buildApplication(routes, {
|
|
69647
69980
|
name: "mcp",
|
|
69648
69981
|
versionInfo: {
|
|
69649
|
-
currentVersion: "2.1.
|
|
69982
|
+
currentVersion: "2.1.19"
|
|
69650
69983
|
}
|
|
69651
69984
|
});
|
|
69652
69985
|
run(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -69654,5 +69987,5 @@ export {
|
|
|
69654
69987
|
app
|
|
69655
69988
|
};
|
|
69656
69989
|
|
|
69657
|
-
//# debugId=
|
|
69990
|
+
//# debugId=9238BBBC4F8F163B64756E2164756E21
|
|
69658
69991
|
//# sourceMappingURL=mcp-server.js.map
|