@eyenest/contracts 1.3.0 → 1.3.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/camera.ts CHANGED
@@ -16,6 +16,16 @@ export enum Status {
16
16
  UNRECOGNIZED = -1,
17
17
  }
18
18
 
19
+ export interface AddCameraRequest {
20
+ name: string;
21
+ locationId: string;
22
+ userId: string;
23
+ }
24
+
25
+ export interface AddCameraResponse {
26
+ token: string;
27
+ }
28
+
19
29
  export interface GetLocationsByUserIdRequest {
20
30
  userId: string;
21
31
  }
@@ -53,6 +63,8 @@ export interface CameraServiceClient {
53
63
  getLocationsByUserId(request: GetLocationsByUserIdRequest): Observable<GetLocationsByUserIdResponse>;
54
64
 
55
65
  createLocation(request: CreateLocationRequest): Observable<Location>;
66
+
67
+ addCamera(request: AddCameraRequest): Observable<AddCameraResponse>;
56
68
  }
57
69
 
58
70
  export interface CameraServiceController {
@@ -61,11 +73,13 @@ export interface CameraServiceController {
61
73
  ): Promise<GetLocationsByUserIdResponse> | Observable<GetLocationsByUserIdResponse> | GetLocationsByUserIdResponse;
62
74
 
63
75
  createLocation(request: CreateLocationRequest): Promise<Location> | Observable<Location> | Location;
76
+
77
+ addCamera(request: AddCameraRequest): Promise<AddCameraResponse> | Observable<AddCameraResponse> | AddCameraResponse;
64
78
  }
65
79
 
66
80
  export function CameraServiceControllerMethods() {
67
81
  return function (constructor: Function) {
68
- const grpcMethods: string[] = ["getLocationsByUserId", "createLocation"];
82
+ const grpcMethods: string[] = ["getLocationsByUserId", "createLocation", "addCamera"];
69
83
  for (const method of grpcMethods) {
70
84
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
71
85
  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.1",
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,18 @@ service CameraService {
7
7
  returns (GetLocationsByUserIdResponse);
8
8
  rpc CreateLocation (CreateLocationRequest)
9
9
  returns (Location);
10
+ rpc AddCamera (AddCameraRequest) returns (AddCameraResponse);
10
11
  }
11
12
 
13
+ message AddCameraRequest {
14
+ string name = 1;
15
+ string locationId = 2;
16
+ string userId = 3;
17
+ }
12
18
 
19
+ message AddCameraResponse {
20
+ string token = 1;
21
+ }
13
22
 
14
23
  message GetLocationsByUserIdRequest {
15
24
  string userId = 1;