-
Notifications
You must be signed in to change notification settings - Fork 10k
/
ISubscription.ts
75 lines (60 loc) · 1.76 KB
/
ISubscription.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
import type { IRocketChatRecord } from './IRocketChatRecord';
import type { IRole } from './IRole';
import type { IUser } from './IUser';
import type { RoomType } from './RoomType';
type RoomID = string;
export interface ISubscription extends IRocketChatRecord {
u: Pick<IUser, '_id' | 'username' | 'name'>;
v?: Pick<IUser, '_id' | 'username' | 'name'>;
rid: RoomID;
open: boolean;
ts: Date;
name: string;
alert?: boolean;
unread: number;
t: RoomType;
ls: Date;
f?: true;
lr: Date;
hideUnreadStatus?: true;
hideMentionStatus?: true;
teamMain?: boolean;
teamId?: string;
userMentions: number;
groupMentions: number;
broadcast?: true;
tunread?: Array<string>;
tunreadGroup?: Array<string>;
tunreadUser?: Array<string>;
prid?: RoomID;
roles?: IRole['_id'][];
onHold?: boolean;
encrypted?: boolean;
E2EKey?: string;
E2ESuggestedKey?: string;
unreadAlert?: 'default' | 'all' | 'mentions' | 'nothing';
fname?: string;
code?: unknown;
archived?: boolean;
audioNotificationValue?: string;
desktopNotifications?: 'all' | 'mentions' | 'nothing';
mobilePushNotifications?: 'all' | 'mentions' | 'nothing';
emailNotifications?: 'all' | 'mentions' | 'nothing';
blocked?: unknown;
blocker?: unknown;
autoTranslate?: boolean;
autoTranslateLanguage?: string;
disableNotifications?: boolean;
muteGroupMentions?: boolean;
ignored?: IUser['_id'][];
department?: unknown;
desktopPrefOrigin?: 'subscription' | 'user';
mobilePrefOrigin?: 'subscription' | 'user';
emailPrefOrigin?: 'subscription' | 'user';
}
export interface IOmnichannelSubscription extends ISubscription {
department?: string; // TODO REMOVE/DEPRECATE no need keeo in both room and subscription
}
export interface ISubscriptionDirectMessage extends Omit<ISubscription, 'name'> {
t: 'd';
}