[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
+153
View File
@@ -0,0 +1,153 @@
{
"id": "app.bsky.labeler.defs",
"defs": {
"labelerView": {
"type": "object",
"required": [
"uri",
"cid",
"creator",
"indexedAt"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"labels": {
"type": "array",
"items": {
"ref": "com.atproto.label.defs#label",
"type": "ref"
}
},
"viewer": {
"ref": "#labelerViewerState",
"type": "ref"
},
"creator": {
"ref": "app.bsky.actor.defs#profileView",
"type": "ref"
},
"indexedAt": {
"type": "string",
"format": "datetime"
},
"likeCount": {
"type": "integer",
"minimum": 0
}
}
},
"labelerPolicies": {
"type": "object",
"required": [
"labelValues"
],
"properties": {
"labelValues": {
"type": "array",
"items": {
"ref": "com.atproto.label.defs#labelValue",
"type": "ref"
},
"description": "The label values which this labeler publishes. May include global or custom labels."
},
"labelValueDefinitions": {
"type": "array",
"items": {
"ref": "com.atproto.label.defs#labelValueDefinition",
"type": "ref"
},
"description": "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler."
}
}
},
"labelerViewerState": {
"type": "object",
"properties": {
"like": {
"type": "string",
"format": "at-uri"
}
}
},
"labelerViewDetailed": {
"type": "object",
"required": [
"uri",
"cid",
"creator",
"policies",
"indexedAt"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"labels": {
"type": "array",
"items": {
"ref": "com.atproto.label.defs#label",
"type": "ref"
}
},
"viewer": {
"ref": "#labelerViewerState",
"type": "ref"
},
"creator": {
"ref": "app.bsky.actor.defs#profileView",
"type": "ref"
},
"policies": {
"ref": "app.bsky.labeler.defs#labelerPolicies",
"type": "ref"
},
"indexedAt": {
"type": "string",
"format": "datetime"
},
"likeCount": {
"type": "integer",
"minimum": 0
},
"reasonTypes": {
"type": "array",
"items": {
"ref": "com.atproto.moderation.defs#reasonType",
"type": "ref"
},
"description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed."
},
"subjectTypes": {
"type": "array",
"items": {
"ref": "com.atproto.moderation.defs#subjectType",
"type": "ref"
},
"description": "The set of subject types (account, record, etc) this service accepts reports on."
},
"subjectCollections": {
"type": "array",
"items": {
"type": "string",
"format": "nsid"
},
"description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type."
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
@@ -0,0 +1,51 @@
{
"id": "app.bsky.labeler.getServices",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"views"
],
"properties": {
"views": {
"type": "array",
"items": {
"refs": [
"app.bsky.labeler.defs#labelerView",
"app.bsky.labeler.defs#labelerViewDetailed"
],
"type": "union"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"dids"
],
"properties": {
"dids": {
"type": "array",
"items": {
"type": "string",
"format": "did"
}
},
"detailed": {
"type": "boolean",
"default": false
}
}
},
"description": "Get information about a list of labeler services."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+59
View File
@@ -0,0 +1,59 @@
{
"id": "app.bsky.labeler.service",
"defs": {
"main": {
"key": "literal:self",
"type": "record",
"record": {
"type": "object",
"required": [
"policies",
"createdAt"
],
"properties": {
"labels": {
"refs": [
"com.atproto.label.defs#selfLabels"
],
"type": "union"
},
"policies": {
"ref": "app.bsky.labeler.defs#labelerPolicies",
"type": "ref"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"reasonTypes": {
"type": "array",
"items": {
"ref": "com.atproto.moderation.defs#reasonType",
"type": "ref"
},
"description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed."
},
"subjectTypes": {
"type": "array",
"items": {
"ref": "com.atproto.moderation.defs#subjectType",
"type": "ref"
},
"description": "The set of subject types (account, record, etc) this service accepts reports on."
},
"subjectCollections": {
"type": "array",
"items": {
"type": "string",
"format": "nsid"
},
"description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type."
}
}
},
"description": "A declaration of the existence of labeler service."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}