-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBot.thrift
More file actions
39 lines (34 loc) · 729 Bytes
/
Bot.thrift
File metadata and controls
39 lines (34 loc) · 729 Bytes
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
enum BotErrorCode {
UNKNOWN = 0,
INTERNAL_ERROR = 500,
ILLEGAL_ARGUMENT = 400,
AUTHENTICATION_FAILED = 401,
BOT_NOT_FOUND = 1,
BOT_NOT_AVAILABLE = 2,
NOT_A_MEMBER = 3,
}
exception BotException {
1: BotErrorCode errorCode;
2: string reason;
3: map<string, string> parameterMap;
}
struct GetSquareBotRequest {
1: string botMid;
}
struct GetSquareBotResponse {
1: SquareBot squareBot;
}
struct SquareBot {
1: string botMid;
2: bool active;
3: string displayName;
4: string profileImageObsHash;
5: i32 iconType;
6: i64 lastModifiedAt;
7: i64 expiredIn;
}
service BotService {
GetSquareBotResponse getSquareBot(
1: GetSquareBotRequest req
) throws(1: BotException e)
}