add @bsky.app/sdk + @atproto/lex, vendor lexicons, codegen via lex cli

This commit is contained in:
Samuel Newman
2026-07-15 16:06:20 +03:00
parent 17c1ee4869
commit 15e232749a
306 changed files with 22544 additions and 2 deletions
+39
View File
@@ -0,0 +1,39 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.acceptConvo",
"defs": {
"main": {
"type": "procedure",
"description": "Marks a conversation as accepted, so it is shown in the list of accepted convos instead on the request convos.",
"errors": [
{
"name": "InvalidConvo"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {
"rev": {
"description": "Rev when the convo was accepted. If not present, the convo was already accepted.",
"type": "string"
}
}
}
}
}
}
}
+66
View File
@@ -0,0 +1,66 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.addReaction",
"defs": {
"main": {
"type": "procedure",
"description": "Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId", "messageId", "value"],
"properties": {
"convoId": {
"type": "string"
},
"messageId": {
"type": "string"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"minGraphemes": 1,
"maxGraphemes": 1
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["message"],
"properties": {
"message": {
"type": "ref",
"ref": "chat.bsky.convo.defs#messageView"
}
}
}
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "ReactionNotAllowed",
"description": "Indicates that reactions are not allowed on this message, e.g. because it is a system message."
},
{
"name": "ReactionMessageDeleted",
"description": "Indicates that the message has been deleted and reactions can no longer be added/removed."
},
{
"name": "ReactionLimitReached",
"description": "Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent."
},
{
"name": "ReactionInvalidValue",
"description": "Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."
}
]
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,41 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.deleteMessageForSelf",
"defs": {
"main": {
"type": "procedure",
"description": "Marks a message as deleted for the viewer, so they won't see that message in future enumerations.",
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "MessageDeleteNotAllowed",
"description": "Indicates that this message cannot be deleted, e.g. because it is a system message."
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId", "messageId"],
"properties": {
"convoId": {
"type": "string"
},
"messageId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "chat.bsky.convo.defs#deletedMessageView"
}
}
}
}
}
@@ -0,0 +1,13 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.exportAccountData",
"description": "Stub: chat.bsky.convo.exportAccountData is referenced in chat.bsky.authFullChatClient but the lexicon may have been renamed in the local repo.",
"defs": {
"main": {
"type": "query",
"output": {
"encoding": "application/jsonl"
}
}
}
}
+37
View File
@@ -0,0 +1,37 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getConvo",
"defs": {
"main": {
"type": "query",
"description": "Gets an existing conversation by its ID.",
"errors": [
{
"name": "InvalidConvo"
}
],
"parameters": {
"type": "params",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
@@ -0,0 +1,41 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getConvoAvailability",
"defs": {
"main": {
"type": "query",
"description": "Check whether the requester and the other members can start a 1-1 chat. Only applicable to direct (non-group) conversations. If an existing convo is found for these members, it is returned. Does not create a new convo if it doesn't exist.",
"parameters": {
"type": "params",
"required": ["members"],
"properties": {
"members": {
"type": "array",
"minLength": 1,
"maxLength": 10,
"items": {
"type": "string",
"format": "did"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["canChat"],
"properties": {
"canChat": {
"type": "boolean"
},
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
@@ -0,0 +1,58 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getConvoForMembers",
"defs": {
"main": {
"type": "query",
"description": "Get or create a 1-1 conversation for the given members. Always returns the same direct (non-group) conversation. To create a group conversation, use createGroup.",
"errors": [
{
"name": "AccountSuspended"
},
{
"name": "BlockedActor"
},
{
"name": "BlockedSubject"
},
{
"name": "MessagesDisabled"
},
{
"name": "NotFollowedBySender"
},
{
"name": "RecipientNotFound"
}
],
"parameters": {
"type": "params",
"required": ["members"],
"properties": {
"members": {
"type": "array",
"minLength": 1,
"maxLength": 10,
"items": {
"type": "string",
"format": "did"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
@@ -0,0 +1,52 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getConvoMembers",
"defs": {
"main": {
"type": "query",
"description": "Returns a paginated list of members from a conversation.",
"errors": [
{
"name": "InvalidConvo"
}
],
"parameters": {
"type": "params",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["members"],
"properties": {
"cursor": {
"type": "string"
},
"members": {
"type": "array",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic"
}
}
}
}
}
}
}
}
+68
View File
@@ -0,0 +1,68 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getLog",
"defs": {
"main": {
"type": "query",
"parameters": {
"type": "params",
"required": [],
"properties": {
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["logs"],
"properties": {
"cursor": {
"type": "string"
},
"logs": {
"type": "array",
"items": {
"type": "union",
"refs": [
"chat.bsky.convo.defs#logBeginConvo",
"chat.bsky.convo.defs#logAcceptConvo",
"chat.bsky.convo.defs#logLeaveConvo",
"chat.bsky.convo.defs#logMuteConvo",
"chat.bsky.convo.defs#logUnmuteConvo",
"chat.bsky.convo.defs#logCreateMessage",
"chat.bsky.convo.defs#logDeleteMessage",
"chat.bsky.convo.defs#logReadMessage",
"chat.bsky.convo.defs#logAddReaction",
"chat.bsky.convo.defs#logRemoveReaction",
"chat.bsky.convo.defs#logReadConvo",
"chat.bsky.convo.defs#logAddMember",
"chat.bsky.convo.defs#logRemoveMember",
"chat.bsky.convo.defs#logMemberJoin",
"chat.bsky.convo.defs#logMemberLeave",
"chat.bsky.convo.defs#logLockConvo",
"chat.bsky.convo.defs#logUnlockConvo",
"chat.bsky.convo.defs#logLockConvoPermanently",
"chat.bsky.convo.defs#logEditGroup",
"chat.bsky.convo.defs#logCreateJoinLink",
"chat.bsky.convo.defs#logEditJoinLink",
"chat.bsky.convo.defs#logEnableJoinLink",
"chat.bsky.convo.defs#logDisableJoinLink",
"chat.bsky.convo.defs#logIncomingJoinRequest",
"chat.bsky.convo.defs#logApproveJoinRequest",
"chat.bsky.convo.defs#logRejectJoinRequest",
"chat.bsky.convo.defs#logOutgoingJoinRequest",
"chat.bsky.convo.defs#logWithdrawIncomingJoinRequest",
"chat.bsky.convo.defs#logWithdrawOutgoingJoinRequest",
"chat.bsky.convo.defs#logReadJoinRequests"
]
}
}
}
}
}
}
}
}
+64
View File
@@ -0,0 +1,64 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getMessages",
"defs": {
"main": {
"type": "query",
"description": "Returns a page of messages from a conversation.",
"errors": [
{
"name": "InvalidConvo"
}
],
"parameters": {
"type": "params",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["messages"],
"properties": {
"cursor": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "union",
"refs": [
"chat.bsky.convo.defs#messageView",
"chat.bsky.convo.defs#deletedMessageView",
"chat.bsky.convo.defs#systemMessageView"
]
}
},
"relatedProfiles": {
"description": "Set of all members who authored or reacted to the returned messages. Members referred to by system messages are also included.",
"type": "array",
"items": {
"type": "ref",
"ref": "chat.bsky.actor.defs#profileViewBasic"
}
}
}
}
}
}
}
}
@@ -0,0 +1,37 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getUnreadCounts",
"defs": {
"main": {
"type": "query",
"description": "Returns unread conversation counts for conversations that are unlocked, not muted, split by convo status. Direct convos are excluded when a block relationship exists between the actor and the other member, or when the other member's account is deleted or deactivated. Group convos are considered unread if they have unread join request counts.",
"parameters": {
"type": "params",
"properties": {
"includeGroupChats": {
"type": "boolean",
"default": true,
"description": "When false, group convos are excluded from the counts."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["unreadAcceptedConvos", "unreadRequestConvos"],
"properties": {
"unreadAcceptedConvos": {
"type": "integer",
"description": "Number of unread, unlocked accepted convos. Counts convos with unread messages and unread join requests. Capped at 100, where 100 means more than 99."
},
"unreadRequestConvos": {
"type": "integer",
"description": "Number of unread, unlocked request convos. Includes convos with unread messages, but not with unread join request, since only the owner of a group has join requests to read, and the group would necessarily be accepted. Capped at 100, where 100 means more than 99."
}
}
}
}
}
}
}
+46
View File
@@ -0,0 +1,46 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.leaveConvo",
"defs": {
"main": {
"type": "procedure",
"description": "Leaves a conversation (direct or group). For group, this effectively removes membership. For direct, membership is never removed, only changed to remove from enumerations by the user who left.",
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "OwnerCannotLeave",
"description": "The owner of a group conversation cannot leave before locking the group."
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId", "rev"],
"properties": {
"convoId": {
"type": "string"
},
"rev": {
"type": "string"
}
}
}
}
}
}
}
@@ -0,0 +1,46 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.listConvoRequests",
"defs": {
"main": {
"type": "query",
"description": "Returns a page of incoming conversation requests for the user. Direct convo requests are returned as convoView; group join requests made by the user are returned as joinRequestConvoView.",
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["requests"],
"properties": {
"cursor": {
"type": "string"
},
"requests": {
"type": "array",
"items": {
"type": "union",
"refs": [
"chat.bsky.convo.defs#convoView",
"chat.bsky.group.defs#joinRequestConvoView"
]
}
}
}
}
}
}
}
}
+62
View File
@@ -0,0 +1,62 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.listConvos",
"defs": {
"main": {
"type": "query",
"description": "Returns a page of conversations (direct or group) for the user.",
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"cursor": {
"type": "string"
},
"readState": {
"type": "string",
"knownValues": ["unread"]
},
"status": {
"description": "Filter convos by their status. It is discouraged to call with \"request\" and preferred to call chat.bsky.convo.listConvoRequests, which also includes group join requests made by the user.",
"type": "string",
"knownValues": ["request", "accepted"]
},
"kind": {
"type": "string",
"description": "Filter by conversation kind.",
"knownValues": ["direct", "group"]
},
"lockStatus": {
"type": "string",
"description": "Filter by conversation lock status. Values follow chat.bsky.convo.defs#convoLockStatus.",
"knownValues": ["unlocked", "locked", "locked-permanently"]
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convos"],
"properties": {
"cursor": {
"type": "string"
},
"convos": {
"type": "array",
"items": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
}
+46
View File
@@ -0,0 +1,46 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.lockConvo",
"defs": {
"main": {
"type": "procedure",
"description": "Locks a group convo so no more content (messages, reactions) can be added to it.",
"errors": [
{
"name": "ConvoLocked"
},
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
+40
View File
@@ -0,0 +1,40 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.muteConvo",
"defs": {
"main": {
"type": "procedure",
"description": "Mutes a conversation, preventing notifications related to it.",
"errors": [
{
"name": "InvalidConvo"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
@@ -0,0 +1,62 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.removeReaction",
"defs": {
"main": {
"type": "procedure",
"description": "Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId", "messageId", "value"],
"properties": {
"convoId": {
"type": "string"
},
"messageId": {
"type": "string"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"minGraphemes": 1,
"maxGraphemes": 1
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["message"],
"properties": {
"message": {
"type": "ref",
"ref": "chat.bsky.convo.defs#messageView"
}
}
}
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "ReactionNotAllowed",
"description": "Indicates that reactions are not allowed on this message, e.g. because it is a system message."
},
{
"name": "ReactionMessageDeleted",
"description": "Indicates that the message has been deleted and reactions can no longer be added/removed."
},
{
"name": "ReactionInvalidValue",
"description": "Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."
}
]
}
}
}
+44
View File
@@ -0,0 +1,44 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.sendMessage",
"defs": {
"main": {
"type": "procedure",
"description": "Sends a message to a conversation.",
"errors": [
{
"name": "ConvoLocked"
},
{
"name": "InvalidConvo"
},
{
"name": "ReplyTargetNotFound"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId", "message"],
"properties": {
"convoId": {
"type": "string"
},
"message": {
"type": "ref",
"ref": "chat.bsky.convo.defs#messageInput"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "chat.bsky.convo.defs#messageView"
}
}
}
}
}
@@ -0,0 +1,67 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.sendMessageBatch",
"defs": {
"main": {
"type": "procedure",
"description": "Sends a batch of messages to a conversation.",
"errors": [
{
"name": "ConvoLocked"
},
{
"name": "InvalidConvo"
},
{
"name": "ReplyTargetNotFound"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["items"],
"properties": {
"items": {
"type": "array",
"maxLength": 100,
"items": {
"type": "ref",
"ref": "#batchItem"
}
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["items"],
"properties": {
"items": {
"type": "array",
"items": {
"type": "ref",
"ref": "chat.bsky.convo.defs#messageView"
}
}
}
}
}
},
"batchItem": {
"type": "object",
"required": ["convoId", "message"],
"properties": {
"convoId": {
"type": "string"
},
"message": {
"type": "ref",
"ref": "chat.bsky.convo.defs#messageInput"
}
}
}
}
}
+46
View File
@@ -0,0 +1,46 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.unlockConvo",
"defs": {
"main": {
"type": "procedure",
"description": "Unlocks a group convo so it is able to receive new content.",
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
},
{
"name": "ConvoLockedByModeration"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
+40
View File
@@ -0,0 +1,40 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.unmuteConvo",
"defs": {
"main": {
"type": "procedure",
"description": "Unmutes a conversation, allowing notifications related to it.",
"errors": [
{
"name": "InvalidConvo"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}
@@ -0,0 +1,35 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.updateAllRead",
"defs": {
"main": {
"type": "procedure",
"description": "Sets conversations from a user as read to the latest message, with filters.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"knownValues": ["request", "accepted"]
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["updatedCount"],
"properties": {
"updatedCount": {
"description": "The count of updated convos.",
"type": "integer"
}
}
}
}
}
}
}
+43
View File
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.updateRead",
"defs": {
"main": {
"type": "procedure",
"description": "Updates the read state of a conversation from, optionally specifying the last read message.",
"errors": [
{
"name": "InvalidConvo"
}
],
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": {
"type": "string"
},
"messageId": {
"type": "string"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convo"],
"properties": {
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}