@flexprice/sdk 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 (217) hide show
  1. package/docs/sdk/models/changed-subscription.md +7 -5
  2. package/docs/sdk/models/create-invoice-line-item-request.md +25 -22
  3. package/docs/sdk/models/create-user-response.md +1 -0
  4. package/docs/sdk/models/entity-integration-mapping-response.md +1 -0
  5. package/docs/sdk/models/entity-sync-config.md +16 -0
  6. package/docs/sdk/models/execute-subscription-modify-request-request.md +1 -1
  7. package/docs/sdk/models/execute-subscription-modify-request.md +1 -0
  8. package/docs/sdk/models/get-entity-integration-mappings-request.md +19 -0
  9. package/docs/sdk/models/integration-config-entry.md +17 -0
  10. package/docs/sdk/models/integration-config-response.md +15 -0
  11. package/docs/sdk/models/invoice-billing-reason.md +1 -1
  12. package/docs/sdk/models/invoice-filter.md +2 -0
  13. package/docs/sdk/models/invoice-line-item-response.md +38 -36
  14. package/docs/sdk/models/invoice-sync-settings.md +15 -0
  15. package/docs/sdk/models/list-entity-integration-mappings-response.md +16 -0
  16. package/docs/sdk/models/payment-gateway-type.md +1 -1
  17. package/docs/sdk/models/preview-subscription-modify-request.md +1 -1
  18. package/docs/sdk/models/price-price.md +43 -42
  19. package/docs/sdk/models/price-response.md +48 -47
  20. package/docs/sdk/models/s3-export-config.md +20 -0
  21. package/docs/sdk/models/secret-provider.md +1 -1
  22. package/docs/sdk/models/sub-modify-trial-end-request.md +18 -0
  23. package/docs/sdk/models/subscription-modify-type.md +2 -2
  24. package/docs/sdk/models/subscription-response-v2.md +2 -0
  25. package/docs/sdk/models/subscription-response.md +1 -0
  26. package/docs/sdk/models/sync-config.md +23 -0
  27. package/docs/sdk/models/trial-end-action.md +15 -0
  28. package/docs/sdk/models/update-user-request.md +15 -0
  29. package/docs/sdk/models/update-user-response.md +20 -0
  30. package/docs/sdk/models/user-response.md +1 -0
  31. package/docs/sdks/integrations/README.md +143 -0
  32. package/docs/sdks/subscriptions/README.md +2 -2
  33. package/docs/sdks/users/README.md +72 -0
  34. package/esm/funcs/integrations-get-entity-integration-mappings.d.ts +17 -0
  35. package/esm/funcs/integrations-get-entity-integration-mappings.d.ts.map +1 -0
  36. package/esm/funcs/integrations-get-entity-integration-mappings.js +91 -0
  37. package/esm/funcs/integrations-get-entity-integration-mappings.js.map +1 -0
  38. package/esm/funcs/integrations-get-integration-config.d.ts +17 -0
  39. package/esm/funcs/integrations-get-integration-config.d.ts.map +1 -0
  40. package/esm/funcs/integrations-get-integration-config.js +72 -0
  41. package/esm/funcs/integrations-get-integration-config.js.map +1 -0
  42. package/esm/funcs/users-update-user.d.ts +17 -0
  43. package/esm/funcs/users-update-user.d.ts.map +1 -0
  44. package/esm/funcs/users-update-user.js +83 -0
  45. package/esm/funcs/users-update-user.js.map +1 -0
  46. package/esm/lib/config.d.ts +3 -3
  47. package/esm/lib/config.js +3 -3
  48. package/esm/sdk/integrations.d.ts +14 -0
  49. package/esm/sdk/integrations.d.ts.map +1 -1
  50. package/esm/sdk/integrations.js +20 -0
  51. package/esm/sdk/integrations.js.map +1 -1
  52. package/esm/sdk/models/changed-subscription.d.ts +2 -0
  53. package/esm/sdk/models/changed-subscription.d.ts.map +1 -1
  54. package/esm/sdk/models/changed-subscription.js +10 -2
  55. package/esm/sdk/models/changed-subscription.js.map +1 -1
  56. package/esm/sdk/models/create-invoice-line-item-request.d.ts +18 -0
  57. package/esm/sdk/models/create-invoice-line-item-request.d.ts.map +1 -1
  58. package/esm/sdk/models/create-invoice-line-item-request.js +6 -0
  59. package/esm/sdk/models/create-invoice-line-item-request.js.map +1 -1
  60. package/esm/sdk/models/create-user-response.d.ts +3 -0
  61. package/esm/sdk/models/create-user-response.d.ts.map +1 -1
  62. package/esm/sdk/models/create-user-response.js +1 -0
  63. package/esm/sdk/models/create-user-response.js.map +1 -1
  64. package/esm/sdk/models/entity-integration-mapping-response.d.ts +3 -0
  65. package/esm/sdk/models/entity-integration-mapping-response.d.ts.map +1 -1
  66. package/esm/sdk/models/entity-integration-mapping-response.js +1 -0
  67. package/esm/sdk/models/entity-integration-mapping-response.js.map +1 -1
  68. package/esm/sdk/models/entity-sync-config.d.ts +17 -0
  69. package/esm/sdk/models/entity-sync-config.d.ts.map +1 -0
  70. package/esm/sdk/models/entity-sync-config.js +15 -0
  71. package/esm/sdk/models/entity-sync-config.js.map +1 -0
  72. package/esm/sdk/models/execute-subscription-modify-request.d.ts +3 -0
  73. package/esm/sdk/models/execute-subscription-modify-request.d.ts.map +1 -1
  74. package/esm/sdk/models/execute-subscription-modify-request.js +3 -0
  75. package/esm/sdk/models/execute-subscription-modify-request.js.map +1 -1
  76. package/esm/sdk/models/get-entity-integration-mappings-op.d.ts +20 -0
  77. package/esm/sdk/models/get-entity-integration-mappings-op.d.ts.map +1 -0
  78. package/esm/sdk/models/get-entity-integration-mappings-op.js +19 -0
  79. package/esm/sdk/models/get-entity-integration-mappings-op.js.map +1 -0
  80. package/esm/sdk/models/index.d.ts +12 -0
  81. package/esm/sdk/models/index.d.ts.map +1 -1
  82. package/esm/sdk/models/index.js +12 -0
  83. package/esm/sdk/models/index.js.map +1 -1
  84. package/esm/sdk/models/integration-config-entry.d.ts +14 -0
  85. package/esm/sdk/models/integration-config-entry.d.ts.map +1 -0
  86. package/esm/sdk/models/integration-config-entry.js +24 -0
  87. package/esm/sdk/models/integration-config-entry.js.map +1 -0
  88. package/esm/sdk/models/integration-config-response.d.ts +11 -0
  89. package/esm/sdk/models/integration-config-response.d.ts.map +1 -0
  90. package/esm/sdk/models/integration-config-response.js +15 -0
  91. package/esm/sdk/models/integration-config-response.js.map +1 -0
  92. package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
  93. package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
  94. package/esm/sdk/models/invoice-billing-reason.js +1 -0
  95. package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
  96. package/esm/sdk/models/invoice-filter.d.ts +11 -0
  97. package/esm/sdk/models/invoice-filter.d.ts.map +1 -1
  98. package/esm/sdk/models/invoice-filter.js +4 -0
  99. package/esm/sdk/models/invoice-filter.js.map +1 -1
  100. package/esm/sdk/models/invoice-line-item-response.d.ts +11 -0
  101. package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
  102. package/esm/sdk/models/invoice-line-item-response.js +4 -0
  103. package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
  104. package/esm/sdk/models/invoice-sync-settings.d.ts +11 -0
  105. package/esm/sdk/models/invoice-sync-settings.d.ts.map +1 -0
  106. package/esm/sdk/models/invoice-sync-settings.js +20 -0
  107. package/esm/sdk/models/invoice-sync-settings.js.map +1 -0
  108. package/esm/sdk/models/list-entity-integration-mappings-response.d.ts +13 -0
  109. package/esm/sdk/models/list-entity-integration-mappings-response.d.ts.map +1 -0
  110. package/esm/sdk/models/list-entity-integration-mappings-response.js +17 -0
  111. package/esm/sdk/models/list-entity-integration-mappings-response.js.map +1 -0
  112. package/esm/sdk/models/payment-gateway-type.d.ts +1 -0
  113. package/esm/sdk/models/payment-gateway-type.d.ts.map +1 -1
  114. package/esm/sdk/models/payment-gateway-type.js +1 -0
  115. package/esm/sdk/models/payment-gateway-type.js.map +1 -1
  116. package/esm/sdk/models/price-price.d.ts +9 -0
  117. package/esm/sdk/models/price-price.d.ts.map +1 -1
  118. package/esm/sdk/models/price-price.js +1 -0
  119. package/esm/sdk/models/price-price.js.map +1 -1
  120. package/esm/sdk/models/price-response.d.ts +9 -0
  121. package/esm/sdk/models/price-response.d.ts.map +1 -1
  122. package/esm/sdk/models/price-response.js +1 -0
  123. package/esm/sdk/models/price-response.js.map +1 -1
  124. package/esm/sdk/models/s3-export-config.d.ts +29 -0
  125. package/esm/sdk/models/s3-export-config.d.ts.map +1 -0
  126. package/esm/sdk/models/s3-export-config.js +27 -0
  127. package/esm/sdk/models/s3-export-config.js.map +1 -0
  128. package/esm/sdk/models/secret-provider.d.ts +1 -0
  129. package/esm/sdk/models/secret-provider.d.ts.map +1 -1
  130. package/esm/sdk/models/secret-provider.js +1 -0
  131. package/esm/sdk/models/secret-provider.js.map +1 -1
  132. package/esm/sdk/models/sub-modify-trial-end-request.d.ts +18 -0
  133. package/esm/sdk/models/sub-modify-trial-end-request.d.ts.map +1 -0
  134. package/esm/sdk/models/sub-modify-trial-end-request.js +19 -0
  135. package/esm/sdk/models/sub-modify-trial-end-request.js.map +1 -0
  136. package/esm/sdk/models/subscription-modify-type.d.ts +1 -0
  137. package/esm/sdk/models/subscription-modify-type.d.ts.map +1 -1
  138. package/esm/sdk/models/subscription-modify-type.js +1 -0
  139. package/esm/sdk/models/subscription-modify-type.js.map +1 -1
  140. package/esm/sdk/models/subscription-response-v2.d.ts +16 -0
  141. package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
  142. package/esm/sdk/models/subscription-response-v2.js +4 -0
  143. package/esm/sdk/models/subscription-response-v2.js.map +1 -1
  144. package/esm/sdk/models/subscription-response.d.ts +8 -0
  145. package/esm/sdk/models/subscription-response.d.ts.map +1 -1
  146. package/esm/sdk/models/subscription-response.js +2 -0
  147. package/esm/sdk/models/subscription-response.js.map +1 -1
  148. package/esm/sdk/models/sync-config.d.ts +21 -0
  149. package/esm/sdk/models/sync-config.d.ts.map +1 -0
  150. package/esm/sdk/models/sync-config.js +31 -0
  151. package/esm/sdk/models/sync-config.js.map +1 -0
  152. package/esm/sdk/models/trial-end-action.d.ts +10 -0
  153. package/esm/sdk/models/trial-end-action.d.ts.map +1 -0
  154. package/esm/sdk/models/trial-end-action.js +11 -0
  155. package/esm/sdk/models/trial-end-action.js.map +1 -0
  156. package/esm/sdk/models/update-user-request.d.ts +16 -0
  157. package/esm/sdk/models/update-user-request.d.ts.map +1 -0
  158. package/esm/sdk/models/update-user-request.js +12 -0
  159. package/esm/sdk/models/update-user-request.js.map +1 -0
  160. package/esm/sdk/models/update-user-response.d.ts +22 -0
  161. package/esm/sdk/models/update-user-response.d.ts.map +1 -0
  162. package/esm/sdk/models/update-user-response.js +21 -0
  163. package/esm/sdk/models/update-user-response.js.map +1 -0
  164. package/esm/sdk/models/user-response.d.ts +3 -0
  165. package/esm/sdk/models/user-response.d.ts.map +1 -1
  166. package/esm/sdk/models/user-response.js +1 -0
  167. package/esm/sdk/models/user-response.js.map +1 -1
  168. package/esm/sdk/users.d.ts +7 -0
  169. package/esm/sdk/users.d.ts.map +1 -1
  170. package/esm/sdk/users.js +10 -0
  171. package/esm/sdk/users.js.map +1 -1
  172. package/esm/types/async.d.ts.map +1 -1
  173. package/esm/types/async.js +6 -6
  174. package/esm/types/async.js.map +1 -1
  175. package/esm/types/primitives.d.ts +0 -2
  176. package/esm/types/primitives.d.ts.map +1 -1
  177. package/esm/types/primitives.js +0 -22
  178. package/esm/types/primitives.js.map +1 -1
  179. package/jsr.json +1 -1
  180. package/package.json +1 -1
  181. package/src/funcs/integrations-get-entity-integration-mappings.ts +186 -0
  182. package/src/funcs/integrations-get-integration-config.ts +152 -0
  183. package/src/funcs/users-update-user.ts +172 -0
  184. package/src/lib/config.ts +3 -3
  185. package/src/sdk/integrations.ts +36 -0
  186. package/src/sdk/models/changed-subscription.ts +18 -5
  187. package/src/sdk/models/create-invoice-line-item-request.ts +24 -0
  188. package/src/sdk/models/create-user-response.ts +2 -0
  189. package/src/sdk/models/entity-integration-mapping-response.ts +2 -0
  190. package/src/sdk/models/entity-sync-config.ts +39 -0
  191. package/src/sdk/models/execute-subscription-modify-request.ts +9 -0
  192. package/src/sdk/models/get-entity-integration-mappings-op.ts +50 -0
  193. package/src/sdk/models/index.ts +12 -0
  194. package/src/sdk/models/integration-config-entry.ts +49 -0
  195. package/src/sdk/models/integration-config-response.ts +35 -0
  196. package/src/sdk/models/invoice-billing-reason.ts +1 -0
  197. package/src/sdk/models/invoice-filter.ts +17 -0
  198. package/src/sdk/models/invoice-line-item-response.ts +15 -0
  199. package/src/sdk/models/invoice-sync-settings.ts +43 -0
  200. package/src/sdk/models/list-entity-integration-mappings-response.ts +44 -0
  201. package/src/sdk/models/payment-gateway-type.ts +1 -0
  202. package/src/sdk/models/price-price.ts +10 -0
  203. package/src/sdk/models/price-response.ts +10 -0
  204. package/src/sdk/models/s3-export-config.ts +70 -0
  205. package/src/sdk/models/secret-provider.ts +1 -0
  206. package/src/sdk/models/sub-modify-trial-end-request.ts +50 -0
  207. package/src/sdk/models/subscription-modify-type.ts +1 -0
  208. package/src/sdk/models/subscription-response-v2.ts +20 -0
  209. package/src/sdk/models/subscription-response.ts +10 -0
  210. package/src/sdk/models/sync-config.ts +65 -0
  211. package/src/sdk/models/trial-end-action.ts +17 -0
  212. package/src/sdk/models/update-user-request.ts +30 -0
  213. package/src/sdk/models/update-user-response.ts +49 -0
  214. package/src/sdk/models/user-response.ts +2 -0
  215. package/src/sdk/users.ts +18 -0
  216. package/src/types/async.ts +8 -7
  217. package/src/types/primitives.ts +0 -26
