@platfformx/proto-contracts 1.1.6 → 1.1.7

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.
@@ -12,6 +12,20 @@ export declare enum Role {
12
12
  ADMIN = 1,
13
13
  UNRECOGNIZED = -1
14
14
  }
15
+ /** FindByEmail and updateEmauil for users profile */
16
+ export interface FindByEmailRequest {
17
+ email: string;
18
+ }
19
+ export interface FindByEmailResponse {
20
+ exists: boolean;
21
+ }
22
+ export interface UpdateEmailRequest {
23
+ userId: string;
24
+ newEmail: string;
25
+ }
26
+ export interface UpdateEmailResponse {
27
+ ok: boolean;
28
+ }
15
29
  /** Get auth account data */
16
30
  export interface GetAuthAccountRequest {
17
31
  userId: string;
@@ -145,6 +159,8 @@ export interface AuthServiceClient {
145
159
  resetPassword(request: ResetPasswordRequest): Observable<ResetPasswordResponse>;
146
160
  forgotPassword(request: ForgotPasswordRequest): Observable<ForgotPasswordResponse>;
147
161
  addIdentifier(request: AddIdentifierRequest): Observable<AddIdentifierResponse>;
162
+ findByEmail(request: FindByEmailRequest): Observable<FindByEmailResponse>;
163
+ updateEmail(request: UpdateEmailRequest): Observable<UpdateEmailResponse>;
148
164
  }
149
165
  export interface AuthServiceController {
150
166
  createAccount(request: CreateAccountRequest): Promise<CreateAccountResponse> | Observable<CreateAccountResponse> | CreateAccountResponse;
@@ -158,6 +174,8 @@ export interface AuthServiceController {
158
174
  resetPassword(request: ResetPasswordRequest): Promise<ResetPasswordResponse> | Observable<ResetPasswordResponse> | ResetPasswordResponse;
159
175
  forgotPassword(request: ForgotPasswordRequest): Promise<ForgotPasswordResponse> | Observable<ForgotPasswordResponse> | ForgotPasswordResponse;
160
176
  addIdentifier(request: AddIdentifierRequest): Promise<AddIdentifierResponse> | Observable<AddIdentifierResponse> | AddIdentifierResponse;
177
+ findByEmail(request: FindByEmailRequest): Promise<FindByEmailResponse> | Observable<FindByEmailResponse> | FindByEmailResponse;
178
+ updateEmail(request: UpdateEmailRequest): Promise<UpdateEmailResponse> | Observable<UpdateEmailResponse> | UpdateEmailResponse;
161
179
  }
162
180
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
163
181
  export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -39,6 +39,8 @@ function AuthServiceControllerMethods() {
39
39
  "resetPassword",
40
40
  "forgotPassword",
41
41
  "addIdentifier",
42
+ "findByEmail",
43
+ "updateEmail",
42
44
  ];
43
45
  for (const method of grpcMethods) {
44
46
  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.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,6 +19,25 @@ service AuthService {
19
19
 
20
20
  rpc AddIdentifier (AddIdentifierRequest) returns (AddIdentifierResponse);
21
21
 
22
+ rpc FindByEmail(FindByEmailRequest) returns (FindByEmailResponse);
23
+ rpc UpdateEmail(UpdateEmailRequest) returns (UpdateEmailResponse);
24
+
25
+ }
26
+
27
+
28
+ // FindByEmail and updateEmauil for users profile
29
+ message FindByEmailRequest {
30
+ string email = 1;
31
+ }
32
+ message FindByEmailResponse {
33
+ bool exists = 1;
34
+ }
35
+ message UpdateEmailRequest {
36
+ string user_id = 1;
37
+ string new_email = 2;
38
+ }
39
+ message UpdateEmailResponse {
40
+ bool ok = 1;
22
41
  }
23
42
 
24
43