client-api: Move keys route changes out of unstable-pre-spec
This commit is contained in:
parent
39041286b9
commit
62f3d4a649
@ -11,7 +11,6 @@ pub mod device;
|
|||||||
pub mod directory;
|
pub mod directory;
|
||||||
pub mod filter;
|
pub mod filter;
|
||||||
pub mod keys;
|
pub mod keys;
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
pub mod knock;
|
pub mod knock;
|
||||||
pub mod media;
|
pub mod media;
|
||||||
pub mod membership;
|
pub mod membership;
|
||||||
|
@ -5,7 +5,5 @@ pub mod get_key_changes;
|
|||||||
pub mod get_keys;
|
pub mod get_keys;
|
||||||
pub mod upload_keys;
|
pub mod upload_keys;
|
||||||
|
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
pub mod upload_signatures;
|
pub mod upload_signatures;
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
pub mod upload_signing_keys;
|
pub mod upload_signing_keys;
|
||||||
|
@ -3,14 +3,11 @@
|
|||||||
use std::{collections::BTreeMap, time::Duration};
|
use std::{collections::BTreeMap, time::Duration};
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_common::encryption::DeviceKeys;
|
use ruma_common::encryption::{CrossSigningKey, DeviceKeys};
|
||||||
use ruma_identifiers::{DeviceId, UserId};
|
use ruma_identifiers::{DeviceId, UserId};
|
||||||
use ruma_serde::Raw;
|
use ruma_serde::Raw;
|
||||||
use serde_json::Value as JsonValue;
|
use serde_json::Value as JsonValue;
|
||||||
|
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
use ruma_common::encryption::CrossSigningKey;
|
|
||||||
|
|
||||||
ruma_api! {
|
ruma_api! {
|
||||||
metadata: {
|
metadata: {
|
||||||
description: "Returns the current devices and identity keys for the given users.",
|
description: "Returns the current devices and identity keys for the given users.",
|
||||||
@ -60,17 +57,14 @@ ruma_api! {
|
|||||||
pub device_keys: BTreeMap<Box<UserId>, BTreeMap<Box<DeviceId>, Raw<DeviceKeys>>>,
|
pub device_keys: BTreeMap<Box<UserId>, BTreeMap<Box<DeviceId>, Raw<DeviceKeys>>>,
|
||||||
|
|
||||||
/// Information on the master cross-signing keys of the queried users.
|
/// Information on the master cross-signing keys of the queried users.
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
||||||
pub master_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
|
pub master_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
|
||||||
|
|
||||||
/// Information on the self-signing keys of the queried users.
|
/// Information on the self-signing keys of the queried users.
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
||||||
pub self_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
|
pub self_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
|
||||||
|
|
||||||
/// Information on the user-signing keys of the queried users.
|
/// Information on the user-signing keys of the queried users.
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
||||||
pub user_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
|
pub user_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//! [POST /_matrix/client/r0/keys/upload](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-keys-upload)
|
//! [POST /_matrix/client/r0/keys/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keysupload)
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
@ -31,7 +31,6 @@ ruma_api! {
|
|||||||
pub one_time_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>,
|
pub one_time_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>,
|
||||||
|
|
||||||
/// Fallback public keys for "pre-key" messages.
|
/// Fallback public keys for "pre-key" messages.
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty", rename = "org.matrix.msc2732.fallback_keys")]
|
#[serde(default, skip_serializing_if = "BTreeMap::is_empty", rename = "org.matrix.msc2732.fallback_keys")]
|
||||||
pub fallback_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>,
|
pub fallback_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>,
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
//! POST /_matrix/client/r0/keys/signatures/upload
|
//! [POST /_matrix/client/r0/keys/signatures/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keyssignaturesupload)
|
||||||
//!
|
|
||||||
//! Defined in [MSC 1756](https://github.com/matrix-org/matrix-doc/blob/master/proposals/1756-cross-signing.md#uploading-signing-keys)
|
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
//! POST /_matrix/client/r0/keys/device_signing/upload
|
//! [POST /_matrix/client/r0/keys/device_signing/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keysdevice_signingupload)
|
||||||
//!
|
|
||||||
//! Defined in [MSC 1756](https://github.com/matrix-org/matrix-doc/blob/master/proposals/1756-cross-signing.md#uploading-signing-keys)
|
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_common::encryption::CrossSigningKey;
|
use ruma_common::encryption::CrossSigningKey;
|
||||||
|
@ -86,7 +86,6 @@ pub struct SignedKey {
|
|||||||
pub signatures: SignedKeySignatures,
|
pub signatures: SignedKeySignatures,
|
||||||
|
|
||||||
/// Is this key considered to be a fallback key, defaults to false.
|
/// Is this key considered to be a fallback key, defaults to false.
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
|
||||||
#[serde(default, skip_serializing_if = "ruma_serde::is_default")]
|
#[serde(default, skip_serializing_if = "ruma_serde::is_default")]
|
||||||
pub fallback: bool,
|
pub fallback: bool,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user