@zeniai/client-epic-state 5.2.31 → 5.2.32-betaAK0

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 (120) hide show
  1. package/lib/epic.d.ts +6 -6
  2. package/lib/epic.js +7 -8
  3. package/lib/esm/epic.js +6 -7
  4. package/lib/esm/index.js +9 -10
  5. package/lib/esm/reducer.js +12 -12
  6. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +29 -11
  7. package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +1 -1
  8. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +1 -1
  9. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +1 -24
  10. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +10 -36
  11. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogSubFamilyEpics.js +2 -21
  12. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +11 -33
  13. package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +9 -1
  14. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +2 -0
  15. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +1 -1
  16. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +15 -0
  17. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.js +1 -1
  18. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +1 -1
  19. package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewEpics.js} +1 -1
  20. package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewReducer.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewReducer.js} +4 -4
  21. package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector.js} +2 -4
  22. package/lib/esm/view/invoicing/{invoicingCouponDetailView → invoicingCouponRecordView}/fetchInvoicingCouponDetailEpic.js +1 -1
  23. package/lib/esm/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewReducer.js → invoicingCouponRecordView/invoicingCouponRecordViewReducer.js} +4 -4
  24. package/lib/esm/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewSelector.js → invoicingCouponRecordView/invoicingCouponRecordViewSelector.js} +2 -2
  25. package/lib/esm/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailEpic.js +1 -1
  26. package/lib/esm/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailPageEpic.js +2 -2
  27. package/lib/esm/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewReducer.js → invoicingCustomerRecordView/invoicingCustomerRecordViewReducer.js} +4 -4
  28. package/lib/esm/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js → invoicingCustomerRecordView/invoicingCustomerRecordViewSelector.js} +3 -3
  29. package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewEpics.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewEpics.js} +1 -1
  30. package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewReducer.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewReducer.js} +4 -4
  31. package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewSelector.js} +2 -2
  32. package/lib/esm/view/invoicing/promotionalCreditAction/promotionalCreditActionEpic.js +1 -1
  33. package/lib/index.d.ts +15 -17
  34. package/lib/index.js +23 -32
  35. package/lib/reducer.d.ts +4 -4
  36. package/lib/reducer.js +12 -12
  37. package/lib/rootStateTypes.d.ts +8 -8
  38. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +29 -11
  39. package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +2 -2
  40. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.d.ts +1 -1
  41. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +2 -2
  42. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +1 -1
  43. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +1 -1
  44. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.d.ts +3 -19
  45. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +2 -25
  46. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +11 -11
  47. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +11 -38
  48. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewState.d.ts +4 -27
  49. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogSubFamilyEpics.d.ts +2 -3
  50. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogSubFamilyEpics.js +2 -22
  51. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +2 -2
  52. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +9 -31
  53. package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +12 -1
  54. package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +9 -1
  55. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +8 -0
  56. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +2 -0
  57. package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.d.ts +1 -1
  58. package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +2 -2
  59. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +11 -2
  60. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +15 -0
  61. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.d.ts +1 -1
  62. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.js +2 -2
  63. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.d.ts +1 -1
  64. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +2 -2
  65. package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewEpics.d.ts} +1 -1
  66. package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewEpics.js} +5 -5
  67. package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewReducer.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewReducer.d.ts} +5 -5
  68. package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewReducer.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewReducer.js} +4 -4
  69. package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector.d.ts} +3 -5
  70. package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector.js} +4 -6
  71. package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState.d.ts} +1 -1
  72. package/lib/view/invoicing/{invoicingCouponDetailView → invoicingCouponRecordView}/fetchInvoicingCouponDetailEpic.d.ts +1 -1
  73. package/lib/view/invoicing/{invoicingCouponDetailView → invoicingCouponRecordView}/fetchInvoicingCouponDetailEpic.js +5 -5
  74. package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewReducer.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewReducer.d.ts} +6 -6
  75. package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewReducer.js → invoicingCouponRecordView/invoicingCouponRecordViewReducer.js} +4 -4
  76. package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewSelector.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewSelector.d.ts} +2 -2
  77. package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewSelector.js → invoicingCouponRecordView/invoicingCouponRecordViewSelector.js} +4 -4
  78. package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewState.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewState.d.ts} +1 -1
  79. package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailEpic.d.ts +1 -1
  80. package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailEpic.js +5 -5
  81. package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailPageEpic.d.ts +1 -1
  82. package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailPageEpic.js +4 -4
  83. package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewReducer.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewReducer.d.ts} +7 -7
  84. package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewReducer.js → invoicingCustomerRecordView/invoicingCustomerRecordViewReducer.js} +4 -4
  85. package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewSelector.d.ts} +2 -2
  86. package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js → invoicingCustomerRecordView/invoicingCustomerRecordViewSelector.js} +5 -5
  87. package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewState.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewState.d.ts} +1 -1
  88. package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewEpics.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewEpics.d.ts} +1 -1
  89. package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewEpics.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewEpics.js} +5 -5
  90. package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewReducer.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewReducer.d.ts} +5 -5
  91. package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewReducer.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewReducer.js} +4 -4
  92. package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewSelector.d.ts} +2 -2
  93. package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewSelector.js} +4 -4
  94. package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewState.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewState.d.ts} +1 -1
  95. package/lib/view/invoicing/promotionalCreditAction/promotionalCreditActionEpic.d.ts +1 -1
  96. package/lib/view/invoicing/promotionalCreditAction/promotionalCreditActionEpic.js +2 -2
  97. package/package.json +71 -38
  98. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +0 -191
  99. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +0 -46
  100. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +0 -198
  101. /package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewPayload.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewPayload.js} +0 -0
  102. /package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState.js} +0 -0
  103. /package/lib/esm/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewPayload.js → invoicingCouponRecordView/invoicingCouponRecordViewPayload.js} +0 -0
  104. /package/lib/esm/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewState.js → invoicingCouponRecordView/invoicingCouponRecordViewState.js} +0 -0
  105. /package/lib/esm/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewPayload.js → invoicingCustomerRecordView/invoicingCustomerRecordViewPayload.js} +0 -0
  106. /package/lib/esm/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewState.js → invoicingCustomerRecordView/invoicingCustomerRecordViewState.js} +0 -0
  107. /package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewPayload.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewPayload.js} +0 -0
  108. /package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewState.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewState.js} +0 -0
  109. /package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewPayload.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewPayload.d.ts} +0 -0
  110. /package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewPayload.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewPayload.js} +0 -0
  111. /package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState.js} +0 -0
  112. /package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewPayload.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewPayload.d.ts} +0 -0
  113. /package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewPayload.js → invoicingCouponRecordView/invoicingCouponRecordViewPayload.js} +0 -0
  114. /package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewState.js → invoicingCouponRecordView/invoicingCouponRecordViewState.js} +0 -0
  115. /package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewPayload.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewPayload.d.ts} +0 -0
  116. /package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewPayload.js → invoicingCustomerRecordView/invoicingCustomerRecordViewPayload.js} +0 -0
  117. /package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewState.js → invoicingCustomerRecordView/invoicingCustomerRecordViewState.js} +0 -0
  118. /package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewPayload.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewPayload.d.ts} +0 -0
  119. /package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewPayload.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewPayload.js} +0 -0
  120. /package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewState.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewState.js} +0 -0
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
6
6
  const addressSelector_1 = require("../../../entity/address/addressSelector");
