Skip to main content

jacquard_api/com_atproto/admin/
disable_invite_codes.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.admin.disableInviteCodes
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::{CowStr, BosStr, DefaultStr, FromStaticStr};
14use jacquard_common::deps::smol_str::SmolStr;
15use jacquard_common::types::value::Data;
16use jacquard_derive::IntoStatic;
17use serde::{Serialize, Deserialize};
18
19#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
20#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
21pub struct DisableInviteCodes<S: BosStr = DefaultStr> {
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub accounts: Option<Vec<S>>,
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub codes: Option<Vec<S>>,
26    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
27    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
28}
29
30/** Response marker for the `com.atproto.admin.disableInviteCodes` procedure.
31
32Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `()` for this endpoint.*/
33pub struct DisableInviteCodesResponse;
34impl jacquard_common::xrpc::XrpcResp for DisableInviteCodesResponse {
35    const NSID: &'static str = "com.atproto.admin.disableInviteCodes";
36    const ENCODING: &'static str = "application/json";
37    type Output<S: BosStr> = ();
38    type Err = jacquard_common::xrpc::GenericError;
39}
40
41impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for DisableInviteCodes<S> {
42    const NSID: &'static str = "com.atproto.admin.disableInviteCodes";
43    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
44        "application/json",
45    );
46    type Response = DisableInviteCodesResponse;
47}
48
49/** Endpoint marker for the `com.atproto.admin.disableInviteCodes` procedure.
50
51Path: `/xrpc/com.atproto.admin.disableInviteCodes`. The request payload type is `DisableInviteCodes<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/
52pub struct DisableInviteCodesRequest;
53impl jacquard_common::xrpc::XrpcEndpoint for DisableInviteCodesRequest {
54    const PATH: &'static str = "/xrpc/com.atproto.admin.disableInviteCodes";
55    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
56        "application/json",
57    );
58    type Request<S: BosStr> = DisableInviteCodes<S>;
59    type Response = DisableInviteCodesResponse;
60}