A work-in-progress chat bot for Streamplace with chat overlay functionality
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

More & updated lexicons

+627 -49
-24
lexicons/online/timtinkers/bot/command.json
··· 28 28 "maxLength": 3000, 29 29 "maxGraphemes": 300 30 30 }, 31 - "responseFacets": { 32 - "type": "array", 33 - "description": "Annotations of response text (mentions, URLs, etc)", 34 - "items": { 35 - "type": "ref", 36 - "ref": "place.stream.richtext.facet" 37 - } 38 - }, 39 31 "responseTemplate": { 40 32 "type": "string", 41 33 "description": "Template with {paramName} placeholders (required for parameterizedCommand type)", 42 34 "maxLength": 3000, 43 35 "maxGraphemes": 300 44 36 }, 45 - "responseTemplateFacets": { 46 - "type": "array", 47 - "description": "Annotations for template text (mentions, URLs, etc). Indices should reference the template string before substitution.", 48 - "items": { 49 - "type": "ref", 50 - "ref": "place.stream.richtext.facet" 51 - } 52 - }, 53 37 "parameters": { 54 38 "type": "array", 55 39 "description": "Parameter definitions (required for parameterizedCommand type)", ··· 65 49 "description": "Template with {result} placeholder for RNG result and optional {paramName} for input (required for rngCommand type)", 66 50 "maxLength": 3000, 67 51 "maxGraphemes": 300 68 - }, 69 - "rngTemplateFacets": { 70 - "type": "array", 71 - "description": "Annotations for RNG template text", 72 - "items": { 73 - "type": "ref", 74 - "ref": "place.stream.richtext.facet" 75 - } 76 52 }, 77 53 "rngMin": { 78 54 "type": "integer",
+34
lexicons/online/timtinkers/bot/shoutout.json
··· 1 + { 2 + "$type": "com.atproto.lexicon.schema", 3 + "lexicon": 1, 4 + "id": "online.timtinkers.bot.shoutout", 5 + "defs": { 6 + "main": { 7 + "type": "record", 8 + "description": "Record containing a shoutout for a user, typically used during streams to highlight community members.", 9 + "key": "tid", 10 + "record": { 11 + "type": "object", 12 + "required": ["user", "text", "createdAt"], 13 + "properties": { 14 + "user": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "The DID of the user being shouted out" 18 + }, 19 + "text": { 20 + "type": "string", 21 + "maxLength": 5000, 22 + "maxGraphemes": 500, 23 + "description": "The shoutout message text" 24 + }, 25 + "createdAt": { 26 + "type": "string", 27 + "format": "datetime", 28 + "description": "Timestamp when the shoutout was created" 29 + } 30 + } 31 + } 32 + } 33 + } 34 + }
+38
lexicons/place/stream/defs.json
··· 1 + { 2 + "$type": "com.atproto.lexicon.schema", 3 + "lexicon": 1, 4 + "id": "place.stream.defs", 5 + "defs": { 6 + "blockView": { 7 + "type": "object", 8 + "required": ["uri", "cid", "blocker", "record", "indexedAt"], 9 + "properties": { 10 + "uri": { "type": "string", "format": "at-uri" }, 11 + "cid": { "type": "string", "format": "cid" }, 12 + "blocker": { 13 + "type": "ref", 14 + "ref": "app.bsky.actor.defs#profileViewBasic" 15 + }, 16 + "record": { "type": "ref", "ref": "app.bsky.graph.block" }, 17 + "indexedAt": { "type": "string", "format": "datetime" } 18 + } 19 + }, 20 + "renditions": { 21 + "type": "object", 22 + "required": ["renditions"], 23 + "properties": { 24 + "renditions": { 25 + "type": "array", 26 + "items": { "type": "ref", "ref": "#rendition" } 27 + } 28 + } 29 + }, 30 + "rendition": { 31 + "type": "object", 32 + "required": ["name"], 33 + "properties": { 34 + "name": { "type": "string" } 35 + } 36 + } 37 + } 38 + }
+34
lexicons/place/stream/live/teleport.json
··· 1 + { 2 + "$type": "com.atproto.lexicon.schema", 3 + "lexicon": 1, 4 + "id": "place.stream.live.teleport", 5 + "defs": { 6 + "main": { 7 + "type": "record", 8 + "key": "tid", 9 + "description": "Record defining a 'teleport', that is active during a certain time.", 10 + "record": { 11 + "type": "object", 12 + "required": ["streamer", "startsAt"], 13 + "properties": { 14 + "streamer": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "The DID of the streamer to teleport to." 18 + }, 19 + "startsAt": { 20 + "type": "string", 21 + "format": "datetime", 22 + "description": "The time the teleport becomes active." 23 + }, 24 + "durationSeconds": { 25 + "type": "integer", 26 + "description": "The time limit in seconds for the teleport. If not set, the teleport is permanent. Must be at least 60 seconds, and no more than 32,400 seconds (9 hours).", 27 + "minimum": 60, 28 + "maximum": 32400 29 + } 30 + } 31 + } 32 + } 33 + } 34 + }
+173
lexicons/place/stream/stream/livestream.json
··· 1 + { 2 + "$type": "com.atproto.lexicon.schema", 3 + "lexicon": 1, 4 + "id": "place.stream.livestream", 5 + "defs": { 6 + "main": { 7 + "type": "record", 8 + "description": "Record announcing a livestream is happening", 9 + "key": "tid", 10 + "record": { 11 + "type": "object", 12 + "required": ["title", "createdAt"], 13 + "properties": { 14 + "title": { 15 + "type": "string", 16 + "maxLength": 1400, 17 + "maxGraphemes": 140, 18 + "description": "The title of the livestream, as it will be announced to followers." 19 + }, 20 + "url": { 21 + "type": "string", 22 + "format": "uri", 23 + "description": "The URL where this stream can be found. This is primarily a hint for other Streamplace nodes to locate and replicate the stream." 24 + }, 25 + "createdAt": { 26 + "type": "string", 27 + "format": "datetime", 28 + "description": "Client-declared timestamp when this livestream started." 29 + }, 30 + "lastSeenAt": { 31 + "type": "string", 32 + "format": "datetime", 33 + "description": "Client-declared timestamp when this livestream was last seen by the Streamplace station." 34 + }, 35 + "endedAt": { 36 + "type": "string", 37 + "format": "datetime", 38 + "description": "Client-declared timestamp when this livestream ended. Ended livestreams are not supposed to start up again." 39 + }, 40 + "idleTimeoutSeconds": { 41 + "type": "integer", 42 + "description": "Time in seconds after which this livestream should be automatically ended if idle. Zero means no timeout." 43 + }, 44 + "post": { 45 + "type": "ref", 46 + "ref": "com.atproto.repo.strongRef", 47 + "description": "The post that announced this livestream." 48 + }, 49 + "agent": { 50 + "type": "string", 51 + "description": "The source of the livestream, if available, in a User Agent format: `<product> / <product-version> <comment>` e.g. Streamplace/0.7.5 iOS" 52 + }, 53 + "canonicalUrl": { 54 + "type": "string", 55 + "format": "uri", 56 + "description": "The primary URL where this livestream can be viewed, if available." 57 + }, 58 + "thumb": { 59 + "type": "blob", 60 + "accept": ["image/*"], 61 + "maxSize": 1000000 62 + }, 63 + "notificationSettings": { 64 + "type": "ref", 65 + "ref": "place.stream.livestream#notificationSettings" 66 + } 67 + } 68 + } 69 + }, 70 + "notificationSettings": { 71 + "type": "object", 72 + "required": [], 73 + "properties": { 74 + "pushNotification": { 75 + "type": "boolean", 76 + "description": "Whether this livestream should trigger a push notification to followers." 77 + } 78 + } 79 + }, 80 + "livestreamView": { 81 + "type": "object", 82 + "required": ["uri", "cid", "author", "record", "indexedAt"], 83 + "properties": { 84 + "uri": { "type": "string", "format": "at-uri" }, 85 + "cid": { "type": "string", "format": "cid" }, 86 + "author": { 87 + "type": "ref", 88 + "ref": "app.bsky.actor.defs#profileViewBasic" 89 + }, 90 + "record": { "type": "unknown" }, 91 + "indexedAt": { "type": "string", "format": "datetime" }, 92 + "viewerCount": { 93 + "type": "ref", 94 + "description": "The number of viewers watching this livestream. Use when you can't reasonably use #viewerCount directly.", 95 + "ref": "#viewerCount" 96 + } 97 + } 98 + }, 99 + "viewerCount": { 100 + "type": "object", 101 + "required": ["count"], 102 + "properties": { 103 + "count": { "type": "integer" } 104 + } 105 + }, 106 + "teleportArrival": { 107 + "type": "object", 108 + "required": ["teleportUri", "source", "viewerCount", "startsAt"], 109 + "properties": { 110 + "teleportUri": { 111 + "type": "string", 112 + "format": "at-uri", 113 + "description": "The URI of the teleport record" 114 + }, 115 + "source": { 116 + "type": "ref", 117 + "ref": "app.bsky.actor.defs#profileViewBasic", 118 + "description": "The streamer who is teleporting their viewers here" 119 + }, 120 + "chatProfile": { 121 + "type": "ref", 122 + "ref": "place.stream.chat.profile", 123 + "description": "The chat profile of the source streamer" 124 + }, 125 + "viewerCount": { 126 + "type": "integer", 127 + "description": "How many viewers are arriving from this teleport" 128 + }, 129 + "startsAt": { 130 + "type": "string", 131 + "format": "datetime", 132 + "description": "When this teleport started" 133 + } 134 + } 135 + }, 136 + "teleportCanceled": { 137 + "type": "object", 138 + "required": ["teleportUri", "reason"], 139 + "properties": { 140 + "teleportUri": { 141 + "type": "string", 142 + "format": "at-uri", 143 + "description": "The URI of the teleport record that was canceled" 144 + }, 145 + "reason": { 146 + "type": "string", 147 + "enum": ["deleted", "denied", "expired"], 148 + "description": "Why this teleport was canceled" 149 + } 150 + } 151 + }, 152 + "streamplaceAnything": { 153 + "type": "object", 154 + "required": ["livestream"], 155 + "properties": { 156 + "livestream": { 157 + "type": "union", 158 + "refs": [ 159 + "#livestreamView", 160 + "#viewerCount", 161 + "#teleportArrival", 162 + "#teleportCanceled", 163 + "place.stream.defs#blockView", 164 + "place.stream.defs#renditions", 165 + "place.stream.defs#rendition", 166 + "place.stream.chat.defs#messageView", 167 + "place.stream.chat.defs#pinnedRecordView" 168 + ] 169 + } 170 + } 171 + } 172 + } 173 + }
+4
utils/lexicons/index.ts
··· 1 1 export * as OnlineTimtinkersBotCommand from "./types/online/timtinkers/bot/command.ts"; 2 + export * as OnlineTimtinkersBotShoutout from "./types/online/timtinkers/bot/shoutout.ts"; 2 3 export * as PlaceStreamBadgeDefs from "./types/place/stream/badge/defs.ts"; 3 4 export * as PlaceStreamChatDefs from "./types/place/stream/chat/defs.ts"; 4 5 export * as PlaceStreamChatMessage from "./types/place/stream/chat/message.ts"; 5 6 export * as PlaceStreamChatPinnedRecord from "./types/place/stream/chat/pinnedRecord.ts"; 6 7 export * as PlaceStreamChatProfile from "./types/place/stream/chat/profile.ts"; 8 + export * as PlaceStreamDefs from "./types/place/stream/defs.ts"; 7 9 export * as PlaceStreamEmoteDefs from "./types/place/stream/emote/defs.ts"; 10 + export * as PlaceStreamLiveTeleport from "./types/place/stream/live/teleport.ts"; 11 + export * as PlaceStreamLivestream from "./types/place/stream/livestream.ts"; 8 12 export * as PlaceStreamRichtextFacet from "./types/place/stream/richtext/facet.ts";
-25
utils/lexicons/types/online/timtinkers/bot/command.ts
··· 1 1 import type {} from "@atcute/lexicons"; 2 2 import * as v from "@atcute/lexicons/validations"; 3 3 import type {} from "@atcute/lexicons/ambient"; 4 - import * as PlaceStreamRichtextFacet from "../../../place/stream/richtext/facet.ts"; 5 4 6 5 const _commandTypeSchema = /*#__PURE__*/ v.string< 7 6 | "online.timtinkers.bot.command#parameterizedCommand" ··· 53 52 ]), 54 53 ), 55 54 /** 56 - * Annotations of response text (mentions, URLs, etc) 57 - */ 58 - get responseFacets() { 59 - return /*#__PURE__*/ v.optional( 60 - /*#__PURE__*/ v.array(PlaceStreamRichtextFacet.mainSchema), 61 - ); 62 - }, 63 - /** 64 55 * Template with {paramName} placeholders (required for parameterizedCommand type) 65 56 * @maxLength 3000 66 57 * @maxGraphemes 300 ··· 72 63 ]), 73 64 ), 74 65 /** 75 - * Annotations for template text (mentions, URLs, etc). Indices should reference the template string before substitution. 76 - */ 77 - get responseTemplateFacets() { 78 - return /*#__PURE__*/ v.optional( 79 - /*#__PURE__*/ v.array(PlaceStreamRichtextFacet.mainSchema), 80 - ); 81 - }, 82 - /** 83 66 * Maximum value for RNG (inclusive, required for rngCommand type) 84 67 */ 85 68 rngMax: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), ··· 104 87 /*#__PURE__*/ v.stringGraphemes(0, 300), 105 88 ]), 106 89 ), 107 - /** 108 - * Annotations for RNG template text 109 - */ 110 - get rngTemplateFacets() { 111 - return /*#__PURE__*/ v.optional( 112 - /*#__PURE__*/ v.array(PlaceStreamRichtextFacet.mainSchema), 113 - ); 114 - }, 115 90 /** 116 91 * The command trigger without prefix (e.g., 'socials', 'hug', 'd6') 117 92 * @minLength 1
+41
utils/lexicons/types/online/timtinkers/bot/shoutout.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("online.timtinkers.bot.shoutout"), 9 + /** 10 + * Timestamp when the shoutout was created 11 + */ 12 + createdAt: /*#__PURE__*/ v.datetimeString(), 13 + /** 14 + * The shoutout message text 15 + * @maxLength 5000 16 + * @maxGraphemes 500 17 + */ 18 + text: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 19 + /*#__PURE__*/ v.stringLength(0, 5000), 20 + /*#__PURE__*/ v.stringGraphemes(0, 500), 21 + ]), 22 + /** 23 + * The DID of the user being shouted out 24 + */ 25 + user: /*#__PURE__*/ v.didString(), 26 + }), 27 + ); 28 + 29 + type main$schematype = typeof _mainSchema; 30 + 31 + export interface mainSchema extends main$schematype {} 32 + 33 + export const mainSchema = _mainSchema as mainSchema; 34 + 35 + export interface Main extends v.InferInput<typeof mainSchema> {} 36 + 37 + declare module "@atcute/lexicons/ambient" { 38 + interface Records { 39 + "online.timtinkers.bot.shoutout": mainSchema; 40 + } 41 + }
+49
utils/lexicons/types/place/stream/defs.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import * as AppBskyActorDefs from "@atcute/bluesky/types/app/actor/defs"; 4 + import * as AppBskyGraphBlock from "@atcute/bluesky/types/app/graph/block"; 5 + 6 + const _blockViewSchema = /*#__PURE__*/ v.object({ 7 + $type: /*#__PURE__*/ v.optional( 8 + /*#__PURE__*/ v.literal("place.stream.defs#blockView"), 9 + ), 10 + get blocker() { 11 + return AppBskyActorDefs.profileViewBasicSchema; 12 + }, 13 + cid: /*#__PURE__*/ v.cidString(), 14 + indexedAt: /*#__PURE__*/ v.datetimeString(), 15 + get record() { 16 + return AppBskyGraphBlock.mainSchema; 17 + }, 18 + uri: /*#__PURE__*/ v.resourceUriString(), 19 + }); 20 + const _renditionSchema = /*#__PURE__*/ v.object({ 21 + $type: /*#__PURE__*/ v.optional( 22 + /*#__PURE__*/ v.literal("place.stream.defs#rendition"), 23 + ), 24 + name: /*#__PURE__*/ v.string(), 25 + }); 26 + const _renditionsSchema = /*#__PURE__*/ v.object({ 27 + $type: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.literal("place.stream.defs#renditions"), 29 + ), 30 + get renditions() { 31 + return /*#__PURE__*/ v.array(renditionSchema); 32 + }, 33 + }); 34 + 35 + type blockView$schematype = typeof _blockViewSchema; 36 + type rendition$schematype = typeof _renditionSchema; 37 + type renditions$schematype = typeof _renditionsSchema; 38 + 39 + export interface blockViewSchema extends blockView$schematype {} 40 + export interface renditionSchema extends rendition$schematype {} 41 + export interface renditionsSchema extends renditions$schematype {} 42 + 43 + export const blockViewSchema = _blockViewSchema as blockViewSchema; 44 + export const renditionSchema = _renditionSchema as renditionSchema; 45 + export const renditionsSchema = _renditionsSchema as renditionsSchema; 46 + 47 + export interface BlockView extends v.InferInput<typeof blockViewSchema> {} 48 + export interface Rendition extends v.InferInput<typeof renditionSchema> {} 49 + export interface Renditions extends v.InferInput<typeof renditionsSchema> {}
+42
utils/lexicons/types/place/stream/live/teleport.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("place.stream.live.teleport"), 9 + /** 10 + * The time limit in seconds for the teleport. If not set, the teleport is permanent. Must be at least 60 seconds, and no more than 32,400 seconds (9 hours). 11 + * @minimum 60 12 + * @maximum 32400 13 + */ 14 + durationSeconds: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 16 + /*#__PURE__*/ v.integerRange(60, 32400), 17 + ]), 18 + ), 19 + /** 20 + * The time the teleport becomes active. 21 + */ 22 + startsAt: /*#__PURE__*/ v.datetimeString(), 23 + /** 24 + * The DID of the streamer to teleport to. 25 + */ 26 + streamer: /*#__PURE__*/ v.didString(), 27 + }), 28 + ); 29 + 30 + type main$schematype = typeof _mainSchema; 31 + 32 + export interface mainSchema extends main$schematype {} 33 + 34 + export const mainSchema = _mainSchema as mainSchema; 35 + 36 + export interface Main extends v.InferInput<typeof mainSchema> {} 37 + 38 + declare module "@atcute/lexicons/ambient" { 39 + interface Records { 40 + "place.stream.live.teleport": mainSchema; 41 + } 42 + }
+212
utils/lexicons/types/place/stream/livestream.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as AppBskyActorDefs from "@atcute/bluesky/types/app/actor/defs"; 5 + import * as ComAtprotoRepoStrongRef from "@atcute/atproto/types/repo/strongRef"; 6 + import * as PlaceStreamChatDefs from "./chat/defs.ts"; 7 + import * as PlaceStreamChatProfile from "./chat/profile.ts"; 8 + import * as PlaceStreamDefs from "./defs.ts"; 9 + 10 + const _livestreamViewSchema = /*#__PURE__*/ v.object({ 11 + $type: /*#__PURE__*/ v.optional( 12 + /*#__PURE__*/ v.literal("place.stream.livestream#livestreamView"), 13 + ), 14 + get author() { 15 + return AppBskyActorDefs.profileViewBasicSchema; 16 + }, 17 + cid: /*#__PURE__*/ v.cidString(), 18 + indexedAt: /*#__PURE__*/ v.datetimeString(), 19 + record: /*#__PURE__*/ v.unknown(), 20 + uri: /*#__PURE__*/ v.resourceUriString(), 21 + /** 22 + * The number of viewers watching this livestream. Use when you can't reasonably use #viewerCount directly. 23 + */ 24 + get viewerCount() { 25 + return /*#__PURE__*/ v.optional(viewerCountSchema); 26 + }, 27 + }); 28 + const _mainSchema = /*#__PURE__*/ v.record( 29 + /*#__PURE__*/ v.tidString(), 30 + /*#__PURE__*/ v.object({ 31 + $type: /*#__PURE__*/ v.literal("place.stream.livestream"), 32 + /** 33 + * The source of the livestream, if available, in a User Agent format: `<product> / <product-version> <comment>` e.g. Streamplace/0.7.5 iOS 34 + */ 35 + agent: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 36 + /** 37 + * The primary URL where this livestream can be viewed, if available. 38 + */ 39 + canonicalUrl: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 40 + /** 41 + * Client-declared timestamp when this livestream started. 42 + */ 43 + createdAt: /*#__PURE__*/ v.datetimeString(), 44 + /** 45 + * Client-declared timestamp when this livestream ended. Ended livestreams are not supposed to start up again. 46 + */ 47 + endedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 48 + /** 49 + * Time in seconds after which this livestream should be automatically ended if idle. Zero means no timeout. 50 + */ 51 + idleTimeoutSeconds: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 52 + /** 53 + * Client-declared timestamp when this livestream was last seen by the Streamplace station. 54 + */ 55 + lastSeenAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 56 + get notificationSettings() { 57 + return /*#__PURE__*/ v.optional(notificationSettingsSchema); 58 + }, 59 + /** 60 + * The post that announced this livestream. 61 + */ 62 + get post() { 63 + return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema); 64 + }, 65 + /** 66 + * @accept image/* 67 + * @maxSize 1000000 68 + */ 69 + thumb: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 70 + /** 71 + * The title of the livestream, as it will be announced to followers. 72 + * @maxLength 1400 73 + * @maxGraphemes 140 74 + */ 75 + title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 76 + /*#__PURE__*/ v.stringLength(0, 1400), 77 + /*#__PURE__*/ v.stringGraphemes(0, 140), 78 + ]), 79 + /** 80 + * The URL where this stream can be found. This is primarily a hint for other Streamplace nodes to locate and replicate the stream. 81 + */ 82 + url: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 83 + }), 84 + ); 85 + const _notificationSettingsSchema = /*#__PURE__*/ v.object({ 86 + $type: /*#__PURE__*/ v.optional( 87 + /*#__PURE__*/ v.literal("place.stream.livestream#notificationSettings"), 88 + ), 89 + /** 90 + * Whether this livestream should trigger a push notification to followers. 91 + */ 92 + pushNotification: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 93 + }); 94 + const _streamplaceAnythingSchema = /*#__PURE__*/ v.object({ 95 + $type: /*#__PURE__*/ v.optional( 96 + /*#__PURE__*/ v.literal("place.stream.livestream#streamplaceAnything"), 97 + ), 98 + get livestream() { 99 + return /*#__PURE__*/ v.variant([ 100 + PlaceStreamChatDefs.messageViewSchema, 101 + PlaceStreamChatDefs.pinnedRecordViewSchema, 102 + PlaceStreamDefs.blockViewSchema, 103 + PlaceStreamDefs.renditionSchema, 104 + PlaceStreamDefs.renditionsSchema, 105 + livestreamViewSchema, 106 + teleportArrivalSchema, 107 + teleportCanceledSchema, 108 + viewerCountSchema, 109 + ]); 110 + }, 111 + }); 112 + const _teleportArrivalSchema = /*#__PURE__*/ v.object({ 113 + $type: /*#__PURE__*/ v.optional( 114 + /*#__PURE__*/ v.literal("place.stream.livestream#teleportArrival"), 115 + ), 116 + /** 117 + * The chat profile of the source streamer 118 + */ 119 + get chatProfile() { 120 + return /*#__PURE__*/ v.optional(PlaceStreamChatProfile.mainSchema); 121 + }, 122 + /** 123 + * The streamer who is teleporting their viewers here 124 + */ 125 + get source() { 126 + return AppBskyActorDefs.profileViewBasicSchema; 127 + }, 128 + /** 129 + * When this teleport started 130 + */ 131 + startsAt: /*#__PURE__*/ v.datetimeString(), 132 + /** 133 + * The URI of the teleport record 134 + */ 135 + teleportUri: /*#__PURE__*/ v.resourceUriString(), 136 + /** 137 + * How many viewers are arriving from this teleport 138 + */ 139 + viewerCount: /*#__PURE__*/ v.integer(), 140 + }); 141 + const _teleportCanceledSchema = /*#__PURE__*/ v.object({ 142 + $type: /*#__PURE__*/ v.optional( 143 + /*#__PURE__*/ v.literal("place.stream.livestream#teleportCanceled"), 144 + ), 145 + /** 146 + * Why this teleport was canceled 147 + */ 148 + reason: /*#__PURE__*/ v.literalEnum(["deleted", "denied", "expired"]), 149 + /** 150 + * The URI of the teleport record that was canceled 151 + */ 152 + teleportUri: /*#__PURE__*/ v.resourceUriString(), 153 + }); 154 + const _viewerCountSchema = /*#__PURE__*/ v.object({ 155 + $type: /*#__PURE__*/ v.optional( 156 + /*#__PURE__*/ v.literal("place.stream.livestream#viewerCount"), 157 + ), 158 + count: /*#__PURE__*/ v.integer(), 159 + }); 160 + 161 + type livestreamView$schematype = typeof _livestreamViewSchema; 162 + type main$schematype = typeof _mainSchema; 163 + type notificationSettings$schematype = typeof _notificationSettingsSchema; 164 + type streamplaceAnything$schematype = typeof _streamplaceAnythingSchema; 165 + type teleportArrival$schematype = typeof _teleportArrivalSchema; 166 + type teleportCanceled$schematype = typeof _teleportCanceledSchema; 167 + type viewerCount$schematype = typeof _viewerCountSchema; 168 + 169 + export interface livestreamViewSchema extends livestreamView$schematype {} 170 + export interface mainSchema extends main$schematype {} 171 + export interface notificationSettingsSchema extends notificationSettings$schematype {} 172 + export interface streamplaceAnythingSchema extends streamplaceAnything$schematype {} 173 + export interface teleportArrivalSchema extends teleportArrival$schematype {} 174 + export interface teleportCanceledSchema extends teleportCanceled$schematype {} 175 + export interface viewerCountSchema extends viewerCount$schematype {} 176 + 177 + export const livestreamViewSchema = 178 + _livestreamViewSchema as livestreamViewSchema; 179 + export const mainSchema = _mainSchema as mainSchema; 180 + export const notificationSettingsSchema = 181 + _notificationSettingsSchema as notificationSettingsSchema; 182 + export const streamplaceAnythingSchema = 183 + _streamplaceAnythingSchema as streamplaceAnythingSchema; 184 + export const teleportArrivalSchema = 185 + _teleportArrivalSchema as teleportArrivalSchema; 186 + export const teleportCanceledSchema = 187 + _teleportCanceledSchema as teleportCanceledSchema; 188 + export const viewerCountSchema = _viewerCountSchema as viewerCountSchema; 189 + 190 + export interface LivestreamView extends v.InferInput< 191 + typeof livestreamViewSchema 192 + > {} 193 + export interface Main extends v.InferInput<typeof mainSchema> {} 194 + export interface NotificationSettings extends v.InferInput< 195 + typeof notificationSettingsSchema 196 + > {} 197 + export interface StreamplaceAnything extends v.InferInput< 198 + typeof streamplaceAnythingSchema 199 + > {} 200 + export interface TeleportArrival extends v.InferInput< 201 + typeof teleportArrivalSchema 202 + > {} 203 + export interface TeleportCanceled extends v.InferInput< 204 + typeof teleportCanceledSchema 205 + > {} 206 + export interface ViewerCount extends v.InferInput<typeof viewerCountSchema> {} 207 + 208 + declare module "@atcute/lexicons/ambient" { 209 + interface Records { 210 + "place.stream.livestream": mainSchema; 211 + } 212 + }