7
7
  const invoicingSubscriptionSelector_1 = require("../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionSelector");
8
8
  const addressViewReducer_1 = require("../../addressView/addressViewReducer");
9
- const invoicingSubscriptionDetailViewReducer_1 = require("../invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewReducer");
9
+ const invoicingSubscriptionRecordViewReducer_1 = require("../invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewReducer");
10
10
  const editInvoicingSubscriptionDetailViewReducer_1 = require("./editInvoicingSubscriptionDetailViewReducer");
11
11
  const invoicingSubscriptionFormConfig_1 = require("./invoicingSubscriptionFormConfig");
12
12
  /**
@@ -19,7 +19,7 @@ const invoicingSubscriptionFormConfig_1 = require("./invoicingSubscriptionFormCo
19
19
  * Mirrors `initializeInvoicingCustomerAddressEpic`.
20
20
  */
21
21
  const initializeInvoicingSubscriptionAddressEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)((action) => editInvoicingSubscriptionDetailViewReducer_1.initializeInvoicingSubscriptionAddress.match(action) ||
22
- invoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionDetail.match(action)), (0, operators_1.mergeMap)((action) => {
22
+ invoicingSubscriptionRecordViewReducer_1.updateInvoicingSubscriptionDetail.match(action)), (0, operators_1.mergeMap)((action) => {
23
23
  const { id } = action.payload;
24
24
  const rootState = state$.value;
25
25
  const existingDraft = rootState.addressViewState.newAddressState?.[invoicingSubscriptionFormConfig_1.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE]?.addressToCreate;
@@ -3,6 +3,6 @@ import { Observable } from 'rxjs';
3
3
  import { updateInvoicingPlans } from '../../../entity/invoicing/plan/planReducer';
4
4
  import { RootState } from '../../../rootStateTypes';
5
5
  import { ZeniAPI } from '../../../zeniAPI';
6
- import { fetchInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetailFailure } from './invoicingCatalogItemDetailViewReducer';
6
+ import { fetchInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetailFailure } from './invoicingCatalogItemRecordViewReducer';
7
7
  export type ActionType = ReturnType<typeof fetchInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetailFailure> | ReturnType<typeof updateInvoicingPlans>;
8
8
  export declare const fetchInvoicingCatalogItemDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -5,19 +5,19 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const planReducer_1 = require("../../../entity/invoicing/plan/planReducer");
7
7
  const responsePayload_1 = require("../../../responsePayload");
8
- const invoicingCatalogItemDetailViewReducer_1 = require("./invoicingCatalogItemDetailViewReducer");
9
- const fetchInvoicingCatalogItemDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingCatalogItemDetailViewReducer_1.fetchInvoicingCatalogItemDetail.match), (0, operators_1.switchMap)((action) => {
8
+ const invoicingCatalogItemRecordViewReducer_1 = require("./invoicingCatalogItemRecordViewReducer");
9
+ const fetchInvoicingCatalogItemDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingCatalogItemRecordViewReducer_1.fetchInvoicingCatalogItemDetail.match), (0, operators_1.switchMap)((action) => {
10
10
  const { id, kind } = action.payload;
11
11
  const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/catalog/plans/${encodeURIComponent(id)}`;
12
12
  return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
13
13
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
14
14
  return [
15
15
  (0, planReducer_1.updateInvoicingPlans)([response.data], 'merge'),
16
- (0, invoicingCatalogItemDetailViewReducer_1.updateInvoicingCatalogItemDetail)({ id: response.data.id, kind }),
16
+ (0, invoicingCatalogItemRecordViewReducer_1.updateInvoicingCatalogItemDetail)({ id: response.data.id, kind }),
17
17
  ];
18
18
  }
19
- return (0, rxjs_1.of)((0, invoicingCatalogItemDetailViewReducer_1.updateInvoicingCatalogItemDetailFailure)(response.status));
20
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingCatalogItemDetailViewReducer_1.updateInvoicingCatalogItemDetailFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch catalog item detail REST API call errored out ' +
19
+ return (0, rxjs_1.of)((0, invoicingCatalogItemRecordViewReducer_1.updateInvoicingCatalogItemDetailFailure)(response.status));
20
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingCatalogItemRecordViewReducer_1.updateInvoicingCatalogItemDetailFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch catalog item detail REST API call errored out ' +
21
21
  JSON.stringify(error))))));
22
22
  }));
23
23
  exports.fetchInvoicingCatalogItemDetailEpic = fetchInvoicingCatalogItemDetailEpic;
@@ -1,13 +1,13 @@
1
1
  import { ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniAPIStatus } from '../../../responsePayload';
3
- import { InvoicingCatalogItemDetailViewState, InvoicingCatalogItemKind } from './invoicingCatalogItemDetailViewState';
4
- export declare const initialState: InvoicingCatalogItemDetailViewState;
3
+ import { InvoicingCatalogItemRecordViewState, InvoicingCatalogItemKind } from './invoicingCatalogItemRecordViewState';
4
+ export declare const initialState: InvoicingCatalogItemRecordViewState;
5
5
  export declare const fetchInvoicingCatalogItemDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
6
6
  id: ID;
7
7
  kind: InvoicingCatalogItemKind;
8
- }, "invoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetail">, updateInvoicingCatalogItemDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
8
+ }, "invoicingCatalogItemRecordView/fetchInvoicingCatalogItemDetail">, updateInvoicingCatalogItemDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
9
9
  id: ID;
10
10
  kind: InvoicingCatalogItemKind;
11
- }, "invoicingCatalogItemDetailView/updateInvoicingCatalogItemDetail">, updateInvoicingCatalogItemDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCatalogItemDetailView/updateInvoicingCatalogItemDetailFailure">;
12
- declare const _default: import("redux").Reducer<InvoicingCatalogItemDetailViewState>;
11
+ }, "invoicingCatalogItemRecordView/updateInvoicingCatalogItemDetail">, updateInvoicingCatalogItemDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCatalogItemRecordView/updateInvoicingCatalogItemDetailFailure">;
12
+ declare const _default: import("redux").Reducer<InvoicingCatalogItemRecordViewState>;
13
13
  export default _default;
@@ -10,8 +10,8 @@ exports.initialState = {
10
10
  id: undefined,
11
11
  kind: undefined,
12
12
  };
13
- const invoicingCatalogItemDetailView = (0, toolkit_1.createSlice)({
14
- name: 'invoicingCatalogItemDetailView',
13
+ const invoicingCatalogItemRecordView = (0, toolkit_1.createSlice)({
14
+ name: 'invoicingCatalogItemRecordView',
15
15
  initialState: exports.initialState,
16
16
  reducers: {
17
17
  fetchInvoicingCatalogItemDetail(draft, action) {
@@ -37,5 +37,5 @@ const invoicingCatalogItemDetailView = (0, toolkit_1.createSlice)({
37
37
  });
38
38
  },
39
39
  });
40
- _a = invoicingCatalogItemDetailView.actions, exports.fetchInvoicingCatalogItemDetail = _a.fetchInvoicingCatalogItemDetail, exports.updateInvoicingCatalogItemDetail = _a.updateInvoicingCatalogItemDetail, exports.updateInvoicingCatalogItemDetailFailure = _a.updateInvoicingCatalogItemDetailFailure;
41
- exports.default = invoicingCatalogItemDetailView.reducer;
40
+ _a = invoicingCatalogItemRecordView.actions, exports.fetchInvoicingCatalogItemDetail = _a.fetchInvoicingCatalogItemDetail, exports.updateInvoicingCatalogItemDetail = _a.updateInvoicingCatalogItemDetail, exports.updateInvoicingCatalogItemDetailFailure = _a.updateInvoicingCatalogItemDetailFailure;
41
+ exports.default = invoicingCatalogItemRecordView.reducer;
@@ -3,8 +3,7 @@ import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndRep
3
3
  import { InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
4
4
  import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
5
5
  import { RootState } from '../../../rootStateTypes';
6
- import type { CatalogDetailEditValues } from '../editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewState';
7
- import { InvoicingCatalogItemKind } from './invoicingCatalogItemDetailViewState';
6
+ import { InvoicingCatalogItemKind } from './invoicingCatalogItemRecordViewState';
8
7
  /**
9
8
  * Read-only view for the catalog item (plan or product) detail page. One screen
10
9
  * serves both kinds, so the bundled view carries the resolved `plan` or
@@ -17,7 +16,7 @@ import { InvoicingCatalogItemKind } from './invoicingCatalogItemDetailViewState'
17
16
  * `fetchState` because they track different requests — the screen gates a config
18
17
  * refetch on the former while rendering off the latter.
19
18
  */
20
- export interface InvoicingCatalogItemDetailView extends SelectorView {
19
+ export interface InvoicingCatalogItemRecordView extends SelectorView {
21
20
  catalogItemLifecycleActionOptions: InvoicingCatalogLifecycleActionOption<InvoicingCatalogItemLifecycleAction>[];
22
21
  catalogProductLifecycleActionOptions: InvoicingCatalogLifecycleActionOption<InvoicingCatalogProductLifecycleAction>[];
23
22
  configFetchState: FetchState;
@@ -25,7 +24,6 @@ export interface InvoicingCatalogItemDetailView extends SelectorView {
25
24
  * The inline editor's form data, seeded from the loaded record and updated on
26
25
  * every change, so the page renders from CES rather than from its own reset.
27
26
  */
28
- editLocalData: CatalogDetailEditValues;
29
27
  /**
30
28
  * Backend help copy for this screen's field group, keyed by field code.
31
29
  * Folded in here so the screen never reaches for the config view itself.
@@ -42,4 +40,4 @@ export interface InvoicingCatalogItemDetailView extends SelectorView {
42
40
  catalogTierTypeOptionsByPricingModel?: InvoicingNamedOptionsByKey;
43
41
  plan?: InvoicingPlan;
44
42
  }
45
- export declare const getInvoicingCatalogItemDetail: (state: RootState, _kind: InvoicingCatalogItemKind, id: ID) => InvoicingCatalogItemDetailView;
43
+ export declare const getInvoicingCatalogItemRecord: (state: RootState, _kind: InvoicingCatalogItemKind, id: ID) => InvoicingCatalogItemRecordView;
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInvoicingCatalogItemDetail = void 0;
3
+ exports.getInvoicingCatalogItemRecord = void 0;
4
4
  const planSelector_1 = require("../../../entity/invoicing/plan/planSelector");
5
5
  const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
6
- const editInvoicingCatalogItemDetailViewSelector_1 = require("../editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector");
7
- const getInvoicingCatalogItemDetail = (state, _kind, id) => {
8
- const { error, fetchState } = state.invoicingCatalogItemDetailViewState;
6
+ const getInvoicingCatalogItemRecord = (state, _kind, id) => {
7
+ const { error, fetchState } = state.invoicingCatalogItemRecordViewState;
9
8
  const { billingPeriodUnitOptions, catalogItemLifecycleActionOptions, catalogItemTypeOptions, catalogProductLifecycleActionOptions, catalogTierTypeOptionsByPricingModel, catalogTrialEndActionOptions, catalogTrialUnitOptions, fetchState: configFetchState, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
10
9
  return {
11
10
  fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'catalog'),
@@ -14,7 +13,6 @@ const getInvoicingCatalogItemDetail = (state, _kind, id) => {
14
13
  catalogTierTypeOptionsByPricingModel,
15
14
  configFetchState,
16
15
  periodUnitOptions: billingPeriodUnitOptions,
17
- editLocalData: (0, editInvoicingCatalogItemDetailViewSelector_1.getInvoicingCatalogItemDetailEditLocalData)(state, id),
18
16
  plan: (0, planSelector_1.getInvoicingPlanById)(state.invoicingPlanState, id),
19
17
  trialEndActionOptions: catalogTrialEndActionOptions,
20
18
  trialUnitOptions: catalogTrialUnitOptions,
@@ -24,4 +22,4 @@ const getInvoicingCatalogItemDetail = (state, _kind, id) => {
24
22
  version: 1.0,
25
23
  };
26
24
  };
27
- exports.getInvoicingCatalogItemDetail = getInvoicingCatalogItemDetail;
25
+ exports.getInvoicingCatalogItemRecord = getInvoicingCatalogItemRecord;
@@ -1,6 +1,6 @@
1
1
  import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  export type InvoicingCatalogItemKind = 'plan';
3
- export interface InvoicingCatalogItemDetailViewState extends FetchStateAndError {
3
+ export interface InvoicingCatalogItemRecordViewState extends FetchStateAndError {
4
4
  id?: ID;
5
5
  kind?: InvoicingCatalogItemKind;
6
6
  }
@@ -3,6 +3,6 @@ import { Observable } from 'rxjs';
3
3
  import { updateInvoicingCoupons } from '../../../entity/invoicing/coupon/couponReducer';
4
4
  import { RootState } from '../../../rootStateTypes';
5
5
  import { ZeniAPI } from '../../../zeniAPI';
6
- import { fetchInvoicingCouponDetail, updateInvoicingCouponDetail, updateInvoicingCouponDetailFailure } from './invoicingCouponDetailViewReducer';
6
+ import { fetchInvoicingCouponDetail, updateInvoicingCouponDetail, updateInvoicingCouponDetailFailure } from './invoicingCouponRecordViewReducer';
7
7
  export type ActionType = ReturnType<typeof fetchInvoicingCouponDetail> | ReturnType<typeof updateInvoicingCouponDetail> | ReturnType<typeof updateInvoicingCouponDetailFailure> | ReturnType<typeof updateInvoicingCoupons>;
8
8
  export declare const fetchInvoicingCouponDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -5,19 +5,19 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const couponReducer_1 = require("../../../entity/invoicing/coupon/couponReducer");
7
7
  const responsePayload_1 = require("../../../responsePayload");
8
- const invoicingCouponDetailViewReducer_1 = require("./invoicingCouponDetailViewReducer");
9
- const fetchInvoicingCouponDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingCouponDetailViewReducer_1.fetchInvoicingCouponDetail.match), (0, operators_1.switchMap)((action) => {
8
+ const invoicingCouponRecordViewReducer_1 = require("./invoicingCouponRecordViewReducer");
9
+ const fetchInvoicingCouponDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingCouponRecordViewReducer_1.fetchInvoicingCouponDetail.match), (0, operators_1.switchMap)((action) => {
10
10
  const { id } = action.payload;
11
11
  const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/discounts/${id}`;
12
12
  return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
13
13
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
14
14
  return [
15
15
  (0, couponReducer_1.updateInvoicingCoupons)([response.data], 'merge'),
16
- (0, invoicingCouponDetailViewReducer_1.updateInvoicingCouponDetail)({ id: response.data.id }),
16
+ (0, invoicingCouponRecordViewReducer_1.updateInvoicingCouponDetail)({ id: response.data.id }),
17
17
  ];
18
18
  }
19
- return (0, rxjs_1.of)((0, invoicingCouponDetailViewReducer_1.updateInvoicingCouponDetailFailure)({ id, status: response.status }));
20
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingCouponDetailViewReducer_1.updateInvoicingCouponDetailFailure)({
19
+ return (0, rxjs_1.of)((0, invoicingCouponRecordViewReducer_1.updateInvoicingCouponDetailFailure)({ id, status: response.status }));
20
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingCouponRecordViewReducer_1.updateInvoicingCouponDetailFailure)({
21
21
  id,
22
22
  status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch discount detail REST API call errored out ' +
23
23
  JSON.stringify(error)),
@@ -1,16 +1,16 @@
1
1
  import { FetchState, ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniAPIStatus } from '../../../responsePayload';
3
- import { InvoicingCouponDetail, InvoicingCouponDetailViewState } from './invoicingCouponDetailViewState';
4
- export declare const initialState: InvoicingCouponDetailViewState;
3
+ import { InvoicingCouponDetail, InvoicingCouponRecordViewState } from './invoicingCouponRecordViewState';
4
+ export declare const initialState: InvoicingCouponRecordViewState;
5
5
  /** Build a per-coupon detail fetch-state entry. */
6
6
  export declare function buildInvoicingCouponDetail(id: ID, fetchState: FetchState, error?: ZeniAPIStatus): InvoicingCouponDetail;
7
7
  export declare const fetchInvoicingCouponDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
8
8
  id: ID;
9
- }, "invoicingCouponDetailView/fetchInvoicingCouponDetail">, updateInvoicingCouponDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
9
+ }, "invoicingCouponRecordView/fetchInvoicingCouponDetail">, updateInvoicingCouponDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
10
  id: ID;
11
- }, "invoicingCouponDetailView/updateInvoicingCouponDetail">, updateInvoicingCouponDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
11
+ }, "invoicingCouponRecordView/updateInvoicingCouponDetail">, updateInvoicingCouponDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
12
12
  id: ID;
13
13
  status: ZeniAPIStatus;
14
- }, "invoicingCouponDetailView/updateInvoicingCouponDetailFailure">;
15
- declare const _default: import("redux").Reducer<InvoicingCouponDetailViewState>;
14
+ }, "invoicingCouponRecordView/updateInvoicingCouponDetailFailure">;
15
+ declare const _default: import("redux").Reducer<InvoicingCouponRecordViewState>;
16
16
  export default _default;
