@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.
Files changed (117) hide show
  1. package/bin/mcp-server.js +1006 -393
  2. package/bin/mcp-server.js.map +40 -35
  3. package/bun.lock +44 -36
  4. package/esm/funcs/subscriptionsQuerySubscriptionLineItems.d.ts +16 -0
  5. package/esm/funcs/subscriptionsQuerySubscriptionLineItems.d.ts.map +1 -0
  6. package/esm/funcs/subscriptionsQuerySubscriptionLineItems.js +82 -0
  7. package/esm/funcs/subscriptionsQuerySubscriptionLineItems.js.map +1 -0
  8. package/esm/landing-page.d.ts.map +1 -1
  9. package/esm/landing-page.js +8 -2
  10. package/esm/landing-page.js.map +1 -1
  11. package/esm/lib/config.d.ts +3 -3
  12. package/esm/lib/config.js +3 -3
  13. package/esm/lib/config.js.map +1 -1
  14. package/esm/mcp-server/cli/serve/impl.js +1 -1
  15. package/esm/mcp-server/cli/serve/impl.js.map +1 -1
  16. package/esm/mcp-server/mcp-server.js +1 -1
  17. package/esm/mcp-server/mcp-server.js.map +1 -1
  18. package/esm/mcp-server/server.d.ts.map +1 -1
  19. package/esm/mcp-server/server.js +3 -1
  20. package/esm/mcp-server/server.js.map +1 -1
  21. package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.d.ts +7 -0
  22. package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.d.ts.map +1 -0
  23. package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.js +35 -0
  24. package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.js.map +1 -0
  25. package/esm/models/createsubscriptionrequest.d.ts +1 -0
  26. package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
  27. package/esm/models/createsubscriptionrequest.js +1 -0
  28. package/esm/models/createsubscriptionrequest.js.map +1 -1
  29. package/esm/models/customerfilter.d.ts +3 -0
  30. package/esm/models/customerfilter.d.ts.map +1 -1
  31. package/esm/models/customerfilter.js +1 -0
  32. package/esm/models/customerfilter.js.map +1 -1
  33. package/esm/models/executesubscriptionmodifyrequest.d.ts +2 -0
  34. package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
  35. package/esm/models/executesubscriptionmodifyrequest.js +3 -0
  36. package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
  37. package/esm/models/groupedinvoicingaction.d.ts +12 -0
  38. package/esm/models/groupedinvoicingaction.d.ts.map +1 -0
  39. package/esm/models/groupedinvoicingaction.js +13 -0
  40. package/esm/models/groupedinvoicingaction.js.map +1 -0
  41. package/esm/models/invoicebillingreason.d.ts +4 -0
  42. package/esm/models/invoicebillingreason.d.ts.map +1 -1
  43. package/esm/models/invoicebillingreason.js +4 -0
  44. package/esm/models/invoicebillingreason.js.map +1 -1
  45. package/esm/models/listsubscriptionlineitemsresponse.d.ts +9 -0
  46. package/esm/models/listsubscriptionlineitemsresponse.d.ts.map +1 -0
  47. package/esm/models/listsubscriptionlineitemsresponse.js +11 -0
  48. package/esm/models/listsubscriptionlineitemsresponse.js.map +1 -0
  49. package/esm/models/planfilter.d.ts +3 -0
  50. package/esm/models/planfilter.d.ts.map +1 -1
  51. package/esm/models/planfilter.js +1 -0
  52. package/esm/models/planfilter.js.map +1 -1
  53. package/esm/models/querysubscriptionlineitemsop.d.ts +6 -0
  54. package/esm/models/querysubscriptionlineitemsop.d.ts.map +1 -0
  55. package/esm/models/querysubscriptionlineitemsop.js +11 -0
  56. package/esm/models/querysubscriptionlineitemsop.js.map +1 -0
  57. package/esm/models/submodifygroupedinvoicingparams.d.ts +9 -0
  58. package/esm/models/submodifygroupedinvoicingparams.d.ts.map +1 -0
  59. package/esm/models/submodifygroupedinvoicingparams.js +11 -0
  60. package/esm/models/submodifygroupedinvoicingparams.js.map +1 -0
  61. package/esm/models/subscriptioninheritanceconfig.d.ts +1 -0
  62. package/esm/models/subscriptioninheritanceconfig.d.ts.map +1 -1
  63. package/esm/models/subscriptioninheritanceconfig.js +6 -3
  64. package/esm/models/subscriptioninheritanceconfig.js.map +1 -1
  65. package/esm/models/subscriptionlineitemfilter.d.ts +39 -0
  66. package/esm/models/subscriptionlineitemfilter.d.ts.map +1 -0
  67. package/esm/models/subscriptionlineitemfilter.js +39 -0
  68. package/esm/models/subscriptionlineitemfilter.js.map +1 -0
  69. package/esm/models/subscriptionmodifytype.d.ts +2 -0
  70. package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
  71. package/esm/models/subscriptionmodifytype.js +2 -0
  72. package/esm/models/subscriptionmodifytype.js.map +1 -1
  73. package/esm/models/subscriptionresponse.d.ts +1 -0
  74. package/esm/models/subscriptionresponse.d.ts.map +1 -1
  75. package/esm/models/subscriptionresponse.js +1 -0
  76. package/esm/models/subscriptionresponse.js.map +1 -1
  77. package/esm/models/subscriptionresponsev2.d.ts +1 -0
  78. package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
  79. package/esm/models/subscriptionresponsev2.js +1 -0
  80. package/esm/models/subscriptionresponsev2.js.map +1 -1
  81. package/esm/models/subscriptiontype.d.ts +4 -0
  82. package/esm/models/subscriptiontype.d.ts.map +1 -1
  83. package/esm/models/subscriptiontype.js +4 -0
  84. package/esm/models/subscriptiontype.js.map +1 -1
  85. package/esm/tool-names.d.ts.map +1 -1
  86. package/esm/tool-names.js +4 -0
  87. package/esm/tool-names.js.map +1 -1
  88. package/esm/tsconfig.tsbuildinfo +1 -1
  89. package/esm/types/bigint.d.ts.map +1 -1
  90. package/esm/types/bigint.js +4 -3
  91. package/esm/types/bigint.js.map +1 -1
  92. package/manifest.json +5 -1
  93. package/package.json +1 -1
  94. package/src/funcs/subscriptionsQuerySubscriptionLineItems.ts +144 -0
  95. package/src/landing-page.ts +8 -2
  96. package/src/lib/config.ts +3 -3
  97. package/src/mcp-server/cli/serve/impl.ts +1 -1
  98. package/src/mcp-server/mcp-server.ts +1 -1
  99. package/src/mcp-server/server.ts +3 -1
  100. package/src/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.ts +45 -0
  101. package/src/models/createsubscriptionrequest.ts +4 -0
  102. package/src/models/customerfilter.ts +2 -0
  103. package/src/models/executesubscriptionmodifyrequest.ts +7 -0
  104. package/src/models/groupedinvoicingaction.ts +17 -0
  105. package/src/models/invoicebillingreason.ts +4 -0
  106. package/src/models/listsubscriptionlineitemsresponse.ts +25 -0
  107. package/src/models/planfilter.ts +2 -0
  108. package/src/models/querysubscriptionlineitemsop.ts +21 -0
  109. package/src/models/submodifygroupedinvoicingparams.ts +25 -0
  110. package/src/models/subscriptioninheritanceconfig.ts +15 -3
  111. package/src/models/subscriptionlineitemfilter.ts +77 -0
  112. package/src/models/subscriptionmodifytype.ts +2 -0
  113. package/src/models/subscriptionresponse.ts +4 -0
  114. package/src/models/subscriptionresponsev2.ts +4 -0
  115. package/src/models/subscriptiontype.ts +4 -0
  116. package/src/tool-names.ts +4 -0
  117. package/src/types/bigint.ts +18 -17
