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,620 @@
1
+ # Copyright 2016 OpenMarket Ltd
2
+ # Copyright 2019 The Matrix.org Foundation C.I.C.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ openapi: 3.1.0
16
+ info:
17
+ title: Matrix Client-Server Account Administrative Contact API
18
+ version: 1.0.0
19
+ paths:
20
+ /account/3pid:
21
+ get:
22
+ summary: Gets a list of a user's third-party identifiers.
23
+ description: |-
24
+ Gets a list of the third-party identifiers that the homeserver has
25
+ associated with the user's account.
26
+
27
+ This is *not* the same as the list of third-party identifiers bound to
28
+ the user's Matrix ID in identity servers.
29
+
30
+ Identifiers in this list may be used by the homeserver as, for example,
31
+ identifiers that it will accept to reset the user's account password.
32
+ operationId: getAccount3PIDs
33
+ security:
34
+ - accessTokenQuery: []
35
+ - accessTokenBearer: []
36
+ responses:
37
+ "200":
38
+ description: The lookup was successful.
39
+ content:
40
+ application/json:
41
+ schema:
42
+ type: object
43
+ properties:
44
+ threepids:
45
+ type: array
46
+ items:
47
+ type: object
48
+ title: Third-party identifier
49
+ properties:
50
+ medium:
51
+ type: string
52
+ description: The medium of the third-party identifier.
53
+ enum:
54
+ - email
55
+ - msisdn
56
+ address:
57
+ type: string
58
+ description: The third-party identifier address.
59
+ validated_at:
60
+ type: integer
61
+ format: int64
62
+ description: |-
63
+ The timestamp, in milliseconds, when the identifier was
64
+ validated by the identity server.
65
+ added_at:
66
+ type: integer
67
+ format: int64
68
+ description: The timestamp, in milliseconds, when the homeserver associated the
69
+ third-party identifier with the user.
70
+ required:
71
+ - medium
72
+ - address
73
+ - validated_at
74
+ - added_at
75
+ examples:
76
+ response:
77
+ value: {
78
+ "threepids": [
79
+ {
80
+ "medium": "email",
81
+ "address": "monkey@banana.island",
82
+ "validated_at": 1535176800000,
83
+ "added_at": 1535336848756
84
+ }
85
+ ]
86
+ }
87
+ tags:
88
+ - Account management
89
+ post:
90
+ summary: Adds contact information to the user's account.
91
+ description: |-
92
+ Adds contact information to the user's account.
93
+
94
+ This endpoint is deprecated in favour of the more specific `/3pid/add`
95
+ and `/3pid/bind` endpoints.
96
+
97
+ **Note:**
98
+ Previously this endpoint supported a `bind` parameter. This parameter
99
+ has been removed, making this endpoint behave as though it was `false`.
100
+ This results in this endpoint being an equivalent to `/3pid/bind` rather
101
+ than dual-purpose.
102
+
103
+ This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation).
104
+ Clients SHOULD check the value of the [`m.3pid_changes` capability](/client-server-api/#m3pid_changes-capability)
105
+ to determine if this endpoint is available.
106
+ operationId: post3PIDs
107
+ deprecated: true
108
+ security:
109
+ - accessTokenQuery: []
110
+ - accessTokenBearer: []
111
+ requestBody:
112
+ content:
113
+ application/json:
114
+ schema:
115
+ type: object
116
+ properties:
117
+ three_pid_creds:
118
+ title: ThreePidCredentials
119
+ type: object
120
+ description: The third-party credentials to associate with the account.
121
+ properties:
122
+ client_secret:
123
+ type: string
124
+ description: The client secret used in the session with the identity server.
125
+ id_server:
126
+ type: string
127
+ description: The identity server to use.
128
+ id_access_token:
129
+ type: string
130
+ description: |-
131
+ An access token previously registered with the identity server. Servers
132
+ can treat this as optional to distinguish between r0.5-compatible clients
133
+ and this specification version.
134
+ sid:
135
+ type: string
136
+ description: The session identifier given by the identity server.
137
+ required:
138
+ - client_secret
139
+ - id_server
140
+ - id_access_token
141
+ - sid
142
+ required:
143
+ - three_pid_creds
144
+ example: {
145
+ "three_pid_creds": {
146
+ "id_server": "matrix.org",
147
+ "id_access_token": "abc123_OpaqueString",
148
+ "sid": "abc123987",
149
+ "client_secret": "d0nt-T3ll"
150
+ }
151
+ }
152
+ required: true
153
+ responses:
154
+ "200":
155
+ description: The addition was successful.
156
+ content:
157
+ application/json:
158
+ schema:
159
+ type: object
160
+ properties:
161
+ submit_url:
162
+ type: string
163
+ format: uri
164
+ description: |-
165
+ An optional field containing a URL where the client must
166
+ submit the validation token to, with identical parameters
167
+ to the Identity Service API's `POST
168
+ /validate/email/submitToken` endpoint (without the requirement
169
+ for an access token). The homeserver must send this token to the
170
+ user (if applicable), who should then be prompted to provide it
171
+ to the client.
172
+
173
+ If this field is not present, the client can assume that
174
+ verification will happen without the client's involvement
175
+ provided the homeserver advertises this specification version
176
+ in the `/versions` response (ie: r0.5.0).
177
+ example: https://example.org/path/to/submitToken
178
+ examples:
179
+ response:
180
+ value: {
181
+ "submit_url": "https://example.org/path/to/submitToken"
182
+ }
183
+ "403":
184
+ description: The credentials could not be verified with the identity server.
185
+ content:
186
+ application/json:
187
+ schema:
188
+ $ref: definitions/errors/error.yaml
189
+ examples:
190
+ response:
191
+ value: {
192
+ "errcode": "M_THREEPID_AUTH_FAILED",
193
+ "error": "The third-party credentials could not be verified by the identity server."
194
+ }
195
+ tags:
196
+ - Account management
197
+ /account/3pid/add:
198
+ post:
199
+ summary: Adds contact information to the user's account.
200
+ description: |-
201
+ This API endpoint uses the [User-Interactive Authentication API](/client-server-api/#user-interactive-authentication-api).
202
+
203
+ Adds contact information to the user's account. Homeservers should use 3PIDs added
204
+ through this endpoint for password resets instead of relying on the identity server.
205
+
206
+ Homeservers should prevent the caller from adding a 3PID to their account if it has
207
+ already been added to another user's account on the homeserver.
208
+
209
+ This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation).
210
+ Clients SHOULD check the value of the [`m.3pid_changes` capability](/client-server-api/#m3pid_changes-capability)
211
+ to determine if this endpoint is available.
212
+
213
+ {{% boxes/warning %}}
214
+ Since this endpoint uses User-Interactive Authentication, it cannot be used when the access token was obtained
215
+ via the [OAuth 2.0 API](/client-server-api/#oauth-20-api).
216
+ {{% /boxes/warning %}}
217
+ operationId: add3PID
218
+ security:
219
+ - accessTokenQuery: []
220
+ - accessTokenBearer: []
221
+ requestBody:
222
+ content:
223
+ application/json:
224
+ schema:
225
+ type: object
226
+ properties:
227
+ auth:
228
+ description: |-
229
+ Additional authentication information for the
230
+ user-interactive authentication API.
231
+ allOf:
232
+ - $ref: definitions/auth_data.yaml
233
+ client_secret:
234
+ type: string
235
+ description: The client secret used in the session with the homeserver.
236
+ example: d0nt-T3ll
237
+ sid:
238
+ type: string
239
+ description: The session identifier given by the homeserver.
240
+ example: abc123987
241
+ required:
242
+ - client_secret
243
+ - sid
244
+ required: true
245
+ responses:
246
+ "200":
247
+ description: The addition was successful.
248
+ content:
249
+ application/json:
250
+ schema:
251
+ type: object
252
+ examples:
253
+ response:
254
+ value: {}
255
+ "401":
256
+ description: The homeserver requires additional authentication information.
257
+ content:
258
+ application/json:
259
+ schema:
260
+ $ref: definitions/auth_response.yaml
261
+ "429":
262
+ description: This request was rate-limited.
263
+ content:
264
+ application/json:
265
+ schema:
266
+ $ref: definitions/errors/rate_limited.yaml
267
+ tags:
268
+ - Account management
269
+ /account/3pid/bind:
270
+ post:
271
+ summary: Binds a 3PID to the user's account through an Identity Service.
272
+ description: |-
273
+ Binds a 3PID to the user's account through the specified identity server.
274
+
275
+ Homeservers should not prevent this request from succeeding if another user
276
+ has bound the 3PID. Homeservers should simply proxy any errors received by
277
+ the identity server to the caller.
278
+
279
+ Homeservers should track successful binds so they can be unbound later.
280
+ operationId: bind3PID
281
+ security:
282
+ - accessTokenQuery: []
283
+ - accessTokenBearer: []
284
+ requestBody:
285
+ content:
286
+ application/json:
287
+ schema:
288
+ type: object
289
+ properties:
290
+ client_secret:
291
+ type: string
292
+ description: The client secret used in the session with the identity server.
293
+ id_server:
294
+ type: string
295
+ description: The identity server to use.
296
+ id_access_token:
297
+ type: string
298
+ description: An access token previously registered with the identity server.
299
+ sid:
300
+ type: string
301
+ description: The session identifier given by the identity server.
302
+ required:
303
+ - client_secret
304
+ - id_server
305
+ - id_access_token
306
+ - sid
307
+ example: {
308
+ "id_server": "example.org",
309
+ "id_access_token": "abc123_OpaqueString",
310
+ "sid": "abc123987",
311
+ "client_secret": "d0nt-T3ll"
312
+ }
313
+ required: true
314
+ responses:
315
+ "200":
316
+ description: The addition was successful.
317
+ content:
318
+ application/json:
319
+ schema:
320
+ type: object
321
+ examples:
322
+ response:
323
+ value: {}
324
+ "429":
325
+ description: This request was rate-limited.
326
+ content:
327
+ application/json:
328
+ schema:
329
+ $ref: definitions/errors/rate_limited.yaml
330
+ tags:
331
+ - Account management
332
+ /account/3pid/delete:
333
+ post:
334
+ summary: Deletes a third-party identifier from the user's account
335
+ description: |-
336
+ Removes a third-party identifier from the user's account. This might not
337
+ cause an unbind of the identifier from the identity server.
338
+
339
+ Unlike other endpoints, this endpoint does not take an `id_access_token`
340
+ parameter because the homeserver is expected to sign the request to the
341
+ identity server instead.
342
+
343
+ This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation).
344
+ Clients SHOULD check the value of the [`m.3pid_changes` capability](/client-server-api/#m3pid_changes-capability)
345
+ to determine if this endpoint is available.
346
+ operationId: delete3pidFromAccount
347
+ security:
348
+ - accessTokenQuery: []
349
+ - accessTokenBearer: []
350
+ requestBody:
351
+ content:
352
+ application/json:
353
+ schema:
354
+ type: object
355
+ properties:
356
+ id_server:
357
+ type: string
358
+ description: |-
359
+ The identity server to unbind from. If not provided, the homeserver
360
+ MUST use the `id_server` the identifier was added through. If the
361
+ homeserver does not know the original `id_server`, it MUST return
362
+ a `id_server_unbind_result` of `no-support`.
363
+ example: example.org
364
+ medium:
365
+ type: string
366
+ description: The medium of the third-party identifier being removed.
367
+ enum:
368
+ - email
369
+ - msisdn
370
+ example: email
371
+ address:
372
+ type: string
373
+ description: The third-party address being removed.
374
+ example: example@example.org
375
+ required:
376
+ - medium
377
+ - address
378
+ required: true
379
+ responses:
380
+ "200":
381
+ description: |-
382
+ The homeserver has disassociated the third-party identifier from the
383
+ user.
384
+ content:
385
+ application/json:
386
+ schema:
387
+ type: object
388
+ properties:
389
+ id_server_unbind_result:
390
+ type: string
391
+ enum:
392
+ - no-support
393
+ - success
394
+ description: |-
395
+ An indicator as to whether or not the homeserver was able to unbind
396
+ the 3PID from the identity server. `success` indicates that the
397
+ identity server has unbound the identifier whereas `no-support`
398
+ indicates that the identity server refuses to support the request
399
+ or the homeserver was not able to determine an identity server to
400
+ unbind from.
401
+ example: success
402
+ required:
403
+ - id_server_unbind_result
404
+ tags:
405
+ - Account management
406
+ /account/3pid/unbind:
407
+ post:
408
+ summary: Removes a user's third-party identifier from an identity server.
409
+ description: |-
410
+ Removes a user's third-party identifier from the provided identity server
411
+ without removing it from the homeserver.
412
+
413
+ Unlike other endpoints, this endpoint does not take an `id_access_token`
414
+ parameter because the homeserver is expected to sign the request to the
415
+ identity server instead.
416
+ operationId: unbind3pidFromAccount
417
+ security:
418
+ - accessTokenQuery: []
419
+ - accessTokenBearer: []
420
+ requestBody:
421
+ content:
422
+ application/json:
423
+ schema:
424
+ type: object
425
+ properties:
426
+ id_server:
427
+ type: string
428
+ description: |-
429
+ The identity server to unbind from. If not provided, the homeserver
430
+ MUST use the `id_server` the identifier was added through. If the
431
+ homeserver does not know the original `id_server`, it MUST return
432
+ a `id_server_unbind_result` of `no-support`.
433
+ example: example.org
434
+ medium:
435
+ type: string
436
+ description: The medium of the third-party identifier being removed.
437
+ enum:
438
+ - email
439
+ - msisdn
440
+ example: email
441
+ address:
442
+ type: string
443
+ description: The third-party address being removed.
444
+ example: example@example.org
445
+ required:
446
+ - medium
447
+ - address
448
+ required: true
449
+ responses:
450
+ "200":
451
+ description: |-
452
+ The identity server has disassociated the third-party identifier from the
453
+ user.
454
+ content:
455
+ application/json:
456
+ schema:
457
+ type: object
458
+ properties:
459
+ id_server_unbind_result:
460
+ type: string
461
+ enum:
462
+ - no-support
463
+ - success
464
+ description: |-
465
+ An indicator as to whether or not the identity server was able to unbind
466
+ the 3PID. `success` indicates that the identity server has unbound the
467
+ identifier whereas `no-support` indicates that the identity server
468
+ refuses to support the request or the homeserver was not able to determine
469
+ an identity server to unbind from.
470
+ example: success
471
+ required:
472
+ - id_server_unbind_result
473
+ tags:
474
+ - Account management
475
+ /account/3pid/email/requestToken:
476
+ post:
477
+ summary: Begins the validation process for an email address for association with
478
+ the user's account.
479
+ description: |-
480
+ The homeserver must check that the given email address is **not**
481
+ already associated with an account on this homeserver. This API should
482
+ be used to request validation tokens when adding an email address to an
483
+ account. This API's parameters and response are identical to that of
484
+ the [`/register/email/requestToken`](/client-server-api/#post_matrixclientv3registeremailrequesttoken)
485
+ endpoint. The homeserver should validate
486
+ the email itself, either by sending a validation email itself or by using
487
+ a service it has control over.
488
+ operationId: requestTokenTo3PIDEmail
489
+ requestBody:
490
+ content:
491
+ application/json:
492
+ schema:
493
+ $ref: definitions/request_email_validation.yaml
494
+ required: true
495
+ responses:
496
+ "200":
497
+ description: |-
498
+ An email was sent to the given address. Note that this may be an
499
+ email containing the validation token or it may be informing the
500
+ user of an error.
501
+ content:
502
+ application/json:
503
+ schema:
504
+ $ref: definitions/request_token_response.yaml
505
+ "400":
506
+ description: |-
507
+ The third-party identifier is already in use on the homeserver, or
508
+ the request was invalid. Error codes that can be returned are:
509
+ * `M_THREEPID_IN_USE`: The email supplied cannot be bound because is is already
510
+ associated with a different Matrix ID.
511
+ * `M_SERVER_NOT_TRUSTED`: The server does not trust/support the identity server
512
+ provided in the request.
513
+ * `M_THREEPID_MEDIUM_NOT_SUPPORTED`: The homeserver does not support adding email addresses.
514
+ * `M_INVALID_PARAM`: The email address given was not valid.
515
+ content:
516
+ application/json:
517
+ schema:
518
+ $ref: definitions/errors/error.yaml
519
+ examples:
520
+ response:
521
+ value: {
522
+ "errcode": "M_THREEPID_IN_USE",
523
+ "error": "Third-party identifier already in use"
524
+ }
525
+ "403":
526
+ description: |-
527
+ The homeserver does not allow the third-party identifier as a
528
+ contact option.
529
+ content:
530
+ application/json:
531
+ schema:
532
+ $ref: definitions/errors/error.yaml
533
+ examples:
534
+ response:
535
+ value: {
536
+ "errcode": "M_THREEPID_DENIED",
537
+ "error": "Third-party identifier is not allowed"
538
+ }
539
+ tags:
540
+ - Account management
541
+ /account/3pid/msisdn/requestToken:
542
+ post:
543
+ summary: Begins the validation process for a phone number for association with
544
+ the user's account.
545
+ description: |-
546
+ The homeserver must check that the given phone number is **not**
547
+ already associated with an account on this homeserver. This API should
548
+ be used to request validation tokens when adding a phone number to an
549
+ account. This API's parameters and response are identical to that of
550
+ the [`/register/msisdn/requestToken`](/client-server-api/#post_matrixclientv3registermsisdnrequesttoken)
551
+ endpoint. The homeserver should validate
552
+ the phone number itself, either by sending a validation message itself or by using
553
+ a service it has control over.
554
+ operationId: requestTokenTo3PIDMSISDN
555
+ requestBody:
556
+ content:
557
+ application/json:
558
+ schema:
559
+ $ref: definitions/request_msisdn_validation.yaml
560
+ required: true
561
+ responses:
562
+ "200":
563
+ description: An SMS message was sent to the given phone number.
564
+ content:
565
+ application/json:
566
+ schema:
567
+ $ref: definitions/request_token_response.yaml
568
+ "400":
569
+ description: |-
570
+ The third-party identifier is already in use on the homeserver, or
571
+ the request was invalid. Error codes that can be returned are:
572
+ * `M_THREEPID_IN_USE`: The phone number supplied cannot be bound because is is already
573
+ associated with a different Matrix ID.
574
+ * `M_SERVER_NOT_TRUSTED`: The server does not trust/support the identity server
575
+ * `M_THREEPID_MEDIUM_NOT_SUPPORTED`: The homeserver does not support adding phone numbers.
576
+ * `M_INVALID_PARAM`: The phone number given was not valid.
577
+ content:
578
+ application/json:
579
+ schema:
580
+ $ref: definitions/errors/error.yaml
581
+ examples:
582
+ response:
583
+ value: {
584
+ "errcode": "M_THREEPID_IN_USE",
585
+ "error": "Third-party identifier already in use"
586
+ }
587
+ "403":
588
+ description: |-
589
+ The homeserver does not allow the third-party identifier as a
590
+ contact option.
591
+ content:
592
+ application/json:
593
+ schema:
594
+ $ref: definitions/errors/error.yaml
595
+ examples:
596
+ response:
597
+ value: {
598
+ "errcode": "M_THREEPID_DENIED",
599
+ "error": "Third-party identifier is not allowed"
600
+ }
601
+ tags:
602
+ - Account management
603
+ servers:
604
+ - url: "{protocol}://{hostname}{basePath}"
605
+ variables:
606
+ protocol:
607
+ enum:
608
+ - http
609
+ - https
610
+ default: https
611
+ hostname:
612
+ default: localhost:8008
613
+ basePath:
614
+ default: /_matrix/client/v3
615
+ components:
616
+ securitySchemes:
617
+ accessTokenQuery:
618
+ $ref: definitions/security.yaml#/accessTokenQuery
619
+ accessTokenBearer:
620
+ $ref: definitions/security.yaml#/accessTokenBearer