@moovio/sdk 0.11.5 → 0.12.1
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/FUNCTIONS.md +7 -104
- package/README.md +110 -560
- package/bin/mcp-server.js +2663 -1992
- package/bin/mcp-server.js.map +172 -152
- package/docs/sdks/accounts/README.md +79 -261
- package/docs/sdks/accountterminalapplications/README.md +28 -36
- package/docs/sdks/adjustments/README.md +20 -24
- package/docs/sdks/applepay/README.md +47 -57
- package/docs/sdks/authentication/README.md +14 -18
- package/docs/sdks/avatars/README.md +7 -9
- package/docs/sdks/bankaccounts/README.md +99 -117
- package/docs/sdks/branding/README.md +36 -44
- package/docs/sdks/capabilities/README.md +38 -46
- package/docs/sdks/cardissuing/README.md +57 -83
- package/docs/sdks/cards/README.md +45 -85
- package/docs/sdks/disputes/README.md +131 -153
- package/docs/sdks/endtoendencryption/README.md +14 -18
- package/docs/sdks/enrichedaddress/README.md +7 -9
- package/docs/sdks/enrichedprofile/README.md +9 -11
- package/docs/sdks/feeplans/README.md +65 -79
- package/docs/sdks/files/README.md +29 -35
- package/docs/sdks/industries/README.md +11 -13
- package/docs/sdks/institutions/README.md +98 -9
- package/docs/sdks/issuingtransactions/README.md +51 -61
- package/docs/sdks/onboarding/README.md +30 -206
- package/docs/sdks/paymentlinks/README.md +58 -128
- package/docs/sdks/paymentmethods/README.md +20 -24
- package/docs/sdks/ping/README.md +7 -9
- package/docs/sdks/receipts/README.md +19 -33
- package/docs/sdks/representatives/README.md +53 -71
- package/docs/sdks/scheduling/README.md +76 -88
- package/docs/sdks/sweeps/README.md +64 -76
- package/docs/sdks/terminalapplications/README.md +28 -36
- package/docs/sdks/transfers/README.md +127 -195
- package/docs/sdks/underwriting/README.md +44 -48
- package/docs/sdks/wallets/README.md +20 -24
- package/docs/sdks/wallettransactions/README.md +24 -28
- package/funcs/accountTerminalApplicationsGet.js +2 -0
- package/funcs/accountTerminalApplicationsGet.js.map +1 -1
- package/funcs/accountTerminalApplicationsGetConfiguration.js +2 -0
- package/funcs/accountTerminalApplicationsGetConfiguration.js.map +1 -1
- package/funcs/accountTerminalApplicationsLink.js +2 -0
- package/funcs/accountTerminalApplicationsLink.js.map +1 -1
- package/funcs/accountTerminalApplicationsList.js +2 -0
- package/funcs/accountTerminalApplicationsList.js.map +1 -1
- package/funcs/accountsAssignCountries.js +2 -0
- package/funcs/accountsAssignCountries.js.map +1 -1
- package/funcs/accountsCreate.js +2 -0
- package/funcs/accountsCreate.js.map +1 -1
- package/funcs/accountsDisconnect.js +2 -0
- package/funcs/accountsDisconnect.js.map +1 -1
- package/funcs/accountsGet.js +2 -0
- package/funcs/accountsGet.js.map +1 -1
- package/funcs/accountsGetCountries.js +2 -0
- package/funcs/accountsGetCountries.js.map +1 -1
- package/funcs/accountsGetMerchantProcessingAgreement.js +2 -0
- package/funcs/accountsGetMerchantProcessingAgreement.js.map +1 -1
- package/funcs/accountsGetTermsOfServiceToken.js +2 -0
- package/funcs/accountsGetTermsOfServiceToken.js.map +1 -1
- package/funcs/accountsList.js +2 -0
- package/funcs/accountsList.js.map +1 -1
- package/funcs/accountsUpdate.js +2 -0
- package/funcs/accountsUpdate.js.map +1 -1
- package/funcs/adjustmentsGet.js +2 -0
- package/funcs/adjustmentsGet.js.map +1 -1
- package/funcs/adjustmentsList.js +2 -0
- package/funcs/adjustmentsList.js.map +1 -1
- package/funcs/applePayCreateSession.js +2 -0
- package/funcs/applePayCreateSession.js.map +1 -1
- package/funcs/applePayGetMerchantDomains.js +2 -0
- package/funcs/applePayGetMerchantDomains.js.map +1 -1
- package/funcs/applePayLinkToken.js +2 -0
- package/funcs/applePayLinkToken.js.map +1 -1
- package/funcs/applePayRegisterMerchantDomains.js +2 -0
- package/funcs/applePayRegisterMerchantDomains.js.map +1 -1
- package/funcs/applePayUpdateMerchantDomains.js +2 -0
- package/funcs/applePayUpdateMerchantDomains.js.map +1 -1
- package/funcs/authenticationCreateAccessToken.js +2 -0
- package/funcs/authenticationCreateAccessToken.js.map +1 -1
- package/funcs/authenticationRevokeAccessToken.js +2 -0
- package/funcs/authenticationRevokeAccessToken.js.map +1 -1
- package/funcs/avatarsGet.js +2 -0
- package/funcs/avatarsGet.js.map +1 -1
- package/funcs/bankAccountsCompleteMicroDeposits.js +2 -0
- package/funcs/bankAccountsCompleteMicroDeposits.js.map +1 -1
- package/funcs/bankAccountsCompleteVerification.js +2 -0
- package/funcs/bankAccountsCompleteVerification.js.map +1 -1
- package/funcs/bankAccountsDisable.js +2 -0
- package/funcs/bankAccountsDisable.js.map +1 -1
- package/funcs/bankAccountsGet.js +2 -0
- package/funcs/bankAccountsGet.js.map +1 -1
- package/funcs/bankAccountsGetVerification.js +2 -0
- package/funcs/bankAccountsGetVerification.js.map +1 -1
- package/funcs/bankAccountsInitiateMicroDeposits.js +2 -0
- package/funcs/bankAccountsInitiateMicroDeposits.js.map +1 -1
- package/funcs/bankAccountsInitiateVerification.js +2 -0
- package/funcs/bankAccountsInitiateVerification.js.map +1 -1
- package/funcs/bankAccountsLink.js +2 -0
- package/funcs/bankAccountsLink.js.map +1 -1
- package/funcs/bankAccountsList.js +2 -0
- package/funcs/bankAccountsList.js.map +1 -1
- package/funcs/brandingCreate.js +2 -0
- package/funcs/brandingCreate.js.map +1 -1
- package/funcs/brandingGet.js +2 -0
- package/funcs/brandingGet.js.map +1 -1
- package/funcs/brandingUpdate.js +2 -0
- package/funcs/brandingUpdate.js.map +1 -1
- package/funcs/brandingUpsert.js +2 -0
- package/funcs/brandingUpsert.js.map +1 -1
- package/funcs/capabilitiesDisable.js +2 -0
- package/funcs/capabilitiesDisable.js.map +1 -1
- package/funcs/capabilitiesGet.js +2 -0
- package/funcs/capabilitiesGet.js.map +1 -1
- package/funcs/capabilitiesList.js +2 -0
- package/funcs/capabilitiesList.js.map +1 -1
- package/funcs/capabilitiesRequest.js +2 -0
- package/funcs/capabilitiesRequest.js.map +1 -1
- package/funcs/cardIssuingGet.js +2 -0
- package/funcs/cardIssuingGet.js.map +1 -1
- package/funcs/cardIssuingGetFull.js +2 -0
- package/funcs/cardIssuingGetFull.js.map +1 -1
- package/funcs/cardIssuingList.js +2 -0
- package/funcs/cardIssuingList.js.map +1 -1
- package/funcs/cardIssuingRequest.js +2 -0
- package/funcs/cardIssuingRequest.js.map +1 -1
- package/funcs/cardIssuingUpdate.js +2 -0
- package/funcs/cardIssuingUpdate.js.map +1 -1
- package/funcs/cardsDisable.js +2 -0
- package/funcs/cardsDisable.js.map +1 -1
- package/funcs/cardsGet.js +2 -0
- package/funcs/cardsGet.js.map +1 -1
- package/funcs/cardsLink.js +2 -0
- package/funcs/cardsLink.js.map +1 -1
- package/funcs/cardsList.js +2 -0
- package/funcs/cardsList.js.map +1 -1
- package/funcs/cardsUpdate.js +2 -0
- package/funcs/cardsUpdate.js.map +1 -1
- package/funcs/disputesAccept.js +2 -0
- package/funcs/disputesAccept.js.map +1 -1
- package/funcs/disputesDeleteEvidence.js +2 -0
- package/funcs/disputesDeleteEvidence.js.map +1 -1
- package/funcs/disputesGet.js +2 -0
- package/funcs/disputesGet.js.map +1 -1
- package/funcs/disputesGetEvidence.js +2 -0
- package/funcs/disputesGetEvidence.js.map +1 -1
- package/funcs/disputesGetEvidenceData.js +2 -0
- package/funcs/disputesGetEvidenceData.js.map +1 -1
- package/funcs/disputesList.js +2 -0
- package/funcs/disputesList.js.map +1 -1
- package/funcs/disputesListEvidence.js +2 -0
- package/funcs/disputesListEvidence.js.map +1 -1
- package/funcs/disputesSubmitEvidence.js +2 -0
- package/funcs/disputesSubmitEvidence.js.map +1 -1
- package/funcs/disputesUpdateEvidence.js +2 -0
- package/funcs/disputesUpdateEvidence.js.map +1 -1
- package/funcs/disputesUploadEvidenceFile.js +2 -0
- package/funcs/disputesUploadEvidenceFile.js.map +1 -1
- package/funcs/disputesUploadEvidenceText.js +2 -0
- package/funcs/disputesUploadEvidenceText.js.map +1 -1
- package/funcs/endToEndEncryptionGenerateKey.js +2 -0
- package/funcs/endToEndEncryptionGenerateKey.js.map +1 -1
- package/funcs/endToEndEncryptionTestEncryptedToken.js +2 -0
- package/funcs/endToEndEncryptionTestEncryptedToken.js.map +1 -1
- package/funcs/enrichedAddressGet.js +2 -0
- package/funcs/enrichedAddressGet.js.map +1 -1
- package/funcs/enrichedProfileGet.js +2 -0
- package/funcs/enrichedProfileGet.js.map +1 -1
- package/funcs/feePlansCreateFeePlanAgreements.js +2 -0
- package/funcs/feePlansCreateFeePlanAgreements.js.map +1 -1
- package/funcs/feePlansListFeePlanAgreements.js +2 -0
- package/funcs/feePlansListFeePlanAgreements.js.map +1 -1
- package/funcs/feePlansListFeePlans.js +2 -0
- package/funcs/feePlansListFeePlans.js.map +1 -1
- package/funcs/feePlansListFeesFetch.js +2 -0
- package/funcs/feePlansListFeesFetch.js.map +1 -1
- package/funcs/feePlansListPartnerPricing.js +2 -0
- package/funcs/feePlansListPartnerPricing.js.map +1 -1
- package/funcs/feePlansListPartnerPricingAgreements.js +2 -0
- package/funcs/feePlansListPartnerPricingAgreements.js.map +1 -1
- package/funcs/feePlansRetrieveFees.js +2 -0
- package/funcs/feePlansRetrieveFees.js.map +1 -1
- package/funcs/filesGet.js +2 -0
- package/funcs/filesGet.js.map +1 -1
- package/funcs/filesList.js +2 -0
- package/funcs/filesList.js.map +1 -1
- package/funcs/filesUpload.js +2 -0
- package/funcs/filesUpload.js.map +1 -1
- package/funcs/industriesList.d.ts +2 -2
- package/funcs/industriesList.js +4 -2
- package/funcs/industriesList.js.map +1 -1
- package/funcs/institutionsSearch.js +2 -0
- package/funcs/institutionsSearch.js.map +1 -1
- package/funcs/institutionsSearchInstitutions.d.ts +20 -0
- package/funcs/institutionsSearchInstitutions.d.ts.map +1 -0
- package/funcs/institutionsSearchInstitutions.js +129 -0
- package/funcs/institutionsSearchInstitutions.js.map +1 -0
- package/funcs/issuingTransactionsGet.js +2 -0
- package/funcs/issuingTransactionsGet.js.map +1 -1
- package/funcs/issuingTransactionsGetAuthorization.js +2 -0
- package/funcs/issuingTransactionsGetAuthorization.js.map +1 -1
- package/funcs/issuingTransactionsList.js +2 -0
- package/funcs/issuingTransactionsList.js.map +1 -1
- package/funcs/issuingTransactionsListAuthorizationEvents.js +2 -0
- package/funcs/issuingTransactionsListAuthorizationEvents.js.map +1 -1
- package/funcs/issuingTransactionsListAuthorizations.js +2 -0
- package/funcs/issuingTransactionsListAuthorizations.js.map +1 -1
- package/funcs/onboardingCreateInvite.js +2 -0
- package/funcs/onboardingCreateInvite.js.map +1 -1
- package/funcs/onboardingGetInvite.js +2 -0
- package/funcs/onboardingGetInvite.js.map +1 -1
- package/funcs/onboardingListInvites.js +2 -0
- package/funcs/onboardingListInvites.js.map +1 -1
- package/funcs/onboardingRevokeInvite.js +2 -0
- package/funcs/onboardingRevokeInvite.js.map +1 -1
- package/funcs/paymentLinksCreate.js +2 -0
- package/funcs/paymentLinksCreate.js.map +1 -1
- package/funcs/paymentLinksDisable.js +2 -0
- package/funcs/paymentLinksDisable.js.map +1 -1
- package/funcs/paymentLinksGet.js +2 -0
- package/funcs/paymentLinksGet.js.map +1 -1
- package/funcs/paymentLinksGetQRCode.js +2 -0
- package/funcs/paymentLinksGetQRCode.js.map +1 -1
- package/funcs/paymentLinksList.js +2 -0
- package/funcs/paymentLinksList.js.map +1 -1
- package/funcs/paymentLinksUpdate.js +2 -0
- package/funcs/paymentLinksUpdate.js.map +1 -1
- package/funcs/paymentMethodsGet.js +2 -0
- package/funcs/paymentMethodsGet.js.map +1 -1
- package/funcs/paymentMethodsList.js +2 -0
- package/funcs/paymentMethodsList.js.map +1 -1
- package/funcs/pingPing.js +2 -0
- package/funcs/pingPing.js.map +1 -1
- package/funcs/receiptsCreate.js +2 -0
- package/funcs/receiptsCreate.js.map +1 -1
- package/funcs/receiptsList.js +2 -0
- package/funcs/receiptsList.js.map +1 -1
- package/funcs/representativesCreate.js +2 -0
- package/funcs/representativesCreate.js.map +1 -1
- package/funcs/representativesDelete.js +2 -0
- package/funcs/representativesDelete.js.map +1 -1
- package/funcs/representativesGet.js +2 -0
- package/funcs/representativesGet.js.map +1 -1
- package/funcs/representativesList.js +2 -0
- package/funcs/representativesList.js.map +1 -1
- package/funcs/representativesUpdate.js +2 -0
- package/funcs/representativesUpdate.js.map +1 -1
- package/funcs/schedulingCancel.js +2 -0
- package/funcs/schedulingCancel.js.map +1 -1
- package/funcs/schedulingCreate.js +2 -0
- package/funcs/schedulingCreate.js.map +1 -1
- package/funcs/schedulingGet.js +2 -0
- package/funcs/schedulingGet.js.map +1 -1
- package/funcs/schedulingGetOccurrance.js +2 -0
- package/funcs/schedulingGetOccurrance.js.map +1 -1
- package/funcs/schedulingList.js +2 -0
- package/funcs/schedulingList.js.map +1 -1
- package/funcs/schedulingUpdate.js +2 -0
- package/funcs/schedulingUpdate.js.map +1 -1
- package/funcs/sweepsCreateConfig.js +2 -0
- package/funcs/sweepsCreateConfig.js.map +1 -1
- package/funcs/sweepsGet.js +2 -0
- package/funcs/sweepsGet.js.map +1 -1
- package/funcs/sweepsGetConfig.js +2 -0
- package/funcs/sweepsGetConfig.js.map +1 -1
- package/funcs/sweepsList.js +2 -0
- package/funcs/sweepsList.js.map +1 -1
- package/funcs/sweepsListConfigs.js +2 -0
- package/funcs/sweepsListConfigs.js.map +1 -1
- package/funcs/sweepsUpdateConfig.js +2 -0
- package/funcs/sweepsUpdateConfig.js.map +1 -1
- package/funcs/terminalApplicationsCreate.js +2 -0
- package/funcs/terminalApplicationsCreate.js.map +1 -1
- package/funcs/terminalApplicationsDelete.js +2 -0
- package/funcs/terminalApplicationsDelete.js.map +1 -1
- package/funcs/terminalApplicationsGet.js +2 -0
- package/funcs/terminalApplicationsGet.js.map +1 -1
- package/funcs/terminalApplicationsList.js +2 -0
- package/funcs/terminalApplicationsList.js.map +1 -1
- package/funcs/transfersCreate.js +2 -0
- package/funcs/transfersCreate.js.map +1 -1
- package/funcs/transfersCreateCancellation.js +2 -0
- package/funcs/transfersCreateCancellation.js.map +1 -1
- package/funcs/transfersCreateReversal.js +2 -0
- package/funcs/transfersCreateReversal.js.map +1 -1
- package/funcs/transfersGenerateOptions.js +2 -0
- package/funcs/transfersGenerateOptions.js.map +1 -1
- package/funcs/transfersGet.js +2 -0
- package/funcs/transfersGet.js.map +1 -1
- package/funcs/transfersGetCancellation.js +2 -0
- package/funcs/transfersGetCancellation.js.map +1 -1
- package/funcs/transfersGetRefund.js +2 -0
- package/funcs/transfersGetRefund.js.map +1 -1
- package/funcs/transfersInitiateRefund.js +2 -0
- package/funcs/transfersInitiateRefund.js.map +1 -1
- package/funcs/transfersList.js +2 -0
- package/funcs/transfersList.js.map +1 -1
- package/funcs/transfersListRefunds.js +2 -0
- package/funcs/transfersListRefunds.js.map +1 -1
- package/funcs/transfersUpdate.js +2 -0
- package/funcs/transfersUpdate.js.map +1 -1
- package/funcs/underwritingGet.js +2 -0
- package/funcs/underwritingGet.js.map +1 -1
- package/funcs/underwritingUpsert.js +2 -0
- package/funcs/underwritingUpsert.js.map +1 -1
- package/funcs/walletTransactionsGet.js +2 -0
- package/funcs/walletTransactionsGet.js.map +1 -1
- package/funcs/walletTransactionsList.js +2 -0
- package/funcs/walletTransactionsList.js.map +1 -1
- package/funcs/walletsGet.js +2 -0
- package/funcs/walletsGet.js.map +1 -1
- package/funcs/walletsList.js +2 -0
- package/funcs/walletsList.js.map +1 -1
- package/hooks/types.d.ts +2 -0
- package/hooks/types.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +7 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/sdks.d.ts +1 -0
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +3 -3
- package/lib/sdks.js.map +1 -1
- package/mcp-server/cli/start/impl.js +4 -4
- package/mcp-server/cli/start/impl.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/industriesList.js +2 -2
- package/mcp-server/tools/institutionsSearchInstitutions.d.ts +8 -0
- package/mcp-server/tools/institutionsSearchInstitutions.d.ts.map +1 -0
- package/mcp-server/tools/institutionsSearchInstitutions.js +69 -0
- package/mcp-server/tools/institutionsSearchInstitutions.js.map +1 -0
- package/models/components/achinstitution.d.ts +40 -0
- package/models/components/achinstitution.d.ts.map +1 -0
- package/models/components/achinstitution.js +77 -0
- package/models/components/achinstitution.js.map +1 -0
- package/models/components/contact.d.ts +30 -0
- package/models/components/contact.d.ts.map +1 -0
- package/models/components/{enrichedindustry.js → contact.js} +20 -25
- package/models/components/contact.js.map +1 -0
- package/models/components/enrichedindustries.d.ts +3 -3
- package/models/components/enrichedindustries.js +3 -3
- package/models/components/index.d.ts +9 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -1
- package/models/components/index.js.map +1 -1
- package/models/components/industrytaxonomy.d.ts +55 -0
- package/models/components/industrytaxonomy.d.ts.map +1 -0
- package/models/components/industrytaxonomy.js +77 -0
- package/models/components/industrytaxonomy.js.map +1 -0
- package/models/components/institutionssearchresponse.d.ts +36 -0
- package/models/components/institutionssearchresponse.d.ts.map +1 -0
- package/models/components/institutionssearchresponse.js +76 -0
- package/models/components/institutionssearchresponse.js.map +1 -0
- package/models/components/rtpinstitution.d.ts +37 -0
- package/models/components/rtpinstitution.d.ts.map +1 -0
- package/models/components/rtpinstitution.js +74 -0
- package/models/components/rtpinstitution.js.map +1 -0
- package/models/components/rtpservices.d.ts +37 -0
- package/models/components/rtpservices.d.ts.map +1 -0
- package/models/components/rtpservices.js +71 -0
- package/models/components/rtpservices.js.map +1 -0
- package/models/components/sweep.d.ts +6 -0
- package/models/components/sweep.d.ts.map +1 -1
- package/models/components/sweep.js +3 -0
- package/models/components/sweep.js.map +1 -1
- package/models/components/sweepsubtotal.d.ts +44 -0
- package/models/components/sweepsubtotal.d.ts.map +1 -0
- package/models/components/sweepsubtotal.js +75 -0
- package/models/components/sweepsubtotal.js.map +1 -0
- package/models/components/wireinstitution.d.ts +40 -0
- package/models/components/wireinstitution.d.ts.map +1 -0
- package/models/components/wireinstitution.js +77 -0
- package/models/components/wireinstitution.js.map +1 -0
- package/models/components/wireservices.d.ts +42 -0
- package/models/components/wireservices.d.ts.map +1 -0
- package/models/components/wireservices.js +73 -0
- package/models/components/wireservices.js.map +1 -0
- package/models/errors/apierror.d.ts +14 -2
- package/models/errors/apierror.d.ts.map +1 -1
- package/models/errors/apierror.js +1 -1
- package/models/errors/apierror.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/searchinstitutions.d.ts +112 -0
- package/models/operations/searchinstitutions.d.ts.map +1 -0
- package/models/operations/searchinstitutions.js +149 -0
- package/models/operations/searchinstitutions.js.map +1 -0
- package/package.json +2 -2
- package/sdk/industries.d.ts +2 -2
- package/sdk/industries.js +2 -2
- package/sdk/institutions.d.ts +11 -0
- package/sdk/institutions.d.ts.map +1 -1
- package/sdk/institutions.js +14 -0
- package/sdk/institutions.js.map +1 -1
- package/src/funcs/accountTerminalApplicationsGet.ts +2 -0
- package/src/funcs/accountTerminalApplicationsGetConfiguration.ts +2 -0
- package/src/funcs/accountTerminalApplicationsLink.ts +2 -0
- package/src/funcs/accountTerminalApplicationsList.ts +2 -0
- package/src/funcs/accountsAssignCountries.ts +2 -0
- package/src/funcs/accountsCreate.ts +2 -0
- package/src/funcs/accountsDisconnect.ts +2 -0
- package/src/funcs/accountsGet.ts +2 -0
- package/src/funcs/accountsGetCountries.ts +2 -0
- package/src/funcs/accountsGetMerchantProcessingAgreement.ts +2 -0
- package/src/funcs/accountsGetTermsOfServiceToken.ts +2 -0
- package/src/funcs/accountsList.ts +2 -0
- package/src/funcs/accountsUpdate.ts +2 -0
- package/src/funcs/adjustmentsGet.ts +2 -0
- package/src/funcs/adjustmentsList.ts +2 -0
- package/src/funcs/applePayCreateSession.ts +2 -0
- package/src/funcs/applePayGetMerchantDomains.ts +2 -0
- package/src/funcs/applePayLinkToken.ts +2 -0
- package/src/funcs/applePayRegisterMerchantDomains.ts +2 -0
- package/src/funcs/applePayUpdateMerchantDomains.ts +2 -0
- package/src/funcs/authenticationCreateAccessToken.ts +2 -0
- package/src/funcs/authenticationRevokeAccessToken.ts +2 -0
- package/src/funcs/avatarsGet.ts +2 -0
- package/src/funcs/bankAccountsCompleteMicroDeposits.ts +2 -0
- package/src/funcs/bankAccountsCompleteVerification.ts +2 -0
- package/src/funcs/bankAccountsDisable.ts +2 -0
- package/src/funcs/bankAccountsGet.ts +2 -0
- package/src/funcs/bankAccountsGetVerification.ts +2 -0
- package/src/funcs/bankAccountsInitiateMicroDeposits.ts +2 -0
- package/src/funcs/bankAccountsInitiateVerification.ts +2 -0
- package/src/funcs/bankAccountsLink.ts +2 -0
- package/src/funcs/bankAccountsList.ts +2 -0
- package/src/funcs/brandingCreate.ts +2 -0
- package/src/funcs/brandingGet.ts +2 -0
- package/src/funcs/brandingUpdate.ts +2 -0
- package/src/funcs/brandingUpsert.ts +2 -0
- package/src/funcs/capabilitiesDisable.ts +2 -0
- package/src/funcs/capabilitiesGet.ts +2 -0
- package/src/funcs/capabilitiesList.ts +2 -0
- package/src/funcs/capabilitiesRequest.ts +2 -0
- package/src/funcs/cardIssuingGet.ts +2 -0
- package/src/funcs/cardIssuingGetFull.ts +2 -0
- package/src/funcs/cardIssuingList.ts +2 -0
- package/src/funcs/cardIssuingRequest.ts +2 -0
- package/src/funcs/cardIssuingUpdate.ts +2 -0
- package/src/funcs/cardsDisable.ts +2 -0
- package/src/funcs/cardsGet.ts +2 -0
- package/src/funcs/cardsLink.ts +2 -0
- package/src/funcs/cardsList.ts +2 -0
- package/src/funcs/cardsUpdate.ts +2 -0
- package/src/funcs/disputesAccept.ts +2 -0
- package/src/funcs/disputesDeleteEvidence.ts +2 -0
- package/src/funcs/disputesGet.ts +2 -0
- package/src/funcs/disputesGetEvidence.ts +2 -0
- package/src/funcs/disputesGetEvidenceData.ts +2 -0
- package/src/funcs/disputesList.ts +2 -0
- package/src/funcs/disputesListEvidence.ts +2 -0
- package/src/funcs/disputesSubmitEvidence.ts +2 -0
- package/src/funcs/disputesUpdateEvidence.ts +2 -0
- package/src/funcs/disputesUploadEvidenceFile.ts +2 -0
- package/src/funcs/disputesUploadEvidenceText.ts +2 -0
- package/src/funcs/endToEndEncryptionGenerateKey.ts +2 -0
- package/src/funcs/endToEndEncryptionTestEncryptedToken.ts +2 -0
- package/src/funcs/enrichedAddressGet.ts +2 -0
- package/src/funcs/enrichedProfileGet.ts +2 -0
- package/src/funcs/feePlansCreateFeePlanAgreements.ts +2 -0
- package/src/funcs/feePlansListFeePlanAgreements.ts +2 -0
- package/src/funcs/feePlansListFeePlans.ts +2 -0
- package/src/funcs/feePlansListFeesFetch.ts +2 -0
- package/src/funcs/feePlansListPartnerPricing.ts +2 -0
- package/src/funcs/feePlansListPartnerPricingAgreements.ts +2 -0
- package/src/funcs/feePlansRetrieveFees.ts +2 -0
- package/src/funcs/filesGet.ts +2 -0
- package/src/funcs/filesList.ts +2 -0
- package/src/funcs/filesUpload.ts +2 -0
- package/src/funcs/industriesList.ts +4 -2
- package/src/funcs/institutionsSearch.ts +2 -0
- package/src/funcs/institutionsSearchInstitutions.ts +179 -0
- package/src/funcs/issuingTransactionsGet.ts +2 -0
- package/src/funcs/issuingTransactionsGetAuthorization.ts +2 -0
- package/src/funcs/issuingTransactionsList.ts +2 -0
- package/src/funcs/issuingTransactionsListAuthorizationEvents.ts +2 -0
- package/src/funcs/issuingTransactionsListAuthorizations.ts +2 -0
- package/src/funcs/onboardingCreateInvite.ts +2 -0
- package/src/funcs/onboardingGetInvite.ts +2 -0
- package/src/funcs/onboardingListInvites.ts +2 -0
- package/src/funcs/onboardingRevokeInvite.ts +2 -0
- package/src/funcs/paymentLinksCreate.ts +2 -0
- package/src/funcs/paymentLinksDisable.ts +2 -0
- package/src/funcs/paymentLinksGet.ts +2 -0
- package/src/funcs/paymentLinksGetQRCode.ts +2 -0
- package/src/funcs/paymentLinksList.ts +2 -0
- package/src/funcs/paymentLinksUpdate.ts +2 -0
- package/src/funcs/paymentMethodsGet.ts +2 -0
- package/src/funcs/paymentMethodsList.ts +2 -0
- package/src/funcs/pingPing.ts +2 -0
- package/src/funcs/receiptsCreate.ts +2 -0
- package/src/funcs/receiptsList.ts +2 -0
- package/src/funcs/representativesCreate.ts +2 -0
- package/src/funcs/representativesDelete.ts +2 -0
- package/src/funcs/representativesGet.ts +2 -0
- package/src/funcs/representativesList.ts +2 -0
- package/src/funcs/representativesUpdate.ts +2 -0
- package/src/funcs/schedulingCancel.ts +2 -0
- package/src/funcs/schedulingCreate.ts +2 -0
- package/src/funcs/schedulingGet.ts +2 -0
- package/src/funcs/schedulingGetOccurrance.ts +2 -0
- package/src/funcs/schedulingList.ts +2 -0
- package/src/funcs/schedulingUpdate.ts +2 -0
- package/src/funcs/sweepsCreateConfig.ts +2 -0
- package/src/funcs/sweepsGet.ts +2 -0
- package/src/funcs/sweepsGetConfig.ts +2 -0
- package/src/funcs/sweepsList.ts +2 -0
- package/src/funcs/sweepsListConfigs.ts +2 -0
- package/src/funcs/sweepsUpdateConfig.ts +2 -0
- package/src/funcs/terminalApplicationsCreate.ts +2 -0
- package/src/funcs/terminalApplicationsDelete.ts +2 -0
- package/src/funcs/terminalApplicationsGet.ts +2 -0
- package/src/funcs/terminalApplicationsList.ts +2 -0
- package/src/funcs/transfersCreate.ts +2 -0
- package/src/funcs/transfersCreateCancellation.ts +2 -0
- package/src/funcs/transfersCreateReversal.ts +2 -0
- package/src/funcs/transfersGenerateOptions.ts +2 -0
- package/src/funcs/transfersGet.ts +2 -0
- package/src/funcs/transfersGetCancellation.ts +2 -0
- package/src/funcs/transfersGetRefund.ts +2 -0
- package/src/funcs/transfersInitiateRefund.ts +2 -0
- package/src/funcs/transfersList.ts +2 -0
- package/src/funcs/transfersListRefunds.ts +2 -0
- package/src/funcs/transfersUpdate.ts +2 -0
- package/src/funcs/underwritingGet.ts +2 -0
- package/src/funcs/underwritingUpsert.ts +2 -0
- package/src/funcs/walletTransactionsGet.ts +2 -0
- package/src/funcs/walletTransactionsList.ts +2 -0
- package/src/funcs/walletsGet.ts +2 -0
- package/src/funcs/walletsList.ts +2 -0
- package/src/hooks/types.ts +2 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +7 -3
- package/src/lib/sdks.ts +10 -4
- package/src/mcp-server/cli/start/impl.ts +4 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/industriesList.ts +2 -2
- package/src/mcp-server/tools/institutionsSearchInstitutions.ts +43 -0
- package/src/models/components/achinstitution.ts +89 -0
- package/src/models/components/contact.ts +65 -0
- package/src/models/components/enrichedindustries.ts +9 -9
- package/src/models/components/index.ts +9 -1
- package/src/models/components/industrytaxonomy.ts +100 -0
- package/src/models/components/institutionssearchresponse.ts +92 -0
- package/src/models/components/rtpinstitution.ts +79 -0
- package/src/models/components/rtpservices.ts +72 -0
- package/src/models/components/sweep.ts +13 -0
- package/src/models/components/sweepsubtotal.ts +90 -0
- package/src/models/components/wireinstitution.ts +91 -0
- package/src/models/components/wireservices.ts +79 -0
- package/src/models/errors/apierror.ts +18 -3
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/searchinstitutions.ts +236 -0
- package/src/sdk/industries.ts +2 -2
- package/src/sdk/institutions.ts +22 -0
- package/test/README.md +2 -0
- package/test/index.ts +1 -0
- package/test/package.json +25 -0
- package/test/setup.ts +119 -0
- package/test/tests/accounts.test.ts +127 -0
- package/test/tests/bankAccounts.test.ts +171 -0
- package/test/tests/capabilities.test.ts +147 -0
- package/test/tests/cards.test.ts +168 -0
- package/test/tests/paymentMethods.test.ts +55 -0
- package/test/tests/representatives.test.ts +83 -0
- package/test/tests/transfers.test.ts +122 -0
- package/test/tests/wallets.test.ts +31 -0
- package/test/tsconfig.json +30 -0
- package/test/utils/utils.ts +276 -0
- package/models/components/enrichedindustry.d.ts +0 -47
- package/models/components/enrichedindustry.d.ts.map +0 -1
- package/models/components/enrichedindustry.js.map +0 -1
- package/src/models/components/enrichedindustry.ts +0 -90
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
2
|
+
import { ids, moov } from "../setup";
|
|
3
|
+
import { createAccount, createBankAccount } from "../utils/utils";
|
|
4
|
+
import type { BankAccount } from "../../models/components";
|
|
5
|
+
import { sleep } from "bun";
|
|
6
|
+
|
|
7
|
+
let accountID = "a920f147-ed53-4aa1-977c-d11cc192979c"; // default account ID
|
|
8
|
+
let bankAccount: Partial<BankAccount> = {};
|
|
9
|
+
let accountNumber = "1234567890";
|
|
10
|
+
|
|
11
|
+
describe("Bank Accounts", () => {
|
|
12
|
+
beforeAll(async () => {
|
|
13
|
+
const account = await createAccount();
|
|
14
|
+
accountID = account.accountID;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test("should be able to link a bank account", async () => {
|
|
18
|
+
const { result } = await moov.bankAccounts.link({
|
|
19
|
+
accountID,
|
|
20
|
+
linkBankAccount: {
|
|
21
|
+
account: {
|
|
22
|
+
holderName: "Marcellus Wallace",
|
|
23
|
+
holderType: "individual",
|
|
24
|
+
accountNumber,
|
|
25
|
+
bankAccountType: "checking",
|
|
26
|
+
routingNumber: "121000248",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
expect(result).toBeDefined();
|
|
31
|
+
expect(result.bankAccountID).toBeDefined();
|
|
32
|
+
expect(result.bankAccountType).toEqual("checking");
|
|
33
|
+
bankAccount = result;
|
|
34
|
+
ids.seen({ accountID, bankAccountID: result.bankAccountID });
|
|
35
|
+
});
|
|
36
|
+
describe("Bank-account dependent tests", () => {
|
|
37
|
+
describe("Getting and listing bank accounts", () => {
|
|
38
|
+
// Create a bank account if it doesn't exist yet
|
|
39
|
+
beforeAll(async () => {
|
|
40
|
+
if (!bankAccount.bankAccountID) {
|
|
41
|
+
const result = await createBankAccount(accountID);
|
|
42
|
+
bankAccount = result.bankAccount;
|
|
43
|
+
accountNumber = result.accountNumber;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
test("should be able to retrieve a bank account", async () => {
|
|
47
|
+
const { result } = await moov.bankAccounts.get({
|
|
48
|
+
accountID,
|
|
49
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
50
|
+
});
|
|
51
|
+
expect(result).toBeDefined();
|
|
52
|
+
expect(result.bankAccountID).toEqual(bankAccount.bankAccountID!);
|
|
53
|
+
expect(result.bankAccountType).toEqual(bankAccount.bankAccountType!);
|
|
54
|
+
expect(result.holderName).toEqual(bankAccount.holderName!);
|
|
55
|
+
expect(result.holderType).toEqual(bankAccount.holderType!);
|
|
56
|
+
expect(result.routingNumber).toEqual(bankAccount.routingNumber!);
|
|
57
|
+
expect(result.lastFourAccountNumber).toEqual(accountNumber.slice(-4));
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test("should be able to list bank accounts", async () => {
|
|
61
|
+
const { result } = await moov.bankAccounts.list({
|
|
62
|
+
accountID,
|
|
63
|
+
});
|
|
64
|
+
expect(result).toBeDefined();
|
|
65
|
+
expect(result.length).toBeGreaterThan(0);
|
|
66
|
+
expect(result[0].bankAccountID).toEqual(bankAccount.bankAccountID!);
|
|
67
|
+
expect(result[0].bankAccountType).toEqual(bankAccount.bankAccountType!);
|
|
68
|
+
expect(result[0].holderName).toEqual(bankAccount.holderName!);
|
|
69
|
+
expect(result[0].holderType).toEqual(bankAccount.holderType!);
|
|
70
|
+
expect(result[0].routingNumber).toEqual(bankAccount.routingNumber!);
|
|
71
|
+
expect(result[0].lastFourAccountNumber).toEqual(accountNumber.slice(-4));
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
describe("Bank account verification", () => {
|
|
76
|
+
beforeEach(async () => {
|
|
77
|
+
const result = await createBankAccount(accountID);
|
|
78
|
+
bankAccount = result.bankAccount;
|
|
79
|
+
accountNumber = result.accountNumber;
|
|
80
|
+
});
|
|
81
|
+
describe("RTP verification", () => {
|
|
82
|
+
test("should be able to initiate bank account verification and complete it, and get a 409 error when I try to verify an already-verified bank account", async () => {
|
|
83
|
+
const { result } = await moov.bankAccounts.initiateVerification({
|
|
84
|
+
accountID,
|
|
85
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
86
|
+
xWaitFor: "rail-response",
|
|
87
|
+
});
|
|
88
|
+
expect(result).toBeDefined();
|
|
89
|
+
expect(result.status).toEqual("sent-credit");
|
|
90
|
+
const { result: result2 } = await moov.bankAccounts.completeVerification({
|
|
91
|
+
accountID,
|
|
92
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
93
|
+
completeBankAccountVerification: {
|
|
94
|
+
code: "0001",
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
expect(result2).toBeDefined();
|
|
98
|
+
expect(result2.status).toEqual("successful");
|
|
99
|
+
expect(
|
|
100
|
+
async () =>
|
|
101
|
+
await moov.bankAccounts.initiateVerification({
|
|
102
|
+
accountID,
|
|
103
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
104
|
+
}),
|
|
105
|
+
).toThrowError(
|
|
106
|
+
expect.objectContaining({ error: "unacceptable bank account status verified for verification" }),
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
test("should be able to get the bank account verification status", async () => {
|
|
110
|
+
const { result } = await moov.bankAccounts.initiateVerification({
|
|
111
|
+
accountID,
|
|
112
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
113
|
+
});
|
|
114
|
+
expect(result).toBeDefined();
|
|
115
|
+
expect(result.status).toEqual("new");
|
|
116
|
+
await sleep(2000);
|
|
117
|
+
const { result: result2 } = await moov.bankAccounts.getVerification({
|
|
118
|
+
accountID,
|
|
119
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
120
|
+
});
|
|
121
|
+
expect(result2).toBeDefined();
|
|
122
|
+
expect(result2.status).toEqual("sent-credit");
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
describe("Micro deposits", () => {
|
|
127
|
+
beforeEach(async () => {
|
|
128
|
+
const result = await createBankAccount(accountID);
|
|
129
|
+
bankAccount = result.bankAccount;
|
|
130
|
+
accountNumber = result.accountNumber;
|
|
131
|
+
});
|
|
132
|
+
test("should be able to initiate micro deposits and complete them and should get a 409 error when we try to complete micro deposits for an already-completed bank account", async () => {
|
|
133
|
+
const result = await moov.bankAccounts.initiateMicroDeposits({
|
|
134
|
+
accountID,
|
|
135
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
136
|
+
});
|
|
137
|
+
expect(result).toBeDefined();
|
|
138
|
+
await sleep(2000);
|
|
139
|
+
const { result: result2 } = await moov.bankAccounts.completeMicroDeposits({
|
|
140
|
+
accountID,
|
|
141
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
142
|
+
completeMicroDeposits: {
|
|
143
|
+
amounts: [0, 0],
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
expect(result2).toBeDefined();
|
|
147
|
+
expect(result2.status).toEqual("verified");
|
|
148
|
+
expect(
|
|
149
|
+
async () =>
|
|
150
|
+
await moov.bankAccounts.initiateMicroDeposits({
|
|
151
|
+
accountID,
|
|
152
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
153
|
+
}),
|
|
154
|
+
).toThrowError(
|
|
155
|
+
expect.objectContaining({
|
|
156
|
+
error: "unexpected account status: expected 'new' or 'verificationFailed', found 'verified'",
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
test("should be able to disable a bank account", async () => {
|
|
164
|
+
const result = await moov.bankAccounts.disable({
|
|
165
|
+
accountID,
|
|
166
|
+
bankAccountID: bankAccount.bankAccountID!,
|
|
167
|
+
});
|
|
168
|
+
expect(result).toBeDefined();
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
});
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
2
|
+
import { createAccount, createRepresentative } from "../utils/utils";
|
|
3
|
+
import type { Account, CapabilityID } from "../../models/components";
|
|
4
|
+
import { moov } from "../setup";
|
|
5
|
+
import { sleep } from "bun";
|
|
6
|
+
|
|
7
|
+
let account: Account;
|
|
8
|
+
|
|
9
|
+
describe("Capabilities", () => {
|
|
10
|
+
beforeAll(async () => {
|
|
11
|
+
account = await createAccount({ capabilities: ["collect-funds"] });
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe("Listing capabilities", () => {
|
|
15
|
+
test("should list capabilities for an account", async () => {
|
|
16
|
+
const { result } = await moov.capabilities.list({
|
|
17
|
+
accountID: account.accountID,
|
|
18
|
+
});
|
|
19
|
+
expect(result).toBeDefined();
|
|
20
|
+
expect(Array.isArray(result)).toBe(true);
|
|
21
|
+
// Capabilities should include some standard capabilities
|
|
22
|
+
expect(result.some((cap) => cap.capability === "transfers")).toBe(true);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("listing capabilities should fail if the account is not found", async () => {
|
|
26
|
+
expect(() =>
|
|
27
|
+
moov.capabilities.list({
|
|
28
|
+
accountID: "not-a-valid-account-id",
|
|
29
|
+
}),
|
|
30
|
+
).toThrowError("API error occurred: Status 403 Content-Type Body ");
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe("Getting specific capabilities", () => {
|
|
35
|
+
test("should get details of a specific capability", async () => {
|
|
36
|
+
const { result } = await moov.capabilities.get({
|
|
37
|
+
accountID: account.accountID,
|
|
38
|
+
capabilityID: "transfers",
|
|
39
|
+
});
|
|
40
|
+
expect(result).toBeDefined();
|
|
41
|
+
expect(result.capability).toBe("transfers");
|
|
42
|
+
expect(result.status).toEqual("enabled");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("should contain currentlyDue for pending capabilities", async () => {
|
|
46
|
+
const { result } = await moov.capabilities.get({
|
|
47
|
+
accountID: account.accountID,
|
|
48
|
+
capabilityID: "collect-funds",
|
|
49
|
+
});
|
|
50
|
+
expect(result).toBeDefined();
|
|
51
|
+
expect(result.requirements?.currentlyDue?.length).toBeGreaterThan(0);
|
|
52
|
+
// somee of the requirements should be business.ein
|
|
53
|
+
expect(result.requirements?.currentlyDue?.some((req) => req === "business.ein")).toBe(true);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test.todo("should contain errors for collect-funds capability", async () => {
|
|
57
|
+
await createRepresentative(account.accountID, {
|
|
58
|
+
birthDate: {
|
|
59
|
+
day: 1,
|
|
60
|
+
month: 1,
|
|
61
|
+
year: 1900, // will fail automatic verification
|
|
62
|
+
},
|
|
63
|
+
email: "a@a.com",
|
|
64
|
+
});
|
|
65
|
+
await sleep(1000);
|
|
66
|
+
const { result } = await moov.capabilities.get({
|
|
67
|
+
accountID: account.accountID,
|
|
68
|
+
capabilityID: "collect-funds",
|
|
69
|
+
});
|
|
70
|
+
expect(result).toBeDefined();
|
|
71
|
+
expect(result.requirements?.errors?.length).toBeGreaterThan(0);
|
|
72
|
+
// some of the errors should be business.ein
|
|
73
|
+
expect(result.requirements?.errors?.some((err) => err.errorCode === "failed-automatic-verification")).toBe(true);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test("getting a capability should fail if the account is not found", async () => {
|
|
77
|
+
expect(() =>
|
|
78
|
+
moov.capabilities.get({
|
|
79
|
+
accountID: "not-a-valid-account-id",
|
|
80
|
+
capabilityID: "transfers",
|
|
81
|
+
}),
|
|
82
|
+
).toThrowError("API error occurred: Status 403 Content-Type Body ");
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test("getting a capability should fail if the capability does not exist", async () => {
|
|
86
|
+
expect(() =>
|
|
87
|
+
moov.capabilities.get({
|
|
88
|
+
accountID: account.accountID,
|
|
89
|
+
capabilityID: "not-a-valid-capability" as CapabilityID,
|
|
90
|
+
}),
|
|
91
|
+
).toThrowError();
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
describe("Requesting capabilities", () => {
|
|
96
|
+
test("should request new capabilities", async () => {
|
|
97
|
+
const { result } = await moov.capabilities.request({
|
|
98
|
+
accountID: account.accountID,
|
|
99
|
+
addCapabilities: {
|
|
100
|
+
capabilities: ["transfers", "send-funds", "collect-funds"],
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
expect(result).toBeDefined();
|
|
104
|
+
expect(result[0].capability).toBe("collect-funds");
|
|
105
|
+
expect(result[0].status).toBeDefined();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test("requesting capabilities should fail if the account is not found", async () => {
|
|
109
|
+
expect(() =>
|
|
110
|
+
moov.capabilities.request({
|
|
111
|
+
accountID: "not-a-valid-account-id",
|
|
112
|
+
addCapabilities: {
|
|
113
|
+
capabilities: ["transfers"],
|
|
114
|
+
},
|
|
115
|
+
}),
|
|
116
|
+
).toThrowError("API error occurred: Status 403 Content-Type Body ");
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
test("requesting capabilities should fail if the capability is invalid", async () => {
|
|
120
|
+
expect(() =>
|
|
121
|
+
moov.capabilities.request({
|
|
122
|
+
accountID: account.accountID,
|
|
123
|
+
addCapabilities: {
|
|
124
|
+
capabilities: ["not-a-valid-capability" as CapabilityID],
|
|
125
|
+
},
|
|
126
|
+
}),
|
|
127
|
+
).toThrowError();
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
test("requesting capabilities should NOT fail if we request the same capability twice", async () => {
|
|
131
|
+
const { result } = await moov.capabilities.request({
|
|
132
|
+
accountID: account.accountID,
|
|
133
|
+
addCapabilities: { capabilities: ["transfers"] },
|
|
134
|
+
});
|
|
135
|
+
expect(result).toBeDefined();
|
|
136
|
+
// capability array should containe "transfers"
|
|
137
|
+
expect(result.some((cap) => cap.capability === "transfers")).toBe(true);
|
|
138
|
+
expect(result[0].status).toBeDefined();
|
|
139
|
+
expect(() =>
|
|
140
|
+
moov.capabilities.request({
|
|
141
|
+
accountID: account.accountID,
|
|
142
|
+
addCapabilities: { capabilities: ["transfers"] },
|
|
143
|
+
}),
|
|
144
|
+
).not.toThrowError();
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
});
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
2
|
+
import { ids, moov } from "../setup";
|
|
3
|
+
import { createAccount, createBankAccount, createCard } from "../utils/utils";
|
|
4
|
+
import type { Card } from "../../models/components";
|
|
5
|
+
|
|
6
|
+
let accountID = "a920f147-ed53-4aa1-977c-d11cc192979c"; // default account ID
|
|
7
|
+
let card: Partial<Card> = {};
|
|
8
|
+
let cardNumber: string;
|
|
9
|
+
describe("Cards", () => {
|
|
10
|
+
beforeAll(async () => {
|
|
11
|
+
const account = await createAccount();
|
|
12
|
+
accountID = account.accountID;
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe("Card Linking", () => {
|
|
16
|
+
test("should fail when I pass incorrect params", async () => {
|
|
17
|
+
expect(
|
|
18
|
+
async () =>
|
|
19
|
+
await moov.cards.link({
|
|
20
|
+
accountID,
|
|
21
|
+
linkCard: {
|
|
22
|
+
cardNumber: "4111111111111111",
|
|
23
|
+
cardCvv: "123",
|
|
24
|
+
expiration: {
|
|
25
|
+
month: "01",
|
|
26
|
+
year: "2025", // 2025 is not a valid year, should be "25"
|
|
27
|
+
},
|
|
28
|
+
billingAddress: {
|
|
29
|
+
addressLine1: "123 Main St",
|
|
30
|
+
city: "Anytown",
|
|
31
|
+
country: "US",
|
|
32
|
+
postalCode: "12345", // stateOrProvince is missing, but required when passing anything other than just postalCode
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
).toThrow(
|
|
37
|
+
expect.objectContaining({
|
|
38
|
+
expiration: "year: the length must be exactly 2.",
|
|
39
|
+
billingAddress: "stateOrProvince: cannot be blank.",
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
test("should be able to link a card successfully", async () => {
|
|
44
|
+
const { result } = await moov.cards.link({
|
|
45
|
+
accountID,
|
|
46
|
+
linkCard: {
|
|
47
|
+
cardNumber: "4111111111111111",
|
|
48
|
+
cardCvv: "123",
|
|
49
|
+
expiration: {
|
|
50
|
+
month: "01",
|
|
51
|
+
year: "45",
|
|
52
|
+
},
|
|
53
|
+
billingAddress: {
|
|
54
|
+
addressLine1: "123 Main St",
|
|
55
|
+
city: "Anytown",
|
|
56
|
+
country: "US",
|
|
57
|
+
postalCode: "12345",
|
|
58
|
+
stateOrProvince: "CA",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
expect(result).toBeDefined();
|
|
63
|
+
expect(result.cardID).toBeDefined();
|
|
64
|
+
expect(result.cardType).toEqual("debit");
|
|
65
|
+
expect(result.brand).toEqual("Visa");
|
|
66
|
+
expect(result.lastFourCardNumber).toEqual("1111");
|
|
67
|
+
card = result;
|
|
68
|
+
ids.seen({ accountID, cardID: result.cardID });
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
describe("Card dependent tests", () => {
|
|
72
|
+
beforeEach(async () => {
|
|
73
|
+
const result = await createCard(accountID);
|
|
74
|
+
card = result.card;
|
|
75
|
+
cardNumber = result.cardNumber;
|
|
76
|
+
});
|
|
77
|
+
describe("Getting and listing cards", () => {
|
|
78
|
+
test("should be able to retrieve a card", async () => {
|
|
79
|
+
const { result } = await moov.cards.get({
|
|
80
|
+
accountID,
|
|
81
|
+
cardID: card.cardID!,
|
|
82
|
+
});
|
|
83
|
+
expect(result).toBeDefined();
|
|
84
|
+
expect(result.bin).toEqual(card.bin!);
|
|
85
|
+
expect(result.cardID).toEqual(card.cardID!);
|
|
86
|
+
expect(result.cardType).toEqual(card.cardType!);
|
|
87
|
+
expect(result.brand).toEqual(card.brand!);
|
|
88
|
+
expect(result.lastFourCardNumber).toEqual(cardNumber.slice(-4));
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("Getting a card should fail when I pass incorrect params", async () => {
|
|
92
|
+
expect(async () => await moov.cards.get({ accountID, cardID: "invalid-card-id" })).toThrowError(
|
|
93
|
+
"API error occurred: Status 404 Content-Type Body",
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test("should be able to list cards", async () => {
|
|
98
|
+
const { result } = await moov.cards.list({
|
|
99
|
+
accountID,
|
|
100
|
+
});
|
|
101
|
+
expect(result).toBeDefined();
|
|
102
|
+
expect(result.length).toBeGreaterThan(0);
|
|
103
|
+
expect(result[0].bin).toEqual(expect.any(String));
|
|
104
|
+
expect(result[0].cardID).toEqual(expect.any(String));
|
|
105
|
+
expect(result[0].cardType).toEqual(expect.any(String));
|
|
106
|
+
expect(result[0].brand).toEqual(expect.any(String));
|
|
107
|
+
expect(result[0].lastFourCardNumber).toEqual(expect.any(String));
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test("listing should fail when I pass incorrect params", async () => {
|
|
111
|
+
expect(async () => await moov.cards.list({ accountID: "invalid-account-id" })).toThrowError(
|
|
112
|
+
"API error occurred: Status 403 Content-Type Body ",
|
|
113
|
+
);
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
describe("Updating cards", () => {
|
|
118
|
+
test("should be able to update a card", async () => {
|
|
119
|
+
const { result } = await moov.cards.update({
|
|
120
|
+
accountID,
|
|
121
|
+
cardID: card.cardID!,
|
|
122
|
+
updateCard: {
|
|
123
|
+
expiration: {
|
|
124
|
+
month: "01",
|
|
125
|
+
year: "45",
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
expect(result).toBeDefined();
|
|
130
|
+
expect(result.cardID).toEqual(card.cardID!);
|
|
131
|
+
expect(result.expiration.month).toEqual("01");
|
|
132
|
+
expect(result.expiration.year).toEqual("45");
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test("updating should fail when I pass incorrect params", async () => {
|
|
136
|
+
expect(
|
|
137
|
+
async () =>
|
|
138
|
+
await moov.cards.update({
|
|
139
|
+
accountID,
|
|
140
|
+
cardID: card.cardID!,
|
|
141
|
+
updateCard: {
|
|
142
|
+
expiration: {
|
|
143
|
+
month: "01",
|
|
144
|
+
year: "2045",
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
}),
|
|
148
|
+
).toThrowError('API error occurred: {"expiration":"year: the length must be exactly 2."}');
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
describe("Disabling cards", () => {
|
|
153
|
+
test("should be able to disable a card", async () => {
|
|
154
|
+
const result = await moov.cards.disable({
|
|
155
|
+
accountID,
|
|
156
|
+
cardID: card.cardID!,
|
|
157
|
+
});
|
|
158
|
+
expect(result).toBeDefined();
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
test("disabling should fail when I pass incorrect params", async () => {
|
|
162
|
+
expect(async () => await moov.cards.disable({ accountID, cardID: "invalid-card-id" })).toThrowError(
|
|
163
|
+
"API error occurred: Status 404 Content-Type Body",
|
|
164
|
+
);
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
2
|
+
import { ids, moov } from "../setup";
|
|
3
|
+
import { createAccount, createBankAccount, createCard } from "../utils/utils";
|
|
4
|
+
import type { BankAccount, Card } from "../../models/components";
|
|
5
|
+
|
|
6
|
+
let accountID = "a920f147-ed53-4aa1-977c-d11cc192979c"; // default account ID
|
|
7
|
+
let card: Partial<Card> = {};
|
|
8
|
+
let bankAccount: Partial<BankAccount> = {};
|
|
9
|
+
let cardNumber: string;
|
|
10
|
+
describe("PaymentMethods", () => {
|
|
11
|
+
beforeAll(async () => {
|
|
12
|
+
const account = await createAccount();
|
|
13
|
+
accountID = account.accountID;
|
|
14
|
+
const result = await createCard(accountID);
|
|
15
|
+
card = result.card;
|
|
16
|
+
cardNumber = result.cardNumber;
|
|
17
|
+
const bankAccountResult = await createBankAccount(accountID);
|
|
18
|
+
bankAccount = bankAccountResult.bankAccount;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe("Listing", () => {
|
|
22
|
+
test("should be able to list payment methods", async () => {
|
|
23
|
+
const { result } = await moov.paymentMethods.list({ accountID });
|
|
24
|
+
expect(result).toBeDefined();
|
|
25
|
+
expect(result.length).toBeGreaterThan(0);
|
|
26
|
+
});
|
|
27
|
+
test("listing should fail if accountID is not provided", async () => {
|
|
28
|
+
expect(() => moov.paymentMethods.list({ accountID: "" })).toThrowError(
|
|
29
|
+
"API error occurred: Status 403 Content-Type Body",
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe("Getting PaymentMethods", () => {
|
|
35
|
+
test("should be able to get a payment method", async () => {
|
|
36
|
+
const { result: listResult } = await moov.paymentMethods.list({ accountID });
|
|
37
|
+
const { result } = await moov.paymentMethods.get({
|
|
38
|
+
accountID: accountID,
|
|
39
|
+
paymentMethodID: listResult[0].paymentMethodID,
|
|
40
|
+
});
|
|
41
|
+
expect(result).toBeDefined();
|
|
42
|
+
expect(result.paymentMethodID).toBe(listResult[0].paymentMethodID);
|
|
43
|
+
});
|
|
44
|
+
test("getting should fail if accountID and paymentMethodID are not correct", async () => {
|
|
45
|
+
expect(() => moov.paymentMethods.get({ accountID: "@#$@#$@$", paymentMethodID: "@#$@#$@#$@" })).toThrowError(
|
|
46
|
+
"API error occurred: Status 403 Content-Type Body",
|
|
47
|
+
);
|
|
48
|
+
});
|
|
49
|
+
test("getting should fail if paymentMethodID is not provided", async () => {
|
|
50
|
+
expect(() => moov.paymentMethods.get({ accountID: accountID, paymentMethodID: "" })).toThrowError(
|
|
51
|
+
"API error occurred: Status 403 Content-Type Body",
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
2
|
+
import { createAccount, createAccountWithWallet, createRepresentative } from "../utils/utils";
|
|
3
|
+
import type { Account, Representative } from "../../models/components";
|
|
4
|
+
import { moov } from "../setup";
|
|
5
|
+
|
|
6
|
+
let account: Account;
|
|
7
|
+
let representative: Representative;
|
|
8
|
+
describe("Representative", () => {
|
|
9
|
+
beforeAll(async () => {
|
|
10
|
+
account = await createAccount();
|
|
11
|
+
});
|
|
12
|
+
describe("Creating a representative", () => {
|
|
13
|
+
test("should create a representative", async () => {
|
|
14
|
+
const representativeCreated = await createRepresentative(account.accountID);
|
|
15
|
+
expect(representativeCreated).toBeDefined();
|
|
16
|
+
representative = representativeCreated;
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
describe("Representative-dependent tests", () => {
|
|
20
|
+
beforeEach(async () => {
|
|
21
|
+
if (!representative) {
|
|
22
|
+
representative = await createRepresentative(account.accountID);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
describe("Listing and getting representatives", () => {
|
|
26
|
+
test("should list representatives", async () => {
|
|
27
|
+
const { result } = await moov.representatives.list({ accountID: account.accountID });
|
|
28
|
+
expect(result).toBeDefined();
|
|
29
|
+
expect(result.length).toBeGreaterThan(0);
|
|
30
|
+
expect(result.some((r) => r.representativeID === representative.representativeID)).toBe(true);
|
|
31
|
+
});
|
|
32
|
+
test("should be able to get a representative", async () => {
|
|
33
|
+
const { result } = await moov.representatives.get({
|
|
34
|
+
accountID: account.accountID,
|
|
35
|
+
representativeID: representative.representativeID,
|
|
36
|
+
});
|
|
37
|
+
expect(result).toBeDefined();
|
|
38
|
+
expect(result.representativeID).toBe(representative.representativeID);
|
|
39
|
+
expect(result.email).toBe(representative.email!);
|
|
40
|
+
});
|
|
41
|
+
test("listing representatives should fail if the account is not found", async () => {
|
|
42
|
+
expect(() => moov.representatives.list({ accountID: "not-a-valid-account-id" })).toThrowError(
|
|
43
|
+
"API error occurred: Status 403 Content-Type Body ",
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
test("getting a representative should fail if the account is not found", async () => {
|
|
47
|
+
expect(() =>
|
|
48
|
+
moov.representatives.get({
|
|
49
|
+
accountID: "not-a-valid-account-id",
|
|
50
|
+
representativeID: representative.representativeID,
|
|
51
|
+
}),
|
|
52
|
+
).toThrowError("API error occurred: Status 403 Content-Type Body ");
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
describe("Updating a representative", () => {
|
|
56
|
+
beforeEach(async () => {
|
|
57
|
+
representative = await createRepresentative(account.accountID);
|
|
58
|
+
});
|
|
59
|
+
test("should be able to update a representative", async () => {
|
|
60
|
+
const { result } = await moov.representatives.update({
|
|
61
|
+
accountID: account.accountID,
|
|
62
|
+
representativeID: representative.representativeID,
|
|
63
|
+
updateRepresentative: {
|
|
64
|
+
email: "mia.wallece@bigkahunaburger.com",
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
expect(result).toBeDefined();
|
|
68
|
+
expect(result.email).toBe("mia.wallece@bigkahunaburger.com");
|
|
69
|
+
});
|
|
70
|
+
test("updating a representative should fail if the account is not found", async () => {
|
|
71
|
+
expect(() =>
|
|
72
|
+
moov.representatives.update({
|
|
73
|
+
accountID: "not-a-valid-account-id",
|
|
74
|
+
representativeID: representative.representativeID,
|
|
75
|
+
updateRepresentative: {
|
|
76
|
+
email: "mia.wallece@bigkahunaburger.com",
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
).toThrowError("API error occurred: Status 403 Content-Type Body ");
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|