@eyenest/contracts 1.6.10 → 1.6.12
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 +19 -1
- package/gen/ts/camera.ts +1 -1
- package/gen/ts/events.ts +1 -1
- package/gen/ts/notifications.ts +17 -2
- package/gen/ts/video.ts +1 -1
- package/package.json +1 -1
- package/proto/auth.proto +11 -0
- package/proto/notifications.proto +9 -0
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.
|
|
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
package/gen/ts/events.ts
CHANGED
package/gen/ts/notifications.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.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.6
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: notifications.proto
|
|
6
6
|
|
|
@@ -18,21 +18,36 @@ export interface LinkTokenResponse {
|
|
|
18
18
|
token: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export interface UnlinkTelegramAccountRequest {
|
|
22
|
+
userId?: string | undefined;
|
|
23
|
+
telegramChatId?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface UnlinkTelegramAccountResponse {
|
|
27
|
+
success: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
export const NOTIFICATIONS_V1_PACKAGE_NAME = "notifications.v1";
|
|
22
31
|
|
|
23
32
|
export interface NotificationsServiceClient {
|
|
24
33
|
getLinkToken(request: LinkTokenRequest): Observable<LinkTokenResponse>;
|
|
34
|
+
|
|
35
|
+
unlinkTelegramAccount(request: UnlinkTelegramAccountRequest): Observable<UnlinkTelegramAccountResponse>;
|
|
25
36
|
}
|
|
26
37
|
|
|
27
38
|
export interface NotificationsServiceController {
|
|
28
39
|
getLinkToken(
|
|
29
40
|
request: LinkTokenRequest,
|
|
30
41
|
): Promise<LinkTokenResponse> | Observable<LinkTokenResponse> | LinkTokenResponse;
|
|
42
|
+
|
|
43
|
+
unlinkTelegramAccount(
|
|
44
|
+
request: UnlinkTelegramAccountRequest,
|
|
45
|
+
): Promise<UnlinkTelegramAccountResponse> | Observable<UnlinkTelegramAccountResponse> | UnlinkTelegramAccountResponse;
|
|
31
46
|
}
|
|
32
47
|
|
|
33
48
|
export function NotificationsServiceControllerMethods() {
|
|
34
49
|
return function (constructor: Function) {
|
|
35
|
-
const grpcMethods: string[] = ["getLinkToken"];
|
|
50
|
+
const grpcMethods: string[] = ["getLinkToken", "unlinkTelegramAccount"];
|
|
36
51
|
for (const method of grpcMethods) {
|
|
37
52
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
38
53
|
GrpcMethod("NotificationsService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/ts/video.ts
CHANGED
package/package.json
CHANGED
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,7 @@ package notifications.v1;
|
|
|
4
4
|
|
|
5
5
|
service NotificationsService {
|
|
6
6
|
rpc GetLinkToken (LinkTokenRequest) returns (LinkTokenResponse);
|
|
7
|
+
rpc UnlinkTelegramAccount (UnlinkTelegramAccountRequest) returns (UnlinkTelegramAccountResponse);
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
message LinkTokenRequest {
|
|
@@ -14,3 +15,11 @@ message LinkTokenResponse {
|
|
|
14
15
|
string token = 1;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
message UnlinkTelegramAccountRequest {
|
|
19
|
+
optional string userId = 1;
|
|
20
|
+
optional string telegramChatId = 2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message UnlinkTelegramAccountResponse {
|
|
24
|
+
bool success = 1;
|
|
25
|
+
}
|