From 3a354bd152adef6fae4a85a9008b5b45cf77308f Mon Sep 17 00:00:00 2001 From: Docs update Date: Wed, 30 Aug 2023 00:33:08 +0000 Subject: [PATCH] sync from Moosync/extension-api-types --- docs/interfaces/Album.html | 2 +- docs/interfaces/Artists.html | 2 +- docs/interfaces/Buttons.html | 2 +- docs/interfaces/Checkbox.html | 2 +- docs/interfaces/ExtensionData.html | 2 +- docs/interfaces/ExtensionFactory.html | 4 +- docs/interfaces/Genre.html | 2 +- docs/interfaces/MoosyncExtensionTemplate.html | 4 +- docs/interfaces/PathGroup.html | 2 +- docs/interfaces/Playlist.html | 2 +- docs/interfaces/SearchableSong.html | 2 +- docs/interfaces/Song.html | 2 +- docs/interfaces/SongAPIOptions.html | 16 +-- docs/interfaces/SongQueue.html | 6 +- docs/interfaces/extensionAPI.html | 108 +++++++++--------- docs/interfaces/playerControls.html | 10 +- docs/interfaces/utils.html | 4 +- docs/modules.html | 6 +- 18 files changed, 89 insertions(+), 89 deletions(-) diff --git a/docs/interfaces/Album.html b/docs/interfaces/Album.html index b2e2599..126b2c3 100644 --- a/docs/interfaces/Album.html +++ b/docs/interfaces/Album.html @@ -1 +1 @@ -Album | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Album

Index

Properties

Optional album_artist

album_artist?: string

Optional album_coverPath_high

album_coverPath_high?: string

Optional album_coverPath_low

album_coverPath_low?: string

Optional album_extra_info

album_extra_info?: { extensions?: Record<string, Record<string, string>>; spotify?: { album_id?: string }; youtube?: { album_id?: string } }

Type declaration

  • Optional extensions?: Record<string, Record<string, string>>
  • Optional spotify?: { album_id?: string }
    • Optional album_id?: string
  • Optional youtube?: { album_id?: string }
    • Optional album_id?: string

Optional album_id

album_id?: string

Optional album_name

album_name?: string

Optional album_song_count

album_song_count?: number

Optional year

year?: number

Generated using TypeDoc

\ No newline at end of file +Album | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Album

Index

Properties

Optional album_artist

album_artist?: string

Optional album_coverPath_high

album_coverPath_high?: string

Optional album_coverPath_low

album_coverPath_low?: string

Optional album_extra_info

album_extra_info?: { extensions?: Record<string, Record<string, string>>; spotify?: { album_id?: string }; youtube?: { album_id?: string } }

Type declaration

  • Optional extensions?: Record<string, Record<string, string>>
  • Optional spotify?: { album_id?: string }
    • Optional album_id?: string
  • Optional youtube?: { album_id?: string }
    • Optional album_id?: string

Optional album_id

album_id?: string

Optional album_name

album_name?: string

Optional album_song_count

album_song_count?: number

Optional year

year?: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Artists.html b/docs/interfaces/Artists.html index 2845b98..dae544f 100644 --- a/docs/interfaces/Artists.html +++ b/docs/interfaces/Artists.html @@ -1 +1 @@ -Artists | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Artists

Index

Properties

Optional artist_coverPath

artist_coverPath?: string

Optional artist_extra_info

artist_extra_info?: { extensions?: Record<string, Record<string, string>>; spotify?: { artist_id?: string }; youtube?: { channel_id?: string } }

Type declaration

  • Optional extensions?: Record<string, Record<string, string>>
  • Optional spotify?: { artist_id?: string }
    • Optional artist_id?: string
  • Optional youtube?: { channel_id?: string }
    • Optional channel_id?: string

artist_id

artist_id: string

Optional artist_mbid

artist_mbid?: string

Optional artist_name

artist_name?: string

Optional artist_song_count

artist_song_count?: number

Generated using TypeDoc

\ No newline at end of file +Artists | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Artists

Index

Properties

