A better Rust ATProto crate
at main 3.6 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: tools.ozone.verification.revokeVerifications 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 RevokeVerifications<'a> { 22 /// Reason for revoking the verification. This is optional and can be omitted if not needed. 23 #[serde(skip_serializing_if = "std::option::Option::is_none")] 24 #[builder(into)] 25 #[serde(borrow)] 26 pub revoke_reason: Option<jacquard_common::CowStr<'a>>, 27 /// Array of verification record uris to revoke 28 #[serde(borrow)] 29 pub uris: Vec<jacquard_common::types::string::AtUri<'a>>, 30 #[serde(flatten)] 31 #[serde(borrow)] 32 #[builder(default)] 33 pub extra_data: ::std::collections::BTreeMap< 34 ::jacquard_common::smol_str::SmolStr, 35 ::jacquard_common::types::value::Data<'a>, 36 >, 37} 38 39#[jacquard_derive::lexicon] 40#[derive( 41 serde::Serialize, 42 serde::Deserialize, 43 Debug, 44 Clone, 45 PartialEq, 46 Eq, 47 jacquard_derive::IntoStatic 48)] 49#[serde(rename_all = "camelCase")] 50pub struct RevokeVerificationsOutput<'a> { 51 /// List of verification uris that couldn't be revoked, including failure reasons 52 #[serde(borrow)] 53 pub failed_revocations: Vec<jacquard_common::types::value::Data<'a>>, 54 /// List of verification uris successfully revoked 55 #[serde(borrow)] 56 pub revoked_verifications: Vec<jacquard_common::types::string::AtUri<'a>>, 57} 58 59///Response type for 60///tools.ozone.verification.revokeVerifications 61pub struct RevokeVerificationsResponse; 62impl jacquard_common::xrpc::XrpcResp for RevokeVerificationsResponse { 63 const NSID: &'static str = "tools.ozone.verification.revokeVerifications"; 64 const ENCODING: &'static str = "application/json"; 65 type Output<'de> = RevokeVerificationsOutput<'de>; 66 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 67} 68 69impl<'a> jacquard_common::xrpc::XrpcRequest for RevokeVerifications<'a> { 70 const NSID: &'static str = "tools.ozone.verification.revokeVerifications"; 71 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 72 "application/json", 73 ); 74 type Response = RevokeVerificationsResponse; 75} 76 77///Endpoint type for 78///tools.ozone.verification.revokeVerifications 79pub struct RevokeVerificationsRequest; 80impl jacquard_common::xrpc::XrpcEndpoint for RevokeVerificationsRequest { 81 const PATH: &'static str = "/xrpc/tools.ozone.verification.revokeVerifications"; 82 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 83 "application/json", 84 ); 85 type Request<'de> = RevokeVerifications<'de>; 86 type Response = RevokeVerificationsResponse; 87} 88 89/// Error object for failed revocations 90#[jacquard_derive::lexicon] 91#[derive( 92 serde::Serialize, 93 serde::Deserialize, 94 Debug, 95 Clone, 96 PartialEq, 97 Eq, 98 jacquard_derive::IntoStatic, 99 bon::Builder 100)] 101#[serde(rename_all = "camelCase")] 102pub struct RevokeError<'a> { 103 /// Description of the error that occurred during revocation. 104 #[serde(borrow)] 105 #[builder(into)] 106 pub error: jacquard_common::CowStr<'a>, 107 /// The AT-URI of the verification record that failed to revoke. 108 #[serde(borrow)] 109 pub uri: jacquard_common::types::string::AtUri<'a>, 110}