@eyenest/contracts 1.4.3 → 1.5.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/dist/proto/paths.d.ts +1 -0
- package/dist/proto/paths.js +1 -0
- package/gen/ts/camera.ts +18 -0
- package/gen/ts/video.ts +48 -0
- package/package.json +1 -1
- package/proto/camera.proto +9 -0
- package/proto/video.proto +14 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
package/gen/ts/camera.ts
CHANGED
|
@@ -16,6 +16,14 @@ export enum Status {
|
|
|
16
16
|
UNRECOGNIZED = -1,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export interface GetCameraUserIdByCameraIdRequest {
|
|
20
|
+
cameraId: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface GetCameraUserIdByCameraIdResponse {
|
|
24
|
+
userId: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
export interface GetLinkCameraTokenRequest {
|
|
20
28
|
cameraId: string;
|
|
21
29
|
userId: string;
|
|
@@ -120,6 +128,8 @@ export interface CameraServiceClient {
|
|
|
120
128
|
getLiveKitCameraToken(request: GetLiveKitCameraTokenRequest): Observable<GetLiveKitCameraTokenResponse>;
|
|
121
129
|
|
|
122
130
|
getLinkCameraToken(request: GetLinkCameraTokenRequest): Observable<GetLinkCameraTokenResponse>;
|
|
131
|
+
|
|
132
|
+
getCameraUserIdByCameraId(request: GetCameraUserIdByCameraIdRequest): Observable<GetCameraUserIdByCameraIdResponse>;
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
export interface CameraServiceController {
|
|
@@ -148,6 +158,13 @@ export interface CameraServiceController {
|
|
|
148
158
|
getLinkCameraToken(
|
|
149
159
|
request: GetLinkCameraTokenRequest,
|
|
150
160
|
): Promise<GetLinkCameraTokenResponse> | Observable<GetLinkCameraTokenResponse> | GetLinkCameraTokenResponse;
|
|
161
|
+
|
|
162
|
+
getCameraUserIdByCameraId(
|
|
163
|
+
request: GetCameraUserIdByCameraIdRequest,
|
|
164
|
+
):
|
|
165
|
+
| Promise<GetCameraUserIdByCameraIdResponse>
|
|
166
|
+
| Observable<GetCameraUserIdByCameraIdResponse>
|
|
167
|
+
| GetCameraUserIdByCameraIdResponse;
|
|
151
168
|
}
|
|
152
169
|
|
|
153
170
|
export function CameraServiceControllerMethods() {
|
|
@@ -161,6 +178,7 @@ export function CameraServiceControllerMethods() {
|
|
|
161
178
|
"getLiveKitViewerToken",
|
|
162
179
|
"getLiveKitCameraToken",
|
|
163
180
|
"getLinkCameraToken",
|
|
181
|
+
"getCameraUserIdByCameraId",
|
|
164
182
|
];
|
|
165
183
|
for (const method of grpcMethods) {
|
|
166
184
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/ts/video.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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 const VIDEO_V1_PACKAGE_NAME = "video.v1";
|
|
22
|
+
|
|
23
|
+
export interface VideoServiceClient {
|
|
24
|
+
startRecording(request: StartRecordingRequest): Observable<StartRecordingResponse>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface VideoServiceController {
|
|
28
|
+
startRecording(
|
|
29
|
+
request: StartRecordingRequest,
|
|
30
|
+
): Promise<StartRecordingResponse> | Observable<StartRecordingResponse> | StartRecordingResponse;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function VideoServiceControllerMethods() {
|
|
34
|
+
return function (constructor: Function) {
|
|
35
|
+
const grpcMethods: string[] = ["startRecording"];
|
|
36
|
+
for (const method of grpcMethods) {
|
|
37
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
38
|
+
GrpcMethod("VideoService", method)(constructor.prototype[method], method, descriptor);
|
|
39
|
+
}
|
|
40
|
+
const grpcStreamMethods: string[] = [];
|
|
41
|
+
for (const method of grpcStreamMethods) {
|
|
42
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
43
|
+
GrpcStreamMethod("VideoService", method)(constructor.prototype[method], method, descriptor);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const VIDEO_SERVICE_NAME = "VideoService";
|
package/package.json
CHANGED
package/proto/camera.proto
CHANGED
|
@@ -13,6 +13,15 @@ service CameraService {
|
|
|
13
13
|
rpc GetLiveKitViewerToken (GetLiveKitViewerTokenRequest) returns (GetLiveKitViewerTokenResponse);
|
|
14
14
|
rpc GetLiveKitCameraToken (GetLiveKitCameraTokenRequest) returns (GetLiveKitCameraTokenResponse);
|
|
15
15
|
rpc GetLinkCameraToken(GetLinkCameraTokenRequest) returns (GetLinkCameraTokenResponse);
|
|
16
|
+
rpc GetCameraUserIdByCameraId(GetCameraUserIdByCameraIdRequest) returns (GetCameraUserIdByCameraIdResponse);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message GetCameraUserIdByCameraIdRequest {
|
|
20
|
+
string cameraId = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message GetCameraUserIdByCameraIdResponse {
|
|
24
|
+
string userId = 1;
|
|
16
25
|
}
|
|
17
26
|
|
|
18
27
|
message GetLinkCameraTokenRequest {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package video.v1;
|
|
4
|
+
|
|
5
|
+
service VideoService {
|
|
6
|
+
rpc StartRecording (StartRecordingRequest) returns (StartRecordingResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message StartRecordingRequest {
|
|
10
|
+
string roomId = 1;
|
|
11
|
+
}
|
|
12
|
+
message StartRecordingResponse {
|
|
13
|
+
string egressId = 1;
|
|
14
|
+
}
|