@flexprice/mcp-server 2.0.0 → 2.0.2
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 +343 -175
- package/bin/mcp-server.js.map +25 -21
- package/bun.lock +14 -14
- package/esm/funcs/invoicesRecalculateInvoice.d.ts +2 -2
- package/esm/funcs/invoicesRecalculateInvoice.js +3 -7
- package/esm/funcs/invoicesRecalculateInvoice.js.map +1 -1
- package/esm/funcs/invoicesRecalculateInvoiceV2.d.ts +16 -0
- package/esm/funcs/invoicesRecalculateInvoiceV2.d.ts.map +1 -0
- package/esm/funcs/invoicesRecalculateInvoiceV2.js +91 -0
- package/esm/funcs/invoicesRecalculateInvoiceV2.js.map +1 -0
- package/esm/landing-page.js +9 -9
- package/esm/landing-page.js.map +1 -1
- package/esm/lib/config.d.ts +6 -6
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +11 -4
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/sdks.d.ts +1 -1
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +1 -1
- package/esm/lib/sdks.js.map +1 -1
- package/esm/mcp-server/cli/serve/command.js +1 -1
- package/esm/mcp-server/cli/serve/command.js.map +1 -1
- package/esm/mcp-server/cli/start/command.js +1 -1
- package/esm/mcp-server/cli/start/command.js.map +1 -1
- package/esm/mcp-server/flags.d.ts +1 -1
- package/esm/mcp-server/flags.d.ts.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +3 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/invoicesRecalculateInvoice.js +2 -2
- package/esm/mcp-server/tools/invoicesRecalculateInvoice.js.map +1 -1
- package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.d.ts +7 -0
- package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.d.ts.map +1 -0
- package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.js +34 -0
- package/esm/mcp-server/tools/invoicesRecalculateInvoiceV2.js.map +1 -0
- package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
- package/esm/models/dtofeatureresponse.d.ts +2 -0
- package/esm/models/dtofeatureresponse.d.ts.map +1 -1
- package/esm/models/dtofeatureresponse.js +2 -0
- package/esm/models/dtofeatureresponse.js.map +1 -1
- package/esm/models/dtoinvoiceresponse.d.ts +1 -0
- package/esm/models/dtoinvoiceresponse.d.ts.map +1 -1
- package/esm/models/dtoinvoiceresponse.js +1 -0
- package/esm/models/dtoinvoiceresponse.js.map +1 -1
- package/esm/models/dtousageanalyticitem.d.ts +3 -0
- package/esm/models/dtousageanalyticitem.d.ts.map +1 -1
- package/esm/models/dtousageanalyticitem.js +3 -0
- package/esm/models/dtousageanalyticitem.js.map +1 -1
- package/esm/models/filtercondition.d.ts +2 -2
- package/esm/models/filtercondition.d.ts.map +1 -1
- package/esm/models/filtercondition.js +2 -2
- package/esm/models/filtercondition.js.map +1 -1
- package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.d.ts +2 -0
- package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.d.ts.map +1 -1
- package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.js +2 -0
- package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.js.map +1 -1
- package/esm/models/meteraggregation.d.ts +1 -0
- package/esm/models/meteraggregation.d.ts.map +1 -1
- package/esm/models/meteraggregation.js +1 -0
- package/esm/models/meteraggregation.js.map +1 -1
- package/esm/models/recalculateinvoiceop.d.ts +0 -1
- package/esm/models/recalculateinvoiceop.d.ts.map +1 -1
- package/esm/models/recalculateinvoiceop.js +0 -1
- package/esm/models/recalculateinvoiceop.js.map +1 -1
- package/esm/models/recalculateinvoicev2op.d.ts +11 -0
- package/esm/models/recalculateinvoicev2op.d.ts.map +1 -0
- package/esm/models/recalculateinvoicev2op.js +15 -0
- package/esm/models/recalculateinvoicev2op.js.map +1 -0
- package/esm/models/reportingunit.d.ts +8 -0
- package/esm/models/reportingunit.d.ts.map +1 -0
- package/esm/models/reportingunit.js +10 -0
- package/esm/models/reportingunit.js.map +1 -0
- package/esm/models/value.d.ts +10 -0
- package/esm/models/value.d.ts.map +1 -0
- package/esm/models/{githubcomflexpriceflexpriceinternaltypesvalue.js → value.js} +2 -2
- package/esm/models/value.js.map +1 -0
- package/esm/models/windowsize.d.ts +2 -2
- package/esm/models/windowsize.js +2 -2
- package/esm/models/windowsize.js.map +1 -1
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +5 -1
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/manifest.json +17 -11
- package/package.json +1 -1
- package/src/funcs/invoicesRecalculateInvoice.ts +3 -7
- package/src/funcs/invoicesRecalculateInvoiceV2.ts +156 -0
- package/src/landing-page.ts +9 -9
- package/src/lib/config.ts +13 -6
- package/src/lib/sdks.ts +1 -1
- package/src/mcp-server/cli/serve/command.ts +1 -1
- package/src/mcp-server/cli/start/command.ts +1 -1
- package/src/mcp-server/flags.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +4 -2
- package/src/mcp-server/tools/invoicesRecalculateInvoice.ts +2 -2
- package/src/mcp-server/tools/invoicesRecalculateInvoiceV2.ts +42 -0
- package/src/models/dtofeatureresponse.ts +3 -0
- package/src/models/dtoinvoiceresponse.ts +2 -0
- package/src/models/dtousageanalyticitem.ts +5 -0
- package/src/models/filtercondition.ts +3 -6
- package/src/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.ts +3 -0
- package/src/models/meteraggregation.ts +2 -0
- package/src/models/recalculateinvoiceop.ts +1 -7
- package/src/models/recalculateinvoicev2op.ts +38 -0
- package/src/models/reportingunit.ts +17 -0
- package/src/models/{githubcomflexpriceflexpriceinternaltypesvalue.ts → value.ts} +2 -4
- package/src/models/windowsize.ts +2 -2
- package/src/tool-names.ts +5 -1
- package/esm/models/githubcomflexpriceflexpriceinternaltypesvalue.d.ts +0 -10
- package/esm/models/githubcomflexpriceflexpriceinternaltypesvalue.d.ts.map +0 -1
- package/esm/models/githubcomflexpriceflexpriceinternaltypesvalue.js.map +0 -1
|
@@ -11,6 +11,7 @@ import { WindowSize, WindowSize$zodSchema } from "./windowsize.js";
|
|
|
11
11
|
|
|
12
12
|
export type MeterAggregation = {
|
|
13
13
|
bucket_size?: WindowSize | undefined;
|
|
14
|
+
expression?: string | undefined;
|
|
14
15
|
field?: string | undefined;
|
|
15
16
|
group_by?: string | undefined;
|
|
16
17
|
multiplier?: string | undefined;
|
|
@@ -20,6 +21,7 @@ export type MeterAggregation = {
|
|
|
20
21
|
export const MeterAggregation$zodSchema: z.ZodType<MeterAggregation> = z.object(
|
|
21
22
|
{
|
|
22
23
|
bucket_size: WindowSize$zodSchema.optional(),
|
|
24
|
+
expression: z.string().optional(),
|
|
23
25
|
field: z.string().optional(),
|
|
24
26
|
group_by: z.string().optional(),
|
|
25
27
|
multiplier: z.string().optional(),
|
|
@@ -12,17 +12,11 @@ import {
|
|
|
12
12
|
ErrorsErrorResponse$zodSchema,
|
|
13
13
|
} from "./errorserrorresponse.js";
|
|
14
14
|
|
|
15
|
-
export type RecalculateInvoiceRequest = {
|
|
16
|
-
id: string;
|
|
17
|
-
finalize?: boolean | undefined;
|
|
18
|
-
};
|
|
15
|
+
export type RecalculateInvoiceRequest = { id: string };
|
|
19
16
|
|
|
20
17
|
export const RecalculateInvoiceRequest$zodSchema: z.ZodType<
|
|
21
18
|
RecalculateInvoiceRequest
|
|
22
19
|
> = z.object({
|
|
23
|
-
finalize: z.boolean().describe(
|
|
24
|
-
"Whether to finalize the invoice after recalculation (default: true)",
|
|
25
|
-
).optional(),
|
|
26
20
|
id: z.string().describe("Invoice ID"),
|
|
27
21
|
});
|
|
28
22
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
DtoInvoiceResponse,
|
|
8
|
+
DtoInvoiceResponse$zodSchema,
|
|
9
|
+
} from "./dtoinvoiceresponse.js";
|
|
10
|
+
import {
|
|
11
|
+
ErrorsErrorResponse,
|
|
12
|
+
ErrorsErrorResponse$zodSchema,
|
|
13
|
+
} from "./errorserrorresponse.js";
|
|
14
|
+
|
|
15
|
+
export type RecalculateInvoiceV2Request = {
|
|
16
|
+
id: string;
|
|
17
|
+
finalize?: boolean | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const RecalculateInvoiceV2Request$zodSchema: z.ZodType<
|
|
21
|
+
RecalculateInvoiceV2Request
|
|
22
|
+
> = z.object({
|
|
23
|
+
finalize: z.boolean().describe(
|
|
24
|
+
"Whether to finalize the invoice after recalculation (default: true)",
|
|
25
|
+
).optional(),
|
|
26
|
+
id: z.string().describe("Invoice ID"),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export type RecalculateInvoiceV2Response =
|
|
30
|
+
| DtoInvoiceResponse
|
|
31
|
+
| ErrorsErrorResponse;
|
|
32
|
+
|
|
33
|
+
export const RecalculateInvoiceV2Response$zodSchema: z.ZodType<
|
|
34
|
+
RecalculateInvoiceV2Response
|
|
35
|
+
> = z.union([
|
|
36
|
+
DtoInvoiceResponse$zodSchema,
|
|
37
|
+
ErrorsErrorResponse$zodSchema,
|
|
38
|
+
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type ReportingUnit = {
|
|
8
|
+
conversion_rate?: number | undefined;
|
|
9
|
+
unit_plural?: string | undefined;
|
|
10
|
+
unit_singular?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const ReportingUnit$zodSchema: z.ZodType<ReportingUnit> = z.object({
|
|
14
|
+
conversion_rate: z.number().optional(),
|
|
15
|
+
unit_plural: z.string().optional(),
|
|
16
|
+
unit_singular: z.string().optional(),
|
|
17
|
+
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
|
-
export type
|
|
7
|
+
export type Value = {
|
|
8
8
|
array?: Array<string> | undefined;
|
|
9
9
|
boolean?: boolean | undefined;
|
|
10
10
|
date?: string | undefined;
|
|
@@ -12,9 +12,7 @@ export type GithubComFlexpriceFlexpriceInternalTypesValue = {
|
|
|
12
12
|
string?: string | undefined;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export const
|
|
16
|
-
GithubComFlexpriceFlexpriceInternalTypesValue
|
|
17
|
-
> = z.object({
|
|
15
|
+
export const Value$zodSchema: z.ZodType<Value> = z.object({
|
|
18
16
|
array: z.array(z.string()).optional(),
|
|
19
17
|
boolean: z.boolean().optional(),
|
|
20
18
|
date: z.string().optional(),
|
package/src/models/windowsize.ts
CHANGED
|
@@ -6,7 +6,6 @@ import * as z from "zod";
|
|
|
6
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
7
7
|
|
|
8
8
|
export const WindowSize = {
|
|
9
|
-
Month: "MONTH",
|
|
10
9
|
Minute: "MINUTE",
|
|
11
10
|
FifteenMIN: "15MIN",
|
|
12
11
|
ThirtyMIN: "30MIN",
|
|
@@ -16,11 +15,11 @@ export const WindowSize = {
|
|
|
16
15
|
TwelveHOUR: "12HOUR",
|
|
17
16
|
Day: "DAY",
|
|
18
17
|
Week: "WEEK",
|
|
18
|
+
Month: "MONTH",
|
|
19
19
|
} as const;
|
|
20
20
|
export type WindowSize = ClosedEnum<typeof WindowSize>;
|
|
21
21
|
|
|
22
22
|
export const WindowSize$zodSchema = z.enum([
|
|
23
|
-
"MONTH",
|
|
24
23
|
"MINUTE",
|
|
25
24
|
"15MIN",
|
|
26
25
|
"30MIN",
|
|
@@ -30,4 +29,5 @@ export const WindowSize$zodSchema = z.enum([
|
|
|
30
29
|
"12HOUR",
|
|
31
30
|
"DAY",
|
|
32
31
|
"WEEK",
|
|
32
|
+
"MONTH",
|
|
33
33
|
]);
|
package/src/tool-names.ts
CHANGED
|
@@ -82,7 +82,11 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"name": "recalculate-invoice",
|
|
85
|
-
"description": "Recalculate invoice\n\
|
|
85
|
+
"description": "Recalculate invoice (default: voided invoice)\n\nCreates a fresh replacement invoice for a voided SUBSCRIPTION invoice covering the same billing period. The original voided invoice is linked to the new invoice via recalculated_invoice_id. Can only be called once per voided invoice."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "recalculate-invoice-v2",
|
|
89
|
+
"description": "Recalculate draft invoice (v2)\n\nRecalculates a draft SUBSCRIPTION invoice in-place (replaces line items, reapplies credits/coupons/taxes). Use when subscription or usage data changed before finalizing."
|
|
86
90
|
},
|
|
87
91
|
{
|
|
88
92
|
"name": "void-invoice",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
export type GithubComFlexpriceFlexpriceInternalTypesValue = {
|
|
3
|
-
array?: Array<string> | undefined;
|
|
4
|
-
boolean?: boolean | undefined;
|
|
5
|
-
date?: string | undefined;
|
|
6
|
-
number?: number | undefined;
|
|
7
|
-
string?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
export declare const GithubComFlexpriceFlexpriceInternalTypesValue$zodSchema: z.ZodType<GithubComFlexpriceFlexpriceInternalTypesValue>;
|
|
10
|
-
//# sourceMappingURL=githubcomflexpriceflexpriceinternaltypesvalue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"githubcomflexpriceflexpriceinternaltypesvalue.d.ts","sourceRoot":"","sources":["../../src/models/githubcomflexpriceflexpriceinternaltypesvalue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,6CAA6C,GAAG;IAC1D,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,uDAAuD,EAAE,CAAC,CAAC,OAAO,CAC7E,6CAA6C,CAO7C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"githubcomflexpriceflexpriceinternaltypesvalue.js","sourceRoot":"","sources":["../../src/models/githubcomflexpriceflexpriceinternaltypesvalue.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAUzB,MAAM,CAAC,MAAM,uDAAuD,GAEhE,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC"}
|