/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; const $nsid = "place.stream.badge.defs"; export { $nsid }; /** View of a badge record, with fields resolved for display. If the DID in issuer is not the current streamplace node, the signature field shall be required. */ type BadgeView = { $type?: "place.stream.badge.defs#badgeView";"badgeType":"place.stream.badge.defs#mod" | "place.stream.badge.defs#streamer" | "place.stream.badge.defs#vip" | "place.stream.badge.defs#event" | "place.stream.badge.defs#bot" | l.UnknownString; /** * DID of the badge issuer. */ "issuer":l.DidString; /** * DID of the badge recipient. */ "recipient":l.DidString; /** * Display name from the badge definition. */ "name"?:string; /** * Description from the badge definition. */ "description"?:string; /** * Resolved image URL for the badge icon. */ "imageUrl"?:l.UriString; /** * TODO: Cryptographic signature of the badge (of a place.stream.key). */ "signature"?:string }; export type { BadgeView }; /** View of a badge record, with fields resolved for display. If the DID in issuer is not the current streamplace node, the signature field shall be required. */ const badgeView = /*#__PURE__*/ l.typedObject($nsid, "badgeView", /*#__PURE__*/ l.object({"badgeType":/*#__PURE__*/ l.string<{"knownValues":["place.stream.badge.defs#mod","place.stream.badge.defs#streamer","place.stream.badge.defs#vip","place.stream.badge.defs#event","place.stream.badge.defs#bot"]}>(),"issuer":/*#__PURE__*/ l.string({"format":"did"}),"recipient":/*#__PURE__*/ l.string({"format":"did"}),"name":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),"description":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),"imageUrl":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"format":"uri"})),"signature":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string())})); export { badgeView }; /** A resolved view of a badge issuance, including def fields for display. */ type BadgeIssuanceView = { $type?: "place.stream.badge.defs#badgeIssuanceView"; /** * AT URI of the place.stream.badge.issuance record. */ "issuanceUri":l.AtUriString; /** * CID of the place.stream.badge.issuance record. */ "issuanceCid"?:string;"badgeType":"place.stream.badge.defs#vip" | "place.stream.badge.defs#event" | l.UnknownString; /** * Display name from the badge definition. */ "name"?:string; /** * Description from the badge definition. */ "description"?:string; /** * Resolved image URL for the badge icon. */ "imageUrl"?:l.UriString; /** * DID of the badge issuer. */ "issuer":l.DidString; /** * Whether this badge is currently in the user's chat profile selection. */ "selected"?:boolean }; export type { BadgeIssuanceView }; /** A resolved view of a badge issuance, including def fields for display. */ const badgeIssuanceView = /*#__PURE__*/ l.typedObject($nsid, "badgeIssuanceView", /*#__PURE__*/ l.object({"issuanceUri":/*#__PURE__*/ l.string({"format":"at-uri"}),"issuanceCid":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),"badgeType":/*#__PURE__*/ l.string<{"knownValues":["place.stream.badge.defs#vip","place.stream.badge.defs#event"]}>(),"name":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),"description":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),"imageUrl":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"format":"uri"})),"issuer":/*#__PURE__*/ l.string({"format":"did"}),"selected":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean())})); export { badgeIssuanceView }; /** A display slot containing available issuance-based badges and which one (if any) is currently selected. */ type BadgeSlot = { $type?: "place.stream.badge.defs#badgeSlot"; /** * The currently selected badge in this slot, if any. */ "selected"?:BadgeIssuanceView; /** * All badges available for this slot. */ "available":(BadgeIssuanceView)[] }; export type { BadgeSlot }; /** A display slot containing available issuance-based badges and which one (if any) is currently selected. */ const badgeSlot = /*#__PURE__*/ l.typedObject($nsid, "badgeSlot", /*#__PURE__*/ l.object({"selected":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => badgeIssuanceView) as any)),"available":/*#__PURE__*/ l.array(/*#__PURE__*/ l.ref((() => badgeIssuanceView) as any), )})); export { badgeSlot }; /** This user is a moderator. Displayed with a sword icon. */ type Mod = "place.stream.badge.defs#mod"; export type { Mod }; /** This user is a moderator. Displayed with a sword icon. */ const mod = /*#__PURE__*/ l.token($nsid, "mod"); export { mod }; /** This user is the streamer. Displayed with a star icon. */ type Streamer = "place.stream.badge.defs#streamer"; export type { Streamer }; /** This user is the streamer. Displayed with a star icon. */ const streamer = /*#__PURE__*/ l.token($nsid, "streamer"); export { streamer }; /** This user is a very important person. */ type Vip = "place.stream.badge.defs#vip"; export type { Vip }; /** This user is a very important person. */ const vip = /*#__PURE__*/ l.token($nsid, "vip"); export { vip }; /** This user is a bot. Self-applied via place.stream.chat.profile selfLabels. */ type Bot = "place.stream.badge.defs#bot"; export type { Bot }; /** This user is a bot. Self-applied via place.stream.chat.profile selfLabels. */ const bot = /*#__PURE__*/ l.token($nsid, "bot"); export { bot }; /** This user has won or earned a special event or contest badge. */ type Event = "place.stream.badge.defs#event"; export type { Event }; /** This user has won or earned a special event or contest badge. */ const event = /*#__PURE__*/ l.token($nsid, "event"); export { event };