@chill-institute/contracts 0.4.7 → 1.0.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.
@@ -87,7 +87,25 @@ service CoreService {
87
87
  };
88
88
  };
89
89
  }
90
- rpc GetTopMoviesBySource(GetTopMoviesBySourceRequest) returns (GetTopMoviesBySourceResponse) {
90
+ rpc GetMoviesBySource(GetMoviesBySourceRequest) returns (GetMoviesBySourceResponse) {
91
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
92
+ security: {
93
+ security_requirement: {
94
+ key: "ApiKeyAuth";
95
+ value: {};
96
+ };
97
+ };
98
+ parameters: {
99
+ headers: {
100
+ name: "X-API-Key";
101
+ description: "Core API key";
102
+ type: STRING;
103
+ required: true;
104
+ };
105
+ };
106
+ };
107
+ }
108
+ rpc GetTVShowsBySource(GetTVShowsBySourceRequest) returns (GetTVShowsBySourceResponse) {
91
109
  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
92
110
  security: {
93
111
  security_requirement: {
@@ -144,7 +162,97 @@ service UserService {
144
162
  };
145
163
  };
146
164
  }
147
- rpc GetTopMovies(UserGetTopMoviesRequest) returns (UserGetTopMoviesResponse) {
165
+ rpc GetMovies(GetMoviesRequest) returns (GetMoviesResponse) {
166
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
167
+ security: {
168
+ security_requirement: {
169
+ key: "BearerAuth";
170
+ value: {};
171
+ };
172
+ };
173
+ parameters: {
174
+ headers: {
175
+ name: "Authorization";
176
+ description: "User auth token. Format: Bearer <token>.";
177
+ type: STRING;
178
+ required: true;
179
+ };
180
+ };
181
+ };
182
+ }
183
+ rpc GetTVShows(GetTVShowsRequest) returns (GetTVShowsResponse) {
184
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
185
+ security: {
186
+ security_requirement: {
187
+ key: "BearerAuth";
188
+ value: {};
189
+ };
190
+ };
191
+ parameters: {
192
+ headers: {
193
+ name: "Authorization";
194
+ description: "User auth token. Format: Bearer <token>.";
195
+ type: STRING;
196
+ required: true;
197
+ };
198
+ };
199
+ };
200
+ }
201
+ rpc GetTVShowDetail(GetTVShowDetailRequest) returns (GetTVShowDetailResponse) {
202
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
203
+ security: {
204
+ security_requirement: {
205
+ key: "BearerAuth";
206
+ value: {};
207
+ };
208
+ };
209
+ parameters: {
210
+ headers: {
211
+ name: "Authorization";
212
+ description: "User auth token. Format: Bearer <token>.";
213
+ type: STRING;
214
+ required: true;
215
+ };
216
+ };
217
+ };
218
+ }
219
+ rpc GetTVShowSeason(GetTVShowSeasonRequest) returns (GetTVShowSeasonResponse) {
220
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
221
+ security: {
222
+ security_requirement: {
223
+ key: "BearerAuth";
224
+ value: {};
225
+ };
226
+ };
227
+ parameters: {
228
+ headers: {
229
+ name: "Authorization";
230
+ description: "User auth token. Format: Bearer <token>.";
231
+ type: STRING;
232
+ required: true;
233
+ };
234
+ };
235
+ };
236
+ }
237
+ rpc GetTVShowEpisodeDownload(GetTVShowEpisodeDownloadRequest) returns (GetTVShowEpisodeDownloadResponse) {
238
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
239
+ security: {
240
+ security_requirement: {
241
+ key: "BearerAuth";
242
+ value: {};
243
+ };
244
+ };
245
+ parameters: {
246
+ headers: {
247
+ name: "Authorization";
248
+ description: "User auth token. Format: Bearer <token>.";
249
+ type: STRING;
250
+ required: true;
251
+ };
252
+ };
253
+ };
254
+ }
255
+ rpc GetTVShowSeasonDownloads(GetTVShowSeasonDownloadsRequest) returns (GetTVShowSeasonDownloadsResponse) {
148
256
  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
149
257
  security: {
150
258
  security_requirement: {
@@ -299,7 +407,8 @@ message HealthResponse {
299
407
  enum IndexerStatus {
300
408
  INDEXER_STATUS_UNSPECIFIED = 0;
301
409
  INDEXER_STATUS_HEALTHY = 1;
302
- INDEXER_STATUS_DOWN = 2;
410
+ INDEXER_STATUS_DEGRADED = 2;
411
+ INDEXER_STATUS_DOWN = 3;
303
412
  }
304
413
 
305
414
  message CoreGetIndexersRequest {}
@@ -360,20 +469,38 @@ message UserSearchRequest {
360
469
  optional string indexer_id = 2;
361
470
  }
362
471
 
363
- enum TopMoviesSource {
364
- TOP_MOVIES_SOURCE_UNSPECIFIED = 0;
365
- TOP_MOVIES_SOURCE_IMDB_MOVIEMETER = 1;
366
- TOP_MOVIES_SOURCE_IMDB_TOP_250 = 2;
367
- TOP_MOVIES_SOURCE_YTS = 3;
368
- TOP_MOVIES_SOURCE_ROTTEN_TOMATOES = 4;
369
- TOP_MOVIES_SOURCE_TRAKT = 5;
472
+ enum MoviesSource {
473
+ MOVIES_SOURCE_UNSPECIFIED = 0;
474
+ MOVIES_SOURCE_IMDB_MOVIEMETER = 1;
475
+ MOVIES_SOURCE_IMDB_TOP_250 = 2;
476
+ MOVIES_SOURCE_YTS = 3;
477
+ MOVIES_SOURCE_ROTTEN_TOMATOES = 4;
478
+ MOVIES_SOURCE_TRAKT = 5;
479
+ }
480
+
481
+ enum TVShowsSource {
482
+ TV_SHOWS_SOURCE_UNSPECIFIED = 0;
483
+ TV_SHOWS_SOURCE_NETFLIX = 1;
484
+ TV_SHOWS_SOURCE_HBO_MAX = 2;
485
+ TV_SHOWS_SOURCE_APPLE_TV_PLUS = 3;
486
+ TV_SHOWS_SOURCE_PRIME_VIDEO = 4;
487
+ TV_SHOWS_SOURCE_DISNEY_PLUS = 5;
488
+ }
489
+
490
+ enum TVShowStatus {
491
+ TV_SHOW_STATUS_UNSPECIFIED = 0;
492
+ TV_SHOW_STATUS_RETURNING = 1;
493
+ TV_SHOW_STATUS_ENDED = 2;
494
+ TV_SHOW_STATUS_CANCELED = 3;
495
+ TV_SHOW_STATUS_IN_PRODUCTION = 4;
496
+ TV_SHOW_STATUS_PLANNED = 5;
370
497
  }
371
498
 
372
- message GetTopMoviesBySourceRequest {
373
- TopMoviesSource source = 1;
499
+ message GetMoviesBySourceRequest {
500
+ MoviesSource source = 1;
374
501
  }
375
502
 
376
- message TopMovie {
503
+ message Movie {
377
504
  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
378
505
  json_schema: {
379
506
  required: ["poster_url"]
@@ -383,7 +510,7 @@ message TopMovie {
383
510
  string id = 1;
384
511
  string title = 2;
385
512
  int32 year = 3;
386
- TopMoviesSource source = 4;
513
+ MoviesSource source = 4;
387
514
  string title_pretty = 5;
388
515
  string link = 6;
389
516
  int64 peers = 7;
@@ -395,19 +522,151 @@ message TopMovie {
395
522
  string external_url = 13;
396
523
  }
397
524
 
398
- message GetTopMoviesBySourceResponse {
399
- TopMoviesSource source = 1;
400
- repeated TopMovie movies = 2;
525
+ message GetMoviesBySourceResponse {
526
+ MoviesSource source = 1;
527
+ repeated Movie movies = 2;
401
528
  }
402
529
 
403
- message UserGetTopMoviesRequest {}
530
+ message GetMoviesRequest {}
404
531
 
405
- message UserGetTopMoviesResponse {
406
- TopMoviesSource source = 1;
407
- repeated TopMovie movies = 2;
532
+ message GetMoviesResponse {
533
+ MoviesSource source = 1;
534
+ repeated Movie movies = 2;
408
535
  string rss_feed_url = 3;
409
536
  }
410
537
 
538
+ message TVShow {
539
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
540
+ json_schema: {
541
+ required: ["imdb_id", "poster_url"]
542
+ }
543
+ };
544
+
545
+ string imdb_id = 1;
546
+ string title = 2;
547
+ int32 year = 3;
548
+ TVShowsSource source = 4;
549
+ string poster_url = 5;
550
+ double rating = 6;
551
+ string overview = 7;
552
+ string external_url = 8;
553
+ int32 season_count = 9;
554
+ TVShowStatus status = 10;
555
+ repeated string networks = 11;
556
+ }
557
+
558
+ message GetTVShowsBySourceRequest {
559
+ TVShowsSource source = 1;
560
+ }
561
+
562
+ message GetTVShowsBySourceResponse {
563
+ TVShowsSource source = 1;
564
+ repeated TVShow shows = 2;
565
+ }
566
+
567
+ message GetTVShowsRequest {}
568
+
569
+ message GetTVShowsResponse {
570
+ TVShowsSource source = 1;
571
+ repeated TVShow shows = 2;
572
+ }
573
+
574
+ message TVShowDetail {
575
+ string imdb_id = 1;
576
+ string title = 2;
577
+ int32 year = 3;
578
+ string poster_url = 4;
579
+ string backdrop_url = 5;
580
+ double rating = 6;
581
+ string overview = 7;
582
+ string external_url = 8;
583
+ int32 season_count = 9;
584
+ TVShowStatus status = 10;
585
+ repeated string networks = 11;
586
+ repeated string genres = 12;
587
+ }
588
+
589
+ message TVShowSeason {
590
+ int32 season_number = 1;
591
+ string name = 2;
592
+ int32 episode_count = 3;
593
+ string air_date = 4;
594
+ string poster_url = 5;
595
+ }
596
+
597
+ message TVShowEpisode {
598
+ int32 season_number = 1;
599
+ int32 episode_number = 2;
600
+ string name = 3;
601
+ string overview = 4;
602
+ string air_date = 5;
603
+ int32 runtime = 6;
604
+ string still_url = 7;
605
+ double rating = 8;
606
+ }
607
+
608
+ message GetTVShowDetailRequest {
609
+ string imdb_id = 1;
610
+ }
611
+
612
+ message GetTVShowDetailResponse {
613
+ TVShowDetail show = 1;
614
+ repeated TVShowSeason seasons = 2;
615
+ }
616
+
617
+ message GetTVShowSeasonRequest {
618
+ string imdb_id = 1;
619
+ int32 season_number = 2;
620
+ }
621
+
622
+ message GetTVShowSeasonResponse {
623
+ string imdb_id = 1;
624
+ int32 season_number = 2;
625
+ TVShowSeason season = 3;
626
+ repeated TVShowEpisode episodes = 4;
627
+ }
628
+
629
+ message TVShowDownload {
630
+ string title = 1;
631
+ string link = 2;
632
+ int64 size = 3;
633
+ int64 seeders = 4;
634
+ string resolution = 5;
635
+ string codec = 6;
636
+ string quality = 7;
637
+ string indexer = 8;
638
+ int32 season_number = 9;
639
+ optional int32 episode_number = 10;
640
+ }
641
+
642
+ message GetTVShowEpisodeDownloadRequest {
643
+ string imdb_id = 1;
644
+ int32 season_number = 2;
645
+ int32 episode_number = 3;
646
+ }
647
+
648
+ message GetTVShowEpisodeDownloadResponse {
649
+ optional TVShowDownload download = 1;
650
+ string search_query = 2;
651
+ }
652
+
653
+ message GetTVShowSeasonDownloadsRequest {
654
+ string imdb_id = 1;
655
+ int32 season_number = 2;
656
+ }
657
+
658
+ message GetTVShowSeasonDownloadsResponse {
659
+ optional TVShowDownload season_pack = 1;
660
+ repeated TVShowEpisodeDownloadResult episodes = 2;
661
+ string season_search_query = 3;
662
+ }
663
+
664
+ message TVShowEpisodeDownloadResult {
665
+ int32 episode_number = 1;
666
+ optional TVShowDownload download = 2;
667
+ string search_query = 3;
668
+ }
669
+
411
670
  message GetUserSettingsRequest {}
412
671
 
413
672
  enum ResolutionFilter {
@@ -455,13 +714,14 @@ enum SortDirection {
455
714
  SORT_DIRECTION_DESC = 2;
456
715
  }
457
716
 
458
- enum TopMoviesDisplayType {
459
- TOP_MOVIES_DISPLAY_TYPE_UNSPECIFIED = 0;
460
- TOP_MOVIES_DISPLAY_TYPE_COMPACT = 1;
461
- TOP_MOVIES_DISPLAY_TYPE_EXPANDED = 2;
717
+ enum CardDisplayType {
718
+ CARD_DISPLAY_TYPE_UNSPECIFIED = 0;
719
+ CARD_DISPLAY_TYPE_COMPACT = 1;
720
+ CARD_DISPLAY_TYPE_EXPANDED = 2;
462
721
  }
463
722
 
464
723
  message UserSettings {
724
+ reserved 11;
465
725
  repeated CodecFilter codec_filters = 1;
466
726
  repeated string disabled_indexer_ids = 2;
467
727
  optional int64 download_folder_id = 3;
@@ -472,12 +732,13 @@ message UserSettings {
472
732
  repeated ResolutionFilter resolution_filters = 8;
473
733
  SearchResultDisplayBehavior search_result_display_behavior = 9;
474
734
  SearchResultTitleBehavior search_result_title_behavior = 10;
475
- bool show_pretty_names_for_top_movies = 11;
476
- bool show_top_movies = 12;
735
+ bool show_movies = 12;
477
736
  SortBy sort_by = 13;
478
737
  SortDirection sort_direction = 14;
479
- TopMoviesDisplayType top_movies_display_type = 15;
480
- TopMoviesSource top_movies_source = 16;
738
+ CardDisplayType card_display_type = 15;
739
+ MoviesSource movies_source = 16;
740
+ bool show_tv_shows = 17;
741
+ TVShowsSource tv_shows_source = 18;
481
742
  }
482
743
 
483
744
  message SaveUserSettingsRequest {