feat: add search proto files
Some checks failed
Publish / Publish Job (push) Failing after 2m24s

This commit is contained in:
Дмитрий
2026-04-10 21:54:50 +03:00
parent 3d5081981b
commit 5e0cbe1214
3 changed files with 33 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@lendry-erp/contracts", "name": "@lendry-erp/contracts",
"version": "1.1.3", "version": "1.1.4",
"description": "Protobuf definitions and generated TypeScript types", "description": "Protobuf definitions and generated TypeScript types",
"type": "commonjs", "type": "commonjs",
"main": "./dist/index.js", "main": "./dist/index.js",

31
proto/search.proto Normal file
View File

@@ -0,0 +1,31 @@
syntax = "proto3";
package search.v1;
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
service SearchService {
rpc SearchUsers (SearchUsersRequest) returns (SearchUsersResponse);
// В будущем сюда добавятся:
// rpc SearchMessages (SearchMessagesRequest) returns (SearchMessagesResponse);
// rpc SearchTickets (SearchTicketsRequest) returns (SearchTicketsResponse);
}
message SearchUsersRequest {
string query = 1;
string user_id = 2; // Придерживаемся твоего паттерна передачи контекста
string session_id = 3;
}
message SearchUserItem {
string id = 1;
string username = 2;
string full_name = 3;
string avatar_url = 4;
string status = 5;
bool is_public = 6;
}
message SearchUsersResponse {
repeated SearchUserItem users = 1;
}

View File

@@ -7,4 +7,5 @@ export const PROTO_PATHS = {
RBAC: join(__dirname, "../../proto/sso/rbac.proto"), RBAC: join(__dirname, "../../proto/sso/rbac.proto"),
TWOFA: join(__dirname, "../../proto/sso/twofa.proto"), TWOFA: join(__dirname, "../../proto/sso/twofa.proto"),
LDAP: join(__dirname, "../../proto/sso/ldap.proto"), LDAP: join(__dirname, "../../proto/sso/ldap.proto"),
SEARCH: join(__dirname, "../../proto/search.proto"),
} as const; } as const;