From 875f98be6156f6e1aa28ef2f5a2de8ef9d77c5fe Mon Sep 17 00:00:00 2001 From: lfbrehm <97600985+lfbrehm@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:21:09 +0200 Subject: [PATCH 1/6] feat: Added HookStatus --- aruna/api/hooks/services/v2/hooks_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aruna/api/hooks/services/v2/hooks_service.proto b/aruna/api/hooks/services/v2/hooks_service.proto index 64def827..73a66891 100644 --- a/aruna/api/hooks/services/v2/hooks_service.proto +++ b/aruna/api/hooks/services/v2/hooks_service.proto @@ -116,7 +116,7 @@ message HookCallbackRequest { string secret = 4; string hook_id = 5; string object_id = 6; - string pubkey_serial = 7; + int32 pubkey_serial = 7; } message HookCallbackResponse{} From 123804eb201c5904f8cd8e01797e8f72f8219db7 Mon Sep 17 00:00:00 2001 From: lfbrehm <97600985+lfbrehm@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:36:34 +0200 Subject: [PATCH 2/6] feat: Added HookStatus --- aruna/api/storage/models/v2/models.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/aruna/api/storage/models/v2/models.proto b/aruna/api/storage/models/v2/models.proto index ae5ae7a7..f9a73843 100644 --- a/aruna/api/storage/models/v2/models.proto +++ b/aruna/api/storage/models/v2/models.proto @@ -45,6 +45,7 @@ enum KeyValueVariant { KEY_VALUE_VARIANT_LABEL = 1; KEY_VALUE_VARIANT_STATIC_LABEL = 2; // A Label that only admins can remove KEY_VALUE_VARIANT_HOOK = 3; + KEY_VALUE_VARIANT_HOOK_STATUS = 4; } // External Relations From b824795d03c1f845122e6ed5a4267b14ac6bf7d6 Mon Sep 17 00:00:00 2001 From: lfbrehm <97600985+lfbrehm@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:38:26 +0200 Subject: [PATCH 3/6] chore: Updated dependencies --- aruna/api/google | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aruna/api/google b/aruna/api/google index fb30b795..bbcd7c56 160000 --- a/aruna/api/google +++ b/aruna/api/google @@ -1 +1 @@ -Subproject commit fb30b7950fbd3df9ddafa7be5557ed35605d9e55 +Subproject commit bbcd7c5619a6171baeeb393c387563b5463b4f89 From 3d05670afc09752baf513a9ef72b8afcf496aeb6 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Thu, 7 Sep 2023 13:03:57 +0200 Subject: [PATCH 4/6] feat: Added global anouncements API request for web --- .../storage/services/v2/info_service.proto | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/aruna/api/storage/services/v2/info_service.proto b/aruna/api/storage/services/v2/info_service.proto index 54a64a7d..f9ba34f2 100644 --- a/aruna/api/storage/services/v2/info_service.proto +++ b/aruna/api/storage/services/v2/info_service.proto @@ -7,6 +7,7 @@ option java_package = "com.github.ArunaStorage.java_api.aruna.api.storage.servic option java_outer_classname = "StorageStatusService"; import "aruna/api/storage/models/v2/models.proto"; import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; // StorageStatusService @@ -45,6 +46,21 @@ service StorageStatusService { get : "/v2/info/pubkeys" }; } + + + rpc GetAnouncements(GetAnouncementsRequest) returns (GetAnouncementsResponse) { + option (google.api.http) = { + get : "/v2/info/anouncements" + }; + } + + + rpc SetAnouncements(SetAnouncementsRequest) returns (SetAnouncementsResponse) { + option (google.api.http) = { + post : "/v2/info/anouncements/set" + body : "*" + }; + } } @@ -102,4 +118,27 @@ message GetPubkeysRequest {} message GetPubkeysResponse { repeated storage.models.v2.Pubkey pubkeys = 1; +} + + +message Anouncement { + string id = 1; + string content = 2; + google.protobuf.Timestamp created_at = 3; +} + +message GetAnouncementsRequest {} + + +message GetAnouncementsResponse { + repeated Anouncement anouncements = 1; +} + +message SetAnouncementsRequest { + repeated Anouncement anouncements_upsert = 1; + repeated string anouncements_delete = 2; +} + +message SetAnouncementsResponse { + repeated Anouncement anouncements = 1; } \ No newline at end of file From da88f612056a44aac31ebee2c5c518ace8fe8617 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Thu, 7 Sep 2023 13:08:35 +0200 Subject: [PATCH 5/6] feat: Added persistent notifications for users --- .../storage/services/v2/user_service.proto | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/aruna/api/storage/services/v2/user_service.proto b/aruna/api/storage/services/v2/user_service.proto index 5a1965fc..9353c7b0 100644 --- a/aruna/api/storage/services/v2/user_service.proto +++ b/aruna/api/storage/services/v2/user_service.proto @@ -211,6 +211,14 @@ service UserService { }; } + + rpc GetPersonalNotifications(GetPersonalNotificationsRequest) + returns (GetPersonalNotificationsResponse) { + option (google.api.http) = { + get : "/v2/user/{user_id}/notifications" + }; + } + } message RegisterUserRequest { @@ -370,3 +378,24 @@ message GetDataproxyTokenUserRequest { message GetDataproxyTokenUserResponse { string token = 1; } + +message GetPersonalNotificationsRequest { + string user_id = 1; +} + + +message References { + string ref_type = 1; // UserRequestAccess + string ref_name = 2; // "User A" + string ref_value = 3; // 0123AAA123AAA (id) +} + +message UserNotification { + string variant = 1; // Request access + string message = 2; // User A has requested access for resource B + repeated References refs = 3; // References to resource in the "message" +} + +message GetPersonalNotificationsResponse { + repeated UserNotification notifications = 1; +} From de93617fb9a5c48f98e9fcfd4afbb199d3505c53 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Thu, 7 Sep 2023 14:11:02 +0200 Subject: [PATCH 6/6] feat: Added GetResources update GetResource to include a separate struct ResourceWithPermissions --- .../storage/services/v2/search_service.proto | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/aruna/api/storage/services/v2/search_service.proto b/aruna/api/storage/services/v2/search_service.proto index 03f80425..e576fb37 100644 --- a/aruna/api/storage/services/v2/search_service.proto +++ b/aruna/api/storage/services/v2/search_service.proto @@ -22,17 +22,29 @@ service SearchService { }; } - // GetPublicResource + // GetResource // // Status: BETA // - // Retrieves a public resource by its ID. + // Retrieves resource by its ID. rpc GetResource(GetResourceRequest) returns (GetResourceResponse){ option (google.api.http) = { get : "/v2/resource/{resource_id}" }; } + + // GetResources + // + // Status: BETA + // + // Retrieves resources by a list of IDs. + rpc GetResources(GetResourcesRequest) returns (GetResourcesResponse){ + option (google.api.http) = { + get : "/v2/resources" + }; + } + } message SearchResourcesRequest { @@ -56,7 +68,21 @@ message GetResourceRequest { string resource_id = 1; } -message GetResourceResponse { +message ResourceWithPermission { storage.models.v2.GenericResource resource = 1; storage.models.v2.PermissionLevel permission = 2; } + +message GetResourceResponse { + ResourceWithPermission resource = 1; +} + + +message GetResourcesRequest { + repeated string resource_ids = 1; +} + +message GetResourcesResponse { + repeated ResourceWithPermission resources = 1; +} +