flare-plugin-sdk 0.1.0-beta.4 → 0.1.0-beta.6

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.
@@ -0,0 +1,1856 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Flare plugin manifest — API v1",
4
+ "description": "Editor assistance for manifest structure and static rules. Flare remains authoritative for registration, unique IDs, origin approval, locale catalogs, cross-field values and runtime behavior. The Host never fetches the $schema URL.",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "$schema": {
9
+ "type": [
10
+ "string",
11
+ "null"
12
+ ],
13
+ "description": "Optional editor schema URL or local path. Flare treats it as metadata and never fetches it."
14
+ },
15
+ "schemaVersion": {
16
+ "type": "integer",
17
+ "const": 1,
18
+ "default": 1,
19
+ "description": "Manifest format version supported by Flare."
20
+ },
21
+ "apiVersion": {
22
+ "type": "integer",
23
+ "const": 1,
24
+ "description": "Plugin Host API version."
25
+ },
26
+ "id": {
27
+ "type": "string",
28
+ "description": "Stable reverse-domain plugin ID. Keep it unchanged for upgrades.",
29
+ "pattern": "^(?:[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9-]*)+)(?![\\s\\S])"
30
+ },
31
+ "version": {
32
+ "type": "string",
33
+ "description": "Plugin SemVer, independent of the npm SDK version. GitHub installation requires a matching stable tag.",
34
+ "pattern": "^(?:(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?)(?![\\s\\S])"
35
+ },
36
+ "defaultLocale": {
37
+ "type": "string",
38
+ "description": "Default locale catalog when localized text is used.",
39
+ "pattern": "^(?:[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*)(?![\\s\\S])",
40
+ "default": "en"
41
+ },
42
+ "name": {
43
+ "$ref": "#/definitions/text"
44
+ },
45
+ "description": {
46
+ "anyOf": [
47
+ {
48
+ "$ref": "#/definitions/text"
49
+ },
50
+ {
51
+ "type": "null"
52
+ }
53
+ ],
54
+ "default": null
55
+ },
56
+ "permissions": {
57
+ "$ref": "#/definitions/permissions"
58
+ },
59
+ "platform": {
60
+ "$ref": "#/definitions/platform"
61
+ }
62
+ },
63
+ "required": [
64
+ "apiVersion",
65
+ "id",
66
+ "version",
67
+ "name",
68
+ "platform"
69
+ ],
70
+ "definitions": {
71
+ "identifier": {
72
+ "type": "string",
73
+ "description": "Case-sensitive identifier beginning with a letter.",
74
+ "pattern": "^(?:[A-Za-z][A-Za-z0-9_.-]{0,127})(?![\\s\\S])"
75
+ },
76
+ "text": {
77
+ "description": "A literal string or a localized key with a fallback. Flare checks referenced keys against locale catalogs.",
78
+ "oneOf": [
79
+ {
80
+ "type": "string",
81
+ "description": "Non-blank display text; the Host also checks its UTF-16 length.",
82
+ "pattern": "\\S",
83
+ "maxLength": 4096
84
+ },
85
+ {
86
+ "$ref": "#/definitions/localizedText"
87
+ }
88
+ ]
89
+ },
90
+ "localizedText": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "properties": {
94
+ "key": {
95
+ "$ref": "#/definitions/identifier"
96
+ },
97
+ "fallback": {
98
+ "type": "string",
99
+ "description": "Non-blank display text; the Host also checks its UTF-16 length.",
100
+ "pattern": "\\S",
101
+ "maxLength": 4096
102
+ }
103
+ },
104
+ "required": [
105
+ "key",
106
+ "fallback"
107
+ ]
108
+ },
109
+ "permissions": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "properties": {
113
+ "authOrigins": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "string",
117
+ "description": "Exact canonical HTTPS origin; no path, credentials, wildcard, or trailing slash. Flare checks DNS/port normalization.",
118
+ "pattern": "^(?:https://[a-z0-9.-]+(?::[0-9]{1,5})?)(?![\\s\\S])"
119
+ },
120
+ "default": [],
121
+ "maxItems": 16,
122
+ "uniqueItems": true
123
+ },
124
+ "mediaNetwork": {
125
+ "type": "boolean",
126
+ "default": false,
127
+ "description": "Allow media loading from any website/CDN. Adding this permission requires review."
128
+ }
129
+ }
130
+ },
131
+ "platform": {
132
+ "type": "object",
133
+ "additionalProperties": false,
134
+ "properties": {
135
+ "id": {
136
+ "type": "string",
137
+ "description": "Stable platform identity, unique across plugins and built-in platforms.",
138
+ "pattern": "^(?:[A-Za-z][A-Za-z0-9_.-]{0,63})(?![\\s\\S])"
139
+ },
140
+ "name": {
141
+ "$ref": "#/definitions/text"
142
+ },
143
+ "description": {
144
+ "anyOf": [
145
+ {
146
+ "$ref": "#/definitions/text"
147
+ },
148
+ {
149
+ "type": "null"
150
+ }
151
+ ],
152
+ "default": null
153
+ },
154
+ "detector": {
155
+ "anyOf": [
156
+ {
157
+ "$ref": "#/definitions/detector"
158
+ },
159
+ {
160
+ "type": "null"
161
+ }
162
+ ],
163
+ "default": null
164
+ },
165
+ "loginMethods": {
166
+ "type": "array",
167
+ "items": {
168
+ "$ref": "#/definitions/loginMethod"
169
+ },
170
+ "default": [],
171
+ "description": "At most one method per interaction; method and field IDs must be unique. Flare checks these semantic constraints."
172
+ },
173
+ "capabilities": {
174
+ "$ref": "#/definitions/capabilities"
175
+ },
176
+ "timelines": {
177
+ "type": "array",
178
+ "items": {
179
+ "$ref": "#/definitions/timeline"
180
+ },
181
+ "default": []
182
+ },
183
+ "profileTabs": {
184
+ "type": "array",
185
+ "items": {
186
+ "$ref": "#/definitions/profileTab"
187
+ },
188
+ "default": []
189
+ },
190
+ "deepLinks": {
191
+ "type": "array",
192
+ "items": {
193
+ "$ref": "#/definitions/deepLink"
194
+ },
195
+ "default": [],
196
+ "maxItems": 64
197
+ },
198
+ "composeDefaults": {
199
+ "anyOf": [
200
+ {
201
+ "$ref": "#/definitions/compose"
202
+ },
203
+ {
204
+ "type": "null"
205
+ }
206
+ ],
207
+ "default": null
208
+ },
209
+ "guest": {
210
+ "anyOf": [
211
+ {
212
+ "$ref": "#/definitions/guest"
213
+ },
214
+ {
215
+ "type": "null"
216
+ }
217
+ ],
218
+ "default": null
219
+ },
220
+ "credentialSchemaVersion": {
221
+ "type": "integer",
222
+ "minimum": 1,
223
+ "maximum": 1000000,
224
+ "default": 1,
225
+ "description": "Bump when saved credentials become incompatible; accounts may need to log in again."
226
+ },
227
+ "timelineSchemaVersion": {
228
+ "type": "integer",
229
+ "minimum": 1,
230
+ "maximum": 1000000,
231
+ "default": 1,
232
+ "description": "Bump for incompatible timeline identity/parameter changes."
233
+ }
234
+ },
235
+ "required": [
236
+ "id",
237
+ "name"
238
+ ],
239
+ "allOf": [
240
+ {
241
+ "if": {
242
+ "type": "object",
243
+ "required": [
244
+ "capabilities"
245
+ ],
246
+ "properties": {
247
+ "capabilities": {
248
+ "type": "object",
249
+ "properties": {
250
+ "flare.datasource.timeline/v1": true
251
+ },
252
+ "required": [
253
+ "flare.datasource.timeline/v1"
254
+ ]
255
+ }
256
+ }
257
+ },
258
+ "then": {
259
+ "required": [
260
+ "timelines"
261
+ ],
262
+ "properties": {
263
+ "timelines": {
264
+ "type": "array",
265
+ "minItems": 1,
266
+ "contains": {
267
+ "type": "object",
268
+ "properties": {
269
+ "defaultForNewAccount": {
270
+ "const": true
271
+ }
272
+ },
273
+ "required": [
274
+ "defaultForNewAccount"
275
+ ]
276
+ }
277
+ }
278
+ }
279
+ }
280
+ },
281
+ {
282
+ "if": {
283
+ "required": [
284
+ "timelines"
285
+ ],
286
+ "properties": {
287
+ "timelines": {
288
+ "type": "array",
289
+ "minItems": 1
290
+ }
291
+ }
292
+ },
293
+ "then": {
294
+ "type": "object",
295
+ "required": [
296
+ "capabilities"
297
+ ],
298
+ "properties": {
299
+ "capabilities": {
300
+ "type": "object",
301
+ "required": [
302
+ "flare.datasource.timeline/v1"
303
+ ],
304
+ "properties": {
305
+ "flare.datasource.timeline/v1": true
306
+ }
307
+ }
308
+ }
309
+ }
310
+ },
311
+ {
312
+ "if": {
313
+ "type": "object",
314
+ "required": [
315
+ "capabilities"
316
+ ],
317
+ "properties": {
318
+ "capabilities": {
319
+ "type": "object",
320
+ "properties": {
321
+ "flare.datasource.tab-catalog/v1": true
322
+ },
323
+ "required": [
324
+ "flare.datasource.tab-catalog/v1"
325
+ ]
326
+ }
327
+ }
328
+ },
329
+ "then": {
330
+ "type": "object",
331
+ "required": [
332
+ "capabilities"
333
+ ],
334
+ "properties": {
335
+ "capabilities": {
336
+ "type": "object",
337
+ "required": [
338
+ "flare.datasource.timeline/v1"
339
+ ],
340
+ "properties": {
341
+ "flare.datasource.timeline/v1": true
342
+ }
343
+ }
344
+ }
345
+ }
346
+ },
347
+ {
348
+ "if": {
349
+ "required": [
350
+ "profileTabs"
351
+ ],
352
+ "properties": {
353
+ "profileTabs": {
354
+ "type": "array",
355
+ "minItems": 1
356
+ }
357
+ }
358
+ },
359
+ "then": {
360
+ "type": "object",
361
+ "required": [
362
+ "capabilities"
363
+ ],
364
+ "properties": {
365
+ "capabilities": {
366
+ "type": "object",
367
+ "required": [
368
+ "flare.datasource.profile/v1"
369
+ ],
370
+ "properties": {
371
+ "flare.datasource.profile/v1": {
372
+ "type": "object",
373
+ "properties": {
374
+ "operations": {
375
+ "type": "object",
376
+ "properties": {
377
+ "timeline": true
378
+ },
379
+ "required": [
380
+ "timeline"
381
+ ]
382
+ }
383
+ }
384
+ }
385
+ }
386
+ }
387
+ }
388
+ }
389
+ },
390
+ {
391
+ "if": {
392
+ "type": "object",
393
+ "required": [
394
+ "capabilities"
395
+ ],
396
+ "properties": {
397
+ "capabilities": {
398
+ "type": "object",
399
+ "properties": {
400
+ "flare.datasource.compose/v1": true
401
+ },
402
+ "required": [
403
+ "flare.datasource.compose/v1"
404
+ ]
405
+ }
406
+ }
407
+ },
408
+ "then": {
409
+ "required": [
410
+ "composeDefaults"
411
+ ],
412
+ "properties": {
413
+ "composeDefaults": {
414
+ "$ref": "#/definitions/compose"
415
+ }
416
+ }
417
+ }
418
+ },
419
+ {
420
+ "if": {
421
+ "required": [
422
+ "composeDefaults"
423
+ ],
424
+ "properties": {
425
+ "composeDefaults": {
426
+ "type": "object"
427
+ }
428
+ }
429
+ },
430
+ "then": {
431
+ "type": "object",
432
+ "required": [
433
+ "capabilities"
434
+ ],
435
+ "properties": {
436
+ "capabilities": {
437
+ "type": "object",
438
+ "required": [
439
+ "flare.datasource.compose/v1"
440
+ ],
441
+ "properties": {
442
+ "flare.datasource.compose/v1": true
443
+ }
444
+ }
445
+ }
446
+ }
447
+ }
448
+ ]
449
+ },
450
+ "detector": {
451
+ "type": "object",
452
+ "additionalProperties": false,
453
+ "properties": {
454
+ "priority": {
455
+ "type": "integer",
456
+ "minimum": -10000,
457
+ "maximum": 10000,
458
+ "default": 0
459
+ }
460
+ }
461
+ },
462
+ "guest": {
463
+ "type": "object",
464
+ "additionalProperties": false,
465
+ "properties": {
466
+ "enabled": {
467
+ "type": "boolean",
468
+ "default": true
469
+ }
470
+ }
471
+ },
472
+ "loginInteraction": {
473
+ "type": "string",
474
+ "enum": [
475
+ "OAuth",
476
+ "Password",
477
+ "CredentialImport",
478
+ "WebCookie",
479
+ "Form"
480
+ ]
481
+ },
482
+ "loginFieldType": {
483
+ "type": "string",
484
+ "enum": [
485
+ "Text",
486
+ "Username",
487
+ "Password",
488
+ "Otp",
489
+ "Secret"
490
+ ]
491
+ },
492
+ "loginField": {
493
+ "type": "object",
494
+ "additionalProperties": false,
495
+ "properties": {
496
+ "id": {
497
+ "$ref": "#/definitions/identifier"
498
+ },
499
+ "type": {
500
+ "$ref": "#/definitions/loginFieldType"
501
+ },
502
+ "label": {
503
+ "$ref": "#/definitions/text"
504
+ },
505
+ "placeholder": {
506
+ "anyOf": [
507
+ {
508
+ "$ref": "#/definitions/text"
509
+ },
510
+ {
511
+ "type": "null"
512
+ }
513
+ ],
514
+ "default": null
515
+ },
516
+ "required": {
517
+ "type": "boolean",
518
+ "default": true
519
+ }
520
+ },
521
+ "required": [
522
+ "id",
523
+ "type",
524
+ "label"
525
+ ]
526
+ },
527
+ "loginMethod": {
528
+ "type": "object",
529
+ "additionalProperties": false,
530
+ "properties": {
531
+ "id": {
532
+ "$ref": "#/definitions/identifier"
533
+ },
534
+ "interaction": {
535
+ "$ref": "#/definitions/loginInteraction"
536
+ },
537
+ "title": {
538
+ "$ref": "#/definitions/text"
539
+ },
540
+ "description": {
541
+ "anyOf": [
542
+ {
543
+ "$ref": "#/definitions/text"
544
+ },
545
+ {
546
+ "type": "null"
547
+ }
548
+ ],
549
+ "default": null
550
+ },
551
+ "fields": {
552
+ "type": "array",
553
+ "items": {
554
+ "$ref": "#/definitions/loginField"
555
+ },
556
+ "default": []
557
+ },
558
+ "cookie": {
559
+ "anyOf": [
560
+ {
561
+ "$ref": "#/definitions/webCookie"
562
+ },
563
+ {
564
+ "type": "null"
565
+ }
566
+ ],
567
+ "default": null
568
+ }
569
+ },
570
+ "required": [
571
+ "id",
572
+ "interaction",
573
+ "title"
574
+ ],
575
+ "allOf": [
576
+ {
577
+ "if": {
578
+ "properties": {
579
+ "interaction": {
580
+ "enum": [
581
+ "OAuth",
582
+ "WebCookie"
583
+ ]
584
+ }
585
+ }
586
+ },
587
+ "then": {
588
+ "properties": {
589
+ "fields": {
590
+ "type": "array",
591
+ "maxItems": 0
592
+ }
593
+ }
594
+ }
595
+ },
596
+ {
597
+ "if": {
598
+ "properties": {
599
+ "interaction": {
600
+ "const": "WebCookie"
601
+ }
602
+ }
603
+ },
604
+ "then": {
605
+ "required": [
606
+ "cookie"
607
+ ],
608
+ "properties": {
609
+ "cookie": {
610
+ "$ref": "#/definitions/webCookie"
611
+ }
612
+ }
613
+ },
614
+ "else": {
615
+ "properties": {
616
+ "cookie": {
617
+ "type": "null"
618
+ }
619
+ }
620
+ }
621
+ },
622
+ {
623
+ "if": {
624
+ "properties": {
625
+ "interaction": {
626
+ "enum": [
627
+ "Password",
628
+ "CredentialImport",
629
+ "Form"
630
+ ]
631
+ }
632
+ }
633
+ },
634
+ "then": {
635
+ "required": [
636
+ "fields"
637
+ ],
638
+ "properties": {
639
+ "fields": {
640
+ "type": "array",
641
+ "minItems": 1
642
+ }
643
+ }
644
+ }
645
+ }
646
+ ]
647
+ },
648
+ "webCookie": {
649
+ "type": "object",
650
+ "additionalProperties": false,
651
+ "properties": {
652
+ "startUrl": {
653
+ "type": "string",
654
+ "description": "HTTPS start URL on an approved auth origin, or $accountOrigin with an optional path.",
655
+ "pattern": "^(?:(?:\\$accountOrigin(?:/[^\\s]*)?|https://[A-Za-z0-9.-]+(?::[0-9]{1,5})?(?:/[^\\s]*)?))(?![\\s\\S])"
656
+ },
657
+ "probes": {
658
+ "type": "array",
659
+ "items": {
660
+ "$ref": "#/definitions/cookieProbe"
661
+ },
662
+ "default": [],
663
+ "minItems": 1,
664
+ "maxItems": 16
665
+ }
666
+ },
667
+ "required": [
668
+ "startUrl",
669
+ "probes"
670
+ ]
671
+ },
672
+ "cookieProbe": {
673
+ "type": "object",
674
+ "additionalProperties": false,
675
+ "properties": {
676
+ "url": {
677
+ "type": "string",
678
+ "description": "Probe URL on an approved HTTPS auth origin or $accountOrigin.",
679
+ "pattern": "^(?:(?:\\$accountOrigin(?:/[^\\s]*)?|https://[A-Za-z0-9.-]+(?::[0-9]{1,5})?(?:/[^\\s]*)?))(?![\\s\\S])"
680
+ },
681
+ "cookies": {
682
+ "type": "array",
683
+ "items": {
684
+ "$ref": "#/definitions/cookieRequirement"
685
+ },
686
+ "default": [],
687
+ "minItems": 1,
688
+ "maxItems": 32,
689
+ "description": "Cookie names must be unique ignoring case; checked by Flare."
690
+ }
691
+ },
692
+ "required": [
693
+ "url",
694
+ "cookies"
695
+ ]
696
+ },
697
+ "cookieRequirement": {
698
+ "type": "object",
699
+ "additionalProperties": false,
700
+ "properties": {
701
+ "name": {
702
+ "type": "string",
703
+ "description": "Cookie name.",
704
+ "pattern": "^(?:[!#$%&'*+.^_`|~0-9A-Za-z-]{1,128})(?![\\s\\S])"
705
+ },
706
+ "required": {
707
+ "type": "boolean",
708
+ "default": true
709
+ }
710
+ },
711
+ "required": [
712
+ "name"
713
+ ]
714
+ },
715
+ "pageDirection": {
716
+ "type": "string",
717
+ "enum": [
718
+ "refresh",
719
+ "older",
720
+ "newer"
721
+ ]
722
+ },
723
+ "notificationFilter": {
724
+ "type": "string",
725
+ "enum": [
726
+ "all",
727
+ "mention",
728
+ "comment",
729
+ "like"
730
+ ]
731
+ },
732
+ "relationAction": {
733
+ "type": "string",
734
+ "enum": [
735
+ "follow",
736
+ "block",
737
+ "mute"
738
+ ]
739
+ },
740
+ "operation": {
741
+ "type": "object",
742
+ "additionalProperties": false,
743
+ "properties": {
744
+ "directions": {
745
+ "type": "array",
746
+ "items": {
747
+ "$ref": "#/definitions/pageDirection"
748
+ },
749
+ "default": [],
750
+ "uniqueItems": true,
751
+ "maxItems": 3
752
+ }
753
+ }
754
+ },
755
+ "capability": {
756
+ "type": "object",
757
+ "additionalProperties": false,
758
+ "properties": {
759
+ "operations": {
760
+ "type": "object",
761
+ "minProperties": 1,
762
+ "maxProperties": 32,
763
+ "additionalProperties": {
764
+ "$ref": "#/definitions/operation"
765
+ }
766
+ },
767
+ "notificationFilters": {
768
+ "type": "array",
769
+ "items": {
770
+ "$ref": "#/definitions/notificationFilter"
771
+ },
772
+ "default": [],
773
+ "uniqueItems": true
774
+ },
775
+ "relationActions": {
776
+ "type": "array",
777
+ "items": {
778
+ "$ref": "#/definitions/relationAction"
779
+ },
780
+ "default": [],
781
+ "uniqueItems": true
782
+ }
783
+ },
784
+ "required": [
785
+ "operations"
786
+ ]
787
+ },
788
+ "capability-timeline": {
789
+ "type": "object",
790
+ "description": "timeline capability. Implement every declared operation in plugin.js.",
791
+ "allOf": [
792
+ {
793
+ "$ref": "#/definitions/capability"
794
+ },
795
+ {
796
+ "type": "object",
797
+ "properties": {
798
+ "operations": {
799
+ "type": "object",
800
+ "additionalProperties": false,
801
+ "properties": {
802
+ "page": {
803
+ "$ref": "#/definitions/operation"
804
+ }
805
+ },
806
+ "required": [
807
+ "page"
808
+ ]
809
+ },
810
+ "notificationFilters": {
811
+ "type": "array",
812
+ "maxItems": 0
813
+ },
814
+ "relationActions": {
815
+ "type": "array",
816
+ "maxItems": 0
817
+ }
818
+ }
819
+ }
820
+ ]
821
+ },
822
+ "capability-search": {
823
+ "type": "object",
824
+ "description": "search capability. Implement every declared operation in plugin.js.",
825
+ "allOf": [
826
+ {
827
+ "$ref": "#/definitions/capability"
828
+ },
829
+ {
830
+ "type": "object",
831
+ "properties": {
832
+ "operations": {
833
+ "type": "object",
834
+ "additionalProperties": false,
835
+ "properties": {
836
+ "posts": {
837
+ "$ref": "#/definitions/operation"
838
+ },
839
+ "profiles": {
840
+ "$ref": "#/definitions/operation"
841
+ },
842
+ "discoverPosts": {
843
+ "$ref": "#/definitions/operation"
844
+ },
845
+ "discoverProfiles": {
846
+ "$ref": "#/definitions/operation"
847
+ },
848
+ "discoverHashtags": {
849
+ "$ref": "#/definitions/operation"
850
+ }
851
+ },
852
+ "required": [
853
+ "posts",
854
+ "profiles",
855
+ "discoverPosts",
856
+ "discoverProfiles",
857
+ "discoverHashtags"
858
+ ]
859
+ },
860
+ "notificationFilters": {
861
+ "type": "array",
862
+ "maxItems": 0
863
+ },
864
+ "relationActions": {
865
+ "type": "array",
866
+ "maxItems": 0
867
+ }
868
+ }
869
+ }
870
+ ]
871
+ },
872
+ "capability-profile": {
873
+ "type": "object",
874
+ "description": "profile capability. Implement every declared operation in plugin.js.",
875
+ "allOf": [
876
+ {
877
+ "$ref": "#/definitions/capability"
878
+ },
879
+ {
880
+ "type": "object",
881
+ "properties": {
882
+ "operations": {
883
+ "type": "object",
884
+ "additionalProperties": false,
885
+ "properties": {
886
+ "byId": {
887
+ "$ref": "#/definitions/operation"
888
+ },
889
+ "byHandle": {
890
+ "$ref": "#/definitions/operation"
891
+ },
892
+ "timeline": {
893
+ "$ref": "#/definitions/operation"
894
+ },
895
+ "following": {
896
+ "$ref": "#/definitions/operation"
897
+ },
898
+ "followers": {
899
+ "$ref": "#/definitions/operation"
900
+ }
901
+ },
902
+ "required": [
903
+ "byId",
904
+ "byHandle"
905
+ ]
906
+ },
907
+ "notificationFilters": {
908
+ "type": "array",
909
+ "maxItems": 0
910
+ },
911
+ "relationActions": {
912
+ "type": "array",
913
+ "maxItems": 0
914
+ }
915
+ }
916
+ }
917
+ ]
918
+ },
919
+ "capability-post": {
920
+ "type": "object",
921
+ "description": "post capability. Implement every declared operation in plugin.js.",
922
+ "allOf": [
923
+ {
924
+ "$ref": "#/definitions/capability"
925
+ },
926
+ {
927
+ "type": "object",
928
+ "properties": {
929
+ "operations": {
930
+ "type": "object",
931
+ "additionalProperties": false,
932
+ "properties": {
933
+ "detail": {
934
+ "$ref": "#/definitions/operation"
935
+ },
936
+ "context": {
937
+ "$ref": "#/definitions/operation"
938
+ },
939
+ "delete": {
940
+ "$ref": "#/definitions/operation"
941
+ },
942
+ "mutate": {
943
+ "$ref": "#/definitions/operation"
944
+ }
945
+ },
946
+ "required": [
947
+ "detail"
948
+ ]
949
+ },
950
+ "notificationFilters": {
951
+ "type": "array",
952
+ "maxItems": 0
953
+ },
954
+ "relationActions": {
955
+ "type": "array",
956
+ "maxItems": 0
957
+ }
958
+ }
959
+ }
960
+ ]
961
+ },
962
+ "capability-relation": {
963
+ "type": "object",
964
+ "description": "relation capability. Implement every declared operation in plugin.js.",
965
+ "allOf": [
966
+ {
967
+ "$ref": "#/definitions/capability"
968
+ },
969
+ {
970
+ "type": "object",
971
+ "properties": {
972
+ "operations": {
973
+ "type": "object",
974
+ "additionalProperties": false,
975
+ "properties": {
976
+ "state": {
977
+ "$ref": "#/definitions/operation"
978
+ },
979
+ "mutate": {
980
+ "$ref": "#/definitions/operation"
981
+ }
982
+ },
983
+ "required": [
984
+ "state",
985
+ "mutate"
986
+ ]
987
+ },
988
+ "notificationFilters": {
989
+ "type": "array",
990
+ "maxItems": 0
991
+ },
992
+ "relationActions": {
993
+ "type": "array",
994
+ "minItems": 1
995
+ }
996
+ },
997
+ "required": [
998
+ "relationActions"
999
+ ]
1000
+ }
1001
+ ]
1002
+ },
1003
+ "capability-compose": {
1004
+ "type": "object",
1005
+ "description": "compose capability. Implement every declared operation in plugin.js.",
1006
+ "allOf": [
1007
+ {
1008
+ "$ref": "#/definitions/capability"
1009
+ },
1010
+ {
1011
+ "type": "object",
1012
+ "properties": {
1013
+ "operations": {
1014
+ "type": "object",
1015
+ "additionalProperties": false,
1016
+ "properties": {
1017
+ "publish": {
1018
+ "$ref": "#/definitions/operation"
1019
+ }
1020
+ },
1021
+ "required": [
1022
+ "publish"
1023
+ ]
1024
+ },
1025
+ "notificationFilters": {
1026
+ "type": "array",
1027
+ "maxItems": 0
1028
+ },
1029
+ "relationActions": {
1030
+ "type": "array",
1031
+ "maxItems": 0
1032
+ }
1033
+ }
1034
+ }
1035
+ ]
1036
+ },
1037
+ "capability-notification": {
1038
+ "type": "object",
1039
+ "description": "notification capability. Implement every declared operation in plugin.js.",
1040
+ "allOf": [
1041
+ {
1042
+ "$ref": "#/definitions/capability"
1043
+ },
1044
+ {
1045
+ "type": "object",
1046
+ "properties": {
1047
+ "operations": {
1048
+ "type": "object",
1049
+ "additionalProperties": false,
1050
+ "properties": {
1051
+ "page": {
1052
+ "$ref": "#/definitions/operation"
1053
+ },
1054
+ "badge": {
1055
+ "$ref": "#/definitions/operation"
1056
+ }
1057
+ }
1058
+ },
1059
+ "relationActions": {
1060
+ "type": "array",
1061
+ "maxItems": 0
1062
+ }
1063
+ }
1064
+ },
1065
+ {
1066
+ "if": {
1067
+ "type": "object",
1068
+ "properties": {
1069
+ "operations": {
1070
+ "type": "object",
1071
+ "properties": {
1072
+ "page": true
1073
+ },
1074
+ "required": [
1075
+ "page"
1076
+ ]
1077
+ }
1078
+ }
1079
+ },
1080
+ "then": {
1081
+ "type": "object",
1082
+ "required": [
1083
+ "notificationFilters"
1084
+ ],
1085
+ "properties": {
1086
+ "notificationFilters": {
1087
+ "type": "array",
1088
+ "minItems": 1
1089
+ }
1090
+ }
1091
+ }
1092
+ }
1093
+ ]
1094
+ },
1095
+ "capability-list": {
1096
+ "type": "object",
1097
+ "description": "list capability. Implement every declared operation in plugin.js.",
1098
+ "allOf": [
1099
+ {
1100
+ "$ref": "#/definitions/capability"
1101
+ },
1102
+ {
1103
+ "type": "object",
1104
+ "properties": {
1105
+ "operations": {
1106
+ "type": "object",
1107
+ "additionalProperties": false,
1108
+ "properties": {
1109
+ "page": {
1110
+ "$ref": "#/definitions/operation"
1111
+ },
1112
+ "detail": {
1113
+ "$ref": "#/definitions/operation"
1114
+ },
1115
+ "create": {
1116
+ "$ref": "#/definitions/operation"
1117
+ },
1118
+ "update": {
1119
+ "$ref": "#/definitions/operation"
1120
+ },
1121
+ "delete": {
1122
+ "$ref": "#/definitions/operation"
1123
+ },
1124
+ "timeline": {
1125
+ "$ref": "#/definitions/operation"
1126
+ },
1127
+ "members": {
1128
+ "$ref": "#/definitions/operation"
1129
+ },
1130
+ "memberships": {
1131
+ "$ref": "#/definitions/operation"
1132
+ },
1133
+ "addMember": {
1134
+ "$ref": "#/definitions/operation"
1135
+ },
1136
+ "removeMember": {
1137
+ "$ref": "#/definitions/operation"
1138
+ }
1139
+ },
1140
+ "required": [
1141
+ "page",
1142
+ "detail",
1143
+ "create",
1144
+ "update",
1145
+ "delete",
1146
+ "timeline",
1147
+ "members",
1148
+ "memberships",
1149
+ "addMember",
1150
+ "removeMember"
1151
+ ]
1152
+ },
1153
+ "notificationFilters": {
1154
+ "type": "array",
1155
+ "maxItems": 0
1156
+ },
1157
+ "relationActions": {
1158
+ "type": "array",
1159
+ "maxItems": 0
1160
+ }
1161
+ }
1162
+ }
1163
+ ]
1164
+ },
1165
+ "capability-direct-message": {
1166
+ "type": "object",
1167
+ "description": "direct-message capability. Implement every declared operation in plugin.js.",
1168
+ "allOf": [
1169
+ {
1170
+ "$ref": "#/definitions/capability"
1171
+ },
1172
+ {
1173
+ "type": "object",
1174
+ "properties": {
1175
+ "operations": {
1176
+ "type": "object",
1177
+ "additionalProperties": false,
1178
+ "properties": {
1179
+ "rooms": {
1180
+ "$ref": "#/definitions/operation"
1181
+ },
1182
+ "room": {
1183
+ "$ref": "#/definitions/operation"
1184
+ },
1185
+ "messages": {
1186
+ "$ref": "#/definitions/operation"
1187
+ },
1188
+ "send": {
1189
+ "$ref": "#/definitions/operation"
1190
+ },
1191
+ "delete": {
1192
+ "$ref": "#/definitions/operation"
1193
+ },
1194
+ "leave": {
1195
+ "$ref": "#/definitions/operation"
1196
+ },
1197
+ "create": {
1198
+ "$ref": "#/definitions/operation"
1199
+ },
1200
+ "badge": {
1201
+ "$ref": "#/definitions/operation"
1202
+ },
1203
+ "canSend": {
1204
+ "$ref": "#/definitions/operation"
1205
+ }
1206
+ },
1207
+ "required": [
1208
+ "rooms",
1209
+ "room",
1210
+ "messages",
1211
+ "send",
1212
+ "delete",
1213
+ "leave",
1214
+ "create",
1215
+ "badge",
1216
+ "canSend"
1217
+ ]
1218
+ },
1219
+ "notificationFilters": {
1220
+ "type": "array",
1221
+ "maxItems": 0
1222
+ },
1223
+ "relationActions": {
1224
+ "type": "array",
1225
+ "maxItems": 0
1226
+ }
1227
+ }
1228
+ }
1229
+ ]
1230
+ },
1231
+ "capability-article": {
1232
+ "type": "object",
1233
+ "description": "article capability. Implement every declared operation in plugin.js.",
1234
+ "allOf": [
1235
+ {
1236
+ "$ref": "#/definitions/capability"
1237
+ },
1238
+ {
1239
+ "type": "object",
1240
+ "properties": {
1241
+ "operations": {
1242
+ "type": "object",
1243
+ "additionalProperties": false,
1244
+ "properties": {
1245
+ "detail": {
1246
+ "$ref": "#/definitions/operation"
1247
+ },
1248
+ "comments": {
1249
+ "$ref": "#/definitions/operation"
1250
+ }
1251
+ },
1252
+ "required": [
1253
+ "detail",
1254
+ "comments"
1255
+ ]
1256
+ },
1257
+ "notificationFilters": {
1258
+ "type": "array",
1259
+ "maxItems": 0
1260
+ },
1261
+ "relationActions": {
1262
+ "type": "array",
1263
+ "maxItems": 0
1264
+ }
1265
+ }
1266
+ }
1267
+ ]
1268
+ },
1269
+ "capability-gallery": {
1270
+ "type": "object",
1271
+ "description": "gallery capability. Implement every declared operation in plugin.js.",
1272
+ "allOf": [
1273
+ {
1274
+ "$ref": "#/definitions/capability"
1275
+ },
1276
+ {
1277
+ "type": "object",
1278
+ "properties": {
1279
+ "operations": {
1280
+ "type": "object",
1281
+ "additionalProperties": false,
1282
+ "properties": {
1283
+ "detail": {
1284
+ "$ref": "#/definitions/operation"
1285
+ },
1286
+ "comments": {
1287
+ "$ref": "#/definitions/operation"
1288
+ },
1289
+ "recommendations": {
1290
+ "$ref": "#/definitions/operation"
1291
+ }
1292
+ },
1293
+ "required": [
1294
+ "detail",
1295
+ "comments",
1296
+ "recommendations"
1297
+ ]
1298
+ },
1299
+ "notificationFilters": {
1300
+ "type": "array",
1301
+ "maxItems": 0
1302
+ },
1303
+ "relationActions": {
1304
+ "type": "array",
1305
+ "maxItems": 0
1306
+ }
1307
+ }
1308
+ }
1309
+ ]
1310
+ },
1311
+ "capability-tab-catalog": {
1312
+ "type": "object",
1313
+ "description": "tab-catalog capability. Implement every declared operation in plugin.js.",
1314
+ "allOf": [
1315
+ {
1316
+ "$ref": "#/definitions/capability"
1317
+ },
1318
+ {
1319
+ "type": "object",
1320
+ "properties": {
1321
+ "operations": {
1322
+ "type": "object",
1323
+ "additionalProperties": false,
1324
+ "properties": {
1325
+ "page": {
1326
+ "$ref": "#/definitions/operation"
1327
+ }
1328
+ },
1329
+ "required": [
1330
+ "page"
1331
+ ]
1332
+ },
1333
+ "notificationFilters": {
1334
+ "type": "array",
1335
+ "maxItems": 0
1336
+ },
1337
+ "relationActions": {
1338
+ "type": "array",
1339
+ "maxItems": 0
1340
+ }
1341
+ }
1342
+ }
1343
+ ]
1344
+ },
1345
+ "unknownCapability": {
1346
+ "type": "object",
1347
+ "description": "Unknown capability IDs are retained but ignored with a Host warning.",
1348
+ "allOf": [
1349
+ {
1350
+ "$ref": "#/definitions/capability"
1351
+ },
1352
+ {
1353
+ "type": "object",
1354
+ "properties": {
1355
+ "notificationFilters": {
1356
+ "type": "array",
1357
+ "maxItems": 0
1358
+ },
1359
+ "relationActions": {
1360
+ "type": "array",
1361
+ "maxItems": 0
1362
+ }
1363
+ }
1364
+ }
1365
+ ]
1366
+ },
1367
+ "capabilities": {
1368
+ "type": "object",
1369
+ "maxProperties": 32,
1370
+ "default": {},
1371
+ "description": "Declare supported API v1 operations; the Host checks their JavaScript registration.",
1372
+ "propertyNames": {
1373
+ "pattern": "^(?:[a-z0-9.-]+/[a-z0-9.-]+)(?![\\s\\S])"
1374
+ },
1375
+ "properties": {
1376
+ "flare.datasource.timeline/v1": {
1377
+ "$ref": "#/definitions/capability-timeline"
1378
+ },
1379
+ "flare.datasource.search/v1": {
1380
+ "$ref": "#/definitions/capability-search"
1381
+ },
1382
+ "flare.datasource.profile/v1": {
1383
+ "$ref": "#/definitions/capability-profile"
1384
+ },
1385
+ "flare.datasource.post/v1": {
1386
+ "$ref": "#/definitions/capability-post"
1387
+ },
1388
+ "flare.datasource.relation/v1": {
1389
+ "$ref": "#/definitions/capability-relation"
1390
+ },
1391
+ "flare.datasource.compose/v1": {
1392
+ "$ref": "#/definitions/capability-compose"
1393
+ },
1394
+ "flare.datasource.notification/v1": {
1395
+ "$ref": "#/definitions/capability-notification"
1396
+ },
1397
+ "flare.datasource.list/v1": {
1398
+ "$ref": "#/definitions/capability-list"
1399
+ },
1400
+ "flare.datasource.direct-message/v1": {
1401
+ "$ref": "#/definitions/capability-direct-message"
1402
+ },
1403
+ "flare.datasource.article/v1": {
1404
+ "$ref": "#/definitions/capability-article"
1405
+ },
1406
+ "flare.datasource.gallery/v1": {
1407
+ "$ref": "#/definitions/capability-gallery"
1408
+ },
1409
+ "flare.datasource.tab-catalog/v1": {
1410
+ "$ref": "#/definitions/capability-tab-catalog"
1411
+ }
1412
+ },
1413
+ "additionalProperties": {
1414
+ "$ref": "#/definitions/unknownCapability"
1415
+ }
1416
+ },
1417
+ "hostIcon": {
1418
+ "type": "string",
1419
+ "enum": [
1420
+ "Home",
1421
+ "Notification",
1422
+ "Search",
1423
+ "Profile",
1424
+ "Local",
1425
+ "World",
1426
+ "Featured",
1427
+ "Bookmark",
1428
+ "Heart",
1429
+ "List",
1430
+ "Messages",
1431
+ "Channel",
1432
+ "Like",
1433
+ "Repost",
1434
+ "Reply",
1435
+ "Delete",
1436
+ "Follow",
1437
+ "Block",
1438
+ "Mute",
1439
+ "Info"
1440
+ ]
1441
+ },
1442
+ "timelineDisplay": {
1443
+ "type": "string",
1444
+ "enum": [
1445
+ "List",
1446
+ "Grid"
1447
+ ]
1448
+ },
1449
+ "parameters": {
1450
+ "type": "object",
1451
+ "default": {},
1452
+ "maxProperties": 32,
1453
+ "propertyNames": {
1454
+ "pattern": "^(?:[A-Za-z][A-Za-z0-9_.-]{0,127})(?![\\s\\S])"
1455
+ },
1456
+ "additionalProperties": {
1457
+ "type": "string",
1458
+ "maxLength": 4096
1459
+ }
1460
+ },
1461
+ "timeline": {
1462
+ "type": "object",
1463
+ "additionalProperties": false,
1464
+ "properties": {
1465
+ "id": {
1466
+ "$ref": "#/definitions/identifier"
1467
+ },
1468
+ "title": {
1469
+ "$ref": "#/definitions/text"
1470
+ },
1471
+ "icon": {
1472
+ "allOf": [{ "$ref": "#/definitions/hostIcon" }],
1473
+ "default": "Home"
1474
+ },
1475
+ "display": {
1476
+ "allOf": [{ "$ref": "#/definitions/timelineDisplay" }],
1477
+ "default": "List"
1478
+ },
1479
+ "parameters": {
1480
+ "$ref": "#/definitions/parameters"
1481
+ },
1482
+ "defaultForNewAccount": {
1483
+ "type": "boolean",
1484
+ "default": false
1485
+ }
1486
+ },
1487
+ "required": [
1488
+ "id",
1489
+ "title"
1490
+ ]
1491
+ },
1492
+ "profileTab": {
1493
+ "type": "object",
1494
+ "additionalProperties": false,
1495
+ "properties": {
1496
+ "id": {
1497
+ "$ref": "#/definitions/identifier"
1498
+ },
1499
+ "title": {
1500
+ "$ref": "#/definitions/text"
1501
+ },
1502
+ "icon": {
1503
+ "allOf": [{ "$ref": "#/definitions/hostIcon" }],
1504
+ "default": "Profile"
1505
+ },
1506
+ "display": {
1507
+ "allOf": [{ "$ref": "#/definitions/timelineDisplay" }],
1508
+ "default": "List"
1509
+ },
1510
+ "parameters": {
1511
+ "$ref": "#/definitions/parameters"
1512
+ }
1513
+ },
1514
+ "required": [
1515
+ "id",
1516
+ "title"
1517
+ ]
1518
+ },
1519
+ "deepLinkSegment": {
1520
+ "oneOf": [
1521
+ {
1522
+ "$ref": "#/definitions/literalSegment"
1523
+ },
1524
+ {
1525
+ "$ref": "#/definitions/captureSegment"
1526
+ }
1527
+ ]
1528
+ },
1529
+ "literalSegment": {
1530
+ "type": "object",
1531
+ "additionalProperties": false,
1532
+ "properties": {
1533
+ "type": {
1534
+ "const": "literal"
1535
+ },
1536
+ "value": {
1537
+ "type": "string",
1538
+ "description": "One literal URL path segment.",
1539
+ "pattern": "^(?:[^/\\s?#]{1,256})(?![\\s\\S])"
1540
+ }
1541
+ },
1542
+ "required": [
1543
+ "type",
1544
+ "value"
1545
+ ]
1546
+ },
1547
+ "captureSegment": {
1548
+ "type": "object",
1549
+ "additionalProperties": false,
1550
+ "properties": {
1551
+ "type": {
1552
+ "const": "capture"
1553
+ },
1554
+ "name": {
1555
+ "$ref": "#/definitions/identifier"
1556
+ }
1557
+ },
1558
+ "required": [
1559
+ "type",
1560
+ "name"
1561
+ ]
1562
+ },
1563
+ "deepLinkTargetType": {
1564
+ "type": "string",
1565
+ "enum": [
1566
+ "Profile",
1567
+ "Post",
1568
+ "Timeline",
1569
+ "Browser"
1570
+ ]
1571
+ },
1572
+ "deepLinkTarget": {
1573
+ "type": "object",
1574
+ "additionalProperties": false,
1575
+ "properties": {
1576
+ "type": {
1577
+ "$ref": "#/definitions/deepLinkTargetType"
1578
+ },
1579
+ "value": {
1580
+ "type": [
1581
+ "string",
1582
+ "null"
1583
+ ],
1584
+ "default": null,
1585
+ "description": "Captured placeholders for Profile/Post, a declared timeline ID for Timeline, absent/null for Browser."
1586
+ }
1587
+ },
1588
+ "required": [
1589
+ "type"
1590
+ ],
1591
+ "allOf": [
1592
+ {
1593
+ "if": {
1594
+ "properties": {
1595
+ "type": {
1596
+ "const": "Browser"
1597
+ }
1598
+ }
1599
+ },
1600
+ "then": {
1601
+ "properties": {
1602
+ "value": {
1603
+ "type": "null"
1604
+ }
1605
+ }
1606
+ },
1607
+ "else": {
1608
+ "required": [
1609
+ "value"
1610
+ ],
1611
+ "properties": {
1612
+ "value": {
1613
+ "type": "string"
1614
+ }
1615
+ }
1616
+ }
1617
+ },
1618
+ {
1619
+ "if": {
1620
+ "properties": {
1621
+ "type": {
1622
+ "enum": [
1623
+ "Profile",
1624
+ "Post"
1625
+ ]
1626
+ }
1627
+ }
1628
+ },
1629
+ "then": {
1630
+ "properties": {
1631
+ "value": {
1632
+ "type": "string",
1633
+ "pattern": "^(?:(?:\\{[A-Za-z][A-Za-z0-9_.-]{0,127}\\})+)(?![\\s\\S])"
1634
+ }
1635
+ }
1636
+ }
1637
+ }
1638
+ ]
1639
+ },
1640
+ "deepLink": {
1641
+ "type": "object",
1642
+ "additionalProperties": false,
1643
+ "properties": {
1644
+ "origin": {
1645
+ "type": "string",
1646
+ "description": "Approved exact auth origin or $accountOrigin; Flare checks permission membership.",
1647
+ "default": "$accountOrigin",
1648
+ "pattern": "^(?:(?:\\$accountOrigin|https://[a-z0-9.-]+(?::[0-9]{1,5})?))(?![\\s\\S])"
1649
+ },
1650
+ "path": {
1651
+ "type": "array",
1652
+ "items": {
1653
+ "$ref": "#/definitions/deepLinkSegment"
1654
+ },
1655
+ "default": [],
1656
+ "minItems": 1,
1657
+ "maxItems": 32
1658
+ },
1659
+ "target": {
1660
+ "$ref": "#/definitions/deepLinkTarget"
1661
+ }
1662
+ },
1663
+ "required": [
1664
+ "path",
1665
+ "target"
1666
+ ]
1667
+ },
1668
+ "visibility": {
1669
+ "type": "string",
1670
+ "enum": [
1671
+ "public",
1672
+ "unlisted",
1673
+ "followers",
1674
+ "direct"
1675
+ ]
1676
+ },
1677
+ "composeText": {
1678
+ "type": "object",
1679
+ "additionalProperties": false,
1680
+ "properties": {
1681
+ "maxLength": {
1682
+ "type": "integer",
1683
+ "minimum": 1,
1684
+ "maximum": 1000000
1685
+ }
1686
+ },
1687
+ "required": [
1688
+ "maxLength"
1689
+ ]
1690
+ },
1691
+ "composeMedia": {
1692
+ "type": "object",
1693
+ "additionalProperties": false,
1694
+ "properties": {
1695
+ "minCountForNew": {
1696
+ "type": "integer",
1697
+ "minimum": 0,
1698
+ "maximum": 100,
1699
+ "default": 0,
1700
+ "description": "Must not exceed maxCount; checked by Flare."
1701
+ },
1702
+ "maxCount": {
1703
+ "type": "integer",
1704
+ "minimum": 0,
1705
+ "maximum": 100
1706
+ },
1707
+ "maxBytes": {
1708
+ "type": "integer",
1709
+ "minimum": 1,
1710
+ "maximum": 1073741824
1711
+ },
1712
+ "supportedMimeTypes": {
1713
+ "type": "array",
1714
+ "items": {
1715
+ "type": "string",
1716
+ "description": "Supported MIME type or subtype wildcard.",
1717
+ "pattern": "^(?:[A-Za-z0-9!#$&^_.+-]+/(?:[A-Za-z0-9!#$&^_.+-]+|\\*))(?![\\s\\S])"
1718
+ },
1719
+ "default": [],
1720
+ "maxItems": 128,
1721
+ "uniqueItems": true
1722
+ },
1723
+ "altTextMaxLength": {
1724
+ "type": "integer",
1725
+ "minimum": 0,
1726
+ "maximum": 100000,
1727
+ "default": 1500
1728
+ },
1729
+ "canSensitive": {
1730
+ "type": "boolean",
1731
+ "default": true
1732
+ }
1733
+ },
1734
+ "required": [
1735
+ "maxCount",
1736
+ "maxBytes"
1737
+ ]
1738
+ },
1739
+ "composeVisibility": {
1740
+ "type": "object",
1741
+ "additionalProperties": false,
1742
+ "properties": {
1743
+ "allowed": {
1744
+ "type": "array",
1745
+ "items": {
1746
+ "$ref": "#/definitions/visibility"
1747
+ },
1748
+ "default": [],
1749
+ "minItems": 1,
1750
+ "uniqueItems": true,
1751
+ "description": "The default visibility must be a member; checked by Flare."
1752
+ },
1753
+ "default": {
1754
+ "allOf": [{ "$ref": "#/definitions/visibility" }],
1755
+ "default": "public"
1756
+ }
1757
+ },
1758
+ "required": [
1759
+ "allowed"
1760
+ ]
1761
+ },
1762
+ "composePoll": {
1763
+ "type": "object",
1764
+ "additionalProperties": false,
1765
+ "properties": {
1766
+ "maxOptions": {
1767
+ "type": "integer",
1768
+ "minimum": 2,
1769
+ "maximum": 100
1770
+ }
1771
+ },
1772
+ "required": [
1773
+ "maxOptions"
1774
+ ]
1775
+ },
1776
+ "composeLanguage": {
1777
+ "type": "object",
1778
+ "additionalProperties": false,
1779
+ "properties": {
1780
+ "maxCount": {
1781
+ "type": "integer",
1782
+ "minimum": 1,
1783
+ "maximum": 32
1784
+ }
1785
+ },
1786
+ "required": [
1787
+ "maxCount"
1788
+ ]
1789
+ },
1790
+ "compose": {
1791
+ "type": "object",
1792
+ "additionalProperties": false,
1793
+ "properties": {
1794
+ "text": {
1795
+ "anyOf": [
1796
+ {
1797
+ "$ref": "#/definitions/composeText"
1798
+ },
1799
+ {
1800
+ "type": "null"
1801
+ }
1802
+ ],
1803
+ "default": null
1804
+ },
1805
+ "media": {
1806
+ "anyOf": [
1807
+ {
1808
+ "$ref": "#/definitions/composeMedia"
1809
+ },
1810
+ {
1811
+ "type": "null"
1812
+ }
1813
+ ],
1814
+ "default": null
1815
+ },
1816
+ "visibility": {
1817
+ "anyOf": [
1818
+ {
1819
+ "$ref": "#/definitions/composeVisibility"
1820
+ },
1821
+ {
1822
+ "type": "null"
1823
+ }
1824
+ ],
1825
+ "default": null
1826
+ },
1827
+ "contentWarning": {
1828
+ "type": "boolean",
1829
+ "default": false
1830
+ },
1831
+ "poll": {
1832
+ "anyOf": [
1833
+ {
1834
+ "$ref": "#/definitions/composePoll"
1835
+ },
1836
+ {
1837
+ "type": "null"
1838
+ }
1839
+ ],
1840
+ "default": null
1841
+ },
1842
+ "language": {
1843
+ "anyOf": [
1844
+ {
1845
+ "$ref": "#/definitions/composeLanguage"
1846
+ },
1847
+ {
1848
+ "type": "null"
1849
+ }
1850
+ ],
1851
+ "default": null
1852
+ }
1853
+ }
1854
+ }
1855
+ }
1856
+ }