summaryrefslogtreecommitdiff
path: root/packages/megalodon/src/notification.ts
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-09-24 01:44:53 +0200
committerMar0xy <marie@kaifa.ch>2023-09-24 01:44:53 +0200
commitafda15260f4f97ec00b3e7fdf63bd13013daae40 (patch)
tree8f7869ddb0fb48f096648d3765f0c25561606b10 /packages/megalodon/src/notification.ts
parentupd: add new endpoints to Masto API (diff)
downloadsharkey-afda15260f4f97ec00b3e7fdf63bd13013daae40.tar.gz
sharkey-afda15260f4f97ec00b3e7fdf63bd13013daae40.tar.bz2
sharkey-afda15260f4f97ec00b3e7fdf63bd13013daae40.zip
upd: megalodon to v7
Diffstat (limited to 'packages/megalodon/src/notification.ts')
-rw-r--r--packages/megalodon/src/notification.ts32
1 files changed, 22 insertions, 10 deletions
diff --git a/packages/megalodon/src/notification.ts b/packages/megalodon/src/notification.ts
index 84cd23e40d..7c08c5d47f 100644
--- a/packages/megalodon/src/notification.ts
+++ b/packages/megalodon/src/notification.ts
@@ -1,14 +1,26 @@
-import Entity from "./entity";
+import Entity from './entity'
namespace NotificationType {
- export const Follow: Entity.NotificationType = "follow";
- export const Favourite: Entity.NotificationType = "favourite";
- export const Reblog: Entity.NotificationType = "reblog";
- export const Mention: Entity.NotificationType = "mention";
- export const Reaction: Entity.NotificationType = "reaction";
- export const FollowRequest: Entity.NotificationType = "follow_request";
- export const Status: Entity.NotificationType = "status";
- export const Poll: Entity.NotificationType = "poll";
+ export const Follow: Entity.NotificationType = 'follow'
+ export const Favourite: Entity.NotificationType = 'favourite'
+ export const Reblog: Entity.NotificationType = 'reblog'
+ export const Mention: Entity.NotificationType = 'mention'
+ export const EmojiReaction: Entity.NotificationType = 'emoji_reaction'
+ export const FollowRequest: Entity.NotificationType = 'follow_request'
+ export const Status: Entity.NotificationType = 'status'
+ export const PollVote: Entity.NotificationType = 'poll_vote'
+ export const PollExpired: Entity.NotificationType = 'poll_expired'
+ export const Update: Entity.NotificationType = 'update'
+ export const Move: Entity.NotificationType = 'move'
+ export const AdminSignup: Entity.NotificationType = 'admin.sign_up'
+ export const AdminReport: Entity.NotificationType = 'admin.report'
}
-export default NotificationType;
+export class UnknownNotificationTypeError extends Error {
+ constructor() {
+ super()
+ Object.setPrototypeOf(this, UnknownNotificationTypeError.prototype)
+ }
+}
+
+export default NotificationType