forked from Delusoire/spicetify-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Spicetify.d.ts
2649 lines (2572 loc) · 67.4 KB
/
Spicetify.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 Icon =
| "album"
| "artist"
| "block"
| "brightness"
| "car"
| "chart-down"
| "chart-up"
| "check"
| "check-alt-fill"
| "chevron-left"
| "chevron-right"
| "chromecast-disconnected"
| "clock"
| "collaborative"
| "computer"
| "copy"
| "download"
| "downloaded"
| "edit"
| "enhance"
| "exclamation-circle"
| "external-link"
| "facebook"
| "follow"
| "fullscreen"
| "gamepad"
| "grid-view"
| "heart"
| "heart-active"
| "instagram"
| "laptop"
| "library"
| "list-view"
| "location"
| "locked"
| "locked-active"
| "lyrics"
| "menu"
| "minimize"
| "minus"
| "more"
| "new-spotify-connect"
| "offline"
| "pause"
| "phone"
| "play"
| "playlist"
| "playlist-folder"
| "plus-alt"
| "plus2px"
| "podcasts"
| "projector"
| "queue"
| "repeat"
| "repeat-once"
| "search"
| "search-active"
| "shuffle"
| "skip-back"
| "skip-back15"
| "skip-forward"
| "skip-forward15"
| "soundbetter"
| "speaker"
| "spotify"
| "subtitles"
| "tablet"
| "ticket"
| "twitter"
| "visualizer"
| "voice"
| "volume"
| "volume-off"
| "volume-one-wave"
| "volume-two-wave"
| "watch"
| "x";
type Variant =
| "bass"
| "forte"
| "brio"
| "altoBrio"
| "alto"
| "canon"
| "celloCanon"
| "cello"
| "ballad"
| "balladBold"
| "viola"
| "violaBold"
| "mesto"
| "mestoBold"
| "metronome"
| "finale"
| "finaleBold"
| "minuet"
| "minuetBold";
type SemanticColor =
| "textBase"
| "textSubdued"
| "textBrightAccent"
| "textNegative"
| "textWarning"
| "textPositive"
| "textAnnouncement"
| "essentialBase"
| "essentialSubdued"
| "essentialBrightAccent"
| "essentialNegative"
| "essentialWarning"
| "essentialPositive"
| "essentialAnnouncement"
| "decorativeBase"
| "decorativeSubdued"
| "backgroundBase"
| "backgroundHighlight"
| "backgroundPress"
| "backgroundElevatedBase"
| "backgroundElevatedHighlight"
| "backgroundElevatedPress"
| "backgroundTintedBase"
| "backgroundTintedHighlight"
| "backgroundTintedPress"
| "backgroundUnsafeForSmallTextBase"
| "backgroundUnsafeForSmallTextHighlight"
| "backgroundUnsafeForSmallTextPress";
type ColorSet =
| "base"
| "brightAccent"
| "negative"
| "warning"
| "positive"
| "announcement"
| "invertedDark"
| "invertedLight"
| "mutedAccent"
| "overMedia";
type ColorSetBackgroundColors = {
base: string;
highlight: string;
press: string;
};
type ColorSetNamespaceColors = {
announcement: string;
base: string;
brightAccent: string;
negative: string;
positive: string;
subdued: string;
warning: string;
};
type ColorSetBody = {
background: ColorSetBackgroundColors & {
elevated: ColorSetBackgroundColors;
tinted: ColorSetBackgroundColors;
unsafeForSmallText: ColorSetBackgroundColors;
};
decorative: {
base: string;
subdued: string;
};
essential: ColorSetNamespaceColors;
text: ColorSetNamespaceColors;
};
type Metadata = Partial<Record<string, string>>;
type ContextTrack = {
uri: string;
uid?: string;
metadata?: Metadata;
};
type PlayerState = {
timestamp: number;
context: PlayerContext;
index: PlayerIndex;
item: PlayerTrack;
shuffle: boolean;
repeat: number;
speed: number;
positionAsOfTimestamp: number;
duration: number;
hasContext: boolean;
isPaused: boolean;
isBuffering: boolean;
restrictions: Restrictions;
previousItems?: PlayerTrack[];
nextItems?: PlayerTrack[];
playbackQuality: PlaybackQuality;
playbackId: string;
sessionId: string;
signals?: any[];
};
type PlayerContext = {
uri: string;
url: string;
metadata: {
"player.arch": string;
};
};
type PlayerIndex = {
pageURI?: string | null;
pageIndex: number;
itemIndex: number;
};
type PlayerTrack = {
type: string;
uri: string;
uid: string;
name: string;
mediaType: string;
duration: {
milliseconds: number;
};
album: Album;
artists?: ArtistsEntity[];
isLocal: boolean;
isExplicit: boolean;
is19PlusOnly: boolean;
provider: string;
metadata: TrackMetadata;
images?: ImagesEntity[];
};
type TrackMetadata = {
artist_uri: string;
entity_uri: string;
iteration: string;
title: string;
"collection.is_banned": string;
"artist_uri:1": string;
"collection.in_collection": string;
image_small_url: string;
"collection.can_ban": string;
is_explicit: string;
album_disc_number: string;
album_disc_count: string;
track_player: string;
album_title: string;
"collection.can_add": string;
image_large_url: string;
"actions.skipping_prev_past_track": string;
page_instance_id: string;
image_xlarge_url: string;
marked_for_download: string;
"actions.skipping_next_past_track": string;
context_uri: string;
"artist_name:1": string;
has_lyrics: string;
interaction_id: string;
image_url: string;
album_uri: string;
album_artist_name: string;
album_track_number: string;
artist_name: string;
duration: string;
album_track_count: string;
popularity: string;
};
type Album = {
type: string;
uri: string;
name: string;
images?: ImagesEntity[];
};
type ImagesEntity = {
url: string;
label: string;
};
type ArtistsEntity = {
type: string;
uri: string;
name: string;
};
type Restrictions = {
canPause: boolean;
canResume: boolean;
canSeek: boolean;
canSkipPrevious: boolean;
canSkipNext: boolean;
canToggleRepeatContext: boolean;
canToggleRepeatTrack: boolean;
canToggleShuffle: boolean;
disallowPausingReasons?: string[];
disallowResumingReasons?: string[];
disallowSeekingReasons?: string[];
disallowSkippingPreviousReasons?: string[];
disallowSkippingNextReasons?: string[];
disallowTogglingRepeatContextReasons?: string[];
disallowTogglingRepeatTrackReasons?: string[];
disallowTogglingShuffleReasons?: string[];
disallowTransferringPlaybackReasons?: string[];
};
type PlaybackQuality = {
bitrateLevel: number;
strategy: number;
targetBitrateLevel: number;
targetBitrateAvailable: boolean;
hifiStatus: number;
};
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 | undefined;
/**
* 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;
/**
* Play a track, playlist, album, etc. immediately
* @param uri Spotify URI
* @param context
* @param options
*/
function playUri(uri: string, context?: any, options?: any): Promise<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 or array of tracks to prioritized queue.
*/
function addToQueue(uri: ContextTrack[]): 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;
}
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 | null,
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): void;
function registerIsolatedShortcut(keys: KeysDefine, callback: (event: KeyboardEvent) => void): void;
function registerImportantShortcut(keys: KeysDefine, callback: (event: KeyboardEvent) => void): void;
function _deregisterShortcut(keys: KeysDefine): void;
function deregisterImportantShortcut(keys: KeysDefine): void;
function changeShortcut(keys: KeysDefine, newKeys: KeysDefine): void;
}
/**
* @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, icon?: Icon | string);
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;
/**
* Change icon
*/
setIcon(icon: Icon | string): 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.
*/
const Mousetrap: import("npm:@types/mousetrap").MousetrapStatic;
const Snackbar: typeof import("npm:notistack");
/**
* Queue object contains list of queuing tracks,
* history of played tracks and current track metadata.
*/
const Queue: {
nextTracks: any[];
prevTracks: any[];
queueRevision: string;
track: any;
};
/**
* Remove a track or array of tracks from current queue.
*/
function removeFromQueue(uri: ContextTrack[]): Promise<void>;
/**
* Display a bubble of notification. Useful for a visual feedback.
* @param message Message to display. Can use inline HTML for styling.
* @param isError If true, bubble will be red. Defaults to false.
* @param msTimeout Time in milliseconds to display the bubble. Defaults to Spotify's value.
*/
function showNotification(message: React.ReactNode, isError?: boolean, msTimeout?: number): void;
/**
* Set of APIs method to parse and validate URIs.
*/
class URI {
constructor(type: string, props: any);
public type: string;
public hasBase62Id: boolean;
public id?: string;
public disc?: any;
public args?: any;
public category?: string;
public username?: string;
public track?: string;
public artist?: string;
public album?: string;
public duration?: number;
public query?: string;
public country?: string;
public global?: boolean;
public context?: string | typeof URI | null;
public anchor?: string;
public play?: any;
public toplist?: any;
/**
*
* @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;
/**
*
* @param origin The origin to use for the URL.
* @return The URL string for the uri.
*/
toURL(origin?: string): string;
/**
* Clones a given SpotifyURI instance.
*
* @return An instance of URI.
*/
clone(): URI | null;
/**
* Gets the path of the URI object by removing all hash and query parameters.
*
* @return The path of the URI object.
*/
getPath(): string;
/**
* 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: {
AD: string;
ALBUM: string;
GENRE: string;
QUEUE: string;
APPLICATION: string;
ARTIST: string;
ARTIST_TOPLIST: string;
ARTIST_CONCERTS: string;
AUDIO_FILE: string;
COLLECTION: string;
COLLECTION_ALBUM: string;
COLLECTION_ARTIST: string;
COLLECTION_MISSING_ALBUM: string;
COLLECTION_TRACK_LIST: string;
CONCERT: string;
CONTEXT_GROUP: string;
DAILY_MIX: string;
EMPTY: string;
EPISODE: string;
/** URI particle; not an actual URI. */
FACEBOOK: string;
FOLDER: string;
FOLLOWERS: string;
FOLLOWING: string;
IMAGE: string;
INBOX: string;
INTERRUPTION: string;
LIBRARY: string;
LIVE: string;
ROOM: string;
EXPRESSION: string;
LOCAL: string;
LOCAL_TRACK: string;
LOCAL_ALBUM: string;
LOCAL_ARTIST: string;
MERCH: string;
MOSAIC: string;
PLAYLIST: string;
PLAYLIST_V2: string;
PRERELEASE: string;
PROFILE: string;
PUBLISHED_ROOTLIST: string;
RADIO: string;
ROOTLIST: string;
SEARCH: string;
SHOW: string;
SOCIAL_SESSION: string;
SPECIAL: string;
STARRED: string;
STATION: string;
TEMP_PLAYLIST: string;
TOPLIST: string;
TRACK: string;
TRACKSET: string;
USER_TOPLIST: string;
USER_TOP_TRACKS: string;
UNKNOWN: string;
MEDIA: string;
QUESTION: string;
POLL: 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;
/**
* 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 baseUri The first URI to compare.
* @param refUri The second URI to compare.
* @return Whether they shared idenitity
*/
static isSameIdentity(baseUri: URI | string, refUri: URI | string): boolean;
/**
* 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;
/**