Skip to content

Commit

Permalink
feat/ingest: Added title and authors to rpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
St4NNi committed Feb 22, 2024
1 parent fc82b8e commit 6774569
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 0 deletions.
46 changes: 46 additions & 0 deletions aruna/api/storage/services/v2/collection_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,37 @@ service CollectionService {
body : "*"
};
}

// UpdateTitle
//
// Status: ALPHA
//
// Updates the collections metadata title.
rpc UpdateCollectionTitle(UpdateCollectionTitleRequest) returns (UpdateCollectionTitleResponse) {
option (google.api.http) = {
patch : "/v2/collections/{collection_id}/title"
body : "*"
};
}


// UpdateAuthors
//
// Status: ALPHA
//
// Updates the collections metadata title.
rpc UpdateCollectionAuthors(UpdateCollectionAuthorsRequest) returns (UpdateCollectionAuthorsResponse) {
option (google.api.http) = {
patch : "/v2/collections/{collection_id}/authors"
body : "*"
};
}
}

message CreateCollectionRequest {
// collection name
string name = 1;
string title = 9;
// description
string description = 2;
// collection specific labels / hooks
Expand All @@ -155,6 +181,7 @@ message CreateCollectionRequest {
}
optional string metadata_license_tag = 7;
optional string default_data_license_tag = 8;
repeated storage.models.v2.Author authors = 10;
}

message CreateCollectionResponse {
Expand Down Expand Up @@ -241,4 +268,23 @@ message UpdateCollectionLicensesRequest {

message UpdateCollectionLicensesResponse {
storage.models.v2.Collection collection = 1;
}

message UpdateCollectionTitleRequest {
string collection_id = 1;
string title = 2;
}

message UpdateCollectionTitleResponse {
storage.models.v2.Collection collection = 1;
}

message UpdateCollectionAuthorsRequest {
string collection_id = 1;
repeated storage.models.v2.Author add_authors = 2;
repeated storage.models.v2.Author remove_authors = 3;
}

message UpdateCollectionAuthorsResponse {
storage.models.v2.Collection collection = 1;
}
46 changes: 46 additions & 0 deletions aruna/api/storage/services/v2/dataset_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,37 @@ service DatasetService {
body : "*"
};
}

// UpdateTitle
//
// Status: ALPHA
//
// Updates the datasets metadata title.
rpc UpdateDatasetTitle(UpdateDatasetTitleRequest) returns (UpdateDatasetTitleResponse) {
option (google.api.http) = {
patch : "/v2/datasets/{dataset_id}/title"
body : "*"
};
}


// UpdateAuthors
//
// Status: ALPHA
//
// Updates the datasets metadata title.
rpc UpdateDatasetAuthors(UpdateDatasetAuthorsRequest) returns (UpdateDatasetAuthorsResponse) {
option (google.api.http) = {
patch : "/v2/dataset/{dataset_id}/authors"
body : "*"
};
}
}

message CreateDatasetRequest {
// dataset name
string name = 1;
string title = 10;
// Description
string description = 2;
// dataset specific labels / hooks
Expand All @@ -154,6 +180,7 @@ message CreateDatasetRequest {
}
optional string metadata_license_tag = 8;
optional string default_data_license_tag = 9;
repeated storage.models.v2.Author authors = 11;
}

message CreateDatasetResponse {
Expand Down Expand Up @@ -240,4 +267,23 @@ message UpdateDatasetLicensesRequest {

message UpdateDatasetLicensesResponse {
storage.models.v2.Dataset dataset = 1;
}

message UpdateDatasetTitleRequest {
string dataset_id = 1;
string title = 2;
}

message UpdateDatasetTitleResponse {
storage.models.v2.Dataset dataset = 1;
}

message UpdateDatasetAuthorsRequest {
string dataset_id = 1;
repeated storage.models.v2.Author add_authors = 2;
repeated storage.models.v2.Author remove_authors = 3;
}

message UpdateDatasetAuthorsResponse {
storage.models.v2.Dataset dataset = 1;
}
53 changes: 53 additions & 0 deletions aruna/api/storage/services/v2/object_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,30 @@ service ObjectService {
get : "/v2/objects"
};
}

// UpdateTitle
//
// Status: ALPHA
//
// This method updates the title of an object
rpc UpdateObjectTitle(UpdateObjectTitleRequest) returns (UpdateObjectTitleResponse) {
option (google.api.http) = {
post : "/v2/objects/{object_id}/title"
body : "*"
};
}

// UpdateAuthors
//
// Status: ALPHA
//
// This method updates the authors of an object
rpc UpdateObjectAuthors(UpdateObjectAuthorsRequest) returns (UpdateObjectAuthorsResponse) {
option (google.api.http) = {
post : "/v2/objects/{object_id}/authors"
body : "*"
};
}
}

// Models
Expand All @@ -147,6 +171,8 @@ service ObjectService {
message CreateObjectRequest {
// collection name
string name = 1;
// title
string title = 12;
// description
string description = 2;
// collection specific labels / hooks
Expand All @@ -164,6 +190,7 @@ message CreateObjectRequest {
repeated storage.models.v2.Hash hashes = 9;
string metadata_license_tag = 10;
string data_license_tag = 11;
repeated storage.models.v2.Author authors = 13;
}

message CreateObjectResponse {
Expand Down Expand Up @@ -319,3 +346,29 @@ message GetObjectEndpointsRequest {
// Object id
string object_id = 2;
}

message UpdateObjectTitleRequest {
// Object id
string object_id = 1;
// New title
string title = 2;
}

message UpdateObjectTitleResponse {
// The updated object
storage.models.v2.Object object = 1;
}

message UpdateObjectAuthorsRequest {
// Object id
string object_id = 1;
// Add authors
repeated storage.models.v2.Author add_authors = 2;
// Remove authors
repeated storage.models.v2.Author remove_authors = 3;
}

message UpdateObjectAuthorsResponse {
// The updated object
storage.models.v2.Object object = 1;
}

0 comments on commit 6774569

Please sign in to comment.