@moovio/sdk 0.21.14 → 0.21.16
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 +2433 -819
- package/bin/mcp-server.js.map +63 -22
- 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 +3 -3
- package/lib/config.js +3 -3
- 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/{paymentlinklineitemsupdate.js → amountdecimalupdate.js} +14 -13
- 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/createpaymentlink.d.ts +3 -3
- package/models/components/createpaymentlink.d.ts.map +1 -1
- package/models/components/createpaymentlink.js +3 -3
- package/models/components/createpaymentlink.js.map +1 -1
- package/models/components/createpaymentlinklineitem.d.ts +50 -0
- package/models/components/createpaymentlinklineitem.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitem.js +70 -0
- package/models/components/createpaymentlinklineitem.js.map +1 -0
- package/models/components/createpaymentlinklineitemoption.d.ts +44 -0
- package/models/components/createpaymentlinklineitemoption.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitemoption.js +67 -0
- package/models/components/createpaymentlinklineitemoption.js.map +1 -0
- package/models/components/createpaymentlinklineitemoptionvalidationerror.d.ts +24 -0
- package/models/components/createpaymentlinklineitemoptionvalidationerror.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitemoptionvalidationerror.js +65 -0
- package/models/components/createpaymentlinklineitemoptionvalidationerror.js.map +1 -0
- package/models/components/createpaymentlinklineitems.d.ts +27 -0
- package/models/components/createpaymentlinklineitems.d.ts.map +1 -0
- package/models/components/{paymentlinklineitemsvalidationerror.js → createpaymentlinklineitems.js} +13 -13
- package/models/components/createpaymentlinklineitems.js.map +1 -0
- package/models/components/createpaymentlinklineitemsupdate.d.ts +27 -0
- package/models/components/createpaymentlinklineitemsupdate.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitemsupdate.js +59 -0
- package/models/components/createpaymentlinklineitemsupdate.js.map +1 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.d.ts +22 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.js +61 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.js.map +1 -0
- package/models/components/createpaymentlinklineitemvalidationerror.d.ts +31 -0
- package/models/components/createpaymentlinklineitemvalidationerror.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitemvalidationerror.js +68 -0
- package/models/components/createpaymentlinklineitemvalidationerror.js.map +1 -0
- package/models/components/index.d.ts +26 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +26 -4
- 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/{paymentlinklineitemoptionvalidationerror.js → invoicelineitemoptionvalidationerror.js} +10 -10
- 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/{paymentlinklineitemvalidationerror.js → invoicelineitemvalidationerror.js} +13 -13
- 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/paymentlinklineitem.d.ts +6 -0
- package/models/components/paymentlinklineitem.d.ts.map +1 -1
- package/models/components/paymentlinklineitem.js +3 -0
- package/models/components/paymentlinklineitem.js.map +1 -1
- package/models/components/paymentlinklineitemimagemetadata.d.ts +35 -0
- package/models/components/paymentlinklineitemimagemetadata.d.ts.map +1 -0
- package/models/components/paymentlinklineitemimagemetadata.js +64 -0
- package/models/components/paymentlinklineitemimagemetadata.js.map +1 -0
- package/models/components/paymentlinklineitemoption.d.ts +6 -0
- package/models/components/paymentlinklineitemoption.d.ts.map +1 -1
- package/models/components/paymentlinklineitemoption.js +3 -0
- package/models/components/paymentlinklineitemoption.js.map +1 -1
- 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/updatepaymentlink.d.ts +3 -3
- package/models/components/updatepaymentlink.d.ts.map +1 -1
- package/models/components/updatepaymentlink.js +3 -3
- package/models/components/updatepaymentlink.js.map +1 -1
- 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/createpaymentlinkerror.d.ts +3 -3
- package/models/errors/createpaymentlinkerror.d.ts.map +1 -1
- package/models/errors/createpaymentlinkerror.js +3 -3
- package/models/errors/createpaymentlinkerror.js.map +1 -1
- 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/errors/updatepaymentlinkerror.d.ts +3 -3
- package/models/errors/updatepaymentlinkerror.d.ts.map +1 -1
- package/models/errors/updatepaymentlinkerror.js +3 -3
- package/models/errors/updatepaymentlinkerror.js.map +1 -1
- 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 +3 -3
- 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/createpaymentlink.ts +10 -10
- package/src/models/components/createpaymentlinklineitem.ts +104 -0
- package/src/models/components/createpaymentlinklineitemoption.ts +93 -0
- package/src/models/components/createpaymentlinklineitemoptionvalidationerror.ts +80 -0
- package/src/models/components/createpaymentlinklineitems.ts +66 -0
- package/src/models/components/createpaymentlinklineitemsupdate.ts +68 -0
- package/src/models/components/createpaymentlinklineitemsvalidationerror.ts +71 -0
- package/src/models/components/createpaymentlinklineitemvalidationerror.ts +96 -0
- package/src/models/components/index.ts +26 -4
- 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/{paymentlinklineitemoptionvalidationerror.ts → invoicelineitemoptionvalidationerror.ts} +15 -21
- 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/paymentlinklineitem.ts +13 -0
- package/src/models/components/paymentlinklineitemimagemetadata.ts +77 -0
- package/src/models/components/paymentlinklineitemoption.ts +13 -0
- package/src/models/components/updateinvoice.ts +94 -0
- package/src/models/components/updatepaymentlink.ts +10 -10
- 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/createpaymentlinkerror.ts +6 -6
- 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/errors/updatepaymentlinkerror.ts +6 -6
- 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
- package/src/types/enums.ts +1 -21
- package/src/types/index.ts +2 -1
- package/src/types/unrecognized.ts +27 -0
- package/types/enums.d.ts +1 -8
- package/types/enums.d.ts.map +1 -1
- package/types/enums.js +3 -21
- package/types/enums.js.map +1 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/index.js +15 -0
- package/types/index.js.map +1 -1
- package/types/unrecognized.d.ts +10 -0
- package/types/unrecognized.d.ts.map +1 -0
- package/types/unrecognized.js +26 -0
- package/types/unrecognized.js.map +1 -0
- package/models/components/paymentlinklineitemoptionvalidationerror.d.ts +0 -24
- package/models/components/paymentlinklineitemoptionvalidationerror.d.ts.map +0 -1
- package/models/components/paymentlinklineitemoptionvalidationerror.js.map +0 -1
- package/models/components/paymentlinklineitemsupdate.d.ts +0 -27
- package/models/components/paymentlinklineitemsupdate.d.ts.map +0 -1
- package/models/components/paymentlinklineitemsupdate.js.map +0 -1
- package/models/components/paymentlinklineitemsvalidationerror.d.ts +0 -22
- package/models/components/paymentlinklineitemsvalidationerror.d.ts.map +0 -1
- package/models/components/paymentlinklineitemsvalidationerror.js.map +0 -1
- package/models/components/paymentlinklineitemvalidationerror.d.ts +0 -31
- package/models/components/paymentlinklineitemvalidationerror.d.ts.map +0 -1
- package/models/components/paymentlinklineitemvalidationerror.js.map +0 -1
- package/src/models/components/paymentlinklineitemsupdate.ts +0 -66
- package/src/models/components/paymentlinklineitemsvalidationerror.ts +0 -62
- package/src/models/components/paymentlinklineitemvalidationerror.ts +0 -88
|
@@ -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
|
+
}
|
|
@@ -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 MarkPaidInvoiceGlobals = {
|
|
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 MarkPaidInvoiceRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
invoiceID: string;
|
|
33
|
+
markInvoicePaid: components.MarkInvoicePaid;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type MarkPaidInvoiceResponse = {
|
|
37
|
+
headers: { [k: string]: Array<string> };
|
|
38
|
+
result: components.Invoice;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const MarkPaidInvoiceGlobals$inboundSchema: z.ZodType<
|
|
43
|
+
MarkPaidInvoiceGlobals,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({
|
|
47
|
+
"X-Moov-Version": z.string().optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"X-Moov-Version": "xMoovVersion",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type MarkPaidInvoiceGlobals$Outbound = {
|
|
55
|
+
"X-Moov-Version"?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const MarkPaidInvoiceGlobals$outboundSchema: z.ZodType<
|
|
60
|
+
MarkPaidInvoiceGlobals$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
MarkPaidInvoiceGlobals
|
|
63
|
+
> = z.object({
|
|
64
|
+
xMoovVersion: z.string().optional(),
|
|
65
|
+
}).transform((v) => {
|
|
66
|
+
return remap$(v, {
|
|
67
|
+
xMoovVersion: "X-Moov-Version",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function markPaidInvoiceGlobalsToJSON(
|
|
72
|
+
markPaidInvoiceGlobals: MarkPaidInvoiceGlobals,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
MarkPaidInvoiceGlobals$outboundSchema.parse(markPaidInvoiceGlobals),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export function markPaidInvoiceGlobalsFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<MarkPaidInvoiceGlobals, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => MarkPaidInvoiceGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'MarkPaidInvoiceGlobals' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const MarkPaidInvoiceRequest$inboundSchema: z.ZodType<
|
|
90
|
+
MarkPaidInvoiceRequest,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
accountID: z.string(),
|
|
95
|
+
invoiceID: z.string(),
|
|
96
|
+
MarkInvoicePaid: components.MarkInvoicePaid$inboundSchema,
|
|
97
|
+
}).transform((v) => {
|
|
98
|
+
return remap$(v, {
|
|
99
|
+
"MarkInvoicePaid": "markInvoicePaid",
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
/** @internal */
|
|
103
|
+
export type MarkPaidInvoiceRequest$Outbound = {
|
|
104
|
+
accountID: string;
|
|
105
|
+
invoiceID: string;
|
|
106
|
+
MarkInvoicePaid: components.MarkInvoicePaid$Outbound;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const MarkPaidInvoiceRequest$outboundSchema: z.ZodType<
|
|
111
|
+
MarkPaidInvoiceRequest$Outbound,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
MarkPaidInvoiceRequest
|
|
114
|
+
> = z.object({
|
|
115
|
+
accountID: z.string(),
|
|
116
|
+
invoiceID: z.string(),
|
|
117
|
+
markInvoicePaid: components.MarkInvoicePaid$outboundSchema,
|
|
118
|
+
}).transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
markInvoicePaid: "MarkInvoicePaid",
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
export function markPaidInvoiceRequestToJSON(
|
|
125
|
+
markPaidInvoiceRequest: MarkPaidInvoiceRequest,
|
|
126
|
+
): string {
|
|
127
|
+
return JSON.stringify(
|
|
128
|
+
MarkPaidInvoiceRequest$outboundSchema.parse(markPaidInvoiceRequest),
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
export function markPaidInvoiceRequestFromJSON(
|
|
132
|
+
jsonString: string,
|
|
133
|
+
): SafeParseResult<MarkPaidInvoiceRequest, SDKValidationError> {
|
|
134
|
+
return safeParse(
|
|
135
|
+
jsonString,
|
|
136
|
+
(x) => MarkPaidInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'MarkPaidInvoiceRequest' from JSON`,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** @internal */
|
|
142
|
+
export const MarkPaidInvoiceResponse$inboundSchema: z.ZodType<
|
|
143
|
+
MarkPaidInvoiceResponse,
|
|
144
|
+
z.ZodTypeDef,
|
|
145
|
+
unknown
|
|
146
|
+
> = z.object({
|
|
147
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
148
|
+
Result: components.Invoice$inboundSchema,
|
|
149
|
+
}).transform((v) => {
|
|
150
|
+
return remap$(v, {
|
|
151
|
+
"Headers": "headers",
|
|
152
|
+
"Result": "result",
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
/** @internal */
|
|
156
|
+
export type MarkPaidInvoiceResponse$Outbound = {
|
|
157
|
+
Headers: { [k: string]: Array<string> };
|
|
158
|
+
Result: components.Invoice$Outbound;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const MarkPaidInvoiceResponse$outboundSchema: z.ZodType<
|
|
163
|
+
MarkPaidInvoiceResponse$Outbound,
|
|
164
|
+
z.ZodTypeDef,
|
|
165
|
+
MarkPaidInvoiceResponse
|
|
166
|
+
> = z.object({
|
|
167
|
+
headers: z.record(z.array(z.string())),
|
|
168
|
+
result: components.Invoice$outboundSchema,
|
|
169
|
+
}).transform((v) => {
|
|
170
|
+
return remap$(v, {
|
|
171
|
+
headers: "Headers",
|
|
172
|
+
result: "Result",
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
export function markPaidInvoiceResponseToJSON(
|
|
177
|
+
markPaidInvoiceResponse: MarkPaidInvoiceResponse,
|
|
178
|
+
): string {
|
|
179
|
+
return JSON.stringify(
|
|
180
|
+
MarkPaidInvoiceResponse$outboundSchema.parse(markPaidInvoiceResponse),
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
export function markPaidInvoiceResponseFromJSON(
|
|
184
|
+
jsonString: string,
|
|
185
|
+
): SafeParseResult<MarkPaidInvoiceResponse, SDKValidationError> {
|
|
186
|
+
return safeParse(
|
|
187
|
+
jsonString,
|
|
188
|
+
(x) => MarkPaidInvoiceResponse$inboundSchema.parse(JSON.parse(x)),
|
|
189
|
+
`Failed to parse 'MarkPaidInvoiceResponse' from JSON`,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
@@ -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 UpdateInvoiceGlobals = {
|
|
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 UpdateInvoiceRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
invoiceID: string;
|
|
33
|
+
updateInvoice: components.UpdateInvoice;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type UpdateInvoiceResponse = {
|
|
37
|
+
headers: { [k: string]: Array<string> };
|
|
38
|
+
result: components.Invoice;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const UpdateInvoiceGlobals$inboundSchema: z.ZodType<
|
|
43
|
+
UpdateInvoiceGlobals,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({
|
|
47
|
+
"X-Moov-Version": z.string().optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"X-Moov-Version": "xMoovVersion",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type UpdateInvoiceGlobals$Outbound = {
|
|
55
|
+
"X-Moov-Version"?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const UpdateInvoiceGlobals$outboundSchema: z.ZodType<
|
|
60
|
+
UpdateInvoiceGlobals$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
UpdateInvoiceGlobals
|
|
63
|
+
> = z.object({
|
|
64
|
+
xMoovVersion: z.string().optional(),
|
|
65
|
+
}).transform((v) => {
|
|
66
|
+
return remap$(v, {
|
|
67
|
+
xMoovVersion: "X-Moov-Version",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function updateInvoiceGlobalsToJSON(
|
|
72
|
+
updateInvoiceGlobals: UpdateInvoiceGlobals,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
UpdateInvoiceGlobals$outboundSchema.parse(updateInvoiceGlobals),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export function updateInvoiceGlobalsFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<UpdateInvoiceGlobals, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => UpdateInvoiceGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'UpdateInvoiceGlobals' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const UpdateInvoiceRequest$inboundSchema: z.ZodType<
|
|
90
|
+
UpdateInvoiceRequest,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
accountID: z.string(),
|
|
95
|
+
invoiceID: z.string(),
|
|
96
|
+
UpdateInvoice: components.UpdateInvoice$inboundSchema,
|
|
97
|
+
}).transform((v) => {
|
|
98
|
+
return remap$(v, {
|
|
99
|
+
"UpdateInvoice": "updateInvoice",
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
/** @internal */
|
|
103
|
+
export type UpdateInvoiceRequest$Outbound = {
|
|
104
|
+
accountID: string;
|
|
105
|
+
invoiceID: string;
|
|
106
|
+
UpdateInvoice: components.UpdateInvoice$Outbound;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const UpdateInvoiceRequest$outboundSchema: z.ZodType<
|
|
111
|
+
UpdateInvoiceRequest$Outbound,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
UpdateInvoiceRequest
|
|
114
|
+
> = z.object({
|
|
115
|
+
accountID: z.string(),
|
|
116
|
+
invoiceID: z.string(),
|
|
117
|
+
updateInvoice: components.UpdateInvoice$outboundSchema,
|
|
118
|
+
}).transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
updateInvoice: "UpdateInvoice",
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
export function updateInvoiceRequestToJSON(
|
|
125
|
+
updateInvoiceRequest: UpdateInvoiceRequest,
|
|
126
|
+
): string {
|
|
127
|
+
return JSON.stringify(
|
|
128
|
+
UpdateInvoiceRequest$outboundSchema.parse(updateInvoiceRequest),
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
export function updateInvoiceRequestFromJSON(
|
|
132
|
+
jsonString: string,
|
|
133
|
+
): SafeParseResult<UpdateInvoiceRequest, SDKValidationError> {
|
|
134
|
+
return safeParse(
|
|
135
|
+
jsonString,
|
|
136
|
+
(x) => UpdateInvoiceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'UpdateInvoiceRequest' from JSON`,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** @internal */
|
|
142
|
+
export const UpdateInvoiceResponse$inboundSchema: z.ZodType<
|
|
143
|
+
UpdateInvoiceResponse,
|
|
144
|
+
z.ZodTypeDef,
|
|
145
|
+
unknown
|
|
146
|
+
> = z.object({
|
|
147
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
148
|
+
Result: components.Invoice$inboundSchema,
|
|
149
|
+
}).transform((v) => {
|
|
150
|
+
return remap$(v, {
|
|
151
|
+
"Headers": "headers",
|
|
152
|
+
"Result": "result",
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
/** @internal */
|
|
156
|
+
export type UpdateInvoiceResponse$Outbound = {
|
|
157
|
+
Headers: { [k: string]: Array<string> };
|
|
158
|
+
Result: components.Invoice$Outbound;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const UpdateInvoiceResponse$outboundSchema: z.ZodType<
|
|
163
|
+
UpdateInvoiceResponse$Outbound,
|
|
164
|
+
z.ZodTypeDef,
|
|
165
|
+
UpdateInvoiceResponse
|
|
166
|
+
> = z.object({
|
|
167
|
+
headers: z.record(z.array(z.string())),
|
|
168
|
+
result: components.Invoice$outboundSchema,
|
|
169
|
+
}).transform((v) => {
|
|
170
|
+
return remap$(v, {
|
|
171
|
+
headers: "Headers",
|
|
172
|
+
result: "Result",
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
export function updateInvoiceResponseToJSON(
|
|
177
|
+
updateInvoiceResponse: UpdateInvoiceResponse,
|
|
178
|
+
): string {
|
|
179
|
+
return JSON.stringify(
|
|
180
|
+
UpdateInvoiceResponse$outboundSchema.parse(updateInvoiceResponse),
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
export function updateInvoiceResponseFromJSON(
|
|
184
|
+
jsonString: string,
|
|
185
|
+
): SafeParseResult<UpdateInvoiceResponse, SDKValidationError> {
|
|
186
|
+
return safeParse(
|
|
187
|
+
jsonString,
|
|
188
|
+
(x) => UpdateInvoiceResponse$inboundSchema.parse(JSON.parse(x)),
|
|
189
|
+
`Failed to parse 'UpdateInvoiceResponse' from JSON`,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { invoicesCreateInvoice } from "../funcs/invoicesCreateInvoice.js";
|
|
6
|
+
import { invoicesGetInvoice } from "../funcs/invoicesGetInvoice.js";
|
|
7
|
+
import { invoicesListInvoices } from "../funcs/invoicesListInvoices.js";
|
|
8
|
+
import { invoicesMarkPaidInvoice } from "../funcs/invoicesMarkPaidInvoice.js";
|
|
9
|
+
import { invoicesUpdateInvoice } from "../funcs/invoicesUpdateInvoice.js";
|
|
10
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as operations from "../models/operations/index.js";
|
|
12
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
13
|
+
|
|
14
|
+
export class Invoices extends ClientSDK {
|
|
15
|
+
/**
|
|
16
|
+
* Create an invoice for a Moov account.
|
|
17
|
+
*
|
|
18
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
19
|
+
* you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
|
|
20
|
+
*/
|
|
21
|
+
async createInvoice(
|
|
22
|
+
request: operations.CreateInvoiceRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<operations.CreateInvoiceResponse> {
|
|
25
|
+
return unwrapAsync(invoicesCreateInvoice(
|
|
26
|
+
this,
|
|
27
|
+
request,
|
|
28
|
+
options,
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* List all the invoices created under a Moov account.
|
|
34
|
+
*
|
|
35
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
36
|
+
* you'll need to specify the `/accounts/{accountID}/invoices.read` scope.
|
|
37
|
+
*/
|
|
38
|
+
async listInvoices(
|
|
39
|
+
request: operations.ListInvoicesRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): Promise<operations.ListInvoicesResponse> {
|
|
42
|
+
return unwrapAsync(invoicesListInvoices(
|
|
43
|
+
this,
|
|
44
|
+
request,
|
|
45
|
+
options,
|
|
46
|
+
));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Retrieve an invoice by ID.
|
|
51
|
+
*
|
|
52
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
53
|
+
* you'll need to specify the `/accounts/{accountID}/invoices.read` scope.
|
|
54
|
+
*/
|
|
55
|
+
async getInvoice(
|
|
56
|
+
request: operations.GetInvoiceRequest,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<operations.GetInvoiceResponse> {
|
|
59
|
+
return unwrapAsync(invoicesGetInvoice(
|
|
60
|
+
this,
|
|
61
|
+
request,
|
|
62
|
+
options,
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Updates an invoice.
|
|
68
|
+
*
|
|
69
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
70
|
+
* you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
|
|
71
|
+
*/
|
|
72
|
+
async updateInvoice(
|
|
73
|
+
request: operations.UpdateInvoiceRequest,
|
|
74
|
+
options?: RequestOptions,
|
|
75
|
+
): Promise<operations.UpdateInvoiceResponse> {
|
|
76
|
+
return unwrapAsync(invoicesUpdateInvoice(
|
|
77
|
+
this,
|
|
78
|
+
request,
|
|
79
|
+
options,
|
|
80
|
+
));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Marks an invoice as paid outside of the Moov platform.
|
|
85
|
+
* If a payment link was created, the corresponding payment link is canceled, but a receipt is still sent.
|
|
86
|
+
*
|
|
87
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
88
|
+
* you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
|
|
89
|
+
*/
|
|
90
|
+
async markPaidInvoice(
|
|
91
|
+
request: operations.MarkPaidInvoiceRequest,
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): Promise<operations.MarkPaidInvoiceResponse> {
|
|
94
|
+
return unwrapAsync(invoicesMarkPaidInvoice(
|
|
95
|
+
this,
|
|
96
|
+
request,
|
|
97
|
+
options,
|
|
98
|
+
));
|
|
99
|
+
}
|
|
100
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { Files } from "./files.js";
|
|
|
23
23
|
import { Images } from "./images.js";
|
|
24
24
|
import { Industries } from "./industries.js";
|
|
25
25
|
import { Institutions } from "./institutions.js";
|
|
26
|
+
import { Invoices } from "./invoices.js";
|
|
26
27
|
import { IssuingTransactions } from "./issuingtransactions.js";
|
|
27
28
|
import { Onboarding } from "./onboarding.js";
|
|
28
29
|
import { PaymentLinks } from "./paymentlinks.js";
|
|
@@ -97,6 +98,11 @@ export class Moov extends ClientSDK {
|
|
|
97
98
|
return (this._images ??= new Images(this._options));
|
|
98
99
|
}
|
|
99
100
|
|
|
101
|
+
private _invoices?: Invoices;
|
|
102
|
+
get invoices(): Invoices {
|
|
103
|
+
return (this._invoices ??= new Invoices(this._options));
|
|
104
|
+
}
|
|
105
|
+
|
|
100
106
|
private _paymentLinks?: PaymentLinks;
|
|
101
107
|
get paymentLinks(): PaymentLinks {
|
|
102
108
|
return (this._paymentLinks ??= new PaymentLinks(this._options));
|