@zeniai/client-epic-state 5.1.75 → 5.1.76-betaDI0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/notificationRegistry/notificationRegistryPayload.d.ts +1 -0
- package/lib/entity/notificationRegistry/notificationRegistryPayload.js +3 -0
- package/lib/entity/notificationRegistry/notificationRegistryState.d.ts +1 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistryPayload.js +3 -0
- package/package.json +1 -1
|
@@ -14,5 +14,6 @@ export interface NotificationGroupPayload {
|
|
|
14
14
|
export interface NotificationRegistryPayload {
|
|
15
15
|
frequency_options: string[];
|
|
16
16
|
groups: NotificationGroupPayload[];
|
|
17
|
+
default_frequency?: string;
|
|
17
18
|
}
|
|
18
19
|
export declare const mapNotificationRegistryPayloadToRegistry: (payload: NotificationRegistryPayload) => NotificationRegistry;
|
|
@@ -22,6 +22,9 @@ const mapGroup = (payload) => ({
|
|
|
22
22
|
groupId: payload.group_id,
|
|
23
23
|
});
|
|
24
24
|
const mapNotificationRegistryPayloadToRegistry = (payload) => ({
|
|
25
|
+
defaultFrequency: payload.default_frequency != null
|
|
26
|
+
? (0, notificationRegistryState_1.toNotificationFrequency)(payload.default_frequency)
|
|
27
|
+
: undefined,
|
|
25
28
|
frequencyOptions: payload.frequency_options.map(notificationRegistryState_1.toNotificationFrequency),
|
|
26
29
|
groups: payload.groups.map(mapGroup),
|
|
27
30
|
});
|
|
@@ -19,6 +19,7 @@ export interface RegistryNotificationGroup {
|
|
|
19
19
|
export interface NotificationRegistry {
|
|
20
20
|
frequencyOptions: NotificationFrequency[];
|
|
21
21
|
groups: RegistryNotificationGroup[];
|
|
22
|
+
defaultFrequency?: NotificationFrequency;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* The registry is a singleton (not per-tenant). We keep the wrapper so
|
|
@@ -19,6 +19,9 @@ const mapGroup = (payload) => ({
|
|
|
19
19
|
groupId: payload.group_id,
|
|
20
20
|
});
|
|
21
21
|
export const mapNotificationRegistryPayloadToRegistry = (payload) => ({
|
|
22
|
+
defaultFrequency: payload.default_frequency != null
|
|
23
|
+
? toNotificationFrequency(payload.default_frequency)
|
|
24
|
+
: undefined,
|
|
22
25
|
frequencyOptions: payload.frequency_options.map(toNotificationFrequency),
|
|
23
26
|
groups: payload.groups.map(mapGroup),
|
|
24
27
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.76-betaDI0",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|