···11+export interface State<T = TrackTags> {
22+ sources: Source[];
33+ tracks: Track<T>[];
44+}
55+66+/* SOURCES */
77+88+export interface Source<Meta = Record<string, string>> {
99+ id: string;
1010+ meta: Meta;
1111+1212+ // NOTE: This is associated with a data input applet.
1313+ // For example, `diffuse.sh/storage/amazon-s3/`
1414+ //
1515+ // This association is needed to, for example,
1616+ // optionally translate permanent URIs into usable
1717+ // URLs in order actually play the audio track.
1818+ appletURI: string;
1919+}
2020+2121+/* TRACKS */
2222+2323+export interface Track<Tags = TrackTags> {
2424+ id: string;
2525+ sourceId: string;
2626+ tags: Tags;
2727+2828+ // NOTE: This is a "semi-permanent" URI.
2929+ //
3030+ // Tracks are cached so you can't, for example,
3131+ // use an URL that expires in several hours.
3232+ uri: string;
3333+}
3434+3535+export interface TrackTags {
3636+ album?: string;
3737+ artist?: string;
3838+ title: string;
3939+}