@noildm/contracts 1.0.7 → 1.0.9

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.
@@ -1,23 +1,58 @@
1
1
  import { Observable } from "rxjs";
2
+ import { Empty } from "./google/protobuf/empty";
2
3
  export declare const protobufPackage = "auth.v1";
3
- /** Syntax version */
4
- export interface RegistrationRequest {
4
+ export interface Location {
5
+ ip: string;
6
+ city: string;
7
+ country: string;
8
+ }
9
+ export interface SessionData {
10
+ userAgent: string;
11
+ device: string;
12
+ location: Location | undefined;
13
+ }
14
+ export interface User {
15
+ id: string;
16
+ email: string;
17
+ role: string;
18
+ }
19
+ export interface VerifiedUser {
20
+ userId: string;
21
+ email: string;
22
+ role: string;
23
+ }
24
+ export interface LoginRequest {
25
+ email: string;
26
+ password: string;
27
+ token: string;
28
+ sessionData: SessionData | undefined;
29
+ }
30
+ export interface LoginResponse {
31
+ message: string;
32
+ user: User | undefined;
33
+ accessToken: string;
34
+ refreshToken: string;
35
+ }
36
+ export interface RefreshTokensRequest {
37
+ token: string;
38
+ sessionData: SessionData | undefined;
39
+ }
40
+ export interface TokensResponse {
41
+ message: string;
42
+ accessToken: string;
43
+ refreshToken: string;
44
+ }
45
+ export interface LogoutRequest {
46
+ token: string;
47
+ jti: string;
48
+ }
49
+ export interface LogoutResponse {
50
+ clearRefreshCookie: boolean;
51
+ message: string;
52
+ }
53
+ export interface RegistrateRequest {
5
54
  email: string;
6
55
  userName: string;
7
- /**
8
- * bool isVerified = 4; логическое выражение
9
- * int32 age = 5; число
10
- * double rating = 6 плавающая точка
11
- * repeated string roles = 7; массив
12
- * map<string, string> meta = 8; Record
13
- * Status status = 9; Работаю enum
14
- * oneof orientation {
15
- * bool isGay =10;
16
- * bool isHeterosexual = 11;
17
- * } можно выбрать одно значение либо.либо
18
- * google.protobuf.Timestamp created_at = 12;
19
- * google.protobuf.Timestamp updated_at = 13;
20
- */
21
56
  password: string;
22
57
  }
23
58
  export interface RegistrationResponse {
@@ -25,14 +60,82 @@ export interface RegistrationResponse {
25
60
  expiresTime: number;
26
61
  message: string;
27
62
  }
63
+ export interface VerifyEmailRequest {
64
+ email: string;
65
+ confirmCode: string;
66
+ sessionData: SessionData | undefined;
67
+ }
68
+ export interface VerifyEmailResponse {
69
+ user: VerifiedUser | undefined;
70
+ accessToken: string;
71
+ refreshToken: string;
72
+ }
73
+ export interface EmailRequest {
74
+ email: string;
75
+ }
76
+ export interface ChangePasswordRequest {
77
+ userId: string;
78
+ oldPassword: string;
79
+ newPassword: string;
80
+ }
81
+ export interface GetUserSessionsRequest {
82
+ token: string;
83
+ }
84
+ export interface LogoutUserSessionRequest {
85
+ token: string;
86
+ deviceId: string;
87
+ }
88
+ export interface UserSession {
89
+ deviceId: string;
90
+ session: SessionData | undefined;
91
+ }
92
+ export interface UserSessionsResponse {
93
+ data: UserSession[];
94
+ }
95
+ export interface AdminSession {
96
+ userId: string;
97
+ deviceId: string;
98
+ session: SessionData | undefined;
99
+ }
100
+ export interface AdminSessionsResponse {
101
+ data: AdminSession[];
102
+ }
103
+ export interface LogoutUserSessionsByAdminRequest {
104
+ userId: string;
105
+ }
106
+ export interface TextMessageResponse {
107
+ message: string;
108
+ }
28
109
  export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
29
110
  export interface AuthServiceClient {
30
- /** rpc Name (Request) returns (Response); */
31
- registration(request: RegistrationRequest): Observable<RegistrationResponse>;
111
+ login(request: LoginRequest): Observable<LoginResponse>;
112
+ refreshTokens(request: RefreshTokensRequest): Observable<TokensResponse>;
113
+ logout(request: LogoutRequest): Observable<LogoutResponse>;
114
+ registrate(request: RegistrateRequest): Observable<RegistrationResponse>;
115
+ verifyEmail(request: VerifyEmailRequest): Observable<VerifyEmailResponse>;
116
+ getNewVerificationCode(request: EmailRequest): Observable<RegistrationResponse>;
117
+ changePassword(request: ChangePasswordRequest): Observable<TextMessageResponse>;
118
+ getTempPassword(request: EmailRequest): Observable<TextMessageResponse>;
119
+ getUserSessions(request: GetUserSessionsRequest): Observable<UserSessionsResponse>;
120
+ logoutUserSession(request: LogoutUserSessionRequest): Observable<TextMessageResponse>;
121
+ getAllSessionsByAdmin(request: Empty): Observable<AdminSessionsResponse>;
122
+ logoutUserSessionsByAdmin(request: LogoutUserSessionsByAdminRequest): Observable<TextMessageResponse>;
123
+ logoutAllSessionsByAdmin(request: Empty): Observable<TextMessageResponse>;
32
124
  }
33
125
  export interface AuthServiceController {
34
- /** rpc Name (Request) returns (Response); */
35
- registration(request: RegistrationRequest): Promise<RegistrationResponse> | Observable<RegistrationResponse> | RegistrationResponse;
126
+ login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
127
+ refreshTokens(request: RefreshTokensRequest): Promise<TokensResponse> | Observable<TokensResponse> | TokensResponse;
128
+ logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
129
+ registrate(request: RegistrateRequest): Promise<RegistrationResponse> | Observable<RegistrationResponse> | RegistrationResponse;
130
+ verifyEmail(request: VerifyEmailRequest): Promise<VerifyEmailResponse> | Observable<VerifyEmailResponse> | VerifyEmailResponse;
131
+ getNewVerificationCode(request: EmailRequest): Promise<RegistrationResponse> | Observable<RegistrationResponse> | RegistrationResponse;
132
+ changePassword(request: ChangePasswordRequest): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
133
+ getTempPassword(request: EmailRequest): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
134
+ getUserSessions(request: GetUserSessionsRequest): Promise<UserSessionsResponse> | Observable<UserSessionsResponse> | UserSessionsResponse;
135
+ logoutUserSession(request: LogoutUserSessionRequest): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
136
+ getAllSessionsByAdmin(request: Empty): Promise<AdminSessionsResponse> | Observable<AdminSessionsResponse> | AdminSessionsResponse;
137
+ logoutUserSessionsByAdmin(request: LogoutUserSessionsByAdminRequest): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
138
+ logoutAllSessionsByAdmin(request: Empty): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
36
139
  }
37
140
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
38
141
  export declare const AUTH_SERVICE_NAME = "AuthService";
package/dist/gen/auth.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v2.11.2
5
- // protoc v6.33.5
5
+ // protoc v7.34.0
6
6
  // source: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
@@ -13,7 +13,21 @@ exports.protobufPackage = "auth.v1";
13
13
  exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
14
14
  function AuthServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["registration"];
16
+ const grpcMethods = [
17
+ "login",
18
+ "refreshTokens",
19
+ "logout",
20
+ "registrate",
21
+ "verifyEmail",
22
+ "getNewVerificationCode",
23
+ "changePassword",
24
+ "getTempPassword",
25
+ "getUserSessions",
26
+ "logoutUserSession",
27
+ "getAllSessionsByAdmin",
28
+ "logoutUserSessionsByAdmin",
29
+ "logoutAllSessionsByAdmin",
30
+ ];
17
31
  for (const method of grpcMethods) {
18
32
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
33
  (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
@@ -2,7 +2,7 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v2.11.2
5
- // protoc v6.33.5
5
+ // protoc v7.34.0
6
6
  // source: google/protobuf/empty.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
package/gen/auth.ts CHANGED
@@ -1,34 +1,78 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.2
4
- // protoc v6.33.5
4
+ // protoc v7.34.0
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
+ import { Empty } from "./google/protobuf/empty";
10
11
 
11
12
  export const protobufPackage = "auth.v1";
12
13
 
13
- /** Syntax version */
14
+ export interface Location {
15
+ ip: string;
16
+ city: string;
17
+ country: string;
18
+ }
19
+
20
+ export interface SessionData {
21
+ userAgent: string;
22
+ device: string;
23
+ location: Location | undefined;
24
+ }
25
+
26
+ export interface User {
27
+ id: string;
28
+ email: string;
29
+ role: string;
30
+ }
31
+
32
+ export interface VerifiedUser {
33
+ userId: string;
34
+ email: string;
35
+ role: string;
36
+ }
37
+
38
+ export interface LoginRequest {
39
+ email: string;
40
+ password: string;
41
+ token: string;
42
+ sessionData: SessionData | undefined;
43
+ }
44
+
45
+ export interface LoginResponse {
46
+ message: string;
47
+ user: User | undefined;
48
+ accessToken: string;
49
+ refreshToken: string;
50
+ }
51
+
52
+ export interface RefreshTokensRequest {
53
+ token: string;
54
+ sessionData: SessionData | undefined;
55
+ }
56
+
57
+ export interface TokensResponse {
58
+ message: string;
59
+ accessToken: string;
60
+ refreshToken: string;
61
+ }
62
+
63
+ export interface LogoutRequest {
64
+ token: string;
65
+ jti: string;
66
+ }
67
+
68
+ export interface LogoutResponse {
69
+ clearRefreshCookie: boolean;
70
+ message: string;
71
+ }
14
72
 
15
- export interface RegistrationRequest {
73
+ export interface RegistrateRequest {
16
74
  email: string;
17
75
  userName: string;
18
- /**
19
- * bool isVerified = 4; логическое выражение
20
- * int32 age = 5; число
21
- * double rating = 6 плавающая точка
22
- * repeated string roles = 7; массив
23
- * map<string, string> meta = 8; Record
24
- * Status status = 9; Работаю enum
25
- * oneof orientation {
26
- * bool isGay =10;
27
- * bool isHeterosexual = 11;
28
- * } можно выбрать одно значение либо.либо
29
- * google.protobuf.Timestamp created_at = 12;
30
- * google.protobuf.Timestamp updated_at = 13;
31
- */
32
76
  password: string;
33
77
  }
34
78
 
@@ -38,25 +82,159 @@ export interface RegistrationResponse {
38
82
  message: string;
39
83
  }
40
84
 
85
+ export interface VerifyEmailRequest {
86
+ email: string;
87
+ confirmCode: string;
88
+ sessionData: SessionData | undefined;
89
+ }
90
+
91
+ export interface VerifyEmailResponse {
92
+ user: VerifiedUser | undefined;
93
+ accessToken: string;
94
+ refreshToken: string;
95
+ }
96
+
97
+ export interface EmailRequest {
98
+ email: string;
99
+ }
100
+
101
+ export interface ChangePasswordRequest {
102
+ userId: string;
103
+ oldPassword: string;
104
+ newPassword: string;
105
+ }
106
+
107
+ export interface GetUserSessionsRequest {
108
+ token: string;
109
+ }
110
+
111
+ export interface LogoutUserSessionRequest {
112
+ token: string;
113
+ deviceId: string;
114
+ }
115
+
116
+ export interface UserSession {
117
+ deviceId: string;
118
+ session: SessionData | undefined;
119
+ }
120
+
121
+ export interface UserSessionsResponse {
122
+ data: UserSession[];
123
+ }
124
+
125
+ export interface AdminSession {
126
+ userId: string;
127
+ deviceId: string;
128
+ session: SessionData | undefined;
129
+ }
130
+
131
+ export interface AdminSessionsResponse {
132
+ data: AdminSession[];
133
+ }
134
+
135
+ export interface LogoutUserSessionsByAdminRequest {
136
+ userId: string;
137
+ }
138
+
139
+ export interface TextMessageResponse {
140
+ message: string;
141
+ }
142
+
41
143
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
42
144
 
43
145
  export interface AuthServiceClient {
44
- /** rpc Name (Request) returns (Response); */
146
+ login(request: LoginRequest): Observable<LoginResponse>;
147
+
148
+ refreshTokens(request: RefreshTokensRequest): Observable<TokensResponse>;
149
+
150
+ logout(request: LogoutRequest): Observable<LogoutResponse>;
151
+
152
+ registrate(request: RegistrateRequest): Observable<RegistrationResponse>;
153
+
154
+ verifyEmail(request: VerifyEmailRequest): Observable<VerifyEmailResponse>;
45
155
 
46
- registration(request: RegistrationRequest): Observable<RegistrationResponse>;
156
+ getNewVerificationCode(request: EmailRequest): Observable<RegistrationResponse>;
157
+
158
+ changePassword(request: ChangePasswordRequest): Observable<TextMessageResponse>;
159
+
160
+ getTempPassword(request: EmailRequest): Observable<TextMessageResponse>;
161
+
162
+ getUserSessions(request: GetUserSessionsRequest): Observable<UserSessionsResponse>;
163
+
164
+ logoutUserSession(request: LogoutUserSessionRequest): Observable<TextMessageResponse>;
165
+
166
+ getAllSessionsByAdmin(request: Empty): Observable<AdminSessionsResponse>;
167
+
168
+ logoutUserSessionsByAdmin(request: LogoutUserSessionsByAdminRequest): Observable<TextMessageResponse>;
169
+
170
+ logoutAllSessionsByAdmin(request: Empty): Observable<TextMessageResponse>;
47
171
  }
48
172
 
49
173
  export interface AuthServiceController {
50
- /** rpc Name (Request) returns (Response); */
174
+ login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
175
+
176
+ refreshTokens(request: RefreshTokensRequest): Promise<TokensResponse> | Observable<TokensResponse> | TokensResponse;
51
177
 
52
- registration(
53
- request: RegistrationRequest,
178
+ logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
179
+
180
+ registrate(
181
+ request: RegistrateRequest,
54
182
  ): Promise<RegistrationResponse> | Observable<RegistrationResponse> | RegistrationResponse;
183
+
184
+ verifyEmail(
185
+ request: VerifyEmailRequest,
186
+ ): Promise<VerifyEmailResponse> | Observable<VerifyEmailResponse> | VerifyEmailResponse;
187
+
188
+ getNewVerificationCode(
189
+ request: EmailRequest,
190
+ ): Promise<RegistrationResponse> | Observable<RegistrationResponse> | RegistrationResponse;
191
+
192
+ changePassword(
193
+ request: ChangePasswordRequest,
194
+ ): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
195
+
196
+ getTempPassword(
197
+ request: EmailRequest,
198
+ ): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
199
+
200
+ getUserSessions(
201
+ request: GetUserSessionsRequest,
202
+ ): Promise<UserSessionsResponse> | Observable<UserSessionsResponse> | UserSessionsResponse;
203
+
204
+ logoutUserSession(
205
+ request: LogoutUserSessionRequest,
206
+ ): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
207
+
208
+ getAllSessionsByAdmin(
209
+ request: Empty,
210
+ ): Promise<AdminSessionsResponse> | Observable<AdminSessionsResponse> | AdminSessionsResponse;
211
+
212
+ logoutUserSessionsByAdmin(
213
+ request: LogoutUserSessionsByAdminRequest,
214
+ ): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
215
+
216
+ logoutAllSessionsByAdmin(
217
+ request: Empty,
218
+ ): Promise<TextMessageResponse> | Observable<TextMessageResponse> | TextMessageResponse;
55
219
  }
56
220
 
57
221
  export function AuthServiceControllerMethods() {
58
222
  return function (constructor: Function) {
59
- const grpcMethods: string[] = ["registration"];
223
+ const grpcMethods: string[] = [
224
+ "login",
225
+ "refreshTokens",
226
+ "logout",
227
+ "registrate",
228
+ "verifyEmail",
229
+ "getNewVerificationCode",
230
+ "changePassword",
231
+ "getTempPassword",
232
+ "getUserSessions",
233
+ "logoutUserSession",
234
+ "getAllSessionsByAdmin",
235
+ "logoutUserSessionsByAdmin",
236
+ "logoutAllSessionsByAdmin",
237
+ ];
60
238
  for (const method of grpcMethods) {
61
239
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
62
240
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.2
4
- // protoc v6.33.5
4
+ // protoc v7.34.0
5
5
  // source: google/protobuf/empty.proto
6
6
 
7
7
  /* eslint-disable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noildm/contracts",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Protobuf and RabbitMQ contracts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/proto/auth.proto CHANGED
@@ -1,49 +1,154 @@
1
- // Syntax version
2
1
  syntax = "proto3";
3
2
 
4
- // package domain.apiVersion
5
3
  package auth.v1;
6
4
 
7
- import "google/protobuf/empty.proto";//emty object
8
- import "google/protobuf/timestamp.proto";//unify timestamp object
9
- import "google/protobuf/struct.proto";//JSON
10
- import "google/protobuf/any.proto";//any message
11
- import "google/protobuf/duration.proto";//duration time
5
+ import "google/protobuf/empty.proto";
12
6
 
13
7
  service AuthService {
14
- // rpc Name (Request) returns (Response);
15
- rpc Registration(RegistrationRequest) returns (RegistrationResponse);
8
+ rpc Login(LoginRequest) returns (LoginResponse);
9
+ rpc RefreshTokens(RefreshTokensRequest) returns (TokensResponse);
10
+ rpc Logout(LogoutRequest) returns (LogoutResponse);
16
11
 
17
- //rpc Ping (google.protobuf.Empty) returns ();
12
+ rpc Registrate(RegistrateRequest) returns (RegistrationResponse);
13
+ rpc VerifyEmail(VerifyEmailRequest) returns (VerifyEmailResponse);
14
+ rpc GetNewVerificationCode(EmailRequest) returns (RegistrationResponse);
15
+
16
+ rpc ChangePassword(ChangePasswordRequest) returns (TextMessageResponse);
17
+ rpc GetTempPassword(EmailRequest) returns (TextMessageResponse);
18
+
19
+ rpc GetUserSessions(GetUserSessionsRequest) returns (UserSessionsResponse);
20
+ rpc LogoutUserSession(LogoutUserSessionRequest) returns (TextMessageResponse);
21
+
22
+ rpc GetAllSessionsByAdmin(google.protobuf.Empty) returns (AdminSessionsResponse);
23
+ rpc LogoutUserSessionsByAdmin(LogoutUserSessionsByAdminRequest) returns (TextMessageResponse);
24
+ rpc LogoutAllSessionsByAdmin(google.protobuf.Empty) returns (TextMessageResponse);
25
+ }
26
+
27
+ message Location {
28
+ string ip = 1;
29
+ string city = 2;
30
+ string country = 3;
31
+ }
32
+
33
+ message SessionData {
34
+ string user_agent = 1;
35
+ string device = 2;
36
+ Location location = 3;
18
37
  }
19
38
 
20
- message RegistrationRequest {
39
+ message User {
40
+ string id = 1;
41
+ string email = 2;
42
+ string role = 3;
43
+ }
44
+
45
+ message VerifiedUser {
46
+ string user_id = 1;
47
+ string email = 2;
48
+ string role = 3;
49
+ }
50
+
51
+ message LoginRequest {
52
+ string email = 1;
53
+ string password = 2;
54
+ string token = 3;
55
+ SessionData session_data = 4;
56
+ }
57
+
58
+ message LoginResponse {
59
+ string message = 1;
60
+ User user = 2;
61
+ string access_token = 3;
62
+ string refresh_token = 4;
63
+ }
64
+
65
+ message RefreshTokensRequest {
66
+ string token = 1;
67
+ SessionData session_data = 2;
68
+ }
69
+
70
+ message TokensResponse {
71
+ string message = 1;
72
+ string access_token = 2;
73
+ string refresh_token = 3;
74
+ }
75
+
76
+ message LogoutRequest {
77
+ string token = 1;
78
+ string jti = 2;
79
+ }
80
+
81
+ message LogoutResponse {
82
+ bool clear_refresh_cookie = 1;
83
+ string message = 2;
84
+ }
85
+
86
+ message RegistrateRequest {
21
87
  string email = 1;
22
88
  string user_name = 2;
23
89
  string password = 3;
24
- //bool isVerified = 4; логическое выражение
25
- //int32 age = 5; число
26
- //double rating = 6 плавающая точка
27
- //repeated string roles = 7; массив
28
- //map<string, string> meta = 8; Record
29
- //Status status = 9; Работаю enum
30
- //oneof orientation {
31
- //bool isGay =10;
32
- //bool isHeterosexual = 11;
33
- //} можно выбрать одно значение либо.либо
34
- //google.protobuf.Timestamp created_at = 12;
35
- //google.protobuf.Timestamp updated_at = 13;
36
- }
37
-
38
- // enum Status {
39
- // ACTIVE = 0; //Default value
40
- // BANNED = 1;
41
- // DELETED=2;
42
- // }
43
-
90
+ }
44
91
 
45
92
  message RegistrationResponse {
46
93
  string email = 1;
47
- int32 expires_time = 2;
94
+ int64 expires_time = 2;
48
95
  string message = 3;
49
- }
96
+ }
97
+
98
+ message VerifyEmailRequest {
99
+ string email = 1;
100
+ string confirm_code = 2;
101
+ SessionData session_data = 3;
102
+ }
103
+
104
+ message VerifyEmailResponse {
105
+ VerifiedUser user = 1;
106
+ string access_token = 2;
107
+ string refresh_token = 3;
108
+ }
109
+
110
+ message EmailRequest {
111
+ string email = 1;
112
+ }
113
+
114
+ message ChangePasswordRequest {
115
+ string user_id = 1;
116
+ string old_password = 2;
117
+ string new_password = 3;
118
+ }
119
+
120
+ message GetUserSessionsRequest {
121
+ string token = 1;
122
+ }
123
+
124
+ message LogoutUserSessionRequest {
125
+ string token = 1;
126
+ string device_id = 2;
127
+ }
128
+
129
+ message UserSession {
130
+ string device_id = 1;
131
+ SessionData session = 2;
132
+ }
133
+
134
+ message UserSessionsResponse {
135
+ repeated UserSession data = 1;
136
+ }
137
+
138
+ message AdminSession {
139
+ string user_id = 1;
140
+ string device_id = 2;
141
+ SessionData session = 3;
142
+ }
143
+
144
+ message AdminSessionsResponse {
145
+ repeated AdminSession data = 1;
146
+ }
147
+
148
+ message LogoutUserSessionsByAdminRequest {
149
+ string user_id = 1;
150
+ }
151
+
152
+ message TextMessageResponse {
153
+ string message = 1;
154
+ }