UNPKG

@jellyfin/sdk

Version:
624 lines (621 loc) • 34.5 kB
import globalAxios from 'axios'; import { assertParamExists, DUMMY_BASE_URL, setApiKeyToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common.js'; import { operationServerMap, BaseAPI, BASE_PATH } from '../base.js'; /* tslint:disable */ /* eslint-disable */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. * * Jellyfin API * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** * LibraryStructureApi - axios parameter creator * @export */ const LibraryStructureApiAxiosParamCreator = function (configuration) { return { /** * * @summary Add a media path to a library. * @param {MediaPathDto} mediaPathDto The media path dto. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addMediaPath: async (mediaPathDto, refreshLibrary, options = {}) => { // verify required parameter 'mediaPathDto' is not null or undefined assertParamExists('addMediaPath', 'mediaPathDto', mediaPathDto); const localVarPath = `/Library/VirtualFolders/Paths`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); if (refreshLibrary !== undefined) { localVarQueryParameter['refreshLibrary'] = refreshLibrary; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(mediaPathDto, localVarRequestOptions, configuration); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Adds a virtual folder. * @param {string} [name] The name of the virtual folder. * @param {CollectionTypeOptions} [collectionType] The type of the collection. * @param {Array<string>} [paths] The paths of the virtual folder. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {AddVirtualFolderDto} [addVirtualFolderDto] The library options. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addVirtualFolder: async (name, collectionType, paths, refreshLibrary, addVirtualFolderDto, options = {}) => { const localVarPath = `/Library/VirtualFolders`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); if (name !== undefined) { localVarQueryParameter['name'] = name; } if (collectionType !== undefined) { localVarQueryParameter['collectionType'] = collectionType; } if (paths) { localVarQueryParameter['paths'] = paths; } if (refreshLibrary !== undefined) { localVarQueryParameter['refreshLibrary'] = refreshLibrary; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(addVirtualFolderDto, localVarRequestOptions, configuration); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Gets all virtual folders. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVirtualFolders: async (options = {}) => { const localVarPath = `/Library/VirtualFolders`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Remove a media path. * @param {string} [name] The name of the library. * @param {string} [path] The path to remove. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeMediaPath: async (name, path, refreshLibrary, options = {}) => { const localVarPath = `/Library/VirtualFolders/Paths`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); if (name !== undefined) { localVarQueryParameter['name'] = name; } if (path !== undefined) { localVarQueryParameter['path'] = path; } if (refreshLibrary !== undefined) { localVarQueryParameter['refreshLibrary'] = refreshLibrary; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Removes a virtual folder. * @param {string} [name] The name of the folder. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeVirtualFolder: async (name, refreshLibrary, options = {}) => { const localVarPath = `/Library/VirtualFolders`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); if (name !== undefined) { localVarQueryParameter['name'] = name; } if (refreshLibrary !== undefined) { localVarQueryParameter['refreshLibrary'] = refreshLibrary; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Renames a virtual folder. * @param {string} [name] The name of the virtual folder. * @param {string} [newName] The new name. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ renameVirtualFolder: async (name, newName, refreshLibrary, options = {}) => { const localVarPath = `/Library/VirtualFolders/Name`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); if (name !== undefined) { localVarQueryParameter['name'] = name; } if (newName !== undefined) { localVarQueryParameter['newName'] = newName; } if (refreshLibrary !== undefined) { localVarQueryParameter['refreshLibrary'] = refreshLibrary; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update library options. * @param {UpdateLibraryOptionsDto} [updateLibraryOptionsDto] The library name and options. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateLibraryOptions: async (updateLibraryOptionsDto, options = {}) => { const localVarPath = `/Library/VirtualFolders/LibraryOptions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(updateLibraryOptionsDto, localVarRequestOptions, configuration); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Updates a media path. * @param {UpdateMediaPathRequestDto} updateMediaPathRequestDto The name of the library and path infos. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateMediaPath: async (updateMediaPathRequestDto, options = {}) => { // verify required parameter 'updateMediaPathRequestDto' is not null or undefined assertParamExists('updateMediaPath', 'updateMediaPathRequestDto', updateMediaPathRequestDto); const localVarPath = `/Library/VirtualFolders/Paths/Update`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication CustomAuthentication required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(updateMediaPathRequestDto, localVarRequestOptions, configuration); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * LibraryStructureApi - functional programming interface * @export */ const LibraryStructureApiFp = function (configuration) { const localVarAxiosParamCreator = LibraryStructureApiAxiosParamCreator(configuration); return { /** * * @summary Add a media path to a library. * @param {MediaPathDto} mediaPathDto The media path dto. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async addMediaPath(mediaPathDto, refreshLibrary, options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.addMediaPath(mediaPathDto, refreshLibrary, options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.addMediaPath']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Adds a virtual folder. * @param {string} [name] The name of the virtual folder. * @param {CollectionTypeOptions} [collectionType] The type of the collection. * @param {Array<string>} [paths] The paths of the virtual folder. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {AddVirtualFolderDto} [addVirtualFolderDto] The library options. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async addVirtualFolder(name, collectionType, paths, refreshLibrary, addVirtualFolderDto, options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.addVirtualFolder(name, collectionType, paths, refreshLibrary, addVirtualFolderDto, options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.addVirtualFolder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Gets all virtual folders. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getVirtualFolders(options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.getVirtualFolders(options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.getVirtualFolders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Remove a media path. * @param {string} [name] The name of the library. * @param {string} [path] The path to remove. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async removeMediaPath(name, path, refreshLibrary, options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.removeMediaPath(name, path, refreshLibrary, options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.removeMediaPath']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Removes a virtual folder. * @param {string} [name] The name of the folder. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async removeVirtualFolder(name, refreshLibrary, options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.removeVirtualFolder(name, refreshLibrary, options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.removeVirtualFolder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Renames a virtual folder. * @param {string} [name] The name of the virtual folder. * @param {string} [newName] The new name. * @param {boolean} [refreshLibrary] Whether to refresh the library. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async renameVirtualFolder(name, newName, refreshLibrary, options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.renameVirtualFolder(name, newName, refreshLibrary, options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.renameVirtualFolder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update library options. * @param {UpdateLibraryOptionsDto} [updateLibraryOptionsDto] The library name and options. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateLibraryOptions(updateLibraryOptionsDto, options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.updateLibraryOptions(updateLibraryOptionsDto, options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.updateLibraryOptions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Updates a media path. * @param {UpdateMediaPathRequestDto} updateMediaPathRequestDto The name of the library and path infos. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateMediaPath(updateMediaPathRequestDto, options) { var _a, _b, _c; const localVarAxiosArgs = await localVarAxiosParamCreator.updateMediaPath(updateMediaPathRequestDto, options); const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const localVarOperationServerBasePath = (_c = (_b = operationServerMap['LibraryStructureApi.updateMediaPath']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * LibraryStructureApi - factory interface * @export */ const LibraryStructureApiFactory = function (configuration, basePath, axios) { const localVarFp = LibraryStructureApiFp(configuration); return { /** * * @summary Add a media path to a library. * @param {LibraryStructureApiAddMediaPathRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addMediaPath(requestParameters, options) { return localVarFp.addMediaPath(requestParameters.mediaPathDto, requestParameters.refreshLibrary, options).then((request) => request(axios, basePath)); }, /** * * @summary Adds a virtual folder. * @param {LibraryStructureApiAddVirtualFolderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addVirtualFolder(requestParameters = {}, options) { return localVarFp.addVirtualFolder(requestParameters.name, requestParameters.collectionType, requestParameters.paths, requestParameters.refreshLibrary, requestParameters.addVirtualFolderDto, options).then((request) => request(axios, basePath)); }, /** * * @summary Gets all virtual folders. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVirtualFolders(options) { return localVarFp.getVirtualFolders(options).then((request) => request(axios, basePath)); }, /** * * @summary Remove a media path. * @param {LibraryStructureApiRemoveMediaPathRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeMediaPath(requestParameters = {}, options) { return localVarFp.removeMediaPath(requestParameters.name, requestParameters.path, requestParameters.refreshLibrary, options).then((request) => request(axios, basePath)); }, /** * * @summary Removes a virtual folder. * @param {LibraryStructureApiRemoveVirtualFolderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeVirtualFolder(requestParameters = {}, options) { return localVarFp.removeVirtualFolder(requestParameters.name, requestParameters.refreshLibrary, options).then((request) => request(axios, basePath)); }, /** * * @summary Renames a virtual folder. * @param {LibraryStructureApiRenameVirtualFolderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ renameVirtualFolder(requestParameters = {}, options) { return localVarFp.renameVirtualFolder(requestParameters.name, requestParameters.newName, requestParameters.refreshLibrary, options).then((request) => request(axios, basePath)); }, /** * * @summary Update library options. * @param {LibraryStructureApiUpdateLibraryOptionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateLibraryOptions(requestParameters = {}, options) { return localVarFp.updateLibraryOptions(requestParameters.updateLibraryOptionsDto, options).then((request) => request(axios, basePath)); }, /** * * @summary Updates a media path. * @param {LibraryStructureApiUpdateMediaPathRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateMediaPath(requestParameters, options) { return localVarFp.updateMediaPath(requestParameters.updateMediaPathRequestDto, options).then((request) => request(axios, basePath)); }, }; }; /** * LibraryStructureApi - object-oriented interface * @export * @class LibraryStructureApi * @extends {BaseAPI} */ class LibraryStructureApi extends BaseAPI { /** * * @summary Add a media path to a library. * @param {LibraryStructureApiAddMediaPathRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ addMediaPath(requestParameters, options) { return LibraryStructureApiFp(this.configuration).addMediaPath(requestParameters.mediaPathDto, requestParameters.refreshLibrary, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Adds a virtual folder. * @param {LibraryStructureApiAddVirtualFolderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ addVirtualFolder(requestParameters = {}, options) { return LibraryStructureApiFp(this.configuration).addVirtualFolder(requestParameters.name, requestParameters.collectionType, requestParameters.paths, requestParameters.refreshLibrary, requestParameters.addVirtualFolderDto, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Gets all virtual folders. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ getVirtualFolders(options) { return LibraryStructureApiFp(this.configuration).getVirtualFolders(options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Remove a media path. * @param {LibraryStructureApiRemoveMediaPathRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ removeMediaPath(requestParameters = {}, options) { return LibraryStructureApiFp(this.configuration).removeMediaPath(requestParameters.name, requestParameters.path, requestParameters.refreshLibrary, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Removes a virtual folder. * @param {LibraryStructureApiRemoveVirtualFolderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ removeVirtualFolder(requestParameters = {}, options) { return LibraryStructureApiFp(this.configuration).removeVirtualFolder(requestParameters.name, requestParameters.refreshLibrary, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Renames a virtual folder. * @param {LibraryStructureApiRenameVirtualFolderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ renameVirtualFolder(requestParameters = {}, options) { return LibraryStructureApiFp(this.configuration).renameVirtualFolder(requestParameters.name, requestParameters.newName, requestParameters.refreshLibrary, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Update library options. * @param {LibraryStructureApiUpdateLibraryOptionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ updateLibraryOptions(requestParameters = {}, options) { return LibraryStructureApiFp(this.configuration).updateLibraryOptions(requestParameters.updateLibraryOptionsDto, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Updates a media path. * @param {LibraryStructureApiUpdateMediaPathRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LibraryStructureApi */ updateMediaPath(requestParameters, options) { return LibraryStructureApiFp(this.configuration).updateMediaPath(requestParameters.updateMediaPathRequestDto, options).then((request) => request(this.axios, this.basePath)); } } export { LibraryStructureApi, LibraryStructureApiAxiosParamCreator, LibraryStructureApiFactory, LibraryStructureApiFp };