@flexprice/mcp-server 2.1.11 → 2.1.17

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 (88) hide show
  1. package/bin/mcp-server.js +67 -10
  2. package/bin/mcp-server.js.map +21 -19
  3. package/bun.lock +19 -19
  4. package/esm/lib/config.d.ts +3 -3
  5. package/esm/lib/config.js +3 -3
  6. package/esm/mcp-server/mcp-server.js +1 -1
  7. package/esm/mcp-server/server.js +1 -1
  8. package/esm/models/changedsubscription.d.ts +2 -0
  9. package/esm/models/changedsubscription.d.ts.map +1 -1
  10. package/esm/models/changedsubscription.js +2 -0
  11. package/esm/models/changedsubscription.js.map +1 -1
  12. package/esm/models/createinvoicelineitemrequest.d.ts +3 -0
  13. package/esm/models/createinvoicelineitemrequest.d.ts.map +1 -1
  14. package/esm/models/createinvoicelineitemrequest.js +3 -0
  15. package/esm/models/createinvoicelineitemrequest.js.map +1 -1
  16. package/esm/models/entityintegrationmappingresponse.d.ts +3 -0
  17. package/esm/models/entityintegrationmappingresponse.d.ts.map +1 -1
  18. package/esm/models/entityintegrationmappingresponse.js +1 -0
  19. package/esm/models/entityintegrationmappingresponse.js.map +1 -1
  20. package/esm/models/executesubscriptionmodifyrequest.d.ts +2 -0
  21. package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
  22. package/esm/models/executesubscriptionmodifyrequest.js +2 -0
  23. package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
  24. package/esm/models/invoicebillingreason.d.ts +2 -0
  25. package/esm/models/invoicebillingreason.d.ts.map +1 -1
  26. package/esm/models/invoicebillingreason.js +2 -0
  27. package/esm/models/invoicebillingreason.js.map +1 -1
  28. package/esm/models/invoicefilter.d.ts +3 -0
  29. package/esm/models/invoicefilter.d.ts.map +1 -1
  30. package/esm/models/invoicefilter.js +3 -0
  31. package/esm/models/invoicefilter.js.map +1 -1
  32. package/esm/models/invoicelineitemresponse.d.ts +2 -0
  33. package/esm/models/invoicelineitemresponse.d.ts.map +1 -1
  34. package/esm/models/invoicelineitemresponse.js +2 -0
  35. package/esm/models/invoicelineitemresponse.js.map +1 -1
  36. package/esm/models/priceprice.d.ts +1 -0
  37. package/esm/models/priceprice.d.ts.map +1 -1
  38. package/esm/models/priceprice.js +1 -0
  39. package/esm/models/priceprice.js.map +1 -1
  40. package/esm/models/priceresponse.d.ts +1 -0
  41. package/esm/models/priceresponse.d.ts.map +1 -1
  42. package/esm/models/priceresponse.js +1 -0
  43. package/esm/models/priceresponse.js.map +1 -1
  44. package/esm/models/submodifytrialendrequest.d.ts +8 -0
  45. package/esm/models/submodifytrialendrequest.d.ts.map +1 -0
  46. package/esm/models/submodifytrialendrequest.js +10 -0
  47. package/esm/models/submodifytrialendrequest.js.map +1 -0
  48. package/esm/models/subscriptionmodifytype.d.ts +2 -0
  49. package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
  50. package/esm/models/subscriptionmodifytype.js +2 -0
  51. package/esm/models/subscriptionmodifytype.js.map +1 -1
  52. package/esm/models/subscriptionresponse.d.ts +1 -0
  53. package/esm/models/subscriptionresponse.d.ts.map +1 -1
  54. package/esm/models/subscriptionresponse.js +1 -0
  55. package/esm/models/subscriptionresponse.js.map +1 -1
  56. package/esm/models/subscriptionresponsev2.d.ts +2 -0
  57. package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
  58. package/esm/models/subscriptionresponsev2.js +2 -0
  59. package/esm/models/subscriptionresponsev2.js.map +1 -1
  60. package/esm/models/trialendaction.d.ts +12 -0
  61. package/esm/models/trialendaction.d.ts.map +1 -0
  62. package/esm/models/trialendaction.js +13 -0
  63. package/esm/models/trialendaction.js.map +1 -0
  64. package/esm/models/userresponse.d.ts +3 -0
  65. package/esm/models/userresponse.d.ts.map +1 -1
  66. package/esm/models/userresponse.js +1 -0
  67. package/esm/models/userresponse.js.map +1 -1
  68. package/esm/tsconfig.tsbuildinfo +1 -1
  69. package/manifest.json +1 -1
  70. package/package.json +1 -1
  71. package/src/lib/config.ts +3 -3
  72. package/src/mcp-server/mcp-server.ts +1 -1
  73. package/src/mcp-server/server.ts +1 -1
  74. package/src/models/changedsubscription.ts +4 -0
  75. package/src/models/createinvoicelineitemrequest.ts +12 -0
  76. package/src/models/entityintegrationmappingresponse.ts +2 -0
  77. package/src/models/executesubscriptionmodifyrequest.ts +6 -0
  78. package/src/models/invoicebillingreason.ts +2 -0
  79. package/src/models/invoicefilter.ts +10 -0
  80. package/src/models/invoicelineitemresponse.ts +8 -0
  81. package/src/models/priceprice.ts +4 -0
  82. package/src/models/priceresponse.ts +4 -0
  83. package/src/models/submodifytrialendrequest.ts +20 -0
  84. package/src/models/subscriptionmodifytype.ts +2 -0
  85. package/src/models/subscriptionresponse.ts +4 -0
  86. package/src/models/subscriptionresponsev2.ts +8 -0
  87. package/src/models/trialendaction.ts +17 -0
  88. package/src/models/userresponse.ts +2 -0
