@eyenest/contracts 1.6.4 → 1.6.6

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 CHANGED
@@ -10,6 +10,16 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
+ export interface GetUserNotificationSettingsRequest {
14
+ userId: string;
15
+ }
16
+
17
+ export interface GetUserNotificationSettingsResponse {
18
+ telegramEnabled: boolean;
19
+ telegramChatId: string;
20
+ emailEnabled: boolean;
21
+ }
22
+
13
23
  export interface RegisterRequest {
14
24
  email: string;
15
25
  password: string;
@@ -58,6 +68,10 @@ export interface AuthServiceClient {
58
68
  refresh(request: RefreshRequest): Observable<RefreshResponse>;
59
69
 
60
70
  getUserById(request: GetUserByIdRequest): Observable<GetUserByIdResponse>;
71
+
72
+ getUserNotificationSettings(
73
+ request: GetUserNotificationSettingsRequest,
74
+ ): Observable<GetUserNotificationSettingsResponse>;
61
75
  }
62
76
 
63
77
  export interface AuthServiceController {
@@ -70,11 +84,18 @@ export interface AuthServiceController {
70
84
  getUserById(
71
85
  request: GetUserByIdRequest,
72
86
  ): Promise<GetUserByIdResponse> | Observable<GetUserByIdResponse> | GetUserByIdResponse;
87
+
88
+ getUserNotificationSettings(
89
+ request: GetUserNotificationSettingsRequest,
90
+ ):
91
+ | Promise<GetUserNotificationSettingsResponse>
92
+ | Observable<GetUserNotificationSettingsResponse>
93
+ | GetUserNotificationSettingsResponse;
73
94
  }
74
95
 
75
96
  export function AuthServiceControllerMethods() {
76
97
  return function (constructor: Function) {
77
- const grpcMethods: string[] = ["register", "login", "refresh", "getUserById"];
98
+ const grpcMethods: string[] = ["register", "login", "refresh", "getUserById", "getUserNotificationSettings"];
78
99
  for (const method of grpcMethods) {
79
100
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
80
101
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/gen/ts/video.ts CHANGED
@@ -18,7 +18,7 @@ export enum VideoFileStatus {
18
18
 
19
19
  export interface DeleteRecordingRequest {
20
20
  recordingId: string;
21
- cameraId: string;
21
+ userId: string;
22
22
  }
23
23
 
24
24
  export interface DeleteRecordingResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyenest/contracts",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/auth.proto CHANGED
@@ -8,6 +8,17 @@ service AuthService {
8
8
  rpc login (LoginRequest) returns (LoginResponse);
9
9
  rpc refresh (RefreshRequest) returns (RefreshResponse);
10
10
  rpc getUserById (GetUserByIdRequest) returns (GetUserByIdResponse);
11
+ rpc getUserNotificationSettings (GetUserNotificationSettingsRequest) returns (GetUserNotificationSettingsResponse);
12
+ }
13
+
14
+ message GetUserNotificationSettingsRequest {
15
+ string userId = 1;
16
+ }
17
+
18
+ message GetUserNotificationSettingsResponse {
19
+ bool telegramEnabled = 1;
20
+ string telegramChatId = 2;
21
+ bool emailEnabled = 3;
11
22
  }
12
23
 
13
24
  message RegisterRequest {
package/proto/video.proto CHANGED
@@ -12,7 +12,7 @@ service VideoService {
12
12
 
13
13
  message DeleteRecordingRequest {
14
14
  string recordingId = 1;
15
- string cameraId = 2;
15
+ string userId = 2;
16
16
  }
17
17
  message DeleteRecordingResponse {
18
18
  Recording recording = 1;