Files
Lazuli/src/app.d.ts

81 lines
1.6 KiB
TypeScript
Raw Normal View History

2024-01-21 20:28:37 -05:00
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
2024-01-25 19:50:26 -05:00
interface Locals {
user: User
}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
2024-01-25 19:50:26 -05:00
namespace Jellyfin {
interface AuthData {
User: {
Name: string
Id: string
}
AccessToken: string
}
}
2024-01-25 19:50:26 -05:00
interface User {
id: string
username: string
password?: string
}
2024-01-29 12:29:32 -05:00
type ServiceType = 'jellyfin' | 'youtube-music'
interface MediaItem {
connectionId: string
serviceType: string
id: string
name: string
duration: number
thumbnail: string
}
interface Song extends MediaItem {
artists: {
id: string
name: string
}[]
album?: {
id: string
name: string
artists: {
id: string
name: string
}[]
}
audio: string
video?: string
releaseDate: string
}
interface Album extends MediaItem {
artists: {
id: string
name: string
}[]
songs: Song[]
releaseDate: string
}
interface Playlist extends MediaItem {
songs: Song[]
description?: string
}
interface Artist {
id: string
name: string
// Add more here in the future
}
2024-01-21 20:28:37 -05:00
}
export {}