@krampa/common 0.7.0 → 0.8.0
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 +1 -0
- package/dist/notification-types.d.ts +23 -0
- package/dist/notification-types.js +17 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,3 +22,4 @@ __exportStar(require("./goal-types"), exports);
|
|
|
22
22
|
__exportStar(require("./goal-value-types"), exports);
|
|
23
23
|
__exportStar(require("./invite-status"), exports);
|
|
24
24
|
__exportStar(require("./challenge-status"), exports);
|
|
25
|
+
__exportStar(require("./notification-types"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification types for FCM push notifications
|
|
3
|
+
*/
|
|
4
|
+
export declare enum NotificationType {
|
|
5
|
+
CHALLENGE_STARTED = "challenge_started",
|
|
6
|
+
CHALLENGE_INVITATION = "challenge_invitation",
|
|
7
|
+
CHALLENGE_ACCEPTED = "challenge_accepted",
|
|
8
|
+
CHALLENGE_DECLINED = "challenge_declined",
|
|
9
|
+
CHALLENGE_ENDED = "challenge_ended",
|
|
10
|
+
NEW_LOG_ENTRY = "new_log_entry",
|
|
11
|
+
GOAL_ACHIEVED = "goal_achieved",
|
|
12
|
+
GOALS_SUBMITTED = "goals_submitted"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Notification payload sent to FCM
|
|
16
|
+
*/
|
|
17
|
+
export interface NotificationPayload {
|
|
18
|
+
type: NotificationType;
|
|
19
|
+
challengeId?: number;
|
|
20
|
+
userId?: number;
|
|
21
|
+
message?: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Notification types for FCM push notifications
|
|
6
|
+
*/
|
|
7
|
+
var NotificationType;
|
|
8
|
+
(function (NotificationType) {
|
|
9
|
+
NotificationType["CHALLENGE_STARTED"] = "challenge_started";
|
|
10
|
+
NotificationType["CHALLENGE_INVITATION"] = "challenge_invitation";
|
|
11
|
+
NotificationType["CHALLENGE_ACCEPTED"] = "challenge_accepted";
|
|
12
|
+
NotificationType["CHALLENGE_DECLINED"] = "challenge_declined";
|
|
13
|
+
NotificationType["CHALLENGE_ENDED"] = "challenge_ended";
|
|
14
|
+
NotificationType["NEW_LOG_ENTRY"] = "new_log_entry";
|
|
15
|
+
NotificationType["GOAL_ACHIEVED"] = "goal_achieved";
|
|
16
|
+
NotificationType["GOALS_SUBMITTED"] = "goals_submitted";
|
|
17
|
+
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|