-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.schema.json
161 lines (161 loc) · 6.65 KB
/
post.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"$schema": "http://json-schema.org/schema",
"description": "Describes the storage format of individual posts.",
"required": [
"id",
"userId",
"createTime",
"message"
],
"properties": {
"id": {
"description": "Unique message identificatior.",
"type": "string"
},
"userId": {
"description": "Unique user identificator.",
"type": "string"
},
"createTime": {
"description": "Creation time in miliseconds since 1970-01-01.",
"type": "integer"
},
"message": {
"description": "Content of the post.",
"type": "string"
},
"isPinned": {
"description": "Is this post pinned to the channel?",
"type": "boolean"
},
"updateTime": {
"description": "Time at which post was last updated, in miliseconds since 1970-01-01.",
"type": "integer"
},
"publicUpdateTime": {
"description": "Alternative to updateTime, correspoding to `edit_at` from Mattermost v4 API. (as opposed to `update_at`)",
"type": "integer"
},
"deleteTime": {
"description": "Time at which post was deleted, in miliseconds since 1970-01-01. Note that ordinary users do not fetch deleted posts at all.",
"type": "integer"
},
"parentPostId": {
"description": "Id of post this post replies to.",
"type": "string"
},
"rootPostId": {
"description": "Root of the thread (chain of posts) this post replies to.",
"type": "string"
},
"specialMsgType": {
"description": "Protocol-specific label for meta-messages like \"user X joined the channel\". Ommited for conventional user messages.",
"type": "string"
},
"emojis": {
"description": "List of (nontrivial) emojis appearing in the message.",
"type": "array",
"items": {
"description": "Emoji identificator. Full metadata are available in channel header.",
"type": "string"
}
},
"attachments": {
"description": "List of file attached to the post.",
"type": "array",
"items": {
"description": "Describes single file attachment.",
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"description": "File attachment's unique idenfiticator.",
"type": "string"
},
"name": {
"description": "File name of the attachment.",
"type": "string"
},
"byteSize": {
"description": "File size in bytes.",
"type": "integer"
},
"mimeTime": {
"description": "MIME type of the attachment.",
"type": "string"
},
"createTime": {
"description": "Time when the attachment was uploaded to the system in miliseconds since 1970-01-01. Usually coinciding with post creation.",
"type": "integer"
},
"updateTime": {
"description": "Time when the attachment was last modified in miliseconds since 1970-01-01.",
"type": "integer"
},
"deleteTime": {
"description": "Time when the attachment was marked as deleted, in miliseconds since 1970-01-01. Note that ordinary users do not fetch deleted attachments at all.",
"type": "integer"
},
"misc": {
"description": "Miscallaneous unrecognized properties of the object. Generally, any additional fetched property that is not known to be (un)useable ends up here.",
"type": "object"
}
}
}
},
"reactions": {
"description": "List of simple emoji reactions to the post.",
"type": "array",
"items": {
"description": "Describes emoji reaction from single user.",
"type": "object",
"oneOf": [
{
"required": [
"userId",
"createTime",
"emojiId"
]
},
{
"required": [
"userId",
"createTime",
"emojiName"
]
}
],
"properties": {
"userId": {
"description": "User identificator of the user posting the reaction.",
"type": "string"
},
"createTime": {
"description": "Time of the reaction in miliseconds since 1970-01-01.",
"type": "integer"
},
"emojiId": {
"description": "Identifier of the emoji used in reaction.",
"type": "string"
},
"emojiName": {
"description": "Name of the emoji used in reaction.",
"$comment": "As Mattermost API currently does not return emoji id, it's implicitly assumed emoji name is unique.",
"type": "string"
},
"misc": {
"description": "Miscallaneous unrecognized properties of the object. Generally, any additional fetched property that is not known to be (un)useable ends up here.",
"type": "object"
}
}
}
},
"misc": {
"description": "Miscallaneous unrecognized properties of the object. Generally, any additional fetched property that is not known to be (un)useable ends up here.",
"type": "object"
}
}
}