@zeniai/client-epic-state 4.16.82 → 4.16.83
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/account/accountPayload.d.ts +0 -1
- package/lib/entity/account/accountPayload.js +0 -3
- package/lib/entity/account/accountSelector.js +0 -1
- package/lib/entity/account/accountState.d.ts +0 -4
- package/lib/entity/account/accountState.js +1 -6
- package/lib/entity/accountRecon/accountReconPayload.d.ts +0 -7
- package/lib/entity/accountRecon/accountReconPayload.js +0 -16
- package/lib/entity/accountRecon/accountReconReducer.d.ts +1 -8
- package/lib/entity/accountRecon/accountReconReducer.js +2 -57
- package/lib/entity/accountRecon/accountReconSelector.d.ts +2 -15
- package/lib/entity/accountRecon/accountReconSelector.js +1 -11
- package/lib/entity/accountRecon/accountReconState.d.ts +1 -17
- package/lib/entity/accountRecon/accountReconState.js +2 -21
- package/lib/entity/aiController/aiControllerPayload.d.ts +1 -1
- package/lib/entity/aiController/aiControllerReducer.d.ts +1 -4
- package/lib/entity/aiController/aiControllerReducer.js +90 -266
- package/lib/entity/aiController/aiControllerState.d.ts +1 -3
- package/lib/entity/file/filePayload.d.ts +9 -9
- package/lib/entity/file/fileState.d.ts +4 -4
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.js +1 -1
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -3
- package/lib/index.d.ts +7 -9
- package/lib/index.js +28 -38
- package/lib/view/aiControllerView/aiControllerViewReducer.d.ts +1 -4
- package/lib/view/aiControllerView/aiControllerViewReducer.js +5 -27
- package/lib/view/aiControllerView/aiControllerViewSelector.d.ts +0 -1
- package/lib/view/aiControllerView/aiControllerViewSelector.js +2 -3
- package/lib/view/aiControllerView/aiControllerViewState.d.ts +2 -5
- package/lib/view/aiControllerView/epics/fetchChatHistoryEpic.d.ts +1 -1
- package/lib/view/aiControllerView/epics/fetchChatHistoryEpic.js +3 -15
- package/lib/view/aiControllerView/epics/fetchChatSessionsForUserEpic.d.ts +1 -1
- package/lib/view/aiControllerView/epics/fetchChatSessionsForUserEpic.js +3 -15
- package/lib/view/aiControllerView/epics/submitQuestionEpic.d.ts +2 -2
- package/lib/view/aiControllerView/epics/submitQuestionEpic.js +5 -6
- package/lib/view/autoComplete/entityAutoCompleteReducer.d.ts +2 -9
- package/lib/view/autoComplete/entityAutoCompleteReducer.js +11 -25
- package/lib/view/autoComplete/entityAutoCompleteSelector.d.ts +1 -3
- package/lib/view/autoComplete/entityAutoCompleteSelector.js +3 -3
- package/lib/view/autoComplete/entityAutoCompleteState.d.ts +2 -3
- package/lib/view/autoComplete/fetchEntityAutoCompleteEpic.js +6 -15
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +2 -4
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +1 -27
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +1 -29
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -37
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -80
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +4 -10
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -12
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +6 -16
- 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/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
- package/package.json +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.js +0 -41
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.d.ts +0 -12
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +0 -54
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic.d.ts +0 -15
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic.js +0 -46
|
@@ -18,9 +18,6 @@ const mapAccountBasePayloadToAccountBase = (payload) => {
|
|
|
18
18
|
qboId: (_e = payload.qbo_id) !== null && _e !== void 0 ? _e : undefined,
|
|
19
19
|
coaId: (_f = payload.coa_id) !== null && _f !== void 0 ? _f : undefined,
|
|
20
20
|
labels: toAccountLabelArray((_g = payload.labels) !== null && _g !== void 0 ? _g : []),
|
|
21
|
-
reconciliationSource: payload.reconciliation_source == null
|
|
22
|
-
? undefined
|
|
23
|
-
: (0, accountState_1.toReconciliationAccountSource)(payload.reconciliation_source),
|
|
24
21
|
});
|
|
25
22
|
};
|
|
26
23
|
exports.mapAccountBasePayloadToAccountBase = mapAccountBasePayloadToAccountBase;
|
|
@@ -15,9 +15,6 @@ export type AccountLabel = ReturnType<typeof toAccountLabel>;
|
|
|
15
15
|
export declare const toAccountLabelStrict: (v: string | null | undefined) => AccountLabel | undefined;
|
|
16
16
|
export declare function getAccountKey(reportIdUniqueKey: ReportIDPlusForecastID, accountId: ID, classesViewParentId?: ClassesViewParentID, accountsViewParentId?: AccountsViewParentID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-charge_cards` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-charge_cards+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}`;
|
|
17
17
|
export type AccountKey = ReturnType<typeof getAccountKey>;
|
|
18
|
-
export declare const toReconciliationAccountSource: (v: string) => "plaid" | "bank_statement";
|
|
19
|
-
export type ReconciliationAccountSourceType = ReturnType<typeof toReconciliationAccountSource>;
|
|
20
|
-
export declare const toReconciliationAccountSourceStrict: (v: string | null | undefined) => ReconciliationAccountSourceType | undefined;
|
|
21
18
|
export interface AccountState {
|
|
22
19
|
accountsByKey: Record<AccountKey, Account>;
|
|
23
20
|
}
|
|
@@ -41,7 +38,6 @@ export interface AccountBase {
|
|
|
41
38
|
logo?: ZeniUrl;
|
|
42
39
|
qboId?: ID;
|
|
43
40
|
coaId?: ID;
|
|
44
|
-
reconciliationSource?: ReconciliationAccountSourceType;
|
|
45
41
|
}
|
|
46
42
|
export interface RecommendedAccountBase extends AccountBase, RecommendationBase {
|
|
47
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.toAccountLabelStrict = exports.toAccountTypeStrict = exports.toAccountType = void 0;
|
|
4
4
|
exports.getAccountKey = getAccountKey;
|
|
5
5
|
const nestedAccountID_1 = require("../../commonStateTypes/accountView/nestedAccountID");
|
|
6
6
|
const nestedClassID_1 = require("../../commonStateTypes/classesView/nestedClassID");
|
|
@@ -64,8 +64,3 @@ function getAccountKey(reportIdUniqueKey, accountId, classesViewParentId, accoun
|
|
|
64
64
|
}
|
|
65
65
|
return `${accountId}-${reportIdUniqueKey}`;
|
|
66
66
|
}
|
|
67
|
-
const ALL_RECONCILIATION_ACCOUNT_SOURCES = ['plaid', 'bank_statement'];
|
|
68
|
-
const toReconciliationAccountSource = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_RECONCILIATION_ACCOUNT_SOURCES);
|
|
69
|
-
exports.toReconciliationAccountSource = toReconciliationAccountSource;
|
|
70
|
-
const toReconciliationAccountSourceStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v !== null && v !== void 0 ? v : '', ALL_RECONCILIATION_ACCOUNT_SOURCES);
|
|
71
|
-
exports.toReconciliationAccountSourceStrict = toReconciliationAccountSourceStrict;
|
|
@@ -3,23 +3,16 @@ import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloa
|
|
|
3
3
|
import { ID } from '../../commonStateTypes/common';
|
|
4
4
|
import { MatchedTransactionPayload } from '../transaction/payloadTypes/reconciliationTransactionPayloads';
|
|
5
5
|
import { AccountReconciliationData, RecommendedReviewTransaction, TransactionsToReview } from './accountReconState';
|
|
6
|
-
export interface StatementMetaDataPayload {
|
|
7
|
-
file_id: string;
|
|
8
|
-
statement_upload_id: string;
|
|
9
|
-
}
|
|
10
6
|
export interface ReconciliationDataPayload {
|
|
11
7
|
reconciliation_id: string | null;
|
|
12
8
|
account_id: ID;
|
|
13
9
|
transactions: ReconcileReviewTransactionsPayload;
|
|
14
10
|
bank_status: StatusCodeWithLabelPayload;
|
|
15
|
-
statement_status: StatusCodeWithLabelPayload;
|
|
16
11
|
currency: CurrencyPayload;
|
|
17
12
|
start_date: string;
|
|
18
13
|
end_date: string;
|
|
19
14
|
balance_data_status: StatusCodeWithLabelPayload | null;
|
|
20
|
-
statement_data_status: StatusCodeWithLabelPayload | null;
|
|
21
15
|
status: StatusCodeWithLabelPayload | null;
|
|
22
|
-
statement_meta_data: StatementMetaDataPayload | null;
|
|
23
16
|
variance: number | null;
|
|
24
17
|
bank_balance: number | null;
|
|
25
18
|
cleared_balance: number | null;
|
|
@@ -67,28 +67,12 @@ const toAccountReconciliationData = (payload) => {
|
|
|
67
67
|
label: payload.status.label,
|
|
68
68
|
}
|
|
69
69
|
: undefined,
|
|
70
|
-
statementStatus: {
|
|
71
|
-
code: (0, accountReconState_1.toStatementStatusCodeType)(payload.statement_status.code),
|
|
72
|
-
label: payload.statement_status.label,
|
|
73
|
-
},
|
|
74
70
|
balanceDataStatus: payload.balance_data_status
|
|
75
71
|
? {
|
|
76
72
|
code: (0, accountReconState_1.toBalanceDataStatusCodeType)(payload.balance_data_status.code),
|
|
77
73
|
label: payload.balance_data_status.label,
|
|
78
74
|
}
|
|
79
75
|
: undefined,
|
|
80
|
-
statementDataStatus: payload.statement_data_status
|
|
81
|
-
? {
|
|
82
|
-
code: (0, accountReconState_1.toStatementDataStatusCodeType)(payload.statement_data_status.code),
|
|
83
|
-
label: payload.statement_data_status.label,
|
|
84
|
-
}
|
|
85
|
-
: undefined,
|
|
86
|
-
statementMetaData: payload.statement_meta_data
|
|
87
|
-
? {
|
|
88
|
-
fileId: payload.statement_meta_data.file_id,
|
|
89
|
-
statementUploadId: payload.statement_meta_data.statement_upload_id,
|
|
90
|
-
}
|
|
91
|
-
: undefined,
|
|
92
76
|
currency: {
|
|
93
77
|
currencyCode: payload.currency.currency_code,
|
|
94
78
|
currencySymbol: payload.currency.currency_symbol,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
2
|
-
import { DeleteStatementResponsePayload, UploadStatementResponsePayload } from '../../view/expenseAutomationView/payload/reconciliationPayload';
|
|
3
2
|
import { ReconciliationDataPayload } from './accountReconPayload';
|
|
4
3
|
import { AccountReconState } from './accountReconState';
|
|
5
4
|
export declare const initialState: AccountReconState;
|
|
@@ -12,12 +11,6 @@ export declare const updateAccountRecon: import("@reduxjs/toolkit").ActionCreato
|
|
|
12
11
|
}, "accountRecon/excludeReconReviewTransaction", never, never>, clearAllAccountRecon: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"accountRecon/clearAllAccountRecon">, addTransactionToReconcileList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountReconKey: string, transactionId: string], {
|
|
13
12
|
accountReconKey: string;
|
|
14
13
|
transactionId: string;
|
|
15
|
-
}, "accountRecon/addTransactionToReconcileList", never, never
|
|
16
|
-
accountReconKey: string;
|
|
17
|
-
statementDataPayload: DeleteStatementResponsePayload;
|
|
18
|
-
}, "accountRecon/updateAccountReconDeleteStatement", never, never>, updateAccountReconUploadStatement: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountReconKey: string, payload: UploadStatementResponsePayload], {
|
|
19
|
-
accountReconKey: string;
|
|
20
|
-
payload: UploadStatementResponsePayload;
|
|
21
|
-
}, "accountRecon/updateAccountReconUploadStatement", never, never>;
|
|
14
|
+
}, "accountRecon/addTransactionToReconcileList", never, never>;
|
|
22
15
|
declare const _default: import("redux").Reducer<AccountReconState>;
|
|
23
16
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.addTransactionToReconcileList = exports.clearAllAccountRecon = exports.excludeReconReviewTransaction = exports.updateAccountRecon = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const accountReconPayload_1 = require("./accountReconPayload");
|
|
7
7
|
const accountReconState_1 = require("./accountReconState");
|
|
@@ -25,61 +25,6 @@ const accountRecon = (0, toolkit_1.createSlice)({
|
|
|
25
25
|
doUpdateAccountRecon(draft, action.payload.selectedPeriod, action.payload.accountReconDataPayload);
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
|
-
updateAccountReconUploadStatement: {
|
|
29
|
-
prepare(accountReconKey, payload) {
|
|
30
|
-
return {
|
|
31
|
-
payload: {
|
|
32
|
-
accountReconKey,
|
|
33
|
-
payload,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
reducer(draft, action) {
|
|
38
|
-
const { accountReconKey, payload } = action.payload;
|
|
39
|
-
draft.accountReconByAccountReconKey[accountReconKey] = Object.assign(Object.assign({}, draft.accountReconByAccountReconKey[accountReconKey]), { statementStatus: {
|
|
40
|
-
code: (0, accountReconState_1.toStatementStatusCodeType)(payload.statement_upload.statement_status.code),
|
|
41
|
-
label: payload.statement_upload.statement_status.label,
|
|
42
|
-
}, statementDataStatus: {
|
|
43
|
-
code: (0, accountReconState_1.toStatementDataStatusCodeType)(payload.statement_upload.statement_data_status.code),
|
|
44
|
-
label: payload.statement_upload.statement_data_status.label,
|
|
45
|
-
}, statementMetaData: {
|
|
46
|
-
fileId: payload.file.file_id,
|
|
47
|
-
statementUploadId: payload.statement_upload.statement_upload_id,
|
|
48
|
-
} });
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
updateAccountReconDeleteStatement: {
|
|
52
|
-
prepare(accountReconKey, statementDataPayload) {
|
|
53
|
-
return {
|
|
54
|
-
payload: {
|
|
55
|
-
accountReconKey,
|
|
56
|
-
statementDataPayload,
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
},
|
|
60
|
-
reducer(draft, action) {
|
|
61
|
-
var _a, _b;
|
|
62
|
-
const { accountReconKey, statementDataPayload } = action.payload;
|
|
63
|
-
draft.accountReconByAccountReconKey[accountReconKey] = Object.assign(Object.assign({}, draft.accountReconByAccountReconKey[accountReconKey]), { statementStatus: {
|
|
64
|
-
code: (0, accountReconState_1.toStatementStatusCodeType)((_a = statementDataPayload.statement_upload.statement_status) === null || _a === void 0 ? void 0 : _a.code),
|
|
65
|
-
label: (_b = statementDataPayload.statement_upload.statement_status) === null || _b === void 0 ? void 0 : _b.label,
|
|
66
|
-
}, statementDataStatus: statementDataPayload.statement_upload.statement_data_status != null
|
|
67
|
-
? {
|
|
68
|
-
code: (0, accountReconState_1.toStatementDataStatusCodeType)(statementDataPayload.statement_upload.statement_data_status
|
|
69
|
-
.code),
|
|
70
|
-
label: statementDataPayload.statement_upload.statement_data_status
|
|
71
|
-
.label,
|
|
72
|
-
}
|
|
73
|
-
: undefined, statementMetaData: statementDataPayload.statement_upload.statement_meta_data != null
|
|
74
|
-
? {
|
|
75
|
-
fileId: statementDataPayload.statement_upload.statement_meta_data
|
|
76
|
-
.file_id,
|
|
77
|
-
statementUploadId: statementDataPayload.statement_upload.statement_meta_data
|
|
78
|
-
.statement_upload_id,
|
|
79
|
-
}
|
|
80
|
-
: undefined });
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
28
|
excludeReconReviewTransaction: {
|
|
84
29
|
prepare(accountReconKey, excludedTransactionId) {
|
|
85
30
|
return {
|
|
@@ -117,7 +62,7 @@ const accountRecon = (0, toolkit_1.createSlice)({
|
|
|
117
62
|
},
|
|
118
63
|
},
|
|
119
64
|
});
|
|
120
|
-
_a = accountRecon.actions, exports.updateAccountRecon = _a.updateAccountRecon, exports.excludeReconReviewTransaction = _a.excludeReconReviewTransaction, exports.clearAllAccountRecon = _a.clearAllAccountRecon, exports.addTransactionToReconcileList = _a.addTransactionToReconcileList
|
|
65
|
+
_a = accountRecon.actions, exports.updateAccountRecon = _a.updateAccountRecon, exports.excludeReconReviewTransaction = _a.excludeReconReviewTransaction, exports.clearAllAccountRecon = _a.clearAllAccountRecon, exports.addTransactionToReconcileList = _a.addTransactionToReconcileList;
|
|
121
66
|
exports.default = accountRecon.reducer;
|
|
122
67
|
const doUpdateAccountRecon = (draft, selectedPeriod, accountReconDataPayload) => {
|
|
123
68
|
accountReconDataPayload.forEach((accountReconData) => {
|
|
@@ -4,30 +4,17 @@ import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
|
4
4
|
import { RootState } from '../../reducer';
|
|
5
5
|
import { ZeniDate } from '../../zeniDayJS';
|
|
6
6
|
import { AccountBase } from '../account/accountState';
|
|
7
|
-
import { File } from '../file/fileState';
|
|
8
7
|
import { MatchedTransaction } from '../transaction/stateTypes/reconciliationTransaction';
|
|
9
8
|
import { User } from '../user/userState';
|
|
10
|
-
import { BalanceDataStatusCodeType, ReconciliationStatusCodeType,
|
|
9
|
+
import { BalanceDataStatusCodeType, ReconciliationStatusCodeType, TransactionsToReview } from './accountReconState';
|
|
11
10
|
export interface AccountReconciliationEntity {
|
|
12
11
|
account: AccountBase;
|
|
13
12
|
startDate: ZeniDate;
|
|
14
13
|
endDate: ZeniDate;
|
|
14
|
+
reconUpdatedAt?: ZeniDate;
|
|
15
15
|
transactionsToReview: TransactionsToReview[];
|
|
16
16
|
transactionsToReconcile: MatchedTransaction[];
|
|
17
17
|
currency: Currency;
|
|
18
|
-
statementStatus: {
|
|
19
|
-
code: StatementStatusCodeType;
|
|
20
|
-
label: string;
|
|
21
|
-
};
|
|
22
|
-
statementDataStatus?: {
|
|
23
|
-
code: StatementDataStatusCodeType;
|
|
24
|
-
label: string;
|
|
25
|
-
};
|
|
26
|
-
statementMetaData?: {
|
|
27
|
-
file: File | undefined;
|
|
28
|
-
statementUploadId?: ID;
|
|
29
|
-
};
|
|
30
|
-
reconUpdatedAt?: ZeniDate;
|
|
31
18
|
reconciliationId?: ID;
|
|
32
19
|
user?: User;
|
|
33
20
|
balance?: Amount;
|
|
@@ -3,12 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getAccountReconByAccountIdAndSelectedPeriod = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const accountSelector_1 = require("../account/accountSelector");
|
|
6
|
-
const fileSelector_1 = require("../file/fileSelector");
|
|
7
6
|
const transactionSelector_1 = require("../transaction/transactionSelector");
|
|
8
7
|
const userSelector_1 = require("../user/userSelector");
|
|
9
8
|
const accountReconState_1 = require("./accountReconState");
|
|
10
|
-
exports.getAccountReconByAccountIdAndSelectedPeriod = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.userState, (state) => state.transactionState, (state) => state.accountReconState, (
|
|
11
|
-
var _a, _b;
|
|
9
|
+
exports.getAccountReconByAccountIdAndSelectedPeriod = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.userState, (state) => state.transactionState, (state) => state.accountReconState, (_state, accountId) => accountId, (_state, _accountId, selectedPeriod) => selectedPeriod, (accountState, userState, transactionState, accountReconState, accountId, selectedPeriod) => {
|
|
12
10
|
const accountReconKey = (0, accountReconState_1.toAccountReconKey)(accountId, selectedPeriod);
|
|
13
11
|
const accountRecon = accountReconState.accountReconByAccountReconKey[accountReconKey];
|
|
14
12
|
if (accountRecon == null) {
|
|
@@ -39,14 +37,6 @@ exports.getAccountReconByAccountIdAndSelectedPeriod = (0, toolkit_1.createSelect
|
|
|
39
37
|
initialClearedBalance: accountRecon.initialClearedBalance,
|
|
40
38
|
reconciliationId: accountRecon.reconciliationId,
|
|
41
39
|
user,
|
|
42
|
-
statementStatus: accountRecon.statementStatus,
|
|
43
|
-
statementDataStatus: accountRecon.statementDataStatus,
|
|
44
|
-
statementMetaData: {
|
|
45
|
-
file: ((_a = accountRecon.statementMetaData) === null || _a === void 0 ? void 0 : _a.fileId) != null
|
|
46
|
-
? (0, fileSelector_1.getFileByFileId)(fileState, accountRecon.statementMetaData.fileId)
|
|
47
|
-
: undefined,
|
|
48
|
-
statementUploadId: (_b = accountRecon.statementMetaData) === null || _b === void 0 ? void 0 : _b.statementUploadId,
|
|
49
|
-
},
|
|
50
40
|
reconUpdatedAt: accountRecon.reconUpdatedAt,
|
|
51
41
|
transactionsToReview: accountRecon.transactionsToReview,
|
|
52
42
|
transactionsToReconcile,
|
|
@@ -10,12 +10,8 @@ export declare const toReconciliationStatusCodeType: (v: string) => "failed" | "
|
|
|
10
10
|
export type ReconciliationStatusCodeType = ReturnType<typeof toReconciliationStatusCodeType>;
|
|
11
11
|
export declare const toBalanceDataStatusCodeType: (v: string) => "completed" | "in_progress" | "not_found";
|
|
12
12
|
export type BalanceDataStatusCodeType = ReturnType<typeof toBalanceDataStatusCodeType>;
|
|
13
|
-
export declare const toBankStatusCodeType: (v: string) => "
|
|
13
|
+
export declare const toBankStatusCodeType: (v: string) => "connected" | "not_connected" | "reconnect";
|
|
14
14
|
export type BankStatusCodeType = ReturnType<typeof toBankStatusCodeType>;
|
|
15
|
-
export declare const toStatementDataStatusCodeType: (v: string) => "not_connected" | "parsing" | "parsing_failed" | "validated" | "validation_failed" | "deleting" | "deleted";
|
|
16
|
-
export type StatementDataStatusCodeType = ReturnType<typeof toStatementDataStatusCodeType>;
|
|
17
|
-
export declare const toStatementStatusCodeType: (v: string) => "not_found" | "uploaded";
|
|
18
|
-
export type StatementStatusCodeType = ReturnType<typeof toStatementStatusCodeType>;
|
|
19
15
|
export declare const toAccountReconKey: (accountId: ID, selectedPeriod: MonthYearPeriod) => string;
|
|
20
16
|
export type AccountReconKey = ReturnType<typeof toAccountReconKey>;
|
|
21
17
|
export interface AccountReconState {
|
|
@@ -28,10 +24,6 @@ export interface AccountReconciliationData {
|
|
|
28
24
|
transactionsToReview: TransactionsToReview[];
|
|
29
25
|
transactionsToReconcile: ID[];
|
|
30
26
|
currency: Currency;
|
|
31
|
-
statementStatus: {
|
|
32
|
-
code: StatementStatusCodeType;
|
|
33
|
-
label: string;
|
|
34
|
-
};
|
|
35
27
|
reconciliationId?: ID;
|
|
36
28
|
variance?: Amount;
|
|
37
29
|
variancePercentage?: number;
|
|
@@ -43,14 +35,6 @@ export interface AccountReconciliationData {
|
|
|
43
35
|
code: BalanceDataStatusCodeType;
|
|
44
36
|
label: string;
|
|
45
37
|
};
|
|
46
|
-
statementDataStatus?: {
|
|
47
|
-
code: StatementDataStatusCodeType;
|
|
48
|
-
label: string;
|
|
49
|
-
};
|
|
50
|
-
statementMetaData?: {
|
|
51
|
-
fileId?: ID;
|
|
52
|
-
statementUploadId?: ID;
|
|
53
|
-
};
|
|
54
38
|
reconciliationStatus?: {
|
|
55
39
|
code: ReconciliationStatusCodeType;
|
|
56
40
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toAccountReconKey = exports.
|
|
3
|
+
exports.toAccountReconKey = exports.toBankStatusCodeType = exports.toBalanceDataStatusCodeType = exports.toReconciliationStatusCodeType = exports.toRecommendedActionCodeType = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
5
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
6
6
|
const RECOMMENDED_ACTION_CODE = [
|
|
@@ -29,27 +29,8 @@ const BALANCE_DATA_STATUS_CODE = [
|
|
|
29
29
|
];
|
|
30
30
|
const toBalanceDataStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, BALANCE_DATA_STATUS_CODE);
|
|
31
31
|
exports.toBalanceDataStatusCodeType = toBalanceDataStatusCodeType;
|
|
32
|
-
const BANK_STATUS_CODE = [
|
|
33
|
-
'not_found',
|
|
34
|
-
'connected',
|
|
35
|
-
'not_connected',
|
|
36
|
-
'reconnect',
|
|
37
|
-
];
|
|
32
|
+
const BANK_STATUS_CODE = ['connected', 'not_connected', 'reconnect'];
|
|
38
33
|
const toBankStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, BANK_STATUS_CODE);
|
|
39
34
|
exports.toBankStatusCodeType = toBankStatusCodeType;
|
|
40
|
-
const STATEMENT_DATA_STATUS_CODE = [
|
|
41
|
-
'not_connected',
|
|
42
|
-
'parsing',
|
|
43
|
-
'parsing_failed',
|
|
44
|
-
'validated',
|
|
45
|
-
'validation_failed',
|
|
46
|
-
'deleting',
|
|
47
|
-
'deleted',
|
|
48
|
-
];
|
|
49
|
-
const toStatementDataStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, STATEMENT_DATA_STATUS_CODE);
|
|
50
|
-
exports.toStatementDataStatusCodeType = toStatementDataStatusCodeType;
|
|
51
|
-
const STATEMENT_STATUS_CODE = ['not_found', 'uploaded'];
|
|
52
|
-
const toStatementStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, STATEMENT_STATUS_CODE);
|
|
53
|
-
exports.toStatementStatusCodeType = toStatementStatusCodeType;
|
|
54
35
|
const toAccountReconKey = (accountId, selectedPeriod) => `${accountId}-${(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)}`;
|
|
55
36
|
exports.toAccountReconKey = toAccountReconKey;
|
|
@@ -19,6 +19,7 @@ export interface AIControllerVisualizationPayload {
|
|
|
19
19
|
}
|
|
20
20
|
export interface AIControllerAnswerPayload {
|
|
21
21
|
text: string;
|
|
22
|
+
follow_up_questions?: string[];
|
|
22
23
|
state: string;
|
|
23
24
|
type: string;
|
|
24
25
|
visualization: AIControllerVisualizationPayload | null;
|
|
@@ -26,7 +27,6 @@ export interface AIControllerAnswerPayload {
|
|
|
26
27
|
assumptions: string | null;
|
|
27
28
|
insights: string | null;
|
|
28
29
|
summarized_title: string | null;
|
|
29
|
-
follow_up_questions?: string[];
|
|
30
30
|
}
|
|
31
31
|
export interface ChatSessionPayload {
|
|
32
32
|
chat_session_id: string;
|
|
@@ -12,7 +12,6 @@ export declare const setNewSession: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
12
12
|
}, "aiController/setNewSession">, clearSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiController/clearSession">, setSessions: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChatSessionPayload[], "aiController/setSessions">, setChatHistory: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
13
13
|
chatSessionId: ID;
|
|
14
14
|
history: MessagePayload[];
|
|
15
|
-
isPaginationComplete?: boolean;
|
|
16
15
|
}, "aiController/setChatHistory">, upsertAnswerPayload: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
16
|
chatSessionId: ID;
|
|
18
17
|
answerPayload: AIControllerAnswerPayload;
|
|
@@ -41,8 +40,6 @@ export declare const setNewSession: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
41
40
|
}, "aiController/addQuestionPayload">, clearAIController: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiController/clearAIController">, deleteQuestion: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
42
41
|
chatSessionId: ID;
|
|
43
42
|
questionAnswerId: ID;
|
|
44
|
-
}, "aiController/deleteQuestion"
|
|
45
|
-
chatSessionId: ID;
|
|
46
|
-
}, "aiController/updateNewSession">;
|
|
43
|
+
}, "aiController/deleteQuestion">;
|
|
47
44
|
declare const _default: import("redux").Reducer<AIControllerState>;
|
|
48
45
|
export default _default;
|