106 lines
3.4 KiB
TypeScript
106 lines
3.4 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Jellyfin API
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 10.8.9
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
import * as runtime from '../runtime';
|
|
import type {
|
|
ConfigurationPageInfo,
|
|
ProblemDetails,
|
|
} from '../models';
|
|
import {
|
|
ConfigurationPageInfoFromJSON,
|
|
ConfigurationPageInfoToJSON,
|
|
ProblemDetailsFromJSON,
|
|
ProblemDetailsToJSON,
|
|
} from '../models';
|
|
|
|
export interface GetConfigurationPagesRequest {
|
|
enableInMainMenu?: boolean;
|
|
}
|
|
|
|
export interface GetDashboardConfigurationPageRequest {
|
|
name?: string;
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
export class DashboardApi extends runtime.BaseAPI {
|
|
|
|
/**
|
|
* Gets the configuration pages.
|
|
*/
|
|
async getConfigurationPagesRaw(requestParameters: GetConfigurationPagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ConfigurationPageInfo>>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters.enableInMainMenu !== undefined) {
|
|
queryParameters['enableInMainMenu'] = requestParameters.enableInMainMenu;
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
if (this.configuration && this.configuration.apiKey) {
|
|
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
|
|
}
|
|
|
|
const response = await this.request({
|
|
path: `/web/ConfigurationPages`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConfigurationPageInfoFromJSON));
|
|
}
|
|
|
|
/**
|
|
* Gets the configuration pages.
|
|
*/
|
|
async getConfigurationPages(requestParameters: GetConfigurationPagesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConfigurationPageInfo>> {
|
|
const response = await this.getConfigurationPagesRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Gets a dashboard configuration page.
|
|
*/
|
|
async getDashboardConfigurationPageRaw(requestParameters: GetDashboardConfigurationPageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters.name !== undefined) {
|
|
queryParameters['name'] = requestParameters.name;
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/web/ConfigurationPage`,
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Gets a dashboard configuration page.
|
|
*/
|
|
async getDashboardConfigurationPage(requestParameters: GetDashboardConfigurationPageRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.getDashboardConfigurationPageRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
}
|