@zeniai/client-epic-state 4.12.91 → 4.12.93
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/lib/commonPayloadTypes/commonPayload.d.ts +7 -0
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +8 -3
- package/lib/entity/company/companyReducer.d.ts +4 -1
- package/lib/entity/company/companyReducer.js +6 -2
- package/lib/entity/company/companyStateTypes.d.ts +4 -0
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/user/userPayload.d.ts +1 -0
- package/lib/entity/user/userReducer.js +9 -8
- package/lib/entity/user/userState.d.ts +1 -0
- package/lib/epic.d.ts +6 -1
- package/lib/epic.js +6 -1
- package/lib/index.d.ts +12 -5
- package/lib/index.js +15 -6
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +7 -1
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +7 -1
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.js +5 -0
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +1 -6
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +4 -0
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +2 -0
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +7 -1
- package/lib/view/companyView/types/companyView.d.ts +1 -0
- package/lib/view/countryList/countryListReducer.d.ts +17 -0
- package/lib/view/countryList/countryListReducer.js +58 -0
- package/lib/view/countryList/countryListSelector.d.ts +7 -0
- package/lib/view/countryList/countryListSelector.js +13 -0
- package/lib/view/countryList/countryListState.d.ts +12 -0
- package/lib/view/countryList/countryListState.js +2 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +6 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.js +19 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +7 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +38 -0
- package/lib/view/countryList/payloads/countryListPayload.d.ts +6 -0
- package/lib/view/countryList/payloads/countryListPayload.js +10 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +11 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.js +2 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +8 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +3 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +5 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +2 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +6 -3
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +2 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +7 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +36 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +6 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +28 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +9 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +67 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +26 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +89 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +15 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +30 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +2 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +31 -6
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +5 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -2
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +4 -0
- package/package.json +1 -1
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +0 -1
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -504,9 +504,9 @@ import { getSpendManagementEffectiveListPeriod, getSelectedCompanyOfficer, showB
|
|
|
504
504
|
export { getSpendManagementEffectiveListPeriod, getSelectedCompanyOfficer, showBillPayPromoPage, showReimbursementPromoPage, getActualPaymentDate, isVerifiedStatusCode, isBulkProcessing, getBillListUniqueType, getRemiListUniqueType, BulkOperationType, BulkOperationFinishedType, getBulkOperationSuffix, };
|
|
505
505
|
import { FilterCategoryValueType, canSendMonthEndEmailReport, shouldEnableCalendarPickerForLastReportSent } from './view/companyView/helpers/cockpitHelpers';
|
|
506
506
|
export { FilterCategoryValueType, canSendMonthEndEmailReport, shouldEnableCalendarPickerForLastReportSent, };
|
|
507
|
-
import { BillPayConfig, BillPaymentConfigCodeType, BillPaymentSubConfigCodeType,
|
|
507
|
+
import { BillPayConfig, BillPaymentConfigCodeType, BillPaymentSubConfigCodeType, VendorCurrency, InternationalSubConfigCodeType, BILL_NEW_PAYMENT_METHODS, NEW_INTERNATIONAL_METHOD_SUBTEXT, SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT, LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT, AccountTypeSubConfigCodeKeyType } from './view/spendManagement/billPay/billPayConfig/billPayConfigState';
|
|
508
508
|
import { getInternationalSubConfigCodeKey } from './view/spendManagement/billPay/billPayConfig/billPayConfigPayload';
|
|
509
|
-
export {
|
|
509
|
+
export { BillPayConfig, BillPaymentConfigCodeType, BillPaymentSubConfigCodeType, getInternationalSubConfigCodeKey, InternationalSubConfigCodeType, BILL_NEW_PAYMENT_METHODS, NEW_INTERNATIONAL_METHOD_SUBTEXT, SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT, LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT, AccountTypeSubConfigCodeKeyType, };
|
|
510
510
|
import { BillPayCardReport } from './view/billPayCard/billPayCardSelector';
|
|
511
511
|
import { ReimbursementCardReport } from './view/reimbursementCard/reimbursementCardSelector';
|
|
512
512
|
import { Recommendation } from './commonStateTypes/recommendationBase';
|
|
@@ -606,7 +606,7 @@ import { ChargeCardViewSortKey, ChargeCardListUIState, ChargeCardLocalData, Issu
|
|
|
606
606
|
import { ChargeCardListSelectorView, ChargeCardWithUser, getChargeCardListView, getCreditAccount, anyCardOnHold } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
|
|
607
607
|
import { ChargeCard, CreditLimitFrequency, CreditLimitFrequencyCodeType, toCreditLimitFrequencyCodeType } from './entity/chargeCard/chargeCard';
|
|
608
608
|
import { updateCashbackDetailUIState, fetchCashbackDetail } from './view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer';
|
|
609
|
-
import { fetchChargeCardListPage, fetchCreditAccount, issueChargeCard, resetIssueChargeCardForm, updateChargeCardLocalStore, updateSearchText as updateChargeCardListSearchText, updateChargeCardListUIState, resendCardInvite, revokeCardInvite } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer';
|
|
609
|
+
import { fetchChargeCardListPage, fetchChargeCardList, fetchCreditAccount, issueChargeCard, resetIssueChargeCardForm, updateChargeCardLocalStore, updateSearchText as updateChargeCardListSearchText, updateChargeCardListUIState, resendCardInvite, revokeCardInvite } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer';
|
|
610
610
|
import { fetchChargeCardDetailPage, fetchChargeCardTransactionList, updateChargeCardDetail, updateChargeCardTransactionUploadReceiptsFetchStatus, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments } from './view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer';
|
|
611
611
|
import { ChargeCardDetailSelectorView, getChargeCardDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView } from './view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector';
|
|
612
612
|
import { ChargeCardConfigState } from './view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigState';
|
|
@@ -614,7 +614,7 @@ import { ChargeCardTransaction, ChargeCardTransactionStatus, ChargeCardTransacti
|
|
|
614
614
|
import { TransactionReceiptsPayload } from './entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
615
615
|
import { updateChargeCardTransactionAttachments } from './entity/chargeCardTransaction/chargeCardTransactionReducer';
|
|
616
616
|
import { ChargeCardDetailUiState, ChargeCardTransactionSortKey } from './view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail';
|
|
617
|
-
import { getChargeCardSetupViewDetails, ChargeCardSetupView, getChargeCardBusinessVerificationDetails } from './view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector';
|
|
617
|
+
import { getChargeCardSetupViewDetails, ChargeCardSetupView, ChargeCardBusinessVerificationDetails, getChargeCardBusinessVerificationDetails } from './view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector';
|
|
618
618
|
import { acceptChargeCardTerms, fetchChargeCardSetupView } from './view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer';
|
|
619
619
|
import { fetchChargeCardStatementList } from './view/spendManagement/chargeCards/chargeCardStatementList/chargeCardStatementListReducer';
|
|
620
620
|
import { getChargeCardStatements, ChargeCardStatementsSelectorView } from './view/spendManagement/chargeCards/chargeCardStatementList/chargeCardStatementListSelector';
|
|
@@ -622,7 +622,7 @@ import { ChargeCardStatement } from './view/spendManagement/chargeCards/chargeCa
|
|
|
622
622
|
import { CardUserOnboardingLocalData } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState';
|
|
623
623
|
import { initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, startActivationWait, completeActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
|
|
624
624
|
import { getCardUserOnboardingView, CardUserOnboardingView } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector';
|
|
625
|
-
export { updateChargeCardTransactionAttachments, TransactionReceiptsPayload, ProductServices, ProductServiceKey, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, CompanyHealthMetricDropDownOption, CompanyDetailWithHealthMetric, getChargeCardBusinessVerificationDetails, fetchChargeCardListPage, fetchCreditAccount, getChargeCardListView, getCreditAccount, ChargeCardStatementsSelectorView, fetchChargeCardDetailPage, getChargeCardDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView, fetchChargeCardTransactionList, fetchCashbackDetail, ChargeCard, ChargeCardWithUser, ChargeCardViewSortKey, toChargeCardSortKeyType, CashbackPeriod, CashbackDetailUIState, CashbackViewSortKey, getCashbackDetail, CashbackDetailSelectorView, toCreditLimitFrequencyCodeType, ChargeCardListSelectorView, ChargeCardDetailSelectorView, ChargeCardConfigState, ChargeCardListUIState, ChargeCardTransaction, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode, ChargeCardTransactionStatus, ChargeCardDetailUiState, ChargeCardTransactionSortKey, getChargeCardSetupViewDetails, ChargeCardSetupView, fetchChargeCardStatementList, ChargeCardStatement, getChargeCardStatements, fetchChargeCardSetupView, acceptChargeCardTerms, ChargeCardLocalData, IssueChargeCard, CreditLimitFrequencyCodeType, CreditLimitFrequency, issueChargeCard, updateChargeCardLocalStore, resetIssueChargeCardForm, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, CardUserOnboardingLocalData, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, CardUserOnboardingView, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, resendCardInvite, revokeCardInvite, startActivationWait, completeActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, anyCardOnHold, };
|
|
625
|
+
export { updateChargeCardTransactionAttachments, TransactionReceiptsPayload, ProductServices, ProductServiceKey, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, CompanyHealthMetricDropDownOption, CompanyDetailWithHealthMetric, ChargeCardBusinessVerificationDetails, getChargeCardBusinessVerificationDetails, fetchChargeCardList, fetchChargeCardListPage, fetchCreditAccount, getChargeCardListView, getCreditAccount, ChargeCardStatementsSelectorView, fetchChargeCardDetailPage, getChargeCardDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView, fetchChargeCardTransactionList, fetchCashbackDetail, ChargeCard, ChargeCardWithUser, ChargeCardViewSortKey, toChargeCardSortKeyType, CashbackPeriod, CashbackDetailUIState, CashbackViewSortKey, getCashbackDetail, CashbackDetailSelectorView, toCreditLimitFrequencyCodeType, ChargeCardListSelectorView, ChargeCardDetailSelectorView, ChargeCardConfigState, ChargeCardListUIState, ChargeCardTransaction, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode, ChargeCardTransactionStatus, ChargeCardDetailUiState, ChargeCardTransactionSortKey, getChargeCardSetupViewDetails, ChargeCardSetupView, fetchChargeCardStatementList, ChargeCardStatement, getChargeCardStatements, fetchChargeCardSetupView, acceptChargeCardTerms, ChargeCardLocalData, IssueChargeCard, CreditLimitFrequencyCodeType, CreditLimitFrequency, issueChargeCard, updateChargeCardLocalStore, resetIssueChargeCardForm, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, CardUserOnboardingLocalData, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, CardUserOnboardingView, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, resendCardInvite, revokeCardInvite, startActivationWait, completeActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, anyCardOnHold, };
|
|
626
626
|
import { AgingBalance, AgingPeriod } from './commonStateTypes/agingBalance/agingBalance';
|
|
627
627
|
import { fetchApAging, updateApAgingUIState } from './view/apAgingView/apAgingReport/apAgingReducer';
|
|
628
628
|
import { ApAgingReport, getApAgingReport, AgingBalancesByVendor } from './view/apAgingView/apAgingReport/apAgingSelector';
|
|
@@ -737,3 +737,10 @@ import { fetchCompanyTaskManagerView } from './view/companyTaskManagerView/compa
|
|
|
737
737
|
import { getCompanyTaskManagerView, CompanyTaskManagerSelectorView, TaskWithCompanyDetail } from './view/companyTaskManagerView/companyTaskManagerViewSelector';
|
|
738
738
|
import { CompanyTaskManagerViewUIState } from './view/companyTaskManagerView/companyTaskManagerViewState';
|
|
739
739
|
export { fetchCompanyTaskManagerView, CompanyTaskManagerSelectorView, CompanyTaskManagerViewUIState, getCompanyTaskManagerView, TaskWithCompanyDetail, };
|
|
740
|
+
import { fetchCountryList } from './view/countryList/countryListReducer';
|
|
741
|
+
import { Country } from './view/countryList/countryListState';
|
|
742
|
+
export { fetchCountryList, Country };
|
|
743
|
+
import { getIntlWireVerificationView, InternationalWireVerificationView } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector';
|
|
744
|
+
import { InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData, FieldValueType } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
745
|
+
import { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
|
|
746
|
+
export { InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData, FieldValueType, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
package/lib/index.js
CHANGED
|
@@ -45,12 +45,12 @@ exports.saveRemiUpdatesToLocalStore = exports.initializeRemiToLocalStore = expor
|
|
|
45
45
|
exports.retryBankAccountConnectionForOnboarding = exports.sendOnboardingCustomerViewInvite = exports.resetNewOnboardedCustomerId = exports.updateOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerNotes = exports.saveOnboardingCustomerViewUpdates = exports.updateStatusAfterOnboardingCompleted = exports.updateCustomerCreationStatus = exports.updateOnboardingCustomerListUIState = exports.saveOnboardingCustomerViewUpdateData = exports.clearOnboardingCustomerViewUpdateData = exports.initializeOnboardingCustomerViewUpdateData = exports.getOnboardingEmailGroup = exports.getNewOnboardingCustomerView = exports.getOnboardingCockpitView = exports.toProductTypeStrict = exports.toProductType = exports.saveOnboardingCustomerCompletedStatus = exports.fetchOnboardingCompletedCompanies = exports.fetchCompanyOnboardingView = exports.PAYMENT_BUSINESS_DAYS = exports.holidaysFormatted = exports.isHoliday = exports.getYearsList = exports.filterDays = exports.isHolidayToday = exports.getPreviousNthWorkingDay = exports.getNextNthWorkingDay = exports.toFileTypeStrict = exports.ALL_FILE_TYPES = exports.isAllFetchCompleted = exports.isAnyFetchInProgress = exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.reduceAnyFetchState = exports.reduceFetchState = exports.clearAddRemiAutoFields = exports.updateHomeCurrencyConversion = exports.clearTentativeMerchantName = exports.updateTentativeMerchantNames = exports.updateUploadFetchState = exports.updateAddRemiAutoFields = exports.clearEditRemiViewDetail = exports.parseReceiptsToRemi = exports.saveRemiSuccessOrFailure = exports.saveRemiDetail = exports.removeFileFromRemiUpdatesInLocalStore = exports.discardRemiUpdatesInLocalStore = exports.fetchCurrencyConversionValue = void 0;
|
|
46
46
|
exports.updateDepositToLocalData = exports.updateTransferToLocalData = exports.updateTransferMoneyLocalData = exports.fetchZeniAccountsConfig = exports.fetchDepositAccount = exports.getDepositAccountDetailForPDF = exports.getAllDepostAccounts = exports.getDepositAccountDetail = exports.unlinkPaymentAccount = exports.fetchPaymentAccountList = exports.createCheckingAccount = exports.updateZeniAccountListTab = exports.fetchZeniAccountList = exports.getZeniAccountList = exports.getZeniAccountsConfigDetail = exports.fetchOwnerList = exports.fetchRecommendationByEntityName = exports.fetchRecommendationByEntityId = exports.fetchEntityRecommendationsByTransactionId = exports.getVendorFiling1099List = exports.toVendorReportIDType = exports.isVendorsTabVisible = exports.isColumnYTDSpend = exports.updateYTDSelectionUIState = exports.updatePageToken = exports.updateSortUiState = exports.getVendorList = exports.LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT = exports.SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT = exports.NEW_INTERNATIONAL_METHOD_SUBTEXT = exports.BILL_NEW_PAYMENT_METHODS = exports.getInternationalSubConfigCodeKey = exports.shouldEnableCalendarPickerForLastReportSent = exports.canSendMonthEndEmailReport = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.isVerifiedStatusCode = exports.getActualPaymentDate = exports.showReimbursementPromoPage = exports.showBillPayPromoPage = exports.getSelectedCompanyOfficer = exports.getSpendManagementEffectiveListPeriod = exports.getSnackbar = exports.closeSnackbar = exports.openSnackbar = exports.getChangedLineItemCountFromLocalData = exports.getTransactionListUIStateByCategoryType = exports.getTransactionsListByCategoryType = void 0;
|
|
47
47
|
exports.getAccountMappingView = exports.clearAccountMappingLocalData = exports.saveAccountMappingLocalData = exports.saveAccountMapping = exports.getOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.clearOnboardingCustomerView = exports.saveOnboardingCustomerViewDataInLocalStore = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.updateOnboardingCustomerViewUIState = exports.updateCurrentStep = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerView = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingCustomerViewCompleteStatus = exports.updateOnboardingCustomerViewAccountDetails = exports.establishOnboardingPlaidConnection = exports.getOnboardingPlaidLinkToken = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.isZeniClearingAccount = exports.ZENI_CLEARING_ACCOUNT = exports.isZeniClearingAccountReport = exports.getCompanyConfig = exports.fetchCompanyConfig = exports.clearTransactionVendorSaveStatus = exports.resetTransactionVendorLocalData = exports.updateTransactionVendorLocalData = exports.saveTransactionVendorSuccessOrFailure = exports.saveTransactionVendor = exports.getTransactionVendorView = exports.getZeniAccStatements = exports.fetchZeniAccStatementPage = exports.getDepositAccountTransactionList = exports.fetchDepositAccountTransactionList = exports.fetchDepositAccountHistoryFailure = exports.fetchDepositAccountHistorySuccess = exports.updateDepositAccount = exports.getCheckDepositDetail = exports.clearCheckDeposit = exports.updateCheckDepositLocalData = exports.depositCheck = exports.ZENI_ACCOUNTS_TAB = exports.fetchDepositAccountDetail = exports.fetchReviewTransferDetail = exports.clearReviewTransferDetail = exports.clearTransferDetail = exports.getTransferDetail = exports.transferMoney = void 0;
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.getCompanyTaskManagerView = exports.fetchCompanyTaskManagerView = exports.getMinAllowedEndDate = exports.toRecurringFrequency = exports.getRecurringEndDateFromCount = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = void 0;
|
|
48
|
+
exports.getChargeCardTransactionAttachmentView = exports.getChargeCardDetailView = exports.fetchChargeCardDetailPage = exports.getCreditAccount = exports.getChargeCardListView = exports.fetchCreditAccount = exports.fetchChargeCardListPage = exports.fetchChargeCardList = exports.getChargeCardBusinessVerificationDetails = exports.companyHealthMetricDropDownOptions = exports.hasCompanyHealthMetricFormFieldChanged = exports.getCompanyHealthMetricView = exports.isCompanyRunwayInfinite = exports.updateChargeCardTransactionAttachments = exports.updateCompanyHealthViewUIState = exports.updateCompanyHealthMetricViewSuccessStatus = exports.updateCompanyHealthMetricViewErrorStatus = exports.updateCompanyHealthMetricLocalStore = exports.saveCompanyHealthMetricById = exports.removeSelectedCompanyId = exports.initializeCompanyHealthMetricViewLocalData = exports.fetchCompanyHealthMetricView = exports.clearCompanyHealthMetricView = exports.updateCompanyHealth = exports.updateCompaniesHealth = exports.getUserRoleConfig = exports.fetchUserRoleConfig = exports.clearInternationalWire = exports.deletePaymentInstrument = exports.createPaymentInstrumentUpdateStatus = exports.createPaymentInstrument = exports.fetchInternationalWireDynamicForm = exports.initializeDynamicForm = exports.updateInternationalWireLocalStoreData = exports.initializeInternationalWireLocalData = exports.getInternationalWireView = exports.fetchWiseRedirectStatus = exports.getWiseRedirect = exports.saveMagicLinkAddressInLocalStore = exports.fetchMagicLinkBankNameBySwift = exports.fetchMagicLinkBankNameByRouting = exports.updateMagicLinkInternationalBankAccountLocalStoreData = exports.updateMagicLinkBankAccountLocalStoreData = exports.saveBankAccount = exports.fetchBillAttachment = exports.fetchMagicLinkTenant = exports.getMagicLinkCurrentAddressState = exports.getMagicLinkBankAccountView = exports.getMagicLinkView = exports.initializeAccountMappingView = void 0;
|
|
49
|
+
exports.updateLinkBillExpenseLocalData = exports.fetchRecommendedTransactionRowIndex = exports.updatedJELinkInLocalDataAccruedExpenses = exports.updatedJEAccruedLinkWithRecommendedLocalData = exports.updateAmountsInScheduleAccruedDetail = exports.saveScheduleAccruedDetails = exports.resetJEAccruedLinkInLocalData = exports.fetchScheduleAccruedDetailsPage = exports.fetchScheduleAccruedDetails = exports.cancelScheduleAccruedJournalEntry = exports.deleteScheduleAccruedDetail = exports.createNewSchedulesAccrued = exports.updateApAgingDetailUIState = exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = exports.updateApAgingUIState = exports.getApAgingReport = exports.fetchApAging = exports.anyCardOnHold = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeActivationWait = exports.startActivationWait = exports.revokeCardInvite = exports.resendCardInvite = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.saveCardOnboardingUserDetails = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.getCardUserOnboardingView = exports.updateChargeCardDetail = exports.updateCashbackDetailUIState = exports.updateChargeCardListUIState = exports.updateChargeCardListSearchText = exports.resetIssueChargeCardForm = exports.updateChargeCardLocalStore = exports.issueChargeCard = exports.acceptChargeCardTerms = exports.fetchChargeCardSetupView = exports.getChargeCardStatements = exports.fetchChargeCardStatementList = exports.getChargeCardSetupViewDetails = exports.toCreditLimitFrequencyCodeType = exports.getCashbackDetail = exports.toChargeCardSortKeyType = exports.fetchCashbackDetail = exports.fetchChargeCardTransactionList = void 0;
|
|
50
|
+
exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = exports.fetchScheduleDetailsPage = exports.getAccruedScheduleDetailsView = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchAccruedScheduleList = exports.fetchScheduleList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.resetAccruedDetailNewScheduleState = exports.resetSelectedJEAccruedScheduleKey = exports.updateSelectedJEAccruedScheduleKey = exports.updateScheduleAccruedDetailsLocalData = void 0;
|
|
51
|
+
exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = void 0;
|
|
52
|
+
exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.convertHHMMStrToMinutes = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = void 0;
|
|
53
|
+
exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.fetchCountryList = exports.getCompanyTaskManagerView = exports.fetchCompanyTaskManagerView = exports.getMinAllowedEndDate = exports.toRecurringFrequency = exports.getRecurringEndDateFromCount = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = void 0;
|
|
54
54
|
const zeniDayJS_1 = require("./zeniDayJS");
|
|
55
55
|
Object.defineProperty(exports, "Dayjs", { enumerable: true, get: function () { return zeniDayJS_1.Dayjs; } });
|
|
56
56
|
Object.defineProperty(exports, "updateZeniDateLocaleID", { enumerable: true, get: function () { return zeniDayJS_1.updateZeniDateLocaleID; } });
|
|
@@ -1327,6 +1327,7 @@ Object.defineProperty(exports, "updateCashbackDetailUIState", { enumerable: true
|
|
|
1327
1327
|
Object.defineProperty(exports, "fetchCashbackDetail", { enumerable: true, get: function () { return cashbackDetailReducer_1.fetchCashbackDetail; } });
|
|
1328
1328
|
const chargeCardListReducer_1 = require("./view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer");
|
|
1329
1329
|
Object.defineProperty(exports, "fetchChargeCardListPage", { enumerable: true, get: function () { return chargeCardListReducer_1.fetchChargeCardListPage; } });
|
|
1330
|
+
Object.defineProperty(exports, "fetchChargeCardList", { enumerable: true, get: function () { return chargeCardListReducer_1.fetchChargeCardList; } });
|
|
1330
1331
|
Object.defineProperty(exports, "fetchCreditAccount", { enumerable: true, get: function () { return chargeCardListReducer_1.fetchCreditAccount; } });
|
|
1331
1332
|
Object.defineProperty(exports, "issueChargeCard", { enumerable: true, get: function () { return chargeCardListReducer_1.issueChargeCard; } });
|
|
1332
1333
|
Object.defineProperty(exports, "resetIssueChargeCardForm", { enumerable: true, get: function () { return chargeCardListReducer_1.resetIssueChargeCardForm; } });
|
|
@@ -1629,3 +1630,11 @@ const companyTaskManagerViewReducer_1 = require("./view/companyTaskManagerView/c
|
|
|
1629
1630
|
Object.defineProperty(exports, "fetchCompanyTaskManagerView", { enumerable: true, get: function () { return companyTaskManagerViewReducer_1.fetchCompanyTaskManagerView; } });
|
|
1630
1631
|
const companyTaskManagerViewSelector_1 = require("./view/companyTaskManagerView/companyTaskManagerViewSelector");
|
|
1631
1632
|
Object.defineProperty(exports, "getCompanyTaskManagerView", { enumerable: true, get: function () { return companyTaskManagerViewSelector_1.getCompanyTaskManagerView; } });
|
|
1633
|
+
const countryListReducer_1 = require("./view/countryList/countryListReducer");
|
|
1634
|
+
Object.defineProperty(exports, "fetchCountryList", { enumerable: true, get: function () { return countryListReducer_1.fetchCountryList; } });
|
|
1635
|
+
const internationalWireVerificationSelector_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector");
|
|
1636
|
+
Object.defineProperty(exports, "getIntlWireVerificationView", { enumerable: true, get: function () { return internationalWireVerificationSelector_1.getIntlWireVerificationView; } });
|
|
1637
|
+
const internationalWireVerificationReducer_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer");
|
|
1638
|
+
Object.defineProperty(exports, "fetchInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.fetchInternationalVerificationForm; } });
|
|
1639
|
+
Object.defineProperty(exports, "submitInternationalVerificationForm", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.submitInternationalVerificationForm; } });
|
|
1640
|
+
Object.defineProperty(exports, "updateVerificationFormLocalData", { enumerable: true, get: function () { return internationalWireVerificationReducer_1.updateVerificationFormLocalData; } });
|
package/lib/reducer.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ import { CompanyViewState } from './view/companyView/companyViewState';
|
|
|
49
49
|
import { AccountingSummaryState } from './entity/portfolio/accountingSummary/accountingSummaryState';
|
|
50
50
|
import { AddressViewState } from './view/addressView/addressViewState';
|
|
51
51
|
import { AccountListState } from './view/accountList/accountListState';
|
|
52
|
+
import { CountryListState } from './view/countryList/countryListState';
|
|
52
53
|
import { MerchantListState } from './view/spendManagement/merchantList/merchantListState';
|
|
53
54
|
import { ClassListState } from './view/classList/classListState';
|
|
54
55
|
import { ClassState } from './entity/class/classState';
|
|
@@ -175,6 +176,7 @@ import { BillsBulkActionViewState } from './view/spendManagement/billPay/billsBu
|
|
|
175
176
|
import { RemisBulkActionViewState } from './view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewState';
|
|
176
177
|
import { VendorFiling1099ListState } from './view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState';
|
|
177
178
|
import { VendorFiling1099UploadDetailsState } from './view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState';
|
|
179
|
+
import { InternationalWireVerificationState } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
178
180
|
declare type EntitiesState = {
|
|
179
181
|
accountGroupState: AccountGroupState;
|
|
180
182
|
accountingSummaryState: AccountingSummaryState;
|
|
@@ -274,6 +276,7 @@ declare type ViewsState = {
|
|
|
274
276
|
companyMonthEndReportViewState: CompanyMonthEndReportViewState;
|
|
275
277
|
companyTaskManagerViewState: CompanyTaskManagerViewState;
|
|
276
278
|
companyViewState: CompanyViewState;
|
|
279
|
+
countryListState: CountryListState;
|
|
277
280
|
dashboardState: DashboardState;
|
|
278
281
|
depositAccountListState: DepositAccountListState;
|
|
279
282
|
depositAccountTransactionListState: DepositAccountTransactionListState;
|
|
@@ -288,6 +291,7 @@ declare type ViewsState = {
|
|
|
288
291
|
globalMerchantViewState: GlobalMerchantViewState;
|
|
289
292
|
insightsCardState: InsightsCardState;
|
|
290
293
|
internationalWireState: InternationalWireState;
|
|
294
|
+
internationalWireVerificationState: InternationalWireVerificationState;
|
|
291
295
|
magicLinkViewState: MagicLinkViewState;
|
|
292
296
|
merchantListState: MerchantListState;
|
|
293
297
|
netBurnOrIncomeClassesViewState: NetBurnOrIncomeClassesViewState;
|
|
@@ -399,6 +403,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
399
403
|
companyMonthEndReportViewState: CompanyMonthEndReportViewState;
|
|
400
404
|
companyTaskManagerViewState: CompanyTaskManagerViewState;
|
|
401
405
|
companyViewState: CompanyViewState;
|
|
406
|
+
countryListState: CountryListState;
|
|
402
407
|
dashboardState: DashboardState;
|
|
403
408
|
depositAccountListState: DepositAccountListState;
|
|
404
409
|
depositAccountTransactionListState: DepositAccountTransactionListState;
|
|
@@ -413,6 +418,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
413
418
|
globalMerchantViewState: GlobalMerchantViewState;
|
|
414
419
|
insightsCardState: InsightsCardState;
|
|
415
420
|
internationalWireState: InternationalWireState;
|
|
421
|
+
internationalWireVerificationState: InternationalWireVerificationState;
|
|
416
422
|
magicLinkViewState: MagicLinkViewState;
|
|
417
423
|
merchantListState: MerchantListState;
|
|
418
424
|
netBurnOrIncomeClassesViewState: NetBurnOrIncomeClassesViewState;
|
package/lib/reducer.js
CHANGED
|
@@ -79,6 +79,7 @@ const companyViewReducer_1 = __importStar(require("./view/companyView/companyVie
|
|
|
79
79
|
const accountingSummaryReducer_1 = __importStar(require("./entity/portfolio/accountingSummary/accountingSummaryReducer"));
|
|
80
80
|
const addressViewReducer_1 = __importStar(require("./view/addressView/addressViewReducer"));
|
|
81
81
|
const accountListReducer_1 = __importStar(require("./view/accountList/accountListReducer"));
|
|
82
|
+
const countryListReducer_1 = __importStar(require("./view/countryList/countryListReducer"));
|
|
82
83
|
const merchantListReducer_1 = __importStar(require("./view/spendManagement/merchantList/merchantListReducer"));
|
|
83
84
|
const classListReducer_1 = __importStar(require("./view/classList/classListReducer"));
|
|
84
85
|
const classReducer_1 = __importStar(require("./entity/class/classReducer"));
|
|
@@ -206,6 +207,7 @@ const billsBulkActionViewReducer_1 = __importStar(require("./view/spendManagemen
|
|
|
206
207
|
const remisBulkActionViewReducer_1 = __importStar(require("./view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer"));
|
|
207
208
|
const vendorFiling1099ListReducer_1 = __importStar(require("./view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer"));
|
|
208
209
|
const vendorFiling1099UploadDetailsReducer_1 = __importStar(require("./view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer"));
|
|
210
|
+
const internationalWireVerificationReducer_1 = __importStar(require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer"));
|
|
209
211
|
// Note: Please maintain strict alphabetical order
|
|
210
212
|
const initialEntitiesState = {
|
|
211
213
|
accountGroupState: accountGroupReducer_1.initialState,
|
|
@@ -307,6 +309,7 @@ const initialViewsState = {
|
|
|
307
309
|
companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.initialState,
|
|
308
310
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
|
|
309
311
|
companyViewState: companyViewReducer_1.initialState,
|
|
312
|
+
countryListState: countryListReducer_1.initialState,
|
|
310
313
|
dashboardState: dashboardReducer_1.initialState,
|
|
311
314
|
depositAccountListState: depositAccountListReducer_1.initialState,
|
|
312
315
|
depositAccountTransactionListState: depositAccountTransactionListReducer_1.initialState,
|
|
@@ -321,6 +324,7 @@ const initialViewsState = {
|
|
|
321
324
|
globalMerchantViewState: globalMerchantViewReducer_1.initialState,
|
|
322
325
|
insightsCardState: insightsCardReducer_1.initialState,
|
|
323
326
|
internationalWireState: internationalWireReducer_1.initialState,
|
|
327
|
+
internationalWireVerificationState: internationalWireVerificationReducer_1.initialState,
|
|
324
328
|
magicLinkViewState: magicLinkViewReducer_1.initialState,
|
|
325
329
|
merchantListState: merchantListReducer_1.initialState,
|
|
326
330
|
netBurnOrIncomeClassesViewState: netBurnOrIncomeClassesViewReducer_1.initialState,
|
|
@@ -492,6 +496,7 @@ const viewReducers = {
|
|
|
492
496
|
companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.default,
|
|
493
497
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
|
|
494
498
|
companyViewState: companyViewReducer_1.default,
|
|
499
|
+
countryListState: countryListReducer_1.default,
|
|
495
500
|
dashboardState: dashboardReducer_1.default,
|
|
496
501
|
depositAccountListState: depositAccountListReducer_1.default,
|
|
497
502
|
depositAccountTransactionListState: depositAccountTransactionListReducer_1.default,
|
|
@@ -506,6 +511,7 @@ const viewReducers = {
|
|
|
506
511
|
globalMerchantViewState: globalMerchantViewReducer_1.default,
|
|
507
512
|
insightsCardState: insightsCardReducer_1.default,
|
|
508
513
|
internationalWireState: internationalWireReducer_1.default,
|
|
514
|
+
internationalWireVerificationState: internationalWireVerificationReducer_1.default,
|
|
509
515
|
magicLinkViewState: magicLinkViewReducer_1.default,
|
|
510
516
|
merchantListState: merchantListReducer_1.default,
|
|
511
517
|
netBurnOrIncomeClassesViewState: netBurnOrIncomeClassesViewReducer_1.default,
|
|
@@ -53,7 +53,12 @@
|
|
|
53
53
|
"primary_funding_account": {
|
|
54
54
|
"account_id": null,
|
|
55
55
|
"account_type": null
|
|
56
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"international_wire_onboarding_status": {
|
|
58
|
+
"code": "verified",
|
|
59
|
+
"name": "Verified"
|
|
60
|
+
},
|
|
61
|
+
"international_wire_onboarding_details": {}
|
|
57
62
|
},
|
|
58
63
|
"reimbursement_info": {
|
|
59
64
|
"is_reimbursement_enabled": true,
|
|
@@ -158,6 +163,7 @@
|
|
|
158
163
|
"company_monthly_expenses_max": 100000,
|
|
159
164
|
"phone": "+1 (732) 497-2351",
|
|
160
165
|
"company_address_id": "a_8a1498b2-ab42-4c46-bda1-3bd946ec3cc3",
|
|
166
|
+
"registered_address_id": "a_8a1498b2-ab42-4c46-bda1-3bd946ec3cc3",
|
|
161
167
|
"company_group": {
|
|
162
168
|
"id": "z4",
|
|
163
169
|
"name": null
|
|
@@ -135,7 +135,12 @@
|
|
|
135
135
|
"primary_funding_account": {
|
|
136
136
|
"account_id": null,
|
|
137
137
|
"account_type": null
|
|
138
|
-
}
|
|
138
|
+
},
|
|
139
|
+
"international_wire_onboarding_status": {
|
|
140
|
+
"code": "verified",
|
|
141
|
+
"name": "Verified"
|
|
142
|
+
},
|
|
143
|
+
"international_wire_onboarding_details": {}
|
|
139
144
|
},
|
|
140
145
|
"reimbursement_info": {
|
|
141
146
|
"is_reimbursement_enabled": true,
|
|
@@ -240,6 +245,7 @@
|
|
|
240
245
|
"company_monthly_expenses_max": 100000,
|
|
241
246
|
"phone": "+1 (732) 497-2351",
|
|
242
247
|
"company_address_id": "a_8a1498b2-ab42-4c46-bda1-3bd946ec3cc3",
|
|
248
|
+
"registered_address_id": "a_8a1498b2-ab42-4c46-bda1-3bd946ec3cc3",
|
|
243
249
|
"company_group": {
|
|
244
250
|
"id": "z4",
|
|
245
251
|
"name": null
|
|
@@ -2,7 +2,7 @@ import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
|
2
2
|
import { Address } from '../../entity/address/addressState';
|
|
3
3
|
import { OfficerType } from '../companyView/types/companyPassport/companyUsersLocalData';
|
|
4
4
|
export declare type AddressUpdatableInfo = Omit<Address, 'updateTime' | 'createTime' | 'addressId'>;
|
|
5
|
-
export declare type AddressType = 'company_address' | `officer_${OfficerType}_address` | 'vendor_address' | 'user_address';
|
|
5
|
+
export declare type AddressType = 'company_address' | 'company_registered_address' | `officer_${OfficerType}_address` | 'vendor_address' | 'user_address';
|
|
6
6
|
export interface NewAddressData {
|
|
7
7
|
addressType: AddressType;
|
|
8
8
|
parentEntityId?: {
|
|
@@ -20,6 +20,11 @@ function toAddressViewLocalData(companyView) {
|
|
|
20
20
|
company_address: getAddressUpdatableInfoFromAddress(companyView.companyAddress),
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
+
if (companyView.registeredAddress != null) {
|
|
24
|
+
newAddresses = Object.assign({}, newAddresses, {
|
|
25
|
+
company_registered_address: getAddressUpdatableInfoFromAddress(companyView.registeredAddress),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
23
28
|
companyView.companyOfficers
|
|
24
29
|
.slice(0, companyUsersLocalData_1.ALL_OFFICERS.length)
|
|
25
30
|
.sort((a, b) => { var _a; return ((_a = a.user.createTime) === null || _a === void 0 ? void 0 : _a.isAfter(b.user.createTime)) === true ? 1 : -1; })
|
|
@@ -9,7 +9,6 @@ import { ClassBase } from '../../../entity/class/classState';
|
|
|
9
9
|
import { BankAccount } from '../../../entity/bankAccount/bankAccount';
|
|
10
10
|
import { Contact } from '../../../entity/billPay/contact/contact';
|
|
11
11
|
import { Address } from '../../../entity/address/addressState';
|
|
12
|
-
import { Country } from '../../spendManagement/billPay/billPayConfig/billPayConfigState';
|
|
13
12
|
import { NewAddressData } from '../../addressView/addressViewState';
|
|
14
13
|
import { BankAccountSelectorView } from '../../bankAccountView/bankAccountViewSelector';
|
|
15
14
|
import { TrendWithTransactionsView } from '../../trendWithTransactions/trendWithTransactionsSelector';
|
|
@@ -21,6 +20,7 @@ import { VendorType } from '../../vendorTypeList/vendorTypeListPayload';
|
|
|
21
20
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
22
21
|
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
23
22
|
import { PaymentInstrument } from '../../../entity/paymentInstrument/paymentInstrument';
|
|
23
|
+
import { Country } from '../../countryList/countryListState';
|
|
24
24
|
export interface VendorDetails {
|
|
25
25
|
vendorBasic: VendorBasic | undefined;
|
|
26
26
|
bankAccountsUpdated: BankAccount[];
|
package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js
CHANGED
|
@@ -25,12 +25,7 @@ const updateCompanyPassportLocalStoreDataEpic = (actions$, state$) => actions$.p
|
|
|
25
25
|
const companyFiles = (0, fileSelector_1.getFilesByFileIds)(fileState, fileIds);
|
|
26
26
|
const companyLocalData = (0, companyPassportLocalData_1.toCompanyPassportLocalData)(companyView, companyFiles);
|
|
27
27
|
fetchActions.push((0, companyViewReducer_1.companyPassportClearDataInLocalStore)(), (0, companyViewReducer_1.companyPassportSaveDataInLocalStore)(companyLocalData));
|
|
28
|
-
|
|
29
|
-
const companyPassportAddressTypes = [
|
|
30
|
-
'company_address',
|
|
31
|
-
...officerAddressTypes,
|
|
32
|
-
];
|
|
33
|
-
fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyPassportAddressTypes));
|
|
28
|
+
fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyUsersLocalData_1.AllCompanyPassportAddressTypes));
|
|
34
29
|
const addresses = (0, toAddressViewLocalData_1.toAddressViewLocalData)(companyView);
|
|
35
30
|
if (addresses != null) {
|
|
36
31
|
Object.keys(addresses).forEach((addressType) => {
|
|
@@ -60,6 +60,9 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
|
|
|
60
60
|
const companyAddress = updatedManagegmentInfo.companyAddressId != null
|
|
61
61
|
? (0, addressSelector_1.getAddressByAddressId)(state.addressState, updatedManagegmentInfo.companyAddressId)
|
|
62
62
|
: undefined;
|
|
63
|
+
const registeredAddress = updatedManagegmentInfo.registeredAddressId != null
|
|
64
|
+
? (0, addressSelector_1.getAddressByAddressId)(state.addressState, updatedManagegmentInfo.registeredAddressId)
|
|
65
|
+
: undefined;
|
|
63
66
|
const primaryContact = updatedManagegmentInfo.primaryContactUserId != null
|
|
64
67
|
? (0, userAndRole_1.getUserAndUserRole)(state.userState, state.userRoleState, state.addressState, updatedManagegmentInfo.primaryContactUserId)
|
|
65
68
|
: undefined;
|
|
@@ -170,6 +173,7 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
|
|
|
170
173
|
return {
|
|
171
174
|
company,
|
|
172
175
|
companyAddress,
|
|
176
|
+
registeredAddress,
|
|
173
177
|
primaryContact,
|
|
174
178
|
companyOfficers,
|
|
175
179
|
companyContact,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ID } from '../../../../commonStateTypes/common';
|
|
2
|
+
import { AddressType } from '../../../addressView/addressViewState';
|
|
2
3
|
export interface PrimaryContactLocalData {
|
|
3
4
|
userId: ID | undefined;
|
|
4
5
|
firstName: string;
|
|
@@ -9,6 +10,7 @@ export declare const ALL_OFFICERS: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
|
9
10
|
declare const toOfficerType: (n: number) => 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
10
11
|
export declare type OfficerType = ReturnType<typeof toOfficerType>;
|
|
11
12
|
export declare type CompanyOfficerType = `Officer_${OfficerType}`;
|
|
13
|
+
export declare const AllCompanyPassportAddressTypes: AddressType[];
|
|
12
14
|
export interface CompanyOfficerLocalData {
|
|
13
15
|
officerType: CompanyOfficerType;
|
|
14
16
|
userId: ID | undefined;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALL_OFFICERS = void 0;
|
|
3
|
+
exports.AllCompanyPassportAddressTypes = exports.ALL_OFFICERS = void 0;
|
|
4
4
|
const numberToUnion_1 = require("../../../../commonStateTypes/numberToUnion");
|
|
5
5
|
exports.ALL_OFFICERS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
6
6
|
const toOfficerType = (n) => (0, numberToUnion_1.numberToUnion)(n, exports.ALL_OFFICERS);
|
|
7
|
+
const officerAddressTypes = exports.ALL_OFFICERS.map((all) => `officer_${all}_address`);
|
|
8
|
+
exports.AllCompanyPassportAddressTypes = [
|
|
9
|
+
'company_address',
|
|
10
|
+
'company_registered_address',
|
|
11
|
+
...officerAddressTypes,
|
|
12
|
+
];
|
|
@@ -12,6 +12,7 @@ export interface PrimarySubscription {
|
|
|
12
12
|
export interface CompanyView {
|
|
13
13
|
company: CompanyWithSchema;
|
|
14
14
|
companyAddress?: Address;
|
|
15
|
+
registeredAddress?: Address;
|
|
15
16
|
primaryContact?: UserAndRole;
|
|
16
17
|
companyOfficers: UserAndRole[];
|
|
17
18
|
companyContact?: UserAndRole;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CountryList, CountryListKeyType, CountryListState } from './countryListState';
|
|
2
|
+
import { CountryListPayload } from './payloads/countryListPayload';
|
|
3
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
4
|
+
export declare const initialCountryList: CountryList;
|
|
5
|
+
export declare const initialState: CountryListState;
|
|
6
|
+
export declare const fetchCountryList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[countryListKey: "nationalityCountryList", cacheOverride?: any], {
|
|
7
|
+
countryListKey: "nationalityCountryList";
|
|
8
|
+
cacheOverride: any;
|
|
9
|
+
}, string, never, never>, fetchNationalityCountryList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateCountryList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
|
+
countryListKey: CountryListKeyType;
|
|
11
|
+
countryListPayload: CountryListPayload[];
|
|
12
|
+
}, string>, updateCountryListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
13
|
+
countryListKey: CountryListKeyType;
|
|
14
|
+
status: ZeniAPIStatus;
|
|
15
|
+
}, string>, clearCountryList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
16
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<CountryListState, import("@reduxjs/toolkit").AnyAction>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearCountryList = exports.updateCountryListFailure = exports.updateCountryList = exports.fetchNationalityCountryList = exports.fetchCountryList = exports.initialState = exports.initialCountryList = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const countryListPayload_1 = require("./payloads/countryListPayload");
|
|
7
|
+
exports.initialCountryList = {
|
|
8
|
+
fetchState: 'Not-Started',
|
|
9
|
+
error: undefined,
|
|
10
|
+
countries: [],
|
|
11
|
+
hasValidState() {
|
|
12
|
+
return this.fetchState == 'Completed';
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.initialState = {
|
|
16
|
+
byCountryListCode: {
|
|
17
|
+
nationalityCountryList: exports.initialCountryList,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const countryList = (0, toolkit_1.createSlice)({
|
|
21
|
+
name: 'countryList',
|
|
22
|
+
initialState: exports.initialState,
|
|
23
|
+
reducers: {
|
|
24
|
+
fetchCountryList: {
|
|
25
|
+
reducer(draft, action) {
|
|
26
|
+
if (action.payload.cacheOverride ||
|
|
27
|
+
draft.byCountryListCode[action.payload.countryListKey].fetchState !==
|
|
28
|
+
'Completed') {
|
|
29
|
+
draft.byCountryListCode[action.payload.countryListKey] = Object.assign(Object.assign({}, exports.initialCountryList), { fetchState: 'In-Progress', error: undefined });
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
prepare(countryListKey, cacheOverride = false) {
|
|
33
|
+
return {
|
|
34
|
+
payload: {
|
|
35
|
+
countryListKey,
|
|
36
|
+
cacheOverride,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
|
+
fetchNationalityCountryList(_draft) {
|
|
43
|
+
// do nothing
|
|
44
|
+
},
|
|
45
|
+
updateCountryList(draft, action) {
|
|
46
|
+
const countryList = action.payload.countryListPayload.map((nCountry) => (0, countryListPayload_1.toCountry)(nCountry));
|
|
47
|
+
draft.byCountryListCode[action.payload.countryListKey] = Object.assign(Object.assign({}, exports.initialCountryList), { fetchState: 'Completed', error: undefined, countries: countryList });
|
|
48
|
+
},
|
|
49
|
+
updateCountryListFailure(draft, action) {
|
|
50
|
+
draft.byCountryListCode[action.payload.countryListKey] = Object.assign(Object.assign({}, exports.initialCountryList), { fetchState: 'Error', error: action.payload.status });
|
|
51
|
+
},
|
|
52
|
+
clearCountryList(draft) {
|
|
53
|
+
Object.assign(draft, exports.initialState);
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
_a = countryList.actions, exports.fetchCountryList = _a.fetchCountryList, exports.fetchNationalityCountryList = _a.fetchNationalityCountryList, exports.updateCountryList = _a.updateCountryList, exports.updateCountryListFailure = _a.updateCountryListFailure, exports.clearCountryList = _a.clearCountryList;
|
|
58
|
+
exports.default = countryList.reducer;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
|
+
import { CountryListKeyType, CountryListState, Country } from './countryListState';
|
|
3
|
+
export interface CountryListSelectorView extends SelectorView {
|
|
4
|
+
countries: Country[];
|
|
5
|
+
countryListKey: CountryListKeyType;
|
|
6
|
+
}
|
|
7
|
+
export declare const getCountryList: (countryListState: CountryListState, countryListKey: CountryListKeyType) => CountryListSelectorView;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCountryList = void 0;
|
|
4
|
+
const getCountryList = (countryListState, countryListKey) => {
|
|
5
|
+
return {
|
|
6
|
+
countries: countryListState.byCountryListCode[countryListKey].countries,
|
|
7
|
+
fetchState: countryListState.byCountryListCode[countryListKey].fetchState,
|
|
8
|
+
error: countryListState.byCountryListCode[countryListKey].error,
|
|
9
|
+
countryListKey: countryListKey,
|
|
10
|
+
version: 1,
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
exports.getCountryList = getCountryList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FetchedState } from '../../commonStateTypes/common';
|
|
2
|
+
export declare type CountryListKeyType = 'nationalityCountryList';
|
|
3
|
+
export interface Country {
|
|
4
|
+
countryCode: string;
|
|
5
|
+
countryName: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CountryList extends FetchedState {
|
|
8
|
+
countries: Country[];
|
|
9
|
+
}
|
|
10
|
+
export interface CountryListState {
|
|
11
|
+
byCountryListCode: Record<CountryListKeyType, CountryList>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { fetchCountryList, fetchNationalityCountryList } from '../countryListReducer';
|
|
5
|
+
export declare type ActionType = ReturnType<typeof fetchCountryList> | ReturnType<typeof fetchNationalityCountryList>;
|
|
6
|
+
export declare const fetchCountryListEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchCountryListEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const countryListReducer_1 = require("../countryListReducer");
|
|
7
|
+
const fetchCountryListEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(countryListReducer_1.fetchCountryList.match), (0, operators_1.mergeMap)((action) => {
|
|
8
|
+
const actions = [];
|
|
9
|
+
const draft = state$.value.countryListState;
|
|
10
|
+
if (action.payload.cacheOverride === true ||
|
|
11
|
+
draft.byCountryListCode[action.payload.countryListKey].fetchState !==
|
|
12
|
+
'Completed') {
|
|
13
|
+
if (action.payload.countryListKey === 'nationalityCountryList') {
|
|
14
|
+
actions.push((0, countryListReducer_1.fetchNationalityCountryList)());
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return (0, rxjs_1.from)(actions);
|
|
18
|
+
}));
|
|
19
|
+
exports.fetchCountryListEpic = fetchCountryListEpic;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
+
import { RootState } from '../../../reducer';
|
|
5
|
+
import { fetchNationalityCountryList, updateCountryList, updateCountryListFailure } from '../countryListReducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof fetchNationalityCountryList> | ReturnType<typeof updateCountryList> | ReturnType<typeof updateCountryListFailure>;
|
|
7
|
+
export declare const fetchNationalityCountryListEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchNationalityCountryListEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const countryListReducer_1 = require("../countryListReducer");
|
|
8
|
+
const fetchNationalityCountryListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(countryListReducer_1.fetchNationalityCountryList.match), (0, operators_1.switchMap)(() => {
|
|
9
|
+
const queryValue = {
|
|
10
|
+
region: 'US',
|
|
11
|
+
legal_type: 'BUSINESS',
|
|
12
|
+
onboarding_fields: ['nationality'],
|
|
13
|
+
};
|
|
14
|
+
return zeniAPI
|
|
15
|
+
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
|
|
16
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
19
|
+
return (0, rxjs_1.of)((0, countryListReducer_1.updateCountryList)({
|
|
20
|
+
countryListKey: 'nationalityCountryList',
|
|
21
|
+
countryListPayload: (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.labels.nationality.field_values) !== null && _b !== void 0 ? _b : [],
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return (0, rxjs_1.of)((0, countryListReducer_1.updateCountryListFailure)({
|
|
26
|
+
countryListKey: 'nationalityCountryList',
|
|
27
|
+
status: response.status,
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
}), (0, operators_1.catchError)((error) => {
|
|
31
|
+
return (0, rxjs_1.of)((0, countryListReducer_1.updateCountryListFailure)({
|
|
32
|
+
countryListKey: 'nationalityCountryList',
|
|
33
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Nationality Country List REST API call errored out' +
|
|
34
|
+
JSON.stringify(error)),
|
|
35
|
+
}));
|
|
36
|
+
}));
|
|
37
|
+
}));
|
|
38
|
+
exports.fetchNationalityCountryListEpic = fetchNationalityCountryListEpic;
|