···1+/**
2+ * GENERATED CODE - DO NOT MODIFY
3+ */
4+import { ValidationResult, BlobRef } from '@atproto/lexicon'
5+import { lexicons } from '../../../../lexicons'
6+import { isObj, hasProp } from '../../../../util'
7+import { CID } from 'multiformats/cid'
8+9+/** Annotation of a sub-string within rich text. */
10+export interface Main {
11+ index: ByteSlice
12+ features: (Mention | Link | Tag | { $type: string; [k: string]: unknown })[]
13+ [k: string]: unknown
14+}
15+16+export function isMain(v: unknown): v is Main {
17+ return (
18+ isObj(v) &&
19+ hasProp(v, '$type') &&
20+ (v.$type === 'app.bsky.richtext.facet#main' ||
21+ v.$type === 'app.bsky.richtext.facet')
22+ )
23+}
24+25+export function validateMain(v: unknown): ValidationResult {
26+ return lexicons.validate('app.bsky.richtext.facet#main', v)
27+}
28+29+/** Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. */
30+export interface Mention {
31+ did: string
32+ [k: string]: unknown
33+}
34+35+export function isMention(v: unknown): v is Mention {
36+ return (
37+ isObj(v) &&
38+ hasProp(v, '$type') &&
39+ v.$type === 'app.bsky.richtext.facet#mention'
40+ )
41+}
42+43+export function validateMention(v: unknown): ValidationResult {
44+ return lexicons.validate('app.bsky.richtext.facet#mention', v)
45+}
46+47+/** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. */
48+export interface Link {
49+ uri: string
50+ [k: string]: unknown
51+}
52+53+export function isLink(v: unknown): v is Link {
54+ return (
55+ isObj(v) &&
56+ hasProp(v, '$type') &&
57+ v.$type === 'app.bsky.richtext.facet#link'
58+ )
59+}
60+61+export function validateLink(v: unknown): ValidationResult {
62+ return lexicons.validate('app.bsky.richtext.facet#link', v)
63+}
64+65+/** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). */
66+export interface Tag {
67+ tag: string
68+ [k: string]: unknown
69+}
70+71+export function isTag(v: unknown): v is Tag {
72+ return (
73+ isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.richtext.facet#tag'
74+ )
75+}
76+77+export function validateTag(v: unknown): ValidationResult {
78+ return lexicons.validate('app.bsky.richtext.facet#tag', v)
79+}
80+81+/** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. */
82+export interface ByteSlice {
83+ byteStart: number
84+ byteEnd: number
85+ [k: string]: unknown
86+}
87+88+export function isByteSlice(v: unknown): v is ByteSlice {
89+ return (
90+ isObj(v) &&
91+ hasProp(v, '$type') &&
92+ v.$type === 'app.bsky.richtext.facet#byteSlice'
93+ )
94+}
95+96+export function validateByteSlice(v: unknown): ValidationResult {
97+ return lexicons.validate('app.bsky.richtext.facet#byteSlice', v)
98+}
···1+/**
2+ * GENERATED CODE - DO NOT MODIFY
3+ */
4+import { ValidationResult, BlobRef } from '@atproto/lexicon'
5+import { lexicons } from '../../../../lexicons'
6+import { isObj, hasProp } from '../../../../util'
7+import { CID } from 'multiformats/cid'
8+9+export interface Record {
10+ /** The name of the track */
11+ trackName: string
12+ /** The Musicbrainz ID of the track */
13+ trackMbId?: string
14+ /** The Musicbrainz recording ID of the track */
15+ recordingMbId?: string
16+ /** The length of the track in seconds */
17+ duration?: number
18+ /** The name of the artist */
19+ artistName: string
20+ /** Array of Musicbrainz artist IDs */
21+ artistMbIds?: string[]
22+ /** The name of the release/album */
23+ releaseName?: string
24+ /** The Musicbrainz release ID */
25+ releaseMbId?: string
26+ /** The ISRC code associated with the recording */
27+ isrc?: string
28+ /** The URL associated with this track */
29+ originUrl?: string
30+ /** The base domain of the music service. e.g. music.apple.com, tidal.com, spotify.com. */
31+ musicServiceBaseDomain?: string
32+ /** A user-agent style string specifying the user agent. e.g. tealtracker/0.0.1b */
33+ submissionClientAgent?: string
34+ /** The unix timestamp of when the track was played */
35+ playedTime?: string
36+ [k: string]: unknown
37+}
38+39+export function isRecord(v: unknown): v is Record {
40+ return (
41+ isObj(v) &&
42+ hasProp(v, '$type') &&
43+ (v.$type === 'fm.teal.alpha.play#main' || v.$type === 'fm.teal.alpha.play')
44+ )
45+}
46+47+export function validateRecord(v: unknown): ValidationResult {
48+ return lexicons.validate('fm.teal.alpha.play#main', v)
49+}
···4 "defs": {
5 "main": {
6 "type": "record",
7- "description": "This lexicon is in a not officially released state. It is subject to change. | A declaration of the status of the actor. Only one can be shown at a time. If there are multiple, pick the latest record.",
8 "key": "literal:self",
9 "record": {
10 "type": "object",
11- "required": ["listeningTo"],
12 "properties": {
13 "time": {
14 "type": "string",
···4 "defs": {
5 "main": {
6 "type": "record",
7+ "description": "This lexicon is in a not officially released state. It is subject to change. | A declaration of the status of the actor. Only one can be shown at a time. If there are multiple, the latest record should be picked and earlier records should be deleted or tombstoned.",
8 "key": "literal:self",
9 "record": {
10 "type": "object",
11+ "required": ["time", "item"],
12 "properties": {
13 "time": {
14 "type": "string",
···47 }
48 },
49 "featuredPlay": {
50- "type": "record",
51- "key": "tid",
52- "record": {
53- "type": "object",
54- "required": ["mbid", "type"],
55- "properties": {
56- "mbid": {
57- "type": "string",
58- "description": "The Musicbrainz ID of the item"
59- },
60- "type": {
61- "type": "string",
62- "description": "The type of the item. Must be a valid Musicbrainz type, e.g. album, track, recording, etc."
63- }
64 }
65 }
66 }
···47 }
48 },
49 "featuredPlay": {
50+ "type": "object",
51+ "required": ["mbid", "type"],
52+ "properties": {
53+ "mbid": {
54+ "type": "string",
55+ "description": "The Musicbrainz ID of the item"
56+ },
57+ "type": {
58+ "type": "string",
59+ "description": "The type of the item. Must be a valid Musicbrainz type, e.g. album, track, recording, etc."
000060 }
61 }
62 }