jacquard-api 0.10.2

Generated AT Protocol API bindings for Jacquard
Documentation
// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: app.bsky.notification.getPreferences
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[derive(
    serde::Serialize,
    serde::Deserialize,
    Debug,
    Clone,
    PartialEq,
    Eq,
    jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct GetPreferences;
#[jacquard_derive::lexicon]
#[derive(
    serde::Serialize,
    serde::Deserialize,
    Debug,
    Clone,
    PartialEq,
    Eq,
    jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct GetPreferencesOutput<'a> {
    #[serde(borrow)]
    pub preferences: crate::app_bsky::notification::Preferences<'a>,
}

/// Response type for
///app.bsky.notification.getPreferences
pub struct GetPreferencesResponse;
impl jacquard_common::xrpc::XrpcResp for GetPreferencesResponse {
    const NSID: &'static str = "app.bsky.notification.getPreferences";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = GetPreferencesOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for GetPreferences {
    const NSID: &'static str = "app.bsky.notification.getPreferences";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = GetPreferencesResponse;
}

/// Endpoint type for
///app.bsky.notification.getPreferences
pub struct GetPreferencesRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetPreferencesRequest {
    const PATH: &'static str = "/xrpc/app.bsky.notification.getPreferences";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = GetPreferences;
    type Response = GetPreferencesResponse;
}