mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-30 04:21:45 +00:00
24 lines
765 B
Dart
24 lines
765 B
Dart
import 'dart:async';
|
|
import 'package:dartz/dartz.dart';
|
|
import 'package:flowy_sdk/protobuf/flowy-workspace-infra/trash_create.pb.dart';
|
|
import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart';
|
|
|
|
abstract class ITrash {
|
|
Future<Either<List<Trash>, WorkspaceError>> readTrash();
|
|
|
|
Future<Either<Unit, WorkspaceError>> putback(String trashId);
|
|
|
|
Future<Either<Unit, WorkspaceError>> deleteViews(List<Tuple2<String, TrashType>> trashList);
|
|
|
|
Future<Either<Unit, WorkspaceError>> restoreAll();
|
|
|
|
Future<Either<Unit, WorkspaceError>> deleteAll();
|
|
}
|
|
|
|
typedef TrashUpdatedCallback = void Function(Either<List<Trash>, WorkspaceError> trashOrFailed);
|
|
|
|
abstract class ITrashListener {
|
|
void start(TrashUpdatedCallback updateCallback);
|
|
Future<void> stop();
|
|
}
|