@zeniai/client-epic-state 5.2.51-betaRD1 → 5.2.51

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.
Files changed (70) hide show
  1. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +1 -4
  2. package/lib/entity/jeSchedules/jeSchedulesReducer.js +5 -47
  3. package/lib/epic.d.ts +1 -2
  4. package/lib/epic.js +4 -6
  5. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +4 -46
  6. package/lib/esm/epic.js +4 -6
  7. package/lib/esm/index.js +3 -3
  8. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +1 -9
  9. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +13 -10
  10. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +15 -29
  11. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +1 -12
  12. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -60
  13. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +11 -11
  14. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +45 -21
  15. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +4 -1
  16. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +16 -3
  17. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +6 -2
  18. package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +4 -1
  19. package/lib/esm/view/invoicing/editInvoicingCouponDetailView/seedInvoicingCouponFormDraftEpic.js +6 -2
  20. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +10 -2
  21. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +33 -0
  22. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +43 -17
  23. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraftEpic.js +6 -2
  24. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.js +10 -2
  25. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +34 -0
  26. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +44 -18
  27. package/lib/esm/view/invoicing/invoicingFormDraft.js +13 -0
  28. package/lib/index.d.ts +3 -3
  29. package/lib/index.js +49 -50
  30. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -2
  31. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +0 -8
  32. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +11 -8
  33. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +15 -29
  34. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
  35. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +1 -12
  36. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -18
  37. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -8
  38. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +3 -62
  39. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  40. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +11 -11
  41. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -15
  42. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +22 -6
  43. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +47 -22
  44. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +3 -0
  45. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +14 -1
  46. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +6 -2
  47. package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +3 -0
  48. package/lib/view/invoicing/editInvoicingCouponDetailView/seedInvoicingCouponFormDraftEpic.js +6 -2
  49. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +3 -1
  50. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +10 -2
  51. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +7 -7
  52. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +33 -0
  53. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +6 -0
  54. package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.d.ts +15 -10
  55. package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +42 -16
  56. package/lib/view/invoicing/editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraftEpic.js +6 -2
  57. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.d.ts +3 -1
  58. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.js +10 -2
  59. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +7 -0
  60. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +34 -0
  61. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +6 -0
  62. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.d.ts +15 -11
  63. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +42 -16
  64. package/lib/view/invoicing/invoicingFormDraft.d.ts +10 -1
  65. package/lib/view/invoicing/invoicingFormDraft.js +14 -0
  66. package/package.json +1 -1
  67. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +0 -40
  68. package/lib/tsconfig.mocks.tsbuildinfo +0 -1
  69. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.d.ts +0 -20
  70. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +0 -44
@@ -1,20 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { updateJESchedules, updateJESchedulesDetails } from '../../../../entity/jeSchedules/jeSchedulesReducer';
4
- import { clearAll } from '../../../../rootActions';
5
- import { RootState } from '../../../../rootStateTypes';
6
- import { ZeniAPI } from '../../../../zeniAPI';
7
- import { fetchFailedJePostings, fetchFailedJePostingsFailure, fetchFailedJePostingsSuccess, initializeJeScheduleLocalData } from '../../reducers/jeSchedulesViewReducer';
8
- export type ActionType = ReturnType<typeof clearAll> | ReturnType<typeof fetchFailedJePostings> | ReturnType<typeof fetchFailedJePostingsFailure> | ReturnType<typeof fetchFailedJePostingsSuccess> | ReturnType<typeof initializeJeScheduleLocalData> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateJESchedulesDetails>;
9
- /**
10
- * Fetches every currently-failing posting for the tenant, on its own endpoint and with no window.
11
- *
12
- * Sends no query at all. The endpoint takes an optional `expected_post_start_date` floor and the
13
- * client deliberately omits it: a failure is outstanding work until someone resolves it, whatever
14
- * month it belongs to, and windowing this list is exactly what kept older failures off the only
15
- * screen that can resolve them.
16
- *
17
- * `switchMap`, not `mergeMap`: there is one list per tenant, so a second trigger supersedes the
18
- * first rather than racing it.
19
- */
20
- export declare const fetchFailedJePostingsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchFailedJePostingsEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const jeSchedulesReducer_1 = require("../../../../entity/jeSchedules/jeSchedulesReducer");
7
- const responsePayload_1 = require("../../../../responsePayload");
8
- const rootActions_1 = require("../../../../rootActions");
9
- const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
10
- /**
11
- * Fetches every currently-failing posting for the tenant, on its own endpoint and with no window.
12
- *
13
- * Sends no query at all. The endpoint takes an optional `expected_post_start_date` floor and the
14
- * client deliberately omits it: a failure is outstanding work until someone resolves it, whatever
15
- * month it belongs to, and windowing this list is exactly what kept older failures off the only
16
- * screen that can resolve them.
17
- *
18
- * `switchMap`, not `mergeMap`: there is one list per tenant, so a second trigger supersedes the
19
- * first rather than racing it.
20
- */
21
- const fetchFailedJePostingsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.fetchFailedJePostings.match), (0, operators_1.switchMap)(() => zeniAPI
22
- .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expenses_automation/failed_je_postings`)
23
- .pipe((0, operators_1.switchMap)((response) => {
24
- if (!(0, responsePayload_1.isSuccessResponse)(response) || response.data == null) {
25
- return (0, rxjs_1.of)((0, jeSchedulesViewReducer_1.fetchFailedJePostingsFailure)(response.status));
26
- }
27
- const failedJeSchedules = response.data.failed_je_postings?.je_schedules ?? [];
28
- const failedScheduledJournalEntries = response.data.failed_je_postings?.scheduled_journal_entries ?? [];
29
- // Order matters and matches fetchJeSchedulesEpic: updateJESchedules fans out to the
30
- // vendor / account / class / user entities, updateJESchedulesDetails then attaches the
31
- // journal entries, and only then can initializeJeScheduleLocalData read them back.
32
- return (0, rxjs_1.from)([
33
- (0, jeSchedulesReducer_1.updateJESchedules)(failedJeSchedules),
34
- (0, jeSchedulesReducer_1.updateJESchedulesDetails)(failedJeSchedules, failedScheduledJournalEntries),
35
- (0, jeSchedulesViewReducer_1.initializeJeScheduleLocalData)(failedJeSchedules),
36
- (0, jeSchedulesViewReducer_1.fetchFailedJePostingsSuccess)(failedJeSchedules),
37
- ]);
38
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, jeSchedulesViewReducer_1.fetchFailedJePostingsFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'fetch failed JE postings REST API call errored out' +
39
- JSON.stringify(error))))),
40
- // A tenant switch clears the store while this request is still in flight. Without this
41
- // the old tenant's rows are written back into the freshly cleared store and stay on
42
- // screen under the new tenant until a manual refresh.
43
- (0, operators_1.takeUntil)(actions$.pipe((0, operators_1.filter)(rootActions_1.clearAll.match))))));
44
- exports.fetchFailedJePostingsEpic = fetchFailedJePostingsEpic;