mass-queue-types 0.7.0 → 0.7.1
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/README.md +6 -24
- package/package.json +2 -2
- package/packages/actions/get_group_volume.ts +7 -6
- package/packages/actions/get_queue_items.ts +7 -6
- package/packages/actions/get_recommendations.ts +5 -4
- package/packages/actions/move_queue_item_down.ts +5 -4
- package/packages/actions/move_queue_item_next.ts +5 -4
- package/packages/actions/move_queue_item_up.ts +5 -4
- package/packages/actions/play_queue_item.ts +3 -3
- package/packages/actions/remove_queue_item.ts +3 -3
- package/packages/actions/send_command.ts +3 -4
- package/packages/actions/set_group_volume.ts +4 -3
- package/packages/actions/unfavorite_current_item.ts +4 -3
- package/packages/utils.ts +6 -5
- package/packages/ws/encode_images.ts +1 -1
- package/packages/ws/get_info.ts +2 -2
package/README.md
CHANGED
|
@@ -25,31 +25,13 @@ Typescript types and interfaces for the [Music Assistant Queue Actions](https://
|
|
|
25
25
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
26
26
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
- [
|
|
30
|
-
- [
|
|
31
|
-
- [
|
|
32
|
-
- [
|
|
33
|
-
- [Music Player Config](#music-player-config)
|
|
34
|
-
- [Music Player Hidden Elements Config](#music-player-hidden-elements-config)
|
|
35
|
-
- [Music Player Layout Config](#music-player-layout-config)
|
|
36
|
-
- [Queue Config](#queue-config)
|
|
37
|
-
- [Queue Hidden Elements Config](#queue-hidden-elements-config)
|
|
38
|
-
- [Media Browser Config](#media-browser-config)
|
|
39
|
-
- [Media Browser Hidden Elements Config](#media-browser-hidden-elements-config)
|
|
40
|
-
- [Favorites Config](#favorites-config)
|
|
41
|
-
- [Recommendations Config](#recommendations-config)
|
|
42
|
-
- [Sections Config](#sections-config)
|
|
43
|
-
- [Section Item Config](#section-item-config)
|
|
44
|
-
- [Players Config](#players-config)
|
|
45
|
-
- [Players Hidden Elements Config](#players-hidden-elements-config)
|
|
28
|
+
- [Installation](#installation)
|
|
29
|
+
- [Usage](#usage)
|
|
30
|
+
- [Service Schemas](#service-schemas)
|
|
31
|
+
- [Response Schemas](#response-schemas)
|
|
32
|
+
- [Websocket Commands](#websocket-commands)
|
|
46
33
|
- [FAQs](#faqs)
|
|
47
|
-
- [
|
|
48
|
-
- [The media browser won't display any items for:](#the-media-browser-wont-display-any-items-for)
|
|
49
|
-
- [I'm not seeing any artwork in the queue or media browser!](#im-not-seeing-any-artwork-in-the-queue-or-media-browser)
|
|
50
|
-
- [How do I theme the card?](#how-do-i-theme-the-card)
|
|
51
|
-
- [Can this card work in my local language?](#can-this-card-work-in-my-local-language)
|
|
52
|
-
- [I am having issues with this card on my iOS/OSX device but it works fine elsewhere.](#i-am-having-issues-with-this-card-on-my-iososx-device-but-it-works-fine-elsewhere)
|
|
34
|
+
- [I would like to sponsor you/the card and/or pay to add a new feature!](#i-would-like-to-sponsor-youthe-card-andor-pay-to-add-a-new-feature)
|
|
53
35
|
- [I have other questions or issues not addressed](#i-have-other-questions-or-issues-not-addressed)
|
|
54
36
|
- [Contributing](#contributing)
|
|
55
37
|
- [Developing](#developing)
|
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": "0.7.
|
|
6
|
+
"version": "0.7.1",
|
|
7
7
|
"module": "mass-queue-types.js",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"home-assistant",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "yarn rollup",
|
|
46
|
-
"prettier": "prettier ./
|
|
46
|
+
"prettier": "prettier ./packages --write",
|
|
47
47
|
"lint": "eslint packages/**/*.ts --max-warnings 0 --no-warn-ignored",
|
|
48
48
|
"full": "echo 'Generating TOC' && yarn docs && echo 'Running Prettier' && yarn prettier && echo 'Linting' && yarn lint",
|
|
49
49
|
"docs": "doctoc ./README.md --maxlevel 2"
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { baseMassQueueServiceWithResponseSchema } from "../utils.js";
|
|
2
2
|
|
|
3
3
|
export interface getGroupVolumePartialServiceResponse {
|
|
4
|
-
volume_level: number
|
|
4
|
+
volume_level: number;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export interface getGroupVolumeServiceResponse {
|
|
8
|
-
response: getGroupVolumePartialSchema
|
|
8
|
+
response: getGroupVolumePartialSchema;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export interface getGroupVolumePartialSchema {
|
|
12
12
|
entity: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export interface getGroupVolumeServiceSchema
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
export interface getGroupVolumeServiceSchema
|
|
16
|
+
extends baseMassQueueServiceWithResponseSchema {
|
|
17
|
+
service: "get_group_volume";
|
|
18
|
+
service_data: getGroupVolumePartialSchema;
|
|
19
|
+
}
|
|
@@ -13,14 +13,14 @@ export interface queueItem {
|
|
|
13
13
|
show_artist_name: boolean;
|
|
14
14
|
show_move_up_next: boolean;
|
|
15
15
|
favorite: boolean;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
|
|
18
18
|
export type queueItems = queueItem[];
|
|
19
19
|
|
|
20
20
|
type getQueueItemsPartialResponse = Record<string, queueItems>;
|
|
21
21
|
|
|
22
22
|
export interface getQueueItemsServiceResponse {
|
|
23
|
-
response: getQueueItemsPartialResponse
|
|
23
|
+
response: getQueueItemsPartialResponse;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface getQueueItemsPartialSchema {
|
|
@@ -31,7 +31,8 @@ export interface getQueueItemsPartialSchema {
|
|
|
31
31
|
offset?: number;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export interface getQueueItemsServiceSchema
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
export interface getQueueItemsServiceSchema
|
|
35
|
+
extends baseMassQueueServiceWithResponseSchema {
|
|
36
|
+
service: "get_queue_items";
|
|
37
|
+
service_data: getQueueItemsPartialSchema;
|
|
38
|
+
}
|
|
@@ -34,7 +34,8 @@ export interface getRecommendationsPartialSchema {
|
|
|
34
34
|
entity: string;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export interface getRecommendationsServiceSchema
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
export interface getRecommendationsServiceSchema
|
|
38
|
+
extends baseMassQueueServiceWithResponseSchema {
|
|
39
|
+
service: "get_recommendations";
|
|
40
|
+
service_data: getRecommendationsPartialSchema;
|
|
41
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseMassQueueServiceSchema,
|
|
3
|
-
queueItemPartialSchema
|
|
3
|
+
queueItemPartialSchema,
|
|
4
4
|
} from "../utils.js";
|
|
5
5
|
|
|
6
|
-
export interface moveQueueItemDownServiceSchema
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export interface moveQueueItemDownServiceSchema
|
|
7
|
+
extends baseMassQueueServiceSchema {
|
|
8
|
+
service: "move_queue_item_down";
|
|
9
|
+
service_data: queueItemPartialSchema;
|
|
9
10
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseMassQueueServiceSchema,
|
|
3
|
-
queueItemPartialSchema
|
|
3
|
+
queueItemPartialSchema,
|
|
4
4
|
} from "../utils.js";
|
|
5
5
|
|
|
6
|
-
export interface moveQueueItemNextServiceSchema
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export interface moveQueueItemNextServiceSchema
|
|
7
|
+
extends baseMassQueueServiceSchema {
|
|
8
|
+
service: "move_queue_item_next";
|
|
9
|
+
service_data: queueItemPartialSchema;
|
|
9
10
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseMassQueueServiceSchema,
|
|
3
|
-
queueItemPartialSchema
|
|
3
|
+
queueItemPartialSchema,
|
|
4
4
|
} from "../utils.js";
|
|
5
5
|
|
|
6
|
-
export interface moveQueueItemUpServiceSchema
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export interface moveQueueItemUpServiceSchema
|
|
7
|
+
extends baseMassQueueServiceSchema {
|
|
8
|
+
service: "move_queue_item_up";
|
|
9
|
+
service_data: queueItemPartialSchema;
|
|
9
10
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseMassQueueServiceSchema,
|
|
3
|
-
queueItemPartialSchema
|
|
3
|
+
queueItemPartialSchema,
|
|
4
4
|
} from "../utils.js";
|
|
5
5
|
|
|
6
6
|
export interface playQueueItemServiceSchema extends baseMassQueueServiceSchema {
|
|
7
|
-
service: "play_queue_item"
|
|
8
|
-
service_data: queueItemPartialSchema
|
|
7
|
+
service: "play_queue_item";
|
|
8
|
+
service_data: queueItemPartialSchema;
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseMassQueueServiceSchema,
|
|
3
|
-
queueItemPartialSchema
|
|
3
|
+
queueItemPartialSchema,
|
|
4
4
|
} from "../utils.js";
|
|
5
5
|
|
|
6
6
|
export interface removeServiceSchema extends baseMassQueueServiceSchema {
|
|
7
|
-
service: "remove_queue_item"
|
|
8
|
-
service_data: queueItemPartialSchema
|
|
7
|
+
service: "remove_queue_item";
|
|
8
|
+
service_data: queueItemPartialSchema;
|
|
9
9
|
}
|
|
@@ -3,7 +3,6 @@ import { baseMassQueueServiceSchema } from "../utils.js";
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
4
|
type dataSchema = Record<string, any>;
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
export interface sendCommandPartialSchema {
|
|
8
7
|
command: string;
|
|
9
8
|
config_entry_id: string;
|
|
@@ -11,6 +10,6 @@ export interface sendCommandPartialSchema {
|
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
export interface sendCommandServiceSchema extends baseMassQueueServiceSchema {
|
|
14
|
-
service: "send_command"
|
|
15
|
-
service_data: sendCommandPartialSchema
|
|
16
|
-
}
|
|
13
|
+
service: "send_command";
|
|
14
|
+
service_data: sendCommandPartialSchema;
|
|
15
|
+
}
|
|
@@ -5,7 +5,8 @@ export interface setGroupVolumePartialSchema {
|
|
|
5
5
|
volume_level: number;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export interface setGroupVolumeServiceSchema
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export interface setGroupVolumeServiceSchema
|
|
9
|
+
extends baseMassQueueServiceSchema {
|
|
10
|
+
service: "set_group_volume";
|
|
11
|
+
service_data: setGroupVolumePartialSchema;
|
|
11
12
|
}
|
|
@@ -4,7 +4,8 @@ export interface unfavoriteCurrentItemPartialSchema {
|
|
|
4
4
|
entity: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export interface unfavoriteCurrentItemServiceSchema
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export interface unfavoriteCurrentItemServiceSchema
|
|
8
|
+
extends baseMassQueueServiceSchema {
|
|
9
|
+
service: "unfavorite_current_item";
|
|
10
|
+
service_data: unfavoriteCurrentItemPartialSchema;
|
|
10
11
|
}
|
package/packages/utils.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export interface baseMassQueueServiceSchema {
|
|
2
|
-
type: "call_service"
|
|
3
|
-
domain: "mass_queue"
|
|
4
|
-
service: string
|
|
2
|
+
type: "call_service";
|
|
3
|
+
domain: "mass_queue";
|
|
4
|
+
service: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export interface baseMassQueueServiceWithResponseSchema
|
|
7
|
+
export interface baseMassQueueServiceWithResponseSchema
|
|
8
|
+
extends baseMassQueueServiceSchema {
|
|
8
9
|
return_response: true;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export interface queueItemPartialSchema {
|
|
12
13
|
entity: string;
|
|
13
14
|
queue_item_id: string;
|
|
14
|
-
}
|
|
15
|
+
}
|
package/packages/ws/get_info.ts
CHANGED