diff --git a/aruna/api/hooks/services/v2/hooks_service.proto b/aruna/api/hooks/services/v2/hooks_service.proto index 7c4c42d3..64def827 100644 --- a/aruna/api/hooks/services/v2/hooks_service.proto +++ b/aruna/api/hooks/services/v2/hooks_service.proto @@ -54,21 +54,31 @@ message ExternalHook { string url = 1; Credentials credentials = 2; string json_template = 3; + Method method = 4; } -enum InternalAction { - INTERNAL_ACTION_UNSPECIFIED = 0; - INTERNAL_ACTION_ADD_LABEL = 1; - INTERNAL_ACTION_ADD_HOOK = 2; - INTERNAL_ACTION_CREATE_RELATION = 3; +enum Method { + METHOD_UNSPECIFIED = 0; + METHOD_PUT = 1; + METHOD_POST = 2; +} + +message AddLabel { + string key = 1; + string value = 2; +} + +message AddHook { + string key = 1; + string value = 2; } message InternalHook { - InternalAction internal_action = 1; - // Either key or target ID - string target_id = 2; - // Optional value - string value = 3; + oneof internal_action { + AddLabel add_label = 1; + AddHook add_hook = 2; + storage.models.v2.Relation add_relation = 3; + } } message Hook { @@ -101,8 +111,12 @@ message DeleteHookResponse {} message HookCallbackRequest { bool success = 1; - repeated aruna.api.storage.models.v2.KeyValue add_key_values = 2; - repeated aruna.api.storage.models.v2.KeyValue remove_key_values = 3; + repeated storage.models.v2.KeyValue add_key_values = 2; + repeated storage.models.v2.KeyValue remove_key_values = 3; + string secret = 4; + string hook_id = 5; + string object_id = 6; + string pubkey_serial = 7; } message HookCallbackResponse{} @@ -120,4 +134,4 @@ message HookInfo { message ListHooksResponse{ repeated HookInfo infos = 1; -} \ No newline at end of file +} diff --git a/aruna/api/storage/models/v2/models.proto b/aruna/api/storage/models/v2/models.proto index 78a977e7..ae5ae7a7 100644 --- a/aruna/api/storage/models/v2/models.proto +++ b/aruna/api/storage/models/v2/models.proto @@ -17,7 +17,7 @@ enum DataClass { // Which kind of endpoint enum EndpointVariant { - ENDPOINT_VARIANT_UNSPECIFIED = 0; + ENDPOINT_VARIANT_UNSPECIFIED = 0; ENDPOINT_VARIANT_PERSISTENT = 1; ENDPOINT_VARIANT_VOLATILE = 2; } @@ -25,8 +25,8 @@ enum EndpointVariant { // Which features does the endpoint have enum EndpointHostVariant { ENDPOINT_HOST_VARIANT_UNSPECIFIED = 0; - ENDPOINT_HOST_VARIANT_PROXY = 1; - ENDPOINT_HOST_VARIANT_BUNDLER = 2; + ENDPOINT_HOST_VARIANT_GRPC= 1; + ENDPOINT_HOST_VARIANT_S3= 2; } // Permission Levels @@ -325,7 +325,7 @@ message Dataset { } message Object { - string id = 1; + string id = 1; string name = 2; string description = 3; // Collection specific labels / hooks @@ -341,4 +341,4 @@ message Object { repeated DataEndpoint endpoints = 12; // Object specific attributes repeated Hash hashes = 13; -} \ No newline at end of file +} diff --git a/aruna/api/storage/services/v2/search_service.proto b/aruna/api/storage/services/v2/search_service.proto index c379d972..03f80425 100644 --- a/aruna/api/storage/services/v2/search_service.proto +++ b/aruna/api/storage/services/v2/search_service.proto @@ -27,9 +27,9 @@ service SearchService { // Status: BETA // // Retrieves a public resource by its ID. - rpc GetPublicResource(GetPublicResourceRequest) returns (GetPublicResourceResponse){ + rpc GetResource(GetResourceRequest) returns (GetResourceResponse){ option (google.api.http) = { - get : "/v2/public/{resource_id}" + get : "/v2/resource/{resource_id}" }; } @@ -52,10 +52,11 @@ message SearchResourcesResponse { int64 last_index = 3; } -message GetPublicResourceRequest { +message GetResourceRequest { string resource_id = 1; } -message GetPublicResourceResponse { - storage.models.v2.GenericResource resources = 1; -} \ No newline at end of file +message GetResourceResponse { + storage.models.v2.GenericResource resource = 1; + storage.models.v2.PermissionLevel permission = 2; +}