feat: initial implementation of chat in terminal from stream.place
This commit is contained in:
commit
689304656f
39 files changed
+4243
No files matched your search
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
||||
*/
|
||||
|
||||
export * as message from './chat/message.js'
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { l } from '@atproto/lex'
|
||||
import * as RichtextFacet from './..\\richtext\\facet.defs.js'
|
||||
import * as RepoStrongRef from './..\\..\\..\\com\\atproto\\repo\\strongRef.defs.js'
|
||||
|
||||
const $nsid = 'place.stream.chat.message'
|
||||
|
||||
type $nsid = typeof $nsid
|
||||
|
||||
export { $nsid }
|
||||
|
||||
/** Record containing a Streamplace chat message. */
|
||||
type Main = {
|
||||
$type: 'place.stream.chat.message'
|
||||
|
||||
/**
|
||||
* The primary message content. May be an empty string, if there are embeds.
|
||||
*/
|
||||
text: string
|
||||
|
||||
/**
|
||||
* Client-declared timestamp when this message was originally created.
|
||||
*/
|
||||
createdAt: l.DatetimeString
|
||||
|
||||
/**
|
||||
* Annotations of text (mentions, URLs, etc)
|
||||
*/
|
||||
facets?: RichtextFacet.Main[]
|
||||
|
||||
/**
|
||||
* The DID of the streamer whose chat this is.
|
||||
*/
|
||||
streamer: l.DidString
|
||||
reply?: ReplyRef
|
||||
}
|
||||
|
||||
export type { Main }
|
||||
|
||||
/** Record containing a Streamplace chat message. */
|
||||
const main = /*#__PURE__*/ l.record<'tid', Main>(
|
||||
'tid',
|
||||
$nsid,
|
||||
/*#__PURE__*/ l.object({
|
||||
text: /*#__PURE__*/ l.string({ maxLength: 3000, maxGraphemes: 300 }),
|
||||
createdAt: /*#__PURE__*/ l.string({ format: 'datetime' }),
|
||||
facets: /*#__PURE__*/ l.optional(
|
||||
/*#__PURE__*/ l.array(
|
||||
/*#__PURE__*/ l.ref<RichtextFacet.Main>(
|
||||
(() => RichtextFacet.main) as any,
|
||||
),
|
||||
),
|
||||
),
|
||||
streamer: /*#__PURE__*/ l.string({ format: 'did' }),
|
||||
reply: /*#__PURE__*/ l.optional(
|
||||
/*#__PURE__*/ l.ref<ReplyRef>((() => replyRef) as any),
|
||||
),
|
||||
}),
|
||||
)
|
||||
|
||||
export { main }
|
||||
|
||||
const $type = $nsid
|
||||
|
||||
type $type = typeof $type
|
||||
|
||||
export { $type }
|
||||
|
||||
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 ReplyRef = {
|
||||
$type?: 'place.stream.chat.message#replyRef'
|
||||
root: RepoStrongRef.Main
|
||||
parent: RepoStrongRef.Main
|
||||
}
|
||||
|
||||
export type { ReplyRef }
|
||||
|
||||
const replyRef = /*#__PURE__*/ l.typedObject<ReplyRef>(
|
||||
$nsid,
|
||||
'replyRef',
|
||||
/*#__PURE__*/ l.object({
|
||||
root: /*#__PURE__*/ l.ref<RepoStrongRef.Main>(
|
||||
(() => RepoStrongRef.main) as any,
|
||||
),
|
||||
parent: /*#__PURE__*/ l.ref<RepoStrongRef.Main>(
|
||||
(() => RepoStrongRef.main) as any,
|
||||
),
|
||||
}),
|
||||
)
|
||||
|
||||
export { replyRef }
|
||||
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
||||
*/
|
||||
|
||||
export * from './message.defs.js'
|
||||
export { main as default } from './message.defs.js'
|
||||
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
||||
*/
|
||||
|
||||
export * as facet from './richtext/facet.js'
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
||||
*/
|
||||
|
||||
import { l } from '@atproto/lex'
|
||||
import * as RichtextFacet from './..\\..\\..\\app\\bsky\\richtext\\facet.defs.js'
|
||||
|
||||
const $nsid = 'place.stream.richtext.facet'
|
||||
|
||||
type $nsid = typeof $nsid
|
||||
|
||||
export { $nsid }
|
||||
|
||||
/** Annotation of a sub-string within rich text in a livestream chat message. */
|
||||
type Main = {
|
||||
$type?: 'place.stream.richtext.facet'
|
||||
index: RichtextFacet.ByteSlice
|
||||
features: (
|
||||
| l.$Typed<RichtextFacet.Mention>
|
||||
| l.$Typed<RichtextFacet.Link>
|
||||
| l.Unknown$TypedObject
|
||||
)[]
|
||||
}
|
||||
|
||||
export type { Main }
|
||||
|
||||
/** Annotation of a sub-string within rich text in a livestream chat message. */
|
||||
const main = /*#__PURE__*/ l.typedObject<Main>(
|
||||
$nsid,
|
||||
'main',
|
||||
/*#__PURE__*/ l.object({
|
||||
index: /*#__PURE__*/ l.ref<RichtextFacet.ByteSlice>(
|
||||
(() => RichtextFacet.byteSlice) as any,
|
||||
),
|
||||
features: /*#__PURE__*/ l.array(
|
||||
/*#__PURE__*/ l.typedUnion(
|
||||
[
|
||||
/*#__PURE__*/ l.typedRef<RichtextFacet.Mention>(
|
||||
(() => RichtextFacet.mention) as any,
|
||||
),
|
||||
/*#__PURE__*/ l.typedRef<RichtextFacet.Link>(
|
||||
(() => RichtextFacet.link) as any,
|
||||
),
|
||||
],
|
||||
false,
|
||||
),
|
||||
),
|
||||
}),
|
||||
)
|
||||
|
||||
export { main }
|
||||
|
||||
const $type = $nsid
|
||||
|
||||
type $type = typeof $type
|
||||
|
||||
export { $type }
|
||||
|
||||
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)
|
||||
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
||||
*/
|
||||
|
||||
export * from './facet.defs.js'
|
||||
export { main as default } from './facet.defs.js'
|
||||
Reference in new issue
Block a user