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,633 @@
|
|
|
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 Push Rules API
|
|
17
|
+
version: 1.0.0
|
|
18
|
+
paths:
|
|
19
|
+
/pushrules/:
|
|
20
|
+
get:
|
|
21
|
+
summary: Retrieve all push rulesets.
|
|
22
|
+
description: |-
|
|
23
|
+
Retrieve all push rulesets for this user. Currently the only push ruleset
|
|
24
|
+
defined is `global`.
|
|
25
|
+
operationId: getPushRules
|
|
26
|
+
security:
|
|
27
|
+
- accessTokenQuery: []
|
|
28
|
+
- accessTokenBearer: []
|
|
29
|
+
responses:
|
|
30
|
+
"200":
|
|
31
|
+
description: All the push rulesets for this user.
|
|
32
|
+
content:
|
|
33
|
+
application/json:
|
|
34
|
+
schema:
|
|
35
|
+
type: object
|
|
36
|
+
required:
|
|
37
|
+
- global
|
|
38
|
+
properties:
|
|
39
|
+
global:
|
|
40
|
+
type: object
|
|
41
|
+
description: The global ruleset.
|
|
42
|
+
title: Ruleset
|
|
43
|
+
allOf:
|
|
44
|
+
- $ref: definitions/push_ruleset.yaml
|
|
45
|
+
tags:
|
|
46
|
+
- Push notifications
|
|
47
|
+
/pushrules/global/:
|
|
48
|
+
get:
|
|
49
|
+
summary: Retrieve all push rules.
|
|
50
|
+
description: |-
|
|
51
|
+
Retrieve all push rules for this user.
|
|
52
|
+
operationId: getPushRulesGlobal
|
|
53
|
+
security:
|
|
54
|
+
- accessTokenQuery: []
|
|
55
|
+
- accessTokenBearer: []
|
|
56
|
+
responses:
|
|
57
|
+
"200":
|
|
58
|
+
description: All the push rules for this user.
|
|
59
|
+
content:
|
|
60
|
+
application/json:
|
|
61
|
+
schema:
|
|
62
|
+
$ref: definitions/push_ruleset.yaml
|
|
63
|
+
tags:
|
|
64
|
+
- Push notifications
|
|
65
|
+
"/pushrules/global/{kind}/{ruleId}":
|
|
66
|
+
get:
|
|
67
|
+
summary: Retrieve a push rule.
|
|
68
|
+
description: Retrieve a single specified push rule.
|
|
69
|
+
operationId: getPushRule
|
|
70
|
+
security:
|
|
71
|
+
- accessTokenQuery: []
|
|
72
|
+
- accessTokenBearer: []
|
|
73
|
+
parameters:
|
|
74
|
+
- in: path
|
|
75
|
+
name: kind
|
|
76
|
+
required: true
|
|
77
|
+
description: |
|
|
78
|
+
The kind of rule
|
|
79
|
+
example: content
|
|
80
|
+
schema:
|
|
81
|
+
type: string
|
|
82
|
+
enum:
|
|
83
|
+
- override
|
|
84
|
+
- underride
|
|
85
|
+
- sender
|
|
86
|
+
- room
|
|
87
|
+
- content
|
|
88
|
+
- in: path
|
|
89
|
+
name: ruleId
|
|
90
|
+
required: true
|
|
91
|
+
description: |
|
|
92
|
+
The identifier for the rule.
|
|
93
|
+
example: nocake
|
|
94
|
+
schema:
|
|
95
|
+
type: string
|
|
96
|
+
responses:
|
|
97
|
+
"200":
|
|
98
|
+
description: |-
|
|
99
|
+
The specific push rule. This will also include keys specific to the
|
|
100
|
+
rule itself such as the rule's `actions` and `conditions` if set.
|
|
101
|
+
content:
|
|
102
|
+
application/json:
|
|
103
|
+
schema:
|
|
104
|
+
type: object
|
|
105
|
+
description: The push rule.
|
|
106
|
+
allOf:
|
|
107
|
+
- $ref: definitions/push_rule.yaml
|
|
108
|
+
examples:
|
|
109
|
+
response:
|
|
110
|
+
value: {
|
|
111
|
+
"actions": [],
|
|
112
|
+
"pattern": "cake*lie",
|
|
113
|
+
"rule_id": "nocake",
|
|
114
|
+
"enabled": true,
|
|
115
|
+
"default": false
|
|
116
|
+
}
|
|
117
|
+
"404":
|
|
118
|
+
description: The push rule does not exist.
|
|
119
|
+
content:
|
|
120
|
+
application/json:
|
|
121
|
+
schema:
|
|
122
|
+
$ref: definitions/errors/error.yaml
|
|
123
|
+
examples:
|
|
124
|
+
response:
|
|
125
|
+
value: {
|
|
126
|
+
"errcode": "M_NOT_FOUND",
|
|
127
|
+
"error": "The push rule was not found."
|
|
128
|
+
}
|
|
129
|
+
tags:
|
|
130
|
+
- Push notifications
|
|
131
|
+
delete:
|
|
132
|
+
summary: Delete a push rule.
|
|
133
|
+
description: This endpoint removes the push rule defined in the path.
|
|
134
|
+
operationId: deletePushRule
|
|
135
|
+
security:
|
|
136
|
+
- accessTokenQuery: []
|
|
137
|
+
- accessTokenBearer: []
|
|
138
|
+
parameters:
|
|
139
|
+
- in: path
|
|
140
|
+
name: kind
|
|
141
|
+
required: true
|
|
142
|
+
description: |
|
|
143
|
+
The kind of rule
|
|
144
|
+
example: content
|
|
145
|
+
schema:
|
|
146
|
+
type: string
|
|
147
|
+
enum:
|
|
148
|
+
- override
|
|
149
|
+
- underride
|
|
150
|
+
- sender
|
|
151
|
+
- room
|
|
152
|
+
- content
|
|
153
|
+
- in: path
|
|
154
|
+
name: ruleId
|
|
155
|
+
required: true
|
|
156
|
+
description: |
|
|
157
|
+
The identifier for the rule.
|
|
158
|
+
example: nocake
|
|
159
|
+
schema:
|
|
160
|
+
type: string
|
|
161
|
+
responses:
|
|
162
|
+
"200":
|
|
163
|
+
description: The push rule was deleted.
|
|
164
|
+
content:
|
|
165
|
+
application/json:
|
|
166
|
+
schema:
|
|
167
|
+
type: object # empty json object
|
|
168
|
+
examples:
|
|
169
|
+
response:
|
|
170
|
+
value: {}
|
|
171
|
+
"404":
|
|
172
|
+
description: The push rule does not exist.
|
|
173
|
+
content:
|
|
174
|
+
application/json:
|
|
175
|
+
schema:
|
|
176
|
+
$ref: definitions/errors/error.yaml
|
|
177
|
+
examples:
|
|
178
|
+
response:
|
|
179
|
+
value: {
|
|
180
|
+
"errcode": "M_NOT_FOUND",
|
|
181
|
+
"error": "The push rule was not found."
|
|
182
|
+
}
|
|
183
|
+
tags:
|
|
184
|
+
- Push notifications
|
|
185
|
+
put:
|
|
186
|
+
summary: Add or change a push rule.
|
|
187
|
+
description: |-
|
|
188
|
+
This endpoint allows the creation and modification of user defined push
|
|
189
|
+
rules.
|
|
190
|
+
|
|
191
|
+
If a rule with the same `rule_id` already exists among rules of the same
|
|
192
|
+
kind, it is updated with the new parameters, otherwise a new rule is
|
|
193
|
+
created.
|
|
194
|
+
|
|
195
|
+
If both `after` and `before` are provided, the new or updated rule must
|
|
196
|
+
be the next most important rule with respect to the rule identified by
|
|
197
|
+
`before`.
|
|
198
|
+
|
|
199
|
+
If neither `after` nor `before` are provided and the rule is created, it
|
|
200
|
+
should be added as the most important user defined rule among rules of
|
|
201
|
+
the same kind.
|
|
202
|
+
|
|
203
|
+
When creating push rules, they MUST be enabled by default.
|
|
204
|
+
operationId: setPushRule
|
|
205
|
+
security:
|
|
206
|
+
- accessTokenQuery: []
|
|
207
|
+
- accessTokenBearer: []
|
|
208
|
+
parameters:
|
|
209
|
+
- in: path
|
|
210
|
+
name: kind
|
|
211
|
+
required: true
|
|
212
|
+
description: |
|
|
213
|
+
The kind of rule
|
|
214
|
+
example: content
|
|
215
|
+
schema:
|
|
216
|
+
type: string
|
|
217
|
+
enum:
|
|
218
|
+
- override
|
|
219
|
+
- underride
|
|
220
|
+
- sender
|
|
221
|
+
- room
|
|
222
|
+
- content
|
|
223
|
+
- in: path
|
|
224
|
+
name: ruleId
|
|
225
|
+
required: true
|
|
226
|
+
description: |
|
|
227
|
+
The identifier for the rule. If the string starts with a dot ("."),
|
|
228
|
+
the request MUST be rejected as this is reserved for server-default
|
|
229
|
+
rules. Slashes ("/") and backslashes ("\\") are also not allowed.
|
|
230
|
+
example: nocake
|
|
231
|
+
schema:
|
|
232
|
+
type: string
|
|
233
|
+
- in: query
|
|
234
|
+
name: before
|
|
235
|
+
required: false
|
|
236
|
+
description: |-
|
|
237
|
+
Use 'before' with a `rule_id` as its value to make the new rule the
|
|
238
|
+
next-most important rule with respect to the given user defined rule.
|
|
239
|
+
It is not possible to add a rule relative to a predefined server rule.
|
|
240
|
+
example: someRuleId
|
|
241
|
+
schema:
|
|
242
|
+
type: string
|
|
243
|
+
- in: query
|
|
244
|
+
name: after
|
|
245
|
+
required: false
|
|
246
|
+
description: |-
|
|
247
|
+
This makes the new rule the next-less important rule relative to the
|
|
248
|
+
given user defined rule. It is not possible to add a rule relative
|
|
249
|
+
to a predefined server rule.
|
|
250
|
+
example: anotherRuleId
|
|
251
|
+
schema:
|
|
252
|
+
type: string
|
|
253
|
+
requestBody:
|
|
254
|
+
content:
|
|
255
|
+
application/json:
|
|
256
|
+
schema:
|
|
257
|
+
type: object
|
|
258
|
+
example: {
|
|
259
|
+
"pattern": "cake*lie",
|
|
260
|
+
"actions": [
|
|
261
|
+
"notify"
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
properties:
|
|
265
|
+
actions:
|
|
266
|
+
type: array
|
|
267
|
+
description: The action(s) to perform when the conditions for this rule are met.
|
|
268
|
+
items:
|
|
269
|
+
type: ["string", "object"]
|
|
270
|
+
conditions:
|
|
271
|
+
type: array
|
|
272
|
+
description: |-
|
|
273
|
+
The conditions that must hold true for an event in order for a
|
|
274
|
+
rule to be applied to an event. A rule with no conditions
|
|
275
|
+
always matches. Only applicable to `underride` and `override` rules.
|
|
276
|
+
items:
|
|
277
|
+
$ref: definitions/push_condition.yaml
|
|
278
|
+
pattern:
|
|
279
|
+
type: string
|
|
280
|
+
description: Only applicable to `content` rules. The glob-style pattern to match
|
|
281
|
+
against.
|
|
282
|
+
required:
|
|
283
|
+
- actions
|
|
284
|
+
description: |-
|
|
285
|
+
The push rule data. Additional top-level keys may be present depending
|
|
286
|
+
on the parameters for the rule `kind`.
|
|
287
|
+
required: true
|
|
288
|
+
responses:
|
|
289
|
+
"200":
|
|
290
|
+
description: The push rule was created/updated.
|
|
291
|
+
content:
|
|
292
|
+
application/json:
|
|
293
|
+
schema:
|
|
294
|
+
type: object # empty json object
|
|
295
|
+
examples:
|
|
296
|
+
response:
|
|
297
|
+
value: {}
|
|
298
|
+
"400":
|
|
299
|
+
description: There was a problem configuring this push rule.
|
|
300
|
+
content:
|
|
301
|
+
application/json:
|
|
302
|
+
schema:
|
|
303
|
+
$ref: definitions/errors/error.yaml
|
|
304
|
+
examples:
|
|
305
|
+
response:
|
|
306
|
+
value: {
|
|
307
|
+
"error": "before/after rule not found: someRuleId",
|
|
308
|
+
"errcode": "M_UNKNOWN"
|
|
309
|
+
}
|
|
310
|
+
"404":
|
|
311
|
+
description: The push rule does not exist (when updating a push rule).
|
|
312
|
+
content:
|
|
313
|
+
application/json:
|
|
314
|
+
schema:
|
|
315
|
+
$ref: definitions/errors/error.yaml
|
|
316
|
+
examples:
|
|
317
|
+
response:
|
|
318
|
+
value: {
|
|
319
|
+
"errcode": "M_NOT_FOUND",
|
|
320
|
+
"error": "The push rule was not found."
|
|
321
|
+
}
|
|
322
|
+
"429":
|
|
323
|
+
description: This request was rate-limited.
|
|
324
|
+
content:
|
|
325
|
+
application/json:
|
|
326
|
+
schema:
|
|
327
|
+
$ref: definitions/errors/rate_limited.yaml
|
|
328
|
+
tags:
|
|
329
|
+
- Push notifications
|
|
330
|
+
"/pushrules/global/{kind}/{ruleId}/enabled":
|
|
331
|
+
get:
|
|
332
|
+
summary: Get whether a push rule is enabled
|
|
333
|
+
description: This endpoint gets whether the specified push rule is enabled.
|
|
334
|
+
operationId: isPushRuleEnabled
|
|
335
|
+
security:
|
|
336
|
+
- accessTokenQuery: []
|
|
337
|
+
- accessTokenBearer: []
|
|
338
|
+
parameters:
|
|
339
|
+
- in: path
|
|
340
|
+
name: kind
|
|
341
|
+
required: true
|
|
342
|
+
description: |
|
|
343
|
+
The kind of rule
|
|
344
|
+
example: content
|
|
345
|
+
schema:
|
|
346
|
+
type: string
|
|
347
|
+
enum:
|
|
348
|
+
- override
|
|
349
|
+
- underride
|
|
350
|
+
- sender
|
|
351
|
+
- room
|
|
352
|
+
- content
|
|
353
|
+
- in: path
|
|
354
|
+
name: ruleId
|
|
355
|
+
required: true
|
|
356
|
+
description: |
|
|
357
|
+
The identifier for the rule.
|
|
358
|
+
example: nocake
|
|
359
|
+
schema:
|
|
360
|
+
type: string
|
|
361
|
+
responses:
|
|
362
|
+
"200":
|
|
363
|
+
description: Whether the push rule is enabled.
|
|
364
|
+
content:
|
|
365
|
+
application/json:
|
|
366
|
+
schema:
|
|
367
|
+
type: object
|
|
368
|
+
properties:
|
|
369
|
+
enabled:
|
|
370
|
+
type: boolean
|
|
371
|
+
description: Whether the push rule is enabled or not.
|
|
372
|
+
required:
|
|
373
|
+
- enabled
|
|
374
|
+
examples:
|
|
375
|
+
response:
|
|
376
|
+
value: {
|
|
377
|
+
"enabled": true
|
|
378
|
+
}
|
|
379
|
+
"404":
|
|
380
|
+
description: The push rule does not exist.
|
|
381
|
+
content:
|
|
382
|
+
application/json:
|
|
383
|
+
schema:
|
|
384
|
+
$ref: definitions/errors/error.yaml
|
|
385
|
+
examples:
|
|
386
|
+
response:
|
|
387
|
+
value: {
|
|
388
|
+
"errcode": "M_NOT_FOUND",
|
|
389
|
+
"error": "The push rule was not found."
|
|
390
|
+
}
|
|
391
|
+
tags:
|
|
392
|
+
- Push notifications
|
|
393
|
+
put:
|
|
394
|
+
summary: Enable or disable a push rule.
|
|
395
|
+
description: This endpoint allows clients to enable or disable the specified
|
|
396
|
+
push rule.
|
|
397
|
+
operationId: setPushRuleEnabled
|
|
398
|
+
security:
|
|
399
|
+
- accessTokenQuery: []
|
|
400
|
+
- accessTokenBearer: []
|
|
401
|
+
parameters:
|
|
402
|
+
- in: path
|
|
403
|
+
name: kind
|
|
404
|
+
required: true
|
|
405
|
+
description: |
|
|
406
|
+
The kind of rule
|
|
407
|
+
example: content
|
|
408
|
+
schema:
|
|
409
|
+
type: string
|
|
410
|
+
enum:
|
|
411
|
+
- override
|
|
412
|
+
- underride
|
|
413
|
+
- sender
|
|
414
|
+
- room
|
|
415
|
+
- content
|
|
416
|
+
- in: path
|
|
417
|
+
name: ruleId
|
|
418
|
+
required: true
|
|
419
|
+
description: |
|
|
420
|
+
The identifier for the rule.
|
|
421
|
+
example: nocake
|
|
422
|
+
schema:
|
|
423
|
+
type: string
|
|
424
|
+
requestBody:
|
|
425
|
+
content:
|
|
426
|
+
application/json:
|
|
427
|
+
schema:
|
|
428
|
+
type: object
|
|
429
|
+
properties:
|
|
430
|
+
enabled:
|
|
431
|
+
type: boolean
|
|
432
|
+
description: Whether the push rule is enabled or not.
|
|
433
|
+
required:
|
|
434
|
+
- enabled
|
|
435
|
+
example: {
|
|
436
|
+
"enabled": true
|
|
437
|
+
}
|
|
438
|
+
description: |
|
|
439
|
+
Whether the push rule is enabled or not.
|
|
440
|
+
required: true
|
|
441
|
+
responses:
|
|
442
|
+
"200":
|
|
443
|
+
description: The push rule was enabled or disabled.
|
|
444
|
+
content:
|
|
445
|
+
application/json:
|
|
446
|
+
schema:
|
|
447
|
+
type: object
|
|
448
|
+
examples:
|
|
449
|
+
response:
|
|
450
|
+
value: {}
|
|
451
|
+
"404":
|
|
452
|
+
description: The push rule does not exist.
|
|
453
|
+
content:
|
|
454
|
+
application/json:
|
|
455
|
+
schema:
|
|
456
|
+
$ref: definitions/errors/error.yaml
|
|
457
|
+
examples:
|
|
458
|
+
response:
|
|
459
|
+
value: {
|
|
460
|
+
"errcode": "M_NOT_FOUND",
|
|
461
|
+
"error": "The push rule was not found."
|
|
462
|
+
}
|
|
463
|
+
tags:
|
|
464
|
+
- Push notifications
|
|
465
|
+
"/pushrules/global/{kind}/{ruleId}/actions":
|
|
466
|
+
get:
|
|
467
|
+
summary: The actions for a push rule
|
|
468
|
+
description: This endpoint get the actions for the specified push rule.
|
|
469
|
+
operationId: getPushRuleActions
|
|
470
|
+
security:
|
|
471
|
+
- accessTokenQuery: []
|
|
472
|
+
- accessTokenBearer: []
|
|
473
|
+
parameters:
|
|
474
|
+
- in: path
|
|
475
|
+
name: kind
|
|
476
|
+
required: true
|
|
477
|
+
description: |
|
|
478
|
+
The kind of rule
|
|
479
|
+
example: content
|
|
480
|
+
schema:
|
|
481
|
+
type: string
|
|
482
|
+
enum:
|
|
483
|
+
- override
|
|
484
|
+
- underride
|
|
485
|
+
- sender
|
|
486
|
+
- room
|
|
487
|
+
- content
|
|
488
|
+
- in: path
|
|
489
|
+
name: ruleId
|
|
490
|
+
required: true
|
|
491
|
+
description: |
|
|
492
|
+
The identifier for the rule.
|
|
493
|
+
example: nocake
|
|
494
|
+
schema:
|
|
495
|
+
type: string
|
|
496
|
+
responses:
|
|
497
|
+
"200":
|
|
498
|
+
description: The actions for this push rule.
|
|
499
|
+
content:
|
|
500
|
+
application/json:
|
|
501
|
+
schema:
|
|
502
|
+
type: object
|
|
503
|
+
properties:
|
|
504
|
+
actions:
|
|
505
|
+
type: array
|
|
506
|
+
description: The action(s) to perform for this rule.
|
|
507
|
+
items:
|
|
508
|
+
type: ["string", "object"]
|
|
509
|
+
required:
|
|
510
|
+
- actions
|
|
511
|
+
examples:
|
|
512
|
+
response:
|
|
513
|
+
value: {
|
|
514
|
+
"actions": [
|
|
515
|
+
"notify",
|
|
516
|
+
{
|
|
517
|
+
"set_tweak": "sound",
|
|
518
|
+
"value": "bing"
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
"404":
|
|
523
|
+
description: The push rule does not exist.
|
|
524
|
+
content:
|
|
525
|
+
application/json:
|
|
526
|
+
schema:
|
|
527
|
+
$ref: definitions/errors/error.yaml
|
|
528
|
+
examples:
|
|
529
|
+
response:
|
|
530
|
+
value: {
|
|
531
|
+
"errcode": "M_NOT_FOUND",
|
|
532
|
+
"error": "The push rule was not found."
|
|
533
|
+
}
|
|
534
|
+
tags:
|
|
535
|
+
- Push notifications
|
|
536
|
+
put:
|
|
537
|
+
summary: Set the actions for a push rule.
|
|
538
|
+
description: |-
|
|
539
|
+
This endpoint allows clients to change the actions of a push rule.
|
|
540
|
+
This can be used to change the actions of builtin rules.
|
|
541
|
+
operationId: setPushRuleActions
|
|
542
|
+
security:
|
|
543
|
+
- accessTokenQuery: []
|
|
544
|
+
- accessTokenBearer: []
|
|
545
|
+
parameters:
|
|
546
|
+
- in: path
|
|
547
|
+
name: kind
|
|
548
|
+
required: true
|
|
549
|
+
description: |
|
|
550
|
+
The kind of rule
|
|
551
|
+
example: room
|
|
552
|
+
schema:
|
|
553
|
+
type: string
|
|
554
|
+
enum:
|
|
555
|
+
- override
|
|
556
|
+
- underride
|
|
557
|
+
- sender
|
|
558
|
+
- room
|
|
559
|
+
- content
|
|
560
|
+
- in: path
|
|
561
|
+
name: ruleId
|
|
562
|
+
required: true
|
|
563
|
+
description: |
|
|
564
|
+
The identifier for the rule.
|
|
565
|
+
example: "#spam:example.com"
|
|
566
|
+
schema:
|
|
567
|
+
type: string
|
|
568
|
+
requestBody:
|
|
569
|
+
content:
|
|
570
|
+
application/json:
|
|
571
|
+
schema:
|
|
572
|
+
type: object
|
|
573
|
+
properties:
|
|
574
|
+
actions:
|
|
575
|
+
type: array
|
|
576
|
+
description: The action(s) to perform for this rule.
|
|
577
|
+
items:
|
|
578
|
+
type: ["string", "object"]
|
|
579
|
+
required:
|
|
580
|
+
- actions
|
|
581
|
+
example: {
|
|
582
|
+
"actions": [
|
|
583
|
+
"notify",
|
|
584
|
+
{
|
|
585
|
+
"set_tweak": "highlight"
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
}
|
|
589
|
+
description: |
|
|
590
|
+
The action(s) to perform when the conditions for this rule are met.
|
|
591
|
+
required: true
|
|
592
|
+
responses:
|
|
593
|
+
"200":
|
|
594
|
+
description: The actions for the push rule were set.
|
|
595
|
+
content:
|
|
596
|
+
application/json:
|
|
597
|
+
schema:
|
|
598
|
+
type: object
|
|
599
|
+
examples:
|
|
600
|
+
response:
|
|
601
|
+
value: {}
|
|
602
|
+
"404":
|
|
603
|
+
description: The push rule does not exist.
|
|
604
|
+
content:
|
|
605
|
+
application/json:
|
|
606
|
+
schema:
|
|
607
|
+
$ref: definitions/errors/error.yaml
|
|
608
|
+
examples:
|
|
609
|
+
response:
|
|
610
|
+
value: {
|
|
611
|
+
"errcode": "M_NOT_FOUND",
|
|
612
|
+
"error": "The push rule was not found."
|
|
613
|
+
}
|
|
614
|
+
tags:
|
|
615
|
+
- Push notifications
|
|
616
|
+
servers:
|
|
617
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
618
|
+
variables:
|
|
619
|
+
protocol:
|
|
620
|
+
enum:
|
|
621
|
+
- http
|
|
622
|
+
- https
|
|
623
|
+
default: https
|
|
624
|
+
hostname:
|
|
625
|
+
default: localhost:8008
|
|
626
|
+
basePath:
|
|
627
|
+
default: /_matrix/client/v3
|
|
628
|
+
components:
|
|
629
|
+
securitySchemes:
|
|
630
|
+
accessTokenQuery:
|
|
631
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
632
|
+
accessTokenBearer:
|
|
633
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|