line.thrift
10.2 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
namespace cpp line
enum ContactSetting {
CONTACT_SETTING_DELETE = 16;
}
enum ContactStatus {
FRIEND = 1;
FRIEND_BLOCKED = 2;
RECOMMEND_BLOCKED = 4;
DELETED = 5;
DELETED_BLOCKED = 6;
}
enum ContentType {
NONE = 0;
IMAGE = 1;
VIDEO = 2;
AUDIO = 3;
HTML = 4;
PDF = 5;
CALL = 6;
STICKER = 7;
PRESENCE = 8;
GIFT = 9;
GROUPBOARD = 10;
APPLINK = 11;
LINK = 12;
CONTACT = 13;
FILE = 14;
LOCATION = 15;
POSTNOTIFICATION = 16;
RICH = 17;
CHATEVENT = 18;
}
enum ErrorCode {
ILLEGAL_ARGUMENT = 0;
AUTHENTICATION_FAILED = 1;
DB_FAILED = 2;
INVALID_STATE = 3;
EXCESSIVE_ACCESS = 4;
NOT_FOUND = 5;
INVALID_LENGTH = 6;
NOT_AVAILABLE_USER = 7;
NOT_AUTHORIZED_DEVICE = 8;
INVALID_MID = 9;
NOT_A_MEMBER = 10;
INCOMPATIBLE_APP_VERSION = 11;
NOT_READY = 12;
NOT_AVAILABLE_SESSION = 13;
NOT_AUTHORIZED_SESSION = 14;
SYSTEM_ERROR = 15;
NO_AVAILABLE_VERIFICATION_METHOD = 16;
NOT_AUTHENTICATED = 17;
INVALID_IDENTITY_CREDENTIAL = 18;
NOT_AVAILABLE_IDENTITY_IDENTIFIER = 19;
INTERNAL_ERROR = 20;
NO_SUCH_IDENTITY_IDENFIER = 21;
DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY = 22;
ILLEGAL_IDENTITY_CREDENTIAL = 23;
UNKNOWN_CHANNEL = 24;
NO_SUCH_MESSAGE_BOX = 25;
NOT_AVAILABLE_MESSAGE_BOX = 26;
CHANNEL_DOES_NOT_MATCH = 27;
NOT_YOUR_MESSAGE = 28;
MESSAGE_DEFINED_ERROR = 29;
USER_CANNOT_ACCEPT_PRESENTS = 30;
USER_NOT_STICKER_OWNER = 32;
MAINTENANCE_ERROR = 33;
ACCOUNT_NOT_MATCHED = 34;
ABUSE_BLOCK = 35;
NOT_FRIEND = 36;
NOT_ALLOWED_CALL = 37;
BLOCK_FRIEND = 38;
INCOMPATIBLE_VOIP_VERSION = 39;
INVALID_SNS_ACCESS_TOKEN = 40;
EXTERNAL_SERVICE_NOT_AVAILABLE = 41;
NOT_ALLOWED_ADD_CONTACT = 42;
NOT_CERTIFICATED = 43;
NOT_ALLOWED_SECONDARY_DEVICE = 44;
INVALID_PIN_CODE = 45;
NOT_FOUND_IDENTITY_CREDENTIAL = 46;
EXCEED_FILE_MAX_SIZE = 47;
EXCEED_DAILY_QUOTA = 48;
NOT_SUPPORT_SEND_FILE = 49;
MUST_UPGRADE = 50;
NOT_AVAILABLE_PIN_CODE_SESSION = 51;
EXPIRED_REVISION = 52;
NOT_YET_PHONE_NUMBER = 54;
BAD_CALL_NUMBER = 55;
UNAVAILABLE_CALL_NUMBER = 56;
NOT_SUPPORT_CALL_SERVICE = 57;
CONGESTION_CONTROL = 58;
NO_BALANCE = 59;
NOT_PERMITTED_CALLER_ID = 60;
NO_CALLER_ID_LIMIT_EXCEEDED = 61;
CALLER_ID_VERIFICATION_REQUIRED = 62;
NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED = 63;
MESSAGE_NOT_FOUND = 64;
INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT = 65;
ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED = 66;
ACCOUNT_MIGRATION_PINCODE_BLOCKED = 67;
INVALID_PASSWORD_FORMAT = 69;
FEATURE_RESTRICTED = 70;
MESSAGE_NOT_DESTRUCTIBLE = 71;
PAID_CALL_REDEEM_FAILED = 72;
PREVENTED_JOIN_BY_TICKET = 73;
SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT = 75;
SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY = 76;
SECURITY_CENTER_NOT_VERIFIED = 77;
SECURITY_CENTER_BLOCKED_BY_SETTING = 78;
SECURITY_CENTER_BLOCKED = 79;
TALK_PROXY_EXCEPTION = 80;
E2EE_INVALID_PROTOCOL = 81;
E2EE_RETRY_ENCRYPT = 82;
E2EE_UPDATE_SENDER_KEY = 83;
E2EE_UPDATE_RECEIVER_KEY = 84;
E2EE_INVALID_ARGUMENT = 85;
E2EE_INVALID_VERSION = 86;
E2EE_SENDER_DISABLED = 87;
E2EE_RECEIVER_DISABLED = 88;
E2EE_SENDER_NOT_ALLOWED = 89;
E2EE_RECEIVER_NOT_ALLOWED = 90;
E2EE_RESEND_FAIL = 91;
E2EE_RESEND_OK = 92;
HITOKOTO_BACKUP_NO_AVAILABLE_DATA = 93;
E2EE_UPDATE_PRIMARY_DEVICE = 94;
SUCCESS = 95;
CANCEL = 96;
E2EE_PRIMARY_NOT_SUPPORT = 97
}
enum IdentityProvider {
LINE = 1;
}
enum LoginResultType {
SUCCESS = 1;
REQUIRE_DEVICE_CONFIRM = 3;
}
enum MIDType {
USER = 0;
ROOM = 1;
GROUP = 2;
}
enum OpType {
END_OF_OPERATION = 0;
UPDATE_PROFILE = 1;
NOTIFIED_UPDATE_PROFILE = 2;
REGISTER_USERID = 3;
ADD_CONTACT = 4;
NOTIFIED_ADD_CONTACT = 5;
BLOCK_CONTACT = 6;
UNBLOCK_CONTACT = 7;
NOTIFIED_RECOMMEND_CONTACT = 8;
CREATE_GROUP = 9;
UPDATE_GROUP = 10;
NOTIFIED_UPDATE_GROUP = 11;
INVITE_INTO_GROUP = 12;
NOTIFIED_INVITE_INTO_GROUP = 13;
LEAVE_GROUP = 14;
NOTIFIED_LEAVE_GROUP = 15;
ACCEPT_GROUP_INVITATION = 16;
NOTIFIED_ACCEPT_GROUP_INVITATION = 17;
KICKOUT_FROM_GROUP = 18;
NOTIFIED_KICKOUT_FROM_GROUP = 19;
CREATE_ROOM = 20;
INVITE_INTO_ROOM = 21;
NOTIFIED_INVITE_INTO_ROOM = 22;
LEAVE_ROOM = 23;
NOTIFIED_LEAVE_ROOM = 24;
SEND_MESSAGE = 25;
RECEIVE_MESSAGE = 26;
SEND_MESSAGE_RECEIPT = 27;
RECEIVE_MESSAGE_RECEIPT = 28;
SEND_CONTENT_RECEIPT = 29;
RECEIVE_ANNOUNCEMENT = 30;
CANCEL_INVITATION_GROUP = 31;
NOTIFIED_CANCEL_INVITATION_GROUP = 32;
NOTIFIED_UNREGISTER_USER = 33;
REJECT_GROUP_INVITATION = 34;
NOTIFIED_REJECT_GROUP_INVITATION = 35;
UPDATE_SETTINGS = 36;
NOTIFIED_REGISTER_USER = 37;
INVITE_VIA_EMAIL = 38;
NOTIFIED_REQUEST_RECOVERY = 39;
SEND_CHAT_CHECKED = 40;
SEND_CHAT_REMOVED = 41;
NOTIFIED_FORCE_SYNC = 42;
SEND_CONTENT = 43;
SEND_MESSAGE_MYHOME = 44;
NOTIFIED_UPDATE_CONTENT_PREVIEW = 45;
REMOVE_ALL_MESSAGES = 46;
NOTIFIED_UPDATE_PURCHASES = 47;
DUMMY = 48;
UPDATE_CONTACT = 49;
NOTIFIED_RECEIVED_CALL = 50;
CANCEL_CALL = 51;
NOTIFIED_REDIRECT = 52;
NOTIFIED_CHANNEL_SYNC = 53;
FAILED_SEND_MESSAGE = 54;
NOTIFIED_READ_MESSAGE = 55;
FAILED_EMAIL_CONFIRMATION = 56;
NOTIFIED_CHAT_CONTENT = 58;
NOTIFIED_PUSH_NOTICENTER_ITEM = 59;
}
struct Contact {
1: string mid;
11: ContactStatus status;
22: string displayName;
26: string statusMessage;
35: i32 attributes;
37: string picturePath;
}
struct Group {
1: string id;
10: string name;
20: list<Contact> members;
21: Contact creator;
22: list<Contact> invitee;
}
struct Location {
1: string title;
2: string address;
3: double latitude;
4: double longitude;
}
struct LoginRequest {
1: i32 type;
2: i32 identityProvider;
3: string identifier;
4: string password;
5: bool keepLoggedIn;
6: string accessLocation;
7: string systemName;
8: string certificate;
9: string verifier;
10: string secret;
11: i32 e2eeVersion;
}
struct LoginResult {
1: string authToken;
2: string certificate;
3: string verifier;
4: string pinCode;
5: LoginResultType type;
}
enum LoginType {
ID_CREDENTIAL = 0;
QRCODE = 1;
ID_CREDENTIAL_WITH_E2EE = 2;
}
struct Message {
1: string from_;
2: string to;
3: MIDType toType;
4: string id;
5: i64 createdTime;
10: string text;
11: optional Location location;
15: ContentType contentType;
17: binary contentPreview;
18: map<string, string> contentMetadata;
}
struct MessageBox {
1: string id;
9: MIDType midType;
10: list<Message> lastMessages;
}
struct MessageBoxWrapUp {
1: MessageBox messageBox;
3: list<Contact> contacts;
}
struct MessageBoxWrapUpList {
1: list<MessageBoxWrapUp> messageBoxWrapUpList;
}
struct Operation {
1: i64 revision;
2: i64 createdTime;
3: OpType type;
4: i32 reqSeq;
10: string param1;
11: string param2;
12: string param3;
20: Message message;
}
struct Profile {
1: string mid;
20: string displayName;
24: string statusMessage;
33: string picturePath;
}
struct Room {
1: string mid;
10: list<Contact> contacts;
}
struct RSAKey {
1: string keynm;
2: string nvalue;
3: string evalue;
4: string sessionKey;
}
exception TalkException {
1: ErrorCode code;
2: string reason;
}
service TalkService {
void acceptGroupInvitation(
1: i32 reqSeq,
2: string groupId) throws(1: TalkException e);
list<Operation> fetchOperations(
2: i64 localRev,
3: i32 count) throws(1: TalkException e);
list<string> getAllContactIds() throws(1: TalkException e);
Contact getContact(
2: string id) throws(1: TalkException e);
list<Contact> getContacts(
2: list<string> ids) throws(1: TalkException e);
Group getGroup(
2: string groupId) throws(1: TalkException e);
list<string> getGroupIdsInvited() throws(1: TalkException e);
list<string> getGroupIdsJoined() throws(1: TalkException e);
list<Group> getGroups(
2: list<string> groupIds) throws(1: TalkException e);
i64 getLastOpRevision() throws(1: TalkException e);
MessageBoxWrapUpList getMessageBoxCompactWrapUpList(
2: i32 start,
3: i32 messageBoxCount) throws(1: TalkException e);
list<Message> getPreviousMessages(
2: string messageBoxId,
3: i64 endSeq,
4: i32 messagesCount) throws(1: TalkException e);
list<Message> getRecentMessages(
2: string messageBoxId,
3: i32 messagesCount) throws(1: TalkException e);
Room getRoom(
2: string roomId) throws(1: TalkException e);
RSAKey getRSAKeyInfo(
2: IdentityProvider provider) throws(1: TalkException e);
LoginResult loginWithIdentityCredentialForCertificate(
8: IdentityProvider identityProvider,
3: string identifier,
4: string password,
5: bool keepLoggedIn,
6: string accessLocation,
7: string systemName,
9: string certificate) throws(1: TalkException e);
LoginResult loginWithVerifierForCertificate(
3: string verifier) throws(1: TalkException e);
void leaveGroup(
1: i32 reqSeq,
2: string groupId) throws(1: TalkException e);
void leaveRoom(
1: i32 reqSeq,
2: string roomId) throws(1: TalkException e);
Profile getProfile() throws(1: TalkException e);
void rejectGroupInvitation(
1: i32 reqSeq,
2: string groupId) throws(1: TalkException e);
Message sendMessage(
1: i32 seq,
2: Message message) throws(1: TalkException e);
void updateContactSetting(
1: i32 reqSeq,
2: string mid,
3: ContactSetting flag,
4: string value) throws(1: TalkException e);
# This method actually belongs to AuthService but cannot be bothered to create another service
# just for one method.
LoginResult loginZ(
2: LoginRequest loginRequest) throws (1: TalkException e);
}