@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,593 @@
|
|
|
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
|
+
* Subscription period for this billing cycle.
|
|
14
|
+
*/
|
|
15
|
+
export type SubmitInvoicePeriod = {
|
|
16
|
+
start: Date;
|
|
17
|
+
end: Date;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type SubmitInvoiceItems = {
|
|
21
|
+
/**
|
|
22
|
+
* Partner's resource ID.
|
|
23
|
+
*/
|
|
24
|
+
resourceId?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Partner's billing plan ID.
|
|
27
|
+
*/
|
|
28
|
+
billingPlanId: string;
|
|
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
|
+
name: string;
|
|
38
|
+
details?: string | undefined;
|
|
39
|
+
price: string;
|
|
40
|
+
quantity: number;
|
|
41
|
+
units: string;
|
|
42
|
+
total: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type SubmitInvoiceDiscounts = {
|
|
46
|
+
/**
|
|
47
|
+
* Partner's resource ID.
|
|
48
|
+
*/
|
|
49
|
+
resourceId?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Partner's billing plan ID.
|
|
52
|
+
*/
|
|
53
|
+
billingPlanId: string;
|
|
54
|
+
/**
|
|
55
|
+
* Start and end are only needed if different from the period's start/end.
|
|
56
|
+
*/
|
|
57
|
+
start?: Date | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Start and end are only needed if different from the period's start/end.
|
|
60
|
+
*/
|
|
61
|
+
end?: Date | undefined;
|
|
62
|
+
name: string;
|
|
63
|
+
details?: string | undefined;
|
|
64
|
+
amount: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const Result = {
|
|
68
|
+
Paid: "paid",
|
|
69
|
+
Notpaid: "notpaid",
|
|
70
|
+
} as const;
|
|
71
|
+
export type Result = ClosedEnum<typeof Result>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Test mode
|
|
75
|
+
*/
|
|
76
|
+
export type Test = {
|
|
77
|
+
validate?: boolean | undefined;
|
|
78
|
+
result?: Result | undefined;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type SubmitInvoiceRequestBody = {
|
|
82
|
+
externalId?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Invoice date. Must be within the period's start and end.
|
|
85
|
+
*/
|
|
86
|
+
invoiceDate: Date;
|
|
87
|
+
/**
|
|
88
|
+
* Additional memo for the invoice.
|
|
89
|
+
*/
|
|
90
|
+
memo?: string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Subscription period for this billing cycle.
|
|
93
|
+
*/
|
|
94
|
+
period: SubmitInvoicePeriod;
|
|
95
|
+
items: Array<SubmitInvoiceItems>;
|
|
96
|
+
discounts?: Array<SubmitInvoiceDiscounts> | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Test mode
|
|
99
|
+
*/
|
|
100
|
+
test?: Test | undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export type SubmitInvoiceRequest = {
|
|
104
|
+
integrationConfigurationId: string;
|
|
105
|
+
requestBody?: SubmitInvoiceRequestBody | undefined;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type SubmitInvoiceResponseBody = {
|
|
109
|
+
invoiceId?: string | undefined;
|
|
110
|
+
test?: boolean | undefined;
|
|
111
|
+
validationErrors?: Array<string> | undefined;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const SubmitInvoicePeriod$inboundSchema: z.ZodType<
|
|
116
|
+
SubmitInvoicePeriod,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
unknown
|
|
119
|
+
> = z.object({
|
|
120
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
121
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export type SubmitInvoicePeriod$Outbound = {
|
|
126
|
+
start: string;
|
|
127
|
+
end: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const SubmitInvoicePeriod$outboundSchema: z.ZodType<
|
|
132
|
+
SubmitInvoicePeriod$Outbound,
|
|
133
|
+
z.ZodTypeDef,
|
|
134
|
+
SubmitInvoicePeriod
|
|
135
|
+
> = z.object({
|
|
136
|
+
start: z.date().transform(v => v.toISOString()),
|
|
137
|
+
end: z.date().transform(v => v.toISOString()),
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
143
|
+
*/
|
|
144
|
+
export namespace SubmitInvoicePeriod$ {
|
|
145
|
+
/** @deprecated use `SubmitInvoicePeriod$inboundSchema` instead. */
|
|
146
|
+
export const inboundSchema = SubmitInvoicePeriod$inboundSchema;
|
|
147
|
+
/** @deprecated use `SubmitInvoicePeriod$outboundSchema` instead. */
|
|
148
|
+
export const outboundSchema = SubmitInvoicePeriod$outboundSchema;
|
|
149
|
+
/** @deprecated use `SubmitInvoicePeriod$Outbound` instead. */
|
|
150
|
+
export type Outbound = SubmitInvoicePeriod$Outbound;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function submitInvoicePeriodToJSON(
|
|
154
|
+
submitInvoicePeriod: SubmitInvoicePeriod,
|
|
155
|
+
): string {
|
|
156
|
+
return JSON.stringify(
|
|
157
|
+
SubmitInvoicePeriod$outboundSchema.parse(submitInvoicePeriod),
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function submitInvoicePeriodFromJSON(
|
|
162
|
+
jsonString: string,
|
|
163
|
+
): SafeParseResult<SubmitInvoicePeriod, SDKValidationError> {
|
|
164
|
+
return safeParse(
|
|
165
|
+
jsonString,
|
|
166
|
+
(x) => SubmitInvoicePeriod$inboundSchema.parse(JSON.parse(x)),
|
|
167
|
+
`Failed to parse 'SubmitInvoicePeriod' from JSON`,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export const SubmitInvoiceItems$inboundSchema: z.ZodType<
|
|
173
|
+
SubmitInvoiceItems,
|
|
174
|
+
z.ZodTypeDef,
|
|
175
|
+
unknown
|
|
176
|
+
> = z.object({
|
|
177
|
+
resourceId: z.string().optional(),
|
|
178
|
+
billingPlanId: z.string(),
|
|
179
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
180
|
+
.optional(),
|
|
181
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
182
|
+
.optional(),
|
|
183
|
+
name: z.string(),
|
|
184
|
+
details: z.string().optional(),
|
|
185
|
+
price: z.string(),
|
|
186
|
+
quantity: z.number(),
|
|
187
|
+
units: z.string(),
|
|
188
|
+
total: z.string(),
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export type SubmitInvoiceItems$Outbound = {
|
|
193
|
+
resourceId?: string | undefined;
|
|
194
|
+
billingPlanId: string;
|
|
195
|
+
start?: string | undefined;
|
|
196
|
+
end?: string | undefined;
|
|
197
|
+
name: string;
|
|
198
|
+
details?: string | undefined;
|
|
199
|
+
price: string;
|
|
200
|
+
quantity: number;
|
|
201
|
+
units: string;
|
|
202
|
+
total: string;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export const SubmitInvoiceItems$outboundSchema: z.ZodType<
|
|
207
|
+
SubmitInvoiceItems$Outbound,
|
|
208
|
+
z.ZodTypeDef,
|
|
209
|
+
SubmitInvoiceItems
|
|
210
|
+
> = z.object({
|
|
211
|
+
resourceId: z.string().optional(),
|
|
212
|
+
billingPlanId: z.string(),
|
|
213
|
+
start: z.date().transform(v => v.toISOString()).optional(),
|
|
214
|
+
end: z.date().transform(v => v.toISOString()).optional(),
|
|
215
|
+
name: z.string(),
|
|
216
|
+
details: z.string().optional(),
|
|
217
|
+
price: z.string(),
|
|
218
|
+
quantity: z.number(),
|
|
219
|
+
units: z.string(),
|
|
220
|
+
total: z.string(),
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @internal
|
|
225
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
226
|
+
*/
|
|
227
|
+
export namespace SubmitInvoiceItems$ {
|
|
228
|
+
/** @deprecated use `SubmitInvoiceItems$inboundSchema` instead. */
|
|
229
|
+
export const inboundSchema = SubmitInvoiceItems$inboundSchema;
|
|
230
|
+
/** @deprecated use `SubmitInvoiceItems$outboundSchema` instead. */
|
|
231
|
+
export const outboundSchema = SubmitInvoiceItems$outboundSchema;
|
|
232
|
+
/** @deprecated use `SubmitInvoiceItems$Outbound` instead. */
|
|
233
|
+
export type Outbound = SubmitInvoiceItems$Outbound;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function submitInvoiceItemsToJSON(
|
|
237
|
+
submitInvoiceItems: SubmitInvoiceItems,
|
|
238
|
+
): string {
|
|
239
|
+
return JSON.stringify(
|
|
240
|
+
SubmitInvoiceItems$outboundSchema.parse(submitInvoiceItems),
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export function submitInvoiceItemsFromJSON(
|
|
245
|
+
jsonString: string,
|
|
246
|
+
): SafeParseResult<SubmitInvoiceItems, SDKValidationError> {
|
|
247
|
+
return safeParse(
|
|
248
|
+
jsonString,
|
|
249
|
+
(x) => SubmitInvoiceItems$inboundSchema.parse(JSON.parse(x)),
|
|
250
|
+
`Failed to parse 'SubmitInvoiceItems' from JSON`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** @internal */
|
|
255
|
+
export const SubmitInvoiceDiscounts$inboundSchema: z.ZodType<
|
|
256
|
+
SubmitInvoiceDiscounts,
|
|
257
|
+
z.ZodTypeDef,
|
|
258
|
+
unknown
|
|
259
|
+
> = z.object({
|
|
260
|
+
resourceId: z.string().optional(),
|
|
261
|
+
billingPlanId: z.string(),
|
|
262
|
+
start: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
263
|
+
.optional(),
|
|
264
|
+
end: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
265
|
+
.optional(),
|
|
266
|
+
name: z.string(),
|
|
267
|
+
details: z.string().optional(),
|
|
268
|
+
amount: z.string(),
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
/** @internal */
|
|
272
|
+
export type SubmitInvoiceDiscounts$Outbound = {
|
|
273
|
+
resourceId?: string | undefined;
|
|
274
|
+
billingPlanId: string;
|
|
275
|
+
start?: string | undefined;
|
|
276
|
+
end?: string | undefined;
|
|
277
|
+
name: string;
|
|
278
|
+
details?: string | undefined;
|
|
279
|
+
amount: string;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/** @internal */
|
|
283
|
+
export const SubmitInvoiceDiscounts$outboundSchema: z.ZodType<
|
|
284
|
+
SubmitInvoiceDiscounts$Outbound,
|
|
285
|
+
z.ZodTypeDef,
|
|
286
|
+
SubmitInvoiceDiscounts
|
|
287
|
+
> = z.object({
|
|
288
|
+
resourceId: z.string().optional(),
|
|
289
|
+
billingPlanId: z.string(),
|
|
290
|
+
start: z.date().transform(v => v.toISOString()).optional(),
|
|
291
|
+
end: z.date().transform(v => v.toISOString()).optional(),
|
|
292
|
+
name: z.string(),
|
|
293
|
+
details: z.string().optional(),
|
|
294
|
+
amount: z.string(),
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @internal
|
|
299
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
300
|
+
*/
|
|
301
|
+
export namespace SubmitInvoiceDiscounts$ {
|
|
302
|
+
/** @deprecated use `SubmitInvoiceDiscounts$inboundSchema` instead. */
|
|
303
|
+
export const inboundSchema = SubmitInvoiceDiscounts$inboundSchema;
|
|
304
|
+
/** @deprecated use `SubmitInvoiceDiscounts$outboundSchema` instead. */
|
|
305
|
+
export const outboundSchema = SubmitInvoiceDiscounts$outboundSchema;
|
|
306
|
+
/** @deprecated use `SubmitInvoiceDiscounts$Outbound` instead. */
|
|
307
|
+
export type Outbound = SubmitInvoiceDiscounts$Outbound;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export function submitInvoiceDiscountsToJSON(
|
|
311
|
+
submitInvoiceDiscounts: SubmitInvoiceDiscounts,
|
|
312
|
+
): string {
|
|
313
|
+
return JSON.stringify(
|
|
314
|
+
SubmitInvoiceDiscounts$outboundSchema.parse(submitInvoiceDiscounts),
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export function submitInvoiceDiscountsFromJSON(
|
|
319
|
+
jsonString: string,
|
|
320
|
+
): SafeParseResult<SubmitInvoiceDiscounts, SDKValidationError> {
|
|
321
|
+
return safeParse(
|
|
322
|
+
jsonString,
|
|
323
|
+
(x) => SubmitInvoiceDiscounts$inboundSchema.parse(JSON.parse(x)),
|
|
324
|
+
`Failed to parse 'SubmitInvoiceDiscounts' from JSON`,
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/** @internal */
|
|
329
|
+
export const Result$inboundSchema: z.ZodNativeEnum<typeof Result> = z
|
|
330
|
+
.nativeEnum(Result);
|
|
331
|
+
|
|
332
|
+
/** @internal */
|
|
333
|
+
export const Result$outboundSchema: z.ZodNativeEnum<typeof Result> =
|
|
334
|
+
Result$inboundSchema;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @internal
|
|
338
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
339
|
+
*/
|
|
340
|
+
export namespace Result$ {
|
|
341
|
+
/** @deprecated use `Result$inboundSchema` instead. */
|
|
342
|
+
export const inboundSchema = Result$inboundSchema;
|
|
343
|
+
/** @deprecated use `Result$outboundSchema` instead. */
|
|
344
|
+
export const outboundSchema = Result$outboundSchema;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** @internal */
|
|
348
|
+
export const Test$inboundSchema: z.ZodType<Test, z.ZodTypeDef, unknown> = z
|
|
349
|
+
.object({
|
|
350
|
+
validate: z.boolean().optional(),
|
|
351
|
+
result: Result$inboundSchema.optional(),
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
/** @internal */
|
|
355
|
+
export type Test$Outbound = {
|
|
356
|
+
validate?: boolean | undefined;
|
|
357
|
+
result?: string | undefined;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
/** @internal */
|
|
361
|
+
export const Test$outboundSchema: z.ZodType<Test$Outbound, z.ZodTypeDef, Test> =
|
|
362
|
+
z.object({
|
|
363
|
+
validate: z.boolean().optional(),
|
|
364
|
+
result: Result$outboundSchema.optional(),
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* @internal
|
|
369
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
370
|
+
*/
|
|
371
|
+
export namespace Test$ {
|
|
372
|
+
/** @deprecated use `Test$inboundSchema` instead. */
|
|
373
|
+
export const inboundSchema = Test$inboundSchema;
|
|
374
|
+
/** @deprecated use `Test$outboundSchema` instead. */
|
|
375
|
+
export const outboundSchema = Test$outboundSchema;
|
|
376
|
+
/** @deprecated use `Test$Outbound` instead. */
|
|
377
|
+
export type Outbound = Test$Outbound;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export function testToJSON(test: Test): string {
|
|
381
|
+
return JSON.stringify(Test$outboundSchema.parse(test));
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export function testFromJSON(
|
|
385
|
+
jsonString: string,
|
|
386
|
+
): SafeParseResult<Test, SDKValidationError> {
|
|
387
|
+
return safeParse(
|
|
388
|
+
jsonString,
|
|
389
|
+
(x) => Test$inboundSchema.parse(JSON.parse(x)),
|
|
390
|
+
`Failed to parse 'Test' from JSON`,
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/** @internal */
|
|
395
|
+
export const SubmitInvoiceRequestBody$inboundSchema: z.ZodType<
|
|
396
|
+
SubmitInvoiceRequestBody,
|
|
397
|
+
z.ZodTypeDef,
|
|
398
|
+
unknown
|
|
399
|
+
> = z.object({
|
|
400
|
+
externalId: z.string().optional(),
|
|
401
|
+
invoiceDate: z.string().datetime({ offset: true }).transform(v =>
|
|
402
|
+
new Date(v)
|
|
403
|
+
),
|
|
404
|
+
memo: z.string().optional(),
|
|
405
|
+
period: z.lazy(() => SubmitInvoicePeriod$inboundSchema),
|
|
406
|
+
items: z.array(z.lazy(() => SubmitInvoiceItems$inboundSchema)),
|
|
407
|
+
discounts: z.array(z.lazy(() => SubmitInvoiceDiscounts$inboundSchema))
|
|
408
|
+
.optional(),
|
|
409
|
+
test: z.lazy(() => Test$inboundSchema).optional(),
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
/** @internal */
|
|
413
|
+
export type SubmitInvoiceRequestBody$Outbound = {
|
|
414
|
+
externalId?: string | undefined;
|
|
415
|
+
invoiceDate: string;
|
|
416
|
+
memo?: string | undefined;
|
|
417
|
+
period: SubmitInvoicePeriod$Outbound;
|
|
418
|
+
items: Array<SubmitInvoiceItems$Outbound>;
|
|
419
|
+
discounts?: Array<SubmitInvoiceDiscounts$Outbound> | undefined;
|
|
420
|
+
test?: Test$Outbound | undefined;
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
/** @internal */
|
|
424
|
+
export const SubmitInvoiceRequestBody$outboundSchema: z.ZodType<
|
|
425
|
+
SubmitInvoiceRequestBody$Outbound,
|
|
426
|
+
z.ZodTypeDef,
|
|
427
|
+
SubmitInvoiceRequestBody
|
|
428
|
+
> = z.object({
|
|
429
|
+
externalId: z.string().optional(),
|
|
430
|
+
invoiceDate: z.date().transform(v => v.toISOString()),
|
|
431
|
+
memo: z.string().optional(),
|
|
432
|
+
period: z.lazy(() => SubmitInvoicePeriod$outboundSchema),
|
|
433
|
+
items: z.array(z.lazy(() => SubmitInvoiceItems$outboundSchema)),
|
|
434
|
+
discounts: z.array(z.lazy(() => SubmitInvoiceDiscounts$outboundSchema))
|
|
435
|
+
.optional(),
|
|
436
|
+
test: z.lazy(() => Test$outboundSchema).optional(),
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @internal
|
|
441
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
442
|
+
*/
|
|
443
|
+
export namespace SubmitInvoiceRequestBody$ {
|
|
444
|
+
/** @deprecated use `SubmitInvoiceRequestBody$inboundSchema` instead. */
|
|
445
|
+
export const inboundSchema = SubmitInvoiceRequestBody$inboundSchema;
|
|
446
|
+
/** @deprecated use `SubmitInvoiceRequestBody$outboundSchema` instead. */
|
|
447
|
+
export const outboundSchema = SubmitInvoiceRequestBody$outboundSchema;
|
|
448
|
+
/** @deprecated use `SubmitInvoiceRequestBody$Outbound` instead. */
|
|
449
|
+
export type Outbound = SubmitInvoiceRequestBody$Outbound;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export function submitInvoiceRequestBodyToJSON(
|
|
453
|
+
submitInvoiceRequestBody: SubmitInvoiceRequestBody,
|
|
454
|
+
): string {
|
|
455
|
+
return JSON.stringify(
|
|
456
|
+
SubmitInvoiceRequestBody$outboundSchema.parse(submitInvoiceRequestBody),
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export function submitInvoiceRequestBodyFromJSON(
|
|
461
|
+
jsonString: string,
|
|
462
|
+
): SafeParseResult<SubmitInvoiceRequestBody, SDKValidationError> {
|
|
463
|
+
return safeParse(
|
|
464
|
+
jsonString,
|
|
465
|
+
(x) => SubmitInvoiceRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
466
|
+
`Failed to parse 'SubmitInvoiceRequestBody' from JSON`,
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/** @internal */
|
|
471
|
+
export const SubmitInvoiceRequest$inboundSchema: z.ZodType<
|
|
472
|
+
SubmitInvoiceRequest,
|
|
473
|
+
z.ZodTypeDef,
|
|
474
|
+
unknown
|
|
475
|
+
> = z.object({
|
|
476
|
+
integrationConfigurationId: z.string(),
|
|
477
|
+
RequestBody: z.lazy(() => SubmitInvoiceRequestBody$inboundSchema).optional(),
|
|
478
|
+
}).transform((v) => {
|
|
479
|
+
return remap$(v, {
|
|
480
|
+
"RequestBody": "requestBody",
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
/** @internal */
|
|
485
|
+
export type SubmitInvoiceRequest$Outbound = {
|
|
486
|
+
integrationConfigurationId: string;
|
|
487
|
+
RequestBody?: SubmitInvoiceRequestBody$Outbound | undefined;
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
/** @internal */
|
|
491
|
+
export const SubmitInvoiceRequest$outboundSchema: z.ZodType<
|
|
492
|
+
SubmitInvoiceRequest$Outbound,
|
|
493
|
+
z.ZodTypeDef,
|
|
494
|
+
SubmitInvoiceRequest
|
|
495
|
+
> = z.object({
|
|
496
|
+
integrationConfigurationId: z.string(),
|
|
497
|
+
requestBody: z.lazy(() => SubmitInvoiceRequestBody$outboundSchema).optional(),
|
|
498
|
+
}).transform((v) => {
|
|
499
|
+
return remap$(v, {
|
|
500
|
+
requestBody: "RequestBody",
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @internal
|
|
506
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
507
|
+
*/
|
|
508
|
+
export namespace SubmitInvoiceRequest$ {
|
|
509
|
+
/** @deprecated use `SubmitInvoiceRequest$inboundSchema` instead. */
|
|
510
|
+
export const inboundSchema = SubmitInvoiceRequest$inboundSchema;
|
|
511
|
+
/** @deprecated use `SubmitInvoiceRequest$outboundSchema` instead. */
|
|
512
|
+
export const outboundSchema = SubmitInvoiceRequest$outboundSchema;
|
|
513
|
+
/** @deprecated use `SubmitInvoiceRequest$Outbound` instead. */
|
|
514
|
+
export type Outbound = SubmitInvoiceRequest$Outbound;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export function submitInvoiceRequestToJSON(
|
|
518
|
+
submitInvoiceRequest: SubmitInvoiceRequest,
|
|
519
|
+
): string {
|
|
520
|
+
return JSON.stringify(
|
|
521
|
+
SubmitInvoiceRequest$outboundSchema.parse(submitInvoiceRequest),
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export function submitInvoiceRequestFromJSON(
|
|
526
|
+
jsonString: string,
|
|
527
|
+
): SafeParseResult<SubmitInvoiceRequest, SDKValidationError> {
|
|
528
|
+
return safeParse(
|
|
529
|
+
jsonString,
|
|
530
|
+
(x) => SubmitInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
531
|
+
`Failed to parse 'SubmitInvoiceRequest' from JSON`,
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/** @internal */
|
|
536
|
+
export const SubmitInvoiceResponseBody$inboundSchema: z.ZodType<
|
|
537
|
+
SubmitInvoiceResponseBody,
|
|
538
|
+
z.ZodTypeDef,
|
|
539
|
+
unknown
|
|
540
|
+
> = z.object({
|
|
541
|
+
invoiceId: z.string().optional(),
|
|
542
|
+
test: z.boolean().optional(),
|
|
543
|
+
validationErrors: z.array(z.string()).optional(),
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
/** @internal */
|
|
547
|
+
export type SubmitInvoiceResponseBody$Outbound = {
|
|
548
|
+
invoiceId?: string | undefined;
|
|
549
|
+
test?: boolean | undefined;
|
|
550
|
+
validationErrors?: Array<string> | undefined;
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
/** @internal */
|
|
554
|
+
export const SubmitInvoiceResponseBody$outboundSchema: z.ZodType<
|
|
555
|
+
SubmitInvoiceResponseBody$Outbound,
|
|
556
|
+
z.ZodTypeDef,
|
|
557
|
+
SubmitInvoiceResponseBody
|
|
558
|
+
> = z.object({
|
|
559
|
+
invoiceId: z.string().optional(),
|
|
560
|
+
test: z.boolean().optional(),
|
|
561
|
+
validationErrors: z.array(z.string()).optional(),
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* @internal
|
|
566
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
567
|
+
*/
|
|
568
|
+
export namespace SubmitInvoiceResponseBody$ {
|
|
569
|
+
/** @deprecated use `SubmitInvoiceResponseBody$inboundSchema` instead. */
|
|
570
|
+
export const inboundSchema = SubmitInvoiceResponseBody$inboundSchema;
|
|
571
|
+
/** @deprecated use `SubmitInvoiceResponseBody$outboundSchema` instead. */
|
|
572
|
+
export const outboundSchema = SubmitInvoiceResponseBody$outboundSchema;
|
|
573
|
+
/** @deprecated use `SubmitInvoiceResponseBody$Outbound` instead. */
|
|
574
|
+
export type Outbound = SubmitInvoiceResponseBody$Outbound;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export function submitInvoiceResponseBodyToJSON(
|
|
578
|
+
submitInvoiceResponseBody: SubmitInvoiceResponseBody,
|
|
579
|
+
): string {
|
|
580
|
+
return JSON.stringify(
|
|
581
|
+
SubmitInvoiceResponseBody$outboundSchema.parse(submitInvoiceResponseBody),
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export function submitInvoiceResponseBodyFromJSON(
|
|
586
|
+
jsonString: string,
|
|
587
|
+
): SafeParseResult<SubmitInvoiceResponseBody, SDKValidationError> {
|
|
588
|
+
return safeParse(
|
|
589
|
+
jsonString,
|
|
590
|
+
(x) => SubmitInvoiceResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
591
|
+
`Failed to parse 'SubmitInvoiceResponseBody' from JSON`,
|
|
592
|
+
);
|
|
593
|
+
}
|