@artemscinemaservice/contracts 1.0.2 → 2.0.0
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 +21 -2
- package/package.json +1 -1
- package/proto/auth.proto +13 -0
package/gen/auth.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.6
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: auth.proto
|
|
6
6
|
|
|
@@ -19,6 +19,17 @@ export interface SendOtpResponse {
|
|
|
19
19
|
success: boolean;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
export interface VerifyOtpRequest {
|
|
23
|
+
identifier: string;
|
|
24
|
+
type: string;
|
|
25
|
+
code: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface VerifyOtpResponse {
|
|
29
|
+
accessToken: string;
|
|
30
|
+
refreshToken: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
23
34
|
|
|
24
35
|
/** Auth service */
|
|
@@ -27,6 +38,10 @@ export interface AuthServiceClient {
|
|
|
27
38
|
/** send otp to a user by identifier */
|
|
28
39
|
|
|
29
40
|
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
|
|
41
|
+
|
|
42
|
+
/** verifying otp token and return access and refresh tokens */
|
|
43
|
+
|
|
44
|
+
verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
|
|
30
45
|
}
|
|
31
46
|
|
|
32
47
|
/** Auth service */
|
|
@@ -35,11 +50,15 @@ export interface AuthServiceController {
|
|
|
35
50
|
/** send otp to a user by identifier */
|
|
36
51
|
|
|
37
52
|
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
|
|
53
|
+
|
|
54
|
+
/** verifying otp token and return access and refresh tokens */
|
|
55
|
+
|
|
56
|
+
verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
|
|
38
57
|
}
|
|
39
58
|
|
|
40
59
|
export function AuthServiceControllerMethods() {
|
|
41
60
|
return function (constructor: Function) {
|
|
42
|
-
const grpcMethods: string[] = ["sendOtp"];
|
|
61
|
+
const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
|
|
43
62
|
for (const method of grpcMethods) {
|
|
44
63
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
45
64
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -6,6 +6,8 @@ package auth.v1;
|
|
|
6
6
|
service AuthService {
|
|
7
7
|
//send otp to a user by identifier
|
|
8
8
|
rpc SendOtp(SendOtpRequest) returns (SendOtpResponse);
|
|
9
|
+
//verifying otp token and return access and refresh tokens
|
|
10
|
+
rpc VerifyOtp(VerifyOtpRequest) returns(VerifyOtpResponse);
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
message SendOtpRequest {
|
|
@@ -15,4 +17,15 @@ message SendOtpRequest {
|
|
|
15
17
|
|
|
16
18
|
message SendOtpResponse {
|
|
17
19
|
bool success = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message VerifyOtpRequest {
|
|
23
|
+
string identifier = 1;
|
|
24
|
+
string type = 2;
|
|
25
|
+
string code =3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message VerifyOtpResponse {
|
|
29
|
+
string access_token = 1;
|
|
30
|
+
string refresh_token = 2;
|
|
18
31
|
}
|