Consolidate more extension API structs that were duplicated btwn client and server (#9797)
Release Notes: - N/A
This commit is contained in:
parent
5e7fcc02fa
commit
b0409ddd68
6 changed files with 35 additions and 47 deletions
|
@ -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>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue