rename flowy-core to flowy-folder that manages the workspace,app,view

This commit is contained in:
appflowy 2022-01-27 20:39:54 +08:00
parent 17955bcf43
commit 2fa99a563c
213 changed files with 1008 additions and 1044 deletions

128
backend/Cargo.lock generated
View File

@ -468,8 +468,8 @@ dependencies = [
"dashmap",
"derive_more",
"flowy-collaboration",
"flowy-core-data-model",
"flowy-document",
"flowy-folder-data-model",
"flowy-net",
"flowy-sdk",
"flowy-test",
@ -520,7 +520,7 @@ dependencies = [
"config",
"derive_more",
"flowy-collaboration",
"flowy-core-data-model",
"flowy-folder-data-model",
"flowy-user-data-model",
"hyper",
"lazy_static",
@ -1234,8 +1234,8 @@ dependencies = [
"chrono",
"dashmap",
"dissimilar",
"flowy-core-data-model",
"flowy-derive",
"flowy-folder-data-model",
"futures",
"lib-infra",
"lib-ot",
@ -1252,63 +1252,6 @@ dependencies = [
"url",
]
[[package]]
name = "flowy-core"
version = "0.1.0"
dependencies = [
"bincode",
"bytes",
"chrono",
"crossbeam",
"crossbeam-utils",
"dart-notify",
"derive_more",
"diesel",
"diesel_derives",
"flowy-collaboration",
"flowy-core-data-model",
"flowy-database",
"flowy-derive",
"flowy-document",
"flowy-error",
"flowy-sync",
"futures",
"futures-core",
"lazy_static",
"lib-dispatch",
"lib-infra",
"lib-ot",
"lib-sqlite",
"log",
"parking_lot",
"pin-project 1.0.8",
"protobuf",
"serde",
"strum",
"strum_macros",
"tokio",
"tracing",
]
[[package]]
name = "flowy-core-data-model"
version = "0.1.0"
dependencies = [
"bytes",
"chrono",
"derive_more",
"error-code",
"flowy-derive",
"log",
"protobuf",
"serde",
"serde_json",
"strum",
"strum_macros",
"unicode-segmentation",
"uuid",
]
[[package]]
name = "flowy-database"
version = "0.1.0"
@ -1389,6 +1332,63 @@ dependencies = [
"serde_json",
]
[[package]]
name = "flowy-folder"
version = "0.1.0"
dependencies = [
"bincode",
"bytes",
"chrono",
"crossbeam",
"crossbeam-utils",
"dart-notify",
"derive_more",
"diesel",
"diesel_derives",
"flowy-collaboration",
"flowy-database",
"flowy-derive",
"flowy-document",
"flowy-error",
"flowy-folder-data-model",
"flowy-sync",
"futures",
"futures-core",
"lazy_static",
"lib-dispatch",
"lib-infra",
"lib-ot",
"lib-sqlite",
"log",
"parking_lot",
"pin-project 1.0.8",
"protobuf",
"serde",
"strum",
"strum_macros",
"tokio",
"tracing",
]
[[package]]
name = "flowy-folder-data-model"
version = "0.1.0"
dependencies = [
"bytes",
"chrono",
"derive_more",
"error-code",
"flowy-derive",
"log",
"protobuf",
"serde",
"serde_json",
"strum",
"strum_macros",
"unicode-segmentation",
"uuid",
]
[[package]]
name = "flowy-net"
version = "0.1.0"
@ -1399,11 +1399,11 @@ dependencies = [
"bytes",
"dashmap",
"flowy-collaboration",
"flowy-core",
"flowy-core-data-model",
"flowy-derive",
"flowy-document",
"flowy-error",
"flowy-folder",
"flowy-folder-data-model",
"flowy-user",
"flowy-user-data-model",
"futures-util",
@ -1427,9 +1427,9 @@ dependencies = [
"bytes",
"color-eyre",
"flowy-collaboration",
"flowy-core",
"flowy-database",
"flowy-document",
"flowy-folder",
"flowy-net",
"flowy-sync",
"flowy-user",
@ -1479,7 +1479,7 @@ dependencies = [
"bytes",
"claim",
"flowy-collaboration",
"flowy-core",
"flowy-folder",
"flowy-net",
"flowy-sdk",
"flowy-user",

View File

@ -62,7 +62,7 @@ byteorder = {version = "1.3.4"}
async-stream = "0.3.2"
flowy-user-data-model = { path = "../shared-lib/flowy-user-data-model" }
flowy-core-data-model = { path = "../shared-lib/flowy-core-data-model" }
flowy-folder-data-model = { path = "../shared-lib/flowy-folder-data-model" }
flowy-collaboration = { path = "../shared-lib/flowy-collaboration" }
lib-ws = { path = "../shared-lib/lib-ws" }
lib-ot = { path = "../shared-lib/lib-ot" }

View File

@ -7,7 +7,7 @@ use crate::{
};
use backend_service::errors::{invalid_params, ServerError};
use chrono::Utc;
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::{
app::{AppDesc, AppName},
workspace::WorkspaceIdentify,

View File

@ -1,7 +1,7 @@
use crate::util::sqlx_ext::SqlBuilder;
use backend_service::errors::{invalid_params, ServerError};
use chrono::{DateTime, NaiveDateTime, Utc};
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::app::AppIdentify,
protobuf::{App as AppPB, ColorStyle as ColorStylePB, RepeatedView as RepeatedViewPB},
};

View File

@ -15,7 +15,7 @@ use backend_service::{
errors::{invalid_params, ServerError},
response::FlowyResponse,
};
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::app::{AppDesc, AppName},
protobuf::{AppId as AppIdPB, CreateAppParams as CreateAppParamsPB, UpdateAppParams as UpdateAppParamsPB},
};

View File

@ -1,5 +1,5 @@
use crate::services::folder::{app::persistence::AppTable, view::persistence::ViewTable};
use flowy_core_data_model::protobuf::{Trash, TrashType};
use flowy_folder_data_model::protobuf::{Trash, TrashType};
pub(crate) const TRASH_TABLE: &str = "trash_table";

View File

@ -14,7 +14,7 @@ use backend_service::{
errors::{invalid_params, ServerError},
response::FlowyResponse,
};
use flowy_core_data_model::{parser::trash::TrashIdentify, protobuf::RepeatedTrashId};
use flowy_folder_data_model::{parser::trash::TrashIdentify, protobuf::RepeatedTrashId};
use sqlx::PgPool;
use std::sync::Arc;
use uuid::Uuid;

View File

@ -10,7 +10,7 @@ use crate::{
};
use ::protobuf::ProtobufEnum;
use backend_service::errors::ServerError;
use flowy_core_data_model::protobuf::{RepeatedTrash, Trash, TrashType};
use flowy_folder_data_model::protobuf::{RepeatedTrash, Trash, TrashType};
use sqlx::{postgres::PgArguments, Postgres, Row};
use std::sync::Arc;
use uuid::Uuid;

View File

@ -15,7 +15,7 @@ use flowy_collaboration::{
entities::revision::{RepeatedRevision, Revision},
protobuf::CreateDocParams as CreateDocParamsPB,
};
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::{
app::AppIdentify,
view::{ViewDesc, ViewName, ViewThumbnail},

View File

@ -1,7 +1,7 @@
use crate::util::sqlx_ext::SqlBuilder;
use backend_service::errors::{invalid_params, ServerError};
use chrono::{DateTime, NaiveDateTime, Utc};
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::view::ViewIdentify,
protobuf::{RepeatedView as RepeatedViewPB, View as ViewPB, ViewType as ViewTypePB},
};

View File

@ -17,7 +17,7 @@ use backend_service::{
errors::{invalid_params, ServerError},
response::FlowyResponse,
};
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::view::{ViewDesc, ViewName, ViewThumbnail},
protobuf::{
CreateViewParams as CreateViewParamsPB, QueryViewRequest as QueryViewRequestPB,

View File

@ -9,7 +9,7 @@ use crate::{
};
use anyhow::Context;
use backend_service::errors::{invalid_params, ServerError};
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::workspace::WorkspaceIdentify,
protobuf::{RepeatedApp as RepeatedAppPB, RepeatedWorkspace as RepeatedWorkspacePB, Workspace as WorkspacePB},
};

View File

@ -1,7 +1,7 @@
use crate::util::sqlx_ext::SqlBuilder;
use backend_service::errors::{invalid_params, ServerError};
use chrono::{DateTime, NaiveDateTime, Utc};
use flowy_core_data_model::{parser::workspace::WorkspaceIdentify, protobuf::Workspace as WorkspacePB};
use flowy_folder_data_model::{parser::workspace::WorkspaceIdentify, protobuf::Workspace as WorkspacePB};
use sqlx::postgres::PgArguments;
use uuid::Uuid;

View File

@ -14,7 +14,7 @@ use backend_service::{
errors::{invalid_params, ServerError},
response::FlowyResponse,
};
use flowy_core_data_model::{
use flowy_folder_data_model::{
parser::workspace::{WorkspaceDesc, WorkspaceName},
protobuf::{
CreateWorkspaceParams as CreateWorkspaceParamsPB, UpdateWorkspaceParams as UpdateWorkspaceParamsPB,

View File

@ -8,7 +8,7 @@ use flowy_collaboration::{
revision::{md5, RepeatedRevision, Revision},
},
};
use flowy_core_data_model::entities::{
use flowy_folder_data_model::entities::{
app::{AppId, UpdateAppParams},
trash::{RepeatedTrashId, TrashId, TrashType},
view::{RepeatedViewId, UpdateViewParams, ViewId},

View File

@ -11,7 +11,7 @@ use flowy_collaboration::{
client_document::default::initial_delta_string,
entities::document_info::{CreateDocParams, DocumentId, DocumentInfo},
};
use flowy_core_data_model::entities::{app::*, trash::*, view::*, workspace::*};
use flowy_folder_data_model::entities::{app::*, trash::*, view::*, workspace::*};
use flowy_net::http_server::{
core::*,
document::{create_document_request, read_document_request},

View File

@ -1,6 +1,6 @@
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flutter/material.dart';

View File

@ -1,5 +1,5 @@
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flutter/widgets.dart';
import 'auth_state.dart';

View File

@ -9,7 +9,7 @@ import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show Use
import 'package:app_flowy/user/domain/i_auth.dart';
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flutter/material.dart';
class AuthImpl extends IAuth {

View File

@ -11,7 +11,7 @@ import 'package:flowy_infra/time/duration.dart';
import 'package:flowy_infra_ui/widget/route/animation.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

View File

@ -24,7 +24,7 @@ class AuthRepository {
// return UserEventSignUp(request).send().then((result) {
// return result.fold((userProfile) async {
// return await WorkspaceEventCreateDefaultWorkspace().send().then((result) {
// return await FolderEventCreateDefaultWorkspace().send().then((result) {
// return result.fold((workspaceIdentifier) {
// return left(Tuple2(userProfile, workspaceIdentifier.workspaceId));
// }, (error) {

View File

@ -9,7 +9,7 @@ import 'package:flowy_infra_ui/widget/rounded_button.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@ -100,7 +100,7 @@ class _SkipLogInScreenState extends State<SkipLogInScreen> {
final result = await widget.authManager.signUp(LocaleKeys.defaultUsername.tr(), password, userEmail);
result.fold(
(user) {
WorkspaceEventReadCurWorkspace().send().then((result) {
FolderEventReadCurWorkspace().send().then((result) {
_openCurrentWorkspace(context, user, result);
});
},

View File

@ -4,7 +4,7 @@ import 'package:app_flowy/user/domain/auth_state.dart';
import 'package:app_flowy/user/domain/i_splash.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/errors.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@ -44,7 +44,7 @@ class SplashScreen extends StatelessWidget {
void _handleAuthenticated(BuildContext context, Authenticated result) {
final userProfile = result.userProfile;
WorkspaceEventReadCurWorkspace().send().then(
FolderEventReadCurWorkspace().send().then(
(result) {
return result.fold(
(workspaceSetting) => getIt<ISplashRoute>().pushHomeScreen(context, userProfile, workspaceSetting),

View File

@ -5,7 +5,7 @@ import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/widget/error_page.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart';

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/domain/i_app.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@ -2,8 +2,8 @@ import 'dart:convert';
import 'package:app_flowy/workspace/domain/i_trash.dart';
import 'package:app_flowy/workspace/domain/i_view.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flowy_log/flowy_log.dart';

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/domain/i_share.dart';
import 'package:app_flowy/workspace/infrastructure/markdown/delta_markdown.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/share.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/share.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@ -1,5 +1,5 @@
import 'package:app_flowy/workspace/domain/i_user.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@ -4,7 +4,7 @@ import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
import 'package:app_flowy/workspace/presentation/stack_page/blank/blank_page.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@ -1,6 +1,6 @@
import 'package:app_flowy/workspace/domain/i_user.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/domain/i_trash.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

View File

@ -1,5 +1,5 @@
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/domain/i_user.dart';
import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@ -1,4 +1,4 @@
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';

View File

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
abstract class IShare {

View File

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
abstract class ITrash {

View File

@ -2,7 +2,7 @@ import 'package:dartz/dartz.dart';
import 'package:flowy_infra/notifier.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
export 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
abstract class IUser {

View File

@ -1,4 +1,4 @@
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_infra/notifier.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';

View File

@ -1,4 +1,4 @@
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';

View File

@ -1,4 +1,4 @@
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:flowy_infra/image.dart';

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
import 'package:app_flowy/workspace/presentation/stack_page/blank/blank_page.dart';
import 'package:app_flowy/workspace/presentation/stack_page/doc/doc_stack_page.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
extension ToHomeStackContext on View {
HomeStackContext stackContext() {

View File

@ -21,8 +21,8 @@ import 'package:app_flowy/workspace/infrastructure/repos/trash_repo.dart';
import 'package:app_flowy/workspace/infrastructure/repos/view_repo.dart';
import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:get_it/get_it.dart';
import 'i_share_impl.dart';

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/infrastructure/repos/app_repo.dart';
import 'package:dartz/dartz.dart';
import 'package:app_flowy/workspace/domain/i_app.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
export 'package:app_flowy/workspace/domain/i_app.dart';

View File

@ -1,5 +1,5 @@
import 'package:app_flowy/workspace/domain/i_share.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:dartz/dartz.dart';

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/domain/i_trash.dart';
import 'package:app_flowy/workspace/infrastructure/repos/trash_repo.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
class ITrashImpl implements ITrash {

View File

@ -6,11 +6,11 @@ import 'package:app_flowy/workspace/domain/i_user.dart';
import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart';
import 'package:flowy_infra/notifier.dart';
import 'package:flowy_sdk/protobuf/dart-notify/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/dart_notification.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/errors.pb.dart';
// import 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart' as user_error;
import 'package:flowy_sdk/protobuf/flowy-user/dart_notification.pb.dart' as user;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
export 'package:app_flowy/workspace/domain/i_user.dart';
export 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart';
@ -64,7 +64,7 @@ class IUserListenerImpl extends IUserListener {
@override
final workspaceUpdatedNotifier = PublishNotifier<WorkspaceUpdatedNotifierValue>();
late WorkspaceNotificationParser _workspaceParser;
late FolderNotificationParser _workspaceParser;
late UserNotificationParser _userParser;
late UserProfile _user;
IUserListenerImpl({
@ -75,7 +75,7 @@ class IUserListenerImpl extends IUserListener {
@override
void start() {
_workspaceParser = WorkspaceNotificationParser(id: _user.token, callback: _notificationCallback);
_workspaceParser = FolderNotificationParser(id: _user.token, callback: _notificationCallback);
_userParser = UserNotificationParser(id: _user.token, callback: _userNotificationCallback);
_subscription = RustStreamReceiver.listen((observable) {
_workspaceParser.parse(observable);
@ -88,17 +88,17 @@ class IUserListenerImpl extends IUserListener {
await _subscription?.cancel();
}
void _notificationCallback(WorkspaceNotification ty, Either<Uint8List, FlowyError> result) {
void _notificationCallback(FolderNotification ty, Either<Uint8List, FlowyError> result) {
switch (ty) {
case WorkspaceNotification.UserCreateWorkspace:
case WorkspaceNotification.UserDeleteWorkspace:
case WorkspaceNotification.WorkspaceListUpdated:
case FolderNotification.UserCreateWorkspace:
case FolderNotification.UserDeleteWorkspace:
case FolderNotification.WorkspaceListUpdated:
result.fold(
(payload) => workspaceUpdatedNotifier.value = left(RepeatedWorkspace.fromBuffer(payload).items),
(error) => workspaceUpdatedNotifier.value = right(error),
);
break;
case WorkspaceNotification.UserUnauthorized:
case FolderNotification.UserUnauthorized:
result.fold(
(_) {},
(error) => authDidChangedNotifier.value = right(FlowyError.create()..code = ErrorCode.UserUnauthorized.value),

View File

@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_view.dart';
import 'package:app_flowy/workspace/infrastructure/repos/view_repo.dart';
import 'package:flowy_infra/notifier.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
class IViewImpl extends IView {

View File

@ -1,7 +1,7 @@
import 'package:app_flowy/workspace/domain/i_workspace.dart';
import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
export 'package:app_flowy/workspace/domain/i_workspace.dart';

View File

@ -5,10 +5,10 @@ import 'package:dartz/dartz.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/dart_notification.pb.dart';
import 'package:flowy_sdk/rust_stream.dart';
import 'helper.dart';
@ -21,7 +21,7 @@ class AppRepository {
Future<Either<App, FlowyError>> getAppDesc() {
final request = QueryAppRequest.create()..appIds.add(appId);
return WorkspaceEventReadApp(request).send();
return FolderEventReadApp(request).send();
}
Future<Either<View, FlowyError>> createView(String name, String desc, ViewType viewType) {
@ -31,13 +31,13 @@ class AppRepository {
..desc = desc
..viewType = viewType;
return WorkspaceEventCreateView(request).send();
return FolderEventCreateView(request).send();
}
Future<Either<List<View>, FlowyError>> getViews() {
final request = QueryAppRequest.create()..appIds.add(appId);
return WorkspaceEventReadApp(request).send().then((result) {
return FolderEventReadApp(request).send().then((result) {
return result.fold(
(app) => left(app.belongings.items),
(error) => right(error),
@ -47,7 +47,7 @@ class AppRepository {
Future<Either<Unit, FlowyError>> delete() {
final request = QueryAppRequest.create()..appIds.add(appId);
return WorkspaceEventDeleteApp(request).send();
return FolderEventDeleteApp(request).send();
}
Future<Either<Unit, FlowyError>> updateApp({String? name}) {
@ -56,7 +56,7 @@ class AppRepository {
if (name != null) {
request.name = name;
}
return WorkspaceEventUpdateApp(request).send();
return FolderEventUpdateApp(request).send();
}
}
@ -64,7 +64,7 @@ class AppListenerRepository {
StreamSubscription<SubscribeObject>? _subscription;
AppViewsChangeCallback? _viewsChanged;
AppUpdatedCallback? _update;
late WorkspaceNotificationParser _parser;
late FolderNotificationParser _parser;
String appId;
AppListenerRepository({
@ -74,13 +74,13 @@ class AppListenerRepository {
void startListening({AppViewsChangeCallback? viewsChanged, AppUpdatedCallback? update}) {
_viewsChanged = viewsChanged;
_update = update;
_parser = WorkspaceNotificationParser(id: appId, callback: _bservableCallback);
_parser = FolderNotificationParser(id: appId, callback: _bservableCallback);
_subscription = RustStreamReceiver.listen((observable) => _parser.parse(observable));
}
void _bservableCallback(WorkspaceNotification ty, Either<Uint8List, FlowyError> result) {
void _bservableCallback(FolderNotification ty, Either<Uint8List, FlowyError> result) {
switch (ty) {
case WorkspaceNotification.AppViewsChanged:
case FolderNotification.AppViewsChanged:
if (_viewsChanged != null) {
result.fold(
(payload) {
@ -91,7 +91,7 @@ class AppListenerRepository {
);
}
break;
case WorkspaceNotification.AppUpdated:
case FolderNotification.AppUpdated:
if (_update != null) {
result.fold(
(payload) {

View File

@ -1,7 +1,7 @@
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/flowy-collaboration/document_info.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
class DocRepository {
@ -12,18 +12,18 @@ class DocRepository {
Future<Either<DocumentDelta, FlowyError>> readDoc() {
final request = QueryViewRequest(viewIds: [docId]);
return WorkspaceEventOpenDocument(request).send();
return FolderEventOpenDocument(request).send();
}
Future<Either<DocumentDelta, FlowyError>> composeDelta({required String data}) {
final request = DocumentDelta.create()
..docId = docId
..deltaJson = data;
return WorkspaceEventApplyDocDelta(request).send();
return FolderEventApplyDocDelta(request).send();
}
Future<Either<Unit, FlowyError>> closeDoc() {
final request = QueryViewRequest(viewIds: [docId]);
return WorkspaceEventCloseView(request).send();
return FolderEventCloseView(request).send();
}
}

View File

@ -3,7 +3,7 @@ import 'package:flowy_sdk/protobuf/dart-notify/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-user/protobuf.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/dart_notification.pb.dart';
typedef UserNotificationCallback = void Function(UserNotification, Either<Uint8List, FlowyError>);
@ -17,14 +17,14 @@ class UserNotificationParser extends NotificationParser<UserNotification, FlowyE
);
}
typedef NotificationCallback = void Function(WorkspaceNotification, Either<Uint8List, FlowyError>);
typedef NotificationCallback = void Function(FolderNotification, Either<Uint8List, FlowyError>);
class WorkspaceNotificationParser extends NotificationParser<WorkspaceNotification, FlowyError> {
WorkspaceNotificationParser({String? id, required NotificationCallback callback})
class FolderNotificationParser extends NotificationParser<FolderNotification, FlowyError> {
FolderNotificationParser({String? id, required NotificationCallback callback})
: super(
id: id,
callback: callback,
tyParser: (ty) => WorkspaceNotification.valueOf(ty),
tyParser: (ty) => FolderNotification.valueOf(ty),
errorParser: (bytes) => FlowyError.fromBuffer(bytes),
);
}

View File

@ -1,7 +1,7 @@
import 'dart:async';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
class ShareRepo {
@ -10,6 +10,6 @@ class ShareRepo {
..docId = docId
..exportType = type;
return WorkspaceEventExportDocument(request).send();
return FolderEventExportDocument(request).send();
}
}

View File

@ -5,20 +5,20 @@ import 'package:app_flowy/workspace/infrastructure/repos/helper.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/dart_notification.pb.dart';
import 'package:flowy_sdk/rust_stream.dart';
class TrashRepo {
Future<Either<RepeatedTrash, FlowyError>> readTrash() {
return WorkspaceEventReadTrash().send();
return FolderEventReadTrash().send();
}
Future<Either<Unit, FlowyError>> putback(String trashId) {
final id = TrashId.create()..id = trashId;
return WorkspaceEventPutbackTrash(id).send();
return FolderEventPutbackTrash(id).send();
}
Future<Either<Unit, FlowyError>> deleteViews(List<Tuple2<String, TrashType>> trashList) {
@ -29,32 +29,32 @@ class TrashRepo {
});
final ids = RepeatedTrashId(items: items);
return WorkspaceEventDeleteTrash(ids).send();
return FolderEventDeleteTrash(ids).send();
}
Future<Either<Unit, FlowyError>> restoreAll() {
return WorkspaceEventRestoreAllTrash().send();
return FolderEventRestoreAllTrash().send();
}
Future<Either<Unit, FlowyError>> deleteAll() {
return WorkspaceEventDeleteAllTrash().send();
return FolderEventDeleteAllTrash().send();
}
}
class TrashListenerRepo {
StreamSubscription<SubscribeObject>? _subscription;
TrashUpdatedCallback? _trashUpdated;
late WorkspaceNotificationParser _parser;
late FolderNotificationParser _parser;
void startListening({TrashUpdatedCallback? trashUpdated}) {
_trashUpdated = trashUpdated;
_parser = WorkspaceNotificationParser(callback: _bservableCallback);
_parser = FolderNotificationParser(callback: _bservableCallback);
_subscription = RustStreamReceiver.listen((observable) => _parser.parse(observable));
}
void _bservableCallback(WorkspaceNotification ty, Either<Uint8List, FlowyError> result) {
void _bservableCallback(FolderNotification ty, Either<Uint8List, FlowyError> result) {
switch (ty) {
case WorkspaceNotification.TrashUpdated:
case FolderNotification.TrashUpdated:
if (_trashUpdated != null) {
result.fold(
(payload) {

View File

@ -1,7 +1,7 @@
import 'dart:async';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
import 'package:app_flowy/workspace/domain/i_user.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
@ -30,7 +30,7 @@ class UserRepo {
Future<Either<List<Workspace>, FlowyError>> getWorkspaces() {
final request = QueryWorkspaceRequest.create();
return WorkspaceEventReadWorkspaces(request).send().then((result) {
return FolderEventReadWorkspaces(request).send().then((result) {
return result.fold(
(workspaces) => left(workspaces.items),
(error) => right(error),
@ -40,7 +40,7 @@ class UserRepo {
Future<Either<Workspace, FlowyError>> openWorkspace(String workspaceId) {
final request = QueryWorkspaceRequest.create()..workspaceId = workspaceId;
return WorkspaceEventOpenWorkspace(request).send().then((result) {
return FolderEventOpenWorkspace(request).send().then((result) {
return result.fold(
(workspace) => left(workspace),
(error) => right(error),
@ -52,7 +52,7 @@ class UserRepo {
final request = CreateWorkspaceRequest.create()
..name = name
..desc = desc;
return WorkspaceEventCreateWorkspace(request).send().then((result) {
return FolderEventCreateWorkspace(request).send().then((result) {
return result.fold(
(workspace) => left(workspace),
(error) => right(error),

View File

@ -3,9 +3,9 @@ import 'dart:typed_data';
import 'package:dartz/dartz.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/dart_notification.pb.dart';
import 'package:flowy_sdk/rust_stream.dart';
import 'package:app_flowy/workspace/domain/i_view.dart';
@ -21,7 +21,7 @@ class ViewRepository {
Future<Either<View, FlowyError>> readView() {
final request = QueryViewRequest(viewIds: [view.id]);
return WorkspaceEventReadView(request).send();
return FolderEventReadView(request).send();
}
Future<Either<View, FlowyError>> updateView({String? name, String? desc}) {
@ -35,17 +35,17 @@ class ViewRepository {
request.desc = desc;
}
return WorkspaceEventUpdateView(request).send();
return FolderEventUpdateView(request).send();
}
Future<Either<Unit, FlowyError>> delete() {
final request = QueryViewRequest.create()..viewIds.add(view.id);
return WorkspaceEventDeleteView(request).send();
return FolderEventDeleteView(request).send();
}
Future<Either<Unit, FlowyError>> duplicate() {
final request = QueryViewRequest.create()..viewIds.add(view.id);
return WorkspaceEventDuplicateView(request).send();
return FolderEventDuplicateView(request).send();
}
}
@ -54,7 +54,7 @@ class ViewListenerRepository {
PublishNotifier<UpdateNotifierValue> updatedNotifier = PublishNotifier<UpdateNotifierValue>();
PublishNotifier<DeleteNotifierValue> deletedNotifier = PublishNotifier<DeleteNotifierValue>();
PublishNotifier<RestoreNotifierValue> restoredNotifier = PublishNotifier<RestoreNotifierValue>();
late WorkspaceNotificationParser _parser;
late FolderNotificationParser _parser;
View view;
ViewListenerRepository({
@ -62,7 +62,7 @@ class ViewListenerRepository {
});
void start() {
_parser = WorkspaceNotificationParser(
_parser = FolderNotificationParser(
id: view.id,
callback: (ty, result) {
_handleObservableType(ty, result);
@ -72,21 +72,21 @@ class ViewListenerRepository {
_subscription = RustStreamReceiver.listen((observable) => _parser.parse(observable));
}
void _handleObservableType(WorkspaceNotification ty, Either<Uint8List, FlowyError> result) {
void _handleObservableType(FolderNotification ty, Either<Uint8List, FlowyError> result) {
switch (ty) {
case WorkspaceNotification.ViewUpdated:
case FolderNotification.ViewUpdated:
result.fold(
(payload) => updatedNotifier.value = left(View.fromBuffer(payload)),
(error) => updatedNotifier.value = right(error),
);
break;
case WorkspaceNotification.ViewDeleted:
case FolderNotification.ViewDeleted:
result.fold(
(payload) => deletedNotifier.value = left(View.fromBuffer(payload)),
(error) => deletedNotifier.value = right(error),
);
break;
case WorkspaceNotification.ViewRestored:
case FolderNotification.ViewRestored:
result.fold(
(payload) => restoredNotifier.value = left(View.fromBuffer(payload)),
(error) => restoredNotifier.value = right(error),

View File

@ -7,10 +7,10 @@ import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/dart_notification.pb.dart';
import 'package:flowy_sdk/rust_stream.dart';
import 'package:app_flowy/generated/locale_keys.g.dart';
@ -31,12 +31,12 @@ class WorkspaceRepo {
..name = appName
..workspaceId = workspaceId
..desc = desc;
return WorkspaceEventCreateApp(request).send();
return FolderEventCreateApp(request).send();
}
Future<Either<Workspace, FlowyError>> getWorkspace() {
final request = QueryWorkspaceRequest.create()..workspaceId = workspaceId;
return WorkspaceEventReadWorkspaces(request).send().then((result) {
return FolderEventReadWorkspaces(request).send().then((result) {
return result.fold(
(workspaces) {
assert(workspaces.items.length == 1);
@ -54,7 +54,7 @@ class WorkspaceRepo {
Future<Either<List<App>, FlowyError>> getApps() {
final request = QueryWorkspaceRequest.create()..workspaceId = workspaceId;
return WorkspaceEventReadWorkspaceApps(request).send().then((result) {
return FolderEventReadWorkspaceApps(request).send().then((result) {
return result.fold(
(apps) => left(apps.items),
(error) => right(error),
@ -67,7 +67,7 @@ class WorkspaceListenerRepo {
StreamSubscription<SubscribeObject>? _subscription;
WorkspaceAppsChangedCallback? _appsChanged;
WorkspaceUpdatedCallback? _update;
late WorkspaceNotificationParser _parser;
late FolderNotificationParser _parser;
final UserProfile user;
final String workspaceId;
@ -83,7 +83,7 @@ class WorkspaceListenerRepo {
_appsChanged = appsChanged;
_update = update;
_parser = WorkspaceNotificationParser(
_parser = FolderNotificationParser(
id: workspaceId,
callback: (ty, result) {
_handleObservableType(ty, result);
@ -93,9 +93,9 @@ class WorkspaceListenerRepo {
_subscription = RustStreamReceiver.listen((observable) => _parser.parse(observable));
}
void _handleObservableType(WorkspaceNotification ty, Either<Uint8List, FlowyError> result) {
void _handleObservableType(FolderNotification ty, Either<Uint8List, FlowyError> result) {
switch (ty) {
case WorkspaceNotification.WorkspaceUpdated:
case FolderNotification.WorkspaceUpdated:
if (_update != null) {
result.fold(
(payload) {
@ -106,7 +106,7 @@ class WorkspaceListenerRepo {
);
}
break;
case WorkspaceNotification.WorkspaceAppsChanged:
case FolderNotification.WorkspaceAppsChanged:
if (_appsChanged != null) {
result.fold(
(payload) => _appsChanged!(

View File

@ -8,7 +8,7 @@ import 'package:app_flowy/startup/startup.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_infra_ui/style_widget/container.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:styled_widget/styled_widget.dart';

View File

@ -4,7 +4,7 @@ import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
import 'package:flutter_quill/flutter_quill.dart' as quill;
import 'package:flowy_infra_ui/widget/error_page.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:styled_widget/styled_widget.dart';

View File

@ -12,8 +12,8 @@ import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flowy_infra_ui/widget/rounded_button.dart';
import 'package:flowy_log/flowy_log.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/share.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/share.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flutter/material.dart';
import 'package:dartz/dartz.dart' as dartz;

View File

@ -2,7 +2,7 @@ import 'package:flowy_infra/image.dart';
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/trash.pb.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:fixnum/fixnum.dart' as $fixnum;

View File

@ -4,7 +4,7 @@ import 'package:app_flowy/workspace/presentation/home/home_sizes.dart';
import 'package:app_flowy/workspace/presentation/home/navigation.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:flowy_infra_ui/style_widget/extension.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';

View File

@ -5,8 +5,8 @@ import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/workspace.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:provider/provider.dart';

View File

@ -4,7 +4,7 @@ import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flowy_infra_ui/style_widget/hover.dart';
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:styled_widget/styled_widget.dart';

View File

@ -6,7 +6,7 @@ import 'package:flowy_infra/flowy_icon_data_icons.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:app_flowy/workspace/application/app/app_bloc.dart';

View File

@ -1,8 +1,8 @@
import 'package:app_flowy/workspace/presentation/widgets/menu/menu.dart';
import 'package:app_flowy/workspace/presentation/widgets/menu/widget/app/header/header.dart';
import 'package:expandable/expandable.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/app.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:app_flowy/startup/startup.dart';

View File

@ -8,7 +8,7 @@ import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/style_widget/hover.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:styled_widget/styled_widget.dart';

View File

@ -3,7 +3,7 @@ import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
import 'package:app_flowy/workspace/domain/view_ext.dart';
import 'package:app_flowy/workspace/presentation/widgets/menu/menu.dart';
import 'package:app_flowy/workspace/presentation/widgets/menu/widget/app/menu_app.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:styled_widget/styled_widget.dart';

View File

@ -1,538 +1,503 @@
/// Auto gen code from rust ast, do not edit
part of 'dispatch.dart';
class WorkspaceEventCreateWorkspace {
CreateWorkspaceRequest request;
WorkspaceEventCreateWorkspace(this.request);
Future<Either<Workspace, FlowyError>> send() {
class FolderEventCreateWorkspace {
CreateWorkspaceRequest request;
FolderEventCreateWorkspace(this.request);
Future<Either<Workspace, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.CreateWorkspace.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(Workspace.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventReadCurWorkspace {
WorkspaceEventReadCurWorkspace();
class FolderEventReadCurWorkspace {
FolderEventReadCurWorkspace();
Future<Either<CurrentWorkspaceSetting, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ReadCurWorkspace.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(CurrentWorkspaceSetting.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class WorkspaceEventReadWorkspaces {
QueryWorkspaceRequest request;
WorkspaceEventReadWorkspaces(this.request);
class FolderEventReadWorkspaces {
QueryWorkspaceRequest request;
FolderEventReadWorkspaces(this.request);
Future<Either<RepeatedWorkspace, FlowyError>> send() {
Future<Either<RepeatedWorkspace, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ReadWorkspaces.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(RepeatedWorkspace.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventDeleteWorkspace {
QueryWorkspaceRequest request;
WorkspaceEventDeleteWorkspace(this.request);
class FolderEventDeleteWorkspace {
QueryWorkspaceRequest request;
FolderEventDeleteWorkspace(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.DeleteWorkspace.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.DeleteWorkspace.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventOpenWorkspace {
QueryWorkspaceRequest request;
WorkspaceEventOpenWorkspace(this.request);
class FolderEventOpenWorkspace {
QueryWorkspaceRequest request;
FolderEventOpenWorkspace(this.request);
Future<Either<Workspace, FlowyError>> send() {
Future<Either<Workspace, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.OpenWorkspace.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(Workspace.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventReadWorkspaceApps {
QueryWorkspaceRequest request;
WorkspaceEventReadWorkspaceApps(this.request);
class FolderEventReadWorkspaceApps {
QueryWorkspaceRequest request;
FolderEventReadWorkspaceApps(this.request);
Future<Either<RepeatedApp, FlowyError>> send() {
Future<Either<RepeatedApp, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ReadWorkspaceApps.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(RepeatedApp.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventCreateApp {
CreateAppRequest request;
WorkspaceEventCreateApp(this.request);
class FolderEventCreateApp {
CreateAppRequest request;
FolderEventCreateApp(this.request);
Future<Either<App, FlowyError>> send() {
Future<Either<App, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.CreateApp.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(App.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventDeleteApp {
QueryAppRequest request;
WorkspaceEventDeleteApp(this.request);
class FolderEventDeleteApp {
QueryAppRequest request;
FolderEventDeleteApp(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.DeleteApp.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.DeleteApp.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventReadApp {
QueryAppRequest request;
WorkspaceEventReadApp(this.request);
class FolderEventReadApp {
QueryAppRequest request;
FolderEventReadApp(this.request);
Future<Either<App, FlowyError>> send() {
Future<Either<App, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ReadApp.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(App.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventUpdateApp {
UpdateAppRequest request;
WorkspaceEventUpdateApp(this.request);
class FolderEventUpdateApp {
UpdateAppRequest request;
FolderEventUpdateApp(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.UpdateApp.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.UpdateApp.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventCreateView {
CreateViewRequest request;
WorkspaceEventCreateView(this.request);
class FolderEventCreateView {
CreateViewRequest request;
FolderEventCreateView(this.request);
Future<Either<View, FlowyError>> send() {
Future<Either<View, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.CreateView.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(View.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventReadView {
QueryViewRequest request;
WorkspaceEventReadView(this.request);
class FolderEventReadView {
QueryViewRequest request;
FolderEventReadView(this.request);
Future<Either<View, FlowyError>> send() {
Future<Either<View, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ReadView.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(View.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventUpdateView {
UpdateViewRequest request;
WorkspaceEventUpdateView(this.request);
class FolderEventUpdateView {
UpdateViewRequest request;
FolderEventUpdateView(this.request);
Future<Either<View, FlowyError>> send() {
Future<Either<View, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.UpdateView.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(View.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventDeleteView {
QueryViewRequest request;
WorkspaceEventDeleteView(this.request);
class FolderEventDeleteView {
QueryViewRequest request;
FolderEventDeleteView(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.DeleteView.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.DeleteView.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventDuplicateView {
QueryViewRequest request;
WorkspaceEventDuplicateView(this.request);
class FolderEventDuplicateView {
QueryViewRequest request;
FolderEventDuplicateView(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.DuplicateView.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.DuplicateView.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventCopyLink {
WorkspaceEventCopyLink();
class FolderEventCopyLink {
FolderEventCopyLink();
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.CopyLink.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class WorkspaceEventOpenDocument {
QueryViewRequest request;
WorkspaceEventOpenDocument(this.request);
class FolderEventOpenDocument {
QueryViewRequest request;
FolderEventOpenDocument(this.request);
Future<Either<DocumentDelta, FlowyError>> send() {
Future<Either<DocumentDelta, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.OpenDocument.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.OpenDocument.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(okBytes) => left(DocumentDelta.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(DocumentDelta.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventCloseView {
QueryViewRequest request;
WorkspaceEventCloseView(this.request);
class FolderEventCloseView {
QueryViewRequest request;
FolderEventCloseView(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.CloseView.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.CloseView.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventReadTrash {
WorkspaceEventReadTrash();
class FolderEventReadTrash {
FolderEventReadTrash();
Future<Either<RepeatedTrash, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ReadTrash.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(RepeatedTrash.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class WorkspaceEventPutbackTrash {
TrashId request;
WorkspaceEventPutbackTrash(this.request);
class FolderEventPutbackTrash {
TrashId request;
FolderEventPutbackTrash(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.PutbackTrash.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.PutbackTrash.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventDeleteTrash {
RepeatedTrashId request;
WorkspaceEventDeleteTrash(this.request);
class FolderEventDeleteTrash {
RepeatedTrashId request;
FolderEventDeleteTrash(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.DeleteTrash.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.DeleteTrash.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class WorkspaceEventRestoreAllTrash {
WorkspaceEventRestoreAllTrash();
class FolderEventRestoreAllTrash {
FolderEventRestoreAllTrash();
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.RestoreAllTrash.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class WorkspaceEventDeleteAllTrash {
WorkspaceEventDeleteAllTrash();
class FolderEventDeleteAllTrash {
FolderEventDeleteAllTrash();
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.DeleteAllTrash.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class WorkspaceEventApplyDocDelta {
DocumentDelta request;
WorkspaceEventApplyDocDelta(this.request);
class FolderEventApplyDocDelta {
DocumentDelta request;
FolderEventApplyDocDelta(this.request);
Future<Either<DocumentDelta, FlowyError>> send() {
Future<Either<DocumentDelta, FlowyError>> send() {
FFIRequest request = FFIRequest.create()
..event = FolderEvent.ApplyDocDelta.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(DocumentDelta.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class FolderEventExportDocument {
ExportRequest request;
FolderEventExportDocument(this.request);
Future<Either<ExportData, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ApplyDocDelta.toString()
..payload = requestToBytes(this.request);
..event = FolderEvent.ExportDocument.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(okBytes) => left(DocumentDelta.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(ExportData.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class WorkspaceEventExportDocument {
ExportRequest request;
WorkspaceEventExportDocument(this.request);
Future<Either<ExportData, FlowyError>> send() {
final request = FFIRequest.create()
..event = WorkspaceEvent.ExportDocument.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(okBytes) => left(ExportData.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class NetworkEventUpdateNetworkType {
NetworkState request;
NetworkEventUpdateNetworkType(this.request);
NetworkState request;
NetworkEventUpdateNetworkType(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = NetworkEvent.UpdateNetworkType.toString()
..payload = requestToBytes(this.request);
..event = NetworkEvent.UpdateNetworkType.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class UserEventInitUser {
UserEventInitUser();
UserEventInitUser();
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = UserEvent.InitUser.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class UserEventSignIn {
SignInRequest request;
UserEventSignIn(this.request);
SignInRequest request;
UserEventSignIn(this.request);
Future<Either<UserProfile, FlowyError>> send() {
Future<Either<UserProfile, FlowyError>> send() {
final request = FFIRequest.create()
..event = UserEvent.SignIn.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(UserProfile.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class UserEventSignUp {
SignUpRequest request;
UserEventSignUp(this.request);
SignUpRequest request;
UserEventSignUp(this.request);
Future<Either<UserProfile, FlowyError>> send() {
Future<Either<UserProfile, FlowyError>> send() {
final request = FFIRequest.create()
..event = UserEvent.SignUp.toString()
..payload = requestToBytes(this.request);
..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)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(UserProfile.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class UserEventSignOut {
UserEventSignOut();
UserEventSignOut();
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = UserEvent.SignOut.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class UserEventUpdateUser {
UpdateUserRequest request;
UserEventUpdateUser(this.request);
UpdateUserRequest request;
UserEventUpdateUser(this.request);
Future<Either<Unit, FlowyError>> send() {
Future<Either<Unit, FlowyError>> send() {
final request = FFIRequest.create()
..event = UserEvent.UpdateUser.toString()
..payload = requestToBytes(this.request);
..event = UserEvent.UpdateUser.toString()
..payload = requestToBytes(this.request);
return Dispatch.asyncRequest(request)
.then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(bytes) => left(unit),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
}
class UserEventGetUserProfile {
UserEventGetUserProfile();
UserEventGetUserProfile();
Future<Either<UserProfile, FlowyError>> send() {
final request = FFIRequest.create()
..event = UserEvent.GetUserProfile.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(UserProfile.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}
class UserEventCheckUser {
UserEventCheckUser();
UserEventCheckUser();
Future<Either<UserProfile, FlowyError>> send() {
final request = FFIRequest.create()
..event = UserEvent.CheckUser.toString();
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)),
));
}
return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
(okBytes) => left(UserProfile.fromBuffer(okBytes)),
(errBytes) => right(FlowyError.fromBuffer(errBytes)),
));
}
}

View File

@ -8,7 +8,7 @@ import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-net/event.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-net/network_state.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-user/event.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-core/event.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/event.pb.dart';
import 'package:isolates/isolates.dart';
import 'package:isolates/ports.dart';
import 'package:ffi/ffi.dart';
@ -19,7 +19,7 @@ import 'dart:typed_data';
import 'package:flowy_sdk/ffi.dart' as ffi;
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/dart-ffi/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-core-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
import 'package:flowy_sdk/protobuf/flowy-collaboration/protobuf.dart';
// ignore: unused_import

View File

@ -1,48 +0,0 @@
///
// Generated code. Do not modify.
// source: dart_notification.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
// ignore_for_file: UNDEFINED_SHOWN_NAME
import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;
class WorkspaceNotification extends $pb.ProtobufEnum {
static const WorkspaceNotification Unknown = WorkspaceNotification._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Unknown');
static const WorkspaceNotification UserCreateWorkspace = WorkspaceNotification._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UserCreateWorkspace');
static const WorkspaceNotification UserDeleteWorkspace = WorkspaceNotification._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UserDeleteWorkspace');
static const WorkspaceNotification WorkspaceUpdated = WorkspaceNotification._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WorkspaceUpdated');
static const WorkspaceNotification WorkspaceListUpdated = WorkspaceNotification._(13, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WorkspaceListUpdated');
static const WorkspaceNotification WorkspaceAppsChanged = WorkspaceNotification._(14, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WorkspaceAppsChanged');
static const WorkspaceNotification AppUpdated = WorkspaceNotification._(21, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AppUpdated');
static const WorkspaceNotification AppViewsChanged = WorkspaceNotification._(24, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AppViewsChanged');
static const WorkspaceNotification ViewUpdated = WorkspaceNotification._(31, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ViewUpdated');
static const WorkspaceNotification ViewDeleted = WorkspaceNotification._(32, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ViewDeleted');
static const WorkspaceNotification ViewRestored = WorkspaceNotification._(33, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ViewRestored');
static const WorkspaceNotification UserUnauthorized = WorkspaceNotification._(100, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UserUnauthorized');
static const WorkspaceNotification TrashUpdated = WorkspaceNotification._(1000, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TrashUpdated');
static const $core.List<WorkspaceNotification> values = <WorkspaceNotification> [
Unknown,
UserCreateWorkspace,
UserDeleteWorkspace,
WorkspaceUpdated,
WorkspaceListUpdated,
WorkspaceAppsChanged,
AppUpdated,
AppViewsChanged,
ViewUpdated,
ViewDeleted,
ViewRestored,
UserUnauthorized,
TrashUpdated,
];
static final $core.Map<$core.int, WorkspaceNotification> _byValue = $pb.ProtobufEnum.initByValue(values);
static WorkspaceNotification? valueOf($core.int value) => _byValue[value];
const WorkspaceNotification._($core.int v, $core.String n) : super(v, n);
}

View File

@ -1,72 +0,0 @@
///
// Generated code. Do not modify.
// source: event.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
// ignore_for_file: UNDEFINED_SHOWN_NAME
import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;
class WorkspaceEvent extends $pb.ProtobufEnum {
static const WorkspaceEvent CreateWorkspace = WorkspaceEvent._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CreateWorkspace');
static const WorkspaceEvent ReadCurWorkspace = WorkspaceEvent._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReadCurWorkspace');
static const WorkspaceEvent ReadWorkspaces = WorkspaceEvent._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReadWorkspaces');
static const WorkspaceEvent DeleteWorkspace = WorkspaceEvent._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DeleteWorkspace');
static const WorkspaceEvent OpenWorkspace = WorkspaceEvent._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'OpenWorkspace');
static const WorkspaceEvent ReadWorkspaceApps = WorkspaceEvent._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReadWorkspaceApps');
static const WorkspaceEvent CreateApp = WorkspaceEvent._(101, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CreateApp');
static const WorkspaceEvent DeleteApp = WorkspaceEvent._(102, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DeleteApp');
static const WorkspaceEvent ReadApp = WorkspaceEvent._(103, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReadApp');
static const WorkspaceEvent UpdateApp = WorkspaceEvent._(104, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UpdateApp');
static const WorkspaceEvent CreateView = WorkspaceEvent._(201, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CreateView');
static const WorkspaceEvent ReadView = WorkspaceEvent._(202, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReadView');
static const WorkspaceEvent UpdateView = WorkspaceEvent._(203, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UpdateView');
static const WorkspaceEvent DeleteView = WorkspaceEvent._(204, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DeleteView');
static const WorkspaceEvent DuplicateView = WorkspaceEvent._(205, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DuplicateView');
static const WorkspaceEvent CopyLink = WorkspaceEvent._(206, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CopyLink');
static const WorkspaceEvent OpenDocument = WorkspaceEvent._(207, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'OpenDocument');
static const WorkspaceEvent CloseView = WorkspaceEvent._(208, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CloseView');
static const WorkspaceEvent ReadTrash = WorkspaceEvent._(300, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ReadTrash');
static const WorkspaceEvent PutbackTrash = WorkspaceEvent._(301, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PutbackTrash');
static const WorkspaceEvent DeleteTrash = WorkspaceEvent._(302, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DeleteTrash');
static const WorkspaceEvent RestoreAllTrash = WorkspaceEvent._(303, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'RestoreAllTrash');
static const WorkspaceEvent DeleteAllTrash = WorkspaceEvent._(304, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DeleteAllTrash');
static const WorkspaceEvent ApplyDocDelta = WorkspaceEvent._(400, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ApplyDocDelta');
static const WorkspaceEvent ExportDocument = WorkspaceEvent._(500, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ExportDocument');
static const $core.List<WorkspaceEvent> values = <WorkspaceEvent> [
CreateWorkspace,
ReadCurWorkspace,
ReadWorkspaces,
DeleteWorkspace,
OpenWorkspace,
ReadWorkspaceApps,
CreateApp,
DeleteApp,
ReadApp,
UpdateApp,
CreateView,
ReadView,
UpdateView,
DeleteView,
DuplicateView,
CopyLink,
OpenDocument,
CloseView,
ReadTrash,
PutbackTrash,
DeleteTrash,
RestoreAllTrash,
DeleteAllTrash,
ApplyDocDelta,
ExportDocument,
];
static final $core.Map<$core.int, WorkspaceEvent> _byValue = $pb.ProtobufEnum.initByValue(values);
static WorkspaceEvent? valueOf($core.int value) => _byValue[value];
const WorkspaceEvent._($core.int v, $core.String n) : super(v, n);
}

View File

@ -0,0 +1,48 @@
///
// Generated code. Do not modify.
// source: dart_notification.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
// ignore_for_file: UNDEFINED_SHOWN_NAME
import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;
class FolderNotification extends $pb.ProtobufEnum {
static const FolderNotification Unknown = FolderNotification._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Unknown');
static const FolderNotification UserCreateWorkspace = FolderNotification._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UserCreateWorkspace');
static const FolderNotification UserDeleteWorkspace = FolderNotification._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UserDeleteWorkspace');
static const FolderNotification WorkspaceUpdated = FolderNotification._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WorkspaceUpdated');
static const FolderNotification WorkspaceListUpdated = FolderNotification._(13, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WorkspaceListUpdated');
static const FolderNotification WorkspaceAppsChanged = FolderNotification._(14, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WorkspaceAppsChanged');
static const FolderNotification AppUpdated = FolderNotification._(21, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AppUpdated');
static const FolderNotification AppViewsChanged = FolderNotification._(24, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'AppViewsChanged');
static const FolderNotification ViewUpdated = FolderNotification._(31, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ViewUpdated');
static const FolderNotification ViewDeleted = FolderNotification._(32, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ViewDeleted');
static const FolderNotification ViewRestored = FolderNotification._(33, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ViewRestored');
static const FolderNotification UserUnauthorized = FolderNotification._(100, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UserUnauthorized');
static const FolderNotification TrashUpdated = FolderNotification._(1000, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TrashUpdated');
static const $core.List<FolderNotification> values = <FolderNotification> [
Unknown,
UserCreateWorkspace,
UserDeleteWorkspace,
WorkspaceUpdated,
WorkspaceListUpdated,
WorkspaceAppsChanged,
AppUpdated,
AppViewsChanged,
ViewUpdated,
ViewDeleted,
ViewRestored,
UserUnauthorized,
TrashUpdated,
];
static final $core.Map<$core.int, FolderNotification> _byValue = $pb.ProtobufEnum.initByValue(values);
static FolderNotification? valueOf($core.int value) => _byValue[value];
const FolderNotification._($core.int v, $core.String n) : super(v, n);
}

View File

@ -8,9 +8,9 @@
import 'dart:core' as $core;
import 'dart:convert' as $convert;
import 'dart:typed_data' as $typed_data;
@$core.Deprecated('Use workspaceNotificationDescriptor instead')
const WorkspaceNotification$json = const {
'1': 'WorkspaceNotification',
@$core.Deprecated('Use folderNotificationDescriptor instead')
const FolderNotification$json = const {
'1': 'FolderNotification',
'2': const [
const {'1': 'Unknown', '2': 0},
const {'1': 'UserCreateWorkspace', '2': 10},
@ -28,5 +28,5 @@ const WorkspaceNotification$json = const {
],
};
/// Descriptor for `WorkspaceNotification`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List workspaceNotificationDescriptor = $convert.base64Decode('ChVXb3Jrc3BhY2VOb3RpZmljYXRpb24SCwoHVW5rbm93bhAAEhcKE1VzZXJDcmVhdGVXb3Jrc3BhY2UQChIXChNVc2VyRGVsZXRlV29ya3NwYWNlEAsSFAoQV29ya3NwYWNlVXBkYXRlZBAMEhgKFFdvcmtzcGFjZUxpc3RVcGRhdGVkEA0SGAoUV29ya3NwYWNlQXBwc0NoYW5nZWQQDhIOCgpBcHBVcGRhdGVkEBUSEwoPQXBwVmlld3NDaGFuZ2VkEBgSDwoLVmlld1VwZGF0ZWQQHxIPCgtWaWV3RGVsZXRlZBAgEhAKDFZpZXdSZXN0b3JlZBAhEhQKEFVzZXJVbmF1dGhvcml6ZWQQZBIRCgxUcmFzaFVwZGF0ZWQQ6Ac=');
/// Descriptor for `FolderNotification`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List folderNotificationDescriptor = $convert.base64Decode('ChJGb2xkZXJOb3RpZmljYXRpb24SCwoHVW5rbm93bhAAEhcKE1VzZXJDcmVhdGVXb3Jrc3BhY2UQChIXChNVc2VyRGVsZXRlV29ya3NwYWNlEAsSFAoQV29ya3NwYWNlVXBkYXRlZBAMEhgKFFdvcmtzcGFjZUxpc3RVcGRhdGVkEA0SGAoUV29ya3NwYWNlQXBwc0NoYW5nZWQQDhIOCgpBcHBVcGRhdGVkEBUSEwoPQXBwVmlld3NDaGFuZ2VkEBgSDwoLVmlld1VwZGF0ZWQQHxIPCgtWaWV3RGVsZXRlZBAgEhAKDFZpZXdSZXN0b3JlZBAhEhQKEFVzZXJVbmF1dGhvcml6ZWQQZBIRCgxUcmFzaFVwZGF0ZWQQ6Ac=');

Some files were not shown because too many files have changed in this diff Show More