Skip to main content

vta_sdk/protocols/context_management/
delete.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
5pub struct DeleteContextBody {
6    pub id: String,
7    #[serde(default)]
8    pub force: bool,
9}
10
11#[derive(Debug, Clone, Serialize, Deserialize)]
12#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
13pub struct DeleteContextResultBody {
14    pub id: String,
15    pub deleted: bool,
16}
17
18/// Summary of resources that will be removed when deleting a context.
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
21pub struct DeleteContextPreviewBody {
22    pub id: String,
23}
24
25#[derive(Debug, Clone, Default, Serialize, Deserialize)]
26#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
27pub struct DeleteContextPreviewResultBody {
28    pub id: String,
29    pub keys: Vec<String>,
30    pub webvh_dids: Vec<String>,
31    /// ACL entries that will be deleted (only have this context).
32    pub acl_entries_removed: Vec<String>,
33    /// ACL entries that will have this context removed from their allowed list.
34    pub acl_entries_updated: Vec<String>,
35    /// DID templates scoped to this context that will be deleted.
36    #[serde(default)]
37    pub did_templates: Vec<String>,
38}