package/manifest.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "sensitive": true
49
49
  }
50
50
  },
51
- "version": "2.1.11",
51
+ "version": "2.1.17",
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.11",
3
+ "version": "2.1.17",
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.11",
73
- genVersion: "2.884.4",
72
+ sdkVersion: "2.1.17",
73
+ genVersion: "2.893.0",
74
74
  userAgent:
75
- "speakeasy-sdk/mcp-typescript 2.1.11 2.884.4 1.0 @flexprice/mcp-server",
75
+ "speakeasy-sdk/mcp-typescript 2.1.17 2.893.0 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.1.11",
24
+ currentVersion: "2.1.17",
25
25
  },
26
26
  });
27
27
 
@@ -101,7 +101,7 @@ export function createMCPServer(deps: {
101
101
  }) {
102
102
  const server = new McpServer({
103
103
  name: "Flexprice",
104
- version: "2.1.11",
104
+ version: "2.1.17",
105
105
  });
106
106
 
107
107
  const getClient = deps.getSDK || (() =>
@@ -14,8 +14,10 @@ import {
14
14
 
15
15
  export type ChangedSubscription = {
16
16
  action?: ChangedSubscriptionAction | undefined;
17
+ current_period_end?: string | undefined;
17
18
  id?: string | undefined;
18
19
  status?: SubscriptionStatus | undefined;
20
+ trial_end?: string | undefined;
19
21
  };
20
22
 
21
23
  export const ChangedSubscription$zodSchema: z.ZodType<ChangedSubscription> = z
@@ -23,6 +25,8 @@ export const ChangedSubscription$zodSchema: z.ZodType<ChangedSubscription> = z
23
25
  action: ChangedSubscriptionAction$zodSchema.optional().describe(
24
26
  "created | updated",
25
27
  ),
28
+ current_period_end: z.iso.datetime({ offset: true }).optional(),
26
29
  id: z.string().optional(),
27
30
  status: SubscriptionStatus$zodSchema.optional(),
31
+ trial_end: z.iso.datetime({ offset: true }).optional(),
28
32
  });
@@ -6,6 +6,7 @@ import * as z from "zod";
6
6
  import { CommitmentInfo, CommitmentInfo$zodSchema } from "./commitmentinfo.js";
7
7
 
8
8
  export type CreateInvoiceLineItemRequest = {
9
+ adjusted_entitlement_quantity?: string | undefined;
9
10
  amount: string;
10
11
  commitment_info?: CommitmentInfo | undefined;
11
12
  display_name?: string | undefined;
@@ -26,11 +27,16 @@ export type CreateInvoiceLineItemRequest = {
26
27
  price_unit?: string | undefined;
27
28
  price_unit_amount?: string | undefined;
28
29
  quantity: string;
30
+ subscription_id?: string | undefined;
31
+ subscription_line_item_id?: string | undefined;
29
32
  };
30
33
 
31
34
  export const CreateInvoiceLineItemRequest$zodSchema: z.ZodType<
32
35
  CreateInvoiceLineItemRequest
33
36
  > = z.object({
37
+ adjusted_entitlement_quantity: z.string().optional().describe(
38
+ "adjusted_entitlement_quantity is the entitlement-covered units deducted from raw usage.",
39
+ ),
34
40
  amount: z.string().describe(
35
41
  "amount is the monetary amount for this line item",
36
42
  ),
@@ -87,4 +93,10 @@ export const CreateInvoiceLineItemRequest$zodSchema: z.ZodType<
87
93
  quantity: z.string().describe(
88
94
  "quantity is the quantity of units for this line item",
89
95
  ),
96
+ subscription_id: z.string().optional().describe(
97
+ "subscription_id overrides the invoice's subscription_id for this specific line item.\nUsed for grouped invoicing where child line items belong to child subscriptions.",
98
+ ),
99
+ subscription_line_item_id: z.string().optional().describe(
100
+ "sub_line_item_id links this line item to the subscription_line_item that generated it.",
101
+ ),
90
102
  });
@@ -16,6 +16,7 @@ export type EntityIntegrationMappingResponse = {
16
16
  entity_type?: IntegrationEntityType | undefined;
17
17
  environment_id?: string | undefined;
18
18
  id?: string | undefined;
19
+ metadata?: { [k: string]: any } | undefined;
19
20
  provider_entity_id?: string | undefined;
20
21
  provider_type?: string | undefined;
21
22
  status?: Status | undefined;
@@ -33,6 +34,7 @@ export const EntityIntegrationMappingResponse$zodSchema: z.ZodType<
33
34
  entity_type: IntegrationEntityType$zodSchema.optional(),
34
35
  environment_id: z.string().optional(),
35
36
  id: z.string().optional(),
37
+ metadata: z.record(z.string(), z.any()).optional(),
36
38
  provider_entity_id: z.string().optional(),
37
39
  provider_type: z.string().optional(),
38
40
  status: Status$zodSchema.optional(),
@@ -15,6 +15,10 @@ import {
15
15
  SubModifyQuantityChangeRequest,
16
16
  SubModifyQuantityChangeRequest$zodSchema,
17
17
  } from "./submodifyquantitychangerequest.js";
18
+ import {
19
+ SubModifyTrialEndRequest,
20
+ SubModifyTrialEndRequest$zodSchema,
21
+ } from "./submodifytrialendrequest.js";
18
22
  import {
19
23
  SubscriptionModifyType,
20
24
  SubscriptionModifyType$zodSchema,
@@ -24,6 +28,7 @@ export type ExecuteSubscriptionModifyRequest = {
24
28
  grouped_invoicing_params?: SubModifyGroupedInvoicingParams | undefined;
25
29
  inheritance_params?: SubModifyInheritanceRequest | undefined;
26
30
  quantity_change_params?: SubModifyQuantityChangeRequest | undefined;
31
+ trial_end_params?: SubModifyTrialEndRequest | undefined;
27
32
  type: SubscriptionModifyType;
28
33
  };
29
34
 
@@ -34,5 +39,6 @@ export const ExecuteSubscriptionModifyRequest$zodSchema: z.ZodType<
34
39
  .optional(),
35
40
  inheritance_params: SubModifyInheritanceRequest$zodSchema.optional(),
36
41
  quantity_change_params: SubModifyQuantityChangeRequest$zodSchema.optional(),
42
+ trial_end_params: SubModifyTrialEndRequest$zodSchema.optional(),
37
43
  type: SubscriptionModifyType$zodSchema,
38
44
  });
@@ -14,6 +14,7 @@ export const InvoiceBillingReason = {
14
14
  Proration: "PRORATION",
15
15
  Manual: "MANUAL",
16
16
  AutoInvoiceThreshold: "AUTO_INVOICE_THRESHOLD",
17
+ WalletAutoTopup: "WALLET_AUTO_TOPUP",
17
18
  } as const;
18
19
  export type InvoiceBillingReason = ClosedEnum<typeof InvoiceBillingReason>;
19
20
 
@@ -26,4 +27,5 @@ export const InvoiceBillingReason$zodSchema = z.enum([
26
27
  "PRORATION",
27
28
  "MANUAL",
28
29
  "AUTO_INVOICE_THRESHOLD",
30
+ "WALLET_AUTO_TOPUP",
29
31
  ]);
@@ -8,6 +8,10 @@ import {
8
8
  FilterCondition,
9
9
  FilterCondition$zodSchema,
10
10
  } from "./filtercondition.js";
11
+ import {
12
+ InvoiceBillingReason,
13
+ InvoiceBillingReason$zodSchema,
14
+ } from "./invoicebillingreason.js";
11
15
  import { InvoiceStatus, InvoiceStatus$zodSchema } from "./invoicestatus.js";
12
16
  import { InvoiceType, InvoiceType$zodSchema } from "./invoicetype.js";
13
17
  import { PaymentStatus, PaymentStatus$zodSchema } from "./paymentstatus.js";
@@ -28,6 +32,8 @@ export const InvoiceFilterOrder$zodSchema = z.enum([
28
32
  export type InvoiceFilter = {
29
33
  amount_due_gt?: number | undefined;
30
34
  amount_remaining_gt?: number | undefined;
35
+ billing_reason?: InvoiceBillingReason | undefined;
36
+ currency?: string | undefined;
31
37
  customer_id?: string | undefined;
32
38
  end_time?: string | undefined;
33
39
  expand?: string | undefined;
@@ -59,6 +65,10 @@ export const InvoiceFilter$zodSchema: z.ZodType<InvoiceFilter> = z.object({
59
65
  amount_remaining_gt: z.number().optional().describe(
60
66
  "amount_remaining_gt filters invoices with an outstanding balance greater than the specified value\nUseful for finding invoices that still have significant unpaid amounts",
61
67
  ),
68
+ billing_reason: InvoiceBillingReason$zodSchema.optional(),
69
+ currency: z.string().optional().describe(
70
+ "currency filters invoices by their currency (ISO 4217 code, e.g. \"usd\", \"eur\").\nMatches on the invoices.currency column exactly.",
71
+ ),
62
72
  customer_id: z.string().optional().describe(
63
73
  "customer_id filters invoices for a specific customer using FlexPrice's internal customer ID\nThis is the ID returned by FlexPrice when creating or retrieving customers",
64
74
  ),
@@ -15,6 +15,7 @@ import {
15
15
  } from "./usagebreakdownitem.js";
16
16
 
17
17
  export type InvoiceLineItemResponse = {
18
+ adjusted_entitlement_quantity?: string | undefined;
18
19
  amount?: string | undefined;
19
20
  commitment_info?: CommitmentInfo | undefined;
20
21
  created_at?: string | undefined;
@@ -44,6 +45,7 @@ export type InvoiceLineItemResponse = {
44
45
  quantity?: string | undefined;
45
46
  status?: Status | undefined;
46
47
  subscription_id?: string | undefined;
48
+ subscription_line_item_id?: string | undefined;
47
49
  tenant_id?: string | undefined;
48
50
  updated_at?: string | undefined;
49
51
  updated_by?: string | undefined;
@@ -54,6 +56,9 @@ export type InvoiceLineItemResponse = {
54
56
  export const InvoiceLineItemResponse$zodSchema: z.ZodType<
55
57
  InvoiceLineItemResponse
56
58
  > = z.object({
59
+ adjusted_entitlement_quantity: z.string().optional().describe(
60
+ "adjusted_entitlement_quantity is the entitlement-covered portion deducted from raw usage.\nNil when no entitlement was applied. Raw usage = Quantity + AdjustedEntitlementQuantity.",
61
+ ),
57
62
  amount: z.string().optional(),
58
63
  commitment_info: CommitmentInfo$zodSchema.optional(),
59
64
  created_at: z.iso.datetime({ offset: true }).optional(),
@@ -89,6 +94,9 @@ export const InvoiceLineItemResponse$zodSchema: z.ZodType<
89
94
  quantity: z.string().optional(),
90
95
  status: Status$zodSchema.optional(),
91
96
  subscription_id: z.string().optional(),
97
+ subscription_line_item_id: z.string().optional().describe(
98
+ "sub_line_item_id links this invoice line item to the subscription_line_item that generated it.",
99
+ ),
92
100
  tenant_id: z.string().optional(),
93
101
  updated_at: z.iso.datetime({ offset: true }).optional(),
94
102
  updated_by: z.string().optional(),
@@ -52,6 +52,7 @@ export type PricePrice = {
52
52
  price_unit_id?: string | undefined;
53
53
  price_unit_tiers?: Array<PricePriceTier> | undefined;
54
54
  price_unit_type?: PriceUnitType | undefined;
55
+ sequence?: number | undefined;
55
56
  start_date?: string | undefined;
56
57
  status?: Status | undefined;
57
58
  tenant_id?: string | undefined;
@@ -133,6 +134,9 @@ export const PricePrice$zodSchema: z.ZodType<PricePrice> = z.object({
133
134
  "PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED",
134
135
  ),
135
136
  price_unit_type: PriceUnitType$zodSchema.optional(),
137
+ sequence: z.int().optional().describe(
138
+ "Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits.",
139
+ ),
136
140
  start_date: z.iso.datetime({ offset: true }).optional().describe(
137
141
  "StartDate is the start date of the price",
138
142
  ),
@@ -65,6 +65,7 @@ export type PriceResponse = {
65
65
  price_unit_tiers?: Array<PricePriceTier> | undefined;
66
66
  price_unit_type?: PriceUnitType | undefined;
67
67
  pricing_unit?: PriceUnitResponse | undefined;
68
+ sequence?: number | undefined;
68
69
  start_date?: string | undefined;
69
70
  status?: Status | undefined;
70
71
  tenant_id?: string | undefined;
@@ -151,6 +152,9 @@ export const PriceResponse$zodSchema: z.ZodType<PriceResponse> = z.object({
151
152
  ),
152
153
  price_unit_type: PriceUnitType$zodSchema.optional(),
153
154
  pricing_unit: PriceUnitResponse$zodSchema.optional(),
155
+ sequence: z.int().optional().describe(
156
+ "Sequence is the monotonic stamp bumped on every state change that\nsubscription line items need to react to. Read by the plan-price sync;\nset by the database (DEFAULT nextval) on create and by the price\nrepository on termination / compatibility-affecting edits.",
157
+ ),
154
158
  start_date: z.iso.datetime({ offset: true }).optional().describe(
155
159
  "StartDate is the start date of the price",
156
160
  ),
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { TrialEndAction, TrialEndAction$zodSchema } from "./trialendaction.js";
7
+
8
+ export type SubModifyTrialEndRequest = {
9
+ action: TrialEndAction;
10
+ new_trial_end?: string | undefined;
11
+ };
12
+
13
+ export const SubModifyTrialEndRequest$zodSchema: z.ZodType<
14
+ SubModifyTrialEndRequest
15
+ > = z.object({
16
+ action: TrialEndAction$zodSchema,
17
+ new_trial_end: z.iso.datetime({ offset: true }).optional().describe(
18
+ "NewTrialEnd is the new trial end date. Required when action is \"scheduled_date\".",
19
+ ),
20
+ });
@@ -9,6 +9,7 @@ export const SubscriptionModifyType = {
9
9
  Inheritance: "inheritance",
10
10
  QuantityChange: "quantity_change",
11
11
  GroupedInvoicing: "grouped_invoicing",
12
+ TrialEnd: "trial_end",
12
13
  } as const;
13
14
  export type SubscriptionModifyType = ClosedEnum<typeof SubscriptionModifyType>;
14
15
 
@@ -16,4 +17,5 @@ export const SubscriptionModifyType$zodSchema = z.enum([
16
17
  "inheritance",
17
18
  "quantity_change",
18
19
  "grouped_invoicing",
20
+ "trial_end",
19
21
  ]);
@@ -99,6 +99,7 @@ export type SubscriptionResponse = {
99
99
  status?: Status | undefined;
100
100
  subscription_status?: SubscriptionStatus | undefined;
101
101
  subscription_type?: SubscriptionType | undefined;
102
+ synced_price_sequence?: number | undefined;
102
103
  tenant_id?: string | undefined;
103
104
  trial_end?: string | undefined;
104
105
  trial_start?: string | undefined;
@@ -213,6 +214,9 @@ export const SubscriptionResponse$zodSchema: z.ZodType<SubscriptionResponse> = z
213
214
  status: Status$zodSchema.optional(),
214
215
  subscription_status: SubscriptionStatus$zodSchema.optional(),
215
216
  subscription_type: SubscriptionType$zodSchema.optional(),
217
+ synced_price_sequence: z.int().optional().describe(
218
+ "SyncedPriceSequence is the plan-price sequence up to which this\nsubscription's line items have been reconciled. Bumped by the\nplan-price sync after a successful pass.",
219
+ ),
216
220
  tenant_id: z.string().optional(),
217
221
  trial_end: z.iso.datetime({ offset: true }).optional().describe(
218
222
  "TrialEnd is the end date of the trial period",
@@ -89,11 +89,13 @@ export type SubscriptionResponseV2 = {
89
89
  phases?: Array<SubscriptionPhaseResponse> | undefined;
90
90
  plan?: PlanResponse | undefined;
91
91
  plan_id?: string | undefined;
92
+ plan_prices_out_of_sync?: boolean | undefined;
92
93
  proration_behavior?: ProrationBehavior | undefined;
93
94
  start_date?: string | undefined;
94
95
  status?: Status | undefined;
95
96
  subscription_status?: SubscriptionStatus | undefined;
96
97
  subscription_type?: SubscriptionType | undefined;
98
+ synced_price_sequence?: number | undefined;
97
99
  tenant_id?: string | undefined;
98
100
  trial_end?: string | undefined;
99
101
  trial_start?: string | undefined;
@@ -206,6 +208,9 @@ export const SubscriptionResponseV2$zodSchema: z.ZodType<
206
208
  plan_id: z.string().optional().describe(
207
209
  "PlanID is the identifier for the plan in our system",
208
210
  ),
211
+ plan_prices_out_of_sync: z.boolean().optional().describe(
212
+ "PlanPricesOutOfSync is true when the subscription's synced_price_sequence\nis behind the plan's current max prices.sequence — i.e. plan-price\nchanges have not yet been reconciled into this subscription's line items.",
213
+ ),
209
214
  proration_behavior: ProrationBehavior$zodSchema.optional(),
210
215
  start_date: z.iso.datetime({ offset: true }).optional().describe(
211
216
  "StartDate is the start date of the subscription",
@@ -213,6 +218,9 @@ export const SubscriptionResponseV2$zodSchema: z.ZodType<
213
218
  status: Status$zodSchema.optional(),
214
219
  subscription_status: SubscriptionStatus$zodSchema.optional(),
215
220
  subscription_type: SubscriptionType$zodSchema.optional(),
221
+ synced_price_sequence: z.int().optional().describe(
222
+ "SyncedPriceSequence is the plan-price sequence up to which this\nsubscription's line items have been reconciled. Bumped by the\nplan-price sync after a successful pass.",
223
+ ),
216
224
  tenant_id: z.string().optional(),
217
225
  trial_end: z.iso.datetime({ offset: true }).optional().describe(
218
226
  "TrialEnd is the end date of the trial period",
@@ -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 TrialEndAction = {
9
+ Immediate: "immediate",
10
+ ScheduledDate: "scheduled_date",
11
+ } as const;
12
+ export type TrialEndAction = ClosedEnum<typeof TrialEndAction>;
13
+
14
+ export const TrialEndAction$zodSchema = z.enum([
15
+ "immediate",
16
+ "scheduled_date",
17
+ ]);
@@ -9,6 +9,7 @@ import { UserType, UserType$zodSchema } from "./usertype.js";
9
9
  export type UserResponse = {
10
10
  email?: string | undefined;
11
11
  id?: string | undefined;
12
+ metadata?: { [k: string]: string } | undefined;
12
13
  roles?: Array<string> | undefined;
13
14
  tenant?: TenantResponse | undefined;
14
15
  type?: UserType | undefined;
@@ -17,6 +18,7 @@ export type UserResponse = {
17
18
  export const UserResponse$zodSchema: z.ZodType<UserResponse> = z.object({
18
19
  email: z.string().optional().describe("Empty for service accounts"),
19
20
  id: z.string().optional(),
21
+ metadata: z.record(z.string(), z.string()).optional(),
20
22
  roles: z.array(z.string()).optional(),
21
23
  tenant: TenantResponse$zodSchema.optional(),
22
24
  type: UserType$zodSchema.optional(),