@flexprice/mcp-server 2.1.4 → 2.1.5

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 (79) hide show
  1. package/bin/mcp-server.js +40 -24
  2. package/bin/mcp-server.js.map +18 -18
  3. package/bun.lock +34 -32
  4. package/esm/lib/config.d.ts +3 -3
  5. package/esm/lib/config.js +3 -3
  6. package/esm/lib/sdks.js +0 -2
  7. package/esm/lib/sdks.js.map +1 -1
  8. package/esm/mcp-server/mcp-server.js +1 -1
  9. package/esm/mcp-server/server.js +1 -1
  10. package/esm/models/addaddonrequest.d.ts +4 -0
  11. package/esm/models/addaddonrequest.d.ts.map +1 -1
  12. package/esm/models/addaddonrequest.js +4 -0
  13. package/esm/models/addaddonrequest.js.map +1 -1
  14. package/esm/models/addaddontosubscriptionrequest.d.ts +4 -0
  15. package/esm/models/addaddontosubscriptionrequest.d.ts.map +1 -1
  16. package/esm/models/addaddontosubscriptionrequest.js +4 -0
  17. package/esm/models/addaddontosubscriptionrequest.js.map +1 -1
  18. package/esm/models/addon.d.ts +0 -2
  19. package/esm/models/addon.d.ts.map +1 -1
  20. package/esm/models/addon.js +0 -2
  21. package/esm/models/addon.js.map +1 -1
  22. package/esm/models/addoncadence.d.ts +12 -0
  23. package/esm/models/addoncadence.d.ts.map +1 -0
  24. package/esm/models/addoncadence.js +13 -0
  25. package/esm/models/addoncadence.js.map +1 -0
  26. package/esm/models/addonresponse.d.ts +0 -2
  27. package/esm/models/addonresponse.d.ts.map +1 -1
  28. package/esm/models/addonresponse.js +0 -2
  29. package/esm/models/addonresponse.js.map +1 -1
  30. package/esm/models/addonstatus.d.ts +2 -2
  31. package/esm/models/addonstatus.js +2 -2
  32. package/esm/models/addonstatus.js.map +1 -1
  33. package/esm/models/createsubscriptionlineitemrequest.d.ts +2 -0
  34. package/esm/models/createsubscriptionlineitemrequest.d.ts.map +1 -1
  35. package/esm/models/createsubscriptionlineitemrequest.js +2 -0
  36. package/esm/models/createsubscriptionlineitemrequest.js.map +1 -1
  37. package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
  38. package/esm/models/deletesubscriptionlineitemrequest.d.ts +2 -0
  39. package/esm/models/deletesubscriptionlineitemrequest.d.ts.map +1 -1
  40. package/esm/models/deletesubscriptionlineitemrequest.js +2 -0
  41. package/esm/models/deletesubscriptionlineitemrequest.js.map +1 -1
  42. package/esm/models/removeaddonrequest.d.ts +3 -0
  43. package/esm/models/removeaddonrequest.d.ts.map +1 -1
  44. package/esm/models/removeaddonrequest.js +3 -0
  45. package/esm/models/removeaddonrequest.js.map +1 -1
  46. package/esm/models/subscriptionlineitemresponse.d.ts +1 -0
  47. package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
  48. package/esm/models/subscriptionlineitemresponse.js +1 -0
  49. package/esm/models/subscriptionlineitemresponse.js.map +1 -1
  50. package/esm/models/subscriptionsubscriptionlineitem.d.ts +1 -0
  51. package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
  52. package/esm/models/subscriptionsubscriptionlineitem.js +1 -0
  53. package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
  54. package/esm/models/windowsize.d.ts +2 -2
  55. package/esm/models/windowsize.js +2 -2
  56. package/esm/models/windowsize.js.map +1 -1
  57. package/esm/tsconfig.tsbuildinfo +1 -1
  58. package/manifest.json +1 -1
  59. package/package.json +1 -1
  60. package/src/lib/config.ts +3 -3
  61. package/src/lib/sdks.ts +0 -2
  62. package/src/mcp-server/mcp-server.ts +1 -1
  63. package/src/mcp-server/server.ts +1 -1
  64. package/src/models/addaddonrequest.ts +9 -0
  65. package/src/models/addaddontosubscriptionrequest.ts +9 -0
  66. package/src/models/addon.ts +0 -3
  67. package/src/models/{addontype.ts → addoncadence.ts} +5 -5
  68. package/src/models/addonresponse.ts +0 -3
  69. package/src/models/addonstatus.ts +2 -2
  70. package/src/models/createsubscriptionlineitemrequest.ts +6 -0
  71. package/src/models/deletesubscriptionlineitemrequest.ts +6 -0
  72. package/src/models/removeaddonrequest.ts +10 -0
  73. package/src/models/subscriptionlineitemresponse.ts +2 -0
  74. package/src/models/subscriptionsubscriptionlineitem.ts +2 -0
  75. package/src/models/windowsize.ts +2 -2
  76. package/esm/models/addontype.d.ts +0 -12
  77. package/esm/models/addontype.d.ts.map +0 -1
  78. package/esm/models/addontype.js +0 -13
  79. package/esm/models/addontype.js.map +0 -1
