@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,5 +1,3 @@
|
|
|
1
|
-
import { AccountBasePayload } from '../account/accountPayload';
|
|
2
|
-
import { AccountBase } from '../account/accountState';
|
|
3
1
|
import { AddressPayload } from '../address/addressPayload';
|
|
4
2
|
export type InvoicingPriceType = 'tax_exclusive' | 'tax_inclusive';
|
|
5
3
|
export declare const INVOICING_DUNNING_ACTIONS: readonly ["email_only", "email_and_retry", "do_nothing", "retry_only"];
|
|
@@ -94,38 +92,42 @@ export declare function toInvoicingQboCustomerMatchingMode(value: string): Invoi
|
|
|
94
92
|
* A mapped account as the newer settings payload returns it: the platform id,
|
|
95
93
|
* plus hydrated fields the client only displays.
|
|
96
94
|
*/
|
|
95
|
+
export interface InvoicingQboMappedAccountPayload {
|
|
96
|
+
account_id?: string | null;
|
|
97
|
+
account_name?: string | null;
|
|
98
|
+
fully_qualified_name?: string | null;
|
|
99
|
+
qbo_id?: string | null;
|
|
100
|
+
}
|
|
97
101
|
/**
|
|
98
|
-
* Account mappings
|
|
99
|
-
*
|
|
100
|
-
* `
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* An index signature rather than a field list, because the config owns which
|
|
105
|
-
* kinds exist: enumerating them here means a kind it adds gets dropped.
|
|
106
|
-
*/
|
|
107
|
-
export type InvoicingQboAccountMappingsPayload = Record<string, Partial<AccountBasePayload> | string | null>;
|
|
108
|
-
/**
|
|
109
|
-
* The first id a picker can actually select. Callers list the QuickBooks id
|
|
110
|
-
* first: the options are keyed on it, so a platform id selects nothing even when
|
|
111
|
-
* it names the same record. Blank counts as absent.
|
|
102
|
+
* Account mappings arrive in two shapes. The original sends a bare id per slot
|
|
103
|
+
* (`deposit_account_id`); the newer one sends an object holding the platform id
|
|
104
|
+
* (`deposit_account: {account_id}`). Both are declared because a tenant can be
|
|
105
|
+
* served either depending on when its backend rolled, and a page that understands
|
|
106
|
+
* only one renders an empty picker over data that exists.
|
|
112
107
|
*/
|
|
113
|
-
export
|
|
108
|
+
export interface InvoicingQboAccountMappingsPayload {
|
|
109
|
+
default_income_account?: InvoicingQboMappedAccountPayload | null;
|
|
110
|
+
default_income_account_id?: string | null;
|
|
111
|
+
deposit_account?: InvoicingQboMappedAccountPayload | null;
|
|
112
|
+
deposit_account_id?: string | null;
|
|
113
|
+
deposit_account_overrides?: Record<string, string> | null;
|
|
114
|
+
discounts_account?: InvoicingQboMappedAccountPayload | null;
|
|
115
|
+
discounts_account_id?: string | null;
|
|
116
|
+
rounding_account?: InvoicingQboMappedAccountPayload | null;
|
|
117
|
+
rounding_account_id?: string | null;
|
|
118
|
+
write_off_account?: InvoicingQboMappedAccountPayload | null;
|
|
119
|
+
write_off_account_id?: string | null;
|
|
120
|
+
}
|
|
114
121
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* the older `deposit_account_id` resolves to the same mapping.
|
|
122
|
+
* Read one account-mapping dropdown value by its config `code` (the codes in
|
|
123
|
+
* `qbo_account_mapping_kind_options` match the `account_mappings` field names).
|
|
118
124
|
*/
|
|
119
|
-
export declare const toInvoicingQboAccountMappingSlot: (code: string) => string;
|
|
120
|
-
/** Read one account-mapping dropdown value by its config `code`. */
|
|
121
125
|
export declare function getInvoicingQboAccountMappingId(accountMappings: InvoicingQboAccountMappingsPayload | undefined, code: string): string | undefined;
|
|
122
126
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* id that resolves to no account is sent as it stands rather than dropped, so a
|
|
126
|
-
* save never silently unsets a mapping it could not expand.
|
|
127
|
+
* Return a copy of the account mappings with the dropdown slot named by
|
|
128
|
+
* `code` set to `accountId`. Unknown codes leave the mappings unchanged.
|
|
127
129
|
*/
|
|
128
|
-
export declare
|
|
130
|
+
export declare function withInvoicingQboAccountMappingId(accountMappings: InvoicingQboAccountMappingsPayload | undefined, code: string, accountId: string): InvoicingQboAccountMappingsPayload;
|
|
129
131
|
export interface InvoicingQboSettingsPayload {
|
|
130
132
|
account_mappings?: InvoicingQboAccountMappingsPayload | null;
|
|
131
133
|
auto_create_items?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALL_INVOICING_FIELD_HELP_GROUPS = exports.
|
|
3
|
+
exports.ALL_INVOICING_FIELD_HELP_GROUPS = exports.INVOICING_QBO_CUSTOMER_MATCHING_MODES = exports.INVOICING_DISCOUNT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_PRODUCT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_ITEM_LIFECYCLE_ACTIONS = exports.INVOICING_SUBSCRIPTION_LIFECYCLE_ACTIONS = exports.INVOICING_DUNNING_ACTIONS = void 0;
|
|
4
4
|
exports.toInvoicingDunningAction = toInvoicingDunningAction;
|
|
5
5
|
exports.toInvoicingSubscriptionLifecycleAction = toInvoicingSubscriptionLifecycleAction;
|
|
6
6
|
exports.toInvoicingSubscriptionLifecycleActionOption = toInvoicingSubscriptionLifecycleActionOption;
|
|
@@ -12,6 +12,7 @@ exports.toInvoicingDiscountLifecycleAction = toInvoicingDiscountLifecycleAction;
|
|
|
12
12
|
exports.toInvoicingDiscountLifecycleActionOption = toInvoicingDiscountLifecycleActionOption;
|
|
13
13
|
exports.toInvoicingQboCustomerMatchingMode = toInvoicingQboCustomerMatchingMode;
|
|
14
14
|
exports.getInvoicingQboAccountMappingId = getInvoicingQboAccountMappingId;
|
|
15
|
+
exports.withInvoicingQboAccountMappingId = withInvoicingQboAccountMappingId;
|
|
15
16
|
exports.toInvoicingQboAccountMappingKindOption = toInvoicingQboAccountMappingKindOption;
|
|
16
17
|
exports.toInvoicingNamedOption = toInvoicingNamedOption;
|
|
17
18
|
exports.toInvoicingFormOption = toInvoicingFormOption;
|
|
@@ -22,7 +23,6 @@ exports.toInvoicingSubscriptionEditFieldOption = toInvoicingSubscriptionEditFiel
|
|
|
22
23
|
exports.toAuditLogEntityRouteOption = toAuditLogEntityRouteOption;
|
|
23
24
|
exports.buildInvoicingEntityPath = buildInvoicingEntityPath;
|
|
24
25
|
exports.isInvoicingEntityLinkable = isInvoicingEntityLinkable;
|
|
25
|
-
const accountPayload_1 = require("../account/accountPayload");
|
|
26
26
|
exports.INVOICING_DUNNING_ACTIONS = [
|
|
27
27
|
'email_only',
|
|
28
28
|
'email_and_retry',
|
|
@@ -154,49 +154,87 @@ function toInvoicingQboCustomerMatchingMode(value) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
|
-
* The
|
|
158
|
-
*
|
|
159
|
-
*
|
|
157
|
+
* The id for one mapping slot, from whichever shape the backend sent. The object
|
|
158
|
+
* form wins when present; a blank id in either is treated as unset so the picker
|
|
159
|
+
* shows its placeholder rather than selecting nothing.
|
|
160
160
|
*/
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
function readInvoicingQboMappedAccountId(mappedAccount, legacyAccountId) {
|
|
162
|
+
// `qbo_id` first: the pickers key their options on the QuickBooks id, so an
|
|
163
|
+
// internal `account_id` would not select anything even when it is the same
|
|
164
|
+
// account. Both are read because the mapping arrives either way depending on
|
|
165
|
+
// how it was saved.
|
|
166
|
+
const candidates = [
|
|
167
|
+
mappedAccount?.qbo_id,
|
|
168
|
+
mappedAccount?.account_id,
|
|
169
|
+
legacyAccountId,
|
|
170
|
+
];
|
|
171
|
+
return candidates.find((candidate) => candidate != null && candidate !== '');
|
|
172
|
+
}
|
|
163
173
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* the older `deposit_account_id` resolves to the same mapping.
|
|
174
|
+
* Read one account-mapping dropdown value by its config `code` (the codes in
|
|
175
|
+
* `qbo_account_mapping_kind_options` match the `account_mappings` field names).
|
|
167
176
|
*/
|
|
168
|
-
const toInvoicingQboAccountMappingSlot = (code) => code.replace(/_id$/, '');
|
|
169
|
-
exports.toInvoicingQboAccountMappingSlot = toInvoicingQboAccountMappingSlot;
|
|
170
|
-
/** Read one account-mapping dropdown value by its config `code`. */
|
|
171
177
|
function getInvoicingQboAccountMappingId(accountMappings, code) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
switch (code) {
|
|
179
|
+
case 'deposit_account_id':
|
|
180
|
+
return readInvoicingQboMappedAccountId(accountMappings?.deposit_account, accountMappings?.deposit_account_id);
|
|
181
|
+
case 'default_income_account_id':
|
|
182
|
+
return readInvoicingQboMappedAccountId(accountMappings?.default_income_account, accountMappings?.default_income_account_id);
|
|
183
|
+
case 'discounts_account_id':
|
|
184
|
+
return readInvoicingQboMappedAccountId(accountMappings?.discounts_account, accountMappings?.discounts_account_id);
|
|
185
|
+
case 'rounding_account_id':
|
|
186
|
+
return readInvoicingQboMappedAccountId(accountMappings?.rounding_account, accountMappings?.rounding_account_id);
|
|
187
|
+
case 'write_off_account_id':
|
|
188
|
+
return readInvoicingQboMappedAccountId(accountMappings?.write_off_account, accountMappings?.write_off_account_id);
|
|
189
|
+
default:
|
|
190
|
+
return undefined;
|
|
178
191
|
}
|
|
179
|
-
return (0, exports.firstSelectableInvoicingId)([slot?.qbo_id, slot?.account_id]);
|
|
180
192
|
}
|
|
181
193
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* id that resolves to no account is sent as it stands rather than dropped, so a
|
|
185
|
-
* save never silently unsets a mapping it could not expand.
|
|
194
|
+
* Return a copy of the account mappings with the dropdown slot named by
|
|
195
|
+
* `code` set to `accountId`. Unknown codes leave the mappings unchanged.
|
|
186
196
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
function withInvoicingQboAccountMappingId(accountMappings, code, accountId) {
|
|
198
|
+
// Both slots are written together. Setting only the bare id would leave the
|
|
199
|
+
// object shape behind, and the reader prefers it — so the selection just made
|
|
200
|
+
// would read back as whatever was mapped before. The object is dropped rather
|
|
201
|
+
// than rebuilt: only the id is known here, not the name that came with it.
|
|
202
|
+
const base = accountMappings ?? {};
|
|
203
|
+
switch (code) {
|
|
204
|
+
case 'deposit_account_id':
|
|
205
|
+
return {
|
|
206
|
+
...base,
|
|
207
|
+
deposit_account: undefined,
|
|
208
|
+
deposit_account_id: accountId,
|
|
209
|
+
};
|
|
210
|
+
case 'default_income_account_id':
|
|
211
|
+
return {
|
|
212
|
+
...base,
|
|
213
|
+
default_income_account: undefined,
|
|
214
|
+
default_income_account_id: accountId,
|
|
215
|
+
};
|
|
216
|
+
case 'discounts_account_id':
|
|
217
|
+
return {
|
|
218
|
+
...base,
|
|
219
|
+
discounts_account: undefined,
|
|
220
|
+
discounts_account_id: accountId,
|
|
221
|
+
};
|
|
222
|
+
case 'rounding_account_id':
|
|
223
|
+
return {
|
|
224
|
+
...base,
|
|
225
|
+
rounding_account: undefined,
|
|
226
|
+
rounding_account_id: accountId,
|
|
227
|
+
};
|
|
228
|
+
case 'write_off_account_id':
|
|
229
|
+
return {
|
|
230
|
+
...base,
|
|
231
|
+
write_off_account: undefined,
|
|
232
|
+
write_off_account_id: accountId,
|
|
233
|
+
};
|
|
234
|
+
default:
|
|
235
|
+
return base;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
200
238
|
function toInvoicingQboAccountMappingKindOption(option) {
|
|
201
239
|
return {
|
|
202
240
|
accountTypes: option.account_types,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { AccountBasePayload } from '../../account/accountPayload';
|
|
2
|
-
import { ClassBasePayload } from '../../class/classPayload';
|
|
3
1
|
import { InvoicingPlanTier, InvoicingProduct } from './productState';
|
|
4
2
|
export interface InvoicingPlanTierPayload {
|
|
5
3
|
price: number;
|
|
@@ -9,18 +7,10 @@ export interface InvoicingPlanTierPayload {
|
|
|
9
7
|
pricing_type?: string;
|
|
10
8
|
}
|
|
11
9
|
export interface InvoicingAccountingDetailPayload {
|
|
12
|
-
/**
|
|
13
|
-
* `account` and `accounting_class` hold whole records — what the service stores
|
|
14
|
-
* and what the catalog payload builder sends. The bare `accounting_code` /
|
|
15
|
-
* `accounting_category_1` are the older shape, still read so a plan saved
|
|
16
|
-
* before the rollover prefills.
|
|
17
|
-
*/
|
|
18
|
-
account?: Partial<AccountBasePayload> | null;
|
|
19
10
|
accounting_category_1?: string;
|
|
20
11
|
accounting_category_2?: string;
|
|
21
12
|
accounting_category_3?: string;
|
|
22
13
|
accounting_category_4?: string;
|
|
23
|
-
accounting_class?: Partial<ClassBasePayload> | null;
|
|
24
14
|
accounting_code?: string;
|
|
25
15
|
sku?: string;
|
|
26
16
|
}
|
|
@@ -4,7 +4,6 @@ exports.mapInvoicingProductPayloadToState = exports.mapInvoicingPlanTierPayloadT
|
|
|
4
4
|
const amount_1 = require("../../../commonStateTypes/amount");
|
|
5
5
|
const currencyHelper_1 = require("../../../commonStateTypes/currencyHelper");
|
|
6
6
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
7
|
-
const invoicingCommonPayload_1 = require("../invoicingCommonPayload");
|
|
8
7
|
// ── Payload → State mappers (snake_case wire shape → camelCase domain shape) ──
|
|
9
8
|
const mapInvoicingPlanTierPayloadToState = (payload, currencyCode, currencySymbol) => ({
|
|
10
9
|
price: (0, amount_1.toAmount)(payload.price, currencyCode, currencySymbol),
|
|
@@ -15,22 +14,11 @@ const mapInvoicingPlanTierPayloadToState = (payload, currencyCode, currencySymbo
|
|
|
15
14
|
});
|
|
16
15
|
exports.mapInvoicingPlanTierPayloadToState = mapInvoicingPlanTierPayloadToState;
|
|
17
16
|
const mapInvoicingAccountingDetailPayloadToState = (payload) => ({
|
|
18
|
-
|
|
19
|
-
// documents: the form's pickers are keyed on it, so reading the internal id
|
|
20
|
-
// would leave the field blank over a mapping that exists.
|
|
21
|
-
accountingCategory1: (0, invoicingCommonPayload_1.firstSelectableInvoicingId)([
|
|
22
|
-
payload.accounting_class?.qbo_id,
|
|
23
|
-
payload.accounting_class?.accounting_class_id,
|
|
24
|
-
payload.accounting_category_1,
|
|
25
|
-
]),
|
|
17
|
+
accountingCategory1: payload.accounting_category_1,
|
|
26
18
|
accountingCategory2: payload.accounting_category_2,
|
|
27
19
|
accountingCategory3: payload.accounting_category_3,
|
|
28
20
|
accountingCategory4: payload.accounting_category_4,
|
|
29
|
-
accountingCode:
|
|
30
|
-
payload.account?.qbo_id,
|
|
31
|
-
payload.account?.account_id,
|
|
32
|
-
payload.accounting_code,
|
|
33
|
-
]),
|
|
21
|
+
accountingCode: payload.accounting_code,
|
|
34
22
|
sku: payload.sku,
|
|
35
23
|
});
|
|
36
24
|
const mapInvoicingProductPayloadToState = (payload) => {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateJEScheduleKey = generateJEScheduleKey;
|
|
4
|
+
exports.generateJEOneTimeAccrualKey = generateJEOneTimeAccrualKey;
|
|
4
5
|
function generateJEScheduleKey(jeScheduleId, jeScheduleType) {
|
|
5
6
|
return `${jeScheduleId}_${jeScheduleType}`;
|
|
6
7
|
}
|
|
8
|
+
// Suffixed rather than using the bare Mongo _id so the key is a distinct type from
|
|
9
|
+
// JEScheduleKey / JEScheduleTransactionKey and the three cannot be passed interchangeably.
|
|
10
|
+
// The unsuffixed id stays on the entity as `accrualId` for callers that need it.
|
|
11
|
+
function generateJEOneTimeAccrualKey(accrualId) {
|
|
12
|
+
return `${accrualId}_one_time_accrual`;
|
|
13
|
+
}
|
|
@@ -7,7 +7,7 @@ import { TransactionIDPayload } from '../transaction/payloadTypes/transactionIDP
|
|
|
7
7
|
import { TransactionCategory } from '../transaction/stateTypes/transactionType';
|
|
8
8
|
import { UserPayload } from '../user/userPayload';
|
|
9
9
|
import { VendorPayload } from '../vendor/vendorPayload';
|
|
10
|
-
import { JEAccruedScheduledTransactionState, JEScheduledTransactionState, ScheduledJournalEntryState } from './jeSchedulesState';
|
|
10
|
+
import { JEAccruedScheduledTransactionState, JEOneTimeAccrualState, JEScheduledTransactionState, ScheduledJournalEntryState } from './jeSchedulesState';
|
|
11
11
|
import { JEScheduleKey, JEScheduleTransactionKey } from './jeSchedulesTypes';
|
|
12
12
|
export interface JEScheduleOtherAttributesPayload {
|
|
13
13
|
asset_id?: string | null;
|
|
@@ -19,14 +19,25 @@ export interface JEScheduleAISummaryFieldPayload {
|
|
|
19
19
|
cot?: string[];
|
|
20
20
|
predicted_value?: number | string;
|
|
21
21
|
}
|
|
22
|
+
/** The whole-recommendation summary. Carries narrative only -- no predicted value, no confidence. */
|
|
23
|
+
export interface JEScheduleSummaryPayload {
|
|
24
|
+
confidence?: number;
|
|
25
|
+
cot?: string[];
|
|
26
|
+
reasoning?: string;
|
|
27
|
+
reasoning_long?: string;
|
|
28
|
+
}
|
|
22
29
|
export interface JEScheduleAISummariesPayload {
|
|
23
30
|
credit_account?: JEScheduleAISummaryFieldPayload;
|
|
24
31
|
credit_accounting_class?: JEScheduleAISummaryFieldPayload;
|
|
25
32
|
debit_account?: JEScheduleAISummaryFieldPayload;
|
|
26
33
|
debit_accounting_class?: JEScheduleAISummaryFieldPayload;
|
|
34
|
+
end_date?: JEScheduleAISummaryFieldPayload;
|
|
27
35
|
period?: JEScheduleAISummaryFieldPayload;
|
|
28
36
|
posting_date?: JEScheduleAISummaryFieldPayload;
|
|
37
|
+
posting_start_date?: JEScheduleAISummaryFieldPayload;
|
|
38
|
+
schedule_summary?: JEScheduleSummaryPayload;
|
|
29
39
|
schedule_type?: JEScheduleAISummaryFieldPayload;
|
|
40
|
+
starting_month?: JEScheduleAISummaryFieldPayload;
|
|
30
41
|
}
|
|
31
42
|
export interface JEScheduleRecommendationsPayload {
|
|
32
43
|
credit_account_confidence?: number;
|
|
@@ -72,9 +83,13 @@ export interface JEScheduledTransactionPayload {
|
|
|
72
83
|
updated_by: UserPayload;
|
|
73
84
|
vendor: VendorPayload;
|
|
74
85
|
ai_summaries?: JEScheduleAISummariesPayload;
|
|
86
|
+
confidence_score?: number | null;
|
|
87
|
+
create_time?: string | null;
|
|
75
88
|
created_by?: UserPayload;
|
|
76
89
|
end_date?: string | null;
|
|
90
|
+
posted_count?: number | null;
|
|
77
91
|
recommendations?: JEScheduleRecommendationsPayload;
|
|
92
|
+
recurring_amount?: number | null;
|
|
78
93
|
updated_at?: string | null;
|
|
79
94
|
}
|
|
80
95
|
export interface JEAccruedScheduledTransactionPayload extends Omit<JEScheduledTransactionPayload, 'base_transaction' | 'je_schedule_id' | 'je_schedule_type'> {
|
|
@@ -84,6 +99,86 @@ export interface JEAccruedScheduledTransactionPayload extends Omit<JEScheduledTr
|
|
|
84
99
|
memo: string;
|
|
85
100
|
recurring_amount: number;
|
|
86
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* The frozen vendor profile the Cron used to decide an accrual, so the detail page can show its
|
|
104
|
+
* reasoning even after the live profile is rebuilt. Present on agent/Cron rows ONLY — a human-created
|
|
105
|
+
* accrual carries none, which is why every consumer has to treat it as absent rather than empty.
|
|
106
|
+
*/
|
|
107
|
+
export interface JEOneTimeAccrualProfileSnapshotPayload {
|
|
108
|
+
billing_pattern?: {
|
|
109
|
+
avg_amount?: number | null;
|
|
110
|
+
billing_lag_days?: number | null;
|
|
111
|
+
consistency_score?: number | null;
|
|
112
|
+
frequency?: string | null;
|
|
113
|
+
last_bill_amount?: number | null;
|
|
114
|
+
last_bill_date?: string | null;
|
|
115
|
+
months_of_history?: number | null;
|
|
116
|
+
typical_bill_day?: number | null;
|
|
117
|
+
} | null;
|
|
118
|
+
monthly_totals?: Record<string, number> | null;
|
|
119
|
+
sorted_months?: string[] | null;
|
|
120
|
+
}
|
|
121
|
+
/** The JE the AI originally suggested, frozen at draft time for suggested-vs-posted comparison. */
|
|
122
|
+
export interface JEOneTimeAccrualAiSuggestionPayload {
|
|
123
|
+
estimated_amount?: number | null;
|
|
124
|
+
je_credit_account_id?: ID | null;
|
|
125
|
+
je_credit_account_name?: string | null;
|
|
126
|
+
je_debit_account_id?: ID | null;
|
|
127
|
+
je_debit_account_name?: string | null;
|
|
128
|
+
memo?: string | null;
|
|
129
|
+
}
|
|
130
|
+
export interface JEOneTimeAccrualClearedPayload {
|
|
131
|
+
consumed_line_ids?: string[] | null;
|
|
132
|
+
match_shape?: string | null;
|
|
133
|
+
match_tier?: string | null;
|
|
134
|
+
matched_amount?: number | null;
|
|
135
|
+
matched_line_id?: string | null;
|
|
136
|
+
matched_transaction_id?: string | null;
|
|
137
|
+
matched_transaction_integration_id?: string | null;
|
|
138
|
+
matched_transaction_type?: string | null;
|
|
139
|
+
reversed_at?: string | null;
|
|
140
|
+
}
|
|
141
|
+
export interface JEOneTimeAccrualMatchSuggestionPayload {
|
|
142
|
+
matched_amount?: number | null;
|
|
143
|
+
matched_transaction_id?: string | null;
|
|
144
|
+
matched_transaction_integration_id?: string | null;
|
|
145
|
+
matched_transaction_type?: string | null;
|
|
146
|
+
resolution?: string | null;
|
|
147
|
+
}
|
|
148
|
+
export interface JEOneTimeAccrualPayload {
|
|
149
|
+
_id: ID;
|
|
150
|
+
estimated_amount: number;
|
|
151
|
+
origin: string;
|
|
152
|
+
service_month: string;
|
|
153
|
+
status: string;
|
|
154
|
+
vendor_id: ID;
|
|
155
|
+
vendor_name: string;
|
|
156
|
+
actual_post_date?: string | null;
|
|
157
|
+
actual_reversal_post_date?: string | null;
|
|
158
|
+
ai_suggestion?: JEOneTimeAccrualAiSuggestionPayload | null;
|
|
159
|
+
automation_tier?: string | null;
|
|
160
|
+
cleared?: JEOneTimeAccrualClearedPayload | null;
|
|
161
|
+
created_by_user?: UserPayload | null;
|
|
162
|
+
currency?: string | null;
|
|
163
|
+
expected_reversal_date?: string | null;
|
|
164
|
+
je_credit_account_id?: ID | null;
|
|
165
|
+
je_credit_account_name?: string | null;
|
|
166
|
+
je_credit_accounting_class_id?: ID | null;
|
|
167
|
+
je_credit_accounting_class_name?: string | null;
|
|
168
|
+
je_debit_account_id?: ID | null;
|
|
169
|
+
je_debit_account_name?: string | null;
|
|
170
|
+
je_debit_accounting_class_id?: ID | null;
|
|
171
|
+
je_debit_accounting_class_name?: string | null;
|
|
172
|
+
match_suggestion?: JEOneTimeAccrualMatchSuggestionPayload | null;
|
|
173
|
+
memo?: string | null;
|
|
174
|
+
posting_date?: string | null;
|
|
175
|
+
profile_snapshot?: JEOneTimeAccrualProfileSnapshotPayload | null;
|
|
176
|
+
reversal_policy?: string | null;
|
|
177
|
+
reversal_transaction_id?: ID | null;
|
|
178
|
+
reversal_trigger?: string | null;
|
|
179
|
+
transaction_id?: ID | null;
|
|
180
|
+
transaction_integration_id?: ID | null;
|
|
181
|
+
}
|
|
87
182
|
export interface ScheduledJournalEntryPayload {
|
|
88
183
|
actual_post_date: string | null;
|
|
89
184
|
create_time: string | null;
|
|
@@ -114,3 +209,4 @@ export declare function getJEScheduleTransactionDetailKeyPayload(payload: Schedu
|
|
|
114
209
|
export declare function getJEScheduleKey(payload: JEAccruedScheduledTransactionPayload): JEScheduleKey;
|
|
115
210
|
export declare function toJEScheduledTransaction(payload: JEScheduledTransactionPayload): JEScheduledTransactionState;
|
|
116
211
|
export declare function toJEAccruedScheduledTransaction(payload: JEAccruedScheduledTransactionPayload): JEAccruedScheduledTransactionState;
|
|
212
|
+
export declare function toJEOneTimeAccrual(payload: JEOneTimeAccrualPayload): JEOneTimeAccrualState;
|