2022-07-13 05:23:48 -07:00
|
|
|
//
|
|
|
|
// 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 AssetApi
|
|
|
|
void main() {
|
|
|
|
// final instance = AssetApi();
|
|
|
|
|
|
|
|
group('tests for AssetApi', () {
|
2023-05-24 14:08:21 -07:00
|
|
|
// Checks if assets exist by checksums
|
|
|
|
//
|
|
|
|
//Future<AssetBulkUploadCheckResponseDto> bulkUploadCheck(AssetBulkUploadCheckDto assetBulkUploadCheckDto) async
|
|
|
|
test('test bulkUploadCheck', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-07-13 05:23:48 -07:00
|
|
|
// Check duplicated asset before uploading - for Web upload used
|
|
|
|
//
|
2023-02-24 09:01:10 -07:00
|
|
|
//Future<CheckDuplicateAssetResponseDto> checkDuplicateAsset(CheckDuplicateAssetDto checkDuplicateAssetDto, { String key }) async
|
2022-07-13 05:23:48 -07:00
|
|
|
test('test checkDuplicateAsset', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-12-06 15:10:04 -07:00
|
|
|
// Checks if multiple assets exist on the server and returns all existing - used by background backup
|
|
|
|
//
|
|
|
|
//Future<CheckExistingAssetsResponseDto> checkExistingAssets(CheckExistingAssetsDto checkExistingAssetsDto) async
|
|
|
|
test('test checkExistingAssets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
//Future<List<DeleteAssetResponseDto>> deleteAsset(DeleteAssetDto deleteAssetDto) async
|
2022-07-13 05:23:48 -07:00
|
|
|
test('test deleteAsset', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-06-30 09:24:28 -07:00
|
|
|
//Future<MultipartFile> downloadArchive(AssetIdsDto assetIdsDto, { String key }) async
|
|
|
|
test('test downloadArchive', () async {
|
2023-01-09 13:16:08 -07:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-06-30 09:24:28 -07:00
|
|
|
//Future<MultipartFile> downloadFile(String id, { String key }) async
|
|
|
|
test('test downloadFile', () async {
|
2022-12-06 15:10:04 -07:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-07-13 05:23:48 -07:00
|
|
|
// Get all AssetEntity belong to the user
|
|
|
|
//
|
2023-06-03 19:41:27 -07:00
|
|
|
//Future<List<AssetResponseDto>> getAllAssets({ String userId, bool isFavorite, bool isArchived, bool withoutThumbs, num skip, String ifNoneMatch }) async
|
2022-07-13 05:23:48 -07:00
|
|
|
test('test getAllAssets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
// Get a single asset's information
|
|
|
|
//
|
2023-06-01 19:19:25 -07:00
|
|
|
//Future<AssetResponseDto> getAssetById(String id, { String key }) async
|
2022-07-13 05:23:48 -07:00
|
|
|
test('test getAssetById', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-07-14 06:30:17 -07:00
|
|
|
//Future<List<String>> getAssetSearchTerms() async
|
|
|
|
test('test getAssetSearchTerms', () async {
|
2022-12-06 15:10:04 -07:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-07-14 06:30:17 -07:00
|
|
|
//Future<AssetStatsResponseDto> getAssetStats({ bool isArchived, bool isFavorite }) async
|
|
|
|
test('test getAssetStats', () async {
|
2022-07-13 05:23:48 -07:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-07-06 15:25:56 -07:00
|
|
|
//Future<MultipartFile> getAssetThumbnail(String id, { ThumbnailFormat format, String key }) async
|
2022-07-13 05:23:48 -07:00
|
|
|
test('test getAssetThumbnail', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-08-05 06:58:52 -07:00
|
|
|
//Future<List<AssetResponseDto>> getByTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, String key }) async
|
2023-08-04 14:07:15 -07:00
|
|
|
test('test getByTimeBucket', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-07-13 05:23:48 -07:00
|
|
|
//Future<List<CuratedLocationsResponseDto>> getCuratedLocations() async
|
|
|
|
test('test getCuratedLocations', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
//Future<List<CuratedObjectsResponseDto>> getCuratedObjects() async
|
|
|
|
test('test getCuratedObjects', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-08-15 08:49:32 -07:00
|
|
|
//Future<DownloadResponseDto> getDownloadInfo(DownloadInfoDto downloadInfoDto, { String key }) async
|
2023-06-30 09:24:28 -07:00
|
|
|
test('test getDownloadInfo', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-05-25 09:47:52 -07:00
|
|
|
//Future<List<MapMarkerResponseDto>> getMapMarkers({ bool isFavorite, DateTime fileCreatedAfter, DateTime fileCreatedBefore }) async
|
2023-05-05 18:33:30 -07:00
|
|
|
test('test getMapMarkers', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-06-15 11:05:30 -07:00
|
|
|
//Future<List<MemoryLaneResponseDto>> getMemoryLane(DateTime timestamp) async
|
2023-06-14 18:47:18 -07:00
|
|
|
test('test getMemoryLane', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-08-05 06:58:52 -07:00
|
|
|
//Future<List<TimeBucketResponseDto>> getTimeBuckets(TimeBucketSize size, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, String key }) async
|
2023-08-04 14:07:15 -07:00
|
|
|
test('test getTimeBuckets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-07-13 05:23:48 -07:00
|
|
|
// Get all asset of a device that are in the database, ID only.
|
|
|
|
//
|
|
|
|
//Future<List<String>> getUserAssetsByDeviceId(String deviceId) async
|
|
|
|
test('test getUserAssetsByDeviceId', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
feat(server): support for read-only assets and importing existing items in the filesystem (#2715)
* Added read-only flag for assets, endpoint to trigger file import vs upload
* updated fixtures with new property
* if upload is 'read-only', ensure there is no existing asset at the designated originalPath
* added test for file import as well as detecting existing image at read-only destination location
* Added storage service test for a case where it should not move read-only assets
* upload doesn't need the read-only flag available, just importing
* default isReadOnly on import endpoint to true
* formatting fixes
* create-asset dto needs isReadOnly, so set it to false by default on create, updated api generation
* updated code to reflect changes in MR
* fixed read stream promise return type
* new index for originalPath, check for existing path on import, reglardless of user, to prevent duplicates
* refactor: import asset
* chore: open api
* chore: tests
* Added externalPath support for individual users, updated UI to allow this to be set by admin
* added missing var for externalPath in ui
* chore: open api
* fix: compilation issues
* fix: server test
* built api, fixed user-response dto to include externalPath
* reverted accidental commit
* bad commit of duplicate externalPath in user response dto
* fixed tests to include externalPath on expected result
* fix: unit tests
* centralized supported filetypes, perform file type checking of asset and sidecar during file import process
* centralized supported filetype check method to keep regex DRY
* fixed typo
* combined migrations into one
* update api
* Removed externalPath from shared-link code, added column to admin user page whether external paths / import is enabled or not
* update mimetype
* Fixed detect correct mimetype
* revert asset-upload config
* reverted domain.constant
* refactor
* fix mime-type issue
* fix format
---------
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2023-06-21 19:33:20 -07:00
|
|
|
//Future<AssetFileUploadResponseDto> importFile(ImportAssetDto importAssetDto) async
|
|
|
|
test('test importFile', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-07-13 05:23:48 -07:00
|
|
|
//Future<List<AssetResponseDto>> searchAsset(SearchAssetDto searchAssetDto) async
|
|
|
|
test('test searchAsset', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-07-06 15:25:56 -07:00
|
|
|
//Future<MultipartFile> serveFile(String id, { bool isThumb, bool isWeb, String key }) async
|
2022-07-13 05:23:48 -07:00
|
|
|
test('test serveFile', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-12-06 15:10:04 -07:00
|
|
|
// Update an asset
|
|
|
|
//
|
2023-06-01 19:19:25 -07:00
|
|
|
//Future<AssetResponseDto> updateAsset(String id, UpdateAssetDto updateAssetDto) async
|
2022-12-06 15:10:04 -07:00
|
|
|
test('test updateAsset', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-08-01 09:49:18 -07:00
|
|
|
//Future<AssetFileUploadResponseDto> uploadFile(MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, bool isFavorite, { String key, String duration, bool isArchived, bool isReadOnly, bool isVisible, MultipartFile livePhotoData, MultipartFile sidecarData }) async
|
2022-07-13 05:23:48 -07:00
|
|
|
test('test uploadFile', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|