refactor(server): download assets (#3032)

* refactor: download assets

* chore: open api

* chore: finish tests, make size configurable

* chore: defualt to 4GiB

* chore: open api

* fix: optional archive size

* fix: bugs

* chore: cleanup
This commit is contained in:
Jason Rasmussen
2023-06-30 12:24:28 -04:00
committed by GitHub
parent df9c05bef3
commit ad343b7b32
53 changed files with 1455 additions and 1403 deletions

View File

@@ -37,11 +37,6 @@ void main() {
// TODO
});
//Future<MultipartFile> downloadArchive(String id, { String name, num skip, String key }) async
test('test downloadArchive', () async {
// TODO
});
//Future<AlbumCountResponseDto> getAlbumCount() async
test('test getAlbumCount', () async {
// TODO

View File

@@ -43,23 +43,16 @@ void main() {
// TODO
});
//Future<MultipartFile> downloadArchive(AssetIdsDto assetIdsDto, { String key }) async
test('test downloadArchive', () async {
// TODO
});
//Future<MultipartFile> downloadFile(String id, { String key }) async
test('test downloadFile', () async {
// TODO
});
//Future<MultipartFile> downloadFiles(DownloadFilesDto downloadFilesDto, { String key }) async
test('test downloadFiles', () async {
// TODO
});
// Current this is not used in any UI element
//
//Future<MultipartFile> downloadLibrary({ String name, num skip, String key }) async
test('test downloadLibrary', () async {
// TODO
});
// Get all AssetEntity belong to the user
//
//Future<List<AssetResponseDto>> getAllAssets({ String userId, bool isFavorite, bool isArchived, bool withoutThumbs, num skip, String ifNoneMatch }) async
@@ -114,6 +107,11 @@ void main() {
// TODO
});
//Future<DownloadResponseDto> getDownloadInfo({ List<String> assetIds, String albumId, String userId, num archiveSize, String key }) async
test('test getDownloadInfo', () async {
// TODO
});
//Future<List<MapMarkerResponseDto>> getMapMarkers({ bool isFavorite, DateTime fileCreatedAfter, DateTime fileCreatedBefore }) async
test('test getMapMarkers', () async {
// TODO

View File

@@ -11,11 +11,16 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for DownloadFilesDto
// tests for DownloadArchiveInfo
void main() {
// final instance = DownloadFilesDto();
// final instance = DownloadArchiveInfo();
group('test DownloadArchiveInfo', () {
// int size
test('to test the property `size`', () async {
// TODO
});
group('test DownloadFilesDto', () {
// List<String> assetIds (default value: const [])
test('to test the property `assetIds`', () async {
// TODO

View File

@@ -0,0 +1,32 @@
//
// 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 DownloadResponseDto
void main() {
// final instance = DownloadResponseDto();
group('test DownloadResponseDto', () {
// int totalSize
test('to test the property `totalSize`', () async {
// TODO
});
// List<DownloadArchiveInfo> archives (default value: const [])
test('to test the property `archives`', () async {
// TODO
});
});
}