@eyenest/contracts 1.3.0 → 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 CHANGED
@@ -16,6 +16,25 @@ 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
+
28
+ export interface AddCameraRequest {
29
+ name: string;
30
+ locationId: string;
31
+ userId: string;
32
+ }
33
+
34
+ export interface AddCameraResponse {
35
+ token: string;
36
+ }
37
+
19
38
  export interface GetLocationsByUserIdRequest {
20
39
  userId: string;
21
40
  }
@@ -53,6 +72,10 @@ export interface CameraServiceClient {
53
72
  getLocationsByUserId(request: GetLocationsByUserIdRequest): Observable<GetLocationsByUserIdResponse>;
54
73
 
55
74
  createLocation(request: CreateLocationRequest): Observable<Location>;
75
+
76
+ addCamera(request: AddCameraRequest): Observable<AddCameraResponse>;
77
+
78
+ linkCamera(request: LinkCameraRequest): Observable<LinkCameraResponse>;
56
79
  }
57
80
 
58
81
  export interface CameraServiceController {
@@ -61,11 +84,17 @@ export interface CameraServiceController {
61
84
  ): Promise<GetLocationsByUserIdResponse> | Observable<GetLocationsByUserIdResponse> | GetLocationsByUserIdResponse;
62
85
 
63
86
  createLocation(request: CreateLocationRequest): Promise<Location> | Observable<Location> | Location;
87
+
88
+ addCamera(request: AddCameraRequest): Promise<AddCameraResponse> | Observable<AddCameraResponse> | AddCameraResponse;
89
+
90
+ linkCamera(
91
+ request: LinkCameraRequest,
92
+ ): Promise<LinkCameraResponse> | Observable<LinkCameraResponse> | LinkCameraResponse;
64
93
  }
65
94
 
66
95
  export function CameraServiceControllerMethods() {
67
96
  return function (constructor: Function) {
68
- const grpcMethods: string[] = ["getLocationsByUserId", "createLocation"];
97
+ const grpcMethods: string[] = ["getLocationsByUserId", "createLocation", "addCamera", "linkCamera"];
69
98
  for (const method of grpcMethods) {
70
99
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
71
100
  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.0",
3
+ "version": "1.3.2",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -7,9 +7,28 @@ service CameraService {
7
7
  returns (GetLocationsByUserIdResponse);
8
8
  rpc CreateLocation (CreateLocationRequest)
9
9
  returns (Location);
10
+ rpc AddCamera (AddCameraRequest) returns (AddCameraResponse);
11
+ rpc LinkCamera (LinkCameraRequest) returns (LinkCameraResponse);
10
12
  }
11
13
 
14
+ message LinkCameraRequest {
15
+ string token = 1;
16
+ }
17
+
18
+ message LinkCameraResponse {
19
+ string accessToken = 1;
20
+ string refreshToken = 2;
21
+ }
12
22
 
23
+ message AddCameraRequest {
24
+ string name = 1;
25
+ string locationId = 2;
26
+ string userId = 3;
27
+ }
28
+
29
+ message AddCameraResponse {
30
+ string token = 1;
31
+ }
13
32
 
14
33
  message GetLocationsByUserIdRequest {
15
34
  string userId = 1;