Playlist.ts 592 B

123456789101112131415161718192021222324
  1. // TODO check if all of these properties are always present
  2. export type PlaylistSong = {
  3. _id: string;
  4. mediaSource: string;
  5. title: string;
  6. artists: string[];
  7. duration: number;
  8. skipDuration: number;
  9. thumbnail: string;
  10. verified: boolean;
  11. };
  12. export type PlaylistModel = {
  13. _id: string;
  14. displayName: string;
  15. songs: PlaylistSong[];
  16. createdBy: string;
  17. // TODO check if it's a date or a string, might be wrong
  18. createdAt: Date;
  19. createdFor: string | null;
  20. privacy: "public" | "private";
  21. type: "user" | "user-liked" | "user-disliked" | "genre" | "station";
  22. documentVersion: number;
  23. };