{
"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": {
"type": "array",
"items": {
"refs": [
"#viewRecord",
"#viewCollection",
"#viewIdentity"
],
"type": "union"
},
"description": "What kinds of pages this component is a view for"
},
"accepts": {
"type": "array",
"items": {
"ref": "#acceptsEntry",
"type": "ref"
},
"description": "Data types this component can render. Used for data-driven discovery."
},
"imports": {
"type": "array",
"items": {
"ref": "#import",
"type": "ref"
},
"description": "Where to resolve types from"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"description": {
"type": "string"
}
}
},
"description": "Component record - declares an implementation of a type"
},
"import": {
"type": "object",
"required": [
"types",
"pack"
],
"properties": {
"pack": {
"type": "string",
"format": "at-uri",
"description": "Pack to resolve from"
},
"types": {
"type": "string",
"description": "Type pattern to match (glob like com.alice.* or concrete like com.alice.Avatar)"
}
}
},
"viewRecord": {
"type": "object",
"properties": {
"collection": {
"type": "string",
"format": "nsid",
"description": "The collection this component views. Omit for any-collection."
}
},
"description": "Component is a view for individual records of a collection. Omit collection for a generic record view."
},
"acceptsEntry": {
"type": "object",
"required": [
"type",
"prop"
],
"properties": {
"prop": {
"type": "string",
"description": "Prop to bind matched data to."
},
"type": {
"type": "string",
"description": "Lexicon field type.",
"knownValues": [
"string",
"integer",
"boolean",
"blob",
"cid-link",
"bytes"
]
},
"format": {
"type": "string",
"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"
]
},
"collection": {
"type": "string",
"format": "nsid",
"description": "For at-uri strings, restricts to this collection."
}
},
"description": "Declares a data type this component can handle, routed to a specific prop."
},
"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"
},
"viewIdentity": {
"type": "object",
"properties": {},
"description": "Component is a view for an identity (person/DID)."
},
"viewCollection": {
"type": "object",
"properties": {
"collection": {
"type": "string",
"format": "nsid",
"description": "The collection this component lists. Omit for any-collection."
}
},
"description": "Component is a view for a collection listing. Omit collection for a generic collection view."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}