123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- syntax = "proto3";
- package uu.mobile;
- import "base.proto";
- option java_multiple_files = true;
- option java_package = "com.usoftchina.uu.mobile.grpc.api";
- service AccountService {
-
- rpc signup (AccountSignupRequest) returns (AccountSignupResponse) {};
-
- rpc signin (AccountSigninRequest) returns (AccountSigninResponse) {};
-
- rpc switchCompany (SwitchCompanyRequest) returns (SwitchCompanyResponse) {};
-
- rpc getInfo (GetAccountInfoRequest) returns (GetAccountInfoResponse) {};
-
- rpc saveInfo (SaveAccountInfoRequest) returns (SaveAccountInfoResponse) {};
-
- rpc signout (AccountSignoutRequest) returns (AccountSignoutResponse) {};
- }
- message AuthedToken {
-
- string token = 1;
-
- int32 expire = 2;
-
- int64 timestamp = 3;
- }
- message AccountSignupRequest {
-
- string mobile = 1;
-
- string password = 2;
-
- string realname = 3;
-
- string email = 4;
-
- AccountInfo.Sex sex = 5;
-
- string avatarUrl = 6;
- }
- message AccountSignupResponse {
- ResponseHeader responseHeader = 1;
- }
- message AccountSigninRequest {
-
- string mobile = 1;
-
- string password = 2;
-
- DeviceInfo deviceInfo = 3;
- }
- message AccountSigninResponse {
- ResponseHeader responseHeader = 1;
-
- AuthedToken authedToken = 2;
-
- AccountInfo account = 3;
-
- int64 activeCompanyId = 4;
-
- repeated Company company = 5;
- }
- message SwitchCompanyRequest {
-
- int64 companyId = 1;
- }
- message SwitchCompanyResponse {
- ResponseHeader responseHeader = 1;
-
- AuthedToken authedToken = 2;
- }
- message GetAccountInfoRequest {
- }
- message GetAccountInfoResponse {
- ResponseHeader responseHeader = 1;
-
- AccountInfo account = 2;
-
- int64 activeCompanyId = 3;
-
- repeated Company company = 4;
- }
- message SaveAccountInfoRequest {
-
- string realname = 1;
-
- string avatarUrl = 2;
-
- AccountInfo.Sex sex = 3;
- }
- message SaveAccountInfoResponse {
- ResponseHeader responseHeader = 1;
- }
- message AccountSignoutRequest {
- }
- message AccountSignoutResponse {
- ResponseHeader responseHeader = 1;
- }
- service PasswordService {
-
- rpc sendCheckCodeByMobile (SendCheckCodeByMobileRequest) returns (SendCheckCodeByMobileResponse) {};
-
- rpc resetByCheckCode (ResetByCheckCodeRequest) returns (ResetByCheckCodeResponse) {};
-
- rpc getEmailByMobile (GetEmailByMobileRequest) returns (GetEmailByMobileResponse) {};
-
- rpc sendCheckEmail (SendCheckEmailRequest) returns (SendCheckEmailResponse) {};
- }
- message SendCheckCodeByMobileRequest {
- string mobile = 1;
- }
- message SendCheckCodeByMobileResponse {
- ResponseHeader responseHeader = 1;
-
- string token = 2;
- }
- message ResetByCheckCodeRequest {
- string mobile = 1;
-
- string token = 2;
-
- string code = 3;
-
- string password = 4;
- }
- message ResetByCheckCodeResponse {
- ResponseHeader responseHeader = 1;
- }
- message GetEmailByMobileRequest {
- string mobile = 1;
- }
- message GetEmailByMobileResponse {
- ResponseHeader responseHeader = 1;
-
- string token = 2;
- string email = 3;
- }
- message SendCheckEmailRequest {
- string token = 1;
- }
- message SendCheckEmailResponse {
- ResponseHeader responseHeader = 1;
- }
|