[package]
categories = ["api-bindings", "web-programming"]
description = "Types for the endpoints in the Matrix client-server API."
homepage = "https://ruma.dev/"
keywords = ["matrix", "chat", "messaging", "ruma"]
license = "MIT"
name = "ruma-client-api"
readme = "README.md"
repository = "https://github.com/ruma/ruma"
version = "0.23.0"
edition = "2024"
rust-version = { workspace = true }

[package.metadata.docs.rs]
all-features = true

[features]
# OutgoingRequest and IncomingResponse implementations
client = []
# IncomingRequest and OutgoingResponse implementations
server = []

# Allow some mandatory fields in requests / responses to be missing, defaulting
# them to an empty string in deserialization.
compat-empty-string-null = []

# Unset avatars by sending an empty string, same as what Element Web does, c.f.
# https://github.com/matrix-org/matrix-spec/issues/378#issuecomment-1055831264
compat-unset-avatar = []

# Always serialize the threepids response field in `get_3pids::v3::Response`,
# even if its value is an empty list.
compat-get-3pids = []

# Accept `message` as an alias for `error` in `upload_signatures::v3::Failure`,
# since that's what Synapse sends.
compat-upload-signatures = []

unstable-msc2666 = ["ruma-common/unstable-msc2666"]
unstable-msc2448 = []
unstable-msc2654 = []
unstable-msc3488 = []
unstable-msc3814 = []
unstable-msc3983 = []
unstable-msc4108 = ["ruma-common/unstable-msc4108"]
unstable-msc4121 = []
unstable-msc4140 = ["ruma-common/unstable-msc4140"]
unstable-msc4143 = []
unstable-msc4186 = ["ruma-common/unstable-msc4186"]
unstable-msc4195 = ["unstable-msc4143"]
unstable-msc4293 = ["ruma-events/unstable-msc4293"]
# Thread subscription support.
unstable-msc4306 = []
unstable-msc4308 = []
unstable-msc4388 = []
unstable-msc4439 = []

[dependencies]
as_variant = { workspace = true }
assign = { workspace = true }
bytes = { workspace = true }
http = { workspace = true }
js_int = { workspace = true, features = ["serde"] }
js_option = { workspace = true }
maplit = { workspace = true }
ruma-common = { workspace = true, features = ["api"] }
ruma-events = { workspace = true }
serde = { workspace = true }
serde_html_form = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true, features = ["serde"] }
web-time = { workspace = true }

[dev-dependencies]
assert_matches2 = { workspace = true }

[lints]
workspace = true
