@zeniai/client-epic-state 5.0.69-betaML21 → 5.0.69-betaML4

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.
@@ -39,7 +39,6 @@ import { clearCompanyHealthMetricView } from '../../view/companyHealthMetricView
39
39
  import { clearCompanyMonthEndReportView } from '../../view/companyMonthEndReportView/companyMonthEndReportViewReducer';
40
40
  import { clearCompanyTaskManagerView } from '../../view/companyTaskManagerView/companyTaskManagerViewReducer';
41
41
  import { clearCompanyView } from '../../view/companyView/companyViewReducer';
42
- import { clearCreateTransferEntry } from '../../view/createTransferEntry/createTransferEntryReducer';
43
42
  import { clearCreditAgentView } from '../../view/creditAgentView/creditAgentViewReducer';
44
43
  import { clearDashboard } from '../../view/dashboard/dashboardReducer';
45
44
  import { clearDashboardLayout } from '../../view/dashboardLayout/dashboardLayoutReducer';
@@ -210,7 +209,7 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
210
209
  import { clearAllVendors } from '../vendor/vendorReducer';
211
210
  import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
212
211
  import { clearAll } from './tenantReducer';
213
- type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearCreateTransferEntry> | ReturnType<typeof clearAllCreditAgent> | ReturnType<typeof clearCreditAgentView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearProjectList> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
212
+ type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearAllCreditAgent> | ReturnType<typeof clearCreditAgentView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearProjectList> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
214
213
  type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
215
214
  export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
216
215
  export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
