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.
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 +5 -2
  341. metadata +353 -1
@@ -0,0 +1,306 @@
1
+ # Copyright 2016 OpenMarket Ltd
2
+ # Copyright 2018 New Vector Ltd
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ openapi: 3.1.0
16
+ info:
17
+ title: Matrix Client-Server Room Creation API
18
+ version: 1.0.0
19
+ paths:
20
+ /createRoom:
21
+ post:
22
+ summary: Create a new room
23
+ description: |-
24
+ Create a new room with various configuration options.
25
+
26
+ The server MUST apply the normal state resolution rules when creating
27
+ the new room, including checking power levels for each event. It MUST
28
+ apply the events implied by the request in the following order:
29
+
30
+ 1. The `m.room.create` event itself. Must be the first event in the
31
+ room.
32
+
33
+ 2. An `m.room.member` event for the creator to join the room. This is
34
+ needed so the remaining events can be sent.
35
+
36
+ 3. A default `m.room.power_levels` event. Overridden by the
37
+ `power_level_content_override` parameter.
38
+
39
+ In [room versions](/rooms) 1 through 11, the room creator (and not
40
+ other members) will be given permission to send state events.
41
+
42
+ In room versions 12 and later, the room creator is given infinite
43
+ power level and cannot be specified in the `users` field of
44
+ `m.room.power_levels`, so is not listed explicitly.
45
+
46
+ **Note**: For `trusted_private_chat`, the users specified in the
47
+ `invite` parameter SHOULD also be appended to `additional_creators`
48
+ by the server, per the `creation_content` parameter.
49
+
50
+ If the room's version is 12 or higher, the power level for sending
51
+ `m.room.tombstone` events MUST explicitly be higher than `state_default`.
52
+ For example, set to 150 instead of 100.
53
+
54
+ 4. An `m.room.canonical_alias` event if `room_alias_name` is given.
55
+
56
+ 5. Events set by the `preset`. Currently these are the `m.room.join_rules`,
57
+ `m.room.history_visibility`, and `m.room.guest_access` state events.
58
+
59
+ 6. Events listed in `initial_state`, in the order that they are
60
+ listed.
61
+
62
+ 7. Events implied by `name` and `topic` (`m.room.name` and `m.room.topic`
63
+ state events).
64
+
65
+ 8. Invite events implied by `invite` and `invite_3pid` (`m.room.member` with
66
+ `membership: invite` and `m.room.third_party_invite`).
67
+
68
+ The available presets do the following with respect to room state:
69
+
70
+ | Preset | `join_rules` | `history_visibility` | `guest_access` | Other |
71
+ |------------------------|--------------|----------------------|----------------|-------|
72
+ | `private_chat` | `invite` | `shared` | `can_join` | |
73
+ | `trusted_private_chat` | `invite` | `shared` | `can_join` | All invitees are given the same power level as the room creator. |
74
+ | `public_chat` | `public` | `shared` | `forbidden` | |
75
+
76
+ The server will create a `m.room.create` event in the room with the
77
+ requesting user as the creator, alongside other keys provided in the
78
+ `creation_content` or implied by behaviour of `creation_content`.
79
+ operationId: createRoom
80
+ x-changedInMatrixVersion:
81
+ "1.16": Added server behaviour for how the initial power levels change depending on room version.
82
+ security:
83
+ - accessTokenQuery: []
84
+ - accessTokenBearer: []
85
+ requestBody:
86
+ content:
87
+ application/json:
88
+ schema:
89
+ type: object
90
+ example: {
91
+ "preset": "public_chat",
92
+ "room_alias_name": "thepub",
93
+ "name": "The Grand Duke Pub",
94
+ "topic": "All about happy hour",
95
+ "creation_content": {
96
+ "m.federate": false
97
+ }
98
+ }
99
+ properties:
100
+ visibility:
101
+ type: string
102
+ enum:
103
+ - public
104
+ - private
105
+ description: |-
106
+ The room's visibility in the server's
107
+ [published room directory](/client-server-api#published-room-directory).
108
+ Defaults to `private`.
109
+ room_alias_name:
110
+ type: string
111
+ description: |-
112
+ The desired room alias **local part**. If this is included, a
113
+ room alias will be created and mapped to the newly created
114
+ room. The alias will belong on the *same* homeserver which
115
+ created the room. For example, if this was set to "foo" and
116
+ sent to the homeserver "example.com" the complete room alias
117
+ would be `#foo:example.com`.
118
+
119
+ The complete room alias will become the canonical alias for
120
+ the room and an `m.room.canonical_alias` event will be sent
121
+ into the room.
122
+ name:
123
+ type: string
124
+ description: |-
125
+ If this is included, an [`m.room.name`](/client-server-api/#mroomname) event
126
+ will be sent into the room to indicate the name for the room.
127
+ This overwrites any [`m.room.name`](/client-server-api/#mroomname)
128
+ event in `initial_state`.
129
+ topic:
130
+ type: string
131
+ description: |-
132
+ If this is included, an [`m.room.topic`](/client-server-api/#mroomtopic)
133
+ event with a `text/plain` mimetype will be sent into the room
134
+ to indicate the topic for the room. This overwrites any
135
+ [`m.room.topic`](/client-server-api/#mroomtopic) event in `initial_state`.
136
+ invite:
137
+ type: array
138
+ description: |-
139
+ A list of user IDs to invite to the room. This will tell the
140
+ server to invite everyone in the list to the newly created room.
141
+ items:
142
+ type: string
143
+ invite_3pid:
144
+ type: array
145
+ description: |-
146
+ A list of objects representing third-party IDs to invite into
147
+ the room.
148
+ items:
149
+ $ref: definitions/invite_3pid.yaml
150
+ room_version:
151
+ type: string
152
+ description: |-
153
+ The room version to set for the room. If not provided, the homeserver is
154
+ to use its configured default. If provided, the homeserver will return a
155
+ 400 error with the errcode `M_UNSUPPORTED_ROOM_VERSION` if it does not
156
+ support the room version.
157
+ example: "1"
158
+ creation_content:
159
+ title: CreationContent
160
+ type: object
161
+ x-changedInMatrixVersion:
162
+ "1.16": Added server behaviour for how to handle `trusted_private_chat` and invited users.
163
+ description: |-
164
+ Extra keys, such as `m.federate`, to be added to the content
165
+ of the [`m.room.create`](/client-server-api/#mroomcreate) event.
166
+
167
+ The server will overwrite the following
168
+ keys: `creator`, `room_version`. Future versions of the specification
169
+ may allow the server to overwrite other keys.
170
+
171
+ When using the `trusted_private_chat` preset, the server SHOULD combine
172
+ `additional_creators` specified here and the `invite` array into the
173
+ eventual `m.room.create` event's `additional_creators`, deduplicating
174
+ between the two parameters.
175
+ initial_state:
176
+ type: array
177
+ description: |-
178
+ A list of state events to set in the new room. This allows
179
+ the user to override the default state events set in the new
180
+ room. The expected format of the state events are an object
181
+ with type, state_key and content keys set.
182
+
183
+ Takes precedence over events set by `preset`, but gets
184
+ overridden by `name` and `topic` keys.
185
+ items:
186
+ type: object
187
+ title: StateEvent
188
+ properties:
189
+ type:
190
+ type: string
191
+ description: The type of event to send.
192
+ state_key:
193
+ type: string
194
+ description: The state_key of the state event. Defaults to an empty string.
195
+ content:
196
+ type: object
197
+ description: The content of the event.
198
+ required:
199
+ - type
200
+ - content
201
+ preset:
202
+ type: string
203
+ enum:
204
+ - private_chat
205
+ - public_chat
206
+ - trusted_private_chat
207
+ description: |-
208
+ Convenience parameter for setting various default state events
209
+ based on a preset.
210
+
211
+ If unspecified, the server should use the `visibility` to determine
212
+ which preset to use. A visibility of `public` equates to a preset of
213
+ `public_chat` and `private` visibility equates to a preset of
214
+ `private_chat`.
215
+ is_direct:
216
+ type: boolean
217
+ description: |-
218
+ This flag makes the server set the `is_direct` flag on the
219
+ `m.room.member` events sent to the users in `invite` and
220
+ `invite_3pid`. See [Direct Messaging](/client-server-api/#direct-messaging) for more information.
221
+ power_level_content_override:
222
+ title: Power Level Event Content
223
+ type: object
224
+ description: |-
225
+ The power level content to override in the default power level
226
+ event. This object is applied on top of the generated
227
+ [`m.room.power_levels`](/client-server-api/#mroompower_levels)
228
+ event content prior to it being sent to the room. Defaults to
229
+ overriding nothing.
230
+ description: The desired room configuration.
231
+ required: true
232
+ responses:
233
+ "200":
234
+ description: Information about the newly created room.
235
+ content:
236
+ application/json:
237
+ schema:
238
+ type: object
239
+ description: Information about the newly created room.
240
+ properties:
241
+ room_id:
242
+ type: string
243
+ description: The created room's ID.
244
+ required:
245
+ - room_id
246
+ examples:
247
+ response:
248
+ value: {
249
+ "room_id": "!sefiuhWgwghwWgh:example.com"
250
+ }
251
+ "400":
252
+ description: |-
253
+ The request is invalid. A meaningful `errcode` and description
254
+ error text will be returned. Example reasons for rejection include:
255
+
256
+ - The request body is malformed (`errcode` set to `M_BAD_JSON`
257
+ or `M_NOT_JSON`).
258
+
259
+ - The room alias specified is already taken (`errcode` set to
260
+ `M_ROOM_IN_USE`).
261
+
262
+ - The initial state implied by the parameters to the request is
263
+ invalid: for example, the user's `power_level` is set below
264
+ that necessary to set the room name (`errcode` set to
265
+ `M_INVALID_ROOM_STATE`).
266
+
267
+ - The homeserver doesn't support the requested room version, or
268
+ one or more users being invited to the new room are residents
269
+ of a homeserver which does not support the requested room version.
270
+ The `errcode` will be `M_UNSUPPORTED_ROOM_VERSION` in these
271
+ cases.
272
+ content:
273
+ application/json:
274
+ schema:
275
+ $ref: definitions/errors/error.yaml
276
+ "403":
277
+ description: |-
278
+ Creating the room is not allowed.
279
+
280
+ {{% added-in v="1.18"%}} The `M_INVITE_BLOCKED` error code is used to
281
+ indicate that one of the homeservers of the invited users rejected
282
+ the invite due to [invite blocking](/client-server-api/#invite-permission).
283
+ content:
284
+ application/json:
285
+ schema:
286
+ $ref: definitions/errors/error.yaml
287
+ tags:
288
+ - Room creation
289
+ servers:
290
+ - url: "{protocol}://{hostname}{basePath}"
291
+ variables:
292
+ protocol:
293
+ enum:
294
+ - http
295
+ - https
296
+ default: https
297
+ hostname:
298
+ default: localhost:8008
299
+ basePath:
300
+ default: /_matrix/client/v3
301
+ components:
302
+ securitySchemes:
303
+ accessTokenQuery:
304
+ $ref: definitions/security.yaml#/accessTokenQuery
305
+ accessTokenBearer:
306
+ $ref: definitions/security.yaml#/accessTokenBearer
@@ -0,0 +1,300 @@
1
+ # Copyright 2020 The Matrix.org Foundation C.I.C.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ openapi: 3.1.0
15
+ info:
16
+ title: Matrix Client-Server Cross Signing API
17
+ version: 1.0.0
18
+ paths:
19
+ /keys/device_signing/upload:
20
+ post:
21
+ x-addedInMatrixVersion: "1.1"
22
+ x-changedInMatrixVersion:
23
+ "1.11": UIA is not always required for this endpoint.
24
+ "1.17": |-
25
+ This endpoint no longer requires User-Interactive Authentication when used by an
26
+ application service.
27
+ summary: Upload cross-signing keys.
28
+ description: |-
29
+ Publishes cross-signing keys for the user.
30
+
31
+ This API endpoint uses the [User-Interactive Authentication API](/client-server-api/#user-interactive-authentication-api),
32
+ except when used by an application service.
33
+
34
+ User-Interactive Authentication MUST be performed for regular clients, except in these cases:
35
+ - there is no existing master signing key uploaded to the homeserver, OR
36
+ - there is an existing master signing key and it exactly matches the
37
+ master signing key provided in the request body. If there are any additional
38
+ keys provided in the request (self-signing key, user-signing key) they MUST also
39
+ match the existing keys stored on the server. In other words, the request contains
40
+ no new keys.
41
+
42
+ This allows clients to freely upload one set of keys, but not modify/overwrite keys if
43
+ they already exist. Allowing clients to upload the same set of keys more than once
44
+ makes this endpoint idempotent in the case where the response is lost over the network,
45
+ which would otherwise cause a UIA challenge upon retry.
46
+
47
+ {{% boxes/note %}}
48
+ When this endpoint requires User-Interactive Authentication,
49
+ it uses the [`m.oauth`](/client-server-api/#oauth-authentication)
50
+ authentication type if the access token was obtained
51
+ via the [OAuth 2.0 API](/client-server-api/#oauth-20-api).
52
+ {{% /boxes/note %}}
53
+ operationId: uploadCrossSigningKeys
54
+ security:
55
+ - accessTokenQuery: []
56
+ - accessTokenBearer: []
57
+ requestBody:
58
+ content:
59
+ application/json:
60
+ schema:
61
+ type: object
62
+ properties:
63
+ master_key:
64
+ description: Optional. The user\'s master signing key.
65
+ allOf:
66
+ - $ref: definitions/cross_signing_key.yaml
67
+ self_signing_key:
68
+ description: |-
69
+ Optional. The user\'s self-signing key. Must be signed by
70
+ the accompanying master signing key, or by the user\'s most recently
71
+ uploaded master signing key if no master signing key is included in the
72
+ request.
73
+ allOf:
74
+ - $ref: definitions/cross_signing_key.yaml
75
+ user_signing_key:
76
+ description: |-
77
+ Optional. The user\'s user-signing key. Must be signed by
78
+ the accompanying master signing key, or by the user\'s most recently
79
+ uploaded master signing key if no master signing key is included in the
80
+ request.
81
+ allOf:
82
+ - $ref: definitions/cross_signing_key.yaml
83
+ auth:
84
+ description: |-
85
+ Additional authentication information for the
86
+ user-interactive authentication API.
87
+ allOf:
88
+ - $ref: definitions/auth_data.yaml
89
+ example: {
90
+ "auth": {
91
+ "type": "example.type.foo",
92
+ "session": "xxxxx",
93
+ "example_credential": "verypoorsharedsecret"
94
+ },
95
+ "master_key": {
96
+ "user_id": "@alice:example.com",
97
+ "usage": [
98
+ "master"
99
+ ],
100
+ "keys": {
101
+ "ed25519:base64+master+public+key": "base64+master+public+key"
102
+ }
103
+ },
104
+ "self_signing_key": {
105
+ "user_id": "@alice:example.com",
106
+ "usage": [
107
+ "self_signing"
108
+ ],
109
+ "keys": {
110
+ "ed25519:base64+self+signing+public+key": "base64+self+signing+master+public+key"
111
+ },
112
+ "signatures": {
113
+ "@alice:example.com": {
114
+ "ed25519:base64+master+public+key": "signature+of+self+signing+key"
115
+ }
116
+ }
117
+ },
118
+ "user_signing_key": {
119
+ "user_id": "@alice:example.com",
120
+ "usage": [
121
+ "user_signing"
122
+ ],
123
+ "keys": {
124
+ "ed25519:base64+user+signing+public+key": "base64+user+signing+master+public+key"
125
+ },
126
+ "signatures": {
127
+ "@alice:example.com": {
128
+ "ed25519:base64+master+public+key": "signature+of+user+signing+key"
129
+ }
130
+ }
131
+ }
132
+ }
133
+ description: The keys to be published.
134
+ required: true
135
+ responses:
136
+ "200":
137
+ description: The provided keys were successfully uploaded.
138
+ content:
139
+ application/json:
140
+ schema:
141
+ type: object
142
+ example: {}
143
+ "400":
144
+ description: |-
145
+ The input was invalid in some way. This can include one of the
146
+ following error codes:
147
+
148
+ * `M_INVALID_SIGNATURE`: For example, the self-signing or
149
+ user-signing key had an incorrect signature.
150
+ * `M_MISSING_PARAM`: No master signing key is available.
151
+ content:
152
+ application/json:
153
+ schema:
154
+ type: object
155
+ example: {
156
+ "errcode": "M_INVALID_SIGNATURE",
157
+ "error": "Invalid signature"
158
+ }
159
+ "403":
160
+ description: |-
161
+ The public key of one of the keys is the same as one of the user\'s
162
+ device IDs, or the request is not authorized for any other reason.
163
+ content:
164
+ application/json:
165
+ schema:
166
+ type: object
167
+ example: {
168
+ "errcode": "M_FORBIDDEN",
169
+ "error": "Key ID in use"
170
+ }
171
+ tags:
172
+ - End-to-end encryption
173
+ /keys/signatures/upload:
174
+ post:
175
+ x-addedInMatrixVersion: "1.1"
176
+ summary: Upload cross-signing signatures.
177
+ description: |-
178
+ Publishes cross-signing signatures for the user.
179
+
180
+ The signed JSON object must match the key previously uploaded or
181
+ retrieved for the given key ID, with the exception of the `signatures`
182
+ property, which contains the new signature(s) to add.
183
+ operationId: uploadCrossSigningSignatures
184
+ security:
185
+ - accessTokenQuery: []
186
+ - accessTokenBearer: []
187
+ requestBody:
188
+ content:
189
+ application/json:
190
+ schema:
191
+ type: object
192
+ description: |-
193
+ A map of user ID to a map of key ID to signed JSON object.
194
+ patternProperties:
195
+ "^@":
196
+ x-pattern-format: mx-user-id
197
+ type: object
198
+ additionalProperties:
199
+ type: object
200
+ example: {
201
+ "@alice:example.com": {
202
+ "HIJKLMN": {
203
+ "user_id": "@alice:example.com",
204
+ "device_id": "HIJKLMN",
205
+ "algorithms": [
206
+ "m.olm.v1.curve25519-aes-sha256",
207
+ "m.megolm.v1.aes-sha"
208
+ ],
209
+ "keys": {
210
+ "curve25519:HIJKLMN": "base64+curve25519+key",
211
+ "ed25519:HIJKLMN": "base64+ed25519+key"
212
+ },
213
+ "signatures": {
214
+ "@alice:example.com": {
215
+ "ed25519:base64+self+signing+public+key": "base64+signature+of+HIJKLMN"
216
+ }
217
+ }
218
+ },
219
+ "base64+master+public+key": {
220
+ "user_id": "@alice:example.com",
221
+ "usage": [
222
+ "master"
223
+ ],
224
+ "keys": {
225
+ "ed25519:base64+master+public+key": "base64+master+public+key"
226
+ },
227
+ "signatures": {
228
+ "@alice:example.com": {
229
+ "ed25519:HIJKLMN": "base64+signature+of+master+key"
230
+ }
231
+ }
232
+ }
233
+ },
234
+ "@bob:example.com": {
235
+ "bobs+base64+master+public+key": {
236
+ "user_id": "@bob:example.com",
237
+ "keys": {
238
+ "ed25519:bobs+base64+master+public+key": "bobs+base64+master+public+key"
239
+ },
240
+ "usage": [
241
+ "master"
242
+ ],
243
+ "signatures": {
244
+ "@alice:example.com": {
245
+ "ed25519:base64+user+signing+public+key": "base64+signature+of+bobs+master+key"
246
+ }
247
+ }
248
+ }
249
+ }
250
+ }
251
+ description: |-
252
+ A map from user ID to key ID to signed JSON objects containing the
253
+ signatures to be published.
254
+ required: true
255
+ responses:
256
+ "200":
257
+ description: The provided signatures were processed.
258
+ content:
259
+ application/json:
260
+ schema:
261
+ type: object
262
+ properties:
263
+ failures:
264
+ type: object
265
+ description: |-
266
+ A map from user ID to key ID to an error for any signatures
267
+ that failed. If a signature was invalid, the `errcode` will
268
+ be set to `M_INVALID_SIGNATURE`.
269
+ patternProperties:
270
+ "^@":
271
+ type: object
272
+ x-pattern-format: mx-user-id
273
+ additionalProperties:
274
+ type: object
275
+ title: Error
276
+ example:
277
+ "@alice:example.com":
278
+ HIJKLMN:
279
+ errcode: M_INVALID_SIGNATURE
280
+ error: Invalid signature
281
+ tags:
282
+ - End-to-end encryption
283
+ servers:
284
+ - url: "{protocol}://{hostname}{basePath}"
285
+ variables:
286
+ protocol:
287
+ enum:
288
+ - http
289
+ - https
290
+ default: https
291
+ hostname:
292
+ default: localhost:8008
293
+ basePath:
294
+ default: /_matrix/client/v3
295
+ components:
296
+ securitySchemes:
297
+ accessTokenQuery:
298
+ $ref: definitions/security.yaml#/accessTokenQuery
299
+ accessTokenBearer:
300
+ $ref: definitions/security.yaml#/accessTokenBearer
@@ -0,0 +1,34 @@
1
+ # Copyright 2016 OpenMarket Ltd
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ title: Authentication Data
15
+ description: |-
16
+ Used by clients to submit authentication information to the interactive-authentication API
17
+ type: object
18
+ properties:
19
+ type:
20
+ description: |-
21
+ The authentication type that the client is attempting to complete.
22
+ May be omitted if `session` is given, and the client is reissuing a
23
+ request which it believes has been completed out-of-band (for example,
24
+ via the [fallback mechanism](/client-server-api/#fallback)).
25
+ type: string
26
+ session:
27
+ description: The value of the session key given by the homeserver.
28
+ type: string
29
+ additionalProperties:
30
+ description: Keys dependent on the login type
31
+ example:
32
+ type: "example.type.foo"
33
+ session: "xxxxx"
34
+ example_credential: "verypoorsharedsecret"