javascript-ampache 1.1.0 → 1.1.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/dist/albums/index.d.ts +7 -13
- package/dist/albums/types.d.ts +9 -4
- package/dist/artists/index.d.ts +8 -14
- package/dist/artists/types.d.ts +10 -5
- package/dist/auth/index.d.ts +1 -1
- package/dist/bookmarks/index.d.ts +20 -21
- package/dist/bookmarks/types.d.ts +7 -2
- package/dist/catalogs/index.d.ts +9 -11
- package/dist/catalogs/types.d.ts +8 -3
- package/dist/genres/index.d.ts +4 -6
- package/dist/genres/types.d.ts +6 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.m.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/labels/index.d.ts +4 -6
- package/dist/labels/types.d.ts +6 -1
- package/dist/licenses/index.d.ts +4 -6
- package/dist/licenses/types.d.ts +6 -1
- package/dist/live-streams/index.d.ts +8 -10
- package/dist/live-streams/types.d.ts +6 -1
- package/dist/playlists/index.d.ts +15 -25
- package/dist/playlists/types.d.ts +7 -2
- package/dist/podcasts/index.d.ts +10 -16
- package/dist/podcasts/types.d.ts +20 -5
- package/dist/preferences/index.d.ts +8 -16
- package/dist/preferences/types.d.ts +6 -1
- package/dist/shares/index.d.ts +7 -9
- package/dist/shares/types.d.ts +6 -1
- package/dist/shouts/index.d.ts +4 -4
- package/dist/shouts/types.d.ts +1 -1
- package/dist/songs/index.d.ts +12 -28
- package/dist/songs/types.d.ts +12 -2
- package/dist/system/index.d.ts +24 -24
- package/dist/system/types.d.ts +9 -9
- package/dist/users/index.d.ts +10 -10
- package/dist/users/types.d.ts +7 -2
- package/dist/videos/index.d.ts +5 -9
- package/dist/videos/types.d.ts +12 -2
- package/package.json +1 -1
- package/src/bookmarks/index.ts +2 -1
- package/src/playlists/index.ts +1 -3
package/dist/labels/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, UID } from
|
|
1
|
+
import { LabelResponse, LabelsResponse } from "./types";
|
|
2
|
+
import { Base, BinaryBoolean, ExtendedPagination, UID } from "../base";
|
|
3
3
|
export declare class Labels extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This returns labels based on the specified filter
|
|
@@ -19,9 +19,7 @@ export declare class Labels extends Base {
|
|
|
19
19
|
exact?: BinaryBoolean;
|
|
20
20
|
add?: Date;
|
|
21
21
|
update?: Date;
|
|
22
|
-
} & ExtendedPagination): Promise<
|
|
23
|
-
label: Label[];
|
|
24
|
-
}>;
|
|
22
|
+
} & ExtendedPagination): Promise<LabelsResponse>;
|
|
25
23
|
/**
|
|
26
24
|
* This returns a single label
|
|
27
25
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -30,5 +28,5 @@ export declare class Labels extends Base {
|
|
|
30
28
|
*/
|
|
31
29
|
label(params: {
|
|
32
30
|
filter: UID;
|
|
33
|
-
}): Promise<
|
|
31
|
+
}): Promise<LabelResponse>;
|
|
34
32
|
}
|
package/dist/labels/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UID } from "../base";
|
|
2
|
-
export type
|
|
2
|
+
export type LabelResponse = {
|
|
3
3
|
id: UID;
|
|
4
4
|
name: string;
|
|
5
5
|
artists: number;
|
|
@@ -11,3 +11,8 @@ export type Label = {
|
|
|
11
11
|
website: string | null;
|
|
12
12
|
user: UID;
|
|
13
13
|
};
|
|
14
|
+
export type LabelsResponse = {
|
|
15
|
+
total_count: number;
|
|
16
|
+
md5: string;
|
|
17
|
+
label: LabelResponse[];
|
|
18
|
+
};
|
package/dist/licenses/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, UID } from
|
|
1
|
+
import { LicenseResponse, LicensesResponse } from "./types";
|
|
2
|
+
import { Base, BinaryBoolean, ExtendedPagination, UID } from "../base";
|
|
3
3
|
export declare class Licenses extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This returns licenses based on the specified filter
|
|
@@ -19,9 +19,7 @@ export declare class Licenses extends Base {
|
|
|
19
19
|
exact?: BinaryBoolean;
|
|
20
20
|
add?: Date;
|
|
21
21
|
update?: Date;
|
|
22
|
-
} & ExtendedPagination): Promise<
|
|
23
|
-
license: License[];
|
|
24
|
-
}>;
|
|
22
|
+
} & ExtendedPagination): Promise<LicensesResponse>;
|
|
25
23
|
/**
|
|
26
24
|
* This returns a single license
|
|
27
25
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -30,5 +28,5 @@ export declare class Licenses extends Base {
|
|
|
30
28
|
*/
|
|
31
29
|
license(params: {
|
|
32
30
|
filter: UID;
|
|
33
|
-
}): Promise<
|
|
31
|
+
}): Promise<LicenseResponse>;
|
|
34
32
|
}
|
package/dist/licenses/types.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { UID } from "../base";
|
|
2
|
-
export type
|
|
2
|
+
export type LicenseResponse = {
|
|
3
3
|
id: UID;
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
6
|
external_link: string;
|
|
7
7
|
};
|
|
8
|
+
export type LicensesResponse = {
|
|
9
|
+
total_count: number;
|
|
10
|
+
md5: string;
|
|
11
|
+
license: LicenseResponse[];
|
|
12
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, Success, UID } from
|
|
1
|
+
import { LiveStreamResponse, LiveStreamsResponse } from "./types";
|
|
2
|
+
import { Base, BinaryBoolean, ExtendedPagination, Success, UID } from "../base";
|
|
3
3
|
export declare class LiveStreams extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This returns live_streams based on the specified filter
|
|
@@ -19,9 +19,7 @@ export declare class LiveStreams extends Base {
|
|
|
19
19
|
exact?: BinaryBoolean;
|
|
20
20
|
add?: Date;
|
|
21
21
|
update?: Date;
|
|
22
|
-
} & ExtendedPagination): Promise<
|
|
23
|
-
live_stream: LiveStream[];
|
|
24
|
-
}>;
|
|
22
|
+
} & ExtendedPagination): Promise<LiveStreamsResponse>;
|
|
25
23
|
/**
|
|
26
24
|
* This returns a single live_stream
|
|
27
25
|
* @remarks MINIMUM_API_VERSION=5.1.0
|
|
@@ -30,7 +28,7 @@ export declare class LiveStreams extends Base {
|
|
|
30
28
|
*/
|
|
31
29
|
liveStream(params: {
|
|
32
30
|
filter: UID;
|
|
33
|
-
}): Promise<
|
|
31
|
+
}): Promise<LiveStreamResponse>;
|
|
34
32
|
/**
|
|
35
33
|
* Create a live_stream (radio station) object.
|
|
36
34
|
* ACCESS REQUIRED: 50 (Content Manager)
|
|
@@ -45,10 +43,10 @@ export declare class LiveStreams extends Base {
|
|
|
45
43
|
liveStreamCreate(params: {
|
|
46
44
|
name: string;
|
|
47
45
|
url: string;
|
|
48
|
-
codec:
|
|
46
|
+
codec: "mp3" | "flac" | "ogg" | "vorbis" | "opus" | "aac" | "alac";
|
|
49
47
|
catalog: string;
|
|
50
48
|
site_url?: string;
|
|
51
|
-
}): Promise<
|
|
49
|
+
}): Promise<LiveStreamResponse>;
|
|
52
50
|
/**
|
|
53
51
|
* Edit a live_stream (radio station) object.
|
|
54
52
|
* ACCESS REQUIRED: 50 (Content Manager)
|
|
@@ -65,10 +63,10 @@ export declare class LiveStreams extends Base {
|
|
|
65
63
|
filter: string;
|
|
66
64
|
name?: string;
|
|
67
65
|
url?: string;
|
|
68
|
-
codec?:
|
|
66
|
+
codec?: "mp3" | "flac" | "ogg" | "vorbis" | "opus" | "aac" | "alac";
|
|
69
67
|
catalog?: string;
|
|
70
68
|
site_url?: string;
|
|
71
|
-
}): Promise<
|
|
69
|
+
}): Promise<LiveStreamResponse>;
|
|
72
70
|
/**
|
|
73
71
|
* Delete a live_stream (radio station) object (if it exists)
|
|
74
72
|
* ACCESS REQUIRED: 50 (Content Manager)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UID } from "../base";
|
|
2
|
-
export type
|
|
2
|
+
export type LiveStreamResponse = {
|
|
3
3
|
id: UID;
|
|
4
4
|
name: string;
|
|
5
5
|
url: string;
|
|
@@ -7,3 +7,8 @@ export type LiveStream = {
|
|
|
7
7
|
catalog: UID;
|
|
8
8
|
site_url: string;
|
|
9
9
|
};
|
|
10
|
+
export type LiveStreamsResponse = {
|
|
11
|
+
total_count: number;
|
|
12
|
+
md5: string;
|
|
13
|
+
live_stream: LiveStreamResponse[];
|
|
14
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Base, BinaryBoolean, ExtendedPagination, Pagination, Success, UID } from
|
|
1
|
+
import { PlaylistResponse, PlaylistsResponse } from "./types";
|
|
2
|
+
import { SongsResponse } from "../songs/types";
|
|
3
|
+
import { Base, BinaryBoolean, ExtendedPagination, Pagination, Success, UID } from "../base";
|
|
4
4
|
export declare class Playlists extends Base {
|
|
5
5
|
/**
|
|
6
6
|
* This returns playlists based on the specified filter
|
|
@@ -24,9 +24,7 @@ export declare class Playlists extends Base {
|
|
|
24
24
|
update?: Date;
|
|
25
25
|
hide_search?: BinaryBoolean;
|
|
26
26
|
show_dupes?: BinaryBoolean;
|
|
27
|
-
} & ExtendedPagination): Promise<
|
|
28
|
-
playlist: Playlist[];
|
|
29
|
-
}>;
|
|
27
|
+
} & ExtendedPagination): Promise<PlaylistsResponse>;
|
|
30
28
|
/**
|
|
31
29
|
* This returns smartlists based on the specified filter. NOTE: Filtered from Playlists() so pagination is invalid.
|
|
32
30
|
* @remarks MINIMUM_API_VERSION=380001
|
|
@@ -43,9 +41,7 @@ export declare class Playlists extends Base {
|
|
|
43
41
|
add?: Date;
|
|
44
42
|
update?: Date;
|
|
45
43
|
show_dupes?: BinaryBoolean;
|
|
46
|
-
}): Promise<
|
|
47
|
-
playlist: Playlist[];
|
|
48
|
-
}>;
|
|
44
|
+
}): Promise<PlaylistsResponse>;
|
|
49
45
|
/**
|
|
50
46
|
* This returns a single playlist
|
|
51
47
|
* @remarks MINIMUM_API_VERSION=380001
|
|
@@ -54,7 +50,7 @@ export declare class Playlists extends Base {
|
|
|
54
50
|
*/
|
|
55
51
|
playlist(params: {
|
|
56
52
|
filter: UID;
|
|
57
|
-
}): Promise<
|
|
53
|
+
}): Promise<PlaylistResponse>;
|
|
58
54
|
/**
|
|
59
55
|
* This returns a user's playlists based on the specified filter
|
|
60
56
|
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
@@ -73,9 +69,7 @@ export declare class Playlists extends Base {
|
|
|
73
69
|
exact?: BinaryBoolean;
|
|
74
70
|
add?: Date;
|
|
75
71
|
update?: Date;
|
|
76
|
-
} & ExtendedPagination): Promise<
|
|
77
|
-
playlist: Playlist[];
|
|
78
|
-
}>;
|
|
72
|
+
} & ExtendedPagination): Promise<PlaylistsResponse>;
|
|
79
73
|
/**
|
|
80
74
|
* This returns a user's smartlists based on the specified filter
|
|
81
75
|
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
@@ -94,9 +88,7 @@ export declare class Playlists extends Base {
|
|
|
94
88
|
exact?: BinaryBoolean;
|
|
95
89
|
add?: Date;
|
|
96
90
|
update?: Date;
|
|
97
|
-
} & ExtendedPagination): Promise<
|
|
98
|
-
playlist: Playlist[];
|
|
99
|
-
}>;
|
|
91
|
+
} & ExtendedPagination): Promise<PlaylistsResponse>;
|
|
100
92
|
/**
|
|
101
93
|
* This creates a new playlist and returns it
|
|
102
94
|
* @remarks MINIMUM_API_VERSION=380001
|
|
@@ -106,8 +98,8 @@ export declare class Playlists extends Base {
|
|
|
106
98
|
*/
|
|
107
99
|
playlistCreate(params: {
|
|
108
100
|
name: string;
|
|
109
|
-
type?:
|
|
110
|
-
}): Promise<
|
|
101
|
+
type?: "public" | "private";
|
|
102
|
+
}): Promise<PlaylistResponse>;
|
|
111
103
|
/**
|
|
112
104
|
* This adds an item to a playlist
|
|
113
105
|
* @remarks MINIMUM_API_VERSION=6.3.0
|
|
@@ -119,7 +111,7 @@ export declare class Playlists extends Base {
|
|
|
119
111
|
playlistAdd(params: {
|
|
120
112
|
filter: UID;
|
|
121
113
|
id: UID;
|
|
122
|
-
type:
|
|
114
|
+
type: "song" | "album" | "artist" | "playlist";
|
|
123
115
|
}): Promise<Success>;
|
|
124
116
|
/**
|
|
125
117
|
* This modifies name and type of the playlist.
|
|
@@ -136,7 +128,7 @@ export declare class Playlists extends Base {
|
|
|
136
128
|
playlistEdit(params: {
|
|
137
129
|
filter: UID;
|
|
138
130
|
name?: string;
|
|
139
|
-
type?:
|
|
131
|
+
type?: "public" | "private";
|
|
140
132
|
owner?: string;
|
|
141
133
|
items?: string;
|
|
142
134
|
tracks?: string;
|
|
@@ -191,13 +183,11 @@ export declare class Playlists extends Base {
|
|
|
191
183
|
* @see {@link https://ampache.org/api/api-json-methods#playlist_generate}
|
|
192
184
|
*/
|
|
193
185
|
playlistGenerate(params?: {
|
|
194
|
-
mode?:
|
|
186
|
+
mode?: "recent" | "forgotten" | "unplayed" | "random";
|
|
195
187
|
filter?: string;
|
|
196
188
|
album?: number;
|
|
197
189
|
artist?: number;
|
|
198
190
|
flag?: BinaryBoolean;
|
|
199
|
-
format?:
|
|
200
|
-
} & Pagination): Promise<
|
|
201
|
-
song: Song[];
|
|
202
|
-
}>;
|
|
191
|
+
format?: "song" | "index" | "id";
|
|
192
|
+
} & Pagination): Promise<SongsResponse>;
|
|
203
193
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { UID } from "../base";
|
|
2
|
-
export type
|
|
2
|
+
export type PlaylistResponse = {
|
|
3
3
|
id: UID;
|
|
4
4
|
name: string;
|
|
5
5
|
owner: string;
|
|
6
6
|
items: number;
|
|
7
|
-
type:
|
|
7
|
+
type: "public" | "private";
|
|
8
8
|
art: string;
|
|
9
9
|
has_art: boolean;
|
|
10
10
|
flag: boolean;
|
|
11
11
|
rating: number | null;
|
|
12
12
|
averagerating: number | null;
|
|
13
13
|
};
|
|
14
|
+
export type PlaylistsResponse = {
|
|
15
|
+
total_count: number;
|
|
16
|
+
md5: string;
|
|
17
|
+
playlist: PlaylistResponse[];
|
|
18
|
+
};
|
package/dist/podcasts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Base, ExtendedPagination, Pagination, Success, UID } from
|
|
1
|
+
import { PodcastResponse, PodcastsResponse, PodcastEpisodeResponse, PodcastEpisodesResponse, DeletedPodcastEpisodesResponse } from "./types";
|
|
2
|
+
import { Base, ExtendedPagination, Pagination, Success, UID } from "../base";
|
|
3
3
|
export declare class Podcasts extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Get information about podcasts
|
|
@@ -14,10 +14,8 @@ export declare class Podcasts extends Base {
|
|
|
14
14
|
*/
|
|
15
15
|
podcasts(params?: {
|
|
16
16
|
filter?: string;
|
|
17
|
-
include?:
|
|
18
|
-
} & ExtendedPagination): Promise<
|
|
19
|
-
podcast: Podcast[];
|
|
20
|
-
}>;
|
|
17
|
+
include?: "episodes";
|
|
18
|
+
} & ExtendedPagination): Promise<PodcastsResponse>;
|
|
21
19
|
/**
|
|
22
20
|
* Get information about podcasts
|
|
23
21
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -29,8 +27,8 @@ export declare class Podcasts extends Base {
|
|
|
29
27
|
*/
|
|
30
28
|
podcast(params?: {
|
|
31
29
|
filter: UID;
|
|
32
|
-
include?:
|
|
33
|
-
} & Pagination): Promise<
|
|
30
|
+
include?: "episodes";
|
|
31
|
+
} & Pagination): Promise<PodcastResponse>;
|
|
34
32
|
/**
|
|
35
33
|
* Create a podcast that can be used by anyone to stream media.
|
|
36
34
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -41,7 +39,7 @@ export declare class Podcasts extends Base {
|
|
|
41
39
|
podcastCreate(params: {
|
|
42
40
|
url: string;
|
|
43
41
|
catalog: UID;
|
|
44
|
-
}): Promise<
|
|
42
|
+
}): Promise<PodcastResponse>;
|
|
45
43
|
/**
|
|
46
44
|
* Update the description and/or expiration date for an existing podcast.
|
|
47
45
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -84,9 +82,7 @@ export declare class Podcasts extends Base {
|
|
|
84
82
|
*/
|
|
85
83
|
podcastEpisodes(params: {
|
|
86
84
|
filter: UID;
|
|
87
|
-
} & ExtendedPagination): Promise<
|
|
88
|
-
podcast_episode: PodcastEpisode[];
|
|
89
|
-
}>;
|
|
85
|
+
} & ExtendedPagination): Promise<PodcastEpisodesResponse>;
|
|
90
86
|
/**
|
|
91
87
|
* Get the podcast_episode from a UID
|
|
92
88
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -95,7 +91,7 @@ export declare class Podcasts extends Base {
|
|
|
95
91
|
*/
|
|
96
92
|
podcastEpisode(params: {
|
|
97
93
|
filter: UID;
|
|
98
|
-
}): Promise<
|
|
94
|
+
}): Promise<PodcastEpisodeResponse>;
|
|
99
95
|
/**
|
|
100
96
|
* Delete an existing podcast_episode
|
|
101
97
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -121,7 +117,5 @@ export declare class Podcasts extends Base {
|
|
|
121
117
|
* @param [params.limit]
|
|
122
118
|
* @see {@link https://ampache.org/api/api-json-methods#deleted_podcast_episodes}
|
|
123
119
|
*/
|
|
124
|
-
deletedPodcastEpisodes(params?: {} & Pagination): Promise<
|
|
125
|
-
deleted_podcast_episode: DeletedPodcastEpisode[];
|
|
126
|
-
}>;
|
|
120
|
+
deletedPodcastEpisodes(params?: {} & Pagination): Promise<DeletedPodcastEpisodesResponse>;
|
|
127
121
|
}
|
package/dist/podcasts/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UID } from "../base";
|
|
2
|
-
export type
|
|
2
|
+
export type PodcastResponse = {
|
|
3
3
|
id: UID;
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
@@ -16,9 +16,14 @@ export type Podcast = {
|
|
|
16
16
|
flag: boolean;
|
|
17
17
|
rating: number | null;
|
|
18
18
|
averaterating: number | null;
|
|
19
|
-
podcast_episode:
|
|
19
|
+
podcast_episode: PodcastEpisodeResponse[];
|
|
20
20
|
};
|
|
21
|
-
export type
|
|
21
|
+
export type PodcastsResponse = {
|
|
22
|
+
total_count: number;
|
|
23
|
+
md5: string;
|
|
24
|
+
podcast: PodcastResponse[];
|
|
25
|
+
};
|
|
26
|
+
export type PodcastEpisodeResponse = {
|
|
22
27
|
id: UID;
|
|
23
28
|
title: string;
|
|
24
29
|
name: string;
|
|
@@ -28,7 +33,7 @@ export type PodcastEpisode = {
|
|
|
28
33
|
author_full: string;
|
|
29
34
|
website: string;
|
|
30
35
|
pubdate: string;
|
|
31
|
-
state:
|
|
36
|
+
state: "completed" | "pending";
|
|
32
37
|
filelength: string;
|
|
33
38
|
filesize: string;
|
|
34
39
|
filename: string;
|
|
@@ -51,7 +56,12 @@ export type PodcastEpisode = {
|
|
|
51
56
|
playcount: number;
|
|
52
57
|
played: number;
|
|
53
58
|
};
|
|
54
|
-
export type
|
|
59
|
+
export type PodcastEpisodesResponse = {
|
|
60
|
+
total_count: number;
|
|
61
|
+
md5: string;
|
|
62
|
+
podcast_episode: PodcastEpisodeResponse[];
|
|
63
|
+
};
|
|
64
|
+
export type DeletedPodcastEpisodeResponse = {
|
|
55
65
|
id: UID;
|
|
56
66
|
addition_time: number;
|
|
57
67
|
delete_time: number;
|
|
@@ -62,3 +72,8 @@ export type DeletedPodcastEpisode = {
|
|
|
62
72
|
total_skip: number;
|
|
63
73
|
podcast: UID;
|
|
64
74
|
};
|
|
75
|
+
export type DeletedPodcastEpisodesResponse = {
|
|
76
|
+
total_count: number;
|
|
77
|
+
md5: string;
|
|
78
|
+
deleted_podcast_episode: DeletedPodcastEpisodeResponse[];
|
|
79
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Base, BinaryBoolean, Success } from
|
|
2
|
-
import {
|
|
1
|
+
import { Base, BinaryBoolean, Success } from "../base";
|
|
2
|
+
import { PreferenceResponse, PreferencesResponse } from "./types";
|
|
3
3
|
export declare class Preferences extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* Get your server preferences
|
|
@@ -7,9 +7,7 @@ export declare class Preferences extends Base {
|
|
|
7
7
|
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
8
8
|
* @see {@link https://ampache.org/api/api-json-methods#system_preferences}
|
|
9
9
|
*/
|
|
10
|
-
systemPreferences(): Promise<
|
|
11
|
-
preference: Preference[];
|
|
12
|
-
}>;
|
|
10
|
+
systemPreferences(): Promise<PreferencesResponse>;
|
|
13
11
|
/**
|
|
14
12
|
* Get your system preference by name
|
|
15
13
|
* ACCESS REQUIRED: 100 (Admin)
|
|
@@ -19,17 +17,13 @@ export declare class Preferences extends Base {
|
|
|
19
17
|
*/
|
|
20
18
|
systemPreference(params: {
|
|
21
19
|
filter: string;
|
|
22
|
-
}): Promise<
|
|
23
|
-
preference: Preference;
|
|
24
|
-
}>;
|
|
20
|
+
}): Promise<PreferenceResponse>;
|
|
25
21
|
/**
|
|
26
22
|
* Get your user preferences
|
|
27
23
|
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
28
24
|
* @see {@link https://ampache.org/api/api-json-methods#user_preferences}
|
|
29
25
|
*/
|
|
30
|
-
userPreferences(): Promise<
|
|
31
|
-
preference: Preference[];
|
|
32
|
-
}>;
|
|
26
|
+
userPreferences(): Promise<PreferencesResponse>;
|
|
33
27
|
/**
|
|
34
28
|
* Get your user preference by name
|
|
35
29
|
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
@@ -38,9 +32,7 @@ export declare class Preferences extends Base {
|
|
|
38
32
|
*/
|
|
39
33
|
userPreference(params: {
|
|
40
34
|
filter: string;
|
|
41
|
-
}): Promise<
|
|
42
|
-
preference: Preference;
|
|
43
|
-
}>;
|
|
35
|
+
}): Promise<PreferenceResponse>;
|
|
44
36
|
/**
|
|
45
37
|
* Add a new preference to your server
|
|
46
38
|
* ACCESS REQUIRED: 100 (Admin)
|
|
@@ -55,9 +47,9 @@ export declare class Preferences extends Base {
|
|
|
55
47
|
*/
|
|
56
48
|
preferenceCreate(params: {
|
|
57
49
|
filter: string;
|
|
58
|
-
type:
|
|
50
|
+
type: "boolean" | "integer" | "string" | "special";
|
|
59
51
|
default: string | number;
|
|
60
|
-
category:
|
|
52
|
+
category: "interface" | "internal" | "options" | "playlist" | "plugins" | "streaming";
|
|
61
53
|
description?: string;
|
|
62
54
|
subcategory?: string;
|
|
63
55
|
level?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UID } from "../base";
|
|
2
|
-
export type
|
|
2
|
+
export type PreferenceResponse = {
|
|
3
3
|
id: UID;
|
|
4
4
|
name: string;
|
|
5
5
|
level: string;
|
|
@@ -9,3 +9,8 @@ export type Preference = {
|
|
|
9
9
|
category: string;
|
|
10
10
|
subcategory: string | null;
|
|
11
11
|
};
|
|
12
|
+
export type PreferencesResponse = {
|
|
13
|
+
total_count: number;
|
|
14
|
+
md5: string;
|
|
15
|
+
preference: PreferenceResponse[];
|
|
16
|
+
};
|
package/dist/shares/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Base, BinaryBoolean, ExtendedPagination, Success, UID } from
|
|
1
|
+
import { ShareResponse, SharesResponse } from "./types";
|
|
2
|
+
import { Base, BinaryBoolean, ExtendedPagination, Success, UID } from "../base";
|
|
3
3
|
export declare class Shares extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This searches the shares and returns... shares
|
|
@@ -15,9 +15,7 @@ export declare class Shares extends Base {
|
|
|
15
15
|
shares(params?: {
|
|
16
16
|
filter?: string;
|
|
17
17
|
exact?: BinaryBoolean;
|
|
18
|
-
} & ExtendedPagination): Promise<
|
|
19
|
-
share: Share[];
|
|
20
|
-
}>;
|
|
18
|
+
} & ExtendedPagination): Promise<SharesResponse>;
|
|
21
19
|
/**
|
|
22
20
|
* Return a share from UID
|
|
23
21
|
* @remarks MINIMUM_API_VERSION=420000
|
|
@@ -26,22 +24,22 @@ export declare class Shares extends Base {
|
|
|
26
24
|
*/
|
|
27
25
|
share(params: {
|
|
28
26
|
filter: UID;
|
|
29
|
-
}): Promise<
|
|
27
|
+
}): Promise<ShareResponse>;
|
|
30
28
|
/**
|
|
31
29
|
* Create a public url that can be used by anyone to stream media.
|
|
32
30
|
* @remarks MINIMUM_API_VERSION=420000
|
|
33
31
|
* @param params.filter UID of object you are sharing
|
|
34
|
-
* @param params.type ('song', 'album', 'artist')
|
|
32
|
+
* @param params.type ('song', 'album', 'artist', 'playlist', 'podcast', 'podcast_episode', 'video')
|
|
35
33
|
* @param [params.description] description (will be filled for you if empty)
|
|
36
34
|
* @param [params.expires] days to keep active
|
|
37
35
|
* @see {@link https://ampache.org/api/api-json-methods#share_create}
|
|
38
36
|
*/
|
|
39
37
|
shareCreate(params: {
|
|
40
38
|
filter: UID;
|
|
41
|
-
type:
|
|
39
|
+
type: "song" | "album" | "artist" | "playlist" | "podcast" | "podcast_episode" | "video";
|
|
42
40
|
description?: string;
|
|
43
41
|
expires?: number;
|
|
44
|
-
}): Promise<
|
|
42
|
+
}): Promise<ShareResponse>;
|
|
45
43
|
/**
|
|
46
44
|
* Update the description and/or expiration date for an existing share
|
|
47
45
|
* @remarks MINIMUM_API_VERSION=420000
|
package/dist/shares/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UID } from "../base";
|
|
2
|
-
export type
|
|
2
|
+
export type ShareResponse = {
|
|
3
3
|
id: UID;
|
|
4
4
|
name: string;
|
|
5
5
|
owner: string;
|
|
@@ -16,3 +16,8 @@ export type Share = {
|
|
|
16
16
|
public_url: string;
|
|
17
17
|
description: string;
|
|
18
18
|
};
|
|
19
|
+
export type SharesResponse = {
|
|
20
|
+
total_count: number;
|
|
21
|
+
md5: string;
|
|
22
|
+
share: ShareResponse[];
|
|
23
|
+
};
|
package/dist/shouts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Base } from
|
|
1
|
+
import { ShoutResponse } from "./types";
|
|
2
|
+
import { Base } from "../base";
|
|
3
3
|
export declare class Shouts extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This gets the latest posted shouts
|
|
@@ -11,7 +11,7 @@ export declare class Shouts extends Base {
|
|
|
11
11
|
last_shouts(params?: {
|
|
12
12
|
username?: string;
|
|
13
13
|
limit?: number;
|
|
14
|
-
}): Promise<
|
|
15
|
-
shout:
|
|
14
|
+
}): Promise<{
|
|
15
|
+
shout: ShoutResponse[];
|
|
16
16
|
}>;
|
|
17
17
|
}
|