mobility-accounts/grpcapi/comasvc.proto

98 lines
2.2 KiB
Protocol Buffer
Raw Normal View History

//COMA (COOPGO Mobility Accounts) gRPC service definition
syntax = "proto3";
option go_package = "git.coopgo.io/coopgo-platform/mobility-accounts/grpcapi";
import "accounts.proto";
service MobilityAccounts {
rpc Register(RegisterRequest) returns (RegisterResponse) {}
rpc UpdateData(UpdateDataRequest) returns (UpdateDataResponse) {}
2023-03-29 10:59:08 +00:00
rpc UpdatePhoneNumber(UpdatePhoneNumberRequest) returns (UpdatePhoneNumberResponse) {}
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse) {}
2022-09-06 13:03:39 +00:00
rpc GetAccountUsername(GetAccountUsernameRequest) returns (GetAccountUsernameResponse) {}
rpc GetAccounts(GetAccountsRequest) returns (GetAccountsResponse) {}
2022-08-11 15:14:21 +00:00
rpc GetAccountsBatch(GetAccountsBatchRequest) returns (GetAccountsBatchResponse) {}
// Authentication functions
rpc Login(LoginRequest) returns (LoginResponse) {}
rpc ChangePassword(ChangePasswordRequest) returns (ChangePasswordResponse) {}
}
message LoginRequest {
string username = 1;
string password = 2;
string namespace = 3;
}
message LoginResponse {
Account account = 4;
}
message RegisterRequest {
Account account = 5;
}
message RegisterResponse {
Account account = 6;
}
message UpdateDataRequest {
Account account = 7;
}
message UpdateDataResponse {
Account account = 8;
}
2023-03-29 10:59:08 +00:00
message UpdatePhoneNumberRequest {
string id = 17;
string phone_number = 18;
bool verified = 19;
string verification_code = 20;
}
message UpdatePhoneNumberResponse {
bool ok = 21;
}
message GetAccountRequest {
string id = 9;
2022-09-06 13:03:39 +00:00
}
message GetAccountResponse {
Account account = 12;
}
message GetAccountUsernameRequest {
string username = 10;
string namespace = 11;
}
2022-09-06 13:03:39 +00:00
message GetAccountUsernameResponse {
Account account = 12;
}
message GetAccountsRequest {
repeated string namespaces = 13; // Filter on namespaces
}
message GetAccountsResponse {
repeated Account accounts = 14;
}
2022-08-11 15:14:21 +00:00
message GetAccountsBatchRequest {
repeated string accountids = 13; // Filter on namespaces
}
message GetAccountsBatchResponse {
repeated Account accounts = 14;
}
message ChangePasswordRequest {
string id = 15;
string password = 16;
}
message ChangePasswordResponse {}