1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.ocho.auth.whoami
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8/// The session data
9#[jacquard_derive::lexicon]
10#[derive(
11 serde::Serialize,
12 serde::Deserialize,
13 Debug,
14 Clone,
15 PartialEq,
16 Eq,
17 jacquard_derive::IntoStatic,
18 Default
19)]
20#[serde(rename_all = "camelCase")]
21pub struct WhoamiOutput<'a> {
22 /// The user's DID
23 #[serde(borrow)]
24 pub did: jacquard_common::CowStr<'a>,
25 /// The user's ID
26 #[serde(borrow)]
27 pub handle: jacquard_common::CowStr<'a>,
28}
29
30/// XRPC request marker type
31#[derive(
32 Debug,
33 Clone,
34 Copy,
35 PartialEq,
36 Eq,
37 serde::Serialize,
38 serde::Deserialize,
39 jacquard_derive::IntoStatic
40)]
41pub struct Whoami;
42///Response type for
43///app.ocho.auth.whoami
44pub struct WhoamiResponse;
45impl jacquard_common::xrpc::XrpcResp for WhoamiResponse {
46 const NSID: &'static str = "app.ocho.auth.whoami";
47 const ENCODING: &'static str = "application/json";
48 type Output<'de> = WhoamiOutput<'de>;
49 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
50}
51
52impl jacquard_common::xrpc::XrpcRequest for Whoami {
53 const NSID: &'static str = "app.ocho.auth.whoami";
54 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
55 type Response = WhoamiResponse;
56}
57
58///Endpoint type for
59///app.ocho.auth.whoami
60pub struct WhoamiRequest;
61impl jacquard_common::xrpc::XrpcEndpoint for WhoamiRequest {
62 const PATH: &'static str = "/xrpc/app.ocho.auth.whoami";
63 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
64 type Request<'de> = Whoami;
65 type Response = WhoamiResponse;
66}