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:
Julia Lange 2025-05-14 18:18:52 -07:00
parent ec141315d1
commit c0c90c3001
Signed by: Julia
SSH key fingerprint: SHA256:5DJcfxa5/fKCYn57dcabJa2vN2e6eT0pBerYi5SUbto
7 changed files with 34 additions and 19 deletions

View file

@ -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>),
}