Options
All
  • Public
  • Public/Protected
  • All
Menu

@moosync/moosync-types

Index

Type aliases

AccountDetails

AccountDetails: { bgColor: string; icon: string; id: string; loggedIn: boolean; name: string; packageName: string; username?: string; signinCallback: any; signoutCallback: any }

Type declaration

  • bgColor: string
  • icon: string
  • id: string
  • loggedIn: boolean
  • name: string
  • packageName: string
  • Optional username?: string
  • signinCallback:function
    • signinCallback(): void | Promise<void>
  • signoutCallback:function
    • signoutCallback(): void | Promise<void>

ContextMenuTypes

ContextMenuTypes: "SONGS" | "GENERAL_SONGS" | "PLAYLIST" | "GENERAL_PLAYLIST" | "PLAYLIST_CONTENT" | "QUEUE_ITEM" | "ARTIST" | "ALBUM"

CustomRequestReturnType

CustomRequestReturnType: { data?: Buffer; mimeType?: string; redirectUrl?: string }

Type declaration

  • Optional data?: Buffer
  • Optional mimeType?: string
  • Optional redirectUrl?: string

EntityApiOptions

EntityApiOptions<T>: { inclusive?: boolean; invert?: boolean } & (T extends Artists ? { artist: Partial<Artists> | boolean } : T extends Album ? { album: Partial<Album> | boolean } : T extends Genre ? { genre: Partial<Genre> | boolean } : T extends Playlist ? { playlist: Partial<Playlist> | boolean } : Record<string, never>)

Options for searching entities like Albums, Artists, Playlists or Genre

Type parameters

ExtensionContextMenuHandlerArgs

ExtensionContextMenuHandlerArgs<T>: T extends "SONGS" ? Song[] : T extends "PLAYLIST" ? Playlist : T extends "PLAYLIST_CONTENT" ? Song[] : T extends "QUEUE_ITEM" ? Song : T extends "ARTIST" ? Artists : T extends "ALBUM" ? Album : undefined

Type parameters

ExtensionContextMenuItem

ExtensionContextMenuItem<T>: { children?: ExtensionContextMenuItem<T>[]; disabled?: boolean; label: string; type: T; handler?: any }

Type parameters

Type declaration

ExtensionPreferenceGroup

ExtensionPreferenceGroup: { description?: string; index?: number; key: string; title?: string } & ({ items: Checkbox[]; type: "CheckboxGroup" } | { default: string; inputType?: "text" | "number" | "password" | "url"; type: "EditText" } | { default: string; type: "FilePicker" } | { default: PathGroup[]; type: "DirectoryGroup" } | { items: Buttons[]; type: "ButtonGroup" } | { default: number; type: "ProgressBar" } | { default: string; type: "TextField" })

ExtraExtensionEventData

ExtraExtensionEventData<T>: T extends "requestedPlaylistSongs" ? [playlistID: string, invalidateCache: boolean, nextPageToken: unknown | undefined] : T extends "requestedPlaylists" ? [invalidateCache: boolean] : T extends "oauthCallback" ? [url: string] : T extends "songQueueChanged" ? [songQueue: SongQueue] : T extends "seeked" ? [newTime: number] : T extends "volumeChanged" ? [newVolume: number] : T extends "playerStateChanged" ? [newState: PlayerState] : T extends "songChanged" ? [song: Song] : T extends "preferenceChanged" ? [preference: { key: string; value: unknown }] : T extends "playbackDetailsRequested" ? [song: Song] : T extends "customRequest" ? [url: string] : T extends "requestedSongFromURL" ? [url: string, invalidateCache: boolean] : T extends "requestedPlaylistFromURL" ? [url: string, invalidateCache: boolean] : T extends "requestedSearchResult" ? [term: string] : T extends "requestedLyrics" ? [song: Song] : T extends "requestedArtistSongs" ? [artist: Artists, nextPageToken: unknown | undefined] : T extends "requestedAlbumSongs" ? [album: Album, nextPageToken: unknown | undefined] : T extends "songAdded" | "songRemoved" ? [songs: Song[]] : T extends "playlistAdded" | "playlistRemoved" ? [playlists: Playlist[]] : T extends "requestedSongFromId" ? [id: string] : never[]