package/manifest.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "sensitive": true
49
49
  }
50
50
  },
51
- "version": "2.1.4",
51
+ "version": "2.1.5",
52
52
  "tools": [
53
53
  {
54
54
  "name": "update-customer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexprice/mcp-server",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "author": "flexprice",
5
5
  "type": "module",
6
6
  "sideEffects": false,
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.4",
73
- genVersion: "2.881.0",
72
+ sdkVersion: "2.1.5",
73
+ genVersion: "2.881.4",
74
74
  userAgent:
75
- "speakeasy-sdk/mcp-typescript 2.1.4 2.881.0 1.0 @flexprice/mcp-server",
75
+ "speakeasy-sdk/mcp-typescript 2.1.5 2.881.4 1.0 @flexprice/mcp-server",
76
76
  } as const;
package/src/lib/sdks.ts CHANGED
@@ -379,8 +379,6 @@ async function logResponse(
379
379
  break;
380
380
  case matchContentType(res, "application/jsonl")
381
381
  || jsonlLikeContentTypeRE.test(ct):
382
- logger.log(await res.clone().text());
383
- break;
384
382
  case matchContentType(res, "text/event-stream"):
385
383
  logger.log(`<${contentType}>`);
386
384
  break;
@@ -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.4",
24
+ currentVersion: "2.1.5",
25
25
  },
26
26
  });
27
27
 
