interface Playlist

Returned by the playlist routes, and by the search, users and dumps routes that list playlists. The playlist_created and playlist_updated WebSocket messages carry it too.

Properties

id: string
userId: string
title: string
slug: string

Names the playlist in its page's path, playlistPath (shared/paths.ts) building it with ownerUsername. Made from the title on creation, it changes only when edited, and is unique among its owner's playlists.

optional
description: string

It is written in Markdown.

isPublic: boolean

Only its owner sees a private playlist. Moderators don't, though they may still edit or delete it.

optional
updatedAt: Date

playlistImageUrl puts it on the cover's URL, so a new cover isn't hidden by the cached old one.

optional
imageMime: string

It is undefined when the playlist has no cover.

optional
dumpCount: number

It counts the dumps the viewer may see in it, as its page lists them. It is undefined when the query didn't count them.

optional
lastDumpAt: Date

When the latest of the dumps the viewer may see was added to it, which playlistActivity reads. It is undefined when it holds none, or when the query didn't count them.

The owner's current name, which the playlist's path starts with.

optional
categoryIds: string[]

The ids of the playlist categories it is filed under. The services fill them in on every playlist they return.

Usage

import { type Playlist } from "shared/playlist.ts";