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::{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
30pub 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
49pub 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}