@@ -1 +1 @@
1
- {"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAiBnD;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAkBvE;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAkBlE;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAqBpE"}
1
+ {"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAiBnD;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAmBvE;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAkBlE;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAqBpE"}
@@ -22,7 +22,8 @@ export function bigint() {
22
22
  ]);
23
23
  }
24
24
  export function bigintOptional() {
25
- return z.union([
25
+ return z
26
+ .union([
26
27
  z.bigint().transform((v) => String(v)),
27
28
  z.string().transform((v, ctx) => {
28
29
  try {
@@ -37,9 +38,9 @@ export function bigintOptional() {
37
38
  }
38
39
  }),
39
40
  z.number().transform((v) => BigInt(Math.trunc(v))),
40
- z.undefined(),
41
41
  z.null().transform(() => undefined),
42
- ]);
42
+ ])
43
+ .optional();
43
44
  }
44
45
  export function bigintNullable() {
45
46
  return z.union([
@@ -1 +1 @@
1
- {"version":3,"file":"bigint.js","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,UAAU,MAAM;IACpB,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YAC9B,IAAI,CAAC;gBACH,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;YAAC,MAAM,CAAC;gBACP,GAAG,CAAC,QAAQ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,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE;QAC1B,OAAO,EAAE,iBAAiB,KAAK,EAAE;KAClC,CAAC;SACD,SAAS,CAAC,GAAG,EAAE,CAAC,KAAU,CAAC,CAAC;AACjC,CAAC"}
package/manifest.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "sensitive": true
49
49
  }
50
50
  },
51
- "version": "2.1.6",
51
+ "version": "2.1.10",
52
52
  "tools": [
53
53
  {
54
54
  "name": "update-customer",
@@ -246,6 +246,10 @@
246
246
  "name": "remove-subscription-addon",
247
247
  "description": "Remove addon from subscription\n\nUse when removing an add-on from a subscription (e.g. downgrade or opt-out)."
248
248
  },
249
+ {
250
+ "name": "query-subscription-line-items",
251
+ "description": "Search subscription line items\n\nList subscription line items with a JSON filter (subscription, customer, price, pagination, expand=prices, etc.)."
252
+ },
249
253
  {
250
254
  "name": "update-subscription-line-item",
251
255
  "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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexprice/mcp-server",
3
- "version": "2.1.6",
3
+ "version": "2.1.10",
4
4
  "author": "flexprice",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -0,0 +1,144 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { FlexpriceCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import { APIError } from "../models/errors/apierror.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ SubscriptionLineItemFilter,
23
+ SubscriptionLineItemFilter$zodSchema,
24
+ } from "../models/subscriptionlineitemfilter.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Search subscription line items
30
+ *
31
+ * @remarks
32
+ * List subscription line items with a JSON filter (subscription, customer, price, pagination, expand=prices, etc.).
33
+ */
34
+ export function subscriptionsQuerySubscriptionLineItems(
35
+ client$: FlexpriceCore,
36
+ request: SubscriptionLineItemFilter,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ Response,
41
+ | APIError
42
+ | SDKValidationError
43
+ | UnexpectedClientError
44
+ | InvalidRequestError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | ConnectionError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client$,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client$: FlexpriceCore,
59
+ request: SubscriptionLineItemFilter,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ Response,
65
+ | APIError
66
+ | SDKValidationError
67
+ | UnexpectedClientError
68
+ | InvalidRequestError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | ConnectionError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed$ = safeParse(
77
+ request,
78
+ (value$) => SubscriptionLineItemFilter$zodSchema.parse(value$),
79
+ "Input validation failed",
80
+ );
81
+ if (!parsed$.ok) {
82
+ return [parsed$, { status: "invalid" }];
83
+ }
84
+ const payload$ = parsed$.value;
85
+ const body$ = encodeJSON("body", payload$, { explode: true });
86
+ const path$ = pathToFunc("/subscriptions/lineitems/search")();
87
+
88
+ const headers$ = new Headers(compactMap({
89
+ "Content-Type": "application/json",
90
+ Accept: "application/json",
91
+ }));
92
+ const securityInput = await extractSecurity(client$._options.security);
93
+ const requestSecurity = resolveGlobalSecurity(securityInput);
94
+
95
+ const context = {
96
+ options: client$._options,
97
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
98
+ operationID: "querySubscriptionLineItems",
99
+ oAuth2Scopes: null,
100
+ resolvedSecurity: requestSecurity,
101
+ securitySource: client$._options.security,
102
+ retryConfig: options?.retries
103
+ || client$._options.retryConfig
104
+ || { strategy: "none" },
105
+ retryCodes: options?.retryCodes || [
106
+ "429",
107
+ "500",
108
+ "502",
109
+ "503",
110
+ "504",
111
+ ],
112
+ };
113
+
114
+ const requestRes = client$._createRequest(context, {
115
+ security: requestSecurity,
116
+ method: "POST",
117
+ baseURL: options?.serverURL,
118
+ path: path$,
119
+ headers: headers$,
120
+ body: body$,
121
+ userAgent: client$._options.userAgent,
122
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
123
+ || -1,
124
+ }, options);
125
+ if (!requestRes.ok) {
126
+ return [requestRes, { status: "invalid" }];
127
+ }
128
+ const req$ = requestRes.value;
129
+
130
+ const doResult = await client$._do(req$, {
131
+ context,
132
+ errorCodes: [],
133
+ retryConfig: context.retryConfig,
134
+ retryCodes: context.retryCodes,
135
+ });
136
+ if (!doResult.ok) {
137
+ return [doResult, { status: "request-error", request: req$ }];
138
+ }
139
+ return [doResult, {
140
+ status: "complete",
141
+ "request": req$,
142
+ response: doResult.value,
143
+ }];
144
+ }
@@ -18,8 +18,14 @@ export function landingPage(req: Request): Response {
18
18
 
19
19
  // express wrapper
20
20
  export function landingPageExpress(req: ExpressRequest, res: ExpressResponse) {
21
- const origin = new URL(req.host).href;
22
- res.type("html").send(landingPageHTML(origin));
21
+ const proto = req.get("x-forwarded-proto")?.split(",")[0]?.trim()
22
+ || req.protocol;
23
+ const host = req.get("host");
24
+ if (!host) {
25
+ res.status(400).send("Missing Host header");
26
+ return;
27
+ }
28
+ res.type("html").send(landingPageHTML(`${proto}://${host}`));
23
29
  }
24
30
 
25
31
  export function landingPageHTML(origin: string): string {
package/src/lib/config.ts CHANGED
@@ -69,8 +69,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
69
69
  export const SDK_METADATA = {
70
70
  language: "typescript",
71
71
  openapiDocVersion: "1.0",
72
- sdkVersion: "2.1.6",
73
- genVersion: "2.881.4",
72
+ sdkVersion: "2.1.10",
73
+ genVersion: "2.882.0",
74
74
  userAgent:
75
- "speakeasy-sdk/mcp-typescript 2.1.6 2.881.4 1.0 @flexprice/mcp-server",
75
+ "speakeasy-sdk/mcp-typescript 2.1.10 2.882.0 1.0 @flexprice/mcp-server",
76
76
  } as const;
@@ -40,7 +40,7 @@ async function startStreamableHTTP(cliFlags: ServeCommandFlags) {
40
40
  app.use((req, res, next) => {
41
41
  res.header("Access-Control-Allow-Origin", "*");
42
42
  res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
43
- res.header("Access-Control-Allow-Headers", "Content-Type, *");
43
+ res.header("Access-Control-Allow-Headers", "*");
44
44
  if (req.method === "OPTIONS") {
45
45
  res.sendStatus(204);
46
46
  return;
@@ -21,7 +21,7 @@ const routes = buildRouteMap({
21
21
  export const app = buildApplication(routes, {
22
22
  name: "mcp",
23
23
  versionInfo: {
24
- currentVersion: "2.1.6",
24
+ currentVersion: "2.1.10",
25
25
  },
26
26
  });
27
27
 
@@ -84,6 +84,7 @@ import { tool$subscriptionsListSubscriptionSchedules } from "./tools/subscriptio
84
84
  import { tool$subscriptionsPreviewSubscriptionChange } from "./tools/subscriptionsPreviewSubscriptionChange.js";
85
85
  import { tool$subscriptionsPreviewSubscriptionModify } from "./tools/subscriptionsPreviewSubscriptionModify.js";
86
86
  import { tool$subscriptionsQuerySubscription } from "./tools/subscriptionsQuerySubscription.js";
87
+ import { tool$subscriptionsQuerySubscriptionLineItems } from "./tools/subscriptionsQuerySubscriptionLineItems.js";
87
88
  import { tool$subscriptionsRemoveSubscriptionAddon } from "./tools/subscriptionsRemoveSubscriptionAddon.js";
88
89
  import { tool$subscriptionsUpdateSubscription } from "./tools/subscriptionsUpdateSubscription.js";
89
90
  import { tool$subscriptionsUpdateSubscriptionLineItem } from "./tools/subscriptionsUpdateSubscriptionLineItem.js";
@@ -101,7 +102,7 @@ export function createMCPServer(deps: {
101
102
  }) {
102
103
  const server = new McpServer({
103
104
  name: "Flexprice",
104
- version: "2.1.6",
105
+ version: "2.1.10",
105
106
  });
106
107
 
107
108
  const getClient = deps.getSDK || (() =>
@@ -195,6 +196,7 @@ export function createMCPServer(deps: {
195
196
  tool(tool$subscriptionsCreateSubscription);
196
197
  tool(tool$subscriptionsAddSubscriptionAddon);
197
198
  tool(tool$subscriptionsRemoveSubscriptionAddon);
199
+ tool(tool$subscriptionsQuerySubscriptionLineItems);
198
200
  tool(tool$subscriptionsUpdateSubscriptionLineItem);
199
201
  tool(tool$subscriptionsDeleteSubscriptionLineItem);
200
202
  tool(tool$subscriptionsQuerySubscription);
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { subscriptionsQuerySubscriptionLineItems } from "../../funcs/subscriptionsQuerySubscriptionLineItems.js";
6
+ import { SubscriptionLineItemFilter$zodSchema } from "../../models/subscriptionlineitemfilter.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: SubscriptionLineItemFilter$zodSchema.describe(`Filter`),
11
+ };
12
+
13
+ export const tool$subscriptionsQuerySubscriptionLineItems: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "query-subscription-line-items",
17
+ description: `Search subscription line items
18
+
19
+ List subscription line items with a JSON filter (subscription, customer, price, pagination, expand=prices, etc.).`,
20
+ scopes: ["read"],
21
+ annotations: {
22
+ "title": "",
23
+ "destructiveHint": false,
24
+ "idempotentHint": false,
25
+ "openWorldHint": false,
26
+ "readOnlyHint": true,
27
+ },
28
+ args,
29
+ tool: async (client, args, ctx) => {
30
+ const [result] = await subscriptionsQuerySubscriptionLineItems(
31
+ client,
32
+ args.request,
33
+ { fetchOptions: { signal: ctx.signal } },
34
+ ).$inspect();
35
+
36
+ if (!result.ok) {
37
+ return {
38
+ content: [{ type: "text", text: result.error.message }],
39
+ isError: true,
40
+ };
41
+ }
42
+
43
+ return formatResult(result.value);
44
+ },
45
+ };
@@ -61,6 +61,7 @@ import {
61
61
 
62
62
  export type CreateSubscriptionRequest = {
63
63
  addons?: Array<AddAddonToSubscriptionRequest> | undefined;
64
+ auto_invoice_threshold?: string | undefined;
64
65
  billing_anchor?: string | undefined;
65
66
  billing_cycle?: BillingCycle | undefined;
66
67
  billing_period: BillingPeriod;
@@ -103,6 +104,9 @@ export const CreateSubscriptionRequest$zodSchema: z.ZodType<
103
104
  addons: z.array(AddAddonToSubscriptionRequest$zodSchema).optional().describe(
104
105
  "Addons represents addons to be added to the subscription during creation",
105
106
  ),
107
+ auto_invoice_threshold: z.string().optional().describe(
108
+ "AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers\nan intermediate invoice mid-period. Set once at creation; cannot be changed later.\nAllowed only when the subscription resolves to type standalone (no parent hierarchy rows).\nPlan line items must be usage-based only (no fixed or other non-usage plan prices).\nNil means auto invoice threshold billing is disabled for this subscription.",
109
+ ),
106
110
  billing_anchor: z.iso.datetime({ offset: true }).optional().describe(
107
111
  "BillingAnchor overrides the derived billing anchor when billing_cycle is anniversary.\nFor monthly billing, the day-of-month (and time-of-day) define cycle boundaries: if start_date\nis before that day in the month, the first billing period ends on the next occurrence of that\nday in the same month (a shorter first period); subsequent periods follow the usual interval.",
108
112
  ),
@@ -31,6 +31,7 @@ export type CustomerFilter = {
31
31
  external_ids?: Array<string> | undefined;
32
32
  filters?: Array<FilterCondition> | undefined;
33
33
  limit?: number | undefined;
34
+ metadata?: { [k: string]: string } | undefined;
34
35
  offset?: number | undefined;
35
36
  order?: CustomerFilterOrder | undefined;
36
37
  sort?: Array<SortCondition> | undefined;
@@ -47,6 +48,7 @@ export const CustomerFilter$zodSchema: z.ZodType<CustomerFilter> = z.object({
47
48
  external_ids: z.array(z.string()).optional(),
48
49
  filters: z.array(FilterCondition$zodSchema).optional(),
49
50
  limit: z.int().optional(),
51
+ metadata: z.record(z.string(), z.string()).optional(),
50
52
  offset: z.int().optional(),
51
53
  order: CustomerFilterOrder$zodSchema.optional(),
52
54
  sort: z.array(SortCondition$zodSchema).optional(),
@@ -3,6 +3,10 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import {
7
+ SubModifyGroupedInvoicingParams,
8
+ SubModifyGroupedInvoicingParams$zodSchema,
9
+ } from "./submodifygroupedinvoicingparams.js";
6
10
  import {
7
11
  SubModifyInheritanceRequest,
8
12
  SubModifyInheritanceRequest$zodSchema,
@@ -17,6 +21,7 @@ import {
17
21
  } from "./subscriptionmodifytype.js";
18
22
 
19
23
  export type ExecuteSubscriptionModifyRequest = {
24
+ grouped_invoicing_params?: SubModifyGroupedInvoicingParams | undefined;
20
25
  inheritance_params?: SubModifyInheritanceRequest | undefined;
21
26
  quantity_change_params?: SubModifyQuantityChangeRequest | undefined;
22
27
  type: SubscriptionModifyType;
@@ -25,6 +30,8 @@ export type ExecuteSubscriptionModifyRequest = {
25
30
  export const ExecuteSubscriptionModifyRequest$zodSchema: z.ZodType<
26
31
  ExecuteSubscriptionModifyRequest
27
32
  > = z.object({
33
+ grouped_invoicing_params: SubModifyGroupedInvoicingParams$zodSchema
34
+ .optional(),
28
35
  inheritance_params: SubModifyInheritanceRequest$zodSchema.optional(),
29
36
  quantity_change_params: SubModifyQuantityChangeRequest$zodSchema.optional(),
30
37
  type: SubscriptionModifyType$zodSchema,
@@ -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
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ export const GroupedInvoicingAction = {
9
+ Add: "add",
10
+ Remove: "remove",
11
+ } as const;
12
+ export type GroupedInvoicingAction = ClosedEnum<typeof GroupedInvoicingAction>;
13
+
14
+ export const GroupedInvoicingAction$zodSchema = z.enum([
15
+ "add",
16
+ "remove",
17
+ ]);
@@ -10,8 +10,10 @@ export const InvoiceBillingReason = {
10
10
  SubscriptionCycle: "SUBSCRIPTION_CYCLE",
11
11
  SubscriptionUpdate: "SUBSCRIPTION_UPDATE",
12
12
  SubscriptionTrialEnd: "SUBSCRIPTION_TRIAL_END",
13
+ SubscriptionTrialStart: "SUBSCRIPTION_TRIAL_START",
13
14
  Proration: "PRORATION",
14
15
  Manual: "MANUAL",
16
+ AutoInvoiceThreshold: "AUTO_INVOICE_THRESHOLD",
15
17
  } as const;
16
18
  export type InvoiceBillingReason = ClosedEnum<typeof InvoiceBillingReason>;
17
19
 
@@ -20,6 +22,8 @@ export const InvoiceBillingReason$zodSchema = z.enum([
20
22
  "SUBSCRIPTION_CYCLE",
21
23
  "SUBSCRIPTION_UPDATE",
22
24
  "SUBSCRIPTION_TRIAL_END",
25
+ "SUBSCRIPTION_TRIAL_START",
23
26
  "PRORATION",
24
27
  "MANUAL",
28
+ "AUTO_INVOICE_THRESHOLD",
25
29
  ]);
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ PaginationResponse,
8
+ PaginationResponse$zodSchema,
9
+ } from "./paginationresponse.js";
10
+ import {
11
+ SubscriptionLineItemResponse,
12
+ SubscriptionLineItemResponse$zodSchema,
13
+ } from "./subscriptionlineitemresponse.js";
14
+
15
+ export type ListSubscriptionLineItemsResponse = {
16
+ items?: Array<SubscriptionLineItemResponse> | undefined;
17
+ pagination?: PaginationResponse | undefined;
18
+ };
19
+
20
+ export const ListSubscriptionLineItemsResponse$zodSchema: z.ZodType<
21
+ ListSubscriptionLineItemsResponse
22
+ > = z.object({
23
+ items: z.array(SubscriptionLineItemResponse$zodSchema).optional(),
24
+ pagination: PaginationResponse$zodSchema.optional(),
25
+ });
@@ -28,6 +28,7 @@ export type PlanFilter = {
28
28
  filters?: Array<FilterCondition> | undefined;
29
29
  limit?: number | undefined;
30
30
  lookup_key?: string | undefined;
31
+ metadata?: { [k: string]: string } | undefined;
31
32
  offset?: number | undefined;
32
33
  order?: PlanFilterOrder | undefined;
33
34
  plan_ids?: Array<string> | undefined;
@@ -44,6 +45,7 @@ export const PlanFilter$zodSchema: z.ZodType<PlanFilter> = z.object({
44
45
  ),
45
46
  limit: z.int().optional(),
46
47
  lookup_key: z.string().optional(),
48
+ metadata: z.record(z.string(), z.string()).optional(),
47
49
  offset: z.int().optional(),
48
50
  order: PlanFilterOrder$zodSchema.optional(),
49
51
  plan_ids: z.array(z.string()).optional(),
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ErrorResponse, ErrorResponse$zodSchema } from "./errorresponse.js";
7
+ import {
8
+ ListSubscriptionLineItemsResponse,
9
+ ListSubscriptionLineItemsResponse$zodSchema,
10
+ } from "./listsubscriptionlineitemsresponse.js";
11
+
12
+ export type QuerySubscriptionLineItemsResponse =
13
+ | ListSubscriptionLineItemsResponse
14
+ | ErrorResponse;
15
+
16
+ export const QuerySubscriptionLineItemsResponse$zodSchema: z.ZodType<
17
+ QuerySubscriptionLineItemsResponse
18
+ > = z.union([
19
+ ListSubscriptionLineItemsResponse$zodSchema,
20
+ ErrorResponse$zodSchema,
21
+ ]);
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ GroupedInvoicingAction,
8
+ GroupedInvoicingAction$zodSchema,
9
+ } from "./groupedinvoicingaction.js";
10
+
11
+ export type SubModifyGroupedInvoicingParams = {
12
+ action: GroupedInvoicingAction;
13
+ child_subscription_ids?: Array<string> | undefined;
14
+ parent_subscription_id?: string | undefined;
15
+ };
16
+
17
+ export const SubModifyGroupedInvoicingParams$zodSchema: z.ZodType<
18
+ SubModifyGroupedInvoicingParams
19
+ > = z.object({
20
+ action: GroupedInvoicingAction$zodSchema,
21
+ child_subscription_ids: z.array(z.string()).optional(),
22
+ parent_subscription_id: z.string().optional().describe(
23
+ "ParentSubscriptionID is required for action 'add'.",
24
+ ),
25
+ });
@@ -8,12 +8,24 @@ export type SubscriptionInheritanceConfig = {
8
8
  external_customer_ids_to_inherit_subscription?: Array<string> | undefined;
9
9
  invoicing_customer_external_id?: string | undefined;
10
10
  parent_subscription_id?: string | undefined;
11
+ subscriptions_ids_for_grouped_invoicing?: Array<string> | undefined;
11
12
  };
12
13
 
13
14
  export const SubscriptionInheritanceConfig$zodSchema: z.ZodType<
14
15
  SubscriptionInheritanceConfig
15
16
  > = z.object({
16
- external_customer_ids_to_inherit_subscription: z.array(z.string()).optional(),
17
- invoicing_customer_external_id: z.string().optional(),
18
- parent_subscription_id: z.string().optional(),
17
+ external_customer_ids_to_inherit_subscription: z.array(z.string()).optional()
18
+ .describe(
19
+ "ExternalCustomerIDsToInheritSubscription: child customer external IDs for which\ninherited skeleton subscriptions will be created. Only valid for parent behavior.",
20
+ ),
21
+ invoicing_customer_external_id: z.string().optional().describe(
22
+ "InvoicingCustomerExternalID sets a different billing recipient (external ID).\nRequired for delegated; rejected for inherited; optional for others.",
23
+ ),
24
+ parent_subscription_id: z.string().optional().describe(
25
+ "ParentSubscriptionID links this subscription to an existing parent.\nRequired for inherited and grouped_invoicing; rejected for standalone, delegated, parent.",
26
+ ),
27
+ subscriptions_ids_for_grouped_invoicing: z.array(z.string()).optional()
28
+ .describe(
29
+ "SubscriptionsIDsForGroupedInvoicing: existing standalone subscription IDs to convert to\ngrouped_invoicing under this parent at creation time. Only valid for parent behavior.",
30
+ ),
19
31
  });
@@ -0,0 +1,77 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+ import {
8
+ FilterCondition,
9
+ FilterCondition$zodSchema,
10
+ } from "./filtercondition.js";
11
+ import { SortCondition, SortCondition$zodSchema } from "./sortcondition.js";
12
+ import { Status, Status$zodSchema } from "./status.js";
13
+ import {
14
+ SubscriptionLineItemEntityType,
15
+ SubscriptionLineItemEntityType$zodSchema,
16
+ } from "./subscriptionlineitementitytype.js";
17
+
18
+ export const SubscriptionLineItemFilterOrder = {
19
+ Asc: "asc",
20
+ Desc: "desc",
21
+ } as const;
22
+ export type SubscriptionLineItemFilterOrder = ClosedEnum<
23
+ typeof SubscriptionLineItemFilterOrder
24
+ >;
25
+
26
+ export const SubscriptionLineItemFilterOrder$zodSchema = z.enum([
27
+ "asc",
28
+ "desc",
29
+ ]);
30
+
31
+ export type SubscriptionLineItemFilter = {
32
+ active_filter?: boolean | undefined;
33
+ addon_association_ids?: Array<string> | undefined;
34
+ billing_periods?: Array<string> | undefined;
35
+ currencies?: Array<string> | undefined;
36
+ current_period_start?: string | undefined;
37
+ customer_ids?: Array<string> | undefined;
38
+ end_time?: string | undefined;
39
+ entity_ids?: Array<string> | undefined;
40
+ entity_type?: SubscriptionLineItemEntityType | undefined;
41
+ expand?: string | undefined;
42
+ filters?: Array<FilterCondition> | undefined;
43
+ limit?: number | undefined;
44
+ meter_ids?: Array<string> | undefined;
45
+ offset?: number | undefined;
46
+ order?: SubscriptionLineItemFilterOrder | undefined;
47
+ price_ids?: Array<string> | undefined;
48
+ sort?: Array<SortCondition> | undefined;
49
+ start_time?: string | undefined;
50
+ status?: Status | undefined;
51
+ subscription_ids?: Array<string> | undefined;
52
+ };
53
+
54
+ export const SubscriptionLineItemFilter$zodSchema: z.ZodType<
55
+ SubscriptionLineItemFilter
56
+ > = z.object({
57
+ active_filter: z.boolean().default(true),
58
+ addon_association_ids: z.array(z.string()).optional(),
59
+ billing_periods: z.array(z.string()).optional(),
60
+ currencies: z.array(z.string()).optional(),
61
+ current_period_start: z.iso.datetime({ offset: true }).optional(),
62
+ customer_ids: z.array(z.string()).optional(),
63
+ end_time: z.iso.datetime({ offset: true }).optional(),
64
+ entity_ids: z.array(z.string()).optional(),
65
+ entity_type: SubscriptionLineItemEntityType$zodSchema.optional(),
66
+ expand: z.string().optional(),
67
+ filters: z.array(FilterCondition$zodSchema).optional(),
68
+ limit: z.int().optional(),
69
+ meter_ids: z.array(z.string()).optional(),
70
+ offset: z.int().optional(),
71
+ order: SubscriptionLineItemFilterOrder$zodSchema.optional(),
72
+ price_ids: z.array(z.string()).optional(),
73
+ sort: z.array(SortCondition$zodSchema).optional(),
74
+ start_time: z.iso.datetime({ offset: true }).optional(),
75
+ status: Status$zodSchema.optional(),
76
+ subscription_ids: z.array(z.string()).optional().describe("Specific filters"),
77
+ });
@@ -8,10 +8,12 @@ import { ClosedEnum } from "../types/enums.js";
8
8
  export const SubscriptionModifyType = {
9
9
  Inheritance: "inheritance",
10
10
  QuantityChange: "quantity_change",
11
+ GroupedInvoicing: "grouped_invoicing",
11
12
  } as const;
12
13
  export type SubscriptionModifyType = ClosedEnum<typeof SubscriptionModifyType>;
13
14
 
14
15
  export const SubscriptionModifyType$zodSchema = z.enum([
15
16
  "inheritance",
16
17
  "quantity_change",
18
+ "grouped_invoicing",
17
19
  ]);