/* * 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"; const $nsid = "place.stream.chat.profile"; export { $nsid }; /** Record containing customizations for a user's chat profile. */ type Main = { $type: "place.stream.chat.profile";"color"?:Color; /** * Self-applied labels for this profile, e.g. 'bot'. */ "selfLabels"?:(SelfLabel)[]; /** * Badge selections for display in chat. */ "badges"?:BadgeSelections }; export type { Main }; /** Record containing customizations for a user's chat profile. */ const main = /*#__PURE__*/ l.record<"literal:self", Main>("literal:self", $nsid, /*#__PURE__*/ l.object({"color":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => color) as any)),"selfLabels":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.ref((() => selfLabel) as any), {"maxLength":10})),"badges":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => badgeSelections) 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); /** Selected badges for display in chat, organized by slot. */ type BadgeSelections = { $type?: "place.stream.chat.profile#badgeSelections"; /** * Selected streamer-issued badges, one per streamer channel. */ "streamer"?:(StreamerBadgeSelection)[]; /** * Selected globally-issued badge (e.g. event badge). */ "global"?:RepoStrongRef.Main }; export type { BadgeSelections }; /** Selected badges for display in chat, organized by slot. */ const badgeSelections = /*#__PURE__*/ l.typedObject($nsid, "badgeSelections", /*#__PURE__*/ l.object({"streamer":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.ref((() => streamerBadgeSelection) as any), {"maxLength":20})),"global":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => RepoStrongRef.main) as any))})); export { badgeSelections }; /** A selected badge for a specific streamer's channel. */ type StreamerBadgeSelection = { $type?: "place.stream.chat.profile#streamerBadgeSelection"; /** * DID of the streamer whose channel this selection applies to. */ "streamer":l.DidString; /** * Strong reference to the selected place.stream.badge.issuance record. */ "badge":RepoStrongRef.Main }; export type { StreamerBadgeSelection }; /** A selected badge for a specific streamer's channel. */ const streamerBadgeSelection = /*#__PURE__*/ l.typedObject($nsid, "streamerBadgeSelection", /*#__PURE__*/ l.object({"streamer":/*#__PURE__*/ l.string({"format":"did"}),"badge":/*#__PURE__*/ l.ref((() => RepoStrongRef.main) as any)})); export { streamerBadgeSelection }; /** Label that a user can apply to their own profile. */ type SelfLabel = "bot" | l.UnknownString; export type { SelfLabel }; /** Label that a user can apply to their own profile. */ const selfLabel = /*#__PURE__*/ l.string<{"knownValues":["bot"]}>(); export { selfLabel }; /** Customizations for the color of a user's name in chat */ type Color = { $type?: "place.stream.chat.profile#color";"red":number;"green":number;"blue":number }; export type { Color }; /** Customizations for the color of a user's name in chat */ const color = /*#__PURE__*/ l.typedObject($nsid, "color", /*#__PURE__*/ l.object({"red":/*#__PURE__*/ l.integer({"minimum":0,"maximum":255}),"green":/*#__PURE__*/ l.integer({"minimum":0,"maximum":255}),"blue":/*#__PURE__*/ l.integer({"minimum":0,"maximum":255})})); export { color };