From 8f737df0d0531124b1d8e84aec853a0af56f778c Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 28 Jan 2025 11:05:31 +0100 Subject: [PATCH] Network types --- crates/meilisearch-types/src/features.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/meilisearch-types/src/features.rs b/crates/meilisearch-types/src/features.rs index 7cdf8f1cf..22240c4ec 100644 --- a/crates/meilisearch-types/src/features.rs +++ b/crates/meilisearch-types/src/features.rs @@ -1,3 +1,5 @@ +use std::collections::BTreeMap; + use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone, Copy, Default, PartialEq, Eq)] @@ -16,3 +18,18 @@ pub struct InstanceTogglableFeatures { pub logs_route: bool, pub contains_filter: bool, } + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct Remote { + pub url: String, + pub search_api_key: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default)] +#[serde(rename_all = "camelCase")] +pub struct Network { + #[serde(rename = "self")] + pub local: Option, + pub remotes: BTreeMap, +}