atrium_api/chat/bsky/convo/
send_message_batch.rs1pub const NSID: &str = "chat.bsky.convo.sendMessageBatch";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7 pub items: Vec<BatchItem>,
8}
9pub type Input = crate::types::Object<InputData>;
10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
11#[serde(rename_all = "camelCase")]
12pub struct OutputData {
13 pub items: Vec<crate::chat::bsky::convo::defs::MessageView>,
14}
15pub type Output = crate::types::Object<OutputData>;
16#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
17#[serde(tag = "error", content = "message")]
18pub enum Error {
19 ConvoLocked(Option<String>),
20 InvalidConvo(Option<String>),
21 ReplyTargetNotFound(Option<String>),
22}
23impl std::fmt::Display for Error {
24 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
25 match self {
26 Error::ConvoLocked(msg) => {
27 write!(_f, "ConvoLocked")?;
28 if let Some(msg) = msg {
29 write!(_f, ": {msg}")?;
30 }
31 }
32 Error::InvalidConvo(msg) => {
33 write!(_f, "InvalidConvo")?;
34 if let Some(msg) = msg {
35 write!(_f, ": {msg}")?;
36 }
37 }
38 Error::ReplyTargetNotFound(msg) => {
39 write!(_f, "ReplyTargetNotFound")?;
40 if let Some(msg) = msg {
41 write!(_f, ": {msg}")?;
42 }
43 }
44 }
45 Ok(())
46 }
47}
48#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
49#[serde(rename_all = "camelCase")]
50pub struct BatchItemData {
51 pub convo_id: String,
52 pub message: crate::chat::bsky::convo::defs::MessageInput,
53}
54pub type BatchItem = crate::types::Object<BatchItemData>;