async-matrix 0.1.3 → 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 +2 -2
- metadata +353 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Copyright 2018 New Vector Ltd
|
|
2
|
+
# Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
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 Read Marker API
|
|
18
|
+
version: 1.0.0
|
|
19
|
+
paths:
|
|
20
|
+
"/rooms/{roomId}/read_markers":
|
|
21
|
+
post:
|
|
22
|
+
summary: Set the position of the read marker for a room.
|
|
23
|
+
description: |-
|
|
24
|
+
Sets the position of the read marker for a given room, and optionally
|
|
25
|
+
the read receipt's location.
|
|
26
|
+
operationId: setReadMarker
|
|
27
|
+
security:
|
|
28
|
+
- accessTokenQuery: []
|
|
29
|
+
- accessTokenBearer: []
|
|
30
|
+
parameters:
|
|
31
|
+
- in: path
|
|
32
|
+
name: roomId
|
|
33
|
+
description: The room ID to set the read marker in for the user.
|
|
34
|
+
required: true
|
|
35
|
+
example: "!somewhere:example.org"
|
|
36
|
+
schema:
|
|
37
|
+
type: string
|
|
38
|
+
requestBody:
|
|
39
|
+
content:
|
|
40
|
+
application/json:
|
|
41
|
+
schema:
|
|
42
|
+
type: object
|
|
43
|
+
properties:
|
|
44
|
+
m.fully_read:
|
|
45
|
+
type: string
|
|
46
|
+
description: |-
|
|
47
|
+
The event ID the read marker should be located at. The
|
|
48
|
+
event MUST belong to the room.
|
|
49
|
+
example: $somewhere:example.org
|
|
50
|
+
x-changedInMatrixVersion:
|
|
51
|
+
"1.4": |
|
|
52
|
+
This property is no longer required.
|
|
53
|
+
m.read:
|
|
54
|
+
type: string
|
|
55
|
+
description: |-
|
|
56
|
+
The event ID to set the read receipt location at. This is
|
|
57
|
+
equivalent to calling `/receipt/m.read/$elsewhere:example.org`
|
|
58
|
+
and is provided here to save that extra call.
|
|
59
|
+
example: $elsewhere:example.org
|
|
60
|
+
m.read.private:
|
|
61
|
+
x-addedInMatrixVersion: "1.4"
|
|
62
|
+
type: string
|
|
63
|
+
description: |-
|
|
64
|
+
The event ID to set the *private* read receipt location at. This
|
|
65
|
+
equivalent to calling `/receipt/m.read.private/$elsewhere:example.org`
|
|
66
|
+
and is provided here to save that extra call.
|
|
67
|
+
example: $elsewhere:example.org
|
|
68
|
+
description: The read marker and optional read receipt locations.
|
|
69
|
+
required: true
|
|
70
|
+
responses:
|
|
71
|
+
"200":
|
|
72
|
+
description: The read marker, and read receipt(s) if provided, have been updated.
|
|
73
|
+
content:
|
|
74
|
+
application/json:
|
|
75
|
+
schema:
|
|
76
|
+
type: object
|
|
77
|
+
properties: {}
|
|
78
|
+
"429":
|
|
79
|
+
description: This request was rate-limited.
|
|
80
|
+
content:
|
|
81
|
+
application/json:
|
|
82
|
+
schema:
|
|
83
|
+
$ref: definitions/errors/rate_limited.yaml
|
|
84
|
+
tags:
|
|
85
|
+
- Read Markers
|
|
86
|
+
servers:
|
|
87
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
88
|
+
variables:
|
|
89
|
+
protocol:
|
|
90
|
+
enum:
|
|
91
|
+
- http
|
|
92
|
+
- https
|
|
93
|
+
default: https
|
|
94
|
+
hostname:
|
|
95
|
+
default: localhost:8008
|
|
96
|
+
basePath:
|
|
97
|
+
default: /_matrix/client/v3
|
|
98
|
+
components:
|
|
99
|
+
securitySchemes:
|
|
100
|
+
accessTokenQuery:
|
|
101
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
102
|
+
accessTokenBearer:
|
|
103
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Copyright 2016 OpenMarket Ltd
|
|
2
|
+
# Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
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 Receipts API
|
|
18
|
+
version: 1.0.0
|
|
19
|
+
paths:
|
|
20
|
+
"/rooms/{roomId}/receipt/{receiptType}/{eventId}":
|
|
21
|
+
post:
|
|
22
|
+
summary: Send a receipt for the given event ID.
|
|
23
|
+
description: |-
|
|
24
|
+
This API updates the marker for the given receipt type to the event ID
|
|
25
|
+
specified.
|
|
26
|
+
operationId: postReceipt
|
|
27
|
+
security:
|
|
28
|
+
- accessTokenQuery: []
|
|
29
|
+
- accessTokenBearer: []
|
|
30
|
+
parameters:
|
|
31
|
+
- in: path
|
|
32
|
+
name: roomId
|
|
33
|
+
description: The room in which to send the event.
|
|
34
|
+
required: true
|
|
35
|
+
example: "!wefuh21ffskfuh345:example.com"
|
|
36
|
+
schema:
|
|
37
|
+
type: string
|
|
38
|
+
- in: path
|
|
39
|
+
name: receiptType
|
|
40
|
+
description: |-
|
|
41
|
+
The type of receipt to send. This can also be `m.fully_read` as an
|
|
42
|
+
alternative to [`/read_markers`](/client-server-api/#post_matrixclientv3roomsroomidread_markers).
|
|
43
|
+
|
|
44
|
+
Note that `m.fully_read` does not appear under `m.receipt`: this endpoint
|
|
45
|
+
effectively calls `/read_markers` internally when presented with a receipt
|
|
46
|
+
type of `m.fully_read`.
|
|
47
|
+
required: true
|
|
48
|
+
x-changedInMatrixVersion:
|
|
49
|
+
"1.4": |
|
|
50
|
+
Allow `m.read.private` receipts and `m.fully_read` markers to be set.
|
|
51
|
+
example: m.read
|
|
52
|
+
schema:
|
|
53
|
+
type: string
|
|
54
|
+
enum:
|
|
55
|
+
- m.read
|
|
56
|
+
- m.read.private
|
|
57
|
+
- m.fully_read
|
|
58
|
+
- in: path
|
|
59
|
+
name: eventId
|
|
60
|
+
description: The event ID to acknowledge up to.
|
|
61
|
+
required: true
|
|
62
|
+
example: $1924376522eioj:example.com
|
|
63
|
+
schema:
|
|
64
|
+
type: string
|
|
65
|
+
requestBody:
|
|
66
|
+
content:
|
|
67
|
+
application/json:
|
|
68
|
+
schema:
|
|
69
|
+
type: object
|
|
70
|
+
properties:
|
|
71
|
+
thread_id:
|
|
72
|
+
type: string
|
|
73
|
+
x-addedInMatrixVersion: "1.4"
|
|
74
|
+
description: |-
|
|
75
|
+
The root thread event's ID (or `main`) for which
|
|
76
|
+
thread this receipt is intended to be under. If
|
|
77
|
+
not specified, the read receipt is *unthreaded*
|
|
78
|
+
(default).
|
|
79
|
+
example: {
|
|
80
|
+
"thread_id": "main"
|
|
81
|
+
}
|
|
82
|
+
description: |-
|
|
83
|
+
Extra receipt information to attach to `content` if any. The
|
|
84
|
+
server will automatically set the `ts` field.
|
|
85
|
+
required: true
|
|
86
|
+
responses:
|
|
87
|
+
"200":
|
|
88
|
+
description: The receipt was sent.
|
|
89
|
+
content:
|
|
90
|
+
application/json:
|
|
91
|
+
schema:
|
|
92
|
+
type: object
|
|
93
|
+
maxProperties: 0 # empty json object
|
|
94
|
+
examples:
|
|
95
|
+
response:
|
|
96
|
+
value: {}
|
|
97
|
+
"400":
|
|
98
|
+
description: |-
|
|
99
|
+
The `thread_id` is invalid in some way. For example:
|
|
100
|
+
* It is not a string.
|
|
101
|
+
* It is empty.
|
|
102
|
+
* It is provided for an incompatible receipt type.
|
|
103
|
+
* The `event_id` is not related to the `thread_id`.
|
|
104
|
+
content:
|
|
105
|
+
application/json:
|
|
106
|
+
schema:
|
|
107
|
+
$ref: definitions/errors/error.yaml
|
|
108
|
+
examples:
|
|
109
|
+
response:
|
|
110
|
+
value: {
|
|
111
|
+
"errcode": "M_INVALID_PARAM",
|
|
112
|
+
"error": "thread_id field must be a non-empty string"
|
|
113
|
+
}
|
|
114
|
+
"429":
|
|
115
|
+
description: This request was rate-limited.
|
|
116
|
+
content:
|
|
117
|
+
application/json:
|
|
118
|
+
schema:
|
|
119
|
+
$ref: definitions/errors/rate_limited.yaml
|
|
120
|
+
tags:
|
|
121
|
+
- Room participation
|
|
122
|
+
servers:
|
|
123
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
124
|
+
variables:
|
|
125
|
+
protocol:
|
|
126
|
+
enum:
|
|
127
|
+
- http
|
|
128
|
+
- https
|
|
129
|
+
default: https
|
|
130
|
+
hostname:
|
|
131
|
+
default: localhost:8008
|
|
132
|
+
basePath:
|
|
133
|
+
default: /_matrix/client/v3
|
|
134
|
+
components:
|
|
135
|
+
securitySchemes:
|
|
136
|
+
accessTokenQuery:
|
|
137
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
138
|
+
accessTokenBearer:
|
|
139
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
openapi: 3.1.0
|
|
15
|
+
info:
|
|
16
|
+
title: Matrix Client-Server message redaction API
|
|
17
|
+
version: 1.0.0
|
|
18
|
+
paths:
|
|
19
|
+
"/rooms/{roomId}/redact/{eventId}/{txnId}":
|
|
20
|
+
put:
|
|
21
|
+
summary: Strips all non-integrity-critical information out of an event.
|
|
22
|
+
description: |-
|
|
23
|
+
Strips all information out of an event which isn't critical to the
|
|
24
|
+
integrity of the server-side representation of the room.
|
|
25
|
+
|
|
26
|
+
This cannot be undone.
|
|
27
|
+
|
|
28
|
+
Any user with a power level greater than or equal to the `m.room.redaction`
|
|
29
|
+
event power level may send redactions for their own events in the room. If
|
|
30
|
+
the user's power level is also greater than or equal to the `redact` power
|
|
31
|
+
level of the room, the user may redact events sent by other users.
|
|
32
|
+
|
|
33
|
+
Server administrators may redact events sent by users on their server.
|
|
34
|
+
operationId: redactEvent
|
|
35
|
+
security:
|
|
36
|
+
- accessTokenQuery: []
|
|
37
|
+
- accessTokenBearer: []
|
|
38
|
+
parameters:
|
|
39
|
+
- in: path
|
|
40
|
+
name: roomId
|
|
41
|
+
description: The room from which to redact the event.
|
|
42
|
+
required: true
|
|
43
|
+
example: "!637q39766251:example.com"
|
|
44
|
+
schema:
|
|
45
|
+
type: string
|
|
46
|
+
format: mx-room-id
|
|
47
|
+
pattern: "^!"
|
|
48
|
+
- in: path
|
|
49
|
+
name: eventId
|
|
50
|
+
description: The ID of the event to redact.
|
|
51
|
+
required: true
|
|
52
|
+
example: $bai2b1i9:matrix.org
|
|
53
|
+
schema:
|
|
54
|
+
type: string
|
|
55
|
+
format: mx-event-id
|
|
56
|
+
pattern: "^\\$"
|
|
57
|
+
- in: path
|
|
58
|
+
name: txnId
|
|
59
|
+
description: |-
|
|
60
|
+
The [transaction ID](/client-server-api/#transaction-identifiers) for this event. Clients should generate a
|
|
61
|
+
unique ID; it will be used by the server to ensure idempotency of requests.
|
|
62
|
+
required: true
|
|
63
|
+
example: "37"
|
|
64
|
+
schema:
|
|
65
|
+
type: string
|
|
66
|
+
requestBody:
|
|
67
|
+
content:
|
|
68
|
+
application/json:
|
|
69
|
+
schema:
|
|
70
|
+
type: object
|
|
71
|
+
example: {
|
|
72
|
+
"reason": "Indecent material"
|
|
73
|
+
}
|
|
74
|
+
properties:
|
|
75
|
+
reason:
|
|
76
|
+
type: string
|
|
77
|
+
description: The reason for the event being redacted.
|
|
78
|
+
required: true
|
|
79
|
+
responses:
|
|
80
|
+
"200":
|
|
81
|
+
description: An ID for the redaction event.
|
|
82
|
+
content:
|
|
83
|
+
application/json:
|
|
84
|
+
schema:
|
|
85
|
+
type: object
|
|
86
|
+
properties:
|
|
87
|
+
event_id:
|
|
88
|
+
type: string
|
|
89
|
+
format: mx-event-id
|
|
90
|
+
pattern: "^\\$"
|
|
91
|
+
description: A unique identifier for the event.
|
|
92
|
+
examples:
|
|
93
|
+
response:
|
|
94
|
+
value: {
|
|
95
|
+
"event_id": "$YUwQidLecu:example.com"
|
|
96
|
+
}
|
|
97
|
+
tags:
|
|
98
|
+
- Room participation
|
|
99
|
+
servers:
|
|
100
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
101
|
+
variables:
|
|
102
|
+
protocol:
|
|
103
|
+
enum:
|
|
104
|
+
- http
|
|
105
|
+
- https
|
|
106
|
+
default: https
|
|
107
|
+
hostname:
|
|
108
|
+
default: localhost:8008
|
|
109
|
+
basePath:
|
|
110
|
+
default: /_matrix/client/v3
|
|
111
|
+
components:
|
|
112
|
+
securitySchemes:
|
|
113
|
+
accessTokenQuery:
|
|
114
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
115
|
+
accessTokenBearer:
|
|
116
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Copyright 2022 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 Registration and Login API
|
|
17
|
+
version: 1.0.0
|
|
18
|
+
paths:
|
|
19
|
+
/refresh:
|
|
20
|
+
post:
|
|
21
|
+
x-addedInMatrixVersion: "1.3"
|
|
22
|
+
summary: Refresh an access token
|
|
23
|
+
description: |-
|
|
24
|
+
Refresh an access token. Clients should use the returned access token
|
|
25
|
+
when making subsequent API calls, and store the returned refresh token
|
|
26
|
+
(if given) in order to refresh the new access token when necessary.
|
|
27
|
+
|
|
28
|
+
After an access token has been refreshed, a server can choose to
|
|
29
|
+
invalidate the old access token immediately, or can choose not to, for
|
|
30
|
+
example if the access token would expire soon anyways. Clients should
|
|
31
|
+
not make any assumptions about the old access token still being valid,
|
|
32
|
+
and should use the newly provided access token instead.
|
|
33
|
+
|
|
34
|
+
The old refresh token remains valid until the new access token or refresh token
|
|
35
|
+
is used, at which point the old refresh token is revoked.
|
|
36
|
+
|
|
37
|
+
Note that this endpoint does not require authentication via an
|
|
38
|
+
access token. Authentication is provided via the refresh token.
|
|
39
|
+
|
|
40
|
+
Application Service identity assertion is disabled for this endpoint.
|
|
41
|
+
operationId: refresh
|
|
42
|
+
requestBody:
|
|
43
|
+
content:
|
|
44
|
+
application/json:
|
|
45
|
+
schema:
|
|
46
|
+
type: object
|
|
47
|
+
example: {
|
|
48
|
+
"refresh_token": "some_token"
|
|
49
|
+
}
|
|
50
|
+
properties:
|
|
51
|
+
refresh_token:
|
|
52
|
+
type: string
|
|
53
|
+
description: The refresh token
|
|
54
|
+
required:
|
|
55
|
+
- refresh_token
|
|
56
|
+
required: true
|
|
57
|
+
responses:
|
|
58
|
+
"200":
|
|
59
|
+
description: A new access token and refresh token were generated.
|
|
60
|
+
content:
|
|
61
|
+
application/json:
|
|
62
|
+
schema:
|
|
63
|
+
type: object
|
|
64
|
+
properties:
|
|
65
|
+
access_token:
|
|
66
|
+
type: string
|
|
67
|
+
description: The new access token to use.
|
|
68
|
+
refresh_token:
|
|
69
|
+
type: string
|
|
70
|
+
description: |-
|
|
71
|
+
The new refresh token to use when the access token needs to
|
|
72
|
+
be refreshed again. If not given, the old refresh token can
|
|
73
|
+
be re-used.
|
|
74
|
+
expires_in_ms:
|
|
75
|
+
type: integer
|
|
76
|
+
description: |-
|
|
77
|
+
The lifetime of the access token, in milliseconds. If not
|
|
78
|
+
given, the client can assume that the access token will not
|
|
79
|
+
expire.
|
|
80
|
+
required:
|
|
81
|
+
- access_token
|
|
82
|
+
examples:
|
|
83
|
+
response:
|
|
84
|
+
value: {
|
|
85
|
+
"access_token": "a_new_token",
|
|
86
|
+
"expires_in_ms": 60000,
|
|
87
|
+
"refresh_token": "another_new_token"
|
|
88
|
+
}
|
|
89
|
+
"401":
|
|
90
|
+
description: The provided token was unknown, or has already been used.
|
|
91
|
+
content:
|
|
92
|
+
application/json:
|
|
93
|
+
schema:
|
|
94
|
+
$ref: definitions/errors/error.yaml
|
|
95
|
+
examples:
|
|
96
|
+
response:
|
|
97
|
+
value: {
|
|
98
|
+
"errcode": "M_UNKNOWN_TOKEN",
|
|
99
|
+
"error": "Soft logged out",
|
|
100
|
+
"soft_logout": true
|
|
101
|
+
}
|
|
102
|
+
"429":
|
|
103
|
+
description: This request was rate-limited.
|
|
104
|
+
content:
|
|
105
|
+
application/json:
|
|
106
|
+
schema:
|
|
107
|
+
$ref: definitions/errors/rate_limited.yaml
|
|
108
|
+
servers:
|
|
109
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
110
|
+
variables:
|
|
111
|
+
protocol:
|
|
112
|
+
enum:
|
|
113
|
+
- http
|
|
114
|
+
- https
|
|
115
|
+
default: https
|
|
116
|
+
hostname:
|
|
117
|
+
default: localhost:8008
|
|
118
|
+
basePath:
|
|
119
|
+
default: /_matrix/client/v3
|