@eyenest/contracts 1.3.1 → 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 +1 -1
- package/gen/ts/camera.ts +54 -2
- package/package.json +1 -1
- package/proto/camera.proto +30 -0
package/gen/ts/auth.ts
CHANGED
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.
|
|
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 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
|
+
|
|
37
|
+
export interface LinkCameraRequest {
|
|
38
|
+
token: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface LinkCameraResponse {
|
|
42
|
+
accessToken: string;
|
|
43
|
+
refreshToken: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
19
46
|
export interface AddCameraRequest {
|
|
20
47
|
name: string;
|
|
21
48
|
locationId: string;
|
|
@@ -65,6 +92,12 @@ export interface CameraServiceClient {
|
|
|
65
92
|
createLocation(request: CreateLocationRequest): Observable<Location>;
|
|
66
93
|
|
|
67
94
|
addCamera(request: AddCameraRequest): Observable<AddCameraResponse>;
|
|
95
|
+
|
|
96
|
+
linkCamera(request: LinkCameraRequest): Observable<LinkCameraResponse>;
|
|
97
|
+
|
|
98
|
+
getLiveKitViewerToken(request: GetLiveKitViewerTokenRequest): Observable<GetLiveKitViewerTokenResponse>;
|
|
99
|
+
|
|
100
|
+
getLiveKitCameraToken(request: GetLiveKitCameraTokenRequest): Observable<GetLiveKitCameraTokenResponse>;
|
|
68
101
|
}
|
|
69
102
|
|
|
70
103
|
export interface CameraServiceController {
|
|
@@ -75,11 +108,30 @@ export interface CameraServiceController {
|
|
|
75
108
|
createLocation(request: CreateLocationRequest): Promise<Location> | Observable<Location> | Location;
|
|
76
109
|
|
|
77
110
|
addCamera(request: AddCameraRequest): Promise<AddCameraResponse> | Observable<AddCameraResponse> | AddCameraResponse;
|
|
111
|
+
|
|
112
|
+
linkCamera(
|
|
113
|
+
request: LinkCameraRequest,
|
|
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;
|
|
78
123
|
}
|
|
79
124
|
|
|
80
125
|
export function CameraServiceControllerMethods() {
|
|
81
126
|
return function (constructor: Function) {
|
|
82
|
-
const grpcMethods: string[] = [
|
|
127
|
+
const grpcMethods: string[] = [
|
|
128
|
+
"getLocationsByUserId",
|
|
129
|
+
"createLocation",
|
|
130
|
+
"addCamera",
|
|
131
|
+
"linkCamera",
|
|
132
|
+
"getLiveKitViewerToken",
|
|
133
|
+
"getLiveKitCameraToken",
|
|
134
|
+
];
|
|
83
135
|
for (const method of grpcMethods) {
|
|
84
136
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
85
137
|
GrpcMethod("CameraService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/camera.proto
CHANGED
|
@@ -8,6 +8,36 @@ service CameraService {
|
|
|
8
8
|
rpc CreateLocation (CreateLocationRequest)
|
|
9
9
|
returns (Location);
|
|
10
10
|
rpc AddCamera (AddCameraRequest) returns (AddCameraResponse);
|
|
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;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message LinkCameraRequest {
|
|
35
|
+
string token = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message LinkCameraResponse {
|
|
39
|
+
string accessToken = 1;
|
|
40
|
+
string refreshToken = 2;
|
|
11
41
|
}
|
|
12
42
|
|
|
13
43
|
message AddCameraRequest {
|