Type parameters

ExtraExtensionEventReturnType

ExtraExtensionEventReturnType<T>: (T extends "requestedPlaylists" ? PlaylistReturnType : T extends "requestedPlaylistSongs" | "requestedArtistSongs" | "requestedAlbumSongs" ? SongsWithPageTokenReturnType | ForwardRequestReturnType<T> : T extends "playbackDetailsRequested" ? PlaybackDetailsReturnType | ForwardRequestReturnType<T> : T extends "customRequest" ? CustomRequestReturnType : T extends "requestedSongFromURL" | "requestedSongFromId" ? SongReturnType | ForwardRequestReturnType<T> : T extends "requestedPlaylistFromURL" ? PlaylistAndSongsReturnType | ForwardRequestReturnType<T> : T extends "requestedSearchResult" ? SearchReturnType | ForwardRequestReturnType<T> : T extends "requestedRecommendations" ? RecommendationsReturnType | ForwardRequestReturnType<T> : T extends "requestedLyrics" ? string | ForwardRequestReturnType<T> : void) | void

Type parameters

ExtraExtensionEventTypes

ExtraExtensionEventTypes: "requestedPlaylists" | "requestedPlaylistSongs" | "oauthCallback" | "songQueueChanged" | "seeked" | "volumeChanged" | "playerStateChanged" | "songChanged" | "preferenceChanged" | "playbackDetailsRequested" | "customRequest" | "requestedSongFromURL" | "requestedPlaylistFromURL" | "requestedSearchResult" | "requestedRecommendations" | "requestedLyrics" | "requestedArtistSongs" | "requestedAlbumSongs" | "songAdded" | "songRemoved" | "playlistAdded" | "playlistRemoved" | "requestedSongFromId"

ForwardRequestReturnType

ForwardRequestReturnType<T>: { forwardTo: "youtube" | "spotify" | string; transformedData?: ExtraExtensionEventData<T> }

Type parameters

Type declaration

LoginModalOptions

LoginModalOptions: { providerColor: string; providerName: string; text?: string; url?: string } & ({ manualClick: true; oauthPath: string } | { manualClick?: false; oauthPath?: string })

PlaybackDetailsReturnType

PlaybackDetailsReturnType: { duration: number; url: string }

Type declaration

  • duration: number
  • url: string

PlayerState

PlayerState: "PLAYING" | "PAUSED" | "STOPPED" | "LOADING"

PlayerTypes

PlayerTypes: "LOCAL" | "YOUTUBE" | "SPOTIFY" | "URL" | "DASH" | "HLS"

PlaylistAndSongsReturnType

PlaylistAndSongsReturnType: { playlist: Playlist; songs: Song[] }

Type declaration

PlaylistReturnType

PlaylistReturnType: { playlists: Playlist[] }

Type declaration

RecommendationsReturnType

RecommendationsReturnType: { songs: Song[] }

Type declaration

SearchReturnType

SearchReturnType: { albums: Album[]; artists: Artists[]; playlists: Playlist[]; songs: Song[] }

Type declaration

SongReturnType

SongReturnType: { song: Song }

Type declaration

SongSortOptions

SongSortOptions: { asc: boolean; type: keyof Song }

Sort by key in Song. If asc is true then results will be sorted in ascending otherwise descending

Type declaration

  • asc: boolean
  • type: keyof Song

SongsReturnType

SongsReturnType: { songs: Song[] }

Type declaration

SongsWithPageTokenReturnType

SongsWithPageTokenReturnType: { nextPageToken?: unknown; songs: Song[] }

Type declaration

  • Optional nextPageToken?: unknown
  • songs: Song[]

Generated using TypeDoc