@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,454 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type GetInvoiceRequest = {
|
|
12
|
+
integrationConfigurationId: string;
|
|
13
|
+
invoiceId: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type GetInvoicePeriod = {
|
|
17
|
+
start: string;
|
|
18
|
+
end: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type GetInvoiceItems = {
|
|
22
|
+
billingPlanId: string;
|
|
23
|
+
resourceId?: string | undefined;
|
|
24
|
+
start?: string | undefined;
|
|
25
|
+
end?: string | undefined;
|
|
26
|
+
name: string;
|
|
27
|
+
details?: string | undefined;
|
|
28
|
+
price: string;
|
|
29
|
+
quantity: number;
|
|
30
|
+
units: string;
|
|
31
|
+
total: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type GetInvoiceDiscounts = {
|
|
35
|
+
billingPlanId: string;
|
|
36
|
+
resourceId?: string | undefined;
|
|
37
|
+
start?: string | undefined;
|
|
38
|
+
end?: string | undefined;
|
|
39
|
+
name: string;
|
|
40
|
+
details?: string | undefined;
|
|
41
|
+
amount: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const State = {
|
|
45
|
+
Pending: "pending",
|
|
46
|
+
Scheduled: "scheduled",
|
|
47
|
+
Invoiced: "invoiced",
|
|
48
|
+
Paid: "paid",
|
|
49
|
+
Notpaid: "notpaid",
|
|
50
|
+
RefundRequested: "refund_requested",
|
|
51
|
+
Refunded: "refunded",
|
|
52
|
+
} as const;
|
|
53
|
+
export type State = ClosedEnum<typeof State>;
|
|
54
|
+
|
|
55
|
+
export type GetInvoiceResponseBody = {
|
|
56
|
+
invoiceId: string;
|
|
57
|
+
externalId?: string | undefined;
|
|
58
|
+
invoiceNumber?: string | undefined;
|
|
59
|
+
invoiceDate: string;
|
|
60
|
+
period: GetInvoicePeriod;
|
|
61
|
+
memo?: string | undefined;
|
|
62
|
+
items: Array<GetInvoiceItems>;
|
|
63
|
+
discounts?: Array<GetInvoiceDiscounts> | undefined;
|
|
64
|
+
total: string;
|
|
65
|
+
created: string;
|
|
66
|
+
updated: string;
|
|
67
|
+
state: State;
|
|
68
|
+
refundReason?: string | undefined;
|
|
69
|
+
refundTotal?: string | undefined;
|
|
70
|
+
test: boolean;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const GetInvoiceRequest$inboundSchema: z.ZodType<
|
|
75
|
+
GetInvoiceRequest,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
unknown
|
|
78
|
+
> = z.object({
|
|
79
|
+
integrationConfigurationId: z.string(),
|
|
80
|
+
invoiceId: z.string(),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export type GetInvoiceRequest$Outbound = {
|
|
85
|
+
integrationConfigurationId: string;
|
|
86
|
+
invoiceId: string;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const GetInvoiceRequest$outboundSchema: z.ZodType<
|
|
91
|
+
GetInvoiceRequest$Outbound,
|
|
92
|
+
z.ZodTypeDef,
|
|
93
|
+
GetInvoiceRequest
|
|
94
|
+
> = z.object({
|
|
95
|
+
integrationConfigurationId: z.string(),
|
|
96
|
+
invoiceId: z.string(),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
102
|
+
*/
|
|
103
|
+
export namespace GetInvoiceRequest$ {
|
|
104
|
+
/** @deprecated use `GetInvoiceRequest$inboundSchema` instead. */
|
|
105
|
+
export const inboundSchema = GetInvoiceRequest$inboundSchema;
|
|
106
|
+
/** @deprecated use `GetInvoiceRequest$outboundSchema` instead. */
|
|
107
|
+
export const outboundSchema = GetInvoiceRequest$outboundSchema;
|
|
108
|
+
/** @deprecated use `GetInvoiceRequest$Outbound` instead. */
|
|
109
|
+
export type Outbound = GetInvoiceRequest$Outbound;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function getInvoiceRequestToJSON(
|
|
113
|
+
getInvoiceRequest: GetInvoiceRequest,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
GetInvoiceRequest$outboundSchema.parse(getInvoiceRequest),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function getInvoiceRequestFromJSON(
|
|
121
|
+
jsonString: string,
|
|
122
|
+
): SafeParseResult<GetInvoiceRequest, SDKValidationError> {
|
|
123
|
+
return safeParse(
|
|
124
|
+
jsonString,
|
|
125
|
+
(x) => GetInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
126
|
+
`Failed to parse 'GetInvoiceRequest' from JSON`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const GetInvoicePeriod$inboundSchema: z.ZodType<
|
|
132
|
+
GetInvoicePeriod,
|
|
133
|
+
z.ZodTypeDef,
|
|
134
|
+
unknown
|
|
135
|
+
> = z.object({
|
|
136
|
+
start: z.string(),
|
|
137
|
+
end: z.string(),
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export type GetInvoicePeriod$Outbound = {
|
|
142
|
+
start: string;
|
|
143
|
+
end: string;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/** @internal */
|
|
147
|
+
export const GetInvoicePeriod$outboundSchema: z.ZodType<
|
|
148
|
+
GetInvoicePeriod$Outbound,
|
|
149
|
+
z.ZodTypeDef,
|
|
150
|
+
GetInvoicePeriod
|
|
151
|
+
> = z.object({
|
|
152
|
+
start: z.string(),
|
|
153
|
+
end: z.string(),
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @internal
|
|
158
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
159
|
+
*/
|
|
160
|
+
export namespace GetInvoicePeriod$ {
|
|
161
|
+
/** @deprecated use `GetInvoicePeriod$inboundSchema` instead. */
|
|
162
|
+
export const inboundSchema = GetInvoicePeriod$inboundSchema;
|
|
163
|
+
/** @deprecated use `GetInvoicePeriod$outboundSchema` instead. */
|
|
164
|
+
export const outboundSchema = GetInvoicePeriod$outboundSchema;
|
|
165
|
+
/** @deprecated use `GetInvoicePeriod$Outbound` instead. */
|
|
166
|
+
export type Outbound = GetInvoicePeriod$Outbound;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function getInvoicePeriodToJSON(
|
|
170
|
+
getInvoicePeriod: GetInvoicePeriod,
|
|
171
|
+
): string {
|
|
172
|
+
return JSON.stringify(
|
|
173
|
+
GetInvoicePeriod$outboundSchema.parse(getInvoicePeriod),
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function getInvoicePeriodFromJSON(
|
|
178
|
+
jsonString: string,
|
|
179
|
+
): SafeParseResult<GetInvoicePeriod, SDKValidationError> {
|
|
180
|
+
return safeParse(
|
|
181
|
+
jsonString,
|
|
182
|
+
(x) => GetInvoicePeriod$inboundSchema.parse(JSON.parse(x)),
|
|
183
|
+
`Failed to parse 'GetInvoicePeriod' from JSON`,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** @internal */
|
|
188
|
+
export const GetInvoiceItems$inboundSchema: z.ZodType<
|
|
189
|
+
GetInvoiceItems,
|
|
190
|
+
z.ZodTypeDef,
|
|
191
|
+
unknown
|
|
192
|
+
> = z.object({
|
|
193
|
+
billingPlanId: z.string(),
|
|
194
|
+
resourceId: z.string().optional(),
|
|
195
|
+
start: z.string().optional(),
|
|
196
|
+
end: z.string().optional(),
|
|
197
|
+
name: z.string(),
|
|
198
|
+
details: z.string().optional(),
|
|
199
|
+
price: z.string(),
|
|
200
|
+
quantity: z.number(),
|
|
201
|
+
units: z.string(),
|
|
202
|
+
total: z.string(),
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export type GetInvoiceItems$Outbound = {
|
|
207
|
+
billingPlanId: string;
|
|
208
|
+
resourceId?: string | undefined;
|
|
209
|
+
start?: string | undefined;
|
|
210
|
+
end?: string | undefined;
|
|
211
|
+
name: string;
|
|
212
|
+
details?: string | undefined;
|
|
213
|
+
price: string;
|
|
214
|
+
quantity: number;
|
|
215
|
+
units: string;
|
|
216
|
+
total: string;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/** @internal */
|
|
220
|
+
export const GetInvoiceItems$outboundSchema: z.ZodType<
|
|
221
|
+
GetInvoiceItems$Outbound,
|
|
222
|
+
z.ZodTypeDef,
|
|
223
|
+
GetInvoiceItems
|
|
224
|
+
> = z.object({
|
|
225
|
+
billingPlanId: z.string(),
|
|
226
|
+
resourceId: z.string().optional(),
|
|
227
|
+
start: z.string().optional(),
|
|
228
|
+
end: z.string().optional(),
|
|
229
|
+
name: z.string(),
|
|
230
|
+
details: z.string().optional(),
|
|
231
|
+
price: z.string(),
|
|
232
|
+
quantity: z.number(),
|
|
233
|
+
units: z.string(),
|
|
234
|
+
total: z.string(),
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @internal
|
|
239
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
240
|
+
*/
|
|
241
|
+
export namespace GetInvoiceItems$ {
|
|
242
|
+
/** @deprecated use `GetInvoiceItems$inboundSchema` instead. */
|
|
243
|
+
export const inboundSchema = GetInvoiceItems$inboundSchema;
|
|
244
|
+
/** @deprecated use `GetInvoiceItems$outboundSchema` instead. */
|
|
245
|
+
export const outboundSchema = GetInvoiceItems$outboundSchema;
|
|
246
|
+
/** @deprecated use `GetInvoiceItems$Outbound` instead. */
|
|
247
|
+
export type Outbound = GetInvoiceItems$Outbound;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function getInvoiceItemsToJSON(
|
|
251
|
+
getInvoiceItems: GetInvoiceItems,
|
|
252
|
+
): string {
|
|
253
|
+
return JSON.stringify(GetInvoiceItems$outboundSchema.parse(getInvoiceItems));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export function getInvoiceItemsFromJSON(
|
|
257
|
+
jsonString: string,
|
|
258
|
+
): SafeParseResult<GetInvoiceItems, SDKValidationError> {
|
|
259
|
+
return safeParse(
|
|
260
|
+
jsonString,
|
|
261
|
+
(x) => GetInvoiceItems$inboundSchema.parse(JSON.parse(x)),
|
|
262
|
+
`Failed to parse 'GetInvoiceItems' from JSON`,
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** @internal */
|
|
267
|
+
export const GetInvoiceDiscounts$inboundSchema: z.ZodType<
|
|
268
|
+
GetInvoiceDiscounts,
|
|
269
|
+
z.ZodTypeDef,
|
|
270
|
+
unknown
|
|
271
|
+
> = z.object({
|
|
272
|
+
billingPlanId: z.string(),
|
|
273
|
+
resourceId: z.string().optional(),
|
|
274
|
+
start: z.string().optional(),
|
|
275
|
+
end: z.string().optional(),
|
|
276
|
+
name: z.string(),
|
|
277
|
+
details: z.string().optional(),
|
|
278
|
+
amount: z.string(),
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
/** @internal */
|
|
282
|
+
export type GetInvoiceDiscounts$Outbound = {
|
|
283
|
+
billingPlanId: string;
|
|
284
|
+
resourceId?: string | undefined;
|
|
285
|
+
start?: string | undefined;
|
|
286
|
+
end?: string | undefined;
|
|
287
|
+
name: string;
|
|
288
|
+
details?: string | undefined;
|
|
289
|
+
amount: string;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/** @internal */
|
|
293
|
+
export const GetInvoiceDiscounts$outboundSchema: z.ZodType<
|
|
294
|
+
GetInvoiceDiscounts$Outbound,
|
|
295
|
+
z.ZodTypeDef,
|
|
296
|
+
GetInvoiceDiscounts
|
|
297
|
+
> = z.object({
|
|
298
|
+
billingPlanId: z.string(),
|
|
299
|
+
resourceId: z.string().optional(),
|
|
300
|
+
start: z.string().optional(),
|
|
301
|
+
end: z.string().optional(),
|
|
302
|
+
name: z.string(),
|
|
303
|
+
details: z.string().optional(),
|
|
304
|
+
amount: z.string(),
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @internal
|
|
309
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
310
|
+
*/
|
|
311
|
+
export namespace GetInvoiceDiscounts$ {
|
|
312
|
+
/** @deprecated use `GetInvoiceDiscounts$inboundSchema` instead. */
|
|
313
|
+
export const inboundSchema = GetInvoiceDiscounts$inboundSchema;
|
|
314
|
+
/** @deprecated use `GetInvoiceDiscounts$outboundSchema` instead. */
|
|
315
|
+
export const outboundSchema = GetInvoiceDiscounts$outboundSchema;
|
|
316
|
+
/** @deprecated use `GetInvoiceDiscounts$Outbound` instead. */
|
|
317
|
+
export type Outbound = GetInvoiceDiscounts$Outbound;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export function getInvoiceDiscountsToJSON(
|
|
321
|
+
getInvoiceDiscounts: GetInvoiceDiscounts,
|
|
322
|
+
): string {
|
|
323
|
+
return JSON.stringify(
|
|
324
|
+
GetInvoiceDiscounts$outboundSchema.parse(getInvoiceDiscounts),
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export function getInvoiceDiscountsFromJSON(
|
|
329
|
+
jsonString: string,
|
|
330
|
+
): SafeParseResult<GetInvoiceDiscounts, SDKValidationError> {
|
|
331
|
+
return safeParse(
|
|
332
|
+
jsonString,
|
|
333
|
+
(x) => GetInvoiceDiscounts$inboundSchema.parse(JSON.parse(x)),
|
|
334
|
+
`Failed to parse 'GetInvoiceDiscounts' from JSON`,
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** @internal */
|
|
339
|
+
export const State$inboundSchema: z.ZodNativeEnum<typeof State> = z.nativeEnum(
|
|
340
|
+
State,
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
/** @internal */
|
|
344
|
+
export const State$outboundSchema: z.ZodNativeEnum<typeof State> =
|
|
345
|
+
State$inboundSchema;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* @internal
|
|
349
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
350
|
+
*/
|
|
351
|
+
export namespace State$ {
|
|
352
|
+
/** @deprecated use `State$inboundSchema` instead. */
|
|
353
|
+
export const inboundSchema = State$inboundSchema;
|
|
354
|
+
/** @deprecated use `State$outboundSchema` instead. */
|
|
355
|
+
export const outboundSchema = State$outboundSchema;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** @internal */
|
|
359
|
+
export const GetInvoiceResponseBody$inboundSchema: z.ZodType<
|
|
360
|
+
GetInvoiceResponseBody,
|
|
361
|
+
z.ZodTypeDef,
|
|
362
|
+
unknown
|
|
363
|
+
> = z.object({
|
|
364
|
+
invoiceId: z.string(),
|
|
365
|
+
externalId: z.string().optional(),
|
|
366
|
+
invoiceNumber: z.string().optional(),
|
|
367
|
+
invoiceDate: z.string(),
|
|
368
|
+
period: z.lazy(() => GetInvoicePeriod$inboundSchema),
|
|
369
|
+
memo: z.string().optional(),
|
|
370
|
+
items: z.array(z.lazy(() => GetInvoiceItems$inboundSchema)),
|
|
371
|
+
discounts: z.array(z.lazy(() => GetInvoiceDiscounts$inboundSchema))
|
|
372
|
+
.optional(),
|
|
373
|
+
total: z.string(),
|
|
374
|
+
created: z.string(),
|
|
375
|
+
updated: z.string(),
|
|
376
|
+
state: State$inboundSchema,
|
|
377
|
+
refundReason: z.string().optional(),
|
|
378
|
+
refundTotal: z.string().optional(),
|
|
379
|
+
test: z.boolean(),
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
/** @internal */
|
|
383
|
+
export type GetInvoiceResponseBody$Outbound = {
|
|
384
|
+
invoiceId: string;
|
|
385
|
+
externalId?: string | undefined;
|
|
386
|
+
invoiceNumber?: string | undefined;
|
|
387
|
+
invoiceDate: string;
|
|
388
|
+
period: GetInvoicePeriod$Outbound;
|
|
389
|
+
memo?: string | undefined;
|
|
390
|
+
items: Array<GetInvoiceItems$Outbound>;
|
|
391
|
+
discounts?: Array<GetInvoiceDiscounts$Outbound> | undefined;
|
|
392
|
+
total: string;
|
|
393
|
+
created: string;
|
|
394
|
+
updated: string;
|
|
395
|
+
state: string;
|
|
396
|
+
refundReason?: string | undefined;
|
|
397
|
+
refundTotal?: string | undefined;
|
|
398
|
+
test: boolean;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
/** @internal */
|
|
402
|
+
export const GetInvoiceResponseBody$outboundSchema: z.ZodType<
|
|
403
|
+
GetInvoiceResponseBody$Outbound,
|
|
404
|
+
z.ZodTypeDef,
|
|
405
|
+
GetInvoiceResponseBody
|
|
406
|
+
> = z.object({
|
|
407
|
+
invoiceId: z.string(),
|
|
408
|
+
externalId: z.string().optional(),
|
|
409
|
+
invoiceNumber: z.string().optional(),
|
|
410
|
+
invoiceDate: z.string(),
|
|
411
|
+
period: z.lazy(() => GetInvoicePeriod$outboundSchema),
|
|
412
|
+
memo: z.string().optional(),
|
|
413
|
+
items: z.array(z.lazy(() => GetInvoiceItems$outboundSchema)),
|
|
414
|
+
discounts: z.array(z.lazy(() => GetInvoiceDiscounts$outboundSchema))
|
|
415
|
+
.optional(),
|
|
416
|
+
total: z.string(),
|
|
417
|
+
created: z.string(),
|
|
418
|
+
updated: z.string(),
|
|
419
|
+
state: State$outboundSchema,
|
|
420
|
+
refundReason: z.string().optional(),
|
|
421
|
+
refundTotal: z.string().optional(),
|
|
422
|
+
test: z.boolean(),
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @internal
|
|
427
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
428
|
+
*/
|
|
429
|
+
export namespace GetInvoiceResponseBody$ {
|
|
430
|
+
/** @deprecated use `GetInvoiceResponseBody$inboundSchema` instead. */
|
|
431
|
+
export const inboundSchema = GetInvoiceResponseBody$inboundSchema;
|
|
432
|
+
/** @deprecated use `GetInvoiceResponseBody$outboundSchema` instead. */
|
|
433
|
+
export const outboundSchema = GetInvoiceResponseBody$outboundSchema;
|
|
434
|
+
/** @deprecated use `GetInvoiceResponseBody$Outbound` instead. */
|
|
435
|
+
export type Outbound = GetInvoiceResponseBody$Outbound;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export function getInvoiceResponseBodyToJSON(
|
|
439
|
+
getInvoiceResponseBody: GetInvoiceResponseBody,
|
|
440
|
+
): string {
|
|
441
|
+
return JSON.stringify(
|
|
442
|
+
GetInvoiceResponseBody$outboundSchema.parse(getInvoiceResponseBody),
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export function getInvoiceResponseBodyFromJSON(
|
|
447
|
+
jsonString: string,
|
|
448
|
+
): SafeParseResult<GetInvoiceResponseBody, SDKValidationError> {
|
|
449
|
+
return safeParse(
|
|
450
|
+
jsonString,
|
|
451
|
+
(x) => GetInvoiceResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
452
|
+
`Failed to parse 'GetInvoiceResponseBody' from JSON`,
|
|
453
|
+
);
|
|
454
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type GetMemberRequest = {
|
|
12
|
+
integrationConfigurationId: string;
|
|
13
|
+
memberId: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const GetMemberRole = {
|
|
17
|
+
Admin: "ADMIN",
|
|
18
|
+
User: "USER",
|
|
19
|
+
} as const;
|
|
20
|
+
export type GetMemberRole = ClosedEnum<typeof GetMemberRole>;
|
|
21
|
+
|
|
22
|
+
export type GetMemberResponseBody = {
|
|
23
|
+
id: string;
|
|
24
|
+
role: GetMemberRole;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const GetMemberRequest$inboundSchema: z.ZodType<
|
|
29
|
+
GetMemberRequest,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
integrationConfigurationId: z.string(),
|
|
34
|
+
memberId: z.string(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type GetMemberRequest$Outbound = {
|
|
39
|
+
integrationConfigurationId: string;
|
|
40
|
+
memberId: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const GetMemberRequest$outboundSchema: z.ZodType<
|
|
45
|
+
GetMemberRequest$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
GetMemberRequest
|
|
48
|
+
> = z.object({
|
|
49
|
+
integrationConfigurationId: z.string(),
|
|
50
|
+
memberId: z.string(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace GetMemberRequest$ {
|
|
58
|
+
/** @deprecated use `GetMemberRequest$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = GetMemberRequest$inboundSchema;
|
|
60
|
+
/** @deprecated use `GetMemberRequest$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = GetMemberRequest$outboundSchema;
|
|
62
|
+
/** @deprecated use `GetMemberRequest$Outbound` instead. */
|
|
63
|
+
export type Outbound = GetMemberRequest$Outbound;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function getMemberRequestToJSON(
|
|
67
|
+
getMemberRequest: GetMemberRequest,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
GetMemberRequest$outboundSchema.parse(getMemberRequest),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function getMemberRequestFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<GetMemberRequest, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => GetMemberRequest$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'GetMemberRequest' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const GetMemberRole$inboundSchema: z.ZodNativeEnum<
|
|
86
|
+
typeof GetMemberRole
|
|
87
|
+
> = z.nativeEnum(GetMemberRole);
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const GetMemberRole$outboundSchema: z.ZodNativeEnum<
|
|
91
|
+
typeof GetMemberRole
|
|
92
|
+
> = GetMemberRole$inboundSchema;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
97
|
+
*/
|
|
98
|
+
export namespace GetMemberRole$ {
|
|
99
|
+
/** @deprecated use `GetMemberRole$inboundSchema` instead. */
|
|
100
|
+
export const inboundSchema = GetMemberRole$inboundSchema;
|
|
101
|
+
/** @deprecated use `GetMemberRole$outboundSchema` instead. */
|
|
102
|
+
export const outboundSchema = GetMemberRole$outboundSchema;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const GetMemberResponseBody$inboundSchema: z.ZodType<
|
|
107
|
+
GetMemberResponseBody,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
unknown
|
|
110
|
+
> = z.object({
|
|
111
|
+
id: z.string(),
|
|
112
|
+
role: GetMemberRole$inboundSchema,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export type GetMemberResponseBody$Outbound = {
|
|
117
|
+
id: string;
|
|
118
|
+
role: string;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const GetMemberResponseBody$outboundSchema: z.ZodType<
|
|
123
|
+
GetMemberResponseBody$Outbound,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
GetMemberResponseBody
|
|
126
|
+
> = z.object({
|
|
127
|
+
id: z.string(),
|
|
128
|
+
role: GetMemberRole$outboundSchema,
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
134
|
+
*/
|
|
135
|
+
export namespace GetMemberResponseBody$ {
|
|
136
|
+
/** @deprecated use `GetMemberResponseBody$inboundSchema` instead. */
|
|
137
|
+
export const inboundSchema = GetMemberResponseBody$inboundSchema;
|
|
138
|
+
/** @deprecated use `GetMemberResponseBody$outboundSchema` instead. */
|
|
139
|
+
export const outboundSchema = GetMemberResponseBody$outboundSchema;
|
|
140
|
+
/** @deprecated use `GetMemberResponseBody$Outbound` instead. */
|
|
141
|
+
export type Outbound = GetMemberResponseBody$Outbound;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function getMemberResponseBodyToJSON(
|
|
145
|
+
getMemberResponseBody: GetMemberResponseBody,
|
|
146
|
+
): string {
|
|
147
|
+
return JSON.stringify(
|
|
148
|
+
GetMemberResponseBody$outboundSchema.parse(getMemberResponseBody),
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function getMemberResponseBodyFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<GetMemberResponseBody, SDKValidationError> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) => GetMemberResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'GetMemberResponseBody' from JSON`,
|
|
159
|
+
);
|
|
160
|
+
}
|