@zeniai/client-epic-state 5.2.11-beta0ND → 5.2.11-betaAM2
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/entity/invoicing/invoicingCommonPayload.d.ts +29 -27
- package/lib/entity/invoicing/invoicingCommonPayload.js +75 -37
- package/lib/entity/invoicing/product/productPayload.d.ts +0 -10
- package/lib/entity/invoicing/product/productPayload.js +2 -14
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +1 -0
- package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +97 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +209 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -2
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +30 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +11 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +38 -3
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +140 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +24 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +88 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
- package/lib/epic.d.ts +15 -3
- package/lib/epic.js +31 -12
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +73 -33
- package/lib/esm/entity/invoicing/product/productPayload.js +2 -14
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +209 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +30 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +36 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +78 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/esm/epic.js +27 -8
- package/lib/esm/index.js +23 -14
- package/lib/esm/reducer.js +3 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +46 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +7 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +50 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +44 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +44 -0
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +30 -10
- package/lib/esm/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +9 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +41 -5
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +45 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +104 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +136 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +79 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +180 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +111 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +33 -0
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +22 -7
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
- package/lib/esm/view/expenseAutomationView/payload/actualMatchingPayload.js +35 -0
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +55 -0
- package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +260 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +319 -29
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +162 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +106 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +297 -22
- package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +22 -0
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -5
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +9 -25
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +1 -6
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +0 -40
- package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +92 -0
- package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +1 -25
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +0 -41
- package/lib/esm/view/recommendation/recommendationReducer.js +1 -16
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
- package/lib/index.d.ts +29 -22
- package/lib/index.js +116 -56
- package/lib/reducer.d.ts +1 -0
- package/lib/reducer.js +3 -0
- package/lib/rootStateTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +50 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.d.ts +5 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +11 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +54 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +48 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +48 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +30 -10
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +9 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +3 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +39 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +21 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +49 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +108 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +29 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +140 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +83 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +13 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +187 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +65 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +115 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +37 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +22 -7
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +66 -0
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.js +40 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +86 -3
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -1
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +53 -0
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +264 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +93 -12
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +321 -29
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +58 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +42 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +36 -7
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +9 -0
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +172 -0
- package/lib/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +21 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +112 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +34 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +305 -21
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +76 -0
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +27 -0
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +83 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +11 -7
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +1 -12
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +9 -25
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +1 -6
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +1 -10
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +1 -43
- package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +12 -0
- package/lib/view/invoicing/settingsView/settingsViewEpics.js +99 -0
- package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +1 -4
- package/lib/view/invoicing/settingsView/settingsViewReducer.js +2 -26
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +0 -35
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +1 -43
- package/lib/view/invoicing/settingsView/settingsViewState.d.ts +0 -8
- package/lib/view/recommendation/recommendationPayload.d.ts +0 -34
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -2
- package/lib/view/recommendation/recommendationReducer.js +2 -17
- package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +4 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
- package/package.json +1 -1
- package/lib/esm/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.js +0 -27
- package/lib/esm/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.js +0 -19
- package/lib/esm/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.js +0 -19
- package/lib/esm/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.js +0 -39
- package/lib/esm/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.js +0 -25
- package/lib/esm/view/invoicing/settingsView/invoicingQboSettingsFormConfig.js +0 -48
- package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +0 -52
- package/lib/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.js +0 -31
- package/lib/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.js +0 -23
- package/lib/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.js +0 -23
- package/lib/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.js +0 -43
- package/lib/view/invoicing/settingsView/epics/settingsViewActionType.d.ts +0 -5
- package/lib/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.d.ts +0 -11
- package/lib/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.js +0 -29
- package/lib/view/invoicing/settingsView/invoicingQboSettingsFormConfig.d.ts +0 -34
- package/lib/view/invoicing/settingsView/invoicingQboSettingsFormConfig.js +0 -53
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +0 -7
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +0 -56
- /package/lib/esm/view/{invoicing/settingsView/epics/settingsViewActionType.js → expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js} +0 -0
- /package/lib/view/{invoicing/settingsView/epics/settingsViewActionType.js → expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js} +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../rootStateTypes';
|
|
4
|
-
import { InvoicingSettingsViewActionType } from './settingsViewActionType';
|
|
5
|
-
/**
|
|
6
|
-
* Saves the QBO local data. The screen fires this without a payload — the local
|
|
7
|
-
* data is already in the store, so sending it back through the action would make
|
|
8
|
-
* the page the carrier for state it does not own. Converting to the request body
|
|
9
|
-
* happens here too, keeping the wire shape out of the screen.
|
|
10
|
-
*/
|
|
11
|
-
export declare const submitInvoicingQboSettingsEpic: (actions$: ActionsObservable<InvoicingSettingsViewActionType>, state$: StateObservable<RootState>) => Observable<InvoicingSettingsViewActionType>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitInvoicingQboSettingsEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const invoicingQboViewSelector_1 = require("../../invoicingQboView/invoicingQboViewSelector");
|
|
7
|
-
const invoicingQboSettingsFormConfig_1 = require("../invoicingQboSettingsFormConfig");
|
|
8
|
-
const settingsViewReducer_1 = require("../settingsViewReducer");
|
|
9
|
-
/**
|
|
10
|
-
* Saves the QBO local data. The screen fires this without a payload — the local
|
|
11
|
-
* data is already in the store, so sending it back through the action would make
|
|
12
|
-
* the page the carrier for state it does not own. Converting to the request body
|
|
13
|
-
* happens here too, keeping the wire shape out of the screen.
|
|
14
|
-
*/
|
|
15
|
-
const submitInvoicingQboSettingsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.submitInvoicingQboSettings.match), (0, operators_1.withLatestFrom)(state$), (0, operators_1.mergeMap)(([, state]) => {
|
|
16
|
-
const { qboDraft } = state.invoicingSettingsViewState;
|
|
17
|
-
// No local data means the settings response has not landed, so there is
|
|
18
|
-
// nothing the user could have edited yet.
|
|
19
|
-
if (qboDraft == null) {
|
|
20
|
-
return rxjs_1.EMPTY;
|
|
21
|
-
}
|
|
22
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.saveInvoicingSettings)({
|
|
23
|
-
settings: {
|
|
24
|
-
qbo: (0, invoicingQboSettingsFormConfig_1.invoicingQboSettingsLocalDataToPayload)(qboDraft, (accountId) => (0, invoicingQboViewSelector_1.invoicingQboAccountByQboId)(state, accountId)),
|
|
25
|
-
},
|
|
26
|
-
snackbarSection: 'invoicing_qbo_settings_save',
|
|
27
|
-
}));
|
|
28
|
-
}));
|
|
29
|
-
exports.submitInvoicingQboSettingsEpic = submitInvoicingQboSettingsEpic;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AccountBase } from '../../../entity/account/accountState';
|
|
2
|
-
import { InvoicingQboSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
-
/**
|
|
4
|
-
* The QBO configuration page's local data. A client shape, not the wire one: the
|
|
5
|
-
* page edits a flat `accountIdByMappingCode` map keyed by the config's mapping
|
|
6
|
-
* codes, where the payload carries one field pair per slot and two shapes for
|
|
7
|
-
* each. {@link entityToInvoicingQboSettingsLocalData} and
|
|
8
|
-
* {@link invoicingQboSettingsLocalDataToPayload} convert at the boundary.
|
|
9
|
-
*/
|
|
10
|
-
export interface InvoicingQboSettingsLocalData {
|
|
11
|
-
/**
|
|
12
|
-
* Mapping code to the QuickBooks account id the picker selected. Keyed by the
|
|
13
|
-
* config's own codes rather than a client-side list: the backend owns which
|
|
14
|
-
* slots exist, so anything narrower silently drops the ones it has not heard
|
|
15
|
-
* of.
|
|
16
|
-
*/
|
|
17
|
-
accountIdByMappingCode: Record<string, string>;
|
|
18
|
-
autoCreateItems: boolean;
|
|
19
|
-
closedPeriodVoidAsCreditMemo: boolean;
|
|
20
|
-
customerMatching: string;
|
|
21
|
-
isSyncEnabled: boolean;
|
|
22
|
-
/** ISO date, empty when unset — the picker clears to empty, not to null. */
|
|
23
|
-
syncStartDate: string;
|
|
24
|
-
trackingCategoriesEnabled: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare const initialInvoicingQboSettingsLocalData: InvoicingQboSettingsLocalData;
|
|
27
|
-
/** The settings response as the page edits it. */
|
|
28
|
-
export declare const entityToInvoicingQboSettingsLocalData: (qbo: InvoicingQboSettingsPayload | null | undefined) => InvoicingQboSettingsLocalData;
|
|
29
|
-
/**
|
|
30
|
-
* The local data as the request body. `accountForId` turns each picked id into
|
|
31
|
-
* the whole account the service stores; it comes from the epic, which is where
|
|
32
|
-
* the account list is in reach.
|
|
33
|
-
*/
|
|
34
|
-
export declare const invoicingQboSettingsLocalDataToPayload: (localData: InvoicingQboSettingsLocalData, accountForId: (accountId: string) => AccountBase | undefined) => InvoicingQboSettingsPayload;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.invoicingQboSettingsLocalDataToPayload = exports.entityToInvoicingQboSettingsLocalData = exports.initialInvoicingQboSettingsLocalData = void 0;
|
|
4
|
-
const invoicingCommonPayload_1 = require("../../../entity/invoicing/invoicingCommonPayload");
|
|
5
|
-
exports.initialInvoicingQboSettingsLocalData = {
|
|
6
|
-
accountIdByMappingCode: {},
|
|
7
|
-
autoCreateItems: false,
|
|
8
|
-
closedPeriodVoidAsCreditMemo: false,
|
|
9
|
-
customerMatching: '',
|
|
10
|
-
isSyncEnabled: false,
|
|
11
|
-
syncStartDate: '',
|
|
12
|
-
trackingCategoriesEnabled: false,
|
|
13
|
-
};
|
|
14
|
-
/** The settings response as the page edits it. */
|
|
15
|
-
const entityToInvoicingQboSettingsLocalData = (qbo) => {
|
|
16
|
-
const accountMappings = qbo?.account_mappings ?? {};
|
|
17
|
-
const accountIdByMappingCode = {};
|
|
18
|
-
// Keyed by the slot the payload used, which is the config code the page will
|
|
19
|
-
// ask for — the reader tolerates the older `_id` form on the way in.
|
|
20
|
-
Object.keys(accountMappings).forEach((key) => {
|
|
21
|
-
const accountId = (0, invoicingCommonPayload_1.getInvoicingQboAccountMappingId)(accountMappings, key);
|
|
22
|
-
if (accountId != null) {
|
|
23
|
-
accountIdByMappingCode[(0, invoicingCommonPayload_1.toInvoicingQboAccountMappingSlot)(key)] = accountId;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
accountIdByMappingCode,
|
|
28
|
-
autoCreateItems: qbo?.auto_create_items === true,
|
|
29
|
-
closedPeriodVoidAsCreditMemo: qbo?.closed_period_void_as_credit_memo === true,
|
|
30
|
-
customerMatching: qbo?.customer_matching ?? '',
|
|
31
|
-
isSyncEnabled: qbo?.enabled === true,
|
|
32
|
-
syncStartDate: qbo?.sync_start_date ?? '',
|
|
33
|
-
trackingCategoriesEnabled: qbo?.tracking_categories_enabled === true,
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
exports.entityToInvoicingQboSettingsLocalData = entityToInvoicingQboSettingsLocalData;
|
|
37
|
-
/**
|
|
38
|
-
* The local data as the request body. `accountForId` turns each picked id into
|
|
39
|
-
* the whole account the service stores; it comes from the epic, which is where
|
|
40
|
-
* the account list is in reach.
|
|
41
|
-
*/
|
|
42
|
-
const invoicingQboSettingsLocalDataToPayload = (localData, accountForId) => {
|
|
43
|
-
return {
|
|
44
|
-
account_mappings: (0, invoicingCommonPayload_1.toInvoicingQboAccountMappingsPayload)(localData.accountIdByMappingCode, accountForId),
|
|
45
|
-
auto_create_items: localData.autoCreateItems,
|
|
46
|
-
closed_period_void_as_credit_memo: localData.closedPeriodVoidAsCreditMemo,
|
|
47
|
-
customer_matching: localData.customerMatching,
|
|
48
|
-
enabled: localData.isSyncEnabled,
|
|
49
|
-
sync_start_date: localData.syncStartDate !== '' ? localData.syncStartDate : null,
|
|
50
|
-
tracking_categories_enabled: localData.trackingCategoriesEnabled,
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
exports.invoicingQboSettingsLocalDataToPayload = invoicingQboSettingsLocalDataToPayload;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../zeniAPI';
|
|
5
|
-
import { submitRecommendationFeedback } from './recommendationReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof submitRecommendationFeedback>;
|
|
7
|
-
export declare const submitRecommendationFeedbackEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitRecommendationFeedbackEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../responsePayload");
|
|
7
|
-
const recommendationReducer_1 = require("./recommendationReducer");
|
|
8
|
-
const toRequestBody = (payload) => ({
|
|
9
|
-
line_id: payload.lineId ?? null,
|
|
10
|
-
dimension: payload.dimension,
|
|
11
|
-
recommendation_set_id: payload.recommendationSetId ?? null,
|
|
12
|
-
top_pick_source: payload.topPickSource ?? null,
|
|
13
|
-
shown_recommendations: (payload.shownRecommendations ?? []).map((recommendation) => ({
|
|
14
|
-
source: recommendation.source,
|
|
15
|
-
rank: recommendation.rank,
|
|
16
|
-
value: {
|
|
17
|
-
name: recommendation.value.name,
|
|
18
|
-
id: recommendation.value.id ?? null,
|
|
19
|
-
integration_id: recommendation.value.integrationId ?? null,
|
|
20
|
-
},
|
|
21
|
-
confidence: recommendation.confidence ?? null,
|
|
22
|
-
reasoning: recommendation.reasoning ?? null,
|
|
23
|
-
cot: recommendation.cot ?? [],
|
|
24
|
-
})),
|
|
25
|
-
selected: {
|
|
26
|
-
name: payload.selected.name,
|
|
27
|
-
id: payload.selected.id ?? null,
|
|
28
|
-
integration_id: payload.selected.integrationId ?? null,
|
|
29
|
-
is_new_entity: payload.selected.isNewEntity ?? false,
|
|
30
|
-
},
|
|
31
|
-
matched_source: payload.matchedSource ?? null,
|
|
32
|
-
matched_rank: payload.matchedRank ?? null,
|
|
33
|
-
outcome: payload.outcome,
|
|
34
|
-
reason_text: payload.reasonText ?? null,
|
|
35
|
-
skipped: payload.skipped ?? false,
|
|
36
|
-
retracts_feedback_id: payload.retractsFeedbackId ?? null,
|
|
37
|
-
features: payload.features ?? null,
|
|
38
|
-
});
|
|
39
|
-
// Fire-and-forget: the epic never re-emits an action. Feedback delivery is a
|
|
40
|
-
// side-effect that must not disrupt the categorization UX, so both the
|
|
41
|
-
// success and error paths complete silently (errors are logged for debugging).
|
|
42
|
-
const submitRecommendationFeedbackEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(recommendationReducer_1.submitRecommendationFeedback.match), (0, operators_1.mergeMap)((action) => {
|
|
43
|
-
const { transactionId } = action.payload;
|
|
44
|
-
return zeniAPI
|
|
45
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions/${transactionId}/recommendation-feedback`, toRequestBody(action.payload))
|
|
46
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
47
|
-
if (!(0, responsePayload_1.isSuccessStatus)(response)) {
|
|
48
|
-
console.error('submitRecommendationFeedbackEpic: recommendation feedback was not recorded', response.status);
|
|
49
|
-
}
|
|
50
|
-
return rxjs_1.EMPTY;
|
|
51
|
-
}), (0, operators_1.catchError)((error) => {
|
|
52
|
-
console.error('submitRecommendationFeedbackEpic: failed to submit recommendation feedback', error);
|
|
53
|
-
return rxjs_1.EMPTY;
|
|
54
|
-
}));
|
|
55
|
-
}));
|
|
56
|
-
exports.submitRecommendationFeedbackEpic = submitRecommendationFeedbackEpic;
|
|
File without changes
|