@greensecurity/javascript-sdk 0.35.27 → 0.35.37
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/README.md +9 -0
- package/bin/mcp-server.js +1495 -405
- package/bin/mcp-server.js.map +16 -7
- package/dist/commonjs/__tests__/invoices.test.js +33 -0
- package/dist/commonjs/__tests__/invoices.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +15 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +33 -7
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/invoicesCreateInvoice.d.ts +26 -0
- package/dist/commonjs/funcs/invoicesCreateInvoice.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesCreateInvoice.js +126 -0
- package/dist/commonjs/funcs/invoicesCreateInvoice.js.map +1 -0
- package/dist/commonjs/funcs/invoicesUpdateInvoice.d.ts +26 -0
- package/dist/commonjs/funcs/invoicesUpdateInvoice.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesUpdateInvoice.js +133 -0
- package/dist/commonjs/funcs/invoicesUpdateInvoice.js.map +1 -0
- package/dist/commonjs/funcs/vendorsAcceptVendorCredential.d.ts +17 -0
- package/dist/commonjs/funcs/vendorsAcceptVendorCredential.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsAcceptVendorCredential.js +120 -0
- package/dist/commonjs/funcs/vendorsAcceptVendorCredential.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +7 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.js +73 -0
- package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/invoicesUpdateInvoice.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/invoicesUpdateInvoice.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/invoicesUpdateInvoice.js +73 -0
- package/dist/commonjs/mcp-server/tools/invoicesUpdateInvoice.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.js.map +1 -0
- package/dist/commonjs/models/operations/acceptvendorcredential.d.ts +32 -0
- package/dist/commonjs/models/operations/acceptvendorcredential.d.ts.map +1 -0
- package/dist/commonjs/models/operations/acceptvendorcredential.js +78 -0
- package/dist/commonjs/models/operations/acceptvendorcredential.js.map +1 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts +441 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createinvoice.js +604 -0
- package/dist/commonjs/models/operations/createinvoice.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/updateinvoice.d.ts +441 -0
- package/dist/commonjs/models/operations/updateinvoice.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updateinvoice.js +623 -0
- package/dist/commonjs/models/operations/updateinvoice.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +3 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +3 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/invoicesCreateInvoice.d.ts +32 -0
- package/dist/commonjs/react-query/invoicesCreateInvoice.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesCreateInvoice.js +56 -0
- package/dist/commonjs/react-query/invoicesCreateInvoice.js.map +1 -0
- package/dist/commonjs/react-query/invoicesUpdateInvoice.d.ts +32 -0
- package/dist/commonjs/react-query/invoicesUpdateInvoice.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesUpdateInvoice.js +56 -0
- package/dist/commonjs/react-query/invoicesUpdateInvoice.js.map +1 -0
- package/dist/commonjs/react-query/vendorsAcceptVendorCredential.d.ts +23 -0
- package/dist/commonjs/react-query/vendorsAcceptVendorCredential.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsAcceptVendorCredential.js +47 -0
- package/dist/commonjs/react-query/vendorsAcceptVendorCredential.js.map +1 -0
- package/dist/commonjs/sdk/invoices.d.ts +32 -0
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +38 -0
- package/dist/commonjs/sdk/invoices.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +7 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +10 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/invoices.test.js +33 -0
- package/dist/esm/__tests__/invoices.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +15 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +33 -7
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/invoicesCreateInvoice.d.ts +26 -0
- package/dist/esm/funcs/invoicesCreateInvoice.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesCreateInvoice.js +90 -0
- package/dist/esm/funcs/invoicesCreateInvoice.js.map +1 -0
- package/dist/esm/funcs/invoicesUpdateInvoice.d.ts +26 -0
- package/dist/esm/funcs/invoicesUpdateInvoice.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesUpdateInvoice.js +97 -0
- package/dist/esm/funcs/invoicesUpdateInvoice.js.map +1 -0
- package/dist/esm/funcs/vendorsAcceptVendorCredential.d.ts +17 -0
- package/dist/esm/funcs/vendorsAcceptVendorCredential.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsAcceptVendorCredential.js +84 -0
- package/dist/esm/funcs/vendorsAcceptVendorCredential.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +7 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/invoicesCreateInvoice.d.ts +8 -0
- package/dist/esm/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/invoicesCreateInvoice.js +37 -0
- package/dist/esm/mcp-server/tools/invoicesCreateInvoice.js.map +1 -0
- package/dist/esm/mcp-server/tools/invoicesUpdateInvoice.d.ts +8 -0
- package/dist/esm/mcp-server/tools/invoicesUpdateInvoice.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/invoicesUpdateInvoice.js +37 -0
- package/dist/esm/mcp-server/tools/invoicesUpdateInvoice.js.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.js.map +1 -0
- package/dist/esm/models/operations/acceptvendorcredential.d.ts +32 -0
- package/dist/esm/models/operations/acceptvendorcredential.d.ts.map +1 -0
- package/dist/esm/models/operations/acceptvendorcredential.js +40 -0
- package/dist/esm/models/operations/acceptvendorcredential.js.map +1 -0
- package/dist/esm/models/operations/createinvoice.d.ts +441 -0
- package/dist/esm/models/operations/createinvoice.d.ts.map +1 -0
- package/dist/esm/models/operations/createinvoice.js +548 -0
- package/dist/esm/models/operations/createinvoice.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/updateinvoice.d.ts +441 -0
- package/dist/esm/models/operations/updateinvoice.d.ts.map +1 -0
- package/dist/esm/models/operations/updateinvoice.js +567 -0
- package/dist/esm/models/operations/updateinvoice.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +3 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +3 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/invoicesCreateInvoice.d.ts +32 -0
- package/dist/esm/react-query/invoicesCreateInvoice.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesCreateInvoice.js +51 -0
- package/dist/esm/react-query/invoicesCreateInvoice.js.map +1 -0
- package/dist/esm/react-query/invoicesUpdateInvoice.d.ts +32 -0
- package/dist/esm/react-query/invoicesUpdateInvoice.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesUpdateInvoice.js +51 -0
- package/dist/esm/react-query/invoicesUpdateInvoice.js.map +1 -0
- package/dist/esm/react-query/vendorsAcceptVendorCredential.d.ts +23 -0
- package/dist/esm/react-query/vendorsAcceptVendorCredential.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsAcceptVendorCredential.js +42 -0
- package/dist/esm/react-query/vendorsAcceptVendorCredential.js.map +1 -0
- package/dist/esm/sdk/invoices.d.ts +32 -0
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +38 -0
- package/dist/esm/sdk/invoices.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +7 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +10 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/invoices.test.ts +39 -0
- package/src/__tests__/vendors.test.ts +18 -0
- package/src/__tests__/zones.test.ts +33 -7
- package/src/funcs/invoicesCreateInvoice.ts +174 -0
- package/src/funcs/invoicesUpdateInvoice.ts +182 -0
- package/src/funcs/vendorsAcceptVendorCredential.ts +176 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -1
- package/src/mcp-server/tools/invoicesCreateInvoice.ts +46 -0
- package/src/mcp-server/tools/invoicesUpdateInvoice.ts +46 -0
- package/src/mcp-server/tools/vendorsAcceptVendorCredential.ts +37 -0
- package/src/models/operations/acceptvendorcredential.ts +80 -0
- package/src/models/operations/createinvoice.ts +980 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/updateinvoice.ts +1090 -0
- package/src/react-query/index.ts +3 -0
- package/src/react-query/invoicesCreateInvoice.ts +98 -0
- package/src/react-query/invoicesUpdateInvoice.ts +97 -0
- package/src/react-query/vendorsAcceptVendorCredential.ts +88 -0
- package/src/sdk/invoices.ts +54 -0
- package/src/sdk/vendors.ts +18 -0
|
@@ -0,0 +1,1090 @@
|
|
|
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 { RFCDate } from "../../types/rfcdate.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export const UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler = {
|
|
14
|
+
VendorCredential: "vendor credential",
|
|
15
|
+
CredentialingSubscription: "credentialing subscription",
|
|
16
|
+
ExpeditedCredential: "expedited credential",
|
|
17
|
+
} as const;
|
|
18
|
+
export type UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler = ClosedEnum<
|
|
19
|
+
typeof UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
export type UpdateInvoiceRequestBodyInvoicesRequest4Lines = {
|
|
23
|
+
variantId: number;
|
|
24
|
+
unitPrice?: number | undefined;
|
|
25
|
+
quantity?: number | undefined;
|
|
26
|
+
subscriptionId?: number | undefined;
|
|
27
|
+
dateStarts?: RFCDate | undefined;
|
|
28
|
+
dateEnds?: RFCDate | undefined;
|
|
29
|
+
paymentHandler?:
|
|
30
|
+
| UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
|
|
31
|
+
| undefined;
|
|
32
|
+
paymentHandlerData?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type RequestBody4 = {
|
|
36
|
+
systemId: number;
|
|
37
|
+
lines?: Array<UpdateInvoiceRequestBodyInvoicesRequest4Lines> | undefined;
|
|
38
|
+
vendorCredentialId?: number | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler = {
|
|
42
|
+
VendorCredential: "vendor credential",
|
|
43
|
+
CredentialingSubscription: "credentialing subscription",
|
|
44
|
+
ExpeditedCredential: "expedited credential",
|
|
45
|
+
} as const;
|
|
46
|
+
export type UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler = ClosedEnum<
|
|
47
|
+
typeof UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
|
|
48
|
+
>;
|
|
49
|
+
|
|
50
|
+
export type UpdateInvoiceRequestBodyInvoicesRequestLines = {
|
|
51
|
+
variantId: number;
|
|
52
|
+
unitPrice?: number | undefined;
|
|
53
|
+
quantity?: number | undefined;
|
|
54
|
+
subscriptionId?: number | undefined;
|
|
55
|
+
dateStarts?: RFCDate | undefined;
|
|
56
|
+
dateEnds?: RFCDate | undefined;
|
|
57
|
+
paymentHandler?:
|
|
58
|
+
| UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
|
|
59
|
+
| undefined;
|
|
60
|
+
paymentHandlerData?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type RequestBody3 = {
|
|
64
|
+
facilityId: number;
|
|
65
|
+
lines?: Array<UpdateInvoiceRequestBodyInvoicesRequestLines> | undefined;
|
|
66
|
+
vendorCredentialId?: number | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const UpdateInvoiceRequestBodyInvoicesPaymentHandler = {
|
|
70
|
+
VendorCredential: "vendor credential",
|
|
71
|
+
CredentialingSubscription: "credentialing subscription",
|
|
72
|
+
ExpeditedCredential: "expedited credential",
|
|
73
|
+
} as const;
|
|
74
|
+
export type UpdateInvoiceRequestBodyInvoicesPaymentHandler = ClosedEnum<
|
|
75
|
+
typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler
|
|
76
|
+
>;
|
|
77
|
+
|
|
78
|
+
export type UpdateInvoiceRequestBodyInvoicesLines = {
|
|
79
|
+
variantId: number;
|
|
80
|
+
unitPrice?: number | undefined;
|
|
81
|
+
quantity?: number | undefined;
|
|
82
|
+
subscriptionId?: number | undefined;
|
|
83
|
+
dateStarts?: RFCDate | undefined;
|
|
84
|
+
dateEnds?: RFCDate | undefined;
|
|
85
|
+
paymentHandler?: UpdateInvoiceRequestBodyInvoicesPaymentHandler | undefined;
|
|
86
|
+
paymentHandlerData?: string | undefined;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export type UpdateInvoiceRequestBody2 = {
|
|
90
|
+
companyId: number;
|
|
91
|
+
lines?: Array<UpdateInvoiceRequestBodyInvoicesLines> | undefined;
|
|
92
|
+
vendorCredentialId?: number | undefined;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const UpdateInvoiceRequestBodyPaymentHandler = {
|
|
96
|
+
VendorCredential: "vendor credential",
|
|
97
|
+
CredentialingSubscription: "credentialing subscription",
|
|
98
|
+
ExpeditedCredential: "expedited credential",
|
|
99
|
+
} as const;
|
|
100
|
+
export type UpdateInvoiceRequestBodyPaymentHandler = ClosedEnum<
|
|
101
|
+
typeof UpdateInvoiceRequestBodyPaymentHandler
|
|
102
|
+
>;
|
|
103
|
+
|
|
104
|
+
export type UpdateInvoiceRequestBodyLines = {
|
|
105
|
+
variantId: number;
|
|
106
|
+
unitPrice?: number | undefined;
|
|
107
|
+
quantity?: number | undefined;
|
|
108
|
+
subscriptionId?: number | undefined;
|
|
109
|
+
dateStarts?: RFCDate | undefined;
|
|
110
|
+
dateEnds?: RFCDate | undefined;
|
|
111
|
+
paymentHandler?: UpdateInvoiceRequestBodyPaymentHandler | undefined;
|
|
112
|
+
paymentHandlerData?: string | undefined;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export type UpdateInvoiceRequestBody1 = {
|
|
116
|
+
vendorId: number;
|
|
117
|
+
lines?: Array<UpdateInvoiceRequestBodyLines> | undefined;
|
|
118
|
+
vendorCredentialId?: number | undefined;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type UpdateInvoiceRequestBody =
|
|
122
|
+
| UpdateInvoiceRequestBody1
|
|
123
|
+
| UpdateInvoiceRequestBody2
|
|
124
|
+
| RequestBody3
|
|
125
|
+
| RequestBody4;
|
|
126
|
+
|
|
127
|
+
export type UpdateInvoiceRequest = {
|
|
128
|
+
/**
|
|
129
|
+
* The identifier of the object
|
|
130
|
+
*/
|
|
131
|
+
id: number;
|
|
132
|
+
requestBody:
|
|
133
|
+
| UpdateInvoiceRequestBody1
|
|
134
|
+
| UpdateInvoiceRequestBody2
|
|
135
|
+
| RequestBody3
|
|
136
|
+
| RequestBody4;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
export const UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema:
|
|
141
|
+
z.ZodNativeEnum<
|
|
142
|
+
typeof UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
|
|
143
|
+
> = z.nativeEnum(UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler);
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema:
|
|
147
|
+
z.ZodNativeEnum<
|
|
148
|
+
typeof UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
|
|
149
|
+
> = UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
154
|
+
*/
|
|
155
|
+
export namespace UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$ {
|
|
156
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema` instead. */
|
|
157
|
+
export const inboundSchema =
|
|
158
|
+
UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema;
|
|
159
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema` instead. */
|
|
160
|
+
export const outboundSchema =
|
|
161
|
+
UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** @internal */
|
|
165
|
+
export const UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema:
|
|
166
|
+
z.ZodType<
|
|
167
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines,
|
|
168
|
+
z.ZodTypeDef,
|
|
169
|
+
unknown
|
|
170
|
+
> = z.object({
|
|
171
|
+
variant_id: z.number().int(),
|
|
172
|
+
unit_price: z.number().optional(),
|
|
173
|
+
quantity: z.number().int().optional(),
|
|
174
|
+
subscription_id: z.number().int().optional(),
|
|
175
|
+
date_starts: z.string().transform(v => new RFCDate(v)).optional(),
|
|
176
|
+
date_ends: z.string().transform(v => new RFCDate(v)).optional(),
|
|
177
|
+
payment_handler:
|
|
178
|
+
UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema
|
|
179
|
+
.optional(),
|
|
180
|
+
payment_handler_data: z.string().optional(),
|
|
181
|
+
}).transform((v) => {
|
|
182
|
+
return remap$(v, {
|
|
183
|
+
"variant_id": "variantId",
|
|
184
|
+
"unit_price": "unitPrice",
|
|
185
|
+
"subscription_id": "subscriptionId",
|
|
186
|
+
"date_starts": "dateStarts",
|
|
187
|
+
"date_ends": "dateEnds",
|
|
188
|
+
"payment_handler": "paymentHandler",
|
|
189
|
+
"payment_handler_data": "paymentHandlerData",
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
/** @internal */
|
|
194
|
+
export type UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound = {
|
|
195
|
+
variant_id: number;
|
|
196
|
+
unit_price?: number | undefined;
|
|
197
|
+
quantity?: number | undefined;
|
|
198
|
+
subscription_id?: number | undefined;
|
|
199
|
+
date_starts?: string | undefined;
|
|
200
|
+
date_ends?: string | undefined;
|
|
201
|
+
payment_handler?: string | undefined;
|
|
202
|
+
payment_handler_data?: string | undefined;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export const UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema:
|
|
207
|
+
z.ZodType<
|
|
208
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound,
|
|
209
|
+
z.ZodTypeDef,
|
|
210
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines
|
|
211
|
+
> = z.object({
|
|
212
|
+
variantId: z.number().int(),
|
|
213
|
+
unitPrice: z.number().optional(),
|
|
214
|
+
quantity: z.number().int().optional(),
|
|
215
|
+
subscriptionId: z.number().int().optional(),
|
|
216
|
+
dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
217
|
+
dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
218
|
+
paymentHandler:
|
|
219
|
+
UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema
|
|
220
|
+
.optional(),
|
|
221
|
+
paymentHandlerData: z.string().optional(),
|
|
222
|
+
}).transform((v) => {
|
|
223
|
+
return remap$(v, {
|
|
224
|
+
variantId: "variant_id",
|
|
225
|
+
unitPrice: "unit_price",
|
|
226
|
+
subscriptionId: "subscription_id",
|
|
227
|
+
dateStarts: "date_starts",
|
|
228
|
+
dateEnds: "date_ends",
|
|
229
|
+
paymentHandler: "payment_handler",
|
|
230
|
+
paymentHandlerData: "payment_handler_data",
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @internal
|
|
236
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
237
|
+
*/
|
|
238
|
+
export namespace UpdateInvoiceRequestBodyInvoicesRequest4Lines$ {
|
|
239
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema` instead. */
|
|
240
|
+
export const inboundSchema =
|
|
241
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema;
|
|
242
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema` instead. */
|
|
243
|
+
export const outboundSchema =
|
|
244
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema;
|
|
245
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound` instead. */
|
|
246
|
+
export type Outbound = UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export function updateInvoiceRequestBodyInvoicesRequest4LinesToJSON(
|
|
250
|
+
updateInvoiceRequestBodyInvoicesRequest4Lines:
|
|
251
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines,
|
|
252
|
+
): string {
|
|
253
|
+
return JSON.stringify(
|
|
254
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema.parse(
|
|
255
|
+
updateInvoiceRequestBodyInvoicesRequest4Lines,
|
|
256
|
+
),
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export function updateInvoiceRequestBodyInvoicesRequest4LinesFromJSON(
|
|
261
|
+
jsonString: string,
|
|
262
|
+
): SafeParseResult<
|
|
263
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines,
|
|
264
|
+
SDKValidationError
|
|
265
|
+
> {
|
|
266
|
+
return safeParse(
|
|
267
|
+
jsonString,
|
|
268
|
+
(x) =>
|
|
269
|
+
UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema.parse(
|
|
270
|
+
JSON.parse(x),
|
|
271
|
+
),
|
|
272
|
+
`Failed to parse 'UpdateInvoiceRequestBodyInvoicesRequest4Lines' from JSON`,
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** @internal */
|
|
277
|
+
export const RequestBody4$inboundSchema: z.ZodType<
|
|
278
|
+
RequestBody4,
|
|
279
|
+
z.ZodTypeDef,
|
|
280
|
+
unknown
|
|
281
|
+
> = z.object({
|
|
282
|
+
system_id: z.number().int(),
|
|
283
|
+
lines: z.array(
|
|
284
|
+
z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema),
|
|
285
|
+
).optional(),
|
|
286
|
+
vendor_credential_id: z.number().int().optional(),
|
|
287
|
+
}).transform((v) => {
|
|
288
|
+
return remap$(v, {
|
|
289
|
+
"system_id": "systemId",
|
|
290
|
+
"vendor_credential_id": "vendorCredentialId",
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
/** @internal */
|
|
295
|
+
export type RequestBody4$Outbound = {
|
|
296
|
+
system_id: number;
|
|
297
|
+
lines?:
|
|
298
|
+
| Array<UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound>
|
|
299
|
+
| undefined;
|
|
300
|
+
vendor_credential_id?: number | undefined;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
/** @internal */
|
|
304
|
+
export const RequestBody4$outboundSchema: z.ZodType<
|
|
305
|
+
RequestBody4$Outbound,
|
|
306
|
+
z.ZodTypeDef,
|
|
307
|
+
RequestBody4
|
|
308
|
+
> = z.object({
|
|
309
|
+
systemId: z.number().int(),
|
|
310
|
+
lines: z.array(
|
|
311
|
+
z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema),
|
|
312
|
+
).optional(),
|
|
313
|
+
vendorCredentialId: z.number().int().optional(),
|
|
314
|
+
}).transform((v) => {
|
|
315
|
+
return remap$(v, {
|
|
316
|
+
systemId: "system_id",
|
|
317
|
+
vendorCredentialId: "vendor_credential_id",
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @internal
|
|
323
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
324
|
+
*/
|
|
325
|
+
export namespace RequestBody4$ {
|
|
326
|
+
/** @deprecated use `RequestBody4$inboundSchema` instead. */
|
|
327
|
+
export const inboundSchema = RequestBody4$inboundSchema;
|
|
328
|
+
/** @deprecated use `RequestBody4$outboundSchema` instead. */
|
|
329
|
+
export const outboundSchema = RequestBody4$outboundSchema;
|
|
330
|
+
/** @deprecated use `RequestBody4$Outbound` instead. */
|
|
331
|
+
export type Outbound = RequestBody4$Outbound;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export function requestBody4ToJSON(requestBody4: RequestBody4): string {
|
|
335
|
+
return JSON.stringify(RequestBody4$outboundSchema.parse(requestBody4));
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function requestBody4FromJSON(
|
|
339
|
+
jsonString: string,
|
|
340
|
+
): SafeParseResult<RequestBody4, SDKValidationError> {
|
|
341
|
+
return safeParse(
|
|
342
|
+
jsonString,
|
|
343
|
+
(x) => RequestBody4$inboundSchema.parse(JSON.parse(x)),
|
|
344
|
+
`Failed to parse 'RequestBody4' from JSON`,
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/** @internal */
|
|
349
|
+
export const UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema:
|
|
350
|
+
z.ZodNativeEnum<
|
|
351
|
+
typeof UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
|
|
352
|
+
> = z.nativeEnum(UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler);
|
|
353
|
+
|
|
354
|
+
/** @internal */
|
|
355
|
+
export const UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema:
|
|
356
|
+
z.ZodNativeEnum<
|
|
357
|
+
typeof UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
|
|
358
|
+
> = UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* @internal
|
|
362
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
363
|
+
*/
|
|
364
|
+
export namespace UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$ {
|
|
365
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema` instead. */
|
|
366
|
+
export const inboundSchema =
|
|
367
|
+
UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema;
|
|
368
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema` instead. */
|
|
369
|
+
export const outboundSchema =
|
|
370
|
+
UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** @internal */
|
|
374
|
+
export const UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema:
|
|
375
|
+
z.ZodType<
|
|
376
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines,
|
|
377
|
+
z.ZodTypeDef,
|
|
378
|
+
unknown
|
|
379
|
+
> = z.object({
|
|
380
|
+
variant_id: z.number().int(),
|
|
381
|
+
unit_price: z.number().optional(),
|
|
382
|
+
quantity: z.number().int().optional(),
|
|
383
|
+
subscription_id: z.number().int().optional(),
|
|
384
|
+
date_starts: z.string().transform(v => new RFCDate(v)).optional(),
|
|
385
|
+
date_ends: z.string().transform(v => new RFCDate(v)).optional(),
|
|
386
|
+
payment_handler:
|
|
387
|
+
UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema
|
|
388
|
+
.optional(),
|
|
389
|
+
payment_handler_data: z.string().optional(),
|
|
390
|
+
}).transform((v) => {
|
|
391
|
+
return remap$(v, {
|
|
392
|
+
"variant_id": "variantId",
|
|
393
|
+
"unit_price": "unitPrice",
|
|
394
|
+
"subscription_id": "subscriptionId",
|
|
395
|
+
"date_starts": "dateStarts",
|
|
396
|
+
"date_ends": "dateEnds",
|
|
397
|
+
"payment_handler": "paymentHandler",
|
|
398
|
+
"payment_handler_data": "paymentHandlerData",
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
/** @internal */
|
|
403
|
+
export type UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound = {
|
|
404
|
+
variant_id: number;
|
|
405
|
+
unit_price?: number | undefined;
|
|
406
|
+
quantity?: number | undefined;
|
|
407
|
+
subscription_id?: number | undefined;
|
|
408
|
+
date_starts?: string | undefined;
|
|
409
|
+
date_ends?: string | undefined;
|
|
410
|
+
payment_handler?: string | undefined;
|
|
411
|
+
payment_handler_data?: string | undefined;
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
/** @internal */
|
|
415
|
+
export const UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema:
|
|
416
|
+
z.ZodType<
|
|
417
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound,
|
|
418
|
+
z.ZodTypeDef,
|
|
419
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines
|
|
420
|
+
> = z.object({
|
|
421
|
+
variantId: z.number().int(),
|
|
422
|
+
unitPrice: z.number().optional(),
|
|
423
|
+
quantity: z.number().int().optional(),
|
|
424
|
+
subscriptionId: z.number().int().optional(),
|
|
425
|
+
dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
426
|
+
dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
427
|
+
paymentHandler:
|
|
428
|
+
UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema
|
|
429
|
+
.optional(),
|
|
430
|
+
paymentHandlerData: z.string().optional(),
|
|
431
|
+
}).transform((v) => {
|
|
432
|
+
return remap$(v, {
|
|
433
|
+
variantId: "variant_id",
|
|
434
|
+
unitPrice: "unit_price",
|
|
435
|
+
subscriptionId: "subscription_id",
|
|
436
|
+
dateStarts: "date_starts",
|
|
437
|
+
dateEnds: "date_ends",
|
|
438
|
+
paymentHandler: "payment_handler",
|
|
439
|
+
paymentHandlerData: "payment_handler_data",
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* @internal
|
|
445
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
446
|
+
*/
|
|
447
|
+
export namespace UpdateInvoiceRequestBodyInvoicesRequestLines$ {
|
|
448
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema` instead. */
|
|
449
|
+
export const inboundSchema =
|
|
450
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema;
|
|
451
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema` instead. */
|
|
452
|
+
export const outboundSchema =
|
|
453
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema;
|
|
454
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound` instead. */
|
|
455
|
+
export type Outbound = UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function updateInvoiceRequestBodyInvoicesRequestLinesToJSON(
|
|
459
|
+
updateInvoiceRequestBodyInvoicesRequestLines:
|
|
460
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines,
|
|
461
|
+
): string {
|
|
462
|
+
return JSON.stringify(
|
|
463
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema.parse(
|
|
464
|
+
updateInvoiceRequestBodyInvoicesRequestLines,
|
|
465
|
+
),
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export function updateInvoiceRequestBodyInvoicesRequestLinesFromJSON(
|
|
470
|
+
jsonString: string,
|
|
471
|
+
): SafeParseResult<
|
|
472
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines,
|
|
473
|
+
SDKValidationError
|
|
474
|
+
> {
|
|
475
|
+
return safeParse(
|
|
476
|
+
jsonString,
|
|
477
|
+
(x) =>
|
|
478
|
+
UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema.parse(
|
|
479
|
+
JSON.parse(x),
|
|
480
|
+
),
|
|
481
|
+
`Failed to parse 'UpdateInvoiceRequestBodyInvoicesRequestLines' from JSON`,
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** @internal */
|
|
486
|
+
export const RequestBody3$inboundSchema: z.ZodType<
|
|
487
|
+
RequestBody3,
|
|
488
|
+
z.ZodTypeDef,
|
|
489
|
+
unknown
|
|
490
|
+
> = z.object({
|
|
491
|
+
facility_id: z.number().int(),
|
|
492
|
+
lines: z.array(
|
|
493
|
+
z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema),
|
|
494
|
+
).optional(),
|
|
495
|
+
vendor_credential_id: z.number().int().optional(),
|
|
496
|
+
}).transform((v) => {
|
|
497
|
+
return remap$(v, {
|
|
498
|
+
"facility_id": "facilityId",
|
|
499
|
+
"vendor_credential_id": "vendorCredentialId",
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
/** @internal */
|
|
504
|
+
export type RequestBody3$Outbound = {
|
|
505
|
+
facility_id: number;
|
|
506
|
+
lines?:
|
|
507
|
+
| Array<UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound>
|
|
508
|
+
| undefined;
|
|
509
|
+
vendor_credential_id?: number | undefined;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
/** @internal */
|
|
513
|
+
export const RequestBody3$outboundSchema: z.ZodType<
|
|
514
|
+
RequestBody3$Outbound,
|
|
515
|
+
z.ZodTypeDef,
|
|
516
|
+
RequestBody3
|
|
517
|
+
> = z.object({
|
|
518
|
+
facilityId: z.number().int(),
|
|
519
|
+
lines: z.array(
|
|
520
|
+
z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema),
|
|
521
|
+
).optional(),
|
|
522
|
+
vendorCredentialId: z.number().int().optional(),
|
|
523
|
+
}).transform((v) => {
|
|
524
|
+
return remap$(v, {
|
|
525
|
+
facilityId: "facility_id",
|
|
526
|
+
vendorCredentialId: "vendor_credential_id",
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* @internal
|
|
532
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
533
|
+
*/
|
|
534
|
+
export namespace RequestBody3$ {
|
|
535
|
+
/** @deprecated use `RequestBody3$inboundSchema` instead. */
|
|
536
|
+
export const inboundSchema = RequestBody3$inboundSchema;
|
|
537
|
+
/** @deprecated use `RequestBody3$outboundSchema` instead. */
|
|
538
|
+
export const outboundSchema = RequestBody3$outboundSchema;
|
|
539
|
+
/** @deprecated use `RequestBody3$Outbound` instead. */
|
|
540
|
+
export type Outbound = RequestBody3$Outbound;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export function requestBody3ToJSON(requestBody3: RequestBody3): string {
|
|
544
|
+
return JSON.stringify(RequestBody3$outboundSchema.parse(requestBody3));
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export function requestBody3FromJSON(
|
|
548
|
+
jsonString: string,
|
|
549
|
+
): SafeParseResult<RequestBody3, SDKValidationError> {
|
|
550
|
+
return safeParse(
|
|
551
|
+
jsonString,
|
|
552
|
+
(x) => RequestBody3$inboundSchema.parse(JSON.parse(x)),
|
|
553
|
+
`Failed to parse 'RequestBody3' from JSON`,
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/** @internal */
|
|
558
|
+
export const UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema:
|
|
559
|
+
z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler> = z
|
|
560
|
+
.nativeEnum(UpdateInvoiceRequestBodyInvoicesPaymentHandler);
|
|
561
|
+
|
|
562
|
+
/** @internal */
|
|
563
|
+
export const UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema:
|
|
564
|
+
z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler> =
|
|
565
|
+
UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema;
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* @internal
|
|
569
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
570
|
+
*/
|
|
571
|
+
export namespace UpdateInvoiceRequestBodyInvoicesPaymentHandler$ {
|
|
572
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema` instead. */
|
|
573
|
+
export const inboundSchema =
|
|
574
|
+
UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema;
|
|
575
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema` instead. */
|
|
576
|
+
export const outboundSchema =
|
|
577
|
+
UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/** @internal */
|
|
581
|
+
export const UpdateInvoiceRequestBodyInvoicesLines$inboundSchema: z.ZodType<
|
|
582
|
+
UpdateInvoiceRequestBodyInvoicesLines,
|
|
583
|
+
z.ZodTypeDef,
|
|
584
|
+
unknown
|
|
585
|
+
> = z.object({
|
|
586
|
+
variant_id: z.number().int(),
|
|
587
|
+
unit_price: z.number().optional(),
|
|
588
|
+
quantity: z.number().int().optional(),
|
|
589
|
+
subscription_id: z.number().int().optional(),
|
|
590
|
+
date_starts: z.string().transform(v => new RFCDate(v)).optional(),
|
|
591
|
+
date_ends: z.string().transform(v => new RFCDate(v)).optional(),
|
|
592
|
+
payment_handler: UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema
|
|
593
|
+
.optional(),
|
|
594
|
+
payment_handler_data: z.string().optional(),
|
|
595
|
+
}).transform((v) => {
|
|
596
|
+
return remap$(v, {
|
|
597
|
+
"variant_id": "variantId",
|
|
598
|
+
"unit_price": "unitPrice",
|
|
599
|
+
"subscription_id": "subscriptionId",
|
|
600
|
+
"date_starts": "dateStarts",
|
|
601
|
+
"date_ends": "dateEnds",
|
|
602
|
+
"payment_handler": "paymentHandler",
|
|
603
|
+
"payment_handler_data": "paymentHandlerData",
|
|
604
|
+
});
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
/** @internal */
|
|
608
|
+
export type UpdateInvoiceRequestBodyInvoicesLines$Outbound = {
|
|
609
|
+
variant_id: number;
|
|
610
|
+
unit_price?: number | undefined;
|
|
611
|
+
quantity?: number | undefined;
|
|
612
|
+
subscription_id?: number | undefined;
|
|
613
|
+
date_starts?: string | undefined;
|
|
614
|
+
date_ends?: string | undefined;
|
|
615
|
+
payment_handler?: string | undefined;
|
|
616
|
+
payment_handler_data?: string | undefined;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/** @internal */
|
|
620
|
+
export const UpdateInvoiceRequestBodyInvoicesLines$outboundSchema: z.ZodType<
|
|
621
|
+
UpdateInvoiceRequestBodyInvoicesLines$Outbound,
|
|
622
|
+
z.ZodTypeDef,
|
|
623
|
+
UpdateInvoiceRequestBodyInvoicesLines
|
|
624
|
+
> = z.object({
|
|
625
|
+
variantId: z.number().int(),
|
|
626
|
+
unitPrice: z.number().optional(),
|
|
627
|
+
quantity: z.number().int().optional(),
|
|
628
|
+
subscriptionId: z.number().int().optional(),
|
|
629
|
+
dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
630
|
+
dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
631
|
+
paymentHandler: UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema
|
|
632
|
+
.optional(),
|
|
633
|
+
paymentHandlerData: z.string().optional(),
|
|
634
|
+
}).transform((v) => {
|
|
635
|
+
return remap$(v, {
|
|
636
|
+
variantId: "variant_id",
|
|
637
|
+
unitPrice: "unit_price",
|
|
638
|
+
subscriptionId: "subscription_id",
|
|
639
|
+
dateStarts: "date_starts",
|
|
640
|
+
dateEnds: "date_ends",
|
|
641
|
+
paymentHandler: "payment_handler",
|
|
642
|
+
paymentHandlerData: "payment_handler_data",
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* @internal
|
|
648
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
649
|
+
*/
|
|
650
|
+
export namespace UpdateInvoiceRequestBodyInvoicesLines$ {
|
|
651
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$inboundSchema` instead. */
|
|
652
|
+
export const inboundSchema =
|
|
653
|
+
UpdateInvoiceRequestBodyInvoicesLines$inboundSchema;
|
|
654
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$outboundSchema` instead. */
|
|
655
|
+
export const outboundSchema =
|
|
656
|
+
UpdateInvoiceRequestBodyInvoicesLines$outboundSchema;
|
|
657
|
+
/** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$Outbound` instead. */
|
|
658
|
+
export type Outbound = UpdateInvoiceRequestBodyInvoicesLines$Outbound;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export function updateInvoiceRequestBodyInvoicesLinesToJSON(
|
|
662
|
+
updateInvoiceRequestBodyInvoicesLines: UpdateInvoiceRequestBodyInvoicesLines,
|
|
663
|
+
): string {
|
|
664
|
+
return JSON.stringify(
|
|
665
|
+
UpdateInvoiceRequestBodyInvoicesLines$outboundSchema.parse(
|
|
666
|
+
updateInvoiceRequestBodyInvoicesLines,
|
|
667
|
+
),
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export function updateInvoiceRequestBodyInvoicesLinesFromJSON(
|
|
672
|
+
jsonString: string,
|
|
673
|
+
): SafeParseResult<UpdateInvoiceRequestBodyInvoicesLines, SDKValidationError> {
|
|
674
|
+
return safeParse(
|
|
675
|
+
jsonString,
|
|
676
|
+
(x) =>
|
|
677
|
+
UpdateInvoiceRequestBodyInvoicesLines$inboundSchema.parse(JSON.parse(x)),
|
|
678
|
+
`Failed to parse 'UpdateInvoiceRequestBodyInvoicesLines' from JSON`,
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/** @internal */
|
|
683
|
+
export const UpdateInvoiceRequestBody2$inboundSchema: z.ZodType<
|
|
684
|
+
UpdateInvoiceRequestBody2,
|
|
685
|
+
z.ZodTypeDef,
|
|
686
|
+
unknown
|
|
687
|
+
> = z.object({
|
|
688
|
+
company_id: z.number().int(),
|
|
689
|
+
lines: z.array(
|
|
690
|
+
z.lazy(() => UpdateInvoiceRequestBodyInvoicesLines$inboundSchema),
|
|
691
|
+
).optional(),
|
|
692
|
+
vendor_credential_id: z.number().int().optional(),
|
|
693
|
+
}).transform((v) => {
|
|
694
|
+
return remap$(v, {
|
|
695
|
+
"company_id": "companyId",
|
|
696
|
+
"vendor_credential_id": "vendorCredentialId",
|
|
697
|
+
});
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
/** @internal */
|
|
701
|
+
export type UpdateInvoiceRequestBody2$Outbound = {
|
|
702
|
+
company_id: number;
|
|
703
|
+
lines?: Array<UpdateInvoiceRequestBodyInvoicesLines$Outbound> | undefined;
|
|
704
|
+
vendor_credential_id?: number | undefined;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
/** @internal */
|
|
708
|
+
export const UpdateInvoiceRequestBody2$outboundSchema: z.ZodType<
|
|
709
|
+
UpdateInvoiceRequestBody2$Outbound,
|
|
710
|
+
z.ZodTypeDef,
|
|
711
|
+
UpdateInvoiceRequestBody2
|
|
712
|
+
> = z.object({
|
|
713
|
+
companyId: z.number().int(),
|
|
714
|
+
lines: z.array(
|
|
715
|
+
z.lazy(() => UpdateInvoiceRequestBodyInvoicesLines$outboundSchema),
|
|
716
|
+
).optional(),
|
|
717
|
+
vendorCredentialId: z.number().int().optional(),
|
|
718
|
+
}).transform((v) => {
|
|
719
|
+
return remap$(v, {
|
|
720
|
+
companyId: "company_id",
|
|
721
|
+
vendorCredentialId: "vendor_credential_id",
|
|
722
|
+
});
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* @internal
|
|
727
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
728
|
+
*/
|
|
729
|
+
export namespace UpdateInvoiceRequestBody2$ {
|
|
730
|
+
/** @deprecated use `UpdateInvoiceRequestBody2$inboundSchema` instead. */
|
|
731
|
+
export const inboundSchema = UpdateInvoiceRequestBody2$inboundSchema;
|
|
732
|
+
/** @deprecated use `UpdateInvoiceRequestBody2$outboundSchema` instead. */
|
|
733
|
+
export const outboundSchema = UpdateInvoiceRequestBody2$outboundSchema;
|
|
734
|
+
/** @deprecated use `UpdateInvoiceRequestBody2$Outbound` instead. */
|
|
735
|
+
export type Outbound = UpdateInvoiceRequestBody2$Outbound;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
export function updateInvoiceRequestBody2ToJSON(
|
|
739
|
+
updateInvoiceRequestBody2: UpdateInvoiceRequestBody2,
|
|
740
|
+
): string {
|
|
741
|
+
return JSON.stringify(
|
|
742
|
+
UpdateInvoiceRequestBody2$outboundSchema.parse(updateInvoiceRequestBody2),
|
|
743
|
+
);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export function updateInvoiceRequestBody2FromJSON(
|
|
747
|
+
jsonString: string,
|
|
748
|
+
): SafeParseResult<UpdateInvoiceRequestBody2, SDKValidationError> {
|
|
749
|
+
return safeParse(
|
|
750
|
+
jsonString,
|
|
751
|
+
(x) => UpdateInvoiceRequestBody2$inboundSchema.parse(JSON.parse(x)),
|
|
752
|
+
`Failed to parse 'UpdateInvoiceRequestBody2' from JSON`,
|
|
753
|
+
);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/** @internal */
|
|
757
|
+
export const UpdateInvoiceRequestBodyPaymentHandler$inboundSchema:
|
|
758
|
+
z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyPaymentHandler> = z.nativeEnum(
|
|
759
|
+
UpdateInvoiceRequestBodyPaymentHandler,
|
|
760
|
+
);
|
|
761
|
+
|
|
762
|
+
/** @internal */
|
|
763
|
+
export const UpdateInvoiceRequestBodyPaymentHandler$outboundSchema:
|
|
764
|
+
z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyPaymentHandler> =
|
|
765
|
+
UpdateInvoiceRequestBodyPaymentHandler$inboundSchema;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* @internal
|
|
769
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
770
|
+
*/
|
|
771
|
+
export namespace UpdateInvoiceRequestBodyPaymentHandler$ {
|
|
772
|
+
/** @deprecated use `UpdateInvoiceRequestBodyPaymentHandler$inboundSchema` instead. */
|
|
773
|
+
export const inboundSchema =
|
|
774
|
+
UpdateInvoiceRequestBodyPaymentHandler$inboundSchema;
|
|
775
|
+
/** @deprecated use `UpdateInvoiceRequestBodyPaymentHandler$outboundSchema` instead. */
|
|
776
|
+
export const outboundSchema =
|
|
777
|
+
UpdateInvoiceRequestBodyPaymentHandler$outboundSchema;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/** @internal */
|
|
781
|
+
export const UpdateInvoiceRequestBodyLines$inboundSchema: z.ZodType<
|
|
782
|
+
UpdateInvoiceRequestBodyLines,
|
|
783
|
+
z.ZodTypeDef,
|
|
784
|
+
unknown
|
|
785
|
+
> = z.object({
|
|
786
|
+
variant_id: z.number().int(),
|
|
787
|
+
unit_price: z.number().optional(),
|
|
788
|
+
quantity: z.number().int().optional(),
|
|
789
|
+
subscription_id: z.number().int().optional(),
|
|
790
|
+
date_starts: z.string().transform(v => new RFCDate(v)).optional(),
|
|
791
|
+
date_ends: z.string().transform(v => new RFCDate(v)).optional(),
|
|
792
|
+
payment_handler: UpdateInvoiceRequestBodyPaymentHandler$inboundSchema
|
|
793
|
+
.optional(),
|
|
794
|
+
payment_handler_data: z.string().optional(),
|
|
795
|
+
}).transform((v) => {
|
|
796
|
+
return remap$(v, {
|
|
797
|
+
"variant_id": "variantId",
|
|
798
|
+
"unit_price": "unitPrice",
|
|
799
|
+
"subscription_id": "subscriptionId",
|
|
800
|
+
"date_starts": "dateStarts",
|
|
801
|
+
"date_ends": "dateEnds",
|
|
802
|
+
"payment_handler": "paymentHandler",
|
|
803
|
+
"payment_handler_data": "paymentHandlerData",
|
|
804
|
+
});
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
/** @internal */
|
|
808
|
+
export type UpdateInvoiceRequestBodyLines$Outbound = {
|
|
809
|
+
variant_id: number;
|
|
810
|
+
unit_price?: number | undefined;
|
|
811
|
+
quantity?: number | undefined;
|
|
812
|
+
subscription_id?: number | undefined;
|
|
813
|
+
date_starts?: string | undefined;
|
|
814
|
+
date_ends?: string | undefined;
|
|
815
|
+
payment_handler?: string | undefined;
|
|
816
|
+
payment_handler_data?: string | undefined;
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
/** @internal */
|
|
820
|
+
export const UpdateInvoiceRequestBodyLines$outboundSchema: z.ZodType<
|
|
821
|
+
UpdateInvoiceRequestBodyLines$Outbound,
|
|
822
|
+
z.ZodTypeDef,
|
|
823
|
+
UpdateInvoiceRequestBodyLines
|
|
824
|
+
> = z.object({
|
|
825
|
+
variantId: z.number().int(),
|
|
826
|
+
unitPrice: z.number().optional(),
|
|
827
|
+
quantity: z.number().int().optional(),
|
|
828
|
+
subscriptionId: z.number().int().optional(),
|
|
829
|
+
dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
830
|
+
dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
|
|
831
|
+
paymentHandler: UpdateInvoiceRequestBodyPaymentHandler$outboundSchema
|
|
832
|
+
.optional(),
|
|
833
|
+
paymentHandlerData: z.string().optional(),
|
|
834
|
+
}).transform((v) => {
|
|
835
|
+
return remap$(v, {
|
|
836
|
+
variantId: "variant_id",
|
|
837
|
+
unitPrice: "unit_price",
|
|
838
|
+
subscriptionId: "subscription_id",
|
|
839
|
+
dateStarts: "date_starts",
|
|
840
|
+
dateEnds: "date_ends",
|
|
841
|
+
paymentHandler: "payment_handler",
|
|
842
|
+
paymentHandlerData: "payment_handler_data",
|
|
843
|
+
});
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* @internal
|
|
848
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
849
|
+
*/
|
|
850
|
+
export namespace UpdateInvoiceRequestBodyLines$ {
|
|
851
|
+
/** @deprecated use `UpdateInvoiceRequestBodyLines$inboundSchema` instead. */
|
|
852
|
+
export const inboundSchema = UpdateInvoiceRequestBodyLines$inboundSchema;
|
|
853
|
+
/** @deprecated use `UpdateInvoiceRequestBodyLines$outboundSchema` instead. */
|
|
854
|
+
export const outboundSchema = UpdateInvoiceRequestBodyLines$outboundSchema;
|
|
855
|
+
/** @deprecated use `UpdateInvoiceRequestBodyLines$Outbound` instead. */
|
|
856
|
+
export type Outbound = UpdateInvoiceRequestBodyLines$Outbound;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export function updateInvoiceRequestBodyLinesToJSON(
|
|
860
|
+
updateInvoiceRequestBodyLines: UpdateInvoiceRequestBodyLines,
|
|
861
|
+
): string {
|
|
862
|
+
return JSON.stringify(
|
|
863
|
+
UpdateInvoiceRequestBodyLines$outboundSchema.parse(
|
|
864
|
+
updateInvoiceRequestBodyLines,
|
|
865
|
+
),
|
|
866
|
+
);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export function updateInvoiceRequestBodyLinesFromJSON(
|
|
870
|
+
jsonString: string,
|
|
871
|
+
): SafeParseResult<UpdateInvoiceRequestBodyLines, SDKValidationError> {
|
|
872
|
+
return safeParse(
|
|
873
|
+
jsonString,
|
|
874
|
+
(x) => UpdateInvoiceRequestBodyLines$inboundSchema.parse(JSON.parse(x)),
|
|
875
|
+
`Failed to parse 'UpdateInvoiceRequestBodyLines' from JSON`,
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/** @internal */
|
|
880
|
+
export const UpdateInvoiceRequestBody1$inboundSchema: z.ZodType<
|
|
881
|
+
UpdateInvoiceRequestBody1,
|
|
882
|
+
z.ZodTypeDef,
|
|
883
|
+
unknown
|
|
884
|
+
> = z.object({
|
|
885
|
+
vendor_id: z.number().int(),
|
|
886
|
+
lines: z.array(z.lazy(() => UpdateInvoiceRequestBodyLines$inboundSchema))
|
|
887
|
+
.optional(),
|
|
888
|
+
vendor_credential_id: z.number().int().optional(),
|
|
889
|
+
}).transform((v) => {
|
|
890
|
+
return remap$(v, {
|
|
891
|
+
"vendor_id": "vendorId",
|
|
892
|
+
"vendor_credential_id": "vendorCredentialId",
|
|
893
|
+
});
|
|
894
|
+
});
|
|
895
|
+
|
|
896
|
+
/** @internal */
|
|
897
|
+
export type UpdateInvoiceRequestBody1$Outbound = {
|
|
898
|
+
vendor_id: number;
|
|
899
|
+
lines?: Array<UpdateInvoiceRequestBodyLines$Outbound> | undefined;
|
|
900
|
+
vendor_credential_id?: number | undefined;
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
/** @internal */
|
|
904
|
+
export const UpdateInvoiceRequestBody1$outboundSchema: z.ZodType<
|
|
905
|
+
UpdateInvoiceRequestBody1$Outbound,
|
|
906
|
+
z.ZodTypeDef,
|
|
907
|
+
UpdateInvoiceRequestBody1
|
|
908
|
+
> = z.object({
|
|
909
|
+
vendorId: z.number().int(),
|
|
910
|
+
lines: z.array(z.lazy(() => UpdateInvoiceRequestBodyLines$outboundSchema))
|
|
911
|
+
.optional(),
|
|
912
|
+
vendorCredentialId: z.number().int().optional(),
|
|
913
|
+
}).transform((v) => {
|
|
914
|
+
return remap$(v, {
|
|
915
|
+
vendorId: "vendor_id",
|
|
916
|
+
vendorCredentialId: "vendor_credential_id",
|
|
917
|
+
});
|
|
918
|
+
});
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* @internal
|
|
922
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
923
|
+
*/
|
|
924
|
+
export namespace UpdateInvoiceRequestBody1$ {
|
|
925
|
+
/** @deprecated use `UpdateInvoiceRequestBody1$inboundSchema` instead. */
|
|
926
|
+
export const inboundSchema = UpdateInvoiceRequestBody1$inboundSchema;
|
|
927
|
+
/** @deprecated use `UpdateInvoiceRequestBody1$outboundSchema` instead. */
|
|
928
|
+
export const outboundSchema = UpdateInvoiceRequestBody1$outboundSchema;
|
|
929
|
+
/** @deprecated use `UpdateInvoiceRequestBody1$Outbound` instead. */
|
|
930
|
+
export type Outbound = UpdateInvoiceRequestBody1$Outbound;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
export function updateInvoiceRequestBody1ToJSON(
|
|
934
|
+
updateInvoiceRequestBody1: UpdateInvoiceRequestBody1,
|
|
935
|
+
): string {
|
|
936
|
+
return JSON.stringify(
|
|
937
|
+
UpdateInvoiceRequestBody1$outboundSchema.parse(updateInvoiceRequestBody1),
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export function updateInvoiceRequestBody1FromJSON(
|
|
942
|
+
jsonString: string,
|
|
943
|
+
): SafeParseResult<UpdateInvoiceRequestBody1, SDKValidationError> {
|
|
944
|
+
return safeParse(
|
|
945
|
+
jsonString,
|
|
946
|
+
(x) => UpdateInvoiceRequestBody1$inboundSchema.parse(JSON.parse(x)),
|
|
947
|
+
`Failed to parse 'UpdateInvoiceRequestBody1' from JSON`,
|
|
948
|
+
);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/** @internal */
|
|
952
|
+
export const UpdateInvoiceRequestBody$inboundSchema: z.ZodType<
|
|
953
|
+
UpdateInvoiceRequestBody,
|
|
954
|
+
z.ZodTypeDef,
|
|
955
|
+
unknown
|
|
956
|
+
> = z.union([
|
|
957
|
+
z.lazy(() => UpdateInvoiceRequestBody1$inboundSchema),
|
|
958
|
+
z.lazy(() => UpdateInvoiceRequestBody2$inboundSchema),
|
|
959
|
+
z.lazy(() => RequestBody3$inboundSchema),
|
|
960
|
+
z.lazy(() => RequestBody4$inboundSchema),
|
|
961
|
+
]);
|
|
962
|
+
|
|
963
|
+
/** @internal */
|
|
964
|
+
export type UpdateInvoiceRequestBody$Outbound =
|
|
965
|
+
| UpdateInvoiceRequestBody1$Outbound
|
|
966
|
+
| UpdateInvoiceRequestBody2$Outbound
|
|
967
|
+
| RequestBody3$Outbound
|
|
968
|
+
| RequestBody4$Outbound;
|
|
969
|
+
|
|
970
|
+
/** @internal */
|
|
971
|
+
export const UpdateInvoiceRequestBody$outboundSchema: z.ZodType<
|
|
972
|
+
UpdateInvoiceRequestBody$Outbound,
|
|
973
|
+
z.ZodTypeDef,
|
|
974
|
+
UpdateInvoiceRequestBody
|
|
975
|
+
> = z.union([
|
|
976
|
+
z.lazy(() => UpdateInvoiceRequestBody1$outboundSchema),
|
|
977
|
+
z.lazy(() => UpdateInvoiceRequestBody2$outboundSchema),
|
|
978
|
+
z.lazy(() => RequestBody3$outboundSchema),
|
|
979
|
+
z.lazy(() => RequestBody4$outboundSchema),
|
|
980
|
+
]);
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* @internal
|
|
984
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
985
|
+
*/
|
|
986
|
+
export namespace UpdateInvoiceRequestBody$ {
|
|
987
|
+
/** @deprecated use `UpdateInvoiceRequestBody$inboundSchema` instead. */
|
|
988
|
+
export const inboundSchema = UpdateInvoiceRequestBody$inboundSchema;
|
|
989
|
+
/** @deprecated use `UpdateInvoiceRequestBody$outboundSchema` instead. */
|
|
990
|
+
export const outboundSchema = UpdateInvoiceRequestBody$outboundSchema;
|
|
991
|
+
/** @deprecated use `UpdateInvoiceRequestBody$Outbound` instead. */
|
|
992
|
+
export type Outbound = UpdateInvoiceRequestBody$Outbound;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export function updateInvoiceRequestBodyToJSON(
|
|
996
|
+
updateInvoiceRequestBody: UpdateInvoiceRequestBody,
|
|
997
|
+
): string {
|
|
998
|
+
return JSON.stringify(
|
|
999
|
+
UpdateInvoiceRequestBody$outboundSchema.parse(updateInvoiceRequestBody),
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export function updateInvoiceRequestBodyFromJSON(
|
|
1004
|
+
jsonString: string,
|
|
1005
|
+
): SafeParseResult<UpdateInvoiceRequestBody, SDKValidationError> {
|
|
1006
|
+
return safeParse(
|
|
1007
|
+
jsonString,
|
|
1008
|
+
(x) => UpdateInvoiceRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
1009
|
+
`Failed to parse 'UpdateInvoiceRequestBody' from JSON`,
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/** @internal */
|
|
1014
|
+
export const UpdateInvoiceRequest$inboundSchema: z.ZodType<
|
|
1015
|
+
UpdateInvoiceRequest,
|
|
1016
|
+
z.ZodTypeDef,
|
|
1017
|
+
unknown
|
|
1018
|
+
> = z.object({
|
|
1019
|
+
id: z.number().int(),
|
|
1020
|
+
RequestBody: z.union([
|
|
1021
|
+
z.lazy(() => UpdateInvoiceRequestBody1$inboundSchema),
|
|
1022
|
+
z.lazy(() => UpdateInvoiceRequestBody2$inboundSchema),
|
|
1023
|
+
z.lazy(() => RequestBody3$inboundSchema),
|
|
1024
|
+
z.lazy(() => RequestBody4$inboundSchema),
|
|
1025
|
+
]),
|
|
1026
|
+
}).transform((v) => {
|
|
1027
|
+
return remap$(v, {
|
|
1028
|
+
"RequestBody": "requestBody",
|
|
1029
|
+
});
|
|
1030
|
+
});
|
|
1031
|
+
|
|
1032
|
+
/** @internal */
|
|
1033
|
+
export type UpdateInvoiceRequest$Outbound = {
|
|
1034
|
+
id: number;
|
|
1035
|
+
RequestBody:
|
|
1036
|
+
| UpdateInvoiceRequestBody1$Outbound
|
|
1037
|
+
| UpdateInvoiceRequestBody2$Outbound
|
|
1038
|
+
| RequestBody3$Outbound
|
|
1039
|
+
| RequestBody4$Outbound;
|
|
1040
|
+
};
|
|
1041
|
+
|
|
1042
|
+
/** @internal */
|
|
1043
|
+
export const UpdateInvoiceRequest$outboundSchema: z.ZodType<
|
|
1044
|
+
UpdateInvoiceRequest$Outbound,
|
|
1045
|
+
z.ZodTypeDef,
|
|
1046
|
+
UpdateInvoiceRequest
|
|
1047
|
+
> = z.object({
|
|
1048
|
+
id: z.number().int(),
|
|
1049
|
+
requestBody: z.union([
|
|
1050
|
+
z.lazy(() => UpdateInvoiceRequestBody1$outboundSchema),
|
|
1051
|
+
z.lazy(() => UpdateInvoiceRequestBody2$outboundSchema),
|
|
1052
|
+
z.lazy(() => RequestBody3$outboundSchema),
|
|
1053
|
+
z.lazy(() => RequestBody4$outboundSchema),
|
|
1054
|
+
]),
|
|
1055
|
+
}).transform((v) => {
|
|
1056
|
+
return remap$(v, {
|
|
1057
|
+
requestBody: "RequestBody",
|
|
1058
|
+
});
|
|
1059
|
+
});
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* @internal
|
|
1063
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1064
|
+
*/
|
|
1065
|
+
export namespace UpdateInvoiceRequest$ {
|
|
1066
|
+
/** @deprecated use `UpdateInvoiceRequest$inboundSchema` instead. */
|
|
1067
|
+
export const inboundSchema = UpdateInvoiceRequest$inboundSchema;
|
|
1068
|
+
/** @deprecated use `UpdateInvoiceRequest$outboundSchema` instead. */
|
|
1069
|
+
export const outboundSchema = UpdateInvoiceRequest$outboundSchema;
|
|
1070
|
+
/** @deprecated use `UpdateInvoiceRequest$Outbound` instead. */
|
|
1071
|
+
export type Outbound = UpdateInvoiceRequest$Outbound;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
export function updateInvoiceRequestToJSON(
|
|
1075
|
+
updateInvoiceRequest: UpdateInvoiceRequest,
|
|
1076
|
+
): string {
|
|
1077
|
+
return JSON.stringify(
|
|
1078
|
+
UpdateInvoiceRequest$outboundSchema.parse(updateInvoiceRequest),
|
|
1079
|
+
);
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
export function updateInvoiceRequestFromJSON(
|
|
1083
|
+
jsonString: string,
|
|
1084
|
+
): SafeParseResult<UpdateInvoiceRequest, SDKValidationError> {
|
|
1085
|
+
return safeParse(
|
|
1086
|
+
jsonString,
|
|
1087
|
+
(x) => UpdateInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
1088
|
+
`Failed to parse 'UpdateInvoiceRequest' from JSON`,
|
|
1089
|
+
);
|
|
1090
|
+
}
|