2022-07-13 14:23:48 +02: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 23:08:21 +02:00
|
|
|
// Checks if assets exist by checksums
|
|
|
|
//
|
2023-11-04 02:33:15 +01:00
|
|
|
//Future<AssetBulkUploadCheckResponseDto> checkBulkUpload(AssetBulkUploadCheckDto assetBulkUploadCheckDto) async
|
|
|
|
test('test checkBulkUpload', () async {
|
2023-05-24 23:08:21 +02:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-12-06 23:10:04 +01: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
|
|
|
|
});
|
|
|
|
|
2023-10-06 09:01:14 +02:00
|
|
|
//Future deleteAssets(AssetBulkDeleteDto assetBulkDeleteDto) async
|
|
|
|
test('test deleteAssets', () async {
|
2022-07-13 14:23:48 +02:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-06-30 18:24:28 +02:00
|
|
|
//Future<MultipartFile> downloadArchive(AssetIdsDto assetIdsDto, { String key }) async
|
|
|
|
test('test downloadArchive', () async {
|
2023-01-09 21:16:08 +01:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-06-30 18:24:28 +02:00
|
|
|
//Future<MultipartFile> downloadFile(String id, { String key }) async
|
|
|
|
test('test downloadFile', () async {
|
2022-12-06 23:10:04 +01:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-10-06 09:01:14 +02:00
|
|
|
//Future emptyTrash() async
|
|
|
|
test('test emptyTrash', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-07-13 14:23:48 +02:00
|
|
|
// Get all AssetEntity belong to the user
|
|
|
|
//
|
2023-11-06 18:40:43 +01:00
|
|
|
//Future<List<AssetResponseDto>> getAllAssets({ int skip, int take, String userId, bool isFavorite, bool isArchived, DateTime updatedAfter, DateTime updatedBefore, String ifNoneMatch }) async
|
2022-07-13 14:23:48 +02:00
|
|
|
test('test getAllAssets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
// Get a single asset's information
|
|
|
|
//
|
2023-06-02 04:19:25 +02:00
|
|
|
//Future<AssetResponseDto> getAssetById(String id, { String key }) async
|
2022-07-13 14:23:48 +02:00
|
|
|
test('test getAssetById', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-07-14 15:30:17 +02:00
|
|
|
//Future<List<String>> getAssetSearchTerms() async
|
|
|
|
test('test getAssetSearchTerms', () async {
|
2022-12-06 23:10:04 +01:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-11-04 02:33:15 +01:00
|
|
|
//Future<AssetStatsResponseDto> getAssetStatistics({ bool isArchived, bool isFavorite, bool isTrashed }) async
|
|
|
|
test('test getAssetStatistics', () async {
|
2022-07-13 14:23:48 +02:00
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-07-07 00:25:56 +02:00
|
|
|
//Future<MultipartFile> getAssetThumbnail(String id, { ThumbnailFormat format, String key }) async
|
2022-07-13 14:23:48 +02:00
|
|
|
test('test getAssetThumbnail', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
//Future<List<CuratedLocationsResponseDto>> getCuratedLocations() async
|
|
|
|
test('test getCuratedLocations', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
//Future<List<CuratedObjectsResponseDto>> getCuratedObjects() async
|
|
|
|
test('test getCuratedObjects', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-08-15 17:49:32 +02:00
|
|
|
//Future<DownloadResponseDto> getDownloadInfo(DownloadInfoDto downloadInfoDto, { String key }) async
|
2023-06-30 18:24:28 +02:00
|
|
|
test('test getDownloadInfo', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-10-04 15:51:07 +02:00
|
|
|
//Future<List<MapMarkerResponseDto>> getMapMarkers({ bool isArchived, bool isFavorite, DateTime fileCreatedAfter, DateTime fileCreatedBefore }) async
|
2023-05-06 03:33:30 +02:00
|
|
|
test('test getMapMarkers', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-10-05 00:11:11 +02:00
|
|
|
//Future<List<MemoryLaneResponseDto>> getMemoryLane(int day, int month) async
|
2023-06-15 03:47:18 +02:00
|
|
|
test('test getMemoryLane', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-09-23 17:28:55 +02:00
|
|
|
//Future<List<AssetResponseDto>> getRandom({ num count }) async
|
|
|
|
test('test getRandom', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-11-11 22:06:19 +01:00
|
|
|
//Future<List<AssetResponseDto>> getTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, bool withPartners, String key }) async
|
2023-11-04 02:33:15 +01:00
|
|
|
test('test getTimeBucket', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-11-11 22:06:19 +01:00
|
|
|
//Future<List<TimeBucketResponseDto>> getTimeBuckets(TimeBucketSize size, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, bool withPartners, String key }) async
|
2023-08-04 23:07:15 +02:00
|
|
|
test('test getTimeBuckets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2022-07-13 14:23:48 +02: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-22 04:33:20 +02:00
|
|
|
//Future<AssetFileUploadResponseDto> importFile(ImportAssetDto importAssetDto) async
|
|
|
|
test('test importFile', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-10-06 09:01:14 +02:00
|
|
|
//Future restoreAssets(BulkIdsDto bulkIdsDto) async
|
|
|
|
test('test restoreAssets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
//Future restoreTrash() async
|
|
|
|
test('test restoreTrash', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-08-18 16:31:48 +02:00
|
|
|
//Future runAssetJobs(AssetJobsDto assetJobsDto) async
|
|
|
|
test('test runAssetJobs', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-11-14 23:47:15 +01:00
|
|
|
//Future<List<AssetResponseDto>> searchAssets({ String id, String libraryId, AssetTypeEnum type, AssetOrder order, String deviceAssetId, String deviceId, String checksum, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isOffline, bool isReadOnly, bool isVisible, bool withDeleted, bool withStacked, bool withExif, bool withPeople, DateTime createdBefore, DateTime createdAfter, DateTime updatedBefore, DateTime updatedAfter, DateTime trashedBefore, DateTime trashedAfter, DateTime takenBefore, DateTime takenAfter, String originalFileName, String originalPath, String resizePath, String webpPath, String encodedVideoPath, String city, String state, String country, String make, String model, String lensModel, num page, num size }) async
|
|
|
|
test('test searchAssets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-07-07 00:25:56 +02:00
|
|
|
//Future<MultipartFile> serveFile(String id, { bool isThumb, bool isWeb, String key }) async
|
2022-07-13 14:23:48 +02:00
|
|
|
test('test serveFile', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-06-02 04:19:25 +02:00
|
|
|
//Future<AssetResponseDto> updateAsset(String id, UpdateAssetDto updateAssetDto) async
|
2022-12-06 23:10:04 +01:00
|
|
|
test('test updateAsset', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-08-16 22:04:55 +02:00
|
|
|
//Future updateAssets(AssetBulkUpdateDto assetBulkUpdateDto) async
|
|
|
|
test('test updateAssets', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-10-22 04:38:07 +02:00
|
|
|
//Future updateStackParent(UpdateStackParentDto updateStackParentDto) async
|
|
|
|
test('test updateStackParent', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
2023-11-06 15:04:39 +01:00
|
|
|
//Future<AssetFileUploadResponseDto> uploadFile(MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String key, String duration, bool isArchived, bool isExternal, bool isFavorite, bool isOffline, bool isReadOnly, bool isVisible, String libraryId, MultipartFile livePhotoData, MultipartFile sidecarData }) async
|
2022-07-13 14:23:48 +02:00
|
|
|
test('test uploadFile', () async {
|
|
|
|
// TODO
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|