syntax = "proto3"; package user; service User { rpc Login(LoginRequest) returns (UserResponse); rpc Register(RegisterRequest) returns (UserResponse); rpc VerifyRegistration(VerifyRegistrationRequest) returns (UserResponse); rpc Get(GetUserRequest) returns (UserResponse); rpc Update(UpdateRequest) returns (UserResponse); rpc RefreshToken(RefreshTokenRequest) returns (UserResponse); } message LoginRequest { string email = 1; string password = 2; } message RefreshRequest { int64 id = 1; string token = 2; } message RegisterRequest { string username = 1; string email = 2; string password = 3; } message VerifyRegistrationRequest { int64 id = 1; } message GetUserRequest { int64 id = 1; } message UpdateRequest { int64 id = 1; message UpdateFields { optional string email = 2; optional string username = 3; optional string password = 4; optional string bio = 5; optional string image = 6; } UpdateFields fields = 2; } message RefreshTokenRequest { int64 id = 1; string token = 2; } message UserResponse { int64 id = 1; string username = 2; string email = 3; optional string bio = 4; optional string image = 5; optional string token = 6; }