@@ -19,6 +19,7 @@ export type CreateUserResponse = {
19
19
  */
20
20
  email?: string | undefined;
21
21
  id?: string | undefined;
22
+ metadata?: { [k: string]: string } | undefined;
22
23
  password?: string | undefined;
23
24
  roles?: Array<string> | undefined;
24
25
  tenant?: TenantResponse | undefined;
@@ -32,6 +33,7 @@ export const CreateUserResponse$inboundSchema: z.ZodMiniType<
32
33
  > = z.object({
33
34
  email: types.optional(types.string()),
34
35
  id: types.optional(types.string()),
36
+ metadata: types.optional(z.record(z.string(), types.string())),
35
37
  password: types.optional(types.string()),
36
38
  roles: types.optional(z.array(types.string())),
37
39
  tenant: types.optional(TenantResponse$inboundSchema),
@@ -21,6 +21,7 @@ export type EntityIntegrationMappingResponse = {
21
21
  entityType?: IntegrationEntityType | undefined;
22
22
  environmentId?: string | undefined;
23
23
  id?: string | undefined;
24
+ metadata?: { [k: string]: any } | undefined;
24
25
  providerEntityId?: string | undefined;
25
26
  providerType?: string | undefined;
26
27
  status?: Status | undefined;
@@ -41,6 +42,7 @@ export const EntityIntegrationMappingResponse$inboundSchema: z.ZodMiniType<
41
42
  entity_type: types.optional(IntegrationEntityType$inboundSchema),
42
43
  environment_id: types.optional(types.string()),
43
44
  id: types.optional(types.string()),
45
+ metadata: types.optional(z.record(z.string(), z.any())),
44
46
  provider_entity_id: types.optional(types.string()),
45
47
  provider_type: types.optional(types.string()),
46
48
  status: types.optional(Status$inboundSchema),
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "./sdk-validation-error.js";
10
+
11
+ export type EntitySyncConfig = {
12
+ /**
13
+ * Inbound from external provider to FlexPrice
14
+ */
15
+ inbound?: boolean | undefined;
16
+ /**
17
+ * Outbound from FlexPrice to external provider
18
+ */
19
+ outbound?: boolean | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const EntitySyncConfig$inboundSchema: z.ZodMiniType<
24
+ EntitySyncConfig,
25
+ unknown
26
+ > = z.object({
27
+ inbound: types.optional(types.boolean()),
28
+ outbound: types.optional(types.boolean()),
29
+ });
30
+
31
+ export function entitySyncConfigFromJSON(
32
+ jsonString: string,
33
+ ): SafeParseResult<EntitySyncConfig, SDKValidationError> {
34
+ return safeParse(
35
+ jsonString,
36
+ (x) => EntitySyncConfig$inboundSchema.parse(JSON.parse(x)),
37
+ `Failed to parse 'EntitySyncConfig' from JSON`,
38
+ );
39
+ }
@@ -19,6 +19,11 @@ import {
19
19
  SubModifyQuantityChangeRequest$Outbound,
20
20
  SubModifyQuantityChangeRequest$outboundSchema,
21
21
  } from "./sub-modify-quantity-change-request.js";
22
+ import {
23
+ SubModifyTrialEndRequest,
24
+ SubModifyTrialEndRequest$Outbound,
25
+ SubModifyTrialEndRequest$outboundSchema,
26
+ } from "./sub-modify-trial-end-request.js";
22
27
  import {
23
28
  SubscriptionModifyType,
24
29
  SubscriptionModifyType$outboundSchema,
@@ -28,6 +33,7 @@ export type ExecuteSubscriptionModifyRequest = {
28
33
  groupedInvoicingParams?: SubModifyGroupedInvoicingParams | undefined;
29
34
  inheritanceParams?: SubModifyInheritanceRequest | undefined;
30
35
  quantityChangeParams?: SubModifyQuantityChangeRequest | undefined;
36
+ trialEndParams?: SubModifyTrialEndRequest | undefined;
31
37
  type: SubscriptionModifyType;
32
38
  };
33
39
 
@@ -38,6 +44,7 @@ export type ExecuteSubscriptionModifyRequest$Outbound = {
38
44
  | undefined;
39
45
  inheritance_params?: SubModifyInheritanceRequest$Outbound | undefined;
40
46
  quantity_change_params?: SubModifyQuantityChangeRequest$Outbound | undefined;
47
+ trial_end_params?: SubModifyTrialEndRequest$Outbound | undefined;
41
48
  type: string;
42
49
  };
43
50
 
@@ -54,6 +61,7 @@ export const ExecuteSubscriptionModifyRequest$outboundSchema: z.ZodMiniType<
54
61
  quantityChangeParams: z.optional(
55
62
  SubModifyQuantityChangeRequest$outboundSchema,
56
63
  ),
64
+ trialEndParams: z.optional(SubModifyTrialEndRequest$outboundSchema),
57
65
  type: SubscriptionModifyType$outboundSchema,
58
66
  }),
59
67
  z.transform((v) => {
@@ -61,6 +69,7 @@ export const ExecuteSubscriptionModifyRequest$outboundSchema: z.ZodMiniType<
61
69
  groupedInvoicingParams: "grouped_invoicing_params",
62
70
  inheritanceParams: "inheritance_params",
63
71
  quantityChangeParams: "quantity_change_params",
72
+ trialEndParams: "trial_end_params",
64
73
  });
65
74
  }),
66
75
  );
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type GetEntityIntegrationMappingsRequest = {
9
+ /**
10
+ * Entity type (customer, plan, invoice, subscription, payment, credit_note, addon, item, item_price, price)
11
+ */
12
+ entityType: string;
13
+ /**
14
+ * Entity ID
15
+ */
16
+ entityId: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export type GetEntityIntegrationMappingsRequest$Outbound = {
21
+ entity_type: string;
22
+ entity_id: string;
23
+ };
24
+
25
+ /** @internal */
26
+ export const GetEntityIntegrationMappingsRequest$outboundSchema: z.ZodMiniType<
27
+ GetEntityIntegrationMappingsRequest$Outbound,
28
+ GetEntityIntegrationMappingsRequest
29
+ > = z.pipe(
30
+ z.object({
31
+ entityType: z.string(),
32
+ entityId: z.string(),
33
+ }),
34
+ z.transform((v) => {
35
+ return remap$(v, {
36
+ entityType: "entity_type",
37
+ entityId: "entity_id",
38
+ });
39
+ }),
40
+ );
41
+
42
+ export function getEntityIntegrationMappingsRequestToJSON(
43
+ getEntityIntegrationMappingsRequest: GetEntityIntegrationMappingsRequest,
44
+ ): string {
45
+ return JSON.stringify(
46
+ GetEntityIntegrationMappingsRequest$outboundSchema.parse(
47
+ getEntityIntegrationMappingsRequest,
48
+ ),
49
+ );
50
+ }
@@ -166,6 +166,7 @@ export * from "./entitlement-source-entity-type.js";
166
166
  export * from "./entitlement-source.js";
167
167
  export * from "./entitlement-usage-reset-period.js";
168
168
  export * from "./entity-integration-mapping-response.js";
169
+ export * from "./entity-sync-config.js";
169
170
  export * from "./entity-type.js";
170
171
  export * from "./environment-type.js";
171
172
  export * from "./error-code.js";
@@ -210,6 +211,7 @@ export * from "./get-customer-usage-summary-op.js";
210
211
  export * from "./get-customer-wallets-op.js";
211
212
  export * from "./get-detailed-cost-analytics-response.js";
212
213
  export * from "./get-entitlement-op.js";
214
+ export * from "./get-entity-integration-mappings-op.js";
213
215
  export * from "./get-event-by-id-response.js";
214
216
  export * from "./get-event-op.js";
215
217
  export * from "./get-events-request.js";
@@ -260,6 +262,8 @@ export * from "./group-response.js";
260
262
  export * from "./grouped-invoicing-action.js";
261
263
  export * from "./http-client-errors.js";
262
264
  export * from "./ingest-event-request.js";
265
+ export * from "./integration-config-entry.js";
266
+ export * from "./integration-config-response.js";
263
267
  export * from "./integration-entity-type.js";
264
268
  export * from "./invoice-billing-reason.js";
265
269
  export * from "./invoice-cadence.js";
@@ -271,6 +275,7 @@ export * from "./invoice-line-item-response.js";
271
275
  export * from "./invoice-preview.js";
272
276
  export * from "./invoice-response.js";
273
277
  export * from "./invoice-status.js";
278
+ export * from "./invoice-sync-settings.js";
274
279
  export * from "./invoice-type.js";
275
280
  export * from "./line-item-commitment-config.js";
276
281
  export * from "./line-item-quantity-change.js";
@@ -286,6 +291,7 @@ export * from "./list-credit-grant-applications-response.js";
286
291
  export * from "./list-credit-grants-response.js";
287
292
  export * from "./list-customers-response.js";
288
293
  export * from "./list-entitlements-response.js";
294
+ export * from "./list-entity-integration-mappings-response.js";
289
295
  export * from "./list-features-response.js";
290
296
  export * from "./list-groups-response.js";
291
297
  export * from "./list-invoices-response.js";
@@ -366,6 +372,7 @@ export * from "./resume-mode.js";
366
372
  export * from "./round-type.js";
367
373
  export * from "./s3-compression-type.js";
368
374
  export * from "./s3-encryption-type.js";
375
+ export * from "./s3-export-config.js";
369
376
  export * from "./s3-job-config.js";
370
377
  export * from "./schedule-draft-finalization-op.js";
371
378
  export * from "./schedule-status.js";
@@ -387,6 +394,7 @@ export * from "./status.js";
387
394
  export * from "./sub-modify-grouped-invoicing-params.js";
388
395
  export * from "./sub-modify-inheritance-request.js";
389
396
  export * from "./sub-modify-quantity-change-request.js";
397
+ export * from "./sub-modify-trial-end-request.js";
390
398
  export * from "./subscription-change-execute-response.js";
391
399
  export * from "./subscription-change-preview-response.js";
392
400
  export * from "./subscription-change-request.js";
@@ -414,6 +422,7 @@ export * from "./subscription-summary.js";
414
422
  export * from "./subscription-type.js";
415
423
  export * from "./subscription-usage-by-meters-response.js";
416
424
  export * from "./success-response.js";
425
+ export * from "./sync-config.js";
417
426
  export * from "./sync-plan-prices-op.js";
418
427
  export * from "./task-response.js";
419
428
  export * from "./task-status.js";
@@ -438,6 +447,7 @@ export * from "./top-up-wallet-response.js";
438
447
  export * from "./transaction-reason.js";
439
448
  export * from "./transaction-status.js";
440
449
  export * from "./transaction-type.js";
450
+ export * from "./trial-end-action.js";
441
451
  export * from "./trigger-force-run-request.js";
442
452
  export * from "./trigger-force-run-response.js";
443
453
  export * from "./trigger-invoice-comms-webhook-op.js";
@@ -481,6 +491,8 @@ export * from "./update-tax-association-op.js";
481
491
  export * from "./update-tax-rate-op.js";
482
492
  export * from "./update-tax-rate-request.js";
483
493
  export * from "./update-tenant-request.js";
494
+ export * from "./update-user-request.js";
495
+ export * from "./update-user-response.js";
484
496
  export * from "./update-wallet-op.js";
485
497
  export * from "./update-wallet-request.js";
486
498
  export * from "./usage-analytic-item.js";
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import { SDKValidationError } from "./sdk-validation-error.js";
11
+ import {
12
+ SecretProvider,
13
+ SecretProvider$inboundSchema,
14
+ } from "./secret-provider.js";
15
+ import { SyncConfig, SyncConfig$inboundSchema } from "./sync-config.js";
16
+
17
+ export type IntegrationConfigEntry = {
18
+ baseConfig?: SyncConfig | undefined;
19
+ currentConfig?: SyncConfig | undefined;
20
+ provider?: SecretProvider | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const IntegrationConfigEntry$inboundSchema: z.ZodMiniType<
25
+ IntegrationConfigEntry,
26
+ unknown
27
+ > = z.pipe(
28
+ z.object({
29
+ base_config: types.optional(SyncConfig$inboundSchema),
30
+ current_config: types.optional(SyncConfig$inboundSchema),
31
+ provider: types.optional(SecretProvider$inboundSchema),
32
+ }),
33
+ z.transform((v) => {
34
+ return remap$(v, {
35
+ "base_config": "baseConfig",
36
+ "current_config": "currentConfig",
37
+ });
38
+ }),
39
+ );
40
+
41
+ export function integrationConfigEntryFromJSON(
42
+ jsonString: string,
43
+ ): SafeParseResult<IntegrationConfigEntry, SDKValidationError> {
44
+ return safeParse(
45
+ jsonString,
46
+ (x) => IntegrationConfigEntry$inboundSchema.parse(JSON.parse(x)),
47
+ `Failed to parse 'IntegrationConfigEntry' from JSON`,
48
+ );
49
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import {
10
+ IntegrationConfigEntry,
11
+ IntegrationConfigEntry$inboundSchema,
12
+ } from "./integration-config-entry.js";
13
+ import { SDKValidationError } from "./sdk-validation-error.js";
14
+
15
+ export type IntegrationConfigResponse = {
16
+ integrations?: Array<IntegrationConfigEntry> | undefined;
17
+ };
18
+
19
+ /** @internal */
20
+ export const IntegrationConfigResponse$inboundSchema: z.ZodMiniType<
21
+ IntegrationConfigResponse,
22
+ unknown
23
+ > = z.object({
24
+ integrations: types.optional(z.array(IntegrationConfigEntry$inboundSchema)),
25
+ });
26
+
27
+ export function integrationConfigResponseFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<IntegrationConfigResponse, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => IntegrationConfigResponse$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'IntegrationConfigResponse' from JSON`,
34
+ );
35
+ }
@@ -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
 
@@ -10,6 +10,10 @@ import {
10
10
  FilterCondition$Outbound,
11
11
  FilterCondition$outboundSchema,
12
12
  } from "./filter-condition.js";
13
+ import {
14
+ InvoiceBillingReason,
15
+ InvoiceBillingReason$outboundSchema,
16
+ } from "./invoice-billing-reason.js";
13
17
  import {
14
18
  InvoiceStatus,
15
19
  InvoiceStatus$outboundSchema,
@@ -47,6 +51,14 @@ export type InvoiceFilter = {
47
51
  * Useful for finding invoices that still have significant unpaid amounts
48
52
  */
49
53
  amountRemainingGt?: number | undefined;
54
+ billingReason?: InvoiceBillingReason | undefined;
55
+ /**
56
+ * currency filters invoices by their currency (ISO 4217 code, e.g. "usd", "eur").
57
+ *
58
+ * @remarks
59
+ * Matches on the invoices.currency column exactly.
60
+ */
61
+ currency?: string | undefined;
50
62
  /**
51
63
  * customer_id filters invoices for a specific customer using FlexPrice's internal customer ID
52
64
  *
@@ -134,6 +146,8 @@ export const InvoiceFilterOrder$outboundSchema: z.ZodMiniEnum<
134
146
  export type InvoiceFilter$Outbound = {
135
147
  amount_due_gt?: number | undefined;
136
148
  amount_remaining_gt?: number | undefined;
149
+ billing_reason?: string | undefined;
150
+ currency?: string | undefined;
137
151
  customer_id?: string | undefined;
138
152
  end_time?: string | undefined;
139
153
  expand?: string | undefined;
@@ -166,6 +180,8 @@ export const InvoiceFilter$outboundSchema: z.ZodMiniType<
166
180
  z.object({
167
181
  amountDueGt: z.optional(z.number()),
168
182
  amountRemainingGt: z.optional(z.number()),
183
+ billingReason: z.optional(InvoiceBillingReason$outboundSchema),
184
+ currency: z.optional(z.string()),
169
185
  customerId: z.optional(z.string()),
170
186
  endTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
171
187
  expand: z.optional(z.string()),
@@ -193,6 +209,7 @@ export const InvoiceFilter$outboundSchema: z.ZodMiniType<
193
209
  return remap$(v, {
194
210
  amountDueGt: "amount_due_gt",
195
211
  amountRemainingGt: "amount_remaining_gt",
212
+ billingReason: "billing_reason",
196
213
  customerId: "customer_id",
197
214
  endTime: "end_time",
198
215
  externalCustomerId: "external_customer_id",
@@ -23,6 +23,13 @@ import {
23
23
  } from "./usage-breakdown-item.js";
24
24
 
25
25
  export type InvoiceLineItemResponse = {
26
+ /**
27
+ * adjusted_entitlement_quantity is the entitlement-covered portion deducted from raw usage.
28
+ *
29
+ * @remarks
30
+ * Nil when no entitlement was applied. Raw usage = Quantity + AdjustedEntitlementQuantity.
31
+ */
32
+ adjustedEntitlementQuantity?: string | undefined;
26
33
  amount?: string | undefined;
27
34
  commitmentInfo?: CommitmentInfo | undefined;
28
35
  createdAt?: Date | undefined;
@@ -61,6 +68,10 @@ export type InvoiceLineItemResponse = {
61
68
  quantity?: string | undefined;
62
69
  status?: Status | undefined;
63
70
  subscriptionId?: string | undefined;
71
+ /**
72
+ * sub_line_item_id links this invoice line item to the subscription_line_item that generated it.
73
+ */
74
+ subscriptionLineItemId?: string | undefined;
64
75
  tenantId?: string | undefined;
65
76
  updatedAt?: Date | undefined;
66
77
  updatedBy?: string | undefined;
@@ -80,6 +91,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
80
91
  unknown
81
92
  > = z.pipe(
82
93
  z.object({
94
+ adjusted_entitlement_quantity: types.optional(types.string()),
83
95
  amount: types.optional(types.string()),
84
96
  commitment_info: types.optional(CommitmentInfo$inboundSchema),
85
97
  created_at: types.optional(types.date()),
@@ -109,6 +121,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
109
121
  quantity: types.optional(types.string()),
110
122
  status: types.optional(Status$inboundSchema),
111
123
  subscription_id: types.optional(types.string()),
124
+ subscription_line_item_id: types.optional(types.string()),
112
125
  tenant_id: types.optional(types.string()),
113
126
  updated_at: types.optional(types.date()),
114
127
  updated_by: types.optional(types.string()),
@@ -117,6 +130,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
117
130
  }),
118
131
  z.transform((v) => {
119
132
  return remap$(v, {
133
+ "adjusted_entitlement_quantity": "adjustedEntitlementQuantity",
120
134
  "commitment_info": "commitmentInfo",
121
135
  "created_at": "createdAt",
122
136
  "created_by": "createdBy",
@@ -140,6 +154,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
140
154
  "price_unit_amount": "priceUnitAmount",
141
155
  "price_unit_id": "priceUnitId",
142
156
  "subscription_id": "subscriptionId",
157
+ "subscription_line_item_id": "subscriptionLineItemId",
143
158
  "tenant_id": "tenantId",
144
159
  "updated_at": "updatedAt",
145
160
  "updated_by": "updatedBy",
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import {
11
+ BillingPeriod,
12
+ BillingPeriod$inboundSchema,
13
+ } from "./billing-period.js";
14
+ import { SDKValidationError } from "./sdk-validation-error.js";
15
+
16
+ export type InvoiceSyncSettings = {
17
+ normalizeFixedTo?: BillingPeriod | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const InvoiceSyncSettings$inboundSchema: z.ZodMiniType<
22
+ InvoiceSyncSettings,
23
+ unknown
24
+ > = z.pipe(
25
+ z.object({
26
+ normalize_fixed_to: types.optional(BillingPeriod$inboundSchema),
27
+ }),
28
+ z.transform((v) => {
29
+ return remap$(v, {
30
+ "normalize_fixed_to": "normalizeFixedTo",
31
+ });
32
+ }),
33
+ );
34
+
35
+ export function invoiceSyncSettingsFromJSON(
36
+ jsonString: string,
37
+ ): SafeParseResult<InvoiceSyncSettings, SDKValidationError> {
38
+ return safeParse(
39
+ jsonString,
40
+ (x) => InvoiceSyncSettings$inboundSchema.parse(JSON.parse(x)),
41
+ `Failed to parse 'InvoiceSyncSettings' from JSON`,
42
+ );
43
+ }
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import {
10
+ EntityIntegrationMappingResponse,
11
+ EntityIntegrationMappingResponse$inboundSchema,
12
+ } from "./entity-integration-mapping-response.js";
13
+ import {
14
+ PaginationResponse,
15
+ PaginationResponse$inboundSchema,
16
+ } from "./pagination-response.js";
17
+ import { SDKValidationError } from "./sdk-validation-error.js";
18
+
19
+ export type ListEntityIntegrationMappingsResponse = {
20
+ items?: Array<EntityIntegrationMappingResponse> | undefined;
21
+ pagination?: PaginationResponse | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const ListEntityIntegrationMappingsResponse$inboundSchema: z.ZodMiniType<
26
+ ListEntityIntegrationMappingsResponse,
27
+ unknown
28
+ > = z.object({
29
+ items: types.optional(
30
+ z.array(EntityIntegrationMappingResponse$inboundSchema),
31
+ ),
32
+ pagination: types.optional(PaginationResponse$inboundSchema),
33
+ });
34
+
35
+ export function listEntityIntegrationMappingsResponseFromJSON(
36
+ jsonString: string,
37
+ ): SafeParseResult<ListEntityIntegrationMappingsResponse, SDKValidationError> {
38
+ return safeParse(
39
+ jsonString,
40
+ (x) =>
41
+ ListEntityIntegrationMappingsResponse$inboundSchema.parse(JSON.parse(x)),
42
+ `Failed to parse 'ListEntityIntegrationMappingsResponse' from JSON`,
43
+ );
44
+ }
@@ -11,6 +11,7 @@ export const PaymentGatewayType = {
11
11
  Nomod: "nomod",
12
12
  Moyasar: "moyasar",
13
13
  Paddle: "paddle",
14
+ Whop: "whop",
14
15
  } as const;
15
16
  export type PaymentGatewayType = ClosedEnum<typeof PaymentGatewayType>;
16
17
 
@@ -141,6 +141,15 @@ export type PricePrice = {
141
141
  */
142
142
  priceUnitTiers?: Array<PricePriceTier> | undefined;
143
143
  priceUnitType?: PriceUnitType | undefined;
144
+ /**
145
+ * Sequence is the monotonic stamp bumped on every state change that
146
+ *
147
+ * @remarks
148
+ * subscription line items need to react to. Read by the plan-price sync;
149
+ * set by the database (DEFAULT nextval) on create and by the price
150
+ * repository on termination / compatibility-affecting edits.
151
+ */
152
+ sequence?: number | undefined;
144
153
  /**
145
154
  * StartDate is the start date of the price
146
155
  */
@@ -196,6 +205,7 @@ export const PricePrice$inboundSchema: z.ZodMiniType<PricePrice, unknown> = z
196
205
  price_unit_id: types.optional(types.string()),
197
206
  price_unit_tiers: types.optional(z.array(PricePriceTier$inboundSchema)),
198
207
  price_unit_type: types.optional(PriceUnitType$inboundSchema),
208
+ sequence: types.optional(types.number()),
199
209
  start_date: types.optional(types.date()),
200
210
  status: types.optional(Status$inboundSchema),
201
211
  tenant_id: types.optional(types.string()),
@@ -163,6 +163,15 @@ export type PriceResponse = {
163
163
  priceUnitTiers?: Array<PricePriceTier> | undefined;
164
164
  priceUnitType?: PriceUnitType | undefined;
165
165
  pricingUnit?: PriceUnitResponse | undefined;
166
+ /**
167
+ * Sequence is the monotonic stamp bumped on every state change that
168
+ *
169
+ * @remarks
170
+ * subscription line items need to react to. Read by the plan-price sync;
171
+ * set by the database (DEFAULT nextval) on create and by the price
172
+ * repository on termination / compatibility-affecting edits.
173
+ */
174
+ sequence?: number | undefined;
166
175
  /**
167
176
  * StartDate is the start date of the price
168
177
  */
@@ -225,6 +234,7 @@ export const PriceResponse$inboundSchema: z.ZodMiniType<
225
234
  price_unit_tiers: types.optional(z.array(PricePriceTier$inboundSchema)),
226
235
  price_unit_type: types.optional(PriceUnitType$inboundSchema),
227
236
  pricing_unit: types.optional(PriceUnitResponse$inboundSchema),
237
+ sequence: types.optional(types.number()),
228
238
  start_date: types.optional(types.date()),
229
239
  status: types.optional(Status$inboundSchema),
230
240
  tenant_id: types.optional(types.string()),
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import {
11
+ S3CompressionType,
12
+ S3CompressionType$inboundSchema,
13
+ } from "./s3-compression-type.js";
14
+ import {
15
+ S3EncryptionType,
16
+ S3EncryptionType$inboundSchema,
17
+ } from "./s3-encryption-type.js";
18
+ import { SDKValidationError } from "./sdk-validation-error.js";
19
+
20
+ export type S3ExportConfig = {
21
+ /**
22
+ * S3 bucket name
23
+ */
24
+ bucket?: string | undefined;
25
+ compression?: S3CompressionType | undefined;
26
+ encryption?: S3EncryptionType | undefined;
27
+ /**
28
+ * If true, use Flexprice-managed S3 credentials instead of user-provided
29
+ */
30
+ isFlexpriceManaged?: boolean | undefined;
31
+ /**
32
+ * Optional prefix for S3 keys (e.g., "flexprice-exports/")
33
+ */
34
+ keyPrefix?: string | undefined;
35
+ /**
36
+ * AWS region (e.g., "us-west-2")
37
+ */
38
+ region?: string | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const S3ExportConfig$inboundSchema: z.ZodMiniType<
43
+ S3ExportConfig,
44
+ unknown
45
+ > = z.pipe(
46
+ z.object({
47
+ bucket: types.optional(types.string()),
48
+ compression: types.optional(S3CompressionType$inboundSchema),
49
+ encryption: types.optional(S3EncryptionType$inboundSchema),
50
+ is_flexprice_managed: types.optional(types.boolean()),
51
+ key_prefix: types.optional(types.string()),
52
+ region: types.optional(types.string()),
53
+ }),
54
+ z.transform((v) => {
55
+ return remap$(v, {
56
+ "is_flexprice_managed": "isFlexpriceManaged",
57
+ "key_prefix": "keyPrefix",
58
+ });
59
+ }),
60
+ );
61
+
62
+ export function s3ExportConfigFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<S3ExportConfig, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => S3ExportConfig$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'S3ExportConfig' from JSON`,
69
+ );
70
+ }
@@ -18,6 +18,7 @@ export const SecretProvider = {
18
18
  Nomod: "nomod",
19
19
  Moyasar: "moyasar",
20
20
  Paddle: "paddle",
21
+ Whop: "whop",
21
22
  } as const;
22
23
  export type SecretProvider = OpenEnum<typeof SecretProvider>;
23
24