refactor(server): trash endpoints (#6652)
* refactor(server): trash endpoints * chore: open api * chore: fix wrong rename
This commit is contained in:
Generated
+15
-15
@@ -14,7 +14,7 @@ Method | HTTP request | Description
|
||||
[**deleteAssets**](AssetApi.md#deleteassets) | **DELETE** /asset |
|
||||
[**downloadArchiveOld**](AssetApi.md#downloadarchiveold) | **POST** /asset/download/archive |
|
||||
[**downloadFileOld**](AssetApi.md#downloadfileold) | **POST** /asset/download/{id} |
|
||||
[**emptyTrash**](AssetApi.md#emptytrash) | **POST** /asset/trash/empty |
|
||||
[**emptyTrashOld**](AssetApi.md#emptytrashold) | **POST** /asset/trash/empty |
|
||||
[**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset |
|
||||
[**getAllUserAssetsByDeviceId**](AssetApi.md#getalluserassetsbydeviceid) | **GET** /asset/device/{deviceId} |
|
||||
[**getAssetById**](AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} |
|
||||
@@ -30,8 +30,8 @@ Method | HTTP request | Description
|
||||
[**getRandom**](AssetApi.md#getrandom) | **GET** /asset/random |
|
||||
[**getTimeBucket**](AssetApi.md#gettimebucket) | **GET** /asset/time-bucket |
|
||||
[**getTimeBuckets**](AssetApi.md#gettimebuckets) | **GET** /asset/time-buckets |
|
||||
[**restoreAssets**](AssetApi.md#restoreassets) | **POST** /asset/restore |
|
||||
[**restoreTrash**](AssetApi.md#restoretrash) | **POST** /asset/trash/restore |
|
||||
[**restoreAssetsOld**](AssetApi.md#restoreassetsold) | **POST** /asset/restore |
|
||||
[**restoreTrashOld**](AssetApi.md#restoretrashold) | **POST** /asset/trash/restore |
|
||||
[**runAssetJobs**](AssetApi.md#runassetjobs) | **POST** /asset/jobs |
|
||||
[**searchAssets**](AssetApi.md#searchassets) | **GET** /assets |
|
||||
[**serveFile**](AssetApi.md#servefile) | **GET** /asset/file/{id} |
|
||||
@@ -323,8 +323,8 @@ Name | Type | Description | Notes
|
||||
|
||||
[[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)
|
||||
|
||||
# **emptyTrash**
|
||||
> emptyTrash()
|
||||
# **emptyTrashOld**
|
||||
> emptyTrashOld()
|
||||
|
||||
|
||||
|
||||
@@ -349,9 +349,9 @@ import 'package:openapi/api.dart';
|
||||
final api_instance = AssetApi();
|
||||
|
||||
try {
|
||||
api_instance.emptyTrash();
|
||||
api_instance.emptyTrashOld();
|
||||
} catch (e) {
|
||||
print('Exception when calling AssetApi->emptyTrash: $e\n');
|
||||
print('Exception when calling AssetApi->emptyTrashOld: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1266,8 +1266,8 @@ Name | Type | Description | Notes
|
||||
|
||||
[[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)
|
||||
|
||||
# **restoreAssets**
|
||||
> restoreAssets(bulkIdsDto)
|
||||
# **restoreAssetsOld**
|
||||
> restoreAssetsOld(bulkIdsDto)
|
||||
|
||||
|
||||
|
||||
@@ -1293,9 +1293,9 @@ final api_instance = AssetApi();
|
||||
final bulkIdsDto = BulkIdsDto(); // BulkIdsDto |
|
||||
|
||||
try {
|
||||
api_instance.restoreAssets(bulkIdsDto);
|
||||
api_instance.restoreAssetsOld(bulkIdsDto);
|
||||
} catch (e) {
|
||||
print('Exception when calling AssetApi->restoreAssets: $e\n');
|
||||
print('Exception when calling AssetApi->restoreAssetsOld: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1320,8 +1320,8 @@ void (empty response body)
|
||||
|
||||
[[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)
|
||||
|
||||
# **restoreTrash**
|
||||
> restoreTrash()
|
||||
# **restoreTrashOld**
|
||||
> restoreTrashOld()
|
||||
|
||||
|
||||
|
||||
@@ -1346,9 +1346,9 @@ import 'package:openapi/api.dart';
|
||||
final api_instance = AssetApi();
|
||||
|
||||
try {
|
||||
api_instance.restoreTrash();
|
||||
api_instance.restoreTrashOld();
|
||||
} catch (e) {
|
||||
print('Exception when calling AssetApi->restoreTrash: $e\n');
|
||||
print('Exception when calling AssetApi->restoreTrashOld: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Generated
+170
@@ -0,0 +1,170 @@
|
||||
# openapi.api.TrashApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to */api*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**emptyTrash**](TrashApi.md#emptytrash) | **POST** /trash/empty |
|
||||
[**restoreAssets**](TrashApi.md#restoreassets) | **POST** /trash/restore/assets |
|
||||
[**restoreTrash**](TrashApi.md#restoretrash) | **POST** /trash/restore |
|
||||
|
||||
|
||||
# **emptyTrash**
|
||||
> emptyTrash()
|
||||
|
||||
|
||||
|
||||
### 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 = TrashApi();
|
||||
|
||||
try {
|
||||
api_instance.emptyTrash();
|
||||
} catch (e) {
|
||||
print('Exception when calling TrashApi->emptyTrash: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[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)
|
||||
|
||||
# **restoreAssets**
|
||||
> restoreAssets(bulkIdsDto)
|
||||
|
||||
|
||||
|
||||
### 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 = TrashApi();
|
||||
final bulkIdsDto = BulkIdsDto(); // BulkIdsDto |
|
||||
|
||||
try {
|
||||
api_instance.restoreAssets(bulkIdsDto);
|
||||
} catch (e) {
|
||||
print('Exception when calling TrashApi->restoreAssets: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**bulkIdsDto** | [**BulkIdsDto**](BulkIdsDto.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[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)
|
||||
|
||||
# **restoreTrash**
|
||||
> restoreTrash()
|
||||
|
||||
|
||||
|
||||
### 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 = TrashApi();
|
||||
|
||||
try {
|
||||
api_instance.restoreTrash();
|
||||
} catch (e) {
|
||||
print('Exception when calling TrashApi->restoreTrash: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[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)
|
||||
|
||||
Reference in New Issue
Block a user