@simonarcher/fika-types 1.0.37 → 1.0.38
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/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/notificationChannels.d.ts +37 -0
- package/dist/notificationChannels.js +15 -0
- package/dist/user.d.ts +11 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -28,3 +28,5 @@ __exportStar(require("./userList"), exports);
|
|
|
28
28
|
__exportStar(require("./coffeeEvents"), exports);
|
|
29
29
|
// Export all quest-related types
|
|
30
30
|
__exportStar(require("./quest"), exports);
|
|
31
|
+
// Export all notification channels-related types
|
|
32
|
+
__exportStar(require("./notificationChannels"), exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing different notification channel types
|
|
3
|
+
*/
|
|
4
|
+
export declare enum NotificationChannelType {
|
|
5
|
+
NEW_SHOPS_IN_CITY = "NEW_SHOPS_IN_CITY",
|
|
6
|
+
SUBMISSION_UPDATES = "SUBMISSION_UPDATES"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Interface for notification channel configuration
|
|
10
|
+
*/
|
|
11
|
+
export interface NotificationChannel {
|
|
12
|
+
id: NotificationChannelType;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
category: "location" | "account" | "community" | "rewards";
|
|
16
|
+
defaultEnabled: boolean;
|
|
17
|
+
requiresLocation?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Interface for user's channel preference
|
|
21
|
+
*/
|
|
22
|
+
export interface UserChannelPreference {
|
|
23
|
+
channelId: NotificationChannelType;
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
lastUpdated: Date;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Interface for complete notification preferences
|
|
29
|
+
*/
|
|
30
|
+
export interface NotificationPreferences {
|
|
31
|
+
channels: {
|
|
32
|
+
[channelId in NotificationChannelType]?: UserChannelPreference;
|
|
33
|
+
};
|
|
34
|
+
pushNotificationsEnabled: boolean;
|
|
35
|
+
inAppNotificationsEnabled: boolean;
|
|
36
|
+
lastUpdated: Date;
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationChannelType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Enum representing different notification channel types
|
|
6
|
+
*/
|
|
7
|
+
var NotificationChannelType;
|
|
8
|
+
(function (NotificationChannelType) {
|
|
9
|
+
NotificationChannelType["NEW_SHOPS_IN_CITY"] = "NEW_SHOPS_IN_CITY";
|
|
10
|
+
NotificationChannelType["SUBMISSION_UPDATES"] = "SUBMISSION_UPDATES";
|
|
11
|
+
// Future channels can be added here
|
|
12
|
+
// LOYALTY_REWARDS = "LOYALTY_REWARDS",
|
|
13
|
+
// EVENT_UPDATES = "EVENT_UPDATES",
|
|
14
|
+
// COMMUNITY_UPDATES = "COMMUNITY_UPDATES",
|
|
15
|
+
})(NotificationChannelType || (exports.NotificationChannelType = NotificationChannelType = {}));
|
package/dist/user.d.ts
CHANGED
|
@@ -20,5 +20,16 @@ export interface User {
|
|
|
20
20
|
[key: string]: any;
|
|
21
21
|
};
|
|
22
22
|
expoPushTokens?: string[];
|
|
23
|
+
notificationPreferences?: {
|
|
24
|
+
channels: {
|
|
25
|
+
[channelId: string]: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
lastUpdated: Date;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
pushNotificationsEnabled: boolean;
|
|
31
|
+
inAppNotificationsEnabled: boolean;
|
|
32
|
+
lastUpdated: Date;
|
|
33
|
+
};
|
|
23
34
|
[key: string]: any;
|
|
24
35
|
}
|