···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { ValidationResult, BlobRef } from '@atproto/lexicon'
55+import { lexicons } from '../../../../lexicons'
66+import { isObj, hasProp } from '../../../../util'
77+import { CID } from 'multiformats/cid'
88+99+/** Annotation of a sub-string within rich text. */
1010+export interface Main {
1111+ index: ByteSlice
1212+ features: (Mention | Link | Tag | { $type: string; [k: string]: unknown })[]
1313+ [k: string]: unknown
1414+}
1515+1616+export function isMain(v: unknown): v is Main {
1717+ return (
1818+ isObj(v) &&
1919+ hasProp(v, '$type') &&
2020+ (v.$type === 'app.bsky.richtext.facet#main' ||
2121+ v.$type === 'app.bsky.richtext.facet')
2222+ )
2323+}
2424+2525+export function validateMain(v: unknown): ValidationResult {
2626+ return lexicons.validate('app.bsky.richtext.facet#main', v)
2727+}
2828+2929+/** Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. */
3030+export interface Mention {
3131+ did: string
3232+ [k: string]: unknown
3333+}
3434+3535+export function isMention(v: unknown): v is Mention {
3636+ return (
3737+ isObj(v) &&
3838+ hasProp(v, '$type') &&
3939+ v.$type === 'app.bsky.richtext.facet#mention'
4040+ )
4141+}
4242+4343+export function validateMention(v: unknown): ValidationResult {
4444+ return lexicons.validate('app.bsky.richtext.facet#mention', v)
4545+}
4646+4747+/** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. */
4848+export interface Link {
4949+ uri: string
5050+ [k: string]: unknown
5151+}
5252+5353+export function isLink(v: unknown): v is Link {
5454+ return (
5555+ isObj(v) &&
5656+ hasProp(v, '$type') &&
5757+ v.$type === 'app.bsky.richtext.facet#link'
5858+ )
5959+}
6060+6161+export function validateLink(v: unknown): ValidationResult {
6262+ return lexicons.validate('app.bsky.richtext.facet#link', v)
6363+}
6464+6565+/** 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'). */
6666+export interface Tag {
6767+ tag: string
6868+ [k: string]: unknown
6969+}
7070+7171+export function isTag(v: unknown): v is Tag {
7272+ return (
7373+ isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.richtext.facet#tag'
7474+ )
7575+}
7676+7777+export function validateTag(v: unknown): ValidationResult {
7878+ return lexicons.validate('app.bsky.richtext.facet#tag', v)
7979+}
8080+8181+/** 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. */
8282+export interface ByteSlice {
8383+ byteStart: number
8484+ byteEnd: number
8585+ [k: string]: unknown
8686+}
8787+8888+export function isByteSlice(v: unknown): v is ByteSlice {
8989+ return (
9090+ isObj(v) &&
9191+ hasProp(v, '$type') &&
9292+ v.$type === 'app.bsky.richtext.facet#byteSlice'
9393+ )
9494+}
9595+9696+export function validateByteSlice(v: unknown): ValidationResult {
9797+ return lexicons.validate('app.bsky.richtext.facet#byteSlice', v)
9898+}
···11+/**
22+ * GENERATED CODE - DO NOT MODIFY
33+ */
44+import { ValidationResult, BlobRef } from '@atproto/lexicon'
55+import { lexicons } from '../../../../lexicons'
66+import { isObj, hasProp } from '../../../../util'
77+import { CID } from 'multiformats/cid'
88+99+export interface Record {
1010+ /** The name of the track */
1111+ trackName: string
1212+ /** The Musicbrainz ID of the track */
1313+ trackMbId?: string
1414+ /** The Musicbrainz recording ID of the track */
1515+ recordingMbId?: string
1616+ /** The length of the track in seconds */
1717+ duration?: number
1818+ /** The name of the artist */
1919+ artistName: string
2020+ /** Array of Musicbrainz artist IDs */
2121+ artistMbIds?: string[]
2222+ /** The name of the release/album */
2323+ releaseName?: string
2424+ /** The Musicbrainz release ID */
2525+ releaseMbId?: string
2626+ /** The ISRC code associated with the recording */
2727+ isrc?: string
2828+ /** The URL associated with this track */
2929+ originUrl?: string
3030+ /** The base domain of the music service. e.g. music.apple.com, tidal.com, spotify.com. */
3131+ musicServiceBaseDomain?: string
3232+ /** A user-agent style string specifying the user agent. e.g. tealtracker/0.0.1b */
3333+ submissionClientAgent?: string
3434+ /** The unix timestamp of when the track was played */
3535+ playedTime?: string
3636+ [k: string]: unknown
3737+}
3838+3939+export function isRecord(v: unknown): v is Record {
4040+ return (
4141+ isObj(v) &&
4242+ hasProp(v, '$type') &&
4343+ (v.$type === 'fm.teal.alpha.play#main' || v.$type === 'fm.teal.alpha.play')
4444+ )
4545+}
4646+4747+export function validateRecord(v: unknown): ValidationResult {
4848+ return lexicons.validate('fm.teal.alpha.play#main', v)
4949+}
···44 "defs": {
55 "main": {
66 "type": "record",
77- "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.",
77+ "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.",
88 "key": "literal:self",
99 "record": {
1010 "type": "object",
1111- "required": ["listeningTo"],
1111+ "required": ["time", "item"],
1212 "properties": {
1313 "time": {
1414 "type": "string",
···4747 }
4848 },
4949 "featuredPlay": {
5050- "type": "record",
5151- "key": "tid",
5252- "record": {
5353- "type": "object",
5454- "required": ["mbid", "type"],
5555- "properties": {
5656- "mbid": {
5757- "type": "string",
5858- "description": "The Musicbrainz ID of the item"
5959- },
6060- "type": {
6161- "type": "string",
6262- "description": "The type of the item. Must be a valid Musicbrainz type, e.g. album, track, recording, etc."
6363- }
5050+ "type": "object",
5151+ "required": ["mbid", "type"],
5252+ "properties": {
5353+ "mbid": {
5454+ "type": "string",
5555+ "description": "The Musicbrainz ID of the item"
5656+ },
5757+ "type": {
5858+ "type": "string",
5959+ "description": "The type of the item. Must be a valid Musicbrainz type, e.g. album, track, recording, etc."
6460 }
6561 }
6662 }