common: Merge ruma-api into ruma-common
This commit is contained in:
parent
c37a514a89
commit
f32dcb9254
@ -125,7 +125,7 @@ For example,
|
||||
```rust
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
use super::MyType;
|
||||
```
|
||||
|
@ -1,287 +0,0 @@
|
||||
# [unreleased]
|
||||
|
||||
# 0.20.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Bump dependencies
|
||||
|
||||
# 0.19.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Remove the `RequestDeserializationError` and `ResponseDeserializationError`
|
||||
types in favor of using `DeserializationError` directly
|
||||
* Replace singular `path` metadata field with `stable_path`, `r0_path` and
|
||||
`unstable_path`
|
||||
* Require callers of `OutgoingRequest::try_into_http_request` to pass a list of
|
||||
server-supported matrix versions for selecting whether to use r0, unstable or
|
||||
stable paths
|
||||
* Require callers of `IncomingRequest::try_from_http_request` to pass path
|
||||
arguments, to avoid unnecessary extra path parsing
|
||||
|
||||
# 0.18.5
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Stop adding a `Content-Type` header to requests without any fields
|
||||
* This fixes usage of the `.well-known` endpoints in a browser WASM
|
||||
environment if the server isn't configured to allow that header for
|
||||
cross-origin requests
|
||||
|
||||
# 0.18.4
|
||||
|
||||
Yanked.
|
||||
|
||||
# 0.18.3
|
||||
|
||||
Improvements:
|
||||
|
||||
* Refactor handling of newtype bodies in `ruma_api!`
|
||||
* Likely what fixed a bug affecting `ruma-federation-api`
|
||||
|
||||
# 0.18.2
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Fix (de)serialization of requests with a `#[ruma_api(body)]` field
|
||||
|
||||
# 0.18.1
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Generate "struct structs" for `Request` and `Response`, even if there are no
|
||||
fields
|
||||
* We used to generate unit structs when there's no fields
|
||||
* Upgrade dependencies
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Allow all borrowing query and / or body parameters in `ruma_api!` to be
|
||||
`cfg`-conditional
|
||||
* This used lead to broken code being generated and was fixed by moving all
|
||||
`impl` block generation code into a derive macro (derive macros run after
|
||||
`cfg` expansion)
|
||||
|
||||
# 0.18.0
|
||||
|
||||
Yanked, this was the same as 0.17.2 but accidentally released with the minor
|
||||
rather than the patch version segment incremented. It then turned out that it
|
||||
did actually contain breaking changes, so 0.17.2 was yanked too.
|
||||
|
||||
# 0.17.2
|
||||
|
||||
Yanked since it unintentionally contained breaking changes.
|
||||
|
||||
# 0.17.1
|
||||
|
||||
Improvements:
|
||||
|
||||
* Allow `ruma_api!` to be used by crates that depend on matrix-sdk, but not (directly) on ruma or
|
||||
ruma-api
|
||||
|
||||
# 0.17.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Update the syntax of the `ruma_api!` macro. Colons are now required after the keywords `metadata`,
|
||||
`request` and `response`.
|
||||
* The `EndpointError` trait now requires `std::error::Error`. This allows integrating
|
||||
`EndpointError`s in the common rust error ecosystem like `thiserror` and `anyhow`.
|
||||
* The `Endpoint` trait has been replaced by four of new traits that each capture a subset of its
|
||||
previous functionality: `OutgoingRequest`, `OutgoingResponse`, `IncomingRequest`,
|
||||
`IncomingResponse`. See the API documentation for more details.
|
||||
* Endpoint authentication is now more granularly defined by an enum `AuthScheme`
|
||||
instead of a boolean. The `ruma_api!` macro has been updated to require
|
||||
`authentication` instead of `requires_authentication`.
|
||||
* Remove `error::Void`, the default error type for `ruma_api!` is now `error::MatrixError`
|
||||
(see below)
|
||||
|
||||
Improvements:
|
||||
|
||||
* The `EndpointError`s that come with ruma crates now implement `std::error::Error`
|
||||
* Add a new `MatrixError` type to the `error` module that consists of a HTTP status code and JSON
|
||||
`body` and is the new default error type for `ruma_api!`
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Prevent panic when building requests with an invalid URI
|
||||
|
||||
# 0.16.1
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Update ruma-serde to 0.2.0, fixing some issues with query string deserialization (some issues
|
||||
still remain but will be fixed in a semver-compatible version)
|
||||
|
||||
# 0.16.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Update ruma-identifiers to 0.16.1
|
||||
* Remove the `Outgoing` trait and update the `Endpoint` trait and code generation accordingly
|
||||
|
||||
Improvements:
|
||||
|
||||
* Remove dependency on the `url` crate
|
||||
|
||||
# 0.15.1
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Write `{}` to the body of responses without body fields (fix from ruma-api-macros)
|
||||
|
||||
# 0.15.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Emit an error on non-UTF8 characters in path segments
|
||||
* Before, they would be replaced by the unknown character codepoint
|
||||
* `FromHttpResponseError` now has a generic parameter for the expected type of
|
||||
error the homeserver could return
|
||||
|
||||
Improvements:
|
||||
|
||||
* Enable deserialization of unsuccessful responses
|
||||
|
||||
# 0.14.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Update ruma-api-macros to 0.11.0
|
||||
* This includes a fix that uses `TryFrom<&str>` instead of serde_json for path segment
|
||||
deserialization
|
||||
|
||||
# 0.13.1
|
||||
|
||||
Improvements:
|
||||
|
||||
* Update ruma-api-macros to 0.10.1
|
||||
* `Incoming` types will now implement `Debug`
|
||||
|
||||
# 0.13.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Instead of one `Error` type, there is now many
|
||||
* The new types live in their own `error` module
|
||||
* They provide access to details that were previously hidden
|
||||
* Our Minimum Supported Rust Version is now 1.40.0
|
||||
|
||||
# 0.12.1
|
||||
|
||||
Improvements:
|
||||
|
||||
* Update ruma-api-macros to 0.9.1 to support `#[ruma_api(raw_body)]`
|
||||
|
||||
# 0.12.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Our Minimum Supported Rust Version is now 1.39.0
|
||||
* Support for the server-side use case has been restored. For details, see the documentation for
|
||||
`ruma_api!`, the new `Outgoing` trait and its derive macro
|
||||
|
||||
# 0.11.2
|
||||
|
||||
Improvements:
|
||||
|
||||
* Update ruma-api-macros to 0.8.2
|
||||
|
||||
# 0.11.1
|
||||
|
||||
Improvements:
|
||||
|
||||
* Update ruma-api-macros to 0.8.1
|
||||
|
||||
# 0.11.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* To be able to use ruma-event's `EventResult` in ruma-client without large-ish refactorings to ruma-api, we removed support for the server-side use case in ruma-api 0.11.0. It will be added back in a future release.
|
||||
|
||||
Improvements:
|
||||
|
||||
* Our CI now tests ruma-api on Rust 1.34.2, beta and nightly in addition to stable
|
||||
* Updated syn and quote to 1.0
|
||||
|
||||
# 0.10.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* The `Endpoint` trait is now implemented directly on the relevant request type rather than having both the request and response be associated types.
|
||||
|
||||
Improvements:
|
||||
|
||||
* ruma-api now re-exports the `ruma_api` macro from ruma-api-macros. Downstream crates no longer need to depend on ruma-api-macros directly.
|
||||
* The ruma-api and ruma-api-macros repositories have been merged into one Cargo workspace for easier dependency management and development.
|
||||
|
||||
# 0.9.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* The `Request` and `Response` associated types on the `Endpoint` trait are now bounded by `std::convert::TryFrom` instead of `futures::future::FutureFrom`. This was done in preparation for futures 0.3 which does not have this trait.
|
||||
* The conversions required to and from `http::Request` and `http::Response` for the `Request` and `Response` associated types on the `Endpoint` trait now use `Vec<u8>` as the body type. This removes the dependency on hyper. It's possible this will change again in a future release. See https://github.com/rustasync/team/issues/84 for details.
|
||||
|
||||
Improvements:
|
||||
|
||||
* Internal code quality improvements via clippy and rustfmt.
|
||||
|
||||
# 0.8.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* The `Error` type is now an opaque struct that hides implementation details.
|
||||
* Updates to ruma-identifiers 0.13.
|
||||
|
||||
Improvements:
|
||||
|
||||
* ruma-api now uses clippy to improve code quality.
|
||||
|
||||
# 0.7.0
|
||||
|
||||
Improvements:
|
||||
|
||||
* ruma-api now runs on stable Rust, requiring version 1.34 or higher.
|
||||
* Updated all dependencies for upstream improvements.
|
||||
* Updated all code to use Rust edition 2018.
|
||||
|
||||
# 0.6.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Hyper has been updated to version 0.12.
|
||||
* A new variant to the `Error` enum for hyper errors has been added.
|
||||
* Conversions between this crate's request and response types and the http crate's request and response types are now bidirectional.
|
||||
|
||||
# 0.5.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* Types from hyper have been replaced with types from the http crate.
|
||||
* The `Error` enum can no longer be matched exhaustively, to allow for future expansion without breaking the crate's API.
|
||||
|
||||
# 0.4.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
The crate has been redesign to focus on conversions between an endpoint's request and response types and Hyper request and response types. Implementations are expected to be generated via [ruma-api-macros].
|
||||
|
||||
[ruma-api-macros]: https://github.com/ruma/ruma/tree/main/ruma-api-macros
|
||||
|
||||
# 0.3.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* `Endpoint::router_path` now returns a `&'static str`
|
||||
* Added new required methods to `Endpoint`: `name`, `description`, `requires_authentication`, and `rate_limited`.
|
||||
|
||||
# 0.2.0
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* `Endpoint::Query_params` must now be `Deserialize + Serialize`.
|
||||
|
||||
# 0.1.0
|
||||
|
||||
Initial release.
|
@ -1,39 +0,0 @@
|
||||
[package]
|
||||
categories = ["api-bindings", "web-programming"]
|
||||
description = "An abstraction for Matrix API endpoints."
|
||||
homepage = "https://www.ruma.io/"
|
||||
keywords = ["matrix", "chat", "messaging", "ruma"]
|
||||
license = "MIT"
|
||||
name = "ruma-api"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
version = "0.20.0"
|
||||
edition = "2018"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
# These feature gates exist only for the tests. Disabling them results in a
|
||||
# compile error.
|
||||
[features]
|
||||
default = ["client", "server"]
|
||||
client = []
|
||||
server = []
|
||||
|
||||
[dependencies]
|
||||
bytes = "1.0.1"
|
||||
http = "0.2.2"
|
||||
percent-encoding = "2.1.0"
|
||||
ruma-identifiers = { version = "0.22.0", path = "../ruma-identifiers" }
|
||||
ruma-macros = { version = "=0.1.0", path = "../ruma-macros" }
|
||||
ruma-serde = { version = "0.6.0", path = "../ruma-serde" }
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
serde_json = "1.0.61"
|
||||
thiserror = "1.0.26"
|
||||
tracing = "0.1.25"
|
||||
|
||||
[dev-dependencies]
|
||||
matches = "0.1.8"
|
||||
ruma-events = { version = "0.26.0", path = "../ruma-events" }
|
||||
trybuild = "1.0.38"
|
@ -1,8 +0,0 @@
|
||||
# ruma-api
|
||||
|
||||
[](https://crates.io/crates/ruma-api)
|
||||
[](https://docs.rs/ruma-api/)
|
||||

|
||||
|
||||
**ruma-api** contains core types used to define the requests and responses for each endpoint in the various [Matrix](https://matrix.org/) API specifications.
|
||||
These types can be shared by client and server code for all Matrix APIs.
|
@ -1,13 +0,0 @@
|
||||
#[test]
|
||||
fn ui() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/ui/01-api-sanity-check.rs");
|
||||
t.compile_fail("tests/ui/02-invalid-path.rs");
|
||||
t.pass("tests/ui/03-move-value.rs");
|
||||
t.compile_fail("tests/ui/04-attributes.rs");
|
||||
t.pass("tests/ui/05-request-only.rs");
|
||||
t.pass("tests/ui/06-response-only.rs");
|
||||
t.compile_fail("tests/ui/07-error-type-attribute.rs");
|
||||
t.compile_fail("tests/ui/08-deprecated-without-added.rs");
|
||||
t.compile_fail("tests/ui/09-removed-without-deprecated.rs");
|
||||
}
|
@ -20,9 +20,8 @@ client = []
|
||||
server = []
|
||||
|
||||
[dependencies]
|
||||
ruma-api = { version = "0.20.0", path = "../ruma-api" }
|
||||
ruma-client-api = { version = "0.13.0", path = "../ruma-client-api", features = ["client"], optional = true }
|
||||
ruma-common = { version = "0.8.0", path = "../ruma-common" }
|
||||
ruma-common = { version = "0.8.0", path = "../ruma-common", features = ["api"] }
|
||||
ruma-events = { version = "0.26.0", path = "../ruma-events" }
|
||||
ruma-identifiers = { version = "0.22.0", path = "../ruma-identifiers" }
|
||||
ruma-serde = { version = "0.6.0", path = "../ruma-serde" }
|
||||
|
@ -7,7 +7,7 @@ pub mod v1 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/application-service-api/#put_matrixappv1transactionstxnid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::AnyRoomEvent;
|
||||
use ruma_identifiers::TransactionId;
|
||||
use ruma_serde::Raw;
|
||||
@ -161,7 +161,7 @@ pub mod v1 {
|
||||
#[cfg(feature = "server")]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ruma_api::{OutgoingRequest, SendAccessToken};
|
||||
use ruma_common::api::{OutgoingRequest, SendAccessToken};
|
||||
use serde_json::json;
|
||||
|
||||
use super::Request;
|
||||
@ -186,7 +186,7 @@ pub mod v1 {
|
||||
.try_into_http_request::<Vec<u8>>(
|
||||
"https://homeserver.tld",
|
||||
SendAccessToken::IfRequired("auth_tok"),
|
||||
&[ruma_api::MatrixVersion::V1_1],
|
||||
&[ruma_common::api::MatrixVersion::V1_1],
|
||||
)
|
||||
.unwrap();
|
||||
let json_body: serde_json::Value = serde_json::from_slice(req.body()).unwrap();
|
||||
|
@ -7,7 +7,7 @@ pub mod v1 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/application-service-api/#get_matrixappv1roomsroomalias
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomAliasId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -7,7 +7,7 @@ pub mod v1 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/application-service-api/#get_matrixappv1usersuserid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -10,8 +10,7 @@ pub mod v1 {
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::Location;
|
||||
use ruma_common::{api::ruma_api, thirdparty::Location};
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -7,8 +7,7 @@ pub mod v1 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/application-service-api/#get_matrixappv1thirdpartylocation
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::Location;
|
||||
use ruma_common::{api::ruma_api, thirdparty::Location};
|
||||
use ruma_identifiers::RoomAliasId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -8,8 +8,7 @@ pub mod v1 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/application-service-api/#get_matrixappv1thirdpartyprotocolprotocol
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::Protocol;
|
||||
use ruma_common::{api::ruma_api, thirdparty::Protocol};
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -10,8 +10,7 @@ pub mod v1 {
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::User;
|
||||
use ruma_common::{api::ruma_api, thirdparty::User};
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -7,8 +7,7 @@ pub mod v1 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/application-service-api/#get_matrixappv1thirdpartyuser
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::User;
|
||||
use ruma_common::{api::ruma_api, thirdparty::User};
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -28,8 +28,7 @@ http = "0.2.2"
|
||||
js_int = { version = "0.2.0", features = ["serde"] }
|
||||
maplit = "1.0.2"
|
||||
percent-encoding = "2.1.0"
|
||||
ruma-api = { version = "0.20.0", path = "../ruma-api" }
|
||||
ruma-common = { version = "0.8.0", path = "../ruma-common" }
|
||||
ruma-common = { version = "0.8.0", path = "../ruma-common", features = ["api"] }
|
||||
ruma-events = { version = "0.26.0", path = "../ruma-events" }
|
||||
ruma-identifiers = { version = "0.22.0", path = "../ruma-identifiers" }
|
||||
ruma-serde = { version = "0.6.0", path = "../ruma-serde" }
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3account3pidadd
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
use crate::uiaa::{AuthData, IncomingAuthData, UiaaResponse};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3account3pidbind
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
use crate::account::{IdentityServerInfo, IncomingIdentityServerInfo};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3accountpassword
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
use crate::uiaa::{AuthData, IncomingAuthData, UiaaResponse};
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v1 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv1registermloginregistration_tokenvalidity
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3accountdeactivate
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
use crate::{
|
||||
account::ThirdPartyIdRemovalStatus,
|
||||
|
@ -5,8 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3account3piddelete
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::Medium;
|
||||
use ruma_common::{api::ruma_api, thirdparty::Medium};
|
||||
|
||||
use crate::account::ThirdPartyIdRemovalStatus;
|
||||
|
||||
|
@ -5,8 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3account3pid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::ThirdPartyIdentifier;
|
||||
use ruma_common::{api::ruma_api, thirdparty::ThirdPartyIdentifier};
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3registeravailable
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -7,7 +7,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3register
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{DeviceId, UserId};
|
||||
|
||||
use super::{LoginType, RegistrationKind};
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3account3pidemailrequesttoken
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
use crate::account::{IdentityServerInfo, IncomingIdentityServerInfo};
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3account3pidmsisdnrequesttoken
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
use crate::account::{IdentityServerInfo, IncomingIdentityServerInfo};
|
||||
|
@ -7,8 +7,7 @@ pub mod v3 {
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::authentication::TokenType;
|
||||
use ruma_common::{api::ruma_api, authentication::TokenType};
|
||||
use ruma_identifiers::{ServerName, UserId};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3accountpasswordemailrequesttoken
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
use crate::account::{IdentityServerInfo, IncomingIdentityServerInfo};
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3accountpasswordmsisdnrequesttoken
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3registeremailrequesttoken
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
use crate::account::{IdentityServerInfo, IncomingIdentityServerInfo};
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3registermsisdnrequesttoken
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{ClientSecret, SessionId};
|
||||
|
||||
use crate::account::{IdentityServerInfo, IncomingIdentityServerInfo};
|
||||
|
@ -5,8 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3account3pidunbind
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::thirdparty::Medium;
|
||||
use ruma_common::{api::ruma_api, thirdparty::Medium};
|
||||
|
||||
use crate::account::ThirdPartyIdRemovalStatus;
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3accountwhoami
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{DeviceId, UserId};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3directoryroomroomalias
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomAliasId, RoomId};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#delete_matrixclientv3directoryroomroomalias
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomAliasId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3directoryroomroomalias
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomAliasId, RoomId, ServerName};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/application-service-api/#put_matrixclientv3directorylistappservicenetworkidroomid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
use crate::room::Visibility;
|
||||
|
@ -8,7 +8,7 @@ pub mod v3 {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
use crate::backup::RoomKeyBackup;
|
||||
|
@ -8,7 +8,7 @@ pub mod v3 {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
use ruma_serde::Raw;
|
||||
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3room_keyskeysroomidsessionid
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
use ruma_serde::Raw;
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3room_keysversion
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_serde::Raw;
|
||||
|
||||
use crate::backup::BackupAlgorithm;
|
||||
|
@ -8,7 +8,7 @@ pub mod v3 {
|
||||
//! This deletes keys from a backup version, but not the version itself.
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#delete_matrixclientv3room_keyskeysroomid
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#delete_matrixclientv3room_keyskeysroomidsessionid
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -7,7 +7,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! This deletes a backup version and its room keys.
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -8,7 +8,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3room_keysversionversion
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_serde::Raw;
|
||||
use serde::{ser, Deserialize, Deserializer, Serialize};
|
||||
use serde_json::value::{to_raw_value as to_raw_json_value, RawValue as RawJsonValue};
|
||||
|
@ -9,7 +9,7 @@ pub mod v3 {
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
use crate::backup::RoomKeyBackup;
|
||||
|
@ -7,7 +7,7 @@ pub mod v3 {
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
use ruma_serde::Raw;
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3room_keyskeysroomidsessionid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
use ruma_serde::Raw;
|
||||
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3room_keysversion
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_serde::Raw;
|
||||
use serde::{ser, Deserialize, Deserializer, Serialize};
|
||||
use serde_json::value::to_raw_value as to_raw_json_value;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3room_keysversionversion
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_serde::Raw;
|
||||
|
||||
use crate::backup::BackupAlgorithm;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3capabilities
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
use crate::capabilities::Capabilities;
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3useruseridaccount_datatype
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::AnyGlobalAccountDataEventContent;
|
||||
use ruma_identifiers::UserId;
|
||||
use ruma_serde::Raw;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3useruseridroomsroomidaccount_datatype
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::AnyRoomAccountDataEventContent;
|
||||
use ruma_identifiers::{RoomId, UserId};
|
||||
use ruma_serde::Raw;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3useruseridaccount_datatype
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::{AnyGlobalAccountDataEventContent, GlobalAccountDataEventContent};
|
||||
use ruma_identifiers::UserId;
|
||||
use ruma_serde::Raw;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3useruseridroomsroomidaccount_datatype
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::{AnyRoomAccountDataEventContent, RoomAccountDataEventContent};
|
||||
use ruma_identifiers::{RoomId, UserId};
|
||||
use ruma_serde::Raw;
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3roomsroomidcontexteventid
|
||||
|
||||
use js_int::{uint, UInt};
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::{AnyRoomEvent, AnyStateEvent};
|
||||
use ruma_identifiers::{EventId, RoomId};
|
||||
use ruma_serde::Raw;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#delete_matrixclientv3devicesdeviceid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::DeviceId;
|
||||
|
||||
use crate::uiaa::{AuthData, IncomingAuthData, UiaaResponse};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3delete_devices
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::DeviceId;
|
||||
|
||||
use crate::uiaa::{AuthData, IncomingAuthData, UiaaResponse};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3devicesdeviceid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::DeviceId;
|
||||
|
||||
use crate::device::Device;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3devices
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
use crate::device::Device;
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3devicesdeviceid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::DeviceId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -6,8 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3publicrooms
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::directory::PublicRoomsChunk;
|
||||
use ruma_common::{api::ruma_api, directory::PublicRoomsChunk};
|
||||
use ruma_identifiers::ServerName;
|
||||
|
||||
ruma_api! {
|
||||
@ -83,7 +82,7 @@ pub mod v3 {
|
||||
#[cfg(feature = "client")]
|
||||
#[test]
|
||||
fn construct_request_from_refs() {
|
||||
use ruma_api::{MatrixVersion, OutgoingRequest as _, SendAccessToken};
|
||||
use ruma_common::api::{MatrixVersion, OutgoingRequest as _, SendAccessToken};
|
||||
use ruma_identifiers::server_name;
|
||||
|
||||
let req = super::Request {
|
||||
@ -110,7 +109,7 @@ pub mod v3 {
|
||||
#[cfg(feature = "server")]
|
||||
#[test]
|
||||
fn construct_response_from_refs() {
|
||||
use ruma_api::OutgoingResponse as _;
|
||||
use ruma_common::api::OutgoingResponse as _;
|
||||
|
||||
let res = super::Response {
|
||||
chunk: vec![],
|
||||
|
@ -6,9 +6,9 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3publicrooms
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::directory::{
|
||||
Filter, IncomingFilter, IncomingRoomNetwork, PublicRoomsChunk, RoomNetwork,
|
||||
use ruma_common::{
|
||||
api::ruma_api,
|
||||
directory::{Filter, IncomingFilter, IncomingRoomNetwork, PublicRoomsChunk, RoomNetwork},
|
||||
};
|
||||
use ruma_identifiers::ServerName;
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3directorylistroomroomid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
use crate::room::Visibility;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3directorylistroomroomid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
use crate::room::Visibility;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#getwell-knownmatrixclient
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::{ruma_api, MatrixVersion};
|
||||
use ruma_common::api::{ruma_api, MatrixVersion};
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
@ -69,7 +69,7 @@ impl Response {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ruma_api::MatrixVersion;
|
||||
use ruma_common::api::MatrixVersion;
|
||||
|
||||
use super::Response;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
use std::{collections::BTreeMap, fmt, time::Duration};
|
||||
|
||||
use bytes::BufMut;
|
||||
use ruma_api::{
|
||||
use ruma_common::api::{
|
||||
error::{DeserializationError, IntoHttpError},
|
||||
EndpointError, OutgoingResponse,
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3useruseridfilter
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
use crate::filter::{FilterDefinition, IncomingFilterDefinition};
|
||||
@ -63,7 +63,7 @@ pub mod v3 {
|
||||
#[cfg(feature = "server")]
|
||||
#[test]
|
||||
fn deserialize_request() {
|
||||
use ruma_api::IncomingRequest as _;
|
||||
use ruma_common::api::IncomingRequest as _;
|
||||
|
||||
use super::IncomingRequest;
|
||||
|
||||
@ -84,7 +84,7 @@ pub mod v3 {
|
||||
#[cfg(feature = "client")]
|
||||
#[test]
|
||||
fn serialize_request() {
|
||||
use ruma_api::{MatrixVersion, OutgoingRequest, SendAccessToken};
|
||||
use ruma_common::api::{MatrixVersion, OutgoingRequest, SendAccessToken};
|
||||
use ruma_identifiers::user_id;
|
||||
|
||||
use crate::filter::FilterDefinition;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3useruseridfilterfilterid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
use crate::filter::IncomingFilterDefinition;
|
||||
@ -62,7 +62,7 @@ pub mod v3 {
|
||||
#[cfg(feature = "client")]
|
||||
#[test]
|
||||
fn deserialize_response() {
|
||||
use ruma_api::IncomingResponse;
|
||||
use ruma_common::api::IncomingResponse;
|
||||
|
||||
assert_matches!(
|
||||
super::Response::try_from_http_response(
|
||||
@ -75,7 +75,7 @@ pub mod v3 {
|
||||
#[cfg(feature = "server")]
|
||||
#[test]
|
||||
fn serialize_response() {
|
||||
use ruma_api::OutgoingResponse;
|
||||
use ruma_common::api::OutgoingResponse;
|
||||
|
||||
use crate::filter::IncomingFilterDefinition;
|
||||
|
||||
|
@ -7,8 +7,7 @@ pub mod v3 {
|
||||
|
||||
use std::{collections::BTreeMap, time::Duration};
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::encryption::OneTimeKey;
|
||||
use ruma_common::{api::ruma_api, encryption::OneTimeKey};
|
||||
use ruma_identifiers::{DeviceId, DeviceKeyAlgorithm, DeviceKeyId, UserId};
|
||||
use ruma_serde::Raw;
|
||||
use serde_json::Value as JsonValue;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3keyschanges
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -7,8 +7,10 @@ pub mod v3 {
|
||||
|
||||
use std::{collections::BTreeMap, time::Duration};
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::encryption::{CrossSigningKey, DeviceKeys};
|
||||
use ruma_common::{
|
||||
api::ruma_api,
|
||||
encryption::{CrossSigningKey, DeviceKeys},
|
||||
};
|
||||
use ruma_identifiers::{DeviceId, UserId};
|
||||
use ruma_serde::Raw;
|
||||
use serde_json::Value as JsonValue;
|
||||
|
@ -8,8 +8,10 @@ pub mod v3 {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::encryption::{DeviceKeys, OneTimeKey};
|
||||
use ruma_common::{
|
||||
api::ruma_api,
|
||||
encryption::{DeviceKeys, OneTimeKey},
|
||||
};
|
||||
use ruma_identifiers::{DeviceKeyAlgorithm, DeviceKeyId};
|
||||
use ruma_serde::Raw;
|
||||
|
||||
|
@ -7,8 +7,10 @@ pub mod v3 {
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::encryption::{CrossSigningKey, DeviceKeys};
|
||||
use ruma_common::{
|
||||
api::ruma_api,
|
||||
encryption::{CrossSigningKey, DeviceKeys},
|
||||
};
|
||||
use ruma_identifiers::{DeviceId, UserId};
|
||||
use ruma_serde::{Raw, StringEnum};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -5,8 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keysdevice_signingupload
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::encryption::CrossSigningKey;
|
||||
use ruma_common::{api::ruma_api, encryption::CrossSigningKey};
|
||||
use ruma_serde::Raw;
|
||||
|
||||
use crate::uiaa::{AuthData, IncomingAuthData, UiaaResponse};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3knockroomidoralias
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomId, RoomOrAliasId, ServerName};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixmediav3upload
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::MxcUri;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3downloadservernamemediaid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{Error, MxcUri, ServerName};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3downloadservernamemediaidfilename
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{Error, MxcUri, ServerName};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3thumbnailservernamemediaid
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{Error, MxcUri, ServerName};
|
||||
use ruma_serde::StringEnum;
|
||||
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3config
|
||||
|
||||
use js_int::UInt;
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
|
@ -5,8 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3preview_url
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::MilliSecondsSinceUnixEpoch;
|
||||
use ruma_common::{api::ruma_api, MilliSecondsSinceUnixEpoch};
|
||||
use serde::Serialize;
|
||||
use serde_json::value::{to_raw_value as to_raw_json_value, RawValue as RawJsonValue};
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidban
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomId, UserId};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidforget
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3roomsroomidmembers
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::room::member::RoomMemberEvent;
|
||||
use ruma_identifiers::RoomId;
|
||||
use ruma_serde::{Raw, StringEnum};
|
||||
@ -110,7 +110,7 @@ pub mod v3 {
|
||||
#[cfg(all(test, feature = "server"))]
|
||||
mod tests {
|
||||
use matches::assert_matches;
|
||||
use ruma_api::IncomingRequest as _;
|
||||
use ruma_common::api::IncomingRequest as _;
|
||||
|
||||
use super::{IncomingRequest, MembershipEventFilter};
|
||||
|
||||
|
@ -10,7 +10,7 @@ pub mod v3 {
|
||||
//! [spec-mxid]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidinvite
|
||||
//! [spec-3pid]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidinvite-1
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomId, UserId};
|
||||
use ruma_serde::Outgoing;
|
||||
use serde::Serialize;
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidjoin
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
use crate::membership::{IncomingThirdPartySigned, ThirdPartySigned};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3joinroomidoralias
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomId, RoomOrAliasId, ServerName};
|
||||
|
||||
use crate::membership::{IncomingThirdPartySigned, ThirdPartySigned};
|
||||
|
@ -7,7 +7,7 @@ pub mod v3 {
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{MxcUri, RoomId, UserId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3joined_rooms
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidkick
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomId, UserId};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidleave
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::RoomId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidunban
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{RoomId, UserId};
|
||||
|
||||
ruma_api! {
|
||||
|
@ -6,7 +6,7 @@ pub mod v3 {
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3roomsroomidmessages
|
||||
|
||||
use js_int::{uint, UInt};
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::{AnyRoomEvent, AnyStateEvent};
|
||||
use ruma_identifiers::RoomId;
|
||||
use ruma_serde::Raw;
|
||||
@ -150,7 +150,7 @@ pub mod v3 {
|
||||
#[cfg(all(test, feature = "client"))]
|
||||
mod tests {
|
||||
use js_int::uint;
|
||||
use ruma_api::{MatrixVersion, OutgoingRequest, SendAccessToken};
|
||||
use ruma_common::api::{MatrixVersion, OutgoingRequest, SendAccessToken};
|
||||
use ruma_identifiers::room_id;
|
||||
|
||||
use super::{Direction, Request};
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3roomsroomidsendeventtypetxnid
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_events::{AnyMessageLikeEventContent, MessageLikeEventContent};
|
||||
use ruma_identifiers::{EventId, RoomId, TransactionId};
|
||||
use ruma_serde::Raw;
|
||||
|
@ -7,8 +7,7 @@ pub mod v3 {
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::presence::PresenceState;
|
||||
use ruma_common::{api::ruma_api, presence::PresenceState};
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,8 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3presenceuseridstatus
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::presence::PresenceState;
|
||||
use ruma_common::{api::ruma_api, presence::PresenceState};
|
||||
use ruma_identifiers::UserId;
|
||||
|
||||
ruma_api! {
|
||||
|
@ -5,7 +5,7 @@ pub mod v3 {
|
||||
//!
|
||||
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3profileuseridavatar_url
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_common::api::ruma_api;
|
||||
use ruma_identifiers::{MxcUri, UserId};
|
||||
|
||||
ruma_api! {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user