@eyenest/contracts 1.3.2 → 1.4.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.
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,33 @@ export enum Status {
16
16
  UNRECOGNIZED = -1,
17
17
  }
18
18
 
19
+ export interface RefreshRequest {
20
+ refreshToken: string;
21
+ }
22
+
23
+ export interface RefreshResponse {
24
+ accessToken: string;
25
+ refreshToken: string;
26
+ }
27
+
28
+ export interface GetLiveKitCameraTokenRequest {
29
+ cameraId: string;
30
+ roomId: string;
31
+ }
32
+
33
+ export interface GetLiveKitCameraTokenResponse {
34
+ token: string;
35
+ }
36
+
37
+ export interface GetLiveKitViewerTokenRequest {
38
+ userId: string;
39
+ roomId: string;
40
+ }
41
+
42
+ export interface GetLiveKitViewerTokenResponse {
43
+ token: string;
44
+ }
45
+
19
46
  export interface LinkCameraRequest {
20
47
  token: string;
21
48
  }
@@ -76,6 +103,12 @@ export interface CameraServiceClient {
76
103
  addCamera(request: AddCameraRequest): Observable<AddCameraResponse>;
77
104
 
78
105
  linkCamera(request: LinkCameraRequest): Observable<LinkCameraResponse>;
106
+
107
+ refresh(request: RefreshRequest): Observable<RefreshResponse>;
108
+
109
+ getLiveKitViewerToken(request: GetLiveKitViewerTokenRequest): Observable<GetLiveKitViewerTokenResponse>;
110
+
111
+ getLiveKitCameraToken(request: GetLiveKitCameraTokenRequest): Observable<GetLiveKitCameraTokenResponse>;
79
112
  }
80
113
 
81
114
  export interface CameraServiceController {
@@ -90,11 +123,29 @@ export interface CameraServiceController {
90
123
  linkCamera(
91
124
  request: LinkCameraRequest,
92
125
  ): Promise<LinkCameraResponse> | Observable<LinkCameraResponse> | LinkCameraResponse;
126
+
127
+ refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
128
+
129
+ getLiveKitViewerToken(
130
+ request: GetLiveKitViewerTokenRequest,
131
+ ): Promise<GetLiveKitViewerTokenResponse> | Observable<GetLiveKitViewerTokenResponse> | GetLiveKitViewerTokenResponse;
132
+
133
+ getLiveKitCameraToken(
134
+ request: GetLiveKitCameraTokenRequest,
135
+ ): Promise<GetLiveKitCameraTokenResponse> | Observable<GetLiveKitCameraTokenResponse> | GetLiveKitCameraTokenResponse;
93
136
  }
94
137
 
95
138
  export function CameraServiceControllerMethods() {
96
139
  return function (constructor: Function) {
97
- const grpcMethods: string[] = ["getLocationsByUserId", "createLocation", "addCamera", "linkCamera"];
140
+ const grpcMethods: string[] = [
141
+ "getLocationsByUserId",
142
+ "createLocation",
143
+ "addCamera",
144
+ "linkCamera",
145
+ "refresh",
146
+ "getLiveKitViewerToken",
147
+ "getLiveKitCameraToken",
148
+ ];
98
149
  for (const method of grpcMethods) {
99
150
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
100
151
  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.1",
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,35 @@ service CameraService {
9
9
  returns (Location);
10
10
  rpc AddCamera (AddCameraRequest) returns (AddCameraResponse);
11
11
  rpc LinkCamera (LinkCameraRequest) returns (LinkCameraResponse);
12
+ rpc Refresh (RefreshRequest) returns (RefreshResponse);
13
+ rpc GetLiveKitViewerToken (GetLiveKitViewerTokenRequest) returns (GetLiveKitViewerTokenResponse);
14
+ rpc GetLiveKitCameraToken (GetLiveKitCameraTokenRequest) returns (GetLiveKitCameraTokenResponse);
15
+ }
16
+
17
+ message RefreshRequest {
18
+ string refreshToken = 1;
19
+ }
20
+
21
+ message RefreshResponse {
22
+ string accessToken = 1;
23
+ string refreshToken = 2;
24
+ }
25
+ message GetLiveKitCameraTokenRequest {
26
+ string cameraId = 1;
27
+ string roomId = 2;
28
+ }
29
+
30
+ message GetLiveKitCameraTokenResponse {
31
+ string token = 1;
32
+ }
33
+
34
+ message GetLiveKitViewerTokenRequest {
35
+ string userId = 1;
36
+ string roomId = 2;
37
+ }
38
+
39
+ message GetLiveKitViewerTokenResponse {
40
+ string token = 1;
12
41
  }
13
42
 
14
43
  message LinkCameraRequest {