Comparison

mod_rest/res/schema-xmpp.json @ 4530:33c149d0261d

mod_rest: Add mappings for a whole pile of XEPs Look ma, programming in JSON! XEP-0012: Last Activity XEP-0077: In-Band Registration XEP-0115: Entity Capabilities XEP-0153: vCard-Based Avatars XEP-0297: Stanza Forwarding XEP-0308: Last Message Correction XEP-0319: Last User Interaction in Presence XEP-0333: Chat Markers XEP-0367: Message Attaching XEP-0372: References XEP-0421: Anonymous unique occupant identifiers for MUCs XEP-0428: Fallback Indication XEP-0444: Message Reactions
author Kim Alvefur <zash@zash.se>
date Tue, 23 Mar 2021 23:18:33 +0100
parent 4523:6e20e6bf96f0
child 4531:60fe204b980f
comparison
equal deleted inserted replaced
4529:c6d44e1fb4d9 4530:33c149d0261d
60 } 60 }
61 }, 61 },
62 "properties" : { 62 "properties" : {
63 "iq" : { 63 "iq" : {
64 "properties" : { 64 "properties" : {
65 "lastactivity" : {
66 "properties" : {
67 "seconds" : {
68 "minimum" : 0,
69 "type" : "integer",
70 "xml" : {
71 "attribute" : true
72 }
73 },
74 "status" : {
75 "type" : "string",
76 "xml" : {
77 "text" : true
78 }
79 }
80 },
81 "title" : "XEP-0012: Last Activity",
82 "type" : "object",
83 "xml" : {
84 "name" : "query",
85 "namespace" : "jabber:iq:last"
86 }
87 },
65 "oob" : { 88 "oob" : {
66 "properties" : { 89 "properties" : {
67 "desc" : { 90 "desc" : {
68 "type" : "string" 91 "type" : "string"
69 }, 92 },
88 "type" : "boolean", 111 "type" : "boolean",
89 "xml" : { 112 "xml" : {
90 "name" : "ping", 113 "name" : "ping",
91 "namespace" : "urn:xmpp:ping", 114 "namespace" : "urn:xmpp:ping",
92 "x_name_is_value" : true 115 "x_name_is_value" : true
116 }
117 },
118 "register" : {
119 "description" : "Register with a service",
120 "properties" : {
121 "address" : {
122 "type" : "string"
123 },
124 "city" : {
125 "type" : "string"
126 },
127 "date" : {
128 "type" : "string"
129 },
130 "email" : {
131 "type" : "string"
132 },
133 "first" : {
134 "type" : "string"
135 },
136 "instructions" : {
137 "type" : "string"
138 },
139 "key" : {
140 "type" : "string"
141 },
142 "last" : {
143 "type" : "string"
144 },
145 "misc" : {
146 "type" : "string"
147 },
148 "name" : {
149 "type" : "string"
150 },
151 "nick" : {
152 "type" : "string"
153 },
154 "password" : {
155 "type" : "string"
156 },
157 "phone" : {
158 "type" : "string"
159 },
160 "registered" : {
161 "type" : "boolean",
162 "xml" : {
163 "x_name_is_value" : true
164 }
165 },
166 "remove" : {
167 "type" : "boolean",
168 "xml" : {
169 "x_name_is_value" : true
170 }
171 },
172 "state" : {
173 "type" : "string"
174 },
175 "text" : {
176 "type" : "string"
177 },
178 "url" : {
179 "type" : "string"
180 },
181 "username" : {
182 "type" : "string"
183 },
184 "zip" : {
185 "type" : "string"
186 }
187 },
188 "required" : [
189 "username",
190 "password"
191 ],
192 "title" : "XEP-0077: In-Band Registration",
193 "type" : "object",
194 "xml" : {
195 "name" : "query",
196 "namespace" : "jabber:iq:register"
93 } 197 }
94 }, 198 },
95 "stats" : { 199 "stats" : {
96 "description" : "Simple statistics gathering, array of (name, unit, value) tuples.", 200 "description" : "Simple statistics gathering, array of (name, unit, value) tuples.",
97 "items" : { 201 "items" : {
161 "name" : "iq" 265 "name" : "iq"
162 } 266 }
163 }, 267 },
164 "message" : { 268 "message" : {
165 "properties" : { 269 "properties" : {
270 "attach_to" : {
271 "title" : "XEP-0367: Message Attaching",
272 "type" : "string",
273 "xml" : {
274 "name" : "attach-to",
275 "namespace" : "urn:xmpp:message-attaching:1",
276 "x_single_attribute" : "id"
277 }
278 },
166 "body" : { 279 "body" : {
167 "description" : "Human-readable chat message", 280 "description" : "Human-readable chat message",
168 "example" : "Hello, World!", 281 "example" : "Hello, World!",
169 "type" : "string" 282 "type" : "string"
170 }, 283 },
284 "displayed" : {
285 "description" : "Message ID of a message that has been displayed",
286 "title" : "XEP-0333: Chat Markers",
287 "type" : "string",
288 "xml" : {
289 "namespace" : "urn:xmpp:chat-markers:0"
290 }
291 },
292 "fallback" : {
293 "title" : "XEP-0428: Fallback Indication",
294 "type" : "boolean",
295 "xml" : {
296 "name" : "fallback",
297 "namespace" : "urn:xmpp:fallback:0",
298 "x_name_is_value" : true
299 }
300 },
301 "forwarded" : {
302 "title" : "XEP-0297: Stanza Forwarding",
303 "type" : "object",
304 "xml" : {
305 "name" : "forwarded",
306 "namespace" : "urn:xmpp:forward:0"
307 }
308 },
309 "markable" : {
310 "title" : "XEP-0333: Chat Markers",
311 "type" : "boolean",
312 "xml" : {
313 "namespace" : "urn:xmpp:chat-markers:0",
314 "x_name_is_value" : true
315 }
316 },
317 "occupant_id" : {
318 "properties" : {
319 "id" : {
320 "type" : "string",
321 "xml" : {
322 "attribute" : true
323 }
324 }
325 },
326 "title" : "XEP-0421: Anonymous unique occupant identifiers for MUCs",
327 "type" : "object",
328 "xml" : {
329 "name" : "occupant-id",
330 "namespace" : "urn:xmpp:occupant-id:0"
331 }
332 },
171 "oob" : { 333 "oob" : {
172 "properties" : { 334 "properties" : {
173 "desc" : { 335 "desc" : {
174 "type" : "string" 336 "type" : "string"
175 }, 337 },
181 "title" : "XEP-0066: Out of Band Data", 343 "title" : "XEP-0066: Out of Band Data",
182 "type" : "object", 344 "type" : "object",
183 "xml" : { 345 "xml" : {
184 "name" : "x", 346 "name" : "x",
185 "namespace" : "jabber:x:oob" 347 "namespace" : "jabber:x:oob"
348 }
349 },
350 "reactions" : {
351 "properties" : {
352 "id" : {
353 "type" : "string",
354 "xml" : {
355 "attribute" : true
356 }
357 },
358 "reactions" : {
359 "items" : {
360 "type" : "string",
361 "xml" : {
362 "name" : "reaction"
363 }
364 },
365 "type" : "array",
366 "xml" : {
367 "name" : "reactions",
368 "wrapped" : false
369 }
370 }
371 },
372 "title" : "XEP-0444: Message Reactions",
373 "type" : "object",
374 "xml" : {
375 "namespace" : "urn:xmpp:reactions:0"
376 }
377 },
378 "reference" : {
379 "properties" : {
380 "begin" : {
381 "minimum" : 0,
382 "type" : "integer",
383 "xml" : {
384 "attribute" : true
385 }
386 },
387 "end" : {
388 "minimum" : 0,
389 "type" : "integer",
390 "xml" : {
391 "attribute" : true
392 }
393 },
394 "type" : {
395 "type" : "string",
396 "xml" : {
397 "attribute" : true
398 }
399 },
400 "uri" : {
401 "format" : "uri",
402 "type" : "string",
403 "xml" : {
404 "attribute" : true
405 }
406 }
407 },
408 "required" : [
409 "type",
410 "uri"
411 ],
412 "title" : "XEP-0372: References",
413 "type" : "object",
414 "xml" : {
415 "namespace" : "urn:xmpp:reference:0"
186 } 416 }
187 }, 417 },
188 "replace" : { 418 "replace" : {
189 "description" : "For indicating that a message is a correction of the last sent message.", 419 "description" : "For indicating that a message is a correction of the last sent message.",
190 "title" : "XEP-0308: Last Message Correction", 420 "title" : "XEP-0308: Last Message Correction",
239 "name" : "message" 469 "name" : "message"
240 } 470 }
241 }, 471 },
242 "presence" : { 472 "presence" : {
243 "properties" : { 473 "properties" : {
474 "caps" : {
475 "properties" : {
476 "ext" : {
477 "type" : "string",
478 "xml" : {
479 "attribute" : true
480 }
481 },
482 "hash" : {
483 "type" : "string",
484 "xml" : {
485 "attribute" : true
486 }
487 },
488 "node" : {
489 "type" : "string",
490 "xml" : {
491 "attribute" : true
492 }
493 },
494 "ver" : {
495 "type" : "string",
496 "xml" : {
497 "attribute" : true
498 }
499 }
500 },
501 "title" : "XEP-0115: Entity Capabilities",
502 "type" : "object",
503 "xml" : {
504 "name" : "c",
505 "namespace" : "http://jabber.org/protocol/caps"
506 }
507 },
508 "idle_since" : {
509 "format" : "date-time",
510 "title" : "XEP-0319: Last User Interaction in Presence",
511 "type" : "string",
512 "xml" : {
513 "name" : "idle",
514 "namespace" : "urn:xmpp:idle:1",
515 "x_single_attribute" : "since"
516 }
517 },
244 "priority" : { 518 "priority" : {
245 "description" : "Presence priority", 519 "description" : "Presence priority",
246 "maximum" : 127, 520 "maximum" : 127,
247 "minimum" : -128, 521 "minimum" : -128,
248 "type" : "integer" 522 "type" : "integer"
258 "type" : "string" 532 "type" : "string"
259 }, 533 },
260 "status" : { 534 "status" : {
261 "description" : "Textual status message.", 535 "description" : "Textual status message.",
262 "type" : "string" 536 "type" : "string"
537 },
538 "vcard_update" : {
539 "properties" : {
540 "photo" : {
541 "type" : "string"
542 }
543 },
544 "title" : "XEP-0153: vCard-Based Avatars",
545 "type" : "object",
546 "xml" : {
547 "name" : "x",
548 "namespace" : "vcard-temp:x:update"
549 }
263 } 550 }
264 }, 551 },
265 "type" : "object", 552 "type" : "object",
266 "xml" : { 553 "xml" : {
267 "name" : "presence" 554 "name" : "presence"