@@ -43,7 +43,6 @@ const companyHealthMetricViewReducer_1 = require("../../view/companyHealthMetric
43
43
  const companyMonthEndReportViewReducer_1 = require("../../view/companyMonthEndReportView/companyMonthEndReportViewReducer");
44
44
  const companyTaskManagerViewReducer_1 = require("../../view/companyTaskManagerView/companyTaskManagerViewReducer");
45
45
  const companyViewReducer_1 = require("../../view/companyView/companyViewReducer");
46
- const createTransferEntryReducer_1 = require("../../view/createTransferEntry/createTransferEntryReducer");
47
46
  const creditAgentViewReducer_1 = require("../../view/creditAgentView/creditAgentViewReducer");
48
47
  const dashboardReducer_1 = require("../../view/dashboard/dashboardReducer");
49
48
  const dashboardLayoutReducer_1 = require("../../view/dashboardLayout/dashboardLayoutReducer");
@@ -266,7 +265,6 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
266
265
  (0, companyMonthEndReportViewReducer_1.clearCompanyMonthEndReportView)(),
267
266
  (0, companyTaskManagerViewReducer_1.clearCompanyTaskManagerView)(),
268
267
  (0, companyViewReducer_1.clearCompanyView)(),
269
- (0, createTransferEntryReducer_1.clearCreateTransferEntry)(),
270
268
  (0, creditAgentReducer_1.clearAllCreditAgent)(),
271
269
  (0, creditAgentViewReducer_1.clearCreditAgentView)(),
272
270
  (0, dashboardReducer_1.clearDashboard)(),
@@ -54,72 +54,26 @@ const toTransaction = (payload) => {
54
54
  logo: (0, urlPayload_1.toURL)(payload.logo),
55
55
  attachments: payload.attachments?.map((attachmentPayload) => (0, attachmentPayload_1.toAttachment)(attachmentPayload)),
56
56
  qboId: payload.qbo_id,
57
- ...(payload.vendor_id != null && payload.vendor_id !== ''
58
- ? { vendorId: payload.vendor_id }
59
- : {}),
60
- ...(payload.vendor_name != null && payload.vendor_name !== ''
61
- ? { vendorName: payload.vendor_name }
62
- : {}),
63
- ...(payload.customer_id != null && payload.customer_id !== ''
64
- ? { customerId: payload.customer_id }
65
- : {}),
66
- ...(payload.customer_name != null && payload.customer_name !== ''
67
- ? { customerName: payload.customer_name }
68
- : {}),
69
- ...(payload.target_account_id != null && payload.target_account_id !== ''
70
- ? { targetAccountId: payload.target_account_id }
71
- : {}),
72
- ...(payload.target_account_integration_id != null &&
73
- payload.target_account_integration_id !== ''
74
- ? { targetAccountIntegrationId: payload.target_account_integration_id }
75
- : {}),
76
- ...(payload.target_account_name != null && payload.target_account_name !== ''
77
- ? { targetAccountName: payload.target_account_name }
78
- : {}),
79
- ...(payload.to_from_account_id != null && payload.to_from_account_id !== ''
80
- ? { toFromAccountId: payload.to_from_account_id }
81
- : {}),
82
- ...(payload.to_from_account_integration_id != null &&
83
- payload.to_from_account_integration_id !== ''
84
- ? { toFromAccountIntegrationId: payload.to_from_account_integration_id }
85
- : {}),
86
- ...(payload.to_from_account_name != null && payload.to_from_account_name !== ''
87
- ? { toFromAccountName: payload.to_from_account_name }
88
- : {}),
89
- ...(payload.category_id != null && payload.category_id !== ''
90
- ? { categoryId: payload.category_id }
91
- : {}),
92
- ...(payload.category_integration_id != null &&
93
- payload.category_integration_id !== ''
94
- ? { categoryIntegrationId: payload.category_integration_id }
95
- : {}),
96
- ...(payload.class_id != null && payload.class_id !== ''
97
- ? { classId: payload.class_id }
98
- : {}),
99
- ...(payload.class_name != null && payload.class_name !== ''
100
- ? { className: payload.class_name }
101
- : {}),
102
- ...(payload.accounting_project_id != null &&
103
- payload.accounting_project_id !== ''
104
- ? { projectId: payload.accounting_project_id }
105
- : {}),
106
- ...(payload.accounting_project_name != null &&
107
- payload.accounting_project_name !== ''
108
- ? { projectName: payload.accounting_project_name }
109
- : {}),
110
- ...(payload.category_name != null && payload.category_name !== ''
111
- ? { categoryName: payload.category_name }
112
- : {}),
113
- ...(payload.account_integration_id != null &&
114
- payload.account_integration_id !== ''
115
- ? { accountIntegrationId: payload.account_integration_id }
116
- : {}),
117
- ...(payload.qbo_account_id != null && payload.qbo_account_id !== ''
118
- ? { qboAccountId: payload.qbo_account_id }
119
- : {}),
120
- ...(payload.qbo_account_name != null && payload.qbo_account_name !== ''
121
- ? { qboAccountName: payload.qbo_account_name }
122
- : {}),
57
+ vendorId: Boolean(payload.vendor_id) === true ? payload.vendor_id : undefined,
58
+ vendorName: Boolean(payload.vendor_name) === true ? payload.vendor_name : undefined,
59
+ customerId: Boolean(payload.customer_id) === true ? payload.customer_id : undefined,
60
+ customerName: Boolean(payload.customer_name) === true ? payload.customer_name : undefined,
61
+ targetAccountId: Boolean(payload.target_account_id) === true ? payload.target_account_id : undefined,
62
+ targetAccountIntegrationId: Boolean(payload.target_account_integration_id) === true ? payload.target_account_integration_id : undefined,
63
+ targetAccountName: Boolean(payload.target_account_name) === true ? payload.target_account_name : undefined,
64
+ toFromAccountId: Boolean(payload.to_from_account_id) === true ? payload.to_from_account_id : undefined,
65
+ toFromAccountIntegrationId: Boolean(payload.to_from_account_integration_id) === true ? payload.to_from_account_integration_id : undefined,
66
+ toFromAccountName: Boolean(payload.to_from_account_name) === true ? payload.to_from_account_name : undefined,
67
+ categoryId: Boolean(payload.category_id) === true ? payload.category_id : undefined,
68
+ categoryIntegrationId: Boolean(payload.category_integration_id) === true ? payload.category_integration_id : undefined,
69
+ classId: Boolean(payload.class_id) === true ? payload.class_id : undefined,
70
+ className: Boolean(payload.class_name) === true ? payload.class_name : undefined,
71
+ projectId: Boolean(payload.accounting_project_id) === true ? payload.accounting_project_id : undefined,
72
+ projectName: Boolean(payload.accounting_project_name) === true ? payload.accounting_project_name : undefined,
73
+ categoryName: Boolean(payload.category_name) === true ? payload.category_name : undefined,
74
+ accountIntegrationId: Boolean(payload.account_integration_id) === true ? payload.account_integration_id : undefined,
75
+ qboAccountId: Boolean(payload.qbo_account_id) === true ? payload.qbo_account_id : undefined,
76
+ qboAccountName: Boolean(payload.qbo_account_name) === true ? payload.qbo_account_name : undefined,
123
77
  linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)),
