@zeniai/client-epic-state 5.0.0 → 5.0.2-betaRD1
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/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
- package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
- package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
- package/lib/commonStateTypes/common.d.ts +1 -1
- package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
- package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/entity/account/accountReducer.js +6 -3
- package/lib/entity/account/accountSelector.d.ts +7 -0
- package/lib/entity/account/accountSelector.js +4 -2
- package/lib/entity/account/accountState.d.ts +3 -1
- package/lib/entity/account/accountState.js +4 -1
- package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
- package/lib/entity/account/subAccountSelector.d.ts +2 -0
- package/lib/entity/account/subAccountSelector.js +2 -0
- package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +44 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +55 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCard/chargeCard.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/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/project/projectPayload.d.ts +13 -0
- package/lib/entity/project/projectPayload.js +30 -0
- package/lib/entity/project/projectReducer.d.ts +10 -0
- package/lib/entity/project/projectReducer.js +31 -0
- package/lib/entity/project/projectSelector.d.ts +5 -0
- package/lib/entity/project/projectSelector.js +12 -0
- package/lib/entity/project/projectState.d.ts +13 -0
- package/lib/entity/project/projectState.js +2 -0
- 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 +11 -0
- package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
- package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
- package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
- package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +10 -0
- package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +14 -0
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +56 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +94 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
- package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
- package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
- package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +7 -2
- package/lib/entity/tenant/clearAllEpic.js +10 -0
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.js +1 -0
- package/lib/entity/tenant/tenantSelector.d.ts +1 -0
- package/lib/entity/tenant/tenantSelector.js +9 -1
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +21 -0
- package/lib/entity/userRole/userRoleType.d.ts +2 -2
- package/lib/epic.d.ts +8 -1
- package/lib/epic.js +8 -1
- package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
- package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
- package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/esm/entity/account/accountReducer.js +6 -3
- package/lib/esm/entity/account/accountSelector.js +4 -2
- package/lib/esm/entity/account/accountState.js +4 -1
- package/lib/esm/entity/account/subAccountSelector.js +2 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +49 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
- package/lib/esm/entity/project/projectPayload.js +26 -0
- package/lib/esm/entity/project/projectReducer.js +27 -0
- package/lib/esm/entity/project/projectSelector.js +8 -0
- package/lib/esm/entity/project/projectState.js +1 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +10 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +52 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +87 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +10 -0
- package/lib/esm/entity/tenant/tenantReducer.js +1 -0
- package/lib/esm/entity/tenant/tenantSelector.js +7 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +21 -0
- package/lib/esm/epic.js +8 -1
- package/lib/esm/index.js +14 -4
- package/lib/esm/reducer.js +15 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +149 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +72 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
- package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +52 -0
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +1 -1
- package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
- package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
- package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
- package/lib/index.d.ts +19 -4
- package/lib/index.js +73 -34
- package/lib/reducer.d.ts +15 -0
- package/lib/reducer.js +15 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +31 -0
- package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.js +153 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +14 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.js +78 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +27 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +56 -0
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +1 -1
- 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 +2 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +8 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
- package/lib/view/financeStatement/financeStatementSelector.js +12 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerAiAccountantJobEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
8
|
+
const aiAccountantViewReducer_1 = require("../aiAccountantViewReducer");
|
|
9
|
+
const triggerAiAccountantJobEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiAccountantViewReducer_1.triggerAiAccountantJob.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
+
const { operationType, startDate, endDate } = action.payload;
|
|
11
|
+
const rootState = state$.value;
|
|
12
|
+
const selectedTenantIds = rootState.aiAccountantViewState.selectedTenantIdsForJobTrigger;
|
|
13
|
+
const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
|
|
14
|
+
const url = `${base}/ai-accountant/jobs`;
|
|
15
|
+
const params = operationType === 'offboard'
|
|
16
|
+
? {}
|
|
17
|
+
: { start_date: startDate, end_date: endDate };
|
|
18
|
+
return zeniAPI
|
|
19
|
+
.postAndGetJSON(url, {
|
|
20
|
+
tenant_ids: selectedTenantIds,
|
|
21
|
+
operation_type: operationType,
|
|
22
|
+
params,
|
|
23
|
+
})
|
|
24
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
25
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
26
|
+
return (0, rxjs_1.from)([
|
|
27
|
+
(0, aiAccountantViewReducer_1.triggerAiAccountantJobSuccess)(),
|
|
28
|
+
(0, aiAccountantViewReducer_1.fetchAiAccountantCustomers)(),
|
|
29
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
30
|
+
messageSection: 'common',
|
|
31
|
+
messageText: 'success',
|
|
32
|
+
type: 'success',
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return (0, rxjs_1.from)([
|
|
38
|
+
(0, aiAccountantViewReducer_1.triggerAiAccountantJobFailure)(response.status),
|
|
39
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
40
|
+
messageSection: 'common',
|
|
41
|
+
messageText: 'failed',
|
|
42
|
+
type: 'error',
|
|
43
|
+
}),
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
47
|
+
(0, aiAccountantViewReducer_1.triggerAiAccountantJobFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant trigger job failed: ' +
|
|
48
|
+
JSON.stringify(error))),
|
|
49
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
50
|
+
messageSection: 'common',
|
|
51
|
+
messageText: 'failed',
|
|
52
|
+
type: 'error',
|
|
53
|
+
}),
|
|
54
|
+
])));
|
|
55
|
+
}));
|
|
56
|
+
exports.triggerAiAccountantJobEpic = triggerAiAccountantJobEpic;
|
|
@@ -16,7 +16,7 @@ const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pip
|
|
|
16
16
|
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
17
17
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
18
|
return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSuggestedQuestionsSuccess)({
|
|
19
|
-
pageContext
|
|
19
|
+
pageContext,
|
|
20
20
|
generatedAt: response.data.generated_at,
|
|
21
21
|
suggestedQuestions: response.data.suggested_questions,
|
|
22
22
|
}));
|
|
@@ -5,7 +5,7 @@ import { ZeniDate } from '../../zeniDayJS';
|
|
|
5
5
|
import { AuditSummary } from '../reviewCompanyView/reviewCompanyViewState';
|
|
6
6
|
export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "transactions" | "reports";
|
|
7
7
|
export type AuditRuleEntityType = ReturnType<typeof toAuditRuleEntityType>;
|
|
8
|
-
declare const toAuditRuleEntityIdType: (v: string) => "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "uncategorized-expense" | "uncategorized-income";
|
|
8
|
+
declare const toAuditRuleEntityIdType: (v: string) => "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_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" | "uncategorized-expense" | "uncategorized-income";
|
|
9
9
|
export type AuditRuleEntityIdType = ReturnType<typeof toAuditRuleEntityIdType>;
|
|
10
10
|
export declare const toAuditRuleTypeIdType: (v: string) => "accounting" | "business";
|
|
11
11
|
type AuditRuleTypeIdType = ReturnType<typeof toAuditRuleTypeIdType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getBillPayCardReport: (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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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_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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getCardBalance: (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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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_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;
|
|
@@ -19,6 +19,7 @@ export declare const getCardBalance: (state: RootState) => {
|
|
|
19
19
|
qboId: string | undefined;
|
|
20
20
|
coaId: string | undefined;
|
|
21
21
|
classesViewParentId: import("../../commonStateTypes/classesView/nestedClassID").ClassesViewParentID | undefined;
|
|
22
|
+
projectsViewParentId: import("../../commonStateTypes/projectView/projectViewParentID").ProjectsViewParentID | undefined;
|
|
22
23
|
accountsViewParentId: import("../../commonStateTypes/accountView/nestedAccountID").AccountsViewParentID | undefined;
|
|
23
24
|
labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses")[];
|
|
24
25
|
isBillEditableCoaAccountType: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getCashBalance: (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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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_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;
|
|
@@ -19,6 +19,7 @@ export declare const getCashBalance: (state: RootState) => {
|
|
|
19
19
|
qboId: string | undefined;
|
|
20
20
|
coaId: string | undefined;
|
|
21
21
|
classesViewParentId: import("../../commonStateTypes/classesView/nestedClassID").ClassesViewParentID | undefined;
|
|
22
|
+
projectsViewParentId: import("../../commonStateTypes/projectView/projectViewParentID").ProjectsViewParentID | undefined;
|
|
22
23
|
accountsViewParentId: import("../../commonStateTypes/accountView/nestedAccountID").AccountsViewParentID | undefined;
|
|
23
24
|
labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses")[];
|
|
24
25
|
isBillEditableCoaAccountType: boolean;
|
|
@@ -15,7 +15,7 @@ export declare const getCashInCashOut: (accountState: AccountState, accountGroup
|
|
|
15
15
|
firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
16
16
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
17
17
|
availableNumberOfPeriods: number | undefined;
|
|
18
|
-
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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
|
|
18
|
+
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_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";
|
|
19
19
|
reportTitle: string;
|
|
20
20
|
version: string | number | undefined;
|
|
21
21
|
status: import("../..").Status | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const getCashPosition: (accountState: AccountState, cashPositionS
|
|
|
12
12
|
firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
13
13
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
14
14
|
availableNumberOfPeriods: number | undefined;
|
|
15
|
-
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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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";
|
|
15
|
+
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_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";
|
|
16
16
|
reportTitle: string;
|
|
17
17
|
version: string | number | undefined;
|
|
18
18
|
status: import("../..").Status | undefined;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
2
2
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
3
|
+
import { AiAccountantFilterCategoryField } from '../../aiAccountantView/aiAccountantViewState';
|
|
3
4
|
import { SubscriptionViewSortKey } from '../../subscriptionView/types/subscriptionTypes';
|
|
4
5
|
import { FilterCategoryValueType } from '../helpers/cockpitHelpers';
|
|
5
6
|
import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
6
|
-
export declare const toPortfolioSortKeyType: (v: string) => "
|
|
7
|
-
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "
|
|
8
|
-
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "
|
|
9
|
-
export declare const toHealthSortKeyType: (v: string) => "
|
|
7
|
+
export declare const toPortfolioSortKeyType: (v: string) => "companyName" | "expenses" | "runway" | "cashBalance" | "revenues" | "netIncome";
|
|
8
|
+
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "companyName" | "group" | "controller" | "plans" | "monthlyRecurringRevenue" | "notes" | "taxStatus" | "preparer" | "reviewer" | "annualRecurringRevenue" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
9
|
+
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "enroller" | "invite" | "latestCreated";
|
|
10
|
+
export declare const toHealthSortKeyType: (v: string) => "companyName" | "group" | "controller" | "monthlyRecurringRevenue" | "runway" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "customerSuccessManager" | "issues" | "productVerticals" | "churnProbability" | "lastReportSent" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
11
|
export declare const toTaskManagerSortKeyType: (v: string) => "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName";
|
|
11
12
|
export type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
13
|
export type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
|
@@ -21,7 +22,7 @@ export interface CockpitFilterCategory {
|
|
|
21
22
|
matchingOperator: 'equal' | 'not-equal';
|
|
22
23
|
values: FilterCategoryValueType[];
|
|
23
24
|
valuesCombinationOperator: 'ANY' | 'ALL';
|
|
24
|
-
field?: ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
|
|
25
|
+
field?: AiAccountantFilterCategoryField | ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
|
|
25
26
|
}
|
|
26
27
|
export interface CockpitFilters {
|
|
27
28
|
categories?: CockpitFilterCategory[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DashboardState } from './dashboardState';
|
|
2
2
|
export declare const initialState: DashboardState;
|
|
3
|
-
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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], {
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("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_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], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
tenantId: string;
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
|
-
excludeResources: ("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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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")[];
|
|
9
|
+
excludeResources: ("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_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")[];
|
|
10
10
|
}, "dashboard/fetchDashboard", never, never>, updateTreasuryVideoClosed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/updateTreasuryVideoClosed">, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLoca
|
|
|
38
38
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
39
39
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
40
40
|
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update";
|
|
41
|
-
messageText: "notification" | "
|
|
41
|
+
messageText: "notification" | "failed" | "success";
|
|
42
42
|
type: "error" | "success" | "info";
|
|
43
43
|
variables: {
|
|
44
44
|
variableName: string;
|
|
@@ -31,6 +31,14 @@ interface ExclusionInfoPayload {
|
|
|
31
31
|
export interface ExcludedAccountPayload extends AccountAndPaymentAccountPayload {
|
|
32
32
|
exclusion_info: ExclusionInfoPayload;
|
|
33
33
|
}
|
|
34
|
+
interface ExclusionInfoPayload {
|
|
35
|
+
bank_balance: number | null;
|
|
36
|
+
cleared_balance: number | null;
|
|
37
|
+
variance: number | null;
|
|
38
|
+
}
|
|
39
|
+
export interface ExcludedAccountPayload extends AccountAndPaymentAccountPayload {
|
|
40
|
+
exclusion_info: ExclusionInfoPayload;
|
|
41
|
+
}
|
|
34
42
|
export interface ReconciliationPayload {
|
|
35
43
|
accounts: AccountAndPaymentAccountPayload[];
|
|
36
44
|
files: FilePayload[];
|
|
@@ -17,7 +17,7 @@ export interface MissingReceiptsViewUIState {
|
|
|
17
17
|
* Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
|
|
18
18
|
*/
|
|
19
19
|
export declare const MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
|
|
20
|
-
export declare const toBatchStatusValue: (v: string) => "pending" | "
|
|
20
|
+
export declare const toBatchStatusValue: (v: string) => "pending" | "completed" | "processing";
|
|
21
21
|
export type BatchStatusValue = ReturnType<typeof toBatchStatusValue>;
|
|
22
22
|
/** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
|
|
23
23
|
export declare const BATCH_FILE_STATUSES: readonly ["exact_match", "possible_matches", "no_match", "failed"];
|
|
@@ -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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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<{
|
|
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_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;
|
|
@@ -10,6 +10,7 @@ import { CashFlowReport } from '../cashFlow/cashFlowSelectorTypes';
|
|
|
10
10
|
import { ProfitAndLossReport } from '../profitAndLoss/profitAndLossSelector';
|
|
11
11
|
import { ProfitAndLossByClassHorizontalReport } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
|
|
12
12
|
import { ProfitAndLossClassesViewReport } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
|
|
13
|
+
import { ProfitAndLossProjectViewReport } from '../profitAndLossProjectView/profitAndLossProjectViewSelectorTypes';
|
|
13
14
|
export interface FinanceStatementReport extends SelectorReport {
|
|
14
15
|
allTimeframeTicks: TimeframeTickWithMetaData[];
|
|
15
16
|
balanceSheetReport: BalanceSheetReport;
|
|
@@ -21,6 +22,7 @@ export interface FinanceStatementReport extends SelectorReport {
|
|
|
21
22
|
isCompareModeOn: boolean;
|
|
22
23
|
profitAndLossByClassHorizontalReport: ProfitAndLossByClassHorizontalReport;
|
|
23
24
|
profitAndLossByClassReport: ProfitAndLossClassesViewReport;
|
|
25
|
+
profitAndLossByProjectReport: ProfitAndLossProjectViewReport;
|
|
24
26
|
profitAndLossReport: ProfitAndLossReport;
|
|
25
27
|
reportFormat: ReportFormat;
|
|
26
28
|
selectedReportAndTimeframeFetchState: FetchStateAndError;
|
|
@@ -12,8 +12,10 @@ const thisPeriodHelpers_1 = require("../../commonStateTypes/viewAndReport/thisPe
|
|
|
12
12
|
const balanceSheetSelector_1 = require("../balanceSheet/balanceSheetSelector");
|
|
13
13
|
const cashFlowSelector_1 = require("../cashFlow/cashFlowSelector");
|
|
14
14
|
const profitAndLossSelector_1 = require("../profitAndLoss/profitAndLossSelector");
|
|
15
|
+
const coaBalancesFilterProjectView_1 = require("../../commonStateTypes/coaBalance/coaBalancesFilterProjectView");
|
|
15
16
|
const profitAndLossClassesByClassHorizontalSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector");
|
|
16
17
|
const profitAndLossClassesViewSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelector");
|
|
18
|
+
const profitAndLossProjectViewSelector_1 = require("../profitAndLossProjectView/profitAndLossProjectViewSelector");
|
|
17
19
|
function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
|
|
18
20
|
const datesSorted = [
|
|
19
21
|
profitAndLossState.dataAvailable?.startDate,
|
|
@@ -38,7 +40,7 @@ function getFirstMonthOfFY(profitAndLossState, balanceSheetState, cashFlowState)
|
|
|
38
40
|
cashFlowState.firstMonthOfFY ??
|
|
39
41
|
1);
|
|
40
42
|
}
|
|
41
|
-
exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.accountGroupState, (state) => state.classState, (state) => state.sectionClassesViewStateV2, (state) => state.profitAndLossState, (state) => state.profitAndLossClassesViewState, (state) => state.balanceSheetState, (state) => state.cashFlowState, (state) => state.financeStatementState, (state) => state.sectionAccountsViewState, (state) => state.forecastState, (accountState, accountGroupState, classState, sectionsState, profitAndLossState, profitAndLossClassesViewState, balanceSheetState, cashFlowState, financeStatementState, sectionAccountsViewState, forecastState) => {
|
|
43
|
+
exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.accountGroupState, (state) => state.classState, (state) => state.sectionClassesViewStateV2, (state) => state.profitAndLossState, (state) => state.profitAndLossClassesViewState, (state) => state.projectState, (state) => state.sectionProjectViewState, (state) => state.profitAndLossProjectViewState, (state) => state.balanceSheetState, (state) => state.cashFlowState, (state) => state.financeStatementState, (state) => state.sectionAccountsViewState, (state) => state.forecastState, (accountState, accountGroupState, classState, sectionsState, profitAndLossState, profitAndLossClassesViewState, projectState, sectionProjectViewState, profitAndLossProjectViewState, balanceSheetState, cashFlowState, financeStatementState, sectionAccountsViewState, forecastState) => {
|
|
42
44
|
// to get min and max dates across three reports
|
|
43
45
|
let allTimeframeTicks = [];
|
|
44
46
|
let balancesInTimeframe = [];
|
|
@@ -72,6 +74,8 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
72
74
|
const profitAndLossReport = (0, profitAndLossSelector_1.getProfitAndLossReport)(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
|
|
73
75
|
const classFilter = (0, coaBalancesFilterClassesView_1.newBalancesFilterClassesView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
|
|
74
76
|
const profitAndLossByClassReport = (0, profitAndLossClassesViewSelector_1.getProfitAndLossClassesView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
|
|
77
|
+
const projectFilter = (0, coaBalancesFilterProjectView_1.newBalancesFilterProjectView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossProjectViewState.uiState.projectsToFilterOut);
|
|
78
|
+
const profitAndLossByProjectReport = (0, profitAndLossProjectViewSelector_1.getProfitAndLossProjectView)(projectFilter, accountState, projectState, sectionProjectViewState, profitAndLossProjectViewState);
|
|
75
79
|
const profitAndLossByClassHorizontalReport = (0, profitAndLossClassesByClassHorizontalSelector_1.getProfitAndLossClassesHorizontalView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
|
|
76
80
|
? thisPeriod
|
|
77
81
|
: undefined);
|
|
@@ -92,6 +96,12 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
92
96
|
error: profitAndLossReport.error,
|
|
93
97
|
};
|
|
94
98
|
break;
|
|
99
|
+
case 'profit_and_loss_by_projects':
|
|
100
|
+
selectedReportAndTimeframeFetchState = {
|
|
101
|
+
fetchState: profitAndLossByProjectReport.fetchState,
|
|
102
|
+
error: profitAndLossByProjectReport.error,
|
|
103
|
+
};
|
|
104
|
+
break;
|
|
95
105
|
case 'balance_sheet':
|
|
96
106
|
selectedReportAndTimeframeFetchState = {
|
|
97
107
|
fetchState: balanceSheetReport.fetchState,
|
|
@@ -122,6 +132,7 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
122
132
|
dataAvailable,
|
|
123
133
|
profitAndLossReport,
|
|
124
134
|
profitAndLossByClassReport,
|
|
135
|
+
profitAndLossByProjectReport,
|
|
125
136
|
profitAndLossByClassHorizontalReport,
|
|
126
137
|
balanceSheetReport,
|
|
127
138
|
cashFlowReport,
|
|
@@ -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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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], {
|
|
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_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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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;
|
|
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_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<{
|
|
@@ -3,7 +3,7 @@ import { CompanyWithSchema } from '../../../../entity/company/companySelector';
|
|
|
3
3
|
import { OnboardingCustomerInfo } from '../../../../entity/onboardingCustomer/onboardingCustomerState';
|
|
4
4
|
import { Tenant } from '../../../../entity/tenant/tenantState';
|
|
5
5
|
import { CompanyDetailsLocalData, PrimaryContactLocalData } from '../../../spendManagement/commonSetup/setupViewState';
|
|
6
|
-
declare const toProductGroupType: (v: string) => "
|
|
6
|
+
declare const toProductGroupType: (v: string) => "other" | "bookkeeping" | "banking" | "spend_management" | "cards";
|
|
7
7
|
export type ProductGroupType = ReturnType<typeof toProductGroupType>;
|
|
8
8
|
export declare const toProductType: (v: string) => "zeni_treasury" | "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" | "zeni_payroll" | "zeni_cfo" | "zeni_tax";
|
|
9
9
|
export declare const toProductTypeStrict: (v: string) => "zeni_treasury" | "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" | "zeni_payroll" | "zeni_cfo" | "zeni_tax" | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateProjects } from '../../entity/project/projectReducer';
|
|
4
|
+
import { updateSectionProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
|
|
5
|
+
import { RootState } from '../../reducer';
|
|
6
|
+
import { ZeniAPI } from '../../zeniAPI';
|
|
7
|
+
import { fetchProfitAndLossForTimeframeProjectView, updateProfitAndLossForTimeframeProjectView, updateProfitAndLossForTimeframeProjectViewFailure } from './profitAndLossProjectViewReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof fetchProfitAndLossForTimeframeProjectView> | ReturnType<typeof updateProfitAndLossForTimeframeProjectView> | ReturnType<typeof updateProfitAndLossForTimeframeProjectViewFailure> | ReturnType<typeof updateProjects> | ReturnType<typeof updateSectionProjectView>;
|
|
9
|
+
export declare const fetchProfitAndLossForTimeframeProjectViewEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchProfitAndLossForTimeframeProjectViewEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const projectReducer_1 = require("../../entity/project/projectReducer");
|
|
7
|
+
const sectionProjectViewReducer_1 = require("../../entity/sectionProjectView/sectionProjectViewReducer");
|
|
8
|
+
const responsePayload_1 = require("../../responsePayload");
|
|
9
|
+
const profitAndLossProjectViewReducer_1 = require("./profitAndLossProjectViewReducer");
|
|
10
|
+
const fetchProfitAndLossForTimeframeProjectViewEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
+
const getTimeSeriesGroup = (timeframe) => {
|
|
12
|
+
switch (timeframe) {
|
|
13
|
+
case 'month':
|
|
14
|
+
return 'months';
|
|
15
|
+
case 'quarter':
|
|
16
|
+
return 'quarters';
|
|
17
|
+
case 'year':
|
|
18
|
+
return 'years';
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const queryValue = {
|
|
22
|
+
is_full_response: action.payload.fetchFullReport,
|
|
23
|
+
time_series_groups: [getTimeSeriesGroup(action.payload.timeframe)],
|
|
24
|
+
is_group_by_project: true,
|
|
25
|
+
};
|
|
26
|
+
return zeniAPI
|
|
27
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/2.0/reports/profit_and_loss?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
|
|
28
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
29
|
+
if (response.data != null && (0, responsePayload_1.isSuccessResponse)(response)) {
|
|
30
|
+
const actions = [];
|
|
31
|
+
const report = response.data.report;
|
|
32
|
+
const currency = report.currency;
|
|
33
|
+
actions.push((0, projectReducer_1.updateProjects)(report.projects));
|
|
34
|
+
actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'cogs', 'profit_and_loss_by_projects', report.cogs, report.accounts, currency));
|
|
35
|
+
actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'expenses', 'profit_and_loss_by_projects', report.expenses, report.accounts, currency));
|
|
36
|
+
actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'income', 'profit_and_loss_by_projects', report.income, report.accounts, currency));
|
|
37
|
+
actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_projects', report.other_expenses, report.accounts, currency));
|
|
38
|
+
actions.push((0, sectionProjectViewReducer_1.updateSectionProjectView)(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_projects', report.other_income, report.accounts, currency));
|
|
39
|
+
actions.push((0, profitAndLossProjectViewReducer_1.updateProfitAndLossForTimeframeProjectView)({
|
|
40
|
+
timeframe: action.payload.timeframe,
|
|
41
|
+
report: response.data,
|
|
42
|
+
}));
|
|
43
|
+
return (0, rxjs_1.from)(actions);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return (0, rxjs_1.of)((0, profitAndLossProjectViewReducer_1.updateProfitAndLossForTimeframeProjectViewFailure)(response.status, action.payload.timeframe));
|
|
47
|
+
}
|
|
48
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, profitAndLossProjectViewReducer_1.updateProfitAndLossForTimeframeProjectViewFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'P&L by Projects REST API call errored out' +
|
|
49
|
+
JSON.stringify(error)), action.payload.timeframe))));
|
|
50
|
+
}));
|
|
51
|
+
exports.fetchProfitAndLossForTimeframeProjectViewEpic = fetchProfitAndLossForTimeframeProjectViewEpic;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../reducer';
|
|
4
|
+
import { fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView } from './profitAndLossProjectViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof fetchProfitAndLossProjectView> | ReturnType<typeof fetchProfitAndLossForTimeframeProjectView>;
|
|
6
|
+
export declare const fetchProfitAndLossProjectViewEpic: (actions$: ActionsObservable<ActionType>, state: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchProfitAndLossProjectViewEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const profitAndLossProjectViewReducer_1 = require("./profitAndLossProjectViewReducer");
|
|
7
|
+
const fetchProfitAndLossProjectViewEpic = (actions$, state) => actions$.pipe((0, operators_1.filter)(profitAndLossProjectViewReducer_1.fetchProfitAndLossProjectView.match), (0, operators_1.switchMap)((action) => {
|
|
8
|
+
const { cacheOverride } = action.payload;
|
|
9
|
+
if (cacheOverride === true) {
|
|
10
|
+
return (0, rxjs_1.from)([
|
|
11
|
+
(0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('month'),
|
|
12
|
+
(0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('quarter'),
|
|
13
|
+
(0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('year'),
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const fetchActions = [];
|
|
18
|
+
const projectFetchState = state.value.profitAndLossProjectViewState.fetchState;
|
|
19
|
+
if (projectFetchState['month'].fetchState !== 'In-Progress' &&
|
|
20
|
+
projectFetchState['month'].fetchState !== 'Completed') {
|
|
21
|
+
fetchActions.push((0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('month'));
|
|
22
|
+
}
|
|
23
|
+
if (projectFetchState['quarter'].fetchState !== 'In-Progress' &&
|
|
24
|
+
projectFetchState['quarter'].fetchState !== 'Completed') {
|
|
25
|
+
fetchActions.push((0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('quarter'));
|
|
26
|
+
}
|
|
27
|
+
if (projectFetchState['year'].fetchState !== 'In-Progress' &&
|
|
28
|
+
projectFetchState['year'].fetchState !== 'Completed') {
|
|
29
|
+
fetchActions.push((0, profitAndLossProjectViewReducer_1.fetchProfitAndLossForTimeframeProjectView)('year'));
|
|
30
|
+
}
|
|
31
|
+
return (0, rxjs_1.from)(fetchActions);
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
exports.fetchProfitAndLossProjectViewEpic = fetchProfitAndLossProjectViewEpic;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AccountCOABalanceGroupedPayloadByAccountId } from '../../commonPayloadTypes/subAccountView/reportBySubAccountPayload';
|
|
2
|
+
import { COABalanceGroupedPayloadV2 } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
3
|
+
import { ReportPayloadV2 } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
4
|
+
import { AccountMetadataPayload } from '../../entity/account/accountPayload';
|
|
5
|
+
import { ProjectMetadataPayload } from '../../entity/project/projectPayload';
|
|
6
|
+
import { ZeniReportResponse } from '../../responsePayload';
|
|
7
|
+
export interface ReportByProjectMetadataPayloadV2 extends ReportPayloadV2 {
|
|
8
|
+
accounts: AccountMetadataPayload[];
|
|
9
|
+
projects: ProjectMetadataPayload[];
|
|
10
|
+
}
|
|
11
|
+
export interface ProjectCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
|
|
12
|
+
accounts: AccountCOABalanceGroupedPayloadByAccountId;
|
|
13
|
+
}
|
|
14
|
+
interface ProjectCOABalanceGroupedPayloadByProjectIdV2 {
|
|
15
|
+
[project_Id: string]: ProjectCOABalanceGroupedPayloadV2;
|
|
16
|
+
}
|
|
17
|
+
export interface SectionByProjectCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
|
|
18
|
+
projects: ProjectCOABalanceGroupedPayloadByProjectIdV2;
|
|
19
|
+
}
|
|
20
|
+
export interface ProfitAndLossProjectViewPayload extends ReportByProjectMetadataPayloadV2 {
|
|
21
|
+
cogs: SectionByProjectCOABalanceGroupedPayloadV2;
|
|
22
|
+
earnings_before_interest_and_tax: COABalanceGroupedPayloadV2;
|
|
23
|
+
expenses: SectionByProjectCOABalanceGroupedPayloadV2;
|
|
24
|
+
gross_profit: COABalanceGroupedPayloadV2;
|
|
25
|
+
income: SectionByProjectCOABalanceGroupedPayloadV2;
|
|
26
|
+
net_income: COABalanceGroupedPayloadV2;
|
|
27
|
+
net_operating_income: COABalanceGroupedPayloadV2;
|
|
28
|
+
net_other_income: COABalanceGroupedPayloadV2;
|
|
29
|
+
other_expenses: SectionByProjectCOABalanceGroupedPayloadV2;
|
|
30
|
+
other_income: SectionByProjectCOABalanceGroupedPayloadV2;
|
|
31
|
+
}
|
|
32
|
+
export type ProfitAndLossReportProjectViewResponse = ZeniReportResponse<ProfitAndLossProjectViewPayload>;
|
|
33
|
+
export {};
|