Skip to main content

atrium_api/chat/bsky/convo/
defs.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `chat.bsky.convo.defs` namespace.
3pub type ConvoKind = String;
4pub type ConvoLockStatus = String;
5#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
6#[serde(rename_all = "camelCase")]
7pub struct ConvoRefData {
8    pub convo_id: String,
9    pub did: crate::types::string::Did,
10}
11pub type ConvoRef = crate::types::Object<ConvoRefData>;
12pub type ConvoStatus = String;
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
14#[serde(rename_all = "camelCase")]
15pub struct ConvoViewData {
16    pub id: String,
17    ///Union field that has data specific to different kinds of convos.
18    #[serde(skip_serializing_if = "core::option::Option::is_none")]
19    pub kind: core::option::Option<crate::types::Union<ConvoViewKindRefs>>,
20    #[serde(skip_serializing_if = "core::option::Option::is_none")]
21    pub last_message: core::option::Option<
22        crate::types::Union<ConvoViewLastMessageRefs>,
23    >,
24    #[serde(skip_serializing_if = "core::option::Option::is_none")]
25    pub last_reaction: core::option::Option<
26        crate::types::Union<ConvoViewLastReactionRefs>,
27    >,
28    ///Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members.
29    pub members: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
30    pub muted: bool,
31    pub rev: String,
32    ///Convo status for the viewer member (not the convo itself).
33    #[serde(skip_serializing_if = "core::option::Option::is_none")]
34    pub status: core::option::Option<ConvoStatus>,
35    pub unread_count: i64,
36}
37pub type ConvoView = crate::types::Object<ConvoViewData>;
38#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
39#[serde(rename_all = "camelCase")]
40pub struct DeletedMessageViewData {
41    pub id: String,
42    pub rev: String,
43    pub sender: MessageViewSender,
44    pub sent_at: crate::types::string::Datetime,
45}
46pub type DeletedMessageView = crate::types::Object<DeletedMessageViewData>;
47#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
48#[serde(rename_all = "camelCase")]
49pub struct DirectConvoData {}
50pub type DirectConvo = crate::types::Object<DirectConvoData>;
51#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
52#[serde(rename_all = "camelCase")]
53pub struct GroupConvoData {
54    pub created_at: crate::types::string::Datetime,
55    #[serde(skip_serializing_if = "core::option::Option::is_none")]
56    pub join_link: core::option::Option<crate::chat::bsky::group::defs::JoinLinkView>,
57    ///The total number of pending join requests for the group conversation. Only present for the owner. Capped at 21.
58    #[serde(skip_serializing_if = "core::option::Option::is_none")]
59    pub join_request_count: core::option::Option<i64>,
60    ///The lock status of the conversation.
61    pub lock_status: ConvoLockStatus,
62    ///Whether the lock status is being forced by a moderation override (account inactivation or convo takedown) rather than the owner's own setting.
63    pub lock_status_moderation_override: bool,
64    ///The total number of members in the group conversation.
65    pub member_count: i64,
66    ///The maximum number of members allowed in the group conversation.
67    pub member_limit: i64,
68    ///The display name of the group conversation.
69    pub name: String,
70    ///The number of unread join requests for the group conversation. Only present for the owner.
71    #[serde(skip_serializing_if = "core::option::Option::is_none")]
72    pub unread_join_request_count: core::option::Option<i64>,
73}
74pub type GroupConvo = crate::types::Object<GroupConvoData>;
75///Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group.
76#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
77#[serde(rename_all = "camelCase")]
78pub struct LogAcceptConvoData {
79    pub convo_id: String,
80    pub rev: String,
81}
82pub type LogAcceptConvo = crate::types::Object<LogAcceptConvoData>;
83///Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees).
84#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
85#[serde(rename_all = "camelCase")]
86pub struct LogAddMemberData {
87    pub convo_id: String,
88    ///A system message with data of type #systemMessageDataAddMember
89    pub message: SystemMessageView,
90    ///Profiles referred in the system message.
91    pub related_profiles: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
92    pub rev: String,
93}
94pub type LogAddMember = crate::types::Object<LogAddMemberData>;
95///Event indicating a reaction was added to a message.
96#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
97#[serde(rename_all = "camelCase")]
98pub struct LogAddReactionData {
99    pub convo_id: String,
100    pub message: crate::types::Union<LogAddReactionMessageRefs>,
101    pub reaction: ReactionView,
102    ///Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.
103    #[serde(skip_serializing_if = "core::option::Option::is_none")]
104    pub related_profiles: core::option::Option<
105        Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
106    >,
107    pub rev: String,
108}
109pub type LogAddReaction = crate::types::Object<LogAddReactionData>;
110///Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo.
111#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
112#[serde(rename_all = "camelCase")]
113pub struct LogApproveJoinRequestData {
114    pub convo_id: String,
115    ///Prospective member who requested to join.
116    pub member: crate::chat::bsky::actor::defs::ProfileViewBasic,
117    pub rev: String,
118}
119pub type LogApproveJoinRequest = crate::types::Object<LogApproveJoinRequestData>;
120///Event indicating a convo containing the viewer was started. Can be direct or group. When a member is added to a group convo, they also get this event.
121#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
122#[serde(rename_all = "camelCase")]
123pub struct LogBeginConvoData {
124    pub convo_id: String,
125    pub rev: String,
126}
127pub type LogBeginConvo = crate::types::Object<LogBeginConvoData>;
128///Event indicating a join link was created for a group convo.
129#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
130#[serde(rename_all = "camelCase")]
131pub struct LogCreateJoinLinkData {
132    pub convo_id: String,
133    ///A system message with data of type #systemMessageDataCreateJoinLink
134    pub message: SystemMessageView,
135    pub rev: String,
136}
137pub type LogCreateJoinLink = crate::types::Object<LogCreateJoinLinkData>;
138///Event indicating a user-originated message was created. Is not emitted for system messages.
139#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
140#[serde(rename_all = "camelCase")]
141pub struct LogCreateMessageData {
142    pub convo_id: String,
143    pub message: crate::types::Union<LogCreateMessageMessageRefs>,
144    ///Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present.
145    #[serde(skip_serializing_if = "core::option::Option::is_none")]
146    pub related_profiles: core::option::Option<
147        Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
148    >,
149    pub rev: String,
150}
151pub type LogCreateMessage = crate::types::Object<LogCreateMessageData>;
152///Event indicating a user-originated message was deleted. Is not emitted for system messages.
153#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
154#[serde(rename_all = "camelCase")]
155pub struct LogDeleteMessageData {
156    pub convo_id: String,
157    pub message: crate::types::Union<LogDeleteMessageMessageRefs>,
158    pub rev: String,
159}
160pub type LogDeleteMessage = crate::types::Object<LogDeleteMessageData>;
161///Event indicating a join link was disabled for a group convo.
162#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
163#[serde(rename_all = "camelCase")]
164pub struct LogDisableJoinLinkData {
165    pub convo_id: String,
166    ///A system message with data of type #systemMessageDataDisableJoinLink
167    pub message: SystemMessageView,
168    pub rev: String,
169}
170pub type LogDisableJoinLink = crate::types::Object<LogDisableJoinLinkData>;
171///Event indicating info about group convo was edited.
172#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
173#[serde(rename_all = "camelCase")]
174pub struct LogEditGroupData {
175    pub convo_id: String,
176    ///A system message with data of type #systemMessageDataEditGroup
177    pub message: SystemMessageView,
178    pub rev: String,
179}
180pub type LogEditGroup = crate::types::Object<LogEditGroupData>;
181///Event indicating a settings about a join link for a group convo were edited.
182#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
183#[serde(rename_all = "camelCase")]
184pub struct LogEditJoinLinkData {
185    pub convo_id: String,
186    ///A system message with data of type #systemMessageDataEditJoinLink
187    pub message: SystemMessageView,
188    pub rev: String,
189}
190pub type LogEditJoinLink = crate::types::Object<LogEditJoinLinkData>;
191///Event indicating a join link was enabled for a group convo.
192#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
193#[serde(rename_all = "camelCase")]
194pub struct LogEnableJoinLinkData {
195    pub convo_id: String,
196    ///A system message with data of type #systemMessageDataEnableJoinLink
197    pub message: SystemMessageView,
198    pub rev: String,
199}
200pub type LogEnableJoinLink = crate::types::Object<LogEnableJoinLinkData>;
201///Event indicating a join request was made to a group the viewer owns. Only the owner gets this.
202#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
203#[serde(rename_all = "camelCase")]
204pub struct LogIncomingJoinRequestData {
205    pub convo_id: String,
206    ///Prospective member who requested to join.
207    pub member: crate::chat::bsky::actor::defs::ProfileViewBasic,
208    pub rev: String,
209}
210pub type LogIncomingJoinRequest = crate::types::Object<LogIncomingJoinRequestData>;
211///Event indicating the viewer left a convo. Can be direct or group.
212#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
213#[serde(rename_all = "camelCase")]
214pub struct LogLeaveConvoData {
215    pub convo_id: String,
216    pub rev: String,
217}
218pub type LogLeaveConvo = crate::types::Object<LogLeaveConvoData>;
219///Event indicating a group convo was locked.
220#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
221#[serde(rename_all = "camelCase")]
222pub struct LogLockConvoData {
223    pub convo_id: String,
224    ///A system message with data of type #systemMessageDataLockConvo
225    pub message: SystemMessageView,
226    ///Profiles referred in the system message.
227    pub related_profiles: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
228    pub rev: String,
229}
230pub type LogLockConvo = crate::types::Object<LogLockConvoData>;
231///Event indicating a group convo was locked permanently.
232#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
233#[serde(rename_all = "camelCase")]
234pub struct LogLockConvoPermanentlyData {
235    pub convo_id: String,
236    ///A system message with data of type #systemMessageDataLockConvoPermanently
237    pub message: SystemMessageView,
238    ///Profiles referred in the system message.
239    pub related_profiles: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
240    pub rev: String,
241}
242pub type LogLockConvoPermanently = crate::types::Object<LogLockConvoPermanentlyData>;
243///Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees).
244#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
245#[serde(rename_all = "camelCase")]
246pub struct LogMemberJoinData {
247    pub convo_id: String,
248    ///A system message with data of type #systemMessageDataMemberJoin
249    pub message: SystemMessageView,
250    ///Profiles referred in the system message.
251    pub related_profiles: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
252    pub rev: String,
253}
254pub type LogMemberJoin = crate::types::Object<LogMemberJoinData>;
255///Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message).
256#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
257#[serde(rename_all = "camelCase")]
258pub struct LogMemberLeaveData {
259    pub convo_id: String,
260    ///A system message with data of type #systemMessageDataMemberLeave
261    pub message: SystemMessageView,
262    ///Profiles referred in the system message.
263    pub related_profiles: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
264    pub rev: String,
265}
266pub type LogMemberLeave = crate::types::Object<LogMemberLeaveData>;
267///Event indicating the viewer muted a convo. Can be direct or group.
268#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
269#[serde(rename_all = "camelCase")]
270pub struct LogMuteConvoData {
271    pub convo_id: String,
272    pub rev: String,
273}
274pub type LogMuteConvo = crate::types::Object<LogMuteConvoData>;
275///Event indicating a join request was made by the requester. Only requester actor gets this.
276#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
277#[serde(rename_all = "camelCase")]
278pub struct LogOutgoingJoinRequestData {
279    pub convo_id: String,
280    pub rev: String,
281}
282pub type LogOutgoingJoinRequest = crate::types::Object<LogOutgoingJoinRequestData>;
283///Event indicating a convo was read up to a certain message.
284#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
285#[serde(rename_all = "camelCase")]
286pub struct LogReadConvoData {
287    pub convo_id: String,
288    pub message: crate::types::Union<LogReadConvoMessageRefs>,
289    pub rev: String,
290}
291pub type LogReadConvo = crate::types::Object<LogReadConvoData>;
292///Event indicating the group owner marked join requests as read. Only the owner gets this.
293#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
294#[serde(rename_all = "camelCase")]
295pub struct LogReadJoinRequestsData {
296    pub convo_id: String,
297    pub rev: String,
298}
299pub type LogReadJoinRequests = crate::types::Object<LogReadJoinRequestsData>;
300///DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message.
301#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
302#[serde(rename_all = "camelCase")]
303pub struct LogReadMessageData {
304    pub convo_id: String,
305    pub message: crate::types::Union<LogReadMessageMessageRefs>,
306    pub rev: String,
307}
308pub type LogReadMessage = crate::types::Object<LogReadMessageData>;
309///Event indicating a join request was rejected by the viewer. Only the owner gets this.
310#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
311#[serde(rename_all = "camelCase")]
312pub struct LogRejectJoinRequestData {
313    pub convo_id: String,
314    ///Prospective member who requested to join.
315    pub member: crate::chat::bsky::actor::defs::ProfileViewBasic,
316    pub rev: String,
317}
318pub type LogRejectJoinRequest = crate::types::Object<LogRejectJoinRequestData>;
319///Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message).
320#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
321#[serde(rename_all = "camelCase")]
322pub struct LogRemoveMemberData {
323    pub convo_id: String,
324    ///A system message with data of type #systemMessageDataRemoveMember
325    pub message: SystemMessageView,
326    ///Profiles referred in the system message.
327    pub related_profiles: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
328    pub rev: String,
329}
330pub type LogRemoveMember = crate::types::Object<LogRemoveMemberData>;
331///Event indicating a reaction was removed from a message.
332#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
333#[serde(rename_all = "camelCase")]
334pub struct LogRemoveReactionData {
335    pub convo_id: String,
336    pub message: crate::types::Union<LogRemoveReactionMessageRefs>,
337    pub reaction: ReactionView,
338    ///Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.
339    #[serde(skip_serializing_if = "core::option::Option::is_none")]
340    pub related_profiles: core::option::Option<
341        Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
342    >,
343    pub rev: String,
344}
345pub type LogRemoveReaction = crate::types::Object<LogRemoveReactionData>;
346///Event indicating a group convo was unlocked.
347#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
348#[serde(rename_all = "camelCase")]
349pub struct LogUnlockConvoData {
350    pub convo_id: String,
351    ///A system message with data of type #systemMessageDataUnlockConvo
352    pub message: SystemMessageView,
353    ///Profiles referred in the system message.
354    pub related_profiles: Vec<crate::chat::bsky::actor::defs::ProfileViewBasic>,
355    pub rev: String,
356}
357pub type LogUnlockConvo = crate::types::Object<LogUnlockConvoData>;
358///Event indicating the viewer unmuted a convo. Can be direct or group.
359#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
360#[serde(rename_all = "camelCase")]
361pub struct LogUnmuteConvoData {
362    pub convo_id: String,
363    pub rev: String,
364}
365pub type LogUnmuteConvo = crate::types::Object<LogUnmuteConvoData>;
366///Event indicating a prospective member withdrew their join request. Only the owner gets this.
367#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
368#[serde(rename_all = "camelCase")]
369pub struct LogWithdrawIncomingJoinRequestData {
370    pub convo_id: String,
371    ///Prospective member who withdrew their join request.
372    pub member: crate::chat::bsky::actor::defs::ProfileViewBasic,
373    pub rev: String,
374}
375pub type LogWithdrawIncomingJoinRequest = crate::types::Object<
376    LogWithdrawIncomingJoinRequestData,
377>;
378///Event indicating the viewer withdrew their own join request. Only requester actor gets this.
379#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
380#[serde(rename_all = "camelCase")]
381pub struct LogWithdrawOutgoingJoinRequestData {
382    pub convo_id: String,
383    pub rev: String,
384}
385pub type LogWithdrawOutgoingJoinRequest = crate::types::Object<
386    LogWithdrawOutgoingJoinRequestData,
387>;
388#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
389#[serde(rename_all = "camelCase")]
390pub struct MessageAndReactionViewData {
391    pub message: MessageView,
392    pub reaction: ReactionView,
393}
394pub type MessageAndReactionView = crate::types::Object<MessageAndReactionViewData>;
395///Placeholder embedded in place of a reply's parent message when that parent was sent before the viewer joined the group convo. The viewer has no access to that history, so no message data is carried.
396#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
397#[serde(rename_all = "camelCase")]
398pub struct MessageBeforeUserJoinedGroupViewData {}
399pub type MessageBeforeUserJoinedGroupView = crate::types::Object<
400    MessageBeforeUserJoinedGroupViewData,
401>;
402#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
403#[serde(rename_all = "camelCase")]
404pub struct MessageInputData {
405    #[serde(skip_serializing_if = "core::option::Option::is_none")]
406    pub embed: core::option::Option<crate::types::Union<MessageInputEmbedRefs>>,
407    ///Annotations of text (mentions, URLs, hashtags, etc)
408    #[serde(skip_serializing_if = "core::option::Option::is_none")]
409    pub facets: core::option::Option<Vec<crate::app::bsky::richtext::facet::Main>>,
410    ///If set, the message this message is replying to. The referenced message must be in the same convo.
411    #[serde(skip_serializing_if = "core::option::Option::is_none")]
412    pub reply_to: core::option::Option<ReplyRef>,
413    pub text: String,
414}
415pub type MessageInput = crate::types::Object<MessageInputData>;
416#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
417#[serde(rename_all = "camelCase")]
418pub struct MessageRefData {
419    pub convo_id: String,
420    pub did: crate::types::string::Did,
421    pub message_id: String,
422}
423pub type MessageRef = crate::types::Object<MessageRefData>;
424#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
425#[serde(rename_all = "camelCase")]
426pub struct MessageViewData {
427    #[serde(skip_serializing_if = "core::option::Option::is_none")]
428    pub embed: core::option::Option<crate::types::Union<MessageViewEmbedRefs>>,
429    ///Annotations of text (mentions, URLs, hashtags, etc)
430    #[serde(skip_serializing_if = "core::option::Option::is_none")]
431    pub facets: core::option::Option<Vec<crate::app::bsky::richtext::facet::Main>>,
432    pub id: String,
433    ///Reactions to this message, in ascending order of creation time.
434    #[serde(skip_serializing_if = "core::option::Option::is_none")]
435    pub reactions: core::option::Option<Vec<ReactionView>>,
436    ///If set, the message this message is replying to. The full view of the referenced message is embedded so the client can render it inline. Only a single level is embedded: the embedded message will not itself have a populated 'replyTo' field even if it was also a reply.
437    #[serde(skip_serializing_if = "core::option::Option::is_none")]
438    pub reply_to: core::option::Option<crate::types::Union<MessageViewReplyToRefs>>,
439    pub rev: String,
440    pub sender: MessageViewSender,
441    pub sent_at: crate::types::string::Datetime,
442    pub text: String,
443}
444pub type MessageView = crate::types::Object<MessageViewData>;
445#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
446#[serde(rename_all = "camelCase")]
447pub struct MessageViewSenderData {
448    pub did: crate::types::string::Did,
449}
450pub type MessageViewSender = crate::types::Object<MessageViewSenderData>;
451#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
452#[serde(rename_all = "camelCase")]
453pub struct ReactionViewData {
454    pub created_at: crate::types::string::Datetime,
455    pub sender: ReactionViewSender,
456    pub value: String,
457}
458pub type ReactionView = crate::types::Object<ReactionViewData>;
459#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
460#[serde(rename_all = "camelCase")]
461pub struct ReactionViewSenderData {
462    pub did: crate::types::string::Did,
463}
464pub type ReactionViewSender = crate::types::Object<ReactionViewSenderData>;
465///A reference to another message within the same convo, used to indicate that a message is a reply to it.
466#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
467#[serde(rename_all = "camelCase")]
468pub struct ReplyRefData {
469    pub message_id: String,
470}
471pub type ReplyRef = crate::types::Object<ReplyRefData>;
472///System message indicating a user was added to the group convo.
473#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
474#[serde(rename_all = "camelCase")]
475pub struct SystemMessageDataAddMemberData {
476    pub added_by: SystemMessageReferredUser,
477    ///Current view of the member who was added.
478    pub member: SystemMessageReferredUser,
479    ///Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.
480    pub role: crate::chat::bsky::actor::defs::MemberRole,
481}
482pub type SystemMessageDataAddMember = crate::types::Object<
483    SystemMessageDataAddMemberData,
484>;
485///System message indicating the group join link was created.
486#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
487#[serde(rename_all = "camelCase")]
488pub struct SystemMessageDataCreateJoinLinkData {}
489pub type SystemMessageDataCreateJoinLink = crate::types::Object<
490    SystemMessageDataCreateJoinLinkData,
491>;
492///System message indicating the group join link was disabled.
493#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
494#[serde(rename_all = "camelCase")]
495pub struct SystemMessageDataDisableJoinLinkData {}
496pub type SystemMessageDataDisableJoinLink = crate::types::Object<
497    SystemMessageDataDisableJoinLinkData,
498>;
499///System message indicating the group info was edited.
500#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
501#[serde(rename_all = "camelCase")]
502pub struct SystemMessageDataEditGroupData {
503    ///Group name that replaced the old.
504    #[serde(skip_serializing_if = "core::option::Option::is_none")]
505    pub new_name: core::option::Option<String>,
506    ///Group name that was replaced.
507    #[serde(skip_serializing_if = "core::option::Option::is_none")]
508    pub old_name: core::option::Option<String>,
509}
510pub type SystemMessageDataEditGroup = crate::types::Object<
511    SystemMessageDataEditGroupData,
512>;
513///System message indicating the group join link was edited.
514#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
515#[serde(rename_all = "camelCase")]
516pub struct SystemMessageDataEditJoinLinkData {}
517pub type SystemMessageDataEditJoinLink = crate::types::Object<
518    SystemMessageDataEditJoinLinkData,
519>;
520///System message indicating the group join link was enabled.
521#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
522#[serde(rename_all = "camelCase")]
523pub struct SystemMessageDataEnableJoinLinkData {}
524pub type SystemMessageDataEnableJoinLink = crate::types::Object<
525    SystemMessageDataEnableJoinLinkData,
526>;
527///System message indicating the group convo was locked.
528#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
529#[serde(rename_all = "camelCase")]
530pub struct SystemMessageDataLockConvoData {
531    ///Current view of the member who locked the group.
532    pub locked_by: SystemMessageReferredUser,
533}
534pub type SystemMessageDataLockConvo = crate::types::Object<
535    SystemMessageDataLockConvoData,
536>;
537///System message indicating the group convo was locked permanently.
538#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
539#[serde(rename_all = "camelCase")]
540pub struct SystemMessageDataLockConvoPermanentlyData {
541    ///Current view of the member who locked the group.
542    pub locked_by: SystemMessageReferredUser,
543}
544pub type SystemMessageDataLockConvoPermanently = crate::types::Object<
545    SystemMessageDataLockConvoPermanentlyData,
546>;
547///System message indicating a user joined the group convo via join link.
548#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
549#[serde(rename_all = "camelCase")]
550pub struct SystemMessageDataMemberJoinData {
551    ///If join link was configured to require approval, this will be set to who approved the request. Undefined if approval was not required.
552    #[serde(skip_serializing_if = "core::option::Option::is_none")]
553    pub approved_by: core::option::Option<SystemMessageReferredUser>,
554    ///Current view of the member who joined.
555    pub member: SystemMessageReferredUser,
556    ///Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.
557    pub role: crate::chat::bsky::actor::defs::MemberRole,
558}
559pub type SystemMessageDataMemberJoin = crate::types::Object<
560    SystemMessageDataMemberJoinData,
561>;
562///System message indicating a user voluntarily left the group convo.
563#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
564#[serde(rename_all = "camelCase")]
565pub struct SystemMessageDataMemberLeaveData {
566    ///Current view of the member who left the group.
567    pub member: SystemMessageReferredUser,
568}
569pub type SystemMessageDataMemberLeave = crate::types::Object<
570    SystemMessageDataMemberLeaveData,
571>;
572///System message indicating a user was removed from the group convo.
573#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
574#[serde(rename_all = "camelCase")]
575pub struct SystemMessageDataRemoveMemberData {
576    ///Current view of the member who was removed.
577    pub member: SystemMessageReferredUser,
578    pub removed_by: SystemMessageReferredUser,
579}
580pub type SystemMessageDataRemoveMember = crate::types::Object<
581    SystemMessageDataRemoveMemberData,
582>;
583///System message indicating the group convo was unlocked.
584#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
585#[serde(rename_all = "camelCase")]
586pub struct SystemMessageDataUnlockConvoData {
587    ///Current view of the member who unlocked the group.
588    pub unlocked_by: SystemMessageReferredUser,
589}
590pub type SystemMessageDataUnlockConvo = crate::types::Object<
591    SystemMessageDataUnlockConvoData,
592>;
593#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
594#[serde(rename_all = "camelCase")]
595pub struct SystemMessageReferredUserData {
596    pub did: crate::types::string::Did,
597}
598pub type SystemMessageReferredUser = crate::types::Object<SystemMessageReferredUserData>;
599#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
600#[serde(rename_all = "camelCase")]
601pub struct SystemMessageViewData {
602    pub data: crate::types::Union<SystemMessageViewDataRefs>,
603    pub id: String,
604    pub rev: String,
605    pub sent_at: crate::types::string::Datetime,
606}
607pub type SystemMessageView = crate::types::Object<SystemMessageViewData>;
608#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
609#[serde(tag = "$type")]
610pub enum ConvoViewKindRefs {
611    #[serde(rename = "chat.bsky.convo.defs#directConvo")]
612    DirectConvo(Box<DirectConvo>),
613    #[serde(rename = "chat.bsky.convo.defs#groupConvo")]
614    GroupConvo(Box<GroupConvo>),
615}
616#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
617#[serde(tag = "$type")]
618pub enum ConvoViewLastMessageRefs {
619    #[serde(rename = "chat.bsky.convo.defs#messageView")]
620    MessageView(Box<MessageView>),
621    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
622    DeletedMessageView(Box<DeletedMessageView>),
623    #[serde(rename = "chat.bsky.convo.defs#systemMessageView")]
624    SystemMessageView(Box<SystemMessageView>),
625}
626#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
627#[serde(tag = "$type")]
628pub enum ConvoViewLastReactionRefs {
629    #[serde(rename = "chat.bsky.convo.defs#messageAndReactionView")]
630    MessageAndReactionView(Box<MessageAndReactionView>),
631}
632#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
633#[serde(tag = "$type")]
634pub enum LogAddReactionMessageRefs {
635    #[serde(rename = "chat.bsky.convo.defs#messageView")]
636    MessageView(Box<MessageView>),
637    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
638    DeletedMessageView(Box<DeletedMessageView>),
639}
640#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
641#[serde(tag = "$type")]
642pub enum LogCreateMessageMessageRefs {
643    #[serde(rename = "chat.bsky.convo.defs#messageView")]
644    MessageView(Box<MessageView>),
645    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
646    DeletedMessageView(Box<DeletedMessageView>),
647}
648#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
649#[serde(tag = "$type")]
650pub enum LogDeleteMessageMessageRefs {
651    #[serde(rename = "chat.bsky.convo.defs#messageView")]
652    MessageView(Box<MessageView>),
653    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
654    DeletedMessageView(Box<DeletedMessageView>),
655}
656#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
657#[serde(tag = "$type")]
658pub enum LogReadConvoMessageRefs {
659    #[serde(rename = "chat.bsky.convo.defs#messageView")]
660    MessageView(Box<MessageView>),
661    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
662    DeletedMessageView(Box<DeletedMessageView>),
663    #[serde(rename = "chat.bsky.convo.defs#systemMessageView")]
664    SystemMessageView(Box<SystemMessageView>),
665}
666#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
667#[serde(tag = "$type")]
668pub enum LogReadMessageMessageRefs {
669    #[serde(rename = "chat.bsky.convo.defs#messageView")]
670    MessageView(Box<MessageView>),
671    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
672    DeletedMessageView(Box<DeletedMessageView>),
673    #[serde(rename = "chat.bsky.convo.defs#systemMessageView")]
674    SystemMessageView(Box<SystemMessageView>),
675}
676#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
677#[serde(tag = "$type")]
678pub enum LogRemoveReactionMessageRefs {
679    #[serde(rename = "chat.bsky.convo.defs#messageView")]
680    MessageView(Box<MessageView>),
681    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
682    DeletedMessageView(Box<DeletedMessageView>),
683}
684#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
685#[serde(tag = "$type")]
686pub enum MessageInputEmbedRefs {
687    #[serde(rename = "app.bsky.embed.record")]
688    AppBskyEmbedRecordMain(Box<crate::app::bsky::embed::record::Main>),
689    #[serde(rename = "chat.bsky.embed.joinLink")]
690    ChatBskyEmbedJoinLinkMain(Box<crate::chat::bsky::embed::join_link::Main>),
691}
692#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
693#[serde(tag = "$type")]
694pub enum MessageViewEmbedRefs {
695    #[serde(rename = "app.bsky.embed.record#view")]
696    AppBskyEmbedRecordView(Box<crate::app::bsky::embed::record::View>),
697    #[serde(rename = "chat.bsky.embed.joinLink#view")]
698    ChatBskyEmbedJoinLinkView(Box<crate::chat::bsky::embed::join_link::View>),
699}
700#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
701#[serde(tag = "$type")]
702pub enum MessageViewReplyToRefs {
703    #[serde(rename = "chat.bsky.convo.defs#messageView")]
704    MessageView(Box<MessageView>),
705    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
706    DeletedMessageView(Box<DeletedMessageView>),
707    #[serde(rename = "chat.bsky.convo.defs#messageBeforeUserJoinedGroupView")]
708    MessageBeforeUserJoinedGroupView(Box<MessageBeforeUserJoinedGroupView>),
709}
710#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
711#[serde(tag = "$type")]
712pub enum SystemMessageViewDataRefs {
713    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataAddMember")]
714    SystemMessageDataAddMember(Box<SystemMessageDataAddMember>),
715    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataRemoveMember")]
716    SystemMessageDataRemoveMember(Box<SystemMessageDataRemoveMember>),
717    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataMemberJoin")]
718    SystemMessageDataMemberJoin(Box<SystemMessageDataMemberJoin>),
719    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataMemberLeave")]
720    SystemMessageDataMemberLeave(Box<SystemMessageDataMemberLeave>),
721    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataLockConvo")]
722    SystemMessageDataLockConvo(Box<SystemMessageDataLockConvo>),
723    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataUnlockConvo")]
724    SystemMessageDataUnlockConvo(Box<SystemMessageDataUnlockConvo>),
725    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataLockConvoPermanently")]
726    SystemMessageDataLockConvoPermanently(Box<SystemMessageDataLockConvoPermanently>),
727    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataEditGroup")]
728    SystemMessageDataEditGroup(Box<SystemMessageDataEditGroup>),
729    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataCreateJoinLink")]
730    SystemMessageDataCreateJoinLink(Box<SystemMessageDataCreateJoinLink>),
731    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataEditJoinLink")]
732    SystemMessageDataEditJoinLink(Box<SystemMessageDataEditJoinLink>),
733    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataEnableJoinLink")]
734    SystemMessageDataEnableJoinLink(Box<SystemMessageDataEnableJoinLink>),
735    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataDisableJoinLink")]
736    SystemMessageDataDisableJoinLink(Box<SystemMessageDataDisableJoinLink>),
737}