@eyenest/contracts 1.3.2 → 1.4.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/gen/ts/auth.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.2
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc v3.21.12
5
5
  // source: auth.proto
6
6
 
package/gen/ts/camera.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.2
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc v3.21.12
5
5
  // source: camera.proto
6
6
 
@@ -16,6 +16,24 @@ export enum Status {
16
16
  UNRECOGNIZED = -1,
17
17
  }
18
18
 
19
+ export interface GetLiveKitCameraTokenRequest {
20
+ cameraId: string;
21
+ roomId: string;
22
+ }
23
+
24
+ export interface GetLiveKitCameraTokenResponse {
25
+ token: string;
26
+ }
27
+
28
+ export interface GetLiveKitViewerTokenRequest {
29
+ userId: string;
30
+ roomId: string;
31
+ }
32
+
33
+ export interface GetLiveKitViewerTokenResponse {
34
+ token: string;
35
+ }
36
+
19
37
  export interface LinkCameraRequest {
20
38
  token: string;
21
39
  }
@@ -76,6 +94,10 @@ export interface CameraServiceClient {
76
94
  addCamera(request: AddCameraRequest): Observable<AddCameraResponse>;
77
95
 
78
96
  linkCamera(request: LinkCameraRequest): Observable<LinkCameraResponse>;
97
+
98
+ getLiveKitViewerToken(request: GetLiveKitViewerTokenRequest): Observable<GetLiveKitViewerTokenResponse>;
99
+
100
+ getLiveKitCameraToken(request: GetLiveKitCameraTokenRequest): Observable<GetLiveKitCameraTokenResponse>;
79
101
  }
80
102
 
81
103
  export interface CameraServiceController {
@@ -90,11 +112,26 @@ export interface CameraServiceController {
90
112
  linkCamera(
91
113
  request: LinkCameraRequest,
92
114
  ): Promise<LinkCameraResponse> | Observable<LinkCameraResponse> | LinkCameraResponse;
115
+
116
+ getLiveKitViewerToken(
117
+ request: GetLiveKitViewerTokenRequest,
118
+ ): Promise<GetLiveKitViewerTokenResponse> | Observable<GetLiveKitViewerTokenResponse> | GetLiveKitViewerTokenResponse;
119
+
120
+ getLiveKitCameraToken(
121
+ request: GetLiveKitCameraTokenRequest,
122
+ ): Promise<GetLiveKitCameraTokenResponse> | Observable<GetLiveKitCameraTokenResponse> | GetLiveKitCameraTokenResponse;
93
123
  }
94
124
 
95
125
  export function CameraServiceControllerMethods() {
96
126
  return function (constructor: Function) {
97
- const grpcMethods: string[] = ["getLocationsByUserId", "createLocation", "addCamera", "linkCamera"];
127
+ const grpcMethods: string[] = [
128
+ "getLocationsByUserId",
129
+ "createLocation",
130
+ "addCamera",
131
+ "linkCamera",
132
+ "getLiveKitViewerToken",
133
+ "getLiveKitCameraToken",
134
+ ];
98
135
  for (const method of grpcMethods) {
99
136
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
100
137
  GrpcMethod("CameraService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyenest/contracts",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -9,6 +9,26 @@ service CameraService {
9
9
  returns (Location);
10
10
  rpc AddCamera (AddCameraRequest) returns (AddCameraResponse);
11
11
  rpc LinkCamera (LinkCameraRequest) returns (LinkCameraResponse);
12
+ rpc GetLiveKitViewerToken (GetLiveKitViewerTokenRequest) returns (GetLiveKitViewerTokenResponse);
13
+ rpc GetLiveKitCameraToken (GetLiveKitCameraTokenRequest) returns (GetLiveKitCameraTokenResponse);
14
+ }
15
+
16
+ message GetLiveKitCameraTokenRequest {
17
+ string cameraId = 1;
18
+ string roomId = 2;
19
+ }
20
+
21
+ message GetLiveKitCameraTokenResponse {
22
+ string token = 1;
23
+ }
24
+
25
+ message GetLiveKitViewerTokenRequest {
26
+ string userId = 1;
27
+ string roomId = 2;
28
+ }
29
+
30
+ message GetLiveKitViewerTokenResponse {
31
+ string token = 1;
12
32
  }
13
33
 
14
34
  message LinkCameraRequest {