@zeniai/client-epic-state 5.2.27 → 5.2.29

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 (95) hide show
  1. package/lib/entity/aiCfo/aiCfoPayload.d.ts +0 -21
  2. package/lib/entity/aiCfo/aiCfoReducer.js +1 -73
  3. package/lib/entity/aiCfo/aiCfoState.d.ts +0 -24
  4. package/lib/entity/file/fileState.d.ts +3 -3
  5. package/lib/entity/file/fileState.js +0 -2
  6. package/lib/entity/invoicing/creditNote/creditNotePayload.d.ts +1 -0
  7. package/lib/entity/invoicing/creditNote/creditNotePayload.js +1 -0
  8. package/lib/entity/invoicing/creditNote/creditNoteState.d.ts +1 -0
  9. package/lib/entity/invoicing/invoice/invoicePayload.d.ts +1 -0
  10. package/lib/entity/invoicing/invoice/invoicePayload.js +1 -0
  11. package/lib/entity/invoicing/invoice/invoiceState.d.ts +1 -0
  12. package/lib/entity/invoicing/invoicingCommonPayload.d.ts +0 -2
  13. package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.d.ts +1 -0
  14. package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +1 -0
  15. package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerState.d.ts +1 -0
  16. package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.d.ts +2 -1
  17. package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -1
  18. package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionState.d.ts +2 -1
  19. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +7 -0
  20. package/lib/epic.d.ts +1 -2
  21. package/lib/epic.js +0 -2
  22. package/lib/esm/entity/aiCfo/aiCfoReducer.js +1 -73
  23. package/lib/esm/entity/file/fileState.js +0 -2
  24. package/lib/esm/entity/invoicing/creditNote/creditNotePayload.js +1 -0
  25. package/lib/esm/entity/invoicing/invoice/invoicePayload.js +1 -0
  26. package/lib/esm/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +1 -0
  27. package/lib/esm/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -1
  28. package/lib/esm/epic.js +0 -2
  29. package/lib/esm/index.js +2 -2
  30. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +0 -5
  31. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -1
  32. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +22 -0
  33. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -4
  34. package/lib/esm/view/invoicing/dataImportView/dataImportViewSelector.js +0 -2
  35. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -2
  36. package/lib/esm/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +1 -0
  37. package/lib/esm/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +1 -2
  38. package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +0 -1
  39. package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
  40. package/lib/esm/view/invoicing/settingsView/invoicingBrandingFormConfig.js +0 -5
  41. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +1 -5
  42. package/lib/esm/view/recommendation/recommendationReducer.js +1 -13
  43. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +2 -18
  44. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +1 -0
  45. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +3 -0
  46. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +2 -18
  47. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +1 -0
  48. package/lib/index.d.ts +5 -7
  49. package/lib/index.js +23 -24
  50. package/lib/view/aiCfoView/aiCfoViewReducer.js +0 -5
  51. package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -1
  52. package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -7
  53. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +22 -0
  54. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +2 -0
  55. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +3 -5
  56. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +5 -2
  57. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -4
  58. package/lib/view/invoicing/dataImportView/dataImportViewSelector.d.ts +0 -2
  59. package/lib/view/invoicing/dataImportView/dataImportViewSelector.js +0 -2
  60. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +0 -1
  61. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
  62. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -2
  63. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +0 -1
  64. package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.d.ts +1 -0
  65. package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +1 -0
  66. package/lib/view/invoicing/invoicingOverview/invoicingOverviewState.d.ts +1 -0
  67. package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts +1 -3
  68. package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +0 -1
  69. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts +0 -2
  70. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +0 -1
  71. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +2 -2
  72. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
  73. package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.d.ts +1 -0
  74. package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.d.ts +0 -1
  75. package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.js +0 -5
  76. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +1 -5
  77. package/lib/view/invoicing/settingsView/settingsViewSelector.js +0 -4
  78. package/lib/view/invoicing/subscriptionAction/subscriptionActionRequestPayload.d.ts +0 -8
  79. package/lib/view/recommendation/recommendationPayload.d.ts +0 -34
  80. package/lib/view/recommendation/recommendationReducer.d.ts +1 -2
  81. package/lib/view/recommendation/recommendationReducer.js +2 -14
  82. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.d.ts +1 -2
  83. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +2 -18
  84. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +1 -0
  85. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +1 -0
  86. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +3 -0
  87. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +1 -0
  88. package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
  89. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.d.ts +1 -2
  90. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +2 -18
  91. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +1 -0
  92. package/package.json +1 -1
  93. package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +0 -52
  94. package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +0 -7
  95. package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +0 -56
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.submitRecommendationFeedbackEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../responsePayload");
7
- const recommendationReducer_1 = require("./recommendationReducer");
8
- const toRequestBody = (payload) => ({
9
- line_id: payload.lineId ?? null,
10
- dimension: payload.dimension,
11
- recommendation_set_id: payload.recommendationSetId ?? null,
12
- top_pick_source: payload.topPickSource ?? null,
13
- shown_recommendations: (payload.shownRecommendations ?? []).map((recommendation) => ({
14
- source: recommendation.source,
15
- rank: recommendation.rank,
16
- value: {
17
- name: recommendation.value.name,
18
- id: recommendation.value.id ?? null,
19
- integration_id: recommendation.value.integrationId ?? null,
20
- },
21
- confidence: recommendation.confidence ?? null,
22
- reasoning: recommendation.reasoning ?? null,
23
- cot: recommendation.cot ?? [],
24
- })),
25
- selected: {
26
- name: payload.selected.name,
27
- id: payload.selected.id ?? null,
28
- integration_id: payload.selected.integrationId ?? null,
29
- is_new_entity: payload.selected.isNewEntity ?? false,
30
- },
31
- matched_source: payload.matchedSource ?? null,
32
- matched_rank: payload.matchedRank ?? null,
33
- outcome: payload.outcome,
34
- reason_text: payload.reasonText ?? null,
35
- skipped: payload.skipped ?? false,
36
- retracts_feedback_id: payload.retractsFeedbackId ?? null,
37
- features: payload.features ?? null,
38
- });
39
- // Fire-and-forget: the epic never re-emits an action. Feedback delivery is a
40
- // side-effect that must not disrupt the categorization UX, so both the
41
- // success and error paths complete silently (errors are logged for debugging).
42
- const submitRecommendationFeedbackEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(recommendationReducer_1.submitRecommendationFeedback.match), (0, operators_1.mergeMap)((action) => {
43
- const { transactionId } = action.payload;
44
- return zeniAPI
45
- .postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions/${transactionId}/recommendation-feedback`, toRequestBody(action.payload))
46
- .pipe((0, operators_1.mergeMap)((response) => {
47
- if (!(0, responsePayload_1.isSuccessStatus)(response)) {
48
- console.error('submitRecommendationFeedbackEpic: recommendation feedback was not recorded', response.status);
49
- }
50
- return rxjs_1.EMPTY;
51
- }), (0, operators_1.catchError)((error) => {
52
- console.error('submitRecommendationFeedbackEpic: failed to submit recommendation feedback', error);
53
- return rxjs_1.EMPTY;
54
- }));
55
- }));
56
- exports.submitRecommendationFeedbackEpic = submitRecommendationFeedbackEpic;