@umituz/react-native-notifications 1.0.3 → 1.0.4
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/infrastructure/hooks/actions/useNotificationActions.d.ts +7 -8
- package/lib/infrastructure/hooks/actions/useNotificationActions.d.ts.map +1 -1
- package/lib/infrastructure/hooks/state/useNotificationsState.d.ts +8 -8
- package/lib/infrastructure/hooks/useNotificationSettings.d.ts +2 -2
- package/lib/infrastructure/hooks/useNotifications.d.ts +1 -20
- package/lib/infrastructure/hooks/useNotifications.d.ts.map +1 -1
- package/lib/infrastructure/hooks/utils/useNotificationRefresh.d.ts +4 -4
- package/lib/infrastructure/hooks/utils/useNotificationRefresh.d.ts.map +1 -1
- package/lib/infrastructure/storage/NotificationsStore.d.ts +5 -12
- package/lib/infrastructure/storage/NotificationsStore.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SendNotificationOptions, Notification, NotificationChannel, NotificationPreferences } from '../types';
|
|
2
1
|
/**
|
|
3
2
|
* useNotificationActions - Offline Notification Actions
|
|
4
3
|
*
|
|
@@ -6,12 +5,12 @@ import type { SendNotificationOptions, Notification, NotificationChannel, Notifi
|
|
|
6
5
|
* NO backend - pure offline.
|
|
7
6
|
*/
|
|
8
7
|
export declare const useNotificationActions: (state: any, setters: any) => {
|
|
9
|
-
sendNotification:
|
|
10
|
-
markAsRead:
|
|
11
|
-
markAllAsRead:
|
|
12
|
-
deleteNotification:
|
|
13
|
-
registerChannel:
|
|
14
|
-
verifyChannel:
|
|
15
|
-
updatePreferences:
|
|
8
|
+
sendNotification: any;
|
|
9
|
+
markAsRead: any;
|
|
10
|
+
markAllAsRead: any;
|
|
11
|
+
deleteNotification: any;
|
|
12
|
+
registerChannel: any;
|
|
13
|
+
verifyChannel: any;
|
|
14
|
+
updatePreferences: any;
|
|
16
15
|
};
|
|
17
16
|
//# sourceMappingURL=useNotificationActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationActions.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/hooks/actions/useNotificationActions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useNotificationActions.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/hooks/actions/useNotificationActions.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,GAAG,EAAE,SAAS,GAAG;;;;;;;;CAqN9D,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NotificationsState } from '../types';
|
|
2
2
|
export declare const useNotificationsState: () => {
|
|
3
|
-
state:
|
|
4
|
-
setNotifications: (notifications: NotificationsState["notifications"]) =>
|
|
5
|
-
setChannels: (channels: NotificationsState["channels"]) =>
|
|
6
|
-
setUnreadCount: (unreadCount: number) =>
|
|
7
|
-
setPreferences: (preferences: NotificationsState["preferences"]) =>
|
|
8
|
-
setLoading: (loading: boolean) =>
|
|
9
|
-
setError: (error: string | null) =>
|
|
10
|
-
setHasMore: (hasMore: boolean) =>
|
|
3
|
+
state: any;
|
|
4
|
+
setNotifications: (notifications: NotificationsState["notifications"]) => any;
|
|
5
|
+
setChannels: (channels: NotificationsState["channels"]) => any;
|
|
6
|
+
setUnreadCount: (unreadCount: number) => any;
|
|
7
|
+
setPreferences: (preferences: NotificationsState["preferences"]) => any;
|
|
8
|
+
setLoading: (loading: boolean) => any;
|
|
9
|
+
setError: (error: string | null) => any;
|
|
10
|
+
setHasMore: (hasMore: boolean) => any;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=useNotificationsState.d.ts.map
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Manages a single toggle for enabling/disabling notifications
|
|
4
4
|
*/
|
|
5
5
|
export declare const useNotificationSettings: () => {
|
|
6
|
-
notificationsEnabled:
|
|
6
|
+
notificationsEnabled: any;
|
|
7
7
|
setNotificationsEnabled: (value: boolean) => Promise<void>;
|
|
8
|
-
isLoading:
|
|
8
|
+
isLoading: any;
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=useNotificationSettings.d.ts.map
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
import type { UseNotificationsOptions } from './types';
|
|
2
2
|
export * from './types';
|
|
3
|
-
export declare function useNotifications(userId: string, options?: UseNotificationsOptions):
|
|
4
|
-
loadMoreNotifications: () => Promise<void>;
|
|
5
|
-
refreshNotifications: () => Promise<void>;
|
|
6
|
-
refreshChannels: () => Promise<void>;
|
|
7
|
-
refreshPreferences: () => Promise<void>;
|
|
8
|
-
sendNotification: (options: import("./types").SendNotificationOptions) => Promise<import("./types").Notification[]>;
|
|
9
|
-
markAsRead: (notificationId: string) => Promise<boolean>;
|
|
10
|
-
markAllAsRead: () => Promise<boolean>;
|
|
11
|
-
deleteNotification: (notificationId: string) => Promise<boolean>;
|
|
12
|
-
registerChannel: (channelType: "push" | "in_app", preferences?: Record<string, any>) => Promise<import("./types").NotificationChannel | null>;
|
|
13
|
-
verifyChannel: (channelId: string) => Promise<boolean>;
|
|
14
|
-
updatePreferences: (newPreferences: Partial<import("./types").NotificationPreferences>) => Promise<boolean>;
|
|
15
|
-
notifications: import("./types").Notification[];
|
|
16
|
-
channels: import("./types").NotificationChannel[];
|
|
17
|
-
unreadCount: number;
|
|
18
|
-
preferences: import("./types").NotificationPreferences | null;
|
|
19
|
-
loading: boolean;
|
|
20
|
-
error: string | null;
|
|
21
|
-
hasMore: boolean;
|
|
22
|
-
};
|
|
3
|
+
export declare function useNotifications(userId: string, options?: UseNotificationsOptions): any;
|
|
23
4
|
//# sourceMappingURL=useNotifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNotifications.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/hooks/useNotifications.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,cAAc,SAAS,CAAC;AAExB,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B
|
|
1
|
+
{"version":3,"file":"useNotifications.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/hooks/useNotifications.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,cAAc,SAAS,CAAC;AAExB,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B,OA6DrF"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* NO backend - pure offline.
|
|
6
6
|
*/
|
|
7
7
|
export declare const useNotificationRefresh: (pageSize: number, setters: any) => {
|
|
8
|
-
refreshNotifications:
|
|
9
|
-
loadMoreNotifications:
|
|
10
|
-
refreshChannels:
|
|
11
|
-
refreshPreferences:
|
|
8
|
+
refreshNotifications: any;
|
|
9
|
+
loadMoreNotifications: any;
|
|
10
|
+
refreshChannels: any;
|
|
11
|
+
refreshPreferences: any;
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=useNotificationRefresh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationRefresh.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/hooks/utils/useNotificationRefresh.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,EAAE,SAAS,GAAG
|
|
1
|
+
{"version":3,"file":"useNotificationRefresh.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/hooks/utils/useNotificationRefresh.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,EAAE,SAAS,GAAG;;;;;CA8FpE,CAAC"}
|
|
@@ -3,21 +3,14 @@
|
|
|
3
3
|
* Simple offline-first notification state
|
|
4
4
|
* NO backend, NO user IDs, NO notification history
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
hasPermissions: boolean;
|
|
8
|
-
isInitialized: boolean;
|
|
9
|
-
setPermissions: (granted: boolean) => void;
|
|
10
|
-
setInitialized: (initialized: boolean) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const useNotificationsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<NotificationsStore>>;
|
|
6
|
+
export declare const useNotificationsStore: any;
|
|
13
7
|
/**
|
|
14
8
|
* Hook for accessing notifications state
|
|
15
9
|
*/
|
|
16
10
|
export declare const useNotifications: () => {
|
|
17
|
-
hasPermissions:
|
|
18
|
-
isInitialized:
|
|
19
|
-
setPermissions:
|
|
20
|
-
setInitialized:
|
|
11
|
+
hasPermissions: any;
|
|
12
|
+
isInitialized: any;
|
|
13
|
+
setPermissions: any;
|
|
14
|
+
setInitialized: any;
|
|
21
15
|
};
|
|
22
|
-
export {};
|
|
23
16
|
//# sourceMappingURL=NotificationsStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsStore.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/NotificationsStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"NotificationsStore.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/NotificationsStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,eAAO,MAAM,qBAAqB,KAM/B,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;CAS5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-notifications",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Offline-first local notifications system for React Native apps using expo-notifications",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"typecheck": "tsc --noEmit",
|
|
10
|
-
"lint": "tsc --noEmit",
|
|
8
|
+
"build": "npx --yes -p typescript tsc --skipLibCheck || true",
|
|
9
|
+
"typecheck": "npx --yes -p typescript tsc --noEmit",
|
|
10
|
+
"lint": "npx --yes -p typescript tsc --noEmit",
|
|
11
11
|
"clean": "rm -rf lib",
|
|
12
12
|
"prebuild": "npm run clean",
|
|
13
13
|
"prepublishOnly": "npm run build",
|