Optional artist_coverPath

artist_coverPath?: string

Optional artist_extra_info

artist_extra_info?: { extensions?: Record<string, Record<string, string>>; spotify?: { artist_id?: string }; youtube?: { channel_id?: string } }

Type declaration

  • Optional extensions?: Record<string, Record<string, string>>
  • Optional spotify?: { artist_id?: string }
    • Optional artist_id?: string
  • Optional youtube?: { channel_id?: string }
    • Optional channel_id?: string

artist_id

artist_id: string

Optional artist_mbid

artist_mbid?: string

Optional artist_name

artist_name?: string

Optional artist_song_count

artist_song_count?: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Buttons.html b/docs/interfaces/Buttons.html index d38fde4..72a9869 100644 --- a/docs/interfaces/Buttons.html +++ b/docs/interfaces/Buttons.html @@ -1 +1 @@ -Buttons | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Buttons

Index

Properties

key

key: string

lastClicked

lastClicked: number

title

title: string

Generated using TypeDoc

\ No newline at end of file +Buttons | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Buttons

Index

Properties

key

key: string

lastClicked

lastClicked: number

title

title: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Checkbox.html b/docs/interfaces/Checkbox.html index 921b5d9..5f5dbea 100644 --- a/docs/interfaces/Checkbox.html +++ b/docs/interfaces/Checkbox.html @@ -1 +1 @@ -Checkbox | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Checkbox

Index

Properties

Properties

enabled

enabled: boolean

key

key: string

title

title: string

Generated using TypeDoc

\ No newline at end of file +Checkbox | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Checkbox

Index

Properties

Properties

enabled

enabled: boolean

key

key: string

title

title: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ExtensionData.html b/docs/interfaces/ExtensionData.html index 9f932c6..d424a57 100644 --- a/docs/interfaces/ExtensionData.html +++ b/docs/interfaces/ExtensionData.html @@ -1 +1 @@ -ExtensionData | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ExtensionData

Index

Properties

extensionDescriptors

extensionDescriptors: ExtensionFactory[]

Generated using TypeDoc

\ No newline at end of file +ExtensionData | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ExtensionData

Index

Properties

extensionDescriptors

extensionDescriptors: ExtensionFactory[]

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ExtensionFactory.html b/docs/interfaces/ExtensionFactory.html index 61a6d6f..c6475c3 100644 --- a/docs/interfaces/ExtensionFactory.html +++ b/docs/interfaces/ExtensionFactory.html @@ -1,3 +1,3 @@ -ExtensionFactory | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ExtensionFactory

Hierarchy

  • ExtensionFactory

Index

Methods

create

Optional registerPreferences

Optional registerUserPreferences

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Genre.html b/docs/interfaces/Genre.html index 4dadcdd..980ed21 100644 --- a/docs/interfaces/Genre.html +++ b/docs/interfaces/Genre.html @@ -1 +1 @@ -Genre | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Genre

Index

Properties

genre_id

genre_id: string

genre_name

genre_name: string

genre_song_count

genre_song_count: number

Generated using TypeDoc

\ No newline at end of file +Genre | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Genre

Index

Properties

genre_id

genre_id: string

genre_name

genre_name: string

genre_song_count

genre_song_count: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/MoosyncExtensionTemplate.html b/docs/interfaces/MoosyncExtensionTemplate.html index 63f2f41..6111d62 100644 --- a/docs/interfaces/MoosyncExtensionTemplate.html +++ b/docs/interfaces/MoosyncExtensionTemplate.html @@ -1,7 +1,7 @@ MoosyncExtensionTemplate | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MoosyncExtensionTemplate

Interface defining Moosync extension lifecycle hooks

-

Hierarchy

  • MoosyncExtensionTemplate

Index

Methods

Optional onStarted

  • onStarted(): Promise<void>

Hierarchy

  • MoosyncExtensionTemplate

Index

Methods

Optional onStarted

  • onStarted(): Promise<void>
  • Method fired when the extension is started

    -

    Returns Promise<void>

Optional onStopped

  • onStopped(): Promise<void>

