feat: use batch download api for create multitasks (#978)

This commit is contained in:
Levi authored and GitHub committed 2025-04-05 22:57:17 +08:00
1 parent cd5fd45667
commit d289708f9e
10 files changed
+207 -37

No files matched your search

@@ -0,0 +1,39 @@
import 'package:json_annotation/json_annotation.dart';
import 'options.dart';
import 'request.dart';
part 'create_task_batch.g.dart';
@JsonSerializable(explicitToJson: true)
class CreateTaskBatch {
List<CreateTaskBatchItem>? reqs;
Options? opt;
CreateTaskBatch({
this.reqs,
this.opt,
});
factory CreateTaskBatch.fromJson(
Map<String, dynamic> json,
) =>
_$CreateTaskBatchFromJson(json);
Map<String, dynamic> toJson() => _$CreateTaskBatchToJson(this);
}
@JsonSerializable()
class CreateTaskBatchItem {
Request? req;
Options? opts;
CreateTaskBatchItem({
this.req,
this.opts,
});
factory CreateTaskBatchItem.fromJson(Map<String, dynamic> json) =>
_$CreateTaskBatchItemFromJson(json);
Map<String, dynamic> toJson() => _$CreateTaskBatchItemToJson(this);
}