1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.ocho.push.register
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 bon::Builder,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20#[builder(start_fn = new)]
21pub struct Register<'a> {
22 ///The expo push token
23 #[serde(borrow)]
24 #[builder(into)]
25 pub push_token: jacquard_common::CowStr<'a>,
26 #[serde(flatten)]
27 #[serde(borrow)]
28 #[builder(default)]
29 pub extra_data: ::std::collections::BTreeMap<
30 ::jacquard_common::smol_str::SmolStr,
31 ::jacquard_common::types::value::Data<'a>,
32 >,
33}
34
35#[jacquard_derive::lexicon]
36#[derive(
37 serde::Serialize,
38 serde::Deserialize,
39 Debug,
40 Clone,
41 PartialEq,
42 Eq,
43 jacquard_derive::IntoStatic
44)]
45#[serde(rename_all = "camelCase")]
46pub struct RegisterOutput<'a> {
47 ///Whether the token was successfully registered.
48 pub success: bool,
49}
50
51///Response type for
52///app.ocho.push.register
53pub struct RegisterResponse;
54impl jacquard_common::xrpc::XrpcResp for RegisterResponse {
55 const NSID: &'static str = "app.ocho.push.register";
56 const ENCODING: &'static str = "application/json";
57 type Output<'de> = RegisterOutput<'de>;
58 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
59}
60
61impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for Register<'de> {
62 const NSID: &'static str = "app.ocho.push.register";
63 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
64 "application/json",
65 );
66 type Response = RegisterResponse;
67}
68
69///Endpoint type for
70///app.ocho.push.register
71pub struct RegisterRequest;
72impl jacquard_common::xrpc::XrpcEndpoint for RegisterRequest {
73 const PATH: &'static str = "/xrpc/app.ocho.push.register";
74 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
75 "application/json",
76 );
77 type Request<'de> = Register<'de>;
78 type Response = RegisterResponse;
79}