@zeniai/client-epic-state 5.0.83 → 5.0.84-beta0ND
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/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +1 -140
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -23
- package/lib/entity/aiCfo/aiCfoReducer.js +4 -332
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -13
- package/lib/entity/aiCfo/aiCfoSelector.js +1 -28
- package/lib/entity/aiCfo/aiCfoState.d.ts +4 -225
- package/lib/entity/aiCfo/aiCfoState.js +1 -30
- package/lib/entity/company/companyPayload.d.ts +2 -0
- package/lib/entity/company/companyPayload.js +2 -0
- package/lib/entity/company/companyStateTypes.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 +4 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
- package/lib/entity/tenant/clearAllEpic.js +0 -8
- 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 +54 -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 +19 -0
- package/lib/entity/tenant/tenantReducer.d.ts +49 -28
- package/lib/entity/tenant/tenantReducer.js +111 -5
- package/lib/entity/tenant/tenantState.d.ts +21 -0
- package/lib/epic.d.ts +6 -11
- package/lib/epic.js +7 -11
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +4 -332
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +1 -26
- package/lib/esm/entity/aiCfo/aiCfoState.js +0 -27
- package/lib/esm/entity/company/companyPayload.js +2 -0
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -3
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
- package/lib/esm/entity/tenant/tenantReducer.js +108 -3
- package/lib/esm/epic.js +7 -11
- package/lib/esm/index.js +16 -28
- package/lib/esm/reducer.js +0 -12
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/esm/view/companyView/companyViewReducer.js +45 -1
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +25 -0
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +79 -0
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +45 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +168 -50
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +14 -0
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +4 -16
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -38
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +49 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +58 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +12 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +71 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
- package/lib/index.d.ts +19 -28
- package/lib/index.js +36 -136
- package/lib/reducer.d.ts +0 -12
- package/lib/reducer.js +0 -12
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
- package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/view/companyView/companyViewReducer.d.ts +11 -1
- package/lib/view/companyView/companyViewReducer.js +47 -3
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +9 -0
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +29 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +83 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +49 -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/onboardingCustomerViewPayload.d.ts +3 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +170 -51
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +7 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +21 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +37 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +14 -1
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
- 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 +1 -5
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +5 -17
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -27
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +1 -43
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +8 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +53 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +8 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +62 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +27 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +15 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +24 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +72 -53
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -0
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +12 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +125 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/package.json +1 -1
- package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
- package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
- package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
- package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -265
- package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
- package/lib/entity/cardPolicy/cardPolicySelector.js +0 -103
- package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
- package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -68
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -23
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -111
- package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
- package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -261
- package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -79
- package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -64
- package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
- package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -107
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -70
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -56
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -49
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -42
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -72
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -56
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -62
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -39
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -53
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -25
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -74
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -21
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -25
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -19
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -60
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -18
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -53
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -16
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -46
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -76
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -21
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -19
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -19
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -60
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -13
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -66
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -32
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -46
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -45
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -25
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -57
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -29
package/lib/reducer.js
CHANGED
|
@@ -50,7 +50,6 @@ const billTransactionReducer_1 = __importStar(require("./entity/billPay/billTran
|
|
|
50
50
|
const contactReducer_1 = __importStar(require("./entity/billPay/contact/contactReducer"));
|
|
51
51
|
const recurringBillsReducer_1 = __importStar(require("./entity/billPay/recurringBills/recurringBillsReducer"));
|
|
52
52
|
const cardPaymentReducer_1 = __importStar(require("./entity/cardPayment/cardPaymentReducer"));
|
|
53
|
-
const cardPolicyReducer_1 = __importStar(require("./entity/cardPolicy/cardPolicyReducer"));
|
|
54
53
|
const chargeCardReducer_1 = __importStar(require("./entity/chargeCard/chargeCardReducer"));
|
|
55
54
|
const chargeCardRepaymentReducer_1 = __importStar(require("./entity/chargeCardRepayment/chargeCardRepaymentReducer"));
|
|
56
55
|
const chargeCardTransactionReducer_1 = __importStar(require("./entity/chargeCardTransaction/chargeCardTransactionReducer"));
|
|
@@ -124,9 +123,6 @@ const bankAccountViewReducer_1 = __importStar(require("./view/bankAccountView/ba
|
|
|
124
123
|
const billPayCardReducer_1 = __importStar(require("./view/billPayCard/billPayCardReducer"));
|
|
125
124
|
const cardBalanceReducer_1 = __importStar(require("./view/cardBalance/cardBalanceReducer"));
|
|
126
125
|
const cardPaymentViewReducer_1 = __importStar(require("./view/cardPayment/cardPaymentViewReducer"));
|
|
127
|
-
const cardPolicyDetailReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer"));
|
|
128
|
-
const cardPolicyListReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer"));
|
|
129
|
-
const createCardPolicyReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer"));
|
|
130
126
|
const cashBalanceReducer_1 = __importStar(require("./view/cashBalance/cashBalanceReducer"));
|
|
131
127
|
const cashFlowReducer_1 = __importStar(require("./view/cashFlow/cashFlowReducer"));
|
|
132
128
|
const cashInCashOutReducer_1 = __importStar(require("./view/cashInCashOut/cashInCashOutReducer"));
|
|
@@ -281,7 +277,6 @@ const initialEntitiesState = {
|
|
|
281
277
|
bankAccountState: bankAccountReducer_1.initialState,
|
|
282
278
|
billTransactionState: billTransactionReducer_1.initialState,
|
|
283
279
|
cardPaymentState: cardPaymentReducer_1.initialState,
|
|
284
|
-
cardPolicyState: cardPolicyReducer_1.initialState,
|
|
285
280
|
chargeCardState: chargeCardReducer_1.initialState,
|
|
286
281
|
chargeCardRepaymentState: chargeCardRepaymentReducer_1.initialState,
|
|
287
282
|
chargeCardTransactionState: chargeCardTransactionReducer_1.initialState,
|
|
@@ -366,8 +361,6 @@ const initialViewsState = {
|
|
|
366
361
|
billsBulkActionViewState: billsBulkActionViewReducer_1.initialState,
|
|
367
362
|
cardBalanceState: cardBalanceReducer_1.initialState,
|
|
368
363
|
cardPaymentViewState: cardPaymentViewReducer_1.initialState,
|
|
369
|
-
cardPolicyDetailState: cardPolicyDetailReducer_1.initialState,
|
|
370
|
-
cardPolicyListState: cardPolicyListReducer_1.initialState,
|
|
371
364
|
cardUserOnboardingState: cardUserOnboardingReducer_1.initialState,
|
|
372
365
|
cashbackDetailState: cashbackDetailReducer_1.initialState,
|
|
373
366
|
cashBalanceState: cashBalanceReducer_1.initialState,
|
|
@@ -391,7 +384,6 @@ const initialViewsState = {
|
|
|
391
384
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
|
|
392
385
|
companyViewState: companyViewReducer_1.initialState,
|
|
393
386
|
countryListState: countryListReducer_1.initialState,
|
|
394
|
-
createCardPolicyState: createCardPolicyReducer_1.initialState,
|
|
395
387
|
creditAgentEntityState: creditAgentReducer_1.initialCreditAgentEntityState,
|
|
396
388
|
creditAgentViewState: creditAgentViewReducer_1.initialState,
|
|
397
389
|
dashboardLayoutState: dashboardLayoutReducer_1.initialState,
|
|
@@ -522,7 +514,6 @@ const entityReducers = {
|
|
|
522
514
|
billPayConfigState: billPayConfigReducer_1.default,
|
|
523
515
|
billTransactionState: billTransactionReducer_1.default,
|
|
524
516
|
cardPaymentState: cardPaymentReducer_1.default,
|
|
525
|
-
cardPolicyState: cardPolicyReducer_1.default,
|
|
526
517
|
chargeCardState: chargeCardReducer_1.default,
|
|
527
518
|
chargeCardRepaymentState: chargeCardRepaymentReducer_1.default,
|
|
528
519
|
chargeCardTransactionState: chargeCardTransactionReducer_1.default,
|
|
@@ -606,8 +597,6 @@ const viewReducers = {
|
|
|
606
597
|
billsBulkActionViewState: billsBulkActionViewReducer_1.default,
|
|
607
598
|
cardBalanceState: cardBalanceReducer_1.default,
|
|
608
599
|
cardPaymentViewState: cardPaymentViewReducer_1.default,
|
|
609
|
-
cardPolicyDetailState: cardPolicyDetailReducer_1.default,
|
|
610
|
-
cardPolicyListState: cardPolicyListReducer_1.default,
|
|
611
600
|
cardUserOnboardingState: cardUserOnboardingReducer_1.default,
|
|
612
601
|
cashbackDetailState: cashbackDetailReducer_1.default,
|
|
613
602
|
cashBalanceState: cashBalanceReducer_1.default,
|
|
@@ -631,7 +620,6 @@ const viewReducers = {
|
|
|
631
620
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
|
|
632
621
|
companyViewState: companyViewReducer_1.default,
|
|
633
622
|
countryListState: countryListReducer_1.default,
|
|
634
|
-
createCardPolicyState: createCardPolicyReducer_1.default,
|
|
635
623
|
creditAgentEntityState: creditAgentReducer_1.default,
|
|
636
624
|
creditAgentViewState: creditAgentViewReducer_1.default,
|
|
637
625
|
dashboardState: dashboardReducer_1.default,
|
|
@@ -25,18 +25,17 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
25
25
|
}, "aiCfoView/updateResponseState">, updateAiCfoViewScrollPosition: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "aiCfoView/updateAiCfoViewScrollPosition">, updateCurrentInput: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiCfoView/updateCurrentInput">, clearInput: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/clearInput">, setSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
26
26
|
agentId: string;
|
|
27
27
|
sessionId: string;
|
|
28
|
-
}, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined
|
|
28
|
+
}, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined], {
|
|
29
29
|
agentId: string;
|
|
30
30
|
contextRefId: string | undefined;
|
|
31
31
|
contextType: string | undefined;
|
|
32
|
-
pageContext: string | undefined;
|
|
33
32
|
userId: string;
|
|
34
33
|
}, "aiCfoView/createSession", never, never>, createSessionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
35
34
|
agentId: string;
|
|
36
35
|
sessionId: ID;
|
|
37
36
|
contextMessage?: string;
|
|
38
37
|
contextStatus?: ContextStatus;
|
|
39
|
-
}, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined
|
|
38
|
+
}, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined], {
|
|
40
39
|
agentId: string;
|
|
41
40
|
userId: string;
|
|
42
41
|
questionAnswerId: string;
|
|
@@ -44,7 +43,6 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
44
43
|
createdAt: import("dayjs").Dayjs;
|
|
45
44
|
question: string;
|
|
46
45
|
files: File[] | undefined;
|
|
47
|
-
pageContext: string | undefined;
|
|
48
46
|
}, "aiCfoView/createSessionAndSubmit", never, never>, initializeNewSessionState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
49
47
|
agentId: string;
|
|
50
48
|
sessionId: ID;
|
|
@@ -94,13 +92,6 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
94
92
|
questionAnswerId: ID;
|
|
95
93
|
}, "aiCfoView/updateCotCollapsedState">, fetchSuggestedQuestions: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
96
94
|
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
97
|
-
/**
|
|
98
|
-
* AI Card Creation flow: when true, the epic appends `&no_card_created=true`
|
|
99
|
-
* so the backend tailors prompts for a tenant that has not yet created a
|
|
100
|
-
* card. The bucket key is unchanged (`pageContext`); see
|
|
101
|
-
* `useFetchSuggestedQuestionsWhenReady` for the refetch-on-flag-flip rule.
|
|
102
|
-
*/
|
|
103
|
-
noCardCreated?: boolean;
|
|
104
95
|
}, "aiCfoView/fetchSuggestedQuestions">, fetchSuggestedQuestionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
105
96
|
generatedAt: string;
|
|
106
97
|
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
@@ -192,10 +192,8 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
192
192
|
draft.createSessionState.fetchState = 'In-Progress';
|
|
193
193
|
draft.createSessionState.error = undefined;
|
|
194
194
|
},
|
|
195
|
-
prepare(agentId, userId, contextRefId, contextType
|
|
196
|
-
return {
|
|
197
|
-
payload: { agentId, contextRefId, contextType, pageContext, userId },
|
|
198
|
-
};
|
|
195
|
+
prepare(agentId, userId, contextRefId, contextType) {
|
|
196
|
+
return { payload: { agentId, contextRefId, contextType, userId } };
|
|
199
197
|
},
|
|
200
198
|
},
|
|
201
199
|
createSessionSuccess(draft, action) {
|
|
@@ -226,7 +224,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
226
224
|
draft.createSessionAndSubmitState.fetchState = 'In-Progress';
|
|
227
225
|
draft.createSessionAndSubmitState.error = undefined;
|
|
228
226
|
},
|
|
229
|
-
prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files
|
|
227
|
+
prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files) {
|
|
230
228
|
return {
|
|
231
229
|
payload: {
|
|
232
230
|
agentId,
|
|
@@ -236,7 +234,6 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
236
234
|
createdAt,
|
|
237
235
|
question,
|
|
238
236
|
files,
|
|
239
|
-
pageContext,
|
|
240
237
|
},
|
|
241
238
|
};
|
|
242
239
|
},
|
|
@@ -69,11 +69,8 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
|
|
|
69
69
|
}));
|
|
70
70
|
}
|
|
71
71
|
const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSessionAndSubmit.match), (0, operators_1.switchMap)((action) => {
|
|
72
|
-
const { agentId, userId, questionAnswerId, questionId, createdAt, question, files,
|
|
73
|
-
const payload = {
|
|
74
|
-
agent_id: agentId,
|
|
75
|
-
...(pageContext != null && { page_context: pageContext }),
|
|
76
|
-
};
|
|
72
|
+
const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, } = action.payload;
|
|
73
|
+
const payload = { agent_id: agentId };
|
|
77
74
|
return zeniAPI
|
|
78
75
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
|
|
79
76
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
@@ -8,12 +8,11 @@ const responsePayload_1 = require("../../../responsePayload");
|
|
|
8
8
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
9
9
|
const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
|
|
10
10
|
const createSessionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSession.match), (0, operators_1.switchMap)((action) => {
|
|
11
|
-
const { agentId, contextRefId, contextType,
|
|
11
|
+
const { agentId, contextRefId, contextType, userId } = action.payload;
|
|
12
12
|
const payload = {
|
|
13
13
|
agent_id: agentId,
|
|
14
14
|
...(contextRefId != null && { context_ref_id: contextRefId }),
|
|
15
15
|
...(contextType != null && { context_type: contextType }),
|
|
16
|
-
...(pageContext != null && { page_context: pageContext }),
|
|
17
16
|
};
|
|
18
17
|
return zeniAPI
|
|
19
18
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
|
|
@@ -4,12 +4,5 @@ import { RootState } from '../../../reducer';
|
|
|
4
4
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
5
|
import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess } from '../aiCfoViewReducer';
|
|
6
6
|
export type ActionType = ReturnType<typeof fetchSuggestedQuestions> | ReturnType<typeof fetchSuggestedQuestionsSuccess> | ReturnType<typeof fetchSuggestedQuestionsFailure>;
|
|
7
|
-
/**
|
|
8
|
-
* GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
|
|
9
|
-
*
|
|
10
|
-
* Appends `&no_card_created=true` when the action payload sets
|
|
11
|
-
* `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
|
|
12
|
-
* has not yet created any card). Any other value omits the flag entirely so
|
|
13
|
-
* the existing call sites continue to issue the unchanged request.
|
|
14
|
-
*/
|
|
7
|
+
/** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
|
|
15
8
|
export declare const fetchSuggestedQuestionsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -5,23 +5,13 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
|
|
8
|
-
/**
|
|
9
|
-
* GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
|
|
10
|
-
*
|
|
11
|
-
* Appends `&no_card_created=true` when the action payload sets
|
|
12
|
-
* `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
|
|
13
|
-
* has not yet created any card). Any other value omits the flag entirely so
|
|
14
|
-
* the existing call sites continue to issue the unchanged request.
|
|
15
|
-
*/
|
|
8
|
+
/** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
|
|
16
9
|
const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSuggestedQuestions.match),
|
|
17
10
|
// mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
|
|
18
11
|
// would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
|
|
19
12
|
(0, operators_1.mergeMap)((action) => {
|
|
20
|
-
const { pageContext
|
|
13
|
+
const { pageContext } = action.payload;
|
|
21
14
|
const query = new URLSearchParams({ page_context: pageContext });
|
|
22
|
-
if (noCardCreated === true) {
|
|
23
|
-
query.set('no_card_created', 'true');
|
|
24
|
-
}
|
|
25
15
|
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
|
|
26
16
|
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
27
17
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -68,7 +68,17 @@ export declare const fetchCompanyPassportView: import("@reduxjs/toolkit").Action
|
|
|
68
68
|
enabled: boolean;
|
|
69
69
|
}, "companyView/updateAccountingClassesEnabled", never, never>, updateAccountingClassesEnabledSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"companyView/updateAccountingClassesEnabledSuccess">, updateAccountingClassesEnabledFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
70
70
|
status: ZeniAPIStatus;
|
|
71
|
-
}, "companyView/updateAccountingClassesEnabledFailure">,
|
|
71
|
+
}, "companyView/updateAccountingClassesEnabledFailure">, updateCapitalizationThreshold: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, capitalizationThreshold: number | null, capitalizationThresholdMaxCeiling: number | null, dismissOnboardingForPopupType?: "prepaid" | "fixed_asset" | undefined], {
|
|
72
|
+
companyId: string;
|
|
73
|
+
capitalizationThreshold: number | null;
|
|
74
|
+
capitalizationThresholdMaxCeiling: number | null;
|
|
75
|
+
dismissOnboardingForPopupType: "prepaid" | "fixed_asset" | undefined;
|
|
76
|
+
}, "companyView/updateCapitalizationThreshold", never, never>, updateCapitalizationThresholdSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"companyView/updateCapitalizationThresholdSuccess">, updateCapitalizationThresholdFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
77
|
+
status: ZeniAPIStatus;
|
|
78
|
+
}, "companyView/updateCapitalizationThresholdFailure">, dismissCapitalizationOnboarding: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, popupType: "prepaid" | "fixed_asset"], {
|
|
79
|
+
companyId: string;
|
|
80
|
+
popupType: "prepaid" | "fixed_asset";
|
|
81
|
+
}, "companyView/dismissCapitalizationOnboarding", never, never>, companyPassportUpdatePrimaryContact: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, primaryContact: PrimaryContactLocalData], {
|
|
72
82
|
companyId: string;
|
|
73
83
|
primaryContact: PrimaryContactLocalData;
|
|
74
84
|
}, "companyView/companyPassportUpdatePrimaryContact", never, never>, companyPassportUpdatePrimaryContactSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.updateMetaDataOnSendMonthEndReport = void 0;
|
|
4
|
+
exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.dismissCapitalizationOnboarding = exports.updateCapitalizationThresholdFailure = exports.updateCapitalizationThresholdSuccess = exports.updateCapitalizationThreshold = exports.updateAccountingClassesEnabledFailure = exports.updateAccountingClassesEnabledSuccess = exports.updateAccountingClassesEnabled = exports.companyPassportUpdateCompanyDetailsFailure = exports.companyPassportUpdateCompanyDetailsSuccess = exports.companyPassportUpdateCompanyDetails = exports.companyPassportClearDataInLocalStore = exports.deleteCompanyOfficerInLocalStore = exports.companyPassportSaveDataInLocalStore = exports.updateCompanyManagementUIState = exports.updateCompanyPortfolioUIState = exports.clearCompanyView = exports.updateZeniUsersOnFailure = exports.updateZeniUsersOnSuccess = exports.fetchZeniUsers = exports.fetchCompanyPortfolioView = exports.updateCompanyViewOnFailure = exports.updateCompanyViewOnSuccess = exports.companyManagementSaveUpdatesFailure = exports.companyManagementSaveUpdatesSuccess = exports.companyManagementDiscardUpdates = exports.companyManagementSavePendingUpdates = exports.companyManagementSaveUpdates = exports.fetchCompanyManagementView = exports.fetchPortfolioView = exports.fetchSubscriptionView = exports.fetchManagementView = exports.fetchOnboardingView = exports.fetchAllCockpitViews = exports.fetchCompanyPassportView = exports.initialState = void 0;
|
|
5
|
+
exports.updateMetaDataOnSendMonthEndReport = exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = void 0;
|
|
6
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
const parentSubsidiaryViewState_1 = require("./parentSubsidiaryView/parentSubsidiaryViewState");
|
|
8
8
|
const companyManagementViewState_1 = require("./types/companyManagementViewState");
|
|
@@ -314,6 +314,50 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
314
314
|
error: action.payload.status,
|
|
315
315
|
};
|
|
316
316
|
},
|
|
317
|
+
updateCapitalizationThreshold: {
|
|
318
|
+
prepare(companyId, capitalizationThreshold, capitalizationThresholdMaxCeiling, dismissOnboardingForPopupType) {
|
|
319
|
+
return {
|
|
320
|
+
payload: {
|
|
321
|
+
companyId,
|
|
322
|
+
capitalizationThreshold,
|
|
323
|
+
capitalizationThresholdMaxCeiling,
|
|
324
|
+
dismissOnboardingForPopupType,
|
|
325
|
+
},
|
|
326
|
+
};
|
|
327
|
+
},
|
|
328
|
+
reducer(draft,
|
|
329
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
330
|
+
_action) {
|
|
331
|
+
draft.passportView.capitalizationThresholdUpdateStatus = {
|
|
332
|
+
fetchState: 'In-Progress',
|
|
333
|
+
error: undefined,
|
|
334
|
+
};
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
updateCapitalizationThresholdSuccess(draft) {
|
|
338
|
+
draft.passportView.capitalizationThresholdUpdateStatus = {
|
|
339
|
+
fetchState: 'Completed',
|
|
340
|
+
error: undefined,
|
|
341
|
+
};
|
|
342
|
+
},
|
|
343
|
+
updateCapitalizationThresholdFailure(draft, action) {
|
|
344
|
+
draft.passportView.capitalizationThresholdUpdateStatus = {
|
|
345
|
+
fetchState: 'Error',
|
|
346
|
+
error: action.payload.status,
|
|
347
|
+
};
|
|
348
|
+
},
|
|
349
|
+
dismissCapitalizationOnboarding: {
|
|
350
|
+
prepare(companyId, popupType) {
|
|
351
|
+
return { payload: { companyId, popupType } };
|
|
352
|
+
},
|
|
353
|
+
reducer(
|
|
354
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
355
|
+
_draft,
|
|
356
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
357
|
+
_action) {
|
|
358
|
+
// No loading state needed — fire-and-forget
|
|
359
|
+
},
|
|
360
|
+
},
|
|
317
361
|
companyPassportUpdatePrimaryContact: {
|
|
318
362
|
reducer(draft, action) {
|
|
319
363
|
const { primaryContact } = action.payload;
|
|
@@ -587,5 +631,5 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
587
631
|
},
|
|
588
632
|
},
|
|
589
633
|
});
|
|
590
|
-
_a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.updateAccountingClassesEnabled = _a.updateAccountingClassesEnabled, exports.updateAccountingClassesEnabledSuccess = _a.updateAccountingClassesEnabledSuccess, exports.updateAccountingClassesEnabledFailure = _a.updateAccountingClassesEnabledFailure, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
|
|
634
|
+
_a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.updateAccountingClassesEnabled = _a.updateAccountingClassesEnabled, exports.updateAccountingClassesEnabledSuccess = _a.updateAccountingClassesEnabledSuccess, exports.updateAccountingClassesEnabledFailure = _a.updateAccountingClassesEnabledFailure, exports.updateCapitalizationThreshold = _a.updateCapitalizationThreshold, exports.updateCapitalizationThresholdSuccess = _a.updateCapitalizationThresholdSuccess, exports.updateCapitalizationThresholdFailure = _a.updateCapitalizationThresholdFailure, exports.dismissCapitalizationOnboarding = _a.dismissCapitalizationOnboarding, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
|
|
591
635
|
exports.default = companyView.reducer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
4
|
+
import { updateTenantCapitalizationOnboardingDismissed } from '../../../../entity/tenant/tenantReducer';
|
|
5
|
+
import { RootState } from '../../../../reducer';
|
|
6
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
7
|
+
import { dismissCapitalizationOnboarding } from '../../companyViewReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof updateTenantCapitalizationOnboardingDismissed> | ReturnType<typeof openSnackbar> | ReturnType<typeof dismissCapitalizationOnboarding>;
|
|
9
|
+
export declare const dismissCapitalizationOnboardingEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dismissCapitalizationOnboardingEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
|
+
const companyViewReducer_1 = require("../../companyViewReducer");
|
|
9
|
+
const dismissCapitalizationOnboardingEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.dismissCapitalizationOnboarding.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
+
const { companyId, popupType } = action.payload;
|
|
11
|
+
const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
|
|
12
|
+
const body = popupType === 'prepaid'
|
|
13
|
+
? { capitalization_onboarding_shown_for_prepaid: true }
|
|
14
|
+
: { capitalization_onboarding_shown_for_fixed_asset: true };
|
|
15
|
+
return zeniAPI
|
|
16
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, body)
|
|
17
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && tenantId != null) {
|
|
19
|
+
return (0, rxjs_1.from)([
|
|
20
|
+
(0, tenantReducer_1.updateTenantCapitalizationOnboardingDismissed)({
|
|
21
|
+
tenantId,
|
|
22
|
+
popupType,
|
|
23
|
+
}),
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
return (0, rxjs_1.from)([]);
|
|
27
|
+
}), (0, operators_1.catchError)(() => (0, rxjs_1.from)([])));
|
|
28
|
+
}));
|
|
29
|
+
exports.dismissCapitalizationOnboardingEpic = dismissCapitalizationOnboardingEpic;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateCompanies } from '../../../../entity/company/companyReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { updateTenantCapitalizationOnboardingDismissed, updateTenantCapitalizationThreshold } from '../../../../entity/tenant/tenantReducer';
|
|
6
|
+
import { RootState } from '../../../../reducer';
|
|
7
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
8
|
+
import { updateCapitalizationThreshold, updateCapitalizationThresholdFailure, updateCapitalizationThresholdSuccess } from '../../companyViewReducer';
|
|
9
|
+
export type ActionType = ReturnType<typeof updateCompanies> | ReturnType<typeof updateTenantCapitalizationThreshold> | ReturnType<typeof updateTenantCapitalizationOnboardingDismissed> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateCapitalizationThreshold> | ReturnType<typeof updateCapitalizationThresholdSuccess> | ReturnType<typeof updateCapitalizationThresholdFailure>;
|
|
10
|
+
export declare const updateCapitalizationThresholdEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCapitalizationThresholdEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const companyReducer_1 = require("../../../../entity/company/companyReducer");
|
|
7
|
+
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
8
|
+
const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
|
|
9
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
|
+
const companyViewReducer_1 = require("../../companyViewReducer");
|
|
11
|
+
const updateCapitalizationThresholdEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.updateCapitalizationThreshold.match), (0, operators_1.switchMap)((action) => {
|
|
12
|
+
const { companyId, capitalizationThreshold, capitalizationThresholdMaxCeiling, dismissOnboardingForPopupType, } = action.payload;
|
|
13
|
+
const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
|
|
14
|
+
const body = {
|
|
15
|
+
capitalization_threshold: capitalizationThreshold,
|
|
16
|
+
capitalization_threshold_max_ceiling: capitalizationThresholdMaxCeiling,
|
|
17
|
+
};
|
|
18
|
+
if (dismissOnboardingForPopupType === 'prepaid') {
|
|
19
|
+
body.capitalization_onboarding_shown_for_prepaid = true;
|
|
20
|
+
}
|
|
21
|
+
else if (dismissOnboardingForPopupType === 'fixed_asset') {
|
|
22
|
+
body.capitalization_onboarding_shown_for_fixed_asset = true;
|
|
23
|
+
}
|
|
24
|
+
return zeniAPI
|
|
25
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, body)
|
|
26
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
27
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
28
|
+
const companies = response.data?.companies ?? [];
|
|
29
|
+
const actions = [];
|
|
30
|
+
if (companies.length > 0) {
|
|
31
|
+
actions.push((0, companyReducer_1.updateCompanies)({
|
|
32
|
+
payload: companies,
|
|
33
|
+
schema: {},
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
if (tenantId != null) {
|
|
37
|
+
actions.push((0, tenantReducer_1.updateTenantCapitalizationThreshold)({
|
|
38
|
+
tenantId,
|
|
39
|
+
capitalizationThreshold,
|
|
40
|
+
capitalizationThresholdMaxCeiling,
|
|
41
|
+
}));
|
|
42
|
+
if (dismissOnboardingForPopupType != null) {
|
|
43
|
+
actions.push((0, tenantReducer_1.updateTenantCapitalizationOnboardingDismissed)({
|
|
44
|
+
tenantId,
|
|
45
|
+
popupType: dismissOnboardingForPopupType,
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
actions.push((0, companyViewReducer_1.updateCapitalizationThresholdSuccess)());
|
|
50
|
+
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
51
|
+
messageSection: 'capitalization_threshold_update',
|
|
52
|
+
messageText: 'success',
|
|
53
|
+
type: 'success',
|
|
54
|
+
}));
|
|
55
|
+
return (0, rxjs_1.from)(actions);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return (0, rxjs_1.from)([
|
|
59
|
+
(0, companyViewReducer_1.updateCapitalizationThresholdFailure)({
|
|
60
|
+
status: response.status,
|
|
61
|
+
}),
|
|
62
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
63
|
+
messageSection: 'capitalization_threshold_update',
|
|
64
|
+
messageText: 'failed',
|
|
65
|
+
type: 'error',
|
|
66
|
+
}),
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
70
|
+
(0, companyViewReducer_1.updateCapitalizationThresholdFailure)({
|
|
71
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update Capitalization Threshold errored out' +
|
|
72
|
+
(error instanceof Error
|
|
73
|
+
? error.message
|
|
74
|
+
: JSON.stringify(error))),
|
|
75
|
+
}),
|
|
76
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
77
|
+
messageSection: 'capitalization_threshold_update',
|
|
78
|
+
messageText: 'failed',
|
|
79
|
+
type: 'error',
|
|
80
|
+
}),
|
|
81
|
+
])));
|
|
82
|
+
}));
|
|
83
|
+
exports.updateCapitalizationThresholdEpic = updateCapitalizationThresholdEpic;
|
|
@@ -5,6 +5,7 @@ import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData }
|
|
|
5
5
|
export type UpdateActionType = 'company_update' | 'user_create' | 'user_update';
|
|
6
6
|
export interface CompanyPassportViewState extends CommonState, FetchedState {
|
|
7
7
|
accountingClassesUpdateStatus: FetchStateAndError;
|
|
8
|
+
capitalizationThresholdUpdateStatus: FetchStateAndError;
|
|
8
9
|
companyDetails: {
|
|
9
10
|
updateStatus: FetchStateAndError;
|
|
10
11
|
localData?: CompanyDetailsLocalData;
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
|
|
|
39
39
|
export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
|
|
40
40
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
41
41
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
42
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "
|
|
42
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
|
|
43
43
|
messageText: "notification" | "failed" | "success";
|
|
44
44
|
type: "error" | "success" | "info";
|
|
45
45
|
variables: {
|
|
@@ -20,7 +20,7 @@ export interface SaveReconciliationDetailFailurePayload {
|
|
|
20
20
|
error: ZeniAPIStatus;
|
|
21
21
|
fetchStateByAction: SaveReconcileDetailActionPayload;
|
|
22
22
|
}
|
|
23
|
-
export declare const toReconciliationTabsType: (v: string) => "
|
|
23
|
+
export declare const toReconciliationTabsType: (v: string) => "reconcile" | "review";
|
|
24
24
|
export declare type ReconciliationViewTabType = ReturnType<typeof toReconciliationTabsType>;
|
|
25
25
|
declare const toReconReconcileSortKeysType: (v: string) => "date" | "amount" | "type" | "account" | "memo" | "clearedDate" | "payee" | "transactionDirection" | "recommended";
|
|
26
26
|
export declare type ReconReconcileSortKey = ReturnType<typeof toReconReconcileSortKeysType>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
+
import { fetchAiAgentsActivationStatus, fetchAiAgentsActivationStatusFailure, fetchAiAgentsActivationStatusSuccess } from '../../onboardingCustomerViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchAiAgentsActivationStatus> | ReturnType<typeof fetchAiAgentsActivationStatusSuccess> | ReturnType<typeof fetchAiAgentsActivationStatusFailure>;
|
|
7
|
+
export declare const fetchAiAgentsActivationStatusEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchAiAgentsActivationStatusEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
+
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
8
|
+
const toPhaseStatus = (raw) => {
|
|
9
|
+
if (raw === 'idle' ||
|
|
10
|
+
raw === 'starting' ||
|
|
11
|
+
raw === 'building' ||
|
|
12
|
+
raw === 'ready') {
|
|
13
|
+
return raw;
|
|
14
|
+
}
|
|
15
|
+
return 'idle';
|
|
16
|
+
};
|
|
17
|
+
const toPhase = (section, row) => ({
|
|
18
|
+
key: row.key,
|
|
19
|
+
section,
|
|
20
|
+
status: toPhaseStatus(row.status),
|
|
21
|
+
startedAt: row.started_at,
|
|
22
|
+
completedAt: row.completed_at,
|
|
23
|
+
});
|
|
24
|
+
const toCounts = (payload) => ({
|
|
25
|
+
customerCount: payload?.customer_count ?? 0,
|
|
26
|
+
glAccountCount: payload?.gl_account_count ?? 0,
|
|
27
|
+
targetTransactionCount: payload?.target_transaction_count ?? 0,
|
|
28
|
+
transactionCount: payload?.transaction_count ?? 0,
|
|
29
|
+
vendorCount: payload?.vendor_count ?? 0,
|
|
30
|
+
});
|
|
31
|
+
const fetchAiAgentsActivationStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatus.match), (0, operators_1.mergeMap)(() => {
|
|
32
|
+
const url = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/ai-agents-activation/status`;
|
|
33
|
+
return zeniAPI
|
|
34
|
+
.getJSON(url)
|
|
35
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
36
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
37
|
+
const ledgerPhases = (response.data.ledger_section ?? []).map((row) => toPhase('ledger', row));
|
|
38
|
+
const backgroundPhases = (response.data.background_section ?? []).map((row) => toPhase('background', row));
|
|
39
|
+
return (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatusSuccess)({
|
|
40
|
+
ledgerPhases,
|
|
41
|
+
backgroundPhases,
|
|
42
|
+
counts: toCounts(response.data.counts),
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
return (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatusFailure)(response.status));
|
|
46
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatusFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'fetchAiAgentsActivationStatus errored out ' +
|
|
47
|
+
JSON.stringify(error))))));
|
|
48
|
+
}));
|
|
49
|
+
exports.fetchAiAgentsActivationStatusEpic = fetchAiAgentsActivationStatusEpic;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateCompanies } from '../../../../../entity/company/companyReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { RootState } from '../../../../../reducer';
|
|
6
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
7
|
+
import { acknowledgeOnboardingAiFinanceTeam, acknowledgeOnboardingAiFinanceTeamFailure, acknowledgeOnboardingAiFinanceTeamSuccess } from '../../onboardingCustomerViewReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof acknowledgeOnboardingAiFinanceTeam> | ReturnType<typeof updateCompanies> | ReturnType<typeof openSnackbar> | ReturnType<typeof acknowledgeOnboardingAiFinanceTeamSuccess> | ReturnType<typeof acknowledgeOnboardingAiFinanceTeamFailure>;
|
|
9
|
+
export declare const acknowledgeOnboardingAiFinanceTeamEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|