63 lines
1.3 KiB
Protocol Buffer
63 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package account.v1;
|
|
|
|
service AccountService {
|
|
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);
|
|
rpc InitEmailChange(InitEmailChangeRequest) returns (InitEmailChangeResponse);
|
|
rpc ConfirmEmailChange(ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
|
|
rpc InitPhoneChange(InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
|
|
rpc ConfirmPhoneChange(ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
|
|
}
|
|
|
|
message GetAccountRequest {
|
|
string id = 1;
|
|
}
|
|
message GetAccountResponse {
|
|
string id = 1;
|
|
string phone = 2;
|
|
string email = 3;
|
|
bool is_phone_verified = 4;
|
|
bool is_email_verified = 5;
|
|
Role role = 6;
|
|
}
|
|
|
|
enum Role {
|
|
USER = 0;
|
|
ADMIN = 1;
|
|
}
|
|
|
|
message InitEmailChangeRequest {
|
|
string email = 1;
|
|
string user_id = 2;
|
|
}
|
|
message InitEmailChangeResponse {
|
|
bool ok = 1;
|
|
}
|
|
|
|
message ConfirmEmailChangeRequest {
|
|
string email = 1;
|
|
string code = 2;
|
|
string user_id = 3;
|
|
}
|
|
message ConfirmEmailChangeResponse {
|
|
bool ok = 1;
|
|
}
|
|
|
|
|
|
message InitPhoneChangeRequest {
|
|
string phone = 1;
|
|
string user_id = 2;
|
|
}
|
|
message InitPhoneChangeResponse {
|
|
bool ok = 1;
|
|
}
|
|
message ConfirmPhoneChangeRequest {
|
|
string phone = 1;
|
|
string code = 2;
|
|
string user_id = 3;
|
|
}
|
|
message ConfirmPhoneChangeResponse {
|
|
bool ok = 1;
|
|
}
|