javascript-ampache 1.0.7 → 1.0.8
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 +10 -4
- package/dist/artists/index.d.ts +10 -4
- package/dist/base.d.ts +10 -0
- package/dist/bookmarks/index.d.ts +1 -1
- package/dist/catalogs/index.d.ts +6 -2
- package/dist/genres/index.d.ts +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.m.js.map +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/labels/index.d.ts +4 -2
- package/dist/licenses/index.d.ts +4 -2
- package/dist/live-streams/index.d.ts +4 -2
- package/dist/playlists/index.d.ts +11 -5
- package/dist/podcasts/index.d.ts +7 -3
- package/dist/shares/index.d.ts +4 -2
- package/dist/songs/index.d.ts +16 -6
- package/dist/system/index.d.ts +15 -7
- package/dist/users/index.d.ts +6 -2
- package/package.json +6 -6
- package/src/albums/index.ts +10 -4
- package/src/artists/index.ts +10 -4
- package/src/base.ts +11 -0
- package/src/bookmarks/index.ts +1 -1
- package/src/catalogs/index.ts +6 -2
- package/src/genres/index.ts +4 -2
- package/src/labels/index.ts +4 -2
- package/src/licenses/index.ts +4 -2
- package/src/live-streams/index.ts +4 -2
- package/src/playlists/index.ts +11 -5
- package/src/podcasts/index.ts +7 -3
- package/src/shares/index.ts +4 -2
- package/src/songs/index.ts +16 -6
- package/src/system/index.ts +15 -7
- package/src/users/index.ts +6 -2
package/dist/albums/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Album } from './types';
|
|
2
|
-
import { Base, BinaryBoolean,
|
|
2
|
+
import { Base, BinaryBoolean, ExtendedPagination, UID } from '../base';
|
|
3
3
|
export declare class Albums extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This returns albums based on the provided search filters
|
|
@@ -11,6 +11,8 @@ export declare class Albums extends Base {
|
|
|
11
11
|
* @param [params.include] albums, songs (include child objects in the response)
|
|
12
12
|
* @param [params.offset]
|
|
13
13
|
* @param [params.limit]
|
|
14
|
+
* @param [params.cond]
|
|
15
|
+
* @param [params.sort]
|
|
14
16
|
* @see {@link https://ampache.org/api/api-json-methods#albums}
|
|
15
17
|
*/
|
|
16
18
|
albums(params?: {
|
|
@@ -19,7 +21,7 @@ export declare class Albums extends Base {
|
|
|
19
21
|
add?: Date;
|
|
20
22
|
update?: Date;
|
|
21
23
|
include?: "albums" | "songs";
|
|
22
|
-
} &
|
|
24
|
+
} & ExtendedPagination): Promise<Album[] | {
|
|
23
25
|
album: Album[];
|
|
24
26
|
}>;
|
|
25
27
|
/**
|
|
@@ -39,11 +41,13 @@ export declare class Albums extends Base {
|
|
|
39
41
|
* @param params.filter UID to find
|
|
40
42
|
* @param [params.offset]
|
|
41
43
|
* @param [params.limit]
|
|
44
|
+
* @param [params.cond]
|
|
45
|
+
* @param [params.sort]
|
|
42
46
|
* @see {@link https://ampache.org/api/api-json-methods#artist_albums}
|
|
43
47
|
*/
|
|
44
48
|
artistAlbums(params: {
|
|
45
49
|
filter: UID;
|
|
46
|
-
} &
|
|
50
|
+
} & ExtendedPagination): Promise<Album[] | {
|
|
47
51
|
album: Album[];
|
|
48
52
|
}>;
|
|
49
53
|
/**
|
|
@@ -52,11 +56,13 @@ export declare class Albums extends Base {
|
|
|
52
56
|
* @param params.filter UID to find
|
|
53
57
|
* @param [params.offset]
|
|
54
58
|
* @param [params.limit]
|
|
59
|
+
* @param [params.cond]
|
|
60
|
+
* @param [params.sort]
|
|
55
61
|
* @see {@link https://ampache.org/api/api-json-methods#genre_albums}
|
|
56
62
|
*/
|
|
57
63
|
genreAlbums(params?: {
|
|
58
64
|
filter: UID;
|
|
59
|
-
} &
|
|
65
|
+
} & ExtendedPagination): Promise<Album[] | {
|
|
60
66
|
album: Album[];
|
|
61
67
|
}>;
|
|
62
68
|
}
|
package/dist/artists/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Artist } from './types';
|
|
2
|
-
import { Base, BinaryBoolean,
|
|
2
|
+
import { Base, BinaryBoolean, ExtendedPagination, UID } from '../base';
|
|
3
3
|
export declare class Artists extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This takes a collection of inputs and returns artist objects
|
|
@@ -12,6 +12,8 @@ export declare class Artists extends Base {
|
|
|
12
12
|
* @param [params.album_artist] 0, 1 (if true filter for album artists only)
|
|
13
13
|
* @param [params.offset]
|
|
14
14
|
* @param [params.limit]
|
|
15
|
+
* @param [params.cond]
|
|
16
|
+
* @param [params.sort]
|
|
15
17
|
* @see {@link https://ampache.org/api/api-json-methods#artists}
|
|
16
18
|
*/
|
|
17
19
|
artists(params?: {
|
|
@@ -21,7 +23,7 @@ export declare class Artists extends Base {
|
|
|
21
23
|
update?: Date;
|
|
22
24
|
include?: 'albums' | 'songs';
|
|
23
25
|
album_artist?: BinaryBoolean;
|
|
24
|
-
} &
|
|
26
|
+
} & ExtendedPagination): Promise<Artist[] | {
|
|
25
27
|
artist: Artist[];
|
|
26
28
|
}>;
|
|
27
29
|
/**
|
|
@@ -41,11 +43,13 @@ export declare class Artists extends Base {
|
|
|
41
43
|
* @param params.filter UID to find
|
|
42
44
|
* @param [params.offset]
|
|
43
45
|
* @param [params.limit]
|
|
46
|
+
* @param [params.cond]
|
|
47
|
+
* @param [params.sort]
|
|
44
48
|
* @see {@link https://ampache.org/api/api-json-methods#genre_artists}
|
|
45
49
|
*/
|
|
46
50
|
genreArtists(params: {
|
|
47
51
|
filter: UID;
|
|
48
|
-
} &
|
|
52
|
+
} & ExtendedPagination): Promise<Artist[] | {
|
|
49
53
|
artist: Artist[];
|
|
50
54
|
}>;
|
|
51
55
|
/**
|
|
@@ -54,11 +58,13 @@ export declare class Artists extends Base {
|
|
|
54
58
|
* @param params.filter UID of find
|
|
55
59
|
* @param [params.offset]
|
|
56
60
|
* @param [params.limit]
|
|
61
|
+
* @param [params.cond]
|
|
62
|
+
* @param [params.sort]
|
|
57
63
|
* @see {@link https://ampache.org/api/api-json-methods#label_artists}
|
|
58
64
|
*/
|
|
59
65
|
labelArtists(params: {
|
|
60
66
|
filter: UID;
|
|
61
|
-
} &
|
|
67
|
+
} & ExtendedPagination): Promise<Artist[] | {
|
|
62
68
|
artist: Artist[];
|
|
63
69
|
}>;
|
|
64
70
|
}
|
package/dist/base.d.ts
CHANGED
|
@@ -14,6 +14,16 @@ export type Pagination = {
|
|
|
14
14
|
offset?: number;
|
|
15
15
|
limit?: number;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* @param [offset] Return results starting from this index position
|
|
19
|
+
* @param [limit] Maximum number of results to return
|
|
20
|
+
* @param [cond] Apply additional filters to the browse using ; separated comma string pairs (e.g. 'filter1,value1;filter2,value2')
|
|
21
|
+
* @param [sort] Sort name or comma-separated key pair. (e.g. 'name,order') Default order 'ASC' (e.g. 'name,ASC' == 'name')
|
|
22
|
+
*/
|
|
23
|
+
export type ExtendedPagination = Pagination & {
|
|
24
|
+
cond?: string;
|
|
25
|
+
sort?: string;
|
|
26
|
+
};
|
|
17
27
|
export type BinaryBoolean = 0 | 1;
|
|
18
28
|
export type UID = string | number;
|
|
19
29
|
export declare abstract class Base {
|
|
@@ -26,7 +26,7 @@ export declare class Bookmarks extends Base {
|
|
|
26
26
|
bookmark: Bookmark[];
|
|
27
27
|
}>;
|
|
28
28
|
/**
|
|
29
|
-
* Get the bookmark from
|
|
29
|
+
* Get the bookmark from its object_id and object_type.
|
|
30
30
|
* @remarks MINIMUM_API_VERSION=5.0.0
|
|
31
31
|
* @param params.filter UID to find
|
|
32
32
|
* @param params.type Object type
|
package/dist/catalogs/index.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { Catalog } from './types';
|
|
2
|
-
import { Base, Success, UID } from '../base';
|
|
2
|
+
import { Base, ExtendedPagination, Success, UID } from '../base';
|
|
3
3
|
export declare class Catalogs extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This searches the catalogs and returns... catalogs
|
|
6
6
|
* @remarks MINIMUM_API_VERSION=420000
|
|
7
7
|
* @param [params.filter] Catalog type
|
|
8
|
+
* @param [params.offset]
|
|
9
|
+
* @param [params.limit]
|
|
10
|
+
* @param [params.cond]
|
|
11
|
+
* @param [params.sort]
|
|
8
12
|
* @see {@link https://ampache.org/api/api-json-methods#catalogs}
|
|
9
13
|
*/
|
|
10
14
|
catalogs(params?: {
|
|
11
15
|
filter?: 'music' | 'clip' | 'tvshow' | 'movie' | 'personal_video' | 'podcast';
|
|
12
|
-
}): Promise<Catalog[] | {
|
|
16
|
+
} & ExtendedPagination): Promise<Catalog[] | {
|
|
13
17
|
catalog: Catalog[];
|
|
14
18
|
}>;
|
|
15
19
|
/**
|
package/dist/genres/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Genre } from './types';
|
|
2
|
-
import { Base, BinaryBoolean,
|
|
2
|
+
import { Base, BinaryBoolean, ExtendedPagination, UID } from '../base';
|
|
3
3
|
export declare class Genres extends Base {
|
|
4
4
|
/**
|
|
5
5
|
* This returns the genres (Tags) based on the specified filter
|
|
@@ -8,12 +8,14 @@ export declare class Genres extends Base {
|
|
|
8
8
|
* @param [params.exact] 0, 1 (if true filter is exact = rather than fuzzy LIKE)
|
|
9
9
|
* @param [params.offset]
|
|
10
10
|
* @param [params.limit]
|
|
11
|
+
* @param [params.cond]
|
|
12
|
+
* @param [params.sort]
|
|
11
13
|
* @see {@link https://ampache.org/api/api-json-methods#genres}
|
|
12
14
|
*/
|
|
13
15
|
genres(params?: {
|
|
14
16
|
filter?: string;
|
|
15
17
|
exact?: BinaryBoolean;
|
|
16
|
-
} &
|
|
18
|
+
} & ExtendedPagination): Promise<Genre[] | {
|
|
17
19
|
genre: Genre[];
|
|
18
20
|
}>;
|
|
19
21
|
/**
|