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