@overtable/schemas 0.0.0-stage → 0.1.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 (44) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +202 -0
  3. package/README.md +55 -2
  4. package/dist/index.d.ts +215 -0
  5. package/dist/index.js +759 -0
  6. package/dist/json-schema/pairs/calendar.freebusy.answer.json +41 -0
  7. package/dist/json-schema/pairs/calendar.freebusy.ask.json +32 -0
  8. package/dist/json-schema/pairs/contact.channel.answer.json +26 -0
  9. package/dist/json-schema/pairs/contact.channel.ask.json +7 -0
  10. package/dist/json-schema/pairs/message.answer.json +7 -0
  11. package/dist/json-schema/pairs/message.ask.json +17 -0
  12. package/dist/json-schema/pairs/note.answer.json +7 -0
  13. package/dist/json-schema/pairs/note.ask.json +17 -0
  14. package/dist/json-schema/pairs/offers.list.answer.json +68 -0
  15. package/dist/json-schema/pairs/offers.list.ask.json +14 -0
  16. package/dist/json-schema/pairs/overtable.ping.answer.json +17 -0
  17. package/dist/json-schema/pairs/overtable.ping.ask.json +7 -0
  18. package/dist/json-schema/pairs/preferences.ask.answer.json +22 -0
  19. package/dist/json-schema/pairs/preferences.ask.ask.json +17 -0
  20. package/dist/json-schema/pairs/quote.answer.json +57 -0
  21. package/dist/json-schema/pairs/quote.ask.json +85 -0
  22. package/dist/json-schema/pairs/rate.range.answer.json +60 -0
  23. package/dist/json-schema/pairs/rate.range.ask.json +17 -0
  24. package/dist/json-schema/pairs/recommendation.ask.answer.json +21 -0
  25. package/dist/json-schema/pairs/recommendation.ask.ask.json +17 -0
  26. package/dist/json-schema/pairs/scope.ask.answer.json +25 -0
  27. package/dist/json-schema/pairs/scope.ask.ask.json +17 -0
  28. package/dist/json-schema/pairs/slot.answer.json +43 -0
  29. package/dist/json-schema/pairs/slot.ask.json +35 -0
  30. package/dist/json-schema/requests/order.json +56 -0
  31. package/dist/json-schema/requests/poll.json +30 -0
  32. package/dist/json-schema/requests/quote.json +56 -0
  33. package/dist/json-schema/requests/request_answer.json +216 -0
  34. package/dist/json-schema/requests/request_create.json +676 -0
  35. package/dist/json-schema/requests/slot.json +33 -0
  36. package/dist/json-schema/share/availability.json +50 -0
  37. package/dist/json-schema/share/contact_details.json +45 -0
  38. package/dist/json-schema/share/documents.json +59 -0
  39. package/dist/json-schema/share/finance.json +71 -0
  40. package/dist/json-schema/share/health.json +52 -0
  41. package/dist/json-schema/share/location.json +45 -0
  42. package/dist/json-schema/share/preferences.json +46 -0
  43. package/dist/json-schema/share/share.json +458 -0
  44. package/package.json +47 -4
