-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxuexiaoyi.proto
487 lines (408 loc) · 8.96 KB
/
xuexiaoyi.proto
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
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
syntax = "proto3";
package com.xuexiaoyi.xxy.model.nano;
/********************
学小易 client API reference
2022-01-22 by 社会易姐QwQ
仅限研究学习
********************/
message ReqOfBookDetail {
string book_id = 1;
}
message RespOfBookDetail {
int32 err_no = 1;
string err_tips = 2;
Book book = 3;
ActionModel collect = 4;
Share share = 5;
FeedbackSystem feedback = 6;
}
// https://xxy.51xuexiaoyi.com/el/v0/sou/books
// 最近上传书籍请求
message ReqOfBooks {
}
// 最近上传书籍响应
message RespOfBooks {
int32 err_no = 1;
string err_tips = 2;
repeated Book recently_books = 3;
}
message ReqOfCommitSearchFeedback {
FeedbackUser content = 1;
string search_id = 2;
string question_num = 3;
int32 type = 4;
string book_id = 5;
}
message RespOfCommitSearchFeedback {
int32 err_no = 1;
string err_tips = 2;
}
message ReqOfGetImageXUploadAuthToken {
int32 auth_type = 1;
string service_id = 2;
}
message RespOfGetImageXUploadAuthToken {
int32 err_no = 1;
string err_tips = 2;
string token = 3;
}
message ReqOfGetShareBook {
string book_id = 1;
string finger = 2;
string sig = 3;
}
message RespOfGetShareBook {
int32 err_no = 1;
string err_tips = 2;
Book book = 3;
UserOpen share_user = 4;
}
message ReqOfGetShareQuestion {
string qnum = 1;
string finger = 2;
string sig = 3;
}
message RespOfGetShareQuestion {
int32 err_no = 1;
string err_tips = 2;
QuestionAnswer question = 3;
UserOpen share_user = 4;
}
// https://xxy.51xuexiaoyi.com/el/v0/app/getWsMsg
message ReqOfGetWsMsg {
string offset = 1;
}
message RespOfGetWsMsg {
int32 err_no = 1;
string err_tips = 2;
repeated WsMessage ws_messages = 3;
}
// https://xxy.51xuexiaoyi.com/el/v0/app/getGlobalReach
message ReqOfGlobalReach {
int32 scene = 2;
}
message RespOfGlobalReach {
int32 err_no = 1;
string err_tips = 2;
GlobalReachPrivacyPolicy privacy_policy = 3;
GlobalReachLetter letter = 4;
}
message ReqOfHome {
}
message RespOfHome {
int32 err_no = 1;
string err_tips = 2;
HomeData data = 3;
DeviceStatistics device_statistics = 4;
}
message ReqOfItemAction {
int32 item_type = 1;
int32 action_type = 2;
string item_id = 3;
bool recall = 4;
repeated string item_ids = 5;
}
message RespOfItemAction {
int32 err_no = 1;
string err_tips = 2;
}
message ReqOfListCollection {
int32 type = 1;
int64 offset = 2;
}
message RespOfListCollection {
int32 err_no = 1;
string err_tips = 2;
repeated Collection list = 3;
bool has_more = 4;
}
message ReqOfListLetter {
int64 offset = 1;
}
message RespOfListLetter {
int32 err_no = 1;
string err_tips = 2;
ListLetterResponse data = 3;
}
message ReqOfLogSearch {
string search_id = 1;
int32 search_type = 2;
string image_uri = 3;
int32 channel = 4;
}
message RespOfLogSearch {
int32 err_no = 1;
string err_tips = 2;
}
message ReqOfPing {
int32 num = 1;
}
message RespOfPing {
int32 err_no = 1;
string err_tips = 2;
}
message ReqOfQuestionDetection {
ImageReq query_img = 1;
string traceId = 2;
}
message RespOfQuestionDetection {
int32 err_no = 1;
string err_tips = 2;
repeated Box boxes = 3;
}
message ReqOfReportUserInfo {
message ItemIDs {
repeated int32 itemIds = 1;
}
map<int32,ItemIDs> infos = 1;
}
message RespOfReportUserInfo {
int32 err_no = 1;
string err_tips = 2;
}
// https://xxy.51xuexiaoyi.com/el/v0/sou/search
// 搜索请求
message ReqOfSearch {
int32 search_type = 1; // 搜索类型
string query = 2; // 搜索内容
string search_id = 3;
int32 offset = 4;
int32 feed_offset = 5;
int32 channel = 6;
repeated string tab = 7;
ImageReq query_img = 8;
string trace_id = 9; // 时间戳
SearchReqExtra extra = 10;
}
// 搜索响应
message RespOfSearch {
int32 err_no = 1;
string err_tips = 2;
string search_id = 3;
SearchResultSet result = 4; // 搜索结果
FeedbackSystem feedback = 5;
string search_engine = 6;
DeviceStatistics device_statistics = 7;
}
// https://xxy.51xuexiaoyi.com/el/v0/sou/sug
// 搜索建议请求
message ReqOfSearchSug {
int32 channel = 1;
string query = 2;
}
// 搜索建议响应
message RespOfSearchSug {
int32 err_no = 1;
string err_tips = 2;
repeated Suggestion sugs = 3;
}
message ReqOfUserUpload {
int32 type = 1;
repeated UploadQuestion upload_questions = 2;
repeated UploadBook upload_books = 3;
}
message RespOfUserUpload {
int32 err_no = 1;
string err_tips = 2;
}
message ReqOfVoDUploadAuth {
}
message RespOfVoDUploadAuth {
int32 err_no = 1;
string err_tips = 2;
string token = 3;
string space_name = 4;
}
// END of API reference
message ActionModel {
int32 count = 1;
bool done = 2;
}
message Book {
int32 type = 1;
string book_id = 2;
string title = 3;
string publisher = 4;
string subject = 5;
string category = 6;
string cover_url = 7;
string schema = 8;
string provider = 9;
string provide_date = 10;
Catalogue catalogue = 21;
repeated string resource_urls = 22;
string check_sum = 23;
}
message Box {
repeated Point points = 1;
}
message Catalogue {
message Chapter {
string id = 1;
string title = 2;
int32 page_no = 3;
}
repeated Chapter chapters = 1;
}
message Collection {
int64 timestamp = 1;
int32 type = 2;
Book book = 3;
QuestionAnswer question_answer = 4;
ActionModel collect = 21;
Share share = 22;
}
message DeviceStatistics {
int32 search_times = 1;
int32 total_times = 2;
}
message FeedbackSystem {
string title = 1;
repeated FeedbackSystemOption options = 2;
bool radio = 3;
}
message FeedbackSystemOption {
string label = 1;
repeated string sub_labels = 2;
bool accept_input = 3;
string input_hint = 4;
}
message FeedbackUser {
repeated string selected_labels = 1;
string user_input = 2;
}
message FileKey {
int32 type = 1;
string key = 2;
string md5 = 3;
}
message GlobalReachLetter {
string letter_key = 1;
int64 sendTime_unix = 2;
}
message GlobalReachPrivacyPolicy {
string latest_version = 1;
}
message HomeData {
string top_image_url = 1;
repeated int32 block_elements = 2;
}
message ImageReq {
string img_data = 1;
string tos_key = 2;
string img_url = 3;
}
message InfoCollection {
string info_title = 1;
repeated InfoCollectionBlock blocks = 2;
}
message InfoCollectionBlock {
int32 block_id = 1;
string block_name = 2;
repeated InfoCollectionItem items = 3;
int32 type = 4;
}
message InfoCollectionItem {
int32 item_id = 1;
string item_name = 2;
}
message Letter {
int64 letter_id = 1;
UserOpen from = 2;
int64 msg_time = 3;
string content = 4;
string content_schema = 5;
}
message ListLetterResponse {
repeated Letter letter_list = 1;
int64 next_offset = 2;
bool has_more = 3;
}
message Point {
double x = 1;
double y = 2;
}
message QuestionAnswer {
int32 type = 1;
string question_type = 2;
string question_num = 3;
string question_plain_text = 4;
string answer_plain_text = 5;
string provider = 6;
string datetime = 7;
string title = 8;
string q_title = 9;
string q_options = 10;
}
message SearchReqExtra {
int32 post_user_action = 1;
}
// 结果条目
message SearchResultItem {
string item_id = 1;
int32 type = 2;
QuestionAnswer question_answer = 3;
InfoCollection info_collection = 4;
Book book = 5;
map<string,string> events = 51;
Share share = 52;
FeedbackSystem item_feedback = 53;
ActionModel collect = 54;
ActionModel digg = 55;
ActionModel bury = 56;
}
// 搜索结果
message SearchResultSet {
repeated SearchResultItem items = 1; // 结果条目
bool has_more = 2;
int32 offset = 3;
int32 total = 4;
int32 feed_offset = 5;
repeated SearchTab tabs = 6;
string ocr_text = 7;
map<string,string> events = 51;
}
message SearchTab {
string name = 1;
bool checked = 2;
}
message Share {
string title = 1;
string sub_title = 2;
string content = 3;
string icon_url = 4;
string schema = 5;
}
message Suggestion {
string text = 1;
repeated string tokens = 2;
}
message UploadBook {
string book_type = 1;
string book_name = 2;
string cover_uri = 3;
repeated FileKey file_key = 4;
string extra = 5;
}
message UploadQuestion {
string question_type = 1;
string title_text = 2;
string answer_text = 3;
repeated FileKey file_key = 4;
}
message UserOpen {
string nickname = 1;
string avatar_url = 2;
}
message WsMessage {
int64 msg_id = 1;
int32 msg_type = 2;
string content = 3;
WsMessageExtra extra = 4;
}
message WsMessageExtra {
int32 msg_status = 1;
}
message WsMsgRedDotContent {
int32 red_dot_type = 1;
}