@eyenest/contracts 1.6.10 → 1.6.13

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
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.5
3
+ // protoc-gen-ts_proto v2.11.6
4
4
  // protoc v3.21.12
5
5
  // source: auth.proto
6
6
 
@@ -10,6 +10,14 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
+ export interface GetUserIdByTelegramChatIdRequest {
14
+ telegramChatId: string;
15
+ }
16
+
17
+ export interface GetUserIdByTelegramChatIdResponse {
18
+ userId: string;
19
+ }
20
+
13
21
  export interface GetUserNotificationSettingsRequest {
14
22
  userId: string;
15
23
  }
@@ -89,6 +97,8 @@ export interface AuthServiceClient {
89
97
  updateUserNotificationSettings(
90
98
  request: UpdateUserNotificationSettingsRequest,
91
99
  ): Observable<UpdateUserNotificationSettingsResponse>;
100
+
101
+ getUserIdByTelegramChatId(request: GetUserIdByTelegramChatIdRequest): Observable<GetUserIdByTelegramChatIdResponse>;
92
102
  }
93
103
 
94
104
  export interface AuthServiceController {
@@ -115,6 +125,13 @@ export interface AuthServiceController {
115
125
  | Promise<UpdateUserNotificationSettingsResponse>
116
126
  | Observable<UpdateUserNotificationSettingsResponse>
117
127
  | UpdateUserNotificationSettingsResponse;
128
+
129
+ getUserIdByTelegramChatId(
130
+ request: GetUserIdByTelegramChatIdRequest,
131
+ ):
132
+ | Promise<GetUserIdByTelegramChatIdResponse>
133
+ | Observable<GetUserIdByTelegramChatIdResponse>
134
+ | GetUserIdByTelegramChatIdResponse;
118
135
  }
119
136
 
120
137
  export function AuthServiceControllerMethods() {
@@ -126,6 +143,7 @@ export function AuthServiceControllerMethods() {
126
143
  "getUserById",
127
144
  "getUserNotificationSettings",
128
145
  "updateUserNotificationSettings",
146
+ "getUserIdByTelegramChatId",
129
147
  ];
130
148
  for (const method of grpcMethods) {
131
149
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/gen/ts/camera.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.5
3
+ // protoc-gen-ts_proto v2.11.6
4
4
  // protoc v3.21.12
5
5
  // source: camera.proto
6
6
 
package/gen/ts/events.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.5
3
+ // protoc-gen-ts_proto v2.11.6
4
4
  // protoc v3.21.12
5
5
  // source: events.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.5
3
+ // protoc-gen-ts_proto v2.11.6
4
4
  // protoc v3.21.12
5
5
  // source: notifications.proto
6
6
 
@@ -10,6 +10,17 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "notifications.v1";
12
12
 
13
+ export interface SendEmailRequest {
14
+ email: string;
15
+ subject: string;
16
+ text?: string | undefined;
17
+ html?: string | undefined;
18
+ }
19
+
20
+ export interface SendEmailResponse {
21
+ success: boolean;
22
+ }
23
+
13
24
  export interface LinkTokenRequest {
14
25
  userId: string;
15
26
  }
@@ -18,21 +29,40 @@ export interface LinkTokenResponse {
18
29
  token: string;
19
30
  }
20
31
 
32
+ export interface UnlinkTelegramAccountRequest {
33
+ userId?: string | undefined;
34
+ telegramChatId?: string | undefined;
35
+ }
36
+
37
+ export interface UnlinkTelegramAccountResponse {
38
+ success: boolean;
39
+ }
40
+
21
41
  export const NOTIFICATIONS_V1_PACKAGE_NAME = "notifications.v1";
22
42
 
23
43
  export interface NotificationsServiceClient {
24
44
  getLinkToken(request: LinkTokenRequest): Observable<LinkTokenResponse>;
45
+
46
+ unlinkTelegramAccount(request: UnlinkTelegramAccountRequest): Observable<UnlinkTelegramAccountResponse>;
47
+
48
+ sendEmail(request: SendEmailRequest): Observable<SendEmailResponse>;
25
49
  }
26
50
 
27
51
  export interface NotificationsServiceController {
28
52
  getLinkToken(
29
53
  request: LinkTokenRequest,
30
54
  ): Promise<LinkTokenResponse> | Observable<LinkTokenResponse> | LinkTokenResponse;
55
+
56
+ unlinkTelegramAccount(
57
+ request: UnlinkTelegramAccountRequest,
58
+ ): Promise<UnlinkTelegramAccountResponse> | Observable<UnlinkTelegramAccountResponse> | UnlinkTelegramAccountResponse;
59
+
60
+ sendEmail(request: SendEmailRequest): Promise<SendEmailResponse> | Observable<SendEmailResponse> | SendEmailResponse;
31
61
  }
32
62
 
33
63
  export function NotificationsServiceControllerMethods() {
34
64
  return function (constructor: Function) {
35
- const grpcMethods: string[] = ["getLinkToken"];
65
+ const grpcMethods: string[] = ["getLinkToken", "unlinkTelegramAccount", "sendEmail"];
36
66
  for (const method of grpcMethods) {
37
67
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
38
68
  GrpcMethod("NotificationsService", method)(constructor.prototype[method], method, descriptor);
package/gen/ts/video.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.5
3
+ // protoc-gen-ts_proto v2.11.6
4
4
  // protoc v3.21.12
5
5
  // source: video.proto
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyenest/contracts",
3
- "version": "1.6.10",
3
+ "version": "1.6.13",
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
@@ -10,6 +10,17 @@ service AuthService {
10
10
  rpc getUserById (GetUserByIdRequest) returns (GetUserByIdResponse);
11
11
  rpc getUserNotificationSettings (GetUserNotificationSettingsRequest) returns (GetUserNotificationSettingsResponse);
12
12
  rpc updateUserNotificationSettings (UpdateUserNotificationSettingsRequest) returns (UpdateUserNotificationSettingsResponse);
13
+ rpc getUserIdByTelegramChatId (GetUserIdByTelegramChatIdRequest) returns (GetUserIdByTelegramChatIdResponse);
14
+ }
15
+
16
+
17
+
18
+ message GetUserIdByTelegramChatIdRequest {
19
+ string telegramChatId = 1;
20
+ }
21
+
22
+ message GetUserIdByTelegramChatIdResponse {
23
+ string userId = 1;
13
24
  }
14
25
 
15
26
  message GetUserNotificationSettingsRequest {
@@ -4,6 +4,19 @@ package notifications.v1;
4
4
 
5
5
  service NotificationsService {
6
6
  rpc GetLinkToken (LinkTokenRequest) returns (LinkTokenResponse);
7
+ rpc UnlinkTelegramAccount (UnlinkTelegramAccountRequest) returns (UnlinkTelegramAccountResponse);
8
+ rpc SendEmail (SendEmailRequest) returns (SendEmailResponse);
9
+ }
10
+
11
+ message SendEmailRequest {
12
+ string email = 1;
13
+ string subject = 2;
14
+ optional string text = 3;
15
+ optional string html = 4;
16
+ }
17
+
18
+ message SendEmailResponse {
19
+ bool success = 1;
7
20
  }
8
21
 
9
22
  message LinkTokenRequest {
@@ -14,3 +27,11 @@ message LinkTokenResponse {
14
27
  string token = 1;
15
28
  }
16
29
 
30
+ message UnlinkTelegramAccountRequest {
31
+ optional string userId = 1;
32
+ optional string telegramChatId = 2;
33
+ }
34
+
35
+ message UnlinkTelegramAccountResponse {
36
+ bool success = 1;
37
+ }