@@ -0,0 +1,676 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "request_create",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "type": "string",
8
+ "enum": [
9
+ "slot",
10
+ "quote",
11
+ "order",
12
+ "poll",
13
+ "share"
14
+ ]
15
+ },
16
+ "to": {
17
+ "type": "string",
18
+ "minLength": 2,
19
+ "maxLength": 64,
20
+ "description": "@handle of the other agent: reaches it even if it is not a contact yet"
21
+ },
22
+ "toBotId": {
23
+ "type": "string",
24
+ "format": "uuid",
25
+ "description": "Direct contact (use this, to, or roomId)"
26
+ },
27
+ "roomId": {
28
+ "type": "string",
29
+ "format": "uuid",
30
+ "description": "Room id for a group poll or shared request"
31
+ },
32
+ "threadId": {
33
+ "anyOf": [
34
+ {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 128
38
+ },
39
+ {
40
+ "type": "null"
41
+ }
42
+ ]
43
+ },
44
+ "urgent": {
45
+ "type": "boolean"
46
+ },
47
+ "slot": {
48
+ "type": "object",
49
+ "properties": {
50
+ "when": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "maxLength": 120,
54
+ "description": "When, as an ISO 8601 date and time with its offset: 2026-11-07T20:00+01:00. Words or a time without an offset may wait for the recipient's human."
55
+ },
56
+ "service": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 60,
60
+ "description": "What it is for, in a few words: Lunch, Haircut. Nothing personal."
61
+ },
62
+ "partySize": {
63
+ "type": "integer",
64
+ "minimum": 1,
65
+ "maximum": 100
66
+ },
67
+ "place": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 120
71
+ }
72
+ },
73
+ "required": [
74
+ "when"
75
+ ],
76
+ "additionalProperties": false
77
+ },
78
+ "quote": {
79
+ "type": "object",
80
+ "properties": {
81
+ "title": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 120
85
+ },
86
+ "amount": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "maxLength": 40,
90
+ "description": "Total, e.g. 45 EUR"
91
+ },
92
+ "currency": {
93
+ "type": "string",
94
+ "minLength": 1,
95
+ "maxLength": 12
96
+ },
97
+ "items": {
98
+ "type": "array",
99
+ "items": {
100
+ "type": "object",
101
+ "properties": {
102
+ "label": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "maxLength": 120
106
+ },
107
+ "amount": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "maxLength": 40
111
+ }
112
+ },
113
+ "required": [
114
+ "label"
115
+ ],
116
+ "additionalProperties": false
117
+ },
118
+ "maxItems": 40
119
+ },
120
+ "validUntil": {
121
+ "type": "string",
122
+ "minLength": 1,
123
+ "maxLength": 60
124
+ }
125
+ },
126
+ "required": [
127
+ "title",
128
+ "amount"
129
+ ],
130
+ "additionalProperties": false
131
+ },
132
+ "order": {
133
+ "type": "object",
134
+ "properties": {
135
+ "title": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 120
139
+ },
140
+ "items": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "object",
144
+ "properties": {
145
+ "label": {
146
+ "type": "string",
147
+ "minLength": 1,
148
+ "maxLength": 120
149
+ },
150
+ "quantity": {
151
+ "type": "integer",
152
+ "minimum": 1,
153
+ "maximum": 999
154
+ },
155
+ "amount": {
156
+ "type": "string",
157
+ "minLength": 1,
158
+ "maxLength": 40
159
+ }
160
+ },
161
+ "required": [
162
+ "label"
163
+ ],
164
+ "additionalProperties": false
165
+ },
166
+ "minItems": 1,
167
+ "maxItems": 40
168
+ },
169
+ "total": {
170
+ "type": "string",
171
+ "minLength": 1,
172
+ "maxLength": 40
173
+ },
174
+ "notes": {
175
+ "type": "string",
176
+ "minLength": 1,
177
+ "maxLength": 500
178
+ }
179
+ },
180
+ "required": [
181
+ "title",
182
+ "items"
183
+ ],
184
+ "additionalProperties": false
185
+ },
186
+ "poll": {
187
+ "type": "object",
188
+ "properties": {
189
+ "question": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "maxLength": 200
193
+ },
194
+ "options": {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "string",
198
+ "minLength": 1,
199
+ "maxLength": 120
200
+ },
201
+ "minItems": 2,
202
+ "maxItems": 12
203
+ },
204
+ "multi": {
205
+ "type": "boolean"
206
+ }
207
+ },
208
+ "required": [
209
+ "question",
210
+ "options"
211
+ ],
212
+ "additionalProperties": false
213
+ },
214
+ "share": {
215
+ "anyOf": [
216
+ {
217
+ "type": "object",
218
+ "properties": {
219
+ "category": {
220
+ "type": "string",
221
+ "const": "availability"
222
+ },
223
+ "payload": {
224
+ "type": "object",
225
+ "properties": {
226
+ "title": {
227
+ "type": "string",
228
+ "minLength": 1,
229
+ "maxLength": 80,
230
+ "pattern": "^[^\\r\\n<>]+$",
231
+ "description": "A short label the owner reads on the hold screen: Allergy note, Home address. Not the data itself."
232
+ },
233
+ "timeZone": {
234
+ "type": "string",
235
+ "minLength": 1,
236
+ "maxLength": 64,
237
+ "pattern": "^[^\\r\\n<>]+$",
238
+ "description": "IANA time zone, e.g. Europe/Paris"
239
+ },
240
+ "free": {
241
+ "type": "array",
242
+ "items": {
243
+ "type": "object",
244
+ "properties": {
245
+ "from": {
246
+ "type": "string",
247
+ "format": "date-time"
248
+ },
249
+ "to": {
250
+ "type": "string",
251
+ "format": "date-time"
252
+ }
253
+ },
254
+ "required": [
255
+ "from",
256
+ "to"
257
+ ],
258
+ "additionalProperties": false
259
+ },
260
+ "minItems": 1,
261
+ "maxItems": 50,
262
+ "description": "Free windows, ISO 8601 with offset"
263
+ }
264
+ },
265
+ "required": [
266
+ "title",
267
+ "free"
268
+ ],
269
+ "additionalProperties": false
270
+ }
271
+ },
272
+ "required": [
273
+ "category",
274
+ "payload"
275
+ ],
276
+ "additionalProperties": false
277
+ },
278
+ {
279
+ "type": "object",
280
+ "properties": {
281
+ "category": {
282
+ "type": "string",
283
+ "const": "finance"
284
+ },
285
+ "payload": {
286
+ "type": "object",
287
+ "properties": {
288
+ "title": {
289
+ "type": "string",
290
+ "minLength": 1,
291
+ "maxLength": 80,
292
+ "pattern": "^[^\\r\\n<>]+$",
293
+ "description": "A short label the owner reads on the hold screen: Allergy note, Home address. Not the data itself."
294
+ },
295
+ "kind": {
296
+ "type": "string",
297
+ "enum": [
298
+ "amount",
299
+ "budget",
300
+ "bank_details",
301
+ "invoice",
302
+ "other"
303
+ ]
304
+ },
305
+ "amount": {
306
+ "type": "object",
307
+ "properties": {
308
+ "value": {
309
+ "type": "number",
310
+ "minimum": 0,
311
+ "maximum": 1000000000000
312
+ },
313
+ "currency": {
314
+ "type": "string",
315
+ "pattern": "^[A-Z]{3}$"
316
+ }
317
+ },
318
+ "required": [
319
+ "value",
320
+ "currency"
321
+ ],
322
+ "additionalProperties": false
323
+ },
324
+ "iban": {
325
+ "allOf": [
326
+ {
327
+ "type": "string"
328
+ },
329
+ {
330
+ "type": "string",
331
+ "pattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{10,30}$"
332
+ }
333
+ ]
334
+ },
335
+ "reference": {
336
+ "type": "string",
337
+ "minLength": 1,
338
+ "maxLength": 120,
339
+ "pattern": "^[^\\r\\n<>]+$"
340
+ },
341
+ "note": {
342
+ "type": "string",
343
+ "minLength": 1,
344
+ "maxLength": 500,
345
+ "pattern": "^[^<>]+$"
346
+ }
347
+ },
348
+ "required": [
349
+ "title",
350
+ "kind"
351
+ ],
352
+ "additionalProperties": false
353
+ }
354
+ },
355
+ "required": [
356
+ "category",
357
+ "payload"
358
+ ],
359
+ "additionalProperties": false
360
+ },
361
+ {
362
+ "type": "object",
363
+ "properties": {
364
+ "category": {
365
+ "type": "string",
366
+ "const": "health"
367
+ },
368
+ "payload": {
369
+ "type": "object",
370
+ "properties": {
371
+ "title": {
372
+ "type": "string",
373
+ "minLength": 1,
374
+ "maxLength": 80,
375
+ "pattern": "^[^\\r\\n<>]+$",
376
+ "description": "A short label the owner reads on the hold screen: Allergy note, Home address. Not the data itself."
377
+ },
378
+ "kind": {
379
+ "type": "string",
380
+ "enum": [
381
+ "allergy",
382
+ "medication",
383
+ "condition",
384
+ "appointment",
385
+ "vaccination",
386
+ "other"
387
+ ]
388
+ },
389
+ "subject": {
390
+ "type": "string",
391
+ "minLength": 1,
392
+ "maxLength": 80,
393
+ "pattern": "^[^\\r\\n<>]+$",
394
+ "description": "Whom it is about, e.g. Lily"
395
+ },
396
+ "details": {
397
+ "type": "string",
398
+ "minLength": 1,
399
+ "maxLength": 1000,
400
+ "pattern": "^[^<>]+$"
401
+ },
402
+ "severity": {
403
+ "type": "string",
404
+ "enum": [
405
+ "low",
406
+ "medium",
407
+ "high"
408
+ ]
409
+ }
410
+ },
411
+ "required": [
412
+ "title",
413
+ "kind",
414
+ "details"
415
+ ],
416
+ "additionalProperties": false
417
+ }
418
+ },
419
+ "required": [
420
+ "category",
421
+ "payload"
422
+ ],
423
+ "additionalProperties": false
424
+ },
425
+ {
426
+ "type": "object",
427
+ "properties": {
428
+ "category": {
429
+ "type": "string",
430
+ "const": "contact_details"
431
+ },
432
+ "payload": {
433
+ "type": "object",
434
+ "properties": {
435
+ "title": {
436
+ "type": "string",
437
+ "minLength": 1,
438
+ "maxLength": 80,
439
+ "pattern": "^[^\\r\\n<>]+$",
440
+ "description": "A short label the owner reads on the hold screen: Allergy note, Home address. Not the data itself."
441
+ },
442
+ "name": {
443
+ "type": "string",
444
+ "minLength": 1,
445
+ "maxLength": 120,
446
+ "pattern": "^[^\\r\\n<>]+$"
447
+ },
448
+ "email": {
449
+ "type": "string",
450
+ "format": "email",
451
+ "maxLength": 254
452
+ },
453
+ "phone": {
454
+ "type": "string",
455
+ "pattern": "^\\+?[0-9][0-9 ().-]{5,24}$"
456
+ },
457
+ "address": {
458
+ "type": "string",
459
+ "minLength": 1,
460
+ "maxLength": 300,
461
+ "pattern": "^[^<>]+$"
462
+ },
463
+ "handle": {
464
+ "type": "string",
465
+ "minLength": 1,
466
+ "maxLength": 64,
467
+ "pattern": "^[^\\r\\n<>]+$"
468
+ }
469
+ },
470
+ "required": [
471
+ "title"
472
+ ],
473
+ "additionalProperties": false
474
+ }
475
+ },
476
+ "required": [
477
+ "category",
478
+ "payload"
479
+ ],
480
+ "additionalProperties": false
481
+ },
482
+ {
483
+ "type": "object",
484
+ "properties": {
485
+ "category": {
486
+ "type": "string",
487
+ "const": "location"
488
+ },
489
+ "payload": {
490
+ "type": "object",
491
+ "properties": {
492
+ "title": {
493
+ "type": "string",
494
+ "minLength": 1,
495
+ "maxLength": 80,
496
+ "pattern": "^[^\\r\\n<>]+$",
497
+ "description": "A short label the owner reads on the hold screen: Allergy note, Home address. Not the data itself."
498
+ },
499
+ "place": {
500
+ "type": "string",
501
+ "minLength": 1,
502
+ "maxLength": 200,
503
+ "pattern": "^[^\\r\\n<>]+$"
504
+ },
505
+ "address": {
506
+ "type": "string",
507
+ "minLength": 1,
508
+ "maxLength": 300,
509
+ "pattern": "^[^<>]+$"
510
+ },
511
+ "lat": {
512
+ "type": "number",
513
+ "minimum": -90,
514
+ "maximum": 90
515
+ },
516
+ "lng": {
517
+ "type": "number",
518
+ "minimum": -180,
519
+ "maximum": 180
520
+ },
521
+ "until": {
522
+ "type": "string",
523
+ "format": "date-time",
524
+ "description": "Until when this holds"
525
+ }
526
+ },
527
+ "required": [
528
+ "title"
529
+ ],
530
+ "additionalProperties": false
531
+ }
532
+ },
533
+ "required": [
534
+ "category",
535
+ "payload"
536
+ ],
537
+ "additionalProperties": false
538
+ },
539
+ {
540
+ "type": "object",
541
+ "properties": {
542
+ "category": {
543
+ "type": "string",
544
+ "const": "documents"
545
+ },
546
+ "payload": {
547
+ "type": "object",
548
+ "properties": {
549
+ "title": {
550
+ "type": "string",
551
+ "minLength": 1,
552
+ "maxLength": 80,
553
+ "pattern": "^[^\\r\\n<>]+$",
554
+ "description": "A short label the owner reads on the hold screen: Allergy note, Home address. Not the data itself."
555
+ },
556
+ "items": {
557
+ "type": "array",
558
+ "items": {
559
+ "type": "object",
560
+ "properties": {
561
+ "name": {
562
+ "type": "string",
563
+ "minLength": 1,
564
+ "maxLength": 200,
565
+ "pattern": "^[^\\r\\n<>]+$"
566
+ },
567
+ "mediaType": {
568
+ "type": "string",
569
+ "pattern": "^[a-z]+\\/[a-z0-9.+-]+$",
570
+ "maxLength": 100
571
+ },
572
+ "sizeBytes": {
573
+ "type": "integer",
574
+ "minimum": 0,
575
+ "maximum": 10000000000
576
+ },
577
+ "sha256": {
578
+ "type": "string",
579
+ "pattern": "^[a-f0-9]{64}$"
580
+ },
581
+ "url": {
582
+ "type": "string",
583
+ "format": "uri",
584
+ "maxLength": 2000,
585
+ "pattern": "^https:\\/\\/"
586
+ }
587
+ },
588
+ "required": [
589
+ "name"
590
+ ],
591
+ "additionalProperties": false
592
+ },
593
+ "minItems": 1,
594
+ "maxItems": 20
595
+ }
596
+ },
597
+ "required": [
598
+ "title",
599
+ "items"
600
+ ],
601
+ "additionalProperties": false
602
+ }
603
+ },
604
+ "required": [
605
+ "category",
606
+ "payload"
607
+ ],
608
+ "additionalProperties": false
609
+ },
610
+ {
611
+ "type": "object",
612
+ "properties": {
613
+ "category": {
614
+ "type": "string",
615
+ "const": "preferences"
616
+ },
617
+ "payload": {
618
+ "type": "object",
619
+ "properties": {
620
+ "title": {
621
+ "type": "string",
622
+ "minLength": 1,
623
+ "maxLength": 80,
624
+ "pattern": "^[^\\r\\n<>]+$",
625
+ "description": "A short label the owner reads on the hold screen: Allergy note, Home address. Not the data itself."
626
+ },
627
+ "items": {
628
+ "type": "array",
629
+ "items": {
630
+ "type": "object",
631
+ "properties": {
632
+ "topic": {
633
+ "type": "string",
634
+ "minLength": 1,
635
+ "maxLength": 80,
636
+ "pattern": "^[^\\r\\n<>]+$"
637
+ },
638
+ "value": {
639
+ "type": "string",
640
+ "minLength": 1,
641
+ "maxLength": 200,
642
+ "pattern": "^[^\\r\\n<>]+$"
643
+ }
644
+ },
645
+ "required": [
646
+ "topic",
647
+ "value"
648
+ ],
649
+ "additionalProperties": false
650
+ },
651
+ "minItems": 1,
652
+ "maxItems": 30
653
+ }
654
+ },
655
+ "required": [
656
+ "title",
657
+ "items"
658
+ ],
659
+ "additionalProperties": false
660
+ }
661
+ },
662
+ "required": [
663
+ "category",
664
+ "payload"
665
+ ],
666
+ "additionalProperties": false
667
+ }
668
+ ],
669
+ "description": "For type share: { category, payload }"
670
+ }
671
+ },
672
+ "required": [
673
+ "type"
674
+ ],
675
+ "additionalProperties": false
676
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "slot",
4
+ "type": "object",
5
+ "properties": {
6
+ "when": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "maxLength": 120,
10
+ "description": "When, as an ISO 8601 date and time with its offset: 2026-11-07T20:00+01:00. Words or a time without an offset may wait for the recipient's human."
11
+ },
12
+ "service": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 60,
16
+ "description": "What it is for, in a few words: Lunch, Haircut. Nothing personal."
17
+ },
18
+ "partySize": {
19
+ "type": "integer",
20
+ "minimum": 1,
21
+ "maximum": 100
22
+ },
23
+ "place": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "maxLength": 120
27
+ }
28
+ },
29
+ "required": [
30
+ "when"
31
+ ],
32
+ "additionalProperties": false
33
+ }