@zeniai/client-epic-state 5.1.80 → 5.1.81-betaAK1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +13 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +3 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/invoicing/invoicingCommonPayload.d.ts +42 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +66 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +21 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +5 -1
- package/lib/entity/tenant/clearAllEpic.js +8 -0
- package/lib/epic.d.ts +9 -1
- package/lib/epic.js +14 -1
- package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +11 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +3 -0
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +61 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +21 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +8 -0
- package/lib/esm/epic.js +14 -1
- package/lib/esm/index.js +19 -4
- package/lib/esm/reducer.js +12 -0
- package/lib/esm/view/dashboard/dashboardSelector.js +14 -10
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +4 -18
- package/lib/esm/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +6 -1
- package/lib/esm/view/invoicing/createCreditNote/createCreditNotePayload.js +1 -8
- package/lib/esm/view/invoicing/discountAction/discountActionEpic.js +33 -9
- package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +35 -9
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +4 -5
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +10 -11
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +8 -10
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.js +43 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +2 -5
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +1 -2
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +7 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +3 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +25 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +15 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboConnectionEpic.js +15 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboSyncHealthEpic.js +15 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.js +1 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +26 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +18 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewPayload.js +47 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewReducer.js +128 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +20 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewState.js +1 -0
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNotePayload.js +4 -11
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +9 -12
- package/lib/esm/view/invoicing/recordPayment/recordPaymentFormConfig.js +0 -1
- package/lib/esm/view/invoicing/recordPayment/recordPaymentPayload.js +5 -14
- package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +26 -8
- package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +1 -1
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeForTimeframeProjectViewEpic.js +45 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewEpic.js +30 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewPayload.js +1 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewReducer.js +111 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelector.js +65 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewState.js +1 -0
- package/lib/esm/view/opExProjectView/opExForTimeframeProjectViewEpic.js +43 -0
- package/lib/esm/view/opExProjectView/opExProjectViewEpic.js +30 -0
- package/lib/esm/view/opExProjectView/opExProjectViewPayload.js +1 -0
- package/lib/esm/view/opExProjectView/opExProjectViewReducer.js +111 -0
- package/lib/esm/view/opExProjectView/opExProjectViewSelector.js +52 -0
- package/lib/esm/view/opExProjectView/opExProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/opExProjectView/opExProjectViewState.js +1 -0
- package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +0 -4
- package/lib/esm/view/reportsResync/reportsProjectViewRefetchingEpic.js +30 -0
- package/lib/esm/view/reportsResync/reportsResyncEpic.js +11 -3
- package/lib/esm/view/reportsResync/reportsResyncReducer.js +9 -1
- package/lib/esm/view/revenueProjectView/revenueForTimeframeProjectViewEpic.js +35 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewEpic.js +30 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewPayload.js +1 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewReducer.js +111 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewSelector.js +58 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewState.js +1 -0
- package/lib/index.d.ts +29 -5
- package/lib/index.js +106 -51
- package/lib/reducer.d.ts +12 -0
- package/lib/reducer.js +12 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -3
- package/lib/view/dashboard/dashboardSelector.js +13 -9
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -17
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +6 -1
- package/lib/view/invoicing/createCreditNote/createCreditNotePayload.js +1 -8
- package/lib/view/invoicing/createCreditNote/createCreditNoteState.d.ts +3 -1
- package/lib/view/invoicing/discountAction/discountActionEpic.d.ts +2 -1
- package/lib/view/invoicing/discountAction/discountActionEpic.js +32 -8
- package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +2 -1
- package/lib/view/invoicing/dunningAction/dunningActionEpic.js +34 -8
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +4 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +10 -11
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewState.d.ts +10 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +8 -10
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +2 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +3 -3
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +2 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.d.ts +9 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.js +45 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +2 -5
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +1 -2
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +4 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +6 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +4 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +3 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +4 -1
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +29 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +19 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboConnectionEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboConnectionEpic.js +19 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboSyncHealthEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboSyncHealthEpic.js +19 -0
- package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.d.ts +2 -0
- package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.js +2 -0
- package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +30 -0
- package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +22 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewPayload.d.ts +79 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewPayload.js +52 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewReducer.d.ts +25 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewReducer.js +132 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +21 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +24 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewState.d.ts +14 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewState.js +2 -0
- package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.js +4 -11
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +15 -7
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +11 -15
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteState.d.ts +3 -2
- package/lib/view/invoicing/recordPayment/recordPaymentFormConfig.js +0 -1
- package/lib/view/invoicing/recordPayment/recordPaymentPayload.js +5 -14
- package/lib/view/invoicing/recordPayment/recordPaymentState.d.ts +4 -2
- package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +2 -1
- package/lib/view/invoicing/settingsView/settingsViewEpics.js +25 -7
- package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +10 -1
- package/lib/view/invoicing/settingsView/settingsViewReducer.js +1 -1
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeForTimeframeProjectViewEpic.js +49 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewEpic.d.ts +6 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewEpic.js +34 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewPayload.d.ts +11 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewPayload.js +2 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewReducer.d.ts +33 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewReducer.js +115 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelector.d.ts +13 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelector.js +69 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelectorTypes.d.ts +21 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelectorTypes.js +2 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewState.d.ts +20 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewState.js +2 -0
- package/lib/view/opExProjectView/opExForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/opExProjectView/opExForTimeframeProjectViewEpic.js +47 -0
- package/lib/view/opExProjectView/opExProjectViewEpic.d.ts +6 -0
- package/lib/view/opExProjectView/opExProjectViewEpic.js +34 -0
- package/lib/view/opExProjectView/opExProjectViewPayload.d.ts +6 -0
- package/lib/view/opExProjectView/opExProjectViewPayload.js +2 -0
- package/lib/view/opExProjectView/opExProjectViewReducer.d.ts +33 -0
- package/lib/view/opExProjectView/opExProjectViewReducer.js +115 -0
- package/lib/view/opExProjectView/opExProjectViewSelector.d.ts +12 -0
- package/lib/view/opExProjectView/opExProjectViewSelector.js +56 -0
- package/lib/view/opExProjectView/opExProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/opExProjectView/opExProjectViewSelectorTypes.js +2 -0
- package/lib/view/opExProjectView/opExProjectViewState.d.ts +20 -0
- package/lib/view/opExProjectView/opExProjectViewState.js +2 -0
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +1 -2
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +0 -4
- package/lib/view/reportsResync/reportsProjectViewRefetchingEpic.d.ts +10 -0
- package/lib/view/reportsResync/reportsProjectViewRefetchingEpic.js +34 -0
- package/lib/view/reportsResync/reportsResyncEpic.d.ts +2 -2
- package/lib/view/reportsResync/reportsResyncEpic.js +10 -2
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +5 -3
- package/lib/view/reportsResync/reportsResyncReducer.js +10 -2
- package/lib/view/revenueProjectView/revenueForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/revenueProjectView/revenueForTimeframeProjectViewEpic.js +39 -0
- package/lib/view/revenueProjectView/revenueProjectViewEpic.d.ts +6 -0
- package/lib/view/revenueProjectView/revenueProjectViewEpic.js +34 -0
- package/lib/view/revenueProjectView/revenueProjectViewPayload.d.ts +9 -0
- package/lib/view/revenueProjectView/revenueProjectViewPayload.js +2 -0
- package/lib/view/revenueProjectView/revenueProjectViewReducer.d.ts +33 -0
- package/lib/view/revenueProjectView/revenueProjectViewReducer.js +115 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelector.d.ts +12 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelector.js +62 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelectorTypes.js +2 -0
- package/lib/view/revenueProjectView/revenueProjectViewState.d.ts +20 -0
- package/lib/view/revenueProjectView/revenueProjectViewState.js +2 -0
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/invoicingCouponFormConfig.js +0 -44
- package/lib/view/invoicing/editInvoicingCouponDetailView/invoicingCouponFormConfig.d.ts +0 -5
- package/lib/view/invoicing/editInvoicingCouponDetailView/invoicingCouponFormConfig.js +0 -48
|
@@ -23,6 +23,9 @@ exports.initialState = {
|
|
|
23
23
|
catalogItemLifecycleActionOptions: [],
|
|
24
24
|
catalogProductLifecycleActionOptions: [],
|
|
25
25
|
discountLifecycleActionOptions: [],
|
|
26
|
+
qboAccountMappingKindOptions: [],
|
|
27
|
+
qboCustomerMatchingOptions: [],
|
|
28
|
+
qboSyncStatusOptions: [],
|
|
26
29
|
isInvoicingEnabled: undefined,
|
|
27
30
|
isInvoicingTosAccepted: undefined,
|
|
28
31
|
invoicingTosAcceptanceIp: undefined,
|
|
@@ -58,6 +61,9 @@ function mapInvoicingConfigPayloadToState(payload) {
|
|
|
58
61
|
catalogItemLifecycleActionOptions: (payload.catalog_item_lifecycle_action_options ?? []).map((option) => (0, invoicingCommonPayload_1.toInvoicingCatalogItemLifecycleActionOption)(option)),
|
|
59
62
|
catalogProductLifecycleActionOptions: (payload.catalog_product_lifecycle_action_options ?? []).map((option) => (0, invoicingCommonPayload_1.toInvoicingCatalogProductLifecycleActionOption)(option)),
|
|
60
63
|
discountLifecycleActionOptions: (payload.discount_lifecycle_action_options ?? []).map((option) => (0, invoicingCommonPayload_1.toInvoicingDiscountLifecycleActionOption)(option)),
|
|
64
|
+
qboAccountMappingKindOptions: (payload.qbo_account_mapping_kind_options ?? []).map(invoicingCommonPayload_1.toInvoicingQboAccountMappingKindOption),
|
|
65
|
+
qboCustomerMatchingOptions: (payload.qbo_customer_matching_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
66
|
+
qboSyncStatusOptions: (payload.qbo_sync_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
61
67
|
isInvoicingEnabled: payload.is_invoicing_enabled,
|
|
62
68
|
isInvoicingTosAccepted: payload.is_invoicing_tos_accepted,
|
|
63
69
|
invoicingTosAcceptanceIp: payload.invoicing_tos_acceptance_ip ?? undefined,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchState, FetchStateAndError } from '../../../commonStateTypes/common';
|
|
2
2
|
import { InvoicingDunningActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
-
import type { AuditLogEntityRouteOption, AuditLogListSortFieldOption, AuditLogSourceLabelOption, InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingDiscountLifecycleActionOption, InvoicingNamedOption, InvoicingSubscriptionEditFieldOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
+
import type { AuditLogEntityRouteOption, AuditLogListSortFieldOption, AuditLogSourceLabelOption, InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingDiscountLifecycleActionOption, InvoicingNamedOption, InvoicingQboAccountMappingKindOption, InvoicingSubscriptionEditFieldOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { RootState } from '../../../reducer';
|
|
5
5
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
6
6
|
import { InvoicingOnboardingStatus } from './invoicingConfigViewPayload';
|
|
@@ -15,6 +15,9 @@ export interface InvoicingConfigView {
|
|
|
15
15
|
dunningScheduleActionOptions: InvoicingDunningActionOption[];
|
|
16
16
|
enableState: FetchStateAndError;
|
|
17
17
|
fetchState: FetchState;
|
|
18
|
+
qboAccountMappingKindOptions: InvoicingQboAccountMappingKindOption[];
|
|
19
|
+
qboCustomerMatchingOptions: InvoicingNamedOption[];
|
|
20
|
+
qboSyncStatusOptions: InvoicingNamedOption[];
|
|
18
21
|
subscriptionCancelTimingOptions: InvoicingNamedOption[];
|
|
19
22
|
subscriptionChangeOptionOptions: InvoicingNamedOption[];
|
|
20
23
|
subscriptionCommercialEditAllowedFromStatuses: string[];
|
|
@@ -26,6 +26,9 @@ const getInvoicingConfigView = (state) => {
|
|
|
26
26
|
catalogItemLifecycleActionOptions: configState.catalogItemLifecycleActionOptions,
|
|
27
27
|
catalogProductLifecycleActionOptions: configState.catalogProductLifecycleActionOptions,
|
|
28
28
|
discountLifecycleActionOptions: configState.discountLifecycleActionOptions,
|
|
29
|
+
qboAccountMappingKindOptions: configState.qboAccountMappingKindOptions,
|
|
30
|
+
qboCustomerMatchingOptions: configState.qboCustomerMatchingOptions,
|
|
31
|
+
qboSyncStatusOptions: configState.qboSyncStatusOptions,
|
|
29
32
|
error: configState.error,
|
|
30
33
|
fetchState: configState.fetchState,
|
|
31
34
|
isInvoicingEnabled: configState.isInvoicingEnabled,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState } from '../../../commonStateTypes/common';
|
|
2
|
-
import type { AuditLogEntityRouteOption, AuditLogListSortFieldOption, AuditLogSourceLabelOption, InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingDiscountLifecycleActionOption, InvoicingNamedOption, InvoicingSubscriptionEditFieldOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
2
|
+
import type { AuditLogEntityRouteOption, AuditLogListSortFieldOption, AuditLogSourceLabelOption, InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingDiscountLifecycleActionOption, InvoicingNamedOption, InvoicingQboAccountMappingKindOption, InvoicingSubscriptionEditFieldOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
3
|
import { InvoicingDunningActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
export interface InvoicingConfigViewState extends FetchedState {
|
|
5
5
|
acceptTermsFetchState: FetchStateAndError;
|
|
@@ -11,6 +11,9 @@ export interface InvoicingConfigViewState extends FetchedState {
|
|
|
11
11
|
discountLifecycleActionOptions: InvoicingDiscountLifecycleActionOption[];
|
|
12
12
|
dunningScheduleActionOptions: InvoicingDunningActionOption[];
|
|
13
13
|
enableFetchState: FetchStateAndError;
|
|
14
|
+
qboAccountMappingKindOptions: InvoicingQboAccountMappingKindOption[];
|
|
15
|
+
qboCustomerMatchingOptions: InvoicingNamedOption[];
|
|
16
|
+
qboSyncStatusOptions: InvoicingNamedOption[];
|
|
14
17
|
subscriptionCancelTimingOptions: InvoicingNamedOption[];
|
|
15
18
|
subscriptionChangeOptionOptions: InvoicingNamedOption[];
|
|
16
19
|
subscriptionCommercialEditAllowedFromStatuses: string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const fetchInvoicingQboAccountsEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingQboAccountsEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
+
const fetchInvoicingQboAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboAccounts.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
+
const { accountTypes } = action.payload;
|
|
11
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/accounts?account_types=${encodeURIComponent(accountTypes)}`;
|
|
12
|
+
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
13
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
14
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboAccounts)({
|
|
15
|
+
accountTypes,
|
|
16
|
+
accounts: (0, invoicingQboViewPayload_1.mapInvoicingQboAccountOptions)(response.data?.accounts ?? []),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboAccountsFailure)({
|
|
20
|
+
accountTypes,
|
|
21
|
+
status: response.status,
|
|
22
|
+
});
|
|
23
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboAccountsFailure)({
|
|
24
|
+
accountTypes,
|
|
25
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO accounts REST API call errored out ' +
|
|
26
|
+
JSON.stringify(error)),
|
|
27
|
+
}))));
|
|
28
|
+
}));
|
|
29
|
+
exports.fetchInvoicingQboAccountsEpic = fetchInvoicingQboAccountsEpic;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const fetchInvoicingQboClassesEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingQboClassesEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
+
const fetchInvoicingQboClassesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboClasses.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/classes`;
|
|
11
|
+
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
12
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
13
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboClasses)((0, invoicingQboViewPayload_1.mapInvoicingQboAccountOptions)(response.data?.accounts ?? []));
|
|
14
|
+
}
|
|
15
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboClassesFailure)(response.status);
|
|
16
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboClassesFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO classes REST API call errored out ' +
|
|
17
|
+
JSON.stringify(error))))));
|
|
18
|
+
}));
|
|
19
|
+
exports.fetchInvoicingQboClassesEpic = fetchInvoicingQboClassesEpic;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const fetchInvoicingQboConnectionEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingQboConnectionEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
+
const fetchInvoicingQboConnectionEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboConnection.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/connection`;
|
|
11
|
+
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
12
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
13
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboConnection)((0, invoicingQboViewPayload_1.mapInvoicingQboConnection)(response.data ?? { connected: false }));
|
|
14
|
+
}
|
|
15
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboConnectionFailure)(response.status);
|
|
16
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboConnectionFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO connection REST API call errored out ' +
|
|
17
|
+
JSON.stringify(error))))));
|
|
18
|
+
}));
|
|
19
|
+
exports.fetchInvoicingQboConnectionEpic = fetchInvoicingQboConnectionEpic;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const fetchInvoicingQboSyncHealthEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingQboSyncHealthEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
+
const fetchInvoicingQboSyncHealthEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboSyncHealth.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/sync-health`;
|
|
11
|
+
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
12
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
13
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboSyncHealth)((0, invoicingQboViewPayload_1.mapInvoicingQboSyncHealth)(response.data ?? {}));
|
|
14
|
+
}
|
|
15
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboSyncHealthFailure)(response.status);
|
|
16
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboSyncHealthFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO sync health REST API call errored out ' +
|
|
17
|
+
JSON.stringify(error))))));
|
|
18
|
+
}));
|
|
19
|
+
exports.fetchInvoicingQboSyncHealthEpic = fetchInvoicingQboSyncHealthEpic;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { fetchInvoicingQboAccounts, fetchInvoicingQboClasses, fetchInvoicingQboConnection, fetchInvoicingQboSyncHealth, retryInvoicingQboSyncTask, retryInvoicingQboSyncTaskFailure, retryInvoicingQboSyncTaskSuccess, startInvoicingQboBackfill, startInvoicingQboBackfillFailure, startInvoicingQboBackfillSuccess, updateInvoicingQboAccounts, updateInvoicingQboAccountsFailure, updateInvoicingQboClasses, updateInvoicingQboClassesFailure, updateInvoicingQboConnection, updateInvoicingQboConnectionFailure, updateInvoicingQboSyncHealth, updateInvoicingQboSyncHealthFailure } from '../invoicingQboViewReducer';
|
|
2
|
+
export type InvoicingQboViewActionType = ReturnType<typeof fetchInvoicingQboConnection> | ReturnType<typeof updateInvoicingQboConnection> | ReturnType<typeof updateInvoicingQboConnectionFailure> | ReturnType<typeof fetchInvoicingQboAccounts> | ReturnType<typeof updateInvoicingQboAccounts> | ReturnType<typeof updateInvoicingQboAccountsFailure> | ReturnType<typeof fetchInvoicingQboClasses> | ReturnType<typeof updateInvoicingQboClasses> | ReturnType<typeof updateInvoicingQboClassesFailure> | ReturnType<typeof fetchInvoicingQboSyncHealth> | ReturnType<typeof updateInvoicingQboSyncHealth> | ReturnType<typeof updateInvoicingQboSyncHealthFailure> | ReturnType<typeof retryInvoicingQboSyncTask> | ReturnType<typeof retryInvoicingQboSyncTaskSuccess> | ReturnType<typeof retryInvoicingQboSyncTaskFailure> | ReturnType<typeof startInvoicingQboBackfill> | ReturnType<typeof startInvoicingQboBackfillSuccess> | ReturnType<typeof startInvoicingQboBackfillFailure>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const retryInvoicingQboSyncTaskEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.retryInvoicingQboSyncTaskEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
8
|
+
const retryInvoicingQboSyncTaskEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.retryInvoicingQboSyncTask.match), (0, operators_1.mergeMap)((action) => {
|
|
9
|
+
const { taskId } = action.payload;
|
|
10
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/sync-tasks/${encodeURIComponent(taskId)}/retry`;
|
|
11
|
+
return zeniAPI
|
|
12
|
+
.postAndGetJSON(apiUrl, {})
|
|
13
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
14
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
15
|
+
return (0, rxjs_1.of)((0, invoicingQboViewReducer_1.retryInvoicingQboSyncTaskSuccess)({
|
|
16
|
+
status: response.data?.status ?? '',
|
|
17
|
+
taskId: response.data?.task_id ?? taskId,
|
|
18
|
+
}), (0, invoicingQboViewReducer_1.fetchInvoicingQboSyncHealth)());
|
|
19
|
+
}
|
|
20
|
+
return (0, rxjs_1.of)((0, invoicingQboViewReducer_1.retryInvoicingQboSyncTaskFailure)({
|
|
21
|
+
status: response.status,
|
|
22
|
+
taskId,
|
|
23
|
+
}));
|
|
24
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.retryInvoicingQboSyncTaskFailure)({
|
|
25
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Retry QBO sync task REST API call errored out ' +
|
|
26
|
+
JSON.stringify(error)),
|
|
27
|
+
taskId,
|
|
28
|
+
}))));
|
|
29
|
+
}));
|
|
30
|
+
exports.retryInvoicingQboSyncTaskEpic = retryInvoicingQboSyncTaskEpic;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const startInvoicingQboBackfillEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startInvoicingQboBackfillEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
8
|
+
const startInvoicingQboBackfillEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.startInvoicingQboBackfill.match), (0, operators_1.switchMap)((action) => {
|
|
9
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/backfill`;
|
|
10
|
+
return zeniAPI
|
|
11
|
+
.postAndGetJSON(apiUrl, {
|
|
12
|
+
start_date: action.payload.startDate,
|
|
13
|
+
})
|
|
14
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
16
|
+
return (0, rxjs_1.of)((0, invoicingQboViewReducer_1.startInvoicingQboBackfillSuccess)(), (0, invoicingQboViewReducer_1.fetchInvoicingQboSyncHealth)());
|
|
17
|
+
}
|
|
18
|
+
return (0, rxjs_1.of)((0, invoicingQboViewReducer_1.startInvoicingQboBackfillFailure)(response.status));
|
|
19
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.startInvoicingQboBackfillFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Start QBO backfill REST API call errored out ' +
|
|
20
|
+
JSON.stringify(error))))));
|
|
21
|
+
}));
|
|
22
|
+
exports.startInvoicingQboBackfillEpic = startInvoicingQboBackfillEpic;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
2
|
+
export interface InvoicingQboConnectionPayload {
|
|
3
|
+
connected: boolean;
|
|
4
|
+
company_name?: string | null;
|
|
5
|
+
connection_id?: string | null;
|
|
6
|
+
realm_id?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface InvoicingQboConnection {
|
|
9
|
+
connected: boolean;
|
|
10
|
+
companyName?: string;
|
|
11
|
+
connectionId?: string;
|
|
12
|
+
realmId?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function mapInvoicingQboConnection(payload: InvoicingQboConnectionPayload): InvoicingQboConnection;
|
|
15
|
+
/**
|
|
16
|
+
* A single row from the QBO accounts / classes endpoints. The rows carry the
|
|
17
|
+
* QBO id plus one or more name fields depending on the entity — inspect
|
|
18
|
+
* loosely, render the name, submit the id.
|
|
19
|
+
*/
|
|
20
|
+
export interface InvoicingQboAccountRowPayload {
|
|
21
|
+
account_id?: string | null;
|
|
22
|
+
account_name?: string | null;
|
|
23
|
+
account_type?: string | null;
|
|
24
|
+
accounting_class_name?: string | null;
|
|
25
|
+
fully_qualified_name?: string | null;
|
|
26
|
+
id?: string | null;
|
|
27
|
+
name?: string | null;
|
|
28
|
+
qbo_accounting_class_name?: string | null;
|
|
29
|
+
qbo_id?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export interface InvoicingQboAccountOption {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
accountType?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function mapInvoicingQboAccountOptions(rows: InvoicingQboAccountRowPayload[]): InvoicingQboAccountOption[];
|
|
37
|
+
export interface InvoicingQboAccountsPayload {
|
|
38
|
+
accounts: InvoicingQboAccountRowPayload[];
|
|
39
|
+
}
|
|
40
|
+
export interface InvoicingQboFailedTaskPayload {
|
|
41
|
+
attempts: number;
|
|
42
|
+
entity_id: string;
|
|
43
|
+
entity_type: string;
|
|
44
|
+
task_id: string;
|
|
45
|
+
last_error?: string | null;
|
|
46
|
+
updated_at?: string | null;
|
|
47
|
+
}
|
|
48
|
+
export interface InvoicingQboFailedTask {
|
|
49
|
+
attempts: number;
|
|
50
|
+
entityId: string;
|
|
51
|
+
entityType: string;
|
|
52
|
+
taskId: string;
|
|
53
|
+
lastError?: string;
|
|
54
|
+
updatedAt?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface InvoicingQboSyncHealthPayload {
|
|
57
|
+
connection?: InvoicingQboConnectionPayload | null;
|
|
58
|
+
counts_by_status?: Record<string, number> | null;
|
|
59
|
+
failed_tasks?: InvoicingQboFailedTaskPayload[] | null;
|
|
60
|
+
}
|
|
61
|
+
export interface InvoicingQboSyncHealth {
|
|
62
|
+
countsByStatus: Record<string, number>;
|
|
63
|
+
failedTasks: InvoicingQboFailedTask[];
|
|
64
|
+
connection?: InvoicingQboConnection;
|
|
65
|
+
}
|
|
66
|
+
export declare function mapInvoicingQboSyncHealth(payload: InvoicingQboSyncHealthPayload): InvoicingQboSyncHealth;
|
|
67
|
+
export interface InvoicingQboRetryTaskPayload {
|
|
68
|
+
status: string;
|
|
69
|
+
task_id: string;
|
|
70
|
+
}
|
|
71
|
+
export interface InvoicingQboBackfillPayload {
|
|
72
|
+
enqueued?: Record<string, number> | null;
|
|
73
|
+
start_date?: string | null;
|
|
74
|
+
}
|
|
75
|
+
export type InvoicingQboConnectionResponse = ZeniAPIResponse<InvoicingQboConnectionPayload>;
|
|
76
|
+
export type InvoicingQboAccountsResponse = ZeniAPIResponse<InvoicingQboAccountsPayload>;
|
|
77
|
+
export type InvoicingQboSyncHealthResponse = ZeniAPIResponse<InvoicingQboSyncHealthPayload>;
|
|
78
|
+
export type InvoicingQboRetryTaskResponse = ZeniAPIResponse<InvoicingQboRetryTaskPayload>;
|
|
79
|
+
export type InvoicingQboBackfillResponse = ZeniAPIResponse<InvoicingQboBackfillPayload>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapInvoicingQboConnection = mapInvoicingQboConnection;
|
|
4
|
+
exports.mapInvoicingQboAccountOptions = mapInvoicingQboAccountOptions;
|
|
5
|
+
exports.mapInvoicingQboSyncHealth = mapInvoicingQboSyncHealth;
|
|
6
|
+
function mapInvoicingQboConnection(payload) {
|
|
7
|
+
return {
|
|
8
|
+
connected: payload.connected,
|
|
9
|
+
companyName: payload.company_name ?? undefined,
|
|
10
|
+
connectionId: payload.connection_id ?? undefined,
|
|
11
|
+
realmId: payload.realm_id ?? undefined,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function mapInvoicingQboAccountOptions(rows) {
|
|
15
|
+
return rows.flatMap((row) => {
|
|
16
|
+
// Only qbo_id is a valid QBO AccountRef/ClassRef value — platform-internal
|
|
17
|
+
// ids (account_id / id) are display metadata and must never be submitted.
|
|
18
|
+
const accountId = row.qbo_id ?? row.id ?? row.account_id ?? '';
|
|
19
|
+
if (accountId === '') {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
const accountName = row.name ??
|
|
23
|
+
row.account_name ??
|
|
24
|
+
row.accounting_class_name ??
|
|
25
|
+
row.qbo_accounting_class_name ??
|
|
26
|
+
row.fully_qualified_name ??
|
|
27
|
+
accountId;
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
id: accountId,
|
|
31
|
+
name: accountName,
|
|
32
|
+
accountType: row.account_type ?? undefined,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function mapInvoicingQboSyncHealth(payload) {
|
|
38
|
+
return {
|
|
39
|
+
connection: payload.connection != null
|
|
40
|
+
? mapInvoicingQboConnection(payload.connection)
|
|
41
|
+
: undefined,
|
|
42
|
+
countsByStatus: payload.counts_by_status ?? {},
|
|
43
|
+
failedTasks: (payload.failed_tasks ?? []).map((task) => ({
|
|
44
|
+
attempts: task.attempts,
|
|
45
|
+
entityId: task.entity_id,
|
|
46
|
+
entityType: task.entity_type,
|
|
47
|
+
taskId: task.task_id,
|
|
48
|
+
lastError: task.last_error ?? undefined,
|
|
49
|
+
updatedAt: task.updated_at ?? undefined,
|
|
50
|
+
})),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
2
|
+
import { InvoicingQboAccountOption, InvoicingQboConnection, InvoicingQboSyncHealth } from './invoicingQboViewPayload';
|
|
3
|
+
import { InvoicingQboViewState } from './invoicingQboViewState';
|
|
4
|
+
export declare const initialState: InvoicingQboViewState;
|
|
5
|
+
export declare const fetchInvoicingQboConnection: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingQboView/fetchInvoicingQboConnection">, updateInvoicingQboConnection: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingQboConnection, "invoicingQboView/updateInvoicingQboConnection">, updateInvoicingQboConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingQboView/updateInvoicingQboConnectionFailure">, fetchInvoicingQboAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountTypes: string], {
|
|
6
|
+
accountTypes: string;
|
|
7
|
+
}, "invoicingQboView/fetchInvoicingQboAccounts", never, never>, updateInvoicingQboAccounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
|
+
accounts: InvoicingQboAccountOption[];
|
|
9
|
+
accountTypes: string;
|
|
10
|
+
}, "invoicingQboView/updateInvoicingQboAccounts">, updateInvoicingQboAccountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
|
+
accountTypes: string;
|
|
12
|
+
status: ZeniAPIStatus;
|
|
13
|
+
}, "invoicingQboView/updateInvoicingQboAccountsFailure">, fetchInvoicingQboClasses: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingQboView/fetchInvoicingQboClasses">, updateInvoicingQboClasses: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingQboAccountOption[], "invoicingQboView/updateInvoicingQboClasses">, updateInvoicingQboClassesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingQboView/updateInvoicingQboClassesFailure">, fetchInvoicingQboSyncHealth: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingQboView/fetchInvoicingQboSyncHealth">, updateInvoicingQboSyncHealth: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingQboSyncHealth, "invoicingQboView/updateInvoicingQboSyncHealth">, updateInvoicingQboSyncHealthFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingQboView/updateInvoicingQboSyncHealthFailure">, retryInvoicingQboSyncTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId: string], {
|
|
14
|
+
taskId: string;
|
|
15
|
+
}, "invoicingQboView/retryInvoicingQboSyncTask", never, never>, retryInvoicingQboSyncTaskSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
16
|
+
status: string;
|
|
17
|
+
taskId: string;
|
|
18
|
+
}, "invoicingQboView/retryInvoicingQboSyncTaskSuccess">, retryInvoicingQboSyncTaskFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
status: ZeniAPIStatus;
|
|
20
|
+
taskId: string;
|
|
21
|
+
}, "invoicingQboView/retryInvoicingQboSyncTaskFailure">, startInvoicingQboBackfill: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[startDate: string], {
|
|
22
|
+
startDate: string;
|
|
23
|
+
}, "invoicingQboView/startInvoicingQboBackfill", never, never>, startInvoicingQboBackfillSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingQboView/startInvoicingQboBackfillSuccess">, startInvoicingQboBackfillFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingQboView/startInvoicingQboBackfillFailure">, clearInvoicingQboView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingQboView/clearInvoicingQboView">;
|
|
24
|
+
declare const _default: import("redux").Reducer<InvoicingQboViewState>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearInvoicingQboView = exports.startInvoicingQboBackfillFailure = exports.startInvoicingQboBackfillSuccess = exports.startInvoicingQboBackfill = exports.retryInvoicingQboSyncTaskFailure = exports.retryInvoicingQboSyncTaskSuccess = exports.retryInvoicingQboSyncTask = exports.updateInvoicingQboSyncHealthFailure = exports.updateInvoicingQboSyncHealth = exports.fetchInvoicingQboSyncHealth = exports.updateInvoicingQboClassesFailure = exports.updateInvoicingQboClasses = exports.fetchInvoicingQboClasses = exports.updateInvoicingQboAccountsFailure = exports.updateInvoicingQboAccounts = exports.fetchInvoicingQboAccounts = exports.updateInvoicingQboConnectionFailure = exports.updateInvoicingQboConnection = exports.fetchInvoicingQboConnection = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
exports.initialState = {
|
|
7
|
+
accountsByAccountTypes: {},
|
|
8
|
+
accountsFetchStateByAccountTypes: {},
|
|
9
|
+
backfillFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
10
|
+
classes: [],
|
|
11
|
+
classesFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
12
|
+
connection: undefined,
|
|
13
|
+
connectionFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
14
|
+
retryFetchStateByTaskId: {},
|
|
15
|
+
syncHealth: undefined,
|
|
16
|
+
syncHealthFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
17
|
+
};
|
|
18
|
+
const invoicingQboView = (0, toolkit_1.createSlice)({
|
|
19
|
+
name: 'invoicingQboView',
|
|
20
|
+
initialState: exports.initialState,
|
|
21
|
+
reducers: {
|
|
22
|
+
fetchInvoicingQboConnection(draft) {
|
|
23
|
+
draft.connectionFetchState = {
|
|
24
|
+
fetchState: 'In-Progress',
|
|
25
|
+
error: undefined,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
updateInvoicingQboConnection(draft, action) {
|
|
29
|
+
draft.connection = action.payload;
|
|
30
|
+
draft.connectionFetchState = { fetchState: 'Completed', error: undefined };
|
|
31
|
+
},
|
|
32
|
+
updateInvoicingQboConnectionFailure(draft, action) {
|
|
33
|
+
draft.connectionFetchState = { fetchState: 'Error', error: action.payload };
|
|
34
|
+
},
|
|
35
|
+
fetchInvoicingQboAccounts: {
|
|
36
|
+
reducer(draft, action) {
|
|
37
|
+
draft.accountsFetchStateByAccountTypes[action.payload.accountTypes] = {
|
|
38
|
+
fetchState: 'In-Progress',
|
|
39
|
+
error: undefined,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
prepare(accountTypes) {
|
|
43
|
+
return { payload: { accountTypes } };
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
updateInvoicingQboAccounts(draft, action) {
|
|
47
|
+
draft.accountsByAccountTypes[action.payload.accountTypes] =
|
|
48
|
+
action.payload.accounts;
|
|
49
|
+
draft.accountsFetchStateByAccountTypes[action.payload.accountTypes] = {
|
|
50
|
+
fetchState: 'Completed',
|
|
51
|
+
error: undefined,
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
updateInvoicingQboAccountsFailure(draft, action) {
|
|
55
|
+
draft.accountsFetchStateByAccountTypes[action.payload.accountTypes] = {
|
|
56
|
+
fetchState: 'Error',
|
|
57
|
+
error: action.payload.status,
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
fetchInvoicingQboClasses(draft) {
|
|
61
|
+
draft.classesFetchState = { fetchState: 'In-Progress', error: undefined };
|
|
62
|
+
},
|
|
63
|
+
updateInvoicingQboClasses(draft, action) {
|
|
64
|
+
draft.classes = action.payload;
|
|
65
|
+
draft.classesFetchState = { fetchState: 'Completed', error: undefined };
|
|
66
|
+
},
|
|
67
|
+
updateInvoicingQboClassesFailure(draft, action) {
|
|
68
|
+
draft.classesFetchState = { fetchState: 'Error', error: action.payload };
|
|
69
|
+
},
|
|
70
|
+
fetchInvoicingQboSyncHealth(draft) {
|
|
71
|
+
draft.syncHealthFetchState = {
|
|
72
|
+
fetchState: 'In-Progress',
|
|
73
|
+
error: undefined,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
updateInvoicingQboSyncHealth(draft, action) {
|
|
77
|
+
draft.syncHealth = action.payload;
|
|
78
|
+
draft.syncHealthFetchState = { fetchState: 'Completed', error: undefined };
|
|
79
|
+
},
|
|
80
|
+
updateInvoicingQboSyncHealthFailure(draft, action) {
|
|
81
|
+
draft.syncHealthFetchState = {
|
|
82
|
+
fetchState: 'Error',
|
|
83
|
+
error: action.payload,
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
retryInvoicingQboSyncTask: {
|
|
87
|
+
reducer(draft, action) {
|
|
88
|
+
draft.retryFetchStateByTaskId[action.payload.taskId] = {
|
|
89
|
+
fetchState: 'In-Progress',
|
|
90
|
+
error: undefined,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
prepare(taskId) {
|
|
94
|
+
return { payload: { taskId } };
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
retryInvoicingQboSyncTaskSuccess(draft, action) {
|
|
98
|
+
draft.retryFetchStateByTaskId[action.payload.taskId] = {
|
|
99
|
+
fetchState: 'Completed',
|
|
100
|
+
error: undefined,
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
retryInvoicingQboSyncTaskFailure(draft, action) {
|
|
104
|
+
draft.retryFetchStateByTaskId[action.payload.taskId] = {
|
|
105
|
+
fetchState: 'Error',
|
|
106
|
+
error: action.payload.status,
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
startInvoicingQboBackfill: {
|
|
110
|
+
reducer(draft) {
|
|
111
|
+
draft.backfillFetchState = {
|
|
112
|
+
fetchState: 'In-Progress',
|
|
113
|
+
error: undefined,
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
prepare(startDate) {
|
|
117
|
+
return { payload: { startDate } };
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
startInvoicingQboBackfillSuccess(draft) {
|
|
121
|
+
draft.backfillFetchState = { fetchState: 'Completed', error: undefined };
|
|
122
|
+
},
|
|
123
|
+
startInvoicingQboBackfillFailure(draft, action) {
|
|
124
|
+
draft.backfillFetchState = { fetchState: 'Error', error: action.payload };
|
|
125
|
+
},
|
|
126
|
+
clearInvoicingQboView(draft) {
|
|
127
|
+
Object.assign(draft, exports.initialState);
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
_a = invoicingQboView.actions, exports.fetchInvoicingQboConnection = _a.fetchInvoicingQboConnection, exports.updateInvoicingQboConnection = _a.updateInvoicingQboConnection, exports.updateInvoicingQboConnectionFailure = _a.updateInvoicingQboConnectionFailure, exports.fetchInvoicingQboAccounts = _a.fetchInvoicingQboAccounts, exports.updateInvoicingQboAccounts = _a.updateInvoicingQboAccounts, exports.updateInvoicingQboAccountsFailure = _a.updateInvoicingQboAccountsFailure, exports.fetchInvoicingQboClasses = _a.fetchInvoicingQboClasses, exports.updateInvoicingQboClasses = _a.updateInvoicingQboClasses, exports.updateInvoicingQboClassesFailure = _a.updateInvoicingQboClassesFailure, exports.fetchInvoicingQboSyncHealth = _a.fetchInvoicingQboSyncHealth, exports.updateInvoicingQboSyncHealth = _a.updateInvoicingQboSyncHealth, exports.updateInvoicingQboSyncHealthFailure = _a.updateInvoicingQboSyncHealthFailure, exports.retryInvoicingQboSyncTask = _a.retryInvoicingQboSyncTask, exports.retryInvoicingQboSyncTaskSuccess = _a.retryInvoicingQboSyncTaskSuccess, exports.retryInvoicingQboSyncTaskFailure = _a.retryInvoicingQboSyncTaskFailure, exports.startInvoicingQboBackfill = _a.startInvoicingQboBackfill, exports.startInvoicingQboBackfillSuccess = _a.startInvoicingQboBackfillSuccess, exports.startInvoicingQboBackfillFailure = _a.startInvoicingQboBackfillFailure, exports.clearInvoicingQboView = _a.clearInvoicingQboView;
|
|
132
|
+
exports.default = invoicingQboView.reducer;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FetchStateAndError } from '../../../commonStateTypes/common';
|
|
2
|
+
import { RootState } from '../../../reducer';
|
|
3
|
+
import { InvoicingQboAccountOption, InvoicingQboConnection, InvoicingQboSyncHealth } from './invoicingQboViewPayload';
|
|
4
|
+
export interface InvoicingQboView {
|
|
5
|
+
accountsByAccountTypes: Record<string, InvoicingQboAccountOption[]>;
|
|
6
|
+
accountsFetchStateByAccountTypes: Record<string, FetchStateAndError>;
|
|
7
|
+
backfillState: FetchStateAndError;
|
|
8
|
+
classes: InvoicingQboAccountOption[];
|
|
9
|
+
classesFetchState: FetchStateAndError;
|
|
10
|
+
connectionFetchState: FetchStateAndError;
|
|
11
|
+
retryFetchStateByTaskId: Record<string, FetchStateAndError>;
|
|
12
|
+
syncHealthFetchState: FetchStateAndError;
|
|
13
|
+
connection?: InvoicingQboConnection;
|
|
14
|
+
syncHealth?: InvoicingQboSyncHealth;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Single bundled view for the QBO integration settings screen — the
|
|
18
|
+
* connection, per-account-types account options, classes, sync health, and the
|
|
19
|
+
* fetch/action states for each of them.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getInvoicingQboView: (state: RootState) => InvoicingQboView;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInvoicingQboView = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Single bundled view for the QBO integration settings screen — the
|
|
6
|
+
* connection, per-account-types account options, classes, sync health, and the
|
|
7
|
+
* fetch/action states for each of them.
|
|
8
|
+
*/
|
|
9
|
+
const getInvoicingQboView = (state) => {
|
|
10
|
+
const qboState = state.invoicingQboViewState;
|
|
11
|
+
return {
|
|
12
|
+
accountsByAccountTypes: qboState.accountsByAccountTypes,
|
|
13
|
+
accountsFetchStateByAccountTypes: qboState.accountsFetchStateByAccountTypes,
|
|
14
|
+
backfillState: qboState.backfillFetchState,
|
|
15
|
+
classes: qboState.classes,
|
|
16
|
+
classesFetchState: qboState.classesFetchState,
|
|
17
|
+
connection: qboState.connection,
|
|
18
|
+
connectionFetchState: qboState.connectionFetchState,
|
|
19
|
+
retryFetchStateByTaskId: qboState.retryFetchStateByTaskId,
|
|
20
|
+
syncHealth: qboState.syncHealth,
|
|
21
|
+
syncHealthFetchState: qboState.syncHealthFetchState,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.getInvoicingQboView = getInvoicingQboView;
|