@platfformx/proto-contracts 1.2.5 → 1.2.6

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.
@@ -13,7 +13,7 @@ export declare enum Role {
13
13
  ADMIN = 1,
14
14
  UNRECOGNIZED = -1
15
15
  }
16
- /** FindByEmail and updateEmauil for users profile */
16
+ /** FindByEmail and updateEmail for users profile */
17
17
  export interface FindByEmailRequest {
18
18
  email: string;
19
19
  }
@@ -27,6 +27,20 @@ export interface UpdateEmailRequest {
27
27
  export interface UpdateEmailResponse {
28
28
  ok: boolean;
29
29
  }
30
+ /** FindByPhone and updatePhone for users profile */
31
+ export interface FindByPhoneRequest {
32
+ phone: string;
33
+ }
34
+ export interface FindByPhoneResponse {
35
+ exists: boolean;
36
+ }
37
+ export interface UpdatePhoneRequest {
38
+ userId: string;
39
+ newPhone: string;
40
+ }
41
+ export interface UpdatePhoneResponse {
42
+ ok: boolean;
43
+ }
30
44
  /** Get auth account data */
31
45
  export interface GetAuthAccountRequest {
32
46
  userId: string;
@@ -165,6 +179,8 @@ export interface AuthServiceClient {
165
179
  addIdentifier(request: AddIdentifierRequest): Observable<AddIdentifierResponse>;
166
180
  findByEmail(request: FindByEmailRequest): Observable<FindByEmailResponse>;
167
181
  updateEmail(request: UpdateEmailRequest): Observable<UpdateEmailResponse>;
182
+ findByPhone(request: FindByPhoneRequest): Observable<FindByPhoneResponse>;
183
+ updatePhone(request: UpdatePhoneRequest): Observable<UpdatePhoneResponse>;
168
184
  }
169
185
  export interface AuthServiceController {
170
186
  createAccount(request: CreateAccountRequest): Promise<CreateAccountResponse> | Observable<CreateAccountResponse> | CreateAccountResponse;
@@ -182,6 +198,8 @@ export interface AuthServiceController {
182
198
  addIdentifier(request: AddIdentifierRequest): Promise<AddIdentifierResponse> | Observable<AddIdentifierResponse> | AddIdentifierResponse;
183
199
  findByEmail(request: FindByEmailRequest): Promise<FindByEmailResponse> | Observable<FindByEmailResponse> | FindByEmailResponse;
184
200
  updateEmail(request: UpdateEmailRequest): Promise<UpdateEmailResponse> | Observable<UpdateEmailResponse> | UpdateEmailResponse;
201
+ findByPhone(request: FindByPhoneRequest): Promise<FindByPhoneResponse> | Observable<FindByPhoneResponse> | FindByPhoneResponse;
202
+ updatePhone(request: UpdatePhoneRequest): Promise<UpdatePhoneResponse> | Observable<UpdatePhoneResponse> | UpdatePhoneResponse;
185
203
  }
186
204
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
187
205
  export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -44,6 +44,8 @@ function AuthServiceControllerMethods() {
44
44
  "addIdentifier",
45
45
  "findByEmail",
46
46
  "updateEmail",
47
+ "findByPhone",
48
+ "updatePhone",
47
49
  ];
48
50
  for (const method of grpcMethods) {
49
51
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,10 +25,13 @@ service AuthService {
25
25
  rpc FindByEmail(FindByEmailRequest) returns (FindByEmailResponse);
26
26
  rpc UpdateEmail(UpdateEmailRequest) returns (UpdateEmailResponse);
27
27
 
28
+ rpc FindByPhone(FindByPhoneRequest) returns (FindByPhoneResponse);
29
+ rpc UpdatePhone(UpdatePhoneRequest) returns (UpdatePhoneResponse);
30
+
28
31
  }
29
32
 
30
33
 
31
- // FindByEmail and updateEmauil for users profile
34
+ // FindByEmail and updateEmail for users profile
32
35
  message FindByEmailRequest {
33
36
  string email = 1;
34
37
  }
@@ -42,6 +45,20 @@ message UpdateEmailRequest {
42
45
  message UpdateEmailResponse {
43
46
  bool ok = 1;
44
47
  }
48
+ // FindByPhone and updatePhone for users profile
49
+ message FindByPhoneRequest {
50
+ string phone = 1;
51
+ }
52
+ message FindByPhoneResponse {
53
+ bool exists = 1;
54
+ }
55
+ message UpdatePhoneRequest {
56
+ string user_id = 1;
57
+ string new_phone = 2;
58
+ }
59
+ message UpdatePhoneResponse {
60
+ bool ok = 1;
61
+ }
45
62
 
46
63
 
47
64
  // Get auth account data