Lexicons, update lexicon repo and compile
Compiles the current lexicons to rust code using esquema. I had to do a little bit of shenanigans to get the rust to compile that needs to be redone every time. But there is a better way, I'm just lazy rn.
This commit is contained in:
parent
ec141315d1
commit
c0c90c3001
7 changed files with 34 additions and 19 deletions
2
lexicons
2
lexicons
|
|
@ -1 +1 @@
|
|||
Subproject commit 0c7e67126c2eb46bd1901c2c329d1139747d7e89
|
||||
Subproject commit 2fdba4f2178a106418f48b7fd26d48b91aff58b1
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
|
||||
//!Definitions for the `my.spoor.content` namespace.
|
||||
pub mod defs;
|
||||
pub mod external;
|
||||
pub mod media;
|
||||
pub mod title;
|
||||
#[derive(Debug)]
|
||||
pub struct External;
|
||||
impl atrium_api::types::Collection for External {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,8 @@ pub struct RecordData {
|
|||
pub overrides: core::option::Option<atrium_api::types::Union<RecordOverridesRefs>>,
|
||||
///All the data needed to query the content from the source
|
||||
pub queryable: atrium_api::types::Union<RecordQueryableRefs>,
|
||||
///An nsid for a specific data source. The domain authority governs how to process the queryable
|
||||
pub source: atrium_api::types::string::Nsid,
|
||||
#[serde(skip_serializing_if = "core::option::Option::is_none")]
|
||||
pub titles: core::option::Option<Vec<crate::my::spoor::content::defs::Title>>,
|
||||
pub titles: core::option::Option<Vec<crate::lexicons::my::spoor::content::title::Main>>,
|
||||
}
|
||||
pub type Record = atrium_api::types::Object<RecordData>;
|
||||
impl From<atrium_api::types::Unknown> for RecordData {
|
||||
|
|
@ -21,8 +19,18 @@ impl From<atrium_api::types::Unknown> for RecordData {
|
|||
}
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Tvdbv4Data {
|
||||
pub id: i64,
|
||||
pub r#type: String,
|
||||
}
|
||||
pub type Tvdbv4 = atrium_api::types::Object<Tvdbv4Data>;
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(tag = "$type")]
|
||||
pub enum RecordOverridesRefs {}
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(tag = "$type")]
|
||||
pub enum RecordQueryableRefs {}
|
||||
pub enum RecordQueryableRefs {
|
||||
#[serde(rename = "my.spoor.content.external#tvdbv4")]
|
||||
Tvdbv4(Box<Tvdbv4>),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ pub struct RecordData {
|
|||
pub last_updated: atrium_api::types::string::Datetime,
|
||||
#[serde(skip_serializing_if = "core::option::Option::is_none")]
|
||||
pub poster_image: core::option::Option<atrium_api::types::BlobRef>,
|
||||
pub titles: Vec<crate::my::spoor::content::defs::Title>,
|
||||
pub titles: Vec<crate::lexicons::my::spoor::content::title::Main>,
|
||||
}
|
||||
pub type Record = atrium_api::types::Object<RecordData>;
|
||||
impl From<atrium_api::types::Unknown> for RecordData {
|
||||
|
|
@ -38,7 +38,7 @@ pub type Television = atrium_api::types::Object<TelevisionData>;
|
|||
#[serde(tag = "$type")]
|
||||
pub enum RecordDurationDataRefs {
|
||||
#[serde(rename = "my.spoor.content.media#television")]
|
||||
MySpoorContentMediaTelevision(Box<crate::my::spoor::content::media::Television>),
|
||||
MySpoorContentMediaTelevision(Box<crate::lexicons::my::spoor::content::media::Television>),
|
||||
#[serde(rename = "my.spoor.content.media#book")]
|
||||
MySpoorContentMediaBook(Box<crate::my::spoor::content::media::Book>),
|
||||
MySpoorContentMediaBook(Box<crate::lexicons::my::spoor::content::media::Book>),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
|
||||
//!Definitions for the `my.spoor.content.defs` namespace.
|
||||
//!Definitions for the `my.spoor.content.title` namespace.
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct TitleData {
|
||||
pub struct MainData {
|
||||
#[serde(skip_serializing_if = "core::option::Option::is_none")]
|
||||
pub lang: core::option::Option<atrium_api::types::string::Language>,
|
||||
#[serde(skip_serializing_if = "core::option::Option::is_none")]
|
||||
|
|
@ -10,10 +10,10 @@ pub struct TitleData {
|
|||
#[serde(skip_serializing_if = "core::option::Option::is_none")]
|
||||
pub value: core::option::Option<String>,
|
||||
}
|
||||
pub type Title = atrium_api::types::Object<TitleData>;
|
||||
pub type Main = atrium_api::types::Object<MainData>;
|
||||
///A phonetic transcription of the native title such that when read it will sound like the native title.
|
||||
pub const TITLE_HOMOPHONIC: &str = "my.spoor.content.defs#titleHomophonic";
|
||||
pub const TITLE_HOMOPHONIC: &str = "my.spoor.content.title#titleHomophonic";
|
||||
///The title in its native script
|
||||
pub const TITLE_NATIVE: &str = "my.spoor.content.defs#titleNative";
|
||||
pub const TITLE_NATIVE: &str = "my.spoor.content.title#titleNative";
|
||||
///A translation of the title
|
||||
pub const TITLE_TRANSLATION: &str = "my.spoor.content.defs#titleTranslation";
|
||||
pub const TITLE_TRANSLATION: &str = "my.spoor.content.title#titleTranslation";
|
||||
|
|
@ -10,7 +10,7 @@ pub struct RecordData {
|
|||
#[serde(skip_serializing_if = "core::option::Option::is_none")]
|
||||
pub performed_at: core::option::Option<atrium_api::types::string::Datetime>,
|
||||
pub progress: atrium_api::types::Union<RecordProgressRefs>,
|
||||
pub session: crate::com::atproto::repo::strong_ref::Main,
|
||||
pub session: atrium_api::com::atproto::repo::strong_ref::Main,
|
||||
}
|
||||
pub type Record = atrium_api::types::Object<RecordData>;
|
||||
impl From<atrium_api::types::Unknown> for RecordData {
|
||||
|
|
@ -18,9 +18,16 @@ impl From<atrium_api::types::Unknown> for RecordData {
|
|||
Self::try_from_unknown(value).unwrap()
|
||||
}
|
||||
}
|
||||
///The index of the content consumed. Content must be indexable
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ProgressIndexData {
|
||||
pub index: i64,
|
||||
}
|
||||
pub type ProgressIndex = atrium_api::types::Object<ProgressIndexData>;
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(tag = "$type")]
|
||||
pub enum RecordProgressRefs {
|
||||
#[serde(rename = "my.spoor.log.activity#indexProgress")]
|
||||
MySpoorLogActivityIndexProgress(Box<crate::my::spoor::log::activity::IndexProgress>),
|
||||
#[serde(rename = "my.spoor.log.activity#progressIndex")]
|
||||
ProgressIndex(Box<ProgressIndex>),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use atrium_api::types::TryFromUnknown;
|
|||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct RecordData {
|
||||
pub content: crate::com::atproto::repo::strong_ref::Main,
|
||||
pub content: atrium_api::com::atproto::repo::strong_ref::Main,
|
||||
///Client-declared timestamp for when this activity was created
|
||||
pub created_at: atrium_api::types::string::Datetime,
|
||||
#[serde(skip_serializing_if = "core::option::Option::is_none")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue