@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,104 @@
|
|
|
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
|
+
CreatePaymentLinkLineItemOption,
|
|
17
|
+
CreatePaymentLinkLineItemOption$inboundSchema,
|
|
18
|
+
CreatePaymentLinkLineItemOption$Outbound,
|
|
19
|
+
CreatePaymentLinkLineItemOption$outboundSchema,
|
|
20
|
+
} from "./createpaymentlinklineitemoption.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents a single line item in a payment link, including optional modifiers and quantity.
|
|
24
|
+
*/
|
|
25
|
+
export type CreatePaymentLinkLineItem = {
|
|
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<CreatePaymentLinkLineItemOption> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Optional list of images associated with this line item.
|
|
44
|
+
*/
|
|
45
|
+
imageIDs?: Array<string> | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Optional unique identifier associating the line item with a product.
|
|
48
|
+
*/
|
|
49
|
+
productID?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const CreatePaymentLinkLineItem$inboundSchema: z.ZodType<
|
|
54
|
+
CreatePaymentLinkLineItem,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.object({
|
|
58
|
+
name: z.string(),
|
|
59
|
+
basePrice: AmountDecimal$inboundSchema,
|
|
60
|
+
quantity: z.number().int(),
|
|
61
|
+
options: z.array(CreatePaymentLinkLineItemOption$inboundSchema).optional(),
|
|
62
|
+
imageIDs: z.array(z.string()).optional(),
|
|
63
|
+
productID: z.string().optional(),
|
|
64
|
+
});
|
|
65
|
+
/** @internal */
|
|
66
|
+
export type CreatePaymentLinkLineItem$Outbound = {
|
|
67
|
+
name: string;
|
|
68
|
+
basePrice: AmountDecimal$Outbound;
|
|
69
|
+
quantity: number;
|
|
70
|
+
options?: Array<CreatePaymentLinkLineItemOption$Outbound> | undefined;
|
|
71
|
+
imageIDs?: Array<string> | undefined;
|
|
72
|
+
productID?: string | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const CreatePaymentLinkLineItem$outboundSchema: z.ZodType<
|
|
77
|
+
CreatePaymentLinkLineItem$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
CreatePaymentLinkLineItem
|
|
80
|
+
> = z.object({
|
|
81
|
+
name: z.string(),
|
|
82
|
+
basePrice: AmountDecimal$outboundSchema,
|
|
83
|
+
quantity: z.number().int(),
|
|
84
|
+
options: z.array(CreatePaymentLinkLineItemOption$outboundSchema).optional(),
|
|
85
|
+
imageIDs: z.array(z.string()).optional(),
|
|
86
|
+
productID: z.string().optional(),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export function createPaymentLinkLineItemToJSON(
|
|
90
|
+
createPaymentLinkLineItem: CreatePaymentLinkLineItem,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
CreatePaymentLinkLineItem$outboundSchema.parse(createPaymentLinkLineItem),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export function createPaymentLinkLineItemFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<CreatePaymentLinkLineItem, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => CreatePaymentLinkLineItem$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'CreatePaymentLinkLineItem' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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 CreatePaymentLinkLineItemOption = {
|
|
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 list of images associated with this line item option.
|
|
34
|
+
*/
|
|
35
|
+
imageIDs?: Array<string> | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Optional group identifier to categorize related options (e.g., 'toppings').
|
|
38
|
+
*/
|
|
39
|
+
group?: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const CreatePaymentLinkLineItemOption$inboundSchema: z.ZodType<
|
|
44
|
+
CreatePaymentLinkLineItemOption,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
name: z.string(),
|
|
49
|
+
quantity: z.number().int(),
|
|
50
|
+
priceModifier: AmountDecimal$inboundSchema.optional(),
|
|
51
|
+
imageIDs: z.array(z.string()).optional(),
|
|
52
|
+
group: z.string().optional(),
|
|
53
|
+
});
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type CreatePaymentLinkLineItemOption$Outbound = {
|
|
56
|
+
name: string;
|
|
57
|
+
quantity: number;
|
|
58
|
+
priceModifier?: AmountDecimal$Outbound | undefined;
|
|
59
|
+
imageIDs?: Array<string> | undefined;
|
|
60
|
+
group?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const CreatePaymentLinkLineItemOption$outboundSchema: z.ZodType<
|
|
65
|
+
CreatePaymentLinkLineItemOption$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
CreatePaymentLinkLineItemOption
|
|
68
|
+
> = z.object({
|
|
69
|
+
name: z.string(),
|
|
70
|
+
quantity: z.number().int(),
|
|
71
|
+
priceModifier: AmountDecimal$outboundSchema.optional(),
|
|
72
|
+
imageIDs: z.array(z.string()).optional(),
|
|
73
|
+
group: z.string().optional(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function createPaymentLinkLineItemOptionToJSON(
|
|
77
|
+
createPaymentLinkLineItemOption: CreatePaymentLinkLineItemOption,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
CreatePaymentLinkLineItemOption$outboundSchema.parse(
|
|
81
|
+
createPaymentLinkLineItemOption,
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
export function createPaymentLinkLineItemOptionFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<CreatePaymentLinkLineItemOption, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => CreatePaymentLinkLineItemOption$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'CreatePaymentLinkLineItemOption' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
AmountDecimalValidationError,
|
|
11
|
+
AmountDecimalValidationError$inboundSchema,
|
|
12
|
+
AmountDecimalValidationError$Outbound,
|
|
13
|
+
AmountDecimalValidationError$outboundSchema,
|
|
14
|
+
} from "./amountdecimalvalidationerror.js";
|
|
15
|
+
|
|
16
|
+
export type CreatePaymentLinkLineItemOptionValidationError = {
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
group?: string | undefined;
|
|
19
|
+
priceModifier?: AmountDecimalValidationError | undefined;
|
|
20
|
+
quantity?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const CreatePaymentLinkLineItemOptionValidationError$inboundSchema:
|
|
25
|
+
z.ZodType<
|
|
26
|
+
CreatePaymentLinkLineItemOptionValidationError,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
name: z.string().optional(),
|
|
31
|
+
group: z.string().optional(),
|
|
32
|
+
priceModifier: AmountDecimalValidationError$inboundSchema.optional(),
|
|
33
|
+
quantity: z.string().optional(),
|
|
34
|
+
});
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type CreatePaymentLinkLineItemOptionValidationError$Outbound = {
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
group?: string | undefined;
|
|
39
|
+
priceModifier?: AmountDecimalValidationError$Outbound | undefined;
|
|
40
|
+
quantity?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const CreatePaymentLinkLineItemOptionValidationError$outboundSchema:
|
|
45
|
+
z.ZodType<
|
|
46
|
+
CreatePaymentLinkLineItemOptionValidationError$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
CreatePaymentLinkLineItemOptionValidationError
|
|
49
|
+
> = z.object({
|
|
50
|
+
name: z.string().optional(),
|
|
51
|
+
group: z.string().optional(),
|
|
52
|
+
priceModifier: AmountDecimalValidationError$outboundSchema.optional(),
|
|
53
|
+
quantity: z.string().optional(),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function createPaymentLinkLineItemOptionValidationErrorToJSON(
|
|
57
|
+
createPaymentLinkLineItemOptionValidationError:
|
|
58
|
+
CreatePaymentLinkLineItemOptionValidationError,
|
|
59
|
+
): string {
|
|
60
|
+
return JSON.stringify(
|
|
61
|
+
CreatePaymentLinkLineItemOptionValidationError$outboundSchema.parse(
|
|
62
|
+
createPaymentLinkLineItemOptionValidationError,
|
|
63
|
+
),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
export function createPaymentLinkLineItemOptionValidationErrorFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<
|
|
69
|
+
CreatePaymentLinkLineItemOptionValidationError,
|
|
70
|
+
SDKValidationError
|
|
71
|
+
> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) =>
|
|
75
|
+
CreatePaymentLinkLineItemOptionValidationError$inboundSchema.parse(
|
|
76
|
+
JSON.parse(x),
|
|
77
|
+
),
|
|
78
|
+
`Failed to parse 'CreatePaymentLinkLineItemOptionValidationError' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
CreatePaymentLinkLineItem,
|
|
11
|
+
CreatePaymentLinkLineItem$inboundSchema,
|
|
12
|
+
CreatePaymentLinkLineItem$Outbound,
|
|
13
|
+
CreatePaymentLinkLineItem$outboundSchema,
|
|
14
|
+
} from "./createpaymentlinklineitem.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* An optional collection of line items for a payment link.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* When line items are provided, their total plus sales tax must equal the payment link amount.
|
|
21
|
+
*/
|
|
22
|
+
export type CreatePaymentLinkLineItems = {
|
|
23
|
+
/**
|
|
24
|
+
* The list of line items.
|
|
25
|
+
*/
|
|
26
|
+
items: Array<CreatePaymentLinkLineItem>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const CreatePaymentLinkLineItems$inboundSchema: z.ZodType<
|
|
31
|
+
CreatePaymentLinkLineItems,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
items: z.array(CreatePaymentLinkLineItem$inboundSchema),
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CreatePaymentLinkLineItems$Outbound = {
|
|
39
|
+
items: Array<CreatePaymentLinkLineItem$Outbound>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const CreatePaymentLinkLineItems$outboundSchema: z.ZodType<
|
|
44
|
+
CreatePaymentLinkLineItems$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
CreatePaymentLinkLineItems
|
|
47
|
+
> = z.object({
|
|
48
|
+
items: z.array(CreatePaymentLinkLineItem$outboundSchema),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function createPaymentLinkLineItemsToJSON(
|
|
52
|
+
createPaymentLinkLineItems: CreatePaymentLinkLineItems,
|
|
53
|
+
): string {
|
|
54
|
+
return JSON.stringify(
|
|
55
|
+
CreatePaymentLinkLineItems$outboundSchema.parse(createPaymentLinkLineItems),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export function createPaymentLinkLineItemsFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<CreatePaymentLinkLineItems, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => CreatePaymentLinkLineItems$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'CreatePaymentLinkLineItems' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
CreatePaymentLinkLineItem,
|
|
11
|
+
CreatePaymentLinkLineItem$inboundSchema,
|
|
12
|
+
CreatePaymentLinkLineItem$Outbound,
|
|
13
|
+
CreatePaymentLinkLineItem$outboundSchema,
|
|
14
|
+
} from "./createpaymentlinklineitem.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* An optional collection of line items for a payment link.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* When line items are provided, their total plus sales tax must equal the payment link amount.
|
|
21
|
+
*/
|
|
22
|
+
export type CreatePaymentLinkLineItemsUpdate = {
|
|
23
|
+
/**
|
|
24
|
+
* The list of line items.
|
|
25
|
+
*/
|
|
26
|
+
items?: Array<CreatePaymentLinkLineItem> | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const CreatePaymentLinkLineItemsUpdate$inboundSchema: z.ZodType<
|
|
31
|
+
CreatePaymentLinkLineItemsUpdate,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
items: z.array(CreatePaymentLinkLineItem$inboundSchema).optional(),
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CreatePaymentLinkLineItemsUpdate$Outbound = {
|
|
39
|
+
items?: Array<CreatePaymentLinkLineItem$Outbound> | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const CreatePaymentLinkLineItemsUpdate$outboundSchema: z.ZodType<
|
|
44
|
+
CreatePaymentLinkLineItemsUpdate$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
CreatePaymentLinkLineItemsUpdate
|
|
47
|
+
> = z.object({
|
|
48
|
+
items: z.array(CreatePaymentLinkLineItem$outboundSchema).optional(),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function createPaymentLinkLineItemsUpdateToJSON(
|
|
52
|
+
createPaymentLinkLineItemsUpdate: CreatePaymentLinkLineItemsUpdate,
|
|
53
|
+
): string {
|
|
54
|
+
return JSON.stringify(
|
|
55
|
+
CreatePaymentLinkLineItemsUpdate$outboundSchema.parse(
|
|
56
|
+
createPaymentLinkLineItemsUpdate,
|
|
57
|
+
),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export function createPaymentLinkLineItemsUpdateFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<CreatePaymentLinkLineItemsUpdate, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => CreatePaymentLinkLineItemsUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'CreatePaymentLinkLineItemsUpdate' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
CreatePaymentLinkLineItemValidationError,
|
|
11
|
+
CreatePaymentLinkLineItemValidationError$inboundSchema,
|
|
12
|
+
CreatePaymentLinkLineItemValidationError$Outbound,
|
|
13
|
+
CreatePaymentLinkLineItemValidationError$outboundSchema,
|
|
14
|
+
} from "./createpaymentlinklineitemvalidationerror.js";
|
|
15
|
+
|
|
16
|
+
export type CreatePaymentLinkLineItemsValidationError = {
|
|
17
|
+
items?: { [k: string]: CreatePaymentLinkLineItemValidationError } | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const CreatePaymentLinkLineItemsValidationError$inboundSchema: z.ZodType<
|
|
22
|
+
CreatePaymentLinkLineItemsValidationError,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
items: z.record(CreatePaymentLinkLineItemValidationError$inboundSchema)
|
|
27
|
+
.optional(),
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type CreatePaymentLinkLineItemsValidationError$Outbound = {
|
|
31
|
+
items?:
|
|
32
|
+
| { [k: string]: CreatePaymentLinkLineItemValidationError$Outbound }
|
|
33
|
+
| undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const CreatePaymentLinkLineItemsValidationError$outboundSchema:
|
|
38
|
+
z.ZodType<
|
|
39
|
+
CreatePaymentLinkLineItemsValidationError$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
CreatePaymentLinkLineItemsValidationError
|
|
42
|
+
> = z.object({
|
|
43
|
+
items: z.record(CreatePaymentLinkLineItemValidationError$outboundSchema)
|
|
44
|
+
.optional(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function createPaymentLinkLineItemsValidationErrorToJSON(
|
|
48
|
+
createPaymentLinkLineItemsValidationError:
|
|
49
|
+
CreatePaymentLinkLineItemsValidationError,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
CreatePaymentLinkLineItemsValidationError$outboundSchema.parse(
|
|
53
|
+
createPaymentLinkLineItemsValidationError,
|
|
54
|
+
),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export function createPaymentLinkLineItemsValidationErrorFromJSON(
|
|
58
|
+
jsonString: string,
|
|
59
|
+
): SafeParseResult<
|
|
60
|
+
CreatePaymentLinkLineItemsValidationError,
|
|
61
|
+
SDKValidationError
|
|
62
|
+
> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) =>
|
|
66
|
+
CreatePaymentLinkLineItemsValidationError$inboundSchema.parse(
|
|
67
|
+
JSON.parse(x),
|
|
68
|
+
),
|
|
69
|
+
`Failed to parse 'CreatePaymentLinkLineItemsValidationError' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
AmountDecimalValidationError,
|
|
11
|
+
AmountDecimalValidationError$inboundSchema,
|
|
12
|
+
AmountDecimalValidationError$Outbound,
|
|
13
|
+
AmountDecimalValidationError$outboundSchema,
|
|
14
|
+
} from "./amountdecimalvalidationerror.js";
|
|
15
|
+
import {
|
|
16
|
+
CreatePaymentLinkLineItemOptionValidationError,
|
|
17
|
+
CreatePaymentLinkLineItemOptionValidationError$inboundSchema,
|
|
18
|
+
CreatePaymentLinkLineItemOptionValidationError$Outbound,
|
|
19
|
+
CreatePaymentLinkLineItemOptionValidationError$outboundSchema,
|
|
20
|
+
} from "./createpaymentlinklineitemoptionvalidationerror.js";
|
|
21
|
+
|
|
22
|
+
export type CreatePaymentLinkLineItemValidationError = {
|
|
23
|
+
productID?: string | undefined;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
basePrice?: AmountDecimalValidationError | undefined;
|
|
26
|
+
options?:
|
|
27
|
+
| { [k: string]: CreatePaymentLinkLineItemOptionValidationError }
|
|
28
|
+
| undefined;
|
|
29
|
+
quantity?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const CreatePaymentLinkLineItemValidationError$inboundSchema: z.ZodType<
|
|
34
|
+
CreatePaymentLinkLineItemValidationError,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
productID: z.string().optional(),
|
|
39
|
+
name: z.string().optional(),
|
|
40
|
+
basePrice: AmountDecimalValidationError$inboundSchema.optional(),
|
|
41
|
+
options: z.record(
|
|
42
|
+
CreatePaymentLinkLineItemOptionValidationError$inboundSchema,
|
|
43
|
+
).optional(),
|
|
44
|
+
quantity: z.string().optional(),
|
|
45
|
+
});
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type CreatePaymentLinkLineItemValidationError$Outbound = {
|
|
48
|
+
productID?: string | undefined;
|
|
49
|
+
name?: string | undefined;
|
|
50
|
+
basePrice?: AmountDecimalValidationError$Outbound | undefined;
|
|
51
|
+
options?: {
|
|
52
|
+
[k: string]: CreatePaymentLinkLineItemOptionValidationError$Outbound;
|
|
53
|
+
} | undefined;
|
|
54
|
+
quantity?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const CreatePaymentLinkLineItemValidationError$outboundSchema: z.ZodType<
|
|
59
|
+
CreatePaymentLinkLineItemValidationError$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
CreatePaymentLinkLineItemValidationError
|
|
62
|
+
> = z.object({
|
|
63
|
+
productID: z.string().optional(),
|
|
64
|
+
name: z.string().optional(),
|
|
65
|
+
basePrice: AmountDecimalValidationError$outboundSchema.optional(),
|
|
66
|
+
options: z.record(
|
|
67
|
+
CreatePaymentLinkLineItemOptionValidationError$outboundSchema,
|
|
68
|
+
).optional(),
|
|
69
|
+
quantity: z.string().optional(),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function createPaymentLinkLineItemValidationErrorToJSON(
|
|
73
|
+
createPaymentLinkLineItemValidationError:
|
|
74
|
+
CreatePaymentLinkLineItemValidationError,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
CreatePaymentLinkLineItemValidationError$outboundSchema.parse(
|
|
78
|
+
createPaymentLinkLineItemValidationError,
|
|
79
|
+
),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
export function createPaymentLinkLineItemValidationErrorFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<
|
|
85
|
+
CreatePaymentLinkLineItemValidationError,
|
|
86
|
+
SDKValidationError
|
|
87
|
+
> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) =>
|
|
91
|
+
CreatePaymentLinkLineItemValidationError$inboundSchema.parse(
|
|
92
|
+
JSON.parse(x),
|
|
93
|
+
),
|
|
94
|
+
`Failed to parse 'CreatePaymentLinkLineItemValidationError' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -32,6 +32,7 @@ export * from "./addressupdate.js";
|
|
|
32
32
|
export * from "./adjustment.js";
|
|
33
33
|
export * from "./amount.js";
|
|
34
34
|
export * from "./amountdecimal.js";
|
|
35
|
+
export * from "./amountdecimalupdate.js";
|
|
35
36
|
export * from "./amountdecimalvalidationerror.js";
|
|
36
37
|
export * from "./amountupdate.js";
|
|
37
38
|
export * from "./amountvalidationerror.js";
|
|
@@ -141,7 +142,15 @@ export * from "./createevidencetext.js";
|
|
|
141
142
|
export * from "./createfeeplanagreement.js";
|
|
142
143
|
export * from "./createindividualerror.js";
|
|
143
144
|
export * from "./createindividualprofile.js";
|
|
145
|
+
export * from "./createinvoice.js";
|
|
144
146
|
export * from "./createpaymentlink.js";
|
|
147
|
+
export * from "./createpaymentlinklineitem.js";
|
|
148
|
+
export * from "./createpaymentlinklineitemoption.js";
|
|
149
|
+
export * from "./createpaymentlinklineitemoptionvalidationerror.js";
|
|
150
|
+
export * from "./createpaymentlinklineitems.js";
|
|
151
|
+
export * from "./createpaymentlinklineitemsupdate.js";
|
|
152
|
+
export * from "./createpaymentlinklineitemsvalidationerror.js";
|
|
153
|
+
export * from "./createpaymentlinklineitemvalidationerror.js";
|
|
145
154
|
export * from "./createproductoption.js";
|
|
146
155
|
export * from "./createproductoptiongroup.js";
|
|
147
156
|
export * from "./createprofile.js";
|
|
@@ -233,6 +242,18 @@ export * from "./industrytaxonomy.js";
|
|
|
233
242
|
export * from "./instantbankcreditpaymentmethod.js";
|
|
234
243
|
export * from "./instantpaymentfees.js";
|
|
235
244
|
export * from "./institutionssearchresponse.js";
|
|
245
|
+
export * from "./invoice.js";
|
|
246
|
+
export * from "./invoiceexternalpayment.js";
|
|
247
|
+
export * from "./invoicelineitem.js";
|
|
248
|
+
export * from "./invoicelineitemoption.js";
|
|
249
|
+
export * from "./invoicelineitemoptionvalidationerror.js";
|
|
250
|
+
export * from "./invoicelineitems.js";
|
|
251
|
+
export * from "./invoicelineitemsupdate.js";
|
|
252
|
+
export * from "./invoicelineitemsvalidationerror.js";
|
|
253
|
+
export * from "./invoicelineitemvalidationerror.js";
|
|
254
|
+
export * from "./invoicepayment.js";
|
|
255
|
+
export * from "./invoicestatus.js";
|
|
256
|
+
export * from "./invoicetransferpayment.js";
|
|
236
257
|
export * from "./issuedcard.js";
|
|
237
258
|
export * from "./issuedcardauthorization.js";
|
|
238
259
|
export * from "./issuedcardauthorizationevent.js";
|
|
@@ -262,6 +283,7 @@ export * from "./linkedapplepaypaymentmethod.js";
|
|
|
262
283
|
export * from "./listfeesfetchrequest.js";
|
|
263
284
|
export * from "./manualtermsofservice.js";
|
|
264
285
|
export * from "./manualtermsofserviceupdate.js";
|
|
286
|
+
export * from "./markinvoicepaid.js";
|
|
265
287
|
export * from "./microdepositstatus.js";
|
|
266
288
|
export * from "./minimumcommitment.js";
|
|
267
289
|
export * from "./mode.js";
|
|
@@ -301,12 +323,9 @@ export * from "./paymentlinkcustomeroptions.js";
|
|
|
301
323
|
export * from "./paymentlinkdisplayoptions.js";
|
|
302
324
|
export * from "./paymentlinkdisplayoptionsupdate.js";
|
|
303
325
|
export * from "./paymentlinklineitem.js";
|
|
326
|
+
export * from "./paymentlinklineitemimagemetadata.js";
|
|
304
327
|
export * from "./paymentlinklineitemoption.js";
|
|
305
|
-
export * from "./paymentlinklineitemoptionvalidationerror.js";
|
|
306
328
|
export * from "./paymentlinklineitems.js";
|
|
307
|
-
export * from "./paymentlinklineitemsupdate.js";
|
|
308
|
-
export * from "./paymentlinklineitemsvalidationerror.js";
|
|
309
|
-
export * from "./paymentlinklineitemvalidationerror.js";
|
|
310
329
|
export * from "./paymentlinkpaymentdetails.js";
|
|
311
330
|
export * from "./paymentlinkpaymentdetailsupdate.js";
|
|
312
331
|
export * from "./paymentlinkpayoutdetails.js";
|
|
@@ -441,6 +460,7 @@ export * from "./updatecardexpiration.js";
|
|
|
441
460
|
export * from "./updatecolor.js";
|
|
442
461
|
export * from "./updatecolors.js";
|
|
443
462
|
export * from "./updateevidence.js";
|
|
463
|
+
export * from "./updateinvoice.js";
|
|
444
464
|
export * from "./updateissuedcard.js";
|
|
445
465
|
export * from "./updatepaymentlink.js";
|
|
446
466
|
export * from "./updaterepresentative.js";
|
|
@@ -481,6 +501,8 @@ export * from "./webhookdatacapabilityupdated.js";
|
|
|
481
501
|
export * from "./webhookdatacardautoupdated.js";
|
|
482
502
|
export * from "./webhookdatadisputecreated.js";
|
|
483
503
|
export * from "./webhookdatadisputeupdated.js";
|
|
504
|
+
export * from "./webhookdatainvoicecreated.js";
|
|
505
|
+
export * from "./webhookdatainvoiceupdated.js";
|
|
484
506
|
export * from "./webhookdatanetworkidupdated.js";
|
|
485
507
|
export * from "./webhookdatapaymentmethoddisabled.js";
|
|
486
508
|
export * from "./webhookdatapaymentmethodenabled.js";
|