jacquard_api/com_atproto/admin/
disable_invite_codes.rs1#[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
33pub 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
51pub 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}