{
"id": "at.inlay.component",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"type"
],
"properties": {
"via": {
"refs": [
"at.inlay.defs#viaValtown"
],
"type": "union",
"description": "Platform-managed deployment metadata"
},
"body": {
"refs": [
"#bodyExternal",
"#bodyTemplate"
],
"type": "union",
"description": "How this component is rendered. Omit for primitives rendered by the host."
},
"type": {
"type": "string",
"format": "nsid",
"description": "NSID this component implements (also the XRPC procedure)"
},
"view": {
"ref": "#view",
"type": "ref",
"description": "What data this component views and which prop receives it"
},
"imports": {
"type": "array",
"items": {
"type": "string",
"format": "at-uri"
},
"description": "Ordered list of pack URIs (import stack). First pack that exports an NSID wins."
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"updatedAt": {
"type": "string",
"format": "datetime",
"description": "Last update timestamp. Set by the publish flow to bust cached responses."
},
"description": {
"type": "string",
"maxLength": 10000,
"maxGraphemes": 1000
}
}
},
"description": "Component record - declares an implementation of a type"
},
"view": {
"type": "object",
"required": [
"prop",
"accepts"
],
"properties": {
"prop": {
"type": "string",
"maxLength": 256,
"description": "Which component prop receives the view data."
},
"accepts": {
"type": "array",
"items": {
"refs": [
"#viewRecord",
"#viewPrimitive"
],
"type": "union"
},
"minLength": 1,
"description": "Data types this view accepts."
}
},
"description": "Declares what data this component views and which prop receives it."
},
"viewRecord": {
"type": "object",
"properties": {
"rkey": {
"type": "string",
"maxLength": 512,
"description": "The record key, baked from the collection's lexicon at authoring time. Presence enables DID expansion and identity page routing."
},
"collection": {
"type": "string",
"format": "nsid",
"description": "The collection this component views. Omit for any-collection."
}
},
"description": "View accepts individual records of a collection. Omit collection for a generic record view. When rkey is present, the component accepts bare DIDs (expanded to full AT URIs) and appears on identity pages."
},
"bodyExternal": {
"type": "object",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "DID of the service hosting this component"
}
},
"description": "Component rendered by calling a remote XRPC endpoint"
},
"bodyTemplate": {
"type": "object",
"required": [
"node"
],
"properties": {
"node": {
"type": "unknown",
"description": "Serialized element tree with bindings"
}
},
"description": "Component rendered by the host from a serialized element tree"
},
"viewPrimitive": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"maxLength": 128,
"description": "Lexicon primitive type.",
"knownValues": [
"string",
"integer",
"boolean",
"blob",
"cid-link",
"bytes"
]
},
"format": {
"type": "string",
"maxLength": 64,
"description": "String format constraint. Only applies when type is 'string'.",
"knownValues": [
"at-uri",
"did",
"datetime",
"uri",
"handle",
"at-identifier",
"nsid",
"cid",
"language",
"record-key",
"tid"
]
}
},
"description": "View accepts a primitive value type."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}