@cas-cinema/contracts 1.0.8 → 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.
package/gen/auth.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.2
3
+ // protoc-gen-ts_proto v2.11.0
4
+ // protoc v6.33.4
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
@@ -34,6 +34,17 @@ export interface VerifyOtpResponse {
34
34
  refreshToken: string;
35
35
  }
36
36
 
37
+ /** Запрос на рефреш access-токена */
38
+ export interface RefreshRequest {
39
+ refreshToken: string;
40
+ }
41
+
42
+ /** Ответ на рефреш запрос */
43
+ export interface RefreshResponse {
44
+ accessToken: string;
45
+ refreshToken: string;
46
+ }
47
+
37
48
  export const AUTH_PACKAGE_NAME = "auth";
38
49
 
39
50
  /** Сервис аутентификации пользователей */
@@ -46,6 +57,10 @@ export interface AuthServiceClient {
46
57
  /** Верификация otp-пароля */
47
58
 
48
59
  verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
60
+
61
+ /** Рефреш access-токена */
62
+
63
+ refresh(request: RefreshRequest): Observable<RefreshResponse>;
49
64
  }
50
65
 
51
66
  /** Сервис аутентификации пользователей */
@@ -58,11 +73,15 @@ export interface AuthServiceController {
58
73
  /** Верификация otp-пароля */
59
74
 
60
75
  verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
76
+
77
+ /** Рефреш access-токена */
78
+
79
+ refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
61
80
  }
62
81
 
63
82
  export function AuthServiceControllerMethods() {
64
83
  return function (constructor: Function) {
65
- const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
84
+ const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh"];
66
85
  for (const method of grpcMethods) {
67
86
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
68
87
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cas-cinema/contracts",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Protobuf definition and generated TS types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/auth.proto CHANGED
@@ -5,15 +5,17 @@ package auth;
5
5
  // Сервис аутентификации пользователей
6
6
  service AuthService {
7
7
  // Отправка одноразового пароля на телефон/email
8
- rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
8
+ rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
9
9
  // Верификация otp-пароля
10
10
  rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
11
+ // Рефреш access-токена
12
+ rpc Refresh (RefreshRequest) returns (RefreshResponse);
11
13
  }
12
14
 
13
15
  /// Запрос на отправку одноразового пароля
14
16
  message SendOtpRequest {
15
17
  string identifier = 1;
16
- string type = 2;
18
+ string type = 2;
17
19
  }
18
20
 
19
21
  // Ответ на отправку OTP
@@ -24,12 +26,23 @@ message SendOtpResponse {
24
26
  // Запрос на верификацию otp-пароля
25
27
  message VerifyOtpRequest {
26
28
  string identifier = 1;
27
- string type = 2;
28
- string code = 3;
29
+ string type = 2;
30
+ string code = 3;
29
31
  }
30
32
 
31
33
  // Ответ верификации otp-пароля
32
34
  message VerifyOtpResponse {
33
- string access_token = 1;
35
+ string access_token = 1;
36
+ string refresh_token = 2;
37
+ }
38
+
39
+ // Запрос на рефреш access-токена
40
+ message RefreshRequest {
41
+ string refresh_token = 1;
42
+ }
43
+
44
+ // Ответ на рефреш запрос
45
+ message RefreshResponse {
46
+ string access_token = 1;
34
47
  string refresh_token = 2;
35
48
  }