@zeniai/client-epic-state 5.1.34-betaRD1 → 5.1.35
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/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +22 -0
- package/lib/entity/accountRecon/accountReconPayload.js +26 -1
- package/lib/entity/accountRecon/accountReconReducer.d.ts +5 -2
- package/lib/entity/accountRecon/accountReconReducer.js +36 -2
- package/lib/entity/accountRecon/accountReconSelector.d.ts +6 -1
- package/lib/entity/accountRecon/accountReconSelector.js +5 -0
- package/lib/entity/accountRecon/accountReconState.d.ts +22 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +8 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +10 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +8 -0
- package/lib/epic.d.ts +4 -1
- package/lib/epic.js +4 -1
- package/lib/esm/entity/accountRecon/accountReconPayload.js +26 -1
- package/lib/esm/entity/accountRecon/accountReconReducer.js +35 -1
- package/lib/esm/entity/accountRecon/accountReconSelector.js +5 -0
- package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +10 -0
- package/lib/esm/epic.js +4 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +34 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.js +31 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +57 -0
- package/lib/esm/view/expenseAutomationView/payload/reconciliationPayload.js +153 -0
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +188 -9
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +27 -0
- package/lib/esm/view/expenseAutomationView/types/reconciliationViewState.js +29 -0
- package/lib/index.d.ts +6 -6
- package/lib/index.js +51 -37
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +38 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.d.ts +26 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.js +35 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.d.ts +27 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +61 -0
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +176 -10
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +159 -0
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +53 -3
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +190 -10
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -1
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +29 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +175 -0
- package/lib/view/expenseAutomationView/types/reconciliationViewState.js +30 -0
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,131 @@ import { BankStatusCodeType } from '../../../entity/accountRecon/accountReconSta
|
|
|
7
7
|
import { CustomerBase } from '../../../entity/customer/customerState';
|
|
8
8
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
9
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
10
|
+
import { ReconciliationSummaryPayload } from '../payload/reconciliationPayload';
|
|
11
|
+
export interface PolygonPoint {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}
|
|
15
|
+
export interface Citation {
|
|
16
|
+
page: number;
|
|
17
|
+
pageHeight: number;
|
|
18
|
+
pageWidth: number;
|
|
19
|
+
polygon: PolygonPoint[];
|
|
20
|
+
referenceText: string;
|
|
21
|
+
}
|
|
22
|
+
export interface StatementTransaction {
|
|
23
|
+
amount: number;
|
|
24
|
+
citations: Citation[];
|
|
25
|
+
isUserAdded: boolean;
|
|
26
|
+
isUserEdited: boolean;
|
|
27
|
+
statementTransactionId: string;
|
|
28
|
+
transactionDate: string;
|
|
29
|
+
transactionDirection: 'debit' | 'credit';
|
|
30
|
+
transactionMemo: string;
|
|
31
|
+
}
|
|
32
|
+
export interface StatementMeta {
|
|
33
|
+
closingBalance: number;
|
|
34
|
+
openingBalance: number;
|
|
35
|
+
statementDataStatus: {
|
|
36
|
+
code: string;
|
|
37
|
+
label: string;
|
|
38
|
+
};
|
|
39
|
+
statementEndDate: string;
|
|
40
|
+
statementStartDate: string;
|
|
41
|
+
statementStatus: {
|
|
42
|
+
code: string;
|
|
43
|
+
label: string;
|
|
44
|
+
};
|
|
45
|
+
statementUploadId: string;
|
|
46
|
+
totalDeposits: number;
|
|
47
|
+
totalPayments: number;
|
|
48
|
+
}
|
|
49
|
+
export interface AccountInfo {
|
|
50
|
+
accountId: string;
|
|
51
|
+
accountName: string;
|
|
52
|
+
accountType: string;
|
|
53
|
+
currencyCode: string;
|
|
54
|
+
last4Digits: string | null;
|
|
55
|
+
}
|
|
56
|
+
export interface FileInfo {
|
|
57
|
+
fileId: string;
|
|
58
|
+
fileName: string;
|
|
59
|
+
signedUrl: string;
|
|
60
|
+
}
|
|
61
|
+
export interface AiSummaryField {
|
|
62
|
+
code: string;
|
|
63
|
+
label: string;
|
|
64
|
+
}
|
|
65
|
+
export interface PreviousReconciliationInfo {
|
|
66
|
+
endDate: string;
|
|
67
|
+
reconciledAt: string;
|
|
68
|
+
reconciledByUserId: string;
|
|
69
|
+
reconciliationId: string;
|
|
70
|
+
startDate: string;
|
|
71
|
+
}
|
|
72
|
+
export interface AiSummaryChainStatus {
|
|
73
|
+
code: string;
|
|
74
|
+
expectedStartDate: string | null;
|
|
75
|
+
label: string;
|
|
76
|
+
previousReconciliationInfo: PreviousReconciliationInfo | null;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Surfaced when Confirm & Save is rejected with a 409 because the statement
|
|
80
|
+
* period overlaps with / leaves a gap after an already-reconciled period.
|
|
81
|
+
*/
|
|
82
|
+
export interface StatementDateConflict {
|
|
83
|
+
errorCode: string;
|
|
84
|
+
expectedStartDate: string | null;
|
|
85
|
+
/** Present for overlap conflicts; GAP-only 409s may omit prior recon info. */
|
|
86
|
+
previousReconciliationInfo?: PreviousReconciliationInfo;
|
|
87
|
+
}
|
|
88
|
+
export interface AiSummary {
|
|
89
|
+
accountIdentified: string | null;
|
|
90
|
+
chainStatus: AiSummaryChainStatus;
|
|
91
|
+
exceptionsDetected: number;
|
|
92
|
+
fieldsCaptured: AiSummaryField[];
|
|
93
|
+
transactionsExtracted: number;
|
|
94
|
+
}
|
|
95
|
+
export interface StatementUpload {
|
|
96
|
+
account: AccountInfo;
|
|
97
|
+
file: FileInfo | null;
|
|
98
|
+
statementMeta: StatementMeta;
|
|
99
|
+
statementTransactions: StatementTransaction[];
|
|
100
|
+
aiSummary?: AiSummary | null;
|
|
101
|
+
}
|
|
102
|
+
export interface ParsedStatementData {
|
|
103
|
+
statementUpload: StatementUpload;
|
|
104
|
+
}
|
|
105
|
+
export interface ReconciliationSummaryAccounts {
|
|
106
|
+
done: number;
|
|
107
|
+
failed: number;
|
|
108
|
+
inProgress: number;
|
|
109
|
+
total: number;
|
|
110
|
+
}
|
|
111
|
+
export interface ReconciliationSummaryAutoMatched {
|
|
112
|
+
matchedTxns: number;
|
|
113
|
+
totalTxns: number;
|
|
114
|
+
}
|
|
115
|
+
export interface ReconciliationSummaryNeedsReview {
|
|
116
|
+
accountCount: number;
|
|
117
|
+
txnCount: number;
|
|
118
|
+
}
|
|
119
|
+
export interface ReconciliationSummaryProgressBar {
|
|
120
|
+
aiPercentageShare: number;
|
|
121
|
+
completePercentage: number;
|
|
122
|
+
humanPercentageShare: number;
|
|
123
|
+
remainingPercentage: number;
|
|
124
|
+
}
|
|
125
|
+
export interface ReconciliationViewSummary {
|
|
126
|
+
accounts: ReconciliationSummaryAccounts;
|
|
127
|
+
accountsToConnectCount: number;
|
|
128
|
+
autoMatched: ReconciliationSummaryAutoMatched;
|
|
129
|
+
needsReview: ReconciliationSummaryNeedsReview;
|
|
130
|
+
timeSavedHours: number;
|
|
131
|
+
timeSavedPercentage: number;
|
|
132
|
+
progressBar?: ReconciliationSummaryProgressBar;
|
|
133
|
+
}
|
|
134
|
+
export declare function toReconciliationViewSummary(payload: ReconciliationSummaryPayload): ReconciliationViewSummary;
|
|
10
135
|
export declare const RECONCILE_ACTIONS: readonly ["reconcile", "save_reconcile_for_later", "exclude"];
|
|
11
136
|
export declare const toReconcileActions: (v: string) => "reconcile" | "save_reconcile_for_later" | "exclude";
|
|
12
137
|
export type ReconcileActionType = ReturnType<typeof toReconcileActions>;
|
|
@@ -107,9 +232,11 @@ export interface ReconciliationViewState extends FetchStateAndError {
|
|
|
107
232
|
reconTabsState: ReconciliationTabsState;
|
|
108
233
|
refreshStatus: FetchStateAndError;
|
|
109
234
|
selectedTab: ReconciliationViewTabType;
|
|
235
|
+
statementProcessingFailed: boolean;
|
|
110
236
|
statementUploadChosen: boolean;
|
|
111
237
|
selectedAccountId?: ID;
|
|
112
238
|
selectedDrawerAccountId?: ID;
|
|
239
|
+
summary?: ReconciliationViewSummary;
|
|
113
240
|
}
|
|
114
241
|
export interface BankConnectionStatus {
|
|
115
242
|
connectionInProgress: boolean;
|
|
@@ -120,19 +247,67 @@ export interface AccountReconciliationRecords {
|
|
|
120
247
|
accountIDs: ID[];
|
|
121
248
|
reconciliationByAccountID: Record<ID, AccountReconciliationDataWithTransactionFetchState>;
|
|
122
249
|
}
|
|
250
|
+
export interface StatementTransactionForUpdate {
|
|
251
|
+
amount: number;
|
|
252
|
+
transactionDate: string;
|
|
253
|
+
transactionDirection: 'debit' | 'credit';
|
|
254
|
+
transactionMemo: string;
|
|
255
|
+
statementTransactionId?: string;
|
|
256
|
+
}
|
|
257
|
+
export interface StatementTransactionsUpdate {
|
|
258
|
+
added: StatementTransactionForUpdate[];
|
|
259
|
+
deletedIds: string[];
|
|
260
|
+
updated: StatementTransactionForUpdate[];
|
|
261
|
+
}
|
|
262
|
+
export interface StatementUpdateLocalData {
|
|
263
|
+
statementMeta: StatementMeta;
|
|
264
|
+
statementTransactions: StatementTransactionsUpdate;
|
|
265
|
+
}
|
|
266
|
+
export interface StatementUpdateLocalDataPayload {
|
|
267
|
+
statement_meta: {
|
|
268
|
+
opening_balance: number;
|
|
269
|
+
statement_end_date: string;
|
|
270
|
+
statement_start_date: string;
|
|
271
|
+
total_deposits: number;
|
|
272
|
+
total_payments: number;
|
|
273
|
+
};
|
|
274
|
+
statement_transactions: {
|
|
275
|
+
added: Array<{
|
|
276
|
+
amount: number;
|
|
277
|
+
transaction_date: string;
|
|
278
|
+
transaction_direction: 'debit' | 'credit';
|
|
279
|
+
transaction_memo: string;
|
|
280
|
+
}>;
|
|
281
|
+
deleted_ids: string[];
|
|
282
|
+
updated: Array<{
|
|
283
|
+
amount: number;
|
|
284
|
+
statement_transaction_id: string;
|
|
285
|
+
transaction_date: string;
|
|
286
|
+
transaction_direction: 'debit' | 'credit';
|
|
287
|
+
transaction_memo: string;
|
|
288
|
+
}>;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
123
291
|
export interface AccountReconciliationLocalData {
|
|
124
292
|
accountSource?: ReconciliationAccountSourceType;
|
|
293
|
+
statementUpdateLocalData?: StatementUpdateLocalData;
|
|
125
294
|
}
|
|
126
295
|
export interface AccountReconciliationDataWithTransactionFetchState {
|
|
127
296
|
accountId: ID;
|
|
128
297
|
localData: AccountReconciliationLocalData;
|
|
129
298
|
refreshStatus: FetchStateAndError;
|
|
299
|
+
reparseStatementStatus: FetchStateAndError;
|
|
300
|
+
statementDateConflict: StatementDateConflict | null;
|
|
130
301
|
statementDeleteStatus: FetchStateAndError;
|
|
302
|
+
/** Derived from bank_status.code === 'parsing' for read-only list/drawer banners. */
|
|
131
303
|
statementParseInProgress: boolean;
|
|
304
|
+
/** Client-driven fetch state for the parseStatement epic (In-Progress/Completed/Error). */
|
|
305
|
+
statementParseStatus: FetchStateAndError;
|
|
132
306
|
statementUpdateStatus: FetchStateAndError;
|
|
133
307
|
statementUploadStatus: FetchStateAndError;
|
|
134
308
|
transactionFetchState: FetchStateAndError;
|
|
135
309
|
accountDetectionReason?: string;
|
|
310
|
+
parsedStatementData?: ParsedStatementData;
|
|
136
311
|
reconciliationId?: ID;
|
|
137
312
|
}
|
|
138
313
|
export {};
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toReconciliationTabsType = exports.toReconcileActions = exports.RECONCILE_ACTIONS = void 0;
|
|
4
|
+
exports.toReconciliationViewSummary = toReconciliationViewSummary;
|
|
4
5
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
6
|
+
function toReconciliationViewSummary(payload) {
|
|
7
|
+
return {
|
|
8
|
+
accounts: {
|
|
9
|
+
done: payload.accounts.done,
|
|
10
|
+
failed: payload.accounts.failed,
|
|
11
|
+
inProgress: payload.accounts.in_progress,
|
|
12
|
+
total: payload.accounts.total,
|
|
13
|
+
},
|
|
14
|
+
accountsToConnectCount: payload.accounts_to_connect_count,
|
|
15
|
+
autoMatched: {
|
|
16
|
+
matchedTxns: payload.auto_matched.matched_txns,
|
|
17
|
+
totalTxns: payload.auto_matched.total_txns,
|
|
18
|
+
},
|
|
19
|
+
needsReview: {
|
|
20
|
+
accountCount: payload.needs_review.account_count,
|
|
21
|
+
txnCount: payload.needs_review.txn_count,
|
|
22
|
+
},
|
|
23
|
+
timeSavedHours: 0,
|
|
24
|
+
timeSavedPercentage: payload.time_saved_percentage,
|
|
25
|
+
progressBar: payload.progress_bar != null
|
|
26
|
+
? {
|
|
27
|
+
aiPercentageShare: payload.progress_bar.ai_percentage_share,
|
|
28
|
+
completePercentage: payload.progress_bar.complete_percentage,
|
|
29
|
+
humanPercentageShare: payload.progress_bar.human_percentage_share,
|
|
30
|
+
remainingPercentage: payload.progress_bar.remaining_percentage,
|
|
31
|
+
}
|
|
32
|
+
: undefined,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
5
35
|
exports.RECONCILE_ACTIONS = [
|
|
6
36
|
'reconcile',
|
|
7
37
|
'save_reconcile_for_later',
|
|
@@ -20,7 +20,7 @@ export interface VendorFiling1099ListQuery {
|
|
|
20
20
|
sortKey: VendorFiling1099ListViewSortKey;
|
|
21
21
|
sortOrder: SortOrder;
|
|
22
22
|
}
|
|
23
|
-
declare const toVendorFiling1099ListViewSortKey: (v: string) => "status" | "w9" | "
|
|
23
|
+
declare const toVendorFiling1099ListViewSortKey: (v: string) => "status" | "w9" | "total" | "legal_name" | "tax_classification" | "filing1099type";
|
|
24
24
|
export type VendorFiling1099ListViewSortKey = ReturnType<typeof toVendorFiling1099ListViewSortKey>;
|
|
25
25
|
export type Type1099Download = 'nec' | 'misc' | 'int';
|
|
26
26
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.35",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|