@flexprice/mcp-server 2.0.2 → 2.0.4

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 (55) hide show
  1. package/bin/mcp-server.js +46 -43
  2. package/bin/mcp-server.js.map +15 -15
  3. package/bun.lock +15 -15
  4. package/esm/funcs/invoicesRecalculateInvoice.d.ts +2 -2
  5. package/esm/funcs/invoicesRecalculateInvoice.js +2 -2
  6. package/esm/lib/config.d.ts +3 -3
  7. package/esm/lib/config.js +3 -3
  8. package/esm/mcp-server/mcp-server.js +1 -1
  9. package/esm/mcp-server/server.js +1 -1
  10. package/esm/mcp-server/tools/invoicesRecalculateInvoice.js +2 -2
  11. package/esm/mcp-server/tools/invoicesRecalculateInvoice.js.map +1 -1
  12. package/esm/mcp-server/tools.js +1 -1
  13. package/esm/mcp-server/tools.js.map +1 -1
  14. package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
  15. package/esm/models/dtofeatureresponse.d.ts +3 -0
  16. package/esm/models/dtofeatureresponse.d.ts.map +1 -1
  17. package/esm/models/dtofeatureresponse.js +3 -0
  18. package/esm/models/dtofeatureresponse.js.map +1 -1
  19. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.d.ts +3 -0
  20. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.d.ts.map +1 -1
  21. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.js +3 -0
  22. package/esm/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.js.map +1 -1
  23. package/esm/models/groupentitytype.d.ts +12 -0
  24. package/esm/models/groupentitytype.d.ts.map +1 -0
  25. package/esm/models/groupentitytype.js +13 -0
  26. package/esm/models/groupentitytype.js.map +1 -0
  27. package/esm/models/groupgroup.d.ts +21 -0
  28. package/esm/models/groupgroup.d.ts.map +1 -0
  29. package/esm/models/groupgroup.js +21 -0
  30. package/esm/models/groupgroup.js.map +1 -0
  31. package/esm/models/recalculateinvoiceop.d.ts +2 -2
  32. package/esm/models/recalculateinvoiceop.d.ts.map +1 -1
  33. package/esm/models/recalculateinvoiceop.js +2 -2
  34. package/esm/models/recalculateinvoiceop.js.map +1 -1
  35. package/esm/models/windowsize.d.ts +2 -2
  36. package/esm/models/windowsize.js +2 -2
  37. package/esm/models/windowsize.js.map +1 -1
  38. package/esm/tool-names.js +1 -1
  39. package/esm/tool-names.js.map +1 -1
  40. package/esm/tsconfig.tsbuildinfo +1 -1
  41. package/manifest.json +2 -2
  42. package/package.json +1 -1
  43. package/src/funcs/invoicesRecalculateInvoice.ts +2 -2
  44. package/src/lib/config.ts +3 -3
  45. package/src/mcp-server/mcp-server.ts +1 -1
  46. package/src/mcp-server/server.ts +1 -1
  47. package/src/mcp-server/tools/invoicesRecalculateInvoice.ts +2 -2
  48. package/src/mcp-server/tools.ts +1 -1
  49. package/src/models/dtofeatureresponse.ts +8 -0
  50. package/src/models/githubcomflexpriceflexpriceinternaldomainfeaturefeature.ts +5 -0
  51. package/src/models/groupentitytype.ts +17 -0
  52. package/src/models/groupgroup.ts +40 -0
  53. package/src/models/recalculateinvoiceop.ts +6 -6
  54. package/src/models/windowsize.ts +2 -2
  55. package/src/tool-names.ts +1 -1
package/manifest.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "sensitive": true
49
49
  }
50
50
  },
