High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(server): add endpoint to get supported media types on the server (#3284)
Alexc254a04aec87
diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.tsindex b0bf9a8f2f..f6a1127a58 100644--- a/cli/src/api/open-api/api.ts+++ b/cli/src/api/open-api/api.ts@@ -2085,6 +2085,31 @@ export interface ServerInfoResponseDto {*/'diskAvailable': string;}+/**+ *+ * @export+ * @interface ServerMediaTypesResponseDto+ */+export interface ServerMediaTypesResponseDto {+ /**+ *+ * @type {Array<string>}+ * @memberof ServerMediaTypesResponseDto+ */+ 'video': Array<string>;+ /**+ *+ * @type {Array<string>}+ * @memberof ServerMediaTypesResponseDto+ */+ 'image': Array<string>;+ /**+ *+ * @type {Array<string>}+ * @memberof ServerMediaTypesResponseDto+ */+ 'sidecar': Array<string>;+}/**** @export@@ -9711,6 +9736,35 @@ export const ServerInfoApiAxiosParamCreator = function (configuration?: Configur+ setSearchParams(localVarUrlObj, localVarQueryParameter);+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};++ return {+ url: toPathString(localVarUrlObj),+ options: localVarRequestOptions,+ };+ },+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ */+ getSupportedMediaTypes: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {+ const localVarPath = `/server-info/media-types`;+ // 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 = {} as any;+ const localVarQueryParameter = {} as any;+++setSearchParams(localVarUrlObj, localVarQueryParameter);let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};@@ -9786,6 +9840,15 @@ export const ServerInfoApiFp = function(configuration?: Configuration) {const localVarAxiosArgs = await localVarAxiosParamCreator.getStats(options);return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);},+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ */+ async getSupportedMediaTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerMediaTypesResponseDto>> {+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSupportedMediaTypes(options);+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);+ },/**** @param {*} [options] Override http request option.@@ -9829,6 +9892,14 @@ export const ServerInfoApiFactory = function (configuration?: Configuration, basgetStats(options?: AxiosRequestConfig): AxiosPromise<ServerStatsResponseDto> {return localVarFp.getStats(options).then((request) => request(axios, basePath));},+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ */+ getSupportedMediaTypes(options?: AxiosRequestConfig): AxiosPromise<ServerMediaTypesResponseDto> {+ return localVarFp.getSupportedMediaTypes(options).then((request) => request(axios, basePath));+ },/**** @param {*} [options] Override http request option.@@ -9877,6 +9948,16 @@ export class ServerInfoApi extends BaseAPI {return ServerInfoApiFp(this.configuration).getStats(options).then((request) => request(this.axios, this.basePath));}+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ * @memberof ServerInfoApi+ */+ public getSupportedMediaTypes(options?: AxiosRequestConfig) {+ return ServerInfoApiFp(this.configuration).getSupportedMediaTypes(options).then((request) => request(this.axios, this.basePath));+ }+/**** @param {*} [options] Override http request option.diff --git a/mobile/openapi/.openapi-generator/FILES b/mobile/openapi/.openapi-generator/FILESindex f098bf4ffe..5c610108b5 100644--- a/mobile/openapi/.openapi-generator/FILES+++ b/mobile/openapi/.openapi-generator/FILES@@ -88,6 +88,7 @@ doc/SearchFacetResponseDto.mddoc/SearchResponseDto.mddoc/ServerInfoApi.mddoc/ServerInfoResponseDto.md+doc/ServerMediaTypesResponseDto.mddoc/ServerPingResponse.mddoc/ServerStatsResponseDto.mddoc/ServerVersionReponseDto.md@@ -221,6 +222,7 @@ lib/model/search_facet_count_response_dto.dartlib/model/search_facet_response_dto.dartlib/model/search_response_dto.dartlib/model/server_info_response_dto.dart+lib/model/server_media_types_response_dto.dartlib/model/server_ping_response.dartlib/model/server_stats_response_dto.dartlib/model/server_version_reponse_dto.dart@@ -337,6 +339,7 @@ test/search_facet_response_dto_test.darttest/search_response_dto_test.darttest/server_info_api_test.darttest/server_info_response_dto_test.dart+test/server_media_types_response_dto_test.darttest/server_ping_response_test.darttest/server_stats_response_dto_test.darttest/server_version_reponse_dto_test.dartdiff --git a/mobile/openapi/README.md b/mobile/openapi/README.mdindex 3d9dc92110..b8fa7a4d24 100644--- a/mobile/openapi/README.md+++ b/mobile/openapi/README.md@@ -141,6 +141,7 @@ Class | Method | HTTP request | Description*ServerInfoApi* | [**getServerInfo**](doc//ServerInfoApi.md#getserverinfo) | **GET** /server-info |*ServerInfoApi* | [**getServerVersion**](doc//ServerInfoApi.md#getserverversion) | **GET** /server-info/version |*ServerInfoApi* | [**getStats**](doc//ServerInfoApi.md#getstats) | **GET** /server-info/stats |+*ServerInfoApi* | [**getSupportedMediaTypes**](doc//ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |*ServerInfoApi* | [**pingServer**](doc//ServerInfoApi.md#pingserver) | **GET** /server-info/ping |*SharedLinkApi* | [**addSharedLinkAssets**](doc//SharedLinkApi.md#addsharedlinkassets) | **PUT** /shared-link/{id}/assets |*SharedLinkApi* | [**createSharedLink**](doc//SharedLinkApi.md#createsharedlink) | **POST** /shared-link |@@ -251,6 +252,7 @@ Class | Method | HTTP request | Description- [SearchFacetResponseDto](doc//SearchFacetResponseDto.md)- [SearchResponseDto](doc//SearchResponseDto.md)- [ServerInfoResponseDto](doc//ServerInfoResponseDto.md)+ - [ServerMediaTypesResponseDto](doc//ServerMediaTypesResponseDto.md)- [ServerPingResponse](doc//ServerPingResponse.md)- [ServerStatsResponseDto](doc//ServerStatsResponseDto.md)- [ServerVersionReponseDto](doc//ServerVersionReponseDto.md)diff --git a/mobile/openapi/doc/ServerInfoApi.md b/mobile/openapi/doc/ServerInfoApi.mdindex 3b39ef93ee..0666c7d414 100644--- a/mobile/openapi/doc/ServerInfoApi.md+++ b/mobile/openapi/doc/ServerInfoApi.md@@ -12,6 +12,7 @@ Method | HTTP request | Description[**getServerInfo**](ServerInfoApi.md#getserverinfo) | **GET** /server-info |[**getServerVersion**](ServerInfoApi.md#getserverversion) | **GET** /server-info/version |[**getStats**](ServerInfoApi.md#getstats) | **GET** /server-info/stats |+[**getSupportedMediaTypes**](ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |[**pingServer**](ServerInfoApi.md#pingserver) | **GET** /server-info/ping |@@ -154,6 +155,43 @@ This endpoint does not need any parameter.[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)+# **getSupportedMediaTypes**+> ServerMediaTypesResponseDto getSupportedMediaTypes()++++### Example+```dart+import 'package:openapi/api.dart';++final api_instance = ServerInfoApi();++try {+ final result = api_instance.getSupportedMediaTypes();+ print(result);+} catch (e) {+ print('Exception when calling ServerInfoApi->getSupportedMediaTypes: $e\n');+}+```++### Parameters+This endpoint does not need any parameter.++### Return type++[**ServerMediaTypesResponseDto**](ServerMediaTypesResponseDto.md)++### Authorization++No authorization required++### HTTP request headers++ - **Content-Type**: Not defined+ - **Accept**: application/json++[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)+# **pingServer**> ServerPingResponse pingServer()diff --git a/mobile/openapi/doc/ServerMediaTypesResponseDto.md b/mobile/openapi/doc/ServerMediaTypesResponseDto.mdnew file mode 100644index 0000000000..78253e27f7--- /dev/null+++ b/mobile/openapi/doc/ServerMediaTypesResponseDto.md@@ -0,0 +1,17 @@+# openapi.model.ServerMediaTypesResponseDto++## Load the model package+```dart+import 'package:openapi/api.dart';+```++## Properties+Name | Type | Description | Notes+------------ | ------------- | ------------- | -------------+**video** | **List<String>** | | [default to const []]+**image** | **List<String>** | | [default to const []]+**sidecar** | **List<String>** | | [default to const []]++[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)++diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dartindex ef9544c856..32420b9c29 100644--- a/mobile/openapi/lib/api.dart+++ b/mobile/openapi/lib/api.dart@@ -118,6 +118,7 @@ part 'model/search_facet_count_response_dto.dart';part 'model/search_facet_response_dto.dart';part 'model/search_response_dto.dart';part 'model/server_info_response_dto.dart';+part 'model/server_media_types_response_dto.dart';part 'model/server_ping_response.dart';part 'model/server_stats_response_dto.dart';part 'model/server_version_reponse_dto.dart';diff --git a/mobile/openapi/lib/api/server_info_api.dart b/mobile/openapi/lib/api/server_info_api.dartindex 8cc3460c9b..fb34e09ce8 100644--- a/mobile/openapi/lib/api/server_info_api.dart+++ b/mobile/openapi/lib/api/server_info_api.dart@@ -139,6 +139,47 @@ class ServerInfoApi {return null;}+ /// Performs an HTTP 'GET /server-info/media-types' operation and returns the [Response].+ Future<Response> getSupportedMediaTypesWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server-info/media-types';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerMediaTypesResponseDto?> getSupportedMediaTypes() async {+ final response = await getSupportedMediaTypesWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerMediaTypesResponseDto',) as ServerMediaTypesResponseDto;++ }+ return null;+ }+/// Performs an HTTP 'GET /server-info/ping' operation and returns the [Response].Future<Response> pingServerWithHttpInfo() async {// ignore: prefer_const_declarationsdiff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dartindex 824d4c9eb4..b2208df562 100644--- a/mobile/openapi/lib/api_client.dart+++ b/mobile/openapi/lib/api_client.dart@@ -331,6 +331,8 @@ class ApiClient {return SearchResponseDto.fromJson(value);case 'ServerInfoResponseDto':return ServerInfoResponseDto.fromJson(value);+ case 'ServerMediaTypesResponseDto':+ return ServerMediaTypesResponseDto.fromJson(value);case 'ServerPingResponse':return ServerPingResponse.fromJson(value);case 'ServerStatsResponseDto':diff --git a/mobile/openapi/lib/model/server_media_types_response_dto.dart b/mobile/openapi/lib/model/server_media_types_response_dto.dartnew file mode 100644index 0000000000..2cba41363d--- /dev/null+++ b/mobile/openapi/lib/model/server_media_types_response_dto.dart@@ -0,0 +1,120 @@+//+// AUTO-GENERATED FILE, DO NOT MODIFY!+//+// @dart=2.12++// ignore_for_file: unused_element, unused_import+// ignore_for_file: always_put_required_named_parameters_first+// ignore_for_file: constant_identifier_names+// ignore_for_file: lines_longer_than_80_chars++part of openapi.api;++class ServerMediaTypesResponseDto {+ /// Returns a new [ServerMediaTypesResponseDto] instance.+ ServerMediaTypesResponseDto({+ this.video = const [],+ this.image = const [],+ this.sidecar = const [],+ });++ List<String> video;++ List<String> image;++ List<String> sidecar;++ @override+ bool operator ==(Object other) => identical(this, other) || other is ServerMediaTypesResponseDto &&+ other.video == video &&+ other.image == image &&+ other.sidecar == sidecar;++ @override+ int get hashCode =>+ // ignore: unnecessary_parenthesis+ (video.hashCode) ++ (image.hashCode) ++ (sidecar.hashCode);++ @override+ String toString() => 'ServerMediaTypesResponseDto[video=$video, image=$image, sidecar=$sidecar]';++ Map<String, dynamic> toJson() {+ final json = <String, dynamic>{};+ json[r'video'] = this.video;+ json[r'image'] = this.image;+ json[r'sidecar'] = this.sidecar;+ return json;+ }++ /// Returns a new [ServerMediaTypesResponseDto] instance and imports its values from+ /// [value] if it's a [Map], null otherwise.+ // ignore: prefer_constructors_over_static_methods+ static ServerMediaTypesResponseDto? fromJson(dynamic value) {+ if (value is Map) {+ final json = value.cast<String, dynamic>();++ return ServerMediaTypesResponseDto(+ video: json[r'video'] is Iterable+ ? (json[r'video'] as Iterable).cast<String>().toList(growable: false)+ : const [],+ image: json[r'image'] is Iterable+ ? (json[r'image'] as Iterable).cast<String>().toList(growable: false)+ : const [],+ sidecar: json[r'sidecar'] is Iterable+ ? (json[r'sidecar'] as Iterable).cast<String>().toList(growable: false)+ : const [],+ );+ }+ return null;+ }++ static List<ServerMediaTypesResponseDto> listFromJson(dynamic json, {bool growable = false,}) {+ final result = <ServerMediaTypesResponseDto>[];+ if (json is List && json.isNotEmpty) {+ for (final row in json) {+ final value = ServerMediaTypesResponseDto.fromJson(row);+ if (value != null) {+ result.add(value);+ }+ }+ }+ return result.toList(growable: growable);+ }++ static Map<String, ServerMediaTypesResponseDto> mapFromJson(dynamic json) {+ final map = <String, ServerMediaTypesResponseDto>{};+ if (json is Map && json.isNotEmpty) {+ json = json.cast<String, dynamic>(); // ignore: parameter_assignments+ for (final entry in json.entries) {+ final value = ServerMediaTypesResponseDto.fromJson(entry.value);+ if (value != null) {+ map[entry.key] = value;+ }+ }+ }+ return map;+ }++ // maps a json object with a list of ServerMediaTypesResponseDto-objects as value to a dart map+ static Map<String, List<ServerMediaTypesResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {+ final map = <String, List<ServerMediaTypesResponseDto>>{};+ if (json is Map && json.isNotEmpty) {+ // ignore: parameter_assignments+ json = json.cast<String, dynamic>();+ for (final entry in json.entries) {+ map[entry.key] = ServerMediaTypesResponseDto.listFromJson(entry.value, growable: growable,);+ }+ }+ return map;+ }++ /// The list of required keys that must be present in a JSON.+ static const requiredKeys = <String>{+ 'video',+ 'image',+ 'sidecar',+ };+}+diff --git a/mobile/openapi/test/server_info_api_test.dart b/mobile/openapi/test/server_info_api_test.dartindex b662587eef..4fee682a25 100644--- a/mobile/openapi/test/server_info_api_test.dart+++ b/mobile/openapi/test/server_info_api_test.dart@@ -32,6 +32,11 @@ void main() {// TODO});+ //Future<ServerMediaTypesResponseDto> getSupportedMediaTypes() async+ test('test getSupportedMediaTypes', () async {+ // TODO+ });+//Future<ServerPingResponse> pingServer() asynctest('test pingServer', () async {// TODOdiff --git a/mobile/openapi/test/server_media_types_response_dto_test.dart b/mobile/openapi/test/server_media_types_response_dto_test.dartnew file mode 100644index 0000000000..041e646805--- /dev/null+++ b/mobile/openapi/test/server_media_types_response_dto_test.dart@@ -0,0 +1,37 @@+//+// AUTO-GENERATED FILE, DO NOT MODIFY!+//+// @dart=2.12++// ignore_for_file: unused_element, unused_import+// ignore_for_file: always_put_required_named_parameters_first+// ignore_for_file: constant_identifier_names+// ignore_for_file: lines_longer_than_80_chars++import 'package:openapi/api.dart';+import 'package:test/test.dart';++// tests for ServerMediaTypesResponseDto+void main() {+ // final instance = ServerMediaTypesResponseDto();++ group('test ServerMediaTypesResponseDto', () {+ // List<String> video (default value: const [])+ test('to test the property `video`', () async {+ // TODO+ });++ // List<String> image (default value: const [])+ test('to test the property `image`', () async {+ // TODO+ });++ // List<String> sidecar (default value: const [])+ test('to test the property `sidecar`', () async {+ // TODO+ });+++ });++}diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.jsonindex c2c006744c..877ea38673 100644--- a/server/immich-openapi-specs.json+++ b/server/immich-openapi-specs.json@@ -3040,6 +3040,27 @@]}},+ "/server-info/media-types": {+ "get": {+ "operationId": "getSupportedMediaTypes",+ "parameters": [],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ServerMediaTypesResponseDto"+ }+ }+ }+ }+ },+ "tags": [+ "Server Info"+ ]+ }+ },"/server-info/ping": {"get": {"operationId": "pingServer",@@ -6118,6 +6139,34 @@"diskAvailable"]},+ "ServerMediaTypesResponseDto": {+ "type": "object",+ "properties": {+ "video": {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ "image": {+ "type": "array",+ "items": {+ "type": "string"+ }+ },+ "sidecar": {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ },+ "required": [+ "video",+ "image",+ "sidecar"+ ]+ },"ServerPingResponse": {"type": "object","properties": {diff --git a/server/src/domain/server-info/response-dto/server-stats-response.dto.ts b/server/src/domain/server-info/response-dto/server-stats-response.dto.tsindex ed7a071769..1459ba452a 100644--- a/server/src/domain/server-info/response-dto/server-stats-response.dto.ts+++ b/server/src/domain/server-info/response-dto/server-stats-response.dto.ts@@ -25,3 +25,9 @@ export class ServerStatsResponseDto {})usageByUser: UsageByUserDto[] = [];}++export class ServerMediaTypesResponseDto {+ video!: string[];+ image!: string[];+ sidecar!: string[];+}diff --git a/server/src/domain/server-info/server-info.service.ts b/server/src/domain/server-info/server-info.service.tsindex 9d36f1b66d..ceeb85e295 100644--- a/server/src/domain/server-info/server-info.service.ts+++ b/server/src/domain/server-info/server-info.service.ts@@ -1,9 +1,15 @@import { Inject, Injectable } from '@nestjs/common';-import { serverVersion } from '../domain.constant';+import { mimeTypes, serverVersion } from '../domain.constant';import { asHumanReadable } from '../domain.util';import { IStorageRepository, StorageCore, StorageFolder } from '../storage';import { IUserRepository, UserStatsQueryResponse } from '../user';-import { ServerInfoResponseDto, ServerPingResponse, ServerStatsResponseDto, UsageByUserDto } from './response-dto';+import {+ ServerInfoResponseDto,+ ServerMediaTypesResponseDto,+ ServerPingResponse,+ ServerStatsResponseDto,+ UsageByUserDto,+} from './response-dto';@Injectable()export class ServerInfoService {@@ -60,4 +66,12 @@ export class ServerInfoService {return serverStats;}++ getSupportedMediaTypes(): ServerMediaTypesResponseDto {+ return {+ video: [...Object.keys(mimeTypes.video)],+ image: [...Object.keys(mimeTypes.image)],+ sidecar: [...Object.keys(mimeTypes.sidecar)],+ };+ }}diff --git a/server/src/immich/controllers/server-info.controller.ts b/server/src/immich/controllers/server-info.controller.tsindex e98485cbe8..59b6351787 100644--- a/server/src/immich/controllers/server-info.controller.ts+++ b/server/src/immich/controllers/server-info.controller.ts@@ -1,6 +1,7 @@import {ServerInfoResponseDto,ServerInfoService,+ ServerMediaTypesResponseDto,ServerPingResponse,ServerStatsResponseDto,ServerVersionReponseDto,@@ -39,4 +40,10 @@ export class ServerInfoController {getStats(): Promise<ServerStatsResponseDto> {return this.service.getStats();}++ @PublicRoute()+ @Get('/media-types')+ getSupportedMediaTypes(): ServerMediaTypesResponseDto {+ return this.service.getSupportedMediaTypes();+ }}diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.tsindex 66c717c814..414f7b147d 100644--- a/web/src/api/open-api/api.ts+++ b/web/src/api/open-api/api.ts@@ -2085,6 +2085,31 @@ export interface ServerInfoResponseDto {*/'diskAvailable': string;}+/**+ *+ * @export+ * @interface ServerMediaTypesResponseDto+ */+export interface ServerMediaTypesResponseDto {+ /**+ *+ * @type {Array<string>}+ * @memberof ServerMediaTypesResponseDto+ */+ 'video': Array<string>;+ /**+ *+ * @type {Array<string>}+ * @memberof ServerMediaTypesResponseDto+ */+ 'image': Array<string>;+ /**+ *+ * @type {Array<string>}+ * @memberof ServerMediaTypesResponseDto+ */+ 'sidecar': Array<string>;+}/**** @export@@ -9771,6 +9796,35 @@ export const ServerInfoApiAxiosParamCreator = function (configuration?: Configur+ setSearchParams(localVarUrlObj, localVarQueryParameter);+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};++ return {+ url: toPathString(localVarUrlObj),+ options: localVarRequestOptions,+ };+ },+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ */+ getSupportedMediaTypes: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {+ const localVarPath = `/server-info/media-types`;+ // 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 = {} as any;+ const localVarQueryParameter = {} as any;+++setSearchParams(localVarUrlObj, localVarQueryParameter);let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};@@ -9846,6 +9900,15 @@ export const ServerInfoApiFp = function(configuration?: Configuration) {const localVarAxiosArgs = await localVarAxiosParamCreator.getStats(options);return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);},+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ */+ async getSupportedMediaTypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerMediaTypesResponseDto>> {+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSupportedMediaTypes(options);+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);+ },/**** @param {*} [options] Override http request option.@@ -9889,6 +9952,14 @@ export const ServerInfoApiFactory = function (configuration?: Configuration, basgetStats(options?: any): AxiosPromise<ServerStatsResponseDto> {return localVarFp.getStats(options).then((request) => request(axios, basePath));},+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ */+ getSupportedMediaTypes(options?: any): AxiosPromise<ServerMediaTypesResponseDto> {+ return localVarFp.getSupportedMediaTypes(options).then((request) => request(axios, basePath));+ },/**** @param {*} [options] Override http request option.@@ -9937,6 +10008,16 @@ export class ServerInfoApi extends BaseAPI {return ServerInfoApiFp(this.configuration).getStats(options).then((request) => request(this.axios, this.basePath));}+ /**+ *+ * @param {*} [options] Override http request option.+ * @throws {RequiredError}+ * @memberof ServerInfoApi+ */+ public getSupportedMediaTypes(options?: AxiosRequestConfig) {+ return ServerInfoApiFp(this.configuration).getSupportedMediaTypes(options).then((request) => request(this.axios, this.basePath));+ }+/**** @param {*} [options] Override http request option.