@booking-guvanch/contracts 1.0.8 → 1.0.10
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 +16 -1
- package/package.json +1 -1
- package/proto/auth.proto +9 -0
package/gen/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 RefreshTokenRequest {
|
|
14
|
+
refreshToken: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface RefreshTokenResponse {
|
|
18
|
+
accessToken: string;
|
|
19
|
+
refreshToken: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
export interface VerifyOtpRequest {
|
|
14
23
|
identifier: string;
|
|
15
24
|
type: string;
|
|
@@ -36,17 +45,23 @@ export interface AuthServiceClient {
|
|
|
36
45
|
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
|
|
37
46
|
|
|
38
47
|
verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
|
|
48
|
+
|
|
49
|
+
refreshToken(request: RefreshTokenRequest): Observable<RefreshTokenResponse>;
|
|
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
|
+
refreshToken(
|
|
58
|
+
request: RefreshTokenRequest,
|
|
59
|
+
): Promise<RefreshTokenResponse> | Observable<RefreshTokenResponse> | RefreshTokenResponse;
|
|
45
60
|
}
|
|
46
61
|
|
|
47
62
|
export function AuthServiceControllerMethods() {
|
|
48
63
|
return function (constructor: Function) {
|
|
49
|
-
const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
|
|
64
|
+
const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refreshToken"];
|
|
50
65
|
for (const method of grpcMethods) {
|
|
51
66
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
52
67
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -5,7 +5,16 @@ package auth.v1;
|
|
|
5
5
|
service AuthService {
|
|
6
6
|
rpc SendOtp(SendOtpRequest) returns (SendOtpResponse);
|
|
7
7
|
rpc VerifyOtp(VerifyOtpRequest) returns (VerifyOtpResponse);
|
|
8
|
+
rpc RefreshToken(RefreshTokenRequest) returns (RefreshTokenResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message RefreshTokenRequest {
|
|
12
|
+
string refresh_token = 1;
|
|
13
|
+
}
|
|
8
14
|
|
|
15
|
+
message RefreshTokenResponse {
|
|
16
|
+
string access_token = 1;
|
|
17
|
+
string refresh_token = 2;
|
|
9
18
|
}
|
|
10
19
|
|
|
11
20
|
message VerifyOtpRequest {
|