diff --git a/proto/items/items.proto b/proto/items/items.proto index 5a9c43c2fdfc2ae8a8a113839857c2cf63eb2c12..2ef5ad9e2a303aff8df41c5de5da67e7ac916263 100644 --- a/proto/items/items.proto +++ b/proto/items/items.proto @@ -123,7 +123,7 @@ message Filter { } message CreateOptions { - bool update_attrs = 1; + bool update_attrs = 1; // позволяет обновить системные поля: created_by, created_at, created_rev_at, updated_by, updated_at } message FindOptions { @@ -135,7 +135,7 @@ message FindOptions { } message UpdateOptions { - bool update_attrs = 1; + bool update_attrs = 1; // позволяет обновить системные поля: created_by, created_at, created_rev_at, updated_by, updated_at } message GetPublishedOptions { @@ -143,11 +143,20 @@ message GetPublishedOptions { } message DeleteOptions { - bool erase = 1; + bool update_attrs = 1; // позволяет обновить системные поля: created_by, created_at, created_rev_at, updated_by, updated_at + bool erase = 2; // полное удаление без сохранения удаленной версии объекта +} + +message UndeleteOptions { + bool update_attrs = 1; // позволяет обновить системные поля: created_by, created_at, created_rev_at, updated_by, updated_at } message PublishOptions { - bool update_attrs = 1; + bool update_attrs = 1; // позволяет обновить системные поля: created_by, created_at, created_rev_at, updated_by, updated_at +} + +message UnpublishOptions { + bool update_attrs = 1; // позволяет обновить системные поля: created_by, created_at, created_rev_at, updated_by, updated_at } message FindPublishedOptions { @@ -230,18 +239,13 @@ message UpdateRequest { } message DeleteRequest { - string space_id = 1; - string env_id = 2; - string collection_id = 3; - string item_id = 4; - DeleteOptions options = 5; + Item item = 1; // важны только переданные внутри идентификаторы или, если указана опция update_attrs, поля которые изменяются: created_by, created_at, created_rev_at, updated_by, updated_at + DeleteOptions options = 2; } message UndeleteRequest { - string space_id = 1; - string env_id = 2; - string collection_id = 3; - string item_id = 4; + Item item = 1; + UndeleteOptions options = 2; } message PublishRequest { @@ -251,6 +255,7 @@ message PublishRequest { message UnpublishRequest { Item item = 1; + UnpublishOptions options = 2; } message GetPublishedRequest {