@@ -104,7 +104,7 @@ export function createMCPServer(deps: {
104
104
  }) {
105
105
  const server = new McpServer({
106
106
  name: "Flexprice",
107
- version: "2.1.4",
107
+ version: "2.1.5",
108
108
  });
109
109
 
110
110
  const getClient = deps.getSDK || (() =>
@@ -3,21 +3,29 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { AddonCadence, AddonCadence$zodSchema } from "./addoncadence.js";
6
7
  import {
7
8
  LineItemCommitmentConfig,
8
9
  LineItemCommitmentConfig$zodSchema,
9
10
  } from "./lineitemcommitmentconfig.js";
11
+ import {
12
+ ProrationBehavior,
13
+ ProrationBehavior$zodSchema,
14
+ } from "./prorationbehavior.js";
10
15
 
11
16
  export type AddAddonRequest = {
12
17
  addon_id: string;
18
+ cadence?: AddonCadence | undefined;
13
19
  line_item_commitments?: { [k: string]: LineItemCommitmentConfig } | undefined;
14
20
  metadata?: { [k: string]: any } | undefined;
21
+ proration_behavior?: ProrationBehavior | undefined;
15
22
  start_date?: string | undefined;
16
23
  subscription_id: string;
17
24
  };
18
25
 
19
26
  export const AddAddonRequest$zodSchema: z.ZodType<AddAddonRequest> = z.object({
20
27
  addon_id: z.string(),
28
+ cadence: AddonCadence$zodSchema.optional(),
21
29
  line_item_commitments: z.record(
22
30
  z.string(),
23
31
  LineItemCommitmentConfig$zodSchema,
@@ -25,6 +33,7 @@ export const AddAddonRequest$zodSchema: z.ZodType<AddAddonRequest> = z.object({
25
33
  "LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id)",
26
34
  ),
27
35
  metadata: z.record(z.string(), z.any()).optional(),
36
+ proration_behavior: ProrationBehavior$zodSchema.optional(),
28
37
  start_date: z.iso.datetime({ offset: true }).optional(),
29
38
  subscription_id: z.string(),
30
39
  });
@@ -3,15 +3,22 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { AddonCadence, AddonCadence$zodSchema } from "./addoncadence.js";
6
7
  import {
7
8
  LineItemCommitmentConfig,
8
9
  LineItemCommitmentConfig$zodSchema,
9
10
  } from "./lineitemcommitmentconfig.js";
11
+ import {
12
+ ProrationBehavior,
13
+ ProrationBehavior$zodSchema,
14
+ } from "./prorationbehavior.js";
10
15
 
11
16
  export type AddAddonToSubscriptionRequest = {
12
17
  addon_id: string;
18
+ cadence?: AddonCadence | undefined;
13
19
  line_item_commitments?: { [k: string]: LineItemCommitmentConfig } | undefined;
14
20
  metadata?: { [k: string]: any } | undefined;
21
+ proration_behavior?: ProrationBehavior | undefined;
15
22
  start_date?: string | undefined;
16
23
  };
17
24
 
@@ -19,6 +26,7 @@ export const AddAddonToSubscriptionRequest$zodSchema: z.ZodType<
19
26
  AddAddonToSubscriptionRequest
20
27
  > = z.object({
21
28
  addon_id: z.string(),
29
+ cadence: AddonCadence$zodSchema.optional(),
22
30
  line_item_commitments: z.record(
23
31
  z.string(),
24
32
  LineItemCommitmentConfig$zodSchema,
@@ -26,5 +34,6 @@ export const AddAddonToSubscriptionRequest$zodSchema: z.ZodType<
26
34
  "LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id)",
27
35
  ),
28
36
  metadata: z.record(z.string(), z.any()).optional(),
37
+ proration_behavior: ProrationBehavior$zodSchema.optional(),
29
38
  start_date: z.iso.datetime({ offset: true }).optional(),
30
39
  });
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import { AddonType, AddonType$zodSchema } from "./addontype.js";
7
6
  import { Status, Status$zodSchema } from "./status.js";
8
7
 
9
8
  export type Addon = {
@@ -17,7 +16,6 @@ export type Addon = {
17
16
  name?: string | undefined;
18
17
  status?: Status | undefined;
19
18
  tenant_id?: string | undefined;
20
- type?: AddonType | undefined;
21
19
  updated_at?: string | undefined;
22
20
  updated_by?: string | undefined;
23
21
  };
@@ -33,7 +31,6 @@ export const Addon$zodSchema: z.ZodType<Addon> = z.object({
33
31
  name: z.string().optional(),
34
32
  status: Status$zodSchema.optional(),
35
33
  tenant_id: z.string().optional(),
36
- type: AddonType$zodSchema.optional(),
37
34
  updated_at: z.iso.datetime({ offset: true }).optional(),
38
35
  updated_by: z.string().optional(),
39
36
  });
@@ -5,13 +5,13 @@
5
5
  import * as z from "zod";
6
6
  import { ClosedEnum } from "../types/enums.js";
7
7
 
8
- export const AddonType = {
8
+ export const AddonCadence = {
9
9
  Onetime: "onetime",
10
- MultipleInstance: "multiple_instance",
10
+ Recurring: "recurring",
11
11
  } as const;
12
- export type AddonType = ClosedEnum<typeof AddonType>;
12
+ export type AddonCadence = ClosedEnum<typeof AddonCadence>;
13
13
 
14
- export const AddonType$zodSchema = z.enum([
14
+ export const AddonCadence$zodSchema = z.enum([
15
15
  "onetime",
16
- "multiple_instance",
16
+ "recurring",
17
17
  ]);
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import { AddonType, AddonType$zodSchema } from "./addontype.js";
7
6
  import {
8
7
  EntitlementResponse,
9
8
  EntitlementResponse$zodSchema,
@@ -24,7 +23,6 @@ export type AddonResponse = {
24
23
  prices?: Array<PriceResponse> | undefined;
25
24
  status?: Status | undefined;
26
25
  tenant_id?: string | undefined;
27
- type?: AddonType | undefined;
28
26
  updated_at?: string | undefined;
29
27
  updated_by?: string | undefined;
30
28
  };
@@ -44,7 +42,6 @@ export const AddonResponse$zodSchema: z.ZodType<AddonResponse> = z.object({
44
42
  ),
45
43
  status: Status$zodSchema.optional(),
46
44
  tenant_id: z.string().optional(),
47
- type: AddonType$zodSchema.optional(),
48
45
  updated_at: z.iso.datetime({ offset: true }).optional(),
49
46
  updated_by: z.string().optional(),
50
47
  });
@@ -8,12 +8,12 @@ import { ClosedEnum } from "../types/enums.js";
8
8
  export const AddonStatus = {
9
9
  Active: "active",
10
10
  Cancelled: "cancelled",
11
- Paused: "paused",
11
+ Pending: "pending",
12
12
  } as const;
13
13
  export type AddonStatus = ClosedEnum<typeof AddonStatus>;
14
14
 
15
15
  export const AddonStatus$zodSchema = z.enum([
16
16
  "active",
17
17
  "cancelled",
18
- "paused",
18
+ "pending",
19
19
  ]);
@@ -5,6 +5,10 @@
5
5
  import * as z from "zod";
6
6
  import { BillingPeriod, BillingPeriod$zodSchema } from "./billingperiod.js";
7
7
  import { CommitmentType, CommitmentType$zodSchema } from "./commitmenttype.js";
8
+ import {
9
+ ProrationBehavior,
10
+ ProrationBehavior$zodSchema,
11
+ } from "./prorationbehavior.js";
8
12
  import {
9
13
  SubscriptionPriceCreateRequest,
10
14
  SubscriptionPriceCreateRequest$zodSchema,
@@ -23,6 +27,7 @@ export type CreateSubscriptionLineItemRequest = {
23
27
  metadata?: { [k: string]: string } | undefined;
24
28
  price?: SubscriptionPriceCreateRequest | undefined;
25
29
  price_id?: string | undefined;
30
+ proration_behavior?: ProrationBehavior | undefined;
26
31
  quantity?: number | undefined;
27
32
  start_date?: string | undefined;
28
33
  subscription_phase_id?: string | undefined;
@@ -45,6 +50,7 @@ export const CreateSubscriptionLineItemRequest$zodSchema: z.ZodType<
45
50
  price_id: z.string().optional().describe(
46
51
  "PriceID references an existing price (plan, addon, or subscription-scoped). Exactly one of price_id or price must be set.",
47
52
  ),
53
+ proration_behavior: ProrationBehavior$zodSchema.optional(),
48
54
  quantity: z.number().optional(),
49
55
  start_date: z.iso.datetime({ offset: true }).optional(),
50
56
  subscription_phase_id: z.string().optional(),
@@ -3,13 +3,19 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import {
7
+ ProrationBehavior,
8
+ ProrationBehavior$zodSchema,
9
+ } from "./prorationbehavior.js";
6
10
 
7
11
  export type DeleteSubscriptionLineItemRequest = {
8
12
  effective_from?: string | undefined;
13
+ proration_behavior?: ProrationBehavior | undefined;
9
14
  };
10
15
 
11
16
  export const DeleteSubscriptionLineItemRequest$zodSchema: z.ZodType<
12
17
  DeleteSubscriptionLineItemRequest
13
18
  > = z.object({
14
19
  effective_from: z.string().optional(),
20
+ proration_behavior: ProrationBehavior$zodSchema.optional(),
15
21
  });
@@ -3,14 +3,24 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import {
7
+ ProrationBehavior,
8
+ ProrationBehavior$zodSchema,
9
+ } from "./prorationbehavior.js";
6
10
 
7
11
  export type RemoveAddonRequest = {
8
12
  addon_association_id: string;
13
+ effective_date?: string | undefined;
14
+ proration_behavior?: ProrationBehavior | undefined;
9
15
  reason?: string | undefined;
10
16
  };
11
17
 
12
18
  export const RemoveAddonRequest$zodSchema: z.ZodType<RemoveAddonRequest> = z
13
19
  .object({
14
20
  addon_association_id: z.string(),
21
+ effective_date: z.iso.datetime({ offset: true }).optional().describe(
22
+ "EffectiveDate is the date the cancellation takes effect.\nWhen nil the addon is cancelled at the end of the current period.\nWhen provided it must fall within [CurrentPeriodStart, CurrentPeriodEnd]; mid-period\nvalues combined with create_prorations will issue a wallet credit for unused time.",
23
+ ),
24
+ proration_behavior: ProrationBehavior$zodSchema.optional(),
15
25
  reason: z.string().optional(),
16
26
  });
@@ -15,6 +15,7 @@ import {
15
15
  } from "./subscriptionlineitementitytype.js";
16
16
 
17
17
  export type SubscriptionLineItemResponse = {
18
+ addon_association_id?: string | undefined;
18
19
  billing_period?: BillingPeriod | undefined;
19
20
  billing_period_count?: number | undefined;
20
21
  commitment_amount?: string | undefined;
@@ -58,6 +59,7 @@ export type SubscriptionLineItemResponse = {
58
59
  export const SubscriptionLineItemResponse$zodSchema: z.ZodType<
59
60
  SubscriptionLineItemResponse
60
61
  > = z.object({
62
+ addon_association_id: z.string().optional(),
61
63
  billing_period: BillingPeriod$zodSchema.optional(),
62
64
  billing_period_count: z.int().optional().describe(
63
65
  "from price at create; default 1",
@@ -15,6 +15,7 @@ import {
15
15
  } from "./subscriptionlineitementitytype.js";
16
16
 
17
17
  export type SubscriptionSubscriptionLineItem = {
18
+ addon_association_id?: string | undefined;
18
19
  billing_period?: BillingPeriod | undefined;
19
20
  billing_period_count?: number | undefined;
20
21
  commitment_amount?: string | undefined;
@@ -58,6 +59,7 @@ export type SubscriptionSubscriptionLineItem = {
58
59
  export const SubscriptionSubscriptionLineItem$zodSchema: z.ZodType<
59
60
  SubscriptionSubscriptionLineItem
60
61
  > = z.object({
62
+ addon_association_id: z.string().optional(),
61
63
  billing_period: BillingPeriod$zodSchema.optional(),
62
64
  billing_period_count: z.int().optional().describe(
63
65
  "from price at create; default 1",
@@ -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
  ]);
@@ -1,12 +0,0 @@
1
- import * as z from "zod";
2
- import { ClosedEnum } from "../types/enums.js";
3
- export declare const AddonType: {
4
- readonly Onetime: "onetime";
5
- readonly MultipleInstance: "multiple_instance";
6
- };
7
- export type AddonType = ClosedEnum<typeof AddonType>;
8
- export declare const AddonType$zodSchema: z.ZodEnum<{
9
- onetime: "onetime";
10
- multiple_instance: "multiple_instance";
11
- }>;
12
- //# sourceMappingURL=addontype.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addontype.d.ts","sourceRoot":"","sources":["../../src/models/addontype.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAErD,eAAO,MAAM,mBAAmB;;;EAG9B,CAAC"}
@@ -1,13 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod";
5
- export const AddonType = {
6
- Onetime: "onetime",
7
- MultipleInstance: "multiple_instance",
8
- };
9
- export const AddonType$zodSchema = z.enum([
10
- "onetime",
11
- "multiple_instance",
12
- ]);
13
- //# sourceMappingURL=addontype.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addontype.js","sourceRoot":"","sources":["../../src/models/addontype.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,mBAAmB;CAC7B,CAAC;AAGX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC;IACxC,SAAS;IACT,mBAAmB;CACpB,CAAC,CAAC"}