@flexprice/mcp-server 2.1.6 → 2.1.10
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 +1006 -393
- package/bin/mcp-server.js.map +40 -35
- package/bun.lock +44 -36
- package/esm/funcs/subscriptionsQuerySubscriptionLineItems.d.ts +16 -0
- package/esm/funcs/subscriptionsQuerySubscriptionLineItems.d.ts.map +1 -0
- package/esm/funcs/subscriptionsQuerySubscriptionLineItems.js +82 -0
- package/esm/funcs/subscriptionsQuerySubscriptionLineItems.js.map +1 -0
- package/esm/landing-page.d.ts.map +1 -1
- package/esm/landing-page.js +8 -2
- package/esm/landing-page.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/mcp-server/cli/serve/impl.js +1 -1
- package/esm/mcp-server/cli/serve/impl.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/mcp-server.js.map +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/subscriptionsQuerySubscriptionLineItems.d.ts +7 -0
- package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.d.ts.map +1 -0
- package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.js +35 -0
- package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.js.map +1 -0
- package/esm/models/createsubscriptionrequest.d.ts +1 -0
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +1 -0
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/customerfilter.d.ts +3 -0
- package/esm/models/customerfilter.d.ts.map +1 -1
- package/esm/models/customerfilter.js +1 -0
- package/esm/models/customerfilter.js.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.d.ts +2 -0
- package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.js +3 -0
- package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
- package/esm/models/groupedinvoicingaction.d.ts +12 -0
- package/esm/models/groupedinvoicingaction.d.ts.map +1 -0
- package/esm/models/groupedinvoicingaction.js +13 -0
- package/esm/models/groupedinvoicingaction.js.map +1 -0
- package/esm/models/invoicebillingreason.d.ts +4 -0
- package/esm/models/invoicebillingreason.d.ts.map +1 -1
- package/esm/models/invoicebillingreason.js +4 -0
- package/esm/models/invoicebillingreason.js.map +1 -1
- package/esm/models/listsubscriptionlineitemsresponse.d.ts +9 -0
- package/esm/models/listsubscriptionlineitemsresponse.d.ts.map +1 -0
- package/esm/models/listsubscriptionlineitemsresponse.js +11 -0
- package/esm/models/listsubscriptionlineitemsresponse.js.map +1 -0
- package/esm/models/planfilter.d.ts +3 -0
- package/esm/models/planfilter.d.ts.map +1 -1
- package/esm/models/planfilter.js +1 -0
- package/esm/models/planfilter.js.map +1 -1
- package/esm/models/querysubscriptionlineitemsop.d.ts +6 -0
- package/esm/models/querysubscriptionlineitemsop.d.ts.map +1 -0
- package/esm/models/querysubscriptionlineitemsop.js +11 -0
- package/esm/models/querysubscriptionlineitemsop.js.map +1 -0
- package/esm/models/submodifygroupedinvoicingparams.d.ts +9 -0
- package/esm/models/submodifygroupedinvoicingparams.d.ts.map +1 -0
- package/esm/models/submodifygroupedinvoicingparams.js +11 -0
- package/esm/models/submodifygroupedinvoicingparams.js.map +1 -0
- package/esm/models/subscriptioninheritanceconfig.d.ts +1 -0
- package/esm/models/subscriptioninheritanceconfig.d.ts.map +1 -1
- package/esm/models/subscriptioninheritanceconfig.js +6 -3
- package/esm/models/subscriptioninheritanceconfig.js.map +1 -1
- package/esm/models/subscriptionlineitemfilter.d.ts +39 -0
- package/esm/models/subscriptionlineitemfilter.d.ts.map +1 -0
- package/esm/models/subscriptionlineitemfilter.js +39 -0
- package/esm/models/subscriptionlineitemfilter.js.map +1 -0
- package/esm/models/subscriptionmodifytype.d.ts +2 -0
- package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
- package/esm/models/subscriptionmodifytype.js +2 -0
- package/esm/models/subscriptionmodifytype.js.map +1 -1
- package/esm/models/subscriptionresponse.d.ts +1 -0
- package/esm/models/subscriptionresponse.d.ts.map +1 -1
- package/esm/models/subscriptionresponse.js +1 -0
- package/esm/models/subscriptionresponse.js.map +1 -1
- package/esm/models/subscriptionresponsev2.d.ts +1 -0
- package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
- package/esm/models/subscriptionresponsev2.js +1 -0
- package/esm/models/subscriptionresponsev2.js.map +1 -1
- package/esm/models/subscriptiontype.d.ts +4 -0
- package/esm/models/subscriptiontype.d.ts.map +1 -1
- package/esm/models/subscriptiontype.js +4 -0
- package/esm/models/subscriptiontype.js.map +1 -1
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +4 -0
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types/bigint.d.ts.map +1 -1
- package/esm/types/bigint.js +4 -3
- package/esm/types/bigint.js.map +1 -1
- package/manifest.json +5 -1
- package/package.json +1 -1
- package/src/funcs/subscriptionsQuerySubscriptionLineItems.ts +144 -0
- package/src/landing-page.ts +8 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/serve/impl.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.ts +45 -0
- package/src/models/createsubscriptionrequest.ts +4 -0
- package/src/models/customerfilter.ts +2 -0
- package/src/models/executesubscriptionmodifyrequest.ts +7 -0
- package/src/models/groupedinvoicingaction.ts +17 -0
- package/src/models/invoicebillingreason.ts +4 -0
- package/src/models/listsubscriptionlineitemsresponse.ts +25 -0
- package/src/models/planfilter.ts +2 -0
- package/src/models/querysubscriptionlineitemsop.ts +21 -0
- package/src/models/submodifygroupedinvoicingparams.ts +25 -0
- package/src/models/subscriptioninheritanceconfig.ts +15 -3
- package/src/models/subscriptionlineitemfilter.ts +77 -0
- package/src/models/subscriptionmodifytype.ts +2 -0
- package/src/models/subscriptionresponse.ts +4 -0
- package/src/models/subscriptionresponsev2.ts +4 -0
- package/src/models/subscriptiontype.ts +4 -0
- package/src/tool-names.ts +4 -0
- package/src/types/bigint.ts +18 -17
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
|
|
54
54
|
export type SubscriptionResponse = {
|
|
55
55
|
active_pause_id?: string | undefined;
|
|
56
|
+
auto_invoice_threshold?: string | undefined;
|
|
56
57
|
billing_anchor?: string | undefined;
|
|
57
58
|
billing_cadence?: BillingCadence | undefined;
|
|
58
59
|
billing_cycle?: BillingCycle | undefined;
|
|
@@ -111,6 +112,9 @@ export const SubscriptionResponse$zodSchema: z.ZodType<SubscriptionResponse> = z
|
|
|
111
112
|
active_pause_id: z.string().optional().describe(
|
|
112
113
|
"ActivePauseID references the current active pause configuration\nThis will be null if no pause is active or scheduled",
|
|
113
114
|
),
|
|
115
|
+
auto_invoice_threshold: z.string().optional().describe(
|
|
116
|
+
"AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers\nan intermediate invoice. Overrides the plan-level threshold when set.\nNil means: inherit from the plan's threshold (which may also be nil = disabled).",
|
|
117
|
+
),
|
|
114
118
|
billing_anchor: z.iso.datetime({ offset: true }).optional().describe(
|
|
115
119
|
"BillingAnchor is the reference point that aligns future billing cycle dates.\nIt sets the day of week for week intervals, the day of month for month and year intervals,\nand the month of year for year intervals. The timestamp is in UTC format.",
|
|
116
120
|
),
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
|
|
50
50
|
export type SubscriptionResponseV2 = {
|
|
51
51
|
active_pause_id?: string | undefined;
|
|
52
|
+
auto_invoice_threshold?: string | undefined;
|
|
52
53
|
billing_anchor?: string | undefined;
|
|
53
54
|
billing_cadence?: BillingCadence | undefined;
|
|
54
55
|
billing_cycle?: BillingCycle | undefined;
|
|
@@ -107,6 +108,9 @@ export const SubscriptionResponseV2$zodSchema: z.ZodType<
|
|
|
107
108
|
active_pause_id: z.string().optional().describe(
|
|
108
109
|
"ActivePauseID references the current active pause configuration\nThis will be null if no pause is active or scheduled",
|
|
109
110
|
),
|
|
111
|
+
auto_invoice_threshold: z.string().optional().describe(
|
|
112
|
+
"AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers\nan intermediate invoice. Overrides the plan-level threshold when set.\nNil means: inherit from the plan's threshold (which may also be nil = disabled).",
|
|
113
|
+
),
|
|
110
114
|
billing_anchor: z.iso.datetime({ offset: true }).optional().describe(
|
|
111
115
|
"BillingAnchor is the reference point that aligns future billing cycle dates.\nIt sets the day of week for week intervals, the day of month for month and year intervals,\nand the month of year for year intervals. The timestamp is in UTC format.",
|
|
112
116
|
),
|
|
@@ -7,13 +7,17 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
7
7
|
|
|
8
8
|
export const SubscriptionType = {
|
|
9
9
|
Standalone: "standalone",
|
|
10
|
+
DelegatedInvoicing: "delegated_invoicing",
|
|
10
11
|
Parent: "parent",
|
|
11
12
|
Inherited: "inherited",
|
|
13
|
+
GroupedInvoicing: "grouped_invoicing",
|
|
12
14
|
} as const;
|
|
13
15
|
export type SubscriptionType = ClosedEnum<typeof SubscriptionType>;
|
|
14
16
|
|
|
15
17
|
export const SubscriptionType$zodSchema = z.enum([
|
|
16
18
|
"standalone",
|
|
19
|
+
"delegated_invoicing",
|
|
17
20
|
"parent",
|
|
18
21
|
"inherited",
|
|
22
|
+
"grouped_invoicing",
|
|
19
23
|
]);
|
package/src/tool-names.ts
CHANGED
|
@@ -196,6 +196,10 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
196
196
|
"name": "remove-subscription-addon",
|
|
197
197
|
"description": "Remove addon from subscription\n\nUse when removing an add-on from a subscription (e.g. downgrade or opt-out)."
|
|
198
198
|
},
|
|
199
|
+
{
|
|
200
|
+
"name": "query-subscription-line-items",
|
|
201
|
+
"description": "Search subscription line items\n\nList subscription line items with a JSON filter (subscription, customer, price, pagination, expand=prices, etc.)."
|
|
202
|
+
},
|
|
199
203
|
{
|
|
200
204
|
"name": "update-subscription-line-item",
|
|
201
205
|
"description": "Update subscription line item\n\nUse when changing a subscription line item (e.g. quantity or price). Implemented by ending the current line and creating a new one for clean billing."
|
package/src/types/bigint.ts
CHANGED
|
@@ -24,23 +24,24 @@ export function bigint(): z.ZodType<bigint | string> {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export function bigintOptional(): z.ZodType<bigint | string | undefined> {
|
|
27
|
-
return z
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
return z
|
|
28
|
+
.union([
|
|
29
|
+
z.bigint().transform((v) => String(v)),
|
|
30
|
+
z.string().transform((v, ctx) => {
|
|
31
|
+
try {
|
|
32
|
+
return BigInt(v);
|
|
33
|
+
} catch {
|
|
34
|
+
ctx.addIssue({
|
|
35
|
+
code: z.ZodIssueCode.custom,
|
|
36
|
+
message: "Invalid bigint value",
|
|
37
|
+
});
|
|
38
|
+
return z.NEVER;
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
z.number().transform((v) => BigInt(Math.trunc(v))),
|
|
42
|
+
z.null().transform(() => undefined),
|
|
43
|
+
])
|
|
44
|
+
.optional();
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export function bigintNullable(): z.ZodType<bigint | string | null> {
|