@jellyfin/sdk
Version:
A TypeScript SDK for Jellyfin.
316 lines (315 loc) • 12.4 kB
TypeScript
/**
* 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/.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { PackageInfo } from '../models';
import type { RepositoryInfo } from '../models';
/**
* PackageApi - axios parameter creator
* @export
*/
export declare const PackageApiAxiosParamCreator: (configuration?: Configuration) => {
/**
*
* @summary Cancels a package installation.
* @param {string} packageId Installation Id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelPackageInstallation: (packageId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Gets a package by name or assembly GUID.
* @param {string} name The name of the package.
* @param {string} [assemblyGuid] The GUID of the associated assembly.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPackageInfo: (name: string, assemblyGuid?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Gets available packages.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPackages: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Gets all package repositories.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRepositories: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Installs a package.
* @param {string} name Package name.
* @param {string} [assemblyGuid] GUID of the associated assembly.
* @param {string} [version] Optional version. Defaults to latest version.
* @param {string} [repositoryUrl] Optional. Specify the repository to install from.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
installPackage: (name: string, assemblyGuid?: string, version?: string, repositoryUrl?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Sets the enabled and existing package repositories.
* @param {Array<RepositoryInfo>} repositoryInfo The list of package repositories.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setRepositories: (repositoryInfo: Array<RepositoryInfo>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* PackageApi - functional programming interface
* @export
*/
export declare const PackageApiFp: (configuration?: Configuration) => {
/**
*
* @summary Cancels a package installation.
* @param {string} packageId Installation Id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelPackageInstallation(packageId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
*
* @summary Gets a package by name or assembly GUID.
* @param {string} name The name of the package.
* @param {string} [assemblyGuid] The GUID of the associated assembly.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPackageInfo(name: string, assemblyGuid?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PackageInfo>>;
/**
*
* @summary Gets available packages.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPackages(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PackageInfo>>>;
/**
*
* @summary Gets all package repositories.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRepositories(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RepositoryInfo>>>;
/**
*
* @summary Installs a package.
* @param {string} name Package name.
* @param {string} [assemblyGuid] GUID of the associated assembly.
* @param {string} [version] Optional version. Defaults to latest version.
* @param {string} [repositoryUrl] Optional. Specify the repository to install from.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
installPackage(name: string, assemblyGuid?: string, version?: string, repositoryUrl?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
*
* @summary Sets the enabled and existing package repositories.
* @param {Array<RepositoryInfo>} repositoryInfo The list of package repositories.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setRepositories(repositoryInfo: Array<RepositoryInfo>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
};
/**
* PackageApi - factory interface
* @export
*/
export declare const PackageApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
*
* @summary Cancels a package installation.
* @param {PackageApiCancelPackageInstallationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelPackageInstallation(requestParameters: PackageApiCancelPackageInstallationRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
/**
*
* @summary Gets a package by name or assembly GUID.
* @param {PackageApiGetPackageInfoRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPackageInfo(requestParameters: PackageApiGetPackageInfoRequest, options?: RawAxiosRequestConfig): AxiosPromise<PackageInfo>;
/**
*
* @summary Gets available packages.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPackages(options?: RawAxiosRequestConfig): AxiosPromise<Array<PackageInfo>>;
/**
*
* @summary Gets all package repositories.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRepositories(options?: RawAxiosRequestConfig): AxiosPromise<Array<RepositoryInfo>>;
/**
*
* @summary Installs a package.
* @param {PackageApiInstallPackageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
installPackage(requestParameters: PackageApiInstallPackageRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
/**
*
* @summary Sets the enabled and existing package repositories.
* @param {PackageApiSetRepositoriesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
setRepositories(requestParameters: PackageApiSetRepositoriesRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
};
/**
* Request parameters for cancelPackageInstallation operation in PackageApi.
* @export
* @interface PackageApiCancelPackageInstallationRequest
*/
export interface PackageApiCancelPackageInstallationRequest {
/**
* Installation Id.
* @type {string}
* @memberof PackageApiCancelPackageInstallation
*/
readonly packageId: string;
}
/**
* Request parameters for getPackageInfo operation in PackageApi.
* @export
* @interface PackageApiGetPackageInfoRequest
*/
export interface PackageApiGetPackageInfoRequest {
/**
* The name of the package.
* @type {string}
* @memberof PackageApiGetPackageInfo
*/
readonly name: string;
/**
* The GUID of the associated assembly.
* @type {string}
* @memberof PackageApiGetPackageInfo
*/
readonly assemblyGuid?: string;
}
/**
* Request parameters for installPackage operation in PackageApi.
* @export
* @interface PackageApiInstallPackageRequest
*/
export interface PackageApiInstallPackageRequest {
/**
* Package name.
* @type {string}
* @memberof PackageApiInstallPackage
*/
readonly name: string;
/**
* GUID of the associated assembly.
* @type {string}
* @memberof PackageApiInstallPackage
*/
readonly assemblyGuid?: string;
/**
* Optional version. Defaults to latest version.
* @type {string}
* @memberof PackageApiInstallPackage
*/
readonly version?: string;
/**
* Optional. Specify the repository to install from.
* @type {string}
* @memberof PackageApiInstallPackage
*/
readonly repositoryUrl?: string;
}
/**
* Request parameters for setRepositories operation in PackageApi.
* @export
* @interface PackageApiSetRepositoriesRequest
*/
export interface PackageApiSetRepositoriesRequest {
/**
* The list of package repositories.
* @type {Array<RepositoryInfo>}
* @memberof PackageApiSetRepositories
*/
readonly repositoryInfo: Array<RepositoryInfo>;
}
/**
* PackageApi - object-oriented interface
* @export
* @class PackageApi
* @extends {BaseAPI}
*/
export declare class PackageApi extends BaseAPI {
/**
*
* @summary Cancels a package installation.
* @param {PackageApiCancelPackageInstallationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PackageApi
*/
cancelPackageInstallation(requestParameters: PackageApiCancelPackageInstallationRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
/**
*
* @summary Gets a package by name or assembly GUID.
* @param {PackageApiGetPackageInfoRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PackageApi
*/
getPackageInfo(requestParameters: PackageApiGetPackageInfoRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PackageInfo, any>>;
/**
*
* @summary Gets available packages.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PackageApi
*/
getPackages(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PackageInfo[], any>>;
/**
*
* @summary Gets all package repositories.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PackageApi
*/
getRepositories(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RepositoryInfo[], any>>;
/**
*
* @summary Installs a package.
* @param {PackageApiInstallPackageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PackageApi
*/
installPackage(requestParameters: PackageApiInstallPackageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
/**
*
* @summary Sets the enabled and existing package repositories.
* @param {PackageApiSetRepositoriesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PackageApi
*/
setRepositories(requestParameters: PackageApiSetRepositoriesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
}