@eyenest/contracts 1.5.1 → 1.5.2

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/gen/ts/video.ts CHANGED
@@ -10,6 +10,20 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "video.v1";
12
12
 
13
+ export enum VideoFileStatus {
14
+ RECORDING = 0,
15
+ FINISHED = 1,
16
+ UNRECOGNIZED = -1,
17
+ }
18
+
19
+ export interface GetPresignedUrlRequest {
20
+ id: string;
21
+ }
22
+
23
+ export interface GetPresignedUrlResponse {
24
+ url: string;
25
+ }
26
+
13
27
  export interface StartRecordingRequest {
14
28
  roomId: string;
15
29
  }
@@ -26,12 +40,33 @@ export interface StopRecordingResponse {
26
40
  egressId: string;
27
41
  }
28
42
 
43
+ export interface GetAllRecordingsRequest {
44
+ roomId: string;
45
+ }
46
+
47
+ export interface GetAllRecordingsResponse {
48
+ recording: Recording[];
49
+ }
50
+
51
+ export interface Recording {
52
+ id: string;
53
+ playlistName: string;
54
+ status: VideoFileStatus;
55
+ createdAt: string;
56
+ updatedAt: string;
57
+ finishedAt: string;
58
+ }
59
+
29
60
  export const VIDEO_V1_PACKAGE_NAME = "video.v1";
30
61
 
31
62
  export interface VideoServiceClient {
32
63
  startRecording(request: StartRecordingRequest): Observable<StartRecordingResponse>;
33
64
 
34
65
  stopRecording(request: StopRecordingRequest): Observable<StopRecordingResponse>;
66
+
67
+ getAllRecordings(request: GetAllRecordingsRequest): Observable<GetAllRecordingsResponse>;
68
+
69
+ getPresignedUrl(request: GetPresignedUrlRequest): Observable<GetPresignedUrlResponse>;
35
70
  }
36
71
 
37
72
  export interface VideoServiceController {
@@ -42,11 +77,19 @@ export interface VideoServiceController {
42
77
  stopRecording(
43
78
  request: StopRecordingRequest,
44
79
  ): Promise<StopRecordingResponse> | Observable<StopRecordingResponse> | StopRecordingResponse;
80
+
81
+ getAllRecordings(
82
+ request: GetAllRecordingsRequest,
83
+ ): Promise<GetAllRecordingsResponse> | Observable<GetAllRecordingsResponse> | GetAllRecordingsResponse;
84
+
85
+ getPresignedUrl(
86
+ request: GetPresignedUrlRequest,
87
+ ): Promise<GetPresignedUrlResponse> | Observable<GetPresignedUrlResponse> | GetPresignedUrlResponse;
45
88
  }
46
89
 
47
90
  export function VideoServiceControllerMethods() {
48
91
  return function (constructor: Function) {
49
- const grpcMethods: string[] = ["startRecording", "stopRecording"];
92
+ const grpcMethods: string[] = ["startRecording", "stopRecording", "getAllRecordings", "getPresignedUrl"];
50
93
  for (const method of grpcMethods) {
51
94
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
52
95
  GrpcMethod("VideoService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyenest/contracts",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/video.proto CHANGED
@@ -5,6 +5,15 @@ package video.v1;
5
5
  service VideoService {
6
6
  rpc StartRecording (StartRecordingRequest) returns (StartRecordingResponse);
7
7
  rpc StopRecording (StopRecordingRequest) returns (StopRecordingResponse);
8
+ rpc GetAllRecordings (GetAllRecordingsRequest) returns (GetAllRecordingsResponse);
9
+ rpc GetPresignedUrl (GetPresignedUrlRequest) returns (GetPresignedUrlResponse);
10
+ }
11
+
12
+ message GetPresignedUrlRequest {
13
+ string id = 1;
14
+ }
15
+ message GetPresignedUrlResponse {
16
+ string url = 1;
8
17
  }
9
18
 
10
19
  message StartRecordingRequest {
@@ -18,4 +27,22 @@ message StopRecordingRequest {
18
27
  }
19
28
  message StopRecordingResponse {
20
29
  string egressId = 1;
30
+ }
31
+ message GetAllRecordingsRequest {
32
+ string roomId = 1;
33
+ }
34
+ message GetAllRecordingsResponse {
35
+ repeated Recording recording = 1;
36
+ }
37
+ message Recording {
38
+ string id = 1;
39
+ string playlistName = 2;
40
+ VideoFileStatus status = 3;
41
+ string createdAt = 4;
42
+ string updatedAt = 5;
43
+ string finishedAt = 6;
44
+ }
45
+ enum VideoFileStatus {
46
+ RECORDING = 0;
47
+ FINISHED = 1;
21
48
  }