Consolidate more extension API structs that were duplicated btwn client and server (#9797)
Release Notes: - N/A
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
pub struct ExtensionApiManifest {
|
||||
pub name: String,
|
||||
pub version: String,
|
||||
pub version: Arc<str>,
|
||||
pub description: Option<String>,
|
||||
pub authors: Vec<String>,
|
||||
pub repository: String,
|
||||
@@ -12,11 +13,16 @@ pub struct ExtensionApiManifest {
|
||||
pub wasm_api_version: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
pub struct ExtensionMetadata {
|
||||
pub id: String,
|
||||
pub id: Arc<str>,
|
||||
#[serde(flatten)]
|
||||
pub manifest: ExtensionApiManifest,
|
||||
pub published_at: DateTime<Utc>,
|
||||
pub download_count: u64,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct GetExtensionsResponse {
|
||||
pub data: Vec<ExtensionMetadata>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user