@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.
- package/docs/sdk/models/changed-subscription.md +7 -5
- package/docs/sdk/models/create-invoice-line-item-request.md +25 -22
- package/docs/sdk/models/create-user-response.md +1 -0
- package/docs/sdk/models/entity-integration-mapping-response.md +1 -0
- package/docs/sdk/models/entity-sync-config.md +16 -0
- package/docs/sdk/models/execute-subscription-modify-request-request.md +1 -1
- package/docs/sdk/models/execute-subscription-modify-request.md +1 -0
- package/docs/sdk/models/get-entity-integration-mappings-request.md +19 -0
- package/docs/sdk/models/integration-config-entry.md +17 -0
- package/docs/sdk/models/integration-config-response.md +15 -0
- package/docs/sdk/models/invoice-billing-reason.md +1 -1
- package/docs/sdk/models/invoice-filter.md +2 -0
- package/docs/sdk/models/invoice-line-item-response.md +38 -36
- package/docs/sdk/models/invoice-sync-settings.md +15 -0
- package/docs/sdk/models/list-entity-integration-mappings-response.md +16 -0
- package/docs/sdk/models/payment-gateway-type.md +1 -1
- package/docs/sdk/models/preview-subscription-modify-request.md +1 -1
- package/docs/sdk/models/price-price.md +43 -42
- package/docs/sdk/models/price-response.md +48 -47
- package/docs/sdk/models/s3-export-config.md +20 -0
- package/docs/sdk/models/secret-provider.md +1 -1
- package/docs/sdk/models/sub-modify-trial-end-request.md +18 -0
- package/docs/sdk/models/subscription-modify-type.md +2 -2
- package/docs/sdk/models/subscription-response-v2.md +2 -0
- package/docs/sdk/models/subscription-response.md +1 -0
- package/docs/sdk/models/sync-config.md +23 -0
- package/docs/sdk/models/trial-end-action.md +15 -0
- package/docs/sdk/models/update-user-request.md +15 -0
- package/docs/sdk/models/update-user-response.md +20 -0
- package/docs/sdk/models/user-response.md +1 -0
- package/docs/sdks/integrations/README.md +143 -0
- package/docs/sdks/subscriptions/README.md +2 -2
- package/docs/sdks/users/README.md +72 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.d.ts +17 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.d.ts.map +1 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.js +91 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.js.map +1 -0
- package/esm/funcs/integrations-get-integration-config.d.ts +17 -0
- package/esm/funcs/integrations-get-integration-config.d.ts.map +1 -0
- package/esm/funcs/integrations-get-integration-config.js +72 -0
- package/esm/funcs/integrations-get-integration-config.js.map +1 -0
- package/esm/funcs/users-update-user.d.ts +17 -0
- package/esm/funcs/users-update-user.d.ts.map +1 -0
- package/esm/funcs/users-update-user.js +83 -0
- package/esm/funcs/users-update-user.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/sdk/integrations.d.ts +14 -0
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +20 -0
- package/esm/sdk/integrations.js.map +1 -1
- package/esm/sdk/models/changed-subscription.d.ts +2 -0
- package/esm/sdk/models/changed-subscription.d.ts.map +1 -1
- package/esm/sdk/models/changed-subscription.js +10 -2
- package/esm/sdk/models/changed-subscription.js.map +1 -1
- package/esm/sdk/models/create-invoice-line-item-request.d.ts +18 -0
- package/esm/sdk/models/create-invoice-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/create-invoice-line-item-request.js +6 -0
- package/esm/sdk/models/create-invoice-line-item-request.js.map +1 -1
- package/esm/sdk/models/create-user-response.d.ts +3 -0
- package/esm/sdk/models/create-user-response.d.ts.map +1 -1
- package/esm/sdk/models/create-user-response.js +1 -0
- package/esm/sdk/models/create-user-response.js.map +1 -1
- package/esm/sdk/models/entity-integration-mapping-response.d.ts +3 -0
- package/esm/sdk/models/entity-integration-mapping-response.d.ts.map +1 -1
- package/esm/sdk/models/entity-integration-mapping-response.js +1 -0
- package/esm/sdk/models/entity-integration-mapping-response.js.map +1 -1
- package/esm/sdk/models/entity-sync-config.d.ts +17 -0
- package/esm/sdk/models/entity-sync-config.d.ts.map +1 -0
- package/esm/sdk/models/entity-sync-config.js +15 -0
- package/esm/sdk/models/entity-sync-config.js.map +1 -0
- package/esm/sdk/models/execute-subscription-modify-request.d.ts +3 -0
- package/esm/sdk/models/execute-subscription-modify-request.d.ts.map +1 -1
- package/esm/sdk/models/execute-subscription-modify-request.js +3 -0
- package/esm/sdk/models/execute-subscription-modify-request.js.map +1 -1
- package/esm/sdk/models/get-entity-integration-mappings-op.d.ts +20 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.d.ts.map +1 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.js +19 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.js.map +1 -0
- package/esm/sdk/models/index.d.ts +12 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +12 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/integration-config-entry.d.ts +14 -0
- package/esm/sdk/models/integration-config-entry.d.ts.map +1 -0
- package/esm/sdk/models/integration-config-entry.js +24 -0
- package/esm/sdk/models/integration-config-entry.js.map +1 -0
- package/esm/sdk/models/integration-config-response.d.ts +11 -0
- package/esm/sdk/models/integration-config-response.d.ts.map +1 -0
- package/esm/sdk/models/integration-config-response.js +15 -0
- package/esm/sdk/models/integration-config-response.js.map +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
- package/esm/sdk/models/invoice-billing-reason.js +1 -0
- package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
- package/esm/sdk/models/invoice-filter.d.ts +11 -0
- package/esm/sdk/models/invoice-filter.d.ts.map +1 -1
- package/esm/sdk/models/invoice-filter.js +4 -0
- package/esm/sdk/models/invoice-filter.js.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.d.ts +11 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +4 -0
- package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
- package/esm/sdk/models/invoice-sync-settings.d.ts +11 -0
- package/esm/sdk/models/invoice-sync-settings.d.ts.map +1 -0
- package/esm/sdk/models/invoice-sync-settings.js +20 -0
- package/esm/sdk/models/invoice-sync-settings.js.map +1 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.d.ts +13 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.d.ts.map +1 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.js +17 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.js.map +1 -0
- package/esm/sdk/models/payment-gateway-type.d.ts +1 -0
- package/esm/sdk/models/payment-gateway-type.d.ts.map +1 -1
- package/esm/sdk/models/payment-gateway-type.js +1 -0
- package/esm/sdk/models/payment-gateway-type.js.map +1 -1
- package/esm/sdk/models/price-price.d.ts +9 -0
- package/esm/sdk/models/price-price.d.ts.map +1 -1
- package/esm/sdk/models/price-price.js +1 -0
- package/esm/sdk/models/price-price.js.map +1 -1
- package/esm/sdk/models/price-response.d.ts +9 -0
- package/esm/sdk/models/price-response.d.ts.map +1 -1
- package/esm/sdk/models/price-response.js +1 -0
- package/esm/sdk/models/price-response.js.map +1 -1
- package/esm/sdk/models/s3-export-config.d.ts +29 -0
- package/esm/sdk/models/s3-export-config.d.ts.map +1 -0
- package/esm/sdk/models/s3-export-config.js +27 -0
- package/esm/sdk/models/s3-export-config.js.map +1 -0
- package/esm/sdk/models/secret-provider.d.ts +1 -0
- package/esm/sdk/models/secret-provider.d.ts.map +1 -1
- package/esm/sdk/models/secret-provider.js +1 -0
- package/esm/sdk/models/secret-provider.js.map +1 -1
- package/esm/sdk/models/sub-modify-trial-end-request.d.ts +18 -0
- package/esm/sdk/models/sub-modify-trial-end-request.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-trial-end-request.js +19 -0
- package/esm/sdk/models/sub-modify-trial-end-request.js.map +1 -0
- package/esm/sdk/models/subscription-modify-type.d.ts +1 -0
- package/esm/sdk/models/subscription-modify-type.d.ts.map +1 -1
- package/esm/sdk/models/subscription-modify-type.js +1 -0
- package/esm/sdk/models/subscription-modify-type.js.map +1 -1
- package/esm/sdk/models/subscription-response-v2.d.ts +16 -0
- package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response-v2.js +4 -0
- package/esm/sdk/models/subscription-response-v2.js.map +1 -1
- package/esm/sdk/models/subscription-response.d.ts +8 -0
- package/esm/sdk/models/subscription-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response.js +2 -0
- package/esm/sdk/models/subscription-response.js.map +1 -1
- package/esm/sdk/models/sync-config.d.ts +21 -0
- package/esm/sdk/models/sync-config.d.ts.map +1 -0
- package/esm/sdk/models/sync-config.js +31 -0
- package/esm/sdk/models/sync-config.js.map +1 -0
- package/esm/sdk/models/trial-end-action.d.ts +10 -0
- package/esm/sdk/models/trial-end-action.d.ts.map +1 -0
- package/esm/sdk/models/trial-end-action.js +11 -0
- package/esm/sdk/models/trial-end-action.js.map +1 -0
- package/esm/sdk/models/update-user-request.d.ts +16 -0
- package/esm/sdk/models/update-user-request.d.ts.map +1 -0
- package/esm/sdk/models/update-user-request.js +12 -0
- package/esm/sdk/models/update-user-request.js.map +1 -0
- package/esm/sdk/models/update-user-response.d.ts +22 -0
- package/esm/sdk/models/update-user-response.d.ts.map +1 -0
- package/esm/sdk/models/update-user-response.js +21 -0
- package/esm/sdk/models/update-user-response.js.map +1 -0
- package/esm/sdk/models/user-response.d.ts +3 -0
- package/esm/sdk/models/user-response.d.ts.map +1 -1
- package/esm/sdk/models/user-response.js +1 -0
- package/esm/sdk/models/user-response.js.map +1 -1
- package/esm/sdk/users.d.ts +7 -0
- package/esm/sdk/users.d.ts.map +1 -1
- package/esm/sdk/users.js +10 -0
- package/esm/sdk/users.js.map +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +6 -6
- package/esm/types/async.js.map +1 -1
- package/esm/types/primitives.d.ts +0 -2
- package/esm/types/primitives.d.ts.map +1 -1
- package/esm/types/primitives.js +0 -22
- package/esm/types/primitives.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/integrations-get-entity-integration-mappings.ts +186 -0
- package/src/funcs/integrations-get-integration-config.ts +152 -0
- package/src/funcs/users-update-user.ts +172 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/integrations.ts +36 -0
- package/src/sdk/models/changed-subscription.ts +18 -5
- package/src/sdk/models/create-invoice-line-item-request.ts +24 -0
- package/src/sdk/models/create-user-response.ts +2 -0
- package/src/sdk/models/entity-integration-mapping-response.ts +2 -0
- package/src/sdk/models/entity-sync-config.ts +39 -0
- package/src/sdk/models/execute-subscription-modify-request.ts +9 -0
- package/src/sdk/models/get-entity-integration-mappings-op.ts +50 -0
- package/src/sdk/models/index.ts +12 -0
- package/src/sdk/models/integration-config-entry.ts +49 -0
- package/src/sdk/models/integration-config-response.ts +35 -0
- package/src/sdk/models/invoice-billing-reason.ts +1 -0
- package/src/sdk/models/invoice-filter.ts +17 -0
- package/src/sdk/models/invoice-line-item-response.ts +15 -0
- package/src/sdk/models/invoice-sync-settings.ts +43 -0
- package/src/sdk/models/list-entity-integration-mappings-response.ts +44 -0
- package/src/sdk/models/payment-gateway-type.ts +1 -0
- package/src/sdk/models/price-price.ts +10 -0
- package/src/sdk/models/price-response.ts +10 -0
- package/src/sdk/models/s3-export-config.ts +70 -0
- package/src/sdk/models/secret-provider.ts +1 -0
- package/src/sdk/models/sub-modify-trial-end-request.ts +50 -0
- package/src/sdk/models/subscription-modify-type.ts +1 -0
- package/src/sdk/models/subscription-response-v2.ts +20 -0
- package/src/sdk/models/subscription-response.ts +10 -0
- package/src/sdk/models/sync-config.ts +65 -0
- package/src/sdk/models/trial-end-action.ts +17 -0
- package/src/sdk/models/update-user-request.ts +30 -0
- package/src/sdk/models/update-user-response.ts +49 -0
- package/src/sdk/models/user-response.ts +2 -0
- package/src/sdk/users.ts +18 -0
- package/src/types/async.ts +8 -7
- package/src/types/primitives.ts +0 -26
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { FlexpriceCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../sdk/models/http-client-errors.js";
|
|
23
|
+
import * as models from "../sdk/models/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get entity integration mappings
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Get integration mappings for a specific entity by entity type and entity ID.
|
|
34
|
+
*/
|
|
35
|
+
export function integrationsGetEntityIntegrationMappings(
|
|
36
|
+
client: FlexpriceCore,
|
|
37
|
+
entityType: string,
|
|
38
|
+
entityId: string,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
models.ListEntityIntegrationMappingsResponse,
|
|
43
|
+
| models.ErrorsErrorResponse
|
|
44
|
+
| FlexPriceError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
entityType,
|
|
57
|
+
entityId,
|
|
58
|
+
options,
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function $do(
|
|
63
|
+
client: FlexpriceCore,
|
|
64
|
+
entityType: string,
|
|
65
|
+
entityId: string,
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): Promise<
|
|
68
|
+
[
|
|
69
|
+
Result<
|
|
70
|
+
models.ListEntityIntegrationMappingsResponse,
|
|
71
|
+
| models.ErrorsErrorResponse
|
|
72
|
+
| FlexPriceError
|
|
73
|
+
| ResponseValidationError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
| RequestAbortedError
|
|
76
|
+
| RequestTimeoutError
|
|
77
|
+
| InvalidRequestError
|
|
78
|
+
| UnexpectedClientError
|
|
79
|
+
| SDKValidationError
|
|
80
|
+
>,
|
|
81
|
+
APICall,
|
|
82
|
+
]
|
|
83
|
+
> {
|
|
84
|
+
const input: models.GetEntityIntegrationMappingsRequest = {
|
|
85
|
+
entityType: entityType,
|
|
86
|
+
entityId: entityId,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const parsed = safeParse(
|
|
90
|
+
input,
|
|
91
|
+
(value) =>
|
|
92
|
+
z.parse(models.GetEntityIntegrationMappingsRequest$outboundSchema, value),
|
|
93
|
+
"Input validation failed",
|
|
94
|
+
);
|
|
95
|
+
if (!parsed.ok) {
|
|
96
|
+
return [parsed, { status: "invalid" }];
|
|
97
|
+
}
|
|
98
|
+
const payload = parsed.value;
|
|
99
|
+
const body = null;
|
|
100
|
+
|
|
101
|
+
const path = pathToFunc("/integrations/mappings")();
|
|
102
|
+
|
|
103
|
+
const query = encodeFormQuery({
|
|
104
|
+
"entity_id": payload.entity_id,
|
|
105
|
+
"entity_type": payload.entity_type,
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const headers = new Headers(compactMap({
|
|
109
|
+
Accept: "application/json",
|
|
110
|
+
}));
|
|
111
|
+
|
|
112
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
113
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
114
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
115
|
+
|
|
116
|
+
const context = {
|
|
117
|
+
options: client._options,
|
|
118
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
119
|
+
operationID: "getEntityIntegrationMappings",
|
|
120
|
+
oAuth2Scopes: null,
|
|
121
|
+
|
|
122
|
+
resolvedSecurity: requestSecurity,
|
|
123
|
+
|
|
124
|
+
securitySource: client._options.apiKeyAuth,
|
|
125
|
+
retryConfig: options?.retries
|
|
126
|
+
|| client._options.retryConfig
|
|
127
|
+
|| { strategy: "none" },
|
|
128
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const requestRes = client._createRequest(context, {
|
|
132
|
+
security: requestSecurity,
|
|
133
|
+
method: "GET",
|
|
134
|
+
baseURL: options?.serverURL,
|
|
135
|
+
path: path,
|
|
136
|
+
headers: headers,
|
|
137
|
+
query: query,
|
|
138
|
+
body: body,
|
|
139
|
+
userAgent: client._options.userAgent,
|
|
140
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
141
|
+
}, options);
|
|
142
|
+
if (!requestRes.ok) {
|
|
143
|
+
return [requestRes, { status: "invalid" }];
|
|
144
|
+
}
|
|
145
|
+
const req = requestRes.value;
|
|
146
|
+
|
|
147
|
+
const doResult = await client._do(req, {
|
|
148
|
+
context,
|
|
149
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
150
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
151
|
+
retryConfig: context.retryConfig,
|
|
152
|
+
retryCodes: context.retryCodes,
|
|
153
|
+
});
|
|
154
|
+
if (!doResult.ok) {
|
|
155
|
+
return [doResult, { status: "request-error", request: req }];
|
|
156
|
+
}
|
|
157
|
+
const response = doResult.value;
|
|
158
|
+
|
|
159
|
+
const responseFields = {
|
|
160
|
+
HttpMeta: { Response: response, Request: req },
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const [result] = await M.match<
|
|
164
|
+
models.ListEntityIntegrationMappingsResponse,
|
|
165
|
+
| models.ErrorsErrorResponse
|
|
166
|
+
| FlexPriceError
|
|
167
|
+
| ResponseValidationError
|
|
168
|
+
| ConnectionError
|
|
169
|
+
| RequestAbortedError
|
|
170
|
+
| RequestTimeoutError
|
|
171
|
+
| InvalidRequestError
|
|
172
|
+
| UnexpectedClientError
|
|
173
|
+
| SDKValidationError
|
|
174
|
+
>(
|
|
175
|
+
M.json(200, models.ListEntityIntegrationMappingsResponse$inboundSchema),
|
|
176
|
+
M.jsonErr(400, models.ErrorsErrorResponse$inboundSchema),
|
|
177
|
+
M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema),
|
|
178
|
+
M.fail("4XX"),
|
|
179
|
+
M.fail("5XX"),
|
|
180
|
+
)(response, req, { extraFields: responseFields });
|
|
181
|
+
if (!result.ok) {
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return [result, { status: "complete", request: req, response }];
|
|
186
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { FlexpriceCore } from "../core.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/http-client-errors.js";
|
|
20
|
+
import * as models from "../sdk/models/index.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get integration configurations
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Returns the base capabilities and current sync configuration for all connected providers.
|
|
31
|
+
*/
|
|
32
|
+
export function integrationsGetIntegrationConfig(
|
|
33
|
+
client: FlexpriceCore,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
models.IntegrationConfigResponse,
|
|
38
|
+
| models.ErrorsErrorResponse
|
|
39
|
+
| FlexPriceError
|
|
40
|
+
| ResponseValidationError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| UnexpectedClientError
|
|
46
|
+
| SDKValidationError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
return new APIPromise($do(
|
|
50
|
+
client,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: FlexpriceCore,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<
|
|
59
|
+
[
|
|
60
|
+
Result<
|
|
61
|
+
models.IntegrationConfigResponse,
|
|
62
|
+
| models.ErrorsErrorResponse
|
|
63
|
+
| FlexPriceError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const path = pathToFunc("/integrations/config")();
|
|
76
|
+
|
|
77
|
+
const headers = new Headers(compactMap({
|
|
78
|
+
Accept: "application/json",
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
82
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
83
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
84
|
+
|
|
85
|
+
const context = {
|
|
86
|
+
options: client._options,
|
|
87
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
88
|
+
operationID: "getIntegrationConfig",
|
|
89
|
+
oAuth2Scopes: null,
|
|
90
|
+
|
|
91
|
+
resolvedSecurity: requestSecurity,
|
|
92
|
+
|
|
93
|
+
securitySource: client._options.apiKeyAuth,
|
|
94
|
+
retryConfig: options?.retries
|
|
95
|
+
|| client._options.retryConfig
|
|
96
|
+
|| { strategy: "none" },
|
|
97
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const requestRes = client._createRequest(context, {
|
|
101
|
+
security: requestSecurity,
|
|
102
|
+
method: "GET",
|
|
103
|
+
baseURL: options?.serverURL,
|
|
104
|
+
path: path,
|
|
105
|
+
headers: headers,
|
|
106
|
+
userAgent: client._options.userAgent,
|
|
107
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
108
|
+
}, options);
|
|
109
|
+
if (!requestRes.ok) {
|
|
110
|
+
return [requestRes, { status: "invalid" }];
|
|
111
|
+
}
|
|
112
|
+
const req = requestRes.value;
|
|
113
|
+
|
|
114
|
+
const doResult = await client._do(req, {
|
|
115
|
+
context,
|
|
116
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
117
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
118
|
+
retryConfig: context.retryConfig,
|
|
119
|
+
retryCodes: context.retryCodes,
|
|
120
|
+
});
|
|
121
|
+
if (!doResult.ok) {
|
|
122
|
+
return [doResult, { status: "request-error", request: req }];
|
|
123
|
+
}
|
|
124
|
+
const response = doResult.value;
|
|
125
|
+
|
|
126
|
+
const responseFields = {
|
|
127
|
+
HttpMeta: { Response: response, Request: req },
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const [result] = await M.match<
|
|
131
|
+
models.IntegrationConfigResponse,
|
|
132
|
+
| models.ErrorsErrorResponse
|
|
133
|
+
| FlexPriceError
|
|
134
|
+
| ResponseValidationError
|
|
135
|
+
| ConnectionError
|
|
136
|
+
| RequestAbortedError
|
|
137
|
+
| RequestTimeoutError
|
|
138
|
+
| InvalidRequestError
|
|
139
|
+
| UnexpectedClientError
|
|
140
|
+
| SDKValidationError
|
|
141
|
+
>(
|
|
142
|
+
M.json(200, models.IntegrationConfigResponse$inboundSchema),
|
|
143
|
+
M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema),
|
|
144
|
+
M.fail("4XX"),
|
|
145
|
+
M.fail("5XX"),
|
|
146
|
+
)(response, req, { extraFields: responseFields });
|
|
147
|
+
if (!result.ok) {
|
|
148
|
+
return [result, { status: "complete", request: req, response }];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return [result, { status: "complete", request: req, response }];
|
|
152
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { FlexpriceCore } from "../core.js";
|
|
7
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../sdk/models/http-client-errors.js";
|
|
23
|
+
import * as models from "../sdk/models/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Update current user
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Update the current authenticated user. Only metadata updates are supported.
|
|
34
|
+
*/
|
|
35
|
+
export function usersUpdateUser(
|
|
36
|
+
client: FlexpriceCore,
|
|
37
|
+
request: models.UpdateUserRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
models.UpdateUserResponse,
|
|
42
|
+
| models.ErrorsErrorResponse
|
|
43
|
+
| FlexPriceError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: FlexpriceCore,
|
|
62
|
+
request: models.UpdateUserRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
models.UpdateUserResponse,
|
|
68
|
+
| models.ErrorsErrorResponse
|
|
69
|
+
| FlexPriceError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) => z.parse(models.UpdateUserRequest$outboundSchema, value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
91
|
+
|
|
92
|
+
const path = pathToFunc("/users/me")();
|
|
93
|
+
|
|
94
|
+
const headers = new Headers(compactMap({
|
|
95
|
+
"Content-Type": "application/json",
|
|
96
|
+
Accept: "application/json",
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
100
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
101
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
|
+
|
|
103
|
+
const context = {
|
|
104
|
+
options: client._options,
|
|
105
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
106
|
+
operationID: "updateUser",
|
|
107
|
+
oAuth2Scopes: null,
|
|
108
|
+
|
|
109
|
+
resolvedSecurity: requestSecurity,
|
|
110
|
+
|
|
111
|
+
securitySource: client._options.apiKeyAuth,
|
|
112
|
+
retryConfig: options?.retries
|
|
113
|
+
|| client._options.retryConfig
|
|
114
|
+
|| { strategy: "none" },
|
|
115
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const requestRes = client._createRequest(context, {
|
|
119
|
+
security: requestSecurity,
|
|
120
|
+
method: "PUT",
|
|
121
|
+
baseURL: options?.serverURL,
|
|
122
|
+
path: path,
|
|
123
|
+
headers: headers,
|
|
124
|
+
body: body,
|
|
125
|
+
userAgent: client._options.userAgent,
|
|
126
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
127
|
+
}, options);
|
|
128
|
+
if (!requestRes.ok) {
|
|
129
|
+
return [requestRes, { status: "invalid" }];
|
|
130
|
+
}
|
|
131
|
+
const req = requestRes.value;
|
|
132
|
+
|
|
133
|
+
const doResult = await client._do(req, {
|
|
134
|
+
context,
|
|
135
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
136
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
137
|
+
retryConfig: context.retryConfig,
|
|
138
|
+
retryCodes: context.retryCodes,
|
|
139
|
+
});
|
|
140
|
+
if (!doResult.ok) {
|
|
141
|
+
return [doResult, { status: "request-error", request: req }];
|
|
142
|
+
}
|
|
143
|
+
const response = doResult.value;
|
|
144
|
+
|
|
145
|
+
const responseFields = {
|
|
146
|
+
HttpMeta: { Response: response, Request: req },
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const [result] = await M.match<
|
|
150
|
+
models.UpdateUserResponse,
|
|
151
|
+
| models.ErrorsErrorResponse
|
|
152
|
+
| FlexPriceError
|
|
153
|
+
| ResponseValidationError
|
|
154
|
+
| ConnectionError
|
|
155
|
+
| RequestAbortedError
|
|
156
|
+
| RequestTimeoutError
|
|
157
|
+
| InvalidRequestError
|
|
158
|
+
| UnexpectedClientError
|
|
159
|
+
| SDKValidationError
|
|
160
|
+
>(
|
|
161
|
+
M.json(200, models.UpdateUserResponse$inboundSchema),
|
|
162
|
+
M.jsonErr(400, models.ErrorsErrorResponse$inboundSchema),
|
|
163
|
+
M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema),
|
|
164
|
+
M.fail("4XX"),
|
|
165
|
+
M.fail("5XX"),
|
|
166
|
+
)(response, req, { extraFields: responseFields });
|
|
167
|
+
if (!result.ok) {
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0",
|
|
68
|
-
sdkVersion: "2.1.
|
|
69
|
-
genVersion: "2.
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 2.1.
|
|
68
|
+
sdkVersion: "2.1.17",
|
|
69
|
+
genVersion: "2.893.0",
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 2.1.17 2.893.0 1.0 @flexprice/sdk",
|
|
71
71
|
} as const;
|
package/src/sdk/integrations.ts
CHANGED
|
@@ -2,12 +2,29 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { integrationsGetEntityIntegrationMappings } from "../funcs/integrations-get-entity-integration-mappings.js";
|
|
6
|
+
import { integrationsGetIntegrationConfig } from "../funcs/integrations-get-integration-config.js";
|
|
5
7
|
import { integrationsLinkIntegrationMapping } from "../funcs/integrations-link-integration-mapping.js";
|
|
6
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
9
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
10
|
import * as models from "./models/index.js";
|
|
9
11
|
|
|
10
12
|
export class Integrations extends ClientSDK {
|
|
13
|
+
/**
|
|
14
|
+
* Get integration configurations
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Returns the base capabilities and current sync configuration for all connected providers.
|
|
18
|
+
*/
|
|
19
|
+
async getIntegrationConfig(
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): Promise<models.IntegrationConfigResponse> {
|
|
22
|
+
return unwrapAsync(integrationsGetIntegrationConfig(
|
|
23
|
+
this,
|
|
24
|
+
options,
|
|
25
|
+
));
|
|
26
|
+
}
|
|
27
|
+
|
|
11
28
|
/**
|
|
12
29
|
* Link integration mapping
|
|
13
30
|
*
|
|
@@ -24,4 +41,23 @@ export class Integrations extends ClientSDK {
|
|
|
24
41
|
options,
|
|
25
42
|
));
|
|
26
43
|
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Get entity integration mappings
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* Get integration mappings for a specific entity by entity type and entity ID.
|
|
50
|
+
*/
|
|
51
|
+
async getEntityIntegrationMappings(
|
|
52
|
+
entityType: string,
|
|
53
|
+
entityId: string,
|
|
54
|
+
options?: RequestOptions,
|
|
55
|
+
): Promise<models.ListEntityIntegrationMappingsResponse> {
|
|
56
|
+
return unwrapAsync(integrationsGetEntityIntegrationMappings(
|
|
57
|
+
this,
|
|
58
|
+
entityType,
|
|
59
|
+
entityId,
|
|
60
|
+
options,
|
|
61
|
+
));
|
|
62
|
+
}
|
|
27
63
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import * as types from "../../types/primitives.js";
|
|
@@ -21,19 +22,31 @@ export type ChangedSubscription = {
|
|
|
21
22
|
* created | updated
|
|
22
23
|
*/
|
|
23
24
|
action?: ChangedSubscriptionAction | undefined;
|
|
25
|
+
currentPeriodEnd?: Date | undefined;
|
|
24
26
|
id?: string | undefined;
|
|
25
27
|
status?: SubscriptionStatus | undefined;
|
|
28
|
+
trialEnd?: Date | undefined;
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
/** @internal */
|
|
29
32
|
export const ChangedSubscription$inboundSchema: z.ZodMiniType<
|
|
30
33
|
ChangedSubscription,
|
|
31
34
|
unknown
|
|
32
|
-
> = z.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
> = z.pipe(
|
|
36
|
+
z.object({
|
|
37
|
+
action: types.optional(ChangedSubscriptionAction$inboundSchema),
|
|
38
|
+
current_period_end: types.optional(types.date()),
|
|
39
|
+
id: types.optional(types.string()),
|
|
40
|
+
status: types.optional(SubscriptionStatus$inboundSchema),
|
|
41
|
+
trial_end: types.optional(types.date()),
|
|
42
|
+
}),
|
|
43
|
+
z.transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"current_period_end": "currentPeriodEnd",
|
|
46
|
+
"trial_end": "trialEnd",
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
37
50
|
|
|
38
51
|
export function changedSubscriptionFromJSON(
|
|
39
52
|
jsonString: string,
|
|
@@ -11,6 +11,10 @@ import {
|
|
|
11
11
|
} from "./commitment-info.js";
|
|
12
12
|
|
|
13
13
|
export type CreateInvoiceLineItemRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* adjusted_entitlement_quantity is the entitlement-covered units deducted from raw usage.
|
|
16
|
+
*/
|
|
17
|
+
adjustedEntitlementQuantity?: string | undefined;
|
|
14
18
|
/**
|
|
15
19
|
* amount is the monetary amount for this line item
|
|
16
20
|
*/
|
|
@@ -88,10 +92,22 @@ export type CreateInvoiceLineItemRequest = {
|
|
|
88
92
|
* quantity is the quantity of units for this line item
|
|
89
93
|
*/
|
|
90
94
|
quantity: string;
|
|
95
|
+
/**
|
|
96
|
+
* subscription_id overrides the invoice's subscription_id for this specific line item.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* Used for grouped invoicing where child line items belong to child subscriptions.
|
|
100
|
+
*/
|
|
101
|
+
subscriptionId?: string | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* sub_line_item_id links this line item to the subscription_line_item that generated it.
|
|
104
|
+
*/
|
|
105
|
+
subscriptionLineItemId?: string | undefined;
|
|
91
106
|
};
|
|
92
107
|
|
|
93
108
|
/** @internal */
|
|
94
109
|
export type CreateInvoiceLineItemRequest$Outbound = {
|
|
110
|
+
adjusted_entitlement_quantity?: string | undefined;
|
|
95
111
|
amount: string;
|
|
96
112
|
commitment_info?: CommitmentInfo$Outbound | undefined;
|
|
97
113
|
display_name?: string | undefined;
|
|
@@ -112,6 +128,8 @@ export type CreateInvoiceLineItemRequest$Outbound = {
|
|
|
112
128
|
price_unit?: string | undefined;
|
|
113
129
|
price_unit_amount?: string | undefined;
|
|
114
130
|
quantity: string;
|
|
131
|
+
subscription_id?: string | undefined;
|
|
132
|
+
subscription_line_item_id?: string | undefined;
|
|
115
133
|
};
|
|
116
134
|
|
|
117
135
|
/** @internal */
|
|
@@ -120,6 +138,7 @@ export const CreateInvoiceLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
120
138
|
CreateInvoiceLineItemRequest
|
|
121
139
|
> = z.pipe(
|
|
122
140
|
z.object({
|
|
141
|
+
adjustedEntitlementQuantity: z.optional(z.string()),
|
|
123
142
|
amount: z.string(),
|
|
124
143
|
commitmentInfo: z.optional(CommitmentInfo$outboundSchema),
|
|
125
144
|
displayName: z.optional(z.string()),
|
|
@@ -142,9 +161,12 @@ export const CreateInvoiceLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
142
161
|
priceUnit: z.optional(z.string()),
|
|
143
162
|
priceUnitAmount: z.optional(z.string()),
|
|
144
163
|
quantity: z.string(),
|
|
164
|
+
subscriptionId: z.optional(z.string()),
|
|
165
|
+
subscriptionLineItemId: z.optional(z.string()),
|
|
145
166
|
}),
|
|
146
167
|
z.transform((v) => {
|
|
147
168
|
return remap$(v, {
|
|
169
|
+
adjustedEntitlementQuantity: "adjusted_entitlement_quantity",
|
|
148
170
|
commitmentInfo: "commitment_info",
|
|
149
171
|
displayName: "display_name",
|
|
150
172
|
entityId: "entity_id",
|
|
@@ -162,6 +184,8 @@ export const CreateInvoiceLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
162
184
|
priceType: "price_type",
|
|
163
185
|
priceUnit: "price_unit",
|
|
164
186
|
priceUnitAmount: "price_unit_amount",
|
|
187
|
+
subscriptionId: "subscription_id",
|
|
188
|
+
subscriptionLineItemId: "subscription_line_item_id",
|
|
165
189
|
});
|
|
166
190
|
}),
|
|
167
191
|
);
|