@jellyfin/sdk 0.9.0 → 0.10.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/README.md +5 -0
- package/lib/discovery/discovery-service.js +4 -9
- package/lib/discovery/recommended-server-discovery.js +17 -22
- package/lib/generated-client/api/activity-log-api.js +8 -11
- package/lib/generated-client/api/api-key-api.js +24 -31
- package/lib/generated-client/api/artists-api.js +24 -31
- package/lib/generated-client/api/audio-api.d.ts +12 -12
- package/lib/generated-client/api/audio-api.js +28 -37
- package/lib/generated-client/api/branding-api.js +21 -28
- package/lib/generated-client/api/channels-api.js +40 -51
- package/lib/generated-client/api/client-log-api.js +8 -11
- package/lib/generated-client/api/collection-api.js +24 -31
- package/lib/generated-client/api/configuration-api.js +40 -51
- package/lib/generated-client/api/dashboard-api.js +15 -20
- package/lib/generated-client/api/devices-api.js +40 -51
- package/lib/generated-client/api/display-preferences-api.js +16 -21
- package/lib/generated-client/api/dynamic-hls-api.d.ts +27 -27
- package/lib/generated-client/api/dynamic-hls-api.js +72 -91
- package/lib/generated-client/api/environment-api.js +48 -61
- package/lib/generated-client/api/filter-api.js +16 -21
- package/lib/generated-client/api/genres-api.js +16 -21
- package/lib/generated-client/api/hls-segment-api.js +37 -48
- package/lib/generated-client/api/image-api.js +269 -344
- package/lib/generated-client/api/instant-mix-api.js +64 -81
- package/lib/generated-client/api/item-lookup-api.js +88 -111
- package/lib/generated-client/api/item-refresh-api.js +8 -11
- package/lib/generated-client/api/item-update-api.js +24 -31
- package/lib/generated-client/api/items-api.js +32 -41
- package/lib/generated-client/api/library-api.js +200 -251
- package/lib/generated-client/api/library-structure-api.js +64 -81
- package/lib/generated-client/api/live-tv-api.js +326 -409
- package/lib/generated-client/api/localization-api.js +32 -41
- package/lib/generated-client/api/lyrics-api.js +48 -61
- package/lib/generated-client/api/media-info-api.js +40 -51
- package/lib/generated-client/api/movies-api.js +8 -11
- package/lib/generated-client/api/music-genres-api.js +16 -21
- package/lib/generated-client/api/package-api.js +48 -61
- package/lib/generated-client/api/persons-api.js +16 -21
- package/lib/generated-client/api/playlists-api.js +80 -101
- package/lib/generated-client/api/playstate-api.js +72 -91
- package/lib/generated-client/api/plugins-api.js +72 -91
- package/lib/generated-client/api/quick-connect-api.js +29 -38
- package/lib/generated-client/api/remote-image-api.js +24 -31
- package/lib/generated-client/api/scheduled-tasks-api.js +40 -51
- package/lib/generated-client/api/search-api.js +8 -11
- package/lib/generated-client/api/session-api.js +128 -161
- package/lib/generated-client/api/startup-api.js +56 -71
- package/lib/generated-client/api/studios-api.js +16 -21
- package/lib/generated-client/api/subtitle-api.js +78 -99
- package/lib/generated-client/api/suggestions-api.js +8 -11
- package/lib/generated-client/api/sync-play-api.js +168 -211
- package/lib/generated-client/api/system-api.js +77 -98
- package/lib/generated-client/api/time-sync-api.js +7 -10
- package/lib/generated-client/api/tmdb-api.js +8 -11
- package/lib/generated-client/api/trailers-api.js +8 -11
- package/lib/generated-client/api/trickplay-api.js +16 -21
- package/lib/generated-client/api/tv-shows-api.js +32 -41
- package/lib/generated-client/api/universal-audio-api.js +16 -21
- package/lib/generated-client/api/user-api.js +107 -136
- package/lib/generated-client/api/user-library-api.js +80 -101
- package/lib/generated-client/api/user-views-api.js +16 -21
- package/lib/generated-client/api/video-attachments-api.js +7 -10
- package/lib/generated-client/api/videos-api.d.ts +12 -12
- package/lib/generated-client/api/videos-api.js +52 -67
- package/lib/generated-client/api/years-api.js +16 -21
- package/lib/generated-client/common.js +8 -11
- package/lib/generated-client/models/search-hint.d.ts +1 -1
- package/lib/utils/api/image-urls-api.js +16 -4
- package/lib/versions.d.ts +1 -1
- package/lib/versions.js +1 -1
- package/package.json +10 -10
- package/lib/node_modules/tslib/tslib.es6.js +0 -33
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import globalAxios from 'axios';
|
|
3
2
|
import { assertParamExists, DUMMY_BASE_URL, setApiKeyToObject, setSearchParams, toPathString, createRequestFunction } from '../common.js';
|
|
4
3
|
import { BaseAPI, BASE_PATH } from '../base.js';
|
|
@@ -29,7 +28,7 @@ const YearsApiAxiosParamCreator = function (configuration) {
|
|
|
29
28
|
* @param {*} [options] Override http request option.
|
|
30
29
|
* @throws {RequiredError}
|
|
31
30
|
*/
|
|
32
|
-
getYear:
|
|
31
|
+
getYear: async (year, userId, options = {}) => {
|
|
33
32
|
// verify required parameter 'year' is not null or undefined
|
|
34
33
|
assertParamExists('getYear', 'year', year);
|
|
35
34
|
const localVarPath = `/Years/{year}`
|
|
@@ -40,22 +39,22 @@ const YearsApiAxiosParamCreator = function (configuration) {
|
|
|
40
39
|
if (configuration) {
|
|
41
40
|
baseOptions = configuration.baseOptions;
|
|
42
41
|
}
|
|
43
|
-
const localVarRequestOptions =
|
|
42
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
44
43
|
const localVarHeaderParameter = {};
|
|
45
44
|
const localVarQueryParameter = {};
|
|
46
45
|
// authentication CustomAuthentication required
|
|
47
|
-
|
|
46
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
48
47
|
if (userId !== undefined) {
|
|
49
48
|
localVarQueryParameter['userId'] = userId;
|
|
50
49
|
}
|
|
51
50
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
52
51
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
53
|
-
localVarRequestOptions.headers =
|
|
52
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
54
53
|
return {
|
|
55
54
|
url: toPathString(localVarUrlObj),
|
|
56
55
|
options: localVarRequestOptions,
|
|
57
56
|
};
|
|
58
|
-
}
|
|
57
|
+
},
|
|
59
58
|
/**
|
|
60
59
|
*
|
|
61
60
|
* @summary Get years.
|
|
@@ -77,7 +76,7 @@ const YearsApiAxiosParamCreator = function (configuration) {
|
|
|
77
76
|
* @param {*} [options] Override http request option.
|
|
78
77
|
* @throws {RequiredError}
|
|
79
78
|
*/
|
|
80
|
-
getYears:
|
|
79
|
+
getYears: async (startIndex, limit, sortOrder, parentId, fields, excludeItemTypes, includeItemTypes, mediaTypes, sortBy, enableUserData, imageTypeLimit, enableImageTypes, userId, recursive, enableImages, options = {}) => {
|
|
81
80
|
const localVarPath = `/Years`;
|
|
82
81
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
83
82
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -85,11 +84,11 @@ const YearsApiAxiosParamCreator = function (configuration) {
|
|
|
85
84
|
if (configuration) {
|
|
86
85
|
baseOptions = configuration.baseOptions;
|
|
87
86
|
}
|
|
88
|
-
const localVarRequestOptions =
|
|
87
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
89
88
|
const localVarHeaderParameter = {};
|
|
90
89
|
const localVarQueryParameter = {};
|
|
91
90
|
// authentication CustomAuthentication required
|
|
92
|
-
|
|
91
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
93
92
|
if (startIndex !== undefined) {
|
|
94
93
|
localVarQueryParameter['startIndex'] = startIndex;
|
|
95
94
|
}
|
|
@@ -137,12 +136,12 @@ const YearsApiAxiosParamCreator = function (configuration) {
|
|
|
137
136
|
}
|
|
138
137
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
139
138
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
140
|
-
localVarRequestOptions.headers =
|
|
139
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
141
140
|
return {
|
|
142
141
|
url: toPathString(localVarUrlObj),
|
|
143
142
|
options: localVarRequestOptions,
|
|
144
143
|
};
|
|
145
|
-
}
|
|
144
|
+
},
|
|
146
145
|
};
|
|
147
146
|
};
|
|
148
147
|
/**
|
|
@@ -160,11 +159,9 @@ const YearsApiFp = function (configuration) {
|
|
|
160
159
|
* @param {*} [options] Override http request option.
|
|
161
160
|
* @throws {RequiredError}
|
|
162
161
|
*/
|
|
163
|
-
getYear(year, userId, options) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
167
|
-
});
|
|
162
|
+
async getYear(year, userId, options) {
|
|
163
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getYear(year, userId, options);
|
|
164
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
168
165
|
},
|
|
169
166
|
/**
|
|
170
167
|
*
|
|
@@ -187,11 +184,9 @@ const YearsApiFp = function (configuration) {
|
|
|
187
184
|
* @param {*} [options] Override http request option.
|
|
188
185
|
* @throws {RequiredError}
|
|
189
186
|
*/
|
|
190
|
-
getYears(startIndex, limit, sortOrder, parentId, fields, excludeItemTypes, includeItemTypes, mediaTypes, sortBy, enableUserData, imageTypeLimit, enableImageTypes, userId, recursive, enableImages, options) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
194
|
-
});
|
|
187
|
+
async getYears(startIndex, limit, sortOrder, parentId, fields, excludeItemTypes, includeItemTypes, mediaTypes, sortBy, enableUserData, imageTypeLimit, enableImageTypes, userId, recursive, enableImages, options) {
|
|
188
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getYears(startIndex, limit, sortOrder, parentId, fields, excludeItemTypes, includeItemTypes, mediaTypes, sortBy, enableUserData, imageTypeLimit, enableImageTypes, userId, recursive, enableImages, options);
|
|
189
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
195
190
|
},
|
|
196
191
|
};
|
|
197
192
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter } from '../node_modules/tslib/tslib.es6.js';
|
|
2
1
|
import { RequiredError } from './base.js';
|
|
3
2
|
|
|
4
3
|
/* tslint:disable */
|
|
@@ -32,15 +31,13 @@ const assertParamExists = function (functionName, paramName, paramValue) {
|
|
|
32
31
|
*
|
|
33
32
|
* @export
|
|
34
33
|
*/
|
|
35
|
-
const setApiKeyToObject = function (object, keyParamName, configuration) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
});
|
|
34
|
+
const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
35
|
+
if (configuration && configuration.apiKey) {
|
|
36
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
37
|
+
? await configuration.apiKey(keyParamName)
|
|
38
|
+
: await configuration.apiKey;
|
|
39
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
40
|
+
}
|
|
44
41
|
};
|
|
45
42
|
/**
|
|
46
43
|
*
|
|
@@ -89,7 +86,7 @@ const toPathString = function (url) {
|
|
|
89
86
|
*/
|
|
90
87
|
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
91
88
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
92
|
-
const axiosRequestArgs =
|
|
89
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url };
|
|
93
90
|
return axios.request(axiosRequestArgs);
|
|
94
91
|
};
|
|
95
92
|
};
|
|
@@ -40,7 +40,10 @@ class ImageUrlsApi extends ImageApi {
|
|
|
40
40
|
var _a, _b;
|
|
41
41
|
if (!(item === null || item === void 0 ? void 0 : item.Id))
|
|
42
42
|
return;
|
|
43
|
-
return this.getItemImageUrlById(item.Id, imageType,
|
|
43
|
+
return this.getItemImageUrlById(item.Id, imageType, {
|
|
44
|
+
...params,
|
|
45
|
+
tag: (_a = params.tag) !== null && _a !== void 0 ? _a : (_b = item.ImageTags) === null || _b === void 0 ? void 0 : _b[imageType]
|
|
46
|
+
});
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
49
|
* Get an Item's backdrop image URLs.
|
|
@@ -55,7 +58,10 @@ class ImageUrlsApi extends ImageApi {
|
|
|
55
58
|
if (!id)
|
|
56
59
|
return urls;
|
|
57
60
|
(_a = item.BackdropImageTags) === null || _a === void 0 ? void 0 : _a.forEach(tag => {
|
|
58
|
-
const url = this.getItemImageUrlById(id, ImageType.Backdrop,
|
|
61
|
+
const url = this.getItemImageUrlById(id, ImageType.Backdrop, {
|
|
62
|
+
...params,
|
|
63
|
+
tag
|
|
64
|
+
});
|
|
59
65
|
urls.push(url);
|
|
60
66
|
});
|
|
61
67
|
if (urls.length > 0)
|
|
@@ -63,7 +69,10 @@ class ImageUrlsApi extends ImageApi {
|
|
|
63
69
|
const parentId = item.ParentBackdropItemId;
|
|
64
70
|
if (parentId) {
|
|
65
71
|
(_b = item.ParentBackdropImageTags) === null || _b === void 0 ? void 0 : _b.forEach(tag => {
|
|
66
|
-
const url = this.getItemImageUrlById(parentId, ImageType.Backdrop,
|
|
72
|
+
const url = this.getItemImageUrlById(parentId, ImageType.Backdrop, {
|
|
73
|
+
...params,
|
|
74
|
+
tag
|
|
75
|
+
});
|
|
67
76
|
urls.push(url);
|
|
68
77
|
});
|
|
69
78
|
}
|
|
@@ -95,7 +104,10 @@ class ImageUrlsApi extends ImageApi {
|
|
|
95
104
|
return this.axios.getUri({
|
|
96
105
|
baseURL: (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.basePath,
|
|
97
106
|
url: `/Users/${user.Id}/Images/Primary`,
|
|
98
|
-
params:
|
|
107
|
+
params: {
|
|
108
|
+
...params,
|
|
109
|
+
tag: user.PrimaryImageTag
|
|
110
|
+
}
|
|
99
111
|
});
|
|
100
112
|
}
|
|
101
113
|
}
|
package/lib/versions.d.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
5
5
|
*/
|
|
6
6
|
/** The current API version of the generated client. */
|
|
7
|
-
export declare const API_VERSION = "10.9.
|
|
7
|
+
export declare const API_VERSION = "10.9.4";
|
|
8
8
|
/** The minimum supported server version. */
|
|
9
9
|
export declare const MINIMUM_VERSION = "10.9.0";
|
package/lib/versions.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
5
5
|
*/
|
|
6
6
|
/** The current API version of the generated client. */
|
|
7
|
-
const API_VERSION = '10.9.
|
|
7
|
+
const API_VERSION = '10.9.4';
|
|
8
8
|
/** The minimum supported server version. */
|
|
9
9
|
const MINIMUM_VERSION = '10.9.0';
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jellyfin/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "A TypeScript SDK for Jellyfin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jellyfin"
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"test": "vitest --exclude **/integration.test.ts"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@openapitools/openapi-generator-cli": "2.13.
|
|
28
|
+
"@openapitools/openapi-generator-cli": "2.13.4",
|
|
29
29
|
"@rollup/plugin-typescript": "11.1.6",
|
|
30
|
-
"@tsconfig/recommended": "1.0.
|
|
30
|
+
"@tsconfig/recommended": "1.0.6",
|
|
31
31
|
"@typescript-eslint/eslint-plugin": "7.3.1",
|
|
32
32
|
"@typescript-eslint/parser": "7.3.1",
|
|
33
|
-
"@vitest/coverage-v8": "1.
|
|
33
|
+
"@vitest/coverage-v8": "1.6.0",
|
|
34
34
|
"eslint": "8.57.0",
|
|
35
35
|
"eslint-plugin-import": "2.29.1",
|
|
36
36
|
"eslint-plugin-vitest": "0.3.26",
|
|
37
|
-
"glob": "10.
|
|
38
|
-
"rimraf": "5.0.
|
|
39
|
-
"rollup": "4.
|
|
40
|
-
"typedoc": "0.25.
|
|
41
|
-
"typescript": "5.4.
|
|
42
|
-
"vitest": "1.
|
|
37
|
+
"glob": "10.4.1",
|
|
38
|
+
"rimraf": "5.0.7",
|
|
39
|
+
"rollup": "4.18.0",
|
|
40
|
+
"typedoc": "0.25.13",
|
|
41
|
+
"typescript": "5.4.5",
|
|
42
|
+
"vitest": "1.6.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"axios": "^1.3.4"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
19
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
21
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
22
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
23
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
24
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
29
|
-
var e = new Error(message);
|
|
30
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { __awaiter };
|