add lexicon codegen: vendored lexicons, lex cli and generation scripts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-03 12:06:59 +03:00
parent a2129885c6
commit a3243820c9
311 changed files with 23342 additions and 14 deletions
+88
View File
@@ -0,0 +1,88 @@
{
"id": "chat.bsky.group.addMembers",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId",
"members"
],
"properties": {
"convoId": {
"type": "string"
},
"members": {
"type": "array",
"items": {
"type": "string",
"format": "did"
},
"minLength": 1
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AccountSuspended"
},
{
"name": "BlockedActor"
},
{
"name": "BlockedSubject"
},
{
"name": "ConvoLocked"
},
{
"name": "InsufficientRole"
},
{
"name": "InvalidConvo"
},
{
"name": "MemberLimitReached"
},
{
"name": "NotFollowedBySender"
},
{
"name": "RecipientNotFound"
},
{
"name": "UserForbidsGroups"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"convo"
],
"properties": {
"convo": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref"
},
"addedMembers": {
"type": "array",
"items": {
"ref": "chat.bsky.actor.defs#profileViewBasic",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"description": "Adds members to a group. The members are added in 'request' status, so they have to accept it. This creates convo memberships."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,56 @@
{
"id": "chat.bsky.group.approveJoinRequest",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId",
"member"
],
"properties": {
"member": {
"type": "string",
"format": "did"
},
"convoId": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
},
{
"name": "MemberLimitReached"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"convo"
],
"properties": {
"convo": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Approves a request to join a group (via join link) the user owns. Action taken by the group owner."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+75
View File
@@ -0,0 +1,75 @@
{
"id": "chat.bsky.group.createGroup",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"members",
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"maxGraphemes": 50
},
"members": {
"type": "array",
"items": {
"type": "string",
"format": "did"
},
"maxLength": 49
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AccountSuspended"
},
{
"name": "BlockedActor"
},
{
"name": "BlockedSubject"
},
{
"name": "NewAccountCannotCreateGroup"
},
{
"name": "NotFollowedBySender"
},
{
"name": "RecipientNotFound"
},
{
"name": "UserForbidsGroups"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"convo"
],
"properties": {
"convo": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create 'request' membership for all members, except the owner who is 'accepted'."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,60 @@
{
"id": "chat.bsky.group.createJoinLink",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId",
"joinRule"
],
"properties": {
"convoId": {
"type": "string"
},
"joinRule": {
"ref": "chat.bsky.group.defs#joinRule",
"type": "ref"
},
"requireApproval": {
"type": "boolean",
"default": false
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "EnabledJoinLinkAlreadyExists"
},
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"joinLink"
],
"properties": {
"joinLink": {
"ref": "chat.bsky.group.defs#joinLinkView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Creates a join link for the group convo."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+192
View File
@@ -0,0 +1,192 @@
{
"id": "chat.bsky.group.defs",
"defs": {
"joinRule": {
"type": "string",
"knownValues": [
"anyone",
"followedByOwner"
]
},
"joinLinkView": {
"type": "object",
"required": [
"code",
"enabledStatus",
"requireApproval",
"joinRule",
"createdAt"
],
"properties": {
"code": {
"type": "string"
},
"joinRule": {
"ref": "#joinRule",
"type": "ref"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"enabledStatus": {
"ref": "#linkEnabledStatus",
"type": "ref"
},
"requireApproval": {
"type": "boolean"
}
},
"description": "Join link view to be used within a group view, so the convo is surrounding, not specified inside this view."
},
"joinRequestView": {
"type": "object",
"required": [
"convoId",
"requestedBy",
"requestedAt"
],
"properties": {
"convoId": {
"type": "string"
},
"requestedAt": {
"type": "string",
"format": "datetime"
},
"requestedBy": {
"ref": "chat.bsky.actor.defs#profileViewBasic",
"type": "ref"
}
},
"description": "A join request from the perspective of the group owner."
},
"linkEnabledStatus": {
"type": "string",
"knownValues": [
"enabled",
"disabled"
]
},
"joinLinkPreviewView": {
"type": "object",
"required": [
"convoId",
"code",
"name",
"owner",
"memberCount",
"memberLimit",
"requireApproval",
"joinRule"
],
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"convo": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref",
"description": "Present only if the request is authenticated and the user is a member of the group."
},
"owner": {
"ref": "chat.bsky.actor.defs#profileViewBasic",
"type": "ref"
},
"viewer": {
"ref": "#joinLinkViewerState",
"type": "ref"
},
"convoId": {
"type": "string"
},
"joinRule": {
"ref": "#joinRule",
"type": "ref"
},
"memberCount": {
"type": "integer"
},
"memberLimit": {
"type": "integer"
},
"requireApproval": {
"type": "boolean"
}
},
"description": "Preview that can be shown in feeds, including to unauthenticated viewers."
},
"joinLinkViewerState": {
"type": "object",
"properties": {
"requestedAt": {
"type": "string",
"format": "datetime"
}
}
},
"joinRequestConvoView": {
"type": "object",
"required": [
"convoId",
"name",
"owner",
"memberCount",
"memberLimit",
"viewer"
],
"properties": {
"name": {
"type": "string"
},
"owner": {
"ref": "chat.bsky.actor.defs#profileViewBasic",
"type": "ref"
},
"viewer": {
"ref": "#joinLinkViewerState",
"type": "ref"
},
"convoId": {
"type": "string"
},
"memberCount": {
"type": "integer"
},
"memberLimit": {
"type": "integer"
}
},
"description": "A join request from the perspective of the requester, including enough group context to render the request in a list (e.g. group name, owner, member count)."
},
"invalidJoinLinkPreviewView": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
}
},
"description": "Preview for a join link code that does not map to an existing link. Carries only the code so clients can correlate with the input and render an invalid state."
},
"disabledJoinLinkPreviewView": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
}
},
"description": "Preview for a disabled join link. Carries only the code so clients can correlate with the input and render a disabled state."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,51 @@
{
"id": "chat.bsky.group.disableJoinLink",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId"
],
"properties": {
"convoId": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
},
{
"name": "NoJoinLink"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"joinLink"
],
"properties": {
"joinLink": {
"ref": "chat.bsky.group.defs#joinLinkView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Disables the active join link for the group convo."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+58
View File
@@ -0,0 +1,58 @@
{
"id": "chat.bsky.group.editGroup",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId",
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"maxGraphemes": 50
},
"convoId": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "ConvoLocked"
},
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"convo"
],
"properties": {
"convo": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Edits group settings."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,58 @@
{
"id": "chat.bsky.group.editJoinLink",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId"
],
"properties": {
"convoId": {
"type": "string"
},
"joinRule": {
"ref": "chat.bsky.group.defs#joinRule",
"type": "ref"
},
"requireApproval": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
},
{
"name": "NoJoinLink"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"joinLink"
],
"properties": {
"joinLink": {
"ref": "chat.bsky.group.defs#joinLinkView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Edits the existing join link settings for the group convo."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,54 @@
{
"id": "chat.bsky.group.enableJoinLink",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId"
],
"properties": {
"convoId": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
},
{
"name": "NoJoinLink"
},
{
"name": "LinkAlreadyEnabled"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"joinLink"
],
"properties": {
"joinLink": {
"ref": "chat.bsky.group.defs#joinLinkView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Re-enables a previously disabled join link for the group convo."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,49 @@
{
"id": "chat.bsky.group.getJoinLinkPreviews",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"joinLinkPreviews"
],
"properties": {
"joinLinkPreviews": {
"type": "array",
"items": {
"refs": [
"chat.bsky.group.defs#joinLinkPreviewView",
"chat.bsky.group.defs#disabledJoinLinkPreviewView",
"chat.bsky.group.defs#invalidJoinLinkPreviewView"
],
"type": "union"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"codes"
],
"properties": {
"codes": {
"type": "array",
"items": {
"type": "string"
},
"maxLength": 50,
"minLength": 1
}
}
},
"description": "Get public information about groups from join links. The output array matches the input codes one-to-one by position (and each view also carries its 'code'). Disabled codes return a disabledJoinLinkPreviewView, and codes that do not map to a previewable link return an invalidJoinLinkPreviewView."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,60 @@
{
"id": "chat.bsky.group.listJoinRequests",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"requests"
],
"properties": {
"cursor": {
"type": "string"
},
"requests": {
"type": "array",
"items": {
"ref": "chat.bsky.group.defs#joinRequestView",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"convoId"
],
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"convoId": {
"type": "string"
}
}
},
"description": "Lists a page of request to join a group (via join link) the user owns. Shows the data from the owner's point of view."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,53 @@
{
"id": "chat.bsky.group.listMutualGroups",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"convos"
],
"properties": {
"convos": {
"type": "array",
"items": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref"
}
},
"cursor": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"subject"
],
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"subject": {
"type": "string",
"format": "did"
}
}
},
"description": "Returns a page of group conversations that both the requester and the specified actor are members of."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,46 @@
{
"id": "chat.bsky.group.rejectJoinRequest",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId",
"member"
],
"properties": {
"member": {
"type": "string",
"format": "did"
},
"convoId": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
}
],
"output": {
"schema": {
"type": "object",
"required": [],
"properties": {}
},
"encoding": "application/json"
},
"description": "Rejects a request to join a group (via join link) the user owns. Action taken by the group owner."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,57 @@
{
"id": "chat.bsky.group.removeMembers",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId",
"members"
],
"properties": {
"convoId": {
"type": "string"
},
"members": {
"type": "array",
"items": {
"type": "string",
"format": "did"
},
"minLength": 1
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"convo"
],
"properties": {
"convo": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Removes members from a group. This deletes convo memberships, doesn't just set a status."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+68
View File
@@ -0,0 +1,68 @@
{
"id": "chat.bsky.group.requestJoin",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "ConvoLocked"
},
{
"name": "FollowRequired"
},
{
"name": "InvalidCode"
},
{
"name": "LinkDisabled"
},
{
"name": "MemberLimitReached"
},
{
"name": "UserKicked"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"status"
],
"properties": {
"convo": {
"ref": "chat.bsky.convo.defs#convoView",
"type": "ref",
"description": "The group convo joined. This is only present in the case of status=joined"
},
"status": {
"type": "string",
"knownValues": [
"joined",
"pending"
]
}
}
},
"encoding": "application/json"
},
"description": "Sends a request to join a group (via join link) to the group owner. Action taken by the prospective group member."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,41 @@
{
"id": "chat.bsky.group.updateJoinRequestsRead",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId"
],
"properties": {
"convoId": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidConvo"
},
{
"name": "InsufficientRole"
}
],
"output": {
"schema": {
"type": "object",
"required": [],
"properties": {}
},
"encoding": "application/json"
},
"description": "Marks all join requests as read for the group owner."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,38 @@
{
"id": "chat.bsky.group.withdrawJoinRequest",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"convoId"
],
"properties": {
"convoId": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidJoinRequest"
}
],
"output": {
"schema": {
"type": "object",
"required": [],
"properties": {}
},
"encoding": "application/json"
},
"description": "Withdraws a pending request to join a group. Action taken by the prospective member who originally requested to join."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}