appview/atproto/src/lexicons/my/spoor/log/activity.rs
Julia Lange eb28549a0f
Global, mono-binary to libraries and binaries
This separates the previous mono-binary setup into separate libraries
and binaries. Specifically it split the old since api/ingestor binary
into an Atproto, and DB library, as well as an api, and ingestor binary.

Atproto Lib
Was mostly untouched. The original URI implementation was changed to use
FromStr, otherwise only imports were changed.

DB Lib
Is mostly unused, so there wasn't much that needed to be changed. Some
new files were added so that future work on it can hit the ground
running.

Api Binary
Is almost entirely the same. Imports were changed and the ingestor code
of main was removed.

Ingestor Binary
Was almost entirely refactored. An interface to made injestors was
added, and it was modularized. The only shared code is in
Ingestor.start(), and collections.rs's macros, but that is mostly
boilerplate.
2025-06-06 09:39:15 -07:00

33 lines
1.6 KiB
Rust

// @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT.
//!Definitions for the `my.spoor.log.activity` namespace.
use atrium_api::types::TryFromUnknown;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordData {
///Client-declared timestamp for when this activity was created
pub created_at: atrium_api::types::string::Datetime,
///User-declared timestamp for when they performed the activity. Null implies unknown time.
#[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: atrium_api::com::atproto::repo::strong_ref::Main,
}
pub type Record = atrium_api::types::Object<RecordData>;
impl From<atrium_api::types::Unknown> for RecordData {
fn from(value: atrium_api::types::Unknown) -> Self {
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#progressIndex")]
ProgressIndex(Box<ProgressIndex>),
}