diff --git a/aruna/api/bundler/services/v1/bundler_service.proto b/aruna/api/bundler/services/v1/bundler_service.proto index 32506edf..ae75bb63 100644 --- a/aruna/api/bundler/services/v1/bundler_service.proto +++ b/aruna/api/bundler/services/v1/bundler_service.proto @@ -7,6 +7,7 @@ option java_package = "com.github.ArunaStorage.java_api.aruna.api.storage.servic option java_outer_classname = "BundlerService"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; // BundlerService // @@ -14,8 +15,18 @@ import "google/protobuf/timestamp.proto"; // // A service that enables bundled downloads service BundlerService { - rpc CreateBundle(CreateBundleRequest) returns (CreateBundleResponse) {} - rpc DeleteBundle(DeleteBundleRequest) returns (DeleteBundleResponse) {} + rpc CreateBundle(CreateBundleRequest) returns (CreateBundleResponse) { + option (google.api.http) = { + post : "/v1/collection/{collection_id}/bundle" + body : "*" + }; + } + rpc DeleteBundle(DeleteBundleRequest) returns (DeleteBundleResponse) { + option (google.api.http) = { + delete : "/v1/collection/{collection_id}/bundle/{bundle_id}" + body : "*" + }; + } } // An resourcetype used to identify generic authorizations @@ -27,18 +38,23 @@ enum ArchiveType { } message CreateBundleRequest { - repeated string object_ids = 1; - string filename = 2; - ArchiveType archive_type = 3; - google.protobuf.Timestamp expires_at = 4; + string collection_id = 1; + repeated string object_ids = 2; + string filename = 3; + ArchiveType archive_type = 4; + google.protobuf.Timestamp expires_at = 5; + // Optional endpoint_id + string endpoint_id = 6; } message CreateBundleResponse { - string url = 1; + string bundle_id = 1; + string url = 2; } message DeleteBundleRequest { - string bundle_id = 1; + string collection_id = 1; + string bundle_id = 2; } message DeleteBundleResponse {} \ No newline at end of file diff --git a/aruna/api/internal/v1/bundler.proto b/aruna/api/internal/v1/bundler.proto index aee161c9..1ab1706e 100644 --- a/aruna/api/internal/v1/bundler.proto +++ b/aruna/api/internal/v1/bundler.proto @@ -48,7 +48,9 @@ message EnableBundleRequest{ message EnableBundleResponse{} -message GetBundlesRequest {} +message GetBundlesRequest { + string endpoint_id = 1; +} message GetBundlesResponse { repeated Bundle bundles = 1; diff --git a/aruna/api/storage/models/v1/models.proto b/aruna/api/storage/models/v1/models.proto index fed5f49e..06a6545b 100644 --- a/aruna/api/storage/models/v1/models.proto +++ b/aruna/api/storage/models/v1/models.proto @@ -147,16 +147,31 @@ enum EndpointType { ENDPOINT_TYPE_FILE = 2; } +enum EndpointHostType { + ENDPOINT_HOST_TYPE_UNSPECIFIED = 0; + ENDPOINT_HOST_TYPE_PROXY = 1; + ENDPOINT_HOST_TYPE_INTERNAL = 2; + ENDPOINT_HOST_TYPE_BUNDLER = 3; +} + +message EndpointHostConfig { + string url = 1; + bool is_primary = 2; + bool ssl = 3; + bool public = 4; + EndpointHostType host_type = 5; +} + message Endpoint { string id = 1; EndpointType ep_type = 2; string name = 3; - string proxy_hostname = 4; - string internal_hostname = 5; string documentation_path = 6; bool is_public = 7; bool is_default = 8; EndpointStatus status = 9; + bool is_bundler = 10; + repeated EndpointHostConfig host_configs = 11; } // RULES for Objects: diff --git a/aruna/api/storage/services/v1/collection_service.proto b/aruna/api/storage/services/v1/collection_service.proto index 94133782..797c39bf 100644 --- a/aruna/api/storage/services/v1/collection_service.proto +++ b/aruna/api/storage/services/v1/collection_service.proto @@ -320,8 +320,9 @@ message DeleteCollectionResponse {} message AddKeyValuesToCollectionRequest { - repeated storage.models.v1.KeyValue labels = 1; - repeated storage.models.v1.KeyValue hooks = 2; + string collection_id = 1; + repeated storage.models.v1.KeyValue labels = 2; + repeated storage.models.v1.KeyValue hooks = 3; } message AddKeyValuesToCollectionResponse { diff --git a/aruna/api/storage/services/v1/endpoint_service.proto b/aruna/api/storage/services/v1/endpoint_service.proto index 94afe9b1..8f4e1d33 100644 --- a/aruna/api/storage/services/v1/endpoint_service.proto +++ b/aruna/api/storage/services/v1/endpoint_service.proto @@ -83,16 +83,16 @@ message AddEndpointRequest { string name = 1; // Endpoint type storage.models.v1.EndpointType ep_type = 2; - // Public hostname of the proxy - string proxy_hostname = 3; - // Internal hostname for the proxy - string internal_hostname = 4; // (optional) URL to a offsite documentation string documentation_path = 5; // Is this endpoint public bool is_public = 6; // (optional) ED25519 Pubkey -> Pubkey to validate endpoint authenticated tokens string pubkey = 7; + // Added option to make a Dataproxy a bundler + bool is_bundler = 8; + // List of EndpointHostConfigs + repeated storage.models.v1.EndpointHostConfig host_configs = 9; } message AddEndpointResponse {