@flexprice/mcp-server 2.0.15 → 2.0.16
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 +119 -113
- package/bin/mcp-server.js.map +10 -10
- package/bun.lock +3 -3
- package/esm/funcs/invoicesGetInvoicePdf.d.ts +1 -1
- package/esm/funcs/invoicesGetInvoicePdf.js +2 -1
- package/esm/funcs/invoicesGetInvoicePdf.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools/invoicesGetInvoicePdf.js +1 -1
- package/esm/mcp-server/tools/invoicesGetInvoicePdf.js.map +1 -1
- package/esm/models/getinvoicepdfop.d.ts +1 -0
- package/esm/models/getinvoicepdfop.d.ts.map +1 -1
- package/esm/models/getinvoicepdfop.js +1 -0
- package/esm/models/getinvoicepdfop.js.map +1 -1
- package/esm/tool-names.js +1 -1
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/src/funcs/invoicesGetInvoicePdf.ts +2 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/invoicesGetInvoicePdf.ts +1 -1
- package/src/models/getinvoicepdfop.ts +8 -1
- package/src/tool-names.ts +1 -1
package/bin/mcp-server.js
CHANGED
|
@@ -27005,7 +27005,6 @@ var require_dist = __commonJS((exports) => {
|
|
|
27005
27005
|
var ID_START = /^[$_\p{ID_Start}]$/u;
|
|
27006
27006
|
var ID_CONTINUE = /^[$\u200c\u200d\p{ID_Continue}]$/u;
|
|
27007
27007
|
var ID = /^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u;
|
|
27008
|
-
var SIMPLE_TOKENS = "{}()[]+?!";
|
|
27009
27008
|
function escapeText(str) {
|
|
27010
27009
|
return str.replace(/[{}()\[\]+?!:*\\]/g, "\\$&");
|
|
27011
27010
|
}
|
|
@@ -27035,96 +27034,90 @@ var require_dist = __commonJS((exports) => {
|
|
|
27035
27034
|
function parse5(str, options = {}) {
|
|
27036
27035
|
const { encodePath = NOOP_VALUE } = options;
|
|
27037
27036
|
const chars = [...str];
|
|
27038
|
-
const tokens = [];
|
|
27039
27037
|
let index = 0;
|
|
27040
|
-
|
|
27041
|
-
function name() {
|
|
27042
|
-
let value = "";
|
|
27043
|
-
if (ID_START.test(chars[index])) {
|
|
27044
|
-
do {
|
|
27045
|
-
value += chars[index++];
|
|
27046
|
-
} while (ID_CONTINUE.test(chars[index]));
|
|
27047
|
-
} else if (chars[index] === '"') {
|
|
27048
|
-
let quoteStart = index;
|
|
27049
|
-
while (index < chars.length) {
|
|
27050
|
-
if (chars[++index] === '"') {
|
|
27051
|
-
index++;
|
|
27052
|
-
quoteStart = 0;
|
|
27053
|
-
break;
|
|
27054
|
-
}
|
|
27055
|
-
if (chars[index] === "\\")
|
|
27056
|
-
index++;
|
|
27057
|
-
value += chars[index];
|
|
27058
|
-
}
|
|
27059
|
-
if (quoteStart) {
|
|
27060
|
-
throw new PathError(`Unterminated quote at index ${quoteStart}`, str);
|
|
27061
|
-
}
|
|
27062
|
-
}
|
|
27063
|
-
if (!value) {
|
|
27064
|
-
throw new PathError(`Missing parameter name at index ${index}`, str);
|
|
27065
|
-
}
|
|
27066
|
-
return value;
|
|
27067
|
-
}
|
|
27068
|
-
while (index < chars.length) {
|
|
27069
|
-
const value = chars[index++];
|
|
27070
|
-
if (SIMPLE_TOKENS.includes(value)) {
|
|
27071
|
-
tokens.push({ type: value, index, value });
|
|
27072
|
-
} else if (value === "\\") {
|
|
27073
|
-
tokens.push({ type: "escape", index, value: chars[index++] });
|
|
27074
|
-
} else if (value === ":") {
|
|
27075
|
-
tokens.push({ type: "param", index, value: name() });
|
|
27076
|
-
} else if (value === "*") {
|
|
27077
|
-
tokens.push({ type: "wildcard", index, value: name() });
|
|
27078
|
-
} else {
|
|
27079
|
-
tokens.push({ type: "char", index, value });
|
|
27080
|
-
}
|
|
27081
|
-
}
|
|
27082
|
-
tokens.push({ type: "end", index, value: "" });
|
|
27083
|
-
function consumeUntil(endType) {
|
|
27038
|
+
function consumeUntil(end) {
|
|
27084
27039
|
const output = [];
|
|
27085
|
-
|
|
27086
|
-
|
|
27087
|
-
if (
|
|
27088
|
-
|
|
27089
|
-
|
|
27090
|
-
|
|
27091
|
-
|
|
27092
|
-
|
|
27093
|
-
|
|
27094
|
-
|
|
27040
|
+
let path = "";
|
|
27041
|
+
function writePath() {
|
|
27042
|
+
if (!path)
|
|
27043
|
+
return;
|
|
27044
|
+
output.push({
|
|
27045
|
+
type: "text",
|
|
27046
|
+
value: encodePath(path)
|
|
27047
|
+
});
|
|
27048
|
+
path = "";
|
|
27049
|
+
}
|
|
27050
|
+
while (index < chars.length) {
|
|
27051
|
+
const value = chars[index++];
|
|
27052
|
+
if (value === end) {
|
|
27053
|
+
writePath();
|
|
27054
|
+
return output;
|
|
27055
|
+
}
|
|
27056
|
+
if (value === "\\") {
|
|
27057
|
+
if (index === chars.length) {
|
|
27058
|
+
throw new PathError(`Unexpected end after \\ at index ${index}`, str);
|
|
27095
27059
|
}
|
|
27096
|
-
|
|
27097
|
-
type: "text",
|
|
27098
|
-
value: encodePath(path)
|
|
27099
|
-
});
|
|
27060
|
+
path += chars[index++];
|
|
27100
27061
|
continue;
|
|
27101
27062
|
}
|
|
27102
|
-
if (
|
|
27103
|
-
|
|
27104
|
-
|
|
27105
|
-
|
|
27106
|
-
|
|
27063
|
+
if (value === ":" || value === "*") {
|
|
27064
|
+
const type = value === ":" ? "param" : "wildcard";
|
|
27065
|
+
let name = "";
|
|
27066
|
+
if (ID_START.test(chars[index])) {
|
|
27067
|
+
do {
|
|
27068
|
+
name += chars[index++];
|
|
27069
|
+
} while (ID_CONTINUE.test(chars[index]));
|
|
27070
|
+
} else if (chars[index] === '"') {
|
|
27071
|
+
let quoteStart = index;
|
|
27072
|
+
while (index < chars.length) {
|
|
27073
|
+
if (chars[++index] === '"') {
|
|
27074
|
+
index++;
|
|
27075
|
+
quoteStart = 0;
|
|
27076
|
+
break;
|
|
27077
|
+
}
|
|
27078
|
+
if (chars[index] === "\\")
|
|
27079
|
+
index++;
|
|
27080
|
+
name += chars[index];
|
|
27081
|
+
}
|
|
27082
|
+
if (quoteStart) {
|
|
27083
|
+
throw new PathError(`Unterminated quote at index ${quoteStart}`, str);
|
|
27084
|
+
}
|
|
27085
|
+
}
|
|
27086
|
+
if (!name) {
|
|
27087
|
+
throw new PathError(`Missing parameter name at index ${index}`, str);
|
|
27088
|
+
}
|
|
27089
|
+
writePath();
|
|
27090
|
+
output.push({ type, name });
|
|
27107
27091
|
continue;
|
|
27108
27092
|
}
|
|
27109
|
-
if (
|
|
27093
|
+
if (value === "{") {
|
|
27094
|
+
writePath();
|
|
27110
27095
|
output.push({
|
|
27111
27096
|
type: "group",
|
|
27112
27097
|
tokens: consumeUntil("}")
|
|
27113
27098
|
});
|
|
27114
27099
|
continue;
|
|
27115
27100
|
}
|
|
27116
|
-
|
|
27101
|
+
if (value === "}" || value === "(" || value === ")" || value === "[" || value === "]" || value === "+" || value === "?" || value === "!") {
|
|
27102
|
+
throw new PathError(`Unexpected ${value} at index ${index - 1}`, str);
|
|
27103
|
+
}
|
|
27104
|
+
path += value;
|
|
27117
27105
|
}
|
|
27106
|
+
if (end) {
|
|
27107
|
+
throw new PathError(`Unexpected end at index ${index}, expected ${end}`, str);
|
|
27108
|
+
}
|
|
27109
|
+
writePath();
|
|
27118
27110
|
return output;
|
|
27119
27111
|
}
|
|
27120
|
-
return new TokenData(consumeUntil("
|
|
27112
|
+
return new TokenData(consumeUntil(""), str);
|
|
27121
27113
|
}
|
|
27122
27114
|
function compile(path, options = {}) {
|
|
27123
27115
|
const { encode: encode2 = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
|
|
27124
27116
|
const data = typeof path === "object" ? path : parse5(path, options);
|
|
27125
27117
|
const fn = tokensToFunction(data.tokens, delimiter, encode2);
|
|
27126
27118
|
return function path2(params = {}) {
|
|
27127
|
-
const
|
|
27119
|
+
const missing = [];
|
|
27120
|
+
const path3 = fn(params, missing);
|
|
27128
27121
|
if (missing.length) {
|
|
27129
27122
|
throw new TypeError(`Missing parameters: ${missing.join(", ")}`);
|
|
27130
27123
|
}
|
|
@@ -27133,55 +27126,61 @@ var require_dist = __commonJS((exports) => {
|
|
|
27133
27126
|
}
|
|
27134
27127
|
function tokensToFunction(tokens, delimiter, encode2) {
|
|
27135
27128
|
const encoders = tokens.map((token) => tokenToFunction(token, delimiter, encode2));
|
|
27136
|
-
return (data) => {
|
|
27137
|
-
|
|
27129
|
+
return (data, missing) => {
|
|
27130
|
+
let result = "";
|
|
27138
27131
|
for (const encoder of encoders) {
|
|
27139
|
-
|
|
27140
|
-
result[0] += value;
|
|
27141
|
-
result.push(...extras);
|
|
27132
|
+
result += encoder(data, missing);
|
|
27142
27133
|
}
|
|
27143
27134
|
return result;
|
|
27144
27135
|
};
|
|
27145
27136
|
}
|
|
27146
27137
|
function tokenToFunction(token, delimiter, encode2) {
|
|
27147
27138
|
if (token.type === "text")
|
|
27148
|
-
return () =>
|
|
27139
|
+
return () => token.value;
|
|
27149
27140
|
if (token.type === "group") {
|
|
27150
27141
|
const fn = tokensToFunction(token.tokens, delimiter, encode2);
|
|
27151
|
-
return (data) => {
|
|
27152
|
-
const
|
|
27153
|
-
|
|
27154
|
-
|
|
27155
|
-
|
|
27142
|
+
return (data, missing) => {
|
|
27143
|
+
const len = missing.length;
|
|
27144
|
+
const value = fn(data, missing);
|
|
27145
|
+
if (missing.length === len)
|
|
27146
|
+
return value;
|
|
27147
|
+
missing.length = len;
|
|
27148
|
+
return "";
|
|
27156
27149
|
};
|
|
27157
27150
|
}
|
|
27158
27151
|
const encodeValue = encode2 || NOOP_VALUE;
|
|
27159
27152
|
if (token.type === "wildcard" && encode2 !== false) {
|
|
27160
|
-
return (data) => {
|
|
27153
|
+
return (data, missing) => {
|
|
27161
27154
|
const value = data[token.name];
|
|
27162
|
-
if (value == null)
|
|
27163
|
-
|
|
27155
|
+
if (value == null) {
|
|
27156
|
+
missing.push(token.name);
|
|
27157
|
+
return "";
|
|
27158
|
+
}
|
|
27164
27159
|
if (!Array.isArray(value) || value.length === 0) {
|
|
27165
27160
|
throw new TypeError(`Expected "${token.name}" to be a non-empty array`);
|
|
27166
27161
|
}
|
|
27167
|
-
|
|
27168
|
-
|
|
27169
|
-
|
|
27170
|
-
|
|
27171
|
-
|
|
27172
|
-
|
|
27173
|
-
|
|
27174
|
-
|
|
27162
|
+
let result = "";
|
|
27163
|
+
for (let i = 0;i < value.length; i++) {
|
|
27164
|
+
if (typeof value[i] !== "string") {
|
|
27165
|
+
throw new TypeError(`Expected "${token.name}/${i}" to be a string`);
|
|
27166
|
+
}
|
|
27167
|
+
if (i > 0)
|
|
27168
|
+
result += delimiter;
|
|
27169
|
+
result += encodeValue(value[i]);
|
|
27170
|
+
}
|
|
27171
|
+
return result;
|
|
27175
27172
|
};
|
|
27176
27173
|
}
|
|
27177
|
-
return (data) => {
|
|
27174
|
+
return (data, missing) => {
|
|
27178
27175
|
const value = data[token.name];
|
|
27179
|
-
if (value == null)
|
|
27180
|
-
|
|
27176
|
+
if (value == null) {
|
|
27177
|
+
missing.push(token.name);
|
|
27178
|
+
return "";
|
|
27179
|
+
}
|
|
27181
27180
|
if (typeof value !== "string") {
|
|
27182
27181
|
throw new TypeError(`Expected "${token.name}" to be a string`);
|
|
27183
27182
|
}
|
|
27184
|
-
return
|
|
27183
|
+
return encodeValue(value);
|
|
27185
27184
|
};
|
|
27186
27185
|
}
|
|
27187
27186
|
function match(path, options = {}) {
|
|
@@ -27213,24 +27212,27 @@ var require_dist = __commonJS((exports) => {
|
|
|
27213
27212
|
function pathToRegexp(path, options = {}) {
|
|
27214
27213
|
const { delimiter = DEFAULT_DELIMITER, end = true, sensitive = false, trailing = true } = options;
|
|
27215
27214
|
const keys = [];
|
|
27216
|
-
|
|
27217
|
-
const paths = [path];
|
|
27215
|
+
let source = "";
|
|
27218
27216
|
let combinations = 0;
|
|
27219
|
-
|
|
27220
|
-
const path2 = paths.shift();
|
|
27217
|
+
function process3(path2) {
|
|
27221
27218
|
if (Array.isArray(path2)) {
|
|
27222
|
-
|
|
27223
|
-
|
|
27219
|
+
for (const p of path2)
|
|
27220
|
+
process3(p);
|
|
27221
|
+
return;
|
|
27224
27222
|
}
|
|
27225
27223
|
const data = typeof path2 === "object" ? path2 : parse5(path2, options);
|
|
27226
27224
|
flatten(data.tokens, 0, [], (tokens) => {
|
|
27227
|
-
if (combinations
|
|
27225
|
+
if (combinations >= 256) {
|
|
27228
27226
|
throw new PathError("Too many path combinations", data.originalPath);
|
|
27229
27227
|
}
|
|
27230
|
-
|
|
27228
|
+
if (combinations > 0)
|
|
27229
|
+
source += "|";
|
|
27230
|
+
source += toRegExpSource(tokens, delimiter, keys, data.originalPath);
|
|
27231
|
+
combinations++;
|
|
27231
27232
|
});
|
|
27232
27233
|
}
|
|
27233
|
-
|
|
27234
|
+
process3(path);
|
|
27235
|
+
let pattern = `^(?:${source})`;
|
|
27234
27236
|
if (trailing)
|
|
27235
27237
|
pattern += "(?:" + escape2(delimiter) + "$)?";
|
|
27236
27238
|
pattern += end ? "$" : "(?=" + escape2(delimiter) + "|$)";
|
|
@@ -27240,7 +27242,9 @@ var require_dist = __commonJS((exports) => {
|
|
|
27240
27242
|
while (index < tokens.length) {
|
|
27241
27243
|
const token = tokens[index++];
|
|
27242
27244
|
if (token.type === "group") {
|
|
27243
|
-
|
|
27245
|
+
const len = result.length;
|
|
27246
|
+
flatten(token.tokens, 0, result, (seq) => flatten(tokens, index, seq, callback));
|
|
27247
|
+
result.length = len;
|
|
27244
27248
|
continue;
|
|
27245
27249
|
}
|
|
27246
27250
|
result.push(token);
|
|
@@ -50501,9 +50505,9 @@ var init_config = __esm(() => {
|
|
|
50501
50505
|
SDK_METADATA = {
|
|
50502
50506
|
language: "typescript",
|
|
50503
50507
|
openapiDocVersion: "1.0",
|
|
50504
|
-
sdkVersion: "2.0.
|
|
50505
|
-
genVersion: "2.879.
|
|
50506
|
-
userAgent: "speakeasy-sdk/mcp-typescript 2.0.
|
|
50508
|
+
sdkVersion: "2.0.16",
|
|
50509
|
+
genVersion: "2.879.6",
|
|
50510
|
+
userAgent: "speakeasy-sdk/mcp-typescript 2.0.16 2.879.6 1.0 @flexprice/mcp-server"
|
|
50507
50511
|
};
|
|
50508
50512
|
});
|
|
50509
50513
|
|
|
@@ -57014,6 +57018,7 @@ var init_getinvoicepdfop = __esm(() => {
|
|
|
57014
57018
|
init_zod();
|
|
57015
57019
|
init_base64();
|
|
57016
57020
|
GetInvoicePdfRequest$zodSchema = object({
|
|
57021
|
+
force_generate: boolean2().describe("Force regeneration of the PDF even if one already exists in S3 (default: false). Note: force_generate has no effect if invoice_pdf_url is already set on the invoice.").optional(),
|
|
57017
57022
|
id: string2().describe("Invoice ID"),
|
|
57018
57023
|
url: boolean2().describe("Return presigned URL from s3 instead of PDF").optional()
|
|
57019
57024
|
});
|
|
@@ -57042,6 +57047,7 @@ async function $do23(client$, request, options) {
|
|
|
57042
57047
|
};
|
|
57043
57048
|
const path$ = pathToFunc("/invoices/{id}/pdf")(pathParams$);
|
|
57044
57049
|
const query$ = encodeFormQuery({
|
|
57050
|
+
force_generate: payload$.force_generate,
|
|
57045
57051
|
url: payload$.url
|
|
57046
57052
|
});
|
|
57047
57053
|
const headers$ = new Headers(compactMap({
|
|
@@ -57118,7 +57124,7 @@ var init_invoicesGetInvoicePdf2 = __esm(() => {
|
|
|
57118
57124
|
name: "get-invoice-pdf",
|
|
57119
57125
|
description: `Get invoice PDF
|
|
57120
57126
|
|
|
57121
|
-
Use when delivering an invoice PDF to the customer (e.g. email attachment or download). Use url=true for a presigned URL instead of binary.`,
|
|
57127
|
+
Use when delivering an invoice PDF to the customer (e.g. email attachment or download). Use url=true for a presigned URL instead of binary. Use force_generate=true to regenerate and re-upload the PDF even if one already exists in S3.`,
|
|
57122
57128
|
scopes: ["read"],
|
|
57123
57129
|
annotations: {
|
|
57124
57130
|
title: "",
|
|
@@ -64326,7 +64332,7 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
64326
64332
|
function createMCPServer(deps) {
|
|
64327
64333
|
const server = new McpServer({
|
|
64328
64334
|
name: "Flexprice",
|
|
64329
|
-
version: "2.0.
|
|
64335
|
+
version: "2.0.16"
|
|
64330
64336
|
});
|
|
64331
64337
|
const getClient = deps.getSDK || (() => new FlexpriceCore({
|
|
64332
64338
|
security: deps.security,
|
|
@@ -64619,7 +64625,7 @@ Use when paying an invoice with the customer's wallet balance (e.g. prepaid cred
|
|
|
64619
64625
|
name: "get-invoice-pdf",
|
|
64620
64626
|
description: `Get invoice PDF
|
|
64621
64627
|
|
|
64622
|
-
Use when delivering an invoice PDF to the customer (e.g. email attachment or download). Use url=true for a presigned URL instead of binary.`
|
|
64628
|
+
Use when delivering an invoice PDF to the customer (e.g. email attachment or download). Use url=true for a presigned URL instead of binary. Use force_generate=true to regenerate and re-upload the PDF even if one already exists in S3.`
|
|
64623
64629
|
},
|
|
64624
64630
|
{
|
|
64625
64631
|
name: "recalculate-invoice",
|
|
@@ -68465,7 +68471,7 @@ var routes = buildRouteMap({
|
|
|
68465
68471
|
var app = buildApplication(routes, {
|
|
68466
68472
|
name: "mcp",
|
|
68467
68473
|
versionInfo: {
|
|
68468
|
-
currentVersion: "2.0.
|
|
68474
|
+
currentVersion: "2.0.16"
|
|
68469
68475
|
}
|
|
68470
68476
|
});
|
|
68471
68477
|
run(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -68473,5 +68479,5 @@ export {
|
|
|
68473
68479
|
app
|
|
68474
68480
|
};
|
|
68475
68481
|
|
|
68476
|
-
//# debugId=
|
|
68482
|
+
//# debugId=C9C581DC7DE8B27B64756E2164756E21
|
|
68477
68483
|
//# sourceMappingURL=mcp-server.js.map
|