@eyenest/contracts 1.3.1 → 1.3.2
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/camera.ts +16 -1
- package/package.json +1 -1
- package/proto/camera.proto +10 -0
package/gen/ts/camera.ts
CHANGED
|
@@ -16,6 +16,15 @@ export enum Status {
|
|
|
16
16
|
UNRECOGNIZED = -1,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export interface LinkCameraRequest {
|
|
20
|
+
token: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface LinkCameraResponse {
|
|
24
|
+
accessToken: string;
|
|
25
|
+
refreshToken: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
19
28
|
export interface AddCameraRequest {
|
|
20
29
|
name: string;
|
|
21
30
|
locationId: string;
|
|
@@ -65,6 +74,8 @@ export interface CameraServiceClient {
|
|
|
65
74
|
createLocation(request: CreateLocationRequest): Observable<Location>;
|
|
66
75
|
|
|
67
76
|
addCamera(request: AddCameraRequest): Observable<AddCameraResponse>;
|
|
77
|
+
|
|
78
|
+
linkCamera(request: LinkCameraRequest): Observable<LinkCameraResponse>;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
export interface CameraServiceController {
|
|
@@ -75,11 +86,15 @@ export interface CameraServiceController {
|
|
|
75
86
|
createLocation(request: CreateLocationRequest): Promise<Location> | Observable<Location> | Location;
|
|
76
87
|
|
|
77
88
|
addCamera(request: AddCameraRequest): Promise<AddCameraResponse> | Observable<AddCameraResponse> | AddCameraResponse;
|
|
89
|
+
|
|
90
|
+
linkCamera(
|
|
91
|
+
request: LinkCameraRequest,
|
|
92
|
+
): Promise<LinkCameraResponse> | Observable<LinkCameraResponse> | LinkCameraResponse;
|
|
78
93
|
}
|
|
79
94
|
|
|
80
95
|
export function CameraServiceControllerMethods() {
|
|
81
96
|
return function (constructor: Function) {
|
|
82
|
-
const grpcMethods: string[] = ["getLocationsByUserId", "createLocation", "addCamera"];
|
|
97
|
+
const grpcMethods: string[] = ["getLocationsByUserId", "createLocation", "addCamera", "linkCamera"];
|
|
83
98
|
for (const method of grpcMethods) {
|
|
84
99
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
85
100
|
GrpcMethod("CameraService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/camera.proto
CHANGED
|
@@ -8,6 +8,16 @@ 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
|
+
}
|
|
13
|
+
|
|
14
|
+
message LinkCameraRequest {
|
|
15
|
+
string token = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message LinkCameraResponse {
|
|
19
|
+
string accessToken = 1;
|
|
20
|
+
string refreshToken = 2;
|
|
11
21
|
}
|
|
12
22
|
|
|
13
23
|
message AddCameraRequest {
|