@plyaz/types 1.45.4 → 1.45.6

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.
@@ -61,6 +61,26 @@ export interface NotificationsFrontendStoreData {
61
61
  notificationsList: NotificationStoreItem[];
62
62
  lastNotification?: NotificationStoreItem | null;
63
63
  }
64
+ /**
65
+ * Core base methods for notifications store.
66
+ * Inherited from CoreBaseFrontendStore - used by slice factory.
67
+ */
68
+ export type NotificationsCoreBaseMethods = CoreBaseFrontendStore<NotificationsFrontendStoreData>;
69
+ /**
70
+ * Notification-specific actions (not from CoreBaseFrontendStore)
71
+ */
72
+ export interface NotificationsSpecificActions {
73
+ /** Add a notification to the list */
74
+ addNotification: (notification: NotificationStoreItem) => void;
75
+ /** Remove a notification by ID */
76
+ removeNotification: (id: string) => void;
77
+ /** Update a notification by ID */
78
+ updateNotification: (id: string, updates: Partial<NotificationStoreItem>) => void;
79
+ /** Clear all notifications */
80
+ clearNotifications: () => void;
81
+ /** Reset store to initial state */
82
+ reset: () => void;
83
+ }
64
84
  /**
65
85
  * Notifications store actions
66
86
  *
@@ -70,12 +90,7 @@ export interface NotificationsFrontendStoreData {
70
90
  * NOTE: Frontend only handles IN_APP notifications.
71
91
  * Read/unread state management can be added later via REST APIs if needed.
72
92
  */
73
- export interface NotificationsFrontendStoreActions extends CoreBaseFrontendStore<NotificationsFrontendStoreData> {
74
- addNotification: (notification: NotificationStoreItem) => void;
75
- removeNotification: (id: string) => void;
76
- updateNotification: (id: string, updates: Partial<NotificationStoreItem>) => void;
77
- clearNotifications: () => void;
78
- reset: () => void;
93
+ export interface NotificationsFrontendStoreActions extends NotificationsCoreBaseMethods, NotificationsSpecificActions {
79
94
  }
80
95
  /**
81
96
  * Complete notifications store slice type
@@ -83,3 +98,19 @@ export interface NotificationsFrontendStoreActions extends CoreBaseFrontendStore
83
98
  */
84
99
  export interface NotificationsFrontendStoreSlice extends NotificationsFrontendStoreState, NotificationsFrontendStoreActions {
85
100
  }
101
+ /**
102
+ * Notifications store selectors
103
+ *
104
+ */
105
+ export interface NotificationsStoreSelectors {
106
+ /** Select all notifications */
107
+ selectNotifications: (state: NotificationsFrontendStoreState) => NotificationStoreItem[];
108
+ /** Select last notification */
109
+ selectLastNotification: (state: NotificationsFrontendStoreState) => NotificationStoreItem | null;
110
+ /** Select notifications count */
111
+ selectNotificationsCount: (state: NotificationsFrontendStoreState) => number;
112
+ /** Select loading state */
113
+ selectIsLoading: (state: NotificationsFrontendStoreState) => boolean;
114
+ /** Select notification by ID */
115
+ selectNotificationById: (state: NotificationsFrontendStoreState, id: string) => NotificationStoreItem | undefined;
116
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.45.4",
3
+ "version": "1.45.6",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",