aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/fatcat-api-spec/src/lib.rs')
-rw-r--r--rust/fatcat-api-spec/src/lib.rs464
1 files changed, 448 insertions, 16 deletions
diff --git a/rust/fatcat-api-spec/src/lib.rs b/rust/fatcat-api-spec/src/lib.rs
index 1650fbe6..dcc6e813 100644
--- a/rust/fatcat-api-spec/src/lib.rs
+++ b/rust/fatcat-api-spec/src/lib.rs
@@ -69,6 +69,18 @@ pub enum DeleteContainerResponse {
}
#[derive(Debug, PartialEq)]
+pub enum DeleteContainerEditResponse {
+ /// Deleted Edit
+ DeletedEdit(models::Success),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetContainerResponse {
/// Found Entity
FoundEntity(models::ContainerEntity),
@@ -81,6 +93,18 @@ pub enum GetContainerResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetContainerEditResponse {
+ /// Found Edit
+ FoundEdit(models::EntityEdit),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetContainerHistoryResponse {
/// Found Entity History
FoundEntityHistory(Vec<models::EntityHistoryEntry>),
@@ -93,6 +117,30 @@ pub enum GetContainerHistoryResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetContainerRedirectsResponse {
+ /// Found Entity Redirects
+ FoundEntityRedirects(Vec<String>),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
+pub enum GetContainerRevisionResponse {
+ /// Found Entity Revision
+ FoundEntityRevision(models::ContainerEntity),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum LookupContainerResponse {
/// Found Entity
FoundEntity(models::ContainerEntity),
@@ -153,6 +201,18 @@ pub enum DeleteCreatorResponse {
}
#[derive(Debug, PartialEq)]
+pub enum DeleteCreatorEditResponse {
+ /// Deleted Edit
+ DeletedEdit(models::Success),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetCreatorResponse {
/// Found Entity
FoundEntity(models::CreatorEntity),
@@ -165,6 +225,18 @@ pub enum GetCreatorResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetCreatorEditResponse {
+ /// Found Edit
+ FoundEdit(models::EntityEdit),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetCreatorHistoryResponse {
/// Found Entity History
FoundEntityHistory(Vec<models::EntityHistoryEntry>),
@@ -177,6 +249,18 @@ pub enum GetCreatorHistoryResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetCreatorRedirectsResponse {
+ /// Found Entity Redirects
+ FoundEntityRedirects(Vec<String>),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetCreatorReleasesResponse {
/// Found
Found(Vec<models::ReleaseEntity>),
@@ -189,6 +273,18 @@ pub enum GetCreatorReleasesResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetCreatorRevisionResponse {
+ /// Found Entity Revision
+ FoundEntityRevision(models::CreatorEntity),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum LookupCreatorResponse {
/// Found Entity
FoundEntity(models::CreatorEntity),
@@ -335,6 +431,18 @@ pub enum DeleteFileResponse {
}
#[derive(Debug, PartialEq)]
+pub enum DeleteFileEditResponse {
+ /// Deleted Edit
+ DeletedEdit(models::Success),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetFileResponse {
/// Found Entity
FoundEntity(models::FileEntity),
@@ -347,6 +455,18 @@ pub enum GetFileResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetFileEditResponse {
+ /// Found Edit
+ FoundEdit(models::EntityEdit),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetFileHistoryResponse {
/// Found Entity History
FoundEntityHistory(Vec<models::EntityHistoryEntry>),
@@ -359,6 +479,30 @@ pub enum GetFileHistoryResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetFileRedirectsResponse {
+ /// Found Entity Redirects
+ FoundEntityRedirects(Vec<String>),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
+pub enum GetFileRevisionResponse {
+ /// Found Entity Revision
+ FoundEntityRevision(models::FileEntity),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum LookupFileResponse {
/// Found Entity
FoundEntity(models::FileEntity),
@@ -431,6 +575,18 @@ pub enum DeleteReleaseResponse {
}
#[derive(Debug, PartialEq)]
+pub enum DeleteReleaseEditResponse {
+ /// Deleted Edit
+ DeletedEdit(models::Success),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetReleaseResponse {
/// Found Entity
FoundEntity(models::ReleaseEntity),
@@ -443,6 +599,18 @@ pub enum GetReleaseResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetReleaseEditResponse {
+ /// Found Edit
+ FoundEdit(models::EntityEdit),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetReleaseFilesResponse {
/// Found
Found(Vec<models::FileEntity>),
@@ -467,6 +635,30 @@ pub enum GetReleaseHistoryResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetReleaseRedirectsResponse {
+ /// Found Entity Redirects
+ FoundEntityRedirects(Vec<String>),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
+pub enum GetReleaseRevisionResponse {
+ /// Found Entity Revision
+ FoundEntityRevision(models::ReleaseEntity),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum LookupReleaseResponse {
/// Found Entity
FoundEntity(models::ReleaseEntity),
@@ -515,6 +707,18 @@ pub enum DeleteWorkResponse {
}
#[derive(Debug, PartialEq)]
+pub enum DeleteWorkEditResponse {
+ /// Deleted Edit
+ DeletedEdit(models::Success),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetWorkResponse {
/// Found Entity
FoundEntity(models::WorkEntity),
@@ -527,6 +731,18 @@ pub enum GetWorkResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetWorkEditResponse {
+ /// Found Edit
+ FoundEdit(models::EntityEdit),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetWorkHistoryResponse {
/// Found Entity History
FoundEntityHistory(Vec<models::EntityHistoryEntry>),
@@ -539,6 +755,18 @@ pub enum GetWorkHistoryResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetWorkRedirectsResponse {
+ /// Found Entity Redirects
+ FoundEntityRedirects(Vec<String>),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum GetWorkReleasesResponse {
/// Found
Found(Vec<models::ReleaseEntity>),
@@ -551,6 +779,18 @@ pub enum GetWorkReleasesResponse {
}
#[derive(Debug, PartialEq)]
+pub enum GetWorkRevisionResponse {
+ /// Found Entity Revision
+ FoundEntityRevision(models::WorkEntity),
+ /// Bad Request
+ BadRequest(models::ErrorResponse),
+ /// Not Found
+ NotFound(models::ErrorResponse),
+ /// Generic Error
+ GenericError(models::ErrorResponse),
+}
+
+#[derive(Debug, PartialEq)]
pub enum UpdateWorkResponse {
/// Updated Entity
UpdatedEntity(models::EntityEdit),
@@ -576,11 +816,19 @@ pub trait Api {
fn delete_container(&self, id: String, editgroup: Option<String>, context: &Context) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send>;
+ fn delete_container_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send>;
+
fn get_container(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetContainerResponse, Error = ApiError> + Send>;
+ fn get_container_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetContainerEditResponse, Error = ApiError> + Send>;
+
fn get_container_history(&self, id: String, limit: Option<i64>, context: &Context) -> Box<Future<Item = GetContainerHistoryResponse, Error = ApiError> + Send>;
- fn lookup_container(&self, issnl: String, hide: Option<String>, context: &Context) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send>;
+ fn get_container_redirects(&self, id: String, context: &Context) -> Box<Future<Item = GetContainerRedirectsResponse, Error = ApiError> + Send>;
+
+ fn get_container_revision(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetContainerRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_container(&self, issnl: Option<String>, wikidata_qid: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send>;
fn update_container(&self, id: String, entity: models::ContainerEntity, editgroup: Option<String>, context: &Context) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send>;
@@ -596,13 +844,21 @@ pub trait Api {
fn delete_creator(&self, id: String, editgroup: Option<String>, context: &Context) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send>;
+ fn delete_creator_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send>;
+
fn get_creator(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetCreatorResponse, Error = ApiError> + Send>;
+ fn get_creator_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetCreatorEditResponse, Error = ApiError> + Send>;
+
fn get_creator_history(&self, id: String, limit: Option<i64>, context: &Context) -> Box<Future<Item = GetCreatorHistoryResponse, Error = ApiError> + Send>;
+ fn get_creator_redirects(&self, id: String, context: &Context) -> Box<Future<Item = GetCreatorRedirectsResponse, Error = ApiError> + Send>;
+
fn get_creator_releases(&self, id: String, hide: Option<String>, context: &Context) -> Box<Future<Item = GetCreatorReleasesResponse, Error = ApiError> + Send>;
- fn lookup_creator(&self, orcid: String, hide: Option<String>, context: &Context) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send>;
+ fn get_creator_revision(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetCreatorRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_creator(&self, orcid: Option<String>, wikidata_qid: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send>;
fn update_creator(&self, id: String, entity: models::CreatorEntity, editgroup: Option<String>, context: &Context) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send>;
@@ -634,11 +890,26 @@ pub trait Api {
fn delete_file(&self, id: String, editgroup: Option<String>, context: &Context) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send>;
+ fn delete_file_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send>;
+
fn get_file(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetFileResponse, Error = ApiError> + Send>;
+ fn get_file_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetFileEditResponse, Error = ApiError> + Send>;
+
fn get_file_history(&self, id: String, limit: Option<i64>, context: &Context) -> Box<Future<Item = GetFileHistoryResponse, Error = ApiError> + Send>;
- fn lookup_file(&self, sha1: String, hide: Option<String>, context: &Context) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send>;
+ fn get_file_redirects(&self, id: String, context: &Context) -> Box<Future<Item = GetFileRedirectsResponse, Error = ApiError> + Send>;
+
+ fn get_file_revision(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetFileRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_file(
+ &self,
+ md5: Option<String>,
+ sha1: Option<String>,
+ sha256: Option<String>,
+ hide: Option<String>,
+ context: &Context,
+ ) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send>;
fn update_file(&self, id: String, entity: models::FileEntity, editgroup: Option<String>, context: &Context) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send>;
@@ -656,13 +927,30 @@ pub trait Api {
fn delete_release(&self, id: String, editgroup: Option<String>, context: &Context) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send>;
+ fn delete_release_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send>;
+
fn get_release(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetReleaseResponse, Error = ApiError> + Send>;
+ fn get_release_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetReleaseEditResponse, Error = ApiError> + Send>;
+
fn get_release_files(&self, id: String, hide: Option<String>, context: &Context) -> Box<Future<Item = GetReleaseFilesResponse, Error = ApiError> + Send>;
fn get_release_history(&self, id: String, limit: Option<i64>, context: &Context) -> Box<Future<Item = GetReleaseHistoryResponse, Error = ApiError> + Send>;
- fn lookup_release(&self, doi: String, hide: Option<String>, context: &Context) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send>;
+ fn get_release_redirects(&self, id: String, context: &Context) -> Box<Future<Item = GetReleaseRedirectsResponse, Error = ApiError> + Send>;
+
+ fn get_release_revision(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetReleaseRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_release(
+ &self,
+ doi: Option<String>,
+ wikidata_qid: Option<String>,
+ isbn13: Option<String>,
+ pmid: Option<String>,
+ pmcid: Option<String>,
+ hide: Option<String>,
+ context: &Context,
+ ) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send>;
fn update_release(&self, id: String, entity: models::ReleaseEntity, editgroup: Option<String>, context: &Context) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send>;
@@ -676,12 +964,20 @@ pub trait Api {
fn delete_work(&self, id: String, editgroup: Option<String>, context: &Context) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send>;
+ fn delete_work_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send>;
+
fn get_work(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetWorkResponse, Error = ApiError> + Send>;
+ fn get_work_edit(&self, edit_id: i64, context: &Context) -> Box<Future<Item = GetWorkEditResponse, Error = ApiError> + Send>;
+
fn get_work_history(&self, id: String, limit: Option<i64>, context: &Context) -> Box<Future<Item = GetWorkHistoryResponse, Error = ApiError> + Send>;
+ fn get_work_redirects(&self, id: String, context: &Context) -> Box<Future<Item = GetWorkRedirectsResponse, Error = ApiError> + Send>;
+
fn get_work_releases(&self, id: String, hide: Option<String>, context: &Context) -> Box<Future<Item = GetWorkReleasesResponse, Error = ApiError> + Send>;
+ fn get_work_revision(&self, id: String, expand: Option<String>, hide: Option<String>, context: &Context) -> Box<Future<Item = GetWorkRevisionResponse, Error = ApiError> + Send>;
+
fn update_work(&self, id: String, entity: models::WorkEntity, editgroup: Option<String>, context: &Context) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send>;
}
@@ -698,11 +994,19 @@ pub trait ApiNoContext {
fn delete_container(&self, id: String, editgroup: Option<String>) -> Box<Future<Item = DeleteContainerResponse, Error = ApiError> + Send>;
+ fn delete_container_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send>;
+
fn get_container(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetContainerResponse, Error = ApiError> + Send>;
+ fn get_container_edit(&self, edit_id: i64) -> Box<Future<Item = GetContainerEditResponse, Error = ApiError> + Send>;
+
fn get_container_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetContainerHistoryResponse, Error = ApiError> + Send>;
- fn lookup_container(&self, issnl: String, hide: Option<String>) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send>;
+ fn get_container_redirects(&self, id: String) -> Box<Future<Item = GetContainerRedirectsResponse, Error = ApiError> + Send>;
+
+ fn get_container_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetContainerRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_container(&self, issnl: Option<String>, wikidata_qid: Option<String>, hide: Option<String>) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send>;
fn update_container(&self, id: String, entity: models::ContainerEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send>;
@@ -717,13 +1021,21 @@ pub trait ApiNoContext {
fn delete_creator(&self, id: String, editgroup: Option<String>) -> Box<Future<Item = DeleteCreatorResponse, Error = ApiError> + Send>;
+ fn delete_creator_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send>;
+
fn get_creator(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetCreatorResponse, Error = ApiError> + Send>;
+ fn get_creator_edit(&self, edit_id: i64) -> Box<Future<Item = GetCreatorEditResponse, Error = ApiError> + Send>;
+
fn get_creator_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetCreatorHistoryResponse, Error = ApiError> + Send>;
+ fn get_creator_redirects(&self, id: String) -> Box<Future<Item = GetCreatorRedirectsResponse, Error = ApiError> + Send>;
+
fn get_creator_releases(&self, id: String, hide: Option<String>) -> Box<Future<Item = GetCreatorReleasesResponse, Error = ApiError> + Send>;
- fn lookup_creator(&self, orcid: String, hide: Option<String>) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send>;
+ fn get_creator_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetCreatorRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_creator(&self, orcid: Option<String>, wikidata_qid: Option<String>, hide: Option<String>) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send>;
fn update_creator(&self, id: String, entity: models::CreatorEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send>;
@@ -749,11 +1061,19 @@ pub trait ApiNoContext {
fn delete_file(&self, id: String, editgroup: Option<String>) -> Box<Future<Item = DeleteFileResponse, Error = ApiError> + Send>;
+ fn delete_file_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send>;
+
fn get_file(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFileResponse, Error = ApiError> + Send>;
+ fn get_file_edit(&self, edit_id: i64) -> Box<Future<Item = GetFileEditResponse, Error = ApiError> + Send>;
+
fn get_file_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetFileHistoryResponse, Error = ApiError> + Send>;
- fn lookup_file(&self, sha1: String, hide: Option<String>) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send>;
+ fn get_file_redirects(&self, id: String) -> Box<Future<Item = GetFileRedirectsResponse, Error = ApiError> + Send>;
+
+ fn get_file_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFileRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_file(&self, md5: Option<String>, sha1: Option<String>, sha256: Option<String>, hide: Option<String>) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send>;
fn update_file(&self, id: String, entity: models::FileEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send>;
@@ -770,13 +1090,29 @@ pub trait ApiNoContext {
fn delete_release(&self, id: String, editgroup: Option<String>) -> Box<Future<Item = DeleteReleaseResponse, Error = ApiError> + Send>;
+ fn delete_release_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send>;
+
fn get_release(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetReleaseResponse, Error = ApiError> + Send>;
+ fn get_release_edit(&self, edit_id: i64) -> Box<Future<Item = GetReleaseEditResponse, Error = ApiError> + Send>;
+
fn get_release_files(&self, id: String, hide: Option<String>) -> Box<Future<Item = GetReleaseFilesResponse, Error = ApiError> + Send>;
fn get_release_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetReleaseHistoryResponse, Error = ApiError> + Send>;
- fn lookup_release(&self, doi: String, hide: Option<String>) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send>;
+ fn get_release_redirects(&self, id: String) -> Box<Future<Item = GetReleaseRedirectsResponse, Error = ApiError> + Send>;
+
+ fn get_release_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetReleaseRevisionResponse, Error = ApiError> + Send>;
+
+ fn lookup_release(
+ &self,
+ doi: Option<String>,
+ wikidata_qid: Option<String>,
+ isbn13: Option<String>,
+ pmid: Option<String>,
+ pmcid: Option<String>,
+ hide: Option<String>,
+ ) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send>;
fn update_release(&self, id: String, entity: models::ReleaseEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send>;
@@ -784,12 +1120,20 @@ pub trait ApiNoContext {
fn delete_work(&self, id: String, editgroup: Option<String>) -> Box<Future<Item = DeleteWorkResponse, Error = ApiError> + Send>;
+ fn delete_work_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send>;
+
fn get_work(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWorkResponse, Error = ApiError> + Send>;
+ fn get_work_edit(&self, edit_id: i64) -> Box<Future<Item = GetWorkEditResponse, Error = ApiError> + Send>;
+
fn get_work_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetWorkHistoryResponse, Error = ApiError> + Send>;
+ fn get_work_redirects(&self, id: String) -> Box<Future<Item = GetWorkRedirectsResponse, Error = ApiError> + Send>;
+
fn get_work_releases(&self, id: String, hide: Option<String>) -> Box<Future<Item = GetWorkReleasesResponse, Error = ApiError> + Send>;
+ fn get_work_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWorkRevisionResponse, Error = ApiError> + Send>;
+
fn update_work(&self, id: String, entity: models::WorkEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send>;
}
@@ -826,16 +1170,32 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().delete_container(id, editgroup, &self.context())
}
+ fn delete_container_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteContainerEditResponse, Error = ApiError> + Send> {
+ self.api().delete_container_edit(edit_id, &self.context())
+ }
+
fn get_container(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetContainerResponse, Error = ApiError> + Send> {
self.api().get_container(id, expand, hide, &self.context())
}
+ fn get_container_edit(&self, edit_id: i64) -> Box<Future<Item = GetContainerEditResponse, Error = ApiError> + Send> {
+ self.api().get_container_edit(edit_id, &self.context())
+ }
+
fn get_container_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetContainerHistoryResponse, Error = ApiError> + Send> {
self.api().get_container_history(id, limit, &self.context())
}
- fn lookup_container(&self, issnl: String, hide: Option<String>) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send> {
- self.api().lookup_container(issnl, hide, &self.context())
+ fn get_container_redirects(&self, id: String) -> Box<Future<Item = GetContainerRedirectsResponse, Error = ApiError> + Send> {
+ self.api().get_container_redirects(id, &self.context())
+ }
+
+ fn get_container_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetContainerRevisionResponse, Error = ApiError> + Send> {
+ self.api().get_container_revision(id, expand, hide, &self.context())
+ }
+
+ fn lookup_container(&self, issnl: Option<String>, wikidata_qid: Option<String>, hide: Option<String>) -> Box<Future<Item = LookupContainerResponse, Error = ApiError> + Send> {
+ self.api().lookup_container(issnl, wikidata_qid, hide, &self.context())
}
fn update_container(&self, id: String, entity: models::ContainerEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateContainerResponse, Error = ApiError> + Send> {
@@ -859,20 +1219,36 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().delete_creator(id, editgroup, &self.context())
}
+ fn delete_creator_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteCreatorEditResponse, Error = ApiError> + Send> {
+ self.api().delete_creator_edit(edit_id, &self.context())
+ }
+
fn get_creator(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetCreatorResponse, Error = ApiError> + Send> {
self.api().get_creator(id, expand, hide, &self.context())
}
+ fn get_creator_edit(&self, edit_id: i64) -> Box<Future<Item = GetCreatorEditResponse, Error = ApiError> + Send> {
+ self.api().get_creator_edit(edit_id, &self.context())
+ }
+
fn get_creator_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetCreatorHistoryResponse, Error = ApiError> + Send> {
self.api().get_creator_history(id, limit, &self.context())
}
+ fn get_creator_redirects(&self, id: String) -> Box<Future<Item = GetCreatorRedirectsResponse, Error = ApiError> + Send> {
+ self.api().get_creator_redirects(id, &self.context())
+ }
+
fn get_creator_releases(&self, id: String, hide: Option<String>) -> Box<Future<Item = GetCreatorReleasesResponse, Error = ApiError> + Send> {
self.api().get_creator_releases(id, hide, &self.context())
}
- fn lookup_creator(&self, orcid: String, hide: Option<String>) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send> {
- self.api().lookup_creator(orcid, hide, &self.context())
+ fn get_creator_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetCreatorRevisionResponse, Error = ApiError> + Send> {
+ self.api().get_creator_revision(id, expand, hide, &self.context())
+ }
+
+ fn lookup_creator(&self, orcid: Option<String>, wikidata_qid: Option<String>, hide: Option<String>) -> Box<Future<Item = LookupCreatorResponse, Error = ApiError> + Send> {
+ self.api().lookup_creator(orcid, wikidata_qid, hide, &self.context())
}
fn update_creator(&self, id: String, entity: models::CreatorEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateCreatorResponse, Error = ApiError> + Send> {
@@ -923,16 +1299,32 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().delete_file(id, editgroup, &self.context())
}
+ fn delete_file_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteFileEditResponse, Error = ApiError> + Send> {
+ self.api().delete_file_edit(edit_id, &self.context())
+ }
+
fn get_file(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFileResponse, Error = ApiError> + Send> {
self.api().get_file(id, expand, hide, &self.context())
}
+ fn get_file_edit(&self, edit_id: i64) -> Box<Future<Item = GetFileEditResponse, Error = ApiError> + Send> {
+ self.api().get_file_edit(edit_id, &self.context())
+ }
+
fn get_file_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetFileHistoryResponse, Error = ApiError> + Send> {
self.api().get_file_history(id, limit, &self.context())
}
- fn lookup_file(&self, sha1: String, hide: Option<String>) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send> {
- self.api().lookup_file(sha1, hide, &self.context())
+ fn get_file_redirects(&self, id: String) -> Box<Future<Item = GetFileRedirectsResponse, Error = ApiError> + Send> {
+ self.api().get_file_redirects(id, &self.context())
+ }
+
+ fn get_file_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetFileRevisionResponse, Error = ApiError> + Send> {
+ self.api().get_file_revision(id, expand, hide, &self.context())
+ }
+
+ fn lookup_file(&self, md5: Option<String>, sha1: Option<String>, sha256: Option<String>, hide: Option<String>) -> Box<Future<Item = LookupFileResponse, Error = ApiError> + Send> {
+ self.api().lookup_file(md5, sha1, sha256, hide, &self.context())
}
fn update_file(&self, id: String, entity: models::FileEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateFileResponse, Error = ApiError> + Send> {
@@ -960,10 +1352,18 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().delete_release(id, editgroup, &self.context())
}
+ fn delete_release_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteReleaseEditResponse, Error = ApiError> + Send> {
+ self.api().delete_release_edit(edit_id, &self.context())
+ }
+
fn get_release(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetReleaseResponse, Error = ApiError> + Send> {
self.api().get_release(id, expand, hide, &self.context())
}
+ fn get_release_edit(&self, edit_id: i64) -> Box<Future<Item = GetReleaseEditResponse, Error = ApiError> + Send> {
+ self.api().get_release_edit(edit_id, &self.context())
+ }
+
fn get_release_files(&self, id: String, hide: Option<String>) -> Box<Future<Item = GetReleaseFilesResponse, Error = ApiError> + Send> {
self.api().get_release_files(id, hide, &self.context())
}
@@ -972,8 +1372,24 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().get_release_history(id, limit, &self.context())
}
- fn lookup_release(&self, doi: String, hide: Option<String>) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send> {
- self.api().lookup_release(doi, hide, &self.context())
+ fn get_release_redirects(&self, id: String) -> Box<Future<Item = GetReleaseRedirectsResponse, Error = ApiError> + Send> {
+ self.api().get_release_redirects(id, &self.context())
+ }
+
+ fn get_release_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetReleaseRevisionResponse, Error = ApiError> + Send> {
+ self.api().get_release_revision(id, expand, hide, &self.context())
+ }
+
+ fn lookup_release(
+ &self,
+ doi: Option<String>,
+ wikidata_qid: Option<String>,
+ isbn13: Option<String>,
+ pmid: Option<String>,
+ pmcid: Option<String>,
+ hide: Option<String>,
+ ) -> Box<Future<Item = LookupReleaseResponse, Error = ApiError> + Send> {
+ self.api().lookup_release(doi, wikidata_qid, isbn13, pmid, pmcid, hide, &self.context())
}
fn update_release(&self, id: String, entity: models::ReleaseEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateReleaseResponse, Error = ApiError> + Send> {
@@ -988,18 +1404,34 @@ impl<'a, T: Api> ApiNoContext for ContextWrapper<'a, T> {
self.api().delete_work(id, editgroup, &self.context())
}
+ fn delete_work_edit(&self, edit_id: i64) -> Box<Future<Item = DeleteWorkEditResponse, Error = ApiError> + Send> {
+ self.api().delete_work_edit(edit_id, &self.context())
+ }
+
fn get_work(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWorkResponse, Error = ApiError> + Send> {
self.api().get_work(id, expand, hide, &self.context())
}
+ fn get_work_edit(&self, edit_id: i64) -> Box<Future<Item = GetWorkEditResponse, Error = ApiError> + Send> {
+ self.api().get_work_edit(edit_id, &self.context())
+ }
+
fn get_work_history(&self, id: String, limit: Option<i64>) -> Box<Future<Item = GetWorkHistoryResponse, Error = ApiError> + Send> {
self.api().get_work_history(id, limit, &self.context())
}
+ fn get_work_redirects(&self, id: String) -> Box<Future<Item = GetWorkRedirectsResponse, Error = ApiError> + Send> {
+ self.api().get_work_redirects(id, &self.context())
+ }
+
fn get_work_releases(&self, id: String, hide: Option<String>) -> Box<Future<Item = GetWorkReleasesResponse, Error = ApiError> + Send> {
self.api().get_work_releases(id, hide, &self.context())
}
+ fn get_work_revision(&self, id: String, expand: Option<String>, hide: Option<String>) -> Box<Future<Item = GetWorkRevisionResponse, Error = ApiError> + Send> {
+ self.api().get_work_revision(id, expand, hide, &self.context())
+ }
+
fn update_work(&self, id: String, entity: models::WorkEntity, editgroup: Option<String>) -> Box<Future<Item = UpdateWorkResponse, Error = ApiError> + Send> {
self.api().update_work(id, entity, editgroup, &self.context())
}