@@ -19,8 +19,8 @@ function hasCompletedFetch() {
19
19
  function buildInvoicingCouponDetail(id, fetchState, error) {
20
20
  return { id, fetchState, error, hasValidState: hasCompletedFetch };
21
21
  }
22
- const invoicingCouponDetailView = (0, toolkit_1.createSlice)({
23
- name: 'invoicingCouponDetailView',
22
+ const invoicingCouponRecordView = (0, toolkit_1.createSlice)({
23
+ name: 'invoicingCouponRecordView',
24
24
  initialState: exports.initialState,
25
25
  reducers: {
26
26
  fetchInvoicingCouponDetail(draft, action) {
@@ -42,5 +42,5 @@ const invoicingCouponDetailView = (0, toolkit_1.createSlice)({
42
42
  });
43
43
  },
44
44
  });
45
- _a = invoicingCouponDetailView.actions, exports.fetchInvoicingCouponDetail = _a.fetchInvoicingCouponDetail, exports.updateInvoicingCouponDetail = _a.updateInvoicingCouponDetail, exports.updateInvoicingCouponDetailFailure = _a.updateInvoicingCouponDetailFailure;
46
- exports.default = invoicingCouponDetailView.reducer;
45
+ _a = invoicingCouponRecordView.actions, exports.fetchInvoicingCouponDetail = _a.fetchInvoicingCouponDetail, exports.updateInvoicingCouponDetail = _a.updateInvoicingCouponDetail, exports.updateInvoicingCouponDetailFailure = _a.updateInvoicingCouponDetailFailure;
46
+ exports.default = invoicingCouponRecordView.reducer;
@@ -7,7 +7,7 @@ import { RootState } from '../../../rootStateTypes';
7
7
  * Read-only view for the discount detail page: the coupon entity + its per-id
8
8
  * fetch state. Lets the detail screen depend on this single read selector.
9
9
  */
10
- export interface InvoicingCouponDetailView extends SelectorView {
10
+ export interface InvoicingCouponRecordView extends SelectorView {
11
11
  /**
12
12
  * Backend help copy for this screen's field group, keyed by field code.
13
13
  * Folded in here so the screen never reaches for the config view itself.
@@ -15,4 +15,4 @@ export interface InvoicingCouponDetailView extends SelectorView {
15
15
  fieldHelp: InvoicingFieldHelpByCode;
16
16
  coupon?: InvoicingCoupon;
17
17
  }
18
- export declare const getInvoicingCouponDetail: (state: RootState, id: ID) => InvoicingCouponDetailView;
18
+ export declare const getInvoicingCouponRecord: (state: RootState, id: ID) => InvoicingCouponRecordView;
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getInvoicingCouponDetail = void 0;
6
+ exports.getInvoicingCouponRecord = void 0;
7
7
  const get_1 = __importDefault(require("lodash/get"));
8
8
  const couponSelector_1 = require("../../../entity/invoicing/coupon/couponSelector");
9
9
  const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
10
- const getInvoicingCouponDetail = (state, id) => {
11
- const detail = (0, get_1.default)(state.invoicingCouponDetailViewState.detailById, id, undefined);
10
+ const getInvoicingCouponRecord = (state, id) => {
11
+ const detail = (0, get_1.default)(state.invoicingCouponRecordViewState.detailById, id, undefined);
12
12
  return {
13
13
  fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'discount'),
14
14
  coupon: (0, couponSelector_1.getInvoicingCouponById)(state.invoicingCouponState, id),
@@ -17,4 +17,4 @@ const getInvoicingCouponDetail = (state, id) => {
17
17
  version: 1.0,
18
18
  };
19
19
  };
20
- exports.getInvoicingCouponDetail = getInvoicingCouponDetail;
20
+ exports.getInvoicingCouponRecord = getInvoicingCouponRecord;
@@ -1,5 +1,5 @@
1
1
  import { FetchedState, ID } from '../../../commonStateTypes/common';
2
- export interface InvoicingCouponDetailViewState {
2
+ export interface InvoicingCouponRecordViewState {
3
3
  detailById: Record<ID, InvoicingCouponDetail>;
4
4
  }
5
5
  export interface InvoicingCouponDetail extends FetchedState {
@@ -4,6 +4,6 @@ import { updateAddresses } from '../../../entity/address/addressReducer';
4
4
  import { updateInvoicingCustomers } from '../../../entity/invoicing/invoicingCustomer/invoicingCustomerReducer';
5
5
  import { RootState } from '../../../rootStateTypes';
6
6
  import { ZeniAPI } from '../../../zeniAPI';
7
- import { fetchInvoicingCustomerDetail, updateInvoicingCustomerDetail, updateInvoicingCustomerDetailFailure } from './invoicingCustomerDetailViewReducer';
7
+ import { fetchInvoicingCustomerDetail, updateInvoicingCustomerDetail, updateInvoicingCustomerDetailFailure } from './invoicingCustomerRecordViewReducer';
8
8
  export type ActionType = ReturnType<typeof fetchInvoicingCustomerDetail> | ReturnType<typeof updateInvoicingCustomerDetail> | ReturnType<typeof updateInvoicingCustomerDetailFailure> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoicingCustomers>;
9
9
  export declare const fetchInvoicingCustomerDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,8 +7,8 @@ const addressReducer_1 = require("../../../entity/address/addressReducer");
7
7
  const invoicingCustomerPayload_1 = require("../../../entity/invoicing/invoicingCustomer/invoicingCustomerPayload");
8
8
  const invoicingCustomerReducer_1 = require("../../../entity/invoicing/invoicingCustomer/invoicingCustomerReducer");
9
9
  const responsePayload_1 = require("../../../responsePayload");
10
- const invoicingCustomerDetailViewReducer_1 = require("./invoicingCustomerDetailViewReducer");
11
- const fetchInvoicingCustomerDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingCustomerDetailViewReducer_1.fetchInvoicingCustomerDetail.match), (0, operators_1.switchMap)((action) => {
10
+ const invoicingCustomerRecordViewReducer_1 = require("./invoicingCustomerRecordViewReducer");
11
+ const fetchInvoicingCustomerDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingCustomerRecordViewReducer_1.fetchInvoicingCustomerDetail.match), (0, operators_1.switchMap)((action) => {
12
12
  const { id } = action.payload;
13
13
  const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/customers/${id}`;
14
14
  return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
@@ -16,11 +16,11 @@ const fetchInvoicingCustomerDetailEpic = (actions$, _state$, zeniAPI) => actions
16
16
  return [
17
17
  (0, addressReducer_1.updateAddresses)((0, invoicingCustomerPayload_1.extractInvoicingCustomerAddresses)([response.data])),
18
18
  (0, invoicingCustomerReducer_1.updateInvoicingCustomers)([response.data], 'merge'),
19
- (0, invoicingCustomerDetailViewReducer_1.updateInvoicingCustomerDetail)({ id: response.data.id }),
19
+ (0, invoicingCustomerRecordViewReducer_1.updateInvoicingCustomerDetail)({ id: response.data.id }),
20
20
  ];
21
21
  }
22
- return (0, rxjs_1.of)((0, invoicingCustomerDetailViewReducer_1.updateInvoicingCustomerDetailFailure)({ id, status: response.status }));
23
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingCustomerDetailViewReducer_1.updateInvoicingCustomerDetailFailure)({
22
+ return (0, rxjs_1.of)((0, invoicingCustomerRecordViewReducer_1.updateInvoicingCustomerDetailFailure)({ id, status: response.status }));
23
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingCustomerRecordViewReducer_1.updateInvoicingCustomerDetailFailure)({
24
24
  id,
25
25
  status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch customer detail REST API call errored out ' +
26
26
  JSON.stringify(error)),
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
3
3
  import { RootState } from '../../../rootStateTypes';
4
4
  import { fetchInvoiceList } from '../invoiceList/invoiceListReducer';
5
5
  import { fetchInvoicingSettings } from '../settingsView/settingsViewReducer';
6
- import { fetchInvoicingCustomerDetail, fetchInvoicingCustomerDetailPage } from './invoicingCustomerDetailViewReducer';
6
+ import { fetchInvoicingCustomerDetail, fetchInvoicingCustomerDetailPage } from './invoicingCustomerRecordViewReducer';
7
7
  /**
8
8
  * Aggregate of every action emitted across the customer detail page epic.
9
9
  * Wired into the root action union for this view.
@@ -5,7 +5,7 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const invoiceListReducer_1 = require("../invoiceList/invoiceListReducer");
7
7
  const settingsViewReducer_1 = require("../settingsView/settingsViewReducer");
8
- const invoicingCustomerDetailViewReducer_1 = require("./invoicingCustomerDetailViewReducer");
8
+ const invoicingCustomerRecordViewReducer_1 = require("./invoicingCustomerRecordViewReducer");
9
9
  /**
10
10
  * Fetch unless the endpoint is already loaded or in flight — or always when the
11
11
  * caller forces a refresh via `cacheOverride` (e.g. on a manual refresh).
@@ -19,9 +19,9 @@ const shouldFetch = (fetchStateAndError, cacheOverride) => cacheOverride ||
19
19
  * settings, skipping any whose data is already cached unless `cacheOverride` is
20
20
  * set (e.g. on a manual refresh).
21
21
  */
22
- const fetchInvoicingCustomerDetailPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(invoicingCustomerDetailViewReducer_1.fetchInvoicingCustomerDetailPage.match), (0, operators_1.mergeMap)((action) => {
22
+ const fetchInvoicingCustomerDetailPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(invoicingCustomerRecordViewReducer_1.fetchInvoicingCustomerDetailPage.match), (0, operators_1.mergeMap)((action) => {
23
23
  const { cacheOverride, id } = action.payload;
24
- const customerDetail = state$.value.invoicingCustomerDetailViewState.detailById[id];
24
+ const customerDetail = state$.value.invoicingCustomerRecordViewState.detailById[id];
25
25
  const invoiceListState = state$.value.invoicingInvoiceListState;
26
26
  const invoiceListTabState = invoiceListState.invoiceByTab[invoiceListState.activeTab];
27
27
  const settingsState = state$.value.invoicingSettingsViewState;
@@ -30,7 +30,7 @@ const fetchInvoicingCustomerDetailPageEpic = (actions$, state$) => actions$.pipe
30
30
  fetchState: customerDetail?.fetchState ?? 'Not-Started',
31
31
  error: customerDetail?.error,
32
32
  }, cacheOverride)) {
33
- pageActions.push((0, invoicingCustomerDetailViewReducer_1.fetchInvoicingCustomerDetail)({ id }));
33
+ pageActions.push((0, invoicingCustomerRecordViewReducer_1.fetchInvoicingCustomerDetail)({ id }));
34
34
  }
35
35
  // A cached list only counts if it was fetched for THIS customer — the
36
36
  // list state is shared with the main Invoices page and other customers.
@@ -1,22 +1,22 @@
1
1
  import { FetchState, ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniAPIStatus } from '../../../responsePayload';
3
- import { InvoicingCustomerDetail, InvoicingCustomerDetailViewState } from './invoicingCustomerDetailViewState';
4
- export declare const initialState: InvoicingCustomerDetailViewState;
3
+ import { InvoicingCustomerDetail, InvoicingCustomerRecordViewState } from './invoicingCustomerRecordViewState';
4
+ export declare const initialState: InvoicingCustomerRecordViewState;
5
5
  /** Build a per-customer detail fetch-state entry. */
6
6
  export declare function buildInvoicingCustomerDetail(id: ID, fetchState: FetchState, error?: ZeniAPIStatus): InvoicingCustomerDetail;
7
7
  export declare const fetchInvoicingCustomerDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
8
8
  id: ID;
9
- }, "invoicingCustomerDetailView/fetchInvoicingCustomerDetail">, fetchInvoicingCustomerDetailPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
9
+ }, "invoicingCustomerRecordView/fetchInvoicingCustomerDetail">, fetchInvoicingCustomerDetailPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
10
10
  id: ID;
11
11
  cacheOverride?: boolean;
12
12
  }], {
13
13
  cacheOverride: boolean;
14
14
  id: string;
15
- }, "invoicingCustomerDetailView/fetchInvoicingCustomerDetailPage", never, never>, updateInvoicingCustomerDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
15
+ }, "invoicingCustomerRecordView/fetchInvoicingCustomerDetailPage", never, never>, updateInvoicingCustomerDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
16
16
  id: ID;
17
- }, "invoicingCustomerDetailView/updateInvoicingCustomerDetail">, updateInvoicingCustomerDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
17
+ }, "invoicingCustomerRecordView/updateInvoicingCustomerDetail">, updateInvoicingCustomerDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
18
18
  id: ID;
