@eyenest/contracts 1.6.0 → 1.6.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
@@ -10,10 +10,20 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "camera.v1";
12
12
 
13
- export enum Status {
14
- ON = 0,
15
- OFF = 1,
16
- UNRECOGNIZED = -1,
13
+ export interface DeleteCameraRequest {
14
+ cameraId: string;
15
+ }
16
+
17
+ export interface DeleteCameraResponse {
18
+ camera: Camera | undefined;
19
+ }
20
+
21
+ export interface DeleteLocationRequest {
22
+ locationId: string;
23
+ }
24
+
25
+ export interface DeleteLocationResponse {
26
+ location: Location | undefined;
17
27
  }
18
28
 
19
29
  export interface GetCameraByIdRequest {
@@ -137,8 +147,12 @@ export interface CameraServiceClient {
137
147
 
138
148
  createLocation(request: CreateLocationRequest): Observable<Location>;
139
149
 
150
+ deleteLocation(request: DeleteLocationRequest): Observable<DeleteLocationResponse>;
151
+
140
152
  addCamera(request: AddCameraRequest): Observable<AddCameraResponse>;
141
153
 
154
+ deleteCamera(request: DeleteCameraRequest): Observable<DeleteCameraResponse>;
155
+
142
156
  linkCamera(request: LinkCameraRequest): Observable<LinkCameraResponse>;
143
157
 
144
158
  refresh(request: RefreshRequest): Observable<RefreshResponse>;
@@ -163,8 +177,16 @@ export interface CameraServiceController {
163
177
 
164
178
  createLocation(request: CreateLocationRequest): Promise<Location> | Observable<Location> | Location;
165
179
 
180
+ deleteLocation(
181
+ request: DeleteLocationRequest,
182
+ ): Promise<DeleteLocationResponse> | Observable<DeleteLocationResponse> | DeleteLocationResponse;
183
+
166
184
  addCamera(request: AddCameraRequest): Promise<AddCameraResponse> | Observable<AddCameraResponse> | AddCameraResponse;
167
185
 
186
+ deleteCamera(
187
+ request: DeleteCameraRequest,
188
+ ): Promise<DeleteCameraResponse> | Observable<DeleteCameraResponse> | DeleteCameraResponse;
189
+
168
190
  linkCamera(
169
191
  request: LinkCameraRequest,
170
192
  ): Promise<LinkCameraResponse> | Observable<LinkCameraResponse> | LinkCameraResponse;
@@ -204,7 +226,9 @@ export function CameraServiceControllerMethods() {
204
226
  const grpcMethods: string[] = [
205
227
  "getLocationsByUserId",
206
228
  "createLocation",
229
+ "deleteLocation",
207
230
  "addCamera",
231
+ "deleteCamera",
208
232
  "linkCamera",
209
233
  "refresh",
210
234
  "getLiveKitViewerToken",
package/gen/ts/video.ts CHANGED
@@ -16,6 +16,14 @@ export enum VideoFileStatus {
16
16
  UNRECOGNIZED = -1,
17
17
  }
18
18
 
19
+ export interface DeleteRecordingRequest {
20
+ recordingId: string;
21
+ }
22
+
23
+ export interface DeleteRecordingResponse {
24
+ recording: Recording | undefined;
25
+ }
26
+
19
27
  export interface GetPresignedUrlRequest {
20
28
  fileId: string;
21
29
  cameraId: string;
@@ -67,6 +75,8 @@ export interface VideoServiceClient {
67
75
 
68
76
  getAllRecordings(request: GetAllRecordingsRequest): Observable<GetAllRecordingsResponse>;
69
77
 
78
+ deleteRecording(request: DeleteRecordingRequest): Observable<DeleteRecordingResponse>;
79
+
70
80
  getPresignedUrl(request: GetPresignedUrlRequest): Observable<GetPresignedUrlResponse>;
71
81
  }
72
82
 
@@ -83,6 +93,10 @@ export interface VideoServiceController {
83
93
  request: GetAllRecordingsRequest,
84
94
  ): Promise<GetAllRecordingsResponse> | Observable<GetAllRecordingsResponse> | GetAllRecordingsResponse;
85
95
 
96
+ deleteRecording(
97
+ request: DeleteRecordingRequest,
98
+ ): Promise<DeleteRecordingResponse> | Observable<DeleteRecordingResponse> | DeleteRecordingResponse;
99
+
86
100
  getPresignedUrl(
87
101
  request: GetPresignedUrlRequest,
88
102
  ): Promise<GetPresignedUrlResponse> | Observable<GetPresignedUrlResponse> | GetPresignedUrlResponse;
@@ -90,7 +104,13 @@ export interface VideoServiceController {
90
104
 
91
105
  export function VideoServiceControllerMethods() {
92
106
  return function (constructor: Function) {
93
- const grpcMethods: string[] = ["startRecording", "stopRecording", "getAllRecordings", "getPresignedUrl"];
107
+ const grpcMethods: string[] = [
108
+ "startRecording",
109
+ "stopRecording",
110
+ "getAllRecordings",
111
+ "deleteRecording",
112
+ "getPresignedUrl",
113
+ ];
94
114
  for (const method of grpcMethods) {
95
115
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
96
116
  GrpcMethod("VideoService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyenest/contracts",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -7,7 +7,9 @@ service CameraService {
7
7
  returns (GetLocationsByUserIdResponse);
8
8
  rpc CreateLocation (CreateLocationRequest)
9
9
  returns (Location);
10
+ rpc DeleteLocation (DeleteLocationRequest) returns (DeleteLocationResponse);
10
11
  rpc AddCamera (AddCameraRequest) returns (AddCameraResponse);
12
+ rpc DeleteCamera (DeleteCameraRequest) returns (DeleteCameraResponse);
11
13
  rpc LinkCamera (LinkCameraRequest) returns (LinkCameraResponse);
12
14
  rpc Refresh (RefreshRequest) returns (RefreshResponse);
13
15
  rpc GetLiveKitViewerToken (GetLiveKitViewerTokenRequest) returns (GetLiveKitViewerTokenResponse);
@@ -18,6 +20,20 @@ service CameraService {
18
20
  rpc GetCameraById(GetCameraByIdRequest) returns (GetCameraByIdResponse);
19
21
  }
20
22
 
23
+ message DeleteCameraRequest {
24
+ string cameraId = 1;
25
+ }
26
+ message DeleteCameraResponse {
27
+ Camera camera = 1;
28
+ }
29
+
30
+ message DeleteLocationRequest {
31
+ string locationId = 1;
32
+ }
33
+ message DeleteLocationResponse {
34
+ Location location = 1;
35
+ }
36
+
21
37
  message GetCameraByIdRequest {
22
38
  string cameraId = 1;
23
39
  }
@@ -129,9 +145,4 @@ message CameraSettings {
129
145
  string id = 1;
130
146
  string aiStatus = 2;
131
147
  string recordingStatus = 3;
132
- }
133
-
134
- enum Status {
135
- ON = 0;
136
- OFF = 1;
137
- }
148
+ }
@@ -3,7 +3,7 @@ syntax = "proto3";
3
3
  package events.v1;
4
4
 
5
5
  service EventsService {
6
- rpc getEventsByCameraId (GetEventsByCameraIdRequest) returns (GetEventsByCameraIdResponse);
6
+ rpc GetEventsByCameraId (GetEventsByCameraIdRequest) returns (GetEventsByCameraIdResponse);
7
7
  }
8
8
 
9
9
  message GetEventsByCameraIdRequest {
package/proto/video.proto CHANGED
@@ -6,9 +6,17 @@ service VideoService {
6
6
  rpc StartRecording (StartRecordingRequest) returns (StartRecordingResponse);
7
7
  rpc StopRecording (StopRecordingRequest) returns (StopRecordingResponse);
8
8
  rpc GetAllRecordings (GetAllRecordingsRequest) returns (GetAllRecordingsResponse);
9
+ rpc DeleteRecording (DeleteRecordingRequest) returns (DeleteRecordingResponse);
9
10
  rpc GetPresignedUrl (GetPresignedUrlRequest) returns (GetPresignedUrlResponse);
10
11
  }
11
12
 
13
+ message DeleteRecordingRequest {
14
+ string recordingId = 1;
15
+ }
16
+ message DeleteRecordingResponse {
17
+ Recording recording = 1;
18
+ }
19
+
12
20
  message GetPresignedUrlRequest {
13
21
  string fileId = 1;
14
22
  string cameraId = 2;