forked from schmooky/yamb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move track types to global namespace
- Loading branch information
1 parent
d3bdc7d
commit 7c57476
Showing
5 changed files
with
102 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* eslint-disable */ | ||
/// <reference types="node" /> | ||
|
||
declare namespace NodeJS { | ||
interface ProcessEnv { | ||
readonly NODE_ENV: 'development' | 'production' | 'test'; | ||
readonly BOT_TOKEN: string; | ||
readonly PREFIX: string; | ||
readonly EMAIL: string; | ||
readonly PASS: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
interface SearchOptions { | ||
type: string; | ||
} | ||
|
||
interface AlbumInfo { | ||
id: number; | ||
storageDir: string; | ||
originalReleaseYear: number; | ||
year: number; | ||
version: string; | ||
type: string; | ||
artists: []; | ||
coverUri: string; | ||
trackCount: number; | ||
genre: string; | ||
available: boolean; | ||
availableForPremiumUsers: boolean; | ||
title: string; | ||
} | ||
|
||
interface Artist { | ||
id: number; | ||
cover: Cover; | ||
composer: boolean; | ||
name: string; | ||
various: boolean; | ||
decomposed: []; | ||
} | ||
|
||
interface Cover { | ||
type: string; | ||
prefix: string; | ||
uri: string; | ||
} | ||
|
||
interface TrackInfo { | ||
id: number; | ||
available: boolean; | ||
availableAsRbt: boolean; | ||
availableForPremiumUsers: boolean; | ||
lyricsAvailable: boolean; | ||
albums: AlbumInfo[]; | ||
storageDir: string; | ||
durationMs: number; | ||
explicit: boolean; | ||
title: string; | ||
artists: Artist[]; | ||
regions: string[]; | ||
} | ||
|
||
interface SearchResult { | ||
type: string; | ||
page: number; | ||
perPage: number; | ||
text: string; | ||
searchRequestId: string; | ||
tracks: { | ||
total: number; | ||
perPage: number; | ||
order: number; | ||
results: TrackInfo[]; | ||
}; | ||
} | ||
|
||
interface DownloadInfo { | ||
s: string; | ||
ts: string; | ||
path: string; | ||
host: string; | ||
} | ||
|
||
interface PlaylistTrack { | ||
id: number; | ||
track: TrackInfo; | ||
timestamp: string; | ||
recent: boolean; | ||
} | ||
|
||
interface Track extends TrackInfo { | ||
trackURL: string; | ||
} | ||
|
||
interface DownloadID { | ||
trackID: string; | ||
albumID: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters