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.
Files changed (341) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +131 -0
  3. data/data/matrix-spec/api/client-server/account-data.yaml +389 -0
  4. data/data/matrix-spec/api/client-server/account_deactivation.yaml +149 -0
  5. data/data/matrix-spec/api/client-server/admin.yaml +512 -0
  6. data/data/matrix-spec/api/client-server/administrative_contact.yaml +620 -0
  7. data/data/matrix-spec/api/client-server/appservice_ping.yaml +183 -0
  8. data/data/matrix-spec/api/client-server/appservice_room_directory.yaml +104 -0
  9. data/data/matrix-spec/api/client-server/authed-content-repo.yaml +590 -0
  10. data/data/matrix-spec/api/client-server/banning.yaml +177 -0
  11. data/data/matrix-spec/api/client-server/capabilities.yaml +235 -0
  12. data/data/matrix-spec/api/client-server/content-repo.yaml +887 -0
  13. data/data/matrix-spec/api/client-server/create_room.yaml +306 -0
  14. data/data/matrix-spec/api/client-server/cross_signing.yaml +300 -0
  15. data/data/matrix-spec/api/client-server/definitions/auth_data.yaml +34 -0
  16. data/data/matrix-spec/api/client-server/definitions/auth_response.yaml +62 -0
  17. data/data/matrix-spec/api/client-server/definitions/client_device.yaml +44 -0
  18. data/data/matrix-spec/api/client-server/definitions/client_event.yaml +49 -0
  19. data/data/matrix-spec/api/client-server/definitions/client_event_without_room_id.yaml +147 -0
  20. data/data/matrix-spec/api/client-server/definitions/cross_signing_key.yaml +57 -0
  21. data/data/matrix-spec/api/client-server/definitions/device_keys.yaml +70 -0
  22. data/data/matrix-spec/api/client-server/definitions/errors/error.yaml +26 -0
  23. data/data/matrix-spec/api/client-server/definitions/errors/rate_limited.yaml +34 -0
  24. data/data/matrix-spec/api/client-server/definitions/event_batch.yaml +22 -0
  25. data/data/matrix-spec/api/client-server/definitions/event_filter.yaml +55 -0
  26. data/data/matrix-spec/api/client-server/definitions/invite_3pid.yaml +45 -0
  27. data/data/matrix-spec/api/client-server/definitions/key_backup_auth_data.yaml +36 -0
  28. data/data/matrix-spec/api/client-server/definitions/key_backup_data.yaml +50 -0
  29. data/data/matrix-spec/api/client-server/definitions/key_backup_session_data.yaml +57 -0
  30. data/data/matrix-spec/api/client-server/definitions/m.login.terms_params.yaml +83 -0
  31. data/data/matrix-spec/api/client-server/definitions/m.mentions.yaml +33 -0
  32. data/data/matrix-spec/api/client-server/definitions/m.oauth_params.yaml +30 -0
  33. data/data/matrix-spec/api/client-server/definitions/m.relates_to.yaml +45 -0
  34. data/data/matrix-spec/api/client-server/definitions/megolm_export_session_data.yaml +39 -0
  35. data/data/matrix-spec/api/client-server/definitions/olm_payload.yaml +88 -0
  36. data/data/matrix-spec/api/client-server/definitions/one_time_keys.yaml +27 -0
  37. data/data/matrix-spec/api/client-server/definitions/openid_token.yaml +37 -0
  38. data/data/matrix-spec/api/client-server/definitions/protocol.yaml +44 -0
  39. data/data/matrix-spec/api/client-server/definitions/public_rooms_chunk.yaml +74 -0
  40. data/data/matrix-spec/api/client-server/definitions/public_rooms_response.yaml +59 -0
  41. data/data/matrix-spec/api/client-server/definitions/push_condition.yaml +53 -0
  42. data/data/matrix-spec/api/client-server/definitions/push_rule.yaml +53 -0
  43. data/data/matrix-spec/api/client-server/definitions/push_ruleset.yaml +206 -0
  44. data/data/matrix-spec/api/client-server/definitions/recent_emoji.yaml +29 -0
  45. data/data/matrix-spec/api/client-server/definitions/request_email_validation.yaml +36 -0
  46. data/data/matrix-spec/api/client-server/definitions/request_msisdn_validation.yaml +36 -0
  47. data/data/matrix-spec/api/client-server/definitions/request_token_response.yaml +46 -0
  48. data/data/matrix-spec/api/client-server/definitions/room_event_filter.yaml +60 -0
  49. data/data/matrix-spec/api/client-server/definitions/room_key_backup.yaml +37 -0
  50. data/data/matrix-spec/api/client-server/definitions/room_summary.yaml +44 -0
  51. data/data/matrix-spec/api/client-server/definitions/security.yaml +47 -0
  52. data/data/matrix-spec/api/client-server/definitions/sso_login_flow.yaml +98 -0
  53. data/data/matrix-spec/api/client-server/definitions/state_event_batch.yaml +21 -0
  54. data/data/matrix-spec/api/client-server/definitions/sync_filter.yaml +86 -0
  55. data/data/matrix-spec/api/client-server/definitions/tag.yaml +24 -0
  56. data/data/matrix-spec/api/client-server/definitions/third_party_signed.yaml +45 -0
  57. data/data/matrix-spec/api/client-server/definitions/timeline_batch.yaml +36 -0
  58. data/data/matrix-spec/api/client-server/definitions/user_identifier.yaml +27 -0
  59. data/data/matrix-spec/api/client-server/definitions/wellknown/full.yaml +38 -0
  60. data/data/matrix-spec/api/client-server/definitions/wellknown/homeserver.yaml +25 -0
  61. data/data/matrix-spec/api/client-server/definitions/wellknown/identity_server.yaml +25 -0
  62. data/data/matrix-spec/api/client-server/device_management.yaml +314 -0
  63. data/data/matrix-spec/api/client-server/directory.yaml +318 -0
  64. data/data/matrix-spec/api/client-server/event_context.yaml +161 -0
  65. data/data/matrix-spec/api/client-server/filter.yaml +224 -0
  66. data/data/matrix-spec/api/client-server/inviting.yaml +149 -0
  67. data/data/matrix-spec/api/client-server/joining.yaml +238 -0
  68. data/data/matrix-spec/api/client-server/key_backup.yaml +993 -0
  69. data/data/matrix-spec/api/client-server/keys.yaml +482 -0
  70. data/data/matrix-spec/api/client-server/kicking.yaml +110 -0
  71. data/data/matrix-spec/api/client-server/knocking.yaml +152 -0
  72. data/data/matrix-spec/api/client-server/leaving.yaml +163 -0
  73. data/data/matrix-spec/api/client-server/list_joined_rooms.yaml +68 -0
  74. data/data/matrix-spec/api/client-server/list_public_rooms.yaml +280 -0
  75. data/data/matrix-spec/api/client-server/login.yaml +321 -0
  76. data/data/matrix-spec/api/client-server/login_token.yaml +138 -0
  77. data/data/matrix-spec/api/client-server/logout.yaml +86 -0
  78. data/data/matrix-spec/api/client-server/message_pagination.yaml +194 -0
  79. data/data/matrix-spec/api/client-server/notifications.yaml +152 -0
  80. data/data/matrix-spec/api/client-server/oauth_server_metadata.yaml +238 -0
  81. data/data/matrix-spec/api/client-server/old_sync.yaml +379 -0
  82. data/data/matrix-spec/api/client-server/openid.yaml +98 -0
  83. data/data/matrix-spec/api/client-server/password_management.yaml +246 -0
  84. data/data/matrix-spec/api/client-server/peeking_events.yaml +122 -0
  85. data/data/matrix-spec/api/client-server/policy_server.yaml +82 -0
  86. data/data/matrix-spec/api/client-server/presence.yaml +169 -0
  87. data/data/matrix-spec/api/client-server/profile.yaml +366 -0
  88. data/data/matrix-spec/api/client-server/pusher.yaml +303 -0
  89. data/data/matrix-spec/api/client-server/pushrules.yaml +633 -0
  90. data/data/matrix-spec/api/client-server/read_markers.yaml +103 -0
  91. data/data/matrix-spec/api/client-server/receipts.yaml +139 -0
  92. data/data/matrix-spec/api/client-server/redaction.yaml +116 -0
  93. data/data/matrix-spec/api/client-server/refresh.yaml +119 -0
  94. data/data/matrix-spec/api/client-server/registration.yaml +488 -0
  95. data/data/matrix-spec/api/client-server/registration_tokens.yaml +93 -0
  96. data/data/matrix-spec/api/client-server/relations.yaml +382 -0
  97. data/data/matrix-spec/api/client-server/report_content.yaml +283 -0
  98. data/data/matrix-spec/api/client-server/room_event_by_timestamp.yaml +147 -0
  99. data/data/matrix-spec/api/client-server/room_initial_sync.yaml +188 -0
  100. data/data/matrix-spec/api/client-server/room_send.yaml +130 -0
  101. data/data/matrix-spec/api/client-server/room_state.yaml +159 -0
  102. data/data/matrix-spec/api/client-server/room_summary.yaml +138 -0
  103. data/data/matrix-spec/api/client-server/room_upgrades.yaml +130 -0
  104. data/data/matrix-spec/api/client-server/rooms.yaml +380 -0
  105. data/data/matrix-spec/api/client-server/search.yaml +385 -0
  106. data/data/matrix-spec/api/client-server/space_hierarchy.yaml +237 -0
  107. data/data/matrix-spec/api/client-server/sso_login_redirect.yaml +135 -0
  108. data/data/matrix-spec/api/client-server/support.yaml +142 -0
  109. data/data/matrix-spec/api/client-server/sync.yaml +692 -0
  110. data/data/matrix-spec/api/client-server/tags.yaml +183 -0
  111. data/data/matrix-spec/api/client-server/third_party_lookup.yaml +324 -0
  112. data/data/matrix-spec/api/client-server/third_party_membership.yaml +139 -0
  113. data/data/matrix-spec/api/client-server/threads_list.yaml +167 -0
  114. data/data/matrix-spec/api/client-server/to_device.yaml +104 -0
  115. data/data/matrix-spec/api/client-server/typing.yaml +103 -0
  116. data/data/matrix-spec/api/client-server/users.yaml +136 -0
  117. data/data/matrix-spec/api/client-server/versions.yaml +108 -0
  118. data/data/matrix-spec/api/client-server/voip.yaml +93 -0
  119. data/data/matrix-spec/api/client-server/wellknown.yaml +60 -0
  120. data/data/matrix-spec/api/client-server/whoami.yaml +121 -0
  121. data/data/matrix-spec/event-schemas/examples/core/event.json +6 -0
  122. data/data/matrix-spec/event-schemas/examples/core/room_edu.json +3 -0
  123. data/data/matrix-spec/event-schemas/examples/core/room_event.json +11 -0
  124. data/data/matrix-spec/event-schemas/examples/core/state_event.json +4 -0
  125. data/data/matrix-spec/event-schemas/examples/invite_room_state.json +18 -0
  126. data/data/matrix-spec/event-schemas/examples/knock_room_state.json +18 -0
  127. data/data/matrix-spec/event-schemas/examples/m.accepted_terms.yaml +10 -0
  128. data/data/matrix-spec/event-schemas/examples/m.call.answer.yaml +21 -0
  129. data/data/matrix-spec/event-schemas/examples/m.call.candidates.yaml +16 -0
  130. data/data/matrix-spec/event-schemas/examples/m.call.hangup.yaml +10 -0
  131. data/data/matrix-spec/event-schemas/examples/m.call.invite.yaml +22 -0
  132. data/data/matrix-spec/event-schemas/examples/m.call.negotiate.yaml +22 -0
  133. data/data/matrix-spec/event-schemas/examples/m.call.reject.yaml +9 -0
  134. data/data/matrix-spec/event-schemas/examples/m.call.sdp_stream_metadata_changed.yaml +16 -0
  135. data/data/matrix-spec/event-schemas/examples/m.call.select_answer.yaml +10 -0
  136. data/data/matrix-spec/event-schemas/examples/m.direct.yaml +10 -0
  137. data/data/matrix-spec/event-schemas/examples/m.dummy.yaml +4 -0
  138. data/data/matrix-spec/event-schemas/examples/m.forwarded_room_key.yaml +14 -0
  139. data/data/matrix-spec/event-schemas/examples/m.fully_read.yaml +7 -0
  140. data/data/matrix-spec/event-schemas/examples/m.identity_server.yaml +7 -0
  141. data/data/matrix-spec/event-schemas/examples/m.ignored_user_list.yaml +9 -0
  142. data/data/matrix-spec/event-schemas/examples/m.invite_permission_config.yaml +7 -0
  143. data/data/matrix-spec/event-schemas/examples/m.key.verification.accept.yaml +12 -0
  144. data/data/matrix-spec/event-schemas/examples/m.key.verification.cancel.yaml +8 -0
  145. data/data/matrix-spec/event-schemas/examples/m.key.verification.done.yaml +6 -0
  146. data/data/matrix-spec/event-schemas/examples/m.key.verification.key.yaml +7 -0
  147. data/data/matrix-spec/event-schemas/examples/m.key.verification.mac.yaml +10 -0
  148. data/data/matrix-spec/event-schemas/examples/m.key.verification.ready.yaml +10 -0
  149. data/data/matrix-spec/event-schemas/examples/m.key.verification.request.yaml +11 -0
  150. data/data/matrix-spec/event-schemas/examples/m.key.verification.start$m.sas.v1.yaml +12 -0
  151. data/data/matrix-spec/event-schemas/examples/m.key.verification.start.yaml +8 -0
  152. data/data/matrix-spec/event-schemas/examples/m.key_backup.yaml +7 -0
  153. data/data/matrix-spec/event-schemas/examples/m.marked_unread.yaml +7 -0
  154. data/data/matrix-spec/event-schemas/examples/m.policy.rule.room.yaml +10 -0
  155. data/data/matrix-spec/event-schemas/examples/m.policy.rule.server.yaml +10 -0
  156. data/data/matrix-spec/event-schemas/examples/m.policy.rule.user.yaml +10 -0
  157. data/data/matrix-spec/event-schemas/examples/m.presence.yaml +12 -0
  158. data/data/matrix-spec/event-schemas/examples/m.push_rules.yaml +177 -0
  159. data/data/matrix-spec/event-schemas/examples/m.reaction.yaml +11 -0
  160. data/data/matrix-spec/event-schemas/examples/m.receipt.yaml +18 -0
  161. data/data/matrix-spec/event-schemas/examples/m.recent_emoji.yaml +16 -0
  162. data/data/matrix-spec/event-schemas/examples/m.room.avatar.yaml +14 -0
  163. data/data/matrix-spec/event-schemas/examples/m.room.canonical_alias.yaml +12 -0
  164. data/data/matrix-spec/event-schemas/examples/m.room.create.yaml +13 -0
  165. data/data/matrix-spec/event-schemas/examples/m.room.encrypted$megolm.yaml +11 -0
  166. data/data/matrix-spec/event-schemas/examples/m.room.encrypted$olm.yaml +14 -0
  167. data/data/matrix-spec/event-schemas/examples/m.room.encryption.yaml +10 -0
  168. data/data/matrix-spec/event-schemas/examples/m.room.guest_access.yaml +8 -0
  169. data/data/matrix-spec/event-schemas/examples/m.room.history_visibility.yaml +8 -0
  170. data/data/matrix-spec/event-schemas/examples/m.room.join_rules$restricted.yaml +18 -0
  171. data/data/matrix-spec/event-schemas/examples/m.room.join_rules.yaml +8 -0
  172. data/data/matrix-spec/event-schemas/examples/m.room.member$invite_room_state.yaml +15 -0
  173. data/data/matrix-spec/event-schemas/examples/m.room.member$join_authorised_via_users_server.yaml +12 -0
  174. data/data/matrix-spec/event-schemas/examples/m.room.member$knock_room_state.yaml +15 -0
  175. data/data/matrix-spec/event-schemas/examples/m.room.member$third_party_invite.yaml +20 -0
  176. data/data/matrix-spec/event-schemas/examples/m.room.member.yaml +12 -0
  177. data/data/matrix-spec/event-schemas/examples/m.room.message$m.audio.yaml +14 -0
  178. data/data/matrix-spec/event-schemas/examples/m.room.message$m.emote.yaml +10 -0
  179. data/data/matrix-spec/event-schemas/examples/m.room.message$m.file.yaml +14 -0
  180. data/data/matrix-spec/event-schemas/examples/m.room.message$m.image.yaml +16 -0
  181. data/data/matrix-spec/event-schemas/examples/m.room.message$m.key.verification.request.yaml +19 -0
  182. data/data/matrix-spec/event-schemas/examples/m.room.message$m.location.yaml +18 -0
  183. data/data/matrix-spec/event-schemas/examples/m.room.message$m.notice.yaml +10 -0
  184. data/data/matrix-spec/event-schemas/examples/m.room.message$m.server_notice.yaml +11 -0
  185. data/data/matrix-spec/event-schemas/examples/m.room.message$m.text.yaml +10 -0
  186. data/data/matrix-spec/event-schemas/examples/m.room.message$m.video.yaml +23 -0
  187. data/data/matrix-spec/event-schemas/examples/m.room.name.yaml +8 -0
  188. data/data/matrix-spec/event-schemas/examples/m.room.pinned_events.yaml +8 -0
  189. data/data/matrix-spec/event-schemas/examples/m.room.policy.yaml +11 -0
  190. data/data/matrix-spec/event-schemas/examples/m.room.power_levels.yaml +24 -0
  191. data/data/matrix-spec/event-schemas/examples/m.room.redaction.yaml +8 -0
  192. data/data/matrix-spec/event-schemas/examples/m.room.server_acl.yaml +10 -0
  193. data/data/matrix-spec/event-schemas/examples/m.room.third_party_invite.yaml +14 -0
  194. data/data/matrix-spec/event-schemas/examples/m.room.tombstone.yaml +9 -0
  195. data/data/matrix-spec/event-schemas/examples/m.room.topic.yaml +16 -0
  196. data/data/matrix-spec/event-schemas/examples/m.room_key.withheld.yaml +12 -0
  197. data/data/matrix-spec/event-schemas/examples/m.room_key.yaml +10 -0
  198. data/data/matrix-spec/event-schemas/examples/m.room_key_request$cancel_request.yaml +8 -0
  199. data/data/matrix-spec/event-schemas/examples/m.room_key_request$request.yaml +14 -0
  200. data/data/matrix-spec/event-schemas/examples/m.secret.request.yaml +9 -0
  201. data/data/matrix-spec/event-schemas/examples/m.secret.send.yaml +7 -0
  202. data/data/matrix-spec/event-schemas/examples/m.space.child.yaml +10 -0
  203. data/data/matrix-spec/event-schemas/examples/m.space.parent.yaml +9 -0
  204. data/data/matrix-spec/event-schemas/examples/m.sticker.yaml +22 -0
  205. data/data/matrix-spec/event-schemas/examples/m.tag.yaml +9 -0
  206. data/data/matrix-spec/event-schemas/examples/m.typing.yaml +7 -0
  207. data/data/matrix-spec/event-schemas/moderation_policy_rule.yaml +32 -0
  208. data/data/matrix-spec/event-schemas/schema/components/m_text_content_block.yaml +28 -0
  209. data/data/matrix-spec/event-schemas/schema/components/sdp_stream_metadata.yaml +43 -0
  210. data/data/matrix-spec/event-schemas/schema/components/signed_third_party_invite.yaml +48 -0
  211. data/data/matrix-spec/event-schemas/schema/core-event-schema/call_event.yaml +27 -0
  212. data/data/matrix-spec/event-schemas/schema/core-event-schema/event.yaml +16 -0
  213. data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/avatar_info.yaml +30 -0
  214. data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml +52 -0
  215. data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml +22 -0
  216. data/data/matrix-spec/event-schemas/schema/core-event-schema/room_event.yaml +17 -0
  217. data/data/matrix-spec/event-schemas/schema/core-event-schema/state_event.yaml +8 -0
  218. data/data/matrix-spec/event-schemas/schema/core-event-schema/stripped_state.yaml +48 -0
  219. data/data/matrix-spec/event-schemas/schema/core-event-schema/sync_room_event.yaml +49 -0
  220. data/data/matrix-spec/event-schemas/schema/core-event-schema/sync_state_event.yaml +36 -0
  221. data/data/matrix-spec/event-schemas/schema/core-event-schema/unsigned_prop.yaml +23 -0
  222. data/data/matrix-spec/event-schemas/schema/m.accepted_terms.yaml +25 -0
  223. data/data/matrix-spec/event-schemas/schema/m.call.answer.yaml +44 -0
  224. data/data/matrix-spec/event-schemas/schema/m.call.candidates.yaml +52 -0
  225. data/data/matrix-spec/event-schemas/schema/m.call.hangup.yaml +57 -0
  226. data/data/matrix-spec/event-schemas/schema/m.call.invite.yaml +53 -0
  227. data/data/matrix-spec/event-schemas/schema/m.call.negotiate.yaml +78 -0
  228. data/data/matrix-spec/event-schemas/schema/m.call.reject.yaml +29 -0
  229. data/data/matrix-spec/event-schemas/schema/m.call.sdp_stream_metadata_changed.yaml +24 -0
  230. data/data/matrix-spec/event-schemas/schema/m.call.select_answer.yaml +29 -0
  231. data/data/matrix-spec/event-schemas/schema/m.direct.yaml +29 -0
  232. data/data/matrix-spec/event-schemas/schema/m.dummy.yaml +25 -0
  233. data/data/matrix-spec/event-schemas/schema/m.forwarded_room_key.yaml +70 -0
  234. data/data/matrix-spec/event-schemas/schema/m.fully_read.yaml +26 -0
  235. data/data/matrix-spec/event-schemas/schema/m.identity_server.yaml +28 -0
  236. data/data/matrix-spec/event-schemas/schema/m.ignored_user_list.yaml +30 -0
  237. data/data/matrix-spec/event-schemas/schema/m.invite_permission_config.yaml +21 -0
  238. data/data/matrix-spec/event-schemas/schema/m.key.verification.accept.yaml +63 -0
  239. data/data/matrix-spec/event-schemas/schema/m.key.verification.cancel.yaml +72 -0
  240. data/data/matrix-spec/event-schemas/schema/m.key.verification.done.yaml +24 -0
  241. data/data/matrix-spec/event-schemas/schema/m.key.verification.key.yaml +31 -0
  242. data/data/matrix-spec/event-schemas/schema/m.key.verification.m.relates_to.yaml +23 -0
  243. data/data/matrix-spec/event-schemas/schema/m.key.verification.mac.yaml +43 -0
  244. data/data/matrix-spec/event-schemas/schema/m.key.verification.ready.yaml +41 -0
  245. data/data/matrix-spec/event-schemas/schema/m.key.verification.request.yaml +47 -0
  246. data/data/matrix-spec/event-schemas/schema/m.key.verification.start$m.reciprocate.v1.yaml +45 -0
  247. data/data/matrix-spec/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml +76 -0
  248. data/data/matrix-spec/event-schemas/schema/m.key.verification.start.yaml +46 -0
  249. data/data/matrix-spec/event-schemas/schema/m.key_backup.yaml +24 -0
  250. data/data/matrix-spec/event-schemas/schema/m.marked_unread.yaml +26 -0
  251. data/data/matrix-spec/event-schemas/schema/m.policy.rule.room.yaml +17 -0
  252. data/data/matrix-spec/event-schemas/schema/m.policy.rule.server.yaml +17 -0
  253. data/data/matrix-spec/event-schemas/schema/m.policy.rule.user.yaml +17 -0
  254. data/data/matrix-spec/event-schemas/schema/m.presence.yaml +50 -0
  255. data/data/matrix-spec/event-schemas/schema/m.push_rules.yaml +23 -0
  256. data/data/matrix-spec/event-schemas/schema/m.reaction.yaml +45 -0
  257. data/data/matrix-spec/event-schemas/schema/m.receipt.yaml +65 -0
  258. data/data/matrix-spec/event-schemas/schema/m.recent_emoji.yaml +29 -0
  259. data/data/matrix-spec/event-schemas/schema/m.room.avatar.yaml +29 -0
  260. data/data/matrix-spec/event-schemas/schema/m.room.canonical_alias.yaml +40 -0
  261. data/data/matrix-spec/event-schemas/schema/m.room.create.yaml +86 -0
  262. data/data/matrix-spec/event-schemas/schema/m.room.encrypted.yaml +91 -0
  263. data/data/matrix-spec/event-schemas/schema/m.room.encryption.yaml +38 -0
  264. data/data/matrix-spec/event-schemas/schema/m.room.guest_access.yaml +28 -0
  265. data/data/matrix-spec/event-schemas/schema/m.room.history_visibility.yaml +30 -0
  266. data/data/matrix-spec/event-schemas/schema/m.room.join_rules.yaml +78 -0
  267. data/data/matrix-spec/event-schemas/schema/m.room.member.yaml +174 -0
  268. data/data/matrix-spec/event-schemas/schema/m.room.message$m.audio.yaml +73 -0
  269. data/data/matrix-spec/event-schemas/schema/m.room.message$m.emote.yaml +36 -0
  270. data/data/matrix-spec/event-schemas/schema/m.room.message$m.file.yaml +85 -0
  271. data/data/matrix-spec/event-schemas/schema/m.room.message$m.image.yaml +63 -0
  272. data/data/matrix-spec/event-schemas/schema/m.room.message$m.key.verification.request.yaml +70 -0
  273. data/data/matrix-spec/event-schemas/schema/m.room.message$m.location.yaml +50 -0
  274. data/data/matrix-spec/event-schemas/schema/m.room.message$m.notice.yaml +36 -0
  275. data/data/matrix-spec/event-schemas/schema/m.room.message$m.server_notice.yaml +41 -0
  276. data/data/matrix-spec/event-schemas/schema/m.room.message$m.text.yaml +36 -0
  277. data/data/matrix-spec/event-schemas/schema/m.room.message$m.video.yaml +95 -0
  278. data/data/matrix-spec/event-schemas/schema/m.room.message.yaml +25 -0
  279. data/data/matrix-spec/event-schemas/schema/m.room.name.yaml +35 -0
  280. data/data/matrix-spec/event-schemas/schema/m.room.pinned_events.yaml +27 -0
  281. data/data/matrix-spec/event-schemas/schema/m.room.policy.yaml +41 -0
  282. data/data/matrix-spec/event-schemas/schema/m.room.power_levels.yaml +139 -0
  283. data/data/matrix-spec/event-schemas/schema/m.room.redaction.yaml +29 -0
  284. data/data/matrix-spec/event-schemas/schema/m.room.server_acl.yaml +88 -0
  285. data/data/matrix-spec/event-schemas/schema/m.room.third_party_invite.yaml +79 -0
  286. data/data/matrix-spec/event-schemas/schema/m.room.tombstone.yaml +29 -0
  287. data/data/matrix-spec/event-schemas/schema/m.room.topic.yaml +53 -0
  288. data/data/matrix-spec/event-schemas/schema/m.room_key.withheld.yaml +88 -0
  289. data/data/matrix-spec/event-schemas/schema/m.room_key.yaml +38 -0
  290. data/data/matrix-spec/event-schemas/schema/m.room_key_request.yaml +73 -0
  291. data/data/matrix-spec/event-schemas/schema/m.secret.request.yaml +42 -0
  292. data/data/matrix-spec/event-schemas/schema/m.secret.send.yaml +35 -0
  293. data/data/matrix-spec/event-schemas/schema/m.space.child.yaml +50 -0
  294. data/data/matrix-spec/event-schemas/schema/m.space.parent.yaml +36 -0
  295. data/data/matrix-spec/event-schemas/schema/m.sticker.yaml +36 -0
  296. data/data/matrix-spec/event-schemas/schema/m.tag.yaml +28 -0
  297. data/data/matrix-spec/event-schemas/schema/m.typing.yaml +29 -0
  298. data/lib/async/matrix/api/chain.rb +575 -0
  299. data/lib/async/matrix/api/concat.rb +105 -0
  300. data/lib/async/matrix/api/path_tree.rb +208 -0
  301. data/lib/async/matrix/api.rb +204 -0
  302. data/lib/async/matrix/application_service/bot.rb +235 -0
  303. data/lib/async/matrix/application_service/config/schema/analytics.json +21 -0
  304. data/lib/async/matrix/application_service/config/schema/appservice.json +82 -0
  305. data/lib/async/matrix/application_service/config/schema/backfill.json +91 -0
  306. data/lib/async/matrix/application_service/config/schema/bridge.json +209 -0
  307. data/lib/async/matrix/application_service/config/schema/config.json +61 -0
  308. data/lib/async/matrix/application_service/config/schema/database.json +38 -0
  309. data/lib/async/matrix/application_service/config/schema/direct_media.json +35 -0
  310. data/lib/async/matrix/application_service/config/schema/double_puppet.json +24 -0
  311. data/lib/async/matrix/application_service/config/schema/encryption.json +164 -0
  312. data/lib/async/matrix/application_service/config/schema/homeserver.json +58 -0
  313. data/lib/async/matrix/application_service/config/schema/logging.json +50 -0
  314. data/lib/async/matrix/application_service/config/schema/management_room_texts.json +25 -0
  315. data/lib/async/matrix/application_service/config/schema/matrix.json +45 -0
  316. data/lib/async/matrix/application_service/config/schema/permissions.json +54 -0
  317. data/lib/async/matrix/application_service/config/schema/provisioning.json +23 -0
  318. data/lib/async/matrix/application_service/config/schema/public_media.json +39 -0
  319. data/lib/async/matrix/application_service/config/schema/relay.json +43 -0
  320. data/lib/async/matrix/application_service/config/vivify.rb +110 -0
  321. data/lib/async/matrix/application_service/config.rb +214 -123
  322. data/lib/async/matrix/application_service/dispatcher.rb +115 -113
  323. data/lib/async/matrix/application_service/error_response.rb +26 -26
  324. data/lib/async/matrix/application_service/event.rb +217 -1
  325. data/lib/async/matrix/application_service/server.rb +286 -215
  326. data/lib/async/matrix/application_service/transaction.rb +52 -52
  327. data/lib/async/matrix/application_service/transaction_store.rb +62 -62
  328. data/lib/async/matrix/client.rb +919 -179
  329. data/lib/async/matrix/connection.rb +8 -8
  330. data/lib/async/matrix/endpoint.rb +45 -45
  331. data/lib/async/matrix/error.rb +49 -43
  332. data/lib/async/matrix/media_client.rb +173 -0
  333. data/lib/async/matrix/notifier.rb +92 -92
  334. data/lib/async/matrix/schema/registry.rb +355 -0
  335. data/lib/async/matrix/schema/validation_error.rb +226 -0
  336. data/lib/async/matrix/schema.rb +174 -0
  337. data/lib/async/matrix/server.rb +7 -7
  338. data/lib/async/matrix/stream.rb +7 -7
  339. data/lib/async/matrix/version.rb +1 -1
  340. data/lib/async/matrix.rb +2 -2
  341. metadata +353 -1
@@ -0,0 +1,482 @@
1
+ # Copyright 2016 OpenMarket Ltd
2
+ # Copyright 2018 New Vector Ltd
3
+ # Copyright 2020 The Matrix.org Foundation C.I.C.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ openapi: 3.1.0
17
+ info:
18
+ title: Matrix Client-Server Client Config API
19
+ version: 1.0.0
20
+ paths:
21
+ /keys/upload:
22
+ post:
23
+ summary: Upload end-to-end encryption keys.
24
+ description: Publishes end-to-end encryption keys for the device.
25
+ operationId: uploadKeys
26
+ security:
27
+ - accessTokenQuery: []
28
+ - accessTokenBearer: []
29
+ requestBody:
30
+ content:
31
+ application/json:
32
+ schema:
33
+ type: object
34
+ properties:
35
+ device_keys:
36
+ description: |-
37
+ Identity keys for the device. May be absent if no new
38
+ identity keys are required.
39
+ allOf:
40
+ - $ref: definitions/device_keys.yaml
41
+ one_time_keys:
42
+ allOf:
43
+ - $ref: "definitions/one_time_keys.yaml"
44
+ type: object
45
+ description: |-
46
+ One-time public keys for "pre-key" messages. The names of
47
+ the properties should be in the format
48
+ `<algorithm>:<key_id>`. The format of the key is determined
49
+ by the [key algorithm](/client-server-api/#key-algorithms).
50
+
51
+ May be absent if no new one-time keys are required.
52
+ example:
53
+ signed_curve25519:AAAAHg:
54
+ key: zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs
55
+ signatures:
56
+ "@alice:example.com":
57
+ ed25519:JLAFKJWSCS: FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw
58
+ signed_curve25519:AAAAHQ:
59
+ key: j3fR3HemM16M7CWhoI4Sk5ZsdmdfQHsKL1xuSft6MSw
60
+ signatures:
61
+ "@alice:example.com":
62
+ ed25519:JLAFKJWSCS: IQeCEPb9HFk217cU9kw9EOiusC6kMIkoIRnbnfOh5Oc63S1ghgyjShBGpu34blQomoalCyXWyhaaT3MrLZYQAA
63
+ fallback_keys:
64
+ x-addedInMatrixVersion: "1.2"
65
+ allOf:
66
+ - $ref: "definitions/one_time_keys.yaml"
67
+ type: object
68
+ description: |-
69
+ The public key which should be used if the device's one-time keys
70
+ are exhausted. The fallback key is not deleted once used, but should
71
+ be replaced when additional one-time keys are being uploaded. The
72
+ server will notify the client of the fallback key being used through
73
+ `/sync`.
74
+
75
+ There can only be at most one key per algorithm uploaded, and the server
76
+ will only persist one key per algorithm.
77
+
78
+ When uploading a signed key, an additional `fallback: true` key should
79
+ be included to denote that the key is a fallback key.
80
+
81
+ May be absent if a new fallback key is not required.
82
+ example:
83
+ signed_curve25519:AAAAGj:
84
+ key: zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs
85
+ fallback: true
86
+ signatures:
87
+ "@alice:example.com":
88
+ ed25519:JLAFKJWSCS: FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw
89
+ description: The keys to be published
90
+ required: true
91
+ responses:
92
+ "200":
93
+ description: The provided keys were successfully uploaded.
94
+ content:
95
+ application/json:
96
+ schema:
97
+ type: object
98
+ properties:
99
+ one_time_key_counts:
100
+ type: object
101
+ additionalProperties:
102
+ type: integer
103
+ description: |-
104
+ For each key algorithm, the number of unclaimed one-time keys
105
+ of that type currently held on the server for this device.
106
+ If an algorithm is not listed, the count for that algorithm
107
+ is to be assumed zero.
108
+ example:
109
+ signed_curve25519: 20
110
+ required:
111
+ - one_time_key_counts
112
+ tags:
113
+ - End-to-end encryption
114
+ /keys/query:
115
+ post:
116
+ summary: Download device identity keys.
117
+ description: Returns the current devices and identity keys for the given users.
118
+ operationId: queryKeys
119
+ security:
120
+ - accessTokenQuery: []
121
+ - accessTokenBearer: []
122
+ requestBody:
123
+ content:
124
+ application/json:
125
+ schema:
126
+ type: object
127
+ properties:
128
+ timeout:
129
+ type: integer
130
+ description: |-
131
+ The time (in milliseconds) to wait when downloading keys from
132
+ remote servers. 10 seconds is the recommended default.
133
+ example: 10000
134
+ device_keys:
135
+ type: object
136
+ description: |-
137
+ The keys to be downloaded. A map from user ID, to a list of
138
+ device IDs, or to an empty list to indicate all devices for the
139
+ corresponding user.
140
+ patternProperties:
141
+ "^@":
142
+ x-pattern-format: mx-user-id
143
+ type: array
144
+ items:
145
+ type: string
146
+ description: device ID
147
+ example:
148
+ "@alice:example.com": []
149
+ required:
150
+ - device_keys
151
+ description: Query defining the keys to be downloaded
152
+ required: true
153
+ responses:
154
+ "200":
155
+ description: The device information
156
+ content:
157
+ application/json:
158
+ schema:
159
+ type: object
160
+ properties:
161
+ failures:
162
+ type: object
163
+ description: |-
164
+ If any remote homeservers could not be reached, they are
165
+ recorded here. The names of the properties are the names of
166
+ the unreachable servers.
167
+
168
+ If the homeserver could be reached, but the user or device
169
+ was unknown, no failure is recorded. Instead, the corresponding
170
+ user or device is missing from the `device_keys` result.
171
+ additionalProperties:
172
+ type: object
173
+ example: {}
174
+ device_keys:
175
+ type: object
176
+ description: |-
177
+ Information on the queried devices. A map from user ID, to a
178
+ map from device ID to device information. For each device,
179
+ the information returned will be the same as uploaded via
180
+ `/keys/upload`, with the addition of an `unsigned`
181
+ property.
182
+ patternProperties:
183
+ "^@":
184
+ x-pattern-format: mx-user-id
185
+ type: object
186
+ additionalProperties:
187
+ title: DeviceInformation
188
+ allOf:
189
+ - $ref: definitions/device_keys.yaml
190
+ properties:
191
+ unsigned:
192
+ title: UnsignedDeviceInfo
193
+ type: object
194
+ description: |-
195
+ Additional data added to the device key information
196
+ by intermediate servers, and not covered by the
197
+ signatures.
198
+ properties:
199
+ device_display_name:
200
+ type: string
201
+ description: The display name which the user set on the device.
202
+ example:
203
+ "@alice:example.com":
204
+ JLAFKJWSCS:
205
+ user_id: "@alice:example.com"
206
+ device_id: JLAFKJWSCS
207
+ algorithms:
208
+ - m.olm.v1.curve25519-aes-sha2
209
+ - m.megolm.v1.aes-sha2
210
+ keys:
211
+ curve25519:JLAFKJWSCS: 3C5BFWi2Y8MaVvjM8M22DBmh24PmgR0nPvJOIArzgyI
212
+ ed25519:JLAFKJWSCS: lEuiRJBit0IG6nUf5pUzWTUEsRVVe/HJkoKuEww9ULI
213
+ signatures:
214
+ "@alice:example.com":
215
+ ed25519:JLAFKJWSCS: dSO80A01XiigH3uBiDVx/EjzaoycHcjq9lfQX0uWsqxl2giMIiSPR8a4d291W1ihKJL/a+myXS367WT6NAIcBA
216
+ unsigned:
217
+ device_display_name: Alice's mobile phone
218
+ master_keys:
219
+ x-addedInMatrixVersion: "1.1"
220
+ type: object
221
+ description: |-
222
+ Information on the master signing keys of the queried users.
223
+ A map from user ID, to master signing key information. For each key, the
224
+ information returned will be the same as uploaded via
225
+ `/keys/device_signing/upload`, along with the signatures
226
+ uploaded via `/keys/signatures/upload` that the requesting user
227
+ is allowed to see.
228
+ patternProperties:
229
+ "^@":
230
+ x-pattern-format: mx-user-id
231
+ allOf:
232
+ - $ref: definitions/cross_signing_key.yaml
233
+ example:
234
+ "@alice:example.com":
235
+ user_id: "@alice:example.com"
236
+ usage:
237
+ - master
238
+ keys:
239
+ ed25519:base64+master+public+key: base64+master+public+key
240
+ self_signing_keys:
241
+ x-addedInMatrixVersion: "1.1"
242
+ type: object
243
+ description: |-
244
+ Information on the self-signing keys of the queried users. A map
245
+ from user ID, to self-signing key information. For each key, the
246
+ information returned will be the same as uploaded via
247
+ `/keys/device_signing/upload`.
248
+ patternProperties:
249
+ "^@":
250
+ x-pattern-format: mx-user-id
251
+ allOf:
252
+ - $ref: definitions/cross_signing_key.yaml
253
+ example:
254
+ "@alice:example.com":
255
+ user_id: "@alice:example.com"
256
+ usage:
257
+ - self_signing
258
+ keys:
259
+ ed25519:base64+self+signing+public+key: base64+self+signing+master+public+key
260
+ signatures:
261
+ "@alice:example.com":
262
+ ed25519:base64+master+public+key: signature+of+self+signing+key
263
+ user_signing_keys:
264
+ type: object
265
+ description: |-
266
+ Information on the user-signing key of the user making the
267
+ request, if they queried their own device information. A map
268
+ from user ID, to user-signing key information. The
269
+ information returned will be the same as uploaded via
270
+ `/keys/device_signing/upload`.
271
+ patternProperties:
272
+ "^@":
273
+ x-pattern-format: mx-user-id
274
+ allOf:
275
+ - $ref: definitions/cross_signing_key.yaml
276
+ example:
277
+ "@alice:example.com":
278
+ user_id: "@alice:example.com"
279
+ usage:
280
+ - user_signing
281
+ keys:
282
+ ed25519:base64+user+signing+public+key: base64+user+signing+master+public+key
283
+ signatures:
284
+ "@alice:example.com":
285
+ ed25519:base64+master+public+key: signature+of+user+signing+key
286
+ tags:
287
+ - End-to-end encryption
288
+ /keys/claim:
289
+ post:
290
+ summary: Claim one-time encryption keys.
291
+ description: |-
292
+ Claims one-time keys for use in pre-key messages.
293
+
294
+ The request contains the user ID, device ID and algorithm name of the
295
+ keys that are required. If a key matching these requirements can be
296
+ found, the response contains it. The returned key is a one-time key
297
+ if one is available, and otherwise a fallback key.
298
+
299
+ One-time keys are given out in the order that they were uploaded via
300
+ [/keys/upload](/client-server-api/#post_matrixclientv3keysupload). (All
301
+ keys uploaded within a given call to `/keys/upload` are considered
302
+ equivalent in this regard; no ordering is specified within them.)
303
+
304
+ Servers must ensure that each one-time key is returned at most once,
305
+ so when a key has been returned, no other request will ever return
306
+ the same key.
307
+ operationId: claimKeys
308
+ security:
309
+ - accessTokenQuery: []
310
+ - accessTokenBearer: []
311
+ requestBody:
312
+ content:
313
+ application/json:
314
+ schema:
315
+ type: object
316
+ properties:
317
+ timeout:
318
+ type: integer
319
+ description: |-
320
+ The time (in milliseconds) to wait when downloading keys from
321
+ remote servers. 10 seconds is the recommended default.
322
+ example: 10000
323
+ one_time_keys:
324
+ type: object
325
+ description: |-
326
+ The keys to be claimed. A map from user ID, to a map from
327
+ device ID to algorithm name.
328
+ patternProperties:
329
+ "^@":
330
+ x-pattern-format: mx-user-id
331
+ type: object
332
+ additionalProperties:
333
+ type: string
334
+ description: algorithm
335
+ example: signed_curve25519
336
+ example:
337
+ "@alice:example.com":
338
+ JLAFKJWSCS: signed_curve25519
339
+ required:
340
+ - one_time_keys
341
+ description: Query defining the keys to be claimed
342
+ required: true
343
+ responses:
344
+ "200":
345
+ description: The claimed keys.
346
+ content:
347
+ application/json:
348
+ schema:
349
+ type: object
350
+ properties:
351
+ failures:
352
+ type: object
353
+ description: |-
354
+ If any remote homeservers could not be reached, they are
355
+ recorded here. The names of the properties are the names of
356
+ the unreachable servers.
357
+
358
+ If the homeserver could be reached, but the user or device
359
+ was unknown, no failure is recorded. Instead, the corresponding
360
+ user or device is missing from the `one_time_keys` result.
361
+ additionalProperties:
362
+ type: object
363
+ example: {}
364
+ one_time_keys:
365
+ type: object
366
+ description: |-
367
+ One-time keys for the queried devices. A map from user ID, to a
368
+ map from devices to a map from `<algorithm>:<key_id>` to the key object.
369
+
370
+ See the [key algorithms](/client-server-api/#key-algorithms) section for information
371
+ on the Key Object format.
372
+
373
+ If necessary, the claimed key might be a fallback key. Fallback
374
+ keys are re-used by the server until replaced by the device.
375
+ patternProperties:
376
+ "^@":
377
+ x-pattern-format: mx-user-id
378
+ type: object
379
+ additionalProperties:
380
+ $ref: "definitions/one_time_keys.yaml"
381
+ example:
382
+ "@alice:example.com":
383
+ JLAFKJWSCS:
384
+ signed_curve25519:AAAAHg:
385
+ key: zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs
386
+ signatures:
387
+ "@alice:example.com":
388
+ ed25519:JLAFKJWSCS: FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw
389
+ required:
390
+ - one_time_keys
391
+ tags:
392
+ - End-to-end encryption
393
+ /keys/changes:
394
+ get:
395
+ summary: Query users with recent device key updates.
396
+ description: |-
397
+ Gets a list of users who have updated their device identity keys since a
398
+ previous sync token.
399
+
400
+ The server should include in the results any users who:
401
+
402
+ * currently share a room with the calling user (ie, both users have
403
+ membership state `join`); *and*
404
+ * added new device identity keys or removed an existing device with
405
+ identity keys, between `from` and `to`.
406
+ operationId: getKeysChanges
407
+ security:
408
+ - accessTokenQuery: []
409
+ - accessTokenBearer: []
410
+ parameters:
411
+ - in: query
412
+ name: from
413
+ description: |-
414
+ The desired start point of the list. Should be the `next_batch` field
415
+ from a response to an earlier call to [`/sync`](/client-server-api/#get_matrixclientv3sync). Users who have not
416
+ uploaded new device identity keys since this point, nor deleted
417
+ existing devices with identity keys since then, will be excluded
418
+ from the results.
419
+ required: true
420
+ example: s72594_4483_1934
421
+ schema:
422
+ type: string
423
+ - in: query
424
+ name: to
425
+ description: |-
426
+ The desired end point of the list. Should be the `next_batch`
427
+ field from a recent call to [`/sync`](/client-server-api/#get_matrixclientv3sync) - typically the most recent
428
+ such call. This may be used by the server as a hint to check its
429
+ caches are up to date.
430
+ required: true
431
+ example: s75689_5632_2435
432
+ schema:
433
+ type: string
434
+ responses:
435
+ "200":
436
+ description: The list of users who updated their devices.
437
+ content:
438
+ application/json:
439
+ schema:
440
+ type: object
441
+ properties:
442
+ changed:
443
+ type: array
444
+ items:
445
+ type: string
446
+ description: |-
447
+ The Matrix User IDs of all users who updated their device
448
+ identity keys.
449
+ example:
450
+ - "@alice:example.com"
451
+ - "@bob:example.org"
452
+ left:
453
+ type: array
454
+ items:
455
+ type: string
456
+ description: |-
457
+ The Matrix User IDs of all users who may have left all
458
+ the end-to-end encrypted rooms they previously shared
459
+ with the user.
460
+ example:
461
+ - "@clara:example.com"
462
+ - "@doug:example.org"
463
+ tags:
464
+ - End-to-end encryption
465
+ servers:
466
+ - url: "{protocol}://{hostname}{basePath}"
467
+ variables:
468
+ protocol:
469
+ enum:
470
+ - http
471
+ - https
472
+ default: https
473
+ hostname:
474
+ default: localhost:8008
475
+ basePath:
476
+ default: /_matrix/client/v3
477
+ components:
478
+ securitySchemes:
479
+ accessTokenQuery:
480
+ $ref: definitions/security.yaml#/accessTokenQuery
481
+ accessTokenBearer:
482
+ $ref: definitions/security.yaml#/accessTokenBearer
@@ -0,0 +1,110 @@
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 Room Kicking API
17
+ version: 1.0.0
18
+ paths:
19
+ "/rooms/{roomId}/kick":
20
+ post:
21
+ summary: Kick a user from the room.
22
+ description: |-
23
+ Kick a user from the room.
24
+
25
+ The caller must have the required power level in order to perform this operation.
26
+
27
+ Kicking a user adjusts the target member's membership state to be `leave` with an
28
+ optional `reason`. Like with other membership changes, a user can directly adjust
29
+ the target member's state by making a request to `/rooms/<room id>/state/m.room.member/<user id>`.
30
+ operationId: kick
31
+ security:
32
+ - accessTokenQuery: []
33
+ - accessTokenBearer: []
34
+ parameters:
35
+ - in: path
36
+ name: roomId
37
+ description: The room identifier (not alias) from which the user should be kicked.
38
+ required: true
39
+ example: "!e42d8c:matrix.org"
40
+ schema:
41
+ type: string
42
+ requestBody:
43
+ content:
44
+ application/json:
45
+ schema:
46
+ type: object
47
+ example: {
48
+ "reason": "Telling unfunny jokes",
49
+ "user_id": "@cheeky_monkey:matrix.org"
50
+ }
51
+ properties:
52
+ user_id:
53
+ type: string
54
+ description: The fully qualified user ID of the user being kicked.
55
+ reason:
56
+ type: string
57
+ description: |-
58
+ The reason the user has been kicked. This will be supplied as the
59
+ `reason` on the target's updated [`m.room.member`](/client-server-api/#mroommember) event.
60
+ required:
61
+ - user_id
62
+ required: true
63
+ responses:
64
+ "200":
65
+ description: The user has been kicked from the room.
66
+ content:
67
+ application/json:
68
+ schema:
69
+ type: object
70
+ examples:
71
+ response:
72
+ value: {}
73
+ "403":
74
+ description: |-
75
+ You do not have permission to kick the user from the room. A meaningful `errcode` and
76
+ description error text will be returned. Example reasons for rejections are:
77
+
78
+ - The kicker is not currently in the room.
79
+ - The kickee is not currently in the room.
80
+ - The kicker's power level is insufficient to kick users from the room.
81
+ content:
82
+ application/json:
83
+ schema:
84
+ $ref: definitions/errors/error.yaml
85
+ examples:
86
+ response:
87
+ value: {
88
+ "errcode": "M_FORBIDDEN",
89
+ "error": "You do not have a high enough power level to kick from this room."
90
+ }
91
+ tags:
92
+ - Room membership
93
+ servers:
94
+ - url: "{protocol}://{hostname}{basePath}"
95
+ variables:
96
+ protocol:
97
+ enum:
98
+ - http
99
+ - https
100
+ default: https
101
+ hostname:
102
+ default: localhost:8008
103
+ basePath:
104
+ default: /_matrix/client/v3
105
+ components:
106
+ securitySchemes:
107
+ accessTokenQuery:
108
+ $ref: definitions/security.yaml#/accessTokenQuery
109
+ accessTokenBearer:
110
+ $ref: definitions/security.yaml#/accessTokenBearer