@moovio/sdk 0.0.0-dev.23 → 0.0.0-dev.25
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 +772 -380
- package/bin/mcp-server.js.map +80 -74
- 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/{authorizeduser.js → amountdetails.js} +15 -14
- 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/{createauthorizedusererror.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/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/cardtransactiondetails.d.ts +5 -0
- package/models/components/cardtransactiondetails.d.ts.map +1 -1
- package/models/components/cardtransactiondetails.js +2 -0
- package/models/components/cardtransactiondetails.js.map +1 -1
- package/models/components/cardtransactionstatus.d.ts +1 -0
- package/models/components/cardtransactionstatus.d.ts.map +1 -1
- package/models/components/cardtransactionstatus.js +1 -0
- package/models/components/cardtransactionstatus.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/createtransferdestinationcard.d.ts +5 -0
- package/models/components/createtransferdestinationcard.d.ts.map +1 -1
- package/models/components/createtransferdestinationcard.js +2 -0
- package/models/components/createtransferdestinationcard.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 +8 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -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/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/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/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/{createauthorizeduserupdate.js → transfercontrols.js} +20 -17
- 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/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/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/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/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/capability.ts +7 -1
- package/src/models/components/capabilityid.ts +14 -2
- package/src/models/components/cardtransactiondetails.ts +7 -0
- package/src/models/components/cardtransactionstatus.ts +1 -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/createtransferdestinationcard.ts +7 -0
- package/src/models/components/customamountpaymentdetailserror.ts +86 -0
- package/src/models/components/fullissuedcard.ts +35 -17
- package/src/models/components/index.ts +8 -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/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/requestcard.ts +23 -34
- 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/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/createinvoiceerror.ts +7 -7
- package/src/models/errors/createpaymentlinkerror.ts +13 -0
- package/src/models/errors/requestcarderror.ts +26 -27
- 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
|
@@ -13,6 +13,7 @@ export type UpdatePaymentLinkErrorData = {
|
|
|
13
13
|
display?: components.DisplayOptionsError | undefined;
|
|
14
14
|
payment?: components.PaymentDetailsError | undefined;
|
|
15
15
|
payout?: components.PayoutDetailsError | undefined;
|
|
16
|
+
customAmountPayment?: components.CustomAmountPaymentDetailsError | undefined;
|
|
16
17
|
lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
|
|
17
18
|
amountDetails?:
|
|
18
19
|
| components.UpdatePaymentLinkAmountDetailsValidationError
|
|
@@ -25,6 +26,7 @@ export class UpdatePaymentLinkError extends MoovError {
|
|
|
25
26
|
display?: components.DisplayOptionsError | undefined;
|
|
26
27
|
payment?: components.PaymentDetailsError | undefined;
|
|
27
28
|
payout?: components.PayoutDetailsError | undefined;
|
|
29
|
+
customAmountPayment?: components.CustomAmountPaymentDetailsError | undefined;
|
|
28
30
|
lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
|
|
29
31
|
amountDetails?:
|
|
30
32
|
| components.UpdatePaymentLinkAmountDetailsValidationError
|
|
@@ -47,6 +49,9 @@ export class UpdatePaymentLinkError extends MoovError {
|
|
|
47
49
|
if (err.display != null) this.display = err.display;
|
|
48
50
|
if (err.payment != null) this.payment = err.payment;
|
|
49
51
|
if (err.payout != null) this.payout = err.payout;
|
|
52
|
+
if (err.customAmountPayment != null) {
|
|
53
|
+
this.customAmountPayment = err.customAmountPayment;
|
|
54
|
+
}
|
|
50
55
|
if (err.lineItems != null) this.lineItems = err.lineItems;
|
|
51
56
|
if (err.amountDetails != null) this.amountDetails = err.amountDetails;
|
|
52
57
|
|
|
@@ -65,6 +70,9 @@ export const UpdatePaymentLinkError$inboundSchema: z.ZodType<
|
|
|
65
70
|
display: types.optional(components.DisplayOptionsError$inboundSchema),
|
|
66
71
|
payment: types.optional(components.PaymentDetailsError$inboundSchema),
|
|
67
72
|
payout: types.optional(components.PayoutDetailsError$inboundSchema),
|
|
73
|
+
customAmountPayment: types.optional(
|
|
74
|
+
components.CustomAmountPaymentDetailsError$inboundSchema,
|
|
75
|
+
),
|
|
68
76
|
lineItems: types.optional(
|
|
69
77
|
components.CreatePaymentLinkLineItemsValidationError$inboundSchema,
|
|
70
78
|
),
|
|
@@ -90,6 +98,9 @@ export type UpdatePaymentLinkError$Outbound = {
|
|
|
90
98
|
display?: components.DisplayOptionsError$Outbound | undefined;
|
|
91
99
|
payment?: components.PaymentDetailsError$Outbound | undefined;
|
|
92
100
|
payout?: components.PayoutDetailsError$Outbound | undefined;
|
|
101
|
+
customAmountPayment?:
|
|
102
|
+
| components.CustomAmountPaymentDetailsError$Outbound
|
|
103
|
+
| undefined;
|
|
93
104
|
lineItems?:
|
|
94
105
|
| components.CreatePaymentLinkLineItemsValidationError$Outbound
|
|
95
106
|
| undefined;
|
|
@@ -111,6 +122,8 @@ export const UpdatePaymentLinkError$outboundSchema: z.ZodType<
|
|
|
111
122
|
display: components.DisplayOptionsError$outboundSchema.optional(),
|
|
112
123
|
payment: components.PaymentDetailsError$outboundSchema.optional(),
|
|
113
124
|
payout: components.PayoutDetailsError$outboundSchema.optional(),
|
|
125
|
+
customAmountPayment: components
|
|
126
|
+
.CustomAmountPaymentDetailsError$outboundSchema.optional(),
|
|
114
127
|
lineItems: components
|
|
115
128
|
.CreatePaymentLinkLineItemsValidationError$outboundSchema.optional(),
|
|
116
129
|
amountDetails: components
|
|
@@ -17,7 +17,13 @@ export type DisableCapabilityRequest = {
|
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
*
|
|
20
|
-
*
|
|
20
|
+
* **Deprecated capabilities**
|
|
21
|
+
*
|
|
22
|
+
* The `send-funds`, `collect-funds`, and `wallet` capability IDs are deprecated. Request granular capabilities instead (for example, `send-funds.ach`, `collect-funds.card-payments`, or `wallet.balance`). Deprecated values will be removed in a future API version.
|
|
23
|
+
*
|
|
24
|
+
* Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to choose the right capabilities for your integration.
|
|
25
|
+
*
|
|
26
|
+
* The `production-app`, `platform.production-app`, and / or `platform.wallet-transfers` capabilities might appear in the list for your Partner account. These are read-only capabilities that Moov requests. These capabilities remain active with your account and require no additional action.
|
|
21
27
|
*/
|
|
22
28
|
capabilityID: components.CapabilityID;
|
|
23
29
|
};
|
|
@@ -17,7 +17,13 @@ export type GetCapabilityRequest = {
|
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
*
|
|
20
|
-
*
|
|
20
|
+
* **Deprecated capabilities**
|
|
21
|
+
*
|
|
22
|
+
* The `send-funds`, `collect-funds`, and `wallet` capability IDs are deprecated. Request granular capabilities instead (for example, `send-funds.ach`, `collect-funds.card-payments`, or `wallet.balance`). Deprecated values will be removed in a future API version.
|
|
23
|
+
*
|
|
24
|
+
* Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to choose the right capabilities for your integration.
|
|
25
|
+
*
|
|
26
|
+
* The `production-app`, `platform.production-app`, and / or `platform.wallet-transfers` capabilities might appear in the list for your Partner account. These are read-only capabilities that Moov requests. These capabilities remain active with your account and require no additional action.
|
|
21
27
|
*/
|
|
22
28
|
capabilityID: components.CapabilityID;
|
|
23
29
|
};
|
|
@@ -112,6 +112,7 @@ export * from "./listaccounts.js";
|
|
|
112
112
|
export * from "./listaccountterminalapplications.js";
|
|
113
113
|
export * from "./listadjustments.js";
|
|
114
114
|
export * from "./listbankaccounts.js";
|
|
115
|
+
export * from "./listcancellations.js";
|
|
115
116
|
export * from "./listcapabilities.js";
|
|
116
117
|
export * from "./listcards.js";
|
|
117
118
|
export * from "./listconnectedaccountsforaccount.js";
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type ListCancellationsRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* Moov account ID of the partner or transfer's source or destination.
|
|
16
|
+
*/
|
|
17
|
+
accountID: string;
|
|
18
|
+
/**
|
|
19
|
+
* Identifier for the transfer.
|
|
20
|
+
*/
|
|
21
|
+
transferID: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type ListCancellationsResponse = {
|
|
25
|
+
headers: { [k: string]: Array<string> };
|
|
26
|
+
result: Array<components.Cancellation>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const ListCancellationsRequest$inboundSchema: z.ZodType<
|
|
31
|
+
ListCancellationsRequest,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
accountID: types.string(),
|
|
36
|
+
transferID: types.string(),
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ListCancellationsRequest$Outbound = {
|
|
40
|
+
accountID: string;
|
|
41
|
+
transferID: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const ListCancellationsRequest$outboundSchema: z.ZodType<
|
|
46
|
+
ListCancellationsRequest$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
ListCancellationsRequest
|
|
49
|
+
> = z.object({
|
|
50
|
+
accountID: z.string(),
|
|
51
|
+
transferID: z.string(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function listCancellationsRequestToJSON(
|
|
55
|
+
listCancellationsRequest: ListCancellationsRequest,
|
|
56
|
+
): string {
|
|
57
|
+
return JSON.stringify(
|
|
58
|
+
ListCancellationsRequest$outboundSchema.parse(listCancellationsRequest),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export function listCancellationsRequestFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<ListCancellationsRequest, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => ListCancellationsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'ListCancellationsRequest' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const ListCancellationsResponse$inboundSchema: z.ZodType<
|
|
73
|
+
ListCancellationsResponse,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
unknown
|
|
76
|
+
> = z.object({
|
|
77
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
78
|
+
Result: z.array(components.Cancellation$inboundSchema),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
"Headers": "headers",
|
|
82
|
+
"Result": "result",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
/** @internal */
|
|
86
|
+
export type ListCancellationsResponse$Outbound = {
|
|
87
|
+
Headers: { [k: string]: Array<string> };
|
|
88
|
+
Result: Array<components.Cancellation$Outbound>;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const ListCancellationsResponse$outboundSchema: z.ZodType<
|
|
93
|
+
ListCancellationsResponse$Outbound,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
ListCancellationsResponse
|
|
96
|
+
> = z.object({
|
|
97
|
+
headers: z.record(z.array(z.string())),
|
|
98
|
+
result: z.array(components.Cancellation$outboundSchema),
|
|
99
|
+
}).transform((v) => {
|
|
100
|
+
return remap$(v, {
|
|
101
|
+
headers: "Headers",
|
|
102
|
+
result: "Result",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export function listCancellationsResponseToJSON(
|
|
107
|
+
listCancellationsResponse: ListCancellationsResponse,
|
|
108
|
+
): string {
|
|
109
|
+
return JSON.stringify(
|
|
110
|
+
ListCancellationsResponse$outboundSchema.parse(listCancellationsResponse),
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
export function listCancellationsResponseFromJSON(
|
|
114
|
+
jsonString: string,
|
|
115
|
+
): SafeParseResult<ListCancellationsResponse, SDKValidationError> {
|
|
116
|
+
return safeParse(
|
|
117
|
+
jsonString,
|
|
118
|
+
(x) => ListCancellationsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
119
|
+
`Failed to parse 'ListCancellationsResponse' from JSON`,
|
|
120
|
+
);
|
|
121
|
+
}
|
package/src/sdk/accounts.ts
CHANGED
|
@@ -20,21 +20,19 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
20
20
|
|
|
21
21
|
export class Accounts extends ClientSDK {
|
|
22
22
|
/**
|
|
23
|
-
* You can create
|
|
24
|
-
* information to Moov. Requirements differ per account type and requested [capabilities](https://docs.moov.io/guides/accounts/capabilities/requirements/).
|
|
23
|
+
* You can create business or individual accounts for your users (i.e., customers, merchants) by passing the required information to Moov. Requirements differ per account type and requested [capabilities](https://docs.moov.io/guides/accounts/capabilities/reference/).
|
|
25
24
|
*
|
|
26
|
-
* If you
|
|
27
|
-
* + Send Moov the user [platform terms of service agreement](https://docs.moov.io/guides/accounts/requirements/platform-agreement/) acceptance.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
25
|
+
* The `transfers` capability is automatically requested for every account. If you request any capability beyond `transfers` (for example, `send-funds.ach`, `collect-funds.card-payments`), you'll need to:
|
|
26
|
+
* + Send Moov the user's [platform terms of service agreement](https://docs.moov.io/guides/accounts/requirements/platform-agreement/) acceptance. This can be done at account creation, or by [patching](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account using the `termsOfService` field.
|
|
27
|
+
* + Fulfill the [verification and underwriting requirements](https://docs.moov.io/guides/accounts/requirements/) for each requested capability. A capability isn't enabled until its requirements pass — check the capability's status to see what's still outstanding.
|
|
28
|
+
*
|
|
29
|
+
* If you're creating a business account, depending on the business type, you'll also need to:
|
|
30
30
|
* + Provide [business representatives](https://docs.moov.io/api/moov-accounts/representatives/) after creating the account.
|
|
31
31
|
* + [Patch](https://docs.moov.io/api/moov-accounts/accounts/patch/) the account to indicate that business representative ownership information is complete.
|
|
32
32
|
*
|
|
33
|
-
* Visit our documentation to read more about [creating accounts](https://docs.moov.io/guides/accounts/create-accounts/) and [verification requirements](https://docs.moov.io/guides/accounts/requirements/identity-verification/).
|
|
34
|
-
* Note that the `mode` field (for production or sandbox) is only required when creating a _facilitator_ account. All non-facilitator account requests will ignore the mode field and be set to the calling facilitator's mode.
|
|
33
|
+
* Visit our documentation to read more about [creating accounts](https://docs.moov.io/guides/accounts/create-accounts/) and [verification requirements](https://docs.moov.io/guides/accounts/requirements/identity-verification/). Note that the `mode` field (for production or sandbox) is only required when creating a Partner account. All other account requests will ignore the mode field and be set to the calling Partner account's mode.
|
|
35
34
|
*
|
|
36
|
-
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
37
|
-
* to specify the `/accounts.write` scope.
|
|
35
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts.write` scope.
|
|
38
36
|
*/
|
|
39
37
|
async create(
|
|
40
38
|
request: components.CreateAccount,
|
package/src/sdk/capabilities.ts
CHANGED
|
@@ -14,7 +14,7 @@ export class Capabilities extends ClientSDK {
|
|
|
14
14
|
/**
|
|
15
15
|
* Retrieve all the capabilities an account has requested.
|
|
16
16
|
*
|
|
17
|
-
* Read our [capabilities
|
|
17
|
+
* Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
18
18
|
*
|
|
19
19
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
20
20
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
@@ -31,7 +31,7 @@ export class Capabilities extends ClientSDK {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* Request capabilities for a specific account. Read our [capabilities
|
|
34
|
+
* Request capabilities for a specific account. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
35
35
|
*
|
|
36
36
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
37
37
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
|
@@ -48,7 +48,7 @@ export class Capabilities extends ClientSDK {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Retrieve a specific capability that an account has requested. Read our [capabilities
|
|
51
|
+
* Retrieve a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
52
52
|
*
|
|
53
53
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
54
54
|
* you'll need to specify the `/accounts/{accountID}/capabilities.read` scope.
|
|
@@ -65,7 +65,7 @@ export class Capabilities extends ClientSDK {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* Disable a specific capability that an account has requested. Read our [capabilities
|
|
68
|
+
* Disable a specific capability that an account has requested. Read our [capabilities reference](https://docs.moov.io/guides/accounts/capabilities/reference/) to learn more.
|
|
69
69
|
*
|
|
70
70
|
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
71
71
|
* you'll need to specify the `/accounts/{accountID}/capabilities.write` scope.
|
package/src/sdk/transfers.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { transfersGetCancellation } from "../funcs/transfersGetCancellation.js";
|
|
|
12
12
|
import { transfersGetRefund } from "../funcs/transfersGetRefund.js";
|
|
13
13
|
import { transfersInitiateRefund } from "../funcs/transfersInitiateRefund.js";
|
|
14
14
|
import { transfersList } from "../funcs/transfersList.js";
|
|
15
|
+
import { transfersListCancellations } from "../funcs/transfersListCancellations.js";
|
|
15
16
|
import { transfersListRefunds } from "../funcs/transfersListRefunds.js";
|
|
16
17
|
import { transfersUpdate } from "../funcs/transfersUpdate.js";
|
|
17
18
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -161,6 +162,23 @@ export class Transfers extends ClientSDK {
|
|
|
161
162
|
));
|
|
162
163
|
}
|
|
163
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Get a list of cancellations for a transfer.
|
|
167
|
+
*
|
|
168
|
+
* To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
169
|
+
* to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
170
|
+
*/
|
|
171
|
+
async listCancellations(
|
|
172
|
+
request: operations.ListCancellationsRequest,
|
|
173
|
+
options?: RequestOptions,
|
|
174
|
+
): Promise<operations.ListCancellationsResponse> {
|
|
175
|
+
return unwrapAsync(transfersListCancellations(
|
|
176
|
+
this,
|
|
177
|
+
request,
|
|
178
|
+
options,
|
|
179
|
+
));
|
|
180
|
+
}
|
|
181
|
+
|
|
164
182
|
/**
|
|
165
183
|
* Get details of a cancellation for a transfer.
|
|
166
184
|
*
|
package/src/types/async.ts
CHANGED
|
@@ -21,16 +21,17 @@ export type APICall =
|
|
|
21
21
|
|
|
22
22
|
export class APIPromise<T> implements Promise<T> {
|
|
23
23
|
readonly #promise: Promise<[T, APICall]>;
|
|
24
|
-
|
|
24
|
+
#unwrapped: Promise<T> | null;
|
|
25
25
|
|
|
26
26
|
readonly [Symbol.toStringTag] = "APIPromise";
|
|
27
27
|
|
|
28
28
|
constructor(p: [T, APICall] | Promise<[T, APICall]>) {
|
|
29
29
|
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
30
|
-
this.#unwrapped =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#getUnwrapped(): Promise<T> {
|
|
34
|
+
return (this.#unwrapped ??= this.#promise.then(([value]) => value));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
then<TResult1 = T, TResult2 = never>(
|
|
@@ -55,11 +56,11 @@ export class APIPromise<T> implements Promise<T> {
|
|
|
55
56
|
| null
|
|
56
57
|
| undefined,
|
|
57
58
|
): Promise<T | TResult> {
|
|
58
|
-
return this.#
|
|
59
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
finally(onfinally?: (() => void) | null | undefined): Promise<T> {
|
|
62
|
-
return this.#
|
|
63
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
$inspect(): Promise<[T, APICall]> {
|
package/src/types/primitives.ts
CHANGED
|
@@ -62,24 +62,6 @@ export function number(): z.ZodType<number, z.ZodTypeDef, unknown> {
|
|
|
62
62
|
]);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export function bigint(): z.ZodType<bigint, z.ZodTypeDef, unknown> {
|
|
66
|
-
return z.union([
|
|
67
|
-
z.string().transform((x, ctx) => {
|
|
68
|
-
try {
|
|
69
|
-
return BigInt(x);
|
|
70
|
-
} catch (error) {
|
|
71
|
-
ctx.addIssue({
|
|
72
|
-
code: "invalid_type",
|
|
73
|
-
expected: "bigint",
|
|
74
|
-
received: "string",
|
|
75
|
-
});
|
|
76
|
-
return z.NEVER;
|
|
77
|
-
}
|
|
78
|
-
}),
|
|
79
|
-
zodDefaultToZeroValue(0n),
|
|
80
|
-
]);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
65
|
export function date(): z.ZodType<Date, z.ZodTypeDef, unknown> {
|
|
84
66
|
return z.union([
|
|
85
67
|
z.union([z.string(), zodDefaultToZeroValue(0)]).transform((x) =>
|
|
@@ -106,12 +88,6 @@ export function literal<T extends string | number | boolean>(
|
|
|
106
88
|
return z.union([z.literal(value), zodDefaultToZeroValue(value)]);
|
|
107
89
|
}
|
|
108
90
|
|
|
109
|
-
export function literalBigInt<T extends bigint>(
|
|
110
|
-
value: T,
|
|
111
|
-
): z.ZodType<T, z.ZodTypeDef, unknown> {
|
|
112
|
-
return z.literal(String(value)).transform((x) => BigInt(x)) as any;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
91
|
export function optional<T extends z.ZodType>(t: T) {
|
|
116
92
|
return z.union([
|
|
117
93
|
// Null -> undefined
|
package/types/async.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,OAAO,CAAC,CAAC,CAAC;;IAI9C,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB;gBAEjC,CAA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C,OAAO,CAAC,CAAC,GACjD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC;IAIvB,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CAGlC"}
|
package/types/async.js
CHANGED
|
@@ -13,32 +13,33 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _APIPromise_promise, _APIPromise_unwrapped, _a;
|
|
16
|
+
var _APIPromise_instances, _APIPromise_promise, _APIPromise_unwrapped, _APIPromise_getUnwrapped, _a;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.APIPromise = void 0;
|
|
19
19
|
class APIPromise {
|
|
20
20
|
constructor(p) {
|
|
21
|
+
_APIPromise_instances.add(this);
|
|
21
22
|
_APIPromise_promise.set(this, void 0);
|
|
22
23
|
_APIPromise_unwrapped.set(this, void 0);
|
|
23
24
|
this[_a] = "APIPromise";
|
|
24
25
|
__classPrivateFieldSet(this, _APIPromise_promise, p instanceof Promise ? p : Promise.resolve(p), "f");
|
|
25
|
-
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise
|
|
26
|
-
? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value)
|
|
27
|
-
: Promise.resolve(p[0]), "f");
|
|
26
|
+
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise ? null : Promise.resolve(p[0]), "f");
|
|
28
27
|
}
|
|
29
28
|
then(onfulfilled, onrejected) {
|
|
30
29
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f").then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
|
|
31
30
|
}
|
|
32
31
|
catch(onrejected) {
|
|
33
|
-
return __classPrivateFieldGet(this,
|
|
32
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).catch(onrejected);
|
|
34
33
|
}
|
|
35
34
|
finally(onfinally) {
|
|
36
|
-
return __classPrivateFieldGet(this,
|
|
35
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).finally(onfinally);
|
|
37
36
|
}
|
|
38
37
|
$inspect() {
|
|
39
38
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f");
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
exports.APIPromise = APIPromise;
|
|
43
|
-
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _a = Symbol.toStringTag
|
|
42
|
+
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _APIPromise_instances = new WeakSet(), _a = Symbol.toStringTag, _APIPromise_getUnwrapped = function _APIPromise_getUnwrapped() {
|
|
43
|
+
return (__classPrivateFieldSet(this, _APIPromise_unwrapped, __classPrivateFieldGet(this, _APIPromise_unwrapped, "f") ?? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value), "f"));
|
|
44
|
+
};
|
|
44
45
|
//# sourceMappingURL=async.js.map
|
package/types/async.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAAU;IAMrB,YAAY,CAAuC
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAA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, z.ZodTypeDef, unknown>;
|
|
3
3
|
export declare function boolean(): z.ZodType<boolean, z.ZodTypeDef, unknown>;
|
|
4
4
|
export declare function number(): z.ZodType<number, z.ZodTypeDef, unknown>;
|
|
5
|
-
export declare function bigint(): z.ZodType<bigint, z.ZodTypeDef, unknown>;
|
|
6
5
|
export declare function date(): z.ZodType<Date, z.ZodTypeDef, unknown>;
|
|
7
6
|
export declare function literal<T extends string | number | boolean>(value: T): z.ZodType<T, z.ZodTypeDef, unknown>;
|
|
8
|
-
export declare function literalBigInt<T extends bigint>(value: T): z.ZodType<T, z.ZodTypeDef, unknown>;
|
|
9
7
|
export declare function optional<T extends z.ZodType>(t: T): z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodNull, never, null>, T]>>;
|
|
10
8
|
export declare function nullable<T extends z.ZodType>(t: T): z.ZodUnion<[z.ZodNull, z.ZodEffects<z.ZodUndefined, never, undefined>, T]>;
|
|
11
9
|
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/types/primitives.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAUjE;AAED,wBAAgB,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAmBnE;AAED,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAqBjE;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/types/primitives.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAUjE;AAED,wBAAgB,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAmBnE;AAED,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAqBjE;AAED,wBAAgB,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAkB7D;AAED,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,EACzD,KAAK,EAAE,CAAC,GACP,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAErC;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,wEAMjD;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,8EAQjD"}
|
package/types/primitives.js
CHANGED
|
@@ -39,10 +39,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.string = string;
|
|
40
40
|
exports.boolean = boolean;
|
|
41
41
|
exports.number = number;
|
|
42
|
-
exports.bigint = bigint;
|
|
43
42
|
exports.date = date;
|
|
44
43
|
exports.literal = literal;
|
|
45
|
-
exports.literalBigInt = literalBigInt;
|
|
46
44
|
exports.optional = optional;
|
|
47
45
|
exports.nullable = nullable;
|
|
48
46
|
const z = __importStar(require("zod/v3"));
|
|
@@ -97,24 +95,6 @@ function number() {
|
|
|
97
95
|
zodDefaultToZeroValue(0),
|
|
98
96
|
]);
|
|
99
97
|
}
|
|
100
|
-
function bigint() {
|
|
101
|
-
return z.union([
|
|
102
|
-
z.string().transform((x, ctx) => {
|
|
103
|
-
try {
|
|
104
|
-
return BigInt(x);
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
ctx.addIssue({
|
|
108
|
-
code: "invalid_type",
|
|
109
|
-
expected: "bigint",
|
|
110
|
-
received: "string",
|
|
111
|
-
});
|
|
112
|
-
return z.NEVER;
|
|
113
|
-
}
|
|
114
|
-
}),
|
|
115
|
-
zodDefaultToZeroValue(0n),
|
|
116
|
-
]);
|
|
117
|
-
}
|
|
118
98
|
function date() {
|
|
119
99
|
return z.union([
|
|
120
100
|
z.union([z.string(), zodDefaultToZeroValue(0)]).transform((x) => new Date(x)).pipe(z.date()),
|
|
@@ -135,9 +115,6 @@ function date() {
|
|
|
135
115
|
function literal(value) {
|
|
136
116
|
return z.union([z.literal(value), zodDefaultToZeroValue(value)]);
|
|
137
117
|
}
|
|
138
|
-
function literalBigInt(value) {
|
|
139
|
-
return z.literal(String(value)).transform((x) => BigInt(x));
|
|
140
|
-
}
|
|
141
118
|
function optional(t) {
|
|
142
119
|
return z.union([
|
|
143
120
|
// Null -> undefined
|
package/types/primitives.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../src/types/primitives.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMH,wBAUC;AAED,0BAmBC;AAED,wBAqBC;AAED,
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../src/types/primitives.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMH,wBAUC;AAED,0BAmBC;AAED,wBAqBC;AAED,oBAkBC;AAED,0BAIC;AAED,4BAMC;AAED,4BAQC;AAtGD,0CAA4B;AAC5B,mEAA6D;AAC7D,uDAAiD;AAEjD,SAAgB,MAAM;IACpB,OAAO,CAAC,CAAC,KAAK,CA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,CAAC;AAED,SAAgB,QAAQ,CAAsB,CAAI;IAChD,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,oBAAoB;QACpB,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAA,8BAAY,EAAC,SAAS,CAAC,CAAC;QACjD,CAAC;KACF,CAAC,CAAC,QAAQ,EAAE,CAAC;AAChB,CAAC;AAED,SAAgB,QAAQ,CAAsB,CAAI;IAChD,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,CAAC,CAAC,IAAI,EAAE;QAER,oBAAoB;QACpB,CAAC,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAA,0CAAkB,EAAC,IAAI,CAAC,CAAC;QACvD,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAC5B,KAAQ;IAER,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACtC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,IAAA,0CAAkB,EAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,IAAA,0CAAkB,EAAC,KAAK,CAAC,CAAC;QACrD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE,WAAW;YACrB,QAAQ,EAAE,SAAS;SACpB,CAAC,CAAC;QACH,OAAO,CAAC,CAAC,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/lib/dlv.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param obj The object to walk
|
|
3
|
-
* @param key The key path to walk the object with
|
|
4
|
-
* @param def A default value to return if the result is undefined
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* dlv(obj, "a.b.c.d")
|
|
8
|
-
* @example
|
|
9
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
10
|
-
* @example
|
|
11
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
12
|
-
*/
|
|
13
|
-
export declare function dlv<T = any>(obj: any, key: string | string[], def?: T, p?: number, undef?: never): T | undefined;
|
|
14
|
-
//# sourceMappingURL=dlv.d.ts.map
|
package/lib/dlv.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.d.ts","sourceRoot":"","sources":["../src/lib/dlv.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EACtB,GAAG,CAAC,EAAE,CAAC,EACP,CAAC,CAAC,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,KAAK,GACZ,CAAC,GAAG,SAAS,CAOf"}
|
package/lib/dlv.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.dlv = dlv;
|
|
7
|
-
/*
|
|
8
|
-
MIT License
|
|
9
|
-
|
|
10
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
13
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
14
|
-
the Software without restriction, including without limitation the rights to
|
|
15
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
16
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
17
|
-
subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
24
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
25
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
26
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
27
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* @param obj The object to walk
|
|
31
|
-
* @param key The key path to walk the object with
|
|
32
|
-
* @param def A default value to return if the result is undefined
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* dlv(obj, "a.b.c.d")
|
|
36
|
-
* @example
|
|
37
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
38
|
-
* @example
|
|
39
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
40
|
-
*/
|
|
41
|
-
function dlv(obj, key, def, p, undef) {
|
|
42
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
43
|
-
for (p = 0; p < key.length; p++) {
|
|
44
|
-
const k = key[p];
|
|
45
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
46
|
-
}
|
|
47
|
-
return obj === undef ? def : obj;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=dlv.js.map
|
package/lib/dlv.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.js","sourceRoot":"","sources":["../src/lib/dlv.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAqCH,kBAaC;AAhDD;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF;;;;;;;;;;;GAWG;AACH,SAAgB,GAAG,CACjB,GAAQ,EACR,GAAsB,EACtB,GAAO,EACP,CAAU,EACV,KAAa;IAEb,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC;IACD,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC"}
|
package/lib/is-plain-object.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.d.ts","sourceRoot":"","sources":["../src/lib/is-plain-object.ts"],"names":[],"mappings":"AA6BA,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAa7D"}
|