A better Rust ATProto crate
at main 2.4 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.notification.registerPush 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 RegisterPush<'a> { 22 /// Set to true when the actor is age restricted 23 #[serde(skip_serializing_if = "std::option::Option::is_none")] 24 #[builder(into)] 25 pub age_restricted: Option<bool>, 26 #[serde(borrow)] 27 #[builder(into)] 28 pub app_id: jacquard_common::CowStr<'a>, 29 #[serde(borrow)] 30 #[builder(into)] 31 pub platform: jacquard_common::CowStr<'a>, 32 #[serde(borrow)] 33 pub service_did: jacquard_common::types::string::Did<'a>, 34 #[serde(borrow)] 35 #[builder(into)] 36 pub token: jacquard_common::CowStr<'a>, 37 #[serde(flatten)] 38 #[serde(borrow)] 39 #[builder(default)] 40 pub extra_data: ::std::collections::BTreeMap< 41 ::jacquard_common::smol_str::SmolStr, 42 ::jacquard_common::types::value::Data<'a>, 43 >, 44} 45 46///Response type for 47///app.bsky.notification.registerPush 48pub struct RegisterPushResponse; 49impl jacquard_common::xrpc::XrpcResp for RegisterPushResponse { 50 const NSID: &'static str = "app.bsky.notification.registerPush"; 51 const ENCODING: &'static str = "application/json"; 52 type Output<'de> = (); 53 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 54} 55 56impl<'a> jacquard_common::xrpc::XrpcRequest for RegisterPush<'a> { 57 const NSID: &'static str = "app.bsky.notification.registerPush"; 58 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 59 "application/json", 60 ); 61 type Response = RegisterPushResponse; 62} 63 64///Endpoint type for 65///app.bsky.notification.registerPush 66pub struct RegisterPushRequest; 67impl jacquard_common::xrpc::XrpcEndpoint for RegisterPushRequest { 68 const PATH: &'static str = "/xrpc/app.bsky.notification.registerPush"; 69 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 70 "application/json", 71 ); 72 type Request<'de> = RegisterPush<'de>; 73 type Response = RegisterPushResponse; 74}