@eyenest/contracts 1.6.13 → 1.6.16

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
@@ -47,8 +47,7 @@ export interface RegisterRequest {
47
47
  }
48
48
 
49
49
  export interface RegisterResponse {
50
- accessToken: string;
51
- refreshToken: string;
50
+ success: boolean;
52
51
  }
53
52
 
54
53
  export interface LoginRequest {
@@ -57,8 +56,7 @@ export interface LoginRequest {
57
56
  }
58
57
 
59
58
  export interface LoginResponse {
60
- accessToken: string;
61
- refreshToken: string;
59
+ success: boolean;
62
60
  }
63
61
 
64
62
  export interface RefreshRequest {
@@ -79,6 +77,15 @@ export interface GetUserByIdResponse {
79
77
  email: string;
80
78
  }
81
79
 
80
+ export interface CheckOtpCodeRequest {
81
+ code: string;
82
+ }
83
+
84
+ export interface CheckOtpCodeResponse {
85
+ accessToken: string;
86
+ refreshToken: string;
87
+ }
88
+
82
89
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
83
90
 
84
91
  export interface AuthServiceClient {
@@ -99,6 +106,8 @@ export interface AuthServiceClient {
99
106
  ): Observable<UpdateUserNotificationSettingsResponse>;
100
107
 
101
108
  getUserIdByTelegramChatId(request: GetUserIdByTelegramChatIdRequest): Observable<GetUserIdByTelegramChatIdResponse>;
109
+
110
+ checkOtpCode(request: CheckOtpCodeRequest): Observable<CheckOtpCodeResponse>;
102
111
  }
103
112
 
104
113
  export interface AuthServiceController {
@@ -132,6 +141,10 @@ export interface AuthServiceController {
132
141
  | Promise<GetUserIdByTelegramChatIdResponse>
133
142
  | Observable<GetUserIdByTelegramChatIdResponse>
134
143
  | GetUserIdByTelegramChatIdResponse;
144
+
145
+ checkOtpCode(
146
+ request: CheckOtpCodeRequest,
147
+ ): Promise<CheckOtpCodeResponse> | Observable<CheckOtpCodeResponse> | CheckOtpCodeResponse;
135
148
  }
136
149
 
137
150
  export function AuthServiceControllerMethods() {
@@ -144,6 +157,7 @@ export function AuthServiceControllerMethods() {
144
157
  "getUserNotificationSettings",
145
158
  "updateUserNotificationSettings",
146
159
  "getUserIdByTelegramChatId",
160
+ "checkOtpCode",
147
161
  ];
148
162
  for (const method of grpcMethods) {
149
163
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyenest/contracts",
3
- "version": "1.6.13",
3
+ "version": "1.6.16",
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
@@ -11,6 +11,7 @@ service AuthService {
11
11
  rpc getUserNotificationSettings (GetUserNotificationSettingsRequest) returns (GetUserNotificationSettingsResponse);
12
12
  rpc updateUserNotificationSettings (UpdateUserNotificationSettingsRequest) returns (UpdateUserNotificationSettingsResponse);
13
13
  rpc getUserIdByTelegramChatId (GetUserIdByTelegramChatIdRequest) returns (GetUserIdByTelegramChatIdResponse);
14
+ rpc checkOtpCode (CheckOtpCodeRequest) returns (CheckOtpCodeResponse);
14
15
  }
15
16
 
16
17
 
@@ -53,8 +54,7 @@ message RegisterRequest {
53
54
  }
54
55
 
55
56
  message RegisterResponse {
56
- string accessToken = 1;
57
- string refreshToken = 2;
57
+ bool success = 1;
58
58
  }
59
59
 
60
60
  message LoginRequest {
@@ -63,8 +63,7 @@ message LoginRequest {
63
63
  }
64
64
 
65
65
  message LoginResponse {
66
- string accessToken = 1;
67
- string refreshToken = 2;
66
+ bool success = 1;
68
67
  }
69
68
 
70
69
  message RefreshRequest {
@@ -86,3 +85,12 @@ message GetUserByIdResponse {
86
85
  }
87
86
 
88
87
 
88
+ message CheckOtpCodeRequest {
89
+ string code = 1;
90
+ }
91
+
92
+ message CheckOtpCodeResponse {
93
+ string accessToken = 1;
94
+ string refreshToken = 2;
95
+ }
96
+