19
19
  status: ZeniAPIStatus;
20
- }, "invoicingCustomerDetailView/updateInvoicingCustomerDetailFailure">;
21
- declare const _default: import("redux").Reducer<InvoicingCustomerDetailViewState>;
20
+ }, "invoicingCustomerRecordView/updateInvoicingCustomerDetailFailure">;
21
+ declare const _default: import("redux").Reducer<InvoicingCustomerRecordViewState>;
22
22
  export default _default;
@@ -19,8 +19,8 @@ function hasCompletedFetch() {
19
19
  function buildInvoicingCustomerDetail(id, fetchState, error) {
20
20
  return { id, fetchState, error, hasValidState: hasCompletedFetch };
21
21
  }
22
- const invoicingCustomerDetailView = (0, toolkit_1.createSlice)({
23
- name: 'invoicingCustomerDetailView',
22
+ const invoicingCustomerRecordView = (0, toolkit_1.createSlice)({
23
+ name: 'invoicingCustomerRecordView',
24
24
  initialState: exports.initialState,
25
25
  reducers: {
26
26
  fetchInvoicingCustomerDetail(draft, action) {
@@ -55,5 +55,5 @@ const invoicingCustomerDetailView = (0, toolkit_1.createSlice)({
55
55
  });
56
56
  },
57
57
  });
58
- _a = invoicingCustomerDetailView.actions, exports.fetchInvoicingCustomerDetail = _a.fetchInvoicingCustomerDetail, exports.fetchInvoicingCustomerDetailPage = _a.fetchInvoicingCustomerDetailPage, exports.updateInvoicingCustomerDetail = _a.updateInvoicingCustomerDetail, exports.updateInvoicingCustomerDetailFailure = _a.updateInvoicingCustomerDetailFailure;
59
- exports.default = invoicingCustomerDetailView.reducer;
58
+ _a = invoicingCustomerRecordView.actions, exports.fetchInvoicingCustomerDetail = _a.fetchInvoicingCustomerDetail, exports.fetchInvoicingCustomerDetailPage = _a.fetchInvoicingCustomerDetailPage, exports.updateInvoicingCustomerDetail = _a.updateInvoicingCustomerDetail, exports.updateInvoicingCustomerDetailFailure = _a.updateInvoicingCustomerDetailFailure;
59
+ exports.default = invoicingCustomerRecordView.reducer;
@@ -13,7 +13,7 @@ import { InvoicingSetupIntent } from '../customerPaymentMethod/customerPaymentMe
13
13
  * whether Stripe is connected. Lets the detail screen depend on this single
14
14
  * read selector.
15
15
  */
16
- export interface InvoicingCustomerDetailView extends SelectorView {
16
+ export interface InvoicingCustomerRecordView extends SelectorView {
17
17
  /**
18
18
  * Backend help copy for this screen's field group, keyed by field code.
19
19
  * Folded in here so the screen never reaches for the config view itself.
@@ -35,4 +35,4 @@ export interface InvoicingCustomerDetailView extends SelectorView {
35
35
  sentPaymentLinkMagicUrl?: string;
36
36
  setupIntent?: InvoicingSetupIntent;
37
37
  }
38
- export declare const getInvoicingCustomerDetail: (state: RootState, invoicingCustomerID: ID) => InvoicingCustomerDetailView;
38
+ export declare const getInvoicingCustomerRecord: (state: RootState, invoicingCustomerID: ID) => InvoicingCustomerRecordView;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getInvoicingCustomerDetail = void 0;
6
+ exports.getInvoicingCustomerRecord = void 0;
7
7
  const get_1 = __importDefault(require("lodash/get"));
8
8
  const invoiceSelector_1 = require("../../../entity/invoicing/invoice/invoiceSelector");
9
9
  const invoicingCustomerSelector_1 = require("../../../entity/invoicing/invoicingCustomer/invoicingCustomerSelector");
@@ -11,9 +11,9 @@ const customerPaymentMethodSelector_1 = require("../customerPaymentMethod/custom
11
11
  const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
12
12
  const invoicingSettingsHelpers_1 = require("../settingsView/invoicingSettingsHelpers");
13
13
  const settingsViewSelector_1 = require("../settingsView/settingsViewSelector");
14
- const getInvoicingCustomerDetail = (state, invoicingCustomerID) => {
15
- const { invoicingCustomerState, invoicingCustomerDetailViewState } = state;
16
- const invoicingCustomerDetail = (0, get_1.default)(invoicingCustomerDetailViewState.detailById, invoicingCustomerID, undefined);
14
+ const getInvoicingCustomerRecord = (state, invoicingCustomerID) => {
15
+ const { invoicingCustomerState, invoicingCustomerRecordViewState } = state;
16
+ const invoicingCustomerDetail = (0, get_1.default)(invoicingCustomerRecordViewState.detailById, invoicingCustomerID, undefined);
17
17
  const settings = (0, settingsViewSelector_1.getInvoicingSettings)(state);
18
18
  const invoicingCustomer = (0, invoicingCustomerSelector_1.getInvoicingCustomerById)(invoicingCustomerState, invoicingCustomerID);
19
19
  return {
@@ -38,4 +38,4 @@ const getInvoicingCustomerDetail = (state, invoicingCustomerID) => {
38
38
  version: 1.0,
39
39
  };
40
40
  };
41
- exports.getInvoicingCustomerDetail = getInvoicingCustomerDetail;
41
+ exports.getInvoicingCustomerRecord = getInvoicingCustomerRecord;
@@ -1,5 +1,5 @@
1
1
  import { FetchedState, ID } from '../../../commonStateTypes/common';
2
- export interface InvoicingCustomerDetailViewState {
2
+ export interface InvoicingCustomerRecordViewState {
3
3
  detailById: Record<ID, InvoicingCustomerDetail>;
4
4
  }
5
5
  export interface InvoicingCustomerDetail extends FetchedState {
@@ -4,6 +4,6 @@ import { updateAddresses } from '../../../entity/address/addressReducer';
4
4
  import { updateInvoicingSubscriptions } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionReducer';
5
5
  import { RootState } from '../../../rootStateTypes';
6
6
  import { ZeniAPI } from '../../../zeniAPI';
7
- import { fetchInvoicingSubscriptionDetail, updateInvoicingSubscriptionDetail, updateInvoicingSubscriptionDetailFailure } from './invoicingSubscriptionDetailViewReducer';
7
+ import { fetchInvoicingSubscriptionDetail, updateInvoicingSubscriptionDetail, updateInvoicingSubscriptionDetailFailure } from './invoicingSubscriptionRecordViewReducer';
8
8
  export type ActionType = ReturnType<typeof fetchInvoicingSubscriptionDetail> | ReturnType<typeof updateInvoicingSubscriptionDetail> | ReturnType<typeof updateInvoicingSubscriptionDetailFailure> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoicingSubscriptions>;
9
9
  export declare const fetchInvoicingSubscriptionDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,8 +7,8 @@ const addressReducer_1 = require("../../../entity/address/addressReducer");
7
7
  const invoicingSubscriptionPayload_1 = require("../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload");
8
8
  const invoicingSubscriptionReducer_1 = require("../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionReducer");
9
9
  const responsePayload_1 = require("../../../responsePayload");
10
- const invoicingSubscriptionDetailViewReducer_1 = require("./invoicingSubscriptionDetailViewReducer");
11
- const fetchInvoicingSubscriptionDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingSubscriptionDetailViewReducer_1.fetchInvoicingSubscriptionDetail.match), (0, operators_1.switchMap)((action) => {
10
+ const invoicingSubscriptionRecordViewReducer_1 = require("./invoicingSubscriptionRecordViewReducer");
11
+ const fetchInvoicingSubscriptionDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingSubscriptionRecordViewReducer_1.fetchInvoicingSubscriptionDetail.match), (0, operators_1.switchMap)((action) => {
12
12
  const { id } = action.payload;
13
13
  const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/subscriptions/${id}`;
14
14
  return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
@@ -16,11 +16,11 @@ const fetchInvoicingSubscriptionDetailEpic = (actions$, _state$, zeniAPI) => act
16
16
  return [
17
17
  (0, addressReducer_1.updateAddresses)((0, invoicingSubscriptionPayload_1.extractInvoicingSubscriptionAddresses)([response.data])),
18
18
  (0, invoicingSubscriptionReducer_1.updateInvoicingSubscriptions)([response.data], 'merge'),
19
- (0, invoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionDetail)({ id: response.data.id }),
19
+ (0, invoicingSubscriptionRecordViewReducer_1.updateInvoicingSubscriptionDetail)({ id: response.data.id }),
20
20
  ];
21
21
  }
22
- return (0, rxjs_1.of)((0, invoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionDetailFailure)(response.status));
23
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionDetailFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch subscription detail REST API call errored out ' +
22
+ return (0, rxjs_1.of)((0, invoicingSubscriptionRecordViewReducer_1.updateInvoicingSubscriptionDetailFailure)(response.status));
23
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingSubscriptionRecordViewReducer_1.updateInvoicingSubscriptionDetailFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch subscription detail REST API call errored out ' +
24
24
  JSON.stringify(error))))));
25
25
  }));
26
26
  exports.fetchInvoicingSubscriptionDetailEpic = fetchInvoicingSubscriptionDetailEpic;
@@ -1,11 +1,11 @@
1
1
  import { ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniAPIStatus } from '../../../responsePayload';
3
- import { InvoicingSubscriptionDetailViewState } from './invoicingSubscriptionDetailViewState';
4
- export declare const initialState: InvoicingSubscriptionDetailViewState;
3
+ import { InvoicingSubscriptionRecordViewState } from './invoicingSubscriptionRecordViewState';
4
+ export declare const initialState: InvoicingSubscriptionRecordViewState;
5
5
  export declare const fetchInvoicingSubscriptionDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
6
6
  id: ID;
7
- }, "invoicingSubscriptionDetailView/fetchInvoicingSubscriptionDetail">, updateInvoicingSubscriptionDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
7
+ }, "invoicingSubscriptionRecordView/fetchInvoicingSubscriptionDetail">, updateInvoicingSubscriptionDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
8
8
  id: ID;
9
- }, "invoicingSubscriptionDetailView/updateInvoicingSubscriptionDetail">, updateInvoicingSubscriptionDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSubscriptionDetailView/updateInvoicingSubscriptionDetailFailure">;
10
- declare const _default: import("redux").Reducer<InvoicingSubscriptionDetailViewState>;
9
+ }, "invoicingSubscriptionRecordView/updateInvoicingSubscriptionDetail">, updateInvoicingSubscriptionDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSubscriptionRecordView/updateInvoicingSubscriptionDetailFailure">;
10
+ declare const _default: import("redux").Reducer<InvoicingSubscriptionRecordViewState>;
11
11
  export default _default;
@@ -9,8 +9,8 @@ exports.initialState = {
9
9
  error: undefined,
10
10
  id: undefined,
11
11
  };
12
- const invoicingSubscriptionDetailView = (0, toolkit_1.createSlice)({
13
- name: 'invoicingSubscriptionDetailView',
12
+ const invoicingSubscriptionRecordView = (0, toolkit_1.createSlice)({
13
+ name: 'invoicingSubscriptionRecordView',
14
14
  initialState: exports.initialState,
15
15
  reducers: {
16
16
  fetchInvoicingSubscriptionDetail(draft, action) {
@@ -34,5 +34,5 @@ const invoicingSubscriptionDetailView = (0, toolkit_1.createSlice)({
34
34
  });
35
35
  },
36
36
  });
37
- _a = invoicingSubscriptionDetailView.actions, exports.fetchInvoicingSubscriptionDetail = _a.fetchInvoicingSubscriptionDetail, exports.updateInvoicingSubscriptionDetail = _a.updateInvoicingSubscriptionDetail, exports.updateInvoicingSubscriptionDetailFailure = _a.updateInvoicingSubscriptionDetailFailure;
38
- exports.default = invoicingSubscriptionDetailView.reducer;
37
+ _a = invoicingSubscriptionRecordView.actions, exports.fetchInvoicingSubscriptionDetail = _a.fetchInvoicingSubscriptionDetail, exports.updateInvoicingSubscriptionDetail = _a.updateInvoicingSubscriptionDetail, exports.updateInvoicingSubscriptionDetailFailure = _a.updateInvoicingSubscriptionDetailFailure;
38
+ exports.default = invoicingSubscriptionRecordView.reducer;
@@ -8,7 +8,7 @@ import { RootState } from '../../../rootStateTypes';
8
8
  * fetch state, plus the per-subscription action run-state (cancel/pause/resume)
9
9
  * folded in so the detail screen depends on this single read selector.
10
10
  */
11
- export interface InvoicingSubscriptionDetailView extends SelectorView {
11
+ export interface InvoicingSubscriptionRecordView extends SelectorView {
12
12
  actionState: FetchStateAndError;
13
13
  /** Cancel reasons from `/1.0/config`, so the dialog hardcodes nothing. */
14
14
  cancelReasonCodeOptions: InvoicingNamedOption[];
@@ -20,4 +20,4 @@ export interface InvoicingSubscriptionDetailView extends SelectorView {
20
20
  subscription?: InvoicingSubscription;
21
21
  }
22
22
  export declare const getInvoicingSubscriptionById: (state: RootState, id: string) => InvoicingSubscription | undefined;
23
- export declare const getInvoicingSubscriptionDetail: (state: RootState, invoicingSubscriptionID: ID) => InvoicingSubscriptionDetailView;
23
+ export declare const getInvoicingSubscriptionRecord: (state: RootState, invoicingSubscriptionID: ID) => InvoicingSubscriptionRecordView;