-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathChatapp.thrift
More file actions
66 lines (55 loc) · 1.11 KB
/
Chatapp.thrift
File metadata and controls
66 lines (55 loc) · 1.11 KB
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
enum AvailableChatType {
PERSONAL = 1,
ROOM = 2,
GROUP = 3,
SQUARE_CHAT = 4,
}
enum ChatappCategory {
PRIORITY = 2,
REGULAR = 1,
MORE = 3;
}
enum ChatappErrorCode {
INVALID_REQUEST = 1,
UNAUTHORIZED = 2,
SERVER_ERROR = 100,
}
exception ChatappException {
1: ChatappErrorCode code;
2: string reason;
}
struct Chatapp {
1: string chatappId;
2: string name;
3: string icon;
4: string url;
5: list<AvailableChatType> availableChatTypes;
}
struct GetChatappRequest {
1: string chatappId;
2: string language;
}
struct GetChatappResponse {
1: Chatapp app;
}
struct GetMyChatappsRequest {
1: string language;
2: string continuationToken;
}
struct GetMyChatappsResponse {
1: list<MyChatapp> apps;
2: string continuationToken;
}
struct MyChatapp {
1: Chatapp app;
2: ChatappCategory category;
3: i64 priority;
}
service ChatappService {
GetChatappResponse getChatapp(
1: GetChatappRequest request
) throws(1: ChatappException e);
GetMyChatappsResponse getMyChatapps(
1: GetMyChatappsRequest request
) throws(1: ChatappException e);
}