@platfformx/proto-contracts 1.1.6 → 1.1.8

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;
@@ -60,7 +74,6 @@ export interface OAuthSessionResponse {
60
74
  /** Logout */
61
75
  export interface LogoutRequest {
62
76
  userId: string;
63
- accessToken: string;
64
77
  }
65
78
  export interface LogoutResponse {
66
79
  success: boolean;
@@ -145,6 +158,8 @@ export interface AuthServiceClient {
145
158
  resetPassword(request: ResetPasswordRequest): Observable<ResetPasswordResponse>;
146
159
  forgotPassword(request: ForgotPasswordRequest): Observable<ForgotPasswordResponse>;
147
160
  addIdentifier(request: AddIdentifierRequest): Observable<AddIdentifierResponse>;
161
+ findByEmail(request: FindByEmailRequest): Observable<FindByEmailResponse>;
162
+ updateEmail(request: UpdateEmailRequest): Observable<UpdateEmailResponse>;
148
163
  }
149
164
  export interface AuthServiceController {
150
165
  createAccount(request: CreateAccountRequest): Promise<CreateAccountResponse> | Observable<CreateAccountResponse> | CreateAccountResponse;
@@ -158,6 +173,8 @@ export interface AuthServiceController {
158
173
  resetPassword(request: ResetPasswordRequest): Promise<ResetPasswordResponse> | Observable<ResetPasswordResponse> | ResetPasswordResponse;
159
174
  forgotPassword(request: ForgotPasswordRequest): Promise<ForgotPasswordResponse> | Observable<ForgotPasswordResponse> | ForgotPasswordResponse;
160
175
  addIdentifier(request: AddIdentifierRequest): Promise<AddIdentifierResponse> | Observable<AddIdentifierResponse> | AddIdentifierResponse;
176
+ findByEmail(request: FindByEmailRequest): Promise<FindByEmailResponse> | Observable<FindByEmailResponse> | FindByEmailResponse;
177
+ updateEmail(request: UpdateEmailRequest): Promise<UpdateEmailResponse> | Observable<UpdateEmailResponse> | UpdateEmailResponse;
161
178
  }
162
179
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
163
180
  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.8",
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
 
@@ -78,7 +97,6 @@ message OAuthSessionResponse {
78
97
  // Logout
79
98
  message LogoutRequest {
80
99
  string user_id = 1;
81
- string access_token = 2;
82
100
  }
83
101
 
84
102
  message LogoutResponse {