@vercel/sdk 14.0.0-canary.7 → 14.0.0-canary.9
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/.devcontainer/README.md +1 -1
- package/README.md +25 -0
- package/docs/sdks/authentication/README.md +69 -0
- package/docs/sdks/marketplace/README.md +694 -0
- package/docs/sdks/projects/README.md +85 -0
- package/esm/funcs/authenticationExchangeSsoToken.d.ts +15 -0
- package/esm/funcs/authenticationExchangeSsoToken.d.ts.map +1 -0
- package/esm/funcs/authenticationExchangeSsoToken.js +66 -0
- package/esm/funcs/authenticationExchangeSsoToken.js.map +1 -0
- package/esm/funcs/marketplaceCreateEvent.d.ts +15 -0
- package/esm/funcs/marketplaceCreateEvent.d.ts.map +1 -0
- package/esm/funcs/marketplaceCreateEvent.js +73 -0
- package/esm/funcs/marketplaceCreateEvent.js.map +1 -0
- package/esm/funcs/marketplaceExchangeSsoToken.d.ts +15 -0
- package/esm/funcs/marketplaceExchangeSsoToken.d.ts.map +1 -0
- package/esm/funcs/marketplaceExchangeSsoToken.js +66 -0
- package/esm/funcs/marketplaceExchangeSsoToken.js.map +1 -0
- package/esm/funcs/marketplaceGetAccountInfo.d.ts +15 -0
- package/esm/funcs/marketplaceGetAccountInfo.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetAccountInfo.js +71 -0
- package/esm/funcs/marketplaceGetAccountInfo.js.map +1 -0
- package/esm/funcs/marketplaceGetInvoice.d.ts +15 -0
- package/esm/funcs/marketplaceGetInvoice.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetInvoice.js +75 -0
- package/esm/funcs/marketplaceGetInvoice.js.map +1 -0
- package/esm/funcs/marketplaceGetMember.d.ts +15 -0
- package/esm/funcs/marketplaceGetMember.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetMember.js +75 -0
- package/esm/funcs/marketplaceGetMember.js.map +1 -0
- package/esm/funcs/marketplaceSubmitBillingData.d.ts +15 -0
- package/esm/funcs/marketplaceSubmitBillingData.d.ts.map +1 -0
- package/esm/funcs/marketplaceSubmitBillingData.js +73 -0
- package/esm/funcs/marketplaceSubmitBillingData.js.map +1 -0
- package/esm/funcs/marketplaceSubmitInvoice.d.ts +15 -0
- package/esm/funcs/marketplaceSubmitInvoice.d.ts.map +1 -0
- package/esm/funcs/marketplaceSubmitInvoice.js +72 -0
- package/esm/funcs/marketplaceSubmitInvoice.js.map +1 -0
- package/esm/funcs/marketplaceUpdateInvoice.d.ts +15 -0
- package/esm/funcs/marketplaceUpdateInvoice.d.ts.map +1 -0
- package/esm/funcs/marketplaceUpdateInvoice.js +77 -0
- package/esm/funcs/marketplaceUpdateInvoice.js.map +1 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.d.ts +15 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.d.ts.map +1 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.js +78 -0
- package/esm/funcs/marketplaceUpdateResourceSecrets.js.map +1 -0
- package/esm/funcs/projectsGetProjectDomains.d.ts +15 -0
- package/esm/funcs/projectsGetProjectDomains.d.ts.map +1 -0
- package/esm/funcs/projectsGetProjectDomains.js +89 -0
- package/esm/funcs/projectsGetProjectDomains.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/authuser.d.ts +6 -3
- package/esm/models/components/authuser.d.ts.map +1 -1
- package/esm/models/components/authuser.js +2 -1
- package/esm/models/components/authuser.js.map +1 -1
- package/esm/models/components/security.d.ts +2 -2
- package/esm/models/components/security.d.ts.map +1 -1
- package/esm/models/components/security.js +2 -2
- package/esm/models/components/security.js.map +1 -1
- package/esm/models/operations/createevent.d.ts +187 -0
- package/esm/models/operations/createevent.d.ts.map +1 -0
- package/esm/models/operations/createevent.js +195 -0
- package/esm/models/operations/createevent.js.map +1 -0
- package/esm/models/operations/createproject.d.ts +4 -0
- package/esm/models/operations/createproject.d.ts.map +1 -1
- package/esm/models/operations/createproject.js +4 -0
- package/esm/models/operations/createproject.js.map +1 -1
- package/esm/models/operations/createteam.d.ts +15 -15
- package/esm/models/operations/createteam.d.ts.map +1 -1
- package/esm/models/operations/createteam.js +15 -15
- package/esm/models/operations/createteam.js.map +1 -1
- package/esm/models/operations/deletedeployment.d.ts +8 -8
- package/esm/models/operations/deletedeployment.d.ts.map +1 -1
- package/esm/models/operations/deletedeployment.js +12 -12
- package/esm/models/operations/deletedeployment.js.map +1 -1
- package/esm/models/operations/exchangessotoken.d.ts +81 -0
- package/esm/models/operations/exchangessotoken.d.ts.map +1 -0
- package/esm/models/operations/exchangessotoken.js +93 -0
- package/esm/models/operations/exchangessotoken.js.map +1 -0
- package/esm/models/operations/getaccountinfo.d.ts +85 -0
- package/esm/models/operations/getaccountinfo.d.ts.map +1 -0
- package/esm/models/operations/getaccountinfo.js +87 -0
- package/esm/models/operations/getaccountinfo.js.map +1 -0
- package/esm/models/operations/getinvoice.d.ts +232 -0
- package/esm/models/operations/getinvoice.d.ts.map +1 -0
- package/esm/models/operations/getinvoice.js +219 -0
- package/esm/models/operations/getinvoice.js.map +1 -0
- package/esm/models/operations/getmember.d.ts +84 -0
- package/esm/models/operations/getmember.d.ts.map +1 -0
- package/esm/models/operations/getmember.js +79 -0
- package/esm/models/operations/getmember.js.map +1 -0
- package/esm/models/operations/getprojectdomains.d.ts +367 -0
- package/esm/models/operations/getprojectdomains.d.ts.map +1 -0
- package/esm/models/operations/getprojectdomains.js +272 -0
- package/esm/models/operations/getprojectdomains.js.map +1 -0
- package/esm/models/operations/getprojects.d.ts +4 -0
- package/esm/models/operations/getprojects.d.ts.map +1 -1
- package/esm/models/operations/getprojects.js +4 -0
- package/esm/models/operations/getprojects.js.map +1 -1
- package/esm/models/operations/putfirewallconfig.d.ts +44 -44
- package/esm/models/operations/putfirewallconfig.d.ts.map +1 -1
- package/esm/models/operations/putfirewallconfig.js +71 -72
- package/esm/models/operations/putfirewallconfig.js.map +1 -1
- package/esm/models/operations/submitbillingdata.d.ts +448 -0
- package/esm/models/operations/submitbillingdata.d.ts.map +1 -0
- package/esm/models/operations/submitbillingdata.js +355 -0
- package/esm/models/operations/submitbillingdata.js.map +1 -0
- package/esm/models/operations/submitinvoice.d.ts +299 -0
- package/esm/models/operations/submitinvoice.d.ts.map +1 -0
- package/esm/models/operations/submitinvoice.js +269 -0
- package/esm/models/operations/submitinvoice.js.map +1 -0
- package/esm/models/operations/updateinvoice.d.ts +91 -0
- package/esm/models/operations/updateinvoice.d.ts.map +1 -0
- package/esm/models/operations/updateinvoice.js +92 -0
- package/esm/models/operations/updateinvoice.js.map +1 -0
- package/esm/models/operations/updateproject.d.ts +4 -0
- package/esm/models/operations/updateproject.d.ts.map +1 -1
- package/esm/models/operations/updateproject.js +4 -0
- package/esm/models/operations/updateproject.js.map +1 -1
- package/esm/models/operations/updateprojectdatacache.d.ts +4 -0
- package/esm/models/operations/updateprojectdatacache.d.ts.map +1 -1
- package/esm/models/operations/updateprojectdatacache.js +4 -0
- package/esm/models/operations/updateprojectdatacache.js.map +1 -1
- package/esm/models/operations/updateresourcesecrets.d.ts +87 -0
- package/esm/models/operations/updateresourcesecrets.d.ts.map +1 -0
- package/esm/models/operations/updateresourcesecrets.js +100 -0
- package/esm/models/operations/updateresourcesecrets.js.map +1 -0
- package/esm/sdk/authentication.d.ts +8 -0
- package/esm/sdk/authentication.d.ts.map +1 -1
- package/esm/sdk/authentication.js +10 -0
- package/esm/sdk/authentication.js.map +1 -1
- package/esm/sdk/marketplace.d.ts +76 -0
- package/esm/sdk/marketplace.d.ts.map +1 -0
- package/esm/sdk/marketplace.js +98 -0
- package/esm/sdk/marketplace.js.map +1 -0
- package/esm/sdk/projects.d.ts +8 -0
- package/esm/sdk/projects.d.ts.map +1 -1
- package/esm/sdk/projects.js +10 -0
- package/esm/sdk/projects.js.map +1 -1
- package/esm/sdk/sdk.d.ts +5 -2
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +9 -4
- package/esm/sdk/sdk.js.map +1 -1
- package/package.json +2 -2
- package/src/funcs/authenticationExchangeSsoToken.ts +125 -0
- package/src/funcs/marketplaceCreateEvent.ts +137 -0
- package/src/funcs/marketplaceExchangeSsoToken.ts +125 -0
- package/src/funcs/marketplaceGetAccountInfo.ts +137 -0
- package/src/funcs/marketplaceGetInvoice.ts +141 -0
- package/src/funcs/marketplaceGetMember.ts +141 -0
- package/src/funcs/marketplaceSubmitBillingData.ts +137 -0
- package/src/funcs/marketplaceSubmitInvoice.ts +138 -0
- package/src/funcs/marketplaceUpdateInvoice.ts +141 -0
- package/src/funcs/marketplaceUpdateResourceSecrets.ts +146 -0
- package/src/funcs/projectsGetProjectDomains.ts +150 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/authuser.ts +2 -1
- package/src/models/components/security.ts +4 -4
- package/src/models/operations/createevent.ts +373 -0
- package/src/models/operations/createproject.ts +8 -0
- package/src/models/operations/createteam.ts +31 -24
- package/src/models/operations/deletedeployment.ts +16 -15
- package/src/models/operations/exchangessotoken.ts +192 -0
- package/src/models/operations/getaccountinfo.ts +187 -0
- package/src/models/operations/getinvoice.ts +454 -0
- package/src/models/operations/getmember.ts +160 -0
- package/src/models/operations/getprojectdomains.ts +571 -0
- package/src/models/operations/getprojects.ts +8 -0
- package/src/models/operations/putfirewallconfig.ts +102 -93
- package/src/models/operations/submitbillingdata.ts +813 -0
- package/src/models/operations/submitinvoice.ts +593 -0
- package/src/models/operations/updateinvoice.ts +180 -0
- package/src/models/operations/updateproject.ts +8 -0
- package/src/models/operations/updateprojectdatacache.ts +8 -0
- package/src/models/operations/updateresourcesecrets.ts +206 -0
- package/src/sdk/authentication.ts +22 -0
- package/src/sdk/marketplace.ts +194 -0
- package/src/sdk/projects.ts +22 -0
- package/src/sdk/sdk.ts +11 -5
|
@@ -0,0 +1,813 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Period for the billing cycle.
|
|
14
|
+
*/
|
|
15
|
+
export type Period = {
|
|
16
|
+
start: Date;
|
|
17
|
+
end: Date;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type BillingItems = {
|
|
21
|
+
/**
|
|
22
|
+
* Partner's billing plan ID.
|
|
23
|
+
*/
|
|
24
|
+
billingPlanId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Partner's resource ID.
|
|
27
|
+
*/
|
|
28
|
+
resourceId?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Start and end are only needed if different from the period's start/end.
|
|
31
|
+
*/
|
|
32
|
+
start?: Date | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Start and end are only needed if different from the period's start/end.
|
|
35
|
+
*/
|
|
36
|
+
end?: Date | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Line item name.
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
* Line item details.
|
|
43
|
+
*/
|
|
44
|
+
details?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Price per unit.
|
|
47
|
+
*/
|
|
48
|
+
price: string;
|
|
49
|
+
/**
|
|
50
|
+
* Quantity of units.
|
|
51
|
+
*/
|
|
52
|
+
quantity: number;
|
|
53
|
+
/**
|
|
54
|
+
* Units of the quantity.
|
|
55
|
+
*/
|
|
56
|
+
units: string;
|
|
57
|
+
/**
|
|
58
|
+
* Total amount.
|
|
59
|
+
*/
|
|
60
|
+
total: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type Discounts = {
|
|
64
|
+
/**
|
|
65
|
+
* Partner's billing plan ID.
|
|
66
|
+
*/
|
|
67
|
+
billingPlanId: string;
|
|
68
|
+
/**
|
|
69
|
+
* Partner's resource ID.
|
|
70
|
+
*/
|
|
71
|
+
resourceId?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Start and end are only needed if different from the period's start/end.
|
|
74
|
+
*/
|
|
75
|
+
start?: Date | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Start and end are only needed if different from the period's start/end.
|
|
78
|
+
*/
|
|
79
|
+
end?: Date | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Discount name.
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
/**
|
|
85
|
+
* Discount details.
|
|
86
|
+
*/
|
|
87
|
+
details?: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Discount amount.
|
|
90
|
+
*/
|
|
91
|
+
amount: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type Billing2 = {
|
|
95
|
+
items: Array<BillingItems>;
|
|
96
|
+
discounts?: Array<Discounts> | undefined;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type Billing1 = {
|
|
100
|
+
/**
|
|
101
|
+
* Partner's billing plan ID.
|
|
102
|
+
*/
|
|
103
|
+
billingPlanId: string;
|
|
104
|
+
/**
|
|
105
|
+
* Partner's resource ID.
|
|
106
|
+
*/
|
|
107
|
+
resourceId?: string | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Start and end are only needed if different from the period's start/end.
|
|
110
|
+
*/
|
|
111
|
+
start?: Date | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Start and end are only needed if different from the period's start/end.
|
|
114
|
+
*/
|
|
115
|
+
end?: Date | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Line item name.
|
|
118
|
+
*/
|
|
119
|
+
name: string;
|
|
120
|
+
/**
|
|
121
|
+
* Line item details.
|
|
122
|
+
*/
|
|
123
|
+
details?: string | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Price per unit.
|
|
126
|
+
*/
|
|
127
|
+
price: string;
|
|
128
|
+
/**
|
|
129
|
+
* Quantity of units.
|
|
130
|
+
*/
|
|
131
|
+
quantity: number;
|
|
132
|
+
/**
|
|
133
|
+
* Units of the quantity.
|
|
134
|
+
*/
|
|
135
|
+
units: string;
|
|
136
|
+
/**
|
|
137
|
+
* Total amount.
|
|
138
|
+
*/
|
|
139
|
+
total: string;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Billing data (interim invoicing data).
|
|
144
|
+
*/
|
|
145
|
+
export type Billing = Billing2 | Array<Billing1>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* \n Type of the metric.\n - total: measured total value, such as Database size\n - interval: usage during the period, such as i/o or number of queries.\n - rate: rate of usage, such as queries per second.\n
|
|
149
|
+
*/
|
|
150
|
+
export const SubmitBillingDataType = {
|
|
151
|
+
Total: "total",
|
|
152
|
+
Interval: "interval",
|
|
153
|
+
Rate: "rate",
|
|
154
|
+
} as const;
|
|
155
|
+
/**
|
|
156
|
+
* \n Type of the metric.\n - total: measured total value, such as Database size\n - interval: usage during the period, such as i/o or number of queries.\n - rate: rate of usage, such as queries per second.\n
|
|
157
|
+
*/
|
|
158
|
+
export type SubmitBillingDataType = ClosedEnum<typeof SubmitBillingDataType>;
|
|
159
|
+
|
|
160
|
+
export type Usage = {
|
|
161
|
+
/**
|
|
162
|
+
* Partner's resource ID.
|
|
163
|
+
*/
|
|
164
|
+
resourceId: string;
|
|
165
|
+
/**
|
|
166
|
+
* Metric name.
|
|
167
|
+
*/
|
|
168
|
+
name: string;
|
|
169
|
+
/**
|
|
170
|
+
* \n Type of the metric.\n - total: measured total value, such as Database size\n - interval: usage during the period, such as i/o or number of queries.\n - rate: rate of usage, such as queries per second.\n
|
|
171
|
+
*/
|
|
172
|
+
type: SubmitBillingDataType;
|
|
173
|
+
/**
|
|
174
|
+
* Metric units. Example: \"GB\"
|
|
175
|
+
*/
|
|
176
|
+
units: string;
|
|
177
|
+
/**
|
|
178
|
+
* Metric value for the day. Could be a final or an interim value for the day.
|
|
179
|
+
*/
|
|
180
|
+
dayValue: number;
|
|
181
|
+
/**
|
|
182
|
+
* Metric value for the billing period. Could be a final or an interim value for the period.
|
|
183
|
+
*/
|
|
184
|
+
periodValue: number;
|
|
185
|
+
/**
|
|
186
|
+
* The limit value of the metric for a billing period, if a limit is defined by the plan.
|
|
187
|
+
*/
|
|
188
|
+
planValue?: number | undefined;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export type SubmitBillingDataRequestBody = {
|
|
192
|
+
timestamp: Date;
|
|
193
|
+
eod: Date;
|
|
194
|
+
/**
|
|
195
|
+
* Period for the billing cycle.
|
|
196
|
+
*/
|
|
197
|
+
period: Period;
|
|
198
|
+
/**
|
|
199
|
+
* Billing data (interim invoicing data).
|
|
200
|
+
*/
|
|
201
|
+
billing: Billing2 | Array<Billing1>;
|
|
202
|
+
usage: Array<Usage>;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export type SubmitBillingDataRequest = {
|
|
206
|
+
integrationConfigurationId: string;
|
|
207
|
+
requestBody?: SubmitBillingDataRequestBody | undefined;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/** @internal */
|
|
211
|
+
export const Period$inboundSchema: z.ZodType<Period, z.ZodTypeDef, unknown> = z
|
|
212
|
+
.object({
|
|
213
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
214
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
/** @internal */
|
|
218
|
+
export type Period$Outbound = {
|
|
219
|
+
start: string;
|
|
220
|
+
end: string;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/** @internal */
|
|
224
|
+
export const Period$outboundSchema: z.ZodType<
|
|
225
|
+
Period$Outbound,
|
|
226
|
+
z.ZodTypeDef,
|
|
227
|
+
Period
|
|
228
|
+
> = z.object({
|
|
229
|
+
start: z.date().transform(v => v.toISOString()),
|
|
230
|
+
end: z.date().transform(v => v.toISOString()),
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @internal
|
|
235
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
236
|
+
*/
|
|
237
|
+
export namespace Period$ {
|
|
238
|
+
/** @deprecated use `Period$inboundSchema` instead. */
|
|
239
|
+
export const inboundSchema = Period$inboundSchema;
|
|
240
|
+
/** @deprecated use `Period$outboundSchema` instead. */
|
|
241
|
+
export const outboundSchema = Period$outboundSchema;
|
|
242
|
+
/** @deprecated use `Period$Outbound` instead. */
|
|
243
|
+
export type Outbound = Period$Outbound;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export function periodToJSON(period: Period): string {
|
|
247
|
+
return JSON.stringify(Period$outboundSchema.parse(period));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function periodFromJSON(
|
|
251
|
+
jsonString: string,
|
|
252
|
+
): SafeParseResult<Period, SDKValidationError> {
|
|
253
|
+
return safeParse(
|
|
254
|
+
jsonString,
|
|
255
|
+
(x) => Period$inboundSchema.parse(JSON.parse(x)),
|
|
256
|
+
`Failed to parse 'Period' from JSON`,
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const BillingItems$inboundSchema: z.ZodType<
|
|
262
|
+
BillingItems,
|
|
263
|
+
z.ZodTypeDef,
|
|
264
|
+
unknown
|
|
265
|
+
> = z.object({
|
|
266
|
+
billingPlanId: z.string(),
|
|
267
|
+
resourceId: z.string().optional(),
|
|
268
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
269
|
+
.optional(),
|
|
270
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
271
|
+
.optional(),
|
|
272
|
+
name: z.string(),
|
|
273
|
+
details: z.string().optional(),
|
|
274
|
+
price: z.string(),
|
|
275
|
+
quantity: z.number(),
|
|
276
|
+
units: z.string(),
|
|
277
|
+
total: z.string(),
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
/** @internal */
|
|
281
|
+
export type BillingItems$Outbound = {
|
|
282
|
+
billingPlanId: string;
|
|
283
|
+
resourceId?: string | undefined;
|
|
284
|
+
start?: string | undefined;
|
|
285
|
+
end?: string | undefined;
|
|
286
|
+
name: string;
|
|
287
|
+
details?: string | undefined;
|
|
288
|
+
price: string;
|
|
289
|
+
quantity: number;
|
|
290
|
+
units: string;
|
|
291
|
+
total: string;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/** @internal */
|
|
295
|
+
export const BillingItems$outboundSchema: z.ZodType<
|
|
296
|
+
BillingItems$Outbound,
|
|
297
|
+
z.ZodTypeDef,
|
|
298
|
+
BillingItems
|
|
299
|
+
> = z.object({
|
|
300
|
+
billingPlanId: z.string(),
|
|
301
|
+
resourceId: z.string().optional(),
|
|
302
|
+
start: z.date().transform(v => v.toISOString()).optional(),
|
|
303
|
+
end: z.date().transform(v => v.toISOString()).optional(),
|
|
304
|
+
name: z.string(),
|
|
305
|
+
details: z.string().optional(),
|
|
306
|
+
price: z.string(),
|
|
307
|
+
quantity: z.number(),
|
|
308
|
+
units: z.string(),
|
|
309
|
+
total: z.string(),
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @internal
|
|
314
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
315
|
+
*/
|
|
316
|
+
export namespace BillingItems$ {
|
|
317
|
+
/** @deprecated use `BillingItems$inboundSchema` instead. */
|
|
318
|
+
export const inboundSchema = BillingItems$inboundSchema;
|
|
319
|
+
/** @deprecated use `BillingItems$outboundSchema` instead. */
|
|
320
|
+
export const outboundSchema = BillingItems$outboundSchema;
|
|
321
|
+
/** @deprecated use `BillingItems$Outbound` instead. */
|
|
322
|
+
export type Outbound = BillingItems$Outbound;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export function billingItemsToJSON(billingItems: BillingItems): string {
|
|
326
|
+
return JSON.stringify(BillingItems$outboundSchema.parse(billingItems));
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export function billingItemsFromJSON(
|
|
330
|
+
jsonString: string,
|
|
331
|
+
): SafeParseResult<BillingItems, SDKValidationError> {
|
|
332
|
+
return safeParse(
|
|
333
|
+
jsonString,
|
|
334
|
+
(x) => BillingItems$inboundSchema.parse(JSON.parse(x)),
|
|
335
|
+
`Failed to parse 'BillingItems' from JSON`,
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/** @internal */
|
|
340
|
+
export const Discounts$inboundSchema: z.ZodType<
|
|
341
|
+
Discounts,
|
|
342
|
+
z.ZodTypeDef,
|
|
343
|
+
unknown
|
|
344
|
+
> = z.object({
|
|
345
|
+
billingPlanId: z.string(),
|
|
346
|
+
resourceId: z.string().optional(),
|
|
347
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
348
|
+
.optional(),
|
|
349
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
350
|
+
.optional(),
|
|
351
|
+
name: z.string(),
|
|
352
|
+
details: z.string().optional(),
|
|
353
|
+
amount: z.string(),
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
/** @internal */
|
|
357
|
+
export type Discounts$Outbound = {
|
|
358
|
+
billingPlanId: string;
|
|
359
|
+
resourceId?: string | undefined;
|
|
360
|
+
start?: string | undefined;
|
|
361
|
+
end?: string | undefined;
|
|
362
|
+
name: string;
|
|
363
|
+
details?: string | undefined;
|
|
364
|
+
amount: string;
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
/** @internal */
|
|
368
|
+
export const Discounts$outboundSchema: z.ZodType<
|
|
369
|
+
Discounts$Outbound,
|
|
370
|
+
z.ZodTypeDef,
|
|
371
|
+
Discounts
|
|
372
|
+
> = z.object({
|
|
373
|
+
billingPlanId: z.string(),
|
|
374
|
+
resourceId: z.string().optional(),
|
|
375
|
+
start: z.date().transform(v => v.toISOString()).optional(),
|
|
376
|
+
end: z.date().transform(v => v.toISOString()).optional(),
|
|
377
|
+
name: z.string(),
|
|
378
|
+
details: z.string().optional(),
|
|
379
|
+
amount: z.string(),
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* @internal
|
|
384
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
385
|
+
*/
|
|
386
|
+
export namespace Discounts$ {
|
|
387
|
+
/** @deprecated use `Discounts$inboundSchema` instead. */
|
|
388
|
+
export const inboundSchema = Discounts$inboundSchema;
|
|
389
|
+
/** @deprecated use `Discounts$outboundSchema` instead. */
|
|
390
|
+
export const outboundSchema = Discounts$outboundSchema;
|
|
391
|
+
/** @deprecated use `Discounts$Outbound` instead. */
|
|
392
|
+
export type Outbound = Discounts$Outbound;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export function discountsToJSON(discounts: Discounts): string {
|
|
396
|
+
return JSON.stringify(Discounts$outboundSchema.parse(discounts));
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export function discountsFromJSON(
|
|
400
|
+
jsonString: string,
|
|
401
|
+
): SafeParseResult<Discounts, SDKValidationError> {
|
|
402
|
+
return safeParse(
|
|
403
|
+
jsonString,
|
|
404
|
+
(x) => Discounts$inboundSchema.parse(JSON.parse(x)),
|
|
405
|
+
`Failed to parse 'Discounts' from JSON`,
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/** @internal */
|
|
410
|
+
export const Billing2$inboundSchema: z.ZodType<
|
|
411
|
+
Billing2,
|
|
412
|
+
z.ZodTypeDef,
|
|
413
|
+
unknown
|
|
414
|
+
> = z.object({
|
|
415
|
+
items: z.array(z.lazy(() => BillingItems$inboundSchema)),
|
|
416
|
+
discounts: z.array(z.lazy(() => Discounts$inboundSchema)).optional(),
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
/** @internal */
|
|
420
|
+
export type Billing2$Outbound = {
|
|
421
|
+
items: Array<BillingItems$Outbound>;
|
|
422
|
+
discounts?: Array<Discounts$Outbound> | undefined;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
/** @internal */
|
|
426
|
+
export const Billing2$outboundSchema: z.ZodType<
|
|
427
|
+
Billing2$Outbound,
|
|
428
|
+
z.ZodTypeDef,
|
|
429
|
+
Billing2
|
|
430
|
+
> = z.object({
|
|
431
|
+
items: z.array(z.lazy(() => BillingItems$outboundSchema)),
|
|
432
|
+
discounts: z.array(z.lazy(() => Discounts$outboundSchema)).optional(),
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* @internal
|
|
437
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
438
|
+
*/
|
|
439
|
+
export namespace Billing2$ {
|
|
440
|
+
/** @deprecated use `Billing2$inboundSchema` instead. */
|
|
441
|
+
export const inboundSchema = Billing2$inboundSchema;
|
|
442
|
+
/** @deprecated use `Billing2$outboundSchema` instead. */
|
|
443
|
+
export const outboundSchema = Billing2$outboundSchema;
|
|
444
|
+
/** @deprecated use `Billing2$Outbound` instead. */
|
|
445
|
+
export type Outbound = Billing2$Outbound;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export function billing2ToJSON(billing2: Billing2): string {
|
|
449
|
+
return JSON.stringify(Billing2$outboundSchema.parse(billing2));
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export function billing2FromJSON(
|
|
453
|
+
jsonString: string,
|
|
454
|
+
): SafeParseResult<Billing2, SDKValidationError> {
|
|
455
|
+
return safeParse(
|
|
456
|
+
jsonString,
|
|
457
|
+
(x) => Billing2$inboundSchema.parse(JSON.parse(x)),
|
|
458
|
+
`Failed to parse 'Billing2' from JSON`,
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/** @internal */
|
|
463
|
+
export const Billing1$inboundSchema: z.ZodType<
|
|
464
|
+
Billing1,
|
|
465
|
+
z.ZodTypeDef,
|
|
466
|
+
unknown
|
|
467
|
+
> = z.object({
|
|
468
|
+
billingPlanId: z.string(),
|
|
469
|
+
resourceId: z.string().optional(),
|
|
470
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
471
|
+
.optional(),
|
|
472
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
473
|
+
.optional(),
|
|
474
|
+
name: z.string(),
|
|
475
|
+
details: z.string().optional(),
|
|
476
|
+
price: z.string(),
|
|
477
|
+
quantity: z.number(),
|
|
478
|
+
units: z.string(),
|
|
479
|
+
total: z.string(),
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
/** @internal */
|
|
483
|
+
export type Billing1$Outbound = {
|
|
484
|
+
billingPlanId: string;
|
|
485
|
+
resourceId?: string | undefined;
|
|
486
|
+
start?: string | undefined;
|
|
487
|
+
end?: string | undefined;
|
|
488
|
+
name: string;
|
|
489
|
+
details?: string | undefined;
|
|
490
|
+
price: string;
|
|
491
|
+
quantity: number;
|
|
492
|
+
units: string;
|
|
493
|
+
total: string;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
/** @internal */
|
|
497
|
+
export const Billing1$outboundSchema: z.ZodType<
|
|
498
|
+
Billing1$Outbound,
|
|
499
|
+
z.ZodTypeDef,
|
|
500
|
+
Billing1
|
|
501
|
+
> = z.object({
|
|
502
|
+
billingPlanId: z.string(),
|
|
503
|
+
resourceId: z.string().optional(),
|
|
504
|
+
start: z.date().transform(v => v.toISOString()).optional(),
|
|
505
|
+
end: z.date().transform(v => v.toISOString()).optional(),
|
|
506
|
+
name: z.string(),
|
|
507
|
+
details: z.string().optional(),
|
|
508
|
+
price: z.string(),
|
|
509
|
+
quantity: z.number(),
|
|
510
|
+
units: z.string(),
|
|
511
|
+
total: z.string(),
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* @internal
|
|
516
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
517
|
+
*/
|
|
518
|
+
export namespace Billing1$ {
|
|
519
|
+
/** @deprecated use `Billing1$inboundSchema` instead. */
|
|
520
|
+
export const inboundSchema = Billing1$inboundSchema;
|
|
521
|
+
/** @deprecated use `Billing1$outboundSchema` instead. */
|
|
522
|
+
export const outboundSchema = Billing1$outboundSchema;
|
|
523
|
+
/** @deprecated use `Billing1$Outbound` instead. */
|
|
524
|
+
export type Outbound = Billing1$Outbound;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export function billing1ToJSON(billing1: Billing1): string {
|
|
528
|
+
return JSON.stringify(Billing1$outboundSchema.parse(billing1));
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export function billing1FromJSON(
|
|
532
|
+
jsonString: string,
|
|
533
|
+
): SafeParseResult<Billing1, SDKValidationError> {
|
|
534
|
+
return safeParse(
|
|
535
|
+
jsonString,
|
|
536
|
+
(x) => Billing1$inboundSchema.parse(JSON.parse(x)),
|
|
537
|
+
`Failed to parse 'Billing1' from JSON`,
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/** @internal */
|
|
542
|
+
export const Billing$inboundSchema: z.ZodType<Billing, z.ZodTypeDef, unknown> =
|
|
543
|
+
z.union([
|
|
544
|
+
z.lazy(() => Billing2$inboundSchema),
|
|
545
|
+
z.array(z.lazy(() => Billing1$inboundSchema)),
|
|
546
|
+
]);
|
|
547
|
+
|
|
548
|
+
/** @internal */
|
|
549
|
+
export type Billing$Outbound = Billing2$Outbound | Array<Billing1$Outbound>;
|
|
550
|
+
|
|
551
|
+
/** @internal */
|
|
552
|
+
export const Billing$outboundSchema: z.ZodType<
|
|
553
|
+
Billing$Outbound,
|
|
554
|
+
z.ZodTypeDef,
|
|
555
|
+
Billing
|
|
556
|
+
> = z.union([
|
|
557
|
+
z.lazy(() => Billing2$outboundSchema),
|
|
558
|
+
z.array(z.lazy(() => Billing1$outboundSchema)),
|
|
559
|
+
]);
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* @internal
|
|
563
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
564
|
+
*/
|
|
565
|
+
export namespace Billing$ {
|
|
566
|
+
/** @deprecated use `Billing$inboundSchema` instead. */
|
|
567
|
+
export const inboundSchema = Billing$inboundSchema;
|
|
568
|
+
/** @deprecated use `Billing$outboundSchema` instead. */
|
|
569
|
+
export const outboundSchema = Billing$outboundSchema;
|
|
570
|
+
/** @deprecated use `Billing$Outbound` instead. */
|
|
571
|
+
export type Outbound = Billing$Outbound;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export function billingToJSON(billing: Billing): string {
|
|
575
|
+
return JSON.stringify(Billing$outboundSchema.parse(billing));
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export function billingFromJSON(
|
|
579
|
+
jsonString: string,
|
|
580
|
+
): SafeParseResult<Billing, SDKValidationError> {
|
|
581
|
+
return safeParse(
|
|
582
|
+
jsonString,
|
|
583
|
+
(x) => Billing$inboundSchema.parse(JSON.parse(x)),
|
|
584
|
+
`Failed to parse 'Billing' from JSON`,
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/** @internal */
|
|
589
|
+
export const SubmitBillingDataType$inboundSchema: z.ZodNativeEnum<
|
|
590
|
+
typeof SubmitBillingDataType
|
|
591
|
+
> = z.nativeEnum(SubmitBillingDataType);
|
|
592
|
+
|
|
593
|
+
/** @internal */
|
|
594
|
+
export const SubmitBillingDataType$outboundSchema: z.ZodNativeEnum<
|
|
595
|
+
typeof SubmitBillingDataType
|
|
596
|
+
> = SubmitBillingDataType$inboundSchema;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* @internal
|
|
600
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
601
|
+
*/
|
|
602
|
+
export namespace SubmitBillingDataType$ {
|
|
603
|
+
/** @deprecated use `SubmitBillingDataType$inboundSchema` instead. */
|
|
604
|
+
export const inboundSchema = SubmitBillingDataType$inboundSchema;
|
|
605
|
+
/** @deprecated use `SubmitBillingDataType$outboundSchema` instead. */
|
|
606
|
+
export const outboundSchema = SubmitBillingDataType$outboundSchema;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/** @internal */
|
|
610
|
+
export const Usage$inboundSchema: z.ZodType<Usage, z.ZodTypeDef, unknown> = z
|
|
611
|
+
.object({
|
|
612
|
+
resourceId: z.string(),
|
|
613
|
+
name: z.string(),
|
|
614
|
+
type: SubmitBillingDataType$inboundSchema,
|
|
615
|
+
units: z.string(),
|
|
616
|
+
dayValue: z.number(),
|
|
617
|
+
periodValue: z.number(),
|
|
618
|
+
planValue: z.number().optional(),
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
/** @internal */
|
|
622
|
+
export type Usage$Outbound = {
|
|
623
|
+
resourceId: string;
|
|
624
|
+
name: string;
|
|
625
|
+
type: string;
|
|
626
|
+
units: string;
|
|
627
|
+
dayValue: number;
|
|
628
|
+
periodValue: number;
|
|
629
|
+
planValue?: number | undefined;
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
/** @internal */
|
|
633
|
+
export const Usage$outboundSchema: z.ZodType<
|
|
634
|
+
Usage$Outbound,
|
|
635
|
+
z.ZodTypeDef,
|
|
636
|
+
Usage
|
|
637
|
+
> = z.object({
|
|
638
|
+
resourceId: z.string(),
|
|
639
|
+
name: z.string(),
|
|
640
|
+
type: SubmitBillingDataType$outboundSchema,
|
|
641
|
+
units: z.string(),
|
|
642
|
+
dayValue: z.number(),
|
|
643
|
+
periodValue: z.number(),
|
|
644
|
+
planValue: z.number().optional(),
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* @internal
|
|
649
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
650
|
+
*/
|
|
651
|
+
export namespace Usage$ {
|
|
652
|
+
/** @deprecated use `Usage$inboundSchema` instead. */
|
|
653
|
+
export const inboundSchema = Usage$inboundSchema;
|
|
654
|
+
/** @deprecated use `Usage$outboundSchema` instead. */
|
|
655
|
+
export const outboundSchema = Usage$outboundSchema;
|
|
656
|
+
/** @deprecated use `Usage$Outbound` instead. */
|
|
657
|
+
export type Outbound = Usage$Outbound;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export function usageToJSON(usage: Usage): string {
|
|
661
|
+
return JSON.stringify(Usage$outboundSchema.parse(usage));
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
export function usageFromJSON(
|
|
665
|
+
jsonString: string,
|
|
666
|
+
): SafeParseResult<Usage, SDKValidationError> {
|
|
667
|
+
return safeParse(
|
|
668
|
+
jsonString,
|
|
669
|
+
(x) => Usage$inboundSchema.parse(JSON.parse(x)),
|
|
670
|
+
`Failed to parse 'Usage' from JSON`,
|
|
671
|
+
);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/** @internal */
|
|
675
|
+
export const SubmitBillingDataRequestBody$inboundSchema: z.ZodType<
|
|
676
|
+
SubmitBillingDataRequestBody,
|
|
677
|
+
z.ZodTypeDef,
|
|
678
|
+
unknown
|
|
679
|
+
> = z.object({
|
|
680
|
+
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
681
|
+
eod: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
682
|
+
period: z.lazy(() => Period$inboundSchema),
|
|
683
|
+
billing: z.union([
|
|
684
|
+
z.lazy(() => Billing2$inboundSchema),
|
|
685
|
+
z.array(z.lazy(() => Billing1$inboundSchema)),
|
|
686
|
+
]),
|
|
687
|
+
usage: z.array(z.lazy(() => Usage$inboundSchema)),
|
|
688
|
+
});
|
|
689
|
+
|
|
690
|
+
/** @internal */
|
|
691
|
+
export type SubmitBillingDataRequestBody$Outbound = {
|
|
692
|
+
timestamp: string;
|
|
693
|
+
eod: string;
|
|
694
|
+
period: Period$Outbound;
|
|
695
|
+
billing: Billing2$Outbound | Array<Billing1$Outbound>;
|
|
696
|
+
usage: Array<Usage$Outbound>;
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
/** @internal */
|
|
700
|
+
export const SubmitBillingDataRequestBody$outboundSchema: z.ZodType<
|
|
701
|
+
SubmitBillingDataRequestBody$Outbound,
|
|
702
|
+
z.ZodTypeDef,
|
|
703
|
+
SubmitBillingDataRequestBody
|
|
704
|
+
> = z.object({
|
|
705
|
+
timestamp: z.date().transform(v => v.toISOString()),
|
|
706
|
+
eod: z.date().transform(v => v.toISOString()),
|
|
707
|
+
period: z.lazy(() => Period$outboundSchema),
|
|
708
|
+
billing: z.union([
|
|
709
|
+
z.lazy(() => Billing2$outboundSchema),
|
|
710
|
+
z.array(z.lazy(() => Billing1$outboundSchema)),
|
|
711
|
+
]),
|
|
712
|
+
usage: z.array(z.lazy(() => Usage$outboundSchema)),
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* @internal
|
|
717
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
718
|
+
*/
|
|
719
|
+
export namespace SubmitBillingDataRequestBody$ {
|
|
720
|
+
/** @deprecated use `SubmitBillingDataRequestBody$inboundSchema` instead. */
|
|
721
|
+
export const inboundSchema = SubmitBillingDataRequestBody$inboundSchema;
|
|
722
|
+
/** @deprecated use `SubmitBillingDataRequestBody$outboundSchema` instead. */
|
|
723
|
+
export const outboundSchema = SubmitBillingDataRequestBody$outboundSchema;
|
|
724
|
+
/** @deprecated use `SubmitBillingDataRequestBody$Outbound` instead. */
|
|
725
|
+
export type Outbound = SubmitBillingDataRequestBody$Outbound;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export function submitBillingDataRequestBodyToJSON(
|
|
729
|
+
submitBillingDataRequestBody: SubmitBillingDataRequestBody,
|
|
730
|
+
): string {
|
|
731
|
+
return JSON.stringify(
|
|
732
|
+
SubmitBillingDataRequestBody$outboundSchema.parse(
|
|
733
|
+
submitBillingDataRequestBody,
|
|
734
|
+
),
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
export function submitBillingDataRequestBodyFromJSON(
|
|
739
|
+
jsonString: string,
|
|
740
|
+
): SafeParseResult<SubmitBillingDataRequestBody, SDKValidationError> {
|
|
741
|
+
return safeParse(
|
|
742
|
+
jsonString,
|
|
743
|
+
(x) => SubmitBillingDataRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
744
|
+
`Failed to parse 'SubmitBillingDataRequestBody' from JSON`,
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/** @internal */
|
|
749
|
+
export const SubmitBillingDataRequest$inboundSchema: z.ZodType<
|
|
750
|
+
SubmitBillingDataRequest,
|
|
751
|
+
z.ZodTypeDef,
|
|
752
|
+
unknown
|
|
753
|
+
> = z.object({
|
|
754
|
+
integrationConfigurationId: z.string(),
|
|
755
|
+
RequestBody: z.lazy(() => SubmitBillingDataRequestBody$inboundSchema)
|
|
756
|
+
.optional(),
|
|
757
|
+
}).transform((v) => {
|
|
758
|
+
return remap$(v, {
|
|
759
|
+
"RequestBody": "requestBody",
|
|
760
|
+
});
|
|
761
|
+
});
|
|
762
|
+
|
|
763
|
+
/** @internal */
|
|
764
|
+
export type SubmitBillingDataRequest$Outbound = {
|
|
765
|
+
integrationConfigurationId: string;
|
|
766
|
+
RequestBody?: SubmitBillingDataRequestBody$Outbound | undefined;
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
/** @internal */
|
|
770
|
+
export const SubmitBillingDataRequest$outboundSchema: z.ZodType<
|
|
771
|
+
SubmitBillingDataRequest$Outbound,
|
|
772
|
+
z.ZodTypeDef,
|
|
773
|
+
SubmitBillingDataRequest
|
|
774
|
+
> = z.object({
|
|
775
|
+
integrationConfigurationId: z.string(),
|
|
776
|
+
requestBody: z.lazy(() => SubmitBillingDataRequestBody$outboundSchema)
|
|
777
|
+
.optional(),
|
|
778
|
+
}).transform((v) => {
|
|
779
|
+
return remap$(v, {
|
|
780
|
+
requestBody: "RequestBody",
|
|
781
|
+
});
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* @internal
|
|
786
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
787
|
+
*/
|
|
788
|
+
export namespace SubmitBillingDataRequest$ {
|
|
789
|
+
/** @deprecated use `SubmitBillingDataRequest$inboundSchema` instead. */
|
|
790
|
+
export const inboundSchema = SubmitBillingDataRequest$inboundSchema;
|
|
791
|
+
/** @deprecated use `SubmitBillingDataRequest$outboundSchema` instead. */
|
|
792
|
+
export const outboundSchema = SubmitBillingDataRequest$outboundSchema;
|
|
793
|
+
/** @deprecated use `SubmitBillingDataRequest$Outbound` instead. */
|
|
794
|
+
export type Outbound = SubmitBillingDataRequest$Outbound;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export function submitBillingDataRequestToJSON(
|
|
798
|
+
submitBillingDataRequest: SubmitBillingDataRequest,
|
|
799
|
+
): string {
|
|
800
|
+
return JSON.stringify(
|
|
801
|
+
SubmitBillingDataRequest$outboundSchema.parse(submitBillingDataRequest),
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export function submitBillingDataRequestFromJSON(
|
|
806
|
+
jsonString: string,
|
|
807
|
+
): SafeParseResult<SubmitBillingDataRequest, SDKValidationError> {
|
|
808
|
+
return safeParse(
|
|
809
|
+
jsonString,
|
|
810
|
+
(x) => SubmitBillingDataRequest$inboundSchema.parse(JSON.parse(x)),
|
|
811
|
+
`Failed to parse 'SubmitBillingDataRequest' from JSON`,
|
|
812
|
+
);
|
|
813
|
+
}
|