@zeniai/client-epic-state 4.19.99-betaRD9 → 4.19.99-betaSS2
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.
Potentially problematic release.
This version of @zeniai/client-epic-state might be problematic. Click here for more details.
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -3
- package/lib/entity/tenant/clearAllEpic.js +0 -4
- package/lib/entity/userRole/userRoleType.d.ts +2 -2
- package/lib/epic.d.ts +1 -5
- package/lib/epic.js +1 -5
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -4
- package/lib/esm/epic.js +1 -5
- package/lib/esm/index.js +0 -7
- package/lib/esm/reducer.js +0 -6
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +59 -140
- package/lib/index.d.ts +0 -8
- package/lib/index.js +2 -30
- package/lib/reducer.d.ts +0 -6
- package/lib/reducer.js +0 -6
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +5 -6
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +59 -140
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/package.json +1 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +0 -44
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +0 -55
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +0 -10
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +0 -51
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +0 -48
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +0 -66
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +0 -52
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +0 -37
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +0 -49
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +0 -47
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +0 -62
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +0 -31
- package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +0 -2
- package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +0 -149
- package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +0 -72
- package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +0 -11
- package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +0 -46
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +0 -27
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +0 -47
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +0 -52
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +0 -32
- package/lib/view/aiAccountantView/aiAccountantViewPayload.js +0 -8
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +0 -29
- package/lib/view/aiAccountantView/aiAccountantViewReducer.js +0 -153
- package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +0 -14
- package/lib/view/aiAccountantView/aiAccountantViewSelector.js +0 -78
- package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +0 -27
- package/lib/view/aiAccountantView/aiAccountantViewState.js +0 -13
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +0 -33
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +0 -50
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +0 -23
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +0 -31
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +0 -33
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +0 -51
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +0 -28
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +0 -56
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.triggerAiAccountantJobEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
8
|
-
const aiAccountantViewReducer_1 = require("../aiAccountantViewReducer");
|
|
9
|
-
const triggerAiAccountantJobEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiAccountantViewReducer_1.triggerAiAccountantJob.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
-
const { operationType, startDate, endDate } = action.payload;
|
|
11
|
-
const rootState = state$.value;
|
|
12
|
-
const selectedTenantIds = rootState.aiAccountantViewState.selectedTenantIdsForJobTrigger;
|
|
13
|
-
const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
|
|
14
|
-
const url = `${base}/ai-accountant/jobs`;
|
|
15
|
-
return zeniAPI
|
|
16
|
-
.postAndGetJSON(url, {
|
|
17
|
-
tenant_ids: selectedTenantIds,
|
|
18
|
-
operation_type: operationType,
|
|
19
|
-
params: {
|
|
20
|
-
start_date: startDate,
|
|
21
|
-
end_date: endDate,
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
25
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
26
|
-
return (0, rxjs_1.from)([
|
|
27
|
-
(0, aiAccountantViewReducer_1.triggerAiAccountantJobSuccess)(),
|
|
28
|
-
(0, aiAccountantViewReducer_1.fetchAiAccountantCustomers)(),
|
|
29
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
30
|
-
messageSection: 'common',
|
|
31
|
-
messageText: 'success',
|
|
32
|
-
type: 'success',
|
|
33
|
-
}),
|
|
34
|
-
]);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return (0, rxjs_1.from)([
|
|
38
|
-
(0, aiAccountantViewReducer_1.triggerAiAccountantJobFailure)(response.status),
|
|
39
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
40
|
-
messageSection: 'common',
|
|
41
|
-
messageText: 'failed',
|
|
42
|
-
type: 'error',
|
|
43
|
-
}),
|
|
44
|
-
]);
|
|
45
|
-
}
|
|
46
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
47
|
-
(0, aiAccountantViewReducer_1.triggerAiAccountantJobFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant trigger job failed: ' +
|
|
48
|
-
JSON.stringify(error))),
|
|
49
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
50
|
-
messageSection: 'common',
|
|
51
|
-
messageText: 'failed',
|
|
52
|
-
type: 'error',
|
|
53
|
-
}),
|
|
54
|
-
])));
|
|
55
|
-
}));
|
|
56
|
-
exports.triggerAiAccountantJobEpic = triggerAiAccountantJobEpic;
|