@eyenest/contracts 1.4.4 → 1.5.1

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.
@@ -1,4 +1,5 @@
1
1
  export declare const PROTO_PATHS: {
2
2
  readonly AUTH: string;
3
3
  readonly CAMERA: string;
4
+ readonly VIDEO: string;
4
5
  };
@@ -5,4 +5,5 @@ const path_1 = require("path");
5
5
  exports.PROTO_PATHS = {
6
6
  AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
7
7
  CAMERA: (0, path_1.join)(__dirname, '../../proto/camera.proto'),
8
+ VIDEO: (0, path_1.join)(__dirname, '../../proto/video.proto'),
8
9
  };
@@ -0,0 +1,62 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.5
4
+ // protoc v3.21.12
5
+ // source: video.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "video.v1";
12
+
13
+ export interface StartRecordingRequest {
14
+ roomId: string;
15
+ }
16
+
17
+ export interface StartRecordingResponse {
18
+ egressId: string;
19
+ }
20
+
21
+ export interface StopRecordingRequest {
22
+ roomId: string;
23
+ }
24
+
25
+ export interface StopRecordingResponse {
26
+ egressId: string;
27
+ }
28
+
29
+ export const VIDEO_V1_PACKAGE_NAME = "video.v1";
30
+
31
+ export interface VideoServiceClient {
32
+ startRecording(request: StartRecordingRequest): Observable<StartRecordingResponse>;
33
+
34
+ stopRecording(request: StopRecordingRequest): Observable<StopRecordingResponse>;
35
+ }
36
+
37
+ export interface VideoServiceController {
38
+ startRecording(
39
+ request: StartRecordingRequest,
40
+ ): Promise<StartRecordingResponse> | Observable<StartRecordingResponse> | StartRecordingResponse;
41
+
42
+ stopRecording(
43
+ request: StopRecordingRequest,
44
+ ): Promise<StopRecordingResponse> | Observable<StopRecordingResponse> | StopRecordingResponse;
45
+ }
46
+
47
+ export function VideoServiceControllerMethods() {
48
+ return function (constructor: Function) {
49
+ const grpcMethods: string[] = ["startRecording", "stopRecording"];
50
+ for (const method of grpcMethods) {
51
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
52
+ GrpcMethod("VideoService", method)(constructor.prototype[method], method, descriptor);
53
+ }
54
+ const grpcStreamMethods: string[] = [];
55
+ for (const method of grpcStreamMethods) {
56
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
57
+ GrpcStreamMethod("VideoService", method)(constructor.prototype[method], method, descriptor);
58
+ }
59
+ };
60
+ }
61
+
62
+ export const VIDEO_SERVICE_NAME = "VideoService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyenest/contracts",
3
- "version": "1.4.4",
3
+ "version": "1.5.1",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -0,0 +1,21 @@
1
+ syntax = "proto3";
2
+
3
+ package video.v1;
4
+
5
+ service VideoService {
6
+ rpc StartRecording (StartRecordingRequest) returns (StartRecordingResponse);
7
+ rpc StopRecording (StopRecordingRequest) returns (StopRecordingResponse);
8
+ }
9
+
10
+ message StartRecordingRequest {
11
+ string roomId = 1;
12
+ }
13
+ message StartRecordingResponse {
14
+ string egressId = 1;
15
+ }
16
+ message StopRecordingRequest {
17
+ string roomId = 1;
18
+ }
19
+ message StopRecordingResponse {
20
+ string egressId = 1;
21
+ }