Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: bump client api (#7455)

Nathan.fooo4b2389dafdea
diff --git a/frontend/appflowy_flutter/lib/user/presentation/helpers/handle_open_workspace_error.dart b/frontend/appflowy_flutter/lib/user/presentation/helpers/handle_open_workspace_error.dart
index 0aeb92fc18..2e8e4feeae 100644
--- a/frontend/appflowy_flutter/lib/user/presentation/helpers/handle_open_workspace_error.dart
+++ b/frontend/appflowy_flutter/lib/user/presentation/helpers/handle_open_workspace_error.dart
@@ -15,7 +15,7 @@ void handleOpenWorkspaceError(BuildContext context, FlowyError error) {
getIt<AuthRouter>().pushWorkspaceErrorScreen(context, userFolder, error);
break;
case ErrorCode.InvalidEncryptSecret:
- case ErrorCode.HttpError:
+ case ErrorCode.NetworkError:
showToastNotification(
context,
message: error.msg,
diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock
index 80833d70d0..8f6726606e 100644
--- a/frontend/rust-lib/Cargo.lock
+++ b/frontend/rust-lib/Cargo.lock
@@ -163,7 +163,7 @@ checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
[[package]]
name = "app-error"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"anyhow",
"bincode",
@@ -183,7 +183,7 @@ dependencies = [
[[package]]
name = "appflowy-ai-client"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"anyhow",
"bytes",
@@ -786,7 +786,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"again",
"anyhow",
@@ -794,7 +794,6 @@ dependencies = [
"arc-swap",
"async-trait",
"base64 0.22.1",
- "bincode",
"brotli",
"bytes",
"chrono",
@@ -823,7 +822,6 @@ dependencies = [
"semver",
"serde",
"serde_json",
- "serde_repr",
"serde_urlencoded",
"shared-entity",
"thiserror 1.0.64",
@@ -843,7 +841,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"collab-entity",
"collab-rt-entity",
@@ -856,7 +854,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"futures-channel",
"futures-util",
@@ -1128,13 +1126,12 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"anyhow",
"bincode",
"bytes",
"chrono",
- "client-websocket",
"collab",
"collab-entity",
"collab-rt-protocol",
@@ -1143,9 +1140,7 @@ dependencies = [
"prost-build",
"protoc-bin-vendored",
"serde",
- "serde_json",
"serde_repr",
- "thiserror 1.0.64",
"tokio-tungstenite",
"yrs",
]
@@ -1153,7 +1148,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"anyhow",
"async-trait",
@@ -1548,11 +1543,8 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "database-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
- "anyhow",
- "app-error",
- "appflowy-ai-client",
"bincode",
"bytes",
"chrono",
@@ -2970,28 +2962,24 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"anyhow",
- "futures-util",
"getrandom 0.2.10",
"gotrue-entity",
"infra",
"reqwest 0.12.9",
"serde",
"serde_json",
- "tokio",
"tracing",
]
[[package]]
name = "gotrue-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
- "anyhow",
"app-error",
- "chrono",
"jsonwebtoken",
"lazy_static",
"serde",
@@ -3598,7 +3586,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"anyhow",
"bytes",
@@ -6140,7 +6128,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=80eea34e73cfffe71e484cbaddb2d547076eaf09#80eea34e73cfffe71e484cbaddb2d547076eaf09"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3e1d5b0edeeaa0894f7d060e9b121a3d0673090e#3e1d5b0edeeaa0894f7d060e9b121a3d0673090e"
dependencies = [
"anyhow",
"app-error",
@@ -6152,14 +6140,12 @@ dependencies = [
"futures",
"gotrue-entity",
"infra",
- "log",
"pin-project",
"reqwest 0.12.9",
"serde",
"serde_json",
"serde_repr",
"thiserror 1.0.64",
- "tracing",
"uuid",
"validator 0.19.0",
]
diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml
index d1806fbcb9..fd51a4a59c 100644
--- a/frontend/rust-lib/Cargo.toml
+++ b/frontend/rust-lib/Cargo.toml
@@ -103,8 +103,8 @@ dashmap = "6.0.1"
# Run the script.add_workspace_members:
# scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️
-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "80eea34e73cfffe71e484cbaddb2d547076eaf09" }
-client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "80eea34e73cfffe71e484cbaddb2d547076eaf09" }
+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3e1d5b0edeeaa0894f7d060e9b121a3d0673090e" }
+client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3e1d5b0edeeaa0894f7d060e9b121a3d0673090e" }
[profile.dev]
opt-level = 0
diff --git a/frontend/rust-lib/flowy-ai/src/chat.rs b/frontend/rust-lib/flowy-ai/src/chat.rs
index 12b230580a..17ffb29a0d 100644
--- a/frontend/rust-lib/flowy-ai/src/chat.rs
+++ b/frontend/rust-lib/flowy-ai/src/chat.rs
@@ -221,7 +221,7 @@ impl Chat {
answer_stream_buffer.lock().await.push_str(&value);
// trace!("[Chat] stream answer: {}", value);
if let Err(err) = answer_sink.send(format!("data:{}", value)).await {
- error!("Failed to stream answer: {}", err);
+ error!("Failed to stream answer via IsolateSink: {}", err);
}
},
QuestionStreamValue::Metadata { value } => {
diff --git a/frontend/rust-lib/flowy-error/src/code.rs b/frontend/rust-lib/flowy-error/src/code.rs
index acc145767e..e97393d094 100644
--- a/frontend/rust-lib/flowy-error/src/code.rs
+++ b/frontend/rust-lib/flowy-error/src/code.rs
@@ -164,8 +164,8 @@ pub enum ErrorCode {
#[error("Sql error")]
SqlError = 58,
- #[error("Http error")]
- HttpError = 59,
+ #[error("Network error")]
+ NetworkError = 59,
#[error("The content should not be empty")]
UnexpectedEmpty = 60,
@@ -368,6 +368,9 @@ pub enum ErrorCode {
#[error("View is locked")]
ViewIsLocked = 126,
+
+ #[error("Request timeout")]
+ RequestTimeout = 127,
}
impl ErrorCode {
diff --git a/frontend/rust-lib/flowy-error/src/errors.rs b/frontend/rust-lib/flowy-error/src/errors.rs
index 507905dbad..e7b6fdd439 100644
--- a/frontend/rust-lib/flowy-error/src/errors.rs
+++ b/frontend/rust-lib/flowy-error/src/errors.rs
@@ -131,7 +131,7 @@ impl FlowyError {
static_flowy_error!(serde, ErrorCode::Serde);
static_flowy_error!(field_record_not_found, ErrorCode::FieldRecordNotFound);
static_flowy_error!(payload_none, ErrorCode::UnexpectedEmpty);
- static_flowy_error!(http, ErrorCode::HttpError);
+ static_flowy_error!(http, ErrorCode::NetworkError);
static_flowy_error!(
unexpect_calendar_field_type,
ErrorCode::UnexpectedCalendarFieldType
diff --git a/frontend/rust-lib/flowy-error/src/impl_from/cloud.rs b/frontend/rust-lib/flowy-error/src/impl_from/cloud.rs
index 4c4380338b..53617c8c36 100644
--- a/frontend/rust-lib/flowy-error/src/impl_from/cloud.rs
+++ b/frontend/rust-lib/flowy-error/src/impl_from/cloud.rs
@@ -18,7 +18,8 @@ impl From<AppResponseError> for FlowyError {
AppErrorCode::InvalidOAuthProvider => ErrorCode::InvalidAuthConfig,
AppErrorCode::NotLoggedIn => ErrorCode::UserUnauthorized,
AppErrorCode::NotEnoughPermissions => ErrorCode::NotEnoughPermissions,
- AppErrorCode::NetworkError => ErrorCode::HttpError,
+ AppErrorCode::NetworkError => ErrorCode::NetworkError,
+ AppErrorCode::RequestTimeout => ErrorCode::RequestTimeout,
AppErrorCode::PayloadTooLarge => ErrorCode::PayloadTooLarge,
AppErrorCode::UserUnAuthorized => ErrorCode::UserUnauthorized,
AppErrorCode::WorkspaceLimitExceeded => ErrorCode::WorkspaceLimitExceeded,