@ren4elcinema/contracts 1.0.4 → 1.0.6

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
@@ -26,7 +26,16 @@ export interface VerifyOtpRequest {
26
26
  }
27
27
 
28
28
  export interface VerifyOtpResponse {
29
- accesToken: string;
29
+ accessToken: string;
30
+ refreshToken: string;
31
+ }
32
+
33
+ export interface RefreshRequest {
34
+ refreshTocken: string;
35
+ }
36
+
37
+ export interface RefreshResponse {
38
+ accessToken: string;
30
39
  refreshToken: string;
31
40
  }
32
41
 
@@ -36,17 +45,21 @@ export interface AuthServiceClient {
36
45
  sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
37
46
 
38
47
  verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
48
+
49
+ refresh(request: RefreshRequest): Observable<RefreshResponse>;
39
50
  }
40
51
 
41
52
  export interface AuthServiceController {
42
53
  sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
43
54
 
44
55
  verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
56
+
57
+ refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
45
58
  }
46
59
 
47
60
  export function AuthServiceControllerMethods() {
48
61
  return function (constructor: Function) {
49
- const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
62
+ const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh"];
50
63
  for (const method of grpcMethods) {
51
64
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
52
65
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ren4elcinema/contracts",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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
@@ -6,6 +6,7 @@ package auth.v1;
6
6
  service AuthService {
7
7
  rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
8
8
  rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
9
+ rpc Refresh (RefreshRequest) returns (RefreshResponse);
9
10
  }
10
11
 
11
12
  message SendOtpRequest {
@@ -24,6 +25,15 @@ message VerifyOtpRequest {
24
25
  }
25
26
 
26
27
  message VerifyOtpResponse {
27
- string acces_token = 1;
28
+ string access_token = 1;
29
+ string refresh_token = 2;
30
+ }
31
+
32
+ message RefreshRequest {
33
+ string refresh_tocken = 1;
34
+ }
35
+
36
+ message RefreshResponse {
37
+ string access_token = 1;
28
38
  string refresh_token = 2;
29
39
  }