Optional onStopped

  • onStopped(): Promise<void>
  • Method fired when the extension is stopped

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PathGroup.html b/docs/interfaces/PathGroup.html index 1fdd195..4082538 100644 --- a/docs/interfaces/PathGroup.html +++ b/docs/interfaces/PathGroup.html @@ -1 +1 @@ -PathGroup | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PathGroup

Index

Properties

Properties

enabled

enabled: boolean

path

path: string

Generated using TypeDoc

\ No newline at end of file +PathGroup | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PathGroup

Index

Properties

Properties

enabled

enabled: boolean

path

path: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Playlist.html b/docs/interfaces/Playlist.html index 4577cd6..33e5679 100644 --- a/docs/interfaces/Playlist.html +++ b/docs/interfaces/Playlist.html @@ -1 +1 @@ -Playlist | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Playlist

Index

Properties

Optional extension

extension?: string

Optional icon

icon?: string

Optional playlist_coverPath

playlist_coverPath?: string

Optional playlist_desc

playlist_desc?: string

playlist_id

playlist_id: string

playlist_name

playlist_name: string

Optional playlist_path

playlist_path?: string

Optional playlist_song_count

playlist_song_count?: number

Generated using TypeDoc

\ No newline at end of file +Playlist | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Playlist

Index

Properties

Optional extension

extension?: string

Optional icon

icon?: string

Optional playlist_coverPath

playlist_coverPath?: string

Optional playlist_desc

playlist_desc?: string

playlist_id

playlist_id: string

playlist_name

playlist_name: string

Optional playlist_path

playlist_path?: string

Optional playlist_song_count

playlist_song_count?: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/SearchableSong.html b/docs/interfaces/SearchableSong.html index 4938bfc..308629c 100644 --- a/docs/interfaces/SearchableSong.html +++ b/docs/interfaces/SearchableSong.html @@ -1 +1 @@ -SearchableSong | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SearchableSong

Hierarchy

  • SearchableSong

Index

Properties

Optional _id

_id?: string

Optional deviceno

deviceno?: string

Optional extension

extension?: string | boolean

Optional hash

hash?: string

Optional inode

inode?: string

Optional path

path?: string

Optional playbackUrl

playbackUrl?: string

Optional showInLibrary

showInLibrary?: boolean

Optional size

size?: number

Optional title

title?: string

Optional type

Optional url

url?: string

Generated using TypeDoc

\ No newline at end of file +SearchableSong | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SearchableSong

Hierarchy

  • SearchableSong

Index

Properties

Optional _id

_id?: string

Optional deviceno

deviceno?: string

Optional extension

extension?: string | boolean

Optional hash

hash?: string

Optional inode

inode?: string

Optional path

path?: string

Optional playbackUrl

playbackUrl?: string

Optional showInLibrary

showInLibrary?: boolean

Optional size

size?: number

Optional title

title?: string

Optional type

Optional url

url?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Song.html b/docs/interfaces/Song.html index e4de8aa..8e402a3 100644 --- a/docs/interfaces/Song.html +++ b/docs/interfaces/Song.html @@ -1 +1 @@ -Song | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Song

Index

Properties

_id

_id: string

Optional album

album?: Album

Optional artists

artists?: Artists[]

Optional bitrate

bitrate?: number

Optional codec

codec?: string

Optional container

container?: string

Optional date

date?: string

date_added

date_added: number

Optional deviceno

deviceno?: string

duration

duration: number

Optional genre

genre?: string[]

Optional hash

hash?: string

Optional icon

icon?: string

Optional inode

inode?: string

Optional lyrics

lyrics?: string

Optional path

path?: string

Optional playCount

playCount?: number

Optional playbackUrl

playbackUrl?: string

Optional providerExtension

providerExtension?: string

Optional releaseType

releaseType?: string[]

Optional sampleRate

sampleRate?: number

Optional showInLibrary

showInLibrary?: boolean

Optional size

size?: number

Optional song_coverPath_high

song_coverPath_high?: string

Optional song_coverPath_low

song_coverPath_low?: string

