@zeniai/client-epic-state 4.20.2 → 4.20.3-beta10ND
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/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +3 -0
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +5 -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/scheduleTransactionPayload.d.ts +4 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +17 -1
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +5 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +8 -1
- package/lib/epic.js +8 -1
- package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
- package/lib/esm/commonStateTypes/animations.js +3 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
- package/lib/esm/entity/snackbar/snackbarTypes.js +5 -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/scheduleTransactionPayload.js +1 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +17 -1
- package/lib/esm/epic.js +8 -1
- package/lib/esm/index.js +10 -7
- package/lib/esm/reducer.js +3 -0
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
- package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +4 -3
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +17 -1
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +12 -4
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +22 -9
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +12 -6
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +18 -1
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +18 -1
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +17 -14
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +99 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
- package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/lib/index.d.ts +19 -12
- package/lib/index.js +54 -32
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
- package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +8 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +4 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +18 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +12 -4
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +22 -9
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +11 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +5 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +20 -0
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +2 -0
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +19 -2
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +17 -14
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +105 -0
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
- package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical union of `page_context` values for GET …/suggested-questions (and related Redux
|
|
3
|
+
* `suggestedQuestionsByPageContext` on `AiCfoViewState`).
|
|
4
|
+
*
|
|
5
|
+
* ## Report IDs vs `page_context`
|
|
6
|
+
*
|
|
7
|
+
* **These strings are not all finance `report_id` values.** They are the **API’s** `page_context`
|
|
8
|
+
* slugs. Only the **reports tab** subset is *derived* from `ReportID` (e.g. `profit_and_loss` →
|
|
9
|
+
* `profit_loss`). That mapping lives in the web app:
|
|
10
|
+
* `zeni-web-app-ui/src/aiCfo/aiCfoSuggestedQuestionsPageContext.ts`
|
|
11
|
+
* (`reportIdToAiCfoSuggestedQuestionsPageContext`).
|
|
12
|
+
*
|
|
13
|
+
* Other members (e.g. `dashboard`, `bills_list`, `task_checklist`) come from **product routes /
|
|
14
|
+
* screens**, not from report IDs. Adding a new host screen usually means extending this union and
|
|
15
|
+
* wiring route resolution in the UI; coordinate with the backend for suggested-questions support.
|
|
16
|
+
*
|
|
17
|
+
* @see README.md in this directory for maintenance expectations.
|
|
18
|
+
*/
|
|
19
|
+
export type AiCfoSuggestedQuestionsPageContext = 'balance_sheet' | 'profit_loss' | 'vendors' | 'transactions' | 'cash_flow' | 'accounts_receivable' | 'accounts_payable' | 'transaction_details' | 'dashboard' | 'cash_balance' | 'card_balance' | 'command_centre' | 'je_schedules' | 'reconciliation' | 'flux_analysis' | 'receipts' | 'mei' | 'task_checklist' | 'performance' | 'bills_list' | 'bills_details' | 'reimbursement_list' | 'reimbursement_details' | 'vendors_summary' | 'opex_by_vendor' | 'prepaid_expenses' | 'fixed_assets' | 'form_1099' | 'accrued_expenses' | 'forecast' | 'checking' | 'checking_details' | 'treasury' | 'cards' | 'cards_detail' | 'people' | 'rewards' | 'notifications';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const toAnimationsFileName: (v: string) => "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "ReceiptDark" | "ReceiptLight" | "ReimburseDark" | "ReimburseLight" | "RewardsDark" | "RewardsDarkHover" | "RewardsLight" | "RewardsLightHover" | "Secure" | "
|
|
1
|
+
export declare const toAnimationsFileName: (v: string) => "Success" | "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "Distribution" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "ReceiptDark" | "ReceiptLight" | "Recurring" | "ReimburseDark" | "ReimburseLight" | "RewardsDark" | "RewardsDarkHover" | "RewardsLight" | "RewardsLightHover" | "Secure" | "Target" | "UnlockCard" | "VeryHappy" | "ZeniAssist";
|
|
2
2
|
export type AnimationFileName = ReturnType<typeof toAnimationsFileName>;
|
|
@@ -27,6 +27,7 @@ const ALL_ANIMATIONS_FILE_NAMES = [
|
|
|
27
27
|
'DashboardSidebarTopHalloween',
|
|
28
28
|
'DashboardSidebarTopNewYear',
|
|
29
29
|
'DashboardSidebarTopThanksgiving',
|
|
30
|
+
'Distribution',
|
|
30
31
|
'EarnYield',
|
|
31
32
|
'FastestWayDark',
|
|
32
33
|
'FastestWayLight',
|
|
@@ -42,6 +43,7 @@ const ALL_ANIMATIONS_FILE_NAMES = [
|
|
|
42
43
|
'Protection',
|
|
43
44
|
'ReceiptDark',
|
|
44
45
|
'ReceiptLight',
|
|
46
|
+
'Recurring',
|
|
45
47
|
'ReimburseDark',
|
|
46
48
|
'ReimburseLight',
|
|
47
49
|
'RewardsDark',
|
|
@@ -50,6 +52,7 @@ const ALL_ANIMATIONS_FILE_NAMES = [
|
|
|
50
52
|
'RewardsLightHover',
|
|
51
53
|
'Secure',
|
|
52
54
|
'Success',
|
|
55
|
+
'Target',
|
|
53
56
|
'UnlockCard',
|
|
54
57
|
'VeryHappy',
|
|
55
58
|
'ZeniAssist',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { AiCfoQuestionWithAnswer, AiCfoState } from './aiCfoState';
|
|
3
|
-
import { ChatSession } from './aiCfoState';
|
|
2
|
+
import { AiCfoQuestionWithAnswer, AiCfoState, ChatSession } from './aiCfoState';
|
|
4
3
|
export declare function getAllQuestionAnswersForChatSession(state: AiCfoState, chatSessionId: ID): AiCfoQuestionWithAnswer[];
|
|
5
4
|
export declare function getQuestionAnswerByIdForChatSession(state: AiCfoState, chatSessionId: ID, questionAnswerId: ID): AiCfoQuestionWithAnswer | undefined;
|
|
6
5
|
export declare function getAllQuestionsForChatSession(state: AiCfoState, chatSessionId: ID): string[];
|
|
@@ -7,8 +7,6 @@ import { VendorTransaction } from '../../transaction/stateTypes/vendorTransactio
|
|
|
7
7
|
export interface BillTransaction extends VendorTransaction {
|
|
8
8
|
billPayInfo: BillPayInfo;
|
|
9
9
|
candidateVendorName: string;
|
|
10
|
-
classId: ID;
|
|
11
|
-
className: string;
|
|
12
10
|
createdBy: ID;
|
|
13
11
|
deletionInfo: DeletionInfo;
|
|
14
12
|
entityApprovalId: ID;
|
|
@@ -21,6 +19,8 @@ export interface BillTransaction extends VendorTransaction {
|
|
|
21
19
|
updateTime: ZeniDate;
|
|
22
20
|
bookCloseDate?: ZeniDate;
|
|
23
21
|
bulkProcessingDetail?: BulkProcessingDetail;
|
|
22
|
+
classId?: ID;
|
|
23
|
+
className?: string;
|
|
24
24
|
lastUpdatedByUserId?: ID;
|
|
25
25
|
recurringBillConfigId?: ID;
|
|
26
26
|
recurringBillInstance?: number;
|
|
@@ -13,6 +13,41 @@ export interface JEScheduleOtherAttributesPayload {
|
|
|
13
13
|
asset_id?: string | null;
|
|
14
14
|
starting_balance?: number | null;
|
|
15
15
|
}
|
|
16
|
+
export interface JEScheduleAISummaryFieldPayload {
|
|
17
|
+
confidence: number;
|
|
18
|
+
reasoning: string;
|
|
19
|
+
predicted_value?: number | string;
|
|
20
|
+
}
|
|
21
|
+
export interface JEScheduleAISummariesPayload {
|
|
22
|
+
credit_account?: JEScheduleAISummaryFieldPayload;
|
|
23
|
+
credit_accounting_class?: JEScheduleAISummaryFieldPayload;
|
|
24
|
+
debit_account?: JEScheduleAISummaryFieldPayload;
|
|
25
|
+
debit_accounting_class?: JEScheduleAISummaryFieldPayload;
|
|
26
|
+
period?: JEScheduleAISummaryFieldPayload;
|
|
27
|
+
posting_date?: JEScheduleAISummaryFieldPayload;
|
|
28
|
+
schedule_type?: JEScheduleAISummaryFieldPayload;
|
|
29
|
+
}
|
|
30
|
+
export interface JEScheduleRecommendationsPayload {
|
|
31
|
+
credit_account_confidence?: number;
|
|
32
|
+
credit_class_confidence?: number;
|
|
33
|
+
debit_account_confidence?: number;
|
|
34
|
+
debit_class_confidence?: number;
|
|
35
|
+
end_date?: string | null;
|
|
36
|
+
je_credit_account_id?: string | null;
|
|
37
|
+
je_credit_accounting_class_id?: string | null;
|
|
38
|
+
je_debit_account_id?: string | null;
|
|
39
|
+
je_debit_accounting_class_id?: string | null;
|
|
40
|
+
je_schedule_type?: string | null;
|
|
41
|
+
je_schedule_type_confidence?: number;
|
|
42
|
+
period?: number | null;
|
|
43
|
+
period_confidence?: number;
|
|
44
|
+
posting_date?: string | null;
|
|
45
|
+
posting_date_confidence?: number;
|
|
46
|
+
similar_transactions?: unknown[];
|
|
47
|
+
start_date?: string | null;
|
|
48
|
+
starting_month?: string | null;
|
|
49
|
+
starting_month_confidence?: number;
|
|
50
|
+
}
|
|
16
51
|
export interface JEScheduledTransactionPayload {
|
|
17
52
|
balance: number | null;
|
|
18
53
|
base_transaction: ScheduleTransactionPayload;
|
|
@@ -35,7 +70,10 @@ export interface JEScheduledTransactionPayload {
|
|
|
35
70
|
status: StatusCodeWithLabelPayload;
|
|
36
71
|
updated_by: UserPayload;
|
|
37
72
|
vendor: VendorPayload;
|
|
73
|
+
ai_summaries?: JEScheduleAISummariesPayload;
|
|
74
|
+
created_by?: UserPayload;
|
|
38
75
|
end_date?: string | null;
|
|
76
|
+
recommendations?: JEScheduleRecommendationsPayload;
|
|
39
77
|
updated_at?: string | null;
|
|
40
78
|
}
|
|
41
79
|
export interface JEAccruedScheduledTransactionPayload extends Omit<JEScheduledTransactionPayload, 'base_transaction' | 'je_schedule_id' | 'je_schedule_type'> {
|
|
@@ -146,6 +146,81 @@ function toJEScheduleOtherAttributes(payload) {
|
|
|
146
146
|
assetId: payload.asset_id ?? undefined,
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
+
function toJEScheduleAISummaries(payload) {
|
|
150
|
+
if (payload == null) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
const result = {};
|
|
154
|
+
if (payload.debit_account != null) {
|
|
155
|
+
result.debitAccount = {
|
|
156
|
+
confidence: payload.debit_account.confidence,
|
|
157
|
+
reasoning: payload.debit_account.reasoning,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (payload.credit_account != null) {
|
|
161
|
+
result.creditAccount = {
|
|
162
|
+
confidence: payload.credit_account.confidence,
|
|
163
|
+
reasoning: payload.credit_account.reasoning,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
if (payload.debit_accounting_class != null) {
|
|
167
|
+
result.debitClass = {
|
|
168
|
+
confidence: payload.debit_accounting_class.confidence,
|
|
169
|
+
reasoning: payload.debit_accounting_class.reasoning,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (payload.credit_accounting_class != null) {
|
|
173
|
+
result.creditClass = {
|
|
174
|
+
confidence: payload.credit_accounting_class.confidence,
|
|
175
|
+
reasoning: payload.credit_accounting_class.reasoning,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
if (payload.period != null) {
|
|
179
|
+
result.period = {
|
|
180
|
+
confidence: payload.period.confidence,
|
|
181
|
+
reasoning: payload.period.reasoning,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (payload.posting_date != null) {
|
|
185
|
+
result.postingDate = {
|
|
186
|
+
confidence: payload.posting_date.confidence,
|
|
187
|
+
reasoning: payload.posting_date.reasoning,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (payload.schedule_type != null) {
|
|
191
|
+
result.scheduleType = {
|
|
192
|
+
confidence: payload.schedule_type.confidence,
|
|
193
|
+
reasoning: payload.schedule_type.reasoning,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
197
|
+
}
|
|
198
|
+
function toJEScheduleRecommendations(payload) {
|
|
199
|
+
if (payload == null) {
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
creditAccountConfidence: payload.credit_account_confidence,
|
|
204
|
+
creditClassConfidence: payload.credit_class_confidence,
|
|
205
|
+
debitAccountConfidence: payload.debit_account_confidence,
|
|
206
|
+
debitClassConfidence: payload.debit_class_confidence,
|
|
207
|
+
endDate: payload.end_date ?? undefined,
|
|
208
|
+
jeCreditAccountId: payload.je_credit_account_id ?? undefined,
|
|
209
|
+
jeCreditAccountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
210
|
+
jeDebitAccountId: payload.je_debit_account_id ?? undefined,
|
|
211
|
+
jeDebitAccountingClassId: payload.je_debit_accounting_class_id ?? undefined,
|
|
212
|
+
jeScheduleType: payload.je_schedule_type ?? undefined,
|
|
213
|
+
jeScheduleTypeConfidence: payload.je_schedule_type_confidence,
|
|
214
|
+
period: payload.period ?? undefined,
|
|
215
|
+
periodConfidence: payload.period_confidence,
|
|
216
|
+
postingDate: payload.posting_date ?? undefined,
|
|
217
|
+
postingDateConfidence: payload.posting_date_confidence,
|
|
218
|
+
similarTransactions: payload.similar_transactions,
|
|
219
|
+
startDate: payload.start_date ?? undefined,
|
|
220
|
+
startingMonth: payload.starting_month ?? undefined,
|
|
221
|
+
startingMonthConfidence: payload.starting_month_confidence,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
149
224
|
function toJEScheduledTransaction(payload) {
|
|
150
225
|
return {
|
|
151
226
|
jeScheduleId: payload.je_schedule_id ?? undefined,
|
|
@@ -190,6 +265,9 @@ function toJEScheduledTransaction(payload) {
|
|
|
190
265
|
? toJEScheduleOtherAttributes(payload.other_attributes)
|
|
191
266
|
: {},
|
|
192
267
|
scheduledJournalEntry: [],
|
|
268
|
+
aiSummaries: toJEScheduleAISummaries(payload.ai_summaries),
|
|
269
|
+
createdByUserID: payload.created_by?.user_id ?? undefined,
|
|
270
|
+
recommendations: toJEScheduleRecommendations(payload.recommendations),
|
|
193
271
|
};
|
|
194
272
|
}
|
|
195
273
|
function toJEAccruedScheduledTransaction(payload) {
|
|
@@ -9,7 +9,7 @@ import { ScheduleTransaction } from '../transaction/stateTypes/scheduleTransacti
|
|
|
9
9
|
import { TransactionID } from '../transaction/stateTypes/transaction';
|
|
10
10
|
import { User } from '../user/userState';
|
|
11
11
|
import { Vendor } from '../vendor/vendorState';
|
|
12
|
-
import { JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
|
|
12
|
+
import { JEScheduleAISummaries, JEScheduleOtherAttributes, JEScheduleRecommendations, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
|
|
13
13
|
import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleTypes } from './jeSchedulesTypes';
|
|
14
14
|
export interface ScheduledJournalEntry {
|
|
15
15
|
error: JournalEntryErrorCodeType[];
|
|
@@ -59,13 +59,16 @@ export interface JEScheduledTransaction {
|
|
|
59
59
|
scheduledJournalEntry: ScheduledJournalEntry[];
|
|
60
60
|
status: ScheduleStatus;
|
|
61
61
|
vendor: Vendor;
|
|
62
|
+
aiSummaries?: JEScheduleAISummaries;
|
|
62
63
|
balanceAsOfToday?: Amount;
|
|
64
|
+
createdByUser?: User;
|
|
63
65
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
64
66
|
endDate?: ZeniDate;
|
|
65
67
|
jeScheduleId?: ID;
|
|
66
68
|
jeScheduleType?: ScheduleTypes;
|
|
67
69
|
lastDayOfMonth?: boolean;
|
|
68
70
|
period?: number;
|
|
71
|
+
recommendations?: JEScheduleRecommendations;
|
|
69
72
|
startDate?: ZeniDate;
|
|
70
73
|
updatedAt?: ZeniDate;
|
|
71
74
|
updatedByUser?: User;
|
|
@@ -77,12 +77,13 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
|
|
|
77
77
|
const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
78
78
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
79
79
|
const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
80
|
-
const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
|
|
80
|
+
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, recommendations, } = jeScheduleTransactionState;
|
|
81
81
|
const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
|
|
82
82
|
if (vendorDetails == null) {
|
|
83
83
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
84
84
|
}
|
|
85
85
|
const userDetails = updatedBy != null ? (0, userSelector_1.getUserByUserId)(userState, updatedBy) : undefined;
|
|
86
|
+
const createdByUserDetails = createdBy != null ? (0, userSelector_1.getUserByUserId)(userState, createdBy) : undefined;
|
|
86
87
|
const baseTransactionObject = (0, transactionSelector_1.getScheduleTransactionById)(transactionState, baseTransaction);
|
|
87
88
|
if (baseTransactionObject == null) {
|
|
88
89
|
throw Error('Base Schedule transaction cannot be null');
|
|
@@ -134,6 +135,9 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
|
|
|
134
135
|
account: accountDebit,
|
|
135
136
|
},
|
|
136
137
|
scheduledJournalEntry,
|
|
138
|
+
aiSummaries,
|
|
139
|
+
createdByUser: createdByUserDetails,
|
|
140
|
+
recommendations,
|
|
137
141
|
};
|
|
138
142
|
};
|
|
139
143
|
exports.getJEScheduledTransactionByJEScheduleTransactionKey = getJEScheduledTransactionByJEScheduleTransactionKey;
|
|
@@ -12,6 +12,40 @@ export interface ScheduleJournalStatusCode {
|
|
|
12
12
|
code: ScheduleJournalEntryStatusCodeType;
|
|
13
13
|
label: string;
|
|
14
14
|
}
|
|
15
|
+
export interface JEScheduleFieldRecommendation {
|
|
16
|
+
confidence: number;
|
|
17
|
+
reasoning: string;
|
|
18
|
+
}
|
|
19
|
+
export interface JEScheduleAISummaries {
|
|
20
|
+
creditAccount?: JEScheduleFieldRecommendation;
|
|
21
|
+
creditClass?: JEScheduleFieldRecommendation;
|
|
22
|
+
debitAccount?: JEScheduleFieldRecommendation;
|
|
23
|
+
debitClass?: JEScheduleFieldRecommendation;
|
|
24
|
+
period?: JEScheduleFieldRecommendation;
|
|
25
|
+
postingDate?: JEScheduleFieldRecommendation;
|
|
26
|
+
scheduleType?: JEScheduleFieldRecommendation;
|
|
27
|
+
}
|
|
28
|
+
export interface JEScheduleRecommendations {
|
|
29
|
+
creditAccountConfidence?: number;
|
|
30
|
+
creditClassConfidence?: number;
|
|
31
|
+
debitAccountConfidence?: number;
|
|
32
|
+
debitClassConfidence?: number;
|
|
33
|
+
endDate?: string;
|
|
34
|
+
jeCreditAccountId?: string;
|
|
35
|
+
jeCreditAccountingClassId?: string;
|
|
36
|
+
jeDebitAccountId?: string;
|
|
37
|
+
jeDebitAccountingClassId?: string;
|
|
38
|
+
jeScheduleType?: string;
|
|
39
|
+
jeScheduleTypeConfidence?: number;
|
|
40
|
+
period?: number;
|
|
41
|
+
periodConfidence?: number;
|
|
42
|
+
postingDate?: string;
|
|
43
|
+
postingDateConfidence?: number;
|
|
44
|
+
similarTransactions?: unknown[];
|
|
45
|
+
startDate?: string;
|
|
46
|
+
startingMonth?: string;
|
|
47
|
+
startingMonthConfidence?: number;
|
|
48
|
+
}
|
|
15
49
|
export interface JEScheduleOtherAttributes {
|
|
16
50
|
assetId?: string;
|
|
17
51
|
startingBalance?: Amount;
|
|
@@ -56,13 +90,16 @@ export interface JEScheduledTransactionState {
|
|
|
56
90
|
scheduledJournalEntry: ScheduledJournalEntryState[];
|
|
57
91
|
status: ScheduleStatus;
|
|
58
92
|
vendorId: ID;
|
|
93
|
+
aiSummaries?: JEScheduleAISummaries;
|
|
59
94
|
balanceAsOfToday?: number;
|
|
95
|
+
createdByUserID?: ID;
|
|
60
96
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
61
97
|
endDate?: ZeniDate;
|
|
62
98
|
jeScheduleId?: ID;
|
|
63
99
|
jeScheduleType?: ScheduleTypes;
|
|
64
100
|
lastDayOfMonth?: boolean;
|
|
65
101
|
period?: number;
|
|
102
|
+
recommendations?: JEScheduleRecommendations;
|
|
66
103
|
startDate?: ZeniDate;
|
|
67
104
|
updatedAt?: ZeniDate;
|
|
68
105
|
updatedByUserID?: ID;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toSnackbarMessageSection: (v: string) => "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" | "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" | "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";
|
|
1
|
+
export declare const toSnackbarMessageSection: (v: string) => "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" | "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";
|
|
2
2
|
export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
|
|
3
3
|
export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "success" | "failed";
|
|
4
4
|
export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
|
|
@@ -171,6 +171,11 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
171
171
|
'treasury_accept_term',
|
|
172
172
|
'treasury_transfer_money',
|
|
173
173
|
'treasury_transfer_money_failed',
|
|
174
|
+
'auto_transfer_rule_create',
|
|
175
|
+
'auto_transfer_rule_update',
|
|
176
|
+
'auto_transfer_rule_delete',
|
|
177
|
+
'auto_transfer_rule_pause',
|
|
178
|
+
'auto_transfer_rule_resume',
|
|
174
179
|
'treasury_update_portfolio_allocation',
|
|
175
180
|
'send_email_magic_link_to_user',
|
|
176
181
|
'complete_profile_done',
|
|
@@ -561,6 +561,7 @@ function mapTenantsPayloadToState(tenantsPayload, userTenantPayload) {
|
|
|
561
561
|
function mapTenantPayloadToTenant(payload, userTenantPayload) {
|
|
562
562
|
const tenant = {
|
|
563
563
|
accountingClassIDs: payload.accounting_class_ids,
|
|
564
|
+
isAccountingClassesEnabled: payload.is_accounting_classes_enabled ?? true,
|
|
564
565
|
bookCloseDate: payload.book_close_date != null
|
|
565
566
|
? (0, zeniDayJS_1.date)(payload.book_close_date)
|
|
566
567
|
: undefined,
|
|
@@ -85,6 +85,7 @@ export declare const getCurrentTenantExternalConnections: (tenantState: TenantSt
|
|
|
85
85
|
export declare const toTenantCoreDetailsView: (tenantsBaseView: TenantBaseView[]) => TenantCoreDetailsView[];
|
|
86
86
|
export declare const isTenantBankingOnly: (isDebitCardFlagEnabled: boolean, tenant: Tenant | undefined) => boolean;
|
|
87
87
|
export declare const isTenantCardsOnly: (tenant: Tenant | undefined) => boolean;
|
|
88
|
+
export declare const getIsAccountingClassesEnabled: (state: RootState) => boolean;
|
|
88
89
|
export declare const isTenantBookkeepingEnabled: (tenant: Tenant | undefined) => boolean;
|
|
89
90
|
export declare const isOtherProductsEnabledForTenant: (tenant: Tenant | undefined) => boolean;
|
|
90
91
|
export declare const isTenantTreasuryEnabled: (tenant: Tenant | undefined) => boolean;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isTenantTreasuryEnabled = exports.isOtherProductsEnabledForTenant = exports.isTenantBookkeepingEnabled = exports.isTenantCardsOnly = exports.isTenantBankingOnly = exports.toTenantCoreDetailsView = exports.getCurrentTenantExternalConnections = exports.isTenantUsingZeniCOA = exports.isZeniDomainTenant = exports.getTenantBaseViewForTenantView = exports.getTenantsCoreDetailsByCheckInDateSelector = exports.getTenantsBaseByCheckInDateSelector = exports.getTenantBaseById = exports.getTenantsByCheckInDateSelector = exports.getCurrentTenant = exports.getTenantBaseViewForTenantId = void 0;
|
|
6
|
+
exports.isTenantTreasuryEnabled = exports.isOtherProductsEnabledForTenant = exports.isTenantBookkeepingEnabled = exports.getIsAccountingClassesEnabled = exports.isTenantCardsOnly = exports.isTenantBankingOnly = exports.toTenantCoreDetailsView = exports.getCurrentTenantExternalConnections = exports.isTenantUsingZeniCOA = exports.isZeniDomainTenant = exports.getTenantBaseViewForTenantView = exports.getTenantsCoreDetailsByCheckInDateSelector = exports.getTenantsBaseByCheckInDateSelector = exports.getTenantBaseById = exports.getTenantsByCheckInDateSelector = exports.getCurrentTenant = exports.getTenantBaseViewForTenantId = void 0;
|
|
7
7
|
exports.getTenant = getTenant;
|
|
8
8
|
exports.getOnboardingTenantByTenantId = getOnboardingTenantByTenantId;
|
|
9
9
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
@@ -280,6 +280,14 @@ const isTenantCardsOnly = (tenant) => {
|
|
|
280
280
|
: false;
|
|
281
281
|
};
|
|
282
282
|
exports.isTenantCardsOnly = isTenantCardsOnly;
|
|
283
|
+
const getIsAccountingClassesEnabled = (state) => {
|
|
284
|
+
const { currentTenantId, tenantsById } = state.tenantState;
|
|
285
|
+
if (currentTenantId == null) {
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
return tenantsById[currentTenantId]?.isAccountingClassesEnabled ?? true;
|
|
289
|
+
};
|
|
290
|
+
exports.getIsAccountingClassesEnabled = getIsAccountingClassesEnabled;
|
|
283
291
|
const isTenantBookkeepingEnabled = (tenant) => {
|
|
284
292
|
// if the tenants API takes time, tenant can be non null with productSettings as null
|
|
285
293
|
return tenant != null && tenant.productSettings != null
|
|
@@ -2,12 +2,15 @@ import { AccountBasePayload } from '../../account/accountPayload';
|
|
|
2
2
|
import { ClassBasePayload } from '../../class/classPayload';
|
|
3
3
|
import { ScheduleTransaction } from '../stateTypes/scheduleTransaction';
|
|
4
4
|
import { TransactionIDPayload } from './transactionIDPayload';
|
|
5
|
-
export interface ScheduleTransactionPayload extends TransactionIDPayload, Omit<AccountBasePayload, 'qbo_id'>, Omit<ClassBasePayload, 'qbo_id' | 'labels'> {
|
|
5
|
+
export interface ScheduleTransactionPayload extends TransactionIDPayload, Omit<AccountBasePayload, 'qbo_id' | 'labels'>, Omit<ClassBasePayload, 'qbo_id' | 'labels'> {
|
|
6
6
|
line_id: string;
|
|
7
7
|
third_party_transaction_id: string;
|
|
8
8
|
total_amount: number;
|
|
9
9
|
transaction_date: string;
|
|
10
10
|
transaction_memo: string;
|
|
11
11
|
transaction_type_name: string;
|
|
12
|
+
labels?: string[];
|
|
13
|
+
sync_token?: number;
|
|
14
|
+
transaction_description?: string | null;
|
|
12
15
|
}
|
|
13
16
|
export declare const toScheduleTransaction: (payload: ScheduleTransactionPayload, currency_code: string, currency_symbol: string) => ScheduleTransaction;
|
|
@@ -32,6 +32,7 @@ const toScheduleTransaction = (payload, currency_code, currency_symbol) => {
|
|
|
32
32
|
currencyCode: currency_code,
|
|
33
33
|
currencySymbol: currency_symbol,
|
|
34
34
|
},
|
|
35
|
+
description: payload.transaction_description ?? undefined,
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
38
|
exports.toScheduleTransaction = toScheduleTransaction;
|
|
@@ -33,6 +33,9 @@ export interface TransactionPayload extends TransactionIDPayload, AccountBasePay
|
|
|
33
33
|
recipient_total_amount?: number;
|
|
34
34
|
recommendations?: RecommendationPayload[];
|
|
35
35
|
sync_token?: string;
|
|
36
|
+
target_account_id?: string | null;
|
|
37
|
+
target_account_integration_id?: string | null;
|
|
38
|
+
target_account_name?: string | null;
|
|
36
39
|
total_amount?: number;
|
|
37
40
|
transaction_type_name?: string;
|
|
38
41
|
transaction_update_time?: string;
|
|
@@ -37,6 +37,9 @@ const getTransactionPayloadRecipientAmount = (payload) => {
|
|
|
37
37
|
const toTransaction = (payload) => {
|
|
38
38
|
const amount = (0, exports.getTransactionPayloadAmount)(payload);
|
|
39
39
|
const recipientAmount = getTransactionPayloadRecipientAmount(payload);
|
|
40
|
+
const lines = payload?.lines?.map((linePayload) => (0, transactionLinePayload_1.toLine)(linePayload, amount, recipientAmount));
|
|
41
|
+
const firstLineWithClass = lines?.find((line) => 'class' in line &&
|
|
42
|
+
line.class?.classId != null);
|
|
40
43
|
return {
|
|
41
44
|
...(0, transactionIDPayload_1.toTransactionID)(payload),
|
|
42
45
|
typeOfTransaction: 'supported',
|
|
@@ -65,11 +68,24 @@ const toTransaction = (payload) => {
|
|
|
65
68
|
...(payload.customer_name !== null && payload.customer_name !== ''
|
|
66
69
|
? { customerName: payload.customer_name }
|
|
67
70
|
: {}),
|
|
71
|
+
...(payload.target_account_id !== null && payload.target_account_id !== ''
|
|
72
|
+
? { targetAccountId: payload.target_account_id }
|
|
73
|
+
: {}),
|
|
74
|
+
...(payload.target_account_integration_id !== null &&
|
|
75
|
+
payload.target_account_integration_id !== ''
|
|
76
|
+
? { targetAccountIntegrationId: payload.target_account_integration_id }
|
|
77
|
+
: {}),
|
|
78
|
+
...(payload.target_account_name !== null &&
|
|
79
|
+
payload.target_account_name !== ''
|
|
80
|
+
? { targetAccountName: payload.target_account_name }
|
|
81
|
+
: {}),
|
|
68
82
|
linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)),
|
|
69
|
-
lines
|
|
83
|
+
lines,
|
|
70
84
|
account: payloadHasAccountInfo(payload)
|
|
71
85
|
? (0, accountPayload_1.mapAccountBasePayloadToAccountBase)(payload)
|
|
72
86
|
: undefined,
|
|
87
|
+
classId: firstLineWithClass?.class?.classId,
|
|
88
|
+
className: firstLineWithClass?.class?.className,
|
|
73
89
|
syncToken: payload.sync_token?.toString(),
|
|
74
90
|
paymentType: payload.payment_type ?? undefined,
|
|
75
91
|
paymentTypeName: payload.payment_type_name ?? undefined,
|
|
@@ -27,6 +27,8 @@ export interface Transaction extends BaseTransaction {
|
|
|
27
27
|
isUpdatingTransaction: boolean;
|
|
28
28
|
attachments?: Attachment[];
|
|
29
29
|
bookCloseDate?: ZeniDate;
|
|
30
|
+
classId?: ID;
|
|
31
|
+
className?: string;
|
|
30
32
|
companyIncDate?: ZeniDate;
|
|
31
33
|
customerId?: ID;
|
|
32
34
|
customerName?: string;
|
|
@@ -40,6 +42,9 @@ export interface Transaction extends BaseTransaction {
|
|
|
40
42
|
qboId?: string;
|
|
41
43
|
recommendations?: RecommendationByLineId;
|
|
42
44
|
syncToken?: string;
|
|
45
|
+
targetAccountId?: ID;
|
|
46
|
+
targetAccountIntegrationId?: string;
|
|
47
|
+
targetAccountName?: string;
|
|
43
48
|
updateTime?: ZeniDate;
|
|
44
49
|
vendorId?: ID;
|
|
45
50
|
vendorName?: string;
|
|
@@ -35,9 +35,9 @@ export interface LinkedTransactionLine extends TransactionLineBase {
|
|
|
35
35
|
export interface TransactionWithAccountAndClassLine extends TransactionLineBase {
|
|
36
36
|
account: AccountBase;
|
|
37
37
|
billable: BillableStatus;
|
|
38
|
-
class: ClassBase;
|
|
39
38
|
isCategoryMiscategorized: boolean;
|
|
40
39
|
isClassMiscategorized: boolean;
|
|
40
|
+
class?: ClassBase;
|
|
41
41
|
customer?: CustomerBase;
|
|
42
42
|
vendor?: VendorBase;
|
|
43
43
|
}
|