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." + } + } + } + } + } + } + } +} -- 2.51.2 From efe4d834781f3fc75d246cce55e8eccd70746b71 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 18 May 2026 19:24:36 -0500 Subject: [PATCH 2/4] Update lexicons --- api/bsky/embedexternal.go | 60 ++++++++++++++++--- api/bsky/embedgetEmbedExternalView.go | 37 ++++++++++++ lexicons/app/bsky/embed/external.json | 12 ++-- .../app/bsky/embed/getEmbedExternalView.json | 9 ++- 4 files changed, 104 insertions(+), 14 deletions(-) create mode 100644 api/bsky/embedgetEmbedExternalView.go diff --git a/api/bsky/embedexternal.go b/api/bsky/embedexternal.go index e894be5b..d3d0cd27 100644 --- a/api/bsky/embedexternal.go +++ b/api/bsky/embedexternal.go @@ -5,6 +5,7 @@ package bsky import ( + comatproto "github.com/bluesky-social/indigo/api/atproto" lexutil "github.com/bluesky-social/indigo/lex/util" ) @@ -20,12 +21,23 @@ type EmbedExternal struct { External *EmbedExternal_External `json:"external" cborgen:"external"` } +// EmbedExternal_ColorRGB is a "colorRGB" in the app.bsky.embed.external schema. +// +// RGB color definition, inspired by site.standard.theme.color#rgb +type EmbedExternal_ColorRGB struct { + B int64 `json:"b" cborgen:"b"` + G int64 `json:"g" cborgen:"g"` + R int64 `json:"r" cborgen:"r"` +} + // EmbedExternal_External is a "external" in the app.bsky.embed.external schema. type EmbedExternal_External struct { - Description string `json:"description" cborgen:"description"` - Thumb *lexutil.LexBlob `json:"thumb,omitempty" cborgen:"thumb,omitempty"` - Title string `json:"title" cborgen:"title"` - Uri string `json:"uri" cborgen:"uri"` + // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. + AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` + Description string `json:"description" cborgen:"description"` + Thumb *lexutil.LexBlob `json:"thumb,omitempty" cborgen:"thumb,omitempty"` + Title string `json:"title" cborgen:"title"` + Uri string `json:"uri" cborgen:"uri"` } // EmbedExternal_View is a "view" in the app.bsky.embed.external schema. @@ -36,8 +48,40 @@ type EmbedExternal_View struct { // EmbedExternal_ViewExternal is a "viewExternal" in the app.bsky.embed.external schema. type EmbedExternal_ViewExternal struct { - Description string `json:"description" cborgen:"description"` - Thumb *string `json:"thumb,omitempty" cborgen:"thumb,omitempty"` - Title string `json:"title" cborgen:"title"` - Uri string `json:"uri" cborgen:"uri"` + // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. + AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` + // createdAt: When the external content was created, if available. Example: a publication date, for an article. + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` + Description string `json:"description" cborgen:"description"` + Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` + // readingTime: Estimated reading time in minutes, if applicable and available. + ReadingTime *int64 `json:"readingTime,omitempty" cborgen:"readingTime,omitempty"` + Source *EmbedExternal_ViewExternalSource `json:"source,omitempty" cborgen:"source,omitempty"` + Thumb *string `json:"thumb,omitempty" cborgen:"thumb,omitempty"` + Title string `json:"title" cborgen:"title"` + // updatedAt: When the external content was updated, if available. + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` + Uri string `json:"uri" cborgen:"uri"` +} + +// EmbedExternal_ViewExternalSource is a "viewExternalSource" in the app.bsky.embed.external schema. +// +// The source of an external embed, such as a standard.site publication. +type EmbedExternal_ViewExternalSource struct { + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` + // icon: Fully-qualified URL where an icon representing the source can be fetched. For example, CDN location provided by the App View. + Icon *string `json:"icon,omitempty" cborgen:"icon,omitempty"` + Name *string `json:"name,omitempty" cborgen:"name,omitempty"` + Theme *EmbedExternal_ViewExternalSourceTheme `json:"theme,omitempty" cborgen:"theme,omitempty"` + Uri *string `json:"uri,omitempty" cborgen:"uri,omitempty"` +} + +// EmbedExternal_ViewExternalSourceTheme is a "viewExternalSourceTheme" in the app.bsky.embed.external schema. +// +// 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. +type EmbedExternal_ViewExternalSourceTheme struct { + AccentForegroundRGB *EmbedExternal_ColorRGB `json:"accentForegroundRGB,omitempty" cborgen:"accentForegroundRGB,omitempty"` + AccentRGB *EmbedExternal_ColorRGB `json:"accentRGB,omitempty" cborgen:"accentRGB,omitempty"` + BackgroundRGB *EmbedExternal_ColorRGB `json:"backgroundRGB,omitempty" cborgen:"backgroundRGB,omitempty"` + ForegroundRGB *EmbedExternal_ColorRGB `json:"foregroundRGB,omitempty" cborgen:"foregroundRGB,omitempty"` } diff --git a/api/bsky/embedgetEmbedExternalView.go b/api/bsky/embedgetEmbedExternalView.go new file mode 100644 index 00000000..a1e0ec2f --- /dev/null +++ b/api/bsky/embedgetEmbedExternalView.go @@ -0,0 +1,37 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +// Lexicon schema: app.bsky.embed.getEmbedExternalView + +package bsky + +import ( + "context" + + comatproto "github.com/bluesky-social/indigo/api/atproto" + lexutil "github.com/bluesky-social/indigo/lex/util" +) + +// EmbedGetEmbedExternalView_Output is the output of a app.bsky.embed.getEmbedExternalView call. +type EmbedGetEmbedExternalView_Output struct { + AssociatedRecords []*lexutil.LexiconTypeDecoder `json:"associatedRecords,omitempty" cborgen:"associatedRecords,omitempty"` + // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. + AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` + View *EmbedExternal_View `json:"view,omitempty" cborgen:"view,omitempty"` +} + +// EmbedGetEmbedExternalView calls the XRPC method "app.bsky.embed.getEmbedExternalView". +// +// uris: 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. +// url: The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`. +func EmbedGetEmbedExternalView(ctx context.Context, c lexutil.LexClient, uris []string, url string) (*EmbedGetEmbedExternalView_Output, error) { + var out EmbedGetEmbedExternalView_Output + + params := map[string]interface{}{} + params["uris"] = uris + params["url"] = url + if err := c.LexDo(ctx, lexutil.Query, "", "app.bsky.embed.getEmbedExternalView", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/lexicons/app/bsky/embed/external.json b/lexicons/app/bsky/embed/external.json index cca47f4b..65571be0 100644 --- a/lexicons/app/bsky/embed/external.json +++ b/lexicons/app/bsky/embed/external.json @@ -67,6 +67,10 @@ "type": "integer", "description": "Estimated reading time in minutes, if applicable and available." }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, "source": { "type": "ref", "ref": "#viewExternalSource" }, "associatedRefs": { "type": "array", @@ -100,19 +104,19 @@ "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": { + "backgroundRGB": { "type": "ref", "ref": "#colorRGB" }, - "foreground": { + "foregroundRGB": { "type": "ref", "ref": "#colorRGB" }, - "accent": { + "accentRGB": { "type": "ref", "ref": "#colorRGB" }, - "accentForeground": { + "accentForegroundRGB": { "type": "ref", "ref": "#colorRGB" } diff --git a/lexicons/app/bsky/embed/getEmbedExternalView.json b/lexicons/app/bsky/embed/getEmbedExternalView.json index ac3520a2..80a75a53 100644 --- a/lexicons/app/bsky/embed/getEmbedExternalView.json +++ b/lexicons/app/bsky/embed/getEmbedExternalView.json @@ -4,11 +4,16 @@ "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.", + "description": "Resolve one or more site.standard.* AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs) and the raw `associatedRecords`; `view` is also included when the resolved records can produce a renderable view, but may be omitted when no records were hydratable.", "parameters": { "type": "params", - "required": ["uris"], + "required": ["url", "uris"], "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`." + }, "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.", -- 2.51.2 From fba7d6f0e838a3e1c073f7525f84e94603c7a953 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 18 May 2026 20:22:36 -0500 Subject: [PATCH 3/4] Update lexicons --- api/bsky/embedexternal.go | 9 +++++---- api/bsky/embedgetEmbedExternalView.go | 4 ++-- lexicons/app/bsky/embed/external.json | 12 ++++++++---- lexicons/app/bsky/embed/getEmbedExternalView.json | 6 +++--- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/api/bsky/embedexternal.go b/api/bsky/embedexternal.go index d3d0cd27..4939806e 100644 --- a/api/bsky/embedexternal.go +++ b/api/bsky/embedexternal.go @@ -32,7 +32,7 @@ type EmbedExternal_ColorRGB struct { // EmbedExternal_External is a "external" in the app.bsky.embed.external schema. type EmbedExternal_External struct { - // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. + // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view. AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` Description string `json:"description" cborgen:"description"` Thumb *lexutil.LexBlob `json:"thumb,omitempty" cborgen:"thumb,omitempty"` @@ -48,7 +48,7 @@ type EmbedExternal_View struct { // EmbedExternal_ViewExternal is a "viewExternal" in the app.bsky.embed.external schema. type EmbedExternal_ViewExternal struct { - // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. + // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view. AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` // createdAt: When the external content was created, if available. Example: a publication date, for an article. CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` @@ -71,9 +71,10 @@ type EmbedExternal_ViewExternalSource struct { Description *string `json:"description,omitempty" cborgen:"description,omitempty"` // icon: Fully-qualified URL where an icon representing the source can be fetched. For example, CDN location provided by the App View. Icon *string `json:"icon,omitempty" cborgen:"icon,omitempty"` - Name *string `json:"name,omitempty" cborgen:"name,omitempty"` Theme *EmbedExternal_ViewExternalSourceTheme `json:"theme,omitempty" cborgen:"theme,omitempty"` - Uri *string `json:"uri,omitempty" cborgen:"uri,omitempty"` + Title *string `json:"title,omitempty" cborgen:"title,omitempty"` + // uri: URI of the source, if available. Example: the https:// URL of a site.standard.publication record. + Uri *string `json:"uri,omitempty" cborgen:"uri,omitempty"` } // EmbedExternal_ViewExternalSourceTheme is a "viewExternalSourceTheme" in the app.bsky.embed.external schema. diff --git a/api/bsky/embedgetEmbedExternalView.go b/api/bsky/embedgetEmbedExternalView.go index a1e0ec2f..f5ddccca 100644 --- a/api/bsky/embedgetEmbedExternalView.go +++ b/api/bsky/embedgetEmbedExternalView.go @@ -14,7 +14,7 @@ import ( // EmbedGetEmbedExternalView_Output is the output of a app.bsky.embed.getEmbedExternalView call. type EmbedGetEmbedExternalView_Output struct { AssociatedRecords []*lexutil.LexiconTypeDecoder `json:"associatedRecords,omitempty" cborgen:"associatedRecords,omitempty"` - // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. + // associatedRefs: StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` View *EmbedExternal_View `json:"view,omitempty" cborgen:"view,omitempty"` } @@ -22,7 +22,7 @@ type EmbedGetEmbedExternalView_Output struct { // EmbedGetEmbedExternalView calls the XRPC method "app.bsky.embed.getEmbedExternalView". // // uris: 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. -// url: The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`. +// url: The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`. May be used for validation in the future. func EmbedGetEmbedExternalView(ctx context.Context, c lexutil.LexClient, uris []string, url string) (*EmbedGetEmbedExternalView_Output, error) { var out EmbedGetEmbedExternalView_Output diff --git a/lexicons/app/bsky/embed/external.json b/lexicons/app/bsky/embed/external.json index 65571be0..cb06a2bc 100644 --- a/lexicons/app/bsky/embed/external.json +++ b/lexicons/app/bsky/embed/external.json @@ -31,7 +31,7 @@ "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." + "description": "StrongRefs (uri+cid) of the Atmosphere records that backed this view." } } }, @@ -78,7 +78,7 @@ "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." + "description": "StrongRefs (uri+cid) of the Atmosphere records that backed this view." } } }, @@ -86,13 +86,17 @@ "type": "object", "description": "The source of an external embed, such as a standard.site publication.", "properties": { - "uri": { "type": "string", "format": "uri" }, + "uri": { + "type": "string", + "format": "uri", + "description": "URI of the source, if available. Example: the https:// URL of a site.standard.publication record." + }, "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" }, + "title": { "type": "string" }, "description": { "type": "string" }, "theme": { "type": "ref", diff --git a/lexicons/app/bsky/embed/getEmbedExternalView.json b/lexicons/app/bsky/embed/getEmbedExternalView.json index 80a75a53..7d60d24e 100644 --- a/lexicons/app/bsky/embed/getEmbedExternalView.json +++ b/lexicons/app/bsky/embed/getEmbedExternalView.json @@ -4,7 +4,7 @@ "defs": { "main": { "type": "query", - "description": "Resolve one or more site.standard.* AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs) and the raw `associatedRecords`; `view` is also included when the resolved records can produce a renderable view, but may be omitted when no records were hydratable.", + "description": "Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs) and the raw `associatedRecords`; `view` is also included when the resolved records can produce a renderable view, but may be omitted when no records were hydratable.", "parameters": { "type": "params", "required": ["url", "uris"], @@ -12,7 +12,7 @@ "url": { "type": "string", "format": "uri", - "description": "The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`." + "description": "The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`. May be used for validation in the future." }, "uris": { "type": "array", @@ -37,7 +37,7 @@ "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." + "description": "StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs." }, "associatedRecords": { "type": "array", -- 2.51.2 From bdbeb172e489225774cf7f6acb4e6273600abca0 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 20 May 2026 10:59:20 -0500 Subject: [PATCH 4/4] Update lex --- api/bsky/embedgetEmbedExternalView.go | 3 ++- lexicons/app/bsky/embed/getEmbedExternalView.json | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/bsky/embedgetEmbedExternalView.go b/api/bsky/embedgetEmbedExternalView.go index f5ddccca..e7a74df6 100644 --- a/api/bsky/embedgetEmbedExternalView.go +++ b/api/bsky/embedgetEmbedExternalView.go @@ -16,7 +16,8 @@ type EmbedGetEmbedExternalView_Output struct { AssociatedRecords []*lexutil.LexiconTypeDecoder `json:"associatedRecords,omitempty" cborgen:"associatedRecords,omitempty"` // associatedRefs: StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` - View *EmbedExternal_View `json:"view,omitempty" cborgen:"view,omitempty"` + // view: Hydrated view of the embed. Present whenever at least one record was hydrated. `view.external.title` and `view.external.description` may be empty strings when the resolved records didn't supply them; clients should treat that as 'no enrichment for this field.' + View *EmbedExternal_View `json:"view,omitempty" cborgen:"view,omitempty"` } // EmbedGetEmbedExternalView calls the XRPC method "app.bsky.embed.getEmbedExternalView". diff --git a/lexicons/app/bsky/embed/getEmbedExternalView.json b/lexicons/app/bsky/embed/getEmbedExternalView.json index 7d60d24e..2b52ddb1 100644 --- a/lexicons/app/bsky/embed/getEmbedExternalView.json +++ b/lexicons/app/bsky/embed/getEmbedExternalView.json @@ -4,7 +4,7 @@ "defs": { "main": { "type": "query", - "description": "Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs) and the raw `associatedRecords`; `view` is also included when the resolved records can produce a renderable view, but may be omitted when no records were hydratable.", + "description": "Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs) and the raw `associatedRecords`; `view` is included when at least one record was hydrated, but may be omitted otherwise. When `view` is present, `view.external.title` and `view.external.description` may be empty strings if the resolved records didn't supply them — clients should treat empty values as 'no enrichment for this field' rather than the content being genuinely titleless.", "parameters": { "type": "params", "required": ["url", "uris"], @@ -29,7 +29,8 @@ "properties": { "view": { "type": "ref", - "ref": "app.bsky.embed.external#view" + "ref": "app.bsky.embed.external#view", + "description": "Hydrated view of the embed. Present whenever at least one record was hydrated. `view.external.title` and `view.external.description` may be empty strings when the resolved records didn't supply them; clients should treat that as 'no enrichment for this field.'" }, "associatedRefs": { "type": "array",