124
78
  lines,
125
79
  account: payloadHasAccountInfo(payload)
@@ -40,7 +40,6 @@ import { clearCompanyHealthMetricView } from '../../view/companyHealthMetricView
40
40
  import { clearCompanyMonthEndReportView } from '../../view/companyMonthEndReportView/companyMonthEndReportViewReducer';
41
41
  import { clearCompanyTaskManagerView } from '../../view/companyTaskManagerView/companyTaskManagerViewReducer';
42
42
  import { clearCompanyView } from '../../view/companyView/companyViewReducer';
43
- import { clearCreateTransferEntry } from '../../view/createTransferEntry/createTransferEntryReducer';
44
43
  import { clearCreditAgentView } from '../../view/creditAgentView/creditAgentViewReducer';
45
44
  import { clearDashboard } from '../../view/dashboard/dashboardReducer';
46
45
  import { clearDashboardLayout } from '../../view/dashboardLayout/dashboardLayoutReducer';
@@ -263,7 +262,6 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
263
262
  clearCompanyMonthEndReportView(),
264
263
  clearCompanyTaskManagerView(),
265
264
  clearCompanyView(),
266
- clearCreateTransferEntry(),
267
265
  clearAllCreditAgent(),
268
266
  clearCreditAgentView(),
269
267
  clearDashboard(),
