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