@redseat/api 0.1.7 → 0.1.8

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.
@@ -435,3 +435,75 @@ export interface RsDeleted {
435
435
  date: number;
436
436
  type: ElementType;
437
437
  }
438
+ export declare enum RsRequestStatus {
439
+ Unprocessed = "unprocessed",
440
+ Processed = "processed",
441
+ NeedParsing = "needParsing",
442
+ RequireAdd = "requireAdd",
443
+ Intermediate = "intermediate",
444
+ NeedFileSelection = "needFileSelection",
445
+ FinalPrivate = "finalPrivate",
446
+ FinalPublic = "finalPublic"
447
+ }
448
+ export declare enum RsRequestMethod {
449
+ Get = "get",
450
+ Post = "post",
451
+ Patch = "patch",
452
+ Delete = "delete",
453
+ Head = "head"
454
+ }
455
+ export interface RsCookie {
456
+ domain: string;
457
+ httpOnly: boolean;
458
+ path: string;
459
+ secure: boolean;
460
+ expiration?: number;
461
+ name: string;
462
+ value: string;
463
+ }
464
+ export interface RsRequestFiles {
465
+ name: string;
466
+ size: number;
467
+ mime?: string;
468
+ description?: string;
469
+ tags?: string[];
470
+ people?: string[];
471
+ albums?: string[];
472
+ season?: number;
473
+ episode?: number;
474
+ language?: string;
475
+ resolution?: string;
476
+ videoFormat?: string;
477
+ videocodec?: string;
478
+ audio?: string[];
479
+ quality?: number;
480
+ }
481
+ export interface RsRequest {
482
+ uploadId?: string;
483
+ url: string;
484
+ mime?: string;
485
+ size?: number;
486
+ filename?: string;
487
+ status: RsRequestStatus;
488
+ permanent: boolean;
489
+ jsonBody?: any;
490
+ method: RsRequestMethod;
491
+ referer?: string;
492
+ headers?: [string, string][];
493
+ cookies?: RsCookie[];
494
+ files?: RsRequestFiles[];
495
+ selectedFile?: string;
496
+ description?: string;
497
+ tags?: string[];
498
+ people?: string[];
499
+ albums?: string[];
500
+ season?: number;
501
+ episode?: number;
502
+ language?: string;
503
+ resolution?: string;
504
+ videoFormat?: string;
505
+ videocodec?: string;
506
+ audio?: string[];
507
+ quality?: number;
508
+ ignoreOriginDuplicate: boolean;
509
+ }
@@ -71,3 +71,22 @@ export var RsSort;
71
71
  RsSort["Name"] = "name";
72
72
  RsSort["Size"] = "size";
73
73
  })(RsSort || (RsSort = {}));
74
+ export var RsRequestStatus;
75
+ (function (RsRequestStatus) {
76
+ RsRequestStatus["Unprocessed"] = "unprocessed";
77
+ RsRequestStatus["Processed"] = "processed";
78
+ RsRequestStatus["NeedParsing"] = "needParsing";
79
+ RsRequestStatus["RequireAdd"] = "requireAdd";
80
+ RsRequestStatus["Intermediate"] = "intermediate";
81
+ RsRequestStatus["NeedFileSelection"] = "needFileSelection";
82
+ RsRequestStatus["FinalPrivate"] = "finalPrivate";
83
+ RsRequestStatus["FinalPublic"] = "finalPublic";
84
+ })(RsRequestStatus || (RsRequestStatus = {}));
85
+ export var RsRequestMethod;
86
+ (function (RsRequestMethod) {
87
+ RsRequestMethod["Get"] = "get";
88
+ RsRequestMethod["Post"] = "post";
89
+ RsRequestMethod["Patch"] = "patch";
90
+ RsRequestMethod["Delete"] = "delete";
91
+ RsRequestMethod["Head"] = "head";
92
+ })(RsRequestMethod || (RsRequestMethod = {}));
package/dist/library.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IFile, ITag, IPerson, ISerie, IMovie, MediaRequest, IEpisode, ExternalImage, IBackupFile, ILibrary, SerieInMedia, DeletedQuery, RsDeleted, MovieSort, RsSort, SqlOrder } from './interfaces.js';
1
+ import { IFile, ITag, IPerson, ISerie, IMovie, MediaRequest, IEpisode, ExternalImage, IBackupFile, ILibrary, SerieInMedia, DeletedQuery, RsDeleted, MovieSort, RsSort, SqlOrder, RsRequest } from './interfaces.js';
2
2
  import { EncryptFileOptions, EncryptedFile } from './encryption.js';
3
3
  export interface MediaForUpdate {
4
4
  name?: string;
@@ -176,6 +176,7 @@ export declare class LibraryApi {
176
176
  updatePersonPortrait(personId: string, portrait: FormData): Promise<void>;
177
177
  searchSeries(name: string): Promise<ISerie[]>;
178
178
  setEpisodeWatched(serieId: string, season: number, number: number, date: number): Promise<void>;
179
+ searchEpisodeMedias(serieId: string, season: number, episode: number): Promise<RsRequest[]>;
179
180
  getUnassignedFaces(params?: Map<string, string>): Promise<any>;
180
181
  getClusters(): Promise<any>;
181
182
  assignFaces(request: any): Promise<any>;
package/dist/library.js CHANGED
@@ -425,6 +425,10 @@ export class LibraryApi {
425
425
  async setEpisodeWatched(serieId, season, number, date) {
426
426
  await this.client.post(this.getUrl(`/series/${serieId}/seasons/${season}/episodes/${number}/watched`), { date });
427
427
  }
428
+ async searchEpisodeMedias(serieId, season, episode) {
429
+ const res = await this.client.get(this.getUrl(`/series/${serieId}/seasons/${season}/episodes/${episode}/search`));
430
+ return res.data;
431
+ }
428
432
  async getUnassignedFaces(params) {
429
433
  const queryParams = {};
430
434
  if (params) {