#[allow(unused_imports)]
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr};
#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::string::{AtUri, Cid, Datetime};
use jacquard_common::types::value::Data;
use jacquard_derive::IntoStatic;
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;
use crate::app_bsky::actor::ProfileView;
use crate::app_bsky::notification::list_notifications;
use crate::com_atproto::label::Label;
#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ListNotifications<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<S>,
#[serde(default = "_default_limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reasons: Option<Vec<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub seen_at: Option<Datetime>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct ListNotificationsOutput<S: BosStr = DefaultStr> {
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<S>,
pub notifications: Vec<list_notifications::Notification<S>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub seen_at: Option<Datetime>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(
rename_all = "camelCase",
bound(deserialize = "S: Deserialize<'de> + BosStr")
)]
pub struct Notification<S: BosStr = DefaultStr> {
pub author: ProfileView<S>,
pub cid: Cid<S>,
pub indexed_at: Datetime,
pub is_read: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<Label<S>>>,
pub reason: NotificationReason<S>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reason_subject: Option<AtUri<S>>,
pub record: Data<S>,
pub uri: AtUri<S>,
#[serde(flatten, default, skip_serializing_if = "Option::is_none")]
pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum NotificationReason<S: BosStr = DefaultStr> {
Like,
Repost,
Follow,
Mention,
Reply,
Quote,
StarterpackJoined,
Verified,
Unverified,
LikeViaRepost,
RepostViaRepost,
SubscribedPost,
ContactMatch,
Other(S),
}
impl<S: BosStr> NotificationReason<S> {
pub fn as_str(&self) -> &str {
match self {
Self::Like => "like",
Self::Repost => "repost",
Self::Follow => "follow",
Self::Mention => "mention",
Self::Reply => "reply",
Self::Quote => "quote",
Self::StarterpackJoined => "starterpack-joined",
Self::Verified => "verified",
Self::Unverified => "unverified",
Self::LikeViaRepost => "like-via-repost",
Self::RepostViaRepost => "repost-via-repost",
Self::SubscribedPost => "subscribed-post",
Self::ContactMatch => "contact-match",
Self::Other(s) => s.as_ref(),
}
}
pub fn from_value(s: S) -> Self {
match s.as_ref() {
"like" => Self::Like,
"repost" => Self::Repost,
"follow" => Self::Follow,
"mention" => Self::Mention,
"reply" => Self::Reply,
"quote" => Self::Quote,
"starterpack-joined" => Self::StarterpackJoined,
"verified" => Self::Verified,
"unverified" => Self::Unverified,
"like-via-repost" => Self::LikeViaRepost,
"repost-via-repost" => Self::RepostViaRepost,
"subscribed-post" => Self::SubscribedPost,
"contact-match" => Self::ContactMatch,
_ => Self::Other(s),
}
}
}
impl<S: BosStr> core::fmt::Display for NotificationReason<S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<S: BosStr> AsRef<str> for NotificationReason<S> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<S: BosStr> Serialize for NotificationReason<S> {
fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
where
Ser: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for NotificationReason<S> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = S::deserialize(deserializer)?;
Ok(Self::from_value(s))
}
}
impl<S: BosStr + Default> Default for NotificationReason<S> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl<S: BosStr> jacquard_common::IntoStatic for NotificationReason<S>
where
S: BosStr + jacquard_common::IntoStatic,
S::Output: BosStr,
{
type Output = NotificationReason<S::Output>;
fn into_static(self) -> Self::Output {
match self {
NotificationReason::Like => NotificationReason::Like,
NotificationReason::Repost => NotificationReason::Repost,
NotificationReason::Follow => NotificationReason::Follow,
NotificationReason::Mention => NotificationReason::Mention,
NotificationReason::Reply => NotificationReason::Reply,
NotificationReason::Quote => NotificationReason::Quote,
NotificationReason::StarterpackJoined => NotificationReason::StarterpackJoined,
NotificationReason::Verified => NotificationReason::Verified,
NotificationReason::Unverified => NotificationReason::Unverified,
NotificationReason::LikeViaRepost => NotificationReason::LikeViaRepost,
NotificationReason::RepostViaRepost => NotificationReason::RepostViaRepost,
NotificationReason::SubscribedPost => NotificationReason::SubscribedPost,
NotificationReason::ContactMatch => NotificationReason::ContactMatch,
NotificationReason::Other(v) => NotificationReason::Other(v.into_static()),
}
}
}
pub struct ListNotificationsResponse;
impl jacquard_common::xrpc::XrpcResp for ListNotificationsResponse {
const NSID: &'static str = "app.bsky.notification.listNotifications";
const ENCODING: &'static str = "application/json";
type Output<S: BosStr> = ListNotificationsOutput<S>;
type Err = jacquard_common::xrpc::GenericError;
}
impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for ListNotifications<S> {
const NSID: &'static str = "app.bsky.notification.listNotifications";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Response = ListNotificationsResponse;
}
pub struct ListNotificationsRequest;
impl jacquard_common::xrpc::XrpcEndpoint for ListNotificationsRequest {
const PATH: &'static str = "/xrpc/app.bsky.notification.listNotifications";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Request<S: BosStr> = ListNotifications<S>;
type Response = ListNotificationsResponse;
}
impl<S: BosStr> LexiconSchema for Notification<S> {
fn nsid() -> &'static str {
"app.bsky.notification.listNotifications"
}
fn def_name() -> &'static str {
"notification"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_bsky_notification_listNotifications()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
fn _default_limit() -> Option<i64> {
Some(50i64)
}
pub mod list_notifications_state {
pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {}
#[allow(non_camel_case_types)]
pub mod members {}
}
pub struct ListNotificationsBuilder<S: BosStr, St: list_notifications_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<S>,
Option<i64>,
Option<bool>,
Option<Vec<S>>,
Option<Datetime>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> ListNotifications<S> {
pub fn new() -> ListNotificationsBuilder<S, list_notifications_state::Empty> {
ListNotificationsBuilder::new()
}
}
impl<S: BosStr> ListNotificationsBuilder<S, list_notifications_state::Empty> {
pub fn new() -> Self {
ListNotificationsBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St: list_notifications_state::State> ListNotificationsBuilder<S, St> {
pub fn cursor(mut self, value: impl Into<Option<S>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_cursor(mut self, value: Option<S>) -> Self {
self._fields.0 = value;
self
}
}
impl<S: BosStr, St: list_notifications_state::State> ListNotificationsBuilder<S, St> {
pub fn limit(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_limit(mut self, value: Option<i64>) -> Self {
self._fields.1 = value;
self
}
}
impl<S: BosStr, St: list_notifications_state::State> ListNotificationsBuilder<S, St> {
pub fn priority(mut self, value: impl Into<Option<bool>>) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_priority(mut self, value: Option<bool>) -> Self {
self._fields.2 = value;
self
}
}
impl<S: BosStr, St: list_notifications_state::State> ListNotificationsBuilder<S, St> {
pub fn reasons(mut self, value: impl Into<Option<Vec<S>>>) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_reasons(mut self, value: Option<Vec<S>>) -> Self {
self._fields.3 = value;
self
}
}
impl<S: BosStr, St: list_notifications_state::State> ListNotificationsBuilder<S, St> {
pub fn seen_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_seen_at(mut self, value: Option<Datetime>) -> Self {
self._fields.4 = value;
self
}
}
impl<S: BosStr, St> ListNotificationsBuilder<S, St>
where
St: list_notifications_state::State,
{
pub fn build(self) -> ListNotifications<S> {
ListNotifications {
cursor: self._fields.0,
limit: self._fields.1,
priority: self._fields.2,
reasons: self._fields.3,
seen_at: self._fields.4,
}
}
}
pub mod notification_state {
pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Author;
type Cid;
type Reason;
type Record;
type Uri;
type IndexedAt;
type IsRead;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Author = Unset;
type Cid = Unset;
type Reason = Unset;
type Record = Unset;
type Uri = Unset;
type IndexedAt = Unset;
type IsRead = Unset;
}
pub struct SetAuthor<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetAuthor<St> {}
impl<St: State> State for SetAuthor<St> {
type Author = Set<members::author>;
type Cid = St::Cid;
type Reason = St::Reason;
type Record = St::Record;
type Uri = St::Uri;
type IndexedAt = St::IndexedAt;
type IsRead = St::IsRead;
}
pub struct SetCid<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetCid<St> {}
impl<St: State> State for SetCid<St> {
type Author = St::Author;
type Cid = Set<members::cid>;
type Reason = St::Reason;
type Record = St::Record;
type Uri = St::Uri;
type IndexedAt = St::IndexedAt;
type IsRead = St::IsRead;
}
pub struct SetReason<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetReason<St> {}
impl<St: State> State for SetReason<St> {
type Author = St::Author;
type Cid = St::Cid;
type Reason = Set<members::reason>;
type Record = St::Record;
type Uri = St::Uri;
type IndexedAt = St::IndexedAt;
type IsRead = St::IsRead;
}
pub struct SetRecord<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetRecord<St> {}
impl<St: State> State for SetRecord<St> {
type Author = St::Author;
type Cid = St::Cid;
type Reason = St::Reason;
type Record = Set<members::record>;
type Uri = St::Uri;
type IndexedAt = St::IndexedAt;
type IsRead = St::IsRead;
}
pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetUri<St> {}
impl<St: State> State for SetUri<St> {
type Author = St::Author;
type Cid = St::Cid;
type Reason = St::Reason;
type Record = St::Record;
type Uri = Set<members::uri>;
type IndexedAt = St::IndexedAt;
type IsRead = St::IsRead;
}
pub struct SetIndexedAt<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetIndexedAt<St> {}
impl<St: State> State for SetIndexedAt<St> {
type Author = St::Author;
type Cid = St::Cid;
type Reason = St::Reason;
type Record = St::Record;
type Uri = St::Uri;
type IndexedAt = Set<members::indexed_at>;
type IsRead = St::IsRead;
}
pub struct SetIsRead<St: State = Empty>(PhantomData<fn() -> St>);
impl<St: State> sealed::Sealed for SetIsRead<St> {}
impl<St: State> State for SetIsRead<St> {
type Author = St::Author;
type Cid = St::Cid;
type Reason = St::Reason;
type Record = St::Record;
type Uri = St::Uri;
type IndexedAt = St::IndexedAt;
type IsRead = Set<members::is_read>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct author(());
pub struct cid(());
pub struct reason(());
pub struct record(());
pub struct uri(());
pub struct indexed_at(());
pub struct is_read(());
}
}
pub struct NotificationBuilder<S: BosStr, St: notification_state::State> {
_state: PhantomData<fn() -> St>,
_fields: (
Option<ProfileView<S>>,
Option<Cid<S>>,
Option<Datetime>,
Option<bool>,
Option<Vec<Label<S>>>,
Option<NotificationReason<S>>,
Option<AtUri<S>>,
Option<Data<S>>,
Option<AtUri<S>>,
),
_type: PhantomData<fn() -> S>,
}
impl<S: BosStr> Notification<S> {
pub fn new() -> NotificationBuilder<S, notification_state::Empty> {
NotificationBuilder::new()
}
}
impl<S: BosStr> NotificationBuilder<S, notification_state::Empty> {
pub fn new() -> Self {
NotificationBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None, None, None, None, None),
_type: PhantomData,
}
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::Author: notification_state::IsUnset,
{
pub fn author(
mut self,
value: impl Into<ProfileView<S>>,
) -> NotificationBuilder<S, notification_state::SetAuthor<St>> {
self._fields.0 = Option::Some(value.into());
NotificationBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::Cid: notification_state::IsUnset,
{
pub fn cid(
mut self,
value: impl Into<Cid<S>>,
) -> NotificationBuilder<S, notification_state::SetCid<St>> {
self._fields.1 = Option::Some(value.into());
NotificationBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::IndexedAt: notification_state::IsUnset,
{
pub fn indexed_at(
mut self,
value: impl Into<Datetime>,
) -> NotificationBuilder<S, notification_state::SetIndexedAt<St>> {
self._fields.2 = Option::Some(value.into());
NotificationBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::IsRead: notification_state::IsUnset,
{
pub fn is_read(
mut self,
value: impl Into<bool>,
) -> NotificationBuilder<S, notification_state::SetIsRead<St>> {
self._fields.3 = Option::Some(value.into());
NotificationBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: notification_state::State> NotificationBuilder<S, St> {
pub fn labels(mut self, value: impl Into<Option<Vec<Label<S>>>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_labels(mut self, value: Option<Vec<Label<S>>>) -> Self {
self._fields.4 = value;
self
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::Reason: notification_state::IsUnset,
{
pub fn reason(
mut self,
value: impl Into<NotificationReason<S>>,
) -> NotificationBuilder<S, notification_state::SetReason<St>> {
self._fields.5 = Option::Some(value.into());
NotificationBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St: notification_state::State> NotificationBuilder<S, St> {
pub fn reason_subject(mut self, value: impl Into<Option<AtUri<S>>>) -> Self {
self._fields.6 = value.into();
self
}
pub fn maybe_reason_subject(mut self, value: Option<AtUri<S>>) -> Self {
self._fields.6 = value;
self
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::Record: notification_state::IsUnset,
{
pub fn record(
mut self,
value: impl Into<Data<S>>,
) -> NotificationBuilder<S, notification_state::SetRecord<St>> {
self._fields.7 = Option::Some(value.into());
NotificationBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::Uri: notification_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<S>>,
) -> NotificationBuilder<S, notification_state::SetUri<St>> {
self._fields.8 = Option::Some(value.into());
NotificationBuilder {
_state: PhantomData,
_fields: self._fields,
_type: PhantomData,
}
}
}
impl<S: BosStr, St> NotificationBuilder<S, St>
where
St: notification_state::State,
St::Author: notification_state::IsSet,
St::Cid: notification_state::IsSet,
St::Reason: notification_state::IsSet,
St::Record: notification_state::IsSet,
St::Uri: notification_state::IsSet,
St::IndexedAt: notification_state::IsSet,
St::IsRead: notification_state::IsSet,
{
pub fn build(self) -> Notification<S> {
Notification {
author: self._fields.0.unwrap(),
cid: self._fields.1.unwrap(),
indexed_at: self._fields.2.unwrap(),
is_read: self._fields.3.unwrap(),
labels: self._fields.4,
reason: self._fields.5.unwrap(),
reason_subject: self._fields.6,
record: self._fields.7.unwrap(),
uri: self._fields.8.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> Notification<S> {
Notification {
author: self._fields.0.unwrap(),
cid: self._fields.1.unwrap(),
indexed_at: self._fields.2.unwrap(),
is_read: self._fields.3.unwrap(),
labels: self._fields.4,
reason: self._fields.5.unwrap(),
reason_subject: self._fields.6,
record: self._fields.7.unwrap(),
uri: self._fields.8.unwrap(),
extra_data: Some(extra_data),
}
}
}
fn lexicon_doc_app_bsky_notification_listNotifications() -> LexiconDoc<'static> {
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
use jacquard_lexicon::lexicon::*;
LexiconDoc {
lexicon: Lexicon::Lexicon1,
id: CowStr::new_static("app.bsky.notification.listNotifications"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("main"),
LexUserType::XrpcQuery(LexXrpcQuery {
parameters: Some(
LexXrpcQueryParameter::Params(LexXrpcParameters {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("cursor"),
LexXrpcParametersProperty::String(LexString {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("limit"),
LexXrpcParametersProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("priority"),
LexXrpcParametersProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reasons"),
LexXrpcParametersProperty::Array(LexPrimitiveArray {
items: LexPrimitiveArrayItem::String(LexString {
description: Some(
CowStr::new_static(
"A reason that matches the reason property of #notification.",
),
),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("seenAt"),
LexXrpcParametersProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map
},
..Default::default()
}),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("notification"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("uri"), SmolStr::new_static("cid"),
SmolStr::new_static("author"), SmolStr::new_static("reason"),
SmolStr::new_static("record"), SmolStr::new_static("isRead"),
SmolStr::new_static("indexedAt")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("author"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"app.bsky.actor.defs#profileView",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("cid"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Cid),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("indexedAt"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("isRead"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("labels"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static("com.atproto.label.defs#label"),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reason"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("reasonSubject"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("record"),
LexObjectProperty::Unknown(LexUnknown {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map
},
..Default::default()
}
}