@@ -50,72 +50,26 @@ export const toTransaction = (payload) => {
50
50
  logo: toURL(payload.logo),
51
51
  attachments: payload.attachments?.map((attachmentPayload) => toAttachment(attachmentPayload)),
52
52
  qboId: payload.qbo_id,
53
- ...(payload.vendor_id != null && payload.vendor_id !== ''
54
- ? { vendorId: payload.vendor_id }
55
- : {}),
56
- ...(payload.vendor_name != null && payload.vendor_name !== ''
57
- ? { vendorName: payload.vendor_name }
58
- : {}),
59
- ...(payload.customer_id != null && payload.customer_id !== ''
60
- ? { customerId: payload.customer_id }
61
- : {}),
62
- ...(payload.customer_name != null && payload.customer_name !== ''
63
- ? { customerName: payload.customer_name }
64
- : {}),
65
- ...(payload.target_account_id != null && payload.target_account_id !== ''
66
- ? { targetAccountId: payload.target_account_id }
67
- : {}),
68
- ...(payload.target_account_integration_id != null &&
69
- payload.target_account_integration_id !== ''
70
- ? { targetAccountIntegrationId: payload.target_account_integration_id }
71
- : {}),
72
- ...(payload.target_account_name != null && payload.target_account_name !== ''
73
- ? { targetAccountName: payload.target_account_name }
74
- : {}),
75
- ...(payload.to_from_account_id != null && payload.to_from_account_id !== ''
76
- ? { toFromAccountId: payload.to_from_account_id }
77
- : {}),
78
- ...(payload.to_from_account_integration_id != null &&
79
- payload.to_from_account_integration_id !== ''
80
- ? { toFromAccountIntegrationId: payload.to_from_account_integration_id }
81
- : {}),
82
- ...(payload.to_from_account_name != null && payload.to_from_account_name !== ''
83
- ? { toFromAccountName: payload.to_from_account_name }
84
- : {}),
85
- ...(payload.category_id != null && payload.category_id !== ''
86
- ? { categoryId: payload.category_id }
87
- : {}),
88
- ...(payload.category_integration_id != null &&
89
- payload.category_integration_id !== ''
90
- ? { categoryIntegrationId: payload.category_integration_id }
91
- : {}),
92
- ...(payload.class_id != null && payload.class_id !== ''
93
- ? { classId: payload.class_id }
94
- : {}),
95
- ...(payload.class_name != null && payload.class_name !== ''
96
- ? { className: payload.class_name }
97
- : {}),
98
- ...(payload.accounting_project_id != null &&
99
- payload.accounting_project_id !== ''
100
- ? { projectId: payload.accounting_project_id }
101
- : {}),
102
- ...(payload.accounting_project_name != null &&
103
- payload.accounting_project_name !== ''
104
- ? { projectName: payload.accounting_project_name }
105
- : {}),
106
- ...(payload.category_name != null && payload.category_name !== ''
107
- ? { categoryName: payload.category_name }
108
- : {}),
109
- ...(payload.account_integration_id != null &&
110
- payload.account_integration_id !== ''
111
- ? { accountIntegrationId: payload.account_integration_id }
112
- : {}),
113
- ...(payload.qbo_account_id != null && payload.qbo_account_id !== ''
114
- ? { qboAccountId: payload.qbo_account_id }
115
- : {}),
116
- ...(payload.qbo_account_name != null && payload.qbo_account_name !== ''
117
- ? { qboAccountName: payload.qbo_account_name }
118
- : {}),
53
+ vendorId: Boolean(payload.vendor_id) === true ? payload.vendor_id : undefined,
54
+ vendorName: Boolean(payload.vendor_name) === true ? payload.vendor_name : undefined,
55
+ customerId: Boolean(payload.customer_id) === true ? payload.customer_id : undefined,
56
+ customerName: Boolean(payload.customer_name) === true ? payload.customer_name : undefined,
57
+ targetAccountId: Boolean(payload.target_account_id) === true ? payload.target_account_id : undefined,
58
+ targetAccountIntegrationId: Boolean(payload.target_account_integration_id) === true ? payload.target_account_integration_id : undefined,
59
+ targetAccountName: Boolean(payload.target_account_name) === true ? payload.target_account_name : undefined,
60
+ toFromAccountId: Boolean(payload.to_from_account_id) === true ? payload.to_from_account_id : undefined,
61
+ toFromAccountIntegrationId: Boolean(payload.to_from_account_integration_id) === true ? payload.to_from_account_integration_id : undefined,
62
+ toFromAccountName: Boolean(payload.to_from_account_name) === true ? payload.to_from_account_name : undefined,
63
+ categoryId: Boolean(payload.category_id) === true ? payload.category_id : undefined,
64
+ categoryIntegrationId: Boolean(payload.category_integration_id) === true ? payload.category_integration_id : undefined,
65
+ classId: Boolean(payload.class_id) === true ? payload.class_id : undefined,
66
+ className: Boolean(payload.class_name) === true ? payload.class_name : undefined,
67
+ projectId: Boolean(payload.accounting_project_id) === true ? payload.accounting_project_id : undefined,
68
+ projectName: Boolean(payload.accounting_project_name) === true ? payload.accounting_project_name : undefined,
69
+ categoryName: Boolean(payload.category_name) === true ? payload.category_name : undefined,
70
+ accountIntegrationId: Boolean(payload.account_integration_id) === true ? payload.account_integration_id : undefined,
71
+ qboAccountId: Boolean(payload.qbo_account_id) === true ? payload.qbo_account_id : undefined,
72
+ qboAccountName: Boolean(payload.qbo_account_name) === true ? payload.qbo_account_name : undefined,
119
73
  linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => toTransactionID(transactionIDPayload)),
