@moovio/sdk 26.7.0-dev.2 → 26.7.0-dev.4
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 +90 -86
- package/bin/mcp-server.js +892 -402
- package/bin/mcp-server.js.map +96 -86
- package/funcs/accountsCreate.d.ts +8 -10
- package/funcs/accountsCreate.d.ts.map +1 -1
- package/funcs/accountsCreate.js +8 -10
- package/funcs/accountsCreate.js.map +1 -1
- package/funcs/capabilitiesDisable.d.ts +1 -1
- package/funcs/capabilitiesDisable.js +1 -1
- package/funcs/capabilitiesGet.d.ts +1 -1
- package/funcs/capabilitiesGet.js +1 -1
- package/funcs/capabilitiesList.d.ts +1 -1
- package/funcs/capabilitiesList.js +1 -1
- package/funcs/capabilitiesRequest.d.ts +1 -1
- package/funcs/capabilitiesRequest.js +1 -1
- package/funcs/cardIssuingGet.js +1 -1
- package/funcs/cardIssuingGet.js.map +1 -1
- package/funcs/cardIssuingGetFull.js +1 -1
- package/funcs/cardIssuingGetFull.js.map +1 -1
- package/funcs/cardIssuingList.js +1 -1
- package/funcs/cardIssuingList.js.map +1 -1
- package/funcs/cardIssuingRequest.js +1 -1
- package/funcs/cardIssuingRequest.js.map +1 -1
- package/funcs/cardIssuingUpdate.js +1 -1
- package/funcs/cardIssuingUpdate.js.map +1 -1
- package/funcs/transfersListCancellations.d.ts +17 -0
- package/funcs/transfersListCancellations.d.ts.map +1 -0
- package/funcs/transfersListCancellations.js +129 -0
- package/funcs/transfersListCancellations.js.map +1 -0
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/encodings.js +12 -12
- package/lib/encodings.js.map +1 -1
- package/lib/matchers.js +3 -3
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.d.ts +1 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +18 -0
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +7 -0
- package/lib/retries.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +50 -16
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/accountsCreate.d.ts.map +1 -1
- package/mcp-server/tools/accountsCreate.js +8 -10
- package/mcp-server/tools/accountsCreate.js.map +1 -1
- package/mcp-server/tools/capabilitiesDisable.js +1 -1
- package/mcp-server/tools/capabilitiesGet.js +1 -1
- package/mcp-server/tools/capabilitiesList.js +1 -1
- package/mcp-server/tools/capabilitiesRequest.js +1 -1
- package/mcp-server/tools/transfersListCancellations.d.ts +8 -0
- package/mcp-server/tools/transfersListCancellations.d.ts.map +1 -0
- package/mcp-server/tools/transfersListCancellations.js +65 -0
- package/mcp-server/tools/transfersListCancellations.js.map +1 -0
- package/models/components/addcapabilities.d.ts +9 -0
- package/models/components/addcapabilities.d.ts.map +1 -1
- package/models/components/addcapabilities.js.map +1 -1
- package/models/components/amountdecimalrange.d.ts +15 -4
- package/models/components/amountdecimalrange.d.ts.map +1 -1
- package/models/components/amountdecimalrange.js +5 -4
- package/models/components/amountdecimalrange.js.map +1 -1
- package/models/components/amountdecimalrangeupdate.d.ts +11 -0
- package/models/components/amountdecimalrangeupdate.d.ts.map +1 -1
- package/models/components/amountdecimalrangeupdate.js.map +1 -1
- package/models/components/amountdetails.d.ts +26 -0
- package/models/components/amountdetails.d.ts.map +1 -0
- package/models/components/{createauthorizedusererror.js → amountdetails.js} +15 -17
- package/models/components/amountdetails.js.map +1 -0
- package/models/components/amountdetailsupdate.d.ts +26 -0
- package/models/components/amountdetailsupdate.d.ts.map +1 -0
- package/models/components/{createauthorizeduserupdate.js → amountdetailsupdate.js} +15 -17
- package/models/components/amountdetailsupdate.js.map +1 -0
- package/models/components/amountdetailsvalidationerror.d.ts +19 -0
- package/models/components/amountdetailsvalidationerror.d.ts.map +1 -0
- package/models/components/{createauthorizeduser.js → amountdetailsvalidationerror.js} +14 -17
- package/models/components/amountdetailsvalidationerror.js.map +1 -0
- package/models/components/asynccreatedrefund.d.ts +3 -0
- package/models/components/asynccreatedrefund.d.ts.map +1 -1
- package/models/components/asynccreatedrefund.js +3 -0
- package/models/components/asynccreatedrefund.js.map +1 -1
- package/models/components/capability.d.ts +7 -1
- package/models/components/capability.d.ts.map +1 -1
- package/models/components/capability.js.map +1 -1
- package/models/components/capabilityid.d.ts +14 -2
- package/models/components/capabilityid.d.ts.map +1 -1
- package/models/components/capabilityid.js +7 -1
- package/models/components/capabilityid.js.map +1 -1
- package/models/components/cardacquiringrefund.d.ts +3 -0
- package/models/components/cardacquiringrefund.d.ts.map +1 -1
- package/models/components/cardacquiringrefund.js +3 -0
- package/models/components/cardacquiringrefund.js.map +1 -1
- package/models/components/createaccount.d.ts +9 -0
- package/models/components/createaccount.d.ts.map +1 -1
- package/models/components/createaccount.js.map +1 -1
- package/models/components/createinvoice.d.ts +3 -3
- package/models/components/createinvoice.d.ts.map +1 -1
- package/models/components/createinvoice.js +3 -3
- package/models/components/createinvoice.js.map +1 -1
- package/models/components/createpaymentlink.d.ts +9 -3
- package/models/components/createpaymentlink.d.ts.map +1 -1
- package/models/components/createpaymentlink.js +4 -0
- package/models/components/createpaymentlink.js.map +1 -1
- package/models/components/createpaymentlinkamountdetails.d.ts +5 -0
- package/models/components/createpaymentlinkamountdetails.d.ts.map +1 -1
- package/models/components/createpaymentlinkamountdetails.js +2 -0
- package/models/components/createpaymentlinkamountdetails.js.map +1 -1
- package/models/components/createpaymentlinkamountdetailsvalidationerror.d.ts +2 -0
- package/models/components/createpaymentlinkamountdetailsvalidationerror.d.ts.map +1 -1
- package/models/components/createpaymentlinkamountdetailsvalidationerror.js +2 -0
- package/models/components/createpaymentlinkamountdetailsvalidationerror.js.map +1 -1
- package/models/components/createrefund.d.ts +6 -0
- package/models/components/createrefund.d.ts.map +1 -1
- package/models/components/createrefund.js +3 -0
- package/models/components/createrefund.js.map +1 -1
- package/models/components/createreversal.d.ts +6 -0
- package/models/components/createreversal.d.ts.map +1 -1
- package/models/components/createreversal.js +3 -0
- package/models/components/createreversal.js.map +1 -1
- package/models/components/createtransferamountdetails.d.ts +5 -0
- package/models/components/createtransferamountdetails.d.ts.map +1 -1
- package/models/components/createtransferamountdetails.js +2 -0
- package/models/components/createtransferamountdetails.js.map +1 -1
- package/models/components/createtransferamountdetailsvalidationerror.d.ts +2 -0
- package/models/components/createtransferamountdetailsvalidationerror.d.ts.map +1 -1
- package/models/components/createtransferamountdetailsvalidationerror.js +2 -0
- package/models/components/createtransferamountdetailsvalidationerror.js.map +1 -1
- package/models/components/customamountpaymentdetailserror.d.ts +29 -0
- package/models/components/customamountpaymentdetailserror.d.ts.map +1 -0
- package/models/components/customamountpaymentdetailserror.js +71 -0
- package/models/components/customamountpaymentdetailserror.js.map +1 -0
- package/models/components/fullissuedcard.d.ts +25 -9
- package/models/components/fullissuedcard.d.ts.map +1 -1
- package/models/components/fullissuedcard.js +11 -5
- package/models/components/fullissuedcard.js.map +1 -1
- package/models/components/index.d.ts +12 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +12 -4
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +4 -3
- package/models/components/invoice.d.ts.map +1 -1
- package/models/components/invoice.js +3 -2
- package/models/components/invoice.js.map +1 -1
- package/models/components/issuedcard.d.ts +25 -9
- package/models/components/issuedcard.d.ts.map +1 -1
- package/models/components/issuedcard.js +11 -5
- package/models/components/issuedcard.js.map +1 -1
- package/models/components/onboardinginvite.d.ts +1 -1
- package/models/components/onboardinginviterequest.d.ts +1 -1
- package/models/components/paymentlink.d.ts +13 -2
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js +4 -0
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/paymentlinkamountdetails.d.ts +5 -0
- package/models/components/paymentlinkamountdetails.d.ts.map +1 -1
- package/models/components/paymentlinkamountdetails.js +2 -0
- package/models/components/paymentlinkamountdetails.js.map +1 -1
- package/models/components/paymentlinkcustomamountpaymentdetails.d.ts +70 -0
- package/models/components/paymentlinkcustomamountpaymentdetails.d.ts.map +1 -0
- package/models/components/paymentlinkcustomamountpaymentdetails.js +74 -0
- package/models/components/paymentlinkcustomamountpaymentdetails.js.map +1 -0
- package/models/components/paymentlinkcustomamountpaymentdetailsupdate.d.ts +70 -0
- package/models/components/paymentlinkcustomamountpaymentdetailsupdate.d.ts.map +1 -0
- package/models/components/paymentlinkcustomamountpaymentdetailsupdate.js +75 -0
- package/models/components/paymentlinkcustomamountpaymentdetailsupdate.js.map +1 -0
- package/models/components/paymentlinkpaymentdetails.d.ts +0 -33
- package/models/components/paymentlinkpaymentdetails.d.ts.map +1 -1
- package/models/components/paymentlinkpaymentdetails.js +1 -21
- package/models/components/paymentlinkpaymentdetails.js.map +1 -1
- package/models/components/paymentlinkpaymentdetailsupdate.d.ts +0 -33
- package/models/components/paymentlinkpaymentdetailsupdate.d.ts.map +1 -1
- package/models/components/paymentlinkpaymentdetailsupdate.js +1 -21
- package/models/components/paymentlinkpaymentdetailsupdate.js.map +1 -1
- package/models/components/paymentlinktype.d.ts +1 -0
- package/models/components/paymentlinktype.d.ts.map +1 -1
- package/models/components/paymentlinktype.js +1 -0
- package/models/components/paymentlinktype.js.map +1 -1
- package/models/components/refundamountdetails.d.ts +21 -0
- package/models/components/refundamountdetails.d.ts.map +1 -0
- package/models/components/{authorizeduser.js → refundamountdetails.js} +13 -14
- package/models/components/refundamountdetails.js.map +1 -0
- package/models/components/refundamountdetailsvalidationerror.d.ts +17 -0
- package/models/components/refundamountdetailsvalidationerror.d.ts.map +1 -0
- package/models/components/refundamountdetailsvalidationerror.js +59 -0
- package/models/components/refundamountdetailsvalidationerror.js.map +1 -0
- package/models/components/requestcard.d.ts +14 -17
- package/models/components/requestcard.d.ts.map +1 -1
- package/models/components/requestcard.js +9 -10
- package/models/components/requestcard.js.map +1 -1
- package/models/components/reversalamountdetails.d.ts +21 -0
- package/models/components/reversalamountdetails.d.ts.map +1 -0
- package/models/components/reversalamountdetails.js +60 -0
- package/models/components/reversalamountdetails.js.map +1 -0
- package/models/components/reversalamountdetailsvalidationerror.d.ts +17 -0
- package/models/components/reversalamountdetailsvalidationerror.d.ts.map +1 -0
- package/models/components/reversalamountdetailsvalidationerror.js +59 -0
- package/models/components/reversalamountdetailsvalidationerror.js.map +1 -0
- package/models/components/transferamountdetails.d.ts +5 -0
- package/models/components/transferamountdetails.d.ts.map +1 -1
- package/models/components/transferamountdetails.js +2 -0
- package/models/components/transferamountdetails.js.map +1 -1
- package/models/components/transferconfig.d.ts +3 -0
- package/models/components/transferconfig.d.ts.map +1 -1
- package/models/components/transferconfig.js +3 -0
- package/models/components/transferconfig.js.map +1 -1
- package/models/components/transfercontrols.d.ts +43 -0
- package/models/components/transfercontrols.d.ts.map +1 -0
- package/models/components/transfercontrols.js +67 -0
- package/models/components/transfercontrols.js.map +1 -0
- package/models/components/updateinvoice.d.ts +9 -9
- package/models/components/updateinvoice.d.ts.map +1 -1
- package/models/components/updateinvoice.js +3 -3
- package/models/components/updateinvoice.js.map +1 -1
- package/models/components/updateissuedcard.d.ts +33 -8
- package/models/components/updateissuedcard.d.ts.map +1 -1
- package/models/components/updateissuedcard.js +35 -6
- package/models/components/updateissuedcard.js.map +1 -1
- package/models/components/updatepaymentlink.d.ts +6 -0
- package/models/components/updatepaymentlink.d.ts.map +1 -1
- package/models/components/updatepaymentlink.js +3 -0
- package/models/components/updatepaymentlink.js.map +1 -1
- package/models/components/updatepaymentlinkamountdetails.d.ts +5 -0
- package/models/components/updatepaymentlinkamountdetails.d.ts.map +1 -1
- package/models/components/updatepaymentlinkamountdetails.js +2 -0
- package/models/components/updatepaymentlinkamountdetails.js.map +1 -1
- package/models/components/updatepaymentlinkamountdetailsvalidationerror.d.ts +2 -0
- package/models/components/updatepaymentlinkamountdetailsvalidationerror.d.ts.map +1 -1
- package/models/components/updatepaymentlinkamountdetailsvalidationerror.js +2 -0
- package/models/components/updatepaymentlinkamountdetailsvalidationerror.js.map +1 -1
- package/models/components/webhookdata.d.ts +3 -2
- package/models/components/webhookdata.d.ts.map +1 -1
- package/models/components/webhookdata.js +7 -4
- package/models/components/webhookdata.js.map +1 -1
- package/models/components/webhookdataauthorizationexpiring.d.ts +23 -0
- package/models/components/webhookdataauthorizationexpiring.d.ts.map +1 -0
- package/models/components/webhookdataauthorizationexpiring.js +65 -0
- package/models/components/webhookdataauthorizationexpiring.js.map +1 -0
- package/models/components/webhookdatacapabilityrequested.d.ts +7 -1
- package/models/components/webhookdatacapabilityrequested.d.ts.map +1 -1
- package/models/components/webhookdatacapabilityrequested.js.map +1 -1
- package/models/components/webhookdatacapabilityupdated.d.ts +7 -1
- package/models/components/webhookdatacapabilityupdated.d.ts.map +1 -1
- package/models/components/webhookdatacapabilityupdated.js.map +1 -1
- package/models/components/webhookdatasweepcreated.d.ts +5 -0
- package/models/components/webhookdatasweepcreated.d.ts.map +1 -1
- package/models/components/webhookdatasweepcreated.js +2 -0
- package/models/components/webhookdatasweepcreated.js.map +1 -1
- package/models/components/webhookdatasweepupdated.d.ts +5 -0
- package/models/components/webhookdatasweepupdated.d.ts.map +1 -1
- package/models/components/webhookdatasweepupdated.js +2 -0
- package/models/components/webhookdatasweepupdated.js.map +1 -1
- package/models/components/webhookeventtype.d.ts +1 -0
- package/models/components/webhookeventtype.d.ts.map +1 -1
- package/models/components/webhookeventtype.js +1 -0
- package/models/components/webhookeventtype.js.map +1 -1
- package/models/errors/cardacquiringrefund.d.ts +3 -0
- package/models/errors/cardacquiringrefund.d.ts.map +1 -1
- package/models/errors/cardacquiringrefund.js +4 -0
- package/models/errors/cardacquiringrefund.js.map +1 -1
- package/models/errors/createinvoiceerror.d.ts +3 -3
- package/models/errors/createinvoiceerror.d.ts.map +1 -1
- package/models/errors/createinvoiceerror.js +4 -4
- package/models/errors/createinvoiceerror.js.map +1 -1
- package/models/errors/createpaymentlinkerror.d.ts +3 -0
- package/models/errors/createpaymentlinkerror.d.ts.map +1 -1
- package/models/errors/createpaymentlinkerror.js +6 -0
- package/models/errors/createpaymentlinkerror.js.map +1 -1
- package/models/errors/refundvalidationerror.d.ts +4 -0
- package/models/errors/refundvalidationerror.d.ts.map +1 -1
- package/models/errors/refundvalidationerror.js +6 -0
- package/models/errors/refundvalidationerror.js.map +1 -1
- package/models/errors/requestcarderror.d.ts +12 -12
- package/models/errors/requestcarderror.d.ts.map +1 -1
- package/models/errors/requestcarderror.js +17 -17
- package/models/errors/requestcarderror.js.map +1 -1
- package/models/errors/reversalvalidationerror.d.ts +4 -0
- package/models/errors/reversalvalidationerror.d.ts.map +1 -1
- package/models/errors/reversalvalidationerror.js +6 -0
- package/models/errors/reversalvalidationerror.js.map +1 -1
- package/models/errors/updateinvoiceerror.d.ts +3 -3
- package/models/errors/updateinvoiceerror.d.ts.map +1 -1
- package/models/errors/updateinvoiceerror.js +4 -4
- package/models/errors/updateinvoiceerror.js.map +1 -1
- package/models/errors/updateissuedcarderror.d.ts +9 -6
- package/models/errors/updateissuedcarderror.d.ts.map +1 -1
- package/models/errors/updateissuedcarderror.js +12 -9
- package/models/errors/updateissuedcarderror.js.map +1 -1
- package/models/errors/updatepaymentlinkerror.d.ts +3 -0
- package/models/errors/updatepaymentlinkerror.d.ts.map +1 -1
- package/models/errors/updatepaymentlinkerror.js +6 -0
- package/models/errors/updatepaymentlinkerror.js.map +1 -1
- package/models/operations/disablecapability.d.ts +7 -1
- package/models/operations/disablecapability.d.ts.map +1 -1
- package/models/operations/disablecapability.js.map +1 -1
- package/models/operations/getcapability.d.ts +7 -1
- package/models/operations/getcapability.d.ts.map +1 -1
- package/models/operations/getcapability.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listcancellations.d.ts +45 -0
- package/models/operations/listcancellations.d.ts.map +1 -0
- package/models/operations/listcancellations.js +91 -0
- package/models/operations/listcancellations.js.map +1 -0
- package/package.json +1 -1
- package/sdk/accounts.d.ts +8 -10
- package/sdk/accounts.d.ts.map +1 -1
- package/sdk/accounts.js +8 -10
- package/sdk/accounts.js.map +1 -1
- package/sdk/capabilities.d.ts +4 -4
- package/sdk/capabilities.js +4 -4
- package/sdk/transfers.d.ts +7 -0
- package/sdk/transfers.d.ts.map +1 -1
- package/sdk/transfers.js +10 -0
- package/sdk/transfers.js.map +1 -1
- package/src/funcs/accountsCreate.ts +8 -10
- package/src/funcs/capabilitiesDisable.ts +1 -1
- package/src/funcs/capabilitiesGet.ts +1 -1
- package/src/funcs/capabilitiesList.ts +1 -1
- package/src/funcs/capabilitiesRequest.ts +1 -1
- package/src/funcs/cardIssuingGet.ts +1 -1
- package/src/funcs/cardIssuingGetFull.ts +3 -3
- package/src/funcs/cardIssuingList.ts +1 -1
- package/src/funcs/cardIssuingRequest.ts +1 -1
- package/src/funcs/cardIssuingUpdate.ts +1 -1
- package/src/funcs/transfersListCancellations.ts +181 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/matchers.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/lib/retries.ts +8 -0
- package/src/lib/sdks.ts +54 -17
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/accountsCreate.ts +8 -10
- package/src/mcp-server/tools/capabilitiesDisable.ts +1 -1
- package/src/mcp-server/tools/capabilitiesGet.ts +1 -1
- package/src/mcp-server/tools/capabilitiesList.ts +1 -1
- package/src/mcp-server/tools/capabilitiesRequest.ts +1 -1
- package/src/mcp-server/tools/transfersListCancellations.ts +38 -0
- package/src/models/components/addcapabilities.ts +9 -0
- package/src/models/components/amountdecimalrange.ts +20 -8
- package/src/models/components/amountdecimalrangeupdate.ts +11 -0
- package/src/models/components/amountdetails.ts +64 -0
- package/src/models/components/amountdetailsupdate.ts +68 -0
- package/src/models/components/amountdetailsvalidationerror.ts +58 -0
- package/src/models/components/asynccreatedrefund.ts +10 -0
- package/src/models/components/capability.ts +7 -1
- package/src/models/components/capabilityid.ts +14 -2
- package/src/models/components/cardacquiringrefund.ts +10 -0
- package/src/models/components/createaccount.ts +9 -0
- package/src/models/components/createinvoice.ts +9 -9
- package/src/models/components/createpaymentlink.ts +21 -3
- package/src/models/components/createpaymentlinkamountdetails.ts +7 -0
- package/src/models/components/createpaymentlinkamountdetailsvalidationerror.ts +4 -0
- package/src/models/components/createrefund.ts +13 -0
- package/src/models/components/createreversal.ts +13 -0
- package/src/models/components/createtransferamountdetails.ts +7 -0
- package/src/models/components/createtransferamountdetailsvalidationerror.ts +4 -0
- package/src/models/components/customamountpaymentdetailserror.ts +86 -0
- package/src/models/components/fullissuedcard.ts +35 -17
- package/src/models/components/index.ts +12 -4
- package/src/models/components/invoice.ts +11 -5
- package/src/models/components/issuedcard.ts +35 -17
- package/src/models/components/onboardinginvite.ts +1 -1
- package/src/models/components/onboardinginviterequest.ts +1 -1
- package/src/models/components/paymentlink.ts +25 -2
- package/src/models/components/paymentlinkamountdetails.ts +7 -0
- package/src/models/components/paymentlinkcustomamountpaymentdetails.ts +138 -0
- package/src/models/components/paymentlinkcustomamountpaymentdetailsupdate.ts +149 -0
- package/src/models/components/paymentlinkpaymentdetails.ts +0 -60
- package/src/models/components/paymentlinkpaymentdetailsupdate.ts +0 -61
- package/src/models/components/paymentlinktype.ts +1 -0
- package/src/models/components/refundamountdetails.ts +61 -0
- package/src/models/components/refundamountdetailsvalidationerror.ts +55 -0
- package/src/models/components/requestcard.ts +23 -34
- package/src/models/components/reversalamountdetails.ts +61 -0
- package/src/models/components/reversalamountdetailsvalidationerror.ts +55 -0
- package/src/models/components/transferamountdetails.ts +7 -0
- package/src/models/components/transferconfig.ts +10 -0
- package/src/models/components/transfercontrols.ts +86 -0
- package/src/models/components/updateinvoice.ts +15 -15
- package/src/models/components/updateissuedcard.ts +73 -17
- package/src/models/components/updatepaymentlink.ts +18 -0
- package/src/models/components/updatepaymentlinkamountdetails.ts +7 -0
- package/src/models/components/updatepaymentlinkamountdetailsvalidationerror.ts +4 -0
- package/src/models/components/webhookdata.ts +18 -8
- package/src/models/components/webhookdataauthorizationexpiring.ts +66 -0
- package/src/models/components/webhookdatacapabilityrequested.ts +7 -1
- package/src/models/components/webhookdatacapabilityupdated.ts +7 -1
- package/src/models/components/webhookdatasweepcreated.ts +7 -0
- package/src/models/components/webhookdatasweepupdated.ts +7 -0
- package/src/models/components/webhookeventtype.ts +1 -0
- package/src/models/errors/cardacquiringrefund.ts +6 -0
- package/src/models/errors/createinvoiceerror.ts +7 -7
- package/src/models/errors/createpaymentlinkerror.ts +13 -0
- package/src/models/errors/refundvalidationerror.ts +12 -0
- package/src/models/errors/requestcarderror.ts +26 -27
- package/src/models/errors/reversalvalidationerror.ts +12 -0
- package/src/models/errors/updateinvoiceerror.ts +7 -7
- package/src/models/errors/updateissuedcarderror.ts +18 -15
- package/src/models/errors/updatepaymentlinkerror.ts +13 -0
- package/src/models/operations/disablecapability.ts +7 -1
- package/src/models/operations/getcapability.ts +7 -1
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listcancellations.ts +121 -0
- package/src/sdk/accounts.ts +8 -10
- package/src/sdk/capabilities.ts +4 -4
- package/src/sdk/transfers.ts +18 -0
- package/src/types/async.ts +8 -7
- package/src/types/primitives.ts +0 -24
- package/types/async.d.ts.map +1 -1
- package/types/async.js +8 -7
- package/types/async.js.map +1 -1
- package/types/primitives.d.ts +0 -2
- package/types/primitives.d.ts.map +1 -1
- package/types/primitives.js +0 -23
- package/types/primitives.js.map +1 -1
- package/lib/dlv.d.ts +0 -14
- package/lib/dlv.d.ts.map +0 -1
- package/lib/dlv.js +0 -49
- package/lib/dlv.js.map +0 -1
- package/lib/is-plain-object.d.ts +0 -2
- package/lib/is-plain-object.d.ts.map +0 -1
- package/lib/is-plain-object.js +0 -41
- package/lib/is-plain-object.js.map +0 -1
- package/models/components/authorizeduser.d.ts +0 -22
- package/models/components/authorizeduser.d.ts.map +0 -1
- package/models/components/authorizeduser.js.map +0 -1
- package/models/components/createauthorizeduser.d.ts +0 -25
- package/models/components/createauthorizeduser.d.ts.map +0 -1
- package/models/components/createauthorizeduser.js.map +0 -1
- package/models/components/createauthorizedusererror.d.ts +0 -22
- package/models/components/createauthorizedusererror.d.ts.map +0 -1
- package/models/components/createauthorizedusererror.js.map +0 -1
- package/models/components/createauthorizeduserupdate.d.ts +0 -25
- package/models/components/createauthorizeduserupdate.d.ts.map +0 -1
- package/models/components/createauthorizeduserupdate.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
- package/src/models/components/authorizeduser.ts +0 -55
- package/src/models/components/createauthorizeduser.ts +0 -69
- package/src/models/components/createauthorizedusererror.ts +0 -66
- package/src/models/components/createauthorizeduserupdate.ts +0 -69
|
@@ -7,23 +7,18 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import * as types from "../../types/primitives.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
Address,
|
|
12
|
+
Address$inboundSchema,
|
|
13
|
+
Address$Outbound,
|
|
14
|
+
Address$outboundSchema,
|
|
15
|
+
} from "./address.js";
|
|
10
16
|
import {
|
|
11
17
|
CardExpiration,
|
|
12
18
|
CardExpiration$inboundSchema,
|
|
13
19
|
CardExpiration$Outbound,
|
|
14
20
|
CardExpiration$outboundSchema,
|
|
15
21
|
} from "./cardexpiration.js";
|
|
16
|
-
import {
|
|
17
|
-
CreateAuthorizedUser,
|
|
18
|
-
CreateAuthorizedUser$inboundSchema,
|
|
19
|
-
CreateAuthorizedUser$Outbound,
|
|
20
|
-
CreateAuthorizedUser$outboundSchema,
|
|
21
|
-
} from "./createauthorizeduser.js";
|
|
22
|
-
import {
|
|
23
|
-
IssuedCardFormFactor,
|
|
24
|
-
IssuedCardFormFactor$inboundSchema,
|
|
25
|
-
IssuedCardFormFactor$outboundSchema,
|
|
26
|
-
} from "./issuedcardformfactor.js";
|
|
27
22
|
import {
|
|
28
23
|
IssuingControls,
|
|
29
24
|
IssuingControls$inboundSchema,
|
|
@@ -32,19 +27,13 @@ import {
|
|
|
32
27
|
} from "./issuingcontrols.js";
|
|
33
28
|
|
|
34
29
|
export type RequestCard = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* Fields for identifying an authorized individual.
|
|
38
|
-
*/
|
|
39
|
-
authorizedUser: CreateAuthorizedUser;
|
|
40
|
-
/**
|
|
41
|
-
* Specifies the type of spend card to be issued. Presently supports virtual only, providing a digital number without a physical card.
|
|
42
|
-
*/
|
|
43
|
-
formFactor: IssuedCardFormFactor;
|
|
30
|
+
authorizedUserAccountID?: string | undefined;
|
|
31
|
+
nickname?: string | undefined;
|
|
44
32
|
/**
|
|
45
|
-
*
|
|
33
|
+
* Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
|
|
46
34
|
*/
|
|
47
|
-
|
|
35
|
+
metadata?: { [k: string]: string } | undefined;
|
|
36
|
+
billingAddress?: Address | undefined;
|
|
48
37
|
/**
|
|
49
38
|
* The expiration date of the card or token.
|
|
50
39
|
*/
|
|
@@ -58,19 +47,19 @@ export const RequestCard$inboundSchema: z.ZodType<
|
|
|
58
47
|
z.ZodTypeDef,
|
|
59
48
|
unknown
|
|
60
49
|
> = z.object({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
authorizedUserAccountID: types.optional(types.string()),
|
|
51
|
+
nickname: types.optional(types.string()),
|
|
52
|
+
metadata: types.optional(z.record(types.string())),
|
|
53
|
+
billingAddress: types.optional(Address$inboundSchema),
|
|
65
54
|
expiration: types.optional(CardExpiration$inboundSchema),
|
|
66
55
|
controls: types.optional(IssuingControls$inboundSchema),
|
|
67
56
|
});
|
|
68
57
|
/** @internal */
|
|
69
58
|
export type RequestCard$Outbound = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
authorizedUserAccountID?: string | undefined;
|
|
60
|
+
nickname?: string | undefined;
|
|
61
|
+
metadata?: { [k: string]: string } | undefined;
|
|
62
|
+
billingAddress?: Address$Outbound | undefined;
|
|
74
63
|
expiration?: CardExpiration$Outbound | undefined;
|
|
75
64
|
controls?: IssuingControls$Outbound | undefined;
|
|
76
65
|
};
|
|
@@ -81,10 +70,10 @@ export const RequestCard$outboundSchema: z.ZodType<
|
|
|
81
70
|
z.ZodTypeDef,
|
|
82
71
|
RequestCard
|
|
83
72
|
> = z.object({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
73
|
+
authorizedUserAccountID: z.string().optional(),
|
|
74
|
+
nickname: z.string().optional(),
|
|
75
|
+
metadata: z.record(z.string()).optional(),
|
|
76
|
+
billingAddress: Address$outboundSchema.optional(),
|
|
88
77
|
expiration: CardExpiration$outboundSchema.optional(),
|
|
89
78
|
controls: IssuingControls$outboundSchema.optional(),
|
|
90
79
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
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 * as types from "../../types/primitives.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 type ReversalAmountDetails = {
|
|
18
|
+
/**
|
|
19
|
+
* The amount of surcharge to refund. Should be proportionate to the surcharge on the original transfer. This does not reply if the reversal resulted in a cancellation instead of a refund
|
|
20
|
+
*/
|
|
21
|
+
surcharge?: AmountDecimal | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ReversalAmountDetails$inboundSchema: z.ZodType<
|
|
26
|
+
ReversalAmountDetails,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
surcharge: types.optional(AmountDecimal$inboundSchema),
|
|
31
|
+
});
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type ReversalAmountDetails$Outbound = {
|
|
34
|
+
surcharge?: AmountDecimal$Outbound | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ReversalAmountDetails$outboundSchema: z.ZodType<
|
|
39
|
+
ReversalAmountDetails$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
ReversalAmountDetails
|
|
42
|
+
> = z.object({
|
|
43
|
+
surcharge: AmountDecimal$outboundSchema.optional(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function reversalAmountDetailsToJSON(
|
|
47
|
+
reversalAmountDetails: ReversalAmountDetails,
|
|
48
|
+
): string {
|
|
49
|
+
return JSON.stringify(
|
|
50
|
+
ReversalAmountDetails$outboundSchema.parse(reversalAmountDetails),
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export function reversalAmountDetailsFromJSON(
|
|
54
|
+
jsonString: string,
|
|
55
|
+
): SafeParseResult<ReversalAmountDetails, SDKValidationError> {
|
|
56
|
+
return safeParse(
|
|
57
|
+
jsonString,
|
|
58
|
+
(x) => ReversalAmountDetails$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'ReversalAmountDetails' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type ReversalAmountDetailsValidationError = {
|
|
12
|
+
surcharge?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ReversalAmountDetailsValidationError$inboundSchema: z.ZodType<
|
|
17
|
+
ReversalAmountDetailsValidationError,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
surcharge: types.optional(types.string()),
|
|
22
|
+
});
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type ReversalAmountDetailsValidationError$Outbound = {
|
|
25
|
+
surcharge?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ReversalAmountDetailsValidationError$outboundSchema: z.ZodType<
|
|
30
|
+
ReversalAmountDetailsValidationError$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
ReversalAmountDetailsValidationError
|
|
33
|
+
> = z.object({
|
|
34
|
+
surcharge: z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function reversalAmountDetailsValidationErrorToJSON(
|
|
38
|
+
reversalAmountDetailsValidationError: ReversalAmountDetailsValidationError,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
ReversalAmountDetailsValidationError$outboundSchema.parse(
|
|
42
|
+
reversalAmountDetailsValidationError,
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export function reversalAmountDetailsValidationErrorFromJSON(
|
|
47
|
+
jsonString: string,
|
|
48
|
+
): SafeParseResult<ReversalAmountDetailsValidationError, SDKValidationError> {
|
|
49
|
+
return safeParse(
|
|
50
|
+
jsonString,
|
|
51
|
+
(x) =>
|
|
52
|
+
ReversalAmountDetailsValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'ReversalAmountDetailsValidationError' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -23,6 +23,10 @@ export type TransferAmountDetails = {
|
|
|
23
23
|
* The amount of tax applied to the transfer.
|
|
24
24
|
*/
|
|
25
25
|
tax?: AmountDecimal | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The amount of surcharge applied to the transfer.
|
|
28
|
+
*/
|
|
29
|
+
surcharge?: AmountDecimal | undefined;
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
/** @internal */
|
|
@@ -33,11 +37,13 @@ export const TransferAmountDetails$inboundSchema: z.ZodType<
|
|
|
33
37
|
> = z.object({
|
|
34
38
|
tip: types.optional(AmountDecimal$inboundSchema),
|
|
35
39
|
tax: types.optional(AmountDecimal$inboundSchema),
|
|
40
|
+
surcharge: types.optional(AmountDecimal$inboundSchema),
|
|
36
41
|
});
|
|
37
42
|
/** @internal */
|
|
38
43
|
export type TransferAmountDetails$Outbound = {
|
|
39
44
|
tip?: AmountDecimal$Outbound | undefined;
|
|
40
45
|
tax?: AmountDecimal$Outbound | undefined;
|
|
46
|
+
surcharge?: AmountDecimal$Outbound | undefined;
|
|
41
47
|
};
|
|
42
48
|
|
|
43
49
|
/** @internal */
|
|
@@ -48,6 +54,7 @@ export const TransferAmountDetails$outboundSchema: z.ZodType<
|
|
|
48
54
|
> = z.object({
|
|
49
55
|
tip: AmountDecimal$outboundSchema.optional(),
|
|
50
56
|
tax: AmountDecimal$outboundSchema.optional(),
|
|
57
|
+
surcharge: AmountDecimal$outboundSchema.optional(),
|
|
51
58
|
});
|
|
52
59
|
|
|
53
60
|
export function transferAmountDetailsToJSON(
|
|
@@ -13,6 +13,12 @@ import {
|
|
|
13
13
|
TipPresets$Outbound,
|
|
14
14
|
TipPresets$outboundSchema,
|
|
15
15
|
} from "./tippresets.js";
|
|
16
|
+
import {
|
|
17
|
+
TransferControls,
|
|
18
|
+
TransferControls$inboundSchema,
|
|
19
|
+
TransferControls$Outbound,
|
|
20
|
+
TransferControls$outboundSchema,
|
|
21
|
+
} from "./transfercontrols.js";
|
|
16
22
|
|
|
17
23
|
/**
|
|
18
24
|
* Configurable options for a transfer.
|
|
@@ -22,6 +28,7 @@ export type TransferConfig = {
|
|
|
22
28
|
* Tip presets when calculating tips for a transfer.
|
|
23
29
|
*/
|
|
24
30
|
tipPresets?: TipPresets | undefined;
|
|
31
|
+
transferControls?: Array<TransferControls> | undefined;
|
|
25
32
|
};
|
|
26
33
|
|
|
27
34
|
/** @internal */
|
|
@@ -31,10 +38,12 @@ export const TransferConfig$inboundSchema: z.ZodType<
|
|
|
31
38
|
unknown
|
|
32
39
|
> = z.object({
|
|
33
40
|
tipPresets: types.optional(TipPresets$inboundSchema),
|
|
41
|
+
transferControls: types.optional(z.array(TransferControls$inboundSchema)),
|
|
34
42
|
});
|
|
35
43
|
/** @internal */
|
|
36
44
|
export type TransferConfig$Outbound = {
|
|
37
45
|
tipPresets?: TipPresets$Outbound | undefined;
|
|
46
|
+
transferControls?: Array<TransferControls$Outbound> | undefined;
|
|
38
47
|
};
|
|
39
48
|
|
|
40
49
|
/** @internal */
|
|
@@ -44,6 +53,7 @@ export const TransferConfig$outboundSchema: z.ZodType<
|
|
|
44
53
|
TransferConfig
|
|
45
54
|
> = z.object({
|
|
46
55
|
tipPresets: TipPresets$outboundSchema.optional(),
|
|
56
|
+
transferControls: z.array(TransferControls$outboundSchema).optional(),
|
|
47
57
|
});
|
|
48
58
|
|
|
49
59
|
export function transferConfigToJSON(transferConfig: TransferConfig): string {
|
|
@@ -0,0 +1,86 @@
|
|
|
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 * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Controls for transfers created through a given partner
|
|
13
|
+
*/
|
|
14
|
+
export type TransferControls = {
|
|
15
|
+
/**
|
|
16
|
+
* ID of the merchant account.
|
|
17
|
+
*/
|
|
18
|
+
accountID: string;
|
|
19
|
+
/**
|
|
20
|
+
* ID of the partner account.
|
|
21
|
+
*/
|
|
22
|
+
partnerAccountID: string;
|
|
23
|
+
/**
|
|
24
|
+
* Indicates if the account is configured for debt repayment.
|
|
25
|
+
*/
|
|
26
|
+
debtRepayment: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates if the account is allowed to set dynamic descriptors on transfers.
|
|
29
|
+
*/
|
|
30
|
+
allowDynamicDescriptor: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates if the account is allowed to apply surcharges to transfers.
|
|
33
|
+
*/
|
|
34
|
+
allowSurcharge: boolean;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const TransferControls$inboundSchema: z.ZodType<
|
|
39
|
+
TransferControls,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
accountID: types.string(),
|
|
44
|
+
partnerAccountID: types.string(),
|
|
45
|
+
debtRepayment: types.boolean(),
|
|
46
|
+
allowDynamicDescriptor: types.boolean(),
|
|
47
|
+
allowSurcharge: types.boolean(),
|
|
48
|
+
});
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type TransferControls$Outbound = {
|
|
51
|
+
accountID: string;
|
|
52
|
+
partnerAccountID: string;
|
|
53
|
+
debtRepayment: boolean;
|
|
54
|
+
allowDynamicDescriptor: boolean;
|
|
55
|
+
allowSurcharge: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const TransferControls$outboundSchema: z.ZodType<
|
|
60
|
+
TransferControls$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
TransferControls
|
|
63
|
+
> = z.object({
|
|
64
|
+
accountID: z.string(),
|
|
65
|
+
partnerAccountID: z.string(),
|
|
66
|
+
debtRepayment: z.boolean(),
|
|
67
|
+
allowDynamicDescriptor: z.boolean(),
|
|
68
|
+
allowSurcharge: z.boolean(),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function transferControlsToJSON(
|
|
72
|
+
transferControls: TransferControls,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
TransferControls$outboundSchema.parse(transferControls),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export function transferControlsFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<TransferControls, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => TransferControls$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'TransferControls' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -8,11 +8,11 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import * as types from "../../types/primitives.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
AmountDetailsUpdate,
|
|
12
|
+
AmountDetailsUpdate$inboundSchema,
|
|
13
|
+
AmountDetailsUpdate$Outbound,
|
|
14
|
+
AmountDetailsUpdate$outboundSchema,
|
|
15
|
+
} from "./amountdetailsupdate.js";
|
|
16
16
|
import {
|
|
17
17
|
CreateInvoiceLineItemsUpdate,
|
|
18
18
|
CreateInvoiceLineItemsUpdate$inboundSchema,
|
|
@@ -34,17 +34,17 @@ export type UpdateInvoice = {
|
|
|
34
34
|
invoiceDate?: Date | null | undefined;
|
|
35
35
|
dueDate?: Date | null | undefined;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* The status can be updated to one of the following values under specific conditions:
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
40
|
+
* - `canceled`: Can only be set if the current status is `draft`, `unpaid`, or `overdue`. Canceling an invoice
|
|
41
|
+
* indicates the invoice is no longer expected to be paid (e.g., the charge was waived or terms changed).
|
|
42
|
+
* Canceled invoices still appear in list results by default and remain part of the invoice history.
|
|
43
|
+
* To completely discard an invoice created by mistake, use the delete endpoint instead.
|
|
44
|
+
* - `unpaid`: Can only be set if the current status is `draft`. Setting the status to `unpaid` finalizes the invoice and sends an email with a payment link to the customer.
|
|
45
45
|
*/
|
|
46
46
|
status?: InvoiceStatus | undefined;
|
|
47
|
-
|
|
47
|
+
amountDetails?: AmountDetailsUpdate | undefined;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
/** @internal */
|
|
@@ -58,7 +58,7 @@ export const UpdateInvoice$inboundSchema: z.ZodType<
|
|
|
58
58
|
invoiceDate: z.nullable(types.date()).optional(),
|
|
59
59
|
dueDate: z.nullable(types.date()).optional(),
|
|
60
60
|
status: types.optional(InvoiceStatus$inboundSchema),
|
|
61
|
-
|
|
61
|
+
amountDetails: types.optional(AmountDetailsUpdate$inboundSchema),
|
|
62
62
|
});
|
|
63
63
|
/** @internal */
|
|
64
64
|
export type UpdateInvoice$Outbound = {
|
|
@@ -67,7 +67,7 @@ export type UpdateInvoice$Outbound = {
|
|
|
67
67
|
invoiceDate?: string | null | undefined;
|
|
68
68
|
dueDate?: string | null | undefined;
|
|
69
69
|
status?: string | undefined;
|
|
70
|
-
|
|
70
|
+
amountDetails?: AmountDetailsUpdate$Outbound | undefined;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
/** @internal */
|
|
@@ -81,7 +81,7 @@ export const UpdateInvoice$outboundSchema: z.ZodType<
|
|
|
81
81
|
invoiceDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
82
82
|
dueDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
83
83
|
status: InvoiceStatus$outboundSchema.optional(),
|
|
84
|
-
|
|
84
|
+
amountDetails: AmountDetailsUpdate$outboundSchema.optional(),
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
export function updateInvoiceToJSON(updateInvoice: UpdateInvoice): string {
|
|
@@ -7,18 +7,21 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import * as types from "../../types/primitives.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
CreateAuthorizedUserUpdate,
|
|
12
|
-
CreateAuthorizedUserUpdate$inboundSchema,
|
|
13
|
-
CreateAuthorizedUserUpdate$Outbound,
|
|
14
|
-
CreateAuthorizedUserUpdate$outboundSchema,
|
|
15
|
-
} from "./createauthorizeduserupdate.js";
|
|
16
10
|
import {
|
|
17
11
|
UpdateIssuedCardState,
|
|
18
12
|
UpdateIssuedCardState$inboundSchema,
|
|
19
13
|
UpdateIssuedCardState$outboundSchema,
|
|
20
14
|
} from "./updateissuedcardstate.js";
|
|
21
15
|
|
|
16
|
+
export type BillingAddress = {
|
|
17
|
+
addressLine1?: string | undefined;
|
|
18
|
+
addressLine2?: string | undefined;
|
|
19
|
+
city?: string | undefined;
|
|
20
|
+
stateOrProvince?: string | undefined;
|
|
21
|
+
postalCode?: string | undefined;
|
|
22
|
+
country?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
22
25
|
export type UpdateIssuedCard = {
|
|
23
26
|
/**
|
|
24
27
|
* Updates the state of a Moov issued card.
|
|
@@ -27,13 +30,61 @@ export type UpdateIssuedCard = {
|
|
|
27
30
|
* - `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires.
|
|
28
31
|
*/
|
|
29
32
|
state?: UpdateIssuedCardState | undefined;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
nickname?: string | null | undefined;
|
|
34
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
35
|
+
billingAddress?: BillingAddress | null | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const BillingAddress$inboundSchema: z.ZodType<
|
|
40
|
+
BillingAddress,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
addressLine1: types.optional(types.string()),
|
|
45
|
+
addressLine2: types.optional(types.string()),
|
|
46
|
+
city: types.optional(types.string()),
|
|
47
|
+
stateOrProvince: types.optional(types.string()),
|
|
48
|
+
postalCode: types.optional(types.string()),
|
|
49
|
+
country: types.optional(types.string()),
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type BillingAddress$Outbound = {
|
|
53
|
+
addressLine1?: string | undefined;
|
|
54
|
+
addressLine2?: string | undefined;
|
|
55
|
+
city?: string | undefined;
|
|
56
|
+
stateOrProvince?: string | undefined;
|
|
57
|
+
postalCode?: string | undefined;
|
|
58
|
+
country?: string | undefined;
|
|
35
59
|
};
|
|
36
60
|
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const BillingAddress$outboundSchema: z.ZodType<
|
|
63
|
+
BillingAddress$Outbound,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
BillingAddress
|
|
66
|
+
> = z.object({
|
|
67
|
+
addressLine1: z.string().optional(),
|
|
68
|
+
addressLine2: z.string().optional(),
|
|
69
|
+
city: z.string().optional(),
|
|
70
|
+
stateOrProvince: z.string().optional(),
|
|
71
|
+
postalCode: z.string().optional(),
|
|
72
|
+
country: z.string().optional(),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function billingAddressToJSON(billingAddress: BillingAddress): string {
|
|
76
|
+
return JSON.stringify(BillingAddress$outboundSchema.parse(billingAddress));
|
|
77
|
+
}
|
|
78
|
+
export function billingAddressFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<BillingAddress, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => BillingAddress$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'BillingAddress' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
37
88
|
/** @internal */
|
|
38
89
|
export const UpdateIssuedCard$inboundSchema: z.ZodType<
|
|
39
90
|
UpdateIssuedCard,
|
|
@@ -41,14 +92,17 @@ export const UpdateIssuedCard$inboundSchema: z.ZodType<
|
|
|
41
92
|
unknown
|
|
42
93
|
> = z.object({
|
|
43
94
|
state: types.optional(UpdateIssuedCardState$inboundSchema),
|
|
44
|
-
|
|
45
|
-
|
|
95
|
+
nickname: z.nullable(types.string()).optional(),
|
|
96
|
+
metadata: z.nullable(z.record(types.string())).optional(),
|
|
97
|
+
billingAddress: z.nullable(z.lazy(() => BillingAddress$inboundSchema))
|
|
98
|
+
.optional(),
|
|
46
99
|
});
|
|
47
100
|
/** @internal */
|
|
48
101
|
export type UpdateIssuedCard$Outbound = {
|
|
49
102
|
state?: string | undefined;
|
|
50
|
-
|
|
51
|
-
|
|
103
|
+
nickname?: string | null | undefined;
|
|
104
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
105
|
+
billingAddress?: BillingAddress$Outbound | null | undefined;
|
|
52
106
|
};
|
|
53
107
|
|
|
54
108
|
/** @internal */
|
|
@@ -58,8 +112,10 @@ export const UpdateIssuedCard$outboundSchema: z.ZodType<
|
|
|
58
112
|
UpdateIssuedCard
|
|
59
113
|
> = z.object({
|
|
60
114
|
state: UpdateIssuedCardState$outboundSchema.optional(),
|
|
61
|
-
|
|
62
|
-
|
|
115
|
+
nickname: z.nullable(z.string()).optional(),
|
|
116
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
117
|
+
billingAddress: z.nullable(z.lazy(() => BillingAddress$outboundSchema))
|
|
118
|
+
.optional(),
|
|
63
119
|
});
|
|
64
120
|
|
|
65
121
|
export function updateIssuedCardToJSON(
|
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
CreatePaymentLinkLineItemsUpdate$Outbound,
|
|
20
20
|
CreatePaymentLinkLineItemsUpdate$outboundSchema,
|
|
21
21
|
} from "./createpaymentlinklineitemsupdate.js";
|
|
22
|
+
import {
|
|
23
|
+
PaymentLinkCustomAmountPaymentDetailsUpdate,
|
|
24
|
+
PaymentLinkCustomAmountPaymentDetailsUpdate$inboundSchema,
|
|
25
|
+
PaymentLinkCustomAmountPaymentDetailsUpdate$Outbound,
|
|
26
|
+
PaymentLinkCustomAmountPaymentDetailsUpdate$outboundSchema,
|
|
27
|
+
} from "./paymentlinkcustomamountpaymentdetailsupdate.js";
|
|
22
28
|
import {
|
|
23
29
|
PaymentLinkCustomerOptions,
|
|
24
30
|
PaymentLinkCustomerOptions$inboundSchema,
|
|
@@ -63,6 +69,10 @@ export type UpdatePaymentLink = {
|
|
|
63
69
|
*/
|
|
64
70
|
payment?: PaymentLinkPaymentDetailsUpdate | undefined;
|
|
65
71
|
payout?: PaymentLinkPayoutDetailsUpdate | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Options for a custom amount payment link. A payment link's type cannot be changed after creation.
|
|
74
|
+
*/
|
|
75
|
+
customAmountPayment?: PaymentLinkCustomAmountPaymentDetailsUpdate | undefined;
|
|
66
76
|
/**
|
|
67
77
|
* An optional collection of line items for a payment link.
|
|
68
78
|
*
|
|
@@ -85,6 +95,9 @@ export const UpdatePaymentLink$inboundSchema: z.ZodType<
|
|
|
85
95
|
customer: types.optional(PaymentLinkCustomerOptions$inboundSchema),
|
|
86
96
|
payment: types.optional(PaymentLinkPaymentDetailsUpdate$inboundSchema),
|
|
87
97
|
payout: types.optional(PaymentLinkPayoutDetailsUpdate$inboundSchema),
|
|
98
|
+
customAmountPayment: types.optional(
|
|
99
|
+
PaymentLinkCustomAmountPaymentDetailsUpdate$inboundSchema,
|
|
100
|
+
),
|
|
88
101
|
lineItems: types.optional(CreatePaymentLinkLineItemsUpdate$inboundSchema),
|
|
89
102
|
amountDetails: types.optional(UpdatePaymentLinkAmountDetails$inboundSchema),
|
|
90
103
|
});
|
|
@@ -96,6 +109,9 @@ export type UpdatePaymentLink$Outbound = {
|
|
|
96
109
|
customer?: PaymentLinkCustomerOptions$Outbound | undefined;
|
|
97
110
|
payment?: PaymentLinkPaymentDetailsUpdate$Outbound | undefined;
|
|
98
111
|
payout?: PaymentLinkPayoutDetailsUpdate$Outbound | undefined;
|
|
112
|
+
customAmountPayment?:
|
|
113
|
+
| PaymentLinkCustomAmountPaymentDetailsUpdate$Outbound
|
|
114
|
+
| undefined;
|
|
99
115
|
lineItems?: CreatePaymentLinkLineItemsUpdate$Outbound | undefined;
|
|
100
116
|
amountDetails?: UpdatePaymentLinkAmountDetails$Outbound | undefined;
|
|
101
117
|
};
|
|
@@ -112,6 +128,8 @@ export const UpdatePaymentLink$outboundSchema: z.ZodType<
|
|
|
112
128
|
customer: PaymentLinkCustomerOptions$outboundSchema.optional(),
|
|
113
129
|
payment: PaymentLinkPaymentDetailsUpdate$outboundSchema.optional(),
|
|
114
130
|
payout: PaymentLinkPayoutDetailsUpdate$outboundSchema.optional(),
|
|
131
|
+
customAmountPayment:
|
|
132
|
+
PaymentLinkCustomAmountPaymentDetailsUpdate$outboundSchema.optional(),
|
|
115
133
|
lineItems: CreatePaymentLinkLineItemsUpdate$outboundSchema.optional(),
|
|
116
134
|
amountDetails: UpdatePaymentLinkAmountDetails$outboundSchema.optional(),
|
|
117
135
|
});
|
|
@@ -19,6 +19,10 @@ export type UpdatePaymentLinkAmountDetails = {
|
|
|
19
19
|
* The amount of tax applied to the payment link.
|
|
20
20
|
*/
|
|
21
21
|
tax?: AmountDecimalUpdate | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The amount of surcharge applied to the payment link.
|
|
24
|
+
*/
|
|
25
|
+
surcharge?: AmountDecimalUpdate | undefined;
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
/** @internal */
|
|
@@ -28,10 +32,12 @@ export const UpdatePaymentLinkAmountDetails$inboundSchema: z.ZodType<
|
|
|
28
32
|
unknown
|
|
29
33
|
> = z.object({
|
|
30
34
|
tax: types.optional(AmountDecimalUpdate$inboundSchema),
|
|
35
|
+
surcharge: types.optional(AmountDecimalUpdate$inboundSchema),
|
|
31
36
|
});
|
|
32
37
|
/** @internal */
|
|
33
38
|
export type UpdatePaymentLinkAmountDetails$Outbound = {
|
|
34
39
|
tax?: AmountDecimalUpdate$Outbound | undefined;
|
|
40
|
+
surcharge?: AmountDecimalUpdate$Outbound | undefined;
|
|
35
41
|
};
|
|
36
42
|
|
|
37
43
|
/** @internal */
|
|
@@ -41,6 +47,7 @@ export const UpdatePaymentLinkAmountDetails$outboundSchema: z.ZodType<
|
|
|
41
47
|
UpdatePaymentLinkAmountDetails
|
|
42
48
|
> = z.object({
|
|
43
49
|
tax: AmountDecimalUpdate$outboundSchema.optional(),
|
|
50
|
+
surcharge: AmountDecimalUpdate$outboundSchema.optional(),
|
|
44
51
|
});
|
|
45
52
|
|
|
46
53
|
export function updatePaymentLinkAmountDetailsToJSON(
|
|
@@ -10,6 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
|
|
11
11
|
export type UpdatePaymentLinkAmountDetailsValidationError = {
|
|
12
12
|
tax?: string | undefined;
|
|
13
|
+
surcharge?: string | undefined;
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
/** @internal */
|
|
@@ -20,10 +21,12 @@ export const UpdatePaymentLinkAmountDetailsValidationError$inboundSchema:
|
|
|
20
21
|
unknown
|
|
21
22
|
> = z.object({
|
|
22
23
|
tax: types.optional(types.string()),
|
|
24
|
+
surcharge: types.optional(types.string()),
|
|
23
25
|
});
|
|
24
26
|
/** @internal */
|
|
25
27
|
export type UpdatePaymentLinkAmountDetailsValidationError$Outbound = {
|
|
26
28
|
tax?: string | undefined;
|
|
29
|
+
surcharge?: string | undefined;
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
/** @internal */
|
|
@@ -34,6 +37,7 @@ export const UpdatePaymentLinkAmountDetailsValidationError$outboundSchema:
|
|
|
34
37
|
UpdatePaymentLinkAmountDetailsValidationError
|
|
35
38
|
> = z.object({
|
|
36
39
|
tax: z.string().optional(),
|
|
40
|
+
surcharge: z.string().optional(),
|
|
37
41
|
});
|
|
38
42
|
|
|
39
43
|
export function updatePaymentLinkAmountDetailsValidationErrorToJSON(
|