@eyenest/contracts 1.6.6 → 1.6.8

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
@@ -20,6 +20,19 @@ export interface GetUserNotificationSettingsResponse {
20
20
  emailEnabled: boolean;
21
21
  }
22
22
 
23
+ export interface UpdateUserNotificationSettingsRequest {
24
+ userId: string;
25
+ telegramEnabled: boolean;
26
+ telegramChatId: string;
27
+ emailEnabled: boolean;
28
+ }
29
+
30
+ export interface UpdateUserNotificationSettingsResponse {
31
+ telegramEnabled: boolean;
32
+ telegramChatId: string;
33
+ emailEnabled: boolean;
34
+ }
35
+
23
36
  export interface RegisterRequest {
24
37
  email: string;
25
38
  password: string;
@@ -72,6 +85,10 @@ export interface AuthServiceClient {
72
85
  getUserNotificationSettings(
73
86
  request: GetUserNotificationSettingsRequest,
74
87
  ): Observable<GetUserNotificationSettingsResponse>;
88
+
89
+ updateUserNotificationSettings(
90
+ request: UpdateUserNotificationSettingsRequest,
91
+ ): Observable<UpdateUserNotificationSettingsResponse>;
75
92
  }
76
93
 
77
94
  export interface AuthServiceController {
@@ -91,11 +108,25 @@ export interface AuthServiceController {
91
108
  | Promise<GetUserNotificationSettingsResponse>
92
109
  | Observable<GetUserNotificationSettingsResponse>
93
110
  | GetUserNotificationSettingsResponse;
111
+
112
+ updateUserNotificationSettings(
113
+ request: UpdateUserNotificationSettingsRequest,
114
+ ):
115
+ | Promise<UpdateUserNotificationSettingsResponse>
116
+ | Observable<UpdateUserNotificationSettingsResponse>
117
+ | UpdateUserNotificationSettingsResponse;
94
118
  }
95
119
 
96
120
  export function AuthServiceControllerMethods() {
97
121
  return function (constructor: Function) {
98
- const grpcMethods: string[] = ["register", "login", "refresh", "getUserById", "getUserNotificationSettings"];
122
+ const grpcMethods: string[] = [
123
+ "register",
124
+ "login",
125
+ "refresh",
126
+ "getUserById",
127
+ "getUserNotificationSettings",
128
+ "updateUserNotificationSettings",
129
+ ];
99
130
  for (const method of grpcMethods) {
100
131
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
101
132
  GrpcMethod("AuthService", 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.6",
3
+ "version": "1.6.8",
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
@@ -9,6 +9,7 @@ service AuthService {
9
9
  rpc refresh (RefreshRequest) returns (RefreshResponse);
10
10
  rpc getUserById (GetUserByIdRequest) returns (GetUserByIdResponse);
11
11
  rpc getUserNotificationSettings (GetUserNotificationSettingsRequest) returns (GetUserNotificationSettingsResponse);
12
+ rpc updateUserNotificationSettings (UpdateUserNotificationSettingsRequest) returns (UpdateUserNotificationSettingsResponse);
12
13
  }
13
14
 
14
15
  message GetUserNotificationSettingsRequest {
@@ -21,6 +22,20 @@ message GetUserNotificationSettingsResponse {
21
22
  bool emailEnabled = 3;
22
23
  }
23
24
 
25
+ message UpdateUserNotificationSettingsRequest {
26
+ string userId = 1;
27
+ bool telegramEnabled = 2;
28
+ string telegramChatId = 3;
29
+ bool emailEnabled = 4;
30
+ }
31
+
32
+ message UpdateUserNotificationSettingsResponse {
33
+ bool telegramEnabled = 1;
34
+ string telegramChatId = 2;
35
+ bool emailEnabled = 3;
36
+ }
37
+
38
+
24
39
  message RegisterRequest {
25
40
  string email = 1;
26
41
  string password = 2;