diff --git a/proto/clients/clients.proto b/proto/clients/clients.proto index 8716932dbc68df7eb84e9af6c2c8b52a5ff09e12..992fa3c15aa1dcd25cc1034b48d1f785f00295a6 100644 --- a/proto/clients/clients.proto +++ b/proto/clients/clients.proto @@ -118,3 +118,25 @@ service Clients { // Enable - активирует/деактивирует клиента. Клиент РЅРµ сможет обращаться Рє API платформы rpc Enable(EnableRequest) returns(google.protobuf.Empty) {} } + +message ClientsEvent { + string user_id = 1; + string space_id = 2; + + message Create {} + + message Update {} + + message Delete {} + + message Enable { + bool enable = 1; + } + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + Enable enable = 103; + } +} \ No newline at end of file diff --git a/proto/collaborators/collaborators.proto b/proto/collaborators/collaborators.proto index 263fc8b2058fbde39bc27fcfd1ab844f1c96a822..c5a688dcc8ea4509760998993c72d30fc57081da 100644 --- a/proto/collaborators/collaborators.proto +++ b/proto/collaborators/collaborators.proto @@ -50,3 +50,17 @@ service Collaborators { rpc ListCollaborators(ListCollaboratorsRequest) returns(ListCollaboratorsResponse) {} rpc ListSpaces(ListSpacesRequest) returns(ListSpacesResponse) {} } + +message CollaboratorEvent { + string space_id = 1; + string subject = 2; + string role = 3; + + message Set {} + message Remove {} + + oneof event { + Set set = 100; + Remove remove = 101; + } +} \ No newline at end of file diff --git a/proto/collections/collections.proto b/proto/collections/collections.proto index 1a56f9420e49a5c6e18f1ee327a8eca32d3b1b85..7092f5d793f9d3611c0d8b0ab9940395655949d3 100644 --- a/proto/collections/collections.proto +++ b/proto/collections/collections.proto @@ -169,3 +169,24 @@ service Collections { // Удалить коллекцию rpc Delete(DeleteRequest) returns(google.protobuf.Empty) {} } + +message CollectionEvent { + string space_id = 1; + string env_id = 2; + string collection_id = 3; + + message Create {} + + message Update {} + + message Delete {} + + message SetSchema {} + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + SetSchema set_schema = 103; + } +} \ No newline at end of file diff --git a/proto/environments/environments.proto b/proto/environments/environments.proto index e24af36b66976371fb0239db37b7806e1ab1a2b1..51c410d04c184e7663fcaa1e8d235aa439cb9bb5 100644 --- a/proto/environments/environments.proto +++ b/proto/environments/environments.proto @@ -113,4 +113,24 @@ service Environments { // // Р’ случае возникновения ошибок миграции РѕРЅРё записываются РІ поле `Environment.state` rpc Migrate(MigrateRequest) returns(google.protobuf.Empty) {} +} + +message EnvironmentEvent { + string space_id = 1; + string env_id = 2; + + message Create {} + + message Update {} + + message Delete {} + + message Migrate {} + + oneof event { + Create create = 101; + Update update = 102; + Delete delete = 103; + Migrate migrate = 104; + } } \ No newline at end of file diff --git a/proto/extensions/extension.proto b/proto/extensions/extension.proto index e1db1ee67bce29f42140f1bdbfd9f616b683bfbd..bf19163a44b5ce1a8043a2e3bc035501ad47a9f1 100644 --- a/proto/extensions/extension.proto +++ b/proto/extensions/extension.proto @@ -171,3 +171,22 @@ message ActionRequest { // Чтобы РїСЂРё выполнении действия открывалась форма параметров, необходимо указать `Action.params_collection` content.references.Reference params = 11020; } + +message ExtensionEvent { + string space_id = 1; + string extension = 2; + + message Install {} + + message Uninstall {} + + message Action { + string action = 1; + } + + oneof event { + Install install = 100; + Uninstall uninstall = 101; + Action action = 102; + } +} \ No newline at end of file diff --git a/proto/files/files.proto b/proto/files/files.proto index a09422ce6d0a436c177cdc0e01ed7c04f901fdda..37eb3a83f8fc935851c4d4af1f4e1ec097d3a72b 100644 --- a/proto/files/files.proto +++ b/proto/files/files.proto @@ -117,3 +117,19 @@ service Files { // - Удаления связанных файлов конкретного типа (например, РІСЃРµ 'thumbnails'). Передается 'ID' Рё 'Type' rpc DeleteFile(DeleteFileRequest) returns(google.protobuf.Empty) {} } + +message FileEvent { + string file_id = 1; + + message Upload {} + + message Move {} + + message Delete {} + + oneof event { + Upload upload = 100; + Move move = 101; + Delete delete = 102; + } +} \ No newline at end of file diff --git a/proto/images/images.proto b/proto/images/images.proto index b58c473680bc45b6f8ed2e0c74adcf1c36f5c96b..53f60e5dd0b70ede6fd13a2fac6cdc8de60d6f00 100644 --- a/proto/images/images.proto +++ b/proto/images/images.proto @@ -38,3 +38,4 @@ service Images { // Возвращает объект File СЃ заполненным полем File.URL rpc Get(GetRequest) returns(GetResponse) {} } + diff --git a/proto/items/items.proto b/proto/items/items.proto index a8cc3c8d8009b8a07d600558c8a13157561407ab..e5bc985d29c5a023110102525e1c6dc3bad35ffe 100644 --- a/proto/items/items.proto +++ b/proto/items/items.proto @@ -454,3 +454,37 @@ service Items { rpc FindArchived(FindArchivedRequest) returns(FindArchivedResponse) {} rpc Unarchive(UnarchiveRequest) returns(google.protobuf.Empty) {} } + + +message ItemEvent { + string space_id = 1; + string env_id = 2; + string collection_id = 3; + string item_id = 4; + + message Create {} + + message Update { + repeated string changed_fields = 1; + } + + message Delete {} + + message Publish {} + + message Unpublish {} + + message Archive {} + + message Unarchive {} + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + Publish publish = 103; + Unpublish unpublish = 104; + Archive archive = 105; + Unarchive unarchive = 106; + } +} \ No newline at end of file diff --git a/proto/locales/locales.proto b/proto/locales/locales.proto index a2aa0e232fcacd4ba92ec14f90ce23ea8d0a2d48..b7a51ed63b349cf5cce311d87b633964e33a27af 100644 --- a/proto/locales/locales.proto +++ b/proto/locales/locales.proto @@ -56,4 +56,21 @@ service Locales { // Удалить локаль rpc Delete(DeleteRequest) returns(google.protobuf.Empty) {} +} + +message LocaleEvent { + string locale_id = 1; + string space_id = 2; + + message Create {} + + message Update {} + + message Delete {} + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + } } \ No newline at end of file diff --git a/proto/members/members.proto b/proto/members/members.proto index 430691c382ab20d200687a2fd3a6acbebe2634fd..b828481a4afa6debb10a21c0923375ac8d02b196 100644 --- a/proto/members/members.proto +++ b/proto/members/members.proto @@ -78,3 +78,17 @@ message OnCollaboratorSetResponse { service Observer { rpc OnCollaboratorSet(OnCollaboratorSetRequest) returns(OnCollaboratorSetResponse) {} } + +message MemberEvent { + string org_id = 1; + string user_id = 2; + Role role = 3; + + message Set {} + message Remove {} + + oneof event { + Set set = 100; + Remove remove = 101; + } +} \ No newline at end of file diff --git a/proto/organizations/organizations.proto b/proto/organizations/organizations.proto index a8b039983db55915698248e141f402ba8dac53e3..745ef63c3496fdcd526f310d97a640e00d0aa819 100644 --- a/proto/organizations/organizations.proto +++ b/proto/organizations/organizations.proto @@ -64,3 +64,17 @@ service Organizations { rpc Find(FindRequest) returns(FindResponse) {} rpc Update(UpdateRequest) returns(google.protobuf.Empty) {} } + +message OrganizationEvent { + string org_id = 1; + + message Create {} + message Update {} + message Delete {} + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + } +} \ No newline at end of file diff --git a/proto/roles/roles.proto b/proto/roles/roles.proto index 04ad46b59c187b9b3609b582a3a66e9a7143c513..06c72b1929f5fff49f02ae65a217cfac62c20988 100644 --- a/proto/roles/roles.proto +++ b/proto/roles/roles.proto @@ -85,4 +85,19 @@ service Roles { // Delete - удаляет указанную роль РёР· пространстве rpc Delete(DeleteRequest) returns(google.protobuf.Empty) {} +} + +message RoleEvent { + string role_id = 1; + string space_id = 2; + + message Create {} + message Update {} + message Delete {} + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + } } \ No newline at end of file diff --git a/proto/spaces/spaces.proto b/proto/spaces/spaces.proto index c0c1e6d2ea2ed9a8247bf4dbd7c6cc8433c359ac..2773a4f5c1c4f3436c2369d7210fd0212c878b19 100644 --- a/proto/spaces/spaces.proto +++ b/proto/spaces/spaces.proto @@ -124,46 +124,6 @@ message FindResponse { int32 total = 2; } -message EventAbortTransfer { - string id = 1; - string ord_id = 2; -} - -message EventCreate { - string id = 1; - string ord_id = 2; -} - -message EventDelete { - string id = 1; - string ord_id = 2; -} - -message EventMove { - string id = 1; - string ord_id = 2; -} - -message EventTransfer { - string id = 1; - string ord_id = 2; -} - -message EventUpdate { - string id = 1; - string ord_id = 2; -} - -message EventUpdateConfig { - string id = 1; - string ord_id = 2; -} - -message EventMigrate { - string id = 1; - string ord_id = 2; -} - service Spaces { rpc Create(CreateRequest) returns(CreateResponse) {} rpc Get(GetRequest) returns(GetResponse) {} @@ -194,3 +154,39 @@ service Spaces { // осуществлен РІРЅРµ зависимости РѕС‚ того, был РѕРЅ инициирован через метод `Transfer` или нет rpc Move(MoveRequest) returns(google.protobuf.Empty) {} } + +// SpacesEvent описывает события сервиса Spaces, связанные СЃ пространствами +message SpaceEvent { + // Рдентификатор пространства + string space_id = 1; + // Рдентификатор организации + string org_id = 2; + + // Событие создания пространства + message Create {} + + // Событие обновления пространства + message Update {} + + // Событие удаления пространства + message Delete {} + + // Событие перемещения пространства между организациями + message Move { + string prev_org_id = 1; + } + + // Событие изменения состояния пространства + message StateChange { + StateInfo state = 1; + StateInfo prev = 2; + } + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + Move move = 103; + StateChange state_change = 104; + } +} \ No newline at end of file diff --git a/proto/users/users.proto b/proto/users/users.proto index 4a5c38041e9438d7771f4ddefda5480c0d074248..9a868220470e18d43e7ad081a2ff42d0fc4750e7 100644 --- a/proto/users/users.proto +++ b/proto/users/users.proto @@ -73,17 +73,6 @@ message GetByIdentityResponse { User user = 1; } -message EventCreate { - string id = 1; -} - -message EventUpdate { - string id = 1; -} -message EventDelete { - string id = 1; -} - service Users { // Создание пользователя или регистрация текущего пользователя РІ системе, если create.id == `current` rpc Create(CreateRequest) returns(CreateResponse) {} @@ -107,3 +96,20 @@ service Users { // запросов - авторизация вернет ошибку `access denied` rpc GetByIdentity(GetByIdentityRequest) returns(GetByIdentityResponse) {} } + + +message UserEvent { + string user_id = 1; + + message Create {} + + message Update {} + + message Delete {} + + oneof event { + Create create = 100; + Update update = 101; + Delete delete = 102; + } +} \ No newline at end of file