@dkcinema/contracts 1.0.13 → 1.0.14

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,14 +10,14 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
- export interface UserRequest {
13
+ export interface GetUserRequest {
14
14
  userId: string;
15
15
  }
16
16
 
17
- export interface UserResponse {
17
+ export interface GetUserResponse {
18
18
  id: string;
19
- name: string;
20
- email: string;
19
+ email?: string | undefined;
20
+ phone?: string | undefined;
21
21
  }
22
22
 
23
23
  export interface VerifyEmailOtpRequest {
@@ -69,7 +69,7 @@ export interface AuthServiceClient {
69
69
 
70
70
  loginByEmail(request: LoginByEmailRequest): Observable<LoginByEmailResponse>;
71
71
 
72
- getUser(request: UserRequest): Observable<UserResponse>;
72
+ getUser(request: GetUserRequest): Observable<GetUserResponse>;
73
73
  }
74
74
 
75
75
  export interface AuthServiceController {
@@ -89,7 +89,7 @@ export interface AuthServiceController {
89
89
  request: LoginByEmailRequest,
90
90
  ): Promise<LoginByEmailResponse> | Observable<LoginByEmailResponse> | LoginByEmailResponse;
91
91
 
92
- getUser(request: UserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
92
+ getUser(request: GetUserRequest): Promise<GetUserResponse> | Observable<GetUserResponse> | GetUserResponse;
93
93
  }
94
94
 
95
95
  export function AuthServiceControllerMethods() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dkcinema/contracts",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/protos/auth.proto CHANGED
@@ -10,19 +10,21 @@ service AuthService {
10
10
  rpc VerifyPhoneOtp(VerifyPhoneOtpRequest) returns (VerifyOtpResponse);
11
11
 
12
12
  rpc LoginByEmail (LoginByEmailRequest) returns (LoginByEmailResponse);
13
- rpc GetUser (UserRequest) returns (UserResponse);
13
+ rpc GetUser (GetUserRequest) returns (GetUserResponse);
14
14
  }
15
15
 
16
- message UserRequest {
16
+ message GetUserRequest {
17
17
  string user_id = 1;
18
18
  }
19
19
 
20
- message UserResponse {
21
- string id = 1;
22
- string name = 2;
23
- string email = 3;
20
+ message GetUserResponse {
21
+ string id = 1;
22
+
23
+ oneof contact {
24
+ string email = 2;
25
+ string phone = 3;
26
+ }
24
27
  }
25
-
26
28
  message VerifyEmailOtpRequest {
27
29
  string code = 1;
28
30
  string email = 2;