@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,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
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { Chance } from "chance";
|
|
2
|
+
import { ids, moov } from "../setup";
|
|
3
|
+
import type {
|
|
4
|
+
BankAccount,
|
|
5
|
+
BankAccountPayload,
|
|
6
|
+
CreateAccount,
|
|
7
|
+
CreateRepresentative,
|
|
8
|
+
CreateTransferOptions,
|
|
9
|
+
LinkCard,
|
|
10
|
+
PaymentMethod,
|
|
11
|
+
} from "../../models/components";
|
|
12
|
+
import { merge } from "remeda";
|
|
13
|
+
import { sleep } from "bun";
|
|
14
|
+
import { expect } from "bun:test";
|
|
15
|
+
const chance = new Chance();
|
|
16
|
+
|
|
17
|
+
export type DeepPartial<T> = T extends object
|
|
18
|
+
? {
|
|
19
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
20
|
+
}
|
|
21
|
+
: T;
|
|
22
|
+
|
|
23
|
+
export const SOURCE_ACCOUNT_ID = "5acdc734-8c9d-448f-be13-136efa707b7b"; // Ramen Corp
|
|
24
|
+
export const UUID_REGEX = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
25
|
+
|
|
26
|
+
const getDefaultAccount = () => {
|
|
27
|
+
const truncatedLegalBusinessName = chance.company().slice(0, 50); // Because the total lenght has to be less than 64 chars
|
|
28
|
+
const legalBusinessName = `${truncatedLegalBusinessName} ${new Date().getTime()}`; // 50 chars + ~10 chars fot the timestamp
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
accountType: "business",
|
|
32
|
+
profile: {
|
|
33
|
+
business: {
|
|
34
|
+
legalBusinessName,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const getDefaultRepresentative = (): CreateRepresentative => {
|
|
41
|
+
return {
|
|
42
|
+
name: {
|
|
43
|
+
firstName: "Vince",
|
|
44
|
+
lastName: "Vega",
|
|
45
|
+
},
|
|
46
|
+
email: "vince.vega@example.com",
|
|
47
|
+
address: {
|
|
48
|
+
addressLine1: "123 Main St",
|
|
49
|
+
city: "Anytown",
|
|
50
|
+
country: "US",
|
|
51
|
+
stateOrProvince: "CA",
|
|
52
|
+
postalCode: "12345",
|
|
53
|
+
},
|
|
54
|
+
birthDate: {
|
|
55
|
+
day: 1,
|
|
56
|
+
month: 1,
|
|
57
|
+
year: 1990,
|
|
58
|
+
},
|
|
59
|
+
governmentID: {
|
|
60
|
+
ssn: {
|
|
61
|
+
full: "123456789",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
responsibilities: {
|
|
65
|
+
isOwner: true,
|
|
66
|
+
isController: true,
|
|
67
|
+
ownershipPercentage: 80,
|
|
68
|
+
jobTitle: "CEO",
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Creates a default account, merges the provided account with the default account, and returns the result.
|
|
74
|
+
* It also adds the account to the seen list so we can later delete it in the `afterAll` hook in setup.ts.
|
|
75
|
+
* @param account - The account to merge with the default account.
|
|
76
|
+
* @returns The created account.
|
|
77
|
+
*/
|
|
78
|
+
export const createAccount = async (account: DeepPartial<CreateAccount> = {}) => {
|
|
79
|
+
const mergedAccount = merge(getDefaultAccount(), account) as CreateAccount;
|
|
80
|
+
const { result } = await moov.accounts.create(mergedAccount);
|
|
81
|
+
|
|
82
|
+
ids.seen({ accountID: result.accountID });
|
|
83
|
+
return result;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const createRepresentative = async (
|
|
87
|
+
accountID: string,
|
|
88
|
+
representative: DeepPartial<CreateRepresentative> = {},
|
|
89
|
+
) => {
|
|
90
|
+
const mergedRepresentative = merge(getDefaultRepresentative(), representative) as CreateRepresentative;
|
|
91
|
+
const { result } = await moov.representatives.create({
|
|
92
|
+
accountID: accountID,
|
|
93
|
+
createRepresentative: mergedRepresentative,
|
|
94
|
+
});
|
|
95
|
+
ids.seen({ accountID, representativeID: result.representativeID });
|
|
96
|
+
return result;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const createAccountWithWallet = async (account: DeepPartial<CreateAccount> = {}) => {
|
|
100
|
+
// Create the account with the KYC fields needed for the wallet
|
|
101
|
+
const ts = new Date().getTime();
|
|
102
|
+
const baseAccount = {
|
|
103
|
+
...getDefaultAccount(),
|
|
104
|
+
capabilities: ["wallet"],
|
|
105
|
+
profile: {
|
|
106
|
+
business: {
|
|
107
|
+
website: `https://bigkahunawallet.com/${ts}`,
|
|
108
|
+
legalBusinessName: `Big Kahuna Wallet ${ts}`,
|
|
109
|
+
businessType: "llc",
|
|
110
|
+
taxID: {
|
|
111
|
+
ein: {
|
|
112
|
+
number: "123456789",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
phone: {
|
|
116
|
+
number: "1234567890",
|
|
117
|
+
},
|
|
118
|
+
address: {
|
|
119
|
+
addressLine1: "123 Main St",
|
|
120
|
+
city: "Anytown",
|
|
121
|
+
country: "US",
|
|
122
|
+
stateOrProvince: "CA",
|
|
123
|
+
postalCode: "12345",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
const mergedAccount = merge(baseAccount, account) as CreateAccount;
|
|
129
|
+
const createdAccount = await createAccount(mergedAccount);
|
|
130
|
+
// Get the terms of service token
|
|
131
|
+
const {
|
|
132
|
+
result: { token },
|
|
133
|
+
} = await moov.accounts.getTermsOfServiceToken({
|
|
134
|
+
origin: "https://moov.io",
|
|
135
|
+
referer: "https://moov.io",
|
|
136
|
+
});
|
|
137
|
+
// Create the representative (which adds it to the account)
|
|
138
|
+
await createRepresentative(createdAccount.accountID);
|
|
139
|
+
// Update the account with the terms of service token AND ownersProvided to true
|
|
140
|
+
const { result: patchResult } = await moov.accounts.update({
|
|
141
|
+
accountID: createdAccount.accountID,
|
|
142
|
+
patchAccount: {
|
|
143
|
+
profile: {
|
|
144
|
+
business: {
|
|
145
|
+
ownersProvided: true,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
termsOfService: {
|
|
149
|
+
token,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
// get capabilities for account
|
|
154
|
+
let walletCapability;
|
|
155
|
+
do {
|
|
156
|
+
const { result } = await moov.capabilities.get({
|
|
157
|
+
accountID: createdAccount.accountID,
|
|
158
|
+
capabilityID: "wallet",
|
|
159
|
+
});
|
|
160
|
+
walletCapability = result;
|
|
161
|
+
if (walletCapability.status !== "enabled") {
|
|
162
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
163
|
+
}
|
|
164
|
+
} while (walletCapability.status !== "enabled");
|
|
165
|
+
|
|
166
|
+
return patchResult;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Creates a bank account for the given account ID. Optionally, you can provide a bank account to merge with the default bank account.
|
|
171
|
+
* It also adds the bank account to the seen list so we can later delete it in the `afterAll` hook in setup.ts.
|
|
172
|
+
* @param accountID - The ID of the account to create the bank account for.
|
|
173
|
+
* @param bankAccount - The bank account to merge with the default bank account.
|
|
174
|
+
* @returns The created bank account.
|
|
175
|
+
*/
|
|
176
|
+
export const createBankAccount = async (accountID: string, bankAccount: Partial<BankAccount> = {}) => {
|
|
177
|
+
const defaultBankAccount = {
|
|
178
|
+
account: {
|
|
179
|
+
holderName: "Marcellus Wallace",
|
|
180
|
+
holderType: "individual",
|
|
181
|
+
accountNumber: chance.integer({ min: 1000000000, max: 9999999999 }).toString(),
|
|
182
|
+
bankAccountType: "checking",
|
|
183
|
+
routingNumber: "121000248",
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
const mergedBankAccount = merge(defaultBankAccount, bankAccount) as BankAccountPayload;
|
|
187
|
+
const { result } = await moov.bankAccounts.link({
|
|
188
|
+
accountID,
|
|
189
|
+
linkBankAccount: mergedBankAccount,
|
|
190
|
+
});
|
|
191
|
+
ids.seen({ accountID, bankAccountID: result.bankAccountID });
|
|
192
|
+
return { bankAccount: result, accountNumber: mergedBankAccount.account.accountNumber };
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export const createCard = async (accountID: string, card: DeepPartial<LinkCard> = {}) => {
|
|
196
|
+
const defaultCard = {
|
|
197
|
+
cardNumber: "4111111111111111",
|
|
198
|
+
cardCvv: "123",
|
|
199
|
+
expiration: {
|
|
200
|
+
month: "01",
|
|
201
|
+
year: "52",
|
|
202
|
+
},
|
|
203
|
+
billingAddress: {
|
|
204
|
+
addressLine1: "123 Main St",
|
|
205
|
+
city: "Anytown",
|
|
206
|
+
country: "US",
|
|
207
|
+
postalCode: "12345",
|
|
208
|
+
stateOrProvince: "CA",
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
const mergedCard = merge(defaultCard, card) as LinkCard;
|
|
212
|
+
const { result } = await moov.cards.link({
|
|
213
|
+
accountID,
|
|
214
|
+
linkCard: mergedCard,
|
|
215
|
+
});
|
|
216
|
+
ids.seen({ accountID, cardID: result.cardID });
|
|
217
|
+
return { card: result, cardNumber: mergedCard.cardNumber };
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export const crateAccountAndGetTransferOptions = async () => {
|
|
221
|
+
const doneCheck = (data: { result: PaymentMethod[] }) => data.result.length > 0;
|
|
222
|
+
|
|
223
|
+
// Create destination account with card and bank account
|
|
224
|
+
const destinationAccount = await createAccountWithWallet();
|
|
225
|
+
const destinationAccountID = destinationAccount.accountID;
|
|
226
|
+
await createBankAccount(destinationAccountID);
|
|
227
|
+
createCard(destinationAccountID);
|
|
228
|
+
|
|
229
|
+
// Get the payment method ID for the card
|
|
230
|
+
const { result: destinationPaymentMethods } = await waitFor(
|
|
231
|
+
() => moov.paymentMethods.list({ accountID: destinationAccountID }),
|
|
232
|
+
{
|
|
233
|
+
doneCheck,
|
|
234
|
+
},
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
const generateOptionsRequest: CreateTransferOptions = {
|
|
238
|
+
source: { accountID: SOURCE_ACCOUNT_ID },
|
|
239
|
+
destination: { accountID: destinationAccountID },
|
|
240
|
+
amount: { currency: "USD", value: 1 },
|
|
241
|
+
};
|
|
242
|
+
const { result: availablePaymentMethods } = await moov.transfers.generateOptions(generateOptionsRequest);
|
|
243
|
+
expect(availablePaymentMethods).toBeDefined();
|
|
244
|
+
expect(availablePaymentMethods.sourceOptions).toBeArray();
|
|
245
|
+
expect(availablePaymentMethods.sourceOptions!.length).toBeGreaterThan(0);
|
|
246
|
+
expect(availablePaymentMethods.destinationOptions).toBeArray();
|
|
247
|
+
expect(availablePaymentMethods.destinationOptions!.length).toBeGreaterThan(0);
|
|
248
|
+
return availablePaymentMethods;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export const waitFor = async <T>(
|
|
252
|
+
callback: () => Promise<T>,
|
|
253
|
+
options: { doneCheck?: (data: T) => boolean; interval?: number; timeout?: number } = {},
|
|
254
|
+
): Promise<T> => {
|
|
255
|
+
const { interval = 250, timeout = 10000 } = options;
|
|
256
|
+
const startTime = Date.now();
|
|
257
|
+
const doneCheck = options.doneCheck || ((data) => !!data);
|
|
258
|
+
const i = 0;
|
|
259
|
+
|
|
260
|
+
while (true) {
|
|
261
|
+
try {
|
|
262
|
+
const result = await callback();
|
|
263
|
+
if (doneCheck(result)) {
|
|
264
|
+
return result;
|
|
265
|
+
}
|
|
266
|
+
} catch (error) {
|
|
267
|
+
// Ignore errors and continue polling
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (Date.now() - startTime >= timeout) {
|
|
271
|
+
throw new Error("waitFor timed out");
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
await sleep(interval);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* An industry's MCC/SIC/NAICS codes, along with descriptive title.
|
|
6
|
-
*/
|
|
7
|
-
export type EnrichedIndustry = {
|
|
8
|
-
title: string;
|
|
9
|
-
/**
|
|
10
|
-
* North American Industry Classification System
|
|
11
|
-
*/
|
|
12
|
-
naics: string;
|
|
13
|
-
/**
|
|
14
|
-
* Standard Industrial Classification
|
|
15
|
-
*/
|
|
16
|
-
sic: string;
|
|
17
|
-
/**
|
|
18
|
-
* Merchant Category Code
|
|
19
|
-
*/
|
|
20
|
-
mcc: string;
|
|
21
|
-
};
|
|
22
|
-
/** @internal */
|
|
23
|
-
export declare const EnrichedIndustry$inboundSchema: z.ZodType<EnrichedIndustry, z.ZodTypeDef, unknown>;
|
|
24
|
-
/** @internal */
|
|
25
|
-
export type EnrichedIndustry$Outbound = {
|
|
26
|
-
title: string;
|
|
27
|
-
naics: string;
|
|
28
|
-
sic: string;
|
|
29
|
-
mcc: string;
|
|
30
|
-
};
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare const EnrichedIndustry$outboundSchema: z.ZodType<EnrichedIndustry$Outbound, z.ZodTypeDef, EnrichedIndustry>;
|
|
33
|
-
/**
|
|
34
|
-
* @internal
|
|
35
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
36
|
-
*/
|
|
37
|
-
export declare namespace EnrichedIndustry$ {
|
|
38
|
-
/** @deprecated use `EnrichedIndustry$inboundSchema` instead. */
|
|
39
|
-
const inboundSchema: z.ZodType<EnrichedIndustry, z.ZodTypeDef, unknown>;
|
|
40
|
-
/** @deprecated use `EnrichedIndustry$outboundSchema` instead. */
|
|
41
|
-
const outboundSchema: z.ZodType<EnrichedIndustry$Outbound, z.ZodTypeDef, EnrichedIndustry>;
|
|
42
|
-
/** @deprecated use `EnrichedIndustry$Outbound` instead. */
|
|
43
|
-
type Outbound = EnrichedIndustry$Outbound;
|
|
44
|
-
}
|
|
45
|
-
export declare function enrichedIndustryToJSON(enrichedIndustry: EnrichedIndustry): string;
|
|
46
|
-
export declare function enrichedIndustryFromJSON(jsonString: string): SafeParseResult<EnrichedIndustry, SDKValidationError>;
|
|
47
|
-
//# sourceMappingURL=enrichedindustry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enrichedindustry.d.ts","sourceRoot":"","sources":["../../src/models/components/enrichedindustry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,gBAAgB,EAChB,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CACrD,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,gBAAgB,CAMhB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,iBAAiB,CAAC;IACjC,gEAAgE;IACzD,MAAM,aAAa,oDAAiC,CAAC;IAC5D,iEAAiE;IAC1D,MAAM,cAAc,sEAAkC,CAAC;IAC9D,2DAA2D;IAC3D,KAAY,QAAQ,GAAG,yBAAyB,CAAC;CAClD;AAED,wBAAgB,sBAAsB,CACpC,gBAAgB,EAAE,gBAAgB,GACjC,MAAM,CAIR;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAMvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enrichedindustry.js","sourceRoot":"","sources":["../../src/models/components/enrichedindustry.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEH,wDAMC;AAED,4DAQC;AArFD,uCAAyB;AACzB,qDAAiD;AAuBjD,gBAAgB;AACH,QAAA,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAUH,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,iBAAiB,CAOjC;AAPD,WAAiB,iBAAiB;IAChC,gEAAgE;IACnD,+BAAa,GAAG,sCAA8B,CAAC;IAC5D,iEAAiE;IACpD,gCAAc,GAAG,uCAA+B,CAAC;AAGhE,CAAC,EAPgB,iBAAiB,iCAAjB,iBAAiB,QAOjC;AAED,SAAgB,sBAAsB,CACpC,gBAAkC;IAElC,OAAO,IAAI,CAAC,SAAS,CACnB,uCAA+B,CAAC,KAAK,CAAC,gBAAgB,CAAC,CACxD,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CACtC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,sCAA8B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1D,8CAA8C,CAC/C,CAAC;AACJ,CAAC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* An industry's MCC/SIC/NAICS codes, along with descriptive title.
|
|
12
|
-
*/
|
|
13
|
-
export type EnrichedIndustry = {
|
|
14
|
-
title: string;
|
|
15
|
-
/**
|
|
16
|
-
* North American Industry Classification System
|
|
17
|
-
*/
|
|
18
|
-
naics: string;
|
|
19
|
-
/**
|
|
20
|
-
* Standard Industrial Classification
|
|
21
|
-
*/
|
|
22
|
-
sic: string;
|
|
23
|
-
/**
|
|
24
|
-
* Merchant Category Code
|
|
25
|
-
*/
|
|
26
|
-
mcc: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/** @internal */
|
|
30
|
-
export const EnrichedIndustry$inboundSchema: z.ZodType<
|
|
31
|
-
EnrichedIndustry,
|
|
32
|
-
z.ZodTypeDef,
|
|
33
|
-
unknown
|
|
34
|
-
> = z.object({
|
|
35
|
-
title: z.string(),
|
|
36
|
-
naics: z.string(),
|
|
37
|
-
sic: z.string(),
|
|
38
|
-
mcc: z.string(),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
/** @internal */
|
|
42
|
-
export type EnrichedIndustry$Outbound = {
|
|
43
|
-
title: string;
|
|
44
|
-
naics: string;
|
|
45
|
-
sic: string;
|
|
46
|
-
mcc: string;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/** @internal */
|
|
50
|
-
export const EnrichedIndustry$outboundSchema: z.ZodType<
|
|
51
|
-
EnrichedIndustry$Outbound,
|
|
52
|
-
z.ZodTypeDef,
|
|
53
|
-
EnrichedIndustry
|
|
54
|
-
> = z.object({
|
|
55
|
-
title: z.string(),
|
|
56
|
-
naics: z.string(),
|
|
57
|
-
sic: z.string(),
|
|
58
|
-
mcc: z.string(),
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @internal
|
|
63
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
|
-
*/
|
|
65
|
-
export namespace EnrichedIndustry$ {
|
|
66
|
-
/** @deprecated use `EnrichedIndustry$inboundSchema` instead. */
|
|
67
|
-
export const inboundSchema = EnrichedIndustry$inboundSchema;
|
|
68
|
-
/** @deprecated use `EnrichedIndustry$outboundSchema` instead. */
|
|
69
|
-
export const outboundSchema = EnrichedIndustry$outboundSchema;
|
|
70
|
-
/** @deprecated use `EnrichedIndustry$Outbound` instead. */
|
|
71
|
-
export type Outbound = EnrichedIndustry$Outbound;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function enrichedIndustryToJSON(
|
|
75
|
-
enrichedIndustry: EnrichedIndustry,
|
|
76
|
-
): string {
|
|
77
|
-
return JSON.stringify(
|
|
78
|
-
EnrichedIndustry$outboundSchema.parse(enrichedIndustry),
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function enrichedIndustryFromJSON(
|
|
83
|
-
jsonString: string,
|
|
84
|
-
): SafeParseResult<EnrichedIndustry, SDKValidationError> {
|
|
85
|
-
return safeParse(
|
|
86
|
-
jsonString,
|
|
87
|
-
(x) => EnrichedIndustry$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
-
`Failed to parse 'EnrichedIndustry' from JSON`,
|
|
89
|
-
);
|
|
90
|
-
}
|