-
Notifications
You must be signed in to change notification settings - Fork 0
/
Notification.ts
90 lines (78 loc) · 2.32 KB
/
Notification.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { type BasicComment, BasicCommentSchema, type BasicThread, BasicThreadSchema, type BasicUser, BasicUserSchema } from './Basic'
/**
* `NotificationOptionInput` is an interface representing the options for a notification.
* It includes the type and enabled status each having their own properties.
*/
export interface NotificationOptionInput {
/**
* `type` is a string representing the type of the notification.
*/
type: string
/**
* `enabled` is a boolean representing whether the notification is enabled or not.
*/
enabled: boolean
}
/**
* `ThreadNotification` is an interface representing a thread notification.
* It includes the id, userId, type, commentId, context, createdAt, thread, comment, and user each having their own properties.
*/
export interface ThreadNotification {
/**
* `id` is a number representing the id of the thread notification.
*/
id: number
/**
* `userId` is a number representing the id of the user associated with the thread notification.
*/
userId: number
/**
* `type` is a string representing the type of the thread notification.
*/
type: string
/**
* `commentId` is a number representing the id of the comment associated with the thread notification.
*/
commentId: number
/**
* `context` is a string representing the context of the thread notification.
*/
context: string
/**
* `createdAt` is a number representing the timestamp when the thread notification was created.
*/
createdAt: number
/**
* `thread` is an instance of `BasicThread` representing the thread associated with the thread notification.
*/
thread: BasicThread
/**
* `comment` is an instance of `BasicComment` representing the comment associated with the thread notification.
*/
comment: BasicComment
/**
* `user` is an instance of `BasicUser` representing the user associated with the thread notification.
*/
user: BasicUser
}
/**
* `ThreadNotificationSchema` is a string representing the GraphQL schema for a thread notification.
* It includes the id, userId, type, commentId, context, createdAt, thread, comment, and user.
*/
export const ThreadNotificationSchema = `
id
userId
type
commentId
context
createdAt
thread {
${BasicThreadSchema}
}
comment {
${BasicCommentSchema}
}
user {
${BasicUserSchema}
}
`