From df6121df20a9ef143d5f2622c3e52b2f71d4a698 Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Sat, 28 Feb 2026 08:43:55 +0300 Subject: [PATCH] feat: add users proto methods --- proto/users.proto | 32 ++++++++++++++++++++++++++++++++ src/proto/paths.ts | 1 + 2 files changed, 33 insertions(+) create mode 100644 proto/users.proto 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