@zeniai/client-epic-state 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/accountRecon/accountReconReducer.js +4 -0
- package/lib/entity/accountRecon/accountReconState.d.ts +4 -1
- package/lib/entity/accountRecon/accountReconState.js +1 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/epic.d.ts +4 -1
- package/lib/epic.js +4 -1
- package/lib/esm/entity/accountRecon/accountReconReducer.js +4 -0
- package/lib/esm/entity/accountRecon/accountReconState.js +1 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/epic.js +4 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +43 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.js +1 -2
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseCombinedStatementEpic.js +31 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +15 -18
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +68 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +10 -10
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +12 -4
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic.js +8 -2
- package/lib/esm/view/expenseAutomationView/helpers/mapStatementUpdateLocalDataToRequestBody.js +20 -5
- package/lib/esm/view/expenseAutomationView/payload/reconciliationPayload.js +135 -0
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +120 -16
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +38 -7
- package/lib/esm/view/expenseAutomationView/selectors/statementParseViewSelector.js +43 -10
- package/lib/esm/view/expenseAutomationView/types/reconciliationViewState.js +15 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +51 -46
- package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.d.ts +34 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +47 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.js +0 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/parseCombinedStatementEpic.d.ts +26 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/parseCombinedStatementEpic.js +35 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.d.ts +21 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +15 -18
- package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.d.ts +27 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +72 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +10 -10
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +12 -4
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic.js +7 -1
- package/lib/view/expenseAutomationView/helpers/mapStatementUpdateLocalDataToRequestBody.d.ts +1 -0
- package/lib/view/expenseAutomationView/helpers/mapStatementUpdateLocalDataToRequestBody.js +20 -4
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +109 -4
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +143 -0
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +32 -4
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +122 -18
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +5 -1
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +4 -1
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +40 -7
- package/lib/view/expenseAutomationView/selectors/statementParseViewSelector.d.ts +3 -2
- package/lib/view/expenseAutomationView/selectors/statementParseViewSelector.js +44 -10
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +74 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.js +19 -1
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confirmStatementMappingEpic = 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 reconciliationPayload_1 = require("../../payload/reconciliationPayload");
|
|
9
|
+
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
10
|
+
const confirmStatementMappingErrorSnackbar = (0, snackbarReducer_1.openSnackbar)({
|
|
11
|
+
messageSection: 'confirm_statement_mapping',
|
|
12
|
+
messageText: 'failed',
|
|
13
|
+
type: 'error',
|
|
14
|
+
});
|
|
15
|
+
const confirmStatementMappingEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.confirmStatementMapping.match), (0, operators_1.exhaustMap)((action) => {
|
|
16
|
+
const { accountId, selectedPeriod, statementUploadId, accountMappings } = action.payload;
|
|
17
|
+
const confirmMappingApi$ = zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/statements/${statementUploadId}/confirm-mapping`, {
|
|
18
|
+
account_mappings: accountMappings.map((mapping) => ({
|
|
19
|
+
ledger_identifier: mapping.ledgerIdentifier,
|
|
20
|
+
account_id: mapping.accountId,
|
|
21
|
+
})),
|
|
22
|
+
});
|
|
23
|
+
return confirmMappingApi$.pipe((0, operators_1.mergeMap)((response) => {
|
|
24
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
|
|
25
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.confirmStatementMappingSuccess)({
|
|
26
|
+
accountId,
|
|
27
|
+
selectedPeriod,
|
|
28
|
+
statementUploads: (0, reconciliationPayload_1.transformConfirmStatementMappingPayloadToState)(response.data),
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
const mappingConflict = (0, reconciliationPayload_1.isConfirmStatementMappingConflictResponse)(response)
|
|
32
|
+
? (0, reconciliationPayload_1.transformConfirmStatementMappingConflictToState)(response)
|
|
33
|
+
: null;
|
|
34
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.confirmStatementMappingFailure)({
|
|
35
|
+
accountId,
|
|
36
|
+
selectedPeriod,
|
|
37
|
+
error: response.status,
|
|
38
|
+
mappingConflict,
|
|
39
|
+
}), confirmStatementMappingErrorSnackbar);
|
|
40
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.confirmStatementMappingFailure)({
|
|
41
|
+
accountId,
|
|
42
|
+
selectedPeriod,
|
|
43
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Confirm Statement Mapping REST API call errored out ' +
|
|
44
|
+
(error instanceof Error ? error.message : String(error))),
|
|
45
|
+
}), confirmStatementMappingErrorSnackbar)));
|
|
46
|
+
}));
|
|
47
|
+
exports.confirmStatementMappingEpic = confirmStatementMappingEpic;
|
|
@@ -4,6 +4,6 @@ import { updateAccountReconDeleteStatement } from '../../../../entity/accountRec
|
|
|
4
4
|
import { removeFiles } from '../../../../entity/file/fileReducer';
|
|
5
5
|
import { RootState } from '../../../../reducer';
|
|
6
6
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
7
|
-
import { deleteAccountStatement, deleteAccountStatementFailure, deleteAccountStatementSuccess
|
|
8
|
-
export type ActionType = ReturnType<typeof deleteAccountStatement> | ReturnType<typeof removeFiles> | ReturnType<typeof updateAccountReconDeleteStatement> | ReturnType<typeof
|
|
7
|
+
import { deleteAccountStatement, deleteAccountStatementFailure, deleteAccountStatementSuccess } from '../../reducers/reconciliationViewReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof deleteAccountStatement> | ReturnType<typeof removeFiles> | ReturnType<typeof updateAccountReconDeleteStatement> | ReturnType<typeof deleteAccountStatementFailure> | ReturnType<typeof deleteAccountStatementSuccess>;
|
|
9
9
|
export declare const deleteAccountStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -20,7 +20,6 @@ const deleteAccountStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe
|
|
|
20
20
|
actions.push((0, accountReconReducer_1.updateAccountReconDeleteStatement)(accountReconKey, response.data));
|
|
21
21
|
}
|
|
22
22
|
actions.push((0, reconciliationViewReducer_1.deleteAccountStatementSuccess)({ accountId, selectedPeriod }));
|
|
23
|
-
actions.push((0, reconciliationViewReducer_1.fetchReconciliation)(selectedPeriod, undefined, true, true));
|
|
24
23
|
return (0, rxjs_1.of)(...actions);
|
|
25
24
|
}
|
|
26
25
|
else {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { RootState } from '../../../../reducer';
|
|
3
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
4
|
+
import { parseCombinedStatement, parseStatementFailure, parseStatementSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof parseCombinedStatement> | ReturnType<typeof parseStatementSuccess> | ReturnType<typeof parseStatementFailure> | ReturnType<typeof updateParsedStatementData>;
|
|
6
|
+
export declare const parseCombinedStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
+
payload: {
|
|
8
|
+
accountId: import("../../../..").ID;
|
|
9
|
+
selectedPeriod: import("../../../..").MonthYearPeriod;
|
|
10
|
+
};
|
|
11
|
+
type: "expenseAutomationReconciliationView/parseStatementSuccess";
|
|
12
|
+
} | {
|
|
13
|
+
payload: {
|
|
14
|
+
accountId: import("../../../..").ID;
|
|
15
|
+
error: import("../../../../responsePayload").ZeniAPIStatus;
|
|
16
|
+
selectedPeriod: import("../../../..").MonthYearPeriod;
|
|
17
|
+
};
|
|
18
|
+
type: "expenseAutomationReconciliationView/parseStatementFailure";
|
|
19
|
+
} | {
|
|
20
|
+
payload: {
|
|
21
|
+
accountId: import("../../../..").ID;
|
|
22
|
+
parsedStatementData: import("../../types/reconciliationViewState").ParsedStatementData;
|
|
23
|
+
selectedPeriod: import("../../../..").MonthYearPeriod;
|
|
24
|
+
};
|
|
25
|
+
type: "expenseAutomationReconciliationView/updateParsedStatementData";
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseCombinedStatementEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
|
|
8
|
+
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
9
|
+
const parseCombinedStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.parseCombinedStatement.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
+
const { accountId, selectedPeriod, combinedStatementGroupId } = action.payload;
|
|
11
|
+
const parseUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/combined-statement-groups/${combinedStatementGroupId}`;
|
|
12
|
+
return zeniAPI.getJSON(parseUrl).pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
|
|
14
|
+
return (0, rxjs_1.from)([
|
|
15
|
+
(0, reconciliationViewReducer_1.updateParsedStatementData)({
|
|
16
|
+
accountId,
|
|
17
|
+
selectedPeriod,
|
|
18
|
+
parsedStatementData: (0, reconciliationPayload_1.transformCombinedStatementGroupPayloadToState)(response.data),
|
|
19
|
+
}),
|
|
20
|
+
(0, reconciliationViewReducer_1.parseStatementSuccess)({ accountId, selectedPeriod }),
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
|
|
24
|
+
accountId,
|
|
25
|
+
selectedPeriod,
|
|
26
|
+
error: response.status,
|
|
27
|
+
}));
|
|
28
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
|
|
29
|
+
accountId,
|
|
30
|
+
selectedPeriod,
|
|
31
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Parse Combined Statement REST API call errored out ' +
|
|
32
|
+
(error instanceof Error ? error.message : String(error))),
|
|
33
|
+
}))));
|
|
34
|
+
}));
|
|
35
|
+
exports.parseCombinedStatementEpic = parseCombinedStatementEpic;
|
|
@@ -3,4 +3,24 @@ import { RootState } from '../../../../reducer';
|
|
|
3
3
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
4
4
|
import { parseStatement, parseStatementFailure, parseStatementSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
|
|
5
5
|
export type ActionType = ReturnType<typeof parseStatement> | ReturnType<typeof parseStatementSuccess> | ReturnType<typeof parseStatementFailure> | ReturnType<typeof updateParsedStatementData>;
|
|
6
|
-
export declare const parseStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<
|
|
6
|
+
export declare const parseStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
+
payload: {
|
|
8
|
+
accountId: import("../../../..").ID;
|
|
9
|
+
selectedPeriod: import("../../../..").MonthYearPeriod;
|
|
10
|
+
};
|
|
11
|
+
type: "expenseAutomationReconciliationView/parseStatementSuccess";
|
|
12
|
+
} | {
|
|
13
|
+
payload: {
|
|
14
|
+
accountId: import("../../../..").ID;
|
|
15
|
+
error: import("../../../../responsePayload").ZeniAPIStatus;
|
|
16
|
+
selectedPeriod: import("../../../..").MonthYearPeriod;
|
|
17
|
+
};
|
|
18
|
+
type: "expenseAutomationReconciliationView/parseStatementFailure";
|
|
19
|
+
} | {
|
|
20
|
+
payload: {
|
|
21
|
+
accountId: import("../../../..").ID;
|
|
22
|
+
parsedStatementData: import("../../types/reconciliationViewState").ParsedStatementData;
|
|
23
|
+
selectedPeriod: import("../../../..").MonthYearPeriod;
|
|
24
|
+
};
|
|
25
|
+
type: "expenseAutomationReconciliationView/updateParsedStatementData";
|
|
26
|
+
}>;
|
|
@@ -8,26 +8,23 @@ const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
|
|
|
8
8
|
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
9
9
|
const parseStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.parseStatement.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
11
|
-
const
|
|
12
|
-
return
|
|
11
|
+
const parseUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`;
|
|
12
|
+
return zeniAPI.getJSON(parseUrl).pipe((0, operators_1.mergeMap)((response) => {
|
|
13
13
|
if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return (0, rxjs_1.from)(actions);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
|
|
26
|
-
accountId,
|
|
27
|
-
selectedPeriod,
|
|
28
|
-
error: response.status,
|
|
29
|
-
}));
|
|
14
|
+
return (0, rxjs_1.from)([
|
|
15
|
+
(0, reconciliationViewReducer_1.updateParsedStatementData)({
|
|
16
|
+
accountId,
|
|
17
|
+
selectedPeriod,
|
|
18
|
+
parsedStatementData: (0, reconciliationPayload_1.transformParseStatementPayloadToState)(response.data),
|
|
19
|
+
}),
|
|
20
|
+
(0, reconciliationViewReducer_1.parseStatementSuccess)({ accountId, selectedPeriod }),
|
|
21
|
+
]);
|
|
30
22
|
}
|
|
23
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
|
|
24
|
+
accountId,
|
|
25
|
+
selectedPeriod,
|
|
26
|
+
error: response.status,
|
|
27
|
+
}));
|
|
31
28
|
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
|
|
32
29
|
accountId,
|
|
33
30
|
selectedPeriod,
|
package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { RootState } from '../../../../reducer';
|
|
3
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
4
|
+
import { submitCombinedStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof submitCombinedStatementUpdate> | ReturnType<typeof submitStatementUpdateSuccess> | ReturnType<typeof submitStatementUpdateFailure> | ReturnType<typeof updateParsedStatementData>;
|
|
6
|
+
export declare const updateCombinedStatementInfoEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
+
payload: {
|
|
8
|
+
accountId: import("../../../..").ID;
|
|
9
|
+
parsedStatementData: import("../../types/reconciliationViewState").ParsedStatementData;
|
|
10
|
+
selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
|
|
11
|
+
};
|
|
12
|
+
type: "expenseAutomationReconciliationView/updateParsedStatementData";
|
|
13
|
+
} | {
|
|
14
|
+
payload: {
|
|
15
|
+
accountId: import("../../../..").ID;
|
|
16
|
+
selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
|
|
17
|
+
};
|
|
18
|
+
type: "expenseAutomationReconciliationView/submitStatementUpdateSuccess";
|
|
19
|
+
} | {
|
|
20
|
+
payload: {
|
|
21
|
+
accountId: import("../../../..").ID;
|
|
22
|
+
error: import("../../../../responsePayload").ZeniAPIStatus;
|
|
23
|
+
selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
|
|
24
|
+
dateConflict?: import("../../types/reconciliationViewState").StatementDateConflict | null;
|
|
25
|
+
};
|
|
26
|
+
type: "expenseAutomationReconciliationView/submitStatementUpdateFailure";
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCombinedStatementInfoEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
7
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
|
+
const mapStatementUpdateLocalDataToRequestBody_1 = require("../../helpers/mapStatementUpdateLocalDataToRequestBody");
|
|
9
|
+
const statementParseViewSelector_1 = require("../../selectors/statementParseViewSelector");
|
|
10
|
+
const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
|
|
11
|
+
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
12
|
+
const updateCombinedStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.submitCombinedStatementUpdate.match), (0, operators_1.switchMap)((action) => {
|
|
13
|
+
const { accountId, selectedPeriod } = action.payload;
|
|
14
|
+
const accountRecon = state$.value.expenseAutomationReconciliationViewState
|
|
15
|
+
.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]?.reconciliationByAccountID[accountId];
|
|
16
|
+
const parsedStatementData = accountRecon?.parsedStatementData;
|
|
17
|
+
const localDataByUploadId = accountRecon?.localData?.statementUpdateLocalDataByUploadId;
|
|
18
|
+
const statementUploads = (0, statementParseViewSelector_1.getStatementUploadsFromParsedData)(parsedStatementData);
|
|
19
|
+
if (parsedStatementData == null ||
|
|
20
|
+
localDataByUploadId == null ||
|
|
21
|
+
statementUploads.length === 0 ||
|
|
22
|
+
statementUploads.some((statementUpload) => localDataByUploadId[statementUpload.statementMeta.statementUploadId] == null)) {
|
|
23
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
24
|
+
accountId,
|
|
25
|
+
selectedPeriod,
|
|
26
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Missing Data', 'No statement update data found for combined accounts'),
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
const combinedStatementGroupId = accountRecon?.combinedStatementGroupId ??
|
|
30
|
+
parsedStatementData.statementUpload.statementMeta
|
|
31
|
+
.combinedStatementGroupId ??
|
|
32
|
+
parsedStatementData.statementUpload.combinedStatementDetails
|
|
33
|
+
?.combinedStatementGroupId;
|
|
34
|
+
if (combinedStatementGroupId == null || combinedStatementGroupId === '') {
|
|
35
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
36
|
+
accountId,
|
|
37
|
+
selectedPeriod,
|
|
38
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Missing Data', 'No combined statement group id found for bulk update'),
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
const body = (0, mapStatementUpdateLocalDataToRequestBody_1.mapCombinedStatementUpdateLocalDataToRequestBody)(localDataByUploadId, parsedStatementData);
|
|
42
|
+
const updateUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/combined-statement-groups/${combinedStatementGroupId}`;
|
|
43
|
+
return zeniAPI
|
|
44
|
+
.putAndGetJSON(updateUrl, body)
|
|
45
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
46
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
|
|
47
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.updateParsedStatementData)({
|
|
48
|
+
accountId,
|
|
49
|
+
selectedPeriod,
|
|
50
|
+
parsedStatementData: (0, reconciliationPayload_1.transformUpdateStatementInfoPayloadToState)(response.data),
|
|
51
|
+
}), (0, reconciliationViewReducer_1.submitStatementUpdateSuccess)({
|
|
52
|
+
accountId,
|
|
53
|
+
selectedPeriod,
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
const dateConflict = (0, reconciliationPayload_1.isStatementDateConflictResponse)(response)
|
|
57
|
+
? (0, reconciliationPayload_1.transformStatementDateConflictToState)(response)
|
|
58
|
+
: null;
|
|
59
|
+
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
60
|
+
accountId,
|
|
61
|
+
selectedPeriod,
|
|
62
|
+
error: response.status,
|
|
63
|
+
dateConflict,
|
|
64
|
+
}));
|
|
65
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
66
|
+
accountId,
|
|
67
|
+
selectedPeriod,
|
|
68
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Statement REST API call errored out ' +
|
|
69
|
+
(error instanceof Error ? error.message : String(error))),
|
|
70
|
+
}))));
|
|
71
|
+
}));
|
|
72
|
+
exports.updateCombinedStatementInfoEpic = updateCombinedStatementInfoEpic;
|
|
@@ -10,12 +10,11 @@ const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
|
|
|
10
10
|
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
11
11
|
const updateStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.submitStatementUpdate.match), (0, operators_1.switchMap)((action) => {
|
|
12
12
|
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const accountRecon = reconciliationView.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]?.reconciliationByAccountID[accountId];
|
|
16
|
-
const localData = accountRecon?.localData?.statementUpdateLocalData;
|
|
13
|
+
const accountRecon = state$.value.expenseAutomationReconciliationViewState
|
|
14
|
+
.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]?.reconciliationByAccountID[accountId];
|
|
17
15
|
const parsedStatementData = accountRecon?.parsedStatementData;
|
|
18
|
-
|
|
16
|
+
const localData = accountRecon?.localData?.statementUpdateLocalDataByUploadId?.[statementUploadId];
|
|
17
|
+
if (parsedStatementData == null || localData == null) {
|
|
19
18
|
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
20
19
|
accountId,
|
|
21
20
|
selectedPeriod,
|
|
@@ -23,7 +22,7 @@ const updateStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
23
22
|
}));
|
|
24
23
|
}
|
|
25
24
|
const hasInvalidUpdates = localData.statementTransactions.updated.some((txn) => txn.statementTransactionId == null);
|
|
26
|
-
if (hasInvalidUpdates) {
|
|
25
|
+
if (hasInvalidUpdates === true) {
|
|
27
26
|
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
28
27
|
accountId,
|
|
29
28
|
selectedPeriod,
|
|
@@ -31,14 +30,15 @@ const updateStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
31
30
|
}));
|
|
32
31
|
}
|
|
33
32
|
const body = (0, mapStatementUpdateLocalDataToRequestBody_1.mapStatementUpdateLocalDataToRequestBody)(localData, parsedStatementData);
|
|
34
|
-
const
|
|
35
|
-
return
|
|
33
|
+
const updateUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`;
|
|
34
|
+
return zeniAPI
|
|
35
|
+
.putAndGetJSON(updateUrl, body)
|
|
36
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
36
37
|
if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
|
|
37
|
-
const parsedStatementData = (0, reconciliationPayload_1.transformUpdateStatementInfoPayloadToState)(response.data);
|
|
38
38
|
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.updateParsedStatementData)({
|
|
39
39
|
accountId,
|
|
40
40
|
selectedPeriod,
|
|
41
|
-
parsedStatementData,
|
|
41
|
+
parsedStatementData: (0, reconciliationPayload_1.transformUpdateStatementInfoPayloadToState)(response.data),
|
|
42
42
|
}), (0, reconciliationViewReducer_1.submitStatementUpdateSuccess)({
|
|
43
43
|
accountId,
|
|
44
44
|
selectedPeriod,
|
|
@@ -10,4 +10,4 @@ export interface AuthParamsPayload {
|
|
|
10
10
|
zeni_tenant_id: string;
|
|
11
11
|
zeni_user_id: string;
|
|
12
12
|
}
|
|
13
|
-
export default function uploadAccountStatementIntoDocumentAI(accountType: AccountType, fileBlob: Blob, authParams: AuthParams): Promise<UploadStatementDocumentAIPayload | undefined>;
|
|
13
|
+
export default function uploadAccountStatementIntoDocumentAI(accountType: AccountType, fileBlob: Blob, authParams: AuthParams, isCombinedStatement?: boolean): Promise<UploadStatementDocumentAIPayload | undefined>;
|
package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js
CHANGED
|
@@ -6,15 +6,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.default = uploadAccountStatementIntoDocumentAI;
|
|
7
7
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
8
8
|
const init_1 = require("../../../../init");
|
|
9
|
-
|
|
9
|
+
function toStatementDocumentType(accountType, isCombinedStatement) {
|
|
10
|
+
if (isCombinedStatement === true) {
|
|
11
|
+
return accountType === 'credit_card'
|
|
12
|
+
? 'reconciliation_combined_card_statement_upload'
|
|
13
|
+
: 'reconciliation_combined_bank_statement_upload';
|
|
14
|
+
}
|
|
15
|
+
return accountType === 'credit_card'
|
|
16
|
+
? 'reconciliation_card_statement_upload'
|
|
17
|
+
: 'reconciliation_bank_statement_upload';
|
|
18
|
+
}
|
|
19
|
+
async function uploadAccountStatementIntoDocumentAI(accountType, fileBlob, authParams, isCombinedStatement = false) {
|
|
10
20
|
let statementUpload;
|
|
11
21
|
const urlEndPoint = `${init_1.zeniAPI.apiEndPoints.documentAIMicroServiceBaseUrl}/1.0/processors/statement`;
|
|
12
22
|
const data = new FormData();
|
|
13
23
|
data.append('attachment_file_0', fileBlob);
|
|
14
24
|
const attachment_json = JSON.stringify({
|
|
15
|
-
document_type: accountType
|
|
16
|
-
? 'reconciliation_card_statement_upload'
|
|
17
|
-
: 'reconciliation_bank_statement_upload',
|
|
25
|
+
document_type: toStatementDocumentType(accountType, isCombinedStatement),
|
|
18
26
|
purpose_id: 'reconciliation',
|
|
19
27
|
});
|
|
20
28
|
data.append('attachment_json_0', attachment_json);
|
|
@@ -11,7 +11,7 @@ const fileReducer_1 = require("../../../../entity/file/fileReducer");
|
|
|
11
11
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
12
12
|
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
13
13
|
const uploadAccountStatementEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.uploadAccountStatement.match), (0, operators_1.mergeMap)((action) => {
|
|
14
|
-
const { accountId, selectedPeriod, payload } = action.payload;
|
|
14
|
+
const { accountId, selectedPeriod, payload, statementAccountScope } = action.payload;
|
|
15
15
|
const { start, end } = (0, timePeriod_1.convertToPeriod)(selectedPeriod, true);
|
|
16
16
|
const accountBase = (0, accountSelector_1.getAccountBase)(state$.value.accountState, accountId, 'account_reconciliation');
|
|
17
17
|
if (accountBase == null) {
|
|
@@ -22,6 +22,11 @@ const uploadAccountStatementEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
22
22
|
}));
|
|
23
23
|
}
|
|
24
24
|
const statementType = accountBase.accountType == 'credit_card' ? 'card' : 'bank';
|
|
25
|
+
const localStatementAccountScope = state$.value.expenseAutomationReconciliationViewState
|
|
26
|
+
.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]?.reconciliationByAccountID[accountId]?.localData
|
|
27
|
+
?.statementAccountScope;
|
|
28
|
+
const resolvedStatementAccountScope = statementAccountScope ?? localStatementAccountScope ?? 'single_account';
|
|
29
|
+
const isCombinedStatement = resolvedStatementAccountScope === 'multi_account';
|
|
25
30
|
const requestPayload = {
|
|
26
31
|
account_id: accountId,
|
|
27
32
|
statement_start_date: start.toString(),
|
|
@@ -29,6 +34,7 @@ const uploadAccountStatementEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
29
34
|
processor_run_id: payload.processor_run_id,
|
|
30
35
|
file_id: payload.files[0].file_id,
|
|
31
36
|
statement_type: statementType,
|
|
37
|
+
is_combined_statement: isCombinedStatement,
|
|
32
38
|
};
|
|
33
39
|
const uploadAccountStatementApi$ = zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/statements`, requestPayload);
|
|
34
40
|
return uploadAccountStatementApi$.pipe((0, operators_1.mergeMap)((response) => {
|
package/lib/view/expenseAutomationView/helpers/mapStatementUpdateLocalDataToRequestBody.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { ParsedStatementData, StatementUpdateLocalData } from '../types/reconciliationViewState';
|
|
2
2
|
export declare const mapStatementUpdateLocalDataToRequestBody: (localData: StatementUpdateLocalData, parsedStatementData: ParsedStatementData) => Record<string, unknown>;
|
|
3
|
+
export declare const mapCombinedStatementUpdateLocalDataToRequestBody: (localDataByUploadId: Record<string, StatementUpdateLocalData>, parsedStatementData: ParsedStatementData) => Record<string, unknown>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapStatementUpdateLocalDataToRequestBody = void 0;
|
|
3
|
+
exports.mapCombinedStatementUpdateLocalDataToRequestBody = exports.mapStatementUpdateLocalDataToRequestBody = void 0;
|
|
4
4
|
const reconciliationPayload_1 = require("../payload/reconciliationPayload");
|
|
5
5
|
const statementParseViewSelector_1 = require("../selectors/statementParseViewSelector");
|
|
6
|
-
const prepareStatementUpdateLocalData = (localData,
|
|
7
|
-
const { statementMeta, statementTransactions } =
|
|
6
|
+
const prepareStatementUpdateLocalData = (localData, statementUpload) => {
|
|
7
|
+
const { statementMeta, statementTransactions } = statementUpload;
|
|
8
8
|
const statementPeriod = (0, statementParseViewSelector_1.getEffectiveStatementPeriod)(statementMeta, localData.statementMeta);
|
|
9
9
|
const localDeletedIds = localData.statementTransactions?.deletedIds ?? [];
|
|
10
10
|
const currentTransactionIds = new Set(statementTransactions
|
|
@@ -30,5 +30,21 @@ const prepareStatementUpdateLocalData = (localData, parsedStatementData) => {
|
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
const mapStatementUpdateLocalDataToRequestBody = (localData, parsedStatementData) => (0, reconciliationPayload_1.toStatementUpdateRequestBody)(prepareStatementUpdateLocalData(localData, parsedStatementData));
|
|
33
|
+
const mapStatementUpdateLocalDataToRequestBody = (localData, parsedStatementData) => (0, reconciliationPayload_1.toStatementUpdateRequestBody)(prepareStatementUpdateLocalData(localData, parsedStatementData.statementUpload));
|
|
34
34
|
exports.mapStatementUpdateLocalDataToRequestBody = mapStatementUpdateLocalDataToRequestBody;
|
|
35
|
+
const mapCombinedStatementUpdateLocalDataToRequestBody = (localDataByUploadId, parsedStatementData) => {
|
|
36
|
+
const statementUploads = (0, statementParseViewSelector_1.getStatementUploadsFromParsedData)(parsedStatementData);
|
|
37
|
+
const updates = statementUploads.map((statementUpload) => {
|
|
38
|
+
const statementUploadId = statementUpload.statementMeta.statementUploadId;
|
|
39
|
+
const localData = localDataByUploadId[statementUploadId];
|
|
40
|
+
if (localData == null) {
|
|
41
|
+
throw new Error(`Missing statement update local data for upload ${statementUploadId}`);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
statementUploadId,
|
|
45
|
+
localData: prepareStatementUpdateLocalData(localData, statementUpload),
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
return (0, reconciliationPayload_1.toBulkStatementUpdateRequestBody)(updates);
|
|
49
|
+
};
|
|
50
|
+
exports.mapCombinedStatementUpdateLocalDataToRequestBody = mapCombinedStatementUpdateLocalDataToRequestBody;
|
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: "reconcile" | "save_reconcile_for_later" | "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_approval_reorder" | "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_approval_reorder" | "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" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "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" | "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" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
|
|
42
|
+
messageSection: "reconcile" | "save_reconcile_for_later" | "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_approval_reorder" | "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_approval_reorder" | "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" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "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" | "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" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
|
|
43
43
|
messageText: "notification" | "failed" | "success";
|
|
44
44
|
type: "error" | "success" | "info";
|
|
45
45
|
variables: {
|