Compare commits

...

2 Commits

Author SHA1 Message Date
b36d1cfc08 1.1.2
Some checks failed
Publish / Publish npm package action (push) Failing after 6m46s
2026-02-28 08:44:11 +03:00
df6121df20 feat: add users proto methods 2026-02-28 08:43:55 +03:00
3 changed files with 34 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@teacinema/contracts",
"version": "1.1.1",
"version": "1.1.2",
"description": "Protocol Buffers contracts for microservices",
"scripts": {
"build": "tsc -p tsconfig.build.json",

32
proto/users.proto Normal file
View File

@ -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;
}

View File

@ -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