chatBskyConvoDefs top-level constant
chat.bsky.convo.defs
Implementation
const chatBskyConvoDefs = <String, dynamic>{
"lexicon": 1,
"id": "chat.bsky.convo.defs",
"defs": {
"convoKind": {
"type": "string",
"knownValues": ["direct", "group"],
},
"convoLockStatus": {
"type": "string",
"knownValues": ["unlocked", "locked", "locked-permanently"],
},
"convoStatus": {
"type": "string",
"knownValues": ["request", "accepted"],
},
"convoRef": {
"type": "object",
"required": ["did", "convoId"],
"properties": {
"did": {"type": "string", "format": "did"},
"convoId": {"type": "string"},
},
},
"messageRef": {
"type": "object",
"required": ["did", "messageId", "convoId"],
"properties": {
"did": {"type": "string", "format": "did"},
"convoId": {"type": "string"},
"messageId": {"type": "string"},
},
},
"messageInput": {
"type": "object",
"required": ["text"],
"properties": {
"text": {"type": "string", "maxLength": 10000, "maxGraphemes": 1000},
"facets": {
"type": "array",
"description": "Annotations of text (mentions, URLs, hashtags, etc)",
"items": {"type": "ref", "ref": "app.bsky.richtext.facet"},
},
"embed": {
"type": "union",
"refs": ["app.bsky.embed.record", "chat.bsky.embed.joinLink"],
},
"replyTo": {
"type": "ref",
"description":
"If set, the message this message is replying to. The referenced message must be in the same convo.",
"ref": "#replyRef",
},
},
},
"replyRef": {
"type": "object",
"description":
"A reference to another message within the same convo, used to indicate that a message is a reply to it.",
"required": ["messageId"],
"properties": {
"messageId": {"type": "string"},
},
},
"messageView": {
"type": "object",
"required": ["id", "rev", "text", "sender", "sentAt"],
"properties": {
"id": {"type": "string"},
"rev": {"type": "string"},
"text": {"type": "string", "maxLength": 10000, "maxGraphemes": 1000},
"facets": {
"type": "array",
"description": "Annotations of text (mentions, URLs, hashtags, etc)",
"items": {"type": "ref", "ref": "app.bsky.richtext.facet"},
},
"embed": {
"type": "union",
"refs": [
"app.bsky.embed.record#view",
"chat.bsky.embed.joinLink#view",
],
},
"reactions": {
"type": "array",
"description":
"Reactions to this message, in ascending order of creation time.",
"items": {"type": "ref", "ref": "#reactionView"},
},
"replyTo": {
"type": "union",
"description":
"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.",
"refs": [
"#messageView",
"#deletedMessageView",
"#messageBeforeUserJoinedGroupView",
],
},
"sender": {"type": "ref", "ref": "#messageViewSender"},
"sentAt": {"type": "string", "format": "datetime"},
},
},
"systemMessageReferredUser": {
"type": "object",
"required": ["did"],
"properties": {
"did": {"type": "string", "format": "did"},
},
},
"systemMessageView": {
"type": "object",
"required": ["id", "rev", "sentAt", "data"],
"properties": {
"id": {"type": "string"},
"rev": {"type": "string"},
"sentAt": {"type": "string", "format": "datetime"},
"data": {
"type": "union",
"refs": [
"#systemMessageDataAddMember",
"#systemMessageDataRemoveMember",
"#systemMessageDataMemberJoin",
"#systemMessageDataMemberLeave",
"#systemMessageDataLockConvo",
"#systemMessageDataUnlockConvo",
"#systemMessageDataLockConvoPermanently",
"#systemMessageDataEditGroup",
"#systemMessageDataCreateJoinLink",
"#systemMessageDataEditJoinLink",
"#systemMessageDataEnableJoinLink",
"#systemMessageDataDisableJoinLink",
],
},
},
},
"systemMessageDataAddMember": {
"type": "object",
"description":
"System message indicating a user was added to the group convo.",
"required": ["member", "role", "addedBy"],
"properties": {
"member": {
"type": "ref",
"description": "Current view of the member who was added.",
"ref": "#systemMessageReferredUser",
},
"role": {
"type": "ref",
"description":
"Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.",
"ref": "chat.bsky.actor.defs#memberRole",
},
"addedBy": {"type": "ref", "ref": "#systemMessageReferredUser"},
},
},
"systemMessageDataRemoveMember": {
"type": "object",
"description":
"System message indicating a user was removed from the group convo.",
"required": ["member", "removedBy"],
"properties": {
"member": {
"type": "ref",
"description": "Current view of the member who was removed.",
"ref": "#systemMessageReferredUser",
},
"removedBy": {"type": "ref", "ref": "#systemMessageReferredUser"},
},
},
"systemMessageDataMemberJoin": {
"type": "object",
"description":
"System message indicating a user joined the group convo via join link.",
"required": ["member", "role"],
"properties": {
"member": {
"type": "ref",
"description": "Current view of the member who joined.",
"ref": "#systemMessageReferredUser",
},
"role": {
"type": "ref",
"description":
"Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.",
"ref": "chat.bsky.actor.defs#memberRole",
},
"approvedBy": {
"type": "ref",
"description":
"If join link was configured to require approval, this will be set to who approved the request. Undefined if approval was not required.",
"ref": "#systemMessageReferredUser",
},
},
},
"systemMessageDataMemberLeave": {
"type": "object",
"description":
"System message indicating a user voluntarily left the group convo.",
"required": ["member"],
"properties": {
"member": {
"type": "ref",
"description": "Current view of the member who left the group.",
"ref": "#systemMessageReferredUser",
},
},
},
"systemMessageDataLockConvo": {
"type": "object",
"description": "System message indicating the group convo was locked.",
"required": ["lockedBy"],
"properties": {
"lockedBy": {
"type": "ref",
"description": "Current view of the member who locked the group.",
"ref": "#systemMessageReferredUser",
},
},
},
"systemMessageDataUnlockConvo": {
"type": "object",
"description": "System message indicating the group convo was unlocked.",
"required": ["unlockedBy"],
"properties": {
"unlockedBy": {
"type": "ref",
"description": "Current view of the member who unlocked the group.",
"ref": "#systemMessageReferredUser",
},
},
},
"systemMessageDataLockConvoPermanently": {
"type": "object",
"description":
"System message indicating the group convo was locked permanently.",
"required": ["lockedBy"],
"properties": {
"lockedBy": {
"type": "ref",
"description": "Current view of the member who locked the group.",
"ref": "#systemMessageReferredUser",
},
},
},
"systemMessageDataEditGroup": {
"type": "object",
"description": "System message indicating the group info was edited.",
"properties": {
"oldName": {
"type": "string",
"description": "Group name that was replaced.",
},
"newName": {
"type": "string",
"description": "Group name that replaced the old.",
},
},
},
"systemMessageDataCreateJoinLink": {
"type": "object",
"description":
"System message indicating the group join link was created.",
"properties": {},
},
"systemMessageDataEditJoinLink": {
"type": "object",
"description":
"System message indicating the group join link was edited.",
"properties": {},
},
"systemMessageDataEnableJoinLink": {
"type": "object",
"description":
"System message indicating the group join link was enabled.",
"properties": {},
},
"systemMessageDataDisableJoinLink": {
"type": "object",
"description":
"System message indicating the group join link was disabled.",
"properties": {},
},
"deletedMessageView": {
"type": "object",
"required": ["id", "rev", "sender", "sentAt"],
"properties": {
"id": {"type": "string"},
"rev": {"type": "string"},
"sender": {"type": "ref", "ref": "#messageViewSender"},
"sentAt": {"type": "string", "format": "datetime"},
},
},
"messageBeforeUserJoinedGroupView": {
"type": "object",
"description":
"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.",
"properties": {},
},
"messageViewSender": {
"type": "object",
"required": ["did"],
"properties": {
"did": {"type": "string", "format": "did"},
},
},
"reactionView": {
"type": "object",
"required": ["value", "sender", "createdAt"],
"properties": {
"value": {"type": "string"},
"sender": {"type": "ref", "ref": "#reactionViewSender"},
"createdAt": {"type": "string", "format": "datetime"},
},
},
"reactionViewSender": {
"type": "object",
"required": ["did"],
"properties": {
"did": {"type": "string", "format": "did"},
},
},
"messageAndReactionView": {
"type": "object",
"required": ["message", "reaction"],
"properties": {
"message": {"type": "ref", "ref": "#messageView"},
"reaction": {"type": "ref", "ref": "#reactionView"},
},
},
"convoView": {
"type": "object",
"required": ["id", "rev", "members", "muted", "unreadCount"],
"properties": {
"id": {"type": "string"},
"rev": {"type": "string"},
"members": {
"type": "array",
"description":
"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.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
"lastMessage": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView", "#systemMessageView"],
},
"lastReaction": {
"type": "union",
"refs": ["#messageAndReactionView"],
},
"muted": {"type": "boolean"},
"status": {
"type": "ref",
"description":
"Convo status for the viewer member (not the convo itself).",
"ref": "#convoStatus",
},
"unreadCount": {"type": "integer"},
"kind": {
"type": "union",
"description":
"Union field that has data specific to different kinds of convos.",
"refs": ["#directConvo", "#groupConvo"],
},
},
},
"directConvo": {"type": "object", "properties": {}},
"groupConvo": {
"type": "object",
"required": [
"createdAt",
"lockStatus",
"lockStatusModerationOverride",
"memberCount",
"memberLimit",
"name",
],
"properties": {
"createdAt": {"type": "string", "format": "datetime"},
"joinLink": {"type": "ref", "ref": "chat.bsky.group.defs#joinLinkView"},
"joinRequestCount": {
"type": "integer",
"description":
"The total number of pending join requests for the group conversation. Only present for the owner. Capped at 21.",
},
"lockStatus": {
"type": "ref",
"description": "The lock status of the conversation.",
"ref": "#convoLockStatus",
},
"lockStatusModerationOverride": {
"type": "boolean",
"description":
"Whether the lock status is being forced by a moderation override (account inactivation or convo takedown) rather than the owner's own setting.",
},
"memberCount": {
"type": "integer",
"description":
"The total number of members in the group conversation.",
},
"memberLimit": {
"type": "integer",
"description":
"The maximum number of members allowed in the group conversation.",
},
"name": {
"type": "string",
"description": "The display name of the group conversation.",
"maxLength": 500,
"maxGraphemes": 50,
},
"unreadJoinRequestCount": {
"type": "integer",
"description":
"The number of unread join requests for the group conversation. Only present for the owner.",
},
},
},
"logBeginConvo": {
"type": "object",
"description":
"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.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
"logAcceptConvo": {
"type": "object",
"description":
"Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
"logLeaveConvo": {
"type": "object",
"description":
"Event indicating the viewer left a convo. Can be direct or group.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
"logMuteConvo": {
"type": "object",
"description":
"Event indicating the viewer muted a convo. Can be direct or group.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
"logUnmuteConvo": {
"type": "object",
"description":
"Event indicating the viewer unmuted a convo. Can be direct or group.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
"logCreateMessage": {
"type": "object",
"description":
"Event indicating a user-originated message was created. Is not emitted for system messages.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"],
},
"relatedProfiles": {
"type": "array",
"description":
"Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logDeleteMessage": {
"type": "object",
"description":
"Event indicating a user-originated message was deleted. Is not emitted for system messages.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"],
},
},
},
"logReadMessage": {
"type": "object",
"description":
"DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView", "#systemMessageView"],
},
},
},
"logAddReaction": {
"type": "object",
"description": "Event indicating a reaction was added to a message.",
"required": ["rev", "convoId", "message", "reaction"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"],
},
"reaction": {"type": "ref", "ref": "#reactionView"},
"relatedProfiles": {
"type": "array",
"description":
"Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logRemoveReaction": {
"type": "object",
"description": "Event indicating a reaction was removed from a message.",
"required": ["rev", "convoId", "message", "reaction"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"],
},
"reaction": {"type": "ref", "ref": "#reactionView"},
"relatedProfiles": {
"type": "array",
"description":
"Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logReadConvo": {
"type": "object",
"description":
"Event indicating a convo was read up to a certain message.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView", "#systemMessageView"],
},
},
},
"logAddMember": {
"type": "object",
"description":
"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).",
"required": ["rev", "convoId", "message", "relatedProfiles"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataAddMember",
"ref": "#systemMessageView",
},
"relatedProfiles": {
"type": "array",
"description": "Profiles referred in the system message.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logRemoveMember": {
"type": "object",
"description":
"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).",
"required": ["rev", "convoId", "message", "relatedProfiles"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataRemoveMember",
"ref": "#systemMessageView",
},
"relatedProfiles": {
"type": "array",
"description": "Profiles referred in the system message.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logMemberJoin": {
"type": "object",
"description":
"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).",
"required": ["rev", "convoId", "message", "relatedProfiles"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataMemberJoin",
"ref": "#systemMessageView",
},
"relatedProfiles": {
"type": "array",
"description": "Profiles referred in the system message.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logMemberLeave": {
"type": "object",
"description":
"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).",
"required": ["rev", "convoId", "message", "relatedProfiles"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataMemberLeave",
"ref": "#systemMessageView",
},
"relatedProfiles": {
"type": "array",
"description": "Profiles referred in the system message.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logLockConvo": {
"type": "object",
"description": "Event indicating a group convo was locked.",
"required": ["rev", "convoId", "message", "relatedProfiles"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataLockConvo",
"ref": "#systemMessageView",
},
"relatedProfiles": {
"type": "array",
"description": "Profiles referred in the system message.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logUnlockConvo": {
"type": "object",
"description": "Event indicating a group convo was unlocked.",
"required": ["rev", "convoId", "message", "relatedProfiles"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataUnlockConvo",
"ref": "#systemMessageView",
},
"relatedProfiles": {
"type": "array",
"description": "Profiles referred in the system message.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logLockConvoPermanently": {
"type": "object",
"description": "Event indicating a group convo was locked permanently.",
"required": ["rev", "convoId", "message", "relatedProfiles"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataLockConvoPermanently",
"ref": "#systemMessageView",
},
"relatedProfiles": {
"type": "array",
"description": "Profiles referred in the system message.",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
},
"logEditGroup": {
"type": "object",
"description": "Event indicating info about group convo was edited.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataEditGroup",
"ref": "#systemMessageView",
},
},
},
"logCreateJoinLink": {
"type": "object",
"description":
"Event indicating a join link was created for a group convo.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataCreateJoinLink",
"ref": "#systemMessageView",
},
},
},
"logEditJoinLink": {
"type": "object",
"description":
"Event indicating a settings about a join link for a group convo were edited.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataEditJoinLink",
"ref": "#systemMessageView",
},
},
},
"logEnableJoinLink": {
"type": "object",
"description":
"Event indicating a join link was enabled for a group convo.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataEnableJoinLink",
"ref": "#systemMessageView",
},
},
},
"logDisableJoinLink": {
"type": "object",
"description":
"Event indicating a join link was disabled for a group convo.",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"message": {
"type": "ref",
"description":
"A system message with data of type #systemMessageDataDisableJoinLink",
"ref": "#systemMessageView",
},
},
},
"logIncomingJoinRequest": {
"type": "object",
"description":
"Event indicating a join request was made to a group the viewer owns. Only the owner gets this.",
"required": ["rev", "convoId", "member"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"member": {
"type": "ref",
"description": "Prospective member who requested to join.",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
"logApproveJoinRequest": {
"type": "object",
"description":
"Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo.",
"required": ["rev", "convoId", "member"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"member": {
"type": "ref",
"description": "Prospective member who requested to join.",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
"logRejectJoinRequest": {
"type": "object",
"description":
"Event indicating a join request was rejected by the viewer. Only the owner gets this.",
"required": ["rev", "convoId", "member"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"member": {
"type": "ref",
"description": "Prospective member who requested to join.",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
"logOutgoingJoinRequest": {
"type": "object",
"description":
"Event indicating a join request was made by the requester. Only requester actor gets this.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
"logWithdrawIncomingJoinRequest": {
"type": "object",
"description":
"Event indicating a prospective member withdrew their join request. Only the owner gets this.",
"required": ["rev", "convoId", "member"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
"member": {
"type": "ref",
"description": "Prospective member who withdrew their join request.",
"ref": "chat.bsky.actor.defs#profileViewBasic",
},
},
},
"logWithdrawOutgoingJoinRequest": {
"type": "object",
"description":
"Event indicating the viewer withdrew their own join request. Only requester actor gets this.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
"logReadJoinRequests": {
"type": "object",
"description":
"Event indicating the group owner marked join requests as read. Only the owner gets this.",
"required": ["rev", "convoId"],
"properties": {
"rev": {"type": "string"},
"convoId": {"type": "string"},
},
},
},
};