Move raw API and event schemas into /data directory
Historical note: this was originally a series of several commits, spread out over several weeks. They have been squashed together to make `git annotate` work properly. The original commits were: * 91ab3934 <Will> 2021-01-25 21:16:42 -0800 Add raw API end event schemas into /data directory * aae22f47 <Will> 2021-01-25 21:33:06 -0800 Remove non-data files * 1092d4ca <Will> 2021-01-26 20:41:33 -0800 Add data-compatiuble extension (.yaml) to all data files that currently omit one * 21060109 <Will> 2021-01-26 20:57:28 -0800 Remove symlink to event-schemas, and update openAPI schema paths accordingly * 4f633845 <Travis Ralston> 2021-04-12 21:54:54 -0600 Fix event schema examples too * 301c7b2f <Will> 2021-02-05 10:15:42 -0800 Restore docs describing OpenAPI extensions that we use
This commit is contained in:
parent
a26c352d78
commit
00c6a866e2
327 changed files with 82 additions and 10822 deletions
6
data/event-schemas/examples/core/event.json
Normal file
6
data/event-schemas/examples/core/event.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"content": {
|
||||
"key": "value"
|
||||
},
|
||||
"type": "org.example.custom.event"
|
||||
}
|
4
data/event-schemas/examples/core/room_edu.json
Normal file
4
data/event-schemas/examples/core/room_edu.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$ref": "event.json",
|
||||
"room_id": "!jEsUZKDJdhlrceRyVU:example.org"
|
||||
}
|
10
data/event-schemas/examples/core/room_event.json
Normal file
10
data/event-schemas/examples/core/room_event.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "event.json",
|
||||
"event_id": "$143273582443PhrSn:example.org",
|
||||
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
|
||||
"sender": "@example:example.org",
|
||||
"origin_server_ts": 1432735824653,
|
||||
"unsigned": {
|
||||
"age": 1234
|
||||
}
|
||||
}
|
4
data/event-schemas/examples/core/state_event.json
Normal file
4
data/event-schemas/examples/core/state_event.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$ref": "room_event.json",
|
||||
"state_key": "ArbitraryString"
|
||||
}
|
18
data/event-schemas/examples/invite_room_state.json
Normal file
18
data/event-schemas/examples/invite_room_state.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
[
|
||||
{
|
||||
"type": "m.room.name",
|
||||
"sender": "@bob:example.org",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"name": "Example Room"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "m.room.join_rules",
|
||||
"sender": "@bob:example.org",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"join_rule": "invite"
|
||||
}
|
||||
}
|
||||
]
|
10
data/event-schemas/examples/m.accepted_terms.yaml
Normal file
10
data/event-schemas/examples/m.accepted_terms.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.accepted_terms",
|
||||
"content": {
|
||||
"accepted": [
|
||||
"https://example.org/somewhere/terms-1.2-en.html",
|
||||
"https://example.org/somewhere/privacy-1.2-en.html"
|
||||
]
|
||||
}
|
||||
}
|
13
data/event-schemas/examples/m.call.answer.yaml
Normal file
13
data/event-schemas/examples/m.call.answer.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.call.answer",
|
||||
"content": {
|
||||
"version" : 0,
|
||||
"call_id": "12345",
|
||||
"lifetime": 60000,
|
||||
"answer": {
|
||||
"type" : "answer",
|
||||
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
|
||||
}
|
||||
}
|
||||
}
|
15
data/event-schemas/examples/m.call.candidates.yaml
Normal file
15
data/event-schemas/examples/m.call.candidates.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.call.candidates",
|
||||
"content": {
|
||||
"version" : 0,
|
||||
"call_id": "12345",
|
||||
"candidates": [
|
||||
{
|
||||
"sdpMid": "audio",
|
||||
"sdpMLineIndex": 0,
|
||||
"candidate": "candidate:863018703 1 udp 2122260223 10.9.64.156 43670 typ host generation 0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.call.hangup.yaml
Normal file
8
data/event-schemas/examples/m.call.hangup.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.call.hangup",
|
||||
"content": {
|
||||
"version" : 0,
|
||||
"call_id": "12345"
|
||||
}
|
||||
}
|
13
data/event-schemas/examples/m.call.invite.yaml
Normal file
13
data/event-schemas/examples/m.call.invite.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.call.invite",
|
||||
"content": {
|
||||
"version" : 0,
|
||||
"call_id": "12345",
|
||||
"lifetime": 60000,
|
||||
"offer": {
|
||||
"type" : "offer",
|
||||
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
|
||||
}
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.direct.yaml
Normal file
10
data/event-schemas/examples/m.direct.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.direct",
|
||||
"content": {
|
||||
"@bob:example.com": [
|
||||
"!abcdefgh:example.com",
|
||||
"!hgfedcba:example.com"
|
||||
]
|
||||
}
|
||||
}
|
4
data/event-schemas/examples/m.dummy.yaml
Normal file
4
data/event-schemas/examples/m.dummy.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"content": {},
|
||||
"type": "m.dummy"
|
||||
}
|
14
data/event-schemas/examples/m.forwarded_room_key.yaml
Normal file
14
data/event-schemas/examples/m.forwarded_room_key.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"content": {
|
||||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
|
||||
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8Llf...",
|
||||
"sender_key": "RF3s+E7RkTQTGF2d8Deol0FkQvgII2aJDf3/Jp5mxVU",
|
||||
"sender_claimed_ed25519_key": "aj40p+aw64yPIdsxoog8jhPu9i7l7NcFRecuOQblE3Y",
|
||||
"forwarding_curve25519_key_chain": [
|
||||
"hPQNcabIABgGnx3/ACv/jmMmiQHoeFfuLB17tzWp6Hw"
|
||||
]
|
||||
},
|
||||
"type": "m.forwarded_room_key"
|
||||
}
|
8
data/event-schemas/examples/m.fully_read.yaml
Normal file
8
data/event-schemas/examples/m.fully_read.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.fully_read",
|
||||
"room_id": "!somewhere:example.org",
|
||||
"content": {
|
||||
"event_id": "$someplace:example.org"
|
||||
}
|
||||
}
|
7
data/event-schemas/examples/m.identity_server.yaml
Normal file
7
data/event-schemas/examples/m.identity_server.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.identity_server",
|
||||
"content": {
|
||||
"base_url": "https://example.org"
|
||||
}
|
||||
}
|
9
data/event-schemas/examples/m.ignored_user_list.yaml
Normal file
9
data/event-schemas/examples/m.ignored_user_list.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.ignored_user_list",
|
||||
"content": {
|
||||
"ignored_users": {
|
||||
"@someone:example.org": {}
|
||||
}
|
||||
}
|
||||
}
|
12
data/event-schemas/examples/m.key.verification.accept.yaml
Normal file
12
data/event-schemas/examples/m.key.verification.accept.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"type": "m.key.verification.accept",
|
||||
"content": {
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"method": "m.sas.v1",
|
||||
"key_agreement_protocol": "curve25519",
|
||||
"hash": "sha256",
|
||||
"message_authentication_code": "hkdf-hmac-sha256",
|
||||
"short_authentication_string": ["decimal", "emoji"],
|
||||
"commitment": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "m.key.verification.cancel",
|
||||
"content": {
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"code": "m.user",
|
||||
"reason": "User rejected the key verification request"
|
||||
}
|
||||
}
|
7
data/event-schemas/examples/m.key.verification.key.yaml
Normal file
7
data/event-schemas/examples/m.key.verification.key.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "m.key.verification.key",
|
||||
"content": {
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"key": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.key.verification.mac.yaml
Normal file
10
data/event-schemas/examples/m.key.verification.mac.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"type": "m.key.verification.mac",
|
||||
"content": {
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"keys": "2Wptgo4CwmLo/Y8B8qinxApKaCkBG2fjTWB7AbP5Uy+aIbygsSdLOFzvdDjww8zUVKCmI02eP9xtyJxc/cLiBA",
|
||||
"mac": {
|
||||
"ed25519:ABCDEF": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
|
||||
}
|
||||
}
|
||||
}
|
11
data/event-schemas/examples/m.key.verification.request.yaml
Normal file
11
data/event-schemas/examples/m.key.verification.request.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "m.key.verification.request",
|
||||
"content": {
|
||||
"from_device": "AliceDevice2",
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"methods": [
|
||||
"m.sas.v1"
|
||||
],
|
||||
"timestamp": 1559598944869
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"type": "m.key.verification.start",
|
||||
"content": {
|
||||
"from_device": "BobDevice1",
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"method": "m.sas.v1",
|
||||
"key_agreement_protocols": ["curve25519"],
|
||||
"hashes": ["sha256"],
|
||||
"message_authentication_codes": ["hkdf-hmac-sha256"],
|
||||
"short_authentication_string": ["decimal", "emoji"]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "m.key.verification.start",
|
||||
"content": {
|
||||
"from_device": "BobDevice1",
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"method": "m.sas.v1"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.policy.rule.room.yaml
Normal file
10
data/event-schemas/examples/m.policy.rule.room.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.policy.rule.room",
|
||||
"state_key": "rule:#*:example.org",
|
||||
"content": {
|
||||
"entity": "#*:example.org",
|
||||
"recommendation": "m.ban",
|
||||
"reason": "undesirable content"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.policy.rule.server.yaml
Normal file
10
data/event-schemas/examples/m.policy.rule.server.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.policy.rule.server",
|
||||
"state_key": "rule:*.example.org",
|
||||
"content": {
|
||||
"entity": "*.example.org",
|
||||
"recommendation": "m.ban",
|
||||
"reason": "undesirable engagement"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.policy.rule.user.yaml
Normal file
10
data/event-schemas/examples/m.policy.rule.user.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.policy.rule.user",
|
||||
"state_key": "rule:@alice*:example.org",
|
||||
"content": {
|
||||
"entity": "@alice*:example.org",
|
||||
"recommendation": "m.ban",
|
||||
"reason": "undesirable behaviour"
|
||||
}
|
||||
}
|
12
data/event-schemas/examples/m.presence.yaml
Normal file
12
data/event-schemas/examples/m.presence.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"sender": "@example:localhost",
|
||||
"type": "m.presence",
|
||||
"content": {
|
||||
"avatar_url": "mxc://localhost:wefuiwegh8742w",
|
||||
"last_active_ago": 2478593,
|
||||
"presence": "online",
|
||||
"currently_active": false,
|
||||
"status_msg": "Making cupcakes"
|
||||
}
|
||||
}
|
197
data/event-schemas/examples/m.push_rules.yaml
Normal file
197
data/event-schemas/examples/m.push_rules.yaml
Normal file
|
@ -0,0 +1,197 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.push_rules",
|
||||
"content": {
|
||||
"global": {
|
||||
"content": [
|
||||
{
|
||||
"actions": [
|
||||
"notify",
|
||||
{
|
||||
"set_tweak": "sound",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"set_tweak": "highlight"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"pattern": "alice",
|
||||
"rule_id": ".m.rule.contains_user_name"
|
||||
}
|
||||
],
|
||||
"override": [
|
||||
{
|
||||
"actions": [
|
||||
"dont_notify"
|
||||
],
|
||||
"conditions": [],
|
||||
"default": true,
|
||||
"enabled": false,
|
||||
"rule_id": ".m.rule.master"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
"dont_notify"
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"key": "content.msgtype",
|
||||
"kind": "event_match",
|
||||
"pattern": "m.notice"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"rule_id": ".m.rule.suppress_notices"
|
||||
}
|
||||
],
|
||||
"room": [],
|
||||
"sender": [],
|
||||
"underride": [
|
||||
{
|
||||
"actions": [
|
||||
"notify",
|
||||
{
|
||||
"set_tweak": "sound",
|
||||
"value": "ring"
|
||||
},
|
||||
{
|
||||
"set_tweak": "highlight",
|
||||
"value": false
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"key": "type",
|
||||
"kind": "event_match",
|
||||
"pattern": "m.call.invite"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"rule_id": ".m.rule.call"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
"notify",
|
||||
{
|
||||
"set_tweak": "sound",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"set_tweak": "highlight"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"kind": "contains_display_name"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"rule_id": ".m.rule.contains_display_name"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
"notify",
|
||||
{
|
||||
"set_tweak": "sound",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"set_tweak": "highlight",
|
||||
"value": false
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"kind": "room_member_count",
|
||||
"is": "2"
|
||||
},
|
||||
{
|
||||
"kind": "event_match",
|
||||
"key": "type",
|
||||
"pattern": "m.room.message"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"rule_id": ".m.rule.room_one_to_one"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
"notify",
|
||||
{
|
||||
"set_tweak": "sound",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"set_tweak": "highlight",
|
||||
"value": false
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"key": "type",
|
||||
"kind": "event_match",
|
||||
"pattern": "m.room.member"
|
||||
},
|
||||
{
|
||||
"key": "content.membership",
|
||||
"kind": "event_match",
|
||||
"pattern": "invite"
|
||||
},
|
||||
{
|
||||
"key": "state_key",
|
||||
"kind": "event_match",
|
||||
"pattern": "@alice:example.com"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"rule_id": ".m.rule.invite_for_me"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
"notify",
|
||||
{
|
||||
"set_tweak": "highlight",
|
||||
"value": false
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"key": "type",
|
||||
"kind": "event_match",
|
||||
"pattern": "m.room.member"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"rule_id": ".m.rule.member_event"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
"notify",
|
||||
{
|
||||
"set_tweak": "highlight",
|
||||
"value": false
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"key": "type",
|
||||
"kind": "event_match",
|
||||
"pattern": "m.room.message"
|
||||
}
|
||||
],
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"rule_id": ".m.rule.message"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
13
data/event-schemas/examples/m.receipt.yaml
Normal file
13
data/event-schemas/examples/m.receipt.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"$ref": "core/room_edu.json",
|
||||
"type": "m.receipt",
|
||||
"content": {
|
||||
"$1435641916114394fHBLK:matrix.org": {
|
||||
"m.read": {
|
||||
"@rikj:jki.re": {
|
||||
"ts": 1436451550453
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
data/event-schemas/examples/m.room.avatar.yaml
Normal file
14
data/event-schemas/examples/m.room.avatar.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.avatar",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"info": {
|
||||
"h": 398,
|
||||
"w": 394,
|
||||
"mimetype": "image/jpeg",
|
||||
"size": 31037
|
||||
},
|
||||
"url": "mxc://example.org/JWEIFJgwEIhweiWJE"
|
||||
}
|
||||
}
|
12
data/event-schemas/examples/m.room.canonical_alias.yaml
Normal file
12
data/event-schemas/examples/m.room.canonical_alias.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.canonical_alias",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"alias": "#somewhere:localhost",
|
||||
"alt_aliases": [
|
||||
"#somewhere:example.org",
|
||||
"#myroom:example.com"
|
||||
]
|
||||
}
|
||||
}
|
14
data/event-schemas/examples/m.room.create.yaml
Normal file
14
data/event-schemas/examples/m.room.create.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.create",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"creator": "@example:example.org",
|
||||
"room_version": "1",
|
||||
"m.federate": true,
|
||||
"predecessor": {
|
||||
"event_id": "$something:example.org",
|
||||
"room_id": "!oldroom:example.org"
|
||||
}
|
||||
}
|
||||
}
|
11
data/event-schemas/examples/m.room.encrypted$megolm.yaml
Normal file
11
data/event-schemas/examples/m.room.encrypted$megolm.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.encrypted",
|
||||
"content": {
|
||||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
"ciphertext": "AwgAEnACgAkLmt6qF84IK++J7UDH2Za1YVchHyprqTqsg...",
|
||||
"device_id": "RJYKSTBOIE",
|
||||
"sender_key": "IlRMeOPX2e0MurIyfWEucYBRVOEEUMrOHqn/8mLqMjA",
|
||||
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ"
|
||||
}
|
||||
}
|
14
data/event-schemas/examples/m.room.encrypted$olm.yaml
Normal file
14
data/event-schemas/examples/m.room.encrypted$olm.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.encrypted",
|
||||
"content": {
|
||||
"algorithm": "m.olm.v1.curve25519-aes-sha2",
|
||||
"sender_key": "Szl29ksW/L8yZGWAX+8dY1XyFi+i5wm+DRhTGkbMiwU",
|
||||
"ciphertext": {
|
||||
"7qZcfnBmbEGzxxaWfBjElJuvn7BZx+lSz/SvFrDF/z8": {
|
||||
"type": 0,
|
||||
"body": "AwogGJJzMhf/S3GQFXAOrCZ3iKyGU5ZScVtjI0KypTYrW..."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.room.encryption.yaml
Normal file
10
data/event-schemas/examples/m.room.encryption.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.encryption",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
"rotation_period_ms": 604800000,
|
||||
"rotation_period_msgs": 100
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.room.guest_access.yaml
Normal file
8
data/event-schemas/examples/m.room.guest_access.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.guest_access",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"guest_access": "can_join"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.history_visibility",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"history_visibility": "shared"
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.room.join_rules.yaml
Normal file
8
data/event-schemas/examples/m.room.join_rules.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.join_rules",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"join_rule": "public"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"$ref": "m.room.member.yaml",
|
||||
"content": {
|
||||
"membership": "invite",
|
||||
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
|
||||
"displayname": "Alice Margatroid",
|
||||
"reason": "Looking for support"
|
||||
},
|
||||
"unsigned": {
|
||||
"age": 1234,
|
||||
"invite_room_state": {
|
||||
"$ref": "invite_room_state.json"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"$ref": "m.room.member.yaml",
|
||||
"content": {
|
||||
"membership": "invite",
|
||||
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
|
||||
"displayname": "Alice Margatroid",
|
||||
"third_party_invite": {
|
||||
"display_name": "alice",
|
||||
"signed": {
|
||||
"mxid": "@alice:example.org",
|
||||
"signatures": {
|
||||
"magic.forest": {
|
||||
"ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
|
||||
}
|
||||
},
|
||||
"token": "abc123"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
data/event-schemas/examples/m.room.member.yaml
Normal file
11
data/event-schemas/examples/m.room.member.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"state_key": "@alice:example.org",
|
||||
"type": "m.room.member",
|
||||
"content": {
|
||||
"membership": "join",
|
||||
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
|
||||
"displayname": "Alice Margatroid",
|
||||
"reason": "Looking for support"
|
||||
}
|
||||
}
|
14
data/event-schemas/examples/m.room.message$m.audio.yaml
Normal file
14
data/event-schemas/examples/m.room.message$m.audio.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "Bee Gees - Stayin' Alive",
|
||||
"url": "mxc://example.org/ffed755USFFxlgbQYZGtryd",
|
||||
"info": {
|
||||
"duration": 2140786,
|
||||
"size": 1563685,
|
||||
"mimetype": "audio/mpeg"
|
||||
},
|
||||
"msgtype": "m.audio"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.room.message$m.emote.yaml
Normal file
10
data/event-schemas/examples/m.room.message$m.emote.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "thinks this is an example emote",
|
||||
"msgtype": "m.emote",
|
||||
"format": "org.matrix.custom.html",
|
||||
"formatted_body": "thinks <b>this</b> is an example emote"
|
||||
}
|
||||
}
|
14
data/event-schemas/examples/m.room.message$m.file.yaml
Normal file
14
data/event-schemas/examples/m.room.message$m.file.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "something-important.doc",
|
||||
"filename": "something-important.doc",
|
||||
"info": {
|
||||
"mimetype": "application/msword",
|
||||
"size": 46144
|
||||
},
|
||||
"msgtype": "m.file",
|
||||
"url": "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe"
|
||||
}
|
||||
}
|
15
data/event-schemas/examples/m.room.message$m.image.yaml
Normal file
15
data/event-schemas/examples/m.room.message$m.image.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "filename.jpg",
|
||||
"info": {
|
||||
"h": 398,
|
||||
"w": 394,
|
||||
"mimetype": "image/jpeg",
|
||||
"size": 31037
|
||||
},
|
||||
"url": "mxc://example.org/JWEIFJgwEIhweiWJE",
|
||||
"msgtype": "m.image"
|
||||
}
|
||||
}
|
18
data/event-schemas/examples/m.room.message$m.location.yaml
Normal file
18
data/event-schemas/examples/m.room.message$m.location.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "Big Ben, London, UK",
|
||||
"geo_uri": "geo:51.5008,0.1247",
|
||||
"info": {
|
||||
"thumbnail_url": "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe",
|
||||
"thumbnail_info": {
|
||||
"mimetype": "image/jpeg",
|
||||
"size": 46144,
|
||||
"w": 300,
|
||||
"h": 300
|
||||
}
|
||||
},
|
||||
"msgtype": "m.location"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.room.message$m.notice.yaml
Normal file
10
data/event-schemas/examples/m.room.message$m.notice.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "This is an example notice",
|
||||
"msgtype": "m.notice",
|
||||
"format": "org.matrix.custom.html",
|
||||
"formatted_body": "This is an <strong>example</strong> notice"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "Human-readable message to explain the notice",
|
||||
"msgtype": "m.server_notice",
|
||||
"server_notice_type": "m.server_notice.usage_limit_reached",
|
||||
"admin_contact": "mailto:server.admin@example.org",
|
||||
"limit_type": "monthly_active_user"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.room.message$m.text.yaml
Normal file
10
data/event-schemas/examples/m.room.message$m.text.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "This is an example text message",
|
||||
"msgtype": "m.text",
|
||||
"format": "org.matrix.custom.html",
|
||||
"formatted_body": "<b>This is an example text message</b>"
|
||||
}
|
||||
}
|
23
data/event-schemas/examples/m.room.message$m.video.yaml
Normal file
23
data/event-schemas/examples/m.room.message$m.video.yaml
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message",
|
||||
"content": {
|
||||
"body": "Gangnam Style",
|
||||
"url": "mxc://example.org/a526eYUSFFxlgbQYZmo442",
|
||||
"info": {
|
||||
"thumbnail_url": "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe",
|
||||
"thumbnail_info": {
|
||||
"mimetype": "image/jpeg",
|
||||
"size": 46144,
|
||||
"w": 300,
|
||||
"h": 300
|
||||
},
|
||||
"w": 480,
|
||||
"h": 320,
|
||||
"duration": 2140786,
|
||||
"size": 1563685,
|
||||
"mimetype": "video/mp4"
|
||||
},
|
||||
"msgtype": "m.video"
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.room.message.feedback.yaml
Normal file
8
data/event-schemas/examples/m.room.message.feedback.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.message.feedback",
|
||||
"content": {
|
||||
"type": "delivered",
|
||||
"target_event_id": "$WEIGFHFW:localhost"
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.room.name.yaml
Normal file
8
data/event-schemas/examples/m.room.name.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.name",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"name": "The room name"
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.room.pinned_events.yaml
Normal file
8
data/event-schemas/examples/m.room.pinned_events.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.pinned_events",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"pinned": ["$someevent:example.org"]
|
||||
}
|
||||
}
|
24
data/event-schemas/examples/m.room.power_levels.yaml
Normal file
24
data/event-schemas/examples/m.room.power_levels.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.power_levels",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"ban": 50,
|
||||
"events": {
|
||||
"m.room.name": 100,
|
||||
"m.room.power_levels": 100
|
||||
},
|
||||
"events_default": 0,
|
||||
"invite": 50,
|
||||
"kick": 50,
|
||||
"redact": 50,
|
||||
"state_default": 50,
|
||||
"users": {
|
||||
"@example:localhost": 100
|
||||
},
|
||||
"users_default": 0,
|
||||
"notifications": {
|
||||
"room": 20
|
||||
}
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.room.redaction.yaml
Normal file
8
data/event-schemas/examples/m.room.redaction.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.room.redaction",
|
||||
"redacts": "$fukweghifu23:localhost",
|
||||
"content": {
|
||||
"reason": "Spamming"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.room.server_acl.yaml
Normal file
10
data/event-schemas/examples/m.room.server_acl.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.server_acl",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"allow_ip_literals": false,
|
||||
"allow": ["*"],
|
||||
"deny": ["*.evil.com", "evil.com"]
|
||||
}
|
||||
}
|
14
data/event-schemas/examples/m.room.third_party_invite.yaml
Normal file
14
data/event-schemas/examples/m.room.third_party_invite.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.third_party_invite",
|
||||
"state_key": "pc98",
|
||||
"content": {
|
||||
"display_name": "Alice Margatroid",
|
||||
"key_validity_url": "https://magic.forest/verifykey",
|
||||
"public_key": "abc123",
|
||||
"public_keys": [{
|
||||
"public_key": "def456",
|
||||
"key_validity_url": "https://magic.forest/verifykey"
|
||||
}]
|
||||
}
|
||||
}
|
9
data/event-schemas/examples/m.room.tombstone.yaml
Normal file
9
data/event-schemas/examples/m.room.tombstone.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.tombstone",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"body": "This room has been replaced",
|
||||
"replacement_room": "!newroom:example.org"
|
||||
}
|
||||
}
|
8
data/event-schemas/examples/m.room.topic.yaml
Normal file
8
data/event-schemas/examples/m.room.topic.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$ref": "core/state_event.json",
|
||||
"type": "m.room.topic",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"topic": "A room topic"
|
||||
}
|
||||
}
|
12
data/event-schemas/examples/m.room_key.withheld.yaml
Normal file
12
data/event-schemas/examples/m.room_key.withheld.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.room_key.withheld",
|
||||
"content": {
|
||||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
|
||||
"sender_key": "RF3s+E7RkTQTGF2d8Deol0FkQvgII2aJDf3/Jp5mxVU",
|
||||
"code": "m.unverified",
|
||||
"reason": "Device not verified"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.room_key.yaml
Normal file
10
data/event-schemas/examples/m.room_key.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.room_key",
|
||||
"content": {
|
||||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
|
||||
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8LlfJL7qNBEY..."
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"content": {
|
||||
"action": "request_cancellation",
|
||||
"requesting_device_id": "RJYKSTBOIE",
|
||||
"request_id": "1495474790150.19"
|
||||
},
|
||||
"type": "m.room_key_request"
|
||||
}
|
14
data/event-schemas/examples/m.room_key_request$request.yaml
Normal file
14
data/event-schemas/examples/m.room_key_request$request.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"content": {
|
||||
"body": {
|
||||
"algorithm": "m.megolm.v1.aes-sha2",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
|
||||
"sender_key": "RF3s+E7RkTQTGF2d8Deol0FkQvgII2aJDf3/Jp5mxVU"
|
||||
},
|
||||
"action": "request",
|
||||
"requesting_device_id": "RJYKSTBOIE",
|
||||
"request_id": "1495474790150.19"
|
||||
},
|
||||
"type": "m.room_key_request"
|
||||
}
|
21
data/event-schemas/examples/m.sticker.yaml
Normal file
21
data/event-schemas/examples/m.sticker.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"$ref": "core/room_event.json",
|
||||
"type": "m.sticker",
|
||||
"content": {
|
||||
"body": "Landing",
|
||||
"info": {
|
||||
"mimetype": "image/png",
|
||||
"thumbnail_info": {
|
||||
"mimetype": "image/png",
|
||||
"h": 200,
|
||||
"w": 140,
|
||||
"size": 73602
|
||||
},
|
||||
"h": 200,
|
||||
"thumbnail_url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP",
|
||||
"w": 140,
|
||||
"size": 73602
|
||||
},
|
||||
"url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP"
|
||||
}
|
||||
}
|
9
data/event-schemas/examples/m.tag.yaml
Normal file
9
data/event-schemas/examples/m.tag.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"$ref": "core/event.json",
|
||||
"type": "m.tag",
|
||||
"content": {
|
||||
"tags": {
|
||||
"u.work": {"order": 0.9}
|
||||
}
|
||||
}
|
||||
}
|
7
data/event-schemas/examples/m.typing.yaml
Normal file
7
data/event-schemas/examples/m.typing.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"$ref": "core/room_edu.json",
|
||||
"type": "m.typing",
|
||||
"content": {
|
||||
"user_ids": ["@alice:matrix.org", "@bob:example.com"]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue