chore: update single select

This commit is contained in:
nathan 2024-06-20 22:02:36 +08:00
parent 8ca541bfa1
commit bda56defaf
10 changed files with 158 additions and 81 deletions

View File

@ -172,7 +172,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "app-error"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bincode",
@ -192,7 +192,7 @@ dependencies = [
[[package]]
name = "appflowy-ai-client"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -772,7 +772,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"again",
"anyhow",
@ -794,6 +794,7 @@ dependencies = [
"infra",
"mime",
"parking_lot 0.12.1",
"percent-encoding",
"prost",
"reqwest",
"scraper 0.17.1",
@ -818,7 +819,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"collab-entity",
"collab-rt-entity",
@ -830,7 +831,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"futures-channel",
"futures-util",
@ -1070,7 +1071,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bincode",
@ -1095,7 +1096,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"async-trait",
@ -1341,7 +1342,7 @@ dependencies = [
"cssparser-macros",
"dtoa-short",
"itoa 1.0.6",
"phf 0.8.0",
"phf 0.11.2",
"smallvec",
]
@ -1452,7 +1453,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "database-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -2894,7 +2895,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"futures-util",
@ -2911,7 +2912,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -3343,7 +3344,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -4850,7 +4851,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2"
dependencies = [
"bytes",
"heck 0.4.1",
"itertools 0.10.5",
"itertools 0.11.0",
"log",
"multimap",
"once_cell",
@ -4871,7 +4872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
dependencies = [
"anyhow",
"itertools 0.10.5",
"itertools 0.11.0",
"proc-macro2",
"quote",
"syn 2.0.47",
@ -5835,7 +5836,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",

View File

@ -52,7 +52,7 @@ collab-user = { version = "0.2" }
# Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "6262816043efeede8823d7a7ea252083adf407e9" }
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "22909d4382911a1ffbb7602aee5e18f06132e683" }
[dependencies]
serde_json.workspace = true

View File

@ -215,7 +215,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "app-error"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bincode",
@ -235,7 +235,7 @@ dependencies = [
[[package]]
name = "appflowy-ai-client"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -561,7 +561,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"again",
"anyhow",
@ -583,6 +583,7 @@ dependencies = [
"infra",
"mime",
"parking_lot 0.12.1",
"percent-encoding",
"prost",
"reqwest",
"scraper 0.17.1",
@ -607,7 +608,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"collab-entity",
"collab-rt-entity",
@ -619,7 +620,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"futures-channel",
"futures-util",
@ -797,7 +798,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bincode",
@ -822,7 +823,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"async-trait",
@ -991,7 +992,7 @@ dependencies = [
"cssparser-macros",
"dtoa-short",
"itoa",
"phf 0.11.2",
"phf 0.8.0",
"smallvec",
]
@ -1036,7 +1037,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
[[package]]
name = "database-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -1919,7 +1920,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"futures-util",
@ -1936,7 +1937,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -2237,7 +2238,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -2966,7 +2967,7 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
dependencies = [
"phf_macros 0.8.0",
"phf_macros",
"phf_shared 0.8.0",
"proc-macro-hack",
]
@ -2986,7 +2987,6 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
dependencies = [
"phf_macros 0.11.2",
"phf_shared 0.11.2",
]
@ -3054,19 +3054,6 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "phf_macros"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
dependencies = [
"phf_generator 0.11.2",
"phf_shared 0.11.2",
"proc-macro2",
"quote",
"syn 2.0.48",
]
[[package]]
name = "phf_shared"
version = "0.8.0"
@ -3951,7 +3938,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",

View File

@ -54,7 +54,7 @@ yrs = "0.18.8"
# Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "6262816043efeede8823d7a7ea252083adf407e9" }
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "22909d4382911a1ffbb7602aee5e18f06132e683" }
[profile.dev]
opt-level = 0

View File

@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "app-error"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
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=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -746,7 +746,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"again",
"anyhow",
@ -768,6 +768,7 @@ dependencies = [
"infra",
"mime",
"parking_lot 0.12.1",
"percent-encoding",
"prost",
"reqwest",
"scraper 0.17.1",
@ -792,7 +793,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"collab-entity",
"collab-rt-entity",
@ -804,7 +805,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"futures-channel",
"futures-util",
@ -1053,7 +1054,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bincode",
@ -1078,7 +1079,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"async-trait",
@ -1328,7 +1329,7 @@ dependencies = [
"cssparser-macros",
"dtoa-short",
"itoa 1.0.10",
"phf 0.8.0",
"phf 0.11.2",
"smallvec",
]
@ -1439,7 +1440,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
[[package]]
name = "database-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -2968,7 +2969,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"futures-util",
@ -2985,7 +2986,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -3422,7 +3423,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -4931,7 +4932,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2"
dependencies = [
"bytes",
"heck 0.4.1",
"itertools 0.10.5",
"itertools 0.11.0",
"log",
"multimap",
"once_cell",
@ -4952,7 +4953,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
dependencies = [
"anyhow",
"itertools 0.10.5",
"itertools 0.11.0",
"proc-macro2",
"quote",
"syn 2.0.55",
@ -5930,7 +5931,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",

View File

@ -52,7 +52,7 @@ collab-user = { version = "0.2" }
# Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "6262816043efeede8823d7a7ea252083adf407e9" }
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "22909d4382911a1ffbb7602aee5e18f06132e683" }
[dependencies]
serde_json.workspace = true

View File

@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "app-error"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
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=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -664,7 +664,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"again",
"anyhow",
@ -686,6 +686,7 @@ dependencies = [
"infra",
"mime",
"parking_lot 0.12.1",
"percent-encoding",
"prost",
"reqwest",
"scraper 0.17.1",
@ -710,7 +711,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"collab-entity",
"collab-rt-entity",
@ -722,7 +723,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"futures-channel",
"futures-util",
@ -931,7 +932,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bincode",
@ -956,7 +957,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"async-trait",
@ -1276,7 +1277,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "database-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -2567,7 +2568,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"futures-util",
@ -2584,7 +2585,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",
@ -2949,7 +2950,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"bytes",
@ -5035,7 +5036,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=6262816043efeede8823d7a7ea252083adf407e9#6262816043efeede8823d7a7ea252083adf407e9"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=22909d4382911a1ffbb7602aee5e18f06132e683#22909d4382911a1ffbb7602aee5e18f06132e683"
dependencies = [
"anyhow",
"app-error",

View File

@ -97,8 +97,8 @@ validator = { version = "0.16.1", features = ["derive"] }
# 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 = "6262816043efeede8823d7a7ea252083adf407e9" }
client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "6262816043efeede8823d7a7ea252083adf407e9" }
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "22909d4382911a1ffbb7602aee5e18f06132e683" }
client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "22909d4382911a1ffbb7602aee5e18f06132e683" }
[profile.dev]
opt-level = 1

View File

@ -1,5 +1,6 @@
use crate::entities::SelectOptionCellDataPB;
use crate::services::field::SelectOptionIds;
use collab::core::any_map::{AnyMap, AnyMapExtension};
use collab_database::database::gen_option_id;
use serde::{Deserialize, Serialize};
@ -29,6 +30,26 @@ impl SelectOption {
}
}
impl From<AnyMap> for SelectOption {
fn from(map: AnyMap) -> Self {
SelectOption {
id: map.get_str("id").unwrap_or_default(),
name: map.get_str("name").unwrap_or_default(),
color: SelectOptionColor::from(map.get_i64_value("color").unwrap_or(0)),
}
}
}
impl From<SelectOption> for AnyMap {
fn from(option: SelectOption) -> Self {
let mut map = AnyMap::new();
map.insert_str_value("id", option.id);
map.insert_str_value("name", option.name);
map.insert_i64_value("color", option.color.into());
map
}
}
#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)]
#[repr(u8)]
#[derive(Default)]
@ -45,6 +66,29 @@ pub enum SelectOptionColor {
Blue = 8,
}
impl From<i64> for SelectOptionColor {
fn from(value: i64) -> Self {
match value {
0 => SelectOptionColor::Purple,
1 => SelectOptionColor::Pink,
2 => SelectOptionColor::LightPink,
3 => SelectOptionColor::Orange,
4 => SelectOptionColor::Yellow,
5 => SelectOptionColor::Lime,
6 => SelectOptionColor::Green,
7 => SelectOptionColor::Aqua,
8 => SelectOptionColor::Blue,
_ => SelectOptionColor::default(),
}
}
}
impl From<SelectOptionColor> for i64 {
fn from(color: SelectOptionColor) -> Self {
color as i64
}
}
#[derive(Debug)]
pub struct SelectOptionCellData {
pub select_options: Vec<SelectOption>,

View File

@ -20,6 +20,28 @@ use std::cmp::Ordering;
pub struct SingleSelectTypeOption {
pub options: Vec<SelectOption>,
pub disable_color: bool,
#[serde(default)]
/// Version `0` means the [SingleSelectTypeOption] is serialized as a JSON string and stored in `TypeOptionData` as a string value.
/// Version `1` means the [SingleSelectTypeOption] uses different properties to store its values
pub version: i64,
#[serde(default)]
pub ai_fill_enabled: bool,
#[serde(default)]
pub generated_options: Vec<SelectOption>,
}
impl SingleSelectTypeOption {
pub fn options(&self) -> Vec<&SelectOption> {
if self.ai_fill_enabled {
self
.generated_options
.iter()
.chain(self.options.iter())
.collect()
} else {
self.options.iter().collect()
}
}
}
impl TypeOption for SingleSelectTypeOption {
@ -31,18 +53,39 @@ impl TypeOption for SingleSelectTypeOption {
impl From<TypeOptionData> for SingleSelectTypeOption {
fn from(data: TypeOptionData) -> Self {
data
let version = data.get_i64_value("version").unwrap_or(0);
match version {
0 => data
.get_str_value("content")
.map(|s| serde_json::from_str::<SingleSelectTypeOption>(&s).unwrap_or_default())
.unwrap_or_default()
.unwrap_or_default(),
1 => {
//
let options = data.get_array::<_, SelectOption>("options");
let generated_options = data.get_array::<_, SelectOption>("generated_options");
let disable_color = data.get_bool_value("disable_color").unwrap_or(false);
let ai_fill_enabled = data.get_bool_value("ai_fill_enabled").unwrap_or(false);
Self {
options,
disable_color,
version,
ai_fill_enabled,
generated_options,
}
},
_ => SingleSelectTypeOption::default(),
}
}
}
impl From<SingleSelectTypeOption> for TypeOptionData {
fn from(data: SingleSelectTypeOption) -> Self {
let content = serde_json::to_string(&data).unwrap_or_default();
TypeOptionDataBuilder::new()
.insert_str_value("content", content)
.insert_i64_value("version", data.version)
.insert_bool_value("disable_color", data.disable_color)
.insert_bool_value("ai_fill_enabled", data.ai_fill_enabled)
.insert_maps("options", data.options)
.insert_maps("generated_options", data.generated_options)
.build()
}
}