diff --git a/lexicons/app/bsky/embed/external.json b/lexicons/app/bsky/embed/external.json index b9930dff..cca47f4b 100644 --- a/lexicons/app/bsky/embed/external.json +++ b/lexicons/app/bsky/embed/external.json @@ -24,6 +24,14 @@ "type": "blob", "accept": ["image/*"], "maxSize": 1000000 + }, + "associatedRefs": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "description": "StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs." } } }, @@ -44,7 +52,80 @@ "uri": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "description": { "type": "string" }, - "thumb": { "type": "string", "format": "uri" } + "thumb": { "type": "string", "format": "uri" }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "When the external content was created, if available. Example: a publication date, for an article." + }, + "updatedAt": { + "type": "string", + "format": "datetime", + "description": "When the external content was updated, if available." + }, + "readingTime": { + "type": "integer", + "description": "Estimated reading time in minutes, if applicable and available." + }, + "source": { "type": "ref", "ref": "#viewExternalSource" }, + "associatedRefs": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "description": "StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs." + } + } + }, + "viewExternalSource": { + "type": "object", + "description": "The source of an external embed, such as a standard.site publication.", + "properties": { + "uri": { "type": "string", "format": "uri" }, + "icon": { + "type": "string", + "format": "uri", + "description": "Fully-qualified URL where an icon representing the source can be fetched. For example, CDN location provided by the App View." + }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "theme": { + "type": "ref", + "ref": "#viewExternalSourceTheme" + } + } + }, + "viewExternalSourceTheme": { + "type": "object", + "description": "The theme colors of an external source, such as a site.standard.publication. These colors may be used when rendering an embed from that source.", + "properties": { + "background": { + "type": "ref", + "ref": "#colorRGB" + }, + "foreground": { + "type": "ref", + "ref": "#colorRGB" + }, + "accent": { + "type": "ref", + "ref": "#colorRGB" + }, + "accentForeground": { + "type": "ref", + "ref": "#colorRGB" + } + } + }, + "colorRGB": { + "type": "object", + "description": "RGB color definition, inspired by site.standard.theme.color#rgb", + "required": ["r", "g", "b"], + "properties": { + "r": { "type": "integer", "minimum": 0, "maximum": 255 }, + "g": { "type": "integer", "minimum": 0, "maximum": 255 }, + "b": { "type": "integer", "minimum": 0, "maximum": 255 } } } } diff --git a/lexicons/app/bsky/embed/getEmbedExternalView.json b/lexicons/app/bsky/embed/getEmbedExternalView.json new file mode 100644 index 00000000..ac3520a2 --- /dev/null +++ b/lexicons/app/bsky/embed/getEmbedExternalView.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.getEmbedExternalView", + "defs": { + "main": { + "type": "query", + "description": "Get a hydrated view of an external embed for one or more site.standard.* AT-URIs. Returns the view plus the strongRefs of records that backed it, suitable for embedding into a post's external.associatedRecords.", + "parameters": { + "type": "params", + "required": ["uris"], + "properties": { + "uris": { + "type": "array", + "description": "AT-URIs of any Atmosphere records that can be resolved and used to construct #externalView views. Example: a site.standard.document and optionally its associated site.standard.publication.", + "items": { "type": "string", "format": "at-uri" }, + "maxLength": 4 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "view": { + "type": "ref", + "ref": "app.bsky.embed.external#view" + }, + "associatedRefs": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "description": "StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs." + }, + "associatedRecords": { + "type": "array", + "items": { + "type": "unknown", + "description": "The raw record data of the Atmosphere records that backed this view. This is returned for convenience, to avoid the need for the client to separately fetch the record data for the associatedRefs. Example: the site.standard.document and site.standard.publication records that backed this view." + } + } + } + } + } + } + } +}