Browse Source

Merge pull request #557 from AppFlowy-IO/refactor/ignore_dart_event

chore: ignore dart event file
Nathan.fooo 2 years ago
parent
commit
f49f1695b0

+ 2 - 1
frontend/app_flowy/packages/flowy_sdk/.gitignore

@@ -79,4 +79,5 @@ build/
 **/*.dll
 **/*.dll
 **/*.so
 **/*.so
 
 
-lib/protobuf
+lib/protobuf
+lib/dispatch/dart_event

+ 0 - 413
frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event/flowy-folder/dart_event.dart

@@ -1,413 +0,0 @@
-
-/// Auto generate. Do not edit
-part of '../../dispatch.dart';
-class FolderEventCreateWorkspace {
-     CreateWorkspacePayload request;
-     FolderEventCreateWorkspace(this.request);
-
-    Future<Either<Workspace, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.CreateWorkspace.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(Workspace.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventReadCurWorkspace {
-    FolderEventReadCurWorkspace();
-
-    Future<Either<CurrentWorkspaceSetting, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = FolderEvent.ReadCurWorkspace.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (okBytes) => left(CurrentWorkspaceSetting.fromBuffer(okBytes)),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class FolderEventReadWorkspaces {
-     WorkspaceId request;
-     FolderEventReadWorkspaces(this.request);
-
-    Future<Either<RepeatedWorkspace, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.ReadWorkspaces.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(RepeatedWorkspace.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventDeleteWorkspace {
-     WorkspaceId request;
-     FolderEventDeleteWorkspace(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.DeleteWorkspace.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventOpenWorkspace {
-     WorkspaceId request;
-     FolderEventOpenWorkspace(this.request);
-
-    Future<Either<Workspace, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.OpenWorkspace.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(Workspace.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventReadWorkspaceApps {
-     WorkspaceId request;
-     FolderEventReadWorkspaceApps(this.request);
-
-    Future<Either<RepeatedApp, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.ReadWorkspaceApps.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(RepeatedApp.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventCreateApp {
-     CreateAppPayload request;
-     FolderEventCreateApp(this.request);
-
-    Future<Either<App, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.CreateApp.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(App.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventDeleteApp {
-     AppId request;
-     FolderEventDeleteApp(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.DeleteApp.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventReadApp {
-     AppId request;
-     FolderEventReadApp(this.request);
-
-    Future<Either<App, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.ReadApp.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(App.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventUpdateApp {
-     UpdateAppPayload request;
-     FolderEventUpdateApp(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.UpdateApp.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventCreateView {
-     CreateViewPayload request;
-     FolderEventCreateView(this.request);
-
-    Future<Either<View, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.CreateView.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(View.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventReadView {
-     ViewId request;
-     FolderEventReadView(this.request);
-
-    Future<Either<View, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.ReadView.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(View.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventUpdateView {
-     UpdateViewPayload request;
-     FolderEventUpdateView(this.request);
-
-    Future<Either<View, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.UpdateView.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(View.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventDeleteView {
-     RepeatedViewId request;
-     FolderEventDeleteView(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.DeleteView.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventDuplicateView {
-     ViewId request;
-     FolderEventDuplicateView(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.DuplicateView.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventCloseView {
-     ViewId request;
-     FolderEventCloseView(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.CloseView.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventReadViewInfo {
-     ViewId request;
-     FolderEventReadViewInfo(this.request);
-
-    Future<Either<ViewInfo, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.ReadViewInfo.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(ViewInfo.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventCopyLink {
-    FolderEventCopyLink();
-
-    Future<Either<Unit, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = FolderEvent.CopyLink.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (bytes) => left(unit),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class FolderEventSetLatestView {
-     ViewId request;
-     FolderEventSetLatestView(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.SetLatestView.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventMoveFolderItem {
-     MoveFolderItemPayload request;
-     FolderEventMoveFolderItem(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.MoveFolderItem.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventReadTrash {
-    FolderEventReadTrash();
-
-    Future<Either<RepeatedTrash, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = FolderEvent.ReadTrash.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (okBytes) => left(RepeatedTrash.fromBuffer(okBytes)),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class FolderEventPutbackTrash {
-     TrashId request;
-     FolderEventPutbackTrash(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.PutbackTrash.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventDeleteTrash {
-     RepeatedTrashId request;
-     FolderEventDeleteTrash(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = FolderEvent.DeleteTrash.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class FolderEventRestoreAllTrash {
-    FolderEventRestoreAllTrash();
-
-    Future<Either<Unit, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = FolderEvent.RestoreAllTrash.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (bytes) => left(unit),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class FolderEventDeleteAllTrash {
-    FolderEventDeleteAllTrash();
-
-    Future<Either<Unit, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = FolderEvent.DeleteAllTrash.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (bytes) => left(unit),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-

+ 0 - 394
frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event/flowy-grid/dart_event.dart

@@ -1,394 +0,0 @@
-
-/// Auto generate. Do not edit
-part of '../../dispatch.dart';
-class GridEventGetGridData {
-     GridId request;
-     GridEventGetGridData(this.request);
-
-    Future<Either<Grid, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.GetGridData.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(Grid.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventGetGridBlocks {
-     QueryGridBlocksPayload request;
-     GridEventGetGridBlocks(this.request);
-
-    Future<Either<RepeatedGridBlock, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.GetGridBlocks.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(RepeatedGridBlock.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventGetFields {
-     QueryFieldPayload request;
-     GridEventGetFields(this.request);
-
-    Future<Either<RepeatedField, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.GetFields.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(RepeatedField.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventUpdateField {
-     FieldChangesetPayload request;
-     GridEventUpdateField(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.UpdateField.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventUpdateFieldTypeOption {
-     UpdateFieldTypeOptionPayload request;
-     GridEventUpdateFieldTypeOption(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.UpdateFieldTypeOption.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventInsertField {
-     InsertFieldPayload request;
-     GridEventInsertField(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.InsertField.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventDeleteField {
-     FieldIdentifierPayload request;
-     GridEventDeleteField(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.DeleteField.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventSwitchToField {
-     EditFieldPayload request;
-     GridEventSwitchToField(this.request);
-
-    Future<Either<FieldTypeOptionData, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.SwitchToField.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(FieldTypeOptionData.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventDuplicateField {
-     FieldIdentifierPayload request;
-     GridEventDuplicateField(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.DuplicateField.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventMoveItem {
-     MoveItemPayload request;
-     GridEventMoveItem(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.MoveItem.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventGetFieldTypeOption {
-     EditFieldPayload request;
-     GridEventGetFieldTypeOption(this.request);
-
-    Future<Either<FieldTypeOptionData, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.GetFieldTypeOption.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(FieldTypeOptionData.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventCreateFieldTypeOption {
-     EditFieldPayload request;
-     GridEventCreateFieldTypeOption(this.request);
-
-    Future<Either<FieldTypeOptionData, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.CreateFieldTypeOption.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(FieldTypeOptionData.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventNewSelectOption {
-     CreateSelectOptionPayload request;
-     GridEventNewSelectOption(this.request);
-
-    Future<Either<SelectOption, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.NewSelectOption.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(SelectOption.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventGetSelectOptionCellData {
-     CellIdentifierPayload request;
-     GridEventGetSelectOptionCellData(this.request);
-
-    Future<Either<SelectOptionCellData, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.GetSelectOptionCellData.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(SelectOptionCellData.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventUpdateSelectOption {
-     SelectOptionChangesetPayload request;
-     GridEventUpdateSelectOption(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.UpdateSelectOption.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventCreateRow {
-     CreateRowPayload request;
-     GridEventCreateRow(this.request);
-
-    Future<Either<Row, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.CreateRow.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(Row.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventGetRow {
-     RowIdentifierPayload request;
-     GridEventGetRow(this.request);
-
-    Future<Either<Row, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.GetRow.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(Row.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventDeleteRow {
-     RowIdentifierPayload request;
-     GridEventDeleteRow(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.DeleteRow.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventDuplicateRow {
-     RowIdentifierPayload request;
-     GridEventDuplicateRow(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.DuplicateRow.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventGetCell {
-     CellIdentifierPayload request;
-     GridEventGetCell(this.request);
-
-    Future<Either<Cell, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.GetCell.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(Cell.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventUpdateCell {
-     CellChangeset request;
-     GridEventUpdateCell(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.UpdateCell.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventUpdateSelectOptionCell {
-     SelectOptionCellChangesetPayload request;
-     GridEventUpdateSelectOptionCell(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.UpdateSelectOptionCell.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class GridEventUpdateDateCell {
-     DateChangesetPayload request;
-     GridEventUpdateDateCell(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = GridEvent.UpdateDateCell.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-

+ 0 - 20
frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event/flowy-net/dart_event.dart

@@ -1,20 +0,0 @@
-
-/// Auto generate. Do not edit
-part of '../../dispatch.dart';
-class NetworkEventUpdateNetworkType {
-     NetworkState request;
-     NetworkEventUpdateNetworkType(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = NetworkEvent.UpdateNetworkType.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-

+ 0 - 54
frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event/flowy-text-block/dart_event.dart

@@ -1,54 +0,0 @@
-
-/// Auto generate. Do not edit
-part of '../../dispatch.dart';
-class TextBlockEventGetBlockData {
-     TextBlockId request;
-     TextBlockEventGetBlockData(this.request);
-
-    Future<Either<TextBlockDelta, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = TextBlockEvent.GetBlockData.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(TextBlockDelta.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class TextBlockEventApplyDelta {
-     TextBlockDelta request;
-     TextBlockEventApplyDelta(this.request);
-
-    Future<Either<TextBlockDelta, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = TextBlockEvent.ApplyDelta.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(TextBlockDelta.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class TextBlockEventExportDocument {
-     ExportPayload request;
-     TextBlockEventExportDocument(this.request);
-
-    Future<Either<ExportData, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = TextBlockEvent.ExportDocument.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(ExportData.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-

+ 0 - 141
frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event/flowy-user/dart_event.dart

@@ -1,141 +0,0 @@
-
-/// Auto generate. Do not edit
-part of '../../dispatch.dart';
-class UserEventInitUser {
-    UserEventInitUser();
-
-    Future<Either<Unit, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = UserEvent.InitUser.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (bytes) => left(unit),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class UserEventSignIn {
-     SignInPayload request;
-     UserEventSignIn(this.request);
-
-    Future<Either<UserProfile, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = UserEvent.SignIn.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(UserProfile.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class UserEventSignUp {
-     SignUpPayload request;
-     UserEventSignUp(this.request);
-
-    Future<Either<UserProfile, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = UserEvent.SignUp.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (okBytes) => left(UserProfile.fromBuffer(okBytes)),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class UserEventSignOut {
-    UserEventSignOut();
-
-    Future<Either<Unit, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = UserEvent.SignOut.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (bytes) => left(unit),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class UserEventUpdateUser {
-     UpdateUserPayload request;
-     UserEventUpdateUser(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = UserEvent.UpdateUser.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class UserEventGetUserProfile {
-    UserEventGetUserProfile();
-
-    Future<Either<UserProfile, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = UserEvent.GetUserProfile.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (okBytes) => left(UserProfile.fromBuffer(okBytes)),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class UserEventCheckUser {
-    UserEventCheckUser();
-
-    Future<Either<UserProfile, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = UserEvent.CheckUser.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (okBytes) => left(UserProfile.fromBuffer(okBytes)),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-
-class UserEventSetAppearanceSetting {
-     AppearanceSettings request;
-     UserEventSetAppearanceSetting(this.request);
-
-    Future<Either<Unit, FlowyError>> send() {
-    final request = FFIRequest.create()
-          ..event = UserEvent.SetAppearanceSetting.toString()
-          ..payload = requestToBytes(this.request);
-
-    return Dispatch.asyncRequest(request)
-        .then((bytesResult) => bytesResult.fold(
-           (bytes) => left(unit),
-           (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-        ));
-    }
-}
-
-class UserEventGetAppearanceSetting {
-    UserEventGetAppearanceSetting();
-
-    Future<Either<AppearanceSettings, FlowyError>> send() {
-     final request = FFIRequest.create()
-        ..event = UserEvent.GetAppearanceSetting.toString();
-
-     return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
-        (okBytes) => left(AppearanceSettings.fromBuffer(okBytes)),
-        (errBytes) => right(FlowyError.fromBuffer(errBytes)),
-      ));
-    }
-}
-