import type { $type } from '@atcute/lexicons'; import type * as AppBskyEmbedRecord from '../lexicons/types/app/bsky/embed/record.ts'; import type * as AppBskyEmbedRecordWithMedia from '../lexicons/types/app/bsky/embed/recordWithMedia.ts'; import type * as AppBskyFeedDefs from '../lexicons/types/app/bsky/feed/defs.ts'; import type * as AppBskyFeedPost from '../lexicons/types/app/bsky/feed/post.ts'; /** * a union type of all possible raw embeds. */ export interface RawEmbeds { media?: AppBskyEmbedRecordWithMedia.Main['media']; record?: AppBskyEmbedRecordWithMedia.Main['record']; } /** * a raw media embed. */ export type RawMediaEmbed = NonNullable; /** * a raw record embed. */ export type RawRecordEmbed = NonNullable; /** * extracts raw media embed from a post record embed * @param embed the embed interface to extract from * @returns the extracted raw media embed, if any */ export declare const unwrapRawMediaEmbed: (embed: AppBskyFeedPost.Main['embed']) => RawEmbeds['media']; /** * extracts raw record embed from a post record embed * @param embed the embed interface to extract from * @returns the extracted raw record embed, if any */ export declare const unwrapRawRecordEmbed: (embed: AppBskyFeedPost.Main['embed']) => RawEmbeds['record']; /** * extracts raw media and record embeds from a post record embed * @param embed the embed interface to extract from * @returns the extracted raw media and record embeds, if any */ export declare const unwrapRawEmbed: (embed: AppBskyFeedPost.Main['embed']) => RawEmbeds; /** * a union type of all possible embeds. */ export interface Embeds { media?: AppBskyEmbedRecordWithMedia.View['media']; record?: AppBskyEmbedRecordWithMedia.View['record']['record']; } /** * a media embed. */ export type MediaEmbed = NonNullable; /** * a record embed. */ export type RecordEmbed = NonNullable; /** * extracts media embed from a post embed * @param embed the embed interface to extract from * @returns the extracted media embed, if any */ export declare const unwrapMediaEmbed: (embed: AppBskyFeedDefs.PostView['embed']) => Embeds['media']; /** * extracts record embed from a post embed * @param embed the embed interface to extract from * @returns the extracted record embed, if any */ export declare const unwrapRecordEmbed: (embed: AppBskyFeedDefs.PostView['embed']) => Embeds['record']; /** * extracts media and record embeds from a post embed * @param embed the embed interface to extract from * @returns the extracted media and record embeds, if any */ export declare const unwrapEmbed: (embed: AppBskyFeedDefs.PostView['embed']) => Embeds; /** * a quote embed. */ export type QuoteEmbed = $type.enforce; /** * get quote embed from a record embed * @param embed the record embed to extract from * @returns the extracted quote embed, if any */ export declare const unwrapQuoteEmbed: (embed: RecordEmbed | undefined) => QuoteEmbed | undefined; //# sourceMappingURL=embeds.d.ts.map