mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 15:30:51 -04:00
open api
This commit is contained in:
parent
902d4d0275
commit
fb01bd956f
219
cli/src/api/open-api/api.ts
generated
219
cli/src/api/open-api/api.ts
generated
@ -2311,6 +2311,62 @@ export interface MergePersonDto {
|
||||
*/
|
||||
'ids': Array<string>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @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<RequestArgs> => {
|
||||
// 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<object>> {
|
||||
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<object> {
|
||||
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
|
||||
|
12
mobile/openapi/.openapi-generator/FILES
generated
12
mobile/openapi/.openapi-generator/FILES
generated
@ -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
|
||||
|
4
mobile/openapi/README.md
generated
4
mobile/openapi/README.md
generated
@ -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)
|
||||
|
18
mobile/openapi/doc/MetricServerInfoConfig.md
generated
Normal file
18
mobile/openapi/doc/MetricServerInfoConfig.md
generated
Normal file
@ -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)
|
||||
|
||||
|
69
mobile/openapi/doc/MetricsApi.md
generated
Normal file
69
mobile/openapi/doc/MetricsApi.md
generated
Normal file
@ -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<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
||||
// TODO Configure API key authorization: api_key
|
||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
||||
// TODO Configure HTTP Bearer authorization: bearer
|
||||
// Case 1. Use String Token
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
// Case 2. Use Function which generate token.
|
||||
// String yourTokenGeneratorFunction() { ... }
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('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)
|
||||
|
17
mobile/openapi/doc/MetricsAssetCountConfig.md
generated
Normal file
17
mobile/openapi/doc/MetricsAssetCountConfig.md
generated
Normal file
@ -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)
|
||||
|
||||
|
1
mobile/openapi/doc/ServerFeaturesDto.md
generated
1
mobile/openapi/doc/ServerFeaturesDto.md
generated
@ -12,6 +12,7 @@ Name | Type | Description | Notes
|
||||
**configFile** | **bool** | |
|
||||
**facialRecognition** | **bool** | |
|
||||
**map** | **bool** | |
|
||||
**metrics** | **bool** | |
|
||||
**oauth** | **bool** | |
|
||||
**oauthAutoLaunch** | **bool** | |
|
||||
**passwordLogin** | **bool** | |
|
||||
|
1
mobile/openapi/doc/SystemConfigDto.md
generated
1
mobile/openapi/doc/SystemConfigDto.md
generated
@ -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) | |
|
||||
|
17
mobile/openapi/doc/SystemConfigMetricsDto.md
generated
Normal file
17
mobile/openapi/doc/SystemConfigMetricsDto.md
generated
Normal file
@ -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)
|
||||
|
||||
|
4
mobile/openapi/lib/api.dart
generated
4
mobile/openapi/lib/api.dart
generated
@ -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';
|
||||
|
65
mobile/openapi/lib/api/metrics_api.dart
generated
Normal file
65
mobile/openapi/lib/api/metrics_api.dart
generated
Normal file
@ -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<Response> getMetricsWithHttpInfo(SystemConfigMetricsDto systemConfigMetricsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/metrics';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = systemConfigMetricsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SystemConfigMetricsDto] systemConfigMetricsDto (required):
|
||||
Future<Object?> 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;
|
||||
}
|
||||
}
|
6
mobile/openapi/lib/api_client.dart
generated
6
mobile/openapi/lib/api_client.dart
generated
@ -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':
|
||||
|
122
mobile/openapi/lib/model/metric_server_info_config.dart
generated
Normal file
122
mobile/openapi/lib/model/metric_server_info_config.dart
generated
Normal file
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic>();
|
||||
|
||||
return MetricServerInfoConfig(
|
||||
cpuCount: mapValueOfType<bool>(json, r'cpuCount')!,
|
||||
cpuModel: mapValueOfType<bool>(json, r'cpuModel')!,
|
||||
memory: mapValueOfType<bool>(json, r'memory')!,
|
||||
version: mapValueOfType<bool>(json, r'version')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<MetricServerInfoConfig> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MetricServerInfoConfig>[];
|
||||
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<String, MetricServerInfoConfig> mapFromJson(dynamic json) {
|
||||
final map = <String, MetricServerInfoConfig>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // 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<String, List<MetricServerInfoConfig>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<MetricServerInfoConfig>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
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 = <String>{
|
||||
'cpuCount',
|
||||
'cpuModel',
|
||||
'memory',
|
||||
'version',
|
||||
};
|
||||
}
|
||||
|
114
mobile/openapi/lib/model/metrics_asset_count_config.dart
generated
Normal file
114
mobile/openapi/lib/model/metrics_asset_count_config.dart
generated
Normal file
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic>();
|
||||
|
||||
return MetricsAssetCountConfig(
|
||||
image: mapValueOfType<bool>(json, r'image')!,
|
||||
total: mapValueOfType<bool>(json, r'total')!,
|
||||
video: mapValueOfType<bool>(json, r'video')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<MetricsAssetCountConfig> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MetricsAssetCountConfig>[];
|
||||
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<String, MetricsAssetCountConfig> mapFromJson(dynamic json) {
|
||||
final map = <String, MetricsAssetCountConfig>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // 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<String, List<MetricsAssetCountConfig>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<MetricsAssetCountConfig>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
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 = <String>{
|
||||
'image',
|
||||
'total',
|
||||
'video',
|
||||
};
|
||||
}
|
||||
|
10
mobile/openapi/lib/model/server_features_dto.dart
generated
10
mobile/openapi/lib/model/server_features_dto.dart
generated
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -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<bool>(json, r'configFile')!,
|
||||
facialRecognition: mapValueOfType<bool>(json, r'facialRecognition')!,
|
||||
map: mapValueOfType<bool>(json, r'map')!,
|
||||
metrics: mapValueOfType<bool>(json, r'metrics')!,
|
||||
oauth: mapValueOfType<bool>(json, r'oauth')!,
|
||||
oauthAutoLaunch: mapValueOfType<bool>(json, r'oauthAutoLaunch')!,
|
||||
passwordLogin: mapValueOfType<bool>(json, r'passwordLogin')!,
|
||||
@ -166,6 +173,7 @@ class ServerFeaturesDto {
|
||||
'configFile',
|
||||
'facialRecognition',
|
||||
'map',
|
||||
'metrics',
|
||||
'oauth',
|
||||
'oauthAutoLaunch',
|
||||
'passwordLogin',
|
||||
|
10
mobile/openapi/lib/model/system_config_dto.dart
generated
10
mobile/openapi/lib/model/system_config_dto.dart
generated
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -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',
|
||||
|
114
mobile/openapi/lib/model/system_config_metrics_dto.dart
generated
Normal file
114
mobile/openapi/lib/model/system_config_metrics_dto.dart
generated
Normal file
@ -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<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
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<String, dynamic>();
|
||||
|
||||
return SystemConfigMetricsDto(
|
||||
assetCount: MetricsAssetCountConfig.fromJson(json[r'assetCount'])!,
|
||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||
serverInfo: MetricServerInfoConfig.fromJson(json[r'serverInfo'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SystemConfigMetricsDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SystemConfigMetricsDto>[];
|
||||
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<String, SystemConfigMetricsDto> mapFromJson(dynamic json) {
|
||||
final map = <String, SystemConfigMetricsDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // 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<String, List<SystemConfigMetricsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SystemConfigMetricsDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
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 = <String>{
|
||||
'assetCount',
|
||||
'enabled',
|
||||
'serverInfo',
|
||||
};
|
||||
}
|
||||
|
42
mobile/openapi/test/metric_server_info_config_test.dart
generated
Normal file
42
mobile/openapi/test/metric_server_info_config_test.dart
generated
Normal file
@ -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
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
26
mobile/openapi/test/metrics_api_test.dart
generated
Normal file
26
mobile/openapi/test/metrics_api_test.dart
generated
Normal file
@ -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<Object> getMetrics(SystemConfigMetricsDto systemConfigMetricsDto) async
|
||||
test('test getMetrics', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
37
mobile/openapi/test/metrics_asset_count_config_test.dart
generated
Normal file
37
mobile/openapi/test/metrics_asset_count_config_test.dart
generated
Normal file
@ -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
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -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
|
||||
|
5
mobile/openapi/test/system_config_dto_test.dart
generated
5
mobile/openapi/test/system_config_dto_test.dart
generated
@ -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
|
||||
|
37
mobile/openapi/test/system_config_metrics_dto_test.dart
generated
Normal file
37
mobile/openapi/test/system_config_metrics_dto_test.dart
generated
Normal file
@ -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
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -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);
|
||||
|
219
web/src/api/open-api/api.ts
generated
219
web/src/api/open-api/api.ts
generated
@ -2311,6 +2311,62 @@ export interface MergePersonDto {
|
||||
*/
|
||||
'ids': Array<string>;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @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<RequestArgs> => {
|
||||
// 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<object>> {
|
||||
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<object> {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user