@moovio/sdk 0.11.4 → 0.12.0
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 +1 -82
- package/README.md +13 -505
- package/bin/mcp-server.js +1921 -1584
- package/bin/mcp-server.js.map +161 -151
- package/docs/sdks/accounts/README.md +16 -180
- package/docs/sdks/adjustments/README.md +6 -6
- package/docs/sdks/applepay/README.md +12 -12
- package/docs/sdks/bankaccounts/README.md +36 -36
- package/docs/sdks/branding/README.md +8 -8
- package/docs/sdks/capabilities/README.md +10 -10
- package/docs/sdks/cardissuing/README.md +22 -38
- package/docs/sdks/cards/README.md +11 -41
- package/docs/sdks/disputes/README.md +54 -54
- package/docs/sdks/enrichedprofile/README.md +2 -2
- package/docs/sdks/feeplans/README.md +16 -16
- package/docs/sdks/files/README.md +8 -8
- package/docs/sdks/industries/README.md +4 -4
- package/docs/sdks/issuingtransactions/README.md +16 -16
- package/docs/sdks/onboarding/README.md +2 -170
- package/docs/sdks/paymentlinks/README.md +16 -74
- package/docs/sdks/paymentmethods/README.md +6 -6
- package/docs/sdks/receipts/README.md +4 -14
- package/docs/sdks/representatives/README.md +18 -26
- package/docs/sdks/scheduling/README.md +34 -34
- package/docs/sdks/sweeps/README.md +22 -22
- package/docs/sdks/transfers/README.md +50 -96
- package/docs/sdks/underwriting/README.md +30 -30
- package/docs/sdks/wallets/README.md +6 -6
- package/docs/sdks/wallettransactions/README.md +10 -10
- 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 +3 -1
- 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/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.js +1 -1
- package/mcp-server/tools/industriesList.js +2 -2
- package/models/components/enrichedindustries.d.ts +3 -3
- package/models/components/enrichedindustries.js +3 -3
- package/models/components/index.d.ts +2 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -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/{enrichedindustry.js → industrytaxonomy.js} +27 -25
- package/models/components/industrytaxonomy.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/operations/createtransfer.d.ts +1 -1
- package/package.json +2 -2
- package/sdk/industries.d.ts +2 -2
- package/sdk/industries.js +2 -2
- 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 +4 -2
- 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/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 +1 -1
- package/src/mcp-server/tools/industriesList.ts +2 -2
- package/src/models/components/enrichedindustries.ts +9 -9
- package/src/models/components/index.ts +2 -1
- package/src/models/components/industrytaxonomy.ts +100 -0
- package/src/models/components/sweep.ts +13 -0
- package/src/models/components/sweepsubtotal.ts +90 -0
- package/src/models/operations/createtransfer.ts +1 -1
- package/src/sdk/industries.ts +2 -2
- 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,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
|
+
});
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
2
|
+
import { ids, moov } from "../setup";
|
|
3
|
+
import {
|
|
4
|
+
crateAccountAndGetTransferOptions,
|
|
5
|
+
createAccount,
|
|
6
|
+
createAccountWithWallet,
|
|
7
|
+
createBankAccount,
|
|
8
|
+
createCard,
|
|
9
|
+
SOURCE_ACCOUNT_ID,
|
|
10
|
+
UUID_REGEX,
|
|
11
|
+
waitFor,
|
|
12
|
+
} from "../utils/utils";
|
|
13
|
+
import type { CreateTransferOptions, PaymentMethod, TransferResponse } from "../../models/components";
|
|
14
|
+
import { sleep } from "bun";
|
|
15
|
+
import type { CreateTransferRequest } from "../../models/operations";
|
|
16
|
+
|
|
17
|
+
let destinationAccountID: string;
|
|
18
|
+
let sourcePaymentMethodID: string;
|
|
19
|
+
let destinationPaymentMethodID: string;
|
|
20
|
+
let transfer: TransferResponse;
|
|
21
|
+
describe("Transfers", () => {
|
|
22
|
+
// Setup accounts and payment methods
|
|
23
|
+
|
|
24
|
+
describe("Transfer Creation", () => {
|
|
25
|
+
beforeAll(async () => {
|
|
26
|
+
const availablePaymentMethods = await crateAccountAndGetTransferOptions();
|
|
27
|
+
sourcePaymentMethodID = availablePaymentMethods.sourceOptions![0].paymentMethodID!;
|
|
28
|
+
destinationPaymentMethodID = availablePaymentMethods.destinationOptions![0].paymentMethodID!;
|
|
29
|
+
});
|
|
30
|
+
test("should be able to create a simple ASYNC transfer between accounts", async () => {
|
|
31
|
+
const transferRequest: CreateTransferRequest = {
|
|
32
|
+
xIdempotencyKey: crypto.randomUUID(),
|
|
33
|
+
accountID: SOURCE_ACCOUNT_ID,
|
|
34
|
+
createTransfer: {
|
|
35
|
+
source: {
|
|
36
|
+
paymentMethodID: sourcePaymentMethodID,
|
|
37
|
+
},
|
|
38
|
+
destination: {
|
|
39
|
+
paymentMethodID: destinationPaymentMethodID,
|
|
40
|
+
},
|
|
41
|
+
amount: {
|
|
42
|
+
currency: "USD",
|
|
43
|
+
value: 1,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const { result } = await moov.transfers.create(transferRequest);
|
|
49
|
+
expect(result).toBeDefined();
|
|
50
|
+
expect(result.transferID).toBeDefined();
|
|
51
|
+
expect(result.createdOn).toBeDefined();
|
|
52
|
+
expect(result.transferID).toMatch(UUID_REGEX);
|
|
53
|
+
transfer = result;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test("Should be able to create a simple SYNC transfer between accounts", async () => {
|
|
57
|
+
const transferRequest: CreateTransferRequest = {
|
|
58
|
+
xIdempotencyKey: crypto.randomUUID(),
|
|
59
|
+
xWaitFor: "rail-response",
|
|
60
|
+
accountID: SOURCE_ACCOUNT_ID,
|
|
61
|
+
createTransfer: {
|
|
62
|
+
source: {
|
|
63
|
+
paymentMethodID: sourcePaymentMethodID,
|
|
64
|
+
},
|
|
65
|
+
destination: {
|
|
66
|
+
paymentMethodID: destinationPaymentMethodID,
|
|
67
|
+
},
|
|
68
|
+
amount: {
|
|
69
|
+
currency: "USD",
|
|
70
|
+
value: 1,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const { result } = await moov.transfers.create(transferRequest);
|
|
76
|
+
expect(result).toBeDefined();
|
|
77
|
+
expect(result.transferID).toBeDefined();
|
|
78
|
+
expect(result.createdOn).toBeDefined();
|
|
79
|
+
expect(result.transferID).toMatch(UUID_REGEX);
|
|
80
|
+
transfer = result;
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
test("should fail to create transfer with invalid amount", async () => {
|
|
84
|
+
const transferRequest: CreateTransferRequest = {
|
|
85
|
+
xIdempotencyKey: crypto.randomUUID(),
|
|
86
|
+
accountID: SOURCE_ACCOUNT_ID,
|
|
87
|
+
createTransfer: {
|
|
88
|
+
source: {
|
|
89
|
+
paymentMethodID: sourcePaymentMethodID,
|
|
90
|
+
},
|
|
91
|
+
destination: {
|
|
92
|
+
paymentMethodID: destinationPaymentMethodID,
|
|
93
|
+
},
|
|
94
|
+
amount: {
|
|
95
|
+
currency: "USD",
|
|
96
|
+
value: 0,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
await expect(() => moov.transfers.create(transferRequest)).toThrowError(
|
|
102
|
+
'API error occurred: {"amount":"amount value must be greater than or equal to 0.01"}',
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
describe.todo("Transfer Management", () => {
|
|
108
|
+
beforeEach(async () => {});
|
|
109
|
+
|
|
110
|
+
test("should list transfers", async () => {});
|
|
111
|
+
|
|
112
|
+
test("should get transfer details", async () => {});
|
|
113
|
+
|
|
114
|
+
test("should update transfer metadata", async () => {});
|
|
115
|
+
|
|
116
|
+
test("should list transfer refunds", async () => {});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
describe.todo("Transfer Options", () => {
|
|
120
|
+
test("should generate transfer options", async () => {});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
|
|
2
|
+
import { ids, moov } from "../setup";
|
|
3
|
+
import { createAccount, createAccountWithWallet } from "../utils/utils";
|
|
4
|
+
|
|
5
|
+
let accountID = "a920f147-ed53-4aa1-977c-d11cc192979c"; // default account ID
|
|
6
|
+
describe("Wallets", () => {
|
|
7
|
+
beforeAll(async () => {
|
|
8
|
+
const account = await createAccountWithWallet();
|
|
9
|
+
accountID = account.accountID;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
describe("Listing", () => {
|
|
13
|
+
test("should be able to list wallets", async () => {
|
|
14
|
+
const { result } = await moov.wallets.list({ accountID });
|
|
15
|
+
expect(result).toBeDefined();
|
|
16
|
+
expect(result.length).toEqual(1);
|
|
17
|
+
expect(result[0].availableBalance).toEqual({
|
|
18
|
+
currency: "USD",
|
|
19
|
+
value: 0,
|
|
20
|
+
valueDecimal: "0",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
test("listing should fail if accountID is not provided", async () => {
|
|
24
|
+
expect(() => moov.wallets.list({ accountID: "" })).toThrowError(
|
|
25
|
+
"API error occurred: Status 403 Content-Type Body",
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
describe.todo("Getting Wallets", () => {});
|
|
31
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Enable latest features
|
|
4
|
+
"lib": ["ESNext", "DOM"],
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleDetection": "force",
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
|
|
11
|
+
// Bundler mode
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
// Best practices
|
|
18
|
+
"strict": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
|
|
22
|
+
// Some stricter flags (disabled by default)
|
|
23
|
+
"noUnusedLocals": false,
|
|
24
|
+
"noUnusedParameters": false,
|
|
25
|
+
"noPropertyAccessFromIndexSignature": false,
|
|
26
|
+
|
|
27
|
+
// Add Bun types
|
|
28
|
+
"types": ["bun-types"]
|
|
29
|
+
}
|
|
30
|
+
}
|