diff --git a/proto/users.proto b/proto/users.proto new file mode 100644 index 0000000..5efd92a --- /dev/null +++ b/proto/users.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +package users.v1; + +service UsersService { + rpc GetMe (GetMeRequest) returns (GetMeResponse); + rpc CreateUser (CreateUserRequest) returns (CreateUserResponse); +} + +message GetMeRequest { + string id = 1; +} + +message GetMeResponse { + User user = 1; +} + +message CreateUserRequest { + string id = 1; +} +message CreateUserResponse { + bool ok = 1; +} + + +message User { + string id = 1; + optional string name = 2; + optional string phone = 3; + optional string email = 4; + optional string avatar = 5; +} diff --git a/src/proto/paths.ts b/src/proto/paths.ts index 5481cdf..f726371 100644 --- a/src/proto/paths.ts +++ b/src/proto/paths.ts @@ -3,4 +3,5 @@ import { join } from 'node:path'; export const PROTO_PATHS = { AUTH: join(__dirname, '../../proto/auth.proto'), ACCOUNT: join(__dirname, '../../proto/account.proto'), + USERS: join(__dirname, '../../proto/users.proto'), } as const