diff --git a/README.md b/README.md index 3c8c15a..42aeb48 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ yarn add @teacinema/contracts |---|---|---|---| | `GetMe` | `GetMeRequest` | `GetMeResponse` | Получить профиль пользователя по ID | | `CreateUser` | `CreateUserRequest` | `CreateUserResponse` | Создать нового пользователя | +| `PatchUser` | `PatchUserRequest` | `PatchUserResponse` | Обновить данные пользователя (частичное обновление) | --- diff --git a/proto/users.proto b/proto/users.proto index 5efd92a..73a2202 100644 --- a/proto/users.proto +++ b/proto/users.proto @@ -5,6 +5,7 @@ package users.v1; service UsersService { rpc GetMe (GetMeRequest) returns (GetMeResponse); rpc CreateUser (CreateUserRequest) returns (CreateUserResponse); + rpc PatchUser (PatchUserRequest) returns (PatchUserResponse); } message GetMeRequest { @@ -30,3 +31,11 @@ message User { optional string email = 4; optional string avatar = 5; } + +message PatchUserRequest { + string user_id = 1; + optional string name = 2; +} +message PatchUserResponse { + bool ok = 1; +}