title

title: string

Optional track_no

track_no?: number

type

Optional url

url?: string

Optional year

year?: string | number

Generated using TypeDoc

\ No newline at end of file +Song | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Song

Index

Properties

_id

_id: string

Optional album

album?: Album

Optional artists

artists?: Artists[]

Optional bitrate

bitrate?: number

Optional codec

codec?: string

Optional container

container?: string

Optional date

date?: string

date_added

date_added: number

Optional deviceno

deviceno?: string

duration

duration: number

Optional genre

genre?: string[]

Optional hash

hash?: string

Optional icon

icon?: string

Optional inode

inode?: string

Optional lyrics

lyrics?: string

Optional path

path?: string

Optional playCount

playCount?: number

Optional playbackUrl

playbackUrl?: string

Optional providerExtension

providerExtension?: string

Optional releaseType

releaseType?: string[]

Optional sampleRate

sampleRate?: number

Optional showInLibrary

showInLibrary?: boolean

Optional size

size?: number

Optional song_coverPath_high

song_coverPath_high?: string

Optional song_coverPath_low

song_coverPath_low?: string

title

title: string

Optional track_no

track_no?: number

type

Optional url

url?: string

Optional year

year?: string | number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/SongAPIOptions.html b/docs/interfaces/SongAPIOptions.html index 7d9a2e4..81560d3 100644 --- a/docs/interfaces/SongAPIOptions.html +++ b/docs/interfaces/SongAPIOptions.html @@ -3,13 +3,13 @@ To search for all tracks with a specific term, surround the term with %. Eg. if the term is 'aaa', to get all songs containing 'aaa' in the title, put the term as '%aaa%' in 'song.title'.

-

Hierarchy

Index

Properties

Optional album

album?: Partial<Album>
+

Hierarchy

  • SongAPIOptions

Index

Properties

Optional album

album?: Partial<Album>

To search tracks by properties in album, specify this property.

-

Optional artist

artist?: Partial<Artists>
+

Optional artist

artist?: Partial<Artists>

To search tracks by properties in artists, specify this property.

-

Optional genre

genre?: Partial<Genre>
+

Optional genre

genre?: Partial<Genre>

To search tracks by properties in genre, specify this property.

-

Optional inclusive

inclusive?: boolean
+

Optional inclusive

inclusive?: boolean

If false, then the exact match of all options will be provided. If true, then even if a track matches one of the options, it will be returned. In terms of SQL, true will add 'AND' between where queries and false will add 'OR'.

@@ -18,14 +18,14 @@ AND album_name as 'bbb' will be returned

If inclusive is false then songs having title as 'aaa' OR album_name as 'bbb' will be returned

False by default

-

Optional invert

invert?: boolean
+

Optional invert

invert?: boolean

If true, then inverts the query. It will return all records which don't match the search criteria If false, then it will return all records which match the search criteria

false by default

-

Optional playlist

playlist?: Partial<Playlist>
+

Optional playlist

playlist?: Partial<Playlist>

To search tracks by properties in playlist, specify this property.

-

Optional song

+

Optional song

To search tracks by properties in song, specify this property.

-

Optional sortBy

+

Optional sortBy

To sort the results, specify this property

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/SongQueue.html b/docs/interfaces/SongQueue.html index 60bb095..594108e 100644 --- a/docs/interfaces/SongQueue.html +++ b/docs/interfaces/SongQueue.html @@ -1,10 +1,10 @@ SongQueue | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface representing Queue of tracks

-

Hierarchy

  • SongQueue

Index

Properties

Properties

data

data: {}
+

Hierarchy

  • SongQueue

Index

Properties

Properties

data

data: {}

Data is a dictionary with unique songs. Song here won't be repeated

-

Type declaration

index

index: number
+

Type declaration

index

index: number

