diff --git a/lexicons/app/bsky/feed/defs.json b/lexicons/app/bsky/feed/defs.json index 341f7fbd02b..15841c052a2 100644 --- a/lexicons/app/bsky/feed/defs.json +++ b/lexicons/app/bsky/feed/defs.json @@ -48,6 +48,13 @@ "pinned": { "type": "boolean" } } }, + "threadContext": { + "type": "object", + "description": "Metadata about this post within the context of the thread it is in.", + "properties": { + "rootAuthorLike": { "type": "string", "format": "at-uri" } + } + }, "feedViewPost": { "type": "object", "required": ["post"], @@ -108,7 +115,8 @@ "type": "union", "refs": ["#threadViewPost", "#notFoundPost", "#blockedPost"] } - } + }, + "threadContext": { "type": "ref", "ref": "#threadContext" } } }, "notFoundPost": { diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts index 3e539c106b7..ff52b559ca2 100644 --- a/packages/api/src/client/lexicons.ts +++ b/packages/api/src/client/lexicons.ts @@ -5545,6 +5545,17 @@ export const schemaDict = { }, }, }, + threadContext: { + type: 'object', + description: + 'Metadata about this post within the context of the thread it is in.', + properties: { + rootAuthorLike: { + type: 'string', + format: 'at-uri', + }, + }, + }, feedViewPost: { type: 'object', required: ['post'], @@ -5645,6 +5656,10 @@ export const schemaDict = { ], }, }, + threadContext: { + type: 'ref', + ref: 'lex:app.bsky.feed.defs#threadContext', + }, }, }, notFoundPost: { @@ -12359,7 +12374,7 @@ export const schemaDict = { items: { type: 'string', description: - 'If specified, only events where the policy matches the given policy are returned', + 'If specified, only events where the action policies match any of the given policies are returned', }, }, cursor: { diff --git a/packages/api/src/client/types/app/bsky/feed/defs.ts b/packages/api/src/client/types/app/bsky/feed/defs.ts index bc50067c1da..1b3391cebce 100644 --- a/packages/api/src/client/types/app/bsky/feed/defs.ts +++ b/packages/api/src/client/types/app/bsky/feed/defs.ts @@ -71,6 +71,24 @@ export function validateViewerState(v: unknown): ValidationResult { return lexicons.validate('app.bsky.feed.defs#viewerState', v) } +/** Metadata about this post within the context of the thread it is in. */ +export interface ThreadContext { + rootAuthorLike?: string + [k: string]: unknown +} + +export function isThreadContext(v: unknown): v is ThreadContext { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.bsky.feed.defs#threadContext' + ) +} + +export function validateThreadContext(v: unknown): ValidationResult { + return lexicons.validate('app.bsky.feed.defs#threadContext', v) +} + export interface FeedViewPost { post: PostView reply?: ReplyRef @@ -164,6 +182,7 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] + threadContext?: ThreadContext [k: string]: unknown } diff --git a/packages/bsky/src/lexicon/lexicons.ts b/packages/bsky/src/lexicon/lexicons.ts index 28191074e8c..38e2634e8aa 100644 --- a/packages/bsky/src/lexicon/lexicons.ts +++ b/packages/bsky/src/lexicon/lexicons.ts @@ -5545,6 +5545,17 @@ export const schemaDict = { }, }, }, + threadContext: { + type: 'object', + description: + 'Metadata about this post within the context of the thread it is in.', + properties: { + rootAuthorLike: { + type: 'string', + format: 'at-uri', + }, + }, + }, feedViewPost: { type: 'object', required: ['post'], @@ -5645,6 +5656,10 @@ export const schemaDict = { ], }, }, + threadContext: { + type: 'ref', + ref: 'lex:app.bsky.feed.defs#threadContext', + }, }, }, notFoundPost: { diff --git a/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts b/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts index 1c6f6ce78f6..bbcfe0ee010 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/feed/defs.ts @@ -71,6 +71,24 @@ export function validateViewerState(v: unknown): ValidationResult { return lexicons.validate('app.bsky.feed.defs#viewerState', v) } +/** Metadata about this post within the context of the thread it is in. */ +export interface ThreadContext { + rootAuthorLike?: string + [k: string]: unknown +} + +export function isThreadContext(v: unknown): v is ThreadContext { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.bsky.feed.defs#threadContext' + ) +} + +export function validateThreadContext(v: unknown): ValidationResult { + return lexicons.validate('app.bsky.feed.defs#threadContext', v) +} + export interface FeedViewPost { post: PostView reply?: ReplyRef @@ -164,6 +182,7 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] + threadContext?: ThreadContext [k: string]: unknown } diff --git a/packages/ozone/src/lexicon/lexicons.ts b/packages/ozone/src/lexicon/lexicons.ts index 3e539c106b7..ff52b559ca2 100644 --- a/packages/ozone/src/lexicon/lexicons.ts +++ b/packages/ozone/src/lexicon/lexicons.ts @@ -5545,6 +5545,17 @@ export const schemaDict = { }, }, }, + threadContext: { + type: 'object', + description: + 'Metadata about this post within the context of the thread it is in.', + properties: { + rootAuthorLike: { + type: 'string', + format: 'at-uri', + }, + }, + }, feedViewPost: { type: 'object', required: ['post'], @@ -5645,6 +5656,10 @@ export const schemaDict = { ], }, }, + threadContext: { + type: 'ref', + ref: 'lex:app.bsky.feed.defs#threadContext', + }, }, }, notFoundPost: { @@ -12359,7 +12374,7 @@ export const schemaDict = { items: { type: 'string', description: - 'If specified, only events where the policy matches the given policy are returned', + 'If specified, only events where the action policies match any of the given policies are returned', }, }, cursor: { diff --git a/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts b/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts index 1c6f6ce78f6..bbcfe0ee010 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/feed/defs.ts @@ -71,6 +71,24 @@ export function validateViewerState(v: unknown): ValidationResult { return lexicons.validate('app.bsky.feed.defs#viewerState', v) } +/** Metadata about this post within the context of the thread it is in. */ +export interface ThreadContext { + rootAuthorLike?: string + [k: string]: unknown +} + +export function isThreadContext(v: unknown): v is ThreadContext { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.bsky.feed.defs#threadContext' + ) +} + +export function validateThreadContext(v: unknown): ValidationResult { + return lexicons.validate('app.bsky.feed.defs#threadContext', v) +} + export interface FeedViewPost { post: PostView reply?: ReplyRef @@ -164,6 +182,7 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] + threadContext?: ThreadContext [k: string]: unknown } diff --git a/packages/pds/src/lexicon/lexicons.ts b/packages/pds/src/lexicon/lexicons.ts index 3e539c106b7..ff52b559ca2 100644 --- a/packages/pds/src/lexicon/lexicons.ts +++ b/packages/pds/src/lexicon/lexicons.ts @@ -5545,6 +5545,17 @@ export const schemaDict = { }, }, }, + threadContext: { + type: 'object', + description: + 'Metadata about this post within the context of the thread it is in.', + properties: { + rootAuthorLike: { + type: 'string', + format: 'at-uri', + }, + }, + }, feedViewPost: { type: 'object', required: ['post'], @@ -5645,6 +5656,10 @@ export const schemaDict = { ], }, }, + threadContext: { + type: 'ref', + ref: 'lex:app.bsky.feed.defs#threadContext', + }, }, }, notFoundPost: { @@ -12359,7 +12374,7 @@ export const schemaDict = { items: { type: 'string', description: - 'If specified, only events where the policy matches the given policy are returned', + 'If specified, only events where the action policies match any of the given policies are returned', }, }, cursor: { diff --git a/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts b/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts index 1c6f6ce78f6..bbcfe0ee010 100644 --- a/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts +++ b/packages/pds/src/lexicon/types/app/bsky/feed/defs.ts @@ -71,6 +71,24 @@ export function validateViewerState(v: unknown): ValidationResult { return lexicons.validate('app.bsky.feed.defs#viewerState', v) } +/** Metadata about this post within the context of the thread it is in. */ +export interface ThreadContext { + rootAuthorLike?: string + [k: string]: unknown +} + +export function isThreadContext(v: unknown): v is ThreadContext { + return ( + isObj(v) && + hasProp(v, '$type') && + v.$type === 'app.bsky.feed.defs#threadContext' + ) +} + +export function validateThreadContext(v: unknown): ValidationResult { + return lexicons.validate('app.bsky.feed.defs#threadContext', v) +} + export interface FeedViewPost { post: PostView reply?: ReplyRef @@ -164,6 +182,7 @@ export interface ThreadViewPost { | BlockedPost | { $type: string; [k: string]: unknown } )[] + threadContext?: ThreadContext [k: string]: unknown }