@chill-institute/contracts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +73 -0
- package/gen/ts/chill/v4/api_pb.d.ts +1074 -0
- package/gen/ts/chill/v4/api_pb.js +336 -0
- package/gen/ts/protoc-gen-openapiv2/options/annotations_pb.d.ts +73 -0
- package/gen/ts/protoc-gen-openapiv2/options/annotations_pb.js +80 -0
- package/gen/ts/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +1594 -0
- package/gen/ts/protoc-gen-openapiv2/options/openapiv2_pb.js +239 -0
- package/package.json +27 -0
- package/proto/chill/v4/api.proto +484 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package chill.v4;
|
|
4
|
+
|
|
5
|
+
import "protoc-gen-openapiv2/options/annotations.proto";
|
|
6
|
+
|
|
7
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
8
|
+
base_path: "/v4";
|
|
9
|
+
info: {
|
|
10
|
+
title: "Chill API v4 RPC";
|
|
11
|
+
version: "4";
|
|
12
|
+
};
|
|
13
|
+
security_definitions: {
|
|
14
|
+
security: {
|
|
15
|
+
key: "ApiKeyAuth";
|
|
16
|
+
value: {
|
|
17
|
+
type: TYPE_API_KEY;
|
|
18
|
+
in: IN_HEADER;
|
|
19
|
+
name: "X-API-Key";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
security: {
|
|
23
|
+
key: "BearerAuth";
|
|
24
|
+
value: {
|
|
25
|
+
type: TYPE_API_KEY;
|
|
26
|
+
in: IN_HEADER;
|
|
27
|
+
name: "Authorization";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
service CoreService {
|
|
34
|
+
rpc HealthCheck(HealthCheckRequest) returns (HealthResponse) {
|
|
35
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
36
|
+
security: {
|
|
37
|
+
security_requirement: {
|
|
38
|
+
key: "ApiKeyAuth";
|
|
39
|
+
value: {};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
parameters: {
|
|
43
|
+
headers: {
|
|
44
|
+
name: "X-API-Key";
|
|
45
|
+
description: "Core API key";
|
|
46
|
+
type: STRING;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
rpc GetIndexers(CoreGetIndexersRequest) returns (CoreGetIndexersResponse) {
|
|
53
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
54
|
+
security: {
|
|
55
|
+
security_requirement: {
|
|
56
|
+
key: "ApiKeyAuth";
|
|
57
|
+
value: {};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
parameters: {
|
|
61
|
+
headers: {
|
|
62
|
+
name: "X-API-Key";
|
|
63
|
+
description: "Core API key";
|
|
64
|
+
type: STRING;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
rpc Search(CoreSearchRequest) returns (SearchResponse) {
|
|
71
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
72
|
+
security: {
|
|
73
|
+
security_requirement: {
|
|
74
|
+
key: "ApiKeyAuth";
|
|
75
|
+
value: {};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
parameters: {
|
|
79
|
+
headers: {
|
|
80
|
+
name: "X-API-Key";
|
|
81
|
+
description: "Core API key";
|
|
82
|
+
type: STRING;
|
|
83
|
+
required: true;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
rpc GetTopMoviesBySource(GetTopMoviesBySourceRequest) returns (GetTopMoviesBySourceResponse) {
|
|
89
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
90
|
+
security: {
|
|
91
|
+
security_requirement: {
|
|
92
|
+
key: "ApiKeyAuth";
|
|
93
|
+
value: {};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
parameters: {
|
|
97
|
+
headers: {
|
|
98
|
+
name: "X-API-Key";
|
|
99
|
+
description: "Core API key";
|
|
100
|
+
type: STRING;
|
|
101
|
+
required: true;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
service UserService {
|
|
109
|
+
rpc GetIndexers(UserGetIndexersRequest) returns (UserGetIndexersResponse) {
|
|
110
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
111
|
+
security: {
|
|
112
|
+
security_requirement: {
|
|
113
|
+
key: "BearerAuth";
|
|
114
|
+
value: {};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
parameters: {
|
|
118
|
+
headers: {
|
|
119
|
+
name: "Authorization";
|
|
120
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
121
|
+
type: STRING;
|
|
122
|
+
required: true;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
rpc Search(UserSearchRequest) returns (SearchResponse) {
|
|
128
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
129
|
+
security: {
|
|
130
|
+
security_requirement: {
|
|
131
|
+
key: "BearerAuth";
|
|
132
|
+
value: {};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
parameters: {
|
|
136
|
+
headers: {
|
|
137
|
+
name: "Authorization";
|
|
138
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
139
|
+
type: STRING;
|
|
140
|
+
required: true;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
rpc GetTopMovies(UserGetTopMoviesRequest) returns (UserGetTopMoviesResponse) {
|
|
146
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
147
|
+
security: {
|
|
148
|
+
security_requirement: {
|
|
149
|
+
key: "BearerAuth";
|
|
150
|
+
value: {};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
parameters: {
|
|
154
|
+
headers: {
|
|
155
|
+
name: "Authorization";
|
|
156
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
157
|
+
type: STRING;
|
|
158
|
+
required: true;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
rpc GetUserSettings(GetUserSettingsRequest) returns (UserSettings) {
|
|
164
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
165
|
+
security: {
|
|
166
|
+
security_requirement: {
|
|
167
|
+
key: "BearerAuth";
|
|
168
|
+
value: {};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
parameters: {
|
|
172
|
+
headers: {
|
|
173
|
+
name: "Authorization";
|
|
174
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
175
|
+
type: STRING;
|
|
176
|
+
required: true;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
rpc SaveUserSettings(SaveUserSettingsRequest) returns (UserSettings) {
|
|
182
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
183
|
+
security: {
|
|
184
|
+
security_requirement: {
|
|
185
|
+
key: "BearerAuth";
|
|
186
|
+
value: {};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
parameters: {
|
|
190
|
+
headers: {
|
|
191
|
+
name: "Authorization";
|
|
192
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
193
|
+
type: STRING;
|
|
194
|
+
required: true;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
rpc AddTransfer(AddTransferRequest) returns (AddTransferResponse) {
|
|
200
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
201
|
+
security: {
|
|
202
|
+
security_requirement: {
|
|
203
|
+
key: "BearerAuth";
|
|
204
|
+
value: {};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
parameters: {
|
|
208
|
+
headers: {
|
|
209
|
+
name: "Authorization";
|
|
210
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
211
|
+
type: STRING;
|
|
212
|
+
required: true;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
rpc GetDownloadFolder(GetDownloadFolderRequest) returns (GetDownloadFolderResponse) {
|
|
218
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
219
|
+
security: {
|
|
220
|
+
security_requirement: {
|
|
221
|
+
key: "BearerAuth";
|
|
222
|
+
value: {};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
parameters: {
|
|
226
|
+
headers: {
|
|
227
|
+
name: "Authorization";
|
|
228
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
229
|
+
type: STRING;
|
|
230
|
+
required: true;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
rpc GetFolder(GetFolderRequest) returns (GetFolderResponse) {
|
|
236
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
237
|
+
security: {
|
|
238
|
+
security_requirement: {
|
|
239
|
+
key: "BearerAuth";
|
|
240
|
+
value: {};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
parameters: {
|
|
244
|
+
headers: {
|
|
245
|
+
name: "Authorization";
|
|
246
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
247
|
+
type: STRING;
|
|
248
|
+
required: true;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
rpc GetUserProfile(GetUserProfileRequest) returns (UserProfile) {
|
|
254
|
+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
255
|
+
security: {
|
|
256
|
+
security_requirement: {
|
|
257
|
+
key: "BearerAuth";
|
|
258
|
+
value: {};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
parameters: {
|
|
262
|
+
headers: {
|
|
263
|
+
name: "Authorization";
|
|
264
|
+
description: "Bearer auth token. Format: Bearer <token>";
|
|
265
|
+
type: STRING;
|
|
266
|
+
required: true;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
message HealthCheckRequest {}
|
|
274
|
+
|
|
275
|
+
message HealthResponse {
|
|
276
|
+
string status = 1;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
message CoreGetIndexersRequest {}
|
|
280
|
+
|
|
281
|
+
message Indexer {
|
|
282
|
+
string id = 1;
|
|
283
|
+
string name = 2;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
message CoreGetIndexersResponse {
|
|
287
|
+
repeated Indexer indexers = 1;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
message UserGetIndexersRequest {}
|
|
291
|
+
|
|
292
|
+
message UserGetIndexersResponse {
|
|
293
|
+
repeated UserIndexer indexers = 1;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
message UserIndexer {
|
|
297
|
+
string id = 1;
|
|
298
|
+
string name = 2;
|
|
299
|
+
bool enabled = 3;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
message CoreSearchRequest {
|
|
303
|
+
string query = 1;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
message SearchResult {
|
|
307
|
+
string id = 1;
|
|
308
|
+
string title = 2;
|
|
309
|
+
string indexer = 3;
|
|
310
|
+
string link = 4;
|
|
311
|
+
optional string imdb_id = 5;
|
|
312
|
+
int64 peers = 6;
|
|
313
|
+
int64 seeders = 7;
|
|
314
|
+
int64 size = 8;
|
|
315
|
+
string source = 9;
|
|
316
|
+
string uploaded_at = 10;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
message SearchResponse {
|
|
320
|
+
string query = 1;
|
|
321
|
+
repeated SearchResult results = 2;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
message UserSearchRequest {
|
|
325
|
+
string query = 1;
|
|
326
|
+
optional string indexer_id = 2;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
enum TopMoviesSource {
|
|
330
|
+
TOP_MOVIES_SOURCE_UNSPECIFIED = 0;
|
|
331
|
+
TOP_MOVIES_SOURCE_IMDB_MOVIEMETER = 1;
|
|
332
|
+
TOP_MOVIES_SOURCE_IMDB_TOP_250 = 2;
|
|
333
|
+
TOP_MOVIES_SOURCE_YTS = 3;
|
|
334
|
+
TOP_MOVIES_SOURCE_ROTTEN_TOMATOES = 4;
|
|
335
|
+
TOP_MOVIES_SOURCE_TRAKT = 5;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
message GetTopMoviesBySourceRequest {
|
|
339
|
+
TopMoviesSource source = 1;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
message TopMovie {
|
|
343
|
+
string id = 1;
|
|
344
|
+
string title = 2;
|
|
345
|
+
int32 year = 3;
|
|
346
|
+
TopMoviesSource source = 4;
|
|
347
|
+
string title_pretty = 5;
|
|
348
|
+
string link = 6;
|
|
349
|
+
int64 peers = 7;
|
|
350
|
+
int64 seeders = 8;
|
|
351
|
+
int64 size = 9;
|
|
352
|
+
string uploaded_at = 10;
|
|
353
|
+
string poster_url = 11;
|
|
354
|
+
double rating = 12;
|
|
355
|
+
string external_url = 13;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
message GetTopMoviesBySourceResponse {
|
|
359
|
+
TopMoviesSource source = 1;
|
|
360
|
+
repeated TopMovie movies = 2;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
message UserGetTopMoviesRequest {}
|
|
364
|
+
|
|
365
|
+
message UserGetTopMoviesResponse {
|
|
366
|
+
TopMoviesSource source = 1;
|
|
367
|
+
repeated TopMovie movies = 2;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
message GetUserSettingsRequest {}
|
|
371
|
+
|
|
372
|
+
enum ResolutionFilter {
|
|
373
|
+
RESOLUTION_FILTER_UNSPECIFIED = 0;
|
|
374
|
+
RESOLUTION_FILTER_720P = 1;
|
|
375
|
+
RESOLUTION_FILTER_1080P = 2;
|
|
376
|
+
RESOLUTION_FILTER_2160P = 3;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
enum CodecFilter {
|
|
380
|
+
CODEC_FILTER_UNSPECIFIED = 0;
|
|
381
|
+
CODEC_FILTER_X264 = 1;
|
|
382
|
+
CODEC_FILTER_X265 = 2;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
enum OtherFilter {
|
|
386
|
+
OTHER_FILTER_UNSPECIFIED = 0;
|
|
387
|
+
OTHER_FILTER_HDR = 1;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
enum SearchResultDisplayBehavior {
|
|
391
|
+
SEARCH_RESULT_DISPLAY_BEHAVIOR_UNSPECIFIED = 0;
|
|
392
|
+
SEARCH_RESULT_DISPLAY_BEHAVIOR_ALL = 1;
|
|
393
|
+
SEARCH_RESULT_DISPLAY_BEHAVIOR_FASTEST = 2;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
enum SearchResultTitleBehavior {
|
|
397
|
+
SEARCH_RESULT_TITLE_BEHAVIOR_UNSPECIFIED = 0;
|
|
398
|
+
SEARCH_RESULT_TITLE_BEHAVIOR_LINK = 1;
|
|
399
|
+
SEARCH_RESULT_TITLE_BEHAVIOR_TEXT = 2;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
enum SortBy {
|
|
403
|
+
SORT_BY_UNSPECIFIED = 0;
|
|
404
|
+
SORT_BY_TITLE = 1;
|
|
405
|
+
SORT_BY_SEEDERS = 2;
|
|
406
|
+
SORT_BY_SIZE = 3;
|
|
407
|
+
SORT_BY_UPLOADED_AT = 4;
|
|
408
|
+
SORT_BY_SOURCE = 5;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
enum SortDirection {
|
|
412
|
+
SORT_DIRECTION_UNSPECIFIED = 0;
|
|
413
|
+
SORT_DIRECTION_ASC = 1;
|
|
414
|
+
SORT_DIRECTION_DESC = 2;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
enum TopMoviesDisplayType {
|
|
418
|
+
TOP_MOVIES_DISPLAY_TYPE_UNSPECIFIED = 0;
|
|
419
|
+
TOP_MOVIES_DISPLAY_TYPE_COMPACT = 1;
|
|
420
|
+
TOP_MOVIES_DISPLAY_TYPE_EXPANDED = 2;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
message UserSettings {
|
|
424
|
+
repeated CodecFilter codec_filters = 1;
|
|
425
|
+
repeated string disabled_indexer_ids = 2;
|
|
426
|
+
optional int64 download_folder_id = 3;
|
|
427
|
+
bool filter_nasty_results = 4;
|
|
428
|
+
bool filter_results_with_no_seeders = 5;
|
|
429
|
+
repeated OtherFilter other_filters = 6;
|
|
430
|
+
bool remember_quick_filters = 7;
|
|
431
|
+
repeated ResolutionFilter resolution_filters = 8;
|
|
432
|
+
SearchResultDisplayBehavior search_result_display_behavior = 9;
|
|
433
|
+
SearchResultTitleBehavior search_result_title_behavior = 10;
|
|
434
|
+
bool show_pretty_names_for_top_movies = 11;
|
|
435
|
+
bool show_top_movies = 12;
|
|
436
|
+
SortBy sort_by = 13;
|
|
437
|
+
SortDirection sort_direction = 14;
|
|
438
|
+
TopMoviesDisplayType top_movies_display_type = 15;
|
|
439
|
+
TopMoviesSource top_movies_source = 16;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
message SaveUserSettingsRequest {
|
|
443
|
+
UserSettings settings = 1;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
message AddTransferRequest {
|
|
447
|
+
string url = 1;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
message AddTransferResponse {
|
|
451
|
+
string status = 1;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
message GetDownloadFolderRequest {}
|
|
455
|
+
|
|
456
|
+
message GetDownloadFolderResponse {
|
|
457
|
+
UserFile folder = 1;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
message GetFolderRequest {
|
|
461
|
+
int64 id = 1;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
message UserFile {
|
|
465
|
+
int64 id = 1;
|
|
466
|
+
string name = 2;
|
|
467
|
+
string file_type = 3;
|
|
468
|
+
bool is_shared = 4;
|
|
469
|
+
string created_at = 5;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
message GetFolderResponse {
|
|
473
|
+
UserFile parent = 1;
|
|
474
|
+
repeated UserFile files = 2;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
message GetUserProfileRequest {}
|
|
478
|
+
|
|
479
|
+
message UserProfile {
|
|
480
|
+
string user_id = 1;
|
|
481
|
+
string username = 2;
|
|
482
|
+
string avatar_url = 3;
|
|
483
|
+
string email = 4;
|
|
484
|
+
}
|