2 objects::instance::ApubSite,
3 protocol::{ImageObject, SourceCompat},
5 use activitystreams_kinds::actor::ServiceType;
6 use chrono::{DateTime, FixedOffset};
7 use lemmy_apub_lib::{object_id::ObjectId, signatures::PublicKey, values::MediaTypeHtml};
8 use serde::{Deserialize, Serialize};
9 use serde_with::skip_serializing_none;
12 #[skip_serializing_none]
13 #[derive(Clone, Debug, Deserialize, Serialize)]
14 #[serde(rename_all = "camelCase")]
16 #[serde(rename = "type")]
17 pub(crate) kind: ServiceType,
18 pub(crate) id: ObjectId<ApubSite>,
20 pub(crate) name: String,
21 pub(crate) inbox: Url,
22 /// mandatory field in activitypub, lemmy currently serves an empty outbox
23 pub(crate) outbox: Url,
24 pub(crate) public_key: PublicKey,
27 pub(crate) content: Option<String>,
28 pub(crate) source: Option<SourceCompat>,
29 // short instance description
30 pub(crate) summary: Option<String>,
31 pub(crate) media_type: Option<MediaTypeHtml>,
33 pub(crate) icon: Option<ImageObject>,
35 pub(crate) image: Option<ImageObject>,
36 pub(crate) published: DateTime<FixedOffset>,
37 pub(crate) updated: Option<DateTime<FixedOffset>>,