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

71 lines
2.1 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 {
ClientLogDocumentResponseDto,
ProblemDetails,
} from '../models';
import {
ClientLogDocumentResponseDtoFromJSON,
ClientLogDocumentResponseDtoToJSON,
ProblemDetailsFromJSON,
ProblemDetailsToJSON,
} from '../models';
export interface LogFileRequest {
body?: Blob;
}
/**
*
*/
export class ClientLogApi extends runtime.BaseAPI {
/**
* Upload a document.
*/
async logFileRaw(requestParameters: LogFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientLogDocumentResponseDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'text/plain';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/ClientLog/Document`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.body as any,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => ClientLogDocumentResponseDtoFromJSON(jsonValue));
}
/**
* Upload a document.
*/
async logFile(requestParameters: LogFileRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientLogDocumentResponseDto> {
const response = await this.logFileRaw(requestParameters, initOverrides);
return await response.value();
}
}