forked from spicetify/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.d.ts
1359 lines (1270 loc) · 44.8 KB
/
globals.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare namespace Spicetify {
type Metadata = Partial<Record<string, string>>;
type ContextTrack = {
uri: string;
uid?: string;
metadata?: Metadata;
};
type ProvidedTrack = ContextTrack & {
removed?: string[];
blocked?: string[];
provider?: string;
};
interface ContextOption {
contextURI?: string;
index?: number;
trackUri?: string;
page?: number;
trackUid?: string;
sortedBy?: string;
filteredBy?: string;
shuffleContext?: boolean;
repeatContext?: boolean;
repeatTrack?: boolean;
offset?: number;
next_page_url?: string;
restrictions?: Record<string, string[]>;
referrer?: string;
};
type PlayerState = {
timestamp: number;
context_uri: string;
context_url: string;
context_restrictions: Record<string, string>;
index?: {
page: number;
track: number;
};
track?: ProvidedTrack;
playback_id?: string;
playback_quality?: string;
playback_speed?: number;
position_as_of_timestamp: number;
duration: number;
is_playing: boolean;
is_paused: boolean;
is_buffering: boolean;
play_origin: {
feature_identifier: string;
feature_version: string;
view_uri?: string;
external_referrer?: string;
referrer_identifier?: string;
device_identifier?: string;
};
options: {
shuffling_context?: boolean;
repeating_context?: boolean;
repeating_track?: boolean;
};
restrictions: Record<string, string[]>;
suppressions: {
providers: string[];
};
debug: {
log: string[];
};
prev_tracks: ProvidedTrack[];
next_tracks: ProvidedTrack[];
context_metadata: Metadata;
page_metadata: Metadata;
session_id: string;
queue_revision: string;
};
namespace Player {
/**
* Register a listener `type` on Spicetify.Player.
*
* On default, `Spicetify.Player` always dispatch:
* - `songchange` type when player changes track.
* - `onplaypause` type when player plays or pauses.
* - `onprogress` type when track progress changes.
* - `appchange` type when user changes page.
*/
function addEventListener(type: string, callback: (event?: Event) => void): void;
function addEventListener(type: "songchange", callback: (event?: Event & { data: PlayerState }) => void): void;
function addEventListener(type: "onplaypause", callback: (event?: Event & { data: PlayerState }) => void): void;
function addEventListener(type: "onprogress", callback: (event?: Event & { data: number }) => void): void;
function addEventListener(type: "appchange", callback: (event?: Event & { data: {
/**
* App href path
*/
path: string;
/**
* App container
*/
container: HTMLElement;
} }) => void): void;
/**
* Skip to previous track.
*/
function back(): void;
/**
* An object contains all information about current track and player.
*/
const data: PlayerState;
/**
* Decrease a small amount of volume.
*/
function decreaseVolume(): void;
/**
* Dispatches an event at `Spicetify.Player`.
*
* On default, `Spicetify.Player` always dispatch
* - `songchange` type when player changes track.
* - `onplaypause` type when player plays or pauses.
* - `onprogress` type when track progress changes.
* - `appchange` type when user changes page.
*/
function dispatchEvent(event: Event): void;
const eventListeners: {
[key: string]: Array<(event?: Event) => void>
};
/**
* Convert milisecond to `mm:ss` format
* @param milisecond
*/
function formatTime(milisecond: number): string;
/**
* Return song total duration in milisecond.
*/
function getDuration(): number;
/**
* Return mute state
*/
function getMute(): boolean;
/**
* Return elapsed duration in milisecond.
*/
function getProgress(): number;
/**
* Return elapsed duration in percentage (0 to 1).
*/
function getProgressPercent(): number;
/**
* Return current Repeat state (No repeat = 0/Repeat all = 1/Repeat one = 2).
*/
function getRepeat(): number;
/**
* Return current shuffle state.
*/
function getShuffle(): boolean;
/**
* Return track heart state.
*/
function getHeart(): boolean;
/**
* Return current volume level (0 to 1).
*/
function getVolume(): number;
/**
* Increase a small amount of volume.
*/
function increaseVolume(): void;
/**
* Return a boolean whether player is playing.
*/
function isPlaying(): boolean;
/**
* Skip to next track.
*/
function next(): void;
/**
* Pause track.
*/
function pause(): void;
/**
* Resume track.
*/
function play(): void;
/**
* Unregister added event listener `type`.
* @param type
* @param callback
*/
function removeEventListener(type: string, callback: (event?: Event) => void): void;
/**
* Seek track to position.
* @param position can be in percentage (0 to 1) or in milisecond.
*/
function seek(position: number): void;
/**
* Turn mute on/off
* @param state
*/
function setMute(state: boolean): void;
/**
* Change Repeat mode
* @param mode `0` No repeat. `1` Repeat all. `2` Repeat one track.
*/
function setRepeat(mode: number): void;
/**
* Turn shuffle on/off.
* @param state
*/
function setShuffle(state: boolean): void;
/**
* Set volume level
* @param level 0 to 1
*/
function setVolume(level: number): void;
/**
* Seek to previous `amount` of milisecond
* @param amount in milisecond. Default: 15000.
*/
function skipBack(amount?: number): void;
/**
* Seek to next `amount` of milisecond
* @param amount in milisecond. Default: 15000.
*/
function skipForward(amount?: number): void;
/**
* Toggle Heart (Favourite) track state.
*/
function toggleHeart(): void;
/**
* Toggle Mute/No mute.
*/
function toggleMute(): void;
/**
* Toggle Play/Pause.
*/
function togglePlay(): void;
/**
* Toggle No repeat/Repeat all/Repeat one.
*/
function toggleRepeat(): void;
/**
* Toggle Shuffle/No shuffle.
*/
function toggleShuffle(): void;
}
/**
* Adds a track/album or array of tracks/albums to prioritized queue.
*/
function addToQueue(uri: string | string[]): Promise<void>;
/**
* @deprecated
*/
const BridgeAPI: any;
/**
* @deprecated
*/
const CosmosAPI: any;
/**
* Async wrappers of CosmosAPI
*/
namespace CosmosAsync {
type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | "SUB";
interface Error {
code: number;
error: string;
message: string;
stack?: string;
}
type Headers = Record<string, string>;
type Body = Record<string, any>;
interface Response {
body: any;
headers: Headers;
status: number;
uri: string;
static isSuccessStatus(status: number): boolean;
}
function head(url: string, headers?: Headers): Promise<Headers>;
function get(url: string, body?: Body, headers?: Headers): Promise<Response.body>;
function post(url: string, body?: Body, headers?: Headers): Promise<Response.body>;
function put(url: string, body?: Body, headers?: Headers): Promise<Response.body>;
function del(url: string, body?: Body, headers?: Headers): Promise<Response.body>;
function patch(url: string, body?: Body, headers?: Headers): Promise<Response.body>;
function sub(url: string, callback: ((b: Response.body) => void), onError?: ((e: Error) => void), body?: Body, headers?: Headers): Promise<Response.body>;
function postSub(url: string, body?: Body, callback: ((b: Response.body) => void), onError?: ((e: Error) => void)): Promise<Response.body>;
function request(method: Method, url: string, body?: Body, headers?: Headers): Promise<Response>;
function resolve(method: Method, url: string, body?: Body, headers?: Headers): Promise<Response>;
}
/**
* Fetch interesting colors from URI.
* @param uri Any type of URI that has artwork (playlist, track, album, artist, show, ...)
*/
function colorExtractor(uri: string): Promise<{
DESATURATED: string;
LIGHT_VIBRANT: string;
PROMINENT: string;
VIBRANT: string;
VIBRANT_NON_ALARMING: string;
}>;
/**
* @deprecated
*/
function getAblumArtColors(): any;
/**
* Fetch track analyzed audio data.
* Beware, not all tracks have audio data.
* @param uri is optional. Leave it blank to get current track
* or specify another track uri.
*/
function getAudioData(uri?: string): Promise<any>;
/**
* Set of APIs method to register, deregister hotkeys/shortcuts
*/
namespace Keyboard {
type ValidKey = "BACKSPACE" | "TAB" | "ENTER" | "SHIFT" | "CTRL" | "ALT" | "CAPS" | "ESCAPE" | "SPACE" | "PAGE_UP" | "PAGE_DOWN" | "END" | "HOME" | "ARROW_LEFT" | "ARROW_UP" | "ARROW_RIGHT" | "ARROW_DOWN" | "INSERT" | "DELETE" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | "WINDOW_LEFT" | "WINDOW_RIGHT" | "SELECT" | "NUMPAD_0" | "NUMPAD_1" | "NUMPAD_2" | "NUMPAD_3" | "NUMPAD_4" | "NUMPAD_5" | "NUMPAD_6" | "NUMPAD_7" | "NUMPAD_8" | "NUMPAD_9" | "MULTIPLY" | "ADD" | "SUBTRACT" | "DECIMAL_POINT" | "DIVIDE" | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | " | " | "-" | "." | "/" | "`" | "[" | "\\" | "]" | "\"" | "~" | "!" | "@" | "#" | "$" | "%" | "^" | "&" | "*" | "(" | ")" | "_" | "+" | ":" | "<" | ">" | "?" | "|";
type KeysDefine = string | {
key: string;
ctrl?: boolean;
shift?: boolean;
alt?: boolean;
meta?: boolean;
};
const KEYS: Record<ValidKey, string>;
function registerShortcut(keys: KeysDefine, callback: (event: KeyboardEvent) => void);
function registerIsolatedShortcut(keys: KeysDefine, callback: (event: KeyboardEvent) => void);
function registerImportantShortcut(keys: KeysDefine, callback: (event: KeyboardEvent) => void);
function _deregisterShortcut(keys: KeysDefine);
function deregisterImportantShortcut(keys: KeysDefine);
};
/**
* @deprecated
*/
const LiveAPI: any;
namespace LocalStorage {
/**
* Empties the list associated with the object of all key/value pairs, if there are any.
*/
function clear(): void;
/**
* Get key value
*/
function get(key: string): string | null;
/**
* Delete key
*/
function remove(key: string): void;
/**
* Set new value for key
*/
function set(key: string, value: string): void;
}
/**
* To create and prepend custom menu item in profile menu.
*/
namespace Menu {
/**
* Create a single toggle.
*/
class Item {
constructor(name: string, isEnabled: boolean, onClick: (self: Item) => void);
name: string;
isEnabled: boolean;
/**
* Change item name
*/
setName(name: string): void;
/**
* Change item enabled state.
* Visually, item would has a tick next to it if its state is enabled.
*/
setState(isEnabled: boolean): void;
/**
* Item is only available in Profile menu when method "register" is called.
*/
register(): void;
/**
* Stop item to be prepended into Profile menu.
*/
deregister(): void;
}
/**
* Create a sub menu to contain Item toggles.
* `Item`s in `subItems` array shouldn't be registered.
*/
class SubMenu {
constructor(name: string, subItems: Item[]);
name: string;
/**
* Change SubMenu name
*/
setName(name: string): void;
/**
* Add an item to sub items list
*/
addItem(item: Item);
/**
* Remove an item from sub items list
*/
removeItem(item: Item);
/**
* SubMenu is only available in Profile menu when method "register" is called.
*/
register(): void;
/**
* Stop SubMenu to be prepended into Profile menu.
*/
deregister(): void;
}
}
/**
* Keyboard shortcut library
*
* Documentation: https://craig.is/killing/mice v1.6.5
*
* Spicetify.Keyboard is wrapper of this library to be compatible with legacy Spotify,
* so new extension should use this library instead.
*/
function Mousetrap(element?: any): void;
/**
* Use to force playing a track/episode/album/show/playlist/artist URI.
*/
namespace PlaybackControl {
async function resume();
async function pause();
async function nextTrack();
async function previousTrack();
async function addToQueue(uri: string);
async function playTracks(trackList: ContextTrack[], options: ContextOption = {});
async function playUri(uri: string, options: Options = {});
async function playCollection(trackUri: string, sort: string, filter: string);
async function seek(positionInMs: number);
async function setShuffle(enabled: boolean);
async function setRepeatMode(repeat: 0 | 1 | 2);
async function setPrivateSession(enabled: boolean);
async function setPreferredSubtitle(language: string): Promise<void>;
async function getPreferredSubtitle(): Promise<string>;
}
/**
* Contains vast array of internal APIs.
* Please explore in Devtool Console.
*/
const Platform: any;
/**
* Queue object contains list of queuing tracks,
* history of played tracks and current track metadata.
*/
const Queue: {
next_tracks: any[];
prev_tracks: any[];
revision: string;
track: any;
};
/**
* Remove a track/album or array of tracks/albums from current queue.
*/
function removeFromQueue(uri: string | string[]): Promise<void>;
/**
* Display a bubble of notification. Useful for a visual feedback.
*/
function showNotification(text: string): void;
/**
* Set of APIs method to parse and validate URIs.
*/
class URI {
constructor(type: string, props: any);
public type: string;
public id: string;
/**
* Creates an application URI object from the current URI object.
*
* If the current URI object is already an application type, a copy is made.
*
* @return The current URI as an application URI.
*/
toAppType(): URI;
/**
* Creates a URI object from an application URI object.
*
* If the current URI object is not an application type, a copy is made.
*
* @return The current URI as a real typed URI.
*/
toRealType(): URI;
/**
*
* @return The URI representation of this uri.
*/
toURI(): string;
/**
*
* @return The URI representation of this uri.
*/
toString(): string;
/**
* Get the URL path of this uri.
*
* @param opt_leadingSlash True if a leading slash should be prepended.
* @return The path of this uri.
*/
toURLPath(opt_leadingSlash: boolean): string;
/**
*
* @return The Play URL string for the uri.
*/
toPlayURL(): string;
/**
*
* @return The URL string for the uri.
*/
toURL(): string;
/**
*
* @return The Open URL string for the uri.
*/
toOpenURL(): string;
/**
*
* @return The Play HTTPS URL string for the uri.
*/
toSecurePlayURL(): string;
/**
*
* @return The HTTPS URL string for the uri.
*/
toSecureURL(): string;
/**
*
* @return The Open HTTPS URL string for the uri.
*/
toSecureOpenURL(): string;
/**
*
* @return The id of the uri as a bytestring.
*/
idToByteString(): string;
getPath(): string;
getBase62Id(): string;
/**
* Checks whether two URI:s refer to the same thing even though they might
* not necessarily be equal.
*
* These two Playlist URIs, for example, refer to the same playlist:
*
* spotify:user:napstersean:playlist:3vxotOnOGDlZXyzJPLFnm2
* spotify:playlist:3vxotOnOGDlZXyzJPLFnm2
*
* @param uri The uri to compare identity for.
* @return Whether they shared idenitity
*/
isSameIdentity(uri: any): boolean;
/**
* The various URI Types.
*
* Note that some of the types in this enum are not real URI types, but are
* actually URI particles. They are marked so.
*
*/
static Type: {
EMPTY: string;
ALBUM: string;
AD: string;
/** URI particle; not an actual URI. */
APP: string;
APPLICATION: string;
ARTIST: string;
ARTIST_TOPLIST: string;
AUDIO_FILE: string;
COLLECTION: string;
COLLECTION_ALBUM: string;
COLLECTION_MISSING_ALBUM: string;
COLLECTION_ARTIST: string;
CONTEXT_GROUP: string;
DAILY_MIX: string;
EPISODE: string;
/** URI particle; not an actual URI. */
FACEBOOK: string;
FOLDER: string;
FOLLOWERS: string;
FOLLOWING: string;
/** URI particle; not an actual URI. */
GLOBAL: string;
IMAGE: string;
INBOX: string;
INTERRUPTION: string;
LOCAL_ARTIST: string;
LOCAL_ALBUM: string;
LOCAL: string;
LIBRARY: string;
MOSAIC: string;
PLAYLIST: string;
/** Only used for URI classification. Not a valid URI fragment. */
PLAYLIST_V2: string;
PROFILE: string;
PUBLISHED_ROOTLIST: string;
RADIO: string;
ROOTLIST: string;
COLLECTION_TRACK_LIST: string;
SEARCH: string;
SHOW: string;
SOCIAL_SESSION: string,
CONCERT: string;
SPECIAL: string;
STARRED: string;
STATION: string;
TEMP_PLAYLIST: string;
/** URI particle; not an actual URI. */
TOP: string;
TOPLIST: string;
TRACK: string;
TRACKSET: string;
/** URI particle; not an actual URI. */
USER: string;
USER_TOPLIST: string;
USER_TOP_TRACKS: string;
};
/**
* Creates a new URI object from a parsed string argument.
*
* @param str The string that will be parsed into a URI object.
* @throws TypeError If the string argument is not a valid URI, a TypeError will
* be thrown.
* @return The parsed URI object.
*/
static fromString(str: string): URI;
/**
* Parses a given object into a URI instance.
*
* Unlike URI.fromString, this function could receive any kind of value. If
* the value is already a URI instance, it is simply returned.
* Otherwise the value will be stringified before parsing.
*
* This function also does not throw an error like URI.fromString, but
* instead simply returns null if it can't parse the value.
*
* @param value The value to parse.
* @return The corresponding URI instance, or null if the
* passed value is not a valid value.
*/
static from(value: any): URI | null;
/**
* Creates a new URI from a bytestring.
*
* @param type The type of the URI.
* @param idByteString The ID of the URI as a bytestring.
* @param opt_args Optional arguments to the URI constructor.
* @return The URI object created.
*/
static fromByteString(type: string, idByteString: string, opt_args?: any): URI;
/**
* Clones a given SpotifyURI instance.
*
* @param uri The uri to clone.
* @return An instance of URI.
*/
static clone(uri: URI): URI | null;
/**
* Returns the canonical representation of a username.
*
* @param username The username to encode.
* @return The encoded canonical representation of the username.
*/
static getCanonicalUsername(username: string): string;
/**
* Returns the non-canonical representation of a username.
*
* @param username The username to encode.
* @return The unencoded canonical representation of the username.
*/
static getDisplayUsername(username: string): string;
/**
* Returns the hex representation of a Base62 encoded id.
*
* @param id The base62 encoded id.
* @return The hex representation of the base62 id.
*/
static idToHex(id: string): string;
/**
* Returns the base62 representation of a hex encoded id.
*
* @param hex The hex encoded id.
* @return The base62 representation of the id.
*/
static hexToId(hex: string): string;
/**
* Creates a new empty URI.
*
* @return The empty URI.
*/
static emptyURI(): URI;
/**
* Creates a new 'album' type URI.
*
* @param id The id of the album.
* @param disc The disc number of the album.
* @return The album URI.
*/
static albumURI(id: string, disc: number): URI;
/**
* Creates a new 'ad' type URI.
*
* @param id The id of the ad.
* @return The ad URI.
*/
static adURI(id: string): URI;
/**
* Creates a new 'audiofile' type URI.
*
* @param extension The extension of the audiofile.
* @param id The id of the extension.
* @return The audiofile URI.
*/
static audioFileURI(extension: string, id: string): URI;
/**
* Creates a new 'artist' type URI.
*
* @param id The id of the artist.
* @return The artist URI.
*/
static artistURI(id: string): URI;
/**
* Creates a new 'artist-toplist' type URI.
*
* @param id The id of the artist.
* @param toplist The toplist type.
* @return The artist-toplist URI.
*/
static artistToplistURI(id: string, toplist: string): URI;
/**
* Creates a new 'dailymix' type URI.
*
* @param args An array of arguments for the dailymix.
* @return The dailymix URI.
*/
static dailyMixURI(args: string[]): URI;
/**
* Creates a new 'search' type URI.
*
* @param query The unencoded search query.
* @return The search URI
*/
static searchURI(query: string): URI;
/**
* Creates a new 'track' type URI.
*
* @param id The id of the track.
* @param anchor The point in the track formatted as mm:ss
* @param context An optional context URI
* @param play Toggles autoplay
* @return The track URI.
*/
static trackURI(id: string, anchor: string, context: string, play: boolean): URI;
/**
* Creates a new 'trackset' type URI.
*
* @param tracks An array of 'track' type URIs.
* @param name The name of the trackset.
* @param index The index in the trackset.
* @return The trackset URI.
*/
static tracksetURI(tracks: URI[], name: string, index: number): URI;
/**
* Creates a new 'facebook' type URI.
*
* @param uid The user id.
* @return The facebook URI.
*/
static facebookURI(uid: string): URI;
/**
* Creates a new 'followers' type URI.
*
* @param username The non-canonical username.
* @return The followers URI.
*/
static followersURI(username: string): URI;
/**
* Creates a new 'following' type URI.
*
* @param username The non-canonical username.
* @return The following URI.
*/
static followingURI(username: string): URI;
/**
* Creates a new 'playlist' type URI.
*
* @param username The non-canonical username of the playlist owner.
* @param id The id of the playlist.
* @return The playlist URI.
*/
static playlistURI(username: string, id: string): URI;
/**
* Creates a new 'playlist-v2' type URI.
*
* @param id The id of the playlist.
* @return The playlist URI.
*/
static playlistV2URI(id: string): URI;
/**
* Creates a new 'folder' type URI.
*
* @param username The non-canonical username of the folder owner.
* @param id The id of the folder.
* @return The folder URI.
*/
static folderURI(username: string, id: string): URI;
/**
* Creates a new 'collectiontracklist' type URI.
*
* @param username The non-canonical username of the collection owner.
* @param id The id of the tracklist.
* @return The collectiontracklist URI.
*/
static collectionTrackList(username: string, id: string): URI;
/**
* Creates a new 'starred' type URI.
*
* @param username The non-canonical username of the starred list owner.
* @return The starred URI.
*/
static starredURI(username: string): URI;
/**
* Creates a new 'user-toplist' type URI.
*
* @param username The non-canonical username of the toplist owner.
* @param toplist The toplist type.
* @return The user-toplist URI.
*/
static userToplistURI(username: string, toplist: string): URI;
/**
* Creates a new 'user-top-tracks' type URI.
*
* @deprecated
* @param username The non-canonical username of the toplist owner.
* @return The user-top-tracks URI.
*/
static userTopTracksURI(username: string): URI;
/**
* Creates a new 'toplist' type URI.
*
* @param toplist The toplist type.
* @param country The country code for the toplist.
* @param global True if this is a global rather than a country list.
* @return The toplist URI.
*/
static toplistURI(toplist: string, country: string, global: boolean): URI;
/**
* Creates a new 'inbox' type URI.
*
* @param username The non-canonical username of the inbox owner.
* @return The inbox URI.
*/
static inboxURI(username: string): URI;
/**
* Creates a new 'rootlist' type URI.
*
* @param username The non-canonical username of the rootlist owner.
* @return The rootlist URI.
*/
static rootlistURI(username: string): URI;
/**
* Creates a new 'published-rootlist' type URI.
*
* @param username The non-canonical username of the published-rootlist owner.
* @return The published-rootlist URI.
*/
static publishedRootlistURI(username: string): URI;
/**
* Creates a new 'local-artist' type URI.
*
* @param artist The artist name.
* @return The local-artist URI.
*/
static localArtistURI(artist: string): URI;
/**
* Creates a new 'local-album' type URI.
*
* @param artist The artist name.
* @param album The album name.
* @return The local-album URI.
*/
static localAlbumURI(artist: string, album: string): URI;
/**
* Creates a new 'local' type URI.
*
* @param artist The artist name.
* @param album The album name.
* @param track The track name.
* @param duration The track duration in ms.
* @return The local URI.
*/
static localURI(artist: string, album: string, track: string, duration: number): URI;
/**
* Creates a new 'library' type URI.
*
* @param username The non-canonical username of the rootlist owner.
* @param category The category of the library.
* @return The library URI.
*/
static libraryURI(username: string, category: string): URI;
/**
* Creates a new 'collection' type URI.
*
* @param username The non-canonical username of the rootlist owner.
* @param category The category of the collection.
* @return The collection URI.
*/
static collectionURI(username: string, category: string): URI;
/**
* Creates a new 'temp-playlist' type URI.
*
* @param origin The origin of the temporary playlist.
* @param data Additional data for the playlist.
* @return The temp-playlist URI.
*/
static temporaryPlaylistURI(origin: string, data: string): URI;
/**
* Creates a new 'context-group' type URI.
*
* @deprecated
* @param origin The origin of the temporary playlist.
* @param name The name of the context group.
* @return The context-group URI.
*/
static contextGroupURI(origin: string, name: string): URI;
/**
* Creates a new 'profile' type URI.
*
* @param username The non-canonical username of the rootlist owner.
* @param args A list of arguments.
* @return The profile URI.
*/
static profileURI(username: string, args: string[]): URI;
/**
* Creates a new 'image' type URI.
*
* @param id The id of the image.
* @return The image URI.
*/
static imageURI(id: string): URI;