From b5715eef993722103b700d7c09cb98bf16605d97 Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Sun, 8 Feb 2026 09:37:08 +0300 Subject: [PATCH] feat: add account proto --- proto/account.proto | 24 ++++++++++++++++++++++++ src/proto/paths.ts | 1 + 2 files changed, 25 insertions(+) create mode 100644 proto/account.proto diff --git a/proto/account.proto b/proto/account.proto new file mode 100644 index 0000000..13a89a4 --- /dev/null +++ b/proto/account.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package account.v1; + +service AccountService { + rpc GetAccount(GetAccountRequest) returns (GetAccountResponse); +} + +message GetAccountRequest { + string id = 1; +} +message GetAccountResponse { + string id = 1; + string phone = 2; + string email = 3; + bool is_phone_verified = 4; + bool is_email_verified = 5; + Role role = 6; +} + +enum Role { + USER = 0; + ADMIN = 1; +} diff --git a/src/proto/paths.ts b/src/proto/paths.ts index 564578c..5481cdf 100644 --- a/src/proto/paths.ts +++ b/src/proto/paths.ts @@ -2,4 +2,5 @@ import { join } from 'node:path'; export const PROTO_PATHS = { AUTH: join(__dirname, '../../proto/auth.proto'), + ACCOUNT: join(__dirname, '../../proto/account.proto'), } as const