From 3f2c00b1b1fc37a26bddf8e5aec8d817b9cba2c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Mon, 13 Apr 2026 21:02:13 +0300 Subject: [PATCH] feat: add audit proto files --- package.json | 2 +- proto/admin/audit.proto | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 proto/admin/audit.proto diff --git a/package.json b/package.json index 906058e..749001a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lendry-erp/contracts", - "version": "1.2.19", + "version": "1.2.20", "description": "Protobuf definitions and generated TypeScript types", "type": "commonjs", "main": "./dist/index.js", diff --git a/proto/admin/audit.proto b/proto/admin/audit.proto new file mode 100644 index 0000000..a157796 --- /dev/null +++ b/proto/admin/audit.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package audit.v1; + +option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb"; + +service AuditService { + rpc GetAuditLogs(GetAuditLogsRequest) returns (GetAuditLogsResponse); +} + +message GetAuditLogsRequest { + optional string account_id = 1; + optional string type = 2; + optional string action = 3; + optional string start_date = 4; // ISO string + optional string end_date = 5; // ISO string + int32 page = 6; + int32 limit = 7; +} + +message AuditLogItem { + string id = 1; + string account_id = 2; + string type = 3; + string action = 4; + string ip_address = 5; + string user_agent = 6; + string detail = 7; + string created_at = 8; +} + +message GetAuditLogsResponse { + repeated AuditLogItem logs = 1; + int32 total = 2; + int32 page = 3; + int32 total_pages = 4; +} \ No newline at end of file