@dkcinema/contracts 1.0.10 → 1.0.11
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 +7 -5
- package/package.json +1 -1
- package/protos/auth.proto +3 -3
package/output/auth.ts
CHANGED
|
@@ -37,11 +37,11 @@ export interface SendOtpResponse {
|
|
|
37
37
|
ok: boolean;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export interface
|
|
40
|
+
export interface LoginByEmailRequest {
|
|
41
41
|
email: string;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export interface
|
|
44
|
+
export interface LoginByEmailResponse {
|
|
45
45
|
accessToken: string;
|
|
46
46
|
refreshToken: string;
|
|
47
47
|
}
|
|
@@ -57,7 +57,7 @@ export interface AuthServiceClient {
|
|
|
57
57
|
|
|
58
58
|
verifyPhoneOtp(request: VerifyPhoneOtpRequest): Observable<VerifyOtpResponse>;
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
loginByEmail(request: LoginByEmailRequest): Observable<LoginByEmailResponse>;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export interface AuthServiceController {
|
|
@@ -73,12 +73,14 @@ export interface AuthServiceController {
|
|
|
73
73
|
request: VerifyPhoneOtpRequest,
|
|
74
74
|
): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
loginByEmail(
|
|
77
|
+
request: LoginByEmailRequest,
|
|
78
|
+
): Promise<LoginByEmailResponse> | Observable<LoginByEmailResponse> | LoginByEmailResponse;
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
export function AuthServiceControllerMethods() {
|
|
80
82
|
return function (constructor: Function) {
|
|
81
|
-
const grpcMethods: string[] = ["sendEmailOtp", "sendPhoneOtp", "verifyEmailOtp", "verifyPhoneOtp", "
|
|
83
|
+
const grpcMethods: string[] = ["sendEmailOtp", "sendPhoneOtp", "verifyEmailOtp", "verifyPhoneOtp", "loginByEmail"];
|
|
82
84
|
for (const method of grpcMethods) {
|
|
83
85
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
84
86
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/protos/auth.proto
CHANGED
|
@@ -9,7 +9,7 @@ service AuthService {
|
|
|
9
9
|
rpc VerifyEmailOtp(VerifyEmailOtpRequest) returns (VerifyOtpResponse);
|
|
10
10
|
rpc VerifyPhoneOtp(VerifyPhoneOtpRequest) returns (VerifyOtpResponse);
|
|
11
11
|
|
|
12
|
-
rpc
|
|
12
|
+
rpc LoginByEmail (LoginByEmailRequest) returns (LoginByEmailResponse);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
message VerifyEmailOtpRequest {
|
|
@@ -39,11 +39,11 @@ message SendOtpResponse {
|
|
|
39
39
|
bool ok = 1;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
message
|
|
42
|
+
message LoginByEmailRequest {
|
|
43
43
|
string email = 1;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
message
|
|
46
|
+
message LoginByEmailResponse {
|
|
47
47
|
string access_token = 1;
|
|
48
48
|
string refresh_token = 2;
|
|
49
49
|
}
|