Skip to main content

jacquard_api/com_atproto/server/
request_email_update.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.server.requestEmailUpdate
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::{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)]
20#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
21pub struct RequestEmailUpdateOutput<S: BosStr = DefaultStr> {
22    pub token_required: bool,
23    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
24    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
25}
26
27/** Request marker for the `com.atproto.server.requestEmailUpdate` procedure.
28
29This endpoint has no request parameters or input body; send this marker with `jacquard::Client`.*/
30
31#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
32pub struct RequestEmailUpdate;
33/** Response marker for the `com.atproto.server.requestEmailUpdate` procedure.
34
35Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `RequestEmailUpdateOutput<S>` for this endpoint.*/
36pub struct RequestEmailUpdateResponse;
37impl jacquard_common::xrpc::XrpcResp for RequestEmailUpdateResponse {
38    const NSID: &'static str = "com.atproto.server.requestEmailUpdate";
39    const ENCODING: &'static str = "application/json";
40    type Output<S: BosStr> = RequestEmailUpdateOutput<S>;
41    type Err = jacquard_common::xrpc::GenericError;
42}
43
44impl jacquard_common::xrpc::XrpcRequest for RequestEmailUpdate {
45    const NSID: &'static str = "com.atproto.server.requestEmailUpdate";
46    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
47        "application/json",
48    );
49    type Response = RequestEmailUpdateResponse;
50}
51
52/** Endpoint marker for the `com.atproto.server.requestEmailUpdate` procedure.
53
54Path: `/xrpc/com.atproto.server.requestEmailUpdate`. The request payload type is `RequestEmailUpdate`; use this marker with lower-level `XrpcEndpoint` APIs when you need endpoint metadata.*/
55pub struct RequestEmailUpdateRequest;
56impl jacquard_common::xrpc::XrpcEndpoint for RequestEmailUpdateRequest {
57    const PATH: &'static str = "/xrpc/com.atproto.server.requestEmailUpdate";
58    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
59        "application/json",
60    );
61    type Request<S: BosStr> = RequestEmailUpdate;
62    type Response = RequestEmailUpdateResponse;
63}