@zeniai/client-epic-state 5.1.7 → 5.1.8-betaAS1
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/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
- package/lib/commonPayloadTypes/commonPayload.d.ts +25 -4
- package/lib/commonStateTypes/amount.d.ts +1 -0
- package/lib/commonStateTypes/amount.js +9 -1
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- package/lib/commonStateTypes/workingDayHelper.d.ts +9 -0
- package/lib/commonStateTypes/workingDayHelper.js +28 -1
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +63 -5
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
- package/lib/entity/aiCfo/aiCfoReducer.js +249 -9
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
- package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +97 -4
- package/lib/entity/aiCfo/aiCfoState.js +20 -1
- package/lib/entity/approvalRule/approvalRuleConflict.d.ts +56 -0
- package/lib/entity/approvalRule/approvalRuleConflict.js +77 -0
- package/lib/entity/approvalRule/approvalRulePayload.d.ts +34 -5
- package/lib/entity/approvalRule/approvalRulePayload.js +149 -10
- package/lib/entity/approvalRule/approvalRuleSelector.d.ts +25 -1
- package/lib/entity/approvalRule/approvalRuleSelector.js +40 -0
- package/lib/entity/approvalRule/approvalRuleState.d.ts +59 -7
- package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
- package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
- package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
- package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
- package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
- package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
- package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
- package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +6 -0
- package/lib/entity/company/companyStateTypes.d.ts +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +19 -0
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.js +9 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +5 -0
- package/lib/entity/task/taskPayload.d.ts +3 -1
- package/lib/entity/task/taskPayload.js +2 -0
- package/lib/entity/task/taskState.d.ts +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +8 -2
- package/lib/entity/tenant/clearAllEpic.js +12 -0
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +59 -0
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantPayload.d.ts +3 -2
- package/lib/entity/tenant/tenantReducer.d.ts +44 -30
- package/lib/entity/tenant/tenantReducer.js +130 -29
- package/lib/entity/tenant/tenantState.d.ts +3 -2
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +4 -2
- package/lib/epic.d.ts +32 -4
- package/lib/epic.js +33 -4
- package/lib/esm/commonStateTypes/amount.js +7 -0
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/commonStateTypes/workingDayHelper.js +26 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +249 -9
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
- package/lib/esm/entity/aiCfo/aiCfoState.js +17 -0
- package/lib/esm/entity/approvalRule/approvalRuleConflict.js +74 -0
- package/lib/esm/entity/approvalRule/approvalRulePayload.js +149 -10
- package/lib/esm/entity/approvalRule/approvalRuleSelector.js +35 -0
- package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
- package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
- package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
- package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
- package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
- package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
- package/lib/esm/entity/company/companyPayload.js +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +19 -0
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +8 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +5 -0
- package/lib/esm/entity/task/taskPayload.js +2 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +12 -0
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +55 -0
- package/lib/esm/entity/tenant/tenantReducer.js +128 -27
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +4 -2
- package/lib/esm/epic.js +33 -4
- package/lib/esm/index.js +74 -28
- package/lib/esm/reducer.js +18 -0
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
- package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +39 -11
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +14 -4
- package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +38 -0
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
- package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +16 -0
- package/lib/esm/view/companyView/companyViewReducer.js +11 -10
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +5 -5
- package/lib/esm/view/companyView/epic/companyPassport/{updateCapitalizationThresholdEpic.js → updateCapitalizationAccountThresholdEpic.js} +38 -19
- package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
- package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
- package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +29 -17
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +223 -51
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +36 -18
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +45 -6
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +22 -2
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +109 -12
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +11 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +54 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +13 -4
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +144 -16
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
- package/lib/esm/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +7 -3
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +33 -34
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +146 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +40 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +86 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +55 -8
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +5 -6
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +39 -15
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +154 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +29 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +78 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +49 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +32 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +32 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +54 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +92 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +212 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +10 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +23 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +36 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +27 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +28 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +71 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +49 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +77 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +221 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +106 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +41 -0
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +11 -7
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +61 -0
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +13 -4
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +80 -11
- package/lib/index.d.ts +92 -36
- package/lib/index.js +285 -35
- package/lib/reducer.d.ts +18 -0
- package/lib/reducer.js +18 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
- package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
- package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +19 -11
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +11 -5
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +40 -12
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +2 -0
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +13 -3
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +11 -3
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +10 -0
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +42 -0
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +1 -3
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +6 -0
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +20 -0
- package/lib/view/companyView/companyViewReducer.d.ts +8 -7
- package/lib/view/companyView/companyViewReducer.js +12 -11
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +5 -5
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/{updateCapitalizationThresholdEpic.js → updateCapitalizationAccountThresholdEpic.js} +38 -19
- package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +3 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -1
- package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
- package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +44 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +27 -15
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +44 -5
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +225 -52
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +6 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +39 -18
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +53 -8
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +47 -7
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +8 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +21 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +22 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +14 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +110 -13
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +16 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +10 -6
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.d.ts +23 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +58 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +12 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +59 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +146 -17
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +31 -5
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +8 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +3 -3
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +6 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +32 -33
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +2 -7
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.d.ts +4 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +150 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.d.ts +38 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +43 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.d.ts +27 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +96 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +24 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +59 -9
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +4 -5
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +39 -15
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.d.ts +32 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +159 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +47 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +34 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +23 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +82 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +40 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +53 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +37 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +53 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +14 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +36 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +36 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +56 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +60 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +22 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +96 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +59 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +217 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +122 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +13 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +27 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +40 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +31 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +15 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +32 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +75 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +53 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +12 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +9 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +81 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +24 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +29 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +229 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +107 -53
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +154 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +46 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +10 -6
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.d.ts +14 -0
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +65 -0
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +12 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +14 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +81 -12
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +12 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +6 -4
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +0 -10
|
@@ -1,29 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getIntlWireVerificationView = void 0;
|
|
4
|
+
const companySelector_1 = require("../../../../entity/company/companySelector");
|
|
4
5
|
const fileSelector_1 = require("../../../../entity/file/fileSelector");
|
|
6
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
5
7
|
const fileViewSelector_1 = require("../../../fileView/fileViewSelector");
|
|
8
|
+
const internationalWireVerificationPayload_1 = require("./internationalWireVerificationPayload");
|
|
9
|
+
const collectFileIdsFromLocalData = (localData) => {
|
|
10
|
+
const fileIds = new Set();
|
|
11
|
+
Object.values(localData).forEach((value) => {
|
|
12
|
+
if (typeof value === 'string' && value.startsWith('file_')) {
|
|
13
|
+
fileIds.add(value);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (Array.isArray(value)) {
|
|
17
|
+
value.forEach((item) => {
|
|
18
|
+
if (typeof item === 'string' && item.startsWith('file_')) {
|
|
19
|
+
fileIds.add(item);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return Array.from(fileIds);
|
|
25
|
+
};
|
|
6
26
|
const getIntlWireVerificationView = (state) => {
|
|
7
27
|
const deleteFileStatusById = {};
|
|
8
28
|
const updateFileStatusById = {};
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
if (fileField != null) {
|
|
13
|
-
fileId = state.internationalWireVerificationState.verificationFormLocalData[fileField.name];
|
|
14
|
-
}
|
|
15
|
-
if (fileId != null) {
|
|
29
|
+
const { verificationFormFetchState, verificationFormFields, verificationFormLocalData, verificationFormSubmitState, } = state.internationalWireVerificationState;
|
|
30
|
+
const fileIds = collectFileIdsFromLocalData(verificationFormLocalData);
|
|
31
|
+
fileIds.forEach((fileId) => {
|
|
16
32
|
deleteFileStatusById[fileId] = (0, fileViewSelector_1.getFileDeleteStatusById)(state, fileId);
|
|
17
33
|
updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
34
|
+
});
|
|
35
|
+
const userFiles = fileIds.length > 0 ? (0, fileSelector_1.getFilesByFileIds)(state.fileState, fileIds) : [];
|
|
36
|
+
const fetchState = verificationFormFetchState.fetchState;
|
|
37
|
+
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
38
|
+
const company = currentTenant?.companyId != null
|
|
39
|
+
? (0, companySelector_1.getCompanyByCompanyId)(state.companyState, currentTenant.companyId)
|
|
40
|
+
?.company
|
|
41
|
+
: undefined;
|
|
42
|
+
const onboardingStatusCode = company?.companyBillPayInfo?.internationalWireOnboardingStatus?.code;
|
|
43
|
+
const isReadonly = onboardingStatusCode != null &&
|
|
44
|
+
onboardingStatusCode !== 'onboarding_status_not_started';
|
|
45
|
+
const visibleVerificationFormFields = (0, internationalWireVerificationPayload_1.filterVerificationFormFieldsForReadonlyView)(verificationFormFields, verificationFormLocalData, isReadonly);
|
|
25
46
|
return {
|
|
26
|
-
|
|
47
|
+
verificationFormFetchState,
|
|
48
|
+
verificationFormFields: visibleVerificationFormFields,
|
|
49
|
+
verificationFormLocalData,
|
|
50
|
+
verificationFormSubmitState,
|
|
27
51
|
deleteFileStatusById,
|
|
28
52
|
updateFileStatusById,
|
|
29
53
|
userFiles,
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { FetchStateAndError } from '../../../../commonStateTypes/common';
|
|
2
|
+
import { FieldPayload } from './internationalWireVerificationPayload';
|
|
2
3
|
export interface InternationalWireVerificationState {
|
|
3
4
|
verificationFormFetchState: FetchStateAndError;
|
|
5
|
+
verificationFormFieldLabels: Record<string, FieldPayload>;
|
|
4
6
|
verificationFormFields: VerificationFormField[];
|
|
5
7
|
verificationFormLocalData: VerificationFormLocalData;
|
|
6
8
|
verificationFormSubmitState: FetchStateAndError;
|
|
7
9
|
}
|
|
8
|
-
export type
|
|
10
|
+
export type VerificationFormLocalDataValue = string | string[] | number;
|
|
11
|
+
export type VerificationFormLocalData = Record<string, VerificationFormLocalDataValue>;
|
|
9
12
|
export interface FieldValueType {
|
|
10
13
|
code: string;
|
|
11
14
|
description: string;
|
|
12
15
|
}
|
|
16
|
+
export interface VerificationFormFieldOption {
|
|
17
|
+
label: string;
|
|
18
|
+
}
|
|
19
|
+
export interface VerificationFormSubField {
|
|
20
|
+
fieldValues: FieldValueType[];
|
|
21
|
+
label: string;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
type: string;
|
|
24
|
+
isMultipleOptionsSupported?: boolean;
|
|
25
|
+
options?: Record<string, VerificationFormFieldOption>;
|
|
26
|
+
}
|
|
13
27
|
export interface VerificationFormField {
|
|
14
28
|
fieldValues: FieldValueType[];
|
|
15
29
|
isMultipleValuesAllowed: boolean;
|
|
@@ -17,4 +31,9 @@ export interface VerificationFormField {
|
|
|
17
31
|
name: string;
|
|
18
32
|
placeholder: string;
|
|
19
33
|
type: string;
|
|
34
|
+
default?: boolean;
|
|
35
|
+
isMultipleOptionsSupported?: boolean;
|
|
36
|
+
options?: Record<string, VerificationFormFieldOption>;
|
|
37
|
+
requirements?: string[];
|
|
38
|
+
subfields?: Record<string, VerificationFormSubField>;
|
|
20
39
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VerificationFormLocalData } from './internationalWireVerificationState';
|
|
2
|
+
export interface IntlWireFileOptionPayload {
|
|
3
|
+
file_id: string;
|
|
4
|
+
option: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IntlWirePersonNamePayload {
|
|
7
|
+
first_name: string;
|
|
8
|
+
last_name: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IntlWirePersonPayload {
|
|
11
|
+
company_role?: string;
|
|
12
|
+
date_of_birth?: string;
|
|
13
|
+
email?: string;
|
|
14
|
+
name?: IntlWirePersonNamePayload;
|
|
15
|
+
nationality?: string;
|
|
16
|
+
ownership_percentage?: number;
|
|
17
|
+
proof_of_address?: IntlWireFileOptionPayload[];
|
|
18
|
+
proof_of_identity?: IntlWireFileOptionPayload[];
|
|
19
|
+
ssn?: string;
|
|
20
|
+
}
|
|
21
|
+
export type IntlWireFormDetailsPayload = Record<string, string | string[] | number | IntlWireFileOptionPayload[] | IntlWirePersonPayload | IntlWirePersonPayload[]>;
|
|
22
|
+
export declare const IntlWireVerificationLocalDataSuffix: {
|
|
23
|
+
readonly documentOption: "_option";
|
|
24
|
+
readonly documentBack: "_back";
|
|
25
|
+
readonly nameFirst: "_first_name";
|
|
26
|
+
readonly nameLast: "_last_name";
|
|
27
|
+
};
|
|
28
|
+
export declare const toIntlWireVerificationFormDetails: (localData: VerificationFormLocalData) => IntlWireFormDetailsPayload;
|
|
29
|
+
export declare const toIntlWireVerificationSubmitPayload: (localData: VerificationFormLocalData) => {
|
|
30
|
+
is_applicant_declaration: boolean;
|
|
31
|
+
form_details: IntlWireFormDetailsPayload;
|
|
32
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toIntlWireVerificationSubmitPayload = exports.toIntlWireVerificationFormDetails = exports.IntlWireVerificationLocalDataSuffix = void 0;
|
|
4
|
+
const internationalWireVerificationFieldConstants_1 = require("./internationalWireVerificationFieldConstants");
|
|
5
|
+
exports.IntlWireVerificationLocalDataSuffix = {
|
|
6
|
+
documentOption: '_option',
|
|
7
|
+
documentBack: '_back',
|
|
8
|
+
nameFirst: '_first_name',
|
|
9
|
+
nameLast: '_last_name',
|
|
10
|
+
};
|
|
11
|
+
const MULTI_OPTION_FILE_FIELD_NAMES = new Set([
|
|
12
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.businessOwnership,
|
|
13
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.companyProofOfAddress,
|
|
14
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
|
|
15
|
+
]);
|
|
16
|
+
const BOOLEAN_WITH_SUBFIELDS_FIELD_NAMES = new Set([
|
|
17
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder,
|
|
18
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson,
|
|
19
|
+
]);
|
|
20
|
+
const FILE_SUBFIELD_NAMES = new Set([
|
|
21
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.proofOfIdentity,
|
|
22
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.proofOfAddress,
|
|
23
|
+
]);
|
|
24
|
+
const isInternalLocalDataKey = (key) => key.endsWith(exports.IntlWireVerificationLocalDataSuffix.documentOption) ||
|
|
25
|
+
key.endsWith(exports.IntlWireVerificationLocalDataSuffix.documentBack) ||
|
|
26
|
+
key.endsWith(exports.IntlWireVerificationLocalDataSuffix.nameFirst) ||
|
|
27
|
+
key.endsWith(exports.IntlWireVerificationLocalDataSuffix.nameLast);
|
|
28
|
+
const isPersonSubfieldKey = (key) => key.startsWith(`${internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder}_`) ||
|
|
29
|
+
key.startsWith(`${internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson}_`);
|
|
30
|
+
const toFileOptionPayloads = (localData, baseKey) => {
|
|
31
|
+
const option = localData[`${baseKey}${exports.IntlWireVerificationLocalDataSuffix.documentOption}`];
|
|
32
|
+
if (typeof option !== 'string' || option.length === 0) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const payloads = [];
|
|
36
|
+
const frontFileId = localData[baseKey];
|
|
37
|
+
if (typeof frontFileId === 'string' && frontFileId.length > 0) {
|
|
38
|
+
payloads.push({ file_id: frontFileId, option });
|
|
39
|
+
}
|
|
40
|
+
const backFileId = localData[`${baseKey}${exports.IntlWireVerificationLocalDataSuffix.documentBack}`];
|
|
41
|
+
if (typeof backFileId === 'string' && backFileId.length > 0) {
|
|
42
|
+
payloads.push({ file_id: backFileId, option });
|
|
43
|
+
}
|
|
44
|
+
return payloads.length > 0 ? payloads : undefined;
|
|
45
|
+
};
|
|
46
|
+
const buildPersonPayload = (localData, keyPrefix) => {
|
|
47
|
+
const person = {};
|
|
48
|
+
const nameBaseKey = `${keyPrefix}_${internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.name}`;
|
|
49
|
+
const firstName = localData[`${nameBaseKey}${exports.IntlWireVerificationLocalDataSuffix.nameFirst}`];
|
|
50
|
+
const lastName = localData[`${nameBaseKey}${exports.IntlWireVerificationLocalDataSuffix.nameLast}`];
|
|
51
|
+
if (typeof firstName === 'string' || typeof lastName === 'string') {
|
|
52
|
+
person.name = {
|
|
53
|
+
first_name: typeof firstName === 'string' ? firstName : '',
|
|
54
|
+
last_name: typeof lastName === 'string' ? lastName : '',
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const assignStringField = (subfieldName, assign) => {
|
|
58
|
+
const value = localData[`${keyPrefix}_${subfieldName}`];
|
|
59
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
60
|
+
assign(value);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.nationality, (value) => {
|
|
64
|
+
person.nationality = value;
|
|
65
|
+
});
|
|
66
|
+
assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.email, (value) => {
|
|
67
|
+
person.email = value;
|
|
68
|
+
});
|
|
69
|
+
assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.companyRole, (value) => {
|
|
70
|
+
person.company_role = value;
|
|
71
|
+
});
|
|
72
|
+
assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.ssn, (value) => {
|
|
73
|
+
person.ssn = value;
|
|
74
|
+
});
|
|
75
|
+
assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.dateOfBirth, (value) => {
|
|
76
|
+
person.date_of_birth = value;
|
|
77
|
+
});
|
|
78
|
+
const ownershipValue = localData[`${keyPrefix}_${internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.ownershipPercentage}`];
|
|
79
|
+
if (ownershipValue != null && ownershipValue !== '') {
|
|
80
|
+
person.ownership_percentage = Number(ownershipValue);
|
|
81
|
+
}
|
|
82
|
+
FILE_SUBFIELD_NAMES.forEach((subfieldName) => {
|
|
83
|
+
const filePayloads = toFileOptionPayloads(localData, `${keyPrefix}_${subfieldName}`);
|
|
84
|
+
if (filePayloads != null) {
|
|
85
|
+
if (subfieldName ===
|
|
86
|
+
internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.proofOfIdentity) {
|
|
87
|
+
person.proof_of_identity = filePayloads;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
person.proof_of_address = filePayloads;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return person;
|
|
95
|
+
};
|
|
96
|
+
const getStakeHolderOwnerIndices = (localData) => {
|
|
97
|
+
const stakeHolderPrefix = `${internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder}_`;
|
|
98
|
+
const indices = new Set();
|
|
99
|
+
Object.keys(localData).forEach((key) => {
|
|
100
|
+
const match = key.match(/^stake_holder_(\d+)_/);
|
|
101
|
+
if (match != null) {
|
|
102
|
+
indices.add(Number.parseInt(match[1], 10));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
if (indices.size === 0) {
|
|
106
|
+
const hasUnindexedStakeHolderData = Object.keys(localData).some((key) => key.startsWith(stakeHolderPrefix) &&
|
|
107
|
+
!/^stake_holder_(true|false)$/.test(key));
|
|
108
|
+
if (hasUnindexedStakeHolderData) {
|
|
109
|
+
indices.add(0);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return Array.from(indices).sort((a, b) => a - b);
|
|
113
|
+
};
|
|
114
|
+
const hasPersonPayloadData = (person) => Object.keys(person).length > 0;
|
|
115
|
+
const toIntlWireVerificationFormDetails = (localData) => {
|
|
116
|
+
const formDetails = {};
|
|
117
|
+
Object.entries(localData).forEach(([key, value]) => {
|
|
118
|
+
if (BOOLEAN_WITH_SUBFIELDS_FIELD_NAMES.has(key) ||
|
|
119
|
+
isInternalLocalDataKey(key) ||
|
|
120
|
+
isPersonSubfieldKey(key)) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (MULTI_OPTION_FILE_FIELD_NAMES.has(key)) {
|
|
124
|
+
const filePayloads = toFileOptionPayloads(localData, key);
|
|
125
|
+
if (filePayloads != null) {
|
|
126
|
+
formDetails[key] = filePayloads;
|
|
127
|
+
}
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (value == null || value === '') {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
formDetails[key] = value;
|
|
134
|
+
});
|
|
135
|
+
const stakeHolderSelection = localData[internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder];
|
|
136
|
+
if (stakeHolderSelection === 'true') {
|
|
137
|
+
formDetails[internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder] = getStakeHolderOwnerIndices(localData)
|
|
138
|
+
.map((ownerIndex) => buildPersonPayload(localData, `${internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder}_${ownerIndex}`))
|
|
139
|
+
.filter(hasPersonPayloadData);
|
|
140
|
+
}
|
|
141
|
+
else if (stakeHolderSelection === 'false') {
|
|
142
|
+
formDetails[internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder] = [];
|
|
143
|
+
}
|
|
144
|
+
const controllingPersonSelection = localData[internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames
|
|
145
|
+
.controllingPerson];
|
|
146
|
+
if (controllingPersonSelection === 'false') {
|
|
147
|
+
const controllingPerson = buildPersonPayload(localData, internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson);
|
|
148
|
+
if (hasPersonPayloadData(controllingPerson)) {
|
|
149
|
+
formDetails[internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson] = controllingPerson;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return formDetails;
|
|
153
|
+
};
|
|
154
|
+
exports.toIntlWireVerificationFormDetails = toIntlWireVerificationFormDetails;
|
|
155
|
+
const toIntlWireVerificationSubmitPayload = (localData) => ({
|
|
156
|
+
is_applicant_declaration: true,
|
|
157
|
+
form_details: (0, exports.toIntlWireVerificationFormDetails)(localData),
|
|
158
|
+
});
|
|
159
|
+
exports.toIntlWireVerificationSubmitPayload = toIntlWireVerificationSubmitPayload;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Amount } from '../../../../commonStateTypes/amount';
|
|
2
|
+
import { ID } from '../../../../commonStateTypes/common';
|
|
3
|
+
import { DepositAccountPayload } from '../../../../entity/depositAccount/depositAccountPayload';
|
|
4
|
+
import { ZeniAPIResponse } from '../../../../responsePayload';
|
|
5
|
+
import { ZeniDate } from '../../../../zeniDayJS';
|
|
6
|
+
import { AutoSweepFlowState, AutoSweepFrequency } from './autoSweepFlowState';
|
|
7
|
+
/**
|
|
8
|
+
* Body sent to `PUT /cash-management/settings`. Field names match the
|
|
9
|
+
* cash-management-agent contract; `minimum_buffer_usd` is a plain number
|
|
10
|
+
* (the slice tracks the canonical `Amount` value).
|
|
11
|
+
*/
|
|
12
|
+
export type SaveAutoSweepSettingsBody = {
|
|
13
|
+
frequency: string;
|
|
14
|
+
memo: string;
|
|
15
|
+
minimum_buffer_usd: number;
|
|
16
|
+
};
|
|
17
|
+
export type SaveAutoSweepSettingsResponse = ZeniAPIResponse<unknown>;
|
|
18
|
+
export declare const toSaveAutoSweepSettingsBody: (state: Pick<AutoSweepFlowState, "bufferAmount" | "frequency" | "memo">) => SaveAutoSweepSettingsBody;
|
|
19
|
+
/**
|
|
20
|
+
* `source_bank_account` on the cash-management settings response matches the
|
|
21
|
+
* shared `DepositAccountPayload` shape, so the fetch epic dispatches it into
|
|
22
|
+
* the deposit-account entity bucket and the auto-sweep slice only keeps the
|
|
23
|
+
* id. The selector hydrates the full `FundingAccount` on read.
|
|
24
|
+
*/
|
|
25
|
+
export interface CashManagementSettingsPayload {
|
|
26
|
+
cash_management_settings_id: string | null;
|
|
27
|
+
frequency: string;
|
|
28
|
+
minimum_buffer_usd: number;
|
|
29
|
+
next_run_date: string;
|
|
30
|
+
source_bank_account: DepositAccountPayload;
|
|
31
|
+
}
|
|
32
|
+
export type CashManagementSettingsResponse = ZeniAPIResponse<CashManagementSettingsPayload>;
|
|
33
|
+
/**
|
|
34
|
+
* Map a `GET /cash-management/settings` payload into the slice's writable
|
|
35
|
+
* fields. Defensive on the frequency (string-from-the-wire → union via
|
|
36
|
+
* `toAutoSweepFrequency`, falling back to `'weekly'` if the server returns
|
|
37
|
+
* something we don't model yet). Only the source account *id* is stored
|
|
38
|
+
* here — the full deposit-account payload is published to the entity bucket
|
|
39
|
+
* by the fetch epic.
|
|
40
|
+
*/
|
|
41
|
+
export declare const toAutoSweepFlowStatePatch: (payload: CashManagementSettingsPayload) => {
|
|
42
|
+
bufferAmount: Amount;
|
|
43
|
+
frequency: AutoSweepFrequency;
|
|
44
|
+
nextTransferDate?: ZeniDate;
|
|
45
|
+
primaryFundingAccountId?: ID;
|
|
46
|
+
settingsId?: ID;
|
|
47
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toAutoSweepFlowStatePatch = exports.toSaveAutoSweepSettingsBody = void 0;
|
|
4
|
+
const amount_1 = require("../../../../commonStateTypes/amount");
|
|
5
|
+
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
6
|
+
const autoSweepFlowState_1 = require("./autoSweepFlowState");
|
|
7
|
+
const toSaveAutoSweepSettingsBody = (state) => ({
|
|
8
|
+
frequency: state.frequency,
|
|
9
|
+
memo: state.memo,
|
|
10
|
+
minimum_buffer_usd: state.bufferAmount.amount,
|
|
11
|
+
});
|
|
12
|
+
exports.toSaveAutoSweepSettingsBody = toSaveAutoSweepSettingsBody;
|
|
13
|
+
/**
|
|
14
|
+
* Map a `GET /cash-management/settings` payload into the slice's writable
|
|
15
|
+
* fields. Defensive on the frequency (string-from-the-wire → union via
|
|
16
|
+
* `toAutoSweepFrequency`, falling back to `'weekly'` if the server returns
|
|
17
|
+
* something we don't model yet). Only the source account *id* is stored
|
|
18
|
+
* here — the full deposit-account payload is published to the entity bucket
|
|
19
|
+
* by the fetch epic.
|
|
20
|
+
*/
|
|
21
|
+
const toAutoSweepFlowStatePatch = (payload) => {
|
|
22
|
+
const currencyCode = payload.source_bank_account.balances?.currency_code;
|
|
23
|
+
const currencySymbol = payload.source_bank_account.balances?.currency_symbol;
|
|
24
|
+
return {
|
|
25
|
+
bufferAmount: (0, amount_1.toAmount)(payload.minimum_buffer_usd, currencyCode ?? 'USD', currencySymbol ?? '$'),
|
|
26
|
+
frequency: (0, autoSweepFlowState_1.toAutoSweepFrequency)(payload.frequency) ?? 'weekly',
|
|
27
|
+
nextTransferDate: payload.next_run_date != null && payload.next_run_date !== ''
|
|
28
|
+
? (0, zeniDayJS_1.date)(payload.next_run_date)
|
|
29
|
+
: undefined,
|
|
30
|
+
primaryFundingAccountId: payload.source_bank_account.deposit_account_id ?? undefined,
|
|
31
|
+
settingsId: payload.cash_management_settings_id ?? undefined,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.toAutoSweepFlowStatePatch = toAutoSweepFlowStatePatch;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Amount } from '../../../../commonStateTypes/amount';
|
|
2
|
+
import { FetchState } from '../../../../commonStateTypes/common';
|
|
3
|
+
import { ZeniAPIStatus } from '../../../../responsePayload';
|
|
4
|
+
import { CashManagementSettingsPayload } from './autoSweepFlowPayload';
|
|
5
|
+
import { AutoSweepFlowState, AutoSweepFrequency } from './autoSweepFlowState';
|
|
6
|
+
export declare const initialState: AutoSweepFlowState;
|
|
7
|
+
export declare const fetchCashManagementSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autoSweepFlow/fetchCashManagementSettings">, updateCashManagementSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
|
+
data: CashManagementSettingsPayload;
|
|
9
|
+
}, "autoSweepFlow/updateCashManagementSettings">, updateCashManagementSettingsFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
|
+
fetchState: FetchState;
|
|
11
|
+
error?: ZeniAPIStatus;
|
|
12
|
+
}, "autoSweepFlow/updateCashManagementSettingsFetchStatus">, updateAutoSweepRisk: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
13
|
+
bufferAmount: Amount;
|
|
14
|
+
}, "autoSweepFlow/updateAutoSweepRisk">, updateAutoSweepDraft: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
|
+
bufferAmount: Amount;
|
|
16
|
+
frequency: AutoSweepFrequency;
|
|
17
|
+
memo: string;
|
|
18
|
+
}, "autoSweepFlow/updateAutoSweepDraft">, saveAutoSweepSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autoSweepFlow/saveAutoSweepSettings">, updateAutoSweepSettingsFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
fetchState: FetchState;
|
|
20
|
+
error?: ZeniAPIStatus;
|
|
21
|
+
}, "autoSweepFlow/updateAutoSweepSettingsFetchStatus">, clearAutoSweepFlow: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autoSweepFlow/clearAutoSweepFlow">;
|
|
22
|
+
declare const _default: import("redux").Reducer<AutoSweepFlowState>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearAutoSweepFlow = exports.updateAutoSweepSettingsFetchStatus = exports.saveAutoSweepSettings = exports.updateAutoSweepDraft = exports.updateAutoSweepRisk = exports.updateCashManagementSettingsFetchStatus = exports.updateCashManagementSettings = exports.fetchCashManagementSettings = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const autoSweepFlowPayload_1 = require("./autoSweepFlowPayload");
|
|
7
|
+
const autoSweepFlowState_1 = require("./autoSweepFlowState");
|
|
8
|
+
exports.initialState = autoSweepFlowState_1.initialAutoSweepFlowState;
|
|
9
|
+
const autoSweepFlow = (0, toolkit_1.createSlice)({
|
|
10
|
+
name: 'autoSweepFlow',
|
|
11
|
+
initialState: exports.initialState,
|
|
12
|
+
reducers: {
|
|
13
|
+
/**
|
|
14
|
+
* Kicks off `GET /cash-management/settings`. Flips the top-level
|
|
15
|
+
* fetchState to `In-Progress`; the fetch epic picks this up.
|
|
16
|
+
*/
|
|
17
|
+
fetchCashManagementSettings(draft) {
|
|
18
|
+
draft.fetchState = 'In-Progress';
|
|
19
|
+
draft.error = undefined;
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* Hydrates the form fields with the server-side settings (and stashes
|
|
23
|
+
* the settings id for subsequent saves). Marks the GET as `Completed`.
|
|
24
|
+
*/
|
|
25
|
+
updateCashManagementSettings(draft, action) {
|
|
26
|
+
const patch = (0, autoSweepFlowPayload_1.toAutoSweepFlowStatePatch)(action.payload.data);
|
|
27
|
+
draft.bufferAmount = patch.bufferAmount;
|
|
28
|
+
draft.frequency = patch.frequency;
|
|
29
|
+
draft.nextTransferDate = patch.nextTransferDate;
|
|
30
|
+
draft.primaryFundingAccountId = patch.primaryFundingAccountId;
|
|
31
|
+
draft.settingsId = patch.settingsId;
|
|
32
|
+
draft.fetchState = 'Completed';
|
|
33
|
+
draft.error = undefined;
|
|
34
|
+
},
|
|
35
|
+
updateCashManagementSettingsFetchStatus(draft, action) {
|
|
36
|
+
draft.fetchState = action.payload.fetchState;
|
|
37
|
+
draft.error = action.payload.error;
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Live-update the buffer (risk band) as the user toggles the risk picker
|
|
41
|
+
* on the setup page, without staging frequency/memo. The selector derives
|
|
42
|
+
* the risk-adjusted sweep amount off `bufferAmount`, so dispatching this on
|
|
43
|
+
* every risk change keeps the setup and review screens in sync.
|
|
44
|
+
*/
|
|
45
|
+
updateAutoSweepRisk(draft, action) {
|
|
46
|
+
draft.bufferAmount = action.payload.bufferAmount;
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* Stage the in-flight form values without submitting them — fired from
|
|
50
|
+
* the setup→review transition so other selectors (and devtools) can see
|
|
51
|
+
* what the user is about to confirm. Leaves `saveStatus` untouched; the
|
|
52
|
+
* actual PUT only kicks off when the user clicks "Confirm Sweep" via
|
|
53
|
+
* `saveAutoSweepSettings`.
|
|
54
|
+
*/
|
|
55
|
+
updateAutoSweepDraft(draft, action) {
|
|
56
|
+
draft.bufferAmount = action.payload.bufferAmount;
|
|
57
|
+
draft.frequency = action.payload.frequency;
|
|
58
|
+
draft.memo = action.payload.memo;
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Trigger the PUT for the auto-sweep settings already staged via
|
|
62
|
+
* `updateAutoSweepDraft`. Carries no payload — flips `saveStatus` to
|
|
63
|
+
* `In-Progress` and the save epic reads `bufferAmount` / `frequency` /
|
|
64
|
+
* `memo` straight from the slice. Callers must ensure those fields
|
|
65
|
+
* reflect the user's latest input before dispatching.
|
|
66
|
+
*/
|
|
67
|
+
saveAutoSweepSettings(draft) {
|
|
68
|
+
draft.saveStatus = { fetchState: 'In-Progress', error: undefined };
|
|
69
|
+
},
|
|
70
|
+
updateAutoSweepSettingsFetchStatus(draft, action) {
|
|
71
|
+
draft.saveStatus = {
|
|
72
|
+
fetchState: action.payload.fetchState,
|
|
73
|
+
error: action.payload.error,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
clearAutoSweepFlow() {
|
|
77
|
+
return autoSweepFlowState_1.initialAutoSweepFlowState;
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
_a = autoSweepFlow.actions, exports.fetchCashManagementSettings = _a.fetchCashManagementSettings, exports.updateCashManagementSettings = _a.updateCashManagementSettings, exports.updateCashManagementSettingsFetchStatus = _a.updateCashManagementSettingsFetchStatus, exports.updateAutoSweepRisk = _a.updateAutoSweepRisk, exports.updateAutoSweepDraft = _a.updateAutoSweepDraft, exports.saveAutoSweepSettings = _a.saveAutoSweepSettings, exports.updateAutoSweepSettingsFetchStatus = _a.updateAutoSweepSettingsFetchStatus, exports.clearAutoSweepFlow = _a.clearAutoSweepFlow;
|
|
82
|
+
exports.default = autoSweepFlow.reducer;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Amount } from '../../../../commonStateTypes/amount';
|
|
2
|
+
import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
3
|
+
import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
|
+
import { RootState } from '../../../../reducer';
|
|
5
|
+
import { FundingAccount } from '../../commonSetup/setupViewSelector';
|
|
6
|
+
import { TreasurySummaryWithBalance } from '../../treasury/treasuryList/treasuryDetailState';
|
|
7
|
+
import { AutoSweepFrequency, RiskLevel } from './autoSweepFlowState';
|
|
8
|
+
/**
|
|
9
|
+
* The editable form state behind `<AutoSweepSetupPage>`. Kept as a nested
|
|
10
|
+
* object on the selector view so the screen can pass it through as a single
|
|
11
|
+
* unit and the rest of the view (server-derived data + statuses) stays
|
|
12
|
+
* separate from "what the user is currently editing".
|
|
13
|
+
*/
|
|
14
|
+
export interface AutoSweepFlowFormData {
|
|
15
|
+
bufferAmount: Amount;
|
|
16
|
+
frequency: AutoSweepFrequency;
|
|
17
|
+
memo: string;
|
|
18
|
+
/** Derived from `bufferAmount` — the matching preset risk level, falling
|
|
19
|
+
* back to `'moderate'` for custom server-side values. */
|
|
20
|
+
risk: RiskLevel;
|
|
21
|
+
}
|
|
22
|
+
export interface AutoSweepFlowSelectorView extends SelectorView {
|
|
23
|
+
formData: AutoSweepFlowFormData;
|
|
24
|
+
saveStatus: FetchStateAndError;
|
|
25
|
+
/**
|
|
26
|
+
* Recommended sweep amount. Sourced from the cash management banner
|
|
27
|
+
* (the first money_movements[0].movements[0].amount returned by the
|
|
28
|
+
* agent's `/recommend` endpoint). Defaults to zero when the agent
|
|
29
|
+
* hasn't returned a movement yet.
|
|
30
|
+
*/
|
|
31
|
+
sweepAmount: Amount;
|
|
32
|
+
/** Resolved from `primaryFundingAccountId` against the deposit-account
|
|
33
|
+
* entity bucket. `undefined` until the GET fetch publishes the account. */
|
|
34
|
+
primaryFundingAccount?: FundingAccount;
|
|
35
|
+
settingsId?: ID;
|
|
36
|
+
/** Treasury account summary used by the setup / review flow to render the
|
|
37
|
+
* destination column. Mirrors `getTreasuryDetail().accountSummary`. */
|
|
38
|
+
treasurySummary?: TreasurySummaryWithBalance;
|
|
39
|
+
}
|
|
40
|
+
export declare const getAutoSweepFlow: (state: RootState) => AutoSweepFlowSelectorView;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAutoSweepFlow = void 0;
|
|
4
|
+
const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
|
|
5
|
+
const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
|
|
6
|
+
const treasuryDetailSelector_1 = require("../../treasury/treasuryList/treasuryDetailSelector");
|
|
7
|
+
const cashManagementOverviewSelector_1 = require("../cashManagementOverview/cashManagementOverviewSelector");
|
|
8
|
+
const autoSweepFlowState_1 = require("./autoSweepFlowState");
|
|
9
|
+
/**
|
|
10
|
+
* Risk band the agent's recommended sweep amount is computed against. The
|
|
11
|
+
* `sweepAmount` returned by the banner assumes this buffer, so the selector
|
|
12
|
+
* adjusts the displayed sweep by the delta between the user's selected band
|
|
13
|
+
* and this default.
|
|
14
|
+
*/
|
|
15
|
+
const DEFAULT_RISK_LEVEL = 'moderate';
|
|
16
|
+
const getAutoSweepFlow = (state) => {
|
|
17
|
+
const { bufferAmount, frequency, memo, saveStatus, settingsId, primaryFundingAccountId, fetchState, error, } = state.autoSweepFlowState;
|
|
18
|
+
const depositAccount = primaryFundingAccountId != null
|
|
19
|
+
? (0, depositAccountSelector_1.getDepositAccountByDepositAccountId)(state.depositAccountState, primaryFundingAccountId)
|
|
20
|
+
: undefined;
|
|
21
|
+
const risk = (0, autoSweepFlowState_1.bufferAmountToRisk)(bufferAmount.amount);
|
|
22
|
+
// The banner's recommended sweep assumes the default buffer band; shift it
|
|
23
|
+
// by the delta between the default buffer and the user's selected band so a
|
|
24
|
+
// tighter buffer (higher risk → smaller buffer) sweeps more and a looser
|
|
25
|
+
// buffer (lower risk → larger buffer) sweeps less. Clamp at zero so a buffer
|
|
26
|
+
// larger than the available surplus never yields a negative sweep.
|
|
27
|
+
const baseSweepAmount = (0, cashManagementOverviewSelector_1.getCashManagementOverviewBanner)(state).amount;
|
|
28
|
+
const sweepAmount = {
|
|
29
|
+
...baseSweepAmount,
|
|
30
|
+
amount: Math.max(0, baseSweepAmount.amount +
|
|
31
|
+
autoSweepFlowState_1.RISK_BUFFER_AMOUNT[DEFAULT_RISK_LEVEL] -
|
|
32
|
+
autoSweepFlowState_1.RISK_BUFFER_AMOUNT[risk]),
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
fetchState,
|
|
36
|
+
error,
|
|
37
|
+
formData: {
|
|
38
|
+
bufferAmount,
|
|
39
|
+
frequency,
|
|
40
|
+
memo,
|
|
41
|
+
risk,
|
|
42
|
+
},
|
|
43
|
+
primaryFundingAccount: depositAccount != null
|
|
44
|
+
? (0, setupViewSelector_1.mapDepositAccToFundingAccount)(depositAccount)
|
|
45
|
+
: undefined,
|
|
46
|
+
saveStatus,
|
|
47
|
+
settingsId,
|
|
48
|
+
sweepAmount,
|
|
49
|
+
treasurySummary: (0, treasuryDetailSelector_1.getTreasuryDetail)(state).accountSummary,
|
|
50
|
+
version: 0,
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
exports.getAutoSweepFlow = getAutoSweepFlow;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Amount } from '../../../../commonStateTypes/amount';
|
|
2
|
+
import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
3
|
+
import { ZeniDate } from '../../../../zeniDayJS';
|
|
4
|
+
/**
|
|
5
|
+
* Cadence at which the auto-sweep transfer fires. Lowercase to match the
|
|
6
|
+
* cash-management settings API contract (and the `SweepFrequency` literal
|
|
7
|
+
* already used by `<AutoSweepSetupPage>` in web-components).
|
|
8
|
+
*/
|
|
9
|
+
export declare const ALL_AUTO_SWEEP_FREQUENCIES: readonly ["daily", "weekly", "biweekly", "monthly"];
|
|
10
|
+
export declare const toAutoSweepFrequency: (v?: string) => "weekly" | "biweekly" | "monthly" | "daily";
|
|
11
|
+
export type AutoSweepFrequency = NonNullable<ReturnType<typeof toAutoSweepFrequency>>;
|
|
12
|
+
/**
|
|
13
|
+
* Risk presets the auto-sweep setup form exposes. Each level maps to a
|
|
14
|
+
* canonical minimum-buffer amount (USD). Selecting a level in the UI is
|
|
15
|
+
* shorthand for choosing that buffer.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ALL_AUTO_SWEEP_RISK_LEVELS: readonly ["low", "moderate", "high"];
|
|
18
|
+
export declare const toAutoSweepRiskLevel: (v?: string) => "high" | "low" | "moderate";
|
|
19
|
+
export type RiskLevel = NonNullable<ReturnType<typeof toAutoSweepRiskLevel>>;
|
|
20
|
+
export declare const RISK_BUFFER_AMOUNT: Record<RiskLevel, number>;
|
|
21
|
+
/**
|
|
22
|
+
* Maps a buffer amount back onto the closest preset risk level. Falls back
|
|
23
|
+
* to `'moderate'` when the amount doesn't match a known preset (e.g. the
|
|
24
|
+
* server returned a custom value). The dropdown in `<AutoSweepSetupPage>`
|
|
25
|
+
* uses this so it can pre-select the user's existing band on edit.
|
|
26
|
+
*/
|
|
27
|
+
export declare const bufferAmountToRisk: (amount: number) => RiskLevel;
|
|
28
|
+
export interface AutoSweepFlowState extends FetchStateAndError {
|
|
29
|
+
bufferAmount: Amount;
|
|
30
|
+
frequency: AutoSweepFrequency;
|
|
31
|
+
memo: string;
|
|
32
|
+
saveStatus: FetchStateAndError;
|
|
33
|
+
nextTransferDate?: ZeniDate;
|
|
34
|
+
primaryFundingAccountId?: ID;
|
|
35
|
+
settingsId?: ID;
|
|
36
|
+
}
|
|
37
|
+
export declare const initialAutoSweepFlowState: AutoSweepFlowState;
|