@platfformx/proto-contracts 1.2.5 → 1.2.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.
|
@@ -13,7 +13,7 @@ export declare enum Role {
|
|
|
13
13
|
ADMIN = 1,
|
|
14
14
|
UNRECOGNIZED = -1
|
|
15
15
|
}
|
|
16
|
-
/** FindByEmail and
|
|
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);
|
|
@@ -16,7 +16,7 @@ export interface InitEmailChangeRequest {
|
|
|
16
16
|
email: string;
|
|
17
17
|
}
|
|
18
18
|
export interface InitEmailChangeResponse {
|
|
19
|
-
|
|
19
|
+
ok: boolean;
|
|
20
20
|
}
|
|
21
21
|
export interface ConfirmEmailChangeRequest {
|
|
22
22
|
userId: string;
|
|
@@ -31,7 +31,7 @@ export interface InitPhoneChangeRequest {
|
|
|
31
31
|
phone: string;
|
|
32
32
|
}
|
|
33
33
|
export interface InitPhoneChangeResponse {
|
|
34
|
-
|
|
34
|
+
ok: boolean;
|
|
35
35
|
}
|
|
36
36
|
export interface ConfirmPhoneChangeRequest {
|
|
37
37
|
userId: string;
|
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|
@@ -32,7 +32,7 @@ message InitEmailChangeRequest {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
message InitEmailChangeResponse {
|
|
35
|
-
|
|
35
|
+
bool ok = 1;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
message ConfirmEmailChangeRequest {
|
|
@@ -51,7 +51,7 @@ message InitPhoneChangeRequest {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
message InitPhoneChangeResponse {
|
|
54
|
-
|
|
54
|
+
bool ok = 1;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
message ConfirmPhoneChangeRequest {
|