support delete extensions

This commit is contained in:
Julian Freeman
2026-04-17 14:54:16 -04:00
parent d724db6f0f
commit 469b684876
12 changed files with 1253 additions and 26 deletions

View File

@@ -56,7 +56,7 @@ pub struct ExtensionSummary {
pub version: Option<String>,
pub icon_data_url: Option<String>,
pub profile_ids: Vec<String>,
pub profiles: Vec<AssociatedProfileSummary>,
pub profiles: Vec<ExtensionAssociatedProfileSummary>,
}
#[derive(Serialize)]
@@ -115,6 +115,36 @@ pub struct CleanupHistoryResult {
pub error: Option<String>,
}
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RemoveExtensionsInput {
pub browser_id: String,
pub removals: Vec<ExtensionRemovalRequest>,
}
#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExtensionRemovalRequest {
pub extension_id: String,
pub profile_ids: Vec<String>,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RemoveExtensionsResponse {
pub results: Vec<RemoveExtensionResult>,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RemoveExtensionResult {
pub extension_id: String,
pub profile_id: String,
pub removed_files: Vec<String>,
pub skipped_files: Vec<String>,
pub error: Option<String>,
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct AssociatedProfileSummary {
@@ -127,6 +157,26 @@ pub struct AssociatedProfileSummary {
pub avatar_label: String,
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ExtensionAssociatedProfileSummary {
pub id: String,
pub name: String,
pub avatar_data_url: Option<String>,
pub avatar_icon: Option<String>,
pub default_avatar_fill_color: Option<i64>,
pub default_avatar_stroke_color: Option<i64>,
pub avatar_label: String,
pub install_source: ExtensionInstallSourceSummary,
}
#[derive(Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub enum ExtensionInstallSourceSummary {
Store,
External,
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct BookmarkAssociatedProfileSummary {
@@ -207,7 +257,7 @@ pub struct TempExtension {
pub version: Option<String>,
pub icon_data_url: Option<String>,
pub profile_ids: BTreeSet<String>,
pub profiles: BTreeMap<String, AssociatedProfileSummary>,
pub profiles: BTreeMap<String, ExtensionAssociatedProfileSummary>,
}
pub struct TempBookmark {