@moovio/sdk 0.21.14 → 0.21.15
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 +96 -47
- package/bin/mcp-server.js +2071 -543
- package/bin/mcp-server.js.map +48 -11
- package/examples/package-lock.json +1 -1
- package/funcs/invoicesCreateInvoice.d.ts +18 -0
- package/funcs/invoicesCreateInvoice.d.ts.map +1 -0
- package/funcs/invoicesCreateInvoice.js +139 -0
- package/funcs/invoicesCreateInvoice.js.map +1 -0
- package/funcs/invoicesGetInvoice.d.ts +17 -0
- package/funcs/invoicesGetInvoice.d.ts.map +1 -0
- package/funcs/invoicesGetInvoice.js +129 -0
- package/funcs/invoicesGetInvoice.js.map +1 -0
- package/funcs/invoicesListInvoices.d.ts +18 -0
- package/funcs/invoicesListInvoices.d.ts.map +1 -0
- package/funcs/invoicesListInvoices.js +135 -0
- package/funcs/invoicesListInvoices.js.map +1 -0
- package/funcs/invoicesMarkPaidInvoice.d.ts +19 -0
- package/funcs/invoicesMarkPaidInvoice.d.ts.map +1 -0
- package/funcs/invoicesMarkPaidInvoice.js +144 -0
- package/funcs/invoicesMarkPaidInvoice.js.map +1 -0
- package/funcs/invoicesUpdateInvoice.d.ts +18 -0
- package/funcs/invoicesUpdateInvoice.d.ts.map +1 -0
- package/funcs/invoicesUpdateInvoice.js +143 -0
- package/funcs/invoicesUpdateInvoice.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +11 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/invoicesCreateInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesCreateInvoice.js +65 -0
- package/mcp-server/tools/invoicesCreateInvoice.js.map +1 -0
- package/mcp-server/tools/invoicesGetInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesGetInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesGetInvoice.js +65 -0
- package/mcp-server/tools/invoicesGetInvoice.js.map +1 -0
- package/mcp-server/tools/invoicesListInvoices.d.ts +8 -0
- package/mcp-server/tools/invoicesListInvoices.d.ts.map +1 -0
- package/mcp-server/tools/invoicesListInvoices.js +65 -0
- package/mcp-server/tools/invoicesListInvoices.js.map +1 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.js +66 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.js.map +1 -0
- package/mcp-server/tools/invoicesUpdateInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesUpdateInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesUpdateInvoice.js +65 -0
- package/mcp-server/tools/invoicesUpdateInvoice.js.map +1 -0
- package/models/components/amountdecimalupdate.d.ts +29 -0
- package/models/components/amountdecimalupdate.d.ts.map +1 -0
- package/models/components/amountdecimalupdate.js +60 -0
- package/models/components/amountdecimalupdate.js.map +1 -0
- package/models/components/createinvoice.d.ts +32 -0
- package/models/components/createinvoice.d.ts.map +1 -0
- package/models/components/createinvoice.js +72 -0
- package/models/components/createinvoice.js.map +1 -0
- package/models/components/index.d.ts +18 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +18 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +81 -0
- package/models/components/invoice.d.ts.map +1 -0
- package/models/components/invoice.js +107 -0
- package/models/components/invoice.js.map +1 -0
- package/models/components/invoiceexternalpayment.d.ts +35 -0
- package/models/components/invoiceexternalpayment.d.ts.map +1 -0
- package/models/components/invoiceexternalpayment.js +75 -0
- package/models/components/invoiceexternalpayment.js.map +1 -0
- package/models/components/invoicelineitem.d.ts +45 -0
- package/models/components/invoicelineitem.d.ts.map +1 -0
- package/models/components/invoicelineitem.js +68 -0
- package/models/components/invoicelineitem.js.map +1 -0
- package/models/components/invoicelineitemoption.d.ts +39 -0
- package/models/components/invoicelineitemoption.d.ts.map +1 -0
- package/models/components/invoicelineitemoption.js +65 -0
- package/models/components/invoicelineitemoption.js.map +1 -0
- package/models/components/invoicelineitemoptionvalidationerror.d.ts +24 -0
- package/models/components/invoicelineitemoptionvalidationerror.d.ts.map +1 -0
- package/models/components/invoicelineitemoptionvalidationerror.js +65 -0
- package/models/components/invoicelineitemoptionvalidationerror.js.map +1 -0
- package/models/components/invoicelineitems.d.ts +24 -0
- package/models/components/invoicelineitems.d.ts.map +1 -0
- package/models/components/invoicelineitems.js +59 -0
- package/models/components/invoicelineitems.js.map +1 -0
- package/models/components/invoicelineitemsupdate.d.ts +24 -0
- package/models/components/invoicelineitemsupdate.d.ts.map +1 -0
- package/models/components/invoicelineitemsupdate.js +59 -0
- package/models/components/invoicelineitemsupdate.js.map +1 -0
- package/models/components/invoicelineitemsvalidationerror.d.ts +22 -0
- package/models/components/invoicelineitemsvalidationerror.d.ts.map +1 -0
- package/models/components/invoicelineitemsvalidationerror.js +59 -0
- package/models/components/invoicelineitemsvalidationerror.js.map +1 -0
- package/models/components/invoicelineitemvalidationerror.d.ts +31 -0
- package/models/components/invoicelineitemvalidationerror.d.ts.map +1 -0
- package/models/components/invoicelineitemvalidationerror.js +70 -0
- package/models/components/invoicelineitemvalidationerror.js.map +1 -0
- package/models/components/invoicepayment.d.ts +23 -0
- package/models/components/invoicepayment.d.ts.map +1 -0
- package/models/components/invoicepayment.js +70 -0
- package/models/components/invoicepayment.js.map +1 -0
- package/models/components/invoicestatus.d.ts +16 -0
- package/models/components/invoicestatus.d.ts.map +1 -0
- package/models/components/invoicestatus.js +53 -0
- package/models/components/invoicestatus.js.map +1 -0
- package/models/components/invoicetransferpayment.d.ts +28 -0
- package/models/components/invoicetransferpayment.d.ts.map +1 -0
- package/models/components/invoicetransferpayment.js +68 -0
- package/models/components/invoicetransferpayment.js.map +1 -0
- package/models/components/markinvoicepaid.d.ts +21 -0
- package/models/components/markinvoicepaid.d.ts.map +1 -0
- package/models/components/markinvoicepaid.js +63 -0
- package/models/components/markinvoicepaid.js.map +1 -0
- package/models/components/updateinvoice.d.ts +36 -0
- package/models/components/updateinvoice.d.ts.map +1 -0
- package/models/components/updateinvoice.js +71 -0
- package/models/components/updateinvoice.js.map +1 -0
- package/models/components/webhookdata.d.ts +4 -2
- package/models/components/webhookdata.d.ts.map +1 -1
- package/models/components/webhookdata.js +6 -0
- package/models/components/webhookdata.js.map +1 -1
- package/models/components/webhookdatainvoicecreated.d.ts +19 -0
- package/models/components/webhookdatainvoicecreated.d.ts.map +1 -0
- package/models/components/webhookdatainvoicecreated.js +60 -0
- package/models/components/webhookdatainvoicecreated.js.map +1 -0
- package/models/components/webhookdatainvoiceupdated.d.ts +22 -0
- package/models/components/webhookdatainvoiceupdated.d.ts.map +1 -0
- package/models/components/webhookdatainvoiceupdated.js +63 -0
- package/models/components/webhookdatainvoiceupdated.js.map +1 -0
- package/models/components/webhookeventtype.d.ts +2 -0
- package/models/components/webhookeventtype.d.ts.map +1 -1
- package/models/components/webhookeventtype.js +2 -0
- package/models/components/webhookeventtype.js.map +1 -1
- package/models/errors/createinvoiceerror.d.ts +40 -0
- package/models/errors/createinvoiceerror.d.ts.map +1 -0
- package/models/errors/createinvoiceerror.js +100 -0
- package/models/errors/createinvoiceerror.js.map +1 -0
- package/models/errors/index.d.ts +4 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +4 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/listinvoicesvalidationerror.d.ts +33 -0
- package/models/errors/listinvoicesvalidationerror.d.ts.map +1 -0
- package/models/errors/listinvoicesvalidationerror.js +88 -0
- package/models/errors/listinvoicesvalidationerror.js.map +1 -0
- package/models/errors/markinvoicepaiderror.d.ts +30 -0
- package/models/errors/markinvoicepaiderror.d.ts.map +1 -0
- package/models/errors/markinvoicepaiderror.js +83 -0
- package/models/errors/markinvoicepaiderror.js.map +1 -0
- package/models/errors/updateinvoiceerror.d.ts +40 -0
- package/models/errors/updateinvoiceerror.d.ts.map +1 -0
- package/models/errors/updateinvoiceerror.js +99 -0
- package/models/errors/updateinvoiceerror.js.map +1 -0
- package/models/operations/createinvoice.d.ts +66 -0
- package/models/operations/createinvoice.d.ts.map +1 -0
- package/models/operations/createinvoice.js +122 -0
- package/models/operations/createinvoice.js.map +1 -0
- package/models/operations/getinvoice.d.ts +66 -0
- package/models/operations/getinvoice.d.ts.map +1 -0
- package/models/operations/getinvoice.js +114 -0
- package/models/operations/getinvoice.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listinvoices.d.ts +72 -0
- package/models/operations/listinvoices.d.ts.map +1 -0
- package/models/operations/listinvoices.js +120 -0
- package/models/operations/listinvoices.js.map +1 -0
- package/models/operations/markpaidinvoice.d.ts +68 -0
- package/models/operations/markpaidinvoice.d.ts.map +1 -0
- package/models/operations/markpaidinvoice.js +124 -0
- package/models/operations/markpaidinvoice.js.map +1 -0
- package/models/operations/updateinvoice.d.ts +68 -0
- package/models/operations/updateinvoice.d.ts.map +1 -0
- package/models/operations/updateinvoice.js +124 -0
- package/models/operations/updateinvoice.js.map +1 -0
- package/package.json +1 -1
- package/sdk/invoices.d.ts +41 -0
- package/sdk/invoices.d.ts.map +1 -0
- package/sdk/invoices.js +63 -0
- package/sdk/invoices.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/invoicesCreateInvoice.ts +201 -0
- package/src/funcs/invoicesGetInvoice.ts +185 -0
- package/src/funcs/invoicesListInvoices.ts +194 -0
- package/src/funcs/invoicesMarkPaidInvoice.ts +208 -0
- package/src/funcs/invoicesUpdateInvoice.ts +207 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/invoicesCreateInvoice.ts +38 -0
- package/src/mcp-server/tools/invoicesGetInvoice.ts +38 -0
- package/src/mcp-server/tools/invoicesListInvoices.ts +38 -0
- package/src/mcp-server/tools/invoicesMarkPaidInvoice.ts +39 -0
- package/src/mcp-server/tools/invoicesUpdateInvoice.ts +38 -0
- package/src/models/components/amountdecimalupdate.ts +65 -0
- package/src/models/components/createinvoice.ts +84 -0
- package/src/models/components/index.ts +18 -0
- package/src/models/components/invoice.ts +178 -0
- package/src/models/components/invoiceexternalpayment.ts +91 -0
- package/src/models/components/invoicelineitem.ts +95 -0
- package/src/models/components/invoicelineitemoption.ts +84 -0
- package/src/models/components/invoicelineitemoptionvalidationerror.ts +72 -0
- package/src/models/components/invoicelineitems.ts +63 -0
- package/src/models/components/invoicelineitemsupdate.ts +63 -0
- package/src/models/components/invoicelineitemsvalidationerror.ts +59 -0
- package/src/models/components/invoicelineitemvalidationerror.ts +85 -0
- package/src/models/components/invoicepayment.ts +77 -0
- package/src/models/components/invoicestatus.ts +25 -0
- package/src/models/components/invoicetransferpayment.ts +68 -0
- package/src/models/components/markinvoicepaid.ts +58 -0
- package/src/models/components/updateinvoice.ts +94 -0
- package/src/models/components/webhookdata.ts +20 -0
- package/src/models/components/webhookdatainvoicecreated.ts +55 -0
- package/src/models/components/webhookdatainvoiceupdated.ts +64 -0
- package/src/models/components/webhookeventtype.ts +2 -0
- package/src/models/errors/createinvoiceerror.ts +102 -0
- package/src/models/errors/index.ts +4 -0
- package/src/models/errors/listinvoicesvalidationerror.ts +86 -0
- package/src/models/errors/markinvoicepaiderror.ts +78 -0
- package/src/models/errors/updateinvoiceerror.ts +100 -0
- package/src/models/operations/createinvoice.ts +187 -0
- package/src/models/operations/getinvoice.ts +179 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listinvoices.ts +191 -0
- package/src/models/operations/markpaidinvoice.ts +191 -0
- package/src/models/operations/updateinvoice.ts +191 -0
- package/src/sdk/invoices.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as components from "../components/index.js";
|
|
7
|
+
import { MoovError } from "./mooverror.js";
|
|
8
|
+
|
|
9
|
+
export type UpdateInvoiceErrorData = {
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
lineItems?: components.InvoiceLineItemsValidationError | undefined;
|
|
12
|
+
invoiceDate?: string | undefined;
|
|
13
|
+
dueDate?: string | undefined;
|
|
14
|
+
status?: string | undefined;
|
|
15
|
+
taxAmount?: components.AmountDecimalValidationError | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export class UpdateInvoiceError extends MoovError {
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
lineItems?: components.InvoiceLineItemsValidationError | undefined;
|
|
21
|
+
invoiceDate?: string | undefined;
|
|
22
|
+
dueDate?: string | undefined;
|
|
23
|
+
status?: string | undefined;
|
|
24
|
+
taxAmount?: components.AmountDecimalValidationError | undefined;
|
|
25
|
+
|
|
26
|
+
/** The original data that was passed to this error instance. */
|
|
27
|
+
data$: UpdateInvoiceErrorData;
|
|
28
|
+
|
|
29
|
+
constructor(
|
|
30
|
+
err: UpdateInvoiceErrorData,
|
|
31
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
32
|
+
) {
|
|
33
|
+
const message = "message" in err && typeof err.message === "string"
|
|
34
|
+
? err.message
|
|
35
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
36
|
+
super(message, httpMeta);
|
|
37
|
+
this.data$ = err;
|
|
38
|
+
if (err.description != null) this.description = err.description;
|
|
39
|
+
if (err.lineItems != null) this.lineItems = err.lineItems;
|
|
40
|
+
if (err.invoiceDate != null) this.invoiceDate = err.invoiceDate;
|
|
41
|
+
if (err.dueDate != null) this.dueDate = err.dueDate;
|
|
42
|
+
if (err.status != null) this.status = err.status;
|
|
43
|
+
if (err.taxAmount != null) this.taxAmount = err.taxAmount;
|
|
44
|
+
|
|
45
|
+
this.name = "UpdateInvoiceError";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const UpdateInvoiceError$inboundSchema: z.ZodType<
|
|
51
|
+
UpdateInvoiceError,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
description: z.string().optional(),
|
|
56
|
+
lineItems: components.InvoiceLineItemsValidationError$inboundSchema
|
|
57
|
+
.optional(),
|
|
58
|
+
invoiceDate: z.string().optional(),
|
|
59
|
+
dueDate: z.string().optional(),
|
|
60
|
+
status: z.string().optional(),
|
|
61
|
+
taxAmount: components.AmountDecimalValidationError$inboundSchema.optional(),
|
|
62
|
+
request$: z.instanceof(Request),
|
|
63
|
+
response$: z.instanceof(Response),
|
|
64
|
+
body$: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.transform((v) => {
|
|
67
|
+
return new UpdateInvoiceError(v, {
|
|
68
|
+
request: v.request$,
|
|
69
|
+
response: v.response$,
|
|
70
|
+
body: v.body$,
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export type UpdateInvoiceError$Outbound = {
|
|
76
|
+
description?: string | undefined;
|
|
77
|
+
lineItems?: components.InvoiceLineItemsValidationError$Outbound | undefined;
|
|
78
|
+
invoiceDate?: string | undefined;
|
|
79
|
+
dueDate?: string | undefined;
|
|
80
|
+
status?: string | undefined;
|
|
81
|
+
taxAmount?: components.AmountDecimalValidationError$Outbound | undefined;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const UpdateInvoiceError$outboundSchema: z.ZodType<
|
|
86
|
+
UpdateInvoiceError$Outbound,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
UpdateInvoiceError
|
|
89
|
+
> = z.instanceof(UpdateInvoiceError)
|
|
90
|
+
.transform(v => v.data$)
|
|
91
|
+
.pipe(z.object({
|
|
92
|
+
description: z.string().optional(),
|
|
93
|
+
lineItems: components.InvoiceLineItemsValidationError$outboundSchema
|
|
94
|
+
.optional(),
|
|
95
|
+
invoiceDate: z.string().optional(),
|
|
96
|
+
dueDate: z.string().optional(),
|
|
97
|
+
status: z.string().optional(),
|
|
98
|
+
taxAmount: components.AmountDecimalValidationError$outboundSchema
|
|
99
|
+
.optional(),
|
|
100
|
+
}));
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CreateInvoiceGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type CreateInvoiceRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
createInvoice: components.CreateInvoice;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type CreateInvoiceResponse = {
|
|
36
|
+
headers: { [k: string]: Array<string> };
|
|
37
|
+
result: components.Invoice;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const CreateInvoiceGlobals$inboundSchema: z.ZodType<
|
|
42
|
+
CreateInvoiceGlobals,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
"X-Moov-Version": z.string().optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
"X-Moov-Version": "xMoovVersion",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type CreateInvoiceGlobals$Outbound = {
|
|
54
|
+
"X-Moov-Version"?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const CreateInvoiceGlobals$outboundSchema: z.ZodType<
|
|
59
|
+
CreateInvoiceGlobals$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
CreateInvoiceGlobals
|
|
62
|
+
> = z.object({
|
|
63
|
+
xMoovVersion: z.string().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
xMoovVersion: "X-Moov-Version",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function createInvoiceGlobalsToJSON(
|
|
71
|
+
createInvoiceGlobals: CreateInvoiceGlobals,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
CreateInvoiceGlobals$outboundSchema.parse(createInvoiceGlobals),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export function createInvoiceGlobalsFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<CreateInvoiceGlobals, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => CreateInvoiceGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'CreateInvoiceGlobals' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const CreateInvoiceRequest$inboundSchema: z.ZodType<
|
|
89
|
+
CreateInvoiceRequest,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
unknown
|
|
92
|
+
> = z.object({
|
|
93
|
+
accountID: z.string(),
|
|
94
|
+
CreateInvoice: components.CreateInvoice$inboundSchema,
|
|
95
|
+
}).transform((v) => {
|
|
96
|
+
return remap$(v, {
|
|
97
|
+
"CreateInvoice": "createInvoice",
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type CreateInvoiceRequest$Outbound = {
|
|
102
|
+
accountID: string;
|
|
103
|
+
CreateInvoice: components.CreateInvoice$Outbound;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const CreateInvoiceRequest$outboundSchema: z.ZodType<
|
|
108
|
+
CreateInvoiceRequest$Outbound,
|
|
109
|
+
z.ZodTypeDef,
|
|
110
|
+
CreateInvoiceRequest
|
|
111
|
+
> = z.object({
|
|
112
|
+
accountID: z.string(),
|
|
113
|
+
createInvoice: components.CreateInvoice$outboundSchema,
|
|
114
|
+
}).transform((v) => {
|
|
115
|
+
return remap$(v, {
|
|
116
|
+
createInvoice: "CreateInvoice",
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export function createInvoiceRequestToJSON(
|
|
121
|
+
createInvoiceRequest: CreateInvoiceRequest,
|
|
122
|
+
): string {
|
|
123
|
+
return JSON.stringify(
|
|
124
|
+
CreateInvoiceRequest$outboundSchema.parse(createInvoiceRequest),
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
export function createInvoiceRequestFromJSON(
|
|
128
|
+
jsonString: string,
|
|
129
|
+
): SafeParseResult<CreateInvoiceRequest, SDKValidationError> {
|
|
130
|
+
return safeParse(
|
|
131
|
+
jsonString,
|
|
132
|
+
(x) => CreateInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
133
|
+
`Failed to parse 'CreateInvoiceRequest' from JSON`,
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const CreateInvoiceResponse$inboundSchema: z.ZodType<
|
|
139
|
+
CreateInvoiceResponse,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
unknown
|
|
142
|
+
> = z.object({
|
|
143
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
144
|
+
Result: components.Invoice$inboundSchema,
|
|
145
|
+
}).transform((v) => {
|
|
146
|
+
return remap$(v, {
|
|
147
|
+
"Headers": "headers",
|
|
148
|
+
"Result": "result",
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
/** @internal */
|
|
152
|
+
export type CreateInvoiceResponse$Outbound = {
|
|
153
|
+
Headers: { [k: string]: Array<string> };
|
|
154
|
+
Result: components.Invoice$Outbound;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const CreateInvoiceResponse$outboundSchema: z.ZodType<
|
|
159
|
+
CreateInvoiceResponse$Outbound,
|
|
160
|
+
z.ZodTypeDef,
|
|
161
|
+
CreateInvoiceResponse
|
|
162
|
+
> = z.object({
|
|
163
|
+
headers: z.record(z.array(z.string())),
|
|
164
|
+
result: components.Invoice$outboundSchema,
|
|
165
|
+
}).transform((v) => {
|
|
166
|
+
return remap$(v, {
|
|
167
|
+
headers: "Headers",
|
|
168
|
+
result: "Result",
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export function createInvoiceResponseToJSON(
|
|
173
|
+
createInvoiceResponse: CreateInvoiceResponse,
|
|
174
|
+
): string {
|
|
175
|
+
return JSON.stringify(
|
|
176
|
+
CreateInvoiceResponse$outboundSchema.parse(createInvoiceResponse),
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
export function createInvoiceResponseFromJSON(
|
|
180
|
+
jsonString: string,
|
|
181
|
+
): SafeParseResult<CreateInvoiceResponse, SDKValidationError> {
|
|
182
|
+
return safeParse(
|
|
183
|
+
jsonString,
|
|
184
|
+
(x) => CreateInvoiceResponse$inboundSchema.parse(JSON.parse(x)),
|
|
185
|
+
`Failed to parse 'CreateInvoiceResponse' from JSON`,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type GetInvoiceGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type GetInvoiceRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
invoiceID: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type GetInvoiceResponse = {
|
|
36
|
+
headers: { [k: string]: Array<string> };
|
|
37
|
+
result: components.Invoice;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const GetInvoiceGlobals$inboundSchema: z.ZodType<
|
|
42
|
+
GetInvoiceGlobals,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
"X-Moov-Version": z.string().optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
"X-Moov-Version": "xMoovVersion",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type GetInvoiceGlobals$Outbound = {
|
|
54
|
+
"X-Moov-Version"?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const GetInvoiceGlobals$outboundSchema: z.ZodType<
|
|
59
|
+
GetInvoiceGlobals$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
GetInvoiceGlobals
|
|
62
|
+
> = z.object({
|
|
63
|
+
xMoovVersion: z.string().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
xMoovVersion: "X-Moov-Version",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function getInvoiceGlobalsToJSON(
|
|
71
|
+
getInvoiceGlobals: GetInvoiceGlobals,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
GetInvoiceGlobals$outboundSchema.parse(getInvoiceGlobals),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export function getInvoiceGlobalsFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<GetInvoiceGlobals, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => GetInvoiceGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'GetInvoiceGlobals' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const GetInvoiceRequest$inboundSchema: z.ZodType<
|
|
89
|
+
GetInvoiceRequest,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
unknown
|
|
92
|
+
> = z.object({
|
|
93
|
+
accountID: z.string(),
|
|
94
|
+
invoiceID: z.string(),
|
|
95
|
+
});
|
|
96
|
+
/** @internal */
|
|
97
|
+
export type GetInvoiceRequest$Outbound = {
|
|
98
|
+
accountID: string;
|
|
99
|
+
invoiceID: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const GetInvoiceRequest$outboundSchema: z.ZodType<
|
|
104
|
+
GetInvoiceRequest$Outbound,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
GetInvoiceRequest
|
|
107
|
+
> = z.object({
|
|
108
|
+
accountID: z.string(),
|
|
109
|
+
invoiceID: z.string(),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export function getInvoiceRequestToJSON(
|
|
113
|
+
getInvoiceRequest: GetInvoiceRequest,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
GetInvoiceRequest$outboundSchema.parse(getInvoiceRequest),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
export function getInvoiceRequestFromJSON(
|
|
120
|
+
jsonString: string,
|
|
121
|
+
): SafeParseResult<GetInvoiceRequest, SDKValidationError> {
|
|
122
|
+
return safeParse(
|
|
123
|
+
jsonString,
|
|
124
|
+
(x) => GetInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
+
`Failed to parse 'GetInvoiceRequest' from JSON`,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const GetInvoiceResponse$inboundSchema: z.ZodType<
|
|
131
|
+
GetInvoiceResponse,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
unknown
|
|
134
|
+
> = z.object({
|
|
135
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
136
|
+
Result: components.Invoice$inboundSchema,
|
|
137
|
+
}).transform((v) => {
|
|
138
|
+
return remap$(v, {
|
|
139
|
+
"Headers": "headers",
|
|
140
|
+
"Result": "result",
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
/** @internal */
|
|
144
|
+
export type GetInvoiceResponse$Outbound = {
|
|
145
|
+
Headers: { [k: string]: Array<string> };
|
|
146
|
+
Result: components.Invoice$Outbound;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/** @internal */
|
|
150
|
+
export const GetInvoiceResponse$outboundSchema: z.ZodType<
|
|
151
|
+
GetInvoiceResponse$Outbound,
|
|
152
|
+
z.ZodTypeDef,
|
|
153
|
+
GetInvoiceResponse
|
|
154
|
+
> = z.object({
|
|
155
|
+
headers: z.record(z.array(z.string())),
|
|
156
|
+
result: components.Invoice$outboundSchema,
|
|
157
|
+
}).transform((v) => {
|
|
158
|
+
return remap$(v, {
|
|
159
|
+
headers: "Headers",
|
|
160
|
+
result: "Result",
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
export function getInvoiceResponseToJSON(
|
|
165
|
+
getInvoiceResponse: GetInvoiceResponse,
|
|
166
|
+
): string {
|
|
167
|
+
return JSON.stringify(
|
|
168
|
+
GetInvoiceResponse$outboundSchema.parse(getInvoiceResponse),
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
export function getInvoiceResponseFromJSON(
|
|
172
|
+
jsonString: string,
|
|
173
|
+
): SafeParseResult<GetInvoiceResponse, SDKValidationError> {
|
|
174
|
+
return safeParse(
|
|
175
|
+
jsonString,
|
|
176
|
+
(x) => GetInvoiceResponse$inboundSchema.parse(JSON.parse(x)),
|
|
177
|
+
`Failed to parse 'GetInvoiceResponse' from JSON`,
|
|
178
|
+
);
|
|
179
|
+
}
|
|
@@ -13,6 +13,7 @@ export * from "./createapplepaysession.js";
|
|
|
13
13
|
export * from "./createbrand.js";
|
|
14
14
|
export * from "./createcancellation.js";
|
|
15
15
|
export * from "./createfeeplanagreements.js";
|
|
16
|
+
export * from "./createinvoice.js";
|
|
16
17
|
export * from "./createonboardinginvite.js";
|
|
17
18
|
export * from "./createpaymentlink.js";
|
|
18
19
|
export * from "./createproduct.js";
|
|
@@ -58,6 +59,7 @@ export * from "./getenrichmentprofile.js";
|
|
|
58
59
|
export * from "./getfiledetails.js";
|
|
59
60
|
export * from "./getfullissuedcard.js";
|
|
60
61
|
export * from "./getimagemetadata.js";
|
|
62
|
+
export * from "./getinvoice.js";
|
|
61
63
|
export * from "./getissuedcard.js";
|
|
62
64
|
export * from "./getissuedcardauthorization.js";
|
|
63
65
|
export * from "./getissuedcardtransaction.js";
|
|
@@ -107,6 +109,7 @@ export * from "./listfiles.js";
|
|
|
107
109
|
export * from "./listimagemetadata.js";
|
|
108
110
|
export * from "./listindustries.js";
|
|
109
111
|
export * from "./listinstitutions.js";
|
|
112
|
+
export * from "./listinvoices.js";
|
|
110
113
|
export * from "./listissuedcardauthorizationevents.js";
|
|
111
114
|
export * from "./listissuedcardauthorizations.js";
|
|
112
115
|
export * from "./listissuedcards.js";
|
|
@@ -132,6 +135,7 @@ export * from "./listtickets.js";
|
|
|
132
135
|
export * from "./listtransfers.js";
|
|
133
136
|
export * from "./listwallets.js";
|
|
134
137
|
export * from "./listwallettransactions.js";
|
|
138
|
+
export * from "./markpaidinvoice.js";
|
|
135
139
|
export * from "./ping.js";
|
|
136
140
|
export * from "./registerapplepaymerchantdomains.js";
|
|
137
141
|
export * from "./requestcapabilities.js";
|
|
@@ -150,6 +154,7 @@ export * from "./updatecard.js";
|
|
|
150
154
|
export * from "./updatedisputeevidence.js";
|
|
151
155
|
export * from "./updateimage.js";
|
|
152
156
|
export * from "./updateimagemetadata.js";
|
|
157
|
+
export * from "./updateinvoice.js";
|
|
153
158
|
export * from "./updateissuedcard.js";
|
|
154
159
|
export * from "./updatepaymentlink.js";
|
|
155
160
|
export * from "./updateproduct.js";
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ListInvoicesGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ListInvoicesRequest = {
|
|
31
|
+
skip?: number | undefined;
|
|
32
|
+
count?: number | undefined;
|
|
33
|
+
status?: components.InvoiceStatus | undefined;
|
|
34
|
+
customerAccountID?: string | undefined;
|
|
35
|
+
accountID: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type ListInvoicesResponse = {
|
|
39
|
+
headers: { [k: string]: Array<string> };
|
|
40
|
+
result: Array<components.Invoice>;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const ListInvoicesGlobals$inboundSchema: z.ZodType<
|
|
45
|
+
ListInvoicesGlobals,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
unknown
|
|
48
|
+
> = z.object({
|
|
49
|
+
"X-Moov-Version": z.string().optional(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"X-Moov-Version": "xMoovVersion",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type ListInvoicesGlobals$Outbound = {
|
|
57
|
+
"X-Moov-Version"?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const ListInvoicesGlobals$outboundSchema: z.ZodType<
|
|
62
|
+
ListInvoicesGlobals$Outbound,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
ListInvoicesGlobals
|
|
65
|
+
> = z.object({
|
|
66
|
+
xMoovVersion: z.string().optional(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
xMoovVersion: "X-Moov-Version",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export function listInvoicesGlobalsToJSON(
|
|
74
|
+
listInvoicesGlobals: ListInvoicesGlobals,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
ListInvoicesGlobals$outboundSchema.parse(listInvoicesGlobals),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
export function listInvoicesGlobalsFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<ListInvoicesGlobals, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => ListInvoicesGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'ListInvoicesGlobals' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const ListInvoicesRequest$inboundSchema: z.ZodType<
|
|
92
|
+
ListInvoicesRequest,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
unknown
|
|
95
|
+
> = z.object({
|
|
96
|
+
skip: z.number().int().optional(),
|
|
97
|
+
count: z.number().int().optional(),
|
|
98
|
+
status: components.InvoiceStatus$inboundSchema.optional(),
|
|
99
|
+
customerAccountID: z.string().optional(),
|
|
100
|
+
accountID: z.string(),
|
|
101
|
+
});
|
|
102
|
+
/** @internal */
|
|
103
|
+
export type ListInvoicesRequest$Outbound = {
|
|
104
|
+
skip?: number | undefined;
|
|
105
|
+
count?: number | undefined;
|
|
106
|
+
status?: string | undefined;
|
|
107
|
+
customerAccountID?: string | undefined;
|
|
108
|
+
accountID: string;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export const ListInvoicesRequest$outboundSchema: z.ZodType<
|
|
113
|
+
ListInvoicesRequest$Outbound,
|
|
114
|
+
z.ZodTypeDef,
|
|
115
|
+
ListInvoicesRequest
|
|
116
|
+
> = z.object({
|
|
117
|
+
skip: z.number().int().optional(),
|
|
118
|
+
count: z.number().int().optional(),
|
|
119
|
+
status: components.InvoiceStatus$outboundSchema.optional(),
|
|
120
|
+
customerAccountID: z.string().optional(),
|
|
121
|
+
accountID: z.string(),
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
export function listInvoicesRequestToJSON(
|
|
125
|
+
listInvoicesRequest: ListInvoicesRequest,
|
|
126
|
+
): string {
|
|
127
|
+
return JSON.stringify(
|
|
128
|
+
ListInvoicesRequest$outboundSchema.parse(listInvoicesRequest),
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
export function listInvoicesRequestFromJSON(
|
|
132
|
+
jsonString: string,
|
|
133
|
+
): SafeParseResult<ListInvoicesRequest, SDKValidationError> {
|
|
134
|
+
return safeParse(
|
|
135
|
+
jsonString,
|
|
136
|
+
(x) => ListInvoicesRequest$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'ListInvoicesRequest' from JSON`,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** @internal */
|
|
142
|
+
export const ListInvoicesResponse$inboundSchema: z.ZodType<
|
|
143
|
+
ListInvoicesResponse,
|
|
144
|
+
z.ZodTypeDef,
|
|
145
|
+
unknown
|
|
146
|
+
> = z.object({
|
|
147
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
148
|
+
Result: z.array(components.Invoice$inboundSchema),
|
|
149
|
+
}).transform((v) => {
|
|
150
|
+
return remap$(v, {
|
|
151
|
+
"Headers": "headers",
|
|
152
|
+
"Result": "result",
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
/** @internal */
|
|
156
|
+
export type ListInvoicesResponse$Outbound = {
|
|
157
|
+
Headers: { [k: string]: Array<string> };
|
|
158
|
+
Result: Array<components.Invoice$Outbound>;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const ListInvoicesResponse$outboundSchema: z.ZodType<
|
|
163
|
+
ListInvoicesResponse$Outbound,
|
|
164
|
+
z.ZodTypeDef,
|
|
165
|
+
ListInvoicesResponse
|
|
166
|
+
> = z.object({
|
|
167
|
+
headers: z.record(z.array(z.string())),
|
|
168
|
+
result: z.array(components.Invoice$outboundSchema),
|
|
169
|
+
}).transform((v) => {
|
|
170
|
+
return remap$(v, {
|
|
171
|
+
headers: "Headers",
|
|
172
|
+
result: "Result",
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
export function listInvoicesResponseToJSON(
|
|
177
|
+
listInvoicesResponse: ListInvoicesResponse,
|
|
178
|
+
): string {
|
|
179
|
+
return JSON.stringify(
|
|
180
|
+
ListInvoicesResponse$outboundSchema.parse(listInvoicesResponse),
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
export function listInvoicesResponseFromJSON(
|
|
184
|
+
jsonString: string,
|
|
185
|
+
): SafeParseResult<ListInvoicesResponse, SDKValidationError> {
|
|
186
|
+
return safeParse(
|
|
187
|
+
jsonString,
|
|
188
|
+
(x) => ListInvoicesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
189
|
+
`Failed to parse 'ListInvoicesResponse' from JSON`,
|
|
190
|
+
);
|
|
191
|
+
}
|