A better Rust ATProto crate
at main 12 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.ocho.plugin.defs 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod get_launch_asset; 9pub mod get_manifest; 10pub mod put_hosting_url; 11pub mod service; 12 13#[jacquard_derive::lexicon] 14#[derive( 15 serde::Serialize, 16 serde::Deserialize, 17 Debug, 18 Clone, 19 PartialEq, 20 Eq, 21 jacquard_derive::IntoStatic, 22 Default 23)] 24#[serde(rename_all = "camelCase")] 25pub struct AdaptiveIcon<'a> { 26 /// The background color of the adaptive icon. 27 #[serde(skip_serializing_if = "std::option::Option::is_none")] 28 #[serde(borrow)] 29 pub background_color: std::option::Option<jacquard_common::CowStr<'a>>, 30 /// The URL to the foreground image of the adaptive icon. 31 #[serde(skip_serializing_if = "std::option::Option::is_none")] 32 #[serde(borrow)] 33 pub foreground_image: std::option::Option<jacquard_common::CowStr<'a>>, 34 #[serde(skip_serializing_if = "std::option::Option::is_none")] 35 #[serde(borrow)] 36 pub foreground_image_blob: std::option::Option< 37 jacquard_common::types::blob::Blob<'a>, 38 >, 39} 40 41#[jacquard_derive::lexicon] 42#[derive( 43 serde::Serialize, 44 serde::Deserialize, 45 Debug, 46 Clone, 47 PartialEq, 48 Eq, 49 jacquard_derive::IntoStatic, 50 Default 51)] 52#[serde(rename_all = "camelCase")] 53pub struct Android<'a> { 54 /// Configuration for the adaptive icon on Android. 55 #[serde(skip_serializing_if = "std::option::Option::is_none")] 56 #[serde(borrow)] 57 pub adaptive_icon: std::option::Option<crate::app_ocho::plugin::AdaptiveIcon<'a>>, 58 /// Whether edge-to-edge mode is enabled for the app. 59 #[serde(skip_serializing_if = "std::option::Option::is_none")] 60 pub edge_to_edge_enabled: std::option::Option<bool>, 61} 62 63/// Android status bar configuration. 64#[jacquard_derive::lexicon] 65#[derive( 66 serde::Serialize, 67 serde::Deserialize, 68 Debug, 69 Clone, 70 PartialEq, 71 Eq, 72 jacquard_derive::IntoStatic, 73 Default 74)] 75#[serde(rename_all = "camelCase")] 76pub struct AndroidStatusBar<'a> { 77 /// The background color of the Android status bar. 78 #[serde(skip_serializing_if = "std::option::Option::is_none")] 79 #[serde(borrow)] 80 pub background_color: std::option::Option<jacquard_common::CowStr<'a>>, 81} 82 83#[jacquard_derive::lexicon] 84#[derive( 85 serde::Serialize, 86 serde::Deserialize, 87 Debug, 88 Clone, 89 PartialEq, 90 Eq, 91 jacquard_derive::IntoStatic, 92 bon::Builder 93)] 94#[serde(rename_all = "camelCase")] 95pub struct Asset<'a> { 96 /// The blob of the asset 97 #[serde(borrow)] 98 pub blob: jacquard_common::types::blob::Blob<'a>, 99 /// The hash of the asset 100 #[serde(borrow)] 101 #[builder(into)] 102 pub hash: jacquard_common::CowStr<'a>, 103 /// The type of the asset 104 #[serde(borrow)] 105 #[builder(into)] 106 pub r#type: jacquard_common::CowStr<'a>, 107 /// The date and time when this asset was last updated. Used to reset the jetstream cache, among other things. 108 #[serde(skip_serializing_if = "std::option::Option::is_none")] 109 #[builder(into)] 110 pub updated_at: Option<jacquard_common::types::string::Datetime>, 111} 112 113#[jacquard_derive::lexicon] 114#[derive( 115 serde::Serialize, 116 serde::Deserialize, 117 Debug, 118 Clone, 119 PartialEq, 120 Eq, 121 jacquard_derive::IntoStatic, 122 Default 123)] 124#[serde(rename_all = "camelCase")] 125pub struct Db<'a> { 126 /// The ID of the database. 127 #[serde(borrow)] 128 pub id: jacquard_common::CowStr<'a>, 129} 130 131#[jacquard_derive::lexicon] 132#[derive( 133 serde::Serialize, 134 serde::Deserialize, 135 Debug, 136 Clone, 137 PartialEq, 138 Eq, 139 jacquard_derive::IntoStatic, 140 Default 141)] 142#[serde(rename_all = "camelCase")] 143pub struct Developer<'a> { 144 /// The tool used for development, e.g., 'expo-cli'. 145 #[serde(borrow)] 146 pub tool: jacquard_common::CowStr<'a>, 147} 148 149#[jacquard_derive::lexicon] 150#[derive( 151 serde::Serialize, 152 serde::Deserialize, 153 Debug, 154 Clone, 155 PartialEq, 156 Eq, 157 jacquard_derive::IntoStatic, 158 Default 159)] 160#[serde(rename_all = "camelCase")] 161pub struct ExpoClient<'a> { 162 /// Android-specific configuration for the app. 163 #[serde(skip_serializing_if = "std::option::Option::is_none")] 164 #[serde(borrow)] 165 pub android: std::option::Option<crate::app_ocho::plugin::Android<'a>>, 166 /// Configuration for the Android status bar. 167 #[serde(skip_serializing_if = "std::option::Option::is_none")] 168 #[serde(borrow)] 169 pub android_status_bar: std::option::Option< 170 crate::app_ocho::plugin::AndroidStatusBar<'a>, 171 >, 172 /// Experimental features enabled for the app. 173 #[serde(skip_serializing_if = "std::option::Option::is_none")] 174 #[serde(borrow)] 175 pub expirements: std::option::Option<jacquard_common::types::value::Data<'a>>, 176 /// Additional configuration for the app. 177 #[serde(skip_serializing_if = "std::option::Option::is_none")] 178 #[serde(borrow)] 179 pub extra: std::option::Option<jacquard_common::types::value::Data<'a>>, 180 /// The URL to the app icon. 181 #[serde(skip_serializing_if = "std::option::Option::is_none")] 182 #[serde(borrow)] 183 pub icon: std::option::Option<jacquard_common::CowStr<'a>>, 184 /// ios-specific configuration for the app. 185 #[serde(skip_serializing_if = "std::option::Option::is_none")] 186 #[serde(borrow)] 187 pub ios: std::option::Option<crate::app_ocho::plugin::Ios<'a>>, 188 /// Localization settings for the app. 189 #[serde(skip_serializing_if = "std::option::Option::is_none")] 190 #[serde(borrow)] 191 pub locales: std::option::Option<jacquard_common::types::value::Data<'a>>, 192 /// The name of the Expo client application. 193 #[serde(borrow)] 194 pub name: jacquard_common::CowStr<'a>, 195 /// Whether the new architecture is enabled for the app. 196 #[serde(skip_serializing_if = "std::option::Option::is_none")] 197 pub new_arch_enabled: std::option::Option<bool>, 198 /// The default orientation of the app. 199 #[serde(skip_serializing_if = "std::option::Option::is_none")] 200 #[serde(borrow)] 201 pub orientation: std::option::Option<jacquard_common::CowStr<'a>>, 202 /// The platforms supported by the app. 203 #[serde(skip_serializing_if = "std::option::Option::is_none")] 204 #[serde(borrow)] 205 pub platforms: std::option::Option<Vec<jacquard_common::CowStr<'a>>>, 206 /// A list of plugins used by the app. 207 #[serde(skip_serializing_if = "std::option::Option::is_none")] 208 #[serde(borrow)] 209 pub plugins: std::option::Option<jacquard_common::types::value::Data<'a>>, 210 /// The custom URI scheme for deep linking. 211 #[serde(skip_serializing_if = "std::option::Option::is_none")] 212 #[serde(borrow)] 213 pub scheme: std::option::Option<jacquard_common::CowStr<'a>>, 214 /// The SDK version of the Expo client. 215 #[serde(skip_serializing_if = "std::option::Option::is_none")] 216 #[serde(borrow)] 217 pub sdk_version: std::option::Option<jacquard_common::CowStr<'a>>, 218 /// A URL-friendly identifier for the app. 219 #[serde(borrow)] 220 pub slug: jacquard_common::CowStr<'a>, 221 /// The default user interface style. 222 #[serde(skip_serializing_if = "std::option::Option::is_none")] 223 #[serde(borrow)] 224 pub user_interface_style: std::option::Option<jacquard_common::CowStr<'a>>, 225 /// The version of the app. 226 #[serde(skip_serializing_if = "std::option::Option::is_none")] 227 #[serde(borrow)] 228 pub version: std::option::Option<jacquard_common::CowStr<'a>>, 229 /// Web-specific configuration for the app. 230 #[serde(skip_serializing_if = "std::option::Option::is_none")] 231 #[serde(borrow)] 232 pub web: std::option::Option<crate::app_ocho::plugin::Web<'a>>, 233} 234 235#[jacquard_derive::lexicon] 236#[derive( 237 serde::Serialize, 238 serde::Deserialize, 239 Debug, 240 Clone, 241 PartialEq, 242 Eq, 243 jacquard_derive::IntoStatic, 244 bon::Builder 245)] 246#[serde(rename_all = "camelCase")] 247pub struct ExpoGo<'a> { 248 /// Developer-specific configuration for the Expo Go app. 249 #[serde(borrow)] 250 pub developer: crate::app_ocho::plugin::Developer<'a>, 251} 252 253#[jacquard_derive::lexicon] 254#[derive( 255 serde::Serialize, 256 serde::Deserialize, 257 Debug, 258 Clone, 259 PartialEq, 260 Eq, 261 jacquard_derive::IntoStatic, 262 Default 263)] 264#[serde(rename_all = "camelCase")] 265pub struct Ios<'a> { 266 /// Whether the app supports iPad. 267 #[serde(skip_serializing_if = "std::option::Option::is_none")] 268 pub supports_tablet: std::option::Option<bool>, 269} 270 271#[jacquard_derive::lexicon] 272#[derive( 273 serde::Serialize, 274 serde::Deserialize, 275 Debug, 276 Clone, 277 PartialEq, 278 Eq, 279 jacquard_derive::IntoStatic, 280 bon::Builder 281)] 282#[serde(rename_all = "camelCase")] 283pub struct LaunchAsset<'a> { 284 /// The MIME type of the asset, e.g., 'image/png'. 285 #[serde(borrow)] 286 #[builder(into)] 287 pub content_type: jacquard_common::CowStr<'a>, 288 /// The unique key for this asset, used to reference it in the plugin. 289 #[serde(borrow)] 290 #[builder(into)] 291 pub key: jacquard_common::CowStr<'a>, 292 /// The URL where the asset can be accessed. 293 #[serde(borrow)] 294 pub url: jacquard_common::types::string::Uri<'a>, 295} 296 297#[jacquard_derive::lexicon] 298#[derive( 299 serde::Serialize, 300 serde::Deserialize, 301 Debug, 302 Clone, 303 PartialEq, 304 Eq, 305 jacquard_derive::IntoStatic, 306 bon::Builder 307)] 308#[serde(rename_all = "camelCase")] 309pub struct Manifest<'a> { 310 /// The date and time when this plugin manifest was created. 311 pub created_at: jacquard_common::types::string::Datetime, 312 /// Additional metadata for the plugin, including Expo client and Go configurations. 313 #[serde(borrow)] 314 pub extra: crate::app_ocho::plugin::ManifestExtra<'a>, 315 /// The unique identifier for this plugin manifest. 316 #[serde(borrow)] 317 #[builder(into)] 318 pub id: jacquard_common::CowStr<'a>, 319 /// The launch asset for the plugin (the main javascipt bundle). 320 #[serde(borrow)] 321 pub launch_asset: crate::app_ocho::plugin::LaunchAsset<'a>, 322 #[serde(borrow)] 323 pub metadata: jacquard_common::types::value::Data<'a>, 324 /// The version of the Expo runtime this plugin is compatible with. 325 #[serde(borrow)] 326 #[builder(into)] 327 pub runtime_version: jacquard_common::CowStr<'a>, 328} 329 330#[jacquard_derive::lexicon] 331#[derive( 332 serde::Serialize, 333 serde::Deserialize, 334 Debug, 335 Clone, 336 PartialEq, 337 Eq, 338 jacquard_derive::IntoStatic, 339 bon::Builder 340)] 341#[serde(rename_all = "camelCase")] 342pub struct ManifestExtra<'a> { 343 #[serde(borrow)] 344 pub expo_client: crate::app_ocho::plugin::ExpoClient<'a>, 345 #[serde(borrow)] 346 pub expo_go: crate::app_ocho::plugin::ExpoGo<'a>, 347} 348 349#[jacquard_derive::open_union] 350#[derive( 351 serde::Serialize, 352 serde::Deserialize, 353 Debug, 354 Clone, 355 PartialEq, 356 Eq, 357 jacquard_derive::IntoStatic 358)] 359#[serde(tag = "$type")] 360#[serde(bound(deserialize = "'de: 'a"))] 361pub enum PluginItem<'a> { 362 #[serde(rename = "app.ocho.plugin.defs#stringId")] 363 StringId(Box<crate::app_ocho::plugin::StringId<'a>>), 364 #[serde(rename = "app.ocho.plugin.defs#pluginConfig")] 365 PluginConfig(Box<crate::app_ocho::plugin::PluginConfig<'a>>), 366} 367 368pub type Plugin<'a> = Vec<PluginItem<'a>>; 369pub type PluginConfig<'a> = jacquard_common::types::value::Data<'a>; 370/// A string identifier for a plugin, used to reference it in the app. 371pub type StringId<'a> = jacquard_common::CowStr<'a>; 372#[jacquard_derive::lexicon] 373#[derive( 374 serde::Serialize, 375 serde::Deserialize, 376 Debug, 377 Clone, 378 PartialEq, 379 Eq, 380 jacquard_derive::IntoStatic, 381 Default 382)] 383#[serde(rename_all = "camelCase")] 384pub struct Web<'a> { 385 /// The bundler used for the web app. 386 #[serde(skip_serializing_if = "std::option::Option::is_none")] 387 #[serde(borrow)] 388 pub bundler: std::option::Option<jacquard_common::CowStr<'a>>, 389 /// The URL to the favicon for the web app. 390 #[serde(skip_serializing_if = "std::option::Option::is_none")] 391 #[serde(borrow)] 392 pub favicon: std::option::Option<jacquard_common::CowStr<'a>>, 393 #[serde(skip_serializing_if = "std::option::Option::is_none")] 394 #[serde(borrow)] 395 pub favicon_blob: std::option::Option<jacquard_common::types::blob::Blob<'a>>, 396 /// The output directory for the web app. 397 #[serde(skip_serializing_if = "std::option::Option::is_none")] 398 #[serde(borrow)] 399 pub output: std::option::Option<jacquard_common::CowStr<'a>>, 400}