120
74
  lines,
121
75
  account: payloadHasAccountInfo(payload)
@@ -21,16 +21,8 @@ const createTransferEntrySlice = createSlice({
21
21
  prepare(payload) {
22
22
  return { payload };
23
23
  },
24
- /**
25
- * Defense-in-depth: clear any stale `lastTransferEntryReplacement` on a
26
- * fresh dispatch so a second `createTransferEntry` never inherits the
27
- * previous run's replacement signal (e.g. if the prior `timer(0)` cleanup
28
- * never fired). Mirrors the host hook's `consumedReplacementRef` guard
29
- * (see `useTransferEntryRouteReplacement` in zeni-web-app-ui).
30
- */
31
24
  reducer(draft) {
32
25
  draft.createTransferEntryStatus = 'In-Progress';
33
- draft.lastTransferEntryReplacement = undefined;
34
26
  },
35
27
  },
36
28
  createTransferEntrySuccess(draft) {
@@ -58,15 +50,7 @@ const createTransferEntrySlice = createSlice({
58
50
  clearTransferEntryRouteReplacement(draft) {
59
51
  draft.lastTransferEntryReplacement = undefined;
60
52
  },
61
- /**
62
- * Full slice reset. Dispatched from `clearAllEpic` on tenant switch so
63
- * stale per-tenant state (account-id pools, status, replacement signal)
64
- * doesn't bleed across tenants.
65
- */
66
- clearCreateTransferEntry(draft) {
67
- Object.assign(draft, initialState);
68
- },
69
53
  },
70
54
  });
71
- export const { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure, createTransferEntry, createTransferEntrySuccess, createTransferEntryFailure, resetCreateTransferEntryStatus, createTransferEntryReplacedTransaction, clearTransferEntryRouteReplacement, clearCreateTransferEntry, } = createTransferEntrySlice.actions;
55
+ export const { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure, createTransferEntry, createTransferEntrySuccess, createTransferEntryFailure, resetCreateTransferEntryStatus, createTransferEntryReplacedTransaction, clearTransferEntryRouteReplacement, } = createTransferEntrySlice.actions;
72
56
  export default createTransferEntrySlice.reducer;
@@ -25,20 +25,6 @@ const failureSnackbar = () => openSnackbar({
25
25
  function buildFailureActions() {
26
26
  return [createTransferEntryFailure(), failureSnackbar()];
27
27
  }
28
- /**
29
- * Defensive guard: a BE response that returns 200 with `transaction != null`
30
- * but where the body lacks a usable id/type is unsafe to seed into the store —
31
- * downstream code would store under a garbage key and the host hook would try
32
- * to navigate to a broken url. Treat that case as failure so the source row
33
- * stays visible and the user can retry.
34
- */
35
- function isWellFormedTransactionPayload(t) {
36
- return (t != null &&
37
- typeof t.transaction_id === 'string' &&
38
- t.transaction_id !== '' &&
39
- typeof t.transaction_type === 'string' &&
40
- t.transaction_type !== '');
41
- }
42
28
  function buildSuccessSideEffects(sourceTransactionId) {
43
29
  return [
44
30
  createTransferEntrySuccess(),
@@ -118,12 +104,8 @@ export const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.
118
104
  if (!isSuccessResponse(response)) {
119
105
  return from(buildFailureActions());
120
106
  }
121
- const transaction = response.data?.transaction;
122
- if (transaction != null) {
123
- if (!isWellFormedTransactionPayload(transaction)) {
124
- return from(buildFailureActions());
125
- }
126
- return handleSuccessWithTransactionBody(transaction, response.data?.vendors, previousTransactionId, transactionId);
107
+ if (response.data?.transaction != null) {
108
+ return handleSuccessWithTransactionBody(response.data.transaction, response.data.vendors, previousTransactionId, transactionId);
127
109
  }
128
110
  return handleSuccessWithoutTransactionBody(transactionId);
129
111
  }), catchError(() => from(buildFailureActions())));
@@ -27,6 +27,6 @@ export declare const fetchAccountsForTransferFlow: import("@reduxjs/toolkit").Ac
27
27
  }, "createTransferEntry/createTransferEntry", never, never>, createTransferEntrySuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/createTransferEntrySuccess">, createTransferEntryFailure: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/createTransferEntryFailure">, resetCreateTransferEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/resetCreateTransferEntryStatus">, createTransferEntryReplacedTransaction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[previousTransactionId: TransactionID, newTransactionId: TransactionID], {
28
28
  newTransactionId: TransactionID;
29
29
  previousTransactionId: TransactionID;
30
- }, "createTransferEntry/createTransferEntryReplacedTransaction", never, never>, clearTransferEntryRouteReplacement: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearTransferEntryRouteReplacement">, clearCreateTransferEntry: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearCreateTransferEntry">;
30
+ }, "createTransferEntry/createTransferEntryReplacedTransaction", never, never>, clearTransferEntryRouteReplacement: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearTransferEntryRouteReplacement">;
31
31
  declare const _default: import("redux").Reducer<CreateTransferEntryState>;
32
32
  export default _default;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearCreateTransferEntry = exports.clearTransferEntryRouteReplacement = exports.createTransferEntryReplacedTransaction = exports.resetCreateTransferEntryStatus = exports.createTransferEntryFailure = exports.createTransferEntrySuccess = exports.createTransferEntry = exports.updateAccountsForTransferFlowFailure = exports.updateAccountsForTransferFlow = exports.fetchAccountsForTransferFlow = exports.initialState = void 0;
4
+ exports.clearTransferEntryRouteReplacement = exports.createTransferEntryReplacedTransaction = exports.resetCreateTransferEntryStatus = exports.createTransferEntryFailure = exports.createTransferEntrySuccess = exports.createTransferEntry = exports.updateAccountsForTransferFlowFailure = exports.updateAccountsForTransferFlow = exports.fetchAccountsForTransferFlow = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const createTransferEntryState_1 = require("./createTransferEntryState");
7
7
  exports.initialState = createTransferEntryState_1.initialCreateTransferEntryState;
@@ -25,16 +25,8 @@ const createTransferEntrySlice = (0, toolkit_1.createSlice)({
25
25
  prepare(payload) {
26
26
  return { payload };
27
27
  },
28
- /**
29
- * Defense-in-depth: clear any stale `lastTransferEntryReplacement` on a
30
- * fresh dispatch so a second `createTransferEntry` never inherits the
31
- * previous run's replacement signal (e.g. if the prior `timer(0)` cleanup
32
- * never fired). Mirrors the host hook's `consumedReplacementRef` guard
33
- * (see `useTransferEntryRouteReplacement` in zeni-web-app-ui).
34
- */
35
28
  reducer(draft) {
36
29
  draft.createTransferEntryStatus = 'In-Progress';
37
- draft.lastTransferEntryReplacement = undefined;
38
30
  },
39
31
  },
40
32
  createTransferEntrySuccess(draft) {
@@ -62,15 +54,7 @@ const createTransferEntrySlice = (0, toolkit_1.createSlice)({
62
54
  clearTransferEntryRouteReplacement(draft) {
63
55
  draft.lastTransferEntryReplacement = undefined;
64
56
  },
65
- /**
66
- * Full slice reset. Dispatched from `clearAllEpic` on tenant switch so
67
- * stale per-tenant state (account-id pools, status, replacement signal)
68
- * doesn't bleed across tenants.
69
- */
70
- clearCreateTransferEntry(draft) {
71
- Object.assign(draft, exports.initialState);
72
- },
73
57
  },
74
58
  });
75
- _a = createTransferEntrySlice.actions, exports.fetchAccountsForTransferFlow = _a.fetchAccountsForTransferFlow, exports.updateAccountsForTransferFlow = _a.updateAccountsForTransferFlow, exports.updateAccountsForTransferFlowFailure = _a.updateAccountsForTransferFlowFailure, exports.createTransferEntry = _a.createTransferEntry, exports.createTransferEntrySuccess = _a.createTransferEntrySuccess, exports.createTransferEntryFailure = _a.createTransferEntryFailure, exports.resetCreateTransferEntryStatus = _a.resetCreateTransferEntryStatus, exports.createTransferEntryReplacedTransaction = _a.createTransferEntryReplacedTransaction, exports.clearTransferEntryRouteReplacement = _a.clearTransferEntryRouteReplacement, exports.clearCreateTransferEntry = _a.clearCreateTransferEntry;
59
+ _a = createTransferEntrySlice.actions, exports.fetchAccountsForTransferFlow = _a.fetchAccountsForTransferFlow, exports.updateAccountsForTransferFlow = _a.updateAccountsForTransferFlow, exports.updateAccountsForTransferFlowFailure = _a.updateAccountsForTransferFlowFailure, exports.createTransferEntry = _a.createTransferEntry, exports.createTransferEntrySuccess = _a.createTransferEntrySuccess, exports.createTransferEntryFailure = _a.createTransferEntryFailure, exports.resetCreateTransferEntryStatus = _a.resetCreateTransferEntryStatus, exports.createTransferEntryReplacedTransaction = _a.createTransferEntryReplacedTransaction, exports.clearTransferEntryRouteReplacement = _a.clearTransferEntryRouteReplacement;
76
60
  exports.default = createTransferEntrySlice.reducer;
@@ -28,20 +28,6 @@ const failureSnackbar = () => (0, snackbarReducer_1.openSnackbar)({
28
28
  function buildFailureActions() {
29
29
  return [(0, createTransferEntryReducer_1.createTransferEntryFailure)(), failureSnackbar()];
30
30
  }
31
- /**
32
- * Defensive guard: a BE response that returns 200 with `transaction != null`
33
- * but where the body lacks a usable id/type is unsafe to seed into the store —
34
- * downstream code would store under a garbage key and the host hook would try
35
- * to navigate to a broken url. Treat that case as failure so the source row
36
- * stays visible and the user can retry.
37
- */
38
- function isWellFormedTransactionPayload(t) {
39
- return (t != null &&
40
- typeof t.transaction_id === 'string' &&
41
- t.transaction_id !== '' &&
42
- typeof t.transaction_type === 'string' &&
43
- t.transaction_type !== '');
44
- }
45
31
  function buildSuccessSideEffects(sourceTransactionId) {
46
32
  return [
47
33
  (0, createTransferEntryReducer_1.createTransferEntrySuccess)(),
@@ -121,12 +107,8 @@ const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
121
107
  if (!(0, responsePayload_1.isSuccessResponse)(response)) {
122
108
  return (0, rxjs_1.from)(buildFailureActions());
123
109
  }
124
- const transaction = response.data?.transaction;
125
- if (transaction != null) {
126
- if (!isWellFormedTransactionPayload(transaction)) {
127
- return (0, rxjs_1.from)(buildFailureActions());
128
- }
129
- return handleSuccessWithTransactionBody(transaction, response.data?.vendors, previousTransactionId, transactionId);
110
+ if (response.data?.transaction != null) {
111
+ return handleSuccessWithTransactionBody(response.data.transaction, response.data.vendors, previousTransactionId, transactionId);
130
112
  }
131
113
  return handleSuccessWithoutTransactionBody(transactionId);
132
114
  }), (0, operators_1.catchError)(() => (0, rxjs_1.from)(buildFailureActions())));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.69-betaML21",
3
+ "version": "5.0.69-betaML4",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",