/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; import * as RepoStrongRef from "../../../com/atproto/repo/strongRef.defs.js"; import * as FeedDefs from "../feed/defs.defs.js"; import * as GraphDefs from "../graph/defs.defs.js"; import * as LabelerDefs from "../labeler/defs.defs.js"; import * as ActorDefs from "../actor/defs.defs.js"; import * as EmbedImages from "./images.defs.js"; import * as EmbedVideo from "./video.defs.js"; import * as EmbedGallery from "./gallery.defs.js"; import * as EmbedExternal from "./external.defs.js"; import * as EmbedRecordWithMedia from "./recordWithMedia.defs.js"; import * as LabelDefs from "../../../com/atproto/label/defs.defs.js"; const $nsid = "app.bsky.embed.record"; export { $nsid }; type Main = { $type?: "app.bsky.embed.record";"record":RepoStrongRef.Main }; export type { Main }; const main = /*#__PURE__*/ l.typedObject
($nsid, "main", /*#__PURE__*/ l.object({"record":/*#__PURE__*/ l.ref((() => RepoStrongRef.main) as any)})); export { main }; export const $type = $nsid; export const $isTypeOf = /*#__PURE__*/ main.isTypeOf.bind(main); export const $build = /*#__PURE__*/ main.build.bind(main); export const $assert = /*#__PURE__*/ main.assert.bind(main); export const $check = /*#__PURE__*/ main.check.bind(main); export const $cast = /*#__PURE__*/ main.cast.bind(main); export const $ifMatches = /*#__PURE__*/ main.ifMatches.bind(main); export const $matches = /*#__PURE__*/ main.matches.bind(main); export const $parse = /*#__PURE__*/ main.parse.bind(main); export const $safeParse = /*#__PURE__*/ main.safeParse.bind(main); export const $validate = /*#__PURE__*/ main.validate.bind(main); export const $safeValidate = /*#__PURE__*/ main.safeValidate.bind(main); type View = { $type?: "app.bsky.embed.record#view";"record":l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.Unknown$TypedObject }; export type { View }; const view = /*#__PURE__*/ l.typedObject($nsid, "view", /*#__PURE__*/ l.object({"record":/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => viewRecord) as any),/*#__PURE__*/ l.typedRef((() => viewNotFound) as any),/*#__PURE__*/ l.typedRef((() => viewBlocked) as any),/*#__PURE__*/ l.typedRef((() => viewDetached) as any),/*#__PURE__*/ l.typedRef((() => FeedDefs.generatorView) as any),/*#__PURE__*/ l.typedRef((() => GraphDefs.listView) as any),/*#__PURE__*/ l.typedRef((() => LabelerDefs.labelerView) as any),/*#__PURE__*/ l.typedRef((() => GraphDefs.starterPackViewBasic) as any)], false)})); export { view }; type ViewRecord = { $type?: "app.bsky.embed.record#viewRecord";"cid":l.CidString;"uri":l.AtUriString; /** * The record data itself. */ "value":l.LexMap;"author":ActorDefs.ProfileViewBasic;"embeds"?:(l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.Unknown$TypedObject)[];"labels"?:(LabelDefs.Label)[];"indexedAt":l.DatetimeString;"likeCount"?:number;"quoteCount"?:number;"replyCount"?:number;"repostCount"?:number }; export type { ViewRecord }; const viewRecord = /*#__PURE__*/ l.typedObject($nsid, "viewRecord", /*#__PURE__*/ l.object({"cid":/*#__PURE__*/ l.string({"format":"cid"}),"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"value":/*#__PURE__*/ l.lexMap(),"author":/*#__PURE__*/ l.ref((() => ActorDefs.profileViewBasic) as any),"embeds":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => EmbedImages.view) as any),/*#__PURE__*/ l.typedRef((() => EmbedVideo.view) as any),/*#__PURE__*/ l.typedRef((() => EmbedGallery.view) as any),/*#__PURE__*/ l.typedRef((() => EmbedExternal.view) as any),/*#__PURE__*/ l.typedRef((() => view) as any),/*#__PURE__*/ l.typedRef((() => EmbedRecordWithMedia.view) as any)], false), )),"labels":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.ref((() => LabelDefs.label) as any), )),"indexedAt":/*#__PURE__*/ l.string({"format":"datetime"}),"likeCount":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),"quoteCount":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),"replyCount":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),"repostCount":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer())})); export { viewRecord }; type ViewBlocked = { $type?: "app.bsky.embed.record#viewBlocked";"uri":l.AtUriString;"author":FeedDefs.BlockedAuthor;"blocked":true }; export type { ViewBlocked }; const viewBlocked = /*#__PURE__*/ l.typedObject($nsid, "viewBlocked", /*#__PURE__*/ l.object({"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"author":/*#__PURE__*/ l.ref((() => FeedDefs.blockedAuthor) as any),"blocked":/*#__PURE__*/ l.literal(true)})); export { viewBlocked }; type ViewDetached = { $type?: "app.bsky.embed.record#viewDetached";"uri":l.AtUriString;"detached":true }; export type { ViewDetached }; const viewDetached = /*#__PURE__*/ l.typedObject($nsid, "viewDetached", /*#__PURE__*/ l.object({"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"detached":/*#__PURE__*/ l.literal(true)})); export { viewDetached }; type ViewNotFound = { $type?: "app.bsky.embed.record#viewNotFound";"uri":l.AtUriString;"notFound":true }; export type { ViewNotFound }; const viewNotFound = /*#__PURE__*/ l.typedObject($nsid, "viewNotFound", /*#__PURE__*/ l.object({"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"notFound":/*#__PURE__*/ l.literal(true)})); export { viewNotFound };