Skip to main content

jacquard_api/chat_bsky/actor/
get_status.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: chat.bsky.actor.getStatus
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[allow(unused_imports)]
9use alloc::collections::BTreeMap;
10
11#[allow(unused_imports)]
12use core::marker::PhantomData;
13use jacquard_common::deps::smol_str::SmolStr;
14use jacquard_common::types::value::Data;
15use jacquard_common::{BosStr, DefaultStr, FromStaticStr};
16use jacquard_derive::IntoStatic;
17use serde::{Deserialize, Serialize};
18
19#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
20#[serde(
21    rename_all = "camelCase",
22    bound(deserialize = "S: Deserialize<'de> + BosStr")
23)]
24pub struct GetStatusOutput<S: BosStr = DefaultStr> {
25    ///Whether the viewer's account is allowed to create group chats. New accounts are restricted from creating groups.
26    pub can_create_groups: bool,
27    ///True when the viewer's account is disabled and cannot actively participate in chat.
28    pub chat_disabled: bool,
29    ///The maximum number of members allowed in a group conversation.
30    pub group_member_limit: i64,
31    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
32    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
33}
34
35/** Request marker for the `chat.bsky.actor.getStatus` query.
36
37This endpoint has no request parameters or input body; send this marker with `jacquard::Client`.*/
38
39#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
40pub struct GetStatus;
41/** Response marker for the `chat.bsky.actor.getStatus` query.
42
43Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetStatusOutput<S>` for this endpoint.*/
44pub struct GetStatusResponse;
45impl jacquard_common::xrpc::XrpcResp for GetStatusResponse {
46    const NSID: &'static str = "chat.bsky.actor.getStatus";
47    const ENCODING: &'static str = "application/json";
48    type Output<S: BosStr> = GetStatusOutput<S>;
49    type Err = jacquard_common::xrpc::GenericError;
50}
51
52impl jacquard_common::xrpc::XrpcRequest for GetStatus {
53    const NSID: &'static str = "chat.bsky.actor.getStatus";
54    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
55    type Response = GetStatusResponse;
56}
57
58/** Endpoint marker for the `chat.bsky.actor.getStatus` query.
59
60Path: `/xrpc/chat.bsky.actor.getStatus`. The request payload type is `GetStatus`; use this marker with lower-level `XrpcEndpoint` APIs when you need endpoint metadata.*/
61pub struct GetStatusRequest;
62impl jacquard_common::xrpc::XrpcEndpoint for GetStatusRequest {
63    const PATH: &'static str = "/xrpc/chat.bsky.actor.getStatus";
64    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
65    type Request<S: BosStr> = GetStatus;
66    type Response = GetStatusResponse;
67}