diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index 04cc134b65..35c0171db3 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -2311,6 +2311,62 @@ export interface MergePersonDto { */ 'ids': Array; } +/** + * + * @export + * @interface MetricServerInfoConfig + */ +export interface MetricServerInfoConfig { + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'cpuCount': boolean; + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'cpuModel': boolean; + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'memory': boolean; + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'version': boolean; +} +/** + * + * @export + * @interface MetricsAssetCountConfig + */ +export interface MetricsAssetCountConfig { + /** + * + * @type {boolean} + * @memberof MetricsAssetCountConfig + */ + 'image': boolean; + /** + * + * @type {boolean} + * @memberof MetricsAssetCountConfig + */ + 'total': boolean; + /** + * + * @type {boolean} + * @memberof MetricsAssetCountConfig + */ + 'video': boolean; +} /** * * @export @@ -3062,6 +3118,12 @@ export interface ServerFeaturesDto { * @memberof ServerFeaturesDto */ 'map': boolean; + /** + * + * @type {boolean} + * @memberof ServerFeaturesDto + */ + 'metrics': boolean; /** * * @type {boolean} @@ -3566,6 +3628,12 @@ export interface SystemConfigDto { * @memberof SystemConfigDto */ 'map': SystemConfigMapDto; + /** + * + * @type {SystemConfigMetricsDto} + * @memberof SystemConfigDto + */ + 'metrics': SystemConfigMetricsDto; /** * * @type {SystemConfigNewVersionCheckDto} @@ -3908,6 +3976,31 @@ export interface SystemConfigMapDto { */ 'lightStyle': string; } +/** + * + * @export + * @interface SystemConfigMetricsDto + */ +export interface SystemConfigMetricsDto { + /** + * + * @type {MetricsAssetCountConfig} + * @memberof SystemConfigMetricsDto + */ + 'assetCount': MetricsAssetCountConfig; + /** + * + * @type {boolean} + * @memberof SystemConfigMetricsDto + */ + 'enabled': boolean; + /** + * + * @type {MetricServerInfoConfig} + * @memberof SystemConfigMetricsDto + */ + 'serverInfo': MetricServerInfoConfig; +} /** * * @export @@ -12692,6 +12785,132 @@ export class LibraryApi extends BaseAPI { } +/** + * MetricsApi - axios parameter creator + * @export + */ +export const MetricsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {SystemConfigMetricsDto} systemConfigMetricsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMetrics: async (systemConfigMetricsDto: SystemConfigMetricsDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'systemConfigMetricsDto' is not null or undefined + assertParamExists('getMetrics', 'systemConfigMetricsDto', systemConfigMetricsDto) + const localVarPath = `/metrics`; + // 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: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(systemConfigMetricsDto, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MetricsApi - functional programming interface + * @export + */ +export const MetricsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MetricsApiAxiosParamCreator(configuration) + return { + /** + * + * @param {SystemConfigMetricsDto} systemConfigMetricsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMetrics(systemConfigMetricsDto: SystemConfigMetricsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMetrics(systemConfigMetricsDto, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MetricsApi - factory interface + * @export + */ +export const MetricsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MetricsApiFp(configuration) + return { + /** + * + * @param {MetricsApiGetMetricsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getMetrics operation in MetricsApi. + * @export + * @interface MetricsApiGetMetricsRequest + */ +export interface MetricsApiGetMetricsRequest { + /** + * + * @type {SystemConfigMetricsDto} + * @memberof MetricsApiGetMetrics + */ + readonly systemConfigMetricsDto: SystemConfigMetricsDto +} + +/** + * MetricsApi - object-oriented interface + * @export + * @class MetricsApi + * @extends {BaseAPI} + */ +export class MetricsApi extends BaseAPI { + /** + * + * @param {MetricsApiGetMetricsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetricsApi + */ + public getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig) { + return MetricsApiFp(this.configuration).getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(this.axios, this.basePath)); + } +} + + /** * OAuthApi - axios parameter creator * @export diff --git a/mobile/openapi/.openapi-generator/FILES b/mobile/openapi/.openapi-generator/FILES index b8aef8e3db..d96094f7ef 100644 --- a/mobile/openapi/.openapi-generator/FILES +++ b/mobile/openapi/.openapi-generator/FILES @@ -89,6 +89,9 @@ doc/MapMarkerResponseDto.md doc/MapTheme.md doc/MemoryLaneResponseDto.md doc/MergePersonDto.md +doc/MetricServerInfoConfig.md +doc/MetricsApi.md +doc/MetricsAssetCountConfig.md doc/ModelType.md doc/OAuthApi.md doc/OAuthAuthorizeResponseDto.md @@ -145,6 +148,7 @@ doc/SystemConfigLibraryScanDto.md doc/SystemConfigLoggingDto.md doc/SystemConfigMachineLearningDto.md doc/SystemConfigMapDto.md +doc/SystemConfigMetricsDto.md doc/SystemConfigNewVersionCheckDto.md doc/SystemConfigOAuthDto.md doc/SystemConfigPasswordLoginDto.md @@ -188,6 +192,7 @@ lib/api/authentication_api.dart lib/api/face_api.dart lib/api/job_api.dart lib/api/library_api.dart +lib/api/metrics_api.dart lib/api/o_auth_api.dart lib/api/partner_api.dart lib/api/person_api.dart @@ -282,6 +287,8 @@ lib/model/map_marker_response_dto.dart lib/model/map_theme.dart lib/model/memory_lane_response_dto.dart lib/model/merge_person_dto.dart +lib/model/metric_server_info_config.dart +lib/model/metrics_asset_count_config.dart lib/model/model_type.dart lib/model/o_auth_authorize_response_dto.dart lib/model/o_auth_callback_dto.dart @@ -331,6 +338,7 @@ lib/model/system_config_library_scan_dto.dart lib/model/system_config_logging_dto.dart lib/model/system_config_machine_learning_dto.dart lib/model/system_config_map_dto.dart +lib/model/system_config_metrics_dto.dart lib/model/system_config_new_version_check_dto.dart lib/model/system_config_o_auth_dto.dart lib/model/system_config_password_login_dto.dart @@ -448,6 +456,9 @@ test/map_marker_response_dto_test.dart test/map_theme_test.dart test/memory_lane_response_dto_test.dart test/merge_person_dto_test.dart +test/metric_server_info_config_test.dart +test/metrics_api_test.dart +test/metrics_asset_count_config_test.dart test/model_type_test.dart test/o_auth_api_test.dart test/o_auth_authorize_response_dto_test.dart @@ -504,6 +515,7 @@ test/system_config_library_scan_dto_test.dart test/system_config_logging_dto_test.dart test/system_config_machine_learning_dto_test.dart test/system_config_map_dto_test.dart +test/system_config_metrics_dto_test.dart test/system_config_new_version_check_dto_test.dart test/system_config_o_auth_dto_test.dart test/system_config_password_login_dto_test.dart diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 9b4e57c9b6..9a3cee5678 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -145,6 +145,7 @@ Class | Method | HTTP request | Description *LibraryApi* | [**removeOfflineFiles**](doc//LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline | *LibraryApi* | [**scanLibrary**](doc//LibraryApi.md#scanlibrary) | **POST** /library/{id}/scan | *LibraryApi* | [**updateLibrary**](doc//LibraryApi.md#updatelibrary) | **PUT** /library/{id} | +*MetricsApi* | [**getMetrics**](doc//MetricsApi.md#getmetrics) | **PUT** /metrics | *OAuthApi* | [**finishOAuth**](doc//OAuthApi.md#finishoauth) | **POST** /oauth/callback | *OAuthApi* | [**generateOAuthConfig**](doc//OAuthApi.md#generateoauthconfig) | **POST** /oauth/config | *OAuthApi* | [**linkOAuthAccount**](doc//OAuthApi.md#linkoauthaccount) | **POST** /oauth/link | @@ -288,6 +289,8 @@ Class | Method | HTTP request | Description - [MapTheme](doc//MapTheme.md) - [MemoryLaneResponseDto](doc//MemoryLaneResponseDto.md) - [MergePersonDto](doc//MergePersonDto.md) + - [MetricServerInfoConfig](doc//MetricServerInfoConfig.md) + - [MetricsAssetCountConfig](doc//MetricsAssetCountConfig.md) - [ModelType](doc//ModelType.md) - [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md) - [OAuthCallbackDto](doc//OAuthCallbackDto.md) @@ -337,6 +340,7 @@ Class | Method | HTTP request | Description - [SystemConfigLoggingDto](doc//SystemConfigLoggingDto.md) - [SystemConfigMachineLearningDto](doc//SystemConfigMachineLearningDto.md) - [SystemConfigMapDto](doc//SystemConfigMapDto.md) + - [SystemConfigMetricsDto](doc//SystemConfigMetricsDto.md) - [SystemConfigNewVersionCheckDto](doc//SystemConfigNewVersionCheckDto.md) - [SystemConfigOAuthDto](doc//SystemConfigOAuthDto.md) - [SystemConfigPasswordLoginDto](doc//SystemConfigPasswordLoginDto.md) diff --git a/mobile/openapi/doc/MetricServerInfoConfig.md b/mobile/openapi/doc/MetricServerInfoConfig.md new file mode 100644 index 0000000000..5de811f91d --- /dev/null +++ b/mobile/openapi/doc/MetricServerInfoConfig.md @@ -0,0 +1,18 @@ +# openapi.model.MetricServerInfoConfig + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpuCount** | **bool** | | +**cpuModel** | **bool** | | +**memory** | **bool** | | +**version** | **bool** | | + +[[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/doc/MetricsApi.md b/mobile/openapi/doc/MetricsApi.md new file mode 100644 index 0000000000..10ca71d7a5 --- /dev/null +++ b/mobile/openapi/doc/MetricsApi.md @@ -0,0 +1,69 @@ +# openapi.api.MetricsApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to */api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getMetrics**](MetricsApi.md#getmetrics) | **PUT** /metrics | + + +# **getMetrics** +> Object getMetrics(systemConfigMetricsDto) + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: cookie +//defaultApiClient.getAuthentication('cookie').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('cookie').apiKeyPrefix = 'Bearer'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; +// TODO Configure HTTP Bearer authorization: bearer +// Case 1. Use String Token +//defaultApiClient.getAuthentication('bearer').setAccessToken('YOUR_ACCESS_TOKEN'); +// Case 2. Use Function which generate token. +// String yourTokenGeneratorFunction() { ... } +//defaultApiClient.getAuthentication('bearer').setAccessToken(yourTokenGeneratorFunction); + +final api_instance = MetricsApi(); +final systemConfigMetricsDto = SystemConfigMetricsDto(); // SystemConfigMetricsDto | + +try { + final result = api_instance.getMetrics(systemConfigMetricsDto); + print(result); +} catch (e) { + print('Exception when calling MetricsApi->getMetrics: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemConfigMetricsDto** | [**SystemConfigMetricsDto**](SystemConfigMetricsDto.md)| | + +### Return type + +[**Object**](Object.md) + +### Authorization + +[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + diff --git a/mobile/openapi/doc/MetricsAssetCountConfig.md b/mobile/openapi/doc/MetricsAssetCountConfig.md new file mode 100644 index 0000000000..940b428c1d --- /dev/null +++ b/mobile/openapi/doc/MetricsAssetCountConfig.md @@ -0,0 +1,17 @@ +# openapi.model.MetricsAssetCountConfig + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | **bool** | | +**total** | **bool** | | +**video** | **bool** | | + +[[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/doc/ServerFeaturesDto.md b/mobile/openapi/doc/ServerFeaturesDto.md index a149d8f484..43ca9a47e1 100644 --- a/mobile/openapi/doc/ServerFeaturesDto.md +++ b/mobile/openapi/doc/ServerFeaturesDto.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **configFile** | **bool** | | **facialRecognition** | **bool** | | **map** | **bool** | | +**metrics** | **bool** | | **oauth** | **bool** | | **oauthAutoLaunch** | **bool** | | **passwordLogin** | **bool** | | diff --git a/mobile/openapi/doc/SystemConfigDto.md b/mobile/openapi/doc/SystemConfigDto.md index 403260659a..1099c4a6bc 100644 --- a/mobile/openapi/doc/SystemConfigDto.md +++ b/mobile/openapi/doc/SystemConfigDto.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **logging** | [**SystemConfigLoggingDto**](SystemConfigLoggingDto.md) | | **machineLearning** | [**SystemConfigMachineLearningDto**](SystemConfigMachineLearningDto.md) | | **map** | [**SystemConfigMapDto**](SystemConfigMapDto.md) | | +**metrics** | [**SystemConfigMetricsDto**](SystemConfigMetricsDto.md) | | **newVersionCheck** | [**SystemConfigNewVersionCheckDto**](SystemConfigNewVersionCheckDto.md) | | **oauth** | [**SystemConfigOAuthDto**](SystemConfigOAuthDto.md) | | **passwordLogin** | [**SystemConfigPasswordLoginDto**](SystemConfigPasswordLoginDto.md) | | diff --git a/mobile/openapi/doc/SystemConfigMetricsDto.md b/mobile/openapi/doc/SystemConfigMetricsDto.md new file mode 100644 index 0000000000..a39c4c890b --- /dev/null +++ b/mobile/openapi/doc/SystemConfigMetricsDto.md @@ -0,0 +1,17 @@ +# openapi.model.SystemConfigMetricsDto + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assetCount** | [**MetricsAssetCountConfig**](MetricsAssetCountConfig.md) | | +**enabled** | **bool** | | +**serverInfo** | [**MetricServerInfoConfig**](MetricServerInfoConfig.md) | | + +[[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.dart index 32c60889de..7665224bc2 100644 --- a/mobile/openapi/lib/api.dart +++ b/mobile/openapi/lib/api.dart @@ -37,6 +37,7 @@ part 'api/authentication_api.dart'; part 'api/face_api.dart'; part 'api/job_api.dart'; part 'api/library_api.dart'; +part 'api/metrics_api.dart'; part 'api/o_auth_api.dart'; part 'api/partner_api.dart'; part 'api/person_api.dart'; @@ -124,6 +125,8 @@ part 'model/map_marker_response_dto.dart'; part 'model/map_theme.dart'; part 'model/memory_lane_response_dto.dart'; part 'model/merge_person_dto.dart'; +part 'model/metric_server_info_config.dart'; +part 'model/metrics_asset_count_config.dart'; part 'model/model_type.dart'; part 'model/o_auth_authorize_response_dto.dart'; part 'model/o_auth_callback_dto.dart'; @@ -173,6 +176,7 @@ part 'model/system_config_library_scan_dto.dart'; part 'model/system_config_logging_dto.dart'; part 'model/system_config_machine_learning_dto.dart'; part 'model/system_config_map_dto.dart'; +part 'model/system_config_metrics_dto.dart'; part 'model/system_config_new_version_check_dto.dart'; part 'model/system_config_o_auth_dto.dart'; part 'model/system_config_password_login_dto.dart'; diff --git a/mobile/openapi/lib/api/metrics_api.dart b/mobile/openapi/lib/api/metrics_api.dart new file mode 100644 index 0000000000..5dce359e59 --- /dev/null +++ b/mobile/openapi/lib/api/metrics_api.dart @@ -0,0 +1,65 @@ +// +// 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 MetricsApi { + MetricsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'PUT /metrics' operation and returns the [Response]. + /// Parameters: + /// + /// * [SystemConfigMetricsDto] systemConfigMetricsDto (required): + Future getMetricsWithHttpInfo(SystemConfigMetricsDto systemConfigMetricsDto,) async { + // ignore: prefer_const_declarations + final path = r'/metrics'; + + // ignore: prefer_final_locals + Object? postBody = systemConfigMetricsDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [SystemConfigMetricsDto] systemConfigMetricsDto (required): + Future getMetrics(SystemConfigMetricsDto systemConfigMetricsDto,) async { + final response = await getMetricsWithHttpInfo(systemConfigMetricsDto,); + 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), 'Object',) as Object; + + } + return null; + } +} diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart index b9dfe3505b..933fbd0e91 100644 --- a/mobile/openapi/lib/api_client.dart +++ b/mobile/openapi/lib/api_client.dart @@ -335,6 +335,10 @@ class ApiClient { return MemoryLaneResponseDto.fromJson(value); case 'MergePersonDto': return MergePersonDto.fromJson(value); + case 'MetricServerInfoConfig': + return MetricServerInfoConfig.fromJson(value); + case 'MetricsAssetCountConfig': + return MetricsAssetCountConfig.fromJson(value); case 'ModelType': return ModelTypeTypeTransformer().decode(value); case 'OAuthAuthorizeResponseDto': @@ -433,6 +437,8 @@ class ApiClient { return SystemConfigMachineLearningDto.fromJson(value); case 'SystemConfigMapDto': return SystemConfigMapDto.fromJson(value); + case 'SystemConfigMetricsDto': + return SystemConfigMetricsDto.fromJson(value); case 'SystemConfigNewVersionCheckDto': return SystemConfigNewVersionCheckDto.fromJson(value); case 'SystemConfigOAuthDto': diff --git a/mobile/openapi/lib/model/metric_server_info_config.dart b/mobile/openapi/lib/model/metric_server_info_config.dart new file mode 100644 index 0000000000..a429602002 --- /dev/null +++ b/mobile/openapi/lib/model/metric_server_info_config.dart @@ -0,0 +1,122 @@ +// +// 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 MetricServerInfoConfig { + /// Returns a new [MetricServerInfoConfig] instance. + MetricServerInfoConfig({ + required this.cpuCount, + required this.cpuModel, + required this.memory, + required this.version, + }); + + bool cpuCount; + + bool cpuModel; + + bool memory; + + bool version; + + @override + bool operator ==(Object other) => identical(this, other) || other is MetricServerInfoConfig && + other.cpuCount == cpuCount && + other.cpuModel == cpuModel && + other.memory == memory && + other.version == version; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (cpuCount.hashCode) + + (cpuModel.hashCode) + + (memory.hashCode) + + (version.hashCode); + + @override + String toString() => 'MetricServerInfoConfig[cpuCount=$cpuCount, cpuModel=$cpuModel, memory=$memory, version=$version]'; + + Map toJson() { + final json = {}; + json[r'cpuCount'] = this.cpuCount; + json[r'cpuModel'] = this.cpuModel; + json[r'memory'] = this.memory; + json[r'version'] = this.version; + return json; + } + + /// Returns a new [MetricServerInfoConfig] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MetricServerInfoConfig? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + return MetricServerInfoConfig( + cpuCount: mapValueOfType(json, r'cpuCount')!, + cpuModel: mapValueOfType(json, r'cpuModel')!, + memory: mapValueOfType(json, r'memory')!, + version: mapValueOfType(json, r'version')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MetricServerInfoConfig.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MetricServerInfoConfig.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MetricServerInfoConfig-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MetricServerInfoConfig.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'cpuCount', + 'cpuModel', + 'memory', + 'version', + }; +} + diff --git a/mobile/openapi/lib/model/metrics_asset_count_config.dart b/mobile/openapi/lib/model/metrics_asset_count_config.dart new file mode 100644 index 0000000000..795877284a --- /dev/null +++ b/mobile/openapi/lib/model/metrics_asset_count_config.dart @@ -0,0 +1,114 @@ +// +// 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 MetricsAssetCountConfig { + /// Returns a new [MetricsAssetCountConfig] instance. + MetricsAssetCountConfig({ + required this.image, + required this.total, + required this.video, + }); + + bool image; + + bool total; + + bool video; + + @override + bool operator ==(Object other) => identical(this, other) || other is MetricsAssetCountConfig && + other.image == image && + other.total == total && + other.video == video; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (image.hashCode) + + (total.hashCode) + + (video.hashCode); + + @override + String toString() => 'MetricsAssetCountConfig[image=$image, total=$total, video=$video]'; + + Map toJson() { + final json = {}; + json[r'image'] = this.image; + json[r'total'] = this.total; + json[r'video'] = this.video; + return json; + } + + /// Returns a new [MetricsAssetCountConfig] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MetricsAssetCountConfig? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + return MetricsAssetCountConfig( + image: mapValueOfType(json, r'image')!, + total: mapValueOfType(json, r'total')!, + video: mapValueOfType(json, r'video')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MetricsAssetCountConfig.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MetricsAssetCountConfig.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MetricsAssetCountConfig-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MetricsAssetCountConfig.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'image', + 'total', + 'video', + }; +} + diff --git a/mobile/openapi/lib/model/server_features_dto.dart b/mobile/openapi/lib/model/server_features_dto.dart index 1a395f99c9..2601c1365a 100644 --- a/mobile/openapi/lib/model/server_features_dto.dart +++ b/mobile/openapi/lib/model/server_features_dto.dart @@ -17,6 +17,7 @@ class ServerFeaturesDto { required this.configFile, required this.facialRecognition, required this.map, + required this.metrics, required this.oauth, required this.oauthAutoLaunch, required this.passwordLogin, @@ -34,6 +35,8 @@ class ServerFeaturesDto { bool map; + bool metrics; + bool oauth; bool oauthAutoLaunch; @@ -54,6 +57,7 @@ class ServerFeaturesDto { other.configFile == configFile && other.facialRecognition == facialRecognition && other.map == map && + other.metrics == metrics && other.oauth == oauth && other.oauthAutoLaunch == oauthAutoLaunch && other.passwordLogin == passwordLogin && @@ -69,6 +73,7 @@ class ServerFeaturesDto { (configFile.hashCode) + (facialRecognition.hashCode) + (map.hashCode) + + (metrics.hashCode) + (oauth.hashCode) + (oauthAutoLaunch.hashCode) + (passwordLogin.hashCode) + @@ -78,7 +83,7 @@ class ServerFeaturesDto { (trash.hashCode); @override - String toString() => 'ServerFeaturesDto[clipEncode=$clipEncode, configFile=$configFile, facialRecognition=$facialRecognition, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, trash=$trash]'; + String toString() => 'ServerFeaturesDto[clipEncode=$clipEncode, configFile=$configFile, facialRecognition=$facialRecognition, map=$map, metrics=$metrics, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, trash=$trash]'; Map toJson() { final json = {}; @@ -86,6 +91,7 @@ class ServerFeaturesDto { json[r'configFile'] = this.configFile; json[r'facialRecognition'] = this.facialRecognition; json[r'map'] = this.map; + json[r'metrics'] = this.metrics; json[r'oauth'] = this.oauth; json[r'oauthAutoLaunch'] = this.oauthAutoLaunch; json[r'passwordLogin'] = this.passwordLogin; @@ -108,6 +114,7 @@ class ServerFeaturesDto { configFile: mapValueOfType(json, r'configFile')!, facialRecognition: mapValueOfType(json, r'facialRecognition')!, map: mapValueOfType(json, r'map')!, + metrics: mapValueOfType(json, r'metrics')!, oauth: mapValueOfType(json, r'oauth')!, oauthAutoLaunch: mapValueOfType(json, r'oauthAutoLaunch')!, passwordLogin: mapValueOfType(json, r'passwordLogin')!, @@ -166,6 +173,7 @@ class ServerFeaturesDto { 'configFile', 'facialRecognition', 'map', + 'metrics', 'oauth', 'oauthAutoLaunch', 'passwordLogin', diff --git a/mobile/openapi/lib/model/system_config_dto.dart b/mobile/openapi/lib/model/system_config_dto.dart index e7214c201a..071eecab64 100644 --- a/mobile/openapi/lib/model/system_config_dto.dart +++ b/mobile/openapi/lib/model/system_config_dto.dart @@ -19,6 +19,7 @@ class SystemConfigDto { required this.logging, required this.machineLearning, required this.map, + required this.metrics, required this.newVersionCheck, required this.oauth, required this.passwordLogin, @@ -41,6 +42,8 @@ class SystemConfigDto { SystemConfigMapDto map; + SystemConfigMetricsDto metrics; + SystemConfigNewVersionCheckDto newVersionCheck; SystemConfigOAuthDto oauth; @@ -65,6 +68,7 @@ class SystemConfigDto { other.logging == logging && other.machineLearning == machineLearning && other.map == map && + other.metrics == metrics && other.newVersionCheck == newVersionCheck && other.oauth == oauth && other.passwordLogin == passwordLogin && @@ -83,6 +87,7 @@ class SystemConfigDto { (logging.hashCode) + (machineLearning.hashCode) + (map.hashCode) + + (metrics.hashCode) + (newVersionCheck.hashCode) + (oauth.hashCode) + (passwordLogin.hashCode) + @@ -93,7 +98,7 @@ class SystemConfigDto { (trash.hashCode); @override - String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, newVersionCheck=$newVersionCheck, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, storageTemplate=$storageTemplate, theme=$theme, thumbnail=$thumbnail, trash=$trash]'; + String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metrics=$metrics, newVersionCheck=$newVersionCheck, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, storageTemplate=$storageTemplate, theme=$theme, thumbnail=$thumbnail, trash=$trash]'; Map toJson() { final json = {}; @@ -103,6 +108,7 @@ class SystemConfigDto { json[r'logging'] = this.logging; json[r'machineLearning'] = this.machineLearning; json[r'map'] = this.map; + json[r'metrics'] = this.metrics; json[r'newVersionCheck'] = this.newVersionCheck; json[r'oauth'] = this.oauth; json[r'passwordLogin'] = this.passwordLogin; @@ -128,6 +134,7 @@ class SystemConfigDto { logging: SystemConfigLoggingDto.fromJson(json[r'logging'])!, machineLearning: SystemConfigMachineLearningDto.fromJson(json[r'machineLearning'])!, map: SystemConfigMapDto.fromJson(json[r'map'])!, + metrics: SystemConfigMetricsDto.fromJson(json[r'metrics'])!, newVersionCheck: SystemConfigNewVersionCheckDto.fromJson(json[r'newVersionCheck'])!, oauth: SystemConfigOAuthDto.fromJson(json[r'oauth'])!, passwordLogin: SystemConfigPasswordLoginDto.fromJson(json[r'passwordLogin'])!, @@ -189,6 +196,7 @@ class SystemConfigDto { 'logging', 'machineLearning', 'map', + 'metrics', 'newVersionCheck', 'oauth', 'passwordLogin', diff --git a/mobile/openapi/lib/model/system_config_metrics_dto.dart b/mobile/openapi/lib/model/system_config_metrics_dto.dart new file mode 100644 index 0000000000..f6ec0c510a --- /dev/null +++ b/mobile/openapi/lib/model/system_config_metrics_dto.dart @@ -0,0 +1,114 @@ +// +// 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 SystemConfigMetricsDto { + /// Returns a new [SystemConfigMetricsDto] instance. + SystemConfigMetricsDto({ + required this.assetCount, + required this.enabled, + required this.serverInfo, + }); + + MetricsAssetCountConfig assetCount; + + bool enabled; + + MetricServerInfoConfig serverInfo; + + @override + bool operator ==(Object other) => identical(this, other) || other is SystemConfigMetricsDto && + other.assetCount == assetCount && + other.enabled == enabled && + other.serverInfo == serverInfo; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (assetCount.hashCode) + + (enabled.hashCode) + + (serverInfo.hashCode); + + @override + String toString() => 'SystemConfigMetricsDto[assetCount=$assetCount, enabled=$enabled, serverInfo=$serverInfo]'; + + Map toJson() { + final json = {}; + json[r'assetCount'] = this.assetCount; + json[r'enabled'] = this.enabled; + json[r'serverInfo'] = this.serverInfo; + return json; + } + + /// Returns a new [SystemConfigMetricsDto] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SystemConfigMetricsDto? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + return SystemConfigMetricsDto( + assetCount: MetricsAssetCountConfig.fromJson(json[r'assetCount'])!, + enabled: mapValueOfType(json, r'enabled')!, + serverInfo: MetricServerInfoConfig.fromJson(json[r'serverInfo'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SystemConfigMetricsDto.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SystemConfigMetricsDto.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SystemConfigMetricsDto-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SystemConfigMetricsDto.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'assetCount', + 'enabled', + 'serverInfo', + }; +} + diff --git a/mobile/openapi/test/metric_server_info_config_test.dart b/mobile/openapi/test/metric_server_info_config_test.dart new file mode 100644 index 0000000000..546bb6acbd --- /dev/null +++ b/mobile/openapi/test/metric_server_info_config_test.dart @@ -0,0 +1,42 @@ +// +// 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 MetricServerInfoConfig +void main() { + // final instance = MetricServerInfoConfig(); + + group('test MetricServerInfoConfig', () { + // bool cpuCount + test('to test the property `cpuCount`', () async { + // TODO + }); + + // bool cpuModel + test('to test the property `cpuModel`', () async { + // TODO + }); + + // bool memory + test('to test the property `memory`', () async { + // TODO + }); + + // bool version + test('to test the property `version`', () async { + // TODO + }); + + + }); + +} diff --git a/mobile/openapi/test/metrics_api_test.dart b/mobile/openapi/test/metrics_api_test.dart new file mode 100644 index 0000000000..1762a5c692 --- /dev/null +++ b/mobile/openapi/test/metrics_api_test.dart @@ -0,0 +1,26 @@ +// +// 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 MetricsApi +void main() { + // final instance = MetricsApi(); + + group('tests for MetricsApi', () { + //Future getMetrics(SystemConfigMetricsDto systemConfigMetricsDto) async + test('test getMetrics', () async { + // TODO + }); + + }); +} diff --git a/mobile/openapi/test/metrics_asset_count_config_test.dart b/mobile/openapi/test/metrics_asset_count_config_test.dart new file mode 100644 index 0000000000..26bbb3c4e6 --- /dev/null +++ b/mobile/openapi/test/metrics_asset_count_config_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 MetricsAssetCountConfig +void main() { + // final instance = MetricsAssetCountConfig(); + + group('test MetricsAssetCountConfig', () { + // bool image + test('to test the property `image`', () async { + // TODO + }); + + // bool total + test('to test the property `total`', () async { + // TODO + }); + + // bool video + test('to test the property `video`', () async { + // TODO + }); + + + }); + +} diff --git a/mobile/openapi/test/server_features_dto_test.dart b/mobile/openapi/test/server_features_dto_test.dart index ac92a105f7..acf4d59b04 100644 --- a/mobile/openapi/test/server_features_dto_test.dart +++ b/mobile/openapi/test/server_features_dto_test.dart @@ -36,6 +36,11 @@ void main() { // TODO }); + // bool metrics + test('to test the property `metrics`', () async { + // TODO + }); + // bool oauth test('to test the property `oauth`', () async { // TODO diff --git a/mobile/openapi/test/system_config_dto_test.dart b/mobile/openapi/test/system_config_dto_test.dart index 5398f77601..1c379befe5 100644 --- a/mobile/openapi/test/system_config_dto_test.dart +++ b/mobile/openapi/test/system_config_dto_test.dart @@ -46,6 +46,11 @@ void main() { // TODO }); + // SystemConfigMetricsDto metrics + test('to test the property `metrics`', () async { + // TODO + }); + // SystemConfigNewVersionCheckDto newVersionCheck test('to test the property `newVersionCheck`', () async { // TODO diff --git a/mobile/openapi/test/system_config_metrics_dto_test.dart b/mobile/openapi/test/system_config_metrics_dto_test.dart new file mode 100644 index 0000000000..8994065f10 --- /dev/null +++ b/mobile/openapi/test/system_config_metrics_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 SystemConfigMetricsDto +void main() { + // final instance = SystemConfigMetricsDto(); + + group('test SystemConfigMetricsDto', () { + // MetricsAssetCountConfig assetCount + test('to test the property `assetCount`', () async { + // TODO + }); + + // bool enabled + test('to test the property `enabled`', () async { + // TODO + }); + + // MetricServerInfoConfig serverInfo + test('to test the property `serverInfo`', () async { + // TODO + }); + + + }); + +} diff --git a/web/src/api/api.ts b/web/src/api/api.ts index d984a44610..ad84752ad3 100644 --- a/web/src/api/api.ts +++ b/web/src/api/api.ts @@ -22,6 +22,7 @@ import { AuditApi, ActivityApi, FaceApi, + MetricsApi, } from './open-api'; import { BASE_PATH } from './open-api/base'; import { DUMMY_BASE_URL, toPathString } from './open-api/common'; @@ -37,6 +38,7 @@ class ImmichApi { public faceApi: FaceApi; public jobApi: JobApi; public keyApi: APIKeyApi; + public metricsApi: MetricsApi; public oauthApi: OAuthApi; public partnerApi: PartnerApi; public searchApi: SearchApi; @@ -65,6 +67,7 @@ class ImmichApi { this.faceApi = new FaceApi(this.config); this.jobApi = new JobApi(this.config); this.keyApi = new APIKeyApi(this.config); + this.metricsApi = new MetricsApi(this.config); this.oauthApi = new OAuthApi(this.config); this.partnerApi = new PartnerApi(this.config); this.searchApi = new SearchApi(this.config); diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index 04cc134b65..35c0171db3 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -2311,6 +2311,62 @@ export interface MergePersonDto { */ 'ids': Array; } +/** + * + * @export + * @interface MetricServerInfoConfig + */ +export interface MetricServerInfoConfig { + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'cpuCount': boolean; + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'cpuModel': boolean; + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'memory': boolean; + /** + * + * @type {boolean} + * @memberof MetricServerInfoConfig + */ + 'version': boolean; +} +/** + * + * @export + * @interface MetricsAssetCountConfig + */ +export interface MetricsAssetCountConfig { + /** + * + * @type {boolean} + * @memberof MetricsAssetCountConfig + */ + 'image': boolean; + /** + * + * @type {boolean} + * @memberof MetricsAssetCountConfig + */ + 'total': boolean; + /** + * + * @type {boolean} + * @memberof MetricsAssetCountConfig + */ + 'video': boolean; +} /** * * @export @@ -3062,6 +3118,12 @@ export interface ServerFeaturesDto { * @memberof ServerFeaturesDto */ 'map': boolean; + /** + * + * @type {boolean} + * @memberof ServerFeaturesDto + */ + 'metrics': boolean; /** * * @type {boolean} @@ -3566,6 +3628,12 @@ export interface SystemConfigDto { * @memberof SystemConfigDto */ 'map': SystemConfigMapDto; + /** + * + * @type {SystemConfigMetricsDto} + * @memberof SystemConfigDto + */ + 'metrics': SystemConfigMetricsDto; /** * * @type {SystemConfigNewVersionCheckDto} @@ -3908,6 +3976,31 @@ export interface SystemConfigMapDto { */ 'lightStyle': string; } +/** + * + * @export + * @interface SystemConfigMetricsDto + */ +export interface SystemConfigMetricsDto { + /** + * + * @type {MetricsAssetCountConfig} + * @memberof SystemConfigMetricsDto + */ + 'assetCount': MetricsAssetCountConfig; + /** + * + * @type {boolean} + * @memberof SystemConfigMetricsDto + */ + 'enabled': boolean; + /** + * + * @type {MetricServerInfoConfig} + * @memberof SystemConfigMetricsDto + */ + 'serverInfo': MetricServerInfoConfig; +} /** * * @export @@ -12692,6 +12785,132 @@ export class LibraryApi extends BaseAPI { } +/** + * MetricsApi - axios parameter creator + * @export + */ +export const MetricsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {SystemConfigMetricsDto} systemConfigMetricsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMetrics: async (systemConfigMetricsDto: SystemConfigMetricsDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'systemConfigMetricsDto' is not null or undefined + assertParamExists('getMetrics', 'systemConfigMetricsDto', systemConfigMetricsDto) + const localVarPath = `/metrics`; + // 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: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(systemConfigMetricsDto, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MetricsApi - functional programming interface + * @export + */ +export const MetricsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MetricsApiAxiosParamCreator(configuration) + return { + /** + * + * @param {SystemConfigMetricsDto} systemConfigMetricsDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMetrics(systemConfigMetricsDto: SystemConfigMetricsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMetrics(systemConfigMetricsDto, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MetricsApi - factory interface + * @export + */ +export const MetricsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MetricsApiFp(configuration) + return { + /** + * + * @param {MetricsApiGetMetricsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getMetrics operation in MetricsApi. + * @export + * @interface MetricsApiGetMetricsRequest + */ +export interface MetricsApiGetMetricsRequest { + /** + * + * @type {SystemConfigMetricsDto} + * @memberof MetricsApiGetMetrics + */ + readonly systemConfigMetricsDto: SystemConfigMetricsDto +} + +/** + * MetricsApi - object-oriented interface + * @export + * @class MetricsApi + * @extends {BaseAPI} + */ +export class MetricsApi extends BaseAPI { + /** + * + * @param {MetricsApiGetMetricsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetricsApi + */ + public getMetrics(requestParameters: MetricsApiGetMetricsRequest, options?: AxiosRequestConfig) { + return MetricsApiFp(this.configuration).getMetrics(requestParameters.systemConfigMetricsDto, options).then((request) => request(this.axios, this.basePath)); + } +} + + /** * OAuthApi - axios parameter creator * @export