51
- "version": "2.0.2",
51
+ "version": "2.0.4",
52
52
  "tools": [
53
53
  {
54
54
  "name": "update-customer",
@@ -132,7 +132,7 @@
132
132
  },
133
133
  {
134
134
  "name": "recalculate-invoice",
135
- "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."
135
+ "description": "Recalculate invoice (voided invoice)\n\nStarts an async workflow that creates a fresh replacement invoice for a voided SUBSCRIPTION invoice (same billing period). Returns workflow_id and run_id; poll workflow status or GET the new invoice via recalculated_invoice_id after completion."
136
136
  },
137
137
  {
138
138
  "name": "recalculate-invoice-v2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexprice/mcp-server",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "author": "flexprice",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Recalculate invoice (default: voided invoice)
29
+ * Recalculate invoice (voided invoice)
30
30
  *
31
31
  * @remarks
32
- * Creates 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.
32
+ * Starts an async workflow that creates a fresh replacement invoice for a voided SUBSCRIPTION invoice (same billing period). Returns workflow_id and run_id; poll workflow status or GET the new invoice via recalculated_invoice_id after completion.
33
33
  */
34
34
  export function invoicesRecalculateInvoice(
35
35
  client$: FlexpriceCore,
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.0.2",
73
- genVersion: "2.852.1",
72
+ sdkVersion: "2.0.4",
73
+ genVersion: "2.858.2",
74
74
  userAgent:
75
- "speakeasy-sdk/mcp-typescript 2.0.2 2.852.1 1.0 @flexprice/mcp-server",
75
+ "speakeasy-sdk/mcp-typescript 2.0.4 2.858.2 1.0 @flexprice/mcp-server",
76
76
  } as const;
@@ -21,7 +21,7 @@ const routes = buildRouteMap({
21
21
  export const app = buildApplication(routes, {
22
22
  name: "mcp",
23
23
  versionInfo: {
24
- currentVersion: "2.0.2",
24
+ currentVersion: "2.0.4",
25
25
  },
26
26
  });
27
27
 
@@ -71,7 +71,7 @@ export function createMCPServer(deps: {
71
71
  }) {
72
72
  const server = new McpServer({
73
73
  name: "Flexprice",
74
- version: "2.0.2",
74
+ version: "2.0.4",
75
75
  });
76
76
 
77
77
  const getClient = deps.getSDK || (() =>
@@ -12,9 +12,9 @@ const args = {
12
12
 
13
13
  export const tool$invoicesRecalculateInvoice: ToolDefinition<typeof args> = {
14
14
  name: "recalculate-invoice",
15
- description: `Recalculate invoice (default: voided invoice)
15
+ description: `Recalculate invoice (voided invoice)
16
16
 
17
- Creates 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.`,
17
+ Starts an async workflow that creates a fresh replacement invoice for a voided SUBSCRIPTION invoice (same billing period). Returns workflow_id and run_id; poll workflow status or GET the new invoice via recalculated_invoice_id after completion.`,
18
18
  annotations: {
19
19
  "title": "",
20
20
  "destructiveHint": false,
@@ -401,7 +401,7 @@ export function buildSDK(
401
401
  ...cliFlags,
402
402
  "api-key-auth": resolveHeader(
403
403
  headers,
404
- "ApiKeyAuth",
404
+ "api-key-auth",
405
405
  z.string(),
406
406
  cliFlags["api-key-auth"],
407
407
  disableStaticAuth,
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { AlertSettings, AlertSettings$zodSchema } from "./alertsettings.js";
7
+ import {
8
+ DtoGroupResponse,
9
+ DtoGroupResponse$zodSchema,
10
+ } from "./dtogroupresponse.js";
7
11
  import {
8
12
  DtoMeterResponse,
9
13
  DtoMeterResponse$zodSchema,
@@ -18,6 +22,8 @@ export type DtoFeatureResponse = {
18
22
  created_by?: string | undefined;
19
23
  description?: string | undefined;
20
24
  environment_id?: string | undefined;
25
+ group?: DtoGroupResponse | undefined;
26
+ group_id?: string | undefined;
21
27
  id?: string | undefined;
22
28
  lookup_key?: string | undefined;
23
29
  metadata?: { [k: string]: string } | undefined;
@@ -41,6 +47,8 @@ export const DtoFeatureResponse$zodSchema: z.ZodType<DtoFeatureResponse> = z
41
47
  created_by: z.string().optional(),
42
48
  description: z.string().optional(),
43
49
  environment_id: z.string().optional(),
50
+ group: DtoGroupResponse$zodSchema.optional(),
51
+ group_id: z.string().optional(),
44
52
  id: z.string().optional(),
45
53
  lookup_key: z.string().optional(),
46
54
  metadata: z.record(z.string(), z.string()).optional(),
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod";
6
6
  import { AlertSettings, AlertSettings$zodSchema } from "./alertsettings.js";
7
7
  import { FeatureType, FeatureType$zodSchema } from "./featuretype.js";
8
+ import { GroupGroup, GroupGroup$zodSchema } from "./groupgroup.js";
8
9
  import { ReportingUnit, ReportingUnit$zodSchema } from "./reportingunit.js";
9
10
  import { Status, Status$zodSchema } from "./status.js";
10
11
 
@@ -14,6 +15,8 @@ export type GithubComFlexpriceFlexpriceInternalDomainFeatureFeature = {
14
15
  created_by?: string | undefined;
15
16
  description?: string | undefined;
16
17
  environment_id?: string | undefined;
18
+ group?: GroupGroup | undefined;
19
+ group_id?: string | undefined;
17
20
  id?: string | undefined;
18
21
  lookup_key?: string | undefined;
19
22
  metadata?: { [k: string]: string } | undefined;
@@ -37,6 +40,8 @@ export const GithubComFlexpriceFlexpriceInternalDomainFeatureFeature$zodSchema:
37
40
  created_by: z.string().optional(),
38
41
  description: z.string().optional(),
39
42
  environment_id: z.string().optional(),
43
+ group: GroupGroup$zodSchema.optional(),
44
+ group_id: z.string().optional(),
40
45
  id: z.string().optional(),
41
46
  lookup_key: z.string().optional(),
42
47
  metadata: z.record(z.string(), z.string()).optional(),
@@ -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 GroupEntityType = {
9
+ Price: "price",
10
+ Feature: "feature",
11
+ } as const;
12
+ export type GroupEntityType = ClosedEnum<typeof GroupEntityType>;
13
+
14
+ export const GroupEntityType$zodSchema = z.enum([
15
+ "price",
16
+ "feature",
17
+ ]);
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ GroupEntityType,
8
+ GroupEntityType$zodSchema,
9
+ } from "./groupentitytype.js";
10
+ import { Status, Status$zodSchema } from "./status.js";
11
+
12
+ export type GroupGroup = {
13
+ created_at?: string | undefined;
14
+ created_by?: string | undefined;
15
+ entity_type?: GroupEntityType | undefined;
16
+ environment_id?: string | undefined;
17
+ id?: string | undefined;
18
+ lookup_key?: string | undefined;
19
+ metadata?: { [k: string]: string } | undefined;
20
+ name?: string | undefined;
21
+ status?: Status | undefined;
22
+ tenant_id?: string | undefined;
23
+ updated_at?: string | undefined;
24
+ updated_by?: string | undefined;
25
+ };
26
+
27
+ export const GroupGroup$zodSchema: z.ZodType<GroupGroup> = z.object({
28
+ created_at: z.string().optional(),
29
+ created_by: z.string().optional(),
30
+ entity_type: GroupEntityType$zodSchema.optional(),
31
+ environment_id: z.string().optional(),
32
+ id: z.string().optional(),
33
+ lookup_key: z.string().optional(),
34
+ metadata: z.record(z.string(), z.string()).optional(),
35
+ name: z.string().optional(),
36
+ status: Status$zodSchema.optional(),
37
+ tenant_id: z.string().optional(),
38
+ updated_at: z.string().optional(),
39
+ updated_by: z.string().optional(),
40
+ });
@@ -3,14 +3,14 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import {
7
- DtoInvoiceResponse,
8
- DtoInvoiceResponse$zodSchema,
9
- } from "./dtoinvoiceresponse.js";
10
6
  import {
11
7
  ErrorsErrorResponse,
12
8
  ErrorsErrorResponse$zodSchema,
13
9
  } from "./errorserrorresponse.js";
10
+ import {
11
+ ModelsTemporalWorkflowResult,
12
+ ModelsTemporalWorkflowResult$zodSchema,
13
+ } from "./modelstemporalworkflowresult.js";
14
14
 
15
15
  export type RecalculateInvoiceRequest = { id: string };
16
16
 
@@ -21,12 +21,12 @@ export const RecalculateInvoiceRequest$zodSchema: z.ZodType<
21
21
  });
22
22
 
23
23
  export type RecalculateInvoiceResponse =
24
- | DtoInvoiceResponse
24
+ | ModelsTemporalWorkflowResult
25
25
  | ErrorsErrorResponse;
26
26
 
27
27
  export const RecalculateInvoiceResponse$zodSchema: z.ZodType<
28
28
  RecalculateInvoiceResponse
29
29
  > = z.union([
30
- DtoInvoiceResponse$zodSchema,
30
+ ModelsTemporalWorkflowResult$zodSchema,
31
31
  ErrorsErrorResponse$zodSchema,
32
32
  ]);
@@ -6,6 +6,7 @@ import * as z from "zod";
6
6
  import { ClosedEnum } from "../types/enums.js";
7
7
 
8
8
  export const WindowSize = {
9
+ Month: "MONTH",
9
10
  Minute: "MINUTE",
10
11
  FifteenMIN: "15MIN",
11
12
  ThirtyMIN: "30MIN",
@@ -15,11 +16,11 @@ export const WindowSize = {
15
16
  TwelveHOUR: "12HOUR",
16
17
  Day: "DAY",
17
18
  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",
23
24
  "MINUTE",
24
25
  "15MIN",
25
26
  "30MIN",
@@ -29,5 +30,4 @@ export const WindowSize$zodSchema = z.enum([
29
30
  "12HOUR",
30
31
  "DAY",
31
32
  "WEEK",
32
- "MONTH",
33
33
  ]);
package/src/tool-names.ts CHANGED
@@ -82,7 +82,7 @@ export const toolNames: Array<{ name: string; description: string }>= [
82
82
  },
83
83
  {
84
84
  "name": "recalculate-invoice",
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."
85
+ "description": "Recalculate invoice (voided invoice)\n\nStarts an async workflow that creates a fresh replacement invoice for a voided SUBSCRIPTION invoice (same billing period). Returns workflow_id and run_id; poll workflow status or GET the new invoice via recalculated_invoice_id after completion."
86
86
  },
87
87
  {
88
88
  "name": "recalculate-invoice-v2",