jellyfin-discord-bot/server/jellyfin/apis/StartupApi.ts

278 lines
10 KiB
TypeScript
Raw Normal View History

2023-05-04 23:34:53 +02:00
/* 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 {
SetRemoteAccessRequest,
StartupConfigurationDto,
StartupUserDto,
UpdateInitialConfigurationRequest,
UpdateStartupUserRequest,
} from '../models';
import {
SetRemoteAccessRequestFromJSON,
SetRemoteAccessRequestToJSON,
StartupConfigurationDtoFromJSON,
StartupConfigurationDtoToJSON,
StartupUserDtoFromJSON,
StartupUserDtoToJSON,
UpdateInitialConfigurationRequestFromJSON,
UpdateInitialConfigurationRequestToJSON,
UpdateStartupUserRequestFromJSON,
UpdateStartupUserRequestToJSON,
} from '../models';
export interface SetRemoteAccessOperationRequest {
setRemoteAccessRequest: SetRemoteAccessRequest;
}
export interface UpdateInitialConfigurationOperationRequest {
updateInitialConfigurationRequest: UpdateInitialConfigurationRequest;
}
export interface UpdateStartupUserOperationRequest {
updateStartupUserRequest?: UpdateStartupUserRequest;
}
/**
*
*/
export class StartupApi extends runtime.BaseAPI {
/**
* Completes the startup wizard.
*/
async completeWizardRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Startup/Complete`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Completes the startup wizard.
*/
async completeWizard(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.completeWizardRaw(initOverrides);
}
/**
* Gets the first user.
*/
async getFirstUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StartupUserDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Startup/User`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => StartupUserDtoFromJSON(jsonValue));
}
/**
* Gets the first user.
*/
async getFirstUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StartupUserDto> {
const response = await this.getFirstUserRaw(initOverrides);
return await response.value();
}
/**
* Gets the first user.
*/
async getFirstUser2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StartupUserDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Startup/FirstUser`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => StartupUserDtoFromJSON(jsonValue));
}
/**
* Gets the first user.
*/
async getFirstUser2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StartupUserDto> {
const response = await this.getFirstUser2Raw(initOverrides);
return await response.value();
}
/**
* Gets the initial startup wizard configuration.
*/
async getStartupConfigurationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StartupConfigurationDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Startup/Configuration`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => StartupConfigurationDtoFromJSON(jsonValue));
}
/**
* Gets the initial startup wizard configuration.
*/
async getStartupConfiguration(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StartupConfigurationDto> {
const response = await this.getStartupConfigurationRaw(initOverrides);
return await response.value();
}
/**
* Sets remote access and UPnP.
*/
async setRemoteAccessRaw(requestParameters: SetRemoteAccessOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.setRemoteAccessRequest === null || requestParameters.setRemoteAccessRequest === undefined) {
throw new runtime.RequiredError('setRemoteAccessRequest','Required parameter requestParameters.setRemoteAccessRequest was null or undefined when calling setRemoteAccess.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Startup/RemoteAccess`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SetRemoteAccessRequestToJSON(requestParameters.setRemoteAccessRequest),
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Sets remote access and UPnP.
*/
async setRemoteAccess(requestParameters: SetRemoteAccessOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.setRemoteAccessRaw(requestParameters, initOverrides);
}
/**
* Sets the initial startup wizard configuration.
*/
async updateInitialConfigurationRaw(requestParameters: UpdateInitialConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.updateInitialConfigurationRequest === null || requestParameters.updateInitialConfigurationRequest === undefined) {
throw new runtime.RequiredError('updateInitialConfigurationRequest','Required parameter requestParameters.updateInitialConfigurationRequest was null or undefined when calling updateInitialConfiguration.');
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Startup/Configuration`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: UpdateInitialConfigurationRequestToJSON(requestParameters.updateInitialConfigurationRequest),
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Sets the initial startup wizard configuration.
*/
async updateInitialConfiguration(requestParameters: UpdateInitialConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.updateInitialConfigurationRaw(requestParameters, initOverrides);
}
/**
* Sets the user name and password.
*/
async updateStartupUserRaw(requestParameters: UpdateStartupUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Startup/User`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: UpdateStartupUserRequestToJSON(requestParameters.updateStartupUserRequest),
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* Sets the user name and password.
*/
async updateStartupUser(requestParameters: UpdateStartupUserOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.updateStartupUserRaw(requestParameters, initOverrides);
}
}