A better Rust ATProto crate
at main 2.4 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: events.smokesignal.automation.InvokeWebhook 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 InvokeWebhook<'a> { 22 #[serde(borrow)] 23 pub context: InvokeWebhookContext<'a>, 24 #[serde(borrow)] 25 #[builder(into)] 26 pub event: jacquard_common::CowStr<'a>, 27 #[serde(borrow)] 28 pub record: InvokeWebhookRecord<'a>, 29 #[serde(flatten)] 30 #[serde(borrow)] 31 #[builder(default)] 32 pub extra_data: ::std::collections::BTreeMap< 33 ::jacquard_common::smol_str::SmolStr, 34 ::jacquard_common::types::value::Data<'a>, 35 >, 36} 37 38#[jacquard_derive::lexicon] 39#[derive( 40 serde::Serialize, 41 serde::Deserialize, 42 Debug, 43 Clone, 44 PartialEq, 45 Eq, 46 jacquard_derive::IntoStatic, 47 Default 48)] 49#[serde(rename_all = "camelCase")] 50pub struct InvokeWebhookOutput<'a> {} 51///Response type for 52///events.smokesignal.automation.InvokeWebhook 53pub struct InvokeWebhookResponse; 54impl jacquard_common::xrpc::XrpcResp for InvokeWebhookResponse { 55 const NSID: &'static str = "events.smokesignal.automation.InvokeWebhook"; 56 const ENCODING: &'static str = "application/json"; 57 type Output<'de> = InvokeWebhookOutput<'de>; 58 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 59} 60 61impl<'a> jacquard_common::xrpc::XrpcRequest for InvokeWebhook<'a> { 62 const NSID: &'static str = "events.smokesignal.automation.InvokeWebhook"; 63 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 64 "application/json", 65 ); 66 type Response = InvokeWebhookResponse; 67} 68 69///Endpoint type for 70///events.smokesignal.automation.InvokeWebhook 71pub struct InvokeWebhookRequest; 72impl jacquard_common::xrpc::XrpcEndpoint for InvokeWebhookRequest { 73 const PATH: &'static str = "/xrpc/events.smokesignal.automation.InvokeWebhook"; 74 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 75 "application/json", 76 ); 77 type Request<'de> = InvokeWebhook<'de>; 78 type Response = InvokeWebhookResponse; 79}