async-matrix 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +131 -0
- data/data/matrix-spec/api/client-server/account-data.yaml +389 -0
- data/data/matrix-spec/api/client-server/account_deactivation.yaml +149 -0
- data/data/matrix-spec/api/client-server/admin.yaml +512 -0
- data/data/matrix-spec/api/client-server/administrative_contact.yaml +620 -0
- data/data/matrix-spec/api/client-server/appservice_ping.yaml +183 -0
- data/data/matrix-spec/api/client-server/appservice_room_directory.yaml +104 -0
- data/data/matrix-spec/api/client-server/authed-content-repo.yaml +590 -0
- data/data/matrix-spec/api/client-server/banning.yaml +177 -0
- data/data/matrix-spec/api/client-server/capabilities.yaml +235 -0
- data/data/matrix-spec/api/client-server/content-repo.yaml +887 -0
- data/data/matrix-spec/api/client-server/create_room.yaml +306 -0
- data/data/matrix-spec/api/client-server/cross_signing.yaml +300 -0
- data/data/matrix-spec/api/client-server/definitions/auth_data.yaml +34 -0
- data/data/matrix-spec/api/client-server/definitions/auth_response.yaml +62 -0
- data/data/matrix-spec/api/client-server/definitions/client_device.yaml +44 -0
- data/data/matrix-spec/api/client-server/definitions/client_event.yaml +49 -0
- data/data/matrix-spec/api/client-server/definitions/client_event_without_room_id.yaml +147 -0
- data/data/matrix-spec/api/client-server/definitions/cross_signing_key.yaml +57 -0
- data/data/matrix-spec/api/client-server/definitions/device_keys.yaml +70 -0
- data/data/matrix-spec/api/client-server/definitions/errors/error.yaml +26 -0
- data/data/matrix-spec/api/client-server/definitions/errors/rate_limited.yaml +34 -0
- data/data/matrix-spec/api/client-server/definitions/event_batch.yaml +22 -0
- data/data/matrix-spec/api/client-server/definitions/event_filter.yaml +55 -0
- data/data/matrix-spec/api/client-server/definitions/invite_3pid.yaml +45 -0
- data/data/matrix-spec/api/client-server/definitions/key_backup_auth_data.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/key_backup_data.yaml +50 -0
- data/data/matrix-spec/api/client-server/definitions/key_backup_session_data.yaml +57 -0
- data/data/matrix-spec/api/client-server/definitions/m.login.terms_params.yaml +83 -0
- data/data/matrix-spec/api/client-server/definitions/m.mentions.yaml +33 -0
- data/data/matrix-spec/api/client-server/definitions/m.oauth_params.yaml +30 -0
- data/data/matrix-spec/api/client-server/definitions/m.relates_to.yaml +45 -0
- data/data/matrix-spec/api/client-server/definitions/megolm_export_session_data.yaml +39 -0
- data/data/matrix-spec/api/client-server/definitions/olm_payload.yaml +88 -0
- data/data/matrix-spec/api/client-server/definitions/one_time_keys.yaml +27 -0
- data/data/matrix-spec/api/client-server/definitions/openid_token.yaml +37 -0
- data/data/matrix-spec/api/client-server/definitions/protocol.yaml +44 -0
- data/data/matrix-spec/api/client-server/definitions/public_rooms_chunk.yaml +74 -0
- data/data/matrix-spec/api/client-server/definitions/public_rooms_response.yaml +59 -0
- data/data/matrix-spec/api/client-server/definitions/push_condition.yaml +53 -0
- data/data/matrix-spec/api/client-server/definitions/push_rule.yaml +53 -0
- data/data/matrix-spec/api/client-server/definitions/push_ruleset.yaml +206 -0
- data/data/matrix-spec/api/client-server/definitions/recent_emoji.yaml +29 -0
- data/data/matrix-spec/api/client-server/definitions/request_email_validation.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/request_msisdn_validation.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/request_token_response.yaml +46 -0
- data/data/matrix-spec/api/client-server/definitions/room_event_filter.yaml +60 -0
- data/data/matrix-spec/api/client-server/definitions/room_key_backup.yaml +37 -0
- data/data/matrix-spec/api/client-server/definitions/room_summary.yaml +44 -0
- data/data/matrix-spec/api/client-server/definitions/security.yaml +47 -0
- data/data/matrix-spec/api/client-server/definitions/sso_login_flow.yaml +98 -0
- data/data/matrix-spec/api/client-server/definitions/state_event_batch.yaml +21 -0
- data/data/matrix-spec/api/client-server/definitions/sync_filter.yaml +86 -0
- data/data/matrix-spec/api/client-server/definitions/tag.yaml +24 -0
- data/data/matrix-spec/api/client-server/definitions/third_party_signed.yaml +45 -0
- data/data/matrix-spec/api/client-server/definitions/timeline_batch.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/user_identifier.yaml +27 -0
- data/data/matrix-spec/api/client-server/definitions/wellknown/full.yaml +38 -0
- data/data/matrix-spec/api/client-server/definitions/wellknown/homeserver.yaml +25 -0
- data/data/matrix-spec/api/client-server/definitions/wellknown/identity_server.yaml +25 -0
- data/data/matrix-spec/api/client-server/device_management.yaml +314 -0
- data/data/matrix-spec/api/client-server/directory.yaml +318 -0
- data/data/matrix-spec/api/client-server/event_context.yaml +161 -0
- data/data/matrix-spec/api/client-server/filter.yaml +224 -0
- data/data/matrix-spec/api/client-server/inviting.yaml +149 -0
- data/data/matrix-spec/api/client-server/joining.yaml +238 -0
- data/data/matrix-spec/api/client-server/key_backup.yaml +993 -0
- data/data/matrix-spec/api/client-server/keys.yaml +482 -0
- data/data/matrix-spec/api/client-server/kicking.yaml +110 -0
- data/data/matrix-spec/api/client-server/knocking.yaml +152 -0
- data/data/matrix-spec/api/client-server/leaving.yaml +163 -0
- data/data/matrix-spec/api/client-server/list_joined_rooms.yaml +68 -0
- data/data/matrix-spec/api/client-server/list_public_rooms.yaml +280 -0
- data/data/matrix-spec/api/client-server/login.yaml +321 -0
- data/data/matrix-spec/api/client-server/login_token.yaml +138 -0
- data/data/matrix-spec/api/client-server/logout.yaml +86 -0
- data/data/matrix-spec/api/client-server/message_pagination.yaml +194 -0
- data/data/matrix-spec/api/client-server/notifications.yaml +152 -0
- data/data/matrix-spec/api/client-server/oauth_server_metadata.yaml +238 -0
- data/data/matrix-spec/api/client-server/old_sync.yaml +379 -0
- data/data/matrix-spec/api/client-server/openid.yaml +98 -0
- data/data/matrix-spec/api/client-server/password_management.yaml +246 -0
- data/data/matrix-spec/api/client-server/peeking_events.yaml +122 -0
- data/data/matrix-spec/api/client-server/policy_server.yaml +82 -0
- data/data/matrix-spec/api/client-server/presence.yaml +169 -0
- data/data/matrix-spec/api/client-server/profile.yaml +366 -0
- data/data/matrix-spec/api/client-server/pusher.yaml +303 -0
- data/data/matrix-spec/api/client-server/pushrules.yaml +633 -0
- data/data/matrix-spec/api/client-server/read_markers.yaml +103 -0
- data/data/matrix-spec/api/client-server/receipts.yaml +139 -0
- data/data/matrix-spec/api/client-server/redaction.yaml +116 -0
- data/data/matrix-spec/api/client-server/refresh.yaml +119 -0
- data/data/matrix-spec/api/client-server/registration.yaml +488 -0
- data/data/matrix-spec/api/client-server/registration_tokens.yaml +93 -0
- data/data/matrix-spec/api/client-server/relations.yaml +382 -0
- data/data/matrix-spec/api/client-server/report_content.yaml +283 -0
- data/data/matrix-spec/api/client-server/room_event_by_timestamp.yaml +147 -0
- data/data/matrix-spec/api/client-server/room_initial_sync.yaml +188 -0
- data/data/matrix-spec/api/client-server/room_send.yaml +130 -0
- data/data/matrix-spec/api/client-server/room_state.yaml +159 -0
- data/data/matrix-spec/api/client-server/room_summary.yaml +138 -0
- data/data/matrix-spec/api/client-server/room_upgrades.yaml +130 -0
- data/data/matrix-spec/api/client-server/rooms.yaml +380 -0
- data/data/matrix-spec/api/client-server/search.yaml +385 -0
- data/data/matrix-spec/api/client-server/space_hierarchy.yaml +237 -0
- data/data/matrix-spec/api/client-server/sso_login_redirect.yaml +135 -0
- data/data/matrix-spec/api/client-server/support.yaml +142 -0
- data/data/matrix-spec/api/client-server/sync.yaml +692 -0
- data/data/matrix-spec/api/client-server/tags.yaml +183 -0
- data/data/matrix-spec/api/client-server/third_party_lookup.yaml +324 -0
- data/data/matrix-spec/api/client-server/third_party_membership.yaml +139 -0
- data/data/matrix-spec/api/client-server/threads_list.yaml +167 -0
- data/data/matrix-spec/api/client-server/to_device.yaml +104 -0
- data/data/matrix-spec/api/client-server/typing.yaml +103 -0
- data/data/matrix-spec/api/client-server/users.yaml +136 -0
- data/data/matrix-spec/api/client-server/versions.yaml +108 -0
- data/data/matrix-spec/api/client-server/voip.yaml +93 -0
- data/data/matrix-spec/api/client-server/wellknown.yaml +60 -0
- data/data/matrix-spec/api/client-server/whoami.yaml +121 -0
- data/data/matrix-spec/event-schemas/examples/core/event.json +6 -0
- data/data/matrix-spec/event-schemas/examples/core/room_edu.json +3 -0
- data/data/matrix-spec/event-schemas/examples/core/room_event.json +11 -0
- data/data/matrix-spec/event-schemas/examples/core/state_event.json +4 -0
- data/data/matrix-spec/event-schemas/examples/invite_room_state.json +18 -0
- data/data/matrix-spec/event-schemas/examples/knock_room_state.json +18 -0
- data/data/matrix-spec/event-schemas/examples/m.accepted_terms.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.call.answer.yaml +21 -0
- data/data/matrix-spec/event-schemas/examples/m.call.candidates.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.call.hangup.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.call.invite.yaml +22 -0
- data/data/matrix-spec/event-schemas/examples/m.call.negotiate.yaml +22 -0
- data/data/matrix-spec/event-schemas/examples/m.call.reject.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.call.sdp_stream_metadata_changed.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.call.select_answer.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.direct.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.dummy.yaml +4 -0
- data/data/matrix-spec/event-schemas/examples/m.forwarded_room_key.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.fully_read.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.identity_server.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.ignored_user_list.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.invite_permission_config.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.accept.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.cancel.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.done.yaml +6 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.key.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.mac.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.ready.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.request.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.start$m.sas.v1.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.start.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.key_backup.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.marked_unread.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.policy.rule.room.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.policy.rule.server.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.policy.rule.user.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.presence.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.push_rules.yaml +177 -0
- data/data/matrix-spec/event-schemas/examples/m.reaction.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.receipt.yaml +18 -0
- data/data/matrix-spec/event-schemas/examples/m.recent_emoji.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.room.avatar.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.canonical_alias.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room.create.yaml +13 -0
- data/data/matrix-spec/event-schemas/examples/m.room.encrypted$megolm.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.room.encrypted$olm.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.encryption.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.guest_access.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.history_visibility.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.join_rules$restricted.yaml +18 -0
- data/data/matrix-spec/event-schemas/examples/m.room.join_rules.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$invite_room_state.yaml +15 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$join_authorised_via_users_server.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$knock_room_state.yaml +15 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$third_party_invite.yaml +20 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.audio.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.emote.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.file.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.image.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.key.verification.request.yaml +19 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.location.yaml +18 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.notice.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.server_notice.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.text.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.video.yaml +23 -0
- data/data/matrix-spec/event-schemas/examples/m.room.name.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.pinned_events.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.policy.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.room.power_levels.yaml +24 -0
- data/data/matrix-spec/event-schemas/examples/m.room.redaction.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.server_acl.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.third_party_invite.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.tombstone.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.room.topic.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key.withheld.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key_request$cancel_request.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key_request$request.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.secret.request.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.secret.send.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.space.child.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.space.parent.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.sticker.yaml +22 -0
- data/data/matrix-spec/event-schemas/examples/m.tag.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.typing.yaml +7 -0
- data/data/matrix-spec/event-schemas/moderation_policy_rule.yaml +32 -0
- data/data/matrix-spec/event-schemas/schema/components/m_text_content_block.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/components/sdp_stream_metadata.yaml +43 -0
- data/data/matrix-spec/event-schemas/schema/components/signed_third_party_invite.yaml +48 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/call_event.yaml +27 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/event.yaml +16 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/avatar_info.yaml +30 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml +52 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml +22 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/room_event.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/state_event.yaml +8 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/stripped_state.yaml +48 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/sync_room_event.yaml +49 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/sync_state_event.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/unsigned_prop.yaml +23 -0
- data/data/matrix-spec/event-schemas/schema/m.accepted_terms.yaml +25 -0
- data/data/matrix-spec/event-schemas/schema/m.call.answer.yaml +44 -0
- data/data/matrix-spec/event-schemas/schema/m.call.candidates.yaml +52 -0
- data/data/matrix-spec/event-schemas/schema/m.call.hangup.yaml +57 -0
- data/data/matrix-spec/event-schemas/schema/m.call.invite.yaml +53 -0
- data/data/matrix-spec/event-schemas/schema/m.call.negotiate.yaml +78 -0
- data/data/matrix-spec/event-schemas/schema/m.call.reject.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.call.sdp_stream_metadata_changed.yaml +24 -0
- data/data/matrix-spec/event-schemas/schema/m.call.select_answer.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.direct.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.dummy.yaml +25 -0
- data/data/matrix-spec/event-schemas/schema/m.forwarded_room_key.yaml +70 -0
- data/data/matrix-spec/event-schemas/schema/m.fully_read.yaml +26 -0
- data/data/matrix-spec/event-schemas/schema/m.identity_server.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/m.ignored_user_list.yaml +30 -0
- data/data/matrix-spec/event-schemas/schema/m.invite_permission_config.yaml +21 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.accept.yaml +63 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.cancel.yaml +72 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.done.yaml +24 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.key.yaml +31 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.m.relates_to.yaml +23 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.mac.yaml +43 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.ready.yaml +41 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.request.yaml +47 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.start$m.reciprocate.v1.yaml +45 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml +76 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.start.yaml +46 -0
- data/data/matrix-spec/event-schemas/schema/m.key_backup.yaml +24 -0
- data/data/matrix-spec/event-schemas/schema/m.marked_unread.yaml +26 -0
- data/data/matrix-spec/event-schemas/schema/m.policy.rule.room.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/m.policy.rule.server.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/m.policy.rule.user.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/m.presence.yaml +50 -0
- data/data/matrix-spec/event-schemas/schema/m.push_rules.yaml +23 -0
- data/data/matrix-spec/event-schemas/schema/m.reaction.yaml +45 -0
- data/data/matrix-spec/event-schemas/schema/m.receipt.yaml +65 -0
- data/data/matrix-spec/event-schemas/schema/m.recent_emoji.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.avatar.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.canonical_alias.yaml +40 -0
- data/data/matrix-spec/event-schemas/schema/m.room.create.yaml +86 -0
- data/data/matrix-spec/event-schemas/schema/m.room.encrypted.yaml +91 -0
- data/data/matrix-spec/event-schemas/schema/m.room.encryption.yaml +38 -0
- data/data/matrix-spec/event-schemas/schema/m.room.guest_access.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/m.room.history_visibility.yaml +30 -0
- data/data/matrix-spec/event-schemas/schema/m.room.join_rules.yaml +78 -0
- data/data/matrix-spec/event-schemas/schema/m.room.member.yaml +174 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.audio.yaml +73 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.emote.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.file.yaml +85 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.image.yaml +63 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.key.verification.request.yaml +70 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.location.yaml +50 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.notice.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.server_notice.yaml +41 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.text.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.video.yaml +95 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message.yaml +25 -0
- data/data/matrix-spec/event-schemas/schema/m.room.name.yaml +35 -0
- data/data/matrix-spec/event-schemas/schema/m.room.pinned_events.yaml +27 -0
- data/data/matrix-spec/event-schemas/schema/m.room.policy.yaml +41 -0
- data/data/matrix-spec/event-schemas/schema/m.room.power_levels.yaml +139 -0
- data/data/matrix-spec/event-schemas/schema/m.room.redaction.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.server_acl.yaml +88 -0
- data/data/matrix-spec/event-schemas/schema/m.room.third_party_invite.yaml +79 -0
- data/data/matrix-spec/event-schemas/schema/m.room.tombstone.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.topic.yaml +53 -0
- data/data/matrix-spec/event-schemas/schema/m.room_key.withheld.yaml +88 -0
- data/data/matrix-spec/event-schemas/schema/m.room_key.yaml +38 -0
- data/data/matrix-spec/event-schemas/schema/m.room_key_request.yaml +73 -0
- data/data/matrix-spec/event-schemas/schema/m.secret.request.yaml +42 -0
- data/data/matrix-spec/event-schemas/schema/m.secret.send.yaml +35 -0
- data/data/matrix-spec/event-schemas/schema/m.space.child.yaml +50 -0
- data/data/matrix-spec/event-schemas/schema/m.space.parent.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.sticker.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.tag.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/m.typing.yaml +29 -0
- data/lib/async/matrix/api/chain.rb +575 -0
- data/lib/async/matrix/api/concat.rb +105 -0
- data/lib/async/matrix/api/path_tree.rb +208 -0
- data/lib/async/matrix/api.rb +204 -0
- data/lib/async/matrix/application_service/bot.rb +235 -0
- data/lib/async/matrix/application_service/config/schema/analytics.json +21 -0
- data/lib/async/matrix/application_service/config/schema/appservice.json +82 -0
- data/lib/async/matrix/application_service/config/schema/backfill.json +91 -0
- data/lib/async/matrix/application_service/config/schema/bridge.json +209 -0
- data/lib/async/matrix/application_service/config/schema/config.json +61 -0
- data/lib/async/matrix/application_service/config/schema/database.json +38 -0
- data/lib/async/matrix/application_service/config/schema/direct_media.json +35 -0
- data/lib/async/matrix/application_service/config/schema/double_puppet.json +24 -0
- data/lib/async/matrix/application_service/config/schema/encryption.json +164 -0
- data/lib/async/matrix/application_service/config/schema/homeserver.json +58 -0
- data/lib/async/matrix/application_service/config/schema/logging.json +50 -0
- data/lib/async/matrix/application_service/config/schema/management_room_texts.json +25 -0
- data/lib/async/matrix/application_service/config/schema/matrix.json +45 -0
- data/lib/async/matrix/application_service/config/schema/permissions.json +54 -0
- data/lib/async/matrix/application_service/config/schema/provisioning.json +23 -0
- data/lib/async/matrix/application_service/config/schema/public_media.json +39 -0
- data/lib/async/matrix/application_service/config/schema/relay.json +43 -0
- data/lib/async/matrix/application_service/config/vivify.rb +110 -0
- data/lib/async/matrix/application_service/config.rb +214 -123
- data/lib/async/matrix/application_service/dispatcher.rb +115 -113
- data/lib/async/matrix/application_service/error_response.rb +26 -26
- data/lib/async/matrix/application_service/event.rb +217 -1
- data/lib/async/matrix/application_service/server.rb +286 -215
- data/lib/async/matrix/application_service/transaction.rb +52 -52
- data/lib/async/matrix/application_service/transaction_store.rb +62 -62
- data/lib/async/matrix/client.rb +919 -179
- data/lib/async/matrix/connection.rb +8 -8
- data/lib/async/matrix/endpoint.rb +45 -45
- data/lib/async/matrix/error.rb +49 -43
- data/lib/async/matrix/media_client.rb +173 -0
- data/lib/async/matrix/notifier.rb +92 -92
- data/lib/async/matrix/schema/registry.rb +355 -0
- data/lib/async/matrix/schema/validation_error.rb +226 -0
- data/lib/async/matrix/schema.rb +174 -0
- data/lib/async/matrix/server.rb +7 -7
- data/lib/async/matrix/stream.rb +7 -7
- data/lib/async/matrix/version.rb +1 -1
- data/lib/async/matrix.rb +5 -2
- metadata +353 -1
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# Copyright 2016 OpenMarket Ltd
|
|
2
|
+
# Copyright 2018 New Vector Ltd
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
openapi: 3.1.0
|
|
16
|
+
info:
|
|
17
|
+
title: Matrix Client-Server Room Creation API
|
|
18
|
+
version: 1.0.0
|
|
19
|
+
paths:
|
|
20
|
+
/createRoom:
|
|
21
|
+
post:
|
|
22
|
+
summary: Create a new room
|
|
23
|
+
description: |-
|
|
24
|
+
Create a new room with various configuration options.
|
|
25
|
+
|
|
26
|
+
The server MUST apply the normal state resolution rules when creating
|
|
27
|
+
the new room, including checking power levels for each event. It MUST
|
|
28
|
+
apply the events implied by the request in the following order:
|
|
29
|
+
|
|
30
|
+
1. The `m.room.create` event itself. Must be the first event in the
|
|
31
|
+
room.
|
|
32
|
+
|
|
33
|
+
2. An `m.room.member` event for the creator to join the room. This is
|
|
34
|
+
needed so the remaining events can be sent.
|
|
35
|
+
|
|
36
|
+
3. A default `m.room.power_levels` event. Overridden by the
|
|
37
|
+
`power_level_content_override` parameter.
|
|
38
|
+
|
|
39
|
+
In [room versions](/rooms) 1 through 11, the room creator (and not
|
|
40
|
+
other members) will be given permission to send state events.
|
|
41
|
+
|
|
42
|
+
In room versions 12 and later, the room creator is given infinite
|
|
43
|
+
power level and cannot be specified in the `users` field of
|
|
44
|
+
`m.room.power_levels`, so is not listed explicitly.
|
|
45
|
+
|
|
46
|
+
**Note**: For `trusted_private_chat`, the users specified in the
|
|
47
|
+
`invite` parameter SHOULD also be appended to `additional_creators`
|
|
48
|
+
by the server, per the `creation_content` parameter.
|
|
49
|
+
|
|
50
|
+
If the room's version is 12 or higher, the power level for sending
|
|
51
|
+
`m.room.tombstone` events MUST explicitly be higher than `state_default`.
|
|
52
|
+
For example, set to 150 instead of 100.
|
|
53
|
+
|
|
54
|
+
4. An `m.room.canonical_alias` event if `room_alias_name` is given.
|
|
55
|
+
|
|
56
|
+
5. Events set by the `preset`. Currently these are the `m.room.join_rules`,
|
|
57
|
+
`m.room.history_visibility`, and `m.room.guest_access` state events.
|
|
58
|
+
|
|
59
|
+
6. Events listed in `initial_state`, in the order that they are
|
|
60
|
+
listed.
|
|
61
|
+
|
|
62
|
+
7. Events implied by `name` and `topic` (`m.room.name` and `m.room.topic`
|
|
63
|
+
state events).
|
|
64
|
+
|
|
65
|
+
8. Invite events implied by `invite` and `invite_3pid` (`m.room.member` with
|
|
66
|
+
`membership: invite` and `m.room.third_party_invite`).
|
|
67
|
+
|
|
68
|
+
The available presets do the following with respect to room state:
|
|
69
|
+
|
|
70
|
+
| Preset | `join_rules` | `history_visibility` | `guest_access` | Other |
|
|
71
|
+
|------------------------|--------------|----------------------|----------------|-------|
|
|
72
|
+
| `private_chat` | `invite` | `shared` | `can_join` | |
|
|
73
|
+
| `trusted_private_chat` | `invite` | `shared` | `can_join` | All invitees are given the same power level as the room creator. |
|
|
74
|
+
| `public_chat` | `public` | `shared` | `forbidden` | |
|
|
75
|
+
|
|
76
|
+
The server will create a `m.room.create` event in the room with the
|
|
77
|
+
requesting user as the creator, alongside other keys provided in the
|
|
78
|
+
`creation_content` or implied by behaviour of `creation_content`.
|
|
79
|
+
operationId: createRoom
|
|
80
|
+
x-changedInMatrixVersion:
|
|
81
|
+
"1.16": Added server behaviour for how the initial power levels change depending on room version.
|
|
82
|
+
security:
|
|
83
|
+
- accessTokenQuery: []
|
|
84
|
+
- accessTokenBearer: []
|
|
85
|
+
requestBody:
|
|
86
|
+
content:
|
|
87
|
+
application/json:
|
|
88
|
+
schema:
|
|
89
|
+
type: object
|
|
90
|
+
example: {
|
|
91
|
+
"preset": "public_chat",
|
|
92
|
+
"room_alias_name": "thepub",
|
|
93
|
+
"name": "The Grand Duke Pub",
|
|
94
|
+
"topic": "All about happy hour",
|
|
95
|
+
"creation_content": {
|
|
96
|
+
"m.federate": false
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
properties:
|
|
100
|
+
visibility:
|
|
101
|
+
type: string
|
|
102
|
+
enum:
|
|
103
|
+
- public
|
|
104
|
+
- private
|
|
105
|
+
description: |-
|
|
106
|
+
The room's visibility in the server's
|
|
107
|
+
[published room directory](/client-server-api#published-room-directory).
|
|
108
|
+
Defaults to `private`.
|
|
109
|
+
room_alias_name:
|
|
110
|
+
type: string
|
|
111
|
+
description: |-
|
|
112
|
+
The desired room alias **local part**. If this is included, a
|
|
113
|
+
room alias will be created and mapped to the newly created
|
|
114
|
+
room. The alias will belong on the *same* homeserver which
|
|
115
|
+
created the room. For example, if this was set to "foo" and
|
|
116
|
+
sent to the homeserver "example.com" the complete room alias
|
|
117
|
+
would be `#foo:example.com`.
|
|
118
|
+
|
|
119
|
+
The complete room alias will become the canonical alias for
|
|
120
|
+
the room and an `m.room.canonical_alias` event will be sent
|
|
121
|
+
into the room.
|
|
122
|
+
name:
|
|
123
|
+
type: string
|
|
124
|
+
description: |-
|
|
125
|
+
If this is included, an [`m.room.name`](/client-server-api/#mroomname) event
|
|
126
|
+
will be sent into the room to indicate the name for the room.
|
|
127
|
+
This overwrites any [`m.room.name`](/client-server-api/#mroomname)
|
|
128
|
+
event in `initial_state`.
|
|
129
|
+
topic:
|
|
130
|
+
type: string
|
|
131
|
+
description: |-
|
|
132
|
+
If this is included, an [`m.room.topic`](/client-server-api/#mroomtopic)
|
|
133
|
+
event with a `text/plain` mimetype will be sent into the room
|
|
134
|
+
to indicate the topic for the room. This overwrites any
|
|
135
|
+
[`m.room.topic`](/client-server-api/#mroomtopic) event in `initial_state`.
|
|
136
|
+
invite:
|
|
137
|
+
type: array
|
|
138
|
+
description: |-
|
|
139
|
+
A list of user IDs to invite to the room. This will tell the
|
|
140
|
+
server to invite everyone in the list to the newly created room.
|
|
141
|
+
items:
|
|
142
|
+
type: string
|
|
143
|
+
invite_3pid:
|
|
144
|
+
type: array
|
|
145
|
+
description: |-
|
|
146
|
+
A list of objects representing third-party IDs to invite into
|
|
147
|
+
the room.
|
|
148
|
+
items:
|
|
149
|
+
$ref: definitions/invite_3pid.yaml
|
|
150
|
+
room_version:
|
|
151
|
+
type: string
|
|
152
|
+
description: |-
|
|
153
|
+
The room version to set for the room. If not provided, the homeserver is
|
|
154
|
+
to use its configured default. If provided, the homeserver will return a
|
|
155
|
+
400 error with the errcode `M_UNSUPPORTED_ROOM_VERSION` if it does not
|
|
156
|
+
support the room version.
|
|
157
|
+
example: "1"
|
|
158
|
+
creation_content:
|
|
159
|
+
title: CreationContent
|
|
160
|
+
type: object
|
|
161
|
+
x-changedInMatrixVersion:
|
|
162
|
+
"1.16": Added server behaviour for how to handle `trusted_private_chat` and invited users.
|
|
163
|
+
description: |-
|
|
164
|
+
Extra keys, such as `m.federate`, to be added to the content
|
|
165
|
+
of the [`m.room.create`](/client-server-api/#mroomcreate) event.
|
|
166
|
+
|
|
167
|
+
The server will overwrite the following
|
|
168
|
+
keys: `creator`, `room_version`. Future versions of the specification
|
|
169
|
+
may allow the server to overwrite other keys.
|
|
170
|
+
|
|
171
|
+
When using the `trusted_private_chat` preset, the server SHOULD combine
|
|
172
|
+
`additional_creators` specified here and the `invite` array into the
|
|
173
|
+
eventual `m.room.create` event's `additional_creators`, deduplicating
|
|
174
|
+
between the two parameters.
|
|
175
|
+
initial_state:
|
|
176
|
+
type: array
|
|
177
|
+
description: |-
|
|
178
|
+
A list of state events to set in the new room. This allows
|
|
179
|
+
the user to override the default state events set in the new
|
|
180
|
+
room. The expected format of the state events are an object
|
|
181
|
+
with type, state_key and content keys set.
|
|
182
|
+
|
|
183
|
+
Takes precedence over events set by `preset`, but gets
|
|
184
|
+
overridden by `name` and `topic` keys.
|
|
185
|
+
items:
|
|
186
|
+
type: object
|
|
187
|
+
title: StateEvent
|
|
188
|
+
properties:
|
|
189
|
+
type:
|
|
190
|
+
type: string
|
|
191
|
+
description: The type of event to send.
|
|
192
|
+
state_key:
|
|
193
|
+
type: string
|
|
194
|
+
description: The state_key of the state event. Defaults to an empty string.
|
|
195
|
+
content:
|
|
196
|
+
type: object
|
|
197
|
+
description: The content of the event.
|
|
198
|
+
required:
|
|
199
|
+
- type
|
|
200
|
+
- content
|
|
201
|
+
preset:
|
|
202
|
+
type: string
|
|
203
|
+
enum:
|
|
204
|
+
- private_chat
|
|
205
|
+
- public_chat
|
|
206
|
+
- trusted_private_chat
|
|
207
|
+
description: |-
|
|
208
|
+
Convenience parameter for setting various default state events
|
|
209
|
+
based on a preset.
|
|
210
|
+
|
|
211
|
+
If unspecified, the server should use the `visibility` to determine
|
|
212
|
+
which preset to use. A visibility of `public` equates to a preset of
|
|
213
|
+
`public_chat` and `private` visibility equates to a preset of
|
|
214
|
+
`private_chat`.
|
|
215
|
+
is_direct:
|
|
216
|
+
type: boolean
|
|
217
|
+
description: |-
|
|
218
|
+
This flag makes the server set the `is_direct` flag on the
|
|
219
|
+
`m.room.member` events sent to the users in `invite` and
|
|
220
|
+
`invite_3pid`. See [Direct Messaging](/client-server-api/#direct-messaging) for more information.
|
|
221
|
+
power_level_content_override:
|
|
222
|
+
title: Power Level Event Content
|
|
223
|
+
type: object
|
|
224
|
+
description: |-
|
|
225
|
+
The power level content to override in the default power level
|
|
226
|
+
event. This object is applied on top of the generated
|
|
227
|
+
[`m.room.power_levels`](/client-server-api/#mroompower_levels)
|
|
228
|
+
event content prior to it being sent to the room. Defaults to
|
|
229
|
+
overriding nothing.
|
|
230
|
+
description: The desired room configuration.
|
|
231
|
+
required: true
|
|
232
|
+
responses:
|
|
233
|
+
"200":
|
|
234
|
+
description: Information about the newly created room.
|
|
235
|
+
content:
|
|
236
|
+
application/json:
|
|
237
|
+
schema:
|
|
238
|
+
type: object
|
|
239
|
+
description: Information about the newly created room.
|
|
240
|
+
properties:
|
|
241
|
+
room_id:
|
|
242
|
+
type: string
|
|
243
|
+
description: The created room's ID.
|
|
244
|
+
required:
|
|
245
|
+
- room_id
|
|
246
|
+
examples:
|
|
247
|
+
response:
|
|
248
|
+
value: {
|
|
249
|
+
"room_id": "!sefiuhWgwghwWgh:example.com"
|
|
250
|
+
}
|
|
251
|
+
"400":
|
|
252
|
+
description: |-
|
|
253
|
+
The request is invalid. A meaningful `errcode` and description
|
|
254
|
+
error text will be returned. Example reasons for rejection include:
|
|
255
|
+
|
|
256
|
+
- The request body is malformed (`errcode` set to `M_BAD_JSON`
|
|
257
|
+
or `M_NOT_JSON`).
|
|
258
|
+
|
|
259
|
+
- The room alias specified is already taken (`errcode` set to
|
|
260
|
+
`M_ROOM_IN_USE`).
|
|
261
|
+
|
|
262
|
+
- The initial state implied by the parameters to the request is
|
|
263
|
+
invalid: for example, the user's `power_level` is set below
|
|
264
|
+
that necessary to set the room name (`errcode` set to
|
|
265
|
+
`M_INVALID_ROOM_STATE`).
|
|
266
|
+
|
|
267
|
+
- The homeserver doesn't support the requested room version, or
|
|
268
|
+
one or more users being invited to the new room are residents
|
|
269
|
+
of a homeserver which does not support the requested room version.
|
|
270
|
+
The `errcode` will be `M_UNSUPPORTED_ROOM_VERSION` in these
|
|
271
|
+
cases.
|
|
272
|
+
content:
|
|
273
|
+
application/json:
|
|
274
|
+
schema:
|
|
275
|
+
$ref: definitions/errors/error.yaml
|
|
276
|
+
"403":
|
|
277
|
+
description: |-
|
|
278
|
+
Creating the room is not allowed.
|
|
279
|
+
|
|
280
|
+
{{% added-in v="1.18"%}} The `M_INVITE_BLOCKED` error code is used to
|
|
281
|
+
indicate that one of the homeservers of the invited users rejected
|
|
282
|
+
the invite due to [invite blocking](/client-server-api/#invite-permission).
|
|
283
|
+
content:
|
|
284
|
+
application/json:
|
|
285
|
+
schema:
|
|
286
|
+
$ref: definitions/errors/error.yaml
|
|
287
|
+
tags:
|
|
288
|
+
- Room creation
|
|
289
|
+
servers:
|
|
290
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
291
|
+
variables:
|
|
292
|
+
protocol:
|
|
293
|
+
enum:
|
|
294
|
+
- http
|
|
295
|
+
- https
|
|
296
|
+
default: https
|
|
297
|
+
hostname:
|
|
298
|
+
default: localhost:8008
|
|
299
|
+
basePath:
|
|
300
|
+
default: /_matrix/client/v3
|
|
301
|
+
components:
|
|
302
|
+
securitySchemes:
|
|
303
|
+
accessTokenQuery:
|
|
304
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
305
|
+
accessTokenBearer:
|
|
306
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
openapi: 3.1.0
|
|
15
|
+
info:
|
|
16
|
+
title: Matrix Client-Server Cross Signing API
|
|
17
|
+
version: 1.0.0
|
|
18
|
+
paths:
|
|
19
|
+
/keys/device_signing/upload:
|
|
20
|
+
post:
|
|
21
|
+
x-addedInMatrixVersion: "1.1"
|
|
22
|
+
x-changedInMatrixVersion:
|
|
23
|
+
"1.11": UIA is not always required for this endpoint.
|
|
24
|
+
"1.17": |-
|
|
25
|
+
This endpoint no longer requires User-Interactive Authentication when used by an
|
|
26
|
+
application service.
|
|
27
|
+
summary: Upload cross-signing keys.
|
|
28
|
+
description: |-
|
|
29
|
+
Publishes cross-signing keys for the user.
|
|
30
|
+
|
|
31
|
+
This API endpoint uses the [User-Interactive Authentication API](/client-server-api/#user-interactive-authentication-api),
|
|
32
|
+
except when used by an application service.
|
|
33
|
+
|
|
34
|
+
User-Interactive Authentication MUST be performed for regular clients, except in these cases:
|
|
35
|
+
- there is no existing master signing key uploaded to the homeserver, OR
|
|
36
|
+
- there is an existing master signing key and it exactly matches the
|
|
37
|
+
master signing key provided in the request body. If there are any additional
|
|
38
|
+
keys provided in the request (self-signing key, user-signing key) they MUST also
|
|
39
|
+
match the existing keys stored on the server. In other words, the request contains
|
|
40
|
+
no new keys.
|
|
41
|
+
|
|
42
|
+
This allows clients to freely upload one set of keys, but not modify/overwrite keys if
|
|
43
|
+
they already exist. Allowing clients to upload the same set of keys more than once
|
|
44
|
+
makes this endpoint idempotent in the case where the response is lost over the network,
|
|
45
|
+
which would otherwise cause a UIA challenge upon retry.
|
|
46
|
+
|
|
47
|
+
{{% boxes/note %}}
|
|
48
|
+
When this endpoint requires User-Interactive Authentication,
|
|
49
|
+
it uses the [`m.oauth`](/client-server-api/#oauth-authentication)
|
|
50
|
+
authentication type if the access token was obtained
|
|
51
|
+
via the [OAuth 2.0 API](/client-server-api/#oauth-20-api).
|
|
52
|
+
{{% /boxes/note %}}
|
|
53
|
+
operationId: uploadCrossSigningKeys
|
|
54
|
+
security:
|
|
55
|
+
- accessTokenQuery: []
|
|
56
|
+
- accessTokenBearer: []
|
|
57
|
+
requestBody:
|
|
58
|
+
content:
|
|
59
|
+
application/json:
|
|
60
|
+
schema:
|
|
61
|
+
type: object
|
|
62
|
+
properties:
|
|
63
|
+
master_key:
|
|
64
|
+
description: Optional. The user\'s master signing key.
|
|
65
|
+
allOf:
|
|
66
|
+
- $ref: definitions/cross_signing_key.yaml
|
|
67
|
+
self_signing_key:
|
|
68
|
+
description: |-
|
|
69
|
+
Optional. The user\'s self-signing key. Must be signed by
|
|
70
|
+
the accompanying master signing key, or by the user\'s most recently
|
|
71
|
+
uploaded master signing key if no master signing key is included in the
|
|
72
|
+
request.
|
|
73
|
+
allOf:
|
|
74
|
+
- $ref: definitions/cross_signing_key.yaml
|
|
75
|
+
user_signing_key:
|
|
76
|
+
description: |-
|
|
77
|
+
Optional. The user\'s user-signing key. Must be signed by
|
|
78
|
+
the accompanying master signing key, or by the user\'s most recently
|
|
79
|
+
uploaded master signing key if no master signing key is included in the
|
|
80
|
+
request.
|
|
81
|
+
allOf:
|
|
82
|
+
- $ref: definitions/cross_signing_key.yaml
|
|
83
|
+
auth:
|
|
84
|
+
description: |-
|
|
85
|
+
Additional authentication information for the
|
|
86
|
+
user-interactive authentication API.
|
|
87
|
+
allOf:
|
|
88
|
+
- $ref: definitions/auth_data.yaml
|
|
89
|
+
example: {
|
|
90
|
+
"auth": {
|
|
91
|
+
"type": "example.type.foo",
|
|
92
|
+
"session": "xxxxx",
|
|
93
|
+
"example_credential": "verypoorsharedsecret"
|
|
94
|
+
},
|
|
95
|
+
"master_key": {
|
|
96
|
+
"user_id": "@alice:example.com",
|
|
97
|
+
"usage": [
|
|
98
|
+
"master"
|
|
99
|
+
],
|
|
100
|
+
"keys": {
|
|
101
|
+
"ed25519:base64+master+public+key": "base64+master+public+key"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"self_signing_key": {
|
|
105
|
+
"user_id": "@alice:example.com",
|
|
106
|
+
"usage": [
|
|
107
|
+
"self_signing"
|
|
108
|
+
],
|
|
109
|
+
"keys": {
|
|
110
|
+
"ed25519:base64+self+signing+public+key": "base64+self+signing+master+public+key"
|
|
111
|
+
},
|
|
112
|
+
"signatures": {
|
|
113
|
+
"@alice:example.com": {
|
|
114
|
+
"ed25519:base64+master+public+key": "signature+of+self+signing+key"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"user_signing_key": {
|
|
119
|
+
"user_id": "@alice:example.com",
|
|
120
|
+
"usage": [
|
|
121
|
+
"user_signing"
|
|
122
|
+
],
|
|
123
|
+
"keys": {
|
|
124
|
+
"ed25519:base64+user+signing+public+key": "base64+user+signing+master+public+key"
|
|
125
|
+
},
|
|
126
|
+
"signatures": {
|
|
127
|
+
"@alice:example.com": {
|
|
128
|
+
"ed25519:base64+master+public+key": "signature+of+user+signing+key"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
description: The keys to be published.
|
|
134
|
+
required: true
|
|
135
|
+
responses:
|
|
136
|
+
"200":
|
|
137
|
+
description: The provided keys were successfully uploaded.
|
|
138
|
+
content:
|
|
139
|
+
application/json:
|
|
140
|
+
schema:
|
|
141
|
+
type: object
|
|
142
|
+
example: {}
|
|
143
|
+
"400":
|
|
144
|
+
description: |-
|
|
145
|
+
The input was invalid in some way. This can include one of the
|
|
146
|
+
following error codes:
|
|
147
|
+
|
|
148
|
+
* `M_INVALID_SIGNATURE`: For example, the self-signing or
|
|
149
|
+
user-signing key had an incorrect signature.
|
|
150
|
+
* `M_MISSING_PARAM`: No master signing key is available.
|
|
151
|
+
content:
|
|
152
|
+
application/json:
|
|
153
|
+
schema:
|
|
154
|
+
type: object
|
|
155
|
+
example: {
|
|
156
|
+
"errcode": "M_INVALID_SIGNATURE",
|
|
157
|
+
"error": "Invalid signature"
|
|
158
|
+
}
|
|
159
|
+
"403":
|
|
160
|
+
description: |-
|
|
161
|
+
The public key of one of the keys is the same as one of the user\'s
|
|
162
|
+
device IDs, or the request is not authorized for any other reason.
|
|
163
|
+
content:
|
|
164
|
+
application/json:
|
|
165
|
+
schema:
|
|
166
|
+
type: object
|
|
167
|
+
example: {
|
|
168
|
+
"errcode": "M_FORBIDDEN",
|
|
169
|
+
"error": "Key ID in use"
|
|
170
|
+
}
|
|
171
|
+
tags:
|
|
172
|
+
- End-to-end encryption
|
|
173
|
+
/keys/signatures/upload:
|
|
174
|
+
post:
|
|
175
|
+
x-addedInMatrixVersion: "1.1"
|
|
176
|
+
summary: Upload cross-signing signatures.
|
|
177
|
+
description: |-
|
|
178
|
+
Publishes cross-signing signatures for the user.
|
|
179
|
+
|
|
180
|
+
The signed JSON object must match the key previously uploaded or
|
|
181
|
+
retrieved for the given key ID, with the exception of the `signatures`
|
|
182
|
+
property, which contains the new signature(s) to add.
|
|
183
|
+
operationId: uploadCrossSigningSignatures
|
|
184
|
+
security:
|
|
185
|
+
- accessTokenQuery: []
|
|
186
|
+
- accessTokenBearer: []
|
|
187
|
+
requestBody:
|
|
188
|
+
content:
|
|
189
|
+
application/json:
|
|
190
|
+
schema:
|
|
191
|
+
type: object
|
|
192
|
+
description: |-
|
|
193
|
+
A map of user ID to a map of key ID to signed JSON object.
|
|
194
|
+
patternProperties:
|
|
195
|
+
"^@":
|
|
196
|
+
x-pattern-format: mx-user-id
|
|
197
|
+
type: object
|
|
198
|
+
additionalProperties:
|
|
199
|
+
type: object
|
|
200
|
+
example: {
|
|
201
|
+
"@alice:example.com": {
|
|
202
|
+
"HIJKLMN": {
|
|
203
|
+
"user_id": "@alice:example.com",
|
|
204
|
+
"device_id": "HIJKLMN",
|
|
205
|
+
"algorithms": [
|
|
206
|
+
"m.olm.v1.curve25519-aes-sha256",
|
|
207
|
+
"m.megolm.v1.aes-sha"
|
|
208
|
+
],
|
|
209
|
+
"keys": {
|
|
210
|
+
"curve25519:HIJKLMN": "base64+curve25519+key",
|
|
211
|
+
"ed25519:HIJKLMN": "base64+ed25519+key"
|
|
212
|
+
},
|
|
213
|
+
"signatures": {
|
|
214
|
+
"@alice:example.com": {
|
|
215
|
+
"ed25519:base64+self+signing+public+key": "base64+signature+of+HIJKLMN"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"base64+master+public+key": {
|
|
220
|
+
"user_id": "@alice:example.com",
|
|
221
|
+
"usage": [
|
|
222
|
+
"master"
|
|
223
|
+
],
|
|
224
|
+
"keys": {
|
|
225
|
+
"ed25519:base64+master+public+key": "base64+master+public+key"
|
|
226
|
+
},
|
|
227
|
+
"signatures": {
|
|
228
|
+
"@alice:example.com": {
|
|
229
|
+
"ed25519:HIJKLMN": "base64+signature+of+master+key"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"@bob:example.com": {
|
|
235
|
+
"bobs+base64+master+public+key": {
|
|
236
|
+
"user_id": "@bob:example.com",
|
|
237
|
+
"keys": {
|
|
238
|
+
"ed25519:bobs+base64+master+public+key": "bobs+base64+master+public+key"
|
|
239
|
+
},
|
|
240
|
+
"usage": [
|
|
241
|
+
"master"
|
|
242
|
+
],
|
|
243
|
+
"signatures": {
|
|
244
|
+
"@alice:example.com": {
|
|
245
|
+
"ed25519:base64+user+signing+public+key": "base64+signature+of+bobs+master+key"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
description: |-
|
|
252
|
+
A map from user ID to key ID to signed JSON objects containing the
|
|
253
|
+
signatures to be published.
|
|
254
|
+
required: true
|
|
255
|
+
responses:
|
|
256
|
+
"200":
|
|
257
|
+
description: The provided signatures were processed.
|
|
258
|
+
content:
|
|
259
|
+
application/json:
|
|
260
|
+
schema:
|
|
261
|
+
type: object
|
|
262
|
+
properties:
|
|
263
|
+
failures:
|
|
264
|
+
type: object
|
|
265
|
+
description: |-
|
|
266
|
+
A map from user ID to key ID to an error for any signatures
|
|
267
|
+
that failed. If a signature was invalid, the `errcode` will
|
|
268
|
+
be set to `M_INVALID_SIGNATURE`.
|
|
269
|
+
patternProperties:
|
|
270
|
+
"^@":
|
|
271
|
+
type: object
|
|
272
|
+
x-pattern-format: mx-user-id
|
|
273
|
+
additionalProperties:
|
|
274
|
+
type: object
|
|
275
|
+
title: Error
|
|
276
|
+
example:
|
|
277
|
+
"@alice:example.com":
|
|
278
|
+
HIJKLMN:
|
|
279
|
+
errcode: M_INVALID_SIGNATURE
|
|
280
|
+
error: Invalid signature
|
|
281
|
+
tags:
|
|
282
|
+
- End-to-end encryption
|
|
283
|
+
servers:
|
|
284
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
285
|
+
variables:
|
|
286
|
+
protocol:
|
|
287
|
+
enum:
|
|
288
|
+
- http
|
|
289
|
+
- https
|
|
290
|
+
default: https
|
|
291
|
+
hostname:
|
|
292
|
+
default: localhost:8008
|
|
293
|
+
basePath:
|
|
294
|
+
default: /_matrix/client/v3
|
|
295
|
+
components:
|
|
296
|
+
securitySchemes:
|
|
297
|
+
accessTokenQuery:
|
|
298
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
299
|
+
accessTokenBearer:
|
|
300
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright 2016 OpenMarket Ltd
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
title: Authentication Data
|
|
15
|
+
description: |-
|
|
16
|
+
Used by clients to submit authentication information to the interactive-authentication API
|
|
17
|
+
type: object
|
|
18
|
+
properties:
|
|
19
|
+
type:
|
|
20
|
+
description: |-
|
|
21
|
+
The authentication type that the client is attempting to complete.
|
|
22
|
+
May be omitted if `session` is given, and the client is reissuing a
|
|
23
|
+
request which it believes has been completed out-of-band (for example,
|
|
24
|
+
via the [fallback mechanism](/client-server-api/#fallback)).
|
|
25
|
+
type: string
|
|
26
|
+
session:
|
|
27
|
+
description: The value of the session key given by the homeserver.
|
|
28
|
+
type: string
|
|
29
|
+
additionalProperties:
|
|
30
|
+
description: Keys dependent on the login type
|
|
31
|
+
example:
|
|
32
|
+
type: "example.type.foo"
|
|
33
|
+
session: "xxxxx"
|
|
34
|
+
example_credential: "verypoorsharedsecret"
|