diff --git a/frontend/rust-lib/.gitignore b/frontend/rust-lib/.gitignore index 94881e398a..264aad238c 100644 --- a/frontend/rust-lib/.gitignore +++ b/frontend/rust-lib/.gitignore @@ -11,4 +11,5 @@ **/**/temp bin/ **/src/protobuf +**/resources/proto .idea/ \ No newline at end of file diff --git a/frontend/rust-lib/dart-notify/resources/proto/subject.proto b/frontend/rust-lib/dart-notify/resources/proto/subject.proto deleted file mode 100644 index ea7954ecb6..0000000000 --- a/frontend/rust-lib/dart-notify/resources/proto/subject.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -message SubscribeObject { - string source = 1; - int32 ty = 2; - string id = 3; - oneof one_of_payload { bytes payload = 4; }; - oneof one_of_error { bytes error = 5; }; -} diff --git a/frontend/rust-lib/flowy-error/resources/proto/errors.proto b/frontend/rust-lib/flowy-error/resources/proto/errors.proto deleted file mode 100644 index 2be9375a15..0000000000 --- a/frontend/rust-lib/flowy-error/resources/proto/errors.proto +++ /dev/null @@ -1,6 +0,0 @@ -syntax = "proto3"; - -message FlowyError { - int32 code = 1; - string msg = 2; -} diff --git a/frontend/rust-lib/flowy-folder/resources/proto/dart_notification.proto b/frontend/rust-lib/flowy-folder/resources/proto/dart_notification.proto deleted file mode 100644 index feff6258f6..0000000000 --- a/frontend/rust-lib/flowy-folder/resources/proto/dart_notification.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -enum FolderNotification { - Unknown = 0; - UserCreateWorkspace = 10; - UserDeleteWorkspace = 11; - WorkspaceUpdated = 12; - WorkspaceListUpdated = 13; - WorkspaceAppsChanged = 14; - WorkspaceSetting = 15; - AppUpdated = 21; - AppViewsChanged = 24; - ViewUpdated = 31; - ViewDeleted = 32; - ViewRestored = 33; - UserUnauthorized = 100; - TrashUpdated = 1000; -} diff --git a/frontend/rust-lib/flowy-folder/resources/proto/event_map.proto b/frontend/rust-lib/flowy-folder/resources/proto/event_map.proto deleted file mode 100644 index bb11f02509..0000000000 --- a/frontend/rust-lib/flowy-folder/resources/proto/event_map.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -enum FolderEvent { - CreateWorkspace = 0; - ReadCurWorkspace = 1; - ReadWorkspaces = 2; - DeleteWorkspace = 3; - OpenWorkspace = 4; - ReadWorkspaceApps = 5; - CreateApp = 101; - DeleteApp = 102; - ReadApp = 103; - UpdateApp = 104; - CreateView = 201; - ReadView = 202; - UpdateView = 203; - DeleteView = 204; - DuplicateView = 205; - CloseView = 206; - ReadViewInfo = 207; - CopyLink = 220; - SetLatestView = 221; - MoveFolderItem = 230; - ReadTrash = 300; - PutbackTrash = 301; - DeleteTrash = 302; - RestoreAllTrash = 303; - DeleteAllTrash = 304; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/cell_entities.proto b/frontend/rust-lib/flowy-grid/resources/proto/cell_entities.proto deleted file mode 100644 index 32d4590427..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/cell_entities.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -import "field_entities.proto"; -message CreateSelectOptionPayload { - FieldIdentifierPayload field_identifier = 1; - string option_name = 2; -} -message CellIdentifierPayload { - string grid_id = 1; - string field_id = 2; - string row_id = 3; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/checkbox_type_option.proto b/frontend/rust-lib/flowy-grid/resources/proto/checkbox_type_option.proto deleted file mode 100644 index df721337c7..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/checkbox_type_option.proto +++ /dev/null @@ -1,5 +0,0 @@ -syntax = "proto3"; - -message CheckboxTypeOption { - bool is_selected = 1; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/dart_notification.proto b/frontend/rust-lib/flowy-grid/resources/proto/dart_notification.proto deleted file mode 100644 index 9a2899833f..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/dart_notification.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -enum GridNotification { - Unknown = 0; - DidCreateBlock = 11; - DidUpdateGridRow = 20; - DidUpdateGridField = 21; - DidUpdateRow = 30; - DidUpdateCell = 40; - DidUpdateField = 50; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/date_type_option.proto b/frontend/rust-lib/flowy-grid/resources/proto/date_type_option.proto deleted file mode 100644 index b67566ad58..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/date_type_option.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -import "cell_entities.proto"; -message DateTypeOption { - DateFormat date_format = 1; - TimeFormat time_format = 2; - bool include_time = 3; -} -message DateCellData { - string date = 1; - string time = 2; - int64 timestamp = 3; -} -message DateChangesetPayload { - CellIdentifierPayload cell_identifier = 1; - oneof one_of_date { string date = 2; }; - oneof one_of_time { string time = 3; }; -} -enum DateFormat { - Local = 0; - US = 1; - ISO = 2; - Friendly = 3; -} -enum TimeFormat { - TwelveHour = 0; - TwentyFourHour = 1; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/event_map.proto b/frontend/rust-lib/flowy-grid/resources/proto/event_map.proto deleted file mode 100644 index 623bf4b7da..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/event_map.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -enum GridEvent { - GetGridData = 0; - GetGridBlocks = 1; - GetFields = 10; - UpdateField = 11; - UpdateFieldTypeOption = 12; - InsertField = 13; - DeleteField = 14; - SwitchToField = 20; - DuplicateField = 21; - MoveItem = 22; - GetFieldTypeOption = 23; - CreateFieldTypeOption = 24; - NewSelectOption = 30; - GetSelectOptionCellData = 31; - UpdateSelectOption = 32; - CreateRow = 50; - GetRow = 51; - DeleteRow = 52; - DuplicateRow = 53; - GetCell = 70; - UpdateCell = 71; - UpdateSelectOptionCell = 72; - UpdateDateCell = 80; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/field_entities.proto b/frontend/rust-lib/flowy-grid/resources/proto/field_entities.proto deleted file mode 100644 index 3c670c50af..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/field_entities.proto +++ /dev/null @@ -1,6 +0,0 @@ -syntax = "proto3"; - -message FieldIdentifierPayload { - string field_id = 1; - string grid_id = 2; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/format.proto b/frontend/rust-lib/flowy-grid/resources/proto/format.proto deleted file mode 100644 index 6a1e497aaf..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/format.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -enum NumberFormat { - Number = 0; - USD = 1; - CanadianDollar = 2; - EUR = 4; - Pound = 5; - Yen = 6; - Ruble = 7; - Rupee = 8; - Won = 9; - Yuan = 10; - Real = 11; - Lira = 12; - Rupiah = 13; - Franc = 14; - HongKongDollar = 15; - NewZealandDollar = 16; - Krona = 17; - NorwegianKrone = 18; - MexicanPeso = 19; - Rand = 20; - NewTaiwanDollar = 21; - DanishKrone = 22; - Baht = 23; - Forint = 24; - Koruna = 25; - Shekel = 26; - ChileanPeso = 27; - PhilippinePeso = 28; - Dirham = 29; - ColombianPeso = 30; - Riyal = 31; - Ringgit = 32; - Leu = 33; - ArgentinePeso = 34; - UruguayanPeso = 35; - Percent = 36; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/number_type_option.proto b/frontend/rust-lib/flowy-grid/resources/proto/number_type_option.proto deleted file mode 100644 index c87ff88c3e..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/number_type_option.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -import "format.proto"; -message NumberTypeOption { - NumberFormat format = 1; - uint32 scale = 2; - string symbol = 3; - bool sign_positive = 4; - string name = 5; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/row_entities.proto b/frontend/rust-lib/flowy-grid/resources/proto/row_entities.proto deleted file mode 100644 index d09d76e960..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/row_entities.proto +++ /dev/null @@ -1,6 +0,0 @@ -syntax = "proto3"; - -message RowIdentifierPayload { - string grid_id = 1; - string row_id = 3; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/selection_type_option.proto b/frontend/rust-lib/flowy-grid/resources/proto/selection_type_option.proto deleted file mode 100644 index f26ebf72f1..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/selection_type_option.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -import "cell_entities.proto"; -import "cell_entities.proto"; -message SingleSelectTypeOption { - repeated SelectOption options = 1; - bool disable_color = 2; -} -message MultiSelectTypeOption { - repeated SelectOption options = 1; - bool disable_color = 2; -} -message SelectOption { - string id = 1; - string name = 2; - SelectOptionColor color = 3; -} -message SelectOptionChangesetPayload { - CellIdentifierPayload cell_identifier = 1; - oneof one_of_insert_option { SelectOption insert_option = 2; }; - oneof one_of_update_option { SelectOption update_option = 3; }; - oneof one_of_delete_option { SelectOption delete_option = 4; }; -} -message SelectOptionCellChangesetPayload { - CellIdentifierPayload cell_identifier = 1; - oneof one_of_insert_option_id { string insert_option_id = 2; }; - oneof one_of_delete_option_id { string delete_option_id = 3; }; -} -message SelectOptionCellData { - repeated SelectOption options = 1; - repeated SelectOption select_options = 2; -} -enum SelectOptionColor { - Purple = 0; - Pink = 1; - LightPink = 2; - Orange = 3; - Yellow = 4; - Lime = 5; - Green = 6; - Aqua = 7; - Blue = 8; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/text_type_option.proto b/frontend/rust-lib/flowy-grid/resources/proto/text_type_option.proto deleted file mode 100644 index 827c569a74..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/text_type_option.proto +++ /dev/null @@ -1,5 +0,0 @@ -syntax = "proto3"; - -message RichTextTypeOption { - string data = 1; -} diff --git a/frontend/rust-lib/flowy-grid/resources/proto/url_type_option.proto b/frontend/rust-lib/flowy-grid/resources/proto/url_type_option.proto deleted file mode 100644 index edf1c7e341..0000000000 --- a/frontend/rust-lib/flowy-grid/resources/proto/url_type_option.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -message URLTypeOption { - string data = 1; -} -message URLCellData { - string url = 1; - string content = 2; -} diff --git a/frontend/rust-lib/flowy-net/resources/proto/event_map.proto b/frontend/rust-lib/flowy-net/resources/proto/event_map.proto deleted file mode 100644 index 700e67f655..0000000000 --- a/frontend/rust-lib/flowy-net/resources/proto/event_map.proto +++ /dev/null @@ -1,5 +0,0 @@ -syntax = "proto3"; - -enum NetworkEvent { - UpdateNetworkType = 0; -} diff --git a/frontend/rust-lib/flowy-net/resources/proto/network_state.proto b/frontend/rust-lib/flowy-net/resources/proto/network_state.proto deleted file mode 100644 index 06a4aa5f3c..0000000000 --- a/frontend/rust-lib/flowy-net/resources/proto/network_state.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -message NetworkState { - NetworkType ty = 1; -} -enum NetworkType { - UnknownNetworkType = 0; - Wifi = 1; - Cell = 2; - Ethernet = 3; -} diff --git a/frontend/rust-lib/flowy-text-block/resources/proto/entities.proto b/frontend/rust-lib/flowy-text-block/resources/proto/entities.proto deleted file mode 100644 index d58ed2a9cb..0000000000 --- a/frontend/rust-lib/flowy-text-block/resources/proto/entities.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -message ExportPayload { - string view_id = 1; - ExportType export_type = 2; -} -message ExportData { - string data = 1; - ExportType export_type = 2; -} -enum ExportType { - Text = 0; - Markdown = 1; - Link = 2; -} diff --git a/frontend/rust-lib/flowy-text-block/resources/proto/event_map.proto b/frontend/rust-lib/flowy-text-block/resources/proto/event_map.proto deleted file mode 100644 index f7e088c938..0000000000 --- a/frontend/rust-lib/flowy-text-block/resources/proto/event_map.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -enum TextBlockEvent { - GetBlockData = 0; - ApplyDelta = 1; - ExportDocument = 2; -} diff --git a/frontend/rust-lib/flowy-user/resources/proto/dart_notification.proto b/frontend/rust-lib/flowy-user/resources/proto/dart_notification.proto deleted file mode 100644 index 4edff364f6..0000000000 --- a/frontend/rust-lib/flowy-user/resources/proto/dart_notification.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -enum UserNotification { - Unknown = 0; - UserAuthChanged = 1; - UserProfileUpdated = 2; - UserUnauthorized = 3; - UserWsConnectStateChanged = 4; -} diff --git a/frontend/rust-lib/flowy-user/resources/proto/event_map.proto b/frontend/rust-lib/flowy-user/resources/proto/event_map.proto deleted file mode 100644 index 581f710cb2..0000000000 --- a/frontend/rust-lib/flowy-user/resources/proto/event_map.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -enum UserEvent { - InitUser = 0; - SignIn = 1; - SignUp = 2; - SignOut = 3; - UpdateUser = 4; - GetUserProfile = 5; - CheckUser = 6; - SetAppearanceSetting = 7; - GetAppearanceSetting = 8; -} diff --git a/shared-lib/flowy-error-code/.proto/mod.rs b/shared-lib/flowy-error-code/.proto/mod.rs deleted file mode 100644 index da97aad28a..0000000000 --- a/shared-lib/flowy-error-code/.proto/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![cfg_attr(rustfmt, rustfmt::skip)] -// Auto-generated, do not edit -mod model; -pub use model::*; \ No newline at end of file diff --git a/shared-lib/flowy-error-code/.proto/model/mod.rs b/shared-lib/flowy-error-code/.proto/model/mod.rs deleted file mode 100644 index 191b80e077..0000000000 --- a/shared-lib/flowy-error-code/.proto/model/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -#![cfg_attr(rustfmt, rustfmt::skip)] -// Auto-generated, do not edit - -mod code; -pub use code::*; diff --git a/shared-lib/flowy-error-code/.proto/proto/code.proto b/shared-lib/flowy-error-code/.proto/proto/code.proto deleted file mode 100644 index ede9b65657..0000000000 --- a/shared-lib/flowy-error-code/.proto/proto/code.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -enum ErrorCode { - Internal = 0; - UserUnauthorized = 2; - RecordNotFound = 3; - UserIdIsEmpty = 4; - WorkspaceNameInvalid = 100; - WorkspaceIdInvalid = 101; - AppColorStyleInvalid = 102; - WorkspaceDescTooLong = 103; - WorkspaceNameTooLong = 104; - AppIdInvalid = 110; - AppNameInvalid = 111; - ViewNameInvalid = 120; - ViewThumbnailInvalid = 121; - ViewIdInvalid = 122; - ViewDescTooLong = 123; - ViewDataInvalid = 124; - ViewNameTooLong = 125; - ConnectError = 200; - EmailIsEmpty = 300; - EmailFormatInvalid = 301; - EmailAlreadyExists = 302; - PasswordIsEmpty = 303; - PasswordTooLong = 304; - PasswordContainsForbidCharacters = 305; - PasswordFormatInvalid = 306; - PasswordNotMatch = 307; - UserNameTooLong = 308; - UserNameContainForbiddenCharacters = 309; - UserNameIsEmpty = 310; - UserIdInvalid = 311; - UserNotExist = 312; - TextTooLong = 400; - GridIdIsEmpty = 410; - BlockIdIsEmpty = 420; - RowIdIsEmpty = 430; - OptionIdIsEmpty = 431; - FieldIdIsEmpty = 440; - FieldDoesNotExist = 441; - SelectOptionNameIsEmpty = 442; - FieldNotExists = 443; - FieldInvalidOperation = 444; - TypeOptionDataIsEmpty = 450; - InvalidDateTimeFormat = 500; - UnexpectedEmptyString = 999; - InvalidData = 1000; -}