mass-queue-types 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/mass_queue/actions/get_album.ts +1 -1
- package/packages/mass_queue/actions/get_album_tracks.ts +2 -2
- package/packages/mass_queue/actions/get_artist.ts +1 -1
- package/packages/mass_queue/actions/get_artist_tracks.ts +2 -2
- package/packages/mass_queue/actions/get_playlist.ts +1 -1
- package/packages/mass_queue/actions/get_playlist_tracks.ts +2 -2
- package/packages/mass_queue/actions/get_podcast.ts +11 -0
- package/packages/mass_queue/actions/get_podcast_episodes.ts +10 -0
- package/packages/mass_queue/types/media-items.ts +2 -0
- package/packages/mass_queue/utils.ts +4 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Custom Types and Interfaces for Music Assistant Queue Actions",
|
|
4
4
|
"repository": "https://github.com/droans/mass-queue-types",
|
|
5
5
|
"author": "Michael Carroll",
|
|
6
|
-
"version": "1.0
|
|
6
|
+
"version": "1.1.0",
|
|
7
7
|
"module": "mass-queue-types.js",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"home-assistant",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Album } from "../types/media-items.js";
|
|
2
2
|
import { baseMassQueueServiceWithResponseSchema, getCollectionDataServiceData } from "../utils.js";
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export interface getAlbumServiceResponse {response: Album};
|
|
5
5
|
|
|
6
6
|
export type getAlbumServiceData = getCollectionDataServiceData
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { baseMassQueueServiceWithResponseSchema,
|
|
1
|
+
import { baseMassQueueServiceWithResponseSchema, getCollectionItemsServiceData, getTracksServiceResponse } from "../utils.js";
|
|
2
2
|
|
|
3
3
|
export type getAlbumTracksServiceResponse = getTracksServiceResponse;
|
|
4
4
|
|
|
5
|
-
export type getAlbumTracksServiceData =
|
|
5
|
+
export type getAlbumTracksServiceData = getCollectionItemsServiceData
|
|
6
6
|
|
|
7
7
|
export interface getAlbumTracksServiceSchema extends baseMassQueueServiceWithResponseSchema {
|
|
8
8
|
service: 'get_album_tracks';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Artist } from "../types/media-items.js";
|
|
2
2
|
import { baseMassQueueServiceWithResponseSchema, getCollectionDataServiceData } from "../utils.js";
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export interface getArtistServiceResponse {response: Artist};
|
|
5
5
|
|
|
6
6
|
export type getArtistServiceData = getCollectionDataServiceData
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { baseMassQueueServiceWithResponseSchema,
|
|
1
|
+
import { baseMassQueueServiceWithResponseSchema, getCollectionItemsServiceData, getTracksServiceResponse } from "../utils.js";
|
|
2
2
|
|
|
3
3
|
export type getArtistTracksServiceResponse = getTracksServiceResponse;
|
|
4
4
|
|
|
5
|
-
export type getArtistTracksServiceData =
|
|
5
|
+
export type getArtistTracksServiceData = getCollectionItemsServiceData
|
|
6
6
|
|
|
7
7
|
export interface getArtistTracksServiceSchema extends baseMassQueueServiceWithResponseSchema {
|
|
8
8
|
service: 'get_artist_tracks';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Playlist } from "../types/media-items.js";
|
|
2
2
|
import { baseMassQueueServiceWithResponseSchema, getCollectionDataServiceData } from "../utils.js";
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export interface getPlaylistServiceResponse {response: Playlist};
|
|
5
5
|
|
|
6
6
|
export type getPlaylistServiceData = getCollectionDataServiceData
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { baseMassQueueServiceWithResponseSchema,
|
|
1
|
+
import { baseMassQueueServiceWithResponseSchema, getCollectionItemsServiceData, Track } from "../utils.js";
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
export interface PlaylistTrack extends Track {
|
|
@@ -11,7 +11,7 @@ export interface getPlaylistTracksServiceResponse {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export type getPlaylistTracksServiceData =
|
|
14
|
+
export type getPlaylistTracksServiceData = getCollectionItemsServiceData;
|
|
15
15
|
|
|
16
16
|
export interface getPlaylistTracksServiceSchema extends baseMassQueueServiceWithResponseSchema {
|
|
17
17
|
service: 'get_playlist_tracks';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Podcast } from "../types/media-items.js";
|
|
2
|
+
import { baseMassQueueServiceWithResponseSchema, getCollectionDataServiceData } from "../utils.js";
|
|
3
|
+
|
|
4
|
+
export interface getPodcastServiceResponse {response: Podcast};
|
|
5
|
+
|
|
6
|
+
export type getPodcastServiceData = getCollectionDataServiceData
|
|
7
|
+
|
|
8
|
+
export interface getPodcastServiceSchema extends baseMassQueueServiceWithResponseSchema {
|
|
9
|
+
service: 'get_podcast';
|
|
10
|
+
service_data: getPodcastServiceData;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { baseMassQueueServiceWithResponseSchema, getCollectionDataServiceData, getTracksServiceResponse } from "../utils.js";
|
|
2
|
+
|
|
3
|
+
export type getPodcastEpisodesServiceRespnse = getTracksServiceResponse;
|
|
4
|
+
|
|
5
|
+
export type getPodcastEpisodeServiceData = getCollectionDataServiceData;
|
|
6
|
+
|
|
7
|
+
export interface getPodcastEpisodeServiceSchema extends baseMassQueueServiceWithResponseSchema {
|
|
8
|
+
service: 'get_podcast_tracks';
|
|
9
|
+
service_data: getPodcastEpisodeServiceData;
|
|
10
|
+
}
|
|
@@ -54,6 +54,8 @@ export interface PodcastEpisode extends Omit<MediaItem, 'media_type'> {
|
|
|
54
54
|
media_type: 'podcast_episode';
|
|
55
55
|
fully_played: boolean | null;
|
|
56
56
|
resume_position_ms: number | null;
|
|
57
|
+
podcast: Podcast;
|
|
58
|
+
duration: number;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
type externalIds = [string, string][];
|