@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,178 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
AmountDecimal,
|
|
11
|
+
AmountDecimal$inboundSchema,
|
|
12
|
+
AmountDecimal$Outbound,
|
|
13
|
+
AmountDecimal$outboundSchema,
|
|
14
|
+
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
InvoiceLineItems,
|
|
17
|
+
InvoiceLineItems$inboundSchema,
|
|
18
|
+
InvoiceLineItems$Outbound,
|
|
19
|
+
InvoiceLineItems$outboundSchema,
|
|
20
|
+
} from "./invoicelineitems.js";
|
|
21
|
+
import {
|
|
22
|
+
InvoicePayment,
|
|
23
|
+
InvoicePayment$inboundSchema,
|
|
24
|
+
InvoicePayment$Outbound,
|
|
25
|
+
InvoicePayment$outboundSchema,
|
|
26
|
+
} from "./invoicepayment.js";
|
|
27
|
+
import {
|
|
28
|
+
InvoiceStatus,
|
|
29
|
+
InvoiceStatus$inboundSchema,
|
|
30
|
+
InvoiceStatus$outboundSchema,
|
|
31
|
+
} from "./invoicestatus.js";
|
|
32
|
+
|
|
33
|
+
export type Invoice = {
|
|
34
|
+
invoiceID: string;
|
|
35
|
+
invoiceNumber: string;
|
|
36
|
+
description: string;
|
|
37
|
+
customerAccountID: string;
|
|
38
|
+
partnerAccountID: string;
|
|
39
|
+
status: InvoiceStatus;
|
|
40
|
+
/**
|
|
41
|
+
* A collection of line items for an invoice.
|
|
42
|
+
*/
|
|
43
|
+
lineItems: InvoiceLineItems;
|
|
44
|
+
subtotalAmount: AmountDecimal;
|
|
45
|
+
taxAmount: AmountDecimal;
|
|
46
|
+
/**
|
|
47
|
+
* Total amount of the invoice, sum of subTotalAmount and taxAmount
|
|
48
|
+
*/
|
|
49
|
+
totalAmount: AmountDecimal;
|
|
50
|
+
/**
|
|
51
|
+
* Total amount of pending transfers paid towards the invoice
|
|
52
|
+
*/
|
|
53
|
+
pendingAmount: AmountDecimal;
|
|
54
|
+
/**
|
|
55
|
+
* Total amount of completed transfers paid towards the invoice
|
|
56
|
+
*/
|
|
57
|
+
paidAmount: AmountDecimal;
|
|
58
|
+
/**
|
|
59
|
+
* Total amount of refunds initiated against transfers paid towards the invoice
|
|
60
|
+
*/
|
|
61
|
+
refundedAmount: AmountDecimal;
|
|
62
|
+
/**
|
|
63
|
+
* Total amount of disputes initiated against transfers paid towards the invoice
|
|
64
|
+
*/
|
|
65
|
+
disputedAmount: AmountDecimal;
|
|
66
|
+
paymentLinkCode?: string | undefined;
|
|
67
|
+
payments?: Array<InvoicePayment> | undefined;
|
|
68
|
+
createdOn: Date;
|
|
69
|
+
invoiceDate?: Date | undefined;
|
|
70
|
+
dueDate?: Date | undefined;
|
|
71
|
+
sentOn?: Date | undefined;
|
|
72
|
+
paidOn?: Date | undefined;
|
|
73
|
+
canceledOn?: Date | undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
78
|
+
z.object({
|
|
79
|
+
invoiceID: z.string(),
|
|
80
|
+
invoiceNumber: z.string(),
|
|
81
|
+
description: z.string(),
|
|
82
|
+
customerAccountID: z.string(),
|
|
83
|
+
partnerAccountID: z.string(),
|
|
84
|
+
status: InvoiceStatus$inboundSchema,
|
|
85
|
+
lineItems: InvoiceLineItems$inboundSchema,
|
|
86
|
+
subtotalAmount: AmountDecimal$inboundSchema,
|
|
87
|
+
taxAmount: AmountDecimal$inboundSchema,
|
|
88
|
+
totalAmount: AmountDecimal$inboundSchema,
|
|
89
|
+
pendingAmount: AmountDecimal$inboundSchema,
|
|
90
|
+
paidAmount: AmountDecimal$inboundSchema,
|
|
91
|
+
refundedAmount: AmountDecimal$inboundSchema,
|
|
92
|
+
disputedAmount: AmountDecimal$inboundSchema,
|
|
93
|
+
paymentLinkCode: z.string().optional(),
|
|
94
|
+
payments: z.array(InvoicePayment$inboundSchema).optional(),
|
|
95
|
+
createdOn: z.string().datetime({ offset: true }).transform(v =>
|
|
96
|
+
new Date(v)
|
|
97
|
+
),
|
|
98
|
+
invoiceDate: z.string().datetime({ offset: true }).transform(v =>
|
|
99
|
+
new Date(v)
|
|
100
|
+
).optional(),
|
|
101
|
+
dueDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
102
|
+
.optional(),
|
|
103
|
+
sentOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
104
|
+
.optional(),
|
|
105
|
+
paidOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
106
|
+
.optional(),
|
|
107
|
+
canceledOn: z.string().datetime({ offset: true }).transform(v =>
|
|
108
|
+
new Date(v)
|
|
109
|
+
).optional(),
|
|
110
|
+
});
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type Invoice$Outbound = {
|
|
113
|
+
invoiceID: string;
|
|
114
|
+
invoiceNumber: string;
|
|
115
|
+
description: string;
|
|
116
|
+
customerAccountID: string;
|
|
117
|
+
partnerAccountID: string;
|
|
118
|
+
status: string;
|
|
119
|
+
lineItems: InvoiceLineItems$Outbound;
|
|
120
|
+
subtotalAmount: AmountDecimal$Outbound;
|
|
121
|
+
taxAmount: AmountDecimal$Outbound;
|
|
122
|
+
totalAmount: AmountDecimal$Outbound;
|
|
123
|
+
pendingAmount: AmountDecimal$Outbound;
|
|
124
|
+
paidAmount: AmountDecimal$Outbound;
|
|
125
|
+
refundedAmount: AmountDecimal$Outbound;
|
|
126
|
+
disputedAmount: AmountDecimal$Outbound;
|
|
127
|
+
paymentLinkCode?: string | undefined;
|
|
128
|
+
payments?: Array<InvoicePayment$Outbound> | undefined;
|
|
129
|
+
createdOn: string;
|
|
130
|
+
invoiceDate?: string | undefined;
|
|
131
|
+
dueDate?: string | undefined;
|
|
132
|
+
sentOn?: string | undefined;
|
|
133
|
+
paidOn?: string | undefined;
|
|
134
|
+
canceledOn?: string | undefined;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const Invoice$outboundSchema: z.ZodType<
|
|
139
|
+
Invoice$Outbound,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
Invoice
|
|
142
|
+
> = z.object({
|
|
143
|
+
invoiceID: z.string(),
|
|
144
|
+
invoiceNumber: z.string(),
|
|
145
|
+
description: z.string(),
|
|
146
|
+
customerAccountID: z.string(),
|
|
147
|
+
partnerAccountID: z.string(),
|
|
148
|
+
status: InvoiceStatus$outboundSchema,
|
|
149
|
+
lineItems: InvoiceLineItems$outboundSchema,
|
|
150
|
+
subtotalAmount: AmountDecimal$outboundSchema,
|
|
151
|
+
taxAmount: AmountDecimal$outboundSchema,
|
|
152
|
+
totalAmount: AmountDecimal$outboundSchema,
|
|
153
|
+
pendingAmount: AmountDecimal$outboundSchema,
|
|
154
|
+
paidAmount: AmountDecimal$outboundSchema,
|
|
155
|
+
refundedAmount: AmountDecimal$outboundSchema,
|
|
156
|
+
disputedAmount: AmountDecimal$outboundSchema,
|
|
157
|
+
paymentLinkCode: z.string().optional(),
|
|
158
|
+
payments: z.array(InvoicePayment$outboundSchema).optional(),
|
|
159
|
+
createdOn: z.date().transform(v => v.toISOString()),
|
|
160
|
+
invoiceDate: z.date().transform(v => v.toISOString()).optional(),
|
|
161
|
+
dueDate: z.date().transform(v => v.toISOString()).optional(),
|
|
162
|
+
sentOn: z.date().transform(v => v.toISOString()).optional(),
|
|
163
|
+
paidOn: z.date().transform(v => v.toISOString()).optional(),
|
|
164
|
+
canceledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
export function invoiceToJSON(invoice: Invoice): string {
|
|
168
|
+
return JSON.stringify(Invoice$outboundSchema.parse(invoice));
|
|
169
|
+
}
|
|
170
|
+
export function invoiceFromJSON(
|
|
171
|
+
jsonString: string,
|
|
172
|
+
): SafeParseResult<Invoice, SDKValidationError> {
|
|
173
|
+
return safeParse(
|
|
174
|
+
jsonString,
|
|
175
|
+
(x) => Invoice$inboundSchema.parse(JSON.parse(x)),
|
|
176
|
+
`Failed to parse 'Invoice' from JSON`,
|
|
177
|
+
);
|
|
178
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
AmountDecimal,
|
|
12
|
+
AmountDecimal$inboundSchema,
|
|
13
|
+
AmountDecimal$Outbound,
|
|
14
|
+
AmountDecimal$outboundSchema,
|
|
15
|
+
} from "./amountdecimal.js";
|
|
16
|
+
|
|
17
|
+
export const InvoiceExternalPaymentPaymentType = {
|
|
18
|
+
External: "external",
|
|
19
|
+
} as const;
|
|
20
|
+
export type InvoiceExternalPaymentPaymentType = ClosedEnum<
|
|
21
|
+
typeof InvoiceExternalPaymentPaymentType
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
export type InvoiceExternalPayment = {
|
|
25
|
+
paymentType: InvoiceExternalPaymentPaymentType;
|
|
26
|
+
description: string;
|
|
27
|
+
foreignID?: string | undefined;
|
|
28
|
+
paymentDate?: Date | undefined;
|
|
29
|
+
amount: AmountDecimal;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const InvoiceExternalPaymentPaymentType$inboundSchema: z.ZodNativeEnum<
|
|
34
|
+
typeof InvoiceExternalPaymentPaymentType
|
|
35
|
+
> = z.nativeEnum(InvoiceExternalPaymentPaymentType);
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const InvoiceExternalPaymentPaymentType$outboundSchema: z.ZodNativeEnum<
|
|
38
|
+
typeof InvoiceExternalPaymentPaymentType
|
|
39
|
+
> = InvoiceExternalPaymentPaymentType$inboundSchema;
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const InvoiceExternalPayment$inboundSchema: z.ZodType<
|
|
43
|
+
InvoiceExternalPayment,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({
|
|
47
|
+
paymentType: InvoiceExternalPaymentPaymentType$inboundSchema,
|
|
48
|
+
description: z.string(),
|
|
49
|
+
foreignID: z.string().optional(),
|
|
50
|
+
paymentDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
51
|
+
.optional(),
|
|
52
|
+
amount: AmountDecimal$inboundSchema,
|
|
53
|
+
});
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type InvoiceExternalPayment$Outbound = {
|
|
56
|
+
paymentType: string;
|
|
57
|
+
description: string;
|
|
58
|
+
foreignID?: string | undefined;
|
|
59
|
+
paymentDate?: string | undefined;
|
|
60
|
+
amount: AmountDecimal$Outbound;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const InvoiceExternalPayment$outboundSchema: z.ZodType<
|
|
65
|
+
InvoiceExternalPayment$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
InvoiceExternalPayment
|
|
68
|
+
> = z.object({
|
|
69
|
+
paymentType: InvoiceExternalPaymentPaymentType$outboundSchema,
|
|
70
|
+
description: z.string(),
|
|
71
|
+
foreignID: z.string().optional(),
|
|
72
|
+
paymentDate: z.date().transform(v => v.toISOString()).optional(),
|
|
73
|
+
amount: AmountDecimal$outboundSchema,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function invoiceExternalPaymentToJSON(
|
|
77
|
+
invoiceExternalPayment: InvoiceExternalPayment,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
InvoiceExternalPayment$outboundSchema.parse(invoiceExternalPayment),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
export function invoiceExternalPaymentFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<InvoiceExternalPayment, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => InvoiceExternalPayment$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'InvoiceExternalPayment' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
AmountDecimal,
|
|
11
|
+
AmountDecimal$inboundSchema,
|
|
12
|
+
AmountDecimal$Outbound,
|
|
13
|
+
AmountDecimal$outboundSchema,
|
|
14
|
+
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
InvoiceLineItemOption,
|
|
17
|
+
InvoiceLineItemOption$inboundSchema,
|
|
18
|
+
InvoiceLineItemOption$Outbound,
|
|
19
|
+
InvoiceLineItemOption$outboundSchema,
|
|
20
|
+
} from "./invoicelineitemoption.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents a single item in an invoice, including optional modifiers and quantity.
|
|
24
|
+
*/
|
|
25
|
+
export type InvoiceLineItem = {
|
|
26
|
+
/**
|
|
27
|
+
* The name of the item.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* The base price of the item before applying option modifiers.
|
|
32
|
+
*/
|
|
33
|
+
basePrice: AmountDecimal;
|
|
34
|
+
/**
|
|
35
|
+
* The quantity of this item.
|
|
36
|
+
*/
|
|
37
|
+
quantity: number;
|
|
38
|
+
/**
|
|
39
|
+
* Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
|
|
40
|
+
*/
|
|
41
|
+
options?: Array<InvoiceLineItemOption> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Optional unique identifier associating the line item with a product.
|
|
44
|
+
*/
|
|
45
|
+
productID?: string | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
50
|
+
InvoiceLineItem,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
unknown
|
|
53
|
+
> = z.object({
|
|
54
|
+
name: z.string(),
|
|
55
|
+
basePrice: AmountDecimal$inboundSchema,
|
|
56
|
+
quantity: z.number().int(),
|
|
57
|
+
options: z.array(InvoiceLineItemOption$inboundSchema).optional(),
|
|
58
|
+
productID: z.string().optional(),
|
|
59
|
+
});
|
|
60
|
+
/** @internal */
|
|
61
|
+
export type InvoiceLineItem$Outbound = {
|
|
62
|
+
name: string;
|
|
63
|
+
basePrice: AmountDecimal$Outbound;
|
|
64
|
+
quantity: number;
|
|
65
|
+
options?: Array<InvoiceLineItemOption$Outbound> | undefined;
|
|
66
|
+
productID?: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
71
|
+
InvoiceLineItem$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
InvoiceLineItem
|
|
74
|
+
> = z.object({
|
|
75
|
+
name: z.string(),
|
|
76
|
+
basePrice: AmountDecimal$outboundSchema,
|
|
77
|
+
quantity: z.number().int(),
|
|
78
|
+
options: z.array(InvoiceLineItemOption$outboundSchema).optional(),
|
|
79
|
+
productID: z.string().optional(),
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export function invoiceLineItemToJSON(
|
|
83
|
+
invoiceLineItem: InvoiceLineItem,
|
|
84
|
+
): string {
|
|
85
|
+
return JSON.stringify(InvoiceLineItem$outboundSchema.parse(invoiceLineItem));
|
|
86
|
+
}
|
|
87
|
+
export function invoiceLineItemFromJSON(
|
|
88
|
+
jsonString: string,
|
|
89
|
+
): SafeParseResult<InvoiceLineItem, SDKValidationError> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) => InvoiceLineItem$inboundSchema.parse(JSON.parse(x)),
|
|
93
|
+
`Failed to parse 'InvoiceLineItem' from JSON`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
AmountDecimal,
|
|
11
|
+
AmountDecimal$inboundSchema,
|
|
12
|
+
AmountDecimal$Outbound,
|
|
13
|
+
AmountDecimal$outboundSchema,
|
|
14
|
+
} from "./amountdecimal.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Represents a modifier or option applied to a line item.
|
|
18
|
+
*/
|
|
19
|
+
export type InvoiceLineItemOption = {
|
|
20
|
+
/**
|
|
21
|
+
* The name of the option or modifier.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* The quantity of this option.
|
|
26
|
+
*/
|
|
27
|
+
quantity: number;
|
|
28
|
+
/**
|
|
29
|
+
* Optional price modification applied by this option. Can be positive, negative, or zero.
|
|
30
|
+
*/
|
|
31
|
+
priceModifier?: AmountDecimal | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Optional group identifier to categorize related options (e.g., 'toppings').
|
|
34
|
+
*/
|
|
35
|
+
group?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const InvoiceLineItemOption$inboundSchema: z.ZodType<
|
|
40
|
+
InvoiceLineItemOption,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
name: z.string(),
|
|
45
|
+
quantity: z.number().int(),
|
|
46
|
+
priceModifier: AmountDecimal$inboundSchema.optional(),
|
|
47
|
+
group: z.string().optional(),
|
|
48
|
+
});
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type InvoiceLineItemOption$Outbound = {
|
|
51
|
+
name: string;
|
|
52
|
+
quantity: number;
|
|
53
|
+
priceModifier?: AmountDecimal$Outbound | undefined;
|
|
54
|
+
group?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const InvoiceLineItemOption$outboundSchema: z.ZodType<
|
|
59
|
+
InvoiceLineItemOption$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
InvoiceLineItemOption
|
|
62
|
+
> = z.object({
|
|
63
|
+
name: z.string(),
|
|
64
|
+
quantity: z.number().int(),
|
|
65
|
+
priceModifier: AmountDecimal$outboundSchema.optional(),
|
|
66
|
+
group: z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function invoiceLineItemOptionToJSON(
|
|
70
|
+
invoiceLineItemOption: InvoiceLineItemOption,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
InvoiceLineItemOption$outboundSchema.parse(invoiceLineItemOption),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export function invoiceLineItemOptionFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<InvoiceLineItemOption, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => InvoiceLineItemOption$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'InvoiceLineItemOption' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
AmountDecimalValidationError$outboundSchema,
|
|
14
14
|
} from "./amountdecimalvalidationerror.js";
|
|
15
15
|
|
|
16
|
-
export type
|
|
16
|
+
export type InvoiceLineItemOptionValidationError = {
|
|
17
17
|
name?: string | undefined;
|
|
18
18
|
group?: string | undefined;
|
|
19
19
|
priceModifier?: AmountDecimalValidationError | undefined;
|
|
@@ -21,8 +21,8 @@ export type PaymentLinkLineItemOptionValidationError = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/** @internal */
|
|
24
|
-
export const
|
|
25
|
-
|
|
24
|
+
export const InvoiceLineItemOptionValidationError$inboundSchema: z.ZodType<
|
|
25
|
+
InvoiceLineItemOptionValidationError,
|
|
26
26
|
z.ZodTypeDef,
|
|
27
27
|
unknown
|
|
28
28
|
> = z.object({
|
|
@@ -32,7 +32,7 @@ export const PaymentLinkLineItemOptionValidationError$inboundSchema: z.ZodType<
|
|
|
32
32
|
quantity: z.string().optional(),
|
|
33
33
|
});
|
|
34
34
|
/** @internal */
|
|
35
|
-
export type
|
|
35
|
+
export type InvoiceLineItemOptionValidationError$Outbound = {
|
|
36
36
|
name?: string | undefined;
|
|
37
37
|
group?: string | undefined;
|
|
38
38
|
priceModifier?: AmountDecimalValidationError$Outbound | undefined;
|
|
@@ -40,10 +40,10 @@ export type PaymentLinkLineItemOptionValidationError$Outbound = {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
|
-
export const
|
|
44
|
-
|
|
43
|
+
export const InvoiceLineItemOptionValidationError$outboundSchema: z.ZodType<
|
|
44
|
+
InvoiceLineItemOptionValidationError$Outbound,
|
|
45
45
|
z.ZodTypeDef,
|
|
46
|
-
|
|
46
|
+
InvoiceLineItemOptionValidationError
|
|
47
47
|
> = z.object({
|
|
48
48
|
name: z.string().optional(),
|
|
49
49
|
group: z.string().optional(),
|
|
@@ -51,28 +51,22 @@ export const PaymentLinkLineItemOptionValidationError$outboundSchema: z.ZodType<
|
|
|
51
51
|
quantity: z.string().optional(),
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
export function
|
|
55
|
-
|
|
56
|
-
PaymentLinkLineItemOptionValidationError,
|
|
54
|
+
export function invoiceLineItemOptionValidationErrorToJSON(
|
|
55
|
+
invoiceLineItemOptionValidationError: InvoiceLineItemOptionValidationError,
|
|
57
56
|
): string {
|
|
58
57
|
return JSON.stringify(
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
InvoiceLineItemOptionValidationError$outboundSchema.parse(
|
|
59
|
+
invoiceLineItemOptionValidationError,
|
|
61
60
|
),
|
|
62
61
|
);
|
|
63
62
|
}
|
|
64
|
-
export function
|
|
63
|
+
export function invoiceLineItemOptionValidationErrorFromJSON(
|
|
65
64
|
jsonString: string,
|
|
66
|
-
): SafeParseResult<
|
|
67
|
-
PaymentLinkLineItemOptionValidationError,
|
|
68
|
-
SDKValidationError
|
|
69
|
-
> {
|
|
65
|
+
): SafeParseResult<InvoiceLineItemOptionValidationError, SDKValidationError> {
|
|
70
66
|
return safeParse(
|
|
71
67
|
jsonString,
|
|
72
68
|
(x) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
),
|
|
76
|
-
`Failed to parse 'PaymentLinkLineItemOptionValidationError' from JSON`,
|
|
69
|
+
InvoiceLineItemOptionValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'InvoiceLineItemOptionValidationError' from JSON`,
|
|
77
71
|
);
|
|
78
72
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
InvoiceLineItem,
|
|
11
|
+
InvoiceLineItem$inboundSchema,
|
|
12
|
+
InvoiceLineItem$Outbound,
|
|
13
|
+
InvoiceLineItem$outboundSchema,
|
|
14
|
+
} from "./invoicelineitem.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A collection of line items for an invoice.
|
|
18
|
+
*/
|
|
19
|
+
export type InvoiceLineItems = {
|
|
20
|
+
/**
|
|
21
|
+
* The list of line items.
|
|
22
|
+
*/
|
|
23
|
+
items: Array<InvoiceLineItem>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const InvoiceLineItems$inboundSchema: z.ZodType<
|
|
28
|
+
InvoiceLineItems,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
items: z.array(InvoiceLineItem$inboundSchema),
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type InvoiceLineItems$Outbound = {
|
|
36
|
+
items: Array<InvoiceLineItem$Outbound>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const InvoiceLineItems$outboundSchema: z.ZodType<
|
|
41
|
+
InvoiceLineItems$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
InvoiceLineItems
|
|
44
|
+
> = z.object({
|
|
45
|
+
items: z.array(InvoiceLineItem$outboundSchema),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function invoiceLineItemsToJSON(
|
|
49
|
+
invoiceLineItems: InvoiceLineItems,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
InvoiceLineItems$outboundSchema.parse(invoiceLineItems),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export function invoiceLineItemsFromJSON(
|
|
56
|
+
jsonString: string,
|
|
57
|
+
): SafeParseResult<InvoiceLineItems, SDKValidationError> {
|
|
58
|
+
return safeParse(
|
|
59
|
+
jsonString,
|
|
60
|
+
(x) => InvoiceLineItems$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
+
`Failed to parse 'InvoiceLineItems' from JSON`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
InvoiceLineItem,
|
|
11
|
+
InvoiceLineItem$inboundSchema,
|
|
12
|
+
InvoiceLineItem$Outbound,
|
|
13
|
+
InvoiceLineItem$outboundSchema,
|
|
14
|
+
} from "./invoicelineitem.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A collection of line items for an invoice.
|
|
18
|
+
*/
|
|
19
|
+
export type InvoiceLineItemsUpdate = {
|
|
20
|
+
/**
|
|
21
|
+
* The list of line items.
|
|
22
|
+
*/
|
|
23
|
+
items?: Array<InvoiceLineItem> | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const InvoiceLineItemsUpdate$inboundSchema: z.ZodType<
|
|
28
|
+
InvoiceLineItemsUpdate,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
items: z.array(InvoiceLineItem$inboundSchema).optional(),
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type InvoiceLineItemsUpdate$Outbound = {
|
|
36
|
+
items?: Array<InvoiceLineItem$Outbound> | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const InvoiceLineItemsUpdate$outboundSchema: z.ZodType<
|
|
41
|
+
InvoiceLineItemsUpdate$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
InvoiceLineItemsUpdate
|
|
44
|
+
> = z.object({
|
|
45
|
+
items: z.array(InvoiceLineItem$outboundSchema).optional(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function invoiceLineItemsUpdateToJSON(
|
|
49
|
+
invoiceLineItemsUpdate: InvoiceLineItemsUpdate,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
InvoiceLineItemsUpdate$outboundSchema.parse(invoiceLineItemsUpdate),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export function invoiceLineItemsUpdateFromJSON(
|
|
56
|
+
jsonString: string,
|
|
57
|
+
): SafeParseResult<InvoiceLineItemsUpdate, SDKValidationError> {
|
|
58
|
+
return safeParse(
|
|
59
|
+
jsonString,
|
|
60
|
+
(x) => InvoiceLineItemsUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
+
`Failed to parse 'InvoiceLineItemsUpdate' from JSON`,
|
|
62
|
+
);
|
|
63
|
+
}
|