Music streaming on ATProto!

refactor(lexicon): simplify tags

ovyerus.com 8ec13e59 062a9b5d

verified
Changed files
+10 -44
packages
+1 -1
packages/lexicons/defs/sh/comet/v0/actor/profile.json
···
"descriptionFacets": {
"type": "ref",
"description": "Annotations of the user's description.",
-
"ref": "sh.comet.v0.richtext.facets"
},
"avatar": {
"type": "blob",
···
"descriptionFacets": {
"type": "ref",
"description": "Annotations of the user's description.",
+
"ref": "app.bsky.richtext.facets"
},
"avatar": {
"type": "blob",
-15
packages/lexicons/defs/sh/comet/v0/feed/defs.json
···
"lexicon": 1,
"id": "sh.comet.v0.feed.defs",
"defs": {
-
"tag": {
-
"type": "string",
-
"knownValues": [
-
"sh.comet.v0.feed.tag#alternative",
-
"sh.comet.v0.feed.tag#ambient",
-
"sh.comet.v0.feed.tag#electronic",
-
"sh.comet.v0.feed.tag#experimental",
-
"sh.comet.v0.feed.tag#hiphop",
-
"sh.comet.v0.feed.tag#metal",
-
"sh.comet.v0.feed.tag#rock",
-
"sh.comet.v0.feed.tag#podcast",
-
"sh.comet.v0.feed.tag#pop",
-
"sh.comet.v0.feed.tag#punk"
-
]
-
},
"link": {
"type": "object",
"description": "Link for the track. Usually to acquire it in some way, e.g. via free download or purchase. | TODO: multiple links?",
···
"lexicon": 1,
"id": "sh.comet.v0.feed.defs",
"defs": {
"link": {
"type": "object",
"description": "Link for the track. Usually to acquire it in some way, e.g. via free download or purchase. | TODO: multiple links?",
+3 -4
packages/lexicons/defs/sh/comet/v0/feed/playlist.json
···
},
"tags": {
"type": "array",
-
"description": "Tags/genres for the playlist. First item is used as the \"primary\" tag. | TODO: reconsider maxLength value",
-
"minLength": 1,
-
"maxLength": 5,
-
"items": { "type": "ref", "ref": "sh.comet.v0.feed.defs#tag" }
},
"link": {
"type": "ref",
···
},
"tags": {
"type": "array",
+
"description": "Hashtags for the playlist, usually for genres.",
+
"maxLength": 8,
+
"items": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }
},
"link": {
"type": "ref",
-17
packages/lexicons/defs/sh/comet/v0/feed/tag.json
···
-
{
-
"lexicon": 1,
-
"id": "sh.comet.v0.feed.tag",
-
"description": "TODO: maybe instead of being like this, make tag a proper record?",
-
"defs": {
-
"alternative": { "type": "token" },
-
"ambient": { "type": "token" },
-
"electronic": { "type": "token" },
-
"experimental": { "type": "token" },
-
"hiphop": { "type": "token" },
-
"metal": { "type": "token" },
-
"rock": { "type": "token" },
-
"podcast": { "type": "token" },
-
"pop": { "type": "token" },
-
"punk": { "type": "token" }
-
}
-
}
···
+4 -5
packages/lexicons/defs/sh/comet/v0/feed/track.json
···
"descriptionFacets": {
"type": "ref",
"description": "Annotations of the track's description.",
-
"ref": "sh.comet.v0.richtext.facets"
},
"tags": {
"type": "array",
-
"description": "Tags/genres for the track. First item is used as the \"primary\" tag. | TODO: reconsider maxLength value",
-
"minLength": 1,
-
"maxLength": 5,
-
"items": { "type": "ref", "ref": "sh.comet.v0.feed.defs#tag" }
},
"link": {
"type": "ref",
···
"descriptionFacets": {
"type": "ref",
"description": "Annotations of the track's description.",
+
"ref": "app.bsky.richtext.facets"
},
"tags": {
"type": "array",
+
"description": "Hashtags for the track, usually for genres.",
+
"maxLength": 8,
+
"items": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }
},
"link": {
"type": "ref",
+2 -2
packages/lexicons/defs/sh/comet/v0/richtext/facets.json packages/lexicons/defs/app.bsky.richtext.facet.json
···
{
"lexicon": 1,
-
"id": "sh.comet.v0.richtext.facets",
"defs": {
"main": {
"type": "object",
···
"description": "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').",
"required": ["tag"],
"properties": {
-
"tag": { "type": "ref", "ref": "sh.comet.v0.feed.defs#tag" }
}
},
"byteSlice": {
···
{
"lexicon": 1,
+
"id": "app.bsky.richtext.facet",
"defs": {
"main": {
"type": "object",
···
"description": "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').",
"required": ["tag"],
"properties": {
+
"tag": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }
}
},
"byteSlice": {