azure_devops/work_items/methods/destroy.rs
1use super::super::models::WorkItemDelete;
2use super::super::WorkItemsClient;
3use crate::constants;
4use crate::constants::ApiPath;
5use crate::error::Result;
6
7impl WorkItemsClient<'_> {
8 /// Permanently destroy a work item (bypasses the recycle bin).
9 ///
10 /// # Arguments
11 ///
12 /// * `id` — The work item ID to permanently delete.
13 ///
14 /// # Returns
15 ///
16 /// A [`WorkItemDelete`] confirming the permanent deletion.
17 pub async fn destroy(&self, id: i64) -> Result<WorkItemDelete> {
18 let p = ApiPath::work_item(id);
19 self.http
20 .delete(&p, &[(constants::query::DESTROY, constants::query::TRUE)])
21 .await
22 }
23}