[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
}
+30
View File
@@ -0,0 +1,30 @@
{
"id": "com.atproto.identity.defs",
"defs": {
"identityInfo": {
"type": "object",
"required": [
"did",
"handle",
"didDoc"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"didDoc": {
"type": "unknown",
"description": "The complete DID document for the identity."
},
"handle": {
"type": "string",
"format": "handle",
"description": "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document."
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,38 @@
{
"id": "com.atproto.identity.getRecommendedDidCredentials",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"properties": {
"services": {
"type": "unknown"
},
"alsoKnownAs": {
"type": "array",
"items": {
"type": "string"
}
},
"rotationKeys": {
"type": "array",
"items": {
"type": "string"
},
"description": "Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs."
},
"verificationMethods": {
"type": "unknown"
}
}
},
"encoding": "application/json"
},
"description": "Describe the credentials that should be included in the DID doc of an account that is migrating to this service."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,47 @@
{
"id": "com.atproto.identity.refreshIdentity",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"identifier"
],
"properties": {
"identifier": {
"type": "string",
"format": "at-identifier"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "HandleNotFound",
"description": "The resolution process confirmed that the handle does not resolve to any DID."
},
{
"name": "DidNotFound",
"description": "The DID resolution process confirmed that there is no current DID."
},
{
"name": "DidDeactivated",
"description": "The DID previously existed, but has been deactivated."
}
],
"output": {
"schema": {
"ref": "com.atproto.identity.defs#identityInfo",
"type": "ref"
},
"encoding": "application/json"
},
"description": "Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,11 @@
{
"id": "com.atproto.identity.requestPlcOperationSignature",
"defs": {
"main": {
"type": "procedure",
"description": "Request an email with a code to in order to request a signed PLC operation. Requires Auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,49 @@
{
"id": "com.atproto.identity.resolveDid",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "DidNotFound",
"description": "The DID resolution process confirmed that there is no current DID."
},
{
"name": "DidDeactivated",
"description": "The DID previously existed, but has been deactivated."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"didDoc"
],
"properties": {
"didDoc": {
"type": "unknown",
"description": "The complete DID document for the identity."
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "DID to resolve."
}
}
},
"description": "Resolves DID to DID document. Does not bi-directionally verify handle."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,45 @@
{
"id": "com.atproto.identity.resolveHandle",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "HandleNotFound",
"description": "The resolution process confirmed that the handle does not resolve to any DID."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"handle"
],
"properties": {
"handle": {
"type": "string",
"format": "handle",
"description": "The handle to resolve."
}
}
},
"description": "Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,45 @@
{
"id": "com.atproto.identity.resolveIdentity",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "HandleNotFound",
"description": "The resolution process confirmed that the handle does not resolve to any DID."
},
{
"name": "DidNotFound",
"description": "The DID resolution process confirmed that there is no current DID."
},
{
"name": "DidDeactivated",
"description": "The DID previously existed, but has been deactivated."
}
],
"output": {
"schema": {
"ref": "com.atproto.identity.defs#identityInfo",
"type": "ref"
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"identifier"
],
"properties": {
"identifier": {
"type": "string",
"format": "at-identifier",
"description": "Handle or DID to resolve."
}
}
},
"description": "Resolves an identity (DID or Handle) to a full identity (DID document and verified handle)."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,56 @@
{
"id": "com.atproto.identity.signPlcOperation",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "A token received through com.atproto.identity.requestPlcOperationSignature"
},
"services": {
"type": "unknown"
},
"alsoKnownAs": {
"type": "array",
"items": {
"type": "string"
}
},
"rotationKeys": {
"type": "array",
"items": {
"type": "string"
}
},
"verificationMethods": {
"type": "unknown"
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"operation"
],
"properties": {
"operation": {
"type": "unknown",
"description": "A signed DID PLC operation."
}
}
},
"encoding": "application/json"
},
"description": "Signs a PLC operation to update some value(s) in the requesting DID's document."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,25 @@
{
"id": "com.atproto.identity.submitPlcOperation",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"operation"
],
"properties": {
"operation": {
"type": "unknown"
}
}
},
"encoding": "application/json"
},
"description": "Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,27 @@
{
"id": "com.atproto.identity.updateHandle",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"handle"
],
"properties": {
"handle": {
"type": "string",
"format": "handle",
"description": "The new handle."
}
}
},
"encoding": "application/json"
},
"description": "Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+190
View File
@@ -0,0 +1,190 @@
{
"id": "com.atproto.label.defs",
"defs": {
"label": {
"type": "object",
"required": [
"src",
"uri",
"val",
"cts"
],
"properties": {
"cid": {
"type": "string",
"format": "cid",
"description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to."
},
"cts": {
"type": "string",
"format": "datetime",
"description": "Timestamp when this label was created."
},
"exp": {
"type": "string",
"format": "datetime",
"description": "Timestamp at which this label expires (no longer applies)."
},
"neg": {
"type": "boolean",
"description": "If true, this is a negation label, overwriting a previous label."
},
"sig": {
"type": "bytes",
"description": "Signature of dag-cbor encoded label."
},
"src": {
"type": "string",
"format": "did",
"description": "DID of the actor who created this label."
},
"uri": {
"type": "string",
"format": "uri",
"description": "AT URI of the record, repository (account), or other resource that this label applies to."
},
"val": {
"type": "string",
"maxLength": 128,
"description": "The short string name of the value or type of this label."
},
"ver": {
"type": "integer",
"description": "The AT Protocol version of the label object."
}
},
"description": "Metadata tag on an atproto resource (eg, repo or record)."
},
"selfLabel": {
"type": "object",
"required": [
"val"
],
"properties": {
"val": {
"type": "string",
"maxLength": 128,
"description": "The short string name of the value or type of this label."
}
},
"description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel."
},
"labelValue": {
"type": "string",
"knownValues": [
"!hide",
"!warn",
"!no-unauthenticated",
"porn",
"sexual",
"nudity",
"graphic-media",
"bot"
]
},
"selfLabels": {
"type": "object",
"required": [
"values"
],
"properties": {
"values": {
"type": "array",
"items": {
"ref": "#selfLabel",
"type": "ref"
},
"maxLength": 10
}
},
"description": "Metadata tags on an atproto record, published by the author within the record."
},
"labelValueDefinition": {
"type": "object",
"required": [
"identifier",
"severity",
"blurs",
"locales"
],
"properties": {
"blurs": {
"type": "string",
"description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",
"knownValues": [
"content",
"media",
"none"
]
},
"locales": {
"type": "array",
"items": {
"ref": "#labelValueDefinitionStrings",
"type": "ref"
}
},
"severity": {
"type": "string",
"description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
"knownValues": [
"inform",
"alert",
"none"
]
},
"adultOnly": {
"type": "boolean",
"description": "Does the user need to have adult content enabled in order to configure this label?"
},
"identifier": {
"type": "string",
"maxLength": 100,
"description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
"maxGraphemes": 100
},
"defaultSetting": {
"type": "string",
"default": "warn",
"description": "The default setting for this label.",
"knownValues": [
"ignore",
"warn",
"hide"
]
}
},
"description": "Declares a label value and its expected interpretations and behaviors."
},
"labelValueDefinitionStrings": {
"type": "object",
"required": [
"lang",
"name",
"description"
],
"properties": {
"lang": {
"type": "string",
"format": "language",
"description": "The code of the language these strings are written in."
},
"name": {
"type": "string",
"maxLength": 640,
"description": "A short human-readable name for the label.",
"maxGraphemes": 64
},
"description": {
"type": "string",
"maxLength": 100000,
"description": "A longer description of what the label means and why it might be applied.",
"maxGraphemes": 10000
}
},
"description": "Strings which describe the label in the UI, localized into a specific language."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,64 @@
{
"id": "com.atproto.label.queryLabels",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"labels"
],
"properties": {
"cursor": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"ref": "com.atproto.label.defs#label",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"uriPatterns"
],
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 250,
"minimum": 1
},
"cursor": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"type": "string",
"format": "did"
},
"description": "Optional list of label sources (DIDs) to filter on."
},
"uriPatterns": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI."
}
}
},
"description": "Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,70 @@
{
"id": "com.atproto.label.subscribeLabels",
"defs": {
"info": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"knownValues": [
"OutdatedCursor"
]
},
"message": {
"type": "string"
}
}
},
"main": {
"type": "subscription",
"errors": [
{
"name": "FutureCursor"
}
],
"message": {
"schema": {
"refs": [
"#labels",
"#info"
],
"type": "union"
}
},
"parameters": {
"type": "params",
"properties": {
"cursor": {
"type": "integer",
"description": "The last known event seq number to backfill from."
}
}
},
"description": "Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream."
},
"labels": {
"type": "object",
"required": [
"seq",
"labels"
],
"properties": {
"seq": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"ref": "com.atproto.label.defs#label",
"type": "ref"
}
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,58 @@
{
"id": "com.atproto.lexicon.resolveLexicon",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "LexiconNotFound",
"description": "No lexicon was resolved for the NSID."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"uri",
"cid",
"schema"
],
"properties": {
"cid": {
"type": "string",
"format": "cid",
"description": "The CID of the lexicon schema record."
},
"uri": {
"type": "string",
"format": "at-uri",
"description": "The AT-URI of the lexicon schema record."
},
"schema": {
"ref": "com.atproto.lexicon.schema#main",
"type": "ref",
"description": "The resolved lexicon schema record."
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"nsid"
],
"properties": {
"nsid": {
"type": "string",
"format": "nsid",
"description": "The lexicon NSID to resolve."
}
}
},
"description": "Resolves an atproto lexicon (NSID) to a schema."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+24
View File
@@ -0,0 +1,24 @@
{
"id": "com.atproto.lexicon.schema",
"defs": {
"main": {
"key": "nsid",
"type": "record",
"record": {
"type": "object",
"required": [
"lexicon"
],
"properties": {
"lexicon": {
"type": "integer",
"description": "Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system."
}
}
},
"description": "Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc)."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,104 @@
{
"id": "com.atproto.moderation.createReport",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"reasonType",
"subject"
],
"properties": {
"reason": {
"type": "string",
"maxLength": 20000,
"description": "Additional context about the content and violation.",
"maxGraphemes": 2000
},
"modTool": {
"ref": "#modTool",
"type": "ref"
},
"subject": {
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef"
],
"type": "union"
},
"reasonType": {
"ref": "com.atproto.moderation.defs#reasonType",
"type": "ref",
"description": "Indicates the broad category of violation the report is for."
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"id",
"reasonType",
"subject",
"reportedBy",
"createdAt"
],
"properties": {
"id": {
"type": "integer"
},
"reason": {
"type": "string",
"maxLength": 20000,
"maxGraphemes": 2000
},
"subject": {
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef"
],
"type": "union"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"reasonType": {
"ref": "com.atproto.moderation.defs#reasonType",
"type": "ref"
},
"reportedBy": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"description": "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth."
},
"modTool": {
"type": "object",
"required": [
"name"
],
"properties": {
"meta": {
"type": "unknown",
"description": "Additional arbitrary metadata about the source"
},
"name": {
"type": "string",
"description": "Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')"
}
},
"description": "Moderation tool information for tracing the source of the action"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+96
View File
@@ -0,0 +1,96 @@
{
"id": "com.atproto.moderation.defs",
"defs": {
"reasonRude": {
"type": "token",
"description": "Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`."
},
"reasonSpam": {
"type": "token",
"description": "Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`."
},
"reasonType": {
"type": "string",
"knownValues": [
"com.atproto.moderation.defs#reasonSpam",
"com.atproto.moderation.defs#reasonViolation",
"com.atproto.moderation.defs#reasonMisleading",
"com.atproto.moderation.defs#reasonSexual",
"com.atproto.moderation.defs#reasonRude",
"com.atproto.moderation.defs#reasonOther",
"com.atproto.moderation.defs#reasonAppeal",
"tools.ozone.report.defs#reasonAppeal",
"tools.ozone.report.defs#reasonOther",
"tools.ozone.report.defs#reasonViolenceAnimal",
"tools.ozone.report.defs#reasonViolenceThreats",
"tools.ozone.report.defs#reasonViolenceGraphicContent",
"tools.ozone.report.defs#reasonViolenceGlorification",
"tools.ozone.report.defs#reasonViolenceExtremistContent",
"tools.ozone.report.defs#reasonViolenceTrafficking",
"tools.ozone.report.defs#reasonViolenceOther",
"tools.ozone.report.defs#reasonSexualAbuseContent",
"tools.ozone.report.defs#reasonSexualNCII",
"tools.ozone.report.defs#reasonSexualDeepfake",
"tools.ozone.report.defs#reasonSexualAnimal",
"tools.ozone.report.defs#reasonSexualUnlabeled",
"tools.ozone.report.defs#reasonSexualOther",
"tools.ozone.report.defs#reasonChildSafetyCSAM",
"tools.ozone.report.defs#reasonChildSafetyGroom",
"tools.ozone.report.defs#reasonChildSafetyPrivacy",
"tools.ozone.report.defs#reasonChildSafetyHarassment",
"tools.ozone.report.defs#reasonChildSafetyOther",
"tools.ozone.report.defs#reasonHarassmentTroll",
"tools.ozone.report.defs#reasonHarassmentTargeted",
"tools.ozone.report.defs#reasonHarassmentHateSpeech",
"tools.ozone.report.defs#reasonHarassmentDoxxing",
"tools.ozone.report.defs#reasonHarassmentOther",
"tools.ozone.report.defs#reasonMisleadingBot",
"tools.ozone.report.defs#reasonMisleadingImpersonation",
"tools.ozone.report.defs#reasonMisleadingSpam",
"tools.ozone.report.defs#reasonMisleadingScam",
"tools.ozone.report.defs#reasonMisleadingElections",
"tools.ozone.report.defs#reasonMisleadingOther",
"tools.ozone.report.defs#reasonRuleSiteSecurity",
"tools.ozone.report.defs#reasonRuleProhibitedSales",
"tools.ozone.report.defs#reasonRuleBanEvasion",
"tools.ozone.report.defs#reasonRuleOther",
"tools.ozone.report.defs#reasonSelfHarmContent",
"tools.ozone.report.defs#reasonSelfHarmED",
"tools.ozone.report.defs#reasonSelfHarmStunts",
"tools.ozone.report.defs#reasonSelfHarmSubstances",
"tools.ozone.report.defs#reasonSelfHarmOther"
]
},
"reasonOther": {
"type": "token",
"description": "Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`."
},
"subjectType": {
"type": "string",
"description": "Tag describing a type of subject that might be reported.",
"knownValues": [
"account",
"record",
"chat"
]
},
"reasonAppeal": {
"type": "token",
"description": "Appeal a previously taken moderation action"
},
"reasonSexual": {
"type": "token",
"description": "Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`."
},
"reasonViolation": {
"type": "token",
"description": "Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`."
},
"reasonMisleading": {
"type": "token",
"description": "Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+196
View File
@@ -0,0 +1,196 @@
{
"id": "com.atproto.repo.applyWrites",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"repo",
"writes"
],
"properties": {
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo (aka, current account)."
},
"writes": {
"type": "array",
"items": {
"refs": [
"#create",
"#update",
"#delete"
],
"type": "union",
"closed": true
}
},
"validate": {
"type": "boolean",
"description": "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons."
},
"swapCommit": {
"type": "string",
"format": "cid",
"description": "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidSwap",
"description": "Indicates that the 'swapCommit' parameter did not match current commit."
}
],
"output": {
"schema": {
"type": "object",
"required": [],
"properties": {
"commit": {
"ref": "com.atproto.repo.defs#commitMeta",
"type": "ref"
},
"results": {
"type": "array",
"items": {
"refs": [
"#createResult",
"#updateResult",
"#deleteResult"
],
"type": "union",
"closed": true
}
}
}
},
"encoding": "application/json"
},
"description": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS."
},
"create": {
"type": "object",
"required": [
"collection",
"value"
],
"properties": {
"rkey": {
"type": "string",
"format": "record-key",
"maxLength": 512,
"description": "NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility."
},
"value": {
"type": "unknown"
},
"collection": {
"type": "string",
"format": "nsid"
}
},
"description": "Operation which creates a new record."
},
"delete": {
"type": "object",
"required": [
"collection",
"rkey"
],
"properties": {
"rkey": {
"type": "string",
"format": "record-key"
},
"collection": {
"type": "string",
"format": "nsid"
}
},
"description": "Operation which deletes an existing record."
},
"update": {
"type": "object",
"required": [
"collection",
"rkey",
"value"
],
"properties": {
"rkey": {
"type": "string",
"format": "record-key"
},
"value": {
"type": "unknown"
},
"collection": {
"type": "string",
"format": "nsid"
}
},
"description": "Operation which updates an existing record."
},
"createResult": {
"type": "object",
"required": [
"uri",
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"validationStatus": {
"type": "string",
"knownValues": [
"valid",
"unknown"
]
}
}
},
"deleteResult": {
"type": "object",
"required": [],
"properties": {}
},
"updateResult": {
"type": "object",
"required": [
"uri",
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"validationStatus": {
"type": "string",
"knownValues": [
"valid",
"unknown"
]
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,90 @@
{
"id": "com.atproto.repo.createRecord",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"repo",
"collection",
"record"
],
"properties": {
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo (aka, current account)."
},
"rkey": {
"type": "string",
"format": "record-key",
"maxLength": 512,
"description": "The Record Key."
},
"record": {
"type": "unknown",
"description": "The record itself. Must contain a $type field."
},
"validate": {
"type": "boolean",
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
},
"collection": {
"type": "string",
"format": "nsid",
"description": "The NSID of the record collection."
},
"swapCommit": {
"type": "string",
"format": "cid",
"description": "Compare and swap with the previous commit by CID."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidSwap",
"description": "Indicates that 'swapCommit' didn't match current repo commit."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"uri",
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"commit": {
"ref": "com.atproto.repo.defs#commitMeta",
"type": "ref"
},
"validationStatus": {
"type": "string",
"knownValues": [
"valid",
"unknown"
]
}
}
},
"encoding": "application/json"
},
"description": "Create a single new repository record. Requires auth, implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+24
View File
@@ -0,0 +1,24 @@
{
"id": "com.atproto.repo.defs",
"defs": {
"commitMeta": {
"type": "object",
"required": [
"cid",
"rev"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"rev": {
"type": "string",
"format": "tid"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,66 @@
{
"id": "com.atproto.repo.deleteRecord",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"repo",
"collection",
"rkey"
],
"properties": {
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo (aka, current account)."
},
"rkey": {
"type": "string",
"format": "record-key",
"description": "The Record Key."
},
"collection": {
"type": "string",
"format": "nsid",
"description": "The NSID of the record collection."
},
"swapCommit": {
"type": "string",
"format": "cid",
"description": "Compare and swap with the previous commit by CID."
},
"swapRecord": {
"type": "string",
"format": "cid",
"description": "Compare and swap with the previous record by CID."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidSwap"
}
],
"output": {
"schema": {
"type": "object",
"properties": {
"commit": {
"ref": "com.atproto.repo.defs#commitMeta",
"type": "ref"
}
}
},
"encoding": "application/json"
},
"description": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,63 @@
{
"id": "com.atproto.repo.describeRepo",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"handle",
"did",
"didDoc",
"collections",
"handleIsCorrect"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"didDoc": {
"type": "unknown",
"description": "The complete DID document for this account."
},
"handle": {
"type": "string",
"format": "handle"
},
"collections": {
"type": "array",
"items": {
"type": "string",
"format": "nsid"
},
"description": "List of all the collections (NSIDs) for which this repo contains at least one record."
},
"handleIsCorrect": {
"type": "boolean",
"description": "Indicates if handle is currently valid (resolves bi-directionally)"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"repo"
],
"properties": {
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
}
}
},
"description": "Get information about an account and repository, including the list of collections. Does not require auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+69
View File
@@ -0,0 +1,69 @@
{
"id": "com.atproto.repo.getRecord",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "RecordNotFound"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"uri",
"value"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"value": {
"type": "unknown"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"repo",
"collection",
"rkey"
],
"properties": {
"cid": {
"type": "string",
"format": "cid",
"description": "The CID of the version of the record. If not specified, then return the most recent version."
},
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
},
"rkey": {
"type": "string",
"format": "record-key",
"description": "The Record Key."
},
"collection": {
"type": "string",
"format": "nsid",
"description": "The NSID of the record collection."
}
}
},
"description": "Get a single record from a repository. Does not require auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+14
View File
@@ -0,0 +1,14 @@
{
"id": "com.atproto.repo.importRepo",
"defs": {
"main": {
"type": "procedure",
"input": {
"encoding": "application/vnd.ipld.car"
},
"description": "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,63 @@
{
"id": "com.atproto.repo.listMissingBlobs",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"blobs"
],
"properties": {
"blobs": {
"type": "array",
"items": {
"ref": "#recordBlob",
"type": "ref"
}
},
"cursor": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"default": 500,
"maximum": 1000,
"minimum": 1
},
"cursor": {
"type": "string"
}
}
},
"description": "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow."
},
"recordBlob": {
"type": "object",
"required": [
"cid",
"recordUri"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"recordUri": {
"type": "string",
"format": "at-uri"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,86 @@
{
"id": "com.atproto.repo.listRecords",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"records"
],
"properties": {
"cursor": {
"type": "string"
},
"records": {
"type": "array",
"items": {
"ref": "#record",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"repo",
"collection"
],
"properties": {
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo."
},
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1,
"description": "The number of records to return."
},
"cursor": {
"type": "string"
},
"reverse": {
"type": "boolean",
"description": "Flag to reverse the order of the returned records."
},
"collection": {
"type": "string",
"format": "nsid",
"description": "The NSID of the record type."
}
}
},
"description": "List a range of records in a repository, matching a specific collection. Does not require auth."
},
"record": {
"type": "object",
"required": [
"uri",
"cid",
"value"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"value": {
"type": "unknown"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+98
View File
@@ -0,0 +1,98 @@
{
"id": "com.atproto.repo.putRecord",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"nullable": [
"swapRecord"
],
"required": [
"repo",
"collection",
"rkey",
"record"
],
"properties": {
"repo": {
"type": "string",
"format": "at-identifier",
"description": "The handle or DID of the repo (aka, current account)."
},
"rkey": {
"type": "string",
"format": "record-key",
"maxLength": 512,
"description": "The Record Key."
},
"record": {
"type": "unknown",
"description": "The record to write."
},
"validate": {
"type": "boolean",
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
},
"collection": {
"type": "string",
"format": "nsid",
"description": "The NSID of the record collection."
},
"swapCommit": {
"type": "string",
"format": "cid",
"description": "Compare and swap with the previous commit by CID."
},
"swapRecord": {
"type": "string",
"format": "cid",
"description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidSwap"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"uri",
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"commit": {
"ref": "com.atproto.repo.defs#commitMeta",
"type": "ref"
},
"validationStatus": {
"type": "string",
"knownValues": [
"valid",
"unknown"
]
}
}
},
"encoding": "application/json"
},
"description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+25
View File
@@ -0,0 +1,25 @@
{
"id": "com.atproto.repo.strongRef",
"defs": {
"main": {
"type": "object",
"required": [
"uri",
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"description": "A URI with a content-hash fingerprint."
}
+28
View File
@@ -0,0 +1,28 @@
{
"id": "com.atproto.repo.uploadBlob",
"defs": {
"main": {
"type": "procedure",
"input": {
"encoding": "*/*"
},
"output": {
"schema": {
"type": "object",
"required": [
"blob"
],
"properties": {
"blob": {
"type": "blob"
}
}
},
"encoding": "application/json"
},
"description": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,11 @@
{
"id": "com.atproto.server.activateAccount",
"defs": {
"main": {
"type": "procedure",
"description": "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,58 @@
{
"id": "com.atproto.server.checkAccountStatus",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"activated",
"validDid",
"repoCommit",
"repoRev",
"repoBlocks",
"indexedRecords",
"privateStateValues",
"expectedBlobs",
"importedBlobs"
],
"properties": {
"repoRev": {
"type": "string"
},
"validDid": {
"type": "boolean"
},
"activated": {
"type": "boolean"
},
"repoBlocks": {
"type": "integer"
},
"repoCommit": {
"type": "string",
"format": "cid"
},
"expectedBlobs": {
"type": "integer"
},
"importedBlobs": {
"type": "integer"
},
"indexedRecords": {
"type": "integer"
},
"privateStateValues": {
"type": "integer"
}
}
},
"encoding": "application/json"
},
"description": "Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,43 @@
{
"id": "com.atproto.server.confirmEmail",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"email",
"token"
],
"properties": {
"email": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AccountNotFound"
},
{
"name": "ExpiredToken"
},
{
"name": "InvalidToken"
},
{
"name": "InvalidEmail"
}
],
"description": "Confirm an email using a token from com.atproto.server.requestEmailConfirmation."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,113 @@
{
"id": "com.atproto.server.createAccount",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"handle"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "Pre-existing atproto DID, being imported to a new account."
},
"email": {
"type": "string"
},
"plcOp": {
"type": "unknown",
"description": "A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented."
},
"handle": {
"type": "string",
"format": "handle",
"description": "Requested handle for the account."
},
"password": {
"type": "string",
"description": "Initial account password. May need to meet instance-specific password strength requirements."
},
"inviteCode": {
"type": "string"
},
"recoveryKey": {
"type": "string",
"description": "DID PLC rotation key (aka, recovery key) to be included in PLC creation operation."
},
"verificationCode": {
"type": "string"
},
"verificationPhone": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "InvalidHandle"
},
{
"name": "InvalidPassword"
},
{
"name": "InvalidInviteCode"
},
{
"name": "HandleNotAvailable"
},
{
"name": "UnsupportedDomain"
},
{
"name": "UnresolvableDid"
},
{
"name": "IncompatibleDidDoc"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"accessJwt",
"refreshJwt",
"handle",
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the new account."
},
"didDoc": {
"type": "unknown",
"description": "Complete DID document."
},
"handle": {
"type": "string",
"format": "handle"
},
"accessJwt": {
"type": "string"
},
"refreshJwt": {
"type": "string"
}
},
"description": "Account login session returned on successful account creation."
},
"encoding": "application/json"
},
"description": "Create an account. Implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,65 @@
{
"id": "com.atproto.server.createAppPassword",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "A short name for the App Password, to help distinguish them."
},
"privileged": {
"type": "boolean",
"description": "If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AccountTakedown"
}
],
"output": {
"schema": {
"ref": "#appPassword",
"type": "ref"
},
"encoding": "application/json"
},
"description": "Create an App Password."
},
"appPassword": {
"type": "object",
"required": [
"name",
"password",
"createdAt"
],
"properties": {
"name": {
"type": "string"
},
"password": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"privileged": {
"type": "boolean"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,43 @@
{
"id": "com.atproto.server.createInviteCode",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"useCount"
],
"properties": {
"useCount": {
"type": "integer"
},
"forAccount": {
"type": "string",
"format": "did"
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"description": "Create an invite code."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,73 @@
{
"id": "com.atproto.server.createInviteCodes",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"codeCount",
"useCount"
],
"properties": {
"useCount": {
"type": "integer"
},
"codeCount": {
"type": "integer",
"default": 1
},
"forAccounts": {
"type": "array",
"items": {
"type": "string",
"format": "did"
}
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"codes"
],
"properties": {
"codes": {
"type": "array",
"items": {
"ref": "#accountCodes",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"description": "Create invite codes."
},
"accountCodes": {
"type": "object",
"required": [
"account",
"codes"
],
"properties": {
"codes": {
"type": "array",
"items": {
"type": "string"
}
},
"account": {
"type": "string"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,97 @@
{
"id": "com.atproto.server.createSession",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"identifier",
"password"
],
"properties": {
"password": {
"type": "string"
},
"identifier": {
"type": "string",
"description": "Handle or other identifier supported by the server for the authenticating user."
},
"allowTakendown": {
"type": "boolean",
"description": "When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned"
},
"authFactorToken": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AccountTakedown"
},
{
"name": "AuthFactorTokenRequired"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"accessJwt",
"refreshJwt",
"handle",
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"email": {
"type": "string"
},
"active": {
"type": "boolean"
},
"didDoc": {
"type": "unknown"
},
"handle": {
"type": "string",
"format": "handle"
},
"status": {
"type": "string",
"description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
"knownValues": [
"takendown",
"suspended",
"deactivated"
]
},
"accessJwt": {
"type": "string"
},
"refreshJwt": {
"type": "string"
},
"emailConfirmed": {
"type": "boolean"
},
"emailAuthFactor": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"description": "Create an authentication session."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,24 @@
{
"id": "com.atproto.server.deactivateAccount",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"properties": {
"deleteAfter": {
"type": "string",
"format": "datetime",
"description": "A recommendation to server as to how long they should hold onto the deactivated account before deleting."
}
}
},
"encoding": "application/json"
},
"description": "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+64
View File
@@ -0,0 +1,64 @@
{
"id": "com.atproto.server.defs",
"defs": {
"inviteCode": {
"type": "object",
"required": [
"code",
"available",
"disabled",
"forAccount",
"createdBy",
"createdAt",
"uses"
],
"properties": {
"code": {
"type": "string"
},
"uses": {
"type": "array",
"items": {
"ref": "#inviteCodeUse",
"type": "ref"
}
},
"disabled": {
"type": "boolean"
},
"available": {
"type": "integer"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"createdBy": {
"type": "string"
},
"forAccount": {
"type": "string"
}
}
},
"inviteCodeUse": {
"type": "object",
"required": [
"usedBy",
"usedAt"
],
"properties": {
"usedAt": {
"type": "string",
"format": "datetime"
},
"usedBy": {
"type": "string",
"format": "did"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,42 @@
{
"id": "com.atproto.server.deleteAccount",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did",
"password",
"token"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"token": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "ExpiredToken"
},
{
"name": "InvalidToken"
}
],
"description": "Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,19 @@
{
"id": "com.atproto.server.deleteSession",
"defs": {
"main": {
"type": "procedure",
"errors": [
{
"name": "InvalidToken"
},
{
"name": "ExpiredToken"
}
],
"description": "Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt')."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,73 @@
{
"id": "com.atproto.server.describeServer",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"did",
"availableUserDomains"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"links": {
"ref": "#links",
"type": "ref",
"description": "URLs of service policy documents."
},
"contact": {
"ref": "#contact",
"type": "ref",
"description": "Contact information"
},
"inviteCodeRequired": {
"type": "boolean",
"description": "If true, an invite code must be supplied to create an account on this instance."
},
"availableUserDomains": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of domain suffixes that can be used in account handles."
},
"phoneVerificationRequired": {
"type": "boolean",
"description": "If true, a phone verification token must be supplied to create an account on this instance."
}
}
},
"encoding": "application/json"
},
"description": "Describes the server's account creation requirements and capabilities. Implemented by PDS."
},
"links": {
"type": "object",
"properties": {
"privacyPolicy": {
"type": "string",
"format": "uri"
},
"termsOfService": {
"type": "string",
"format": "uri"
}
}
},
"contact": {
"type": "object",
"properties": {
"email": {
"type": "string"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,48 @@
{
"id": "com.atproto.server.getAccountInviteCodes",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "DuplicateCreate"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"codes"
],
"properties": {
"codes": {
"type": "array",
"items": {
"ref": "com.atproto.server.defs#inviteCode",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"includeUsed": {
"type": "boolean",
"default": true
},
"createAvailable": {
"type": "boolean",
"default": true,
"description": "Controls whether any new 'earned' but not 'created' invites should be created."
}
}
},
"description": "Get all invite codes for the current account. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,53 @@
{
"id": "com.atproto.server.getServiceAuth",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "BadExpiration",
"description": "Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"aud"
],
"properties": {
"aud": {
"type": "string",
"format": "did",
"description": "The DID of the service that the token will be used to authenticate with"
},
"exp": {
"type": "integer",
"description": "The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope."
},
"lxm": {
"type": "string",
"format": "nsid",
"description": "Lexicon (XRPC) method to bind the requested token to"
}
}
},
"description": "Get a signed token on behalf of the requesting DID for the requested service."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,55 @@
{
"id": "com.atproto.server.getSession",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"handle",
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"email": {
"type": "string"
},
"active": {
"type": "boolean"
},
"didDoc": {
"type": "unknown"
},
"handle": {
"type": "string",
"format": "handle"
},
"status": {
"type": "string",
"description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
"knownValues": [
"takendown",
"suspended",
"deactivated"
]
},
"emailConfirmed": {
"type": "boolean"
},
"emailAuthFactor": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"description": "Get information about the current auth session. Requires auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,53 @@
{
"id": "com.atproto.server.listAppPasswords",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "AccountTakedown"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"passwords"
],
"properties": {
"passwords": {
"type": "array",
"items": {
"ref": "#appPassword",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"description": "List all App Passwords."
},
"appPassword": {
"type": "object",
"required": [
"name",
"createdAt"
],
"properties": {
"name": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"privileged": {
"type": "boolean"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,74 @@
{
"id": "com.atproto.server.refreshSession",
"defs": {
"main": {
"type": "procedure",
"errors": [
{
"name": "AccountTakedown"
},
{
"name": "InvalidToken"
},
{
"name": "ExpiredToken"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"accessJwt",
"refreshJwt",
"handle",
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"email": {
"type": "string"
},
"active": {
"type": "boolean"
},
"didDoc": {
"type": "unknown"
},
"handle": {
"type": "string",
"format": "handle"
},
"status": {
"type": "string",
"description": "Hosting status of the account. If not specified, then assume 'active'.",
"knownValues": [
"takendown",
"suspended",
"deactivated"
]
},
"accessJwt": {
"type": "string"
},
"refreshJwt": {
"type": "string"
},
"emailConfirmed": {
"type": "boolean"
},
"emailAuthFactor": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"description": "Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt')."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,11 @@
{
"id": "com.atproto.server.requestAccountDelete",
"defs": {
"main": {
"type": "procedure",
"description": "Initiate a user account deletion via email."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,11 @@
{
"id": "com.atproto.server.requestEmailConfirmation",
"defs": {
"main": {
"type": "procedure",
"description": "Request an email with a code to confirm ownership of email."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,25 @@
{
"id": "com.atproto.server.requestEmailUpdate",
"defs": {
"main": {
"type": "procedure",
"output": {
"schema": {
"type": "object",
"required": [
"tokenRequired"
],
"properties": {
"tokenRequired": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"description": "Request a token in order to update email."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,25 @@
{
"id": "com.atproto.server.requestPasswordReset",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"description": "Initiate a user account password reset via email."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,39 @@
{
"id": "com.atproto.server.reserveSigningKey",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID to reserve a key for."
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"required": [
"signingKey"
],
"properties": {
"signingKey": {
"type": "string",
"description": "The public key for the reserved signing key, in did:key serialization."
}
}
},
"encoding": "application/json"
},
"description": "Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,37 @@
{
"id": "com.atproto.server.resetPassword",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"token",
"password"
],
"properties": {
"token": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "ExpiredToken"
},
{
"name": "InvalidToken"
}
],
"description": "Reset a user account password using a token."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,25 @@
{
"id": "com.atproto.server.revokeAppPassword",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"description": "Revoke an App Password by name."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,43 @@
{
"id": "com.atproto.server.updateEmail",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string"
},
"token": {
"type": "string",
"description": "Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed."
},
"emailAuthFactor": {
"type": "boolean"
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "ExpiredToken"
},
{
"name": "InvalidToken"
},
{
"name": "TokenRequired"
}
],
"description": "Update an account's email."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+17
View File
@@ -0,0 +1,17 @@
{
"id": "com.atproto.sync.defs",
"defs": {
"hostStatus": {
"type": "string",
"knownValues": [
"active",
"idle",
"offline",
"throttled",
"banned"
]
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+50
View File
@@ -0,0 +1,50 @@
{
"id": "com.atproto.sync.getBlob",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "BlobNotFound"
},
{
"name": "RepoNotFound"
},
{
"name": "RepoTakendown"
},
{
"name": "RepoSuspended"
},
{
"name": "RepoDeactivated"
}
],
"output": {
"encoding": "*/*"
},
"parameters": {
"type": "params",
"required": [
"did",
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid",
"description": "The CID of the blob to fetch"
},
"did": {
"type": "string",
"format": "did",
"description": "The DID of the account."
}
}
},
"description": "Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+52
View File
@@ -0,0 +1,52 @@
{
"id": "com.atproto.sync.getBlocks",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "BlockNotFound"
},
{
"name": "RepoNotFound"
},
{
"name": "RepoTakendown"
},
{
"name": "RepoSuspended"
},
{
"name": "RepoDeactivated"
}
],
"output": {
"encoding": "application/vnd.ipld.car"
},
"parameters": {
"type": "params",
"required": [
"did",
"cids"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
},
"cids": {
"type": "array",
"items": {
"type": "string",
"format": "cid"
}
}
}
},
"description": "Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,27 @@
{
"id": "com.atproto.sync.getCheckout",
"defs": {
"main": {
"type": "query",
"output": {
"encoding": "application/vnd.ipld.car"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
}
}
},
"description": "DEPRECATED - please use com.atproto.sync.getRepo instead"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+44
View File
@@ -0,0 +1,44 @@
{
"id": "com.atproto.sync.getHead",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "HeadNotFound"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"root"
],
"properties": {
"root": {
"type": "string",
"format": "cid"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
}
}
},
"description": "DEPRECATED - please use com.atproto.sync.getLatestCommit instead"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,54 @@
{
"id": "com.atproto.sync.getHostStatus",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "HostNotFound"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"hostname"
],
"properties": {
"seq": {
"type": "integer",
"description": "Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."
},
"status": {
"ref": "com.atproto.sync.defs#hostStatus",
"type": "ref"
},
"hostname": {
"type": "string"
},
"accountCount": {
"type": "integer",
"description": "Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts."
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"hostname"
],
"properties": {
"hostname": {
"type": "string",
"description": "Hostname of the host (eg, PDS or relay) being queried."
}
}
},
"description": "Returns information about a specified upstream host, as consumed by the server. Implemented by relays."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,58 @@
{
"id": "com.atproto.sync.getLatestCommit",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "RepoNotFound"
},
{
"name": "RepoTakendown"
},
{
"name": "RepoSuspended"
},
{
"name": "RepoDeactivated"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"cid",
"rev"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"rev": {
"type": "string",
"format": "tid"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
}
}
},
"description": "Get the current commit CID & revision of the specified repo. Does not require auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+55
View File
@@ -0,0 +1,55 @@
{
"id": "com.atproto.sync.getRecord",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "RecordNotFound"
},
{
"name": "RepoNotFound"
},
{
"name": "RepoTakendown"
},
{
"name": "RepoSuspended"
},
{
"name": "RepoDeactivated"
}
],
"output": {
"encoding": "application/vnd.ipld.car"
},
"parameters": {
"type": "params",
"required": [
"did",
"collection",
"rkey"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
},
"rkey": {
"type": "string",
"format": "record-key",
"description": "Record Key"
},
"collection": {
"type": "string",
"format": "nsid"
}
}
},
"description": "Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+46
View File
@@ -0,0 +1,46 @@
{
"id": "com.atproto.sync.getRepo",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "RepoNotFound"
},
{
"name": "RepoTakendown"
},
{
"name": "RepoSuspended"
},
{
"name": "RepoDeactivated"
}
],
"output": {
"encoding": "application/vnd.ipld.car"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
},
"since": {
"type": "string",
"format": "tid",
"description": "The revision ('rev') of the repo to create a diff from."
}
}
},
"description": "Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,65 @@
{
"id": "com.atproto.sync.getRepoStatus",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "RepoNotFound"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"did",
"active"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"rev": {
"type": "string",
"format": "tid",
"description": "Optional field, the current rev of the repo, if active=true"
},
"active": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
"knownValues": [
"takendown",
"suspended",
"deleted",
"deactivated",
"desynchronized",
"throttled"
]
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
}
}
},
"description": "Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+73
View File
@@ -0,0 +1,73 @@
{
"id": "com.atproto.sync.listBlobs",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "RepoNotFound"
},
{
"name": "RepoTakendown"
},
{
"name": "RepoSuspended"
},
{
"name": "RepoDeactivated"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"cids"
],
"properties": {
"cids": {
"type": "array",
"items": {
"type": "string",
"format": "cid"
}
},
"cursor": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
},
"limit": {
"type": "integer",
"default": 500,
"maximum": 1000,
"minimum": 1
},
"since": {
"type": "string",
"format": "tid",
"description": "Optional revision of the repo to list blobs since."
},
"cursor": {
"type": "string"
}
}
},
"description": "List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+70
View File
@@ -0,0 +1,70 @@
{
"id": "com.atproto.sync.listHosts",
"defs": {
"host": {
"type": "object",
"required": [
"hostname"
],
"properties": {
"seq": {
"type": "integer",
"description": "Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."
},
"status": {
"ref": "com.atproto.sync.defs#hostStatus",
"type": "ref"
},
"hostname": {
"type": "string",
"description": "hostname of server; not a URL (no scheme)"
},
"accountCount": {
"type": "integer"
}
}
},
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"hosts"
],
"properties": {
"hosts": {
"type": "array",
"items": {
"ref": "#host",
"type": "ref"
},
"description": "Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first."
},
"cursor": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"default": 200,
"maximum": 1000,
"minimum": 1
},
"cursor": {
"type": "string"
}
}
},
"description": "Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+84
View File
@@ -0,0 +1,84 @@
{
"id": "com.atproto.sync.listRepos",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"repos"
],
"properties": {
"repos": {
"type": "array",
"items": {
"ref": "#repo",
"type": "ref"
}
},
"cursor": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"limit": {
"type": "integer",
"default": 500,
"maximum": 1000,
"minimum": 1
},
"cursor": {
"type": "string"
}
}
},
"description": "Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay."
},
"repo": {
"type": "object",
"required": [
"did",
"head",
"rev"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"rev": {
"type": "string",
"format": "tid"
},
"head": {
"type": "string",
"format": "cid",
"description": "Current repo commit CID"
},
"active": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
"knownValues": [
"takendown",
"suspended",
"deleted",
"deactivated",
"desynchronized",
"throttled"
]
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,66 @@
{
"id": "com.atproto.sync.listReposByCollection",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"repos"
],
"properties": {
"repos": {
"type": "array",
"items": {
"ref": "#repo",
"type": "ref"
}
},
"cursor": {
"type": "string"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"collection"
],
"properties": {
"limit": {
"type": "integer",
"default": 500,
"maximum": 2000,
"minimum": 1,
"description": "Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists."
},
"cursor": {
"type": "string"
},
"collection": {
"type": "string",
"format": "nsid"
}
}
},
"description": "Enumerates all the DIDs which have records with the given collection NSID."
},
"repo": {
"type": "object",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,26 @@
{
"id": "com.atproto.sync.notifyOfUpdate",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"hostname"
],
"properties": {
"hostname": {
"type": "string",
"description": "Hostname of the current service (usually a PDS) that is notifying of update."
}
}
},
"encoding": "application/json"
},
"description": "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,31 @@
{
"id": "com.atproto.sync.requestCrawl",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"hostname"
],
"properties": {
"hostname": {
"type": "string",
"description": "Hostname of the current service (eg, PDS) that is requesting to be crawled."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "HostBanned"
}
],
"description": "Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,276 @@
{
"id": "com.atproto.sync.subscribeRepos",
"defs": {
"info": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"knownValues": [
"OutdatedCursor"
]
},
"message": {
"type": "string"
}
}
},
"main": {
"type": "subscription",
"errors": [
{
"name": "FutureCursor"
},
{
"name": "ConsumerTooSlow",
"description": "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."
}
],
"message": {
"schema": {
"refs": [
"#commit",
"#sync",
"#identity",
"#account",
"#info"
],
"type": "union"
}
},
"parameters": {
"type": "params",
"properties": {
"cursor": {
"type": "integer",
"description": "The last known event seq number to backfill from."
}
}
},
"description": "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay."
},
"sync": {
"type": "object",
"required": [
"seq",
"did",
"blocks",
"rev",
"time"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The account this repo event corresponds to. Must match that in the commit object."
},
"rev": {
"type": "string",
"description": "The rev of the commit. This value must match that in the commit object."
},
"seq": {
"type": "integer",
"description": "The stream sequence number of this message."
},
"time": {
"type": "string",
"format": "datetime",
"description": "Timestamp of when this message was originally broadcast."
},
"blocks": {
"type": "bytes",
"maxLength": 10000,
"description": "CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'."
}
},
"description": "Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository."
},
"commit": {
"type": "object",
"nullable": [
"since"
],
"required": [
"seq",
"rebase",
"tooBig",
"repo",
"commit",
"rev",
"since",
"blocks",
"ops",
"blobs",
"time"
],
"properties": {
"ops": {
"type": "array",
"items": {
"ref": "#repoOp",
"type": "ref",
"description": "List of repo mutation operations in this commit (eg, records created, updated, or deleted)."
},
"maxLength": 200
},
"rev": {
"type": "string",
"format": "tid",
"description": "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event."
},
"seq": {
"type": "integer",
"description": "The stream sequence number of this message."
},
"repo": {
"type": "string",
"format": "did",
"description": "The repo this event comes from. Note that all other message types name this field 'did'."
},
"time": {
"type": "string",
"format": "datetime",
"description": "Timestamp of when this message was originally broadcast."
},
"blobs": {
"type": "array",
"items": {
"type": "cid-link",
"description": "DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit."
}
},
"since": {
"type": "string",
"format": "tid",
"description": "The rev of the last emitted commit from this repo (if any)."
},
"blocks": {
"type": "bytes",
"maxLength": 2000000,
"description": "CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list."
},
"commit": {
"type": "cid-link",
"description": "Repo commit object CID."
},
"rebase": {
"type": "boolean",
"description": "DEPRECATED -- unused"
},
"tooBig": {
"type": "boolean",
"description": "DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."
},
"prevData": {
"type": "cid-link",
"description": "The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose."
}
},
"description": "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature."
},
"repoOp": {
"type": "object",
"nullable": [
"cid"
],
"required": [
"action",
"path",
"cid"
],
"properties": {
"cid": {
"type": "cid-link",
"description": "For creates and updates, the new record CID. For deletions, null."
},
"path": {
"type": "string"
},
"prev": {
"type": "cid-link",
"description": "For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined."
},
"action": {
"type": "string",
"knownValues": [
"create",
"update",
"delete"
]
}
},
"description": "A repo operation, ie a mutation of a single record."
},
"account": {
"type": "object",
"required": [
"seq",
"did",
"time",
"active"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"seq": {
"type": "integer"
},
"time": {
"type": "string",
"format": "datetime"
},
"active": {
"type": "boolean",
"description": "Indicates that the account has a repository which can be fetched from the host that emitted this event."
},
"status": {
"type": "string",
"description": "If active=false, this optional field indicates a reason for why the account is not active.",
"knownValues": [
"takendown",
"suspended",
"deleted",
"deactivated",
"desynchronized",
"throttled"
]
}
},
"description": "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active."
},
"identity": {
"type": "object",
"required": [
"seq",
"did",
"time"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"seq": {
"type": "integer"
},
"time": {
"type": "string",
"format": "datetime"
},
"handle": {
"type": "string",
"format": "handle",
"description": "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."
}
},
"description": "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,88 @@
{
"lexicon": 1,
"id": "com.atproto.temp.checkHandleAvailability",
"defs": {
"main": {
"type": "query",
"description": "Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.",
"parameters": {
"type": "params",
"required": ["handle"],
"properties": {
"handle": {
"type": "string",
"format": "handle",
"description": "Tentative handle. Will be checked for availability or used to build handle suggestions."
},
"email": {
"type": "string",
"description": "User-provided email. Might be used to build handle suggestions."
},
"birthDate": {
"type": "string",
"format": "datetime",
"description": "User-provided birth date. Might be used to build handle suggestions."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["handle", "result"],
"properties": {
"handle": {
"type": "string",
"format": "handle",
"description": "Echo of the input handle."
},
"result": {
"type": "union",
"refs": ["#resultAvailable", "#resultUnavailable"]
}
}
}
},
"errors": [
{
"name": "InvalidEmail",
"description": "An invalid email was provided."
}
]
},
"resultAvailable": {
"type": "object",
"description": "Indicates the provided handle is available.",
"properties": {}
},
"resultUnavailable": {
"type": "object",
"description": "Indicates the provided handle is unavailable and gives suggestions of available handles.",
"required": ["suggestions"],
"properties": {
"suggestions": {
"type": "array",
"description": "List of suggested handles based on the provided inputs.",
"items": {
"type": "ref",
"ref": "#suggestion"
}
}
}
},
"suggestion": {
"type": "object",
"required": ["handle", "method"],
"properties": {
"handle": {
"type": "string",
"format": "handle"
},
"method": {
"type": "string",
"description": "Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics."
}
}
}
}
}
@@ -0,0 +1,22 @@
{
"lexicon": 1,
"id": "com.atproto.temp.checkSignupQueue",
"defs": {
"main": {
"type": "query",
"description": "Check accounts location in signup queue.",
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["activated"],
"properties": {
"activated": { "type": "boolean" },
"placeInQueue": { "type": "integer" },
"estimatedTimeMs": { "type": "integer" }
}
}
}
}
}
}
+75
View File
@@ -0,0 +1,75 @@
{
"id": "com.germnetwork.declaration",
"defs": {
"main": {
"key": "literal:self",
"type": "record",
"record": {
"type": "object",
"required": [
"version",
"currentKey"
],
"properties": {
"version": {
"type": "string",
"maxLength": 14,
"minLength": 5,
"description": "Semver version number, without pre-release or build information, for the format of opaque content"
},
"messageMe": {
"ref": "#messageMe",
"type": "ref",
"description": "Controls who can message this account"
},
"currentKey": {
"type": "bytes",
"description": "Opaque value, an ed25519 public key prefixed with a byte enum"
},
"keyPackage": {
"type": "bytes",
"description": "Opaque value, contains MLS KeyPackage(s), and other signature data, and is signed by the currentKey"
},
"continuityProofs": {
"type": "array",
"items": {
"type": "bytes"
},
"maxLength": 1000,
"description": "Array of opaque values to allow for key rolling"
}
}
},
"description": "A declaration of a Germ Network account"
},
"messageMe": {
"type": "object",
"required": [
"showButtonTo",
"messageMeUrl"
],
"properties": {
"messageMeUrl": {
"type": "string",
"format": "uri",
"maxLength": 2047,
"minLength": 1,
"description": "A URL to present to an account that does not have its own com.germnetwork.declaration record, must have an empty fragment component, where the app should fill in the fragment component with the DIDs of the two accounts who wish to message each other"
},
"showButtonTo": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "The policy of who can message the account, this value is included in the keyPackage, but is duplicated here to allow applications to decide if they should show a 'Message on Germ' button to the viewer.",
"knownValues": [
"none",
"usersIFollow",
"everyone"
]
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}