@dkcinema/contracts 1.0.14 → 1.0.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/output/auth.ts CHANGED
@@ -10,6 +10,15 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
+ export interface RefreshRequest {
14
+ refreshToken: string;
15
+ }
16
+
17
+ export interface RefreshResponse {
18
+ accessToken: string;
19
+ refreshToken: string;
20
+ }
21
+
13
22
  export interface GetUserRequest {
14
23
  userId: string;
15
24
  }
@@ -69,6 +78,8 @@ export interface AuthServiceClient {
69
78
 
70
79
  loginByEmail(request: LoginByEmailRequest): Observable<LoginByEmailResponse>;
71
80
 
81
+ refresh(request: RefreshRequest): Observable<RefreshResponse>;
82
+
72
83
  getUser(request: GetUserRequest): Observable<GetUserResponse>;
73
84
  }
74
85
 
@@ -89,6 +100,8 @@ export interface AuthServiceController {
89
100
  request: LoginByEmailRequest,
90
101
  ): Promise<LoginByEmailResponse> | Observable<LoginByEmailResponse> | LoginByEmailResponse;
91
102
 
103
+ refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
104
+
92
105
  getUser(request: GetUserRequest): Promise<GetUserResponse> | Observable<GetUserResponse> | GetUserResponse;
93
106
  }
94
107
 
@@ -100,6 +113,7 @@ export function AuthServiceControllerMethods() {
100
113
  "verifyEmailOtp",
101
114
  "verifyPhoneOtp",
102
115
  "loginByEmail",
116
+ "refresh",
103
117
  "getUser",
104
118
  ];
105
119
  for (const method of grpcMethods) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dkcinema/contracts",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/protos/auth.proto CHANGED
@@ -10,15 +10,26 @@ service AuthService {
10
10
  rpc VerifyPhoneOtp(VerifyPhoneOtpRequest) returns (VerifyOtpResponse);
11
11
 
12
12
  rpc LoginByEmail (LoginByEmailRequest) returns (LoginByEmailResponse);
13
+ rpc Refresh (RefreshRequest) returns (RefreshResponse);
14
+
13
15
  rpc GetUser (GetUserRequest) returns (GetUserResponse);
14
16
  }
15
17
 
18
+ message RefreshRequest {
19
+ string refresh_token = 1;
20
+ }
21
+
22
+ message RefreshResponse {
23
+ string access_token = 1;
24
+ string refresh_token = 2;
25
+ }
26
+
16
27
  message GetUserRequest {
17
28
  string user_id = 1;
18
29
  }
19
30
 
20
31
  message GetUserResponse {
21
- string id = 1;
32
+ string id = 1;
22
33
 
23
34
  oneof contact {
24
35
  string email = 2;