@dkcinema/contracts 1.0.9 → 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/output/auth.ts CHANGED
@@ -37,22 +37,33 @@ export interface SendOtpResponse {
37
37
  ok: boolean;
38
38
  }
39
39
 
40
+ export interface LoginRequest {
41
+ email: string;
42
+ }
43
+
44
+ export interface LoginResponse {
45
+ accessToken: string;
46
+ refreshToken: string;
47
+ }
48
+
40
49
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
41
50
 
42
51
  export interface AuthServiceClient {
43
- sandEmailOtp(request: SendEmailOtpRequest): Observable<SendOtpResponse>;
52
+ sendEmailOtp(request: SendEmailOtpRequest): Observable<SendOtpResponse>;
44
53
 
45
- sandPhoneOtp(request: SendPhoneOtpRequest): Observable<SendOtpResponse>;
54
+ sendPhoneOtp(request: SendPhoneOtpRequest): Observable<SendOtpResponse>;
46
55
 
47
56
  verifyEmailOtp(request: VerifyEmailOtpRequest): Observable<VerifyOtpResponse>;
48
57
 
49
58
  verifyPhoneOtp(request: VerifyPhoneOtpRequest): Observable<VerifyOtpResponse>;
59
+
60
+ login(request: LoginRequest): Observable<LoginResponse>;
50
61
  }
51
62
 
52
63
  export interface AuthServiceController {
53
- sandEmailOtp(request: SendEmailOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
64
+ sendEmailOtp(request: SendEmailOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
54
65
 
55
- sandPhoneOtp(request: SendPhoneOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
66
+ sendPhoneOtp(request: SendPhoneOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
56
67
 
57
68
  verifyEmailOtp(
58
69
  request: VerifyEmailOtpRequest,
@@ -61,11 +72,13 @@ export interface AuthServiceController {
61
72
  verifyPhoneOtp(
62
73
  request: VerifyPhoneOtpRequest,
63
74
  ): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
75
+
76
+ login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
64
77
  }
65
78
 
66
79
  export function AuthServiceControllerMethods() {
67
80
  return function (constructor: Function) {
68
- const grpcMethods: string[] = ["sandEmailOtp", "sandPhoneOtp", "verifyEmailOtp", "verifyPhoneOtp"];
81
+ const grpcMethods: string[] = ["sendEmailOtp", "sendPhoneOtp", "verifyEmailOtp", "verifyPhoneOtp", "login"];
69
82
  for (const method of grpcMethods) {
70
83
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
71
84
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dkcinema/contracts",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/protos/auth.proto CHANGED
@@ -3,12 +3,13 @@ syntax = "proto3";
3
3
  package auth.v1;
4
4
 
5
5
  service AuthService {
6
- rpc SandEmailOtp (SendEmailOtpRequest) returns (SendOtpResponse);
7
- rpc SandPhoneOtp (SendPhoneOtpRequest) returns (SendOtpResponse);
6
+ rpc SendEmailOtp (SendEmailOtpRequest) returns (SendOtpResponse);
7
+ rpc SendPhoneOtp (SendPhoneOtpRequest) returns (SendOtpResponse);
8
8
 
9
9
  rpc VerifyEmailOtp(VerifyEmailOtpRequest) returns (VerifyOtpResponse);
10
10
  rpc VerifyPhoneOtp(VerifyPhoneOtpRequest) returns (VerifyOtpResponse);
11
11
 
12
+ rpc Login (LoginRequest) returns (LoginResponse);
12
13
  }
13
14
 
14
15
  message VerifyEmailOtpRequest {
@@ -36,4 +37,13 @@ message SendPhoneOtpRequest {
36
37
 
37
38
  message SendOtpResponse {
38
39
  bool ok = 1;
39
- }
40
+ }
41
+
42
+ message LoginRequest {
43
+ string email = 1;
44
+ }
45
+
46
+ message LoginResponse {
47
+ string access_token = 1;
48
+ string refresh_token = 2;
49
+ }