Index of current playing song from {@link SongQueue#order}

-

order

order: { id: string; songID: string }[]
+

order

order: { id: string; songID: string }[]

Order is an array with songID corresponding to {@link SongQueue#data} Items may be repeated

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/extensionAPI.html b/docs/interfaces/extensionAPI.html index 3a34f40..932041a 100644 --- a/docs/interfaces/extensionAPI.html +++ b/docs/interfaces/extensionAPI.html @@ -1,94 +1,94 @@ -extensionAPI | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • extensionAPI

Index

Properties

player

+extensionAPI | @moosync/moosync-types
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • extensionAPI

Index

Properties

player

Object containing controls for player

-

utils

utils: utils

Methods

addPlaylist

  • addPlaylist(playlist: Omit<Playlist, "playlist_id">): Promise<string>

utils

utils: utils

Methods

addPlaylist

  • addPlaylist(playlist: Omit<Playlist, "playlist_id">): Promise<string>
  • Add playlist to library

    Parameters

    • playlist: Omit<Playlist, "playlist_id">

      details of playlist which is to be added to library

    Returns Promise<string>

    ID of playlist which has been added

    -

addSongs

  • addSongs(...songs: Song[]): Promise<Song[]>

addSongs

  • addSongs(...songs: Song[]): Promise<Song[]>
  • Add songs to library

    Parameters

    • Rest ...songs: Song[]

      1 or more songs that are to be added to library

    Returns Promise<Song[]>

    array of booleans with same index as song. True means song has been added successfully

    -

addSongsToPlaylist

  • addSongsToPlaylist(playlistID: string, ...songs: Song[]): Promise<void>

addSongsToPlaylist

  • addSongsToPlaylist(playlistID: string, ...songs: Song[]): Promise<void>
  • Add songs to playlist in library. The song must also exist in the library

    Parameters

    • playlistID: string

      ID of playlist in which songs are to be added

    • Rest ...songs: Song[]

      Songs which are to be added in the playlist

      -

    Returns Promise<void>

addUserPreference

changeAccountAuthStatus

  • changeAccountAuthStatus(id: string, loggedIn: boolean, username?: string): Promise<void>

Returns Promise<void>

addUserPreference

changeAccountAuthStatus

  • changeAccountAuthStatus(id: string, loggedIn: boolean, username?: string): Promise<void>
  • Change login status and signed in user's account name.

    Parameters

    • id: string

      accountId to change details of. Returned from registerAccount

    • loggedIn: boolean

      true if user is logged in otherwise false

      -
    • Optional username: string

    Returns Promise<void>

closeLoginModal

  • closeLoginModal(): Promise<void>

Returns Promise<void>

closeLoginModal

  • closeLoginModal(): Promise<void>
  • Close login modal if its open

    -

    Returns Promise<void>

getContextMenuItems

getContextMenuItems

getCurrentSong

  • getCurrentSong(): Promise<Song>

getCurrentSong

  • getCurrentSong(): Promise<Song>
  • Get the current playing track. Undefined if no track is playing

    -

    Returns Promise<Song>

getEntity

getEntity

getInstalledExtensions

  • getInstalledExtensions(): string[]

Returns Promise<T[]>

getInstalledExtensions

  • getInstalledExtensions(): string[]
  • Returns a list of package names of all installed extensions

    -

    Returns string[]

getPlayerState

getPlayerState

  • Get state of music player. Undefined is player is broken and audio can't be loaded

    -

    Returns Promise<PlayerState>

getPreferences

  • getPreferences<T>(key?: string, defaultValue?: unknown): Promise<T>

getPreferences

  • getPreferences<T>(key?: string, defaultValue?: unknown): Promise<T>
  • Fetch preferences by key. If no key is provided, all preferences co-relating to current extension will be fetched.

    Type parameters

    • T

    Parameters

    • Optional key: string

      key of preference to fetch. keys within complex objects can be separated by .

    • Optional defaultValue: unknown

      If the provided key is not found, then default value will be returned.

      -

    Returns Promise<T>

getQueue

Returns Promise<T>

getQueue

getSecure

  • getSecure<T>(key: string, defaultValue?: unknown): Promise<T>

getSecure

  • getSecure<T>(key: string, defaultValue?: unknown): Promise<T>
  • Get decrypted value of an encrypted preference

    Type parameters

    • T

    Parameters

    • key: string

      key of preference to fetch. keys within complex objects can be separated by .

    • Optional defaultValue: unknown

      If the provided key is not found, then default value will be returned.

      -

    Returns Promise<T>

getSongs

Returns Promise<T>

getSongs

getTime

  • getTime(): Promise<number>

Returns Promise<Song[]>

getTime

  • getTime(): Promise<number>
  • Get current time of the player.

    -

    Returns Promise<number>

getVolume

  • getVolume(): Promise<number>

getVolume

  • getVolume(): Promise<number>
  • Get volume directly from the audio player

    -

    Returns Promise<number>

off

  • off<T>(eventName: T): void

off

  • off<T>(eventName: T): void

on

  • on(eventName: "requestedPlaylists", callback: (invalidateCache: boolean) => Promise<void | PlaylistReturnType>): void
  • on(eventName: "requestedPlaylistSongs", callback: (playlistID: string, invalidateCache: boolean, nextPageToken?: unknown) => Promise<void | SongsWithPageTokenReturnType | ForwardRequestReturnType<"requestedPlaylistSongs">>): void
  • on(eventName: "oauthCallback", callback: (url: string) => Promise<void>): void
  • on(eventName: "songQueueChanged", callback: (songQueue: SongQueue) => Promise<void>): void
  • on(eventName: "seeked", callback: (newTime: number) => Promise<void>): void
  • on(eventName: "volumeChanged", callback: (newVolume: number) => Promise<void>): void
  • on(eventName: "playerStateChanged", callback: (newState: PlayerState) => Promise<void>): void
  • on(eventName: "songChanged", callback: (song: Song) => Promise<void>): void
  • on(eventName: "preferenceChanged", callback: (preference: { key: string; value: unknown }) => Promise<void>): void
  • on(eventName: "playbackDetailsRequested", callback: (song: Song) => Promise<void | PlaybackDetailsReturnType | ForwardRequestReturnType<"playbackDetailsRequested">>): void
  • on(eventName: "customRequest", callback: (url: string) => Promise<void | CustomRequestReturnType>): void
  • on(eventName: "requestedSongFromURL", callback: (url: string) => Promise<void | SongReturnType | ForwardRequestReturnType<"requestedSongFromURL">>): void
  • on(eventName: "requestedPlaylistFromURL", callback: (url: string) => Promise<void | PlaylistAndSongsReturnType | ForwardRequestReturnType<"requestedPlaylistFromURL">>): void
  • on(eventName: "requestedSearchResult", callback: (term: string) => Promise<void | SearchReturnType | ForwardRequestReturnType<"requestedSearchResult">>): void
  • on(eventName: "requestedRecommendations", callback: () => Promise<void | RecommendationsReturnType | ForwardRequestReturnType<"requestedRecommendations">>): void
  • on(eventName: "requestedLyrics", callback: (song: Song) => Promise<string | void | ForwardRequestReturnType<"requestedLyrics">>): void
  • on(eventName: "requestedArtistSongs", callback: (artist: Artists, nextPageToken?: unknown) => Promise<void | SongsWithPageTokenReturnType | ForwardRequestReturnType<"requestedArtistSongs">>): void
  • on(eventName: "requestedAlbumSongs", callback: (album: Album, nextPageToken?: unknown) => Promise<void | SongsWithPageTokenReturnType | ForwardRequestReturnType<"requestedAlbumSongs">>): void
  • on(eventName: "requestedSongFromId", callback: (url: string) => Promise<void | SongReturnType | ForwardRequestReturnType<"requestedSongFromId">>): void
  • on(eventName: "songAdded", callback: (songs: Song[]) => Promise<void>): void
  • on(eventName: "songRemoved", callback: (songs: Song[]) => Promise<void>): void
  • on(eventName: "playlistAdded", callback: (playlist: Playlist[]) => Promise<void>): void
  • on(eventName: "playlistRemoved", callback: (songs: Playlist[]) => Promise<void>): void

Returns void

on

  • on(eventName: "requestedPlaylists", callback: (invalidateCache: boolean) => Promise<void | PlaylistReturnType>): void
  • on(eventName: "requestedPlaylistSongs", callback: (playlistID: string, invalidateCache: boolean, nextPageToken?: unknown) => Promise<void | SongsWithPageTokenReturnType | ForwardRequestReturnType<"requestedPlaylistSongs">>): void
  • on(eventName: "oauthCallback", callback: (url: string) => Promise<void>): void
  • on(eventName: "songQueueChanged", callback: (songQueue: SongQueue) => Promise<void>): void
  • on(eventName: "seeked", callback: (newTime: number) => Promise<void>): void
  • on(eventName: "volumeChanged", callback: (newVolume: number) => Promise<void>): void
  • on(eventName: "playerStateChanged", callback: (newState: PlayerState) => Promise<void>): void
  • on(eventName: "songChanged", callback: (song: Song) => Promise<void>): void
  • on(eventName: "preferenceChanged", callback: (preference: { key: string; value: unknown }) => Promise<void>): void
  • on(eventName: "playbackDetailsRequested", callback: (song: Song) => Promise<void | PlaybackDetailsReturnType | ForwardRequestReturnType<"playbackDetailsRequested">>): void
  • on(eventName: "customRequest", callback: (url: string) => Promise<void | CustomRequestReturnType>): void
  • on(eventName: "requestedSongFromURL", callback: (url: string) => Promise<void | SongReturnType | ForwardRequestReturnType<"requestedSongFromURL">>): void
  • on(eventName: "requestedPlaylistFromURL", callback: (url: string) => Promise<void | PlaylistAndSongsReturnType | ForwardRequestReturnType<"requestedPlaylistFromURL">>): void
  • on(eventName: "requestedSearchResult", callback: (term: string) => Promise<void | SearchReturnType | ForwardRequestReturnType<"requestedSearchResult">>): void
  • on(eventName: "requestedRecommendations", callback: () => Promise<void | RecommendationsReturnType | ForwardRequestReturnType<"requestedRecommendations">>): void
  • on(eventName: "requestedLyrics", callback: (song: Song) => Promise<string | void | ForwardRequestReturnType<"requestedLyrics">>): void
  • on(eventName: "requestedArtistSongs", callback: (artist: Artists, nextPageToken?: unknown) => Promise<void | SongsWithPageTokenReturnType | ForwardRequestReturnType<"requestedArtistSongs">>): void
  • on(eventName: "requestedAlbumSongs", callback: (album: Album, nextPageToken?: unknown) => Promise<void | SongsWithPageTokenReturnType | ForwardRequestReturnType<"requestedAlbumSongs">>): void
  • on(eventName: "requestedSongFromId", callback: (url: string) => Promise<void | SongReturnType | ForwardRequestReturnType<"requestedSongFromId">>): void
  • on(eventName: "songAdded", callback: (songs: Song[]) => Promise<void>): void
  • on(eventName: "songRemoved", callback: (songs: Song[]) => Promise<void>): void
  • on(eventName: "playlistAdded", callback: (playlist: Playlist[]) => Promise<void>): void
  • on(eventName: "playlistRemoved", callback: (songs: Playlist[]) => Promise<void>): void

openExternalURL

  • openExternalURL(url: string): Promise<void>
  • +

    Parameters

    • eventName: "playlistRemoved"
    • callback: (songs: Playlist[]) => Promise<void>
        • Parameters

          Returns Promise<void>

    Returns void

openExternalURL

  • openExternalURL(url: string): Promise<void>
  • Open a url in system browser

    Parameters

    • url: string

      string corresponding to URL which is to be opened

      -

    Returns Promise<void>

openLoginModal

Returns Promise<void>

openLoginModal

  • Open login modal. Show the modal if the extension demands the user to open a linux to fulfill OAuth requirements.

    The modal also allows the user to manually enter a token or manually click a button when the task is fulfilled

    Parameters

    Returns Promise<boolean>

registerAccount

  • registerAccount(name: string, bgColor: string, icon: string, signinCallback: () => void | Promise<void>, signoutCallback: () => void | Promise<void>): Promise<string>

Returns Promise<boolean>

registerAccount

  • registerAccount(name: string, bgColor: string, icon: string, signinCallback: () => void | Promise<void>, signoutCallback: () => void | Promise<void>): Promise<string>
  • Add an account to show in accounts section in main app. The user will then be able to perform login / logout operations on this account and also view its details

    @@ -157,51 +157,51 @@
      • (): void | Promise<void>
      • Returns void | Promise<void>

  • signoutCallback: () => void | Promise<void>

    callback fired when user wishes to logout

      • (): void | Promise<void>
      • Returns void | Promise<void>

Returns Promise<string>

generated accountId

-

registerOAuth

  • registerOAuth(path: string): Promise<void>

registerOAuth

  • registerOAuth(path: string): Promise<void>
  • Register a callback for Oauth on given path. This OAuth can be triggered by calling the url moosync://{path} If the path matches, the whole URL is passed to this extension.

    Parameters

    • path: string

      path on which the callback will be triggered

      -

    Returns Promise<void>

removeContextMenuItem

  • removeContextMenuItem(index: number): void

Returns Promise<void>

removeContextMenuItem

  • removeContextMenuItem(index: number): void
  • Remove an item from context menu

    Parameters

    • index: number

      index of context menu item which is to be removed

      -

    Returns void

removeSong

  • removeSong(song_id: string): Promise<void>
  • removeSong(song: Song): Promise<void>

Returns void

removeSong

  • removeSong(song_id: string): Promise<void>
  • removeSong(song: Song): Promise<void>
  • deprecated

    pass song instead of song_id Remove song from library

    Parameters

    • song_id: string

      id of song to remove

      -

    Returns Promise<void>

  • +

Returns Promise<void>

  • Remove song from library

    Parameters

    • song: Song

      song to remove

      -

    Returns Promise<void>

  • removeUserPreference

    • removeUserPreference(key: string): void

    setAlbumEditableInfo

    • setAlbumEditableInfo(artist_id: string, object: Record<string, string>): Promise<void>

    Returns Promise<void>

    removeUserPreference

    • removeUserPreference(key: string): void

    setAlbumEditableInfo

    • setAlbumEditableInfo(artist_id: string, object: Record<string, string>): Promise<void>
    • Set extra info for an album. This info is editable by the user using "Show info" context menu option on album

      Parameters

      • artist_id: string
      • object: Record<string, string>

        Key-value pairs of editable info

        -

      Returns Promise<void>

    setArtistEditableInfo

    • setArtistEditableInfo(artist_id: string, object: Record<string, string>): Promise<void>

    Returns Promise<void>

    setArtistEditableInfo

    • setArtistEditableInfo(artist_id: string, object: Record<string, string>): Promise<void>
    • Set extra info for an artist. This info is editable by the user using "Show info" context menu option on artist

      Parameters

      • artist_id: string
      • object: Record<string, string>

        Key-value pairs of editable info

        -

      Returns Promise<void>

    setContextMenuItem

    Returns Promise<void>

    setContextMenuItem

    setPreferences

    • setPreferences(key: string, value: unknown): Promise<void>

    Returns void

    setPreferences

    • setPreferences(key: string, value: unknown): Promise<void>
    • Set preference by key.

      Parameters

      • key: string

        key separated by '.'

      • value: unknown

        value to be stored for corresponding key

        -

      Returns Promise<void>

    setSecure

    • setSecure(key: string, value: unknown): Promise<void>

    Returns Promise<void>

    setSecure

    • setSecure(key: string, value: unknown): Promise<void>
    • Encrypt value and store in preferences

      Parameters

      • key: string

        key separated by '.'

      • value: unknown

        value to be stored for corresponding key

        -

      Returns Promise<void>

    showToast

    • showToast(message: string, duration?: number, type?: "success" | "info" | "error" | "default"): any

    Returns Promise<void>

    showToast

    • showToast(message: string, duration?: number, type?: "success" | "info" | "error" | "default"): any