atproto blogging
1{
2 "lexicon": 1,
3 "id": "chat.bsky.convo.defs",
4 "defs": {
5 "convoView": {
6 "type": "object",
7 "required": [
8 "id",
9 "rev",
10 "members",
11 "muted",
12 "unreadCount"
13 ],
14 "properties": {
15 "id": {
16 "type": "string"
17 },
18 "lastMessage": {
19 "type": "union",
20 "refs": [
21 "#messageView",
22 "#deletedMessageView"
23 ]
24 },
25 "lastReaction": {
26 "type": "union",
27 "refs": [
28 "#messageAndReactionView"
29 ]
30 },
31 "members": {
32 "type": "array",
33 "items": {
34 "type": "ref",
35 "ref": "chat.bsky.actor.defs#profileViewBasic"
36 }
37 },
38 "muted": {
39 "type": "boolean"
40 },
41 "rev": {
42 "type": "string"
43 },
44 "status": {
45 "type": "string",
46 "knownValues": [
47 "request",
48 "accepted"
49 ]
50 },
51 "unreadCount": {
52 "type": "integer"
53 }
54 }
55 },
56 "deletedMessageView": {
57 "type": "object",
58 "required": [
59 "id",
60 "rev",
61 "sender",
62 "sentAt"
63 ],
64 "properties": {
65 "id": {
66 "type": "string"
67 },
68 "rev": {
69 "type": "string"
70 },
71 "sender": {
72 "type": "ref",
73 "ref": "#messageViewSender"
74 },
75 "sentAt": {
76 "type": "string",
77 "format": "datetime"
78 }
79 }
80 },
81 "logAcceptConvo": {
82 "type": "object",
83 "required": [
84 "rev",
85 "convoId"
86 ],
87 "properties": {
88 "convoId": {
89 "type": "string"
90 },
91 "rev": {
92 "type": "string"
93 }
94 }
95 },
96 "logAddReaction": {
97 "type": "object",
98 "required": [
99 "rev",
100 "convoId",
101 "message",
102 "reaction"
103 ],
104 "properties": {
105 "convoId": {
106 "type": "string"
107 },
108 "message": {
109 "type": "union",
110 "refs": [
111 "#messageView",
112 "#deletedMessageView"
113 ]
114 },
115 "reaction": {
116 "type": "ref",
117 "ref": "#reactionView"
118 },
119 "rev": {
120 "type": "string"
121 }
122 }
123 },
124 "logBeginConvo": {
125 "type": "object",
126 "required": [
127 "rev",
128 "convoId"
129 ],
130 "properties": {
131 "convoId": {
132 "type": "string"
133 },
134 "rev": {
135 "type": "string"
136 }
137 }
138 },
139 "logCreateMessage": {
140 "type": "object",
141 "required": [
142 "rev",
143 "convoId",
144 "message"
145 ],
146 "properties": {
147 "convoId": {
148 "type": "string"
149 },
150 "message": {
151 "type": "union",
152 "refs": [
153 "#messageView",
154 "#deletedMessageView"
155 ]
156 },
157 "rev": {
158 "type": "string"
159 }
160 }
161 },
162 "logDeleteMessage": {
163 "type": "object",
164 "required": [
165 "rev",
166 "convoId",
167 "message"
168 ],
169 "properties": {
170 "convoId": {
171 "type": "string"
172 },
173 "message": {
174 "type": "union",
175 "refs": [
176 "#messageView",
177 "#deletedMessageView"
178 ]
179 },
180 "rev": {
181 "type": "string"
182 }
183 }
184 },
185 "logLeaveConvo": {
186 "type": "object",
187 "required": [
188 "rev",
189 "convoId"
190 ],
191 "properties": {
192 "convoId": {
193 "type": "string"
194 },
195 "rev": {
196 "type": "string"
197 }
198 }
199 },
200 "logMuteConvo": {
201 "type": "object",
202 "required": [
203 "rev",
204 "convoId"
205 ],
206 "properties": {
207 "convoId": {
208 "type": "string"
209 },
210 "rev": {
211 "type": "string"
212 }
213 }
214 },
215 "logReadMessage": {
216 "type": "object",
217 "required": [
218 "rev",
219 "convoId",
220 "message"
221 ],
222 "properties": {
223 "convoId": {
224 "type": "string"
225 },
226 "message": {
227 "type": "union",
228 "refs": [
229 "#messageView",
230 "#deletedMessageView"
231 ]
232 },
233 "rev": {
234 "type": "string"
235 }
236 }
237 },
238 "logRemoveReaction": {
239 "type": "object",
240 "required": [
241 "rev",
242 "convoId",
243 "message",
244 "reaction"
245 ],
246 "properties": {
247 "convoId": {
248 "type": "string"
249 },
250 "message": {
251 "type": "union",
252 "refs": [
253 "#messageView",
254 "#deletedMessageView"
255 ]
256 },
257 "reaction": {
258 "type": "ref",
259 "ref": "#reactionView"
260 },
261 "rev": {
262 "type": "string"
263 }
264 }
265 },
266 "logUnmuteConvo": {
267 "type": "object",
268 "required": [
269 "rev",
270 "convoId"
271 ],
272 "properties": {
273 "convoId": {
274 "type": "string"
275 },
276 "rev": {
277 "type": "string"
278 }
279 }
280 },
281 "messageAndReactionView": {
282 "type": "object",
283 "required": [
284 "message",
285 "reaction"
286 ],
287 "properties": {
288 "message": {
289 "type": "ref",
290 "ref": "#messageView"
291 },
292 "reaction": {
293 "type": "ref",
294 "ref": "#reactionView"
295 }
296 }
297 },
298 "messageInput": {
299 "type": "object",
300 "required": [
301 "text"
302 ],
303 "properties": {
304 "embed": {
305 "type": "union",
306 "refs": [
307 "app.bsky.embed.record"
308 ]
309 },
310 "facets": {
311 "type": "array",
312 "description": "Annotations of text (mentions, URLs, hashtags, etc)",
313 "items": {
314 "type": "ref",
315 "ref": "app.bsky.richtext.facet"
316 }
317 },
318 "text": {
319 "type": "string",
320 "maxLength": 10000,
321 "maxGraphemes": 1000
322 }
323 }
324 },
325 "messageRef": {
326 "type": "object",
327 "required": [
328 "did",
329 "messageId",
330 "convoId"
331 ],
332 "properties": {
333 "convoId": {
334 "type": "string"
335 },
336 "did": {
337 "type": "string",
338 "format": "did"
339 },
340 "messageId": {
341 "type": "string"
342 }
343 }
344 },
345 "messageView": {
346 "type": "object",
347 "required": [
348 "id",
349 "rev",
350 "text",
351 "sender",
352 "sentAt"
353 ],
354 "properties": {
355 "embed": {
356 "type": "union",
357 "refs": [
358 "app.bsky.embed.record#view"
359 ]
360 },
361 "facets": {
362 "type": "array",
363 "description": "Annotations of text (mentions, URLs, hashtags, etc)",
364 "items": {
365 "type": "ref",
366 "ref": "app.bsky.richtext.facet"
367 }
368 },
369 "id": {
370 "type": "string"
371 },
372 "reactions": {
373 "type": "array",
374 "description": "Reactions to this message, in ascending order of creation time.",
375 "items": {
376 "type": "ref",
377 "ref": "#reactionView"
378 }
379 },
380 "rev": {
381 "type": "string"
382 },
383 "sender": {
384 "type": "ref",
385 "ref": "#messageViewSender"
386 },
387 "sentAt": {
388 "type": "string",
389 "format": "datetime"
390 },
391 "text": {
392 "type": "string",
393 "maxLength": 10000,
394 "maxGraphemes": 1000
395 }
396 }
397 },
398 "messageViewSender": {
399 "type": "object",
400 "required": [
401 "did"
402 ],
403 "properties": {
404 "did": {
405 "type": "string",
406 "format": "did"
407 }
408 }
409 },
410 "reactionView": {
411 "type": "object",
412 "required": [
413 "value",
414 "sender",
415 "createdAt"
416 ],
417 "properties": {
418 "createdAt": {
419 "type": "string",
420 "format": "datetime"
421 },
422 "sender": {
423 "type": "ref",
424 "ref": "#reactionViewSender"
425 },
426 "value": {
427 "type": "string"
428 }
429 }
430 },
431 "reactionViewSender": {
432 "type": "object",
433 "required": [
434 "did"
435 ],
436 "properties": {
437 "did": {
438 "type": "string",
439 "format": "did"
440 }
441 }
442 }
443 }
444}