@zeniai/client-epic-state 5.0.61-betaML1 → 5.0.61-betaSS1
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/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/entity/account/accountSelector.d.ts +0 -9
- package/lib/entity/account/accountSelector.js +1 -14
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -4
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -10
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -3
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/esm/entity/account/accountSelector.js +0 -11
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -10
- package/lib/esm/epic.js +1 -3
- package/lib/esm/index.js +7 -6
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +4 -0
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +9 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +1 -8
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +79 -78
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -31
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +9 -0
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -2
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +0 -5
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +0 -10
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -24
- package/lib/index.d.ts +6 -5
- package/lib/index.js +37 -44
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +4 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +8 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +0 -7
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +15 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +10 -23
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +80 -79
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +15 -4
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -32
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +2 -0
- package/lib/view/expenseAutomationView/types/completedSubTab.js +13 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -4
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +32 -15
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -6
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +0 -10
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -6
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -23
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +0 -81
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +0 -30
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +0 -85
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +0 -34
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
|
+
import { CompletedSubTab } from './completedSubTab';
|
|
4
5
|
export declare const toMissingReceiptsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
|
|
5
6
|
export type MissingReceiptsSortKey = ReturnType<typeof toMissingReceiptsSortKey>;
|
|
6
7
|
export interface MissingReceiptsViewUIState {
|
|
@@ -31,8 +32,6 @@ export declare const toBulkUploadResultsTab: (v: string) => "completed" | "unmat
|
|
|
31
32
|
export type BulkUploadResultsTab = ReturnType<typeof toBulkUploadResultsTab>;
|
|
32
33
|
export declare const toMissingReceiptsTab: (v: string) => "completed" | "unmatched" | "missing";
|
|
33
34
|
export type MissingReceiptsTab = ReturnType<typeof toMissingReceiptsTab>;
|
|
34
|
-
export declare const toCompletedSubTab: (v: string) => "all" | "manual" | "ai_accountant";
|
|
35
|
-
export type CompletedSubTab = ReturnType<typeof toCompletedSubTab>;
|
|
36
35
|
export declare const toMatchSource: (v: string) => "manual" | "ai";
|
|
37
36
|
export type MatchSource = ReturnType<typeof toMatchSource>;
|
|
38
37
|
export declare const toBulkUploadSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toBulkUploadSortKey = exports.toMatchSource = exports.
|
|
3
|
+
exports.toBulkUploadSortKey = exports.toMatchSource = exports.toMissingReceiptsTab = exports.toBulkUploadResultsTab = exports.toBulkUploadPhase = exports.toBatchFileStatus = exports.BATCH_FILE_STATUSES = exports.toBatchStatusValue = exports.MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = exports.toMissingReceiptsSortKey = void 0;
|
|
4
4
|
exports.isUnmatchedTabFileStatus = isUnmatchedTabFileStatus;
|
|
5
5
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
6
6
|
const MISSING_RECEIPTS_SORT_KEYS = [
|
|
@@ -49,9 +49,6 @@ exports.toBulkUploadResultsTab = toBulkUploadResultsTab;
|
|
|
49
49
|
const MISSING_RECEIPTS_TABS = ['missing', 'completed', 'unmatched'];
|
|
50
50
|
const toMissingReceiptsTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MISSING_RECEIPTS_TABS);
|
|
51
51
|
exports.toMissingReceiptsTab = toMissingReceiptsTab;
|
|
52
|
-
const COMPLETED_SUB_TABS = ['all', 'ai_accountant', 'manual'];
|
|
53
|
-
const toCompletedSubTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), COMPLETED_SUB_TABS);
|
|
54
|
-
exports.toCompletedSubTab = toCompletedSubTab;
|
|
55
52
|
const MATCH_SOURCES = ['ai', 'manual'];
|
|
56
53
|
const toMatchSource = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MATCH_SOURCES);
|
|
57
54
|
exports.toMatchSource = toMatchSource;
|
|
@@ -13,9 +13,11 @@ import { TransactionID } from '../../../entity/transaction/stateTypes/transactio
|
|
|
13
13
|
import { BillableStatus, CategorizationStatusType, PlatformLineDetailType, ProductOrService, TransactionLineBase } from '../../../entity/transaction/stateTypes/transactionLine';
|
|
14
14
|
import { TransactionCategory, TransactionType } from '../../../entity/transaction/stateTypes/transactionType';
|
|
15
15
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
16
|
+
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
16
17
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
17
18
|
import { EntityRecommendationKey } from '../../recommendation/recommendationState';
|
|
18
19
|
import { TransactionDetailKey } from '../../transactionDetail/transactionDetailState';
|
|
20
|
+
import { CompletedSubTab } from './completedSubTab';
|
|
19
21
|
export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "project" | "category" | "class" | "payment_account" | "transaction_type" | "memo_and_receipt";
|
|
20
22
|
export type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
|
|
21
23
|
export declare const TRANSACTIONS_TABS: readonly ["review", "autoCategorized"];
|
|
@@ -103,26 +105,41 @@ export interface TransactionsTabViewState extends FetchedState {
|
|
|
103
105
|
selectedTransactionId?: ID;
|
|
104
106
|
selectedTransactionLineId?: ID;
|
|
105
107
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Snapshot of the autoCategorized tab's paginated dataset for a single
|
|
110
|
+
* Completed sub-tab. Stored in {@link TransactionsViewState.autoCategorizedSubTabCache}
|
|
111
|
+
* so revisiting an already-loaded sub-tab can short-circuit the fetch epic
|
|
112
|
+
* (mirrors parent-tab caching). The snapshot is period-spanning — both the
|
|
113
|
+
* `totalCount` map and `transactionIdsBySelectedPeriod` map preserve every
|
|
114
|
+
* period the user has paged through under that sub-tab.
|
|
115
|
+
*/
|
|
116
|
+
export interface AutoCategorizedSubTabSnapshot {
|
|
117
|
+
error: ZeniAPIStatus | undefined;
|
|
108
118
|
fetchState: FetchState;
|
|
119
|
+
pageToken: PageToken;
|
|
120
|
+
totalCount: Record<MonthYearPeriodId, number>;
|
|
121
|
+
transactionIdsBySelectedPeriod: Record<MonthYearPeriodId, ID[]>;
|
|
109
122
|
}
|
|
110
|
-
/** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
|
|
111
|
-
export declare const TRANSFER_ACCOUNTS_FETCH_KIND: readonly ["transfer_eligible", "credit_card_only"];
|
|
112
|
-
export type TransferAccountsFetchKind = (typeof TRANSFER_ACCOUNTS_FETCH_KIND)[number];
|
|
113
|
-
export type TransferEntryRouteReplacement = {
|
|
114
|
-
newTransactionId: TransactionID;
|
|
115
|
-
previousTransactionId: TransactionID;
|
|
116
|
-
};
|
|
117
123
|
export type TransactionsViewState = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Per-sub-tab snapshot cache for the Completed (autoCategorized) tab. Keyed
|
|
126
|
+
* by {@link CompletedSubTab}. Populated as the user navigates between
|
|
127
|
+
* sub-tabs and consulted on every switch — the active autoCategorized slot
|
|
128
|
+
* is restored from here when a snapshot exists, otherwise it is reset and
|
|
129
|
+
* the fetch epic loads page 1 fresh.
|
|
130
|
+
*/
|
|
131
|
+
autoCategorizedSubTabCache: Partial<Record<CompletedSubTab, AutoCategorizedSubTabSnapshot>>;
|
|
132
|
+
/**
|
|
133
|
+
* Period-keyed parent tab counts, scoped per {@link TransactionsTab}.
|
|
134
|
+
* Sourced from the listing response's `parent_tab_total_count` and used
|
|
135
|
+
* exclusively to drive the parent tab badges on the UI — every other
|
|
136
|
+
* count consumer (pagination, sub-tab chips, in-tab "showing X of Y")
|
|
137
|
+
* keeps reading from {@link TransactionsViewUIState.totalCount}.
|
|
138
|
+
*/
|
|
139
|
+
parentTotalCountByTab: Record<TransactionsTab, Record<MonthYearPeriodId, number>>;
|
|
140
|
+
selectedTransactionCategorizationCompletedSubTab: CompletedSubTab;
|
|
123
141
|
selectedTransactionCategorizationTab: TransactionsTab;
|
|
124
142
|
transactionCategorizationView: Record<TransactionsTab, TransactionsTabViewState>;
|
|
125
|
-
transferAccounts: TransferAccountsState;
|
|
126
143
|
};
|
|
127
144
|
export interface TransactionLineUpdates {
|
|
128
145
|
account?: AccountBase;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.initialSupportedTransactionCategorization = exports.getTransactionCategorizationKey = exports.toTransactionsTabKey = exports.TRANSACTIONS_TABS = exports.toTransactionsSortKey = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
const transactionDetailState_1 = require("../../transactionDetail/transactionDetailState");
|
|
6
6
|
const TRANSACTIONS_SORT_KEYS = [
|
|
@@ -31,8 +31,3 @@ exports.initialSupportedTransactionCategorization = {
|
|
|
31
31
|
tabSpecificLineItems: {},
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
/** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
|
|
35
|
-
exports.TRANSFER_ACCOUNTS_FETCH_KIND = [
|
|
36
|
-
'transfer_eligible',
|
|
37
|
-
'credit_card_only',
|
|
38
|
-
];
|
|
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
17
17
|
firstMonthOfFY: Month;
|
|
18
18
|
maxNumOfPeriodsToHighlight: number;
|
|
19
19
|
thisPeriod: TimeframeTick;
|
|
20
|
-
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"
|
|
20
|
+
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
additionalBalances: COABalanceType[];
|
|
22
22
|
coaBalances: COABalance[];
|
|
23
23
|
firstMonthOfFY: Month;
|
|
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
|
|
|
3
3
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
4
4
|
import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
|
|
5
5
|
export declare const initialState: GlobalMerchantViewState;
|
|
6
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" |
|
|
6
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | undefined], {
|
|
7
7
|
merchantId: string | undefined;
|
|
8
|
-
context: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" |
|
|
8
|
+
context: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | undefined;
|
|
9
9
|
}, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
10
|
merchantId: ID;
|
|
11
11
|
}, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -2,8 +2,8 @@ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
|
2
2
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
3
3
|
import { ReportsResyncState } from './reportsResyncState';
|
|
4
4
|
export declare const initialReportsResyncState: ReportsResyncState;
|
|
5
|
-
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"
|
|
6
|
-
reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"
|
|
5
|
+
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"], {
|
|
6
|
+
reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
7
7
|
}, "initiateReportsResync/initiateReportsResync", never, never>, initiateReportsClassViewRefetching: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
8
|
reportIdToResync: ReportID;
|
|
9
9
|
}, "initiateReportsResync/initiateReportsClassViewRefetching">, reportsResyncSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getTasksCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
|
|
|
4
4
|
import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
|
|
5
5
|
import { TopExState } from './topExState';
|
|
6
6
|
export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
|
|
7
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"
|
|
7
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
8
8
|
reportTitle: string;
|
|
9
9
|
version: string | number | undefined;
|
|
10
10
|
status: import("../..").Status | undefined;
|
|
@@ -7,10 +7,9 @@ import { ZeniAPI } from '../../../zeniAPI';
|
|
|
7
7
|
import { fetchAccountList } from '../../accountList/accountListReducer';
|
|
8
8
|
import { fetchClassList } from '../../classList/classListReducer';
|
|
9
9
|
import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
|
|
10
|
-
import { fetchAccountsForTransferFlow } from '../../expenseAutomationView/reducers/transactionsViewReducer';
|
|
11
10
|
import { fetchOwnerList } from '../../ownerList/ownerListReducer';
|
|
12
11
|
import { fetchProjectList } from '../../projectList/projectListReducer';
|
|
13
12
|
import { updateSortUiState } from '../../vendorList/vendorListReducer';
|
|
14
13
|
import { fetchTransactionDetail, initializeTransactionDetailLocalData, removeTransactionDetail, updateTransactionDetailFetchState } from '../transactionDetailReducer';
|
|
15
|
-
export type ActionType = ReturnType<typeof fetchTransactionDetail> | ReturnType<typeof updateTransaction> | ReturnType<typeof updateTransactionDetailFetchState> | ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof removeTransaction> | ReturnType<typeof removeTransactionDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchProjectList> | ReturnType<typeof fetchAccountList> | ReturnType<typeof updateSortUiState> | ReturnType<typeof updateVendors> | ReturnType<typeof updateTransactionVendorLocalData> | ReturnType<typeof fetchOwnerList
|
|
14
|
+
export type ActionType = ReturnType<typeof fetchTransactionDetail> | ReturnType<typeof updateTransaction> | ReturnType<typeof updateTransactionDetailFetchState> | ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof removeTransaction> | ReturnType<typeof removeTransactionDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchProjectList> | ReturnType<typeof fetchAccountList> | ReturnType<typeof updateSortUiState> | ReturnType<typeof updateVendors> | ReturnType<typeof updateTransactionVendorLocalData> | ReturnType<typeof fetchOwnerList>;
|
|
16
15
|
export declare const fetchTransactionDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -19,7 +19,6 @@ const accountListReducer_1 = require("../../accountList/accountListReducer");
|
|
|
19
19
|
const classListReducer_1 = require("../../classList/classListReducer");
|
|
20
20
|
const transactionVendorLocalDataHelper_1 = require("../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper");
|
|
21
21
|
const transactionVendorViewReducer_1 = require("../../commonVendorView/transactionVendorView/transactionVendorViewReducer");
|
|
22
|
-
const transactionsViewReducer_1 = require("../../expenseAutomationView/reducers/transactionsViewReducer");
|
|
23
22
|
const ownerListReducer_1 = require("../../ownerList/ownerListReducer");
|
|
24
23
|
const projectListReducer_1 = require("../../projectList/projectListReducer");
|
|
25
24
|
const transactionDetailReducer_1 = require("../transactionDetailReducer");
|
|
@@ -42,15 +41,6 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
42
41
|
accountList.fetchState !== 'In-Progress') {
|
|
43
42
|
transactionActions.push((0, accountListReducer_1.fetchAccountList)('accountList'));
|
|
44
43
|
}
|
|
45
|
-
const { transferAccounts, creditCardAccountsForTransfer, } = state$.value.expenseAutomationTransactionsViewState;
|
|
46
|
-
if (transferAccounts.fetchState !== 'In-Progress' &&
|
|
47
|
-
transferAccounts.fetchState !== 'Completed') {
|
|
48
|
-
transactionActions.push((0, transactionsViewReducer_1.fetchAccountsForTransferFlow)({ kind: 'transfer_eligible' }));
|
|
49
|
-
}
|
|
50
|
-
if (creditCardAccountsForTransfer.fetchState !== 'In-Progress' &&
|
|
51
|
-
creditCardAccountsForTransfer.fetchState !== 'Completed') {
|
|
52
|
-
transactionActions.push((0, transactionsViewReducer_1.fetchAccountsForTransferFlow)({ kind: 'credit_card_only' }));
|
|
53
|
-
}
|
|
54
44
|
const classList = state$.value.classListState;
|
|
55
45
|
if (classList.hasValidState() === false &&
|
|
56
46
|
classList.fetchState !== 'In-Progress') {
|
|
@@ -3,7 +3,7 @@ import { TransactionPayload } from '../../entity/transaction/payloadTypes/transa
|
|
|
3
3
|
import { SupportedTransactionPayload } from '../../entity/transaction/transactionState';
|
|
4
4
|
import { VendorPayload } from '../../entity/vendor/vendorPayload';
|
|
5
5
|
import { ZeniAPIResponse } from '../../responsePayload';
|
|
6
|
-
|
|
6
|
+
interface TransactionDetailPayload {
|
|
7
7
|
query: {
|
|
8
8
|
transaction_id: string;
|
|
9
9
|
transaction_type: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { NestedClassHierarchyForReport } from '../../commonStateTypes/classesView/nestedClassID';
|
|
3
|
-
import {
|
|
3
|
+
import { FetchStateAndError } from '../../commonStateTypes/common';
|
|
4
4
|
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
-
import { AccountBase } from '../../entity/account/accountState';
|
|
6
5
|
import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
|
|
7
6
|
import { SupportedTransactionWithCOT } from '../../entity/transaction/transactionState';
|
|
8
7
|
import { Vendor } from '../../entity/vendor/vendorState';
|
|
@@ -18,9 +17,6 @@ export interface TransactionDetailReport extends SelectorView {
|
|
|
18
17
|
allVendors: Vendor[];
|
|
19
18
|
classHierarchyList: NestedClassHierarchyForReport[];
|
|
20
19
|
classList: ClassListSelectorView;
|
|
21
|
-
createTransferEntryStatus: FetchState;
|
|
22
|
-
/** Resolved credit-card pool for credit_card_payment transfer drawer. */
|
|
23
|
-
creditCardAccountsForTransferList: AccountBase[];
|
|
24
20
|
deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
|
|
25
21
|
isAccountingClassesEnabled: boolean;
|
|
26
22
|
isAccountingProjectsEnabled: boolean;
|
|
@@ -28,7 +24,6 @@ export interface TransactionDetailReport extends SelectorView {
|
|
|
28
24
|
projectList: ProjectListSelectorView;
|
|
29
25
|
transactionDetailLocalData: TransactionDetailLocalData;
|
|
30
26
|
transactionDetailUpdateStatus: FetchStateAndError;
|
|
31
|
-
transferAccounts: AccountBase[];
|
|
32
27
|
isUpdateNotAllowed?: boolean;
|
|
33
28
|
transaction?: SupportedTransactionWithCOT;
|
|
34
29
|
}
|
|
@@ -7,7 +7,6 @@ exports.getInitialUpdatablePeriodsForTransactionRecommendations = exports.getTra
|
|
|
7
7
|
exports.getTransactionDetailForTransaction = getTransactionDetailForTransaction;
|
|
8
8
|
const get_1 = __importDefault(require("lodash/get"));
|
|
9
9
|
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
10
|
-
const accountSelector_1 = require("../../entity/account/accountSelector");
|
|
11
10
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
12
11
|
const transactionType_1 = require("../../entity/transaction/stateTypes/transactionType");
|
|
13
12
|
const transactionHelper_1 = require("../../entity/transaction/transactionHelper");
|
|
@@ -19,7 +18,7 @@ const classListSelector_1 = require("../classList/classListSelector");
|
|
|
19
18
|
const projectListSelector_1 = require("../projectList/projectListSelector");
|
|
20
19
|
const transactionDetailState_1 = require("./transactionDetailState");
|
|
21
20
|
const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
|
|
22
|
-
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState,
|
|
21
|
+
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
|
|
23
22
|
const detailKey = (0, transactionDetailState_1.getTransactionDetailKey)(transactionId);
|
|
24
23
|
const transactionDetail = (0, get_1.default)(transactionDetailState.transactionDetailById, detailKey);
|
|
25
24
|
let fetchState = {
|
|
@@ -80,24 +79,6 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
|
|
|
80
79
|
: [];
|
|
81
80
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
82
81
|
const vendors = (0, vendorSelector_1.getVendorsByVendorIds)(vendorState, vendorListState.vendorIds);
|
|
83
|
-
const transferAccountsFromApi = expenseAutomationTransactionsViewState.transferAccounts.accountIds
|
|
84
|
-
.map((id) => (0, accountSelector_1.getAccountBaseForTransferAccounts)(accountState, id))
|
|
85
|
-
.filter((account) => account != null);
|
|
86
|
-
const transferAccountsList = transferAccountsFromApi.length > 0
|
|
87
|
-
? transferAccountsFromApi
|
|
88
|
-
: accountsList.accounts
|
|
89
|
-
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
90
|
-
.filter((account) => account != null);
|
|
91
|
-
const creditCardAccountsFromApi = expenseAutomationTransactionsViewState.creditCardAccountsForTransfer.accountIds
|
|
92
|
-
.map((id) => (0, accountSelector_1.getAccountBaseForCreditCardTransferAccounts)(accountState, id))
|
|
93
|
-
.filter((account) => account != null);
|
|
94
|
-
const coaCreditCardsFallback = accountsList.accounts
|
|
95
|
-
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
96
|
-
.filter((account) => account != null)
|
|
97
|
-
.filter((a) => a.accountType === 'credit_card');
|
|
98
|
-
const creditCardAccountsForTransferList = creditCardAccountsFromApi.length > 0
|
|
99
|
-
? creditCardAccountsFromApi
|
|
100
|
-
: coaCreditCardsFallback;
|
|
101
82
|
return {
|
|
102
83
|
reportId: 'transaction_detail',
|
|
103
84
|
reportTitle: 'Transaction Detail',
|
|
@@ -114,9 +95,6 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
|
|
|
114
95
|
accountsHierarchyList,
|
|
115
96
|
classList: classList,
|
|
116
97
|
isAccountingClassesEnabled,
|
|
117
|
-
createTransferEntryStatus: expenseAutomationTransactionsViewState.createTransferEntryStatus,
|
|
118
|
-
creditCardAccountsForTransferList,
|
|
119
|
-
transferAccounts: transferAccountsList,
|
|
120
98
|
isAccountingProjectsEnabled,
|
|
121
99
|
projectList,
|
|
122
100
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.61-
|
|
3
|
+
"version": "5.0.61-betaSS1",
|
|
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",
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { concat, from, timer } from 'rxjs';
|
|
2
|
-
import { catchError, filter, map, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
4
|
-
import { toTransactionID } from '../../../../entity/transaction/payloadTypes/transactionIDPayload';
|
|
5
|
-
import { toTransactionType } from '../../../../entity/transaction/stateTypes/transactionType';
|
|
6
|
-
import { removeTransaction, updateTransaction, } from '../../../../entity/transaction/transactionReducer';
|
|
7
|
-
import { isSuccessResponse } from '../../../../responsePayload';
|
|
8
|
-
import { initializeTransactionDetailLocalData, removeTransactionDetail, } from '../../../transactionDetail/transactionDetailReducer';
|
|
9
|
-
import { getTransactionDetailKey } from '../../../transactionDetail/transactionDetailState';
|
|
10
|
-
import { acknowledgeTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, removeTransactionFromAllTabs, resetCreateTransferEntryStatus, } from '../../reducers/transactionsViewReducer';
|
|
11
|
-
function transactionIdsAreEqual(a, b) {
|
|
12
|
-
return a.id === b.id && a.type === b.type;
|
|
13
|
-
}
|
|
14
|
-
export const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(createTransferEntry.match), mergeMap((action) => {
|
|
15
|
-
const { transactionId, creditAccountIntegrationId, debitAccountIntegrationId, memo, transactionType, sourceTransactionType, } = action.payload;
|
|
16
|
-
const url = `https://dev.api.zeni.ai/version/accounting/komal/1.0/transactions/transaction-type-update`;
|
|
17
|
-
return zeniAPI
|
|
18
|
-
.postAndGetJSON(url, {
|
|
19
|
-
transaction_type: transactionType,
|
|
20
|
-
transaction_id: transactionId,
|
|
21
|
-
to_account_integration_id: creditAccountIntegrationId,
|
|
22
|
-
from_account_integration_id: debitAccountIntegrationId,
|
|
23
|
-
memo,
|
|
24
|
-
})
|
|
25
|
-
.pipe(mergeMap((response) => {
|
|
26
|
-
if (isSuccessResponse(response)) {
|
|
27
|
-
const immediate = [];
|
|
28
|
-
const previousTransactionId = {
|
|
29
|
-
id: transactionId,
|
|
30
|
-
type: toTransactionType(sourceTransactionType),
|
|
31
|
-
};
|
|
32
|
-
if (response.data?.transaction != null) {
|
|
33
|
-
const newTransactionId = toTransactionID(response.data.transaction);
|
|
34
|
-
const replaced = !transactionIdsAreEqual(previousTransactionId, newTransactionId);
|
|
35
|
-
const newDetailKey = getTransactionDetailKey(newTransactionId);
|
|
36
|
-
immediate.push(updateTransaction(newDetailKey, response.data.transaction));
|
|
37
|
-
immediate.push(initializeTransactionDetailLocalData({
|
|
38
|
-
transactionId: newTransactionId,
|
|
39
|
-
vendorId: response.data.vendors?.[0]?.vendor_id,
|
|
40
|
-
}));
|
|
41
|
-
immediate.push(createTransferEntrySuccess(), removeTransactionFromAllTabs(transactionId), openSnackbar({
|
|
42
|
-
messageSection: 'create_transfer_entry',
|
|
43
|
-
messageText: 'success',
|
|
44
|
-
type: 'success',
|
|
45
|
-
}));
|
|
46
|
-
if (replaced) {
|
|
47
|
-
immediate.push(createTransferEntryReplacedTransaction(previousTransactionId, newTransactionId));
|
|
48
|
-
}
|
|
49
|
-
return concat(from(immediate), timer(0).pipe(map(() => resetCreateTransferEntryStatus()), mergeMap((resetAction) => replaced
|
|
50
|
-
? from([
|
|
51
|
-
resetAction,
|
|
52
|
-
removeTransaction(getTransactionDetailKey(previousTransactionId)),
|
|
53
|
-
removeTransactionDetail(previousTransactionId),
|
|
54
|
-
acknowledgeTransferEntryRouteReplacement(),
|
|
55
|
-
])
|
|
56
|
-
: from([resetAction]))));
|
|
57
|
-
}
|
|
58
|
-
immediate.push(createTransferEntrySuccess(), removeTransactionFromAllTabs(transactionId), openSnackbar({
|
|
59
|
-
messageSection: 'create_transfer_entry',
|
|
60
|
-
messageText: 'success',
|
|
61
|
-
type: 'success',
|
|
62
|
-
}));
|
|
63
|
-
return concat(from(immediate), timer(0).pipe(map(() => resetCreateTransferEntryStatus())));
|
|
64
|
-
}
|
|
65
|
-
return from([
|
|
66
|
-
createTransferEntryFailure(),
|
|
67
|
-
openSnackbar({
|
|
68
|
-
messageSection: 'create_transfer_entry',
|
|
69
|
-
messageText: 'failed',
|
|
70
|
-
type: 'error',
|
|
71
|
-
}),
|
|
72
|
-
]);
|
|
73
|
-
}), catchError(() => from([
|
|
74
|
-
createTransferEntryFailure(),
|
|
75
|
-
openSnackbar({
|
|
76
|
-
messageSection: 'create_transfer_entry',
|
|
77
|
-
messageText: 'failed',
|
|
78
|
-
type: 'error',
|
|
79
|
-
}),
|
|
80
|
-
])));
|
|
81
|
-
}));
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { updateAccounts } from '../../../../entity/account/accountReducer';
|
|
4
|
-
import { isSuccessResponse } from '../../../../responsePayload';
|
|
5
|
-
import { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure, } from '../../reducers/transactionsViewReducer';
|
|
6
|
-
const REPORT_ID_BY_KIND = {
|
|
7
|
-
transfer_eligible: 'transfer_accounts',
|
|
8
|
-
credit_card_only: 'credit_card_transfer_accounts',
|
|
9
|
-
};
|
|
10
|
-
const QUERY_BY_KIND = {
|
|
11
|
-
transfer_eligible: { is_only_include_transfer_accounts: true },
|
|
12
|
-
credit_card_only: { is_include_only_credit_card_accounts: true },
|
|
13
|
-
};
|
|
14
|
-
export const fetchTransferAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchAccountsForTransferFlow.match), switchMap((action) => {
|
|
15
|
-
const { kind } = action.payload;
|
|
16
|
-
const queryValue = QUERY_BY_KIND[kind];
|
|
17
|
-
const reportId = REPORT_ID_BY_KIND[kind];
|
|
18
|
-
const url = `https://dev.api.zeni.ai/version/accounting/komal/1.0/accounts?query=${encodeURIComponent(JSON.stringify(queryValue))}`;
|
|
19
|
-
return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
|
|
20
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
21
|
-
const accountIds = response.data.accounts.map((account) => account.account_id);
|
|
22
|
-
const actions = [
|
|
23
|
-
updateAccounts(response.data.accounts, reportId),
|
|
24
|
-
updateAccountsForTransferFlow({ accountIds, kind }),
|
|
25
|
-
];
|
|
26
|
-
return of(...actions);
|
|
27
|
-
}
|
|
28
|
-
return of(updateAccountsForTransferFlowFailure({ kind }));
|
|
29
|
-
}), catchError(() => of(updateAccountsForTransferFlowFailure({ kind }))));
|
|
30
|
-
}));
|