@zeniai/client-epic-state 5.0.31-betaRD3 → 5.0.31

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 (50) hide show
  1. package/lib/coreEpics.js +1 -4
  2. package/lib/entity/tenant/clearAllEpic.d.ts +1 -2
  3. package/lib/entity/tenant/clearAllEpic.js +0 -2
  4. package/lib/entity/tenant/tenantPayload.d.ts +0 -2
  5. package/lib/entity/tenant/tenantReducer.d.ts +1 -60
  6. package/lib/entity/tenant/tenantReducer.js +4 -143
  7. package/lib/entity/tenant/tenantState.d.ts +0 -8
  8. package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -1
  9. package/lib/epic.d.ts +1 -3
  10. package/lib/epic.js +1 -6
  11. package/lib/esm/coreEpics.js +1 -4
  12. package/lib/esm/entity/tenant/clearAllEpic.js +0 -2
  13. package/lib/esm/entity/tenant/tenantReducer.js +2 -139
  14. package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +1 -1
  15. package/lib/esm/epic.js +1 -6
  16. package/lib/esm/index.js +2 -5
  17. package/lib/esm/reducer.js +0 -3
  18. package/lib/index.d.ts +2 -6
  19. package/lib/index.js +30 -51
  20. package/lib/reducer.d.ts +0 -3
  21. package/lib/reducer.js +0 -3
  22. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  23. package/package.json +1 -1
  24. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +0 -19
  25. package/lib/entity/tenant/epic/deleteConnectionEpic.js +0 -29
  26. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +0 -19
  27. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +0 -31
  28. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +0 -19
  29. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +0 -33
  30. package/lib/esm/entity/tenant/epic/deleteConnectionEpic.js +0 -25
  31. package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +0 -27
  32. package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +0 -29
  33. package/lib/esm/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.js +0 -23
  34. package/lib/esm/view/featureNotificationView/epics/notifyMeForFeatureEpic.js +0 -25
  35. package/lib/esm/view/featureNotificationView/featureNotificationViewPayload.js +0 -11
  36. package/lib/esm/view/featureNotificationView/featureNotificationViewReducer.js +0 -106
  37. package/lib/esm/view/featureNotificationView/featureNotificationViewSelector.js +0 -4
  38. package/lib/esm/view/featureNotificationView/featureNotificationViewState.js +0 -1
  39. package/lib/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.d.ts +0 -16
  40. package/lib/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.js +0 -27
  41. package/lib/view/featureNotificationView/epics/notifyMeForFeatureEpic.d.ts +0 -14
  42. package/lib/view/featureNotificationView/epics/notifyMeForFeatureEpic.js +0 -29
  43. package/lib/view/featureNotificationView/featureNotificationViewPayload.d.ts +0 -23
  44. package/lib/view/featureNotificationView/featureNotificationViewPayload.js +0 -15
  45. package/lib/view/featureNotificationView/featureNotificationViewReducer.d.ts +0 -19
  46. package/lib/view/featureNotificationView/featureNotificationViewReducer.js +0 -110
  47. package/lib/view/featureNotificationView/featureNotificationViewSelector.d.ts +0 -6
  48. package/lib/view/featureNotificationView/featureNotificationViewSelector.js +0 -11
  49. package/lib/view/featureNotificationView/featureNotificationViewState.d.ts +0 -26
  50. package/lib/view/featureNotificationView/featureNotificationViewState.js +0 -2
@@ -1,110 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.notifyMeForFeatureSuccess = exports.notifyMeForFeatureFailure = exports.notifyMeForFeature = exports.fetchRegisteredInterestsSuccess = exports.fetchRegisteredInterestsFailure = exports.fetchRegisteredInterests = exports.clearFeatureNotificationView = exports.initialState = void 0;
5
- const toolkit_1 = require("@reduxjs/toolkit");
6
- const featureNotificationViewPayload_1 = require("./featureNotificationViewPayload");
7
- exports.initialState = {
8
- fetchRegisteredInterestsState: {
9
- fetchState: 'Not-Started',
10
- error: undefined,
11
- },
12
- notifyMeForFeatureState: {
13
- fetchState: 'Not-Started',
14
- error: undefined,
15
- },
16
- registeredInterests: [],
17
- };
18
- const featureNotificationView = (0, toolkit_1.createSlice)({
19
- name: 'featureNotificationView',
20
- initialState: exports.initialState,
21
- reducers: {
22
- notifyMeForFeature: {
23
- prepare(feature, additionalInfo, email) {
24
- return { payload: { feature, additionalInfo, email } };
25
- },
26
- reducer(draft,
27
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
- _action) {
29
- draft.notifyMeForFeatureState = {
30
- fetchState: 'In-Progress',
31
- error: undefined,
32
- };
33
- },
34
- },
35
- notifyMeForFeatureSuccess: {
36
- prepare(payload) {
37
- return { payload };
38
- },
39
- reducer(draft, action) {
40
- draft.notifyMeForFeatureState = {
41
- fetchState: 'Completed',
42
- error: undefined,
43
- };
44
- const interest = (0, featureNotificationViewPayload_1.toFeatureInterest)(action.payload);
45
- // Idempotent: if a row for this (feature, additional_info) already
46
- // exists in the slice, replace it; otherwise append.
47
- const existingIndex = draft.registeredInterests.findIndex((r) => r.feature === interest.feature &&
48
- r.additionalInfo === interest.additionalInfo);
49
- if (existingIndex >= 0) {
50
- draft.registeredInterests[existingIndex] = interest;
51
- }
52
- else {
53
- draft.registeredInterests.push(interest);
54
- }
55
- },
56
- },
57
- notifyMeForFeatureFailure: {
58
- prepare(status) {
59
- return { payload: { status } };
60
- },
61
- reducer(draft, action) {
62
- draft.notifyMeForFeatureState = {
63
- fetchState: 'Error',
64
- error: action.payload.status,
65
- };
66
- },
67
- },
68
- fetchRegisteredInterests: {
69
- prepare(feature) {
70
- return { payload: { feature } };
71
- },
72
- reducer(draft,
73
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
74
- _action) {
75
- draft.fetchRegisteredInterestsState = {
76
- fetchState: 'In-Progress',
77
- error: undefined,
78
- };
79
- },
80
- },
81
- fetchRegisteredInterestsSuccess: {
82
- prepare(interests) {
83
- return { payload: { interests } };
84
- },
85
- reducer(draft, action) {
86
- draft.fetchRegisteredInterestsState = {
87
- fetchState: 'Completed',
88
- error: undefined,
89
- };
90
- draft.registeredInterests = action.payload.interests;
91
- },
92
- },
93
- fetchRegisteredInterestsFailure: {
94
- prepare(status) {
95
- return { payload: { status } };
96
- },
97
- reducer(draft, action) {
98
- draft.fetchRegisteredInterestsState = {
99
- fetchState: 'Error',
100
- error: action.payload.status,
101
- };
102
- },
103
- },
104
- clearFeatureNotificationView(draft) {
105
- Object.assign(draft, exports.initialState);
106
- },
107
- },
108
- });
109
- _a = featureNotificationView.actions, exports.clearFeatureNotificationView = _a.clearFeatureNotificationView, exports.fetchRegisteredInterests = _a.fetchRegisteredInterests, exports.fetchRegisteredInterestsFailure = _a.fetchRegisteredInterestsFailure, exports.fetchRegisteredInterestsSuccess = _a.fetchRegisteredInterestsSuccess, exports.notifyMeForFeature = _a.notifyMeForFeature, exports.notifyMeForFeatureFailure = _a.notifyMeForFeatureFailure, exports.notifyMeForFeatureSuccess = _a.notifyMeForFeatureSuccess;
110
- exports.default = featureNotificationView.reducer;
@@ -1,6 +0,0 @@
1
- import { RootState } from '../../reducer';
2
- import { FeatureInterest } from './featureNotificationViewState';
3
- export declare const getFeatureNotificationView: (state: RootState) => import("./featureNotificationViewState").FeatureNotificationViewState;
4
- export declare const getRegisteredInterests: (state: RootState) => FeatureInterest[];
5
- export declare const getRegisteredInterestsByFeature: (state: RootState, feature: string) => FeatureInterest[];
6
- export declare const isFeatureInterestRegistered: (state: RootState, feature: string, additionalInfo: string) => boolean;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFeatureInterestRegistered = exports.getRegisteredInterestsByFeature = exports.getRegisteredInterests = exports.getFeatureNotificationView = void 0;
4
- const getFeatureNotificationView = (state) => state.featureNotificationViewState;
5
- exports.getFeatureNotificationView = getFeatureNotificationView;
6
- const getRegisteredInterests = (state) => state.featureNotificationViewState.registeredInterests;
7
- exports.getRegisteredInterests = getRegisteredInterests;
8
- const getRegisteredInterestsByFeature = (state, feature) => state.featureNotificationViewState.registeredInterests.filter((interest) => interest.feature === feature);
9
- exports.getRegisteredInterestsByFeature = getRegisteredInterestsByFeature;
10
- const isFeatureInterestRegistered = (state, feature, additionalInfo) => state.featureNotificationViewState.registeredInterests.some((interest) => interest.feature === feature && interest.additionalInfo === additionalInfo);
11
- exports.isFeatureInterestRegistered = isFeatureInterestRegistered;
@@ -1,26 +0,0 @@
1
- import { FetchStateAndError, ID } from '../../commonStateTypes/common';
2
- import { ZeniDate } from '../../zeniDayJS';
3
- /**
4
- * A single user-feature interest record returned by
5
- * `GET /1.0/feature-interests` and `POST /1.0/feature-interests`.
6
- *
7
- * Used by the Integrations page "Notify me" buttons to register that the
8
- * user wants an email when a not-yet-shipped connector becomes available.
9
- * Generic enough to drive any future "Notify me" UI by adding a slug to
10
- * the backend allowlist (FEATURE_INTEREST_ALLOWED_VALUES).
11
- */
12
- export interface FeatureInterest {
13
- createTime: ZeniDate;
14
- feature: string;
15
- interestId: ID;
16
- notified: boolean;
17
- updateTime: ZeniDate;
18
- additionalInfo?: string;
19
- email?: string;
20
- notifiedTime?: ZeniDate;
21
- }
22
- export interface FeatureNotificationViewState {
23
- fetchRegisteredInterestsState: FetchStateAndError;
24
- notifyMeForFeatureState: FetchStateAndError;
25
- registeredInterests: FeatureInterest[];
26
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });