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