/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; import * as ActorDefs from "../../../app/bsky/actor/defs.defs.js"; import * as BadgeDefs from "../badge/defs.defs.js"; import * as ChatProfile from "./profile.defs.js"; import * as ChatPinnedRecord from "./pinnedRecord.defs.js"; const $nsid = "place.stream.chat.defs"; export { $nsid }; type MessageView = { $type?: "place.stream.chat.defs#messageView";"uri":l.AtUriString;"cid":l.CidString;"author":ActorDefs.ProfileViewBasic;"record":l.LexMap;"indexedAt":l.DatetimeString;"chatProfile"?:ChatProfile.Main;"replyTo"?:l.$Typed | l.Unknown$TypedObject; /** * If true, this message has been deleted or labeled and should be cleared from the cache */ "deleted"?:boolean; /** * Up to 3 badge tokens to display with the message. First badge is server-controlled, remaining badges are user-settable. Tokens are looked up in badges.json for display info. */ "badges"?:(BadgeDefs.BadgeView)[] }; export type { MessageView }; const messageView = /*#__PURE__*/ l.typedObject($nsid, "messageView", /*#__PURE__*/ l.object({"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"cid":/*#__PURE__*/ l.string({"format":"cid"}),"author":/*#__PURE__*/ l.ref((() => ActorDefs.profileViewBasic) as any),"record":/*#__PURE__*/ l.lexMap(),"indexedAt":/*#__PURE__*/ l.string({"format":"datetime"}),"chatProfile":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => ChatProfile.main) as any)),"replyTo":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => messageView) as any)], false)),"deleted":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),"badges":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.ref((() => BadgeDefs.badgeView) as any), {"maxLength":3}))})); export { messageView }; /** View of a pinned chat record with hydrated message data. */ type PinnedRecordView = { $type?: "place.stream.chat.defs#pinnedRecordView";"uri":l.AtUriString;"cid":l.CidString;"record":ChatPinnedRecord.Main;"indexedAt":l.DatetimeString;"pinnedBy"?:ChatProfile.Main;"message"?:MessageView }; export type { PinnedRecordView }; /** View of a pinned chat record with hydrated message data. */ const pinnedRecordView = /*#__PURE__*/ l.typedObject($nsid, "pinnedRecordView", /*#__PURE__*/ l.object({"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"cid":/*#__PURE__*/ l.string({"format":"cid"}),"record":/*#__PURE__*/ l.ref((() => ChatPinnedRecord.main) as any),"indexedAt":/*#__PURE__*/ l.string({"format":"datetime"}),"pinnedBy":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => ChatProfile.main) as any)),"message":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => messageView) as any))})); export { pinnedRecordView };