[SDK] Add lexicon codegen pipeline (@atproto/lex) (#11346)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-13 22:26:12 +03:00
committed by GitHub
parent 97b3978fb8
commit 532681d5c0
304 changed files with 22682 additions and 55 deletions
+132
View File
@@ -0,0 +1,132 @@
{
"id": "com.atproto.admin.defs",
"defs": {
"repoRef": {
"type": "object",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
},
"statusAttr": {
"type": "object",
"required": [
"applied"
],
"properties": {
"ref": {
"type": "string"
},
"applied": {
"type": "boolean"
}
}
},
"accountView": {
"type": "object",
"required": [
"did",
"handle",
"indexedAt"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"email": {
"type": "string"
},
"handle": {
"type": "string",
"format": "handle"
},
"invites": {
"type": "array",
"items": {
"ref": "com.atproto.server.defs#inviteCode",
"type": "ref"
}
},
"indexedAt": {
"type": "string",
"format": "datetime"
},
"invitedBy": {
"ref": "com.atproto.server.defs#inviteCode",
"type": "ref"
},
"inviteNote": {
"type": "string"
},
"deactivatedAt": {
"type": "string",
"format": "datetime"
},
"relatedRecords": {
"type": "array",
"items": {
"type": "unknown"
}
},
"invitesDisabled": {
"type": "boolean"
},
"emailConfirmedAt": {
"type": "string",
"format": "datetime"
},
"threatSignatures": {
"type": "array",
"items": {
"ref": "#threatSignature",
"type": "ref"
}
}
}
},
"repoBlobRef": {
"type": "object",
"required": [
"did",
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"did": {
"type": "string",
"format": "did"
},
"recordUri": {
"type": "string",
"format": "at-uri"
}
}
},
"threatSignature": {
"type": "object",
"required": [
"property",
"value"
],
"properties": {
"value": {
"type": "string"
},
"property": {
"type": "string"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,26 @@
{
"id": "com.atproto.admin.deleteAccount",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"description": "Delete a user account as an administrator."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,30 @@
{
"id": "com.atproto.admin.disableAccountInvites",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"account"
],
"properties": {
"note": {
"type": "string",
"description": "Optional reason for disabled invites."
},
"account": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"description": "Disable an account from receiving new invite codes, but does not invalidate existing codes."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,31 @@
{
"id": "com.atproto.admin.disableInviteCodes",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"properties": {
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"accounts": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"encoding": "application/json"
},
"description": "Disable some set of codes and/or all codes associated with a set of users."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,30 @@
{
"id": "com.atproto.admin.enableAccountInvites",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"account"
],
"properties": {
"note": {
"type": "string",
"description": "Optional reason for enabled invites."
},
"account": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"description": "Re-enable an account's ability to receive invite codes."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,30 @@
{
"id": "com.atproto.admin.getAccountInfo",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"ref": "com.atproto.admin.defs#accountView",
"type": "ref"
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
},
"description": "Get details about an account."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,44 @@
{
"id": "com.atproto.admin.getAccountInfos",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"infos"
],
"properties": {
"infos": {
"type": "array",
"items": {
"ref": "com.atproto.admin.defs#accountView",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"dids"
],
"properties": {
"dids": {
"type": "array",
"items": {
"type": "string",
"format": "did"
}
}
}
},
"description": "Get details about some accounts."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,54 @@
{
"id": "com.atproto.admin.getInviteCodes",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"codes"
],
"properties": {
"codes": {
"type": "array",
"items": {
"ref": "com.atproto.server.defs#inviteCode",
"type": "ref"
}
},
"cursor": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"sort": {
"type": "string",
"default": "recent",
"knownValues": [
"recent",
"usage"
]
},
"limit": {
"type": "integer",
"default": 100,
"maximum": 500,
"minimum": 1
},
"cursor": {
"type": "string"
}
}
},
"description": "Get an admin view of invite codes."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,55 @@
{
"id": "com.atproto.admin.getSubjectStatus",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"subject"
],
"properties": {
"subject": {
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef",
"com.atproto.admin.defs#repoBlobRef"
],
"type": "union"
},
"takedown": {
"ref": "com.atproto.admin.defs#statusAttr",
"type": "ref"
},
"deactivated": {
"ref": "com.atproto.admin.defs#statusAttr",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"did": {
"type": "string",
"format": "did"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"blob": {
"type": "string",
"format": "cid"
}
}
},
"description": "Get the service-specific admin status of a subject (account, record, or blob)."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,49 @@
{
"id": "com.atproto.admin.searchAccounts",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"accounts"
],
"properties": {
"cursor": {
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"ref": "com.atproto.admin.defs#accountView",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"email": {
"type": "string"
},
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
}
}
},
"description": "Get list of accounts that matches your search query."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+56
View File
@@ -0,0 +1,56 @@
{
"id": "com.atproto.admin.sendEmail",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"recipientDid",
"content",
"senderDid"
],
"properties": {
"comment": {
"type": "string",
"description": "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers"
},
"content": {
"type": "string"
},
"subject": {
"type": "string"
},
"senderDid": {
"type": "string",
"format": "did"
},
"recipientDid": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"sent"
],
"properties": {
"sent": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"description": "Send email to a user's account email address."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,31 @@
{
"id": "com.atproto.admin.updateAccountEmail",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"account",
"email"
],
"properties": {
"email": {
"type": "string"
},
"account": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
}
}
},
"encoding": "application/json"
},
"description": "Administrative action to update an account's email."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,31 @@
{
"id": "com.atproto.admin.updateAccountHandle",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did",
"handle"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"handle": {
"type": "string",
"format": "handle"
}
}
},
"encoding": "application/json"
},
"description": "Administrative action to update an account's handle."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,30 @@
{
"id": "com.atproto.admin.updateAccountPassword",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did",
"password"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"password": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"description": "Update the password for a user account as an administrator."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,32 @@
{
"id": "com.atproto.admin.updateAccountSigningKey",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did",
"signingKey"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"signingKey": {
"type": "string",
"format": "did",
"description": "Did-key formatted public key"
}
}
},
"encoding": "application/json"
},
"description": "Administrative action to update an account's signing key in their Did document."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,61 @@
{
"id": "com.atproto.admin.updateSubjectStatus",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"subject"
],
"properties": {
"subject": {
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef",
"com.atproto.admin.defs#repoBlobRef"
],
"type": "union"
},
"takedown": {
"ref": "com.atproto.admin.defs#statusAttr",
"type": "ref"
},
"deactivated": {
"ref": "com.atproto.admin.defs#statusAttr",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"subject"
],
"properties": {
"subject": {
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef",
"com.atproto.admin.defs#repoBlobRef"
],
"type": "union"
},
"takedown": {
"ref": "com.atproto.admin.defs#statusAttr",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Update the service-specific admin status of a subject (account, record, or blob)."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}