@funfab/sdk 0.2.0 → 0.3.1

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,3453 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "FunFab hub API (hub/1)",
5
+ "version": "1.0.0",
6
+ "description": "Owner-approval contract; publishing enables nothing, and nothing here is built. The calls a hub and a member game make under PLATFORM-SPEC.md, Hubs and hand-off. Transport is the accounts API's existing one: POST only, JSON, no query parameters, no browser Origin. Every call carries the caller's game credential (#78) as a bearer and its own game ID in the body. Where a person acts, the body carries that person's sign-in ticket for the calling runtime's own client; a job with no person present carries the show's show_ref. Each call is checked for environment, the credential's permission and runtime, and the rows in the spec's \"Who may call what\" table. Responses use Cache-Control: private, no-store.\n\nVersioning: hub/1 changes only by optional, additive fields, calls and message types, so receivers ignore fields they don't know and objects here don't forbid additional properties. A hand-off's v is pinned at booking and returned on every reply about it. Every request body carries v, reads included. The one exception is redeem, which is the same in every version.\n\nErrors are {\"error\": \"<code>\"}, with \"retry\": true where a retry can succeed. Platform-to-game cleanup notices are not in this file. The account-keyed notice is in docs/game-account-integration.md. The opaque-ID and subject-keyed notices are specified in PLATFORM-SPEC.md, Hubs and hand-off, Data the platform keeps."
7
+ },
8
+ "security": [
9
+ {
10
+ "GameCredential": []
11
+ }
12
+ ],
13
+ "paths": {
14
+ "/api/hub/shows": {
15
+ "post": {
16
+ "operationId": "hubBookShow",
17
+ "description": "Book a show. The show is active only when every source is verified against the host's provider binding; otherwise it stays pending, books no hand-off and accrues no credit. A repeat with the same idempotency_key returns the first reply. Permission: `hub`. Person: the host's sign-in ticket for the hub's client.",
18
+ "security": [
19
+ {
20
+ "GameCredential": []
21
+ }
22
+ ],
23
+ "requestBody": {
24
+ "required": true,
25
+ "content": {
26
+ "application/json": {
27
+ "schema": {
28
+ "type": "object",
29
+ "required": [
30
+ "game",
31
+ "ticket",
32
+ "v",
33
+ "idempotency_key",
34
+ "origin",
35
+ "sources",
36
+ "lang",
37
+ "screen"
38
+ ],
39
+ "properties": {
40
+ "game": {
41
+ "$ref": "#/components/schemas/Game"
42
+ },
43
+ "ticket": {
44
+ "$ref": "#/components/schemas/Ticket"
45
+ },
46
+ "v": {
47
+ "$ref": "#/components/schemas/Version"
48
+ },
49
+ "idempotency_key": {
50
+ "$ref": "#/components/schemas/IdempotencyKey"
51
+ },
52
+ "origin": {
53
+ "$ref": "#/components/schemas/Origin"
54
+ },
55
+ "sources": {
56
+ "type": "array",
57
+ "minItems": 1,
58
+ "items": {
59
+ "$ref": "#/components/schemas/Source"
60
+ }
61
+ },
62
+ "lang": {
63
+ "$ref": "#/components/schemas/Lang"
64
+ },
65
+ "screen": {
66
+ "$ref": "#/components/schemas/Screen"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "responses": {
74
+ "200": {
75
+ "description": "The show.",
76
+ "content": {
77
+ "application/json": {
78
+ "schema": {
79
+ "type": "object",
80
+ "required": [
81
+ "v",
82
+ "show",
83
+ "show_ref",
84
+ "state",
85
+ "started_at",
86
+ "expires_at",
87
+ "room_request_id"
88
+ ],
89
+ "properties": {
90
+ "v": {
91
+ "$ref": "#/components/schemas/Version"
92
+ },
93
+ "show": {
94
+ "$ref": "#/components/schemas/ShowId"
95
+ },
96
+ "show_ref": {
97
+ "$ref": "#/components/schemas/ShowRef"
98
+ },
99
+ "state": {
100
+ "type": "string",
101
+ "enum": [
102
+ "active",
103
+ "pending"
104
+ ]
105
+ },
106
+ "started_at": {
107
+ "$ref": "#/components/schemas/Timestamp"
108
+ },
109
+ "expires_at": {
110
+ "$ref": "#/components/schemas/Timestamp"
111
+ },
112
+ "room_request_id": {
113
+ "$ref": "#/components/schemas/RoomRequestId"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "400": {
121
+ "description": "A malformed request, an origin that isn't one of the hub's registered origins, or bad show facts.",
122
+ "content": {
123
+ "application/json": {
124
+ "schema": {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": [
128
+ "error"
129
+ ],
130
+ "properties": {
131
+ "error": {
132
+ "type": "string",
133
+ "enum": [
134
+ "accounts_request_invalid",
135
+ "bad_origin",
136
+ "bad_sources",
137
+ "bad_lang",
138
+ "bad_screen"
139
+ ]
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ },
146
+ "401": {
147
+ "$ref": "#/components/responses/Unauthorized"
148
+ },
149
+ "403": {
150
+ "description": "The host isn't admitted to the hub now, or the hub is switched off.",
151
+ "content": {
152
+ "application/json": {
153
+ "schema": {
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": [
157
+ "error"
158
+ ],
159
+ "properties": {
160
+ "error": {
161
+ "type": "string",
162
+ "enum": [
163
+ "host_not_allowed",
164
+ "switched_off"
165
+ ]
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "405": {
173
+ "$ref": "#/components/responses/MethodNotAllowed"
174
+ },
175
+ "503": {
176
+ "$ref": "#/components/responses/Unavailable"
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "/api/hub/shows/{show}/end": {
182
+ "post": {
183
+ "operationId": "hubEndShow",
184
+ "description": "End a show. Idempotent. Ending never closes result intake: each hand-off keeps its own result_deadline. During an outage the venue closes locally at once and sends this when the platform answers, with the time it ended. Permission: `hub`. Person: the show host's sign-in ticket for the hub's client.",
185
+ "security": [
186
+ {
187
+ "GameCredential": []
188
+ }
189
+ ],
190
+ "requestBody": {
191
+ "required": true,
192
+ "content": {
193
+ "application/json": {
194
+ "schema": {
195
+ "type": "object",
196
+ "required": [
197
+ "game",
198
+ "ticket",
199
+ "v"
200
+ ],
201
+ "properties": {
202
+ "game": {
203
+ "$ref": "#/components/schemas/Game"
204
+ },
205
+ "ticket": {
206
+ "$ref": "#/components/schemas/Ticket"
207
+ },
208
+ "v": {
209
+ "$ref": "#/components/schemas/Version"
210
+ },
211
+ "ended_at": {
212
+ "$ref": "#/components/schemas/Timestamp"
213
+ }
214
+ }
215
+ }
216
+ }
217
+ }
218
+ },
219
+ "responses": {
220
+ "200": {
221
+ "description": "Ended.",
222
+ "content": {
223
+ "application/json": {
224
+ "schema": {
225
+ "type": "object",
226
+ "required": [
227
+ "v",
228
+ "ok"
229
+ ],
230
+ "properties": {
231
+ "v": {
232
+ "$ref": "#/components/schemas/Version"
233
+ },
234
+ "ok": {
235
+ "const": true
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
241
+ },
242
+ "400": {
243
+ "$ref": "#/components/responses/InvalidRequest"
244
+ },
245
+ "401": {
246
+ "$ref": "#/components/responses/Unauthorized"
247
+ },
248
+ "403": {
249
+ "description": "The ticket's account isn't the show's host, or is no longer admitted.",
250
+ "content": {
251
+ "application/json": {
252
+ "schema": {
253
+ "type": "object",
254
+ "additionalProperties": false,
255
+ "required": [
256
+ "error"
257
+ ],
258
+ "properties": {
259
+ "error": {
260
+ "type": "string",
261
+ "enum": [
262
+ "host_not_allowed"
263
+ ]
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ },
270
+ "405": {
271
+ "$ref": "#/components/responses/MethodNotAllowed"
272
+ },
273
+ "503": {
274
+ "$ref": "#/components/responses/Unavailable"
275
+ }
276
+ },
277
+ "parameters": [
278
+ {
279
+ "name": "show",
280
+ "in": "path",
281
+ "required": true,
282
+ "schema": {
283
+ "$ref": "#/components/schemas/ShowId"
284
+ }
285
+ }
286
+ ]
287
+ }
288
+ },
289
+ "/api/hub/shows/{show}/read": {
290
+ "post": {
291
+ "operationId": "hubReadShow",
292
+ "description": "Read a show's state: every hand-off with its fields and cleaned result, and the show's receipts. A show_ref for any other show, the same host's included, is refused with 401. The body carries exactly one credential: the host's ticket or this exact show's show_ref. if_etag is evaluated only after authorization, against the etag of the current cleaned projection, which changes whenever that projection does: stage state, a result, a removal, a deletion, suppression or retention. Permission: `hub`. Person: the host's ticket (a desk asked), or the show's show_ref (no person present).",
293
+ "security": [
294
+ {
295
+ "GameCredential": []
296
+ }
297
+ ],
298
+ "requestBody": {
299
+ "required": true,
300
+ "content": {
301
+ "application/json": {
302
+ "schema": {
303
+ "type": "object",
304
+ "required": [
305
+ "game",
306
+ "v"
307
+ ],
308
+ "properties": {
309
+ "game": {
310
+ "$ref": "#/components/schemas/Game"
311
+ },
312
+ "ticket": {
313
+ "$ref": "#/components/schemas/Ticket"
314
+ },
315
+ "v": {
316
+ "$ref": "#/components/schemas/Version"
317
+ },
318
+ "show_ref": {
319
+ "$ref": "#/components/schemas/ShowRef"
320
+ },
321
+ "if_etag": {
322
+ "type": "string"
323
+ }
324
+ },
325
+ "oneOf": [
326
+ {
327
+ "required": [
328
+ "ticket"
329
+ ],
330
+ "not": {
331
+ "required": [
332
+ "show_ref"
333
+ ]
334
+ }
335
+ },
336
+ {
337
+ "required": [
338
+ "show_ref"
339
+ ],
340
+ "not": {
341
+ "required": [
342
+ "ticket"
343
+ ]
344
+ }
345
+ }
346
+ ]
347
+ }
348
+ }
349
+ }
350
+ },
351
+ "responses": {
352
+ "200": {
353
+ "description": "The state, or not_modified when if_etag is current.",
354
+ "content": {
355
+ "application/json": {
356
+ "schema": {
357
+ "oneOf": [
358
+ {
359
+ "$ref": "#/components/schemas/ShowState"
360
+ },
361
+ {
362
+ "$ref": "#/components/schemas/NotModified"
363
+ }
364
+ ]
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "400": {
370
+ "$ref": "#/components/responses/InvalidRequest"
371
+ },
372
+ "401": {
373
+ "$ref": "#/components/responses/Unauthorized"
374
+ },
375
+ "403": {
376
+ "description": "A ticket that isn't the show's host's.",
377
+ "content": {
378
+ "application/json": {
379
+ "schema": {
380
+ "type": "object",
381
+ "additionalProperties": false,
382
+ "required": [
383
+ "error"
384
+ ],
385
+ "properties": {
386
+ "error": {
387
+ "type": "string",
388
+ "enum": [
389
+ "host_not_allowed"
390
+ ]
391
+ }
392
+ }
393
+ }
394
+ }
395
+ }
396
+ },
397
+ "405": {
398
+ "$ref": "#/components/responses/MethodNotAllowed"
399
+ },
400
+ "503": {
401
+ "$ref": "#/components/responses/Unavailable"
402
+ }
403
+ },
404
+ "parameters": [
405
+ {
406
+ "name": "show",
407
+ "in": "path",
408
+ "required": true,
409
+ "schema": {
410
+ "$ref": "#/components/schemas/ShowId"
411
+ }
412
+ }
413
+ ]
414
+ }
415
+ },
416
+ "/api/hub/shows/{show}/handoffs": {
417
+ "post": {
418
+ "operationId": "hubBookHandoff",
419
+ "description": "Book a hand-off and take the show's one slot, atomically. Pins v to the newest version the platform, the hub and the title all declare. Claims no room. Permission: `hub`. Person: the show host's sign-in ticket for the hub's client.",
420
+ "security": [
421
+ {
422
+ "GameCredential": []
423
+ }
424
+ ],
425
+ "requestBody": {
426
+ "required": true,
427
+ "content": {
428
+ "application/json": {
429
+ "schema": {
430
+ "type": "object",
431
+ "required": [
432
+ "game",
433
+ "ticket",
434
+ "v",
435
+ "idempotency_key",
436
+ "title"
437
+ ],
438
+ "properties": {
439
+ "game": {
440
+ "$ref": "#/components/schemas/Game"
441
+ },
442
+ "ticket": {
443
+ "$ref": "#/components/schemas/Ticket"
444
+ },
445
+ "v": {
446
+ "$ref": "#/components/schemas/Version"
447
+ },
448
+ "idempotency_key": {
449
+ "$ref": "#/components/schemas/IdempotencyKey"
450
+ },
451
+ "title": {
452
+ "$ref": "#/components/schemas/TitleId"
453
+ },
454
+ "minutes": {
455
+ "type": "integer",
456
+ "minimum": 1
457
+ },
458
+ "cam": {
459
+ "$ref": "#/components/schemas/Cam"
460
+ }
461
+ }
462
+ }
463
+ }
464
+ }
465
+ },
466
+ "responses": {
467
+ "200": {
468
+ "description": "The hand-off and its first launch code. max_ms is always present here.",
469
+ "content": {
470
+ "application/json": {
471
+ "schema": {
472
+ "$ref": "#/components/schemas/LaunchCode"
473
+ }
474
+ }
475
+ }
476
+ },
477
+ "400": {
478
+ "description": "Malformed, or the title doesn't declare the show's providers, source count, language or screen.",
479
+ "content": {
480
+ "application/json": {
481
+ "schema": {
482
+ "type": "object",
483
+ "additionalProperties": false,
484
+ "required": [
485
+ "error"
486
+ ],
487
+ "properties": {
488
+ "error": {
489
+ "type": "string",
490
+ "enum": [
491
+ "accounts_request_invalid",
492
+ "bad_sources",
493
+ "bad_lang",
494
+ "bad_screen"
495
+ ]
496
+ }
497
+ }
498
+ }
499
+ }
500
+ }
501
+ },
502
+ "401": {
503
+ "$ref": "#/components/responses/Unauthorized"
504
+ },
505
+ "403": {
506
+ "description": "No approved membership, a switch-off, or the host lacks access to the hub or the member now.",
507
+ "content": {
508
+ "application/json": {
509
+ "schema": {
510
+ "type": "object",
511
+ "additionalProperties": false,
512
+ "required": [
513
+ "error"
514
+ ],
515
+ "properties": {
516
+ "error": {
517
+ "type": "string",
518
+ "enum": [
519
+ "not_member",
520
+ "switched_off",
521
+ "host_not_allowed"
522
+ ]
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
528
+ },
529
+ "405": {
530
+ "$ref": "#/components/responses/MethodNotAllowed"
531
+ },
532
+ "409": {
533
+ "description": "The slot is held, or the show isn't active.",
534
+ "content": {
535
+ "application/json": {
536
+ "schema": {
537
+ "type": "object",
538
+ "additionalProperties": false,
539
+ "required": [
540
+ "error"
541
+ ],
542
+ "properties": {
543
+ "error": {
544
+ "type": "string",
545
+ "enum": [
546
+ "handoff_open",
547
+ "show_not_active"
548
+ ]
549
+ }
550
+ }
551
+ }
552
+ }
553
+ }
554
+ },
555
+ "503": {
556
+ "$ref": "#/components/responses/Unavailable"
557
+ }
558
+ },
559
+ "parameters": [
560
+ {
561
+ "name": "show",
562
+ "in": "path",
563
+ "required": true,
564
+ "schema": {
565
+ "$ref": "#/components/schemas/ShowId"
566
+ }
567
+ }
568
+ ]
569
+ }
570
+ },
571
+ "/api/hub/handoffs/{handoff}/launch-code": {
572
+ "post": {
573
+ "operationId": "hubNewLaunchCode",
574
+ "description": "Issue a fresh launch code for the same hand-off and cancel every earlier one. Rechecks access, membership and both switch-offs. Permission: `hub`. Person: the show host's sign-in ticket for the hub's client.",
575
+ "security": [
576
+ {
577
+ "GameCredential": []
578
+ }
579
+ ],
580
+ "requestBody": {
581
+ "required": true,
582
+ "content": {
583
+ "application/json": {
584
+ "schema": {
585
+ "type": "object",
586
+ "required": [
587
+ "game",
588
+ "ticket",
589
+ "v"
590
+ ],
591
+ "properties": {
592
+ "game": {
593
+ "$ref": "#/components/schemas/Game"
594
+ },
595
+ "ticket": {
596
+ "$ref": "#/components/schemas/Ticket"
597
+ },
598
+ "v": {
599
+ "$ref": "#/components/schemas/Version"
600
+ }
601
+ }
602
+ }
603
+ }
604
+ }
605
+ },
606
+ "responses": {
607
+ "200": {
608
+ "description": "A fresh code.",
609
+ "content": {
610
+ "application/json": {
611
+ "schema": {
612
+ "$ref": "#/components/schemas/LaunchCode"
613
+ }
614
+ }
615
+ }
616
+ },
617
+ "400": {
618
+ "$ref": "#/components/responses/InvalidRequest"
619
+ },
620
+ "401": {
621
+ "$ref": "#/components/responses/Unauthorized"
622
+ },
623
+ "403": {
624
+ "description": "As for booking.",
625
+ "content": {
626
+ "application/json": {
627
+ "schema": {
628
+ "type": "object",
629
+ "additionalProperties": false,
630
+ "required": [
631
+ "error"
632
+ ],
633
+ "properties": {
634
+ "error": {
635
+ "type": "string",
636
+ "enum": [
637
+ "not_member",
638
+ "switched_off",
639
+ "host_not_allowed"
640
+ ]
641
+ }
642
+ }
643
+ }
644
+ }
645
+ }
646
+ },
647
+ "405": {
648
+ "$ref": "#/components/responses/MethodNotAllowed"
649
+ },
650
+ "409": {
651
+ "description": "The show isn't active or the hand-off is closed.",
652
+ "content": {
653
+ "application/json": {
654
+ "schema": {
655
+ "type": "object",
656
+ "additionalProperties": false,
657
+ "required": [
658
+ "error"
659
+ ],
660
+ "properties": {
661
+ "error": {
662
+ "type": "string",
663
+ "enum": [
664
+ "show_not_active",
665
+ "handoff_closed"
666
+ ]
667
+ }
668
+ }
669
+ }
670
+ }
671
+ }
672
+ },
673
+ "503": {
674
+ "$ref": "#/components/responses/Unavailable"
675
+ }
676
+ },
677
+ "parameters": [
678
+ {
679
+ "name": "handoff",
680
+ "in": "path",
681
+ "required": true,
682
+ "schema": {
683
+ "$ref": "#/components/schemas/HandoffId"
684
+ }
685
+ }
686
+ ]
687
+ }
688
+ },
689
+ "/api/hub/handoffs/{handoff}/state": {
690
+ "post": {
691
+ "operationId": "hubSetHandoffState",
692
+ "description": "Write stage state from the hub's outbox. Writes apply only in unbroken seq order from 1. An already-applied seq is acknowledged and changes nothing. close \"unplayed\" is allowed only before first_on_air_at; close \"played\" only after it, and it sets on_air false. Closing releases the show's slot. Permission: `hub`. Person: the show host's sign-in ticket for the hub's client.",
693
+ "security": [
694
+ {
695
+ "GameCredential": []
696
+ }
697
+ ],
698
+ "requestBody": {
699
+ "required": true,
700
+ "content": {
701
+ "application/json": {
702
+ "schema": {
703
+ "type": "object",
704
+ "required": [
705
+ "game",
706
+ "ticket",
707
+ "v",
708
+ "seq"
709
+ ],
710
+ "properties": {
711
+ "game": {
712
+ "$ref": "#/components/schemas/Game"
713
+ },
714
+ "ticket": {
715
+ "$ref": "#/components/schemas/Ticket"
716
+ },
717
+ "v": {
718
+ "$ref": "#/components/schemas/Version"
719
+ },
720
+ "seq": {
721
+ "type": "integer",
722
+ "minimum": 1
723
+ },
724
+ "on_air": {
725
+ "type": "boolean"
726
+ },
727
+ "take_back": {
728
+ "$ref": "#/components/schemas/TakeBack"
729
+ },
730
+ "close": {
731
+ "type": "string",
732
+ "enum": [
733
+ "played",
734
+ "unplayed"
735
+ ]
736
+ }
737
+ }
738
+ }
739
+ }
740
+ }
741
+ },
742
+ "responses": {
743
+ "200": {
744
+ "description": "Applied, or already applied.",
745
+ "content": {
746
+ "application/json": {
747
+ "schema": {
748
+ "type": "object",
749
+ "required": [
750
+ "v",
751
+ "ok"
752
+ ],
753
+ "properties": {
754
+ "v": {
755
+ "$ref": "#/components/schemas/Version"
756
+ },
757
+ "ok": {
758
+ "const": true
759
+ }
760
+ }
761
+ }
762
+ }
763
+ }
764
+ },
765
+ "400": {
766
+ "$ref": "#/components/responses/InvalidRequest"
767
+ },
768
+ "401": {
769
+ "$ref": "#/components/responses/Unauthorized"
770
+ },
771
+ "403": {
772
+ "description": "Not the show's host.",
773
+ "content": {
774
+ "application/json": {
775
+ "schema": {
776
+ "type": "object",
777
+ "additionalProperties": false,
778
+ "required": [
779
+ "error"
780
+ ],
781
+ "properties": {
782
+ "error": {
783
+ "type": "string",
784
+ "enum": [
785
+ "host_not_allowed"
786
+ ]
787
+ }
788
+ }
789
+ }
790
+ }
791
+ }
792
+ },
793
+ "405": {
794
+ "$ref": "#/components/responses/MethodNotAllowed"
795
+ },
796
+ "409": {
797
+ "description": "seq_gap carries retry: true and expected_seq. handoff_closed is final.",
798
+ "content": {
799
+ "application/json": {
800
+ "schema": {
801
+ "oneOf": [
802
+ {
803
+ "type": "object",
804
+ "additionalProperties": false,
805
+ "required": [
806
+ "error",
807
+ "retry",
808
+ "expected_seq"
809
+ ],
810
+ "properties": {
811
+ "error": {
812
+ "const": "seq_gap"
813
+ },
814
+ "retry": {
815
+ "const": true
816
+ },
817
+ "expected_seq": {
818
+ "type": "integer",
819
+ "minimum": 1
820
+ }
821
+ }
822
+ },
823
+ {
824
+ "type": "object",
825
+ "additionalProperties": false,
826
+ "required": [
827
+ "error"
828
+ ],
829
+ "properties": {
830
+ "error": {
831
+ "type": "string",
832
+ "enum": [
833
+ "handoff_closed"
834
+ ]
835
+ }
836
+ }
837
+ }
838
+ ]
839
+ }
840
+ }
841
+ }
842
+ },
843
+ "503": {
844
+ "$ref": "#/components/responses/Unavailable"
845
+ }
846
+ },
847
+ "parameters": [
848
+ {
849
+ "name": "handoff",
850
+ "in": "path",
851
+ "required": true,
852
+ "schema": {
853
+ "$ref": "#/components/schemas/HandoffId"
854
+ }
855
+ }
856
+ ]
857
+ }
858
+ },
859
+ "/api/hub/handoffs/{handoff}/read": {
860
+ "post": {
861
+ "operationId": "hubReadHandoff",
862
+ "description": "Read one hand-off, with its accepted result for as long as it is kept. Returns the same cleaned result as the show read. The body carries exactly one credential: the host's ticket or this exact show's show_ref. if_etag is evaluated only after authorization, against the etag of the current cleaned projection, which changes whenever that projection does: stage state, a result, a removal, a deletion, suppression or retention. Permission: `hub`. Person: the host's ticket (a desk asked), or the show's show_ref (no person present).",
863
+ "security": [
864
+ {
865
+ "GameCredential": []
866
+ }
867
+ ],
868
+ "requestBody": {
869
+ "required": true,
870
+ "content": {
871
+ "application/json": {
872
+ "schema": {
873
+ "type": "object",
874
+ "required": [
875
+ "game",
876
+ "v"
877
+ ],
878
+ "properties": {
879
+ "game": {
880
+ "$ref": "#/components/schemas/Game"
881
+ },
882
+ "ticket": {
883
+ "$ref": "#/components/schemas/Ticket"
884
+ },
885
+ "v": {
886
+ "$ref": "#/components/schemas/Version"
887
+ },
888
+ "show_ref": {
889
+ "$ref": "#/components/schemas/ShowRef"
890
+ },
891
+ "if_etag": {
892
+ "type": "string"
893
+ }
894
+ },
895
+ "oneOf": [
896
+ {
897
+ "required": [
898
+ "ticket"
899
+ ],
900
+ "not": {
901
+ "required": [
902
+ "show_ref"
903
+ ]
904
+ }
905
+ },
906
+ {
907
+ "required": [
908
+ "show_ref"
909
+ ],
910
+ "not": {
911
+ "required": [
912
+ "ticket"
913
+ ]
914
+ }
915
+ }
916
+ ]
917
+ }
918
+ }
919
+ }
920
+ },
921
+ "responses": {
922
+ "200": {
923
+ "description": "The state, or not_modified.",
924
+ "content": {
925
+ "application/json": {
926
+ "schema": {
927
+ "oneOf": [
928
+ {
929
+ "$ref": "#/components/schemas/HandoffState"
930
+ },
931
+ {
932
+ "$ref": "#/components/schemas/NotModified"
933
+ }
934
+ ]
935
+ }
936
+ }
937
+ }
938
+ },
939
+ "400": {
940
+ "$ref": "#/components/responses/InvalidRequest"
941
+ },
942
+ "401": {
943
+ "$ref": "#/components/responses/Unauthorized"
944
+ },
945
+ "403": {
946
+ "description": "A ticket that isn't the show's host's.",
947
+ "content": {
948
+ "application/json": {
949
+ "schema": {
950
+ "type": "object",
951
+ "additionalProperties": false,
952
+ "required": [
953
+ "error"
954
+ ],
955
+ "properties": {
956
+ "error": {
957
+ "type": "string",
958
+ "enum": [
959
+ "host_not_allowed"
960
+ ]
961
+ }
962
+ }
963
+ }
964
+ }
965
+ }
966
+ },
967
+ "405": {
968
+ "$ref": "#/components/responses/MethodNotAllowed"
969
+ },
970
+ "503": {
971
+ "$ref": "#/components/responses/Unavailable"
972
+ }
973
+ },
974
+ "parameters": [
975
+ {
976
+ "name": "handoff",
977
+ "in": "path",
978
+ "required": true,
979
+ "schema": {
980
+ "$ref": "#/components/schemas/HandoffId"
981
+ }
982
+ }
983
+ ]
984
+ }
985
+ },
986
+ "/api/hub/shows/{show}/blocks": {
987
+ "post": {
988
+ "operationId": "hubSetBlocks",
989
+ "description": "Replace the show's host-managed block entries only. Platform deletion blocks are kept on the server, are never sent here and are never changed by this call. Among host entries, removed only grows within a show. blocks_revision is one shared revision: it rises when either the host entries or the deletion blocks change. sync returns the union. A later removal voids that subject's receipts and recomputes derived XP. Permission: `hub`. Person: the show host's sign-in ticket for the hub's client.",
990
+ "security": [
991
+ {
992
+ "GameCredential": []
993
+ }
994
+ ],
995
+ "requestBody": {
996
+ "required": true,
997
+ "content": {
998
+ "application/json": {
999
+ "schema": {
1000
+ "type": "object",
1001
+ "required": [
1002
+ "game",
1003
+ "ticket",
1004
+ "v",
1005
+ "expected_revision",
1006
+ "hidden",
1007
+ "removed"
1008
+ ],
1009
+ "properties": {
1010
+ "game": {
1011
+ "$ref": "#/components/schemas/Game"
1012
+ },
1013
+ "ticket": {
1014
+ "$ref": "#/components/schemas/Ticket"
1015
+ },
1016
+ "v": {
1017
+ "$ref": "#/components/schemas/Version"
1018
+ },
1019
+ "expected_revision": {
1020
+ "type": "integer",
1021
+ "minimum": 0
1022
+ },
1023
+ "hidden": {
1024
+ "type": "array",
1025
+ "maxItems": 500,
1026
+ "items": {
1027
+ "$ref": "#/components/schemas/Subject"
1028
+ }
1029
+ },
1030
+ "removed": {
1031
+ "type": "array",
1032
+ "maxItems": 500,
1033
+ "items": {
1034
+ "$ref": "#/components/schemas/Subject"
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+ }
1040
+ }
1041
+ },
1042
+ "responses": {
1043
+ "200": {
1044
+ "description": "The new revision.",
1045
+ "content": {
1046
+ "application/json": {
1047
+ "schema": {
1048
+ "type": "object",
1049
+ "required": [
1050
+ "v",
1051
+ "blocks_revision"
1052
+ ],
1053
+ "properties": {
1054
+ "v": {
1055
+ "$ref": "#/components/schemas/Version"
1056
+ },
1057
+ "blocks_revision": {
1058
+ "type": "integer",
1059
+ "minimum": 0
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ },
1066
+ "400": {
1067
+ "$ref": "#/components/responses/InvalidRequest"
1068
+ },
1069
+ "401": {
1070
+ "$ref": "#/components/responses/Unauthorized"
1071
+ },
1072
+ "403": {
1073
+ "description": "Not the show's host.",
1074
+ "content": {
1075
+ "application/json": {
1076
+ "schema": {
1077
+ "type": "object",
1078
+ "additionalProperties": false,
1079
+ "required": [
1080
+ "error"
1081
+ ],
1082
+ "properties": {
1083
+ "error": {
1084
+ "type": "string",
1085
+ "enum": [
1086
+ "host_not_allowed"
1087
+ ]
1088
+ }
1089
+ }
1090
+ }
1091
+ }
1092
+ }
1093
+ },
1094
+ "405": {
1095
+ "$ref": "#/components/responses/MethodNotAllowed"
1096
+ },
1097
+ "409": {
1098
+ "description": "expected_revision isn't current, or the write leaves out a removed subject.",
1099
+ "content": {
1100
+ "application/json": {
1101
+ "schema": {
1102
+ "type": "object",
1103
+ "additionalProperties": false,
1104
+ "required": [
1105
+ "error"
1106
+ ],
1107
+ "properties": {
1108
+ "error": {
1109
+ "type": "string",
1110
+ "enum": [
1111
+ "stale_revision",
1112
+ "cannot_unremove"
1113
+ ]
1114
+ }
1115
+ }
1116
+ }
1117
+ }
1118
+ }
1119
+ },
1120
+ "503": {
1121
+ "$ref": "#/components/responses/Unavailable"
1122
+ }
1123
+ },
1124
+ "parameters": [
1125
+ {
1126
+ "name": "show",
1127
+ "in": "path",
1128
+ "required": true,
1129
+ "schema": {
1130
+ "$ref": "#/components/schemas/ShowId"
1131
+ }
1132
+ }
1133
+ ]
1134
+ }
1135
+ },
1136
+ "/api/hub/shows/{show}/receipts": {
1137
+ "post": {
1138
+ "operationId": "hubAddReceipts",
1139
+ "description": "Add receipts for the hub's own play. Each subject must have been observed by the hub's server on a booked source, or through an entry point that checks identity. A repeat of an idempotency_key changes nothing. Permission: `hub`. Person: none; the job's show_ref.",
1140
+ "security": [
1141
+ {
1142
+ "GameCredential": []
1143
+ }
1144
+ ],
1145
+ "requestBody": {
1146
+ "required": true,
1147
+ "content": {
1148
+ "application/json": {
1149
+ "schema": {
1150
+ "type": "object",
1151
+ "required": [
1152
+ "game",
1153
+ "show_ref",
1154
+ "v",
1155
+ "receipts"
1156
+ ],
1157
+ "properties": {
1158
+ "game": {
1159
+ "$ref": "#/components/schemas/Game"
1160
+ },
1161
+ "v": {
1162
+ "$ref": "#/components/schemas/Version"
1163
+ },
1164
+ "show_ref": {
1165
+ "$ref": "#/components/schemas/ShowRef"
1166
+ },
1167
+ "receipts": {
1168
+ "type": "array",
1169
+ "minItems": 1,
1170
+ "maxItems": 300,
1171
+ "items": {
1172
+ "type": "object",
1173
+ "required": [
1174
+ "idempotency_key",
1175
+ "subject",
1176
+ "source",
1177
+ "kind"
1178
+ ],
1179
+ "properties": {
1180
+ "idempotency_key": {
1181
+ "$ref": "#/components/schemas/IdempotencyKey"
1182
+ },
1183
+ "subject": {
1184
+ "$ref": "#/components/schemas/Subject"
1185
+ },
1186
+ "source": {
1187
+ "$ref": "#/components/schemas/Source"
1188
+ },
1189
+ "kind": {
1190
+ "type": "string",
1191
+ "enum": [
1192
+ "attended",
1193
+ "placed"
1194
+ ]
1195
+ },
1196
+ "place": {
1197
+ "type": [
1198
+ "integer",
1199
+ "null"
1200
+ ],
1201
+ "minimum": 1
1202
+ }
1203
+ }
1204
+ }
1205
+ }
1206
+ }
1207
+ }
1208
+ }
1209
+ }
1210
+ },
1211
+ "responses": {
1212
+ "200": {
1213
+ "description": "Recorded.",
1214
+ "content": {
1215
+ "application/json": {
1216
+ "schema": {
1217
+ "type": "object",
1218
+ "required": [
1219
+ "v",
1220
+ "ok"
1221
+ ],
1222
+ "properties": {
1223
+ "v": {
1224
+ "$ref": "#/components/schemas/Version"
1225
+ },
1226
+ "ok": {
1227
+ "const": true
1228
+ }
1229
+ }
1230
+ }
1231
+ }
1232
+ }
1233
+ },
1234
+ "400": {
1235
+ "description": "Malformed, or a provider or source outside the show's.",
1236
+ "content": {
1237
+ "application/json": {
1238
+ "schema": {
1239
+ "type": "object",
1240
+ "additionalProperties": false,
1241
+ "required": [
1242
+ "error"
1243
+ ],
1244
+ "properties": {
1245
+ "error": {
1246
+ "type": "string",
1247
+ "enum": [
1248
+ "accounts_request_invalid",
1249
+ "bad_sources"
1250
+ ]
1251
+ }
1252
+ }
1253
+ }
1254
+ }
1255
+ }
1256
+ },
1257
+ "401": {
1258
+ "$ref": "#/components/responses/Unauthorized"
1259
+ },
1260
+ "405": {
1261
+ "$ref": "#/components/responses/MethodNotAllowed"
1262
+ },
1263
+ "409": {
1264
+ "description": "A removed or deleted subject, or a show that isn't active.",
1265
+ "content": {
1266
+ "application/json": {
1267
+ "schema": {
1268
+ "type": "object",
1269
+ "additionalProperties": false,
1270
+ "required": [
1271
+ "error"
1272
+ ],
1273
+ "properties": {
1274
+ "error": {
1275
+ "type": "string",
1276
+ "enum": [
1277
+ "subject_removed",
1278
+ "subject_suppressed",
1279
+ "show_not_active"
1280
+ ]
1281
+ }
1282
+ }
1283
+ }
1284
+ }
1285
+ }
1286
+ },
1287
+ "503": {
1288
+ "$ref": "#/components/responses/Unavailable"
1289
+ }
1290
+ },
1291
+ "parameters": [
1292
+ {
1293
+ "name": "show",
1294
+ "in": "path",
1295
+ "required": true,
1296
+ "schema": {
1297
+ "$ref": "#/components/schemas/ShowId"
1298
+ }
1299
+ }
1300
+ ]
1301
+ }
1302
+ },
1303
+ "/api/hub/shows/{show}/links": {
1304
+ "post": {
1305
+ "operationId": "hubReportLinkEvent",
1306
+ "description": "Report one `!link` chat event the hub's own reader observed, for TikTok linking. Server to server only. username and user_id must both come from that one reader-observed event; never from a browser field, a display name or another event. The source must be an exact TikTok source of this show. The show must be active, or pending when user_id equals the source's channel_id (a host proving their own channel). event_id is the provider's message ID: a repeat changes nothing. sent_at is the provider's own message timestamp; an event matches a pending binding only if sent_at is after that binding opened, so a buffered message from an earlier holder of the username never matches. On a pending show the hub's reader may observe only these verification events on that exact source, after resolving its handle to channel_id, and only the booked host's account can confirm. The reply never says whether a pending binding matched. The platform keeps nothing from an event that matches no pending binding. Permission: `hub`. Person: the host's ticket (a desk asked), or the show's show_ref (no person present).",
1307
+ "security": [
1308
+ {
1309
+ "GameCredential": []
1310
+ }
1311
+ ],
1312
+ "requestBody": {
1313
+ "required": true,
1314
+ "content": {
1315
+ "application/json": {
1316
+ "schema": {
1317
+ "type": "object",
1318
+ "required": [
1319
+ "game",
1320
+ "v",
1321
+ "source",
1322
+ "event"
1323
+ ],
1324
+ "properties": {
1325
+ "game": {
1326
+ "$ref": "#/components/schemas/Game"
1327
+ },
1328
+ "ticket": {
1329
+ "$ref": "#/components/schemas/Ticket"
1330
+ },
1331
+ "v": {
1332
+ "$ref": "#/components/schemas/Version"
1333
+ },
1334
+ "show_ref": {
1335
+ "$ref": "#/components/schemas/ShowRef"
1336
+ },
1337
+ "source": {
1338
+ "$ref": "#/components/schemas/Source"
1339
+ },
1340
+ "event": {
1341
+ "type": "object",
1342
+ "required": [
1343
+ "provider",
1344
+ "user_id",
1345
+ "username",
1346
+ "event_id",
1347
+ "sent_at"
1348
+ ],
1349
+ "properties": {
1350
+ "provider": {
1351
+ "const": "tiktok"
1352
+ },
1353
+ "user_id": {
1354
+ "type": "string",
1355
+ "pattern": "^[0-9]{1,32}$",
1356
+ "description": "The numeric chat user ID."
1357
+ },
1358
+ "username": {
1359
+ "type": "string",
1360
+ "minLength": 1,
1361
+ "maxLength": 64,
1362
+ "description": "The unique handle on the same event. Not a display name."
1363
+ },
1364
+ "event_id": {
1365
+ "type": "string",
1366
+ "minLength": 1,
1367
+ "maxLength": 128
1368
+ },
1369
+ "sent_at": {
1370
+ "$ref": "#/components/schemas/Timestamp",
1371
+ "description": "The provider's own timestamp for the message, never the time the reader saw it."
1372
+ }
1373
+ }
1374
+ }
1375
+ },
1376
+ "oneOf": [
1377
+ {
1378
+ "required": [
1379
+ "ticket"
1380
+ ],
1381
+ "not": {
1382
+ "required": [
1383
+ "show_ref"
1384
+ ]
1385
+ }
1386
+ },
1387
+ {
1388
+ "required": [
1389
+ "show_ref"
1390
+ ],
1391
+ "not": {
1392
+ "required": [
1393
+ "ticket"
1394
+ ]
1395
+ }
1396
+ }
1397
+ ]
1398
+ }
1399
+ }
1400
+ }
1401
+ },
1402
+ "responses": {
1403
+ "200": {
1404
+ "description": "Received.",
1405
+ "content": {
1406
+ "application/json": {
1407
+ "schema": {
1408
+ "type": "object",
1409
+ "required": [
1410
+ "v",
1411
+ "ok"
1412
+ ],
1413
+ "properties": {
1414
+ "v": {
1415
+ "$ref": "#/components/schemas/Version"
1416
+ },
1417
+ "ok": {
1418
+ "const": true
1419
+ }
1420
+ }
1421
+ }
1422
+ }
1423
+ }
1424
+ },
1425
+ "400": {
1426
+ "description": "Malformed, a source that isn't an exact TikTok source of this show, or an event whose provider timestamp is more than 60 seconds old.",
1427
+ "content": {
1428
+ "application/json": {
1429
+ "schema": {
1430
+ "type": "object",
1431
+ "additionalProperties": false,
1432
+ "required": [
1433
+ "error"
1434
+ ],
1435
+ "properties": {
1436
+ "error": {
1437
+ "type": "string",
1438
+ "enum": [
1439
+ "accounts_request_invalid",
1440
+ "bad_sources",
1441
+ "bad_event"
1442
+ ]
1443
+ }
1444
+ }
1445
+ }
1446
+ }
1447
+ }
1448
+ },
1449
+ "401": {
1450
+ "$ref": "#/components/responses/Unauthorized"
1451
+ },
1452
+ "403": {
1453
+ "description": "A ticket that isn't the show's host's.",
1454
+ "content": {
1455
+ "application/json": {
1456
+ "schema": {
1457
+ "type": "object",
1458
+ "additionalProperties": false,
1459
+ "required": [
1460
+ "error"
1461
+ ],
1462
+ "properties": {
1463
+ "error": {
1464
+ "type": "string",
1465
+ "enum": [
1466
+ "host_not_allowed"
1467
+ ]
1468
+ }
1469
+ }
1470
+ }
1471
+ }
1472
+ }
1473
+ },
1474
+ "405": {
1475
+ "$ref": "#/components/responses/MethodNotAllowed"
1476
+ },
1477
+ "409": {
1478
+ "description": "The show can't take link events, or TikTok linking isn't switched on.",
1479
+ "content": {
1480
+ "application/json": {
1481
+ "schema": {
1482
+ "type": "object",
1483
+ "additionalProperties": false,
1484
+ "required": [
1485
+ "error"
1486
+ ],
1487
+ "properties": {
1488
+ "error": {
1489
+ "type": "string",
1490
+ "enum": [
1491
+ "show_not_active",
1492
+ "linking_off"
1493
+ ]
1494
+ }
1495
+ }
1496
+ }
1497
+ }
1498
+ }
1499
+ },
1500
+ "503": {
1501
+ "$ref": "#/components/responses/Unavailable"
1502
+ }
1503
+ },
1504
+ "parameters": [
1505
+ {
1506
+ "name": "show",
1507
+ "in": "path",
1508
+ "required": true,
1509
+ "schema": {
1510
+ "$ref": "#/components/schemas/ShowId"
1511
+ }
1512
+ }
1513
+ ]
1514
+ }
1515
+ },
1516
+ "/api/hub/player/subjects": {
1517
+ "post": {
1518
+ "operationId": "hubPlayerSubjects",
1519
+ "description": "The chat subjects bound to the signed-in player's account. Only that player's data. Permission: `hub`. Person: that viewer's own sign-in ticket for the hub's client.",
1520
+ "security": [
1521
+ {
1522
+ "GameCredential": []
1523
+ }
1524
+ ],
1525
+ "requestBody": {
1526
+ "required": true,
1527
+ "content": {
1528
+ "application/json": {
1529
+ "schema": {
1530
+ "type": "object",
1531
+ "required": [
1532
+ "game",
1533
+ "ticket",
1534
+ "v"
1535
+ ],
1536
+ "properties": {
1537
+ "game": {
1538
+ "$ref": "#/components/schemas/Game"
1539
+ },
1540
+ "ticket": {
1541
+ "$ref": "#/components/schemas/Ticket"
1542
+ },
1543
+ "v": {
1544
+ "$ref": "#/components/schemas/Version"
1545
+ }
1546
+ }
1547
+ }
1548
+ }
1549
+ }
1550
+ },
1551
+ "responses": {
1552
+ "200": {
1553
+ "description": "The player's linked subjects.",
1554
+ "content": {
1555
+ "application/json": {
1556
+ "schema": {
1557
+ "type": "object",
1558
+ "required": [
1559
+ "v",
1560
+ "subjects"
1561
+ ],
1562
+ "properties": {
1563
+ "v": {
1564
+ "$ref": "#/components/schemas/Version"
1565
+ },
1566
+ "subjects": {
1567
+ "type": "array",
1568
+ "items": {
1569
+ "$ref": "#/components/schemas/Subject"
1570
+ }
1571
+ }
1572
+ }
1573
+ }
1574
+ }
1575
+ }
1576
+ },
1577
+ "400": {
1578
+ "$ref": "#/components/responses/InvalidRequest"
1579
+ },
1580
+ "401": {
1581
+ "$ref": "#/components/responses/Unauthorized"
1582
+ },
1583
+ "405": {
1584
+ "$ref": "#/components/responses/MethodNotAllowed"
1585
+ },
1586
+ "503": {
1587
+ "$ref": "#/components/responses/Unavailable"
1588
+ }
1589
+ }
1590
+ }
1591
+ },
1592
+ "/api/hub/player/credit": {
1593
+ "post": {
1594
+ "operationId": "hubPlayerCredit",
1595
+ "description": "The signed-in player's receipts and platform-computed XP. Only that player's data. Permission: `hub`. Person: that viewer's own sign-in ticket for the hub's client.",
1596
+ "security": [
1597
+ {
1598
+ "GameCredential": []
1599
+ }
1600
+ ],
1601
+ "requestBody": {
1602
+ "required": true,
1603
+ "content": {
1604
+ "application/json": {
1605
+ "schema": {
1606
+ "type": "object",
1607
+ "required": [
1608
+ "game",
1609
+ "ticket",
1610
+ "v"
1611
+ ],
1612
+ "properties": {
1613
+ "game": {
1614
+ "$ref": "#/components/schemas/Game"
1615
+ },
1616
+ "ticket": {
1617
+ "$ref": "#/components/schemas/Ticket"
1618
+ },
1619
+ "v": {
1620
+ "$ref": "#/components/schemas/Version"
1621
+ }
1622
+ }
1623
+ }
1624
+ }
1625
+ }
1626
+ },
1627
+ "responses": {
1628
+ "200": {
1629
+ "description": "The player's credit.",
1630
+ "content": {
1631
+ "application/json": {
1632
+ "schema": {
1633
+ "type": "object",
1634
+ "required": [
1635
+ "v",
1636
+ "xp",
1637
+ "receipts"
1638
+ ],
1639
+ "properties": {
1640
+ "v": {
1641
+ "$ref": "#/components/schemas/Version"
1642
+ },
1643
+ "xp": {
1644
+ "type": "integer",
1645
+ "minimum": 0
1646
+ },
1647
+ "receipts": {
1648
+ "type": "array",
1649
+ "items": {
1650
+ "$ref": "#/components/schemas/Receipt"
1651
+ }
1652
+ }
1653
+ }
1654
+ }
1655
+ }
1656
+ }
1657
+ },
1658
+ "400": {
1659
+ "$ref": "#/components/responses/InvalidRequest"
1660
+ },
1661
+ "401": {
1662
+ "$ref": "#/components/responses/Unauthorized"
1663
+ },
1664
+ "405": {
1665
+ "$ref": "#/components/responses/MethodNotAllowed"
1666
+ },
1667
+ "503": {
1668
+ "$ref": "#/components/responses/Unavailable"
1669
+ }
1670
+ }
1671
+ }
1672
+ },
1673
+ "/api/hub/members": {
1674
+ "post": {
1675
+ "operationId": "hubMembers",
1676
+ "description": "The hub's approved member titles, with their origins, paths and declared facts. The one source for frame-src and message checks. Permission: `hub`. Person: none.",
1677
+ "security": [
1678
+ {
1679
+ "GameCredential": []
1680
+ }
1681
+ ],
1682
+ "requestBody": {
1683
+ "required": true,
1684
+ "content": {
1685
+ "application/json": {
1686
+ "schema": {
1687
+ "type": "object",
1688
+ "required": [
1689
+ "game",
1690
+ "v"
1691
+ ],
1692
+ "properties": {
1693
+ "game": {
1694
+ "$ref": "#/components/schemas/Game"
1695
+ },
1696
+ "v": {
1697
+ "$ref": "#/components/schemas/Version"
1698
+ }
1699
+ }
1700
+ }
1701
+ }
1702
+ }
1703
+ },
1704
+ "responses": {
1705
+ "200": {
1706
+ "description": "Approved members.",
1707
+ "content": {
1708
+ "application/json": {
1709
+ "schema": {
1710
+ "type": "object",
1711
+ "required": [
1712
+ "v",
1713
+ "members"
1714
+ ],
1715
+ "properties": {
1716
+ "v": {
1717
+ "$ref": "#/components/schemas/Version"
1718
+ },
1719
+ "members": {
1720
+ "type": "array",
1721
+ "items": {
1722
+ "$ref": "#/components/schemas/Member"
1723
+ }
1724
+ }
1725
+ }
1726
+ }
1727
+ }
1728
+ }
1729
+ },
1730
+ "400": {
1731
+ "$ref": "#/components/responses/InvalidRequest"
1732
+ },
1733
+ "401": {
1734
+ "$ref": "#/components/responses/Unauthorized"
1735
+ },
1736
+ "405": {
1737
+ "$ref": "#/components/responses/MethodNotAllowed"
1738
+ },
1739
+ "503": {
1740
+ "$ref": "#/components/responses/Unavailable"
1741
+ }
1742
+ }
1743
+ }
1744
+ },
1745
+ "/api/hub/origins": {
1746
+ "post": {
1747
+ "operationId": "hubOrigins",
1748
+ "description": "For each title the caller owns, the registered origins of the hubs approved to launch that title. The one source for frame-ancestors. Framing authority is per title: a hub approved for one title never appears under another. Permission: `hub-launch`. Person: none.",
1749
+ "security": [
1750
+ {
1751
+ "GameCredential": []
1752
+ }
1753
+ ],
1754
+ "requestBody": {
1755
+ "required": true,
1756
+ "content": {
1757
+ "application/json": {
1758
+ "schema": {
1759
+ "type": "object",
1760
+ "required": [
1761
+ "game",
1762
+ "v"
1763
+ ],
1764
+ "properties": {
1765
+ "game": {
1766
+ "$ref": "#/components/schemas/Game"
1767
+ },
1768
+ "v": {
1769
+ "$ref": "#/components/schemas/Version"
1770
+ }
1771
+ }
1772
+ }
1773
+ }
1774
+ }
1775
+ },
1776
+ "responses": {
1777
+ "200": {
1778
+ "description": "Hub origins, per title.",
1779
+ "content": {
1780
+ "application/json": {
1781
+ "schema": {
1782
+ "type": "object",
1783
+ "required": [
1784
+ "v",
1785
+ "titles"
1786
+ ],
1787
+ "properties": {
1788
+ "v": {
1789
+ "$ref": "#/components/schemas/Version"
1790
+ },
1791
+ "titles": {
1792
+ "type": "array",
1793
+ "items": {
1794
+ "type": "object",
1795
+ "required": [
1796
+ "title",
1797
+ "origins"
1798
+ ],
1799
+ "properties": {
1800
+ "title": {
1801
+ "$ref": "#/components/schemas/TitleId"
1802
+ },
1803
+ "origins": {
1804
+ "type": "array",
1805
+ "items": {
1806
+ "$ref": "#/components/schemas/Origin"
1807
+ }
1808
+ }
1809
+ }
1810
+ }
1811
+ }
1812
+ }
1813
+ }
1814
+ }
1815
+ }
1816
+ },
1817
+ "400": {
1818
+ "$ref": "#/components/responses/InvalidRequest"
1819
+ },
1820
+ "401": {
1821
+ "$ref": "#/components/responses/Unauthorized"
1822
+ },
1823
+ "405": {
1824
+ "$ref": "#/components/responses/MethodNotAllowed"
1825
+ },
1826
+ "503": {
1827
+ "$ref": "#/components/responses/Unavailable"
1828
+ }
1829
+ }
1830
+ }
1831
+ },
1832
+ "/api/hub/handoffs/redeem": {
1833
+ "post": {
1834
+ "operationId": "handoffRedeem",
1835
+ "description": "Redeem a launch code. The request carries no v, in every version; the reply's v is the hand-off's pinned version. The same host redeeming the same code again gets the same reply. Permission: `hub-launch`. Person: the show host's sign-in ticket for the member's client.",
1836
+ "security": [
1837
+ {
1838
+ "GameCredential": []
1839
+ }
1840
+ ],
1841
+ "requestBody": {
1842
+ "required": true,
1843
+ "content": {
1844
+ "application/json": {
1845
+ "schema": {
1846
+ "type": "object",
1847
+ "required": [
1848
+ "game",
1849
+ "ticket",
1850
+ "code"
1851
+ ],
1852
+ "properties": {
1853
+ "game": {
1854
+ "$ref": "#/components/schemas/Game"
1855
+ },
1856
+ "ticket": {
1857
+ "$ref": "#/components/schemas/Ticket"
1858
+ },
1859
+ "code": {
1860
+ "type": "string",
1861
+ "minLength": 22,
1862
+ "maxLength": 128
1863
+ }
1864
+ }
1865
+ }
1866
+ }
1867
+ }
1868
+ },
1869
+ "responses": {
1870
+ "200": {
1871
+ "description": "The launch context.",
1872
+ "content": {
1873
+ "application/json": {
1874
+ "schema": {
1875
+ "$ref": "#/components/schemas/LaunchContext"
1876
+ }
1877
+ }
1878
+ }
1879
+ },
1880
+ "400": {
1881
+ "description": "Malformed, or an unknown code.",
1882
+ "content": {
1883
+ "application/json": {
1884
+ "schema": {
1885
+ "type": "object",
1886
+ "additionalProperties": false,
1887
+ "required": [
1888
+ "error"
1889
+ ],
1890
+ "properties": {
1891
+ "error": {
1892
+ "type": "string",
1893
+ "enum": [
1894
+ "accounts_request_invalid",
1895
+ "bad_code"
1896
+ ]
1897
+ }
1898
+ }
1899
+ }
1900
+ }
1901
+ }
1902
+ },
1903
+ "401": {
1904
+ "$ref": "#/components/responses/Unauthorized"
1905
+ },
1906
+ "403": {
1907
+ "description": "The credential's runtime doesn't own the booked title, the ticket isn't the show host's, the host lacks access to the member or the hub now, or the membership or a switch-off refuses.",
1908
+ "content": {
1909
+ "application/json": {
1910
+ "schema": {
1911
+ "type": "object",
1912
+ "additionalProperties": false,
1913
+ "required": [
1914
+ "error"
1915
+ ],
1916
+ "properties": {
1917
+ "error": {
1918
+ "type": "string",
1919
+ "enum": [
1920
+ "wrong_game",
1921
+ "wrong_host",
1922
+ "host_not_allowed",
1923
+ "not_member",
1924
+ "switched_off"
1925
+ ]
1926
+ }
1927
+ }
1928
+ }
1929
+ }
1930
+ }
1931
+ },
1932
+ "405": {
1933
+ "$ref": "#/components/responses/MethodNotAllowed"
1934
+ },
1935
+ "409": {
1936
+ "description": "Closed, or the show isn't active.",
1937
+ "content": {
1938
+ "application/json": {
1939
+ "schema": {
1940
+ "type": "object",
1941
+ "additionalProperties": false,
1942
+ "required": [
1943
+ "error"
1944
+ ],
1945
+ "properties": {
1946
+ "error": {
1947
+ "type": "string",
1948
+ "enum": [
1949
+ "handoff_closed",
1950
+ "show_not_active"
1951
+ ]
1952
+ }
1953
+ }
1954
+ }
1955
+ }
1956
+ }
1957
+ },
1958
+ "410": {
1959
+ "description": "The code expired or a newer one replaced it.",
1960
+ "content": {
1961
+ "application/json": {
1962
+ "schema": {
1963
+ "type": "object",
1964
+ "additionalProperties": false,
1965
+ "required": [
1966
+ "error"
1967
+ ],
1968
+ "properties": {
1969
+ "error": {
1970
+ "type": "string",
1971
+ "enum": [
1972
+ "expired",
1973
+ "superseded"
1974
+ ]
1975
+ }
1976
+ }
1977
+ }
1978
+ }
1979
+ }
1980
+ },
1981
+ "503": {
1982
+ "$ref": "#/components/responses/Unavailable"
1983
+ }
1984
+ }
1985
+ }
1986
+ },
1987
+ "/api/hub/handoffs/{handoff}/context": {
1988
+ "post": {
1989
+ "operationId": "handoffContext",
1990
+ "description": "Read the launch context again, so a lost redeem reply is recoverable. Same checks as redeem. Permission: `hub-launch`. Person: the show host's sign-in ticket for the member's client.",
1991
+ "security": [
1992
+ {
1993
+ "GameCredential": []
1994
+ }
1995
+ ],
1996
+ "requestBody": {
1997
+ "required": true,
1998
+ "content": {
1999
+ "application/json": {
2000
+ "schema": {
2001
+ "type": "object",
2002
+ "required": [
2003
+ "game",
2004
+ "ticket",
2005
+ "v"
2006
+ ],
2007
+ "properties": {
2008
+ "game": {
2009
+ "$ref": "#/components/schemas/Game"
2010
+ },
2011
+ "ticket": {
2012
+ "$ref": "#/components/schemas/Ticket"
2013
+ },
2014
+ "v": {
2015
+ "$ref": "#/components/schemas/Version"
2016
+ }
2017
+ }
2018
+ }
2019
+ }
2020
+ }
2021
+ },
2022
+ "responses": {
2023
+ "200": {
2024
+ "description": "The launch context.",
2025
+ "content": {
2026
+ "application/json": {
2027
+ "schema": {
2028
+ "$ref": "#/components/schemas/LaunchContext"
2029
+ }
2030
+ }
2031
+ }
2032
+ },
2033
+ "400": {
2034
+ "$ref": "#/components/responses/InvalidRequest"
2035
+ },
2036
+ "401": {
2037
+ "$ref": "#/components/responses/Unauthorized"
2038
+ },
2039
+ "403": {
2040
+ "description": "The credential's runtime doesn't own the booked title, the ticket isn't the show host's, the host lacks access to the member or the hub now, or the membership or a switch-off refuses.",
2041
+ "content": {
2042
+ "application/json": {
2043
+ "schema": {
2044
+ "type": "object",
2045
+ "additionalProperties": false,
2046
+ "required": [
2047
+ "error"
2048
+ ],
2049
+ "properties": {
2050
+ "error": {
2051
+ "type": "string",
2052
+ "enum": [
2053
+ "wrong_game",
2054
+ "wrong_host",
2055
+ "host_not_allowed",
2056
+ "not_member",
2057
+ "switched_off"
2058
+ ]
2059
+ }
2060
+ }
2061
+ }
2062
+ }
2063
+ }
2064
+ },
2065
+ "405": {
2066
+ "$ref": "#/components/responses/MethodNotAllowed"
2067
+ },
2068
+ "409": {
2069
+ "description": "Closed, or the show isn't active.",
2070
+ "content": {
2071
+ "application/json": {
2072
+ "schema": {
2073
+ "type": "object",
2074
+ "additionalProperties": false,
2075
+ "required": [
2076
+ "error"
2077
+ ],
2078
+ "properties": {
2079
+ "error": {
2080
+ "type": "string",
2081
+ "enum": [
2082
+ "handoff_closed",
2083
+ "show_not_active"
2084
+ ]
2085
+ }
2086
+ }
2087
+ }
2088
+ }
2089
+ }
2090
+ },
2091
+ "503": {
2092
+ "$ref": "#/components/responses/Unavailable"
2093
+ }
2094
+ },
2095
+ "parameters": [
2096
+ {
2097
+ "name": "handoff",
2098
+ "in": "path",
2099
+ "required": true,
2100
+ "schema": {
2101
+ "$ref": "#/components/schemas/HandoffId"
2102
+ }
2103
+ }
2104
+ ]
2105
+ }
2106
+ },
2107
+ "/api/hub/handoffs/{handoff}/claim": {
2108
+ "post": {
2109
+ "operationId": "handoffClaim",
2110
+ "description": "Claim the hand-off with one room. Rechecks the membership and both switch-offs for every title. The same room repeating gets the first reply with the first board. After the claim the room admits no viewer until it has applied a current sync snapshot. Permission: `hub-launch`. Person: none.",
2111
+ "security": [
2112
+ {
2113
+ "GameCredential": []
2114
+ }
2115
+ ],
2116
+ "requestBody": {
2117
+ "required": true,
2118
+ "content": {
2119
+ "application/json": {
2120
+ "schema": {
2121
+ "type": "object",
2122
+ "required": [
2123
+ "game",
2124
+ "v",
2125
+ "room",
2126
+ "room_id",
2127
+ "board"
2128
+ ],
2129
+ "properties": {
2130
+ "game": {
2131
+ "$ref": "#/components/schemas/Game"
2132
+ },
2133
+ "v": {
2134
+ "$ref": "#/components/schemas/Version"
2135
+ },
2136
+ "room": {
2137
+ "type": "string",
2138
+ "pattern": "^[A-Z0-9]{2,12}$"
2139
+ },
2140
+ "room_id": {
2141
+ "type": "string",
2142
+ "minLength": 1,
2143
+ "maxLength": 128
2144
+ },
2145
+ "board": {
2146
+ "type": "string",
2147
+ "format": "uri"
2148
+ }
2149
+ }
2150
+ }
2151
+ }
2152
+ }
2153
+ },
2154
+ "responses": {
2155
+ "200": {
2156
+ "description": "Claimed.",
2157
+ "content": {
2158
+ "application/json": {
2159
+ "schema": {
2160
+ "type": "object",
2161
+ "required": [
2162
+ "v",
2163
+ "ok",
2164
+ "handoff",
2165
+ "room"
2166
+ ],
2167
+ "properties": {
2168
+ "v": {
2169
+ "$ref": "#/components/schemas/Version"
2170
+ },
2171
+ "ok": {
2172
+ "const": true
2173
+ },
2174
+ "handoff": {
2175
+ "$ref": "#/components/schemas/HandoffId"
2176
+ },
2177
+ "room": {
2178
+ "type": "string"
2179
+ },
2180
+ "board": {
2181
+ "type": "string",
2182
+ "format": "uri"
2183
+ }
2184
+ }
2185
+ }
2186
+ }
2187
+ }
2188
+ },
2189
+ "400": {
2190
+ "description": "Malformed, or a board URL that fails the title's declaration.",
2191
+ "content": {
2192
+ "application/json": {
2193
+ "schema": {
2194
+ "type": "object",
2195
+ "additionalProperties": false,
2196
+ "required": [
2197
+ "error"
2198
+ ],
2199
+ "properties": {
2200
+ "error": {
2201
+ "type": "string",
2202
+ "enum": [
2203
+ "accounts_request_invalid",
2204
+ "bad_board"
2205
+ ]
2206
+ }
2207
+ }
2208
+ }
2209
+ }
2210
+ }
2211
+ },
2212
+ "401": {
2213
+ "$ref": "#/components/responses/Unauthorized"
2214
+ },
2215
+ "403": {
2216
+ "description": "Membership revoked or a switch-off.",
2217
+ "content": {
2218
+ "application/json": {
2219
+ "schema": {
2220
+ "type": "object",
2221
+ "additionalProperties": false,
2222
+ "required": [
2223
+ "error"
2224
+ ],
2225
+ "properties": {
2226
+ "error": {
2227
+ "type": "string",
2228
+ "enum": [
2229
+ "not_member",
2230
+ "switched_off"
2231
+ ]
2232
+ }
2233
+ }
2234
+ }
2235
+ }
2236
+ }
2237
+ },
2238
+ "405": {
2239
+ "$ref": "#/components/responses/MethodNotAllowed"
2240
+ },
2241
+ "409": {
2242
+ "description": "The room is attached elsewhere, another room holds the hand-off, the board changed, or the hand-off or show is closed.",
2243
+ "content": {
2244
+ "application/json": {
2245
+ "schema": {
2246
+ "type": "object",
2247
+ "additionalProperties": false,
2248
+ "required": [
2249
+ "error"
2250
+ ],
2251
+ "properties": {
2252
+ "error": {
2253
+ "type": "string",
2254
+ "enum": [
2255
+ "room_booked",
2256
+ "claimed",
2257
+ "board_differs",
2258
+ "handoff_closed",
2259
+ "show_not_active"
2260
+ ]
2261
+ }
2262
+ }
2263
+ }
2264
+ }
2265
+ }
2266
+ },
2267
+ "503": {
2268
+ "$ref": "#/components/responses/Unavailable"
2269
+ }
2270
+ },
2271
+ "parameters": [
2272
+ {
2273
+ "name": "handoff",
2274
+ "in": "path",
2275
+ "required": true,
2276
+ "schema": {
2277
+ "$ref": "#/components/schemas/HandoffId"
2278
+ }
2279
+ }
2280
+ ]
2281
+ }
2282
+ },
2283
+ "/api/hub/handoffs/{handoff}/sync": {
2284
+ "post": {
2285
+ "operationId": "handoffSync",
2286
+ "description": "Every 5 s from the claim until the result is committed. hidden and removed are full snapshots at blocks_revision; apply one only if its revision is newer. removed is the union of the host's entries and the platform's deletion blocks, which sit outside the 500 host-entry cap. Permission: `hub-launch`. Person: none.",
2287
+ "security": [
2288
+ {
2289
+ "GameCredential": []
2290
+ }
2291
+ ],
2292
+ "requestBody": {
2293
+ "required": true,
2294
+ "content": {
2295
+ "application/json": {
2296
+ "schema": {
2297
+ "type": "object",
2298
+ "required": [
2299
+ "game",
2300
+ "v",
2301
+ "room",
2302
+ "phase"
2303
+ ],
2304
+ "properties": {
2305
+ "game": {
2306
+ "$ref": "#/components/schemas/Game"
2307
+ },
2308
+ "v": {
2309
+ "$ref": "#/components/schemas/Version"
2310
+ },
2311
+ "room": {
2312
+ "type": "string"
2313
+ },
2314
+ "phase": {
2315
+ "type": "string",
2316
+ "maxLength": 32
2317
+ },
2318
+ "last_host_action": {
2319
+ "type": "integer",
2320
+ "description": "ms since epoch"
2321
+ }
2322
+ }
2323
+ }
2324
+ }
2325
+ }
2326
+ },
2327
+ "responses": {
2328
+ "200": {
2329
+ "description": "The current snapshot.",
2330
+ "content": {
2331
+ "application/json": {
2332
+ "schema": {
2333
+ "type": "object",
2334
+ "required": [
2335
+ "v",
2336
+ "blocks_revision",
2337
+ "hidden",
2338
+ "removed",
2339
+ "take_back",
2340
+ "on_air"
2341
+ ],
2342
+ "properties": {
2343
+ "v": {
2344
+ "$ref": "#/components/schemas/Version"
2345
+ },
2346
+ "blocks_revision": {
2347
+ "type": "integer",
2348
+ "minimum": 0
2349
+ },
2350
+ "hidden": {
2351
+ "type": "array",
2352
+ "items": {
2353
+ "$ref": "#/components/schemas/Subject"
2354
+ }
2355
+ },
2356
+ "removed": {
2357
+ "type": "array",
2358
+ "items": {
2359
+ "$ref": "#/components/schemas/Subject"
2360
+ }
2361
+ },
2362
+ "take_back": {
2363
+ "$ref": "#/components/schemas/TakeBack"
2364
+ },
2365
+ "on_air": {
2366
+ "type": "boolean"
2367
+ }
2368
+ }
2369
+ }
2370
+ }
2371
+ }
2372
+ },
2373
+ "400": {
2374
+ "$ref": "#/components/responses/InvalidRequest"
2375
+ },
2376
+ "401": {
2377
+ "$ref": "#/components/responses/Unauthorized"
2378
+ },
2379
+ "405": {
2380
+ "$ref": "#/components/responses/MethodNotAllowed"
2381
+ },
2382
+ "409": {
2383
+ "description": "blocks_incomplete carries retry: true and keeps the room closed to viewers. not_claimer is final.",
2384
+ "content": {
2385
+ "application/json": {
2386
+ "schema": {
2387
+ "oneOf": [
2388
+ {
2389
+ "type": "object",
2390
+ "additionalProperties": false,
2391
+ "required": [
2392
+ "error",
2393
+ "retry"
2394
+ ],
2395
+ "properties": {
2396
+ "error": {
2397
+ "const": "blocks_incomplete"
2398
+ },
2399
+ "retry": {
2400
+ "const": true
2401
+ }
2402
+ }
2403
+ },
2404
+ {
2405
+ "type": "object",
2406
+ "additionalProperties": false,
2407
+ "required": [
2408
+ "error"
2409
+ ],
2410
+ "properties": {
2411
+ "error": {
2412
+ "type": "string",
2413
+ "enum": [
2414
+ "not_claimer"
2415
+ ]
2416
+ }
2417
+ }
2418
+ }
2419
+ ]
2420
+ }
2421
+ }
2422
+ }
2423
+ },
2424
+ "503": {
2425
+ "$ref": "#/components/responses/Unavailable"
2426
+ }
2427
+ },
2428
+ "parameters": [
2429
+ {
2430
+ "name": "handoff",
2431
+ "in": "path",
2432
+ "required": true,
2433
+ "schema": {
2434
+ "$ref": "#/components/schemas/HandoffId"
2435
+ }
2436
+ }
2437
+ ]
2438
+ }
2439
+ },
2440
+ "/api/hub/handoffs/{handoff}/result": {
2441
+ "post": {
2442
+ "operationId": "handoffResult",
2443
+ "description": "Submit the result once, from the durable outbox. The platform keeps a SHA-256 digest of the submitted bytes and its first reply; the same bytes again always get that reply plus repeat: true. Participants on the platform's removed or suppression lists are dropped on acceptance. Permission: `hub-launch`. Person: none.",
2444
+ "security": [
2445
+ {
2446
+ "GameCredential": []
2447
+ }
2448
+ ],
2449
+ "requestBody": {
2450
+ "required": true,
2451
+ "content": {
2452
+ "application/json": {
2453
+ "schema": {
2454
+ "$ref": "#/components/schemas/Result"
2455
+ }
2456
+ }
2457
+ }
2458
+ },
2459
+ "responses": {
2460
+ "200": {
2461
+ "description": "Accepted, or an exact repeat.",
2462
+ "content": {
2463
+ "application/json": {
2464
+ "schema": {
2465
+ "type": "object",
2466
+ "required": [
2467
+ "v",
2468
+ "ok",
2469
+ "handoff"
2470
+ ],
2471
+ "properties": {
2472
+ "v": {
2473
+ "$ref": "#/components/schemas/Version"
2474
+ },
2475
+ "ok": {
2476
+ "const": true
2477
+ },
2478
+ "handoff": {
2479
+ "$ref": "#/components/schemas/HandoffId"
2480
+ },
2481
+ "repeat": {
2482
+ "const": true
2483
+ }
2484
+ }
2485
+ }
2486
+ }
2487
+ }
2488
+ },
2489
+ "400": {
2490
+ "description": "Malformed, or a participant whose provider isn't one of the show's sources.",
2491
+ "content": {
2492
+ "application/json": {
2493
+ "schema": {
2494
+ "type": "object",
2495
+ "additionalProperties": false,
2496
+ "required": [
2497
+ "error"
2498
+ ],
2499
+ "properties": {
2500
+ "error": {
2501
+ "type": "string",
2502
+ "enum": [
2503
+ "accounts_request_invalid",
2504
+ "bad_result"
2505
+ ]
2506
+ }
2507
+ }
2508
+ }
2509
+ }
2510
+ }
2511
+ },
2512
+ "401": {
2513
+ "$ref": "#/components/responses/Unauthorized"
2514
+ },
2515
+ "405": {
2516
+ "$ref": "#/components/responses/MethodNotAllowed"
2517
+ },
2518
+ "409": {
2519
+ "description": "not_on_air carries retry: true. The others are final.",
2520
+ "content": {
2521
+ "application/json": {
2522
+ "schema": {
2523
+ "oneOf": [
2524
+ {
2525
+ "type": "object",
2526
+ "additionalProperties": false,
2527
+ "required": [
2528
+ "error",
2529
+ "retry"
2530
+ ],
2531
+ "properties": {
2532
+ "error": {
2533
+ "const": "not_on_air"
2534
+ },
2535
+ "retry": {
2536
+ "const": true
2537
+ }
2538
+ }
2539
+ },
2540
+ {
2541
+ "type": "object",
2542
+ "additionalProperties": false,
2543
+ "required": [
2544
+ "error"
2545
+ ],
2546
+ "properties": {
2547
+ "error": {
2548
+ "type": "string",
2549
+ "enum": [
2550
+ "result_differs",
2551
+ "closed_unplayed",
2552
+ "not_claimer"
2553
+ ]
2554
+ }
2555
+ }
2556
+ }
2557
+ ]
2558
+ }
2559
+ }
2560
+ }
2561
+ },
2562
+ "410": {
2563
+ "description": "After result_deadline.",
2564
+ "content": {
2565
+ "application/json": {
2566
+ "schema": {
2567
+ "type": "object",
2568
+ "additionalProperties": false,
2569
+ "required": [
2570
+ "error"
2571
+ ],
2572
+ "properties": {
2573
+ "error": {
2574
+ "type": "string",
2575
+ "enum": [
2576
+ "deadline_passed"
2577
+ ]
2578
+ }
2579
+ }
2580
+ }
2581
+ }
2582
+ }
2583
+ },
2584
+ "503": {
2585
+ "$ref": "#/components/responses/Unavailable"
2586
+ }
2587
+ },
2588
+ "parameters": [
2589
+ {
2590
+ "name": "handoff",
2591
+ "in": "path",
2592
+ "required": true,
2593
+ "schema": {
2594
+ "$ref": "#/components/schemas/HandoffId"
2595
+ }
2596
+ }
2597
+ ]
2598
+ }
2599
+ }
2600
+ },
2601
+ "components": {
2602
+ "securitySchemes": {
2603
+ "GameCredential": {
2604
+ "type": "http",
2605
+ "scheme": "bearer",
2606
+ "bearerFormat": "fgc_<base64url>",
2607
+ "description": "The existing per-game service credential (#78). Opaque, not a JWT. Needs the `hub` or `hub-launch` permission named on each operation. Server to server only; never in a browser."
2608
+ }
2609
+ },
2610
+ "schemas": {
2611
+ "Game": {
2612
+ "type": "string",
2613
+ "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
2614
+ "description": "The caller's own game ID. Must be the credential's game."
2615
+ },
2616
+ "Version": {
2617
+ "type": "integer",
2618
+ "const": 1,
2619
+ "description": "The hub/1 contract version."
2620
+ },
2621
+ "Ticket": {
2622
+ "type": "string",
2623
+ "minLength": 1,
2624
+ "maxLength": 512,
2625
+ "description": "The acting person's sign-in ticket for the calling runtime's own client. Opaque; never an accounts token."
2626
+ },
2627
+ "ShowRef": {
2628
+ "type": "string",
2629
+ "pattern": "^sr_[A-Za-z0-9_-]{16,128}$",
2630
+ "description": "Opaque reference for a job with no person present. Bound to one show and to four operations: read the show, read its hand-offs, add its receipts, report its link events. Stored by the platform only as a hash. A job gets it when it is queued."
2631
+ },
2632
+ "RoomRequestId": {
2633
+ "type": "string",
2634
+ "format": "uuid",
2635
+ "description": "The UUID the platform issued for this show's or hand-off's one room claim. Used as roomRequestId on the existing sign-in ticket room call. The platform has it recorded against the show or hand-off, and checks that binding before it charges quota."
2636
+ },
2637
+ "ShowId": {
2638
+ "type": "string",
2639
+ "pattern": "^sh_[A-Za-z0-9_-]{8,64}$"
2640
+ },
2641
+ "HandoffId": {
2642
+ "type": "string",
2643
+ "pattern": "^ho_[A-Za-z0-9_-]{8,64}$"
2644
+ },
2645
+ "TitleId": {
2646
+ "type": "string",
2647
+ "pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
2648
+ },
2649
+ "IdempotencyKey": {
2650
+ "type": "string",
2651
+ "minLength": 8,
2652
+ "maxLength": 128
2653
+ },
2654
+ "Provider": {
2655
+ "type": "string",
2656
+ "enum": [
2657
+ "twitch",
2658
+ "youtube",
2659
+ "tiktok",
2660
+ "discord",
2661
+ "substack"
2662
+ ]
2663
+ },
2664
+ "Lang": {
2665
+ "type": "string",
2666
+ "enum": [
2667
+ "en",
2668
+ "es-419",
2669
+ "pt-BR",
2670
+ "id"
2671
+ ]
2672
+ },
2673
+ "Screen": {
2674
+ "type": "string",
2675
+ "enum": [
2676
+ "wide",
2677
+ "tall"
2678
+ ]
2679
+ },
2680
+ "Timestamp": {
2681
+ "type": "string",
2682
+ "format": "date-time"
2683
+ },
2684
+ "Origin": {
2685
+ "type": "string",
2686
+ "format": "uri",
2687
+ "description": "An https origin with no path, query, fragment or userinfo."
2688
+ },
2689
+ "Subject": {
2690
+ "type": "object",
2691
+ "required": [
2692
+ "provider",
2693
+ "user_id"
2694
+ ],
2695
+ "properties": {
2696
+ "provider": {
2697
+ "$ref": "#/components/schemas/Provider"
2698
+ },
2699
+ "user_id": {
2700
+ "type": "string",
2701
+ "minLength": 1,
2702
+ "maxLength": 64
2703
+ }
2704
+ },
2705
+ "description": "A chat subject: the provider's stable user ID, never a display name."
2706
+ },
2707
+ "Source": {
2708
+ "type": "object",
2709
+ "required": [
2710
+ "provider",
2711
+ "channel_id",
2712
+ "channel"
2713
+ ],
2714
+ "properties": {
2715
+ "provider": {
2716
+ "$ref": "#/components/schemas/Provider"
2717
+ },
2718
+ "channel_id": {
2719
+ "type": "string",
2720
+ "minLength": 1,
2721
+ "maxLength": 64,
2722
+ "description": "The provider's stable broadcaster ID. Verified against the host's provider binding."
2723
+ },
2724
+ "channel": {
2725
+ "type": "string",
2726
+ "maxLength": 128,
2727
+ "description": "The handle a reader takes. Every reader resolves it to channel_id before reading."
2728
+ }
2729
+ }
2730
+ },
2731
+ "Cam": {
2732
+ "type": "array",
2733
+ "minItems": 4,
2734
+ "maxItems": 4,
2735
+ "items": {
2736
+ "type": "integer",
2737
+ "minimum": 0
2738
+ },
2739
+ "description": "x, y, w, h in the screen profile's design units."
2740
+ },
2741
+ "TakeBack": {
2742
+ "enum": [
2743
+ null,
2744
+ "after-round",
2745
+ "now"
2746
+ ]
2747
+ },
2748
+ "Receipt": {
2749
+ "type": "object",
2750
+ "required": [
2751
+ "show",
2752
+ "game",
2753
+ "subject",
2754
+ "source",
2755
+ "kind"
2756
+ ],
2757
+ "properties": {
2758
+ "show": {
2759
+ "$ref": "#/components/schemas/ShowId"
2760
+ },
2761
+ "handoff": {
2762
+ "anyOf": [
2763
+ {
2764
+ "$ref": "#/components/schemas/HandoffId"
2765
+ },
2766
+ {
2767
+ "type": "null"
2768
+ }
2769
+ ]
2770
+ },
2771
+ "game": {
2772
+ "$ref": "#/components/schemas/Game"
2773
+ },
2774
+ "subject": {
2775
+ "$ref": "#/components/schemas/Subject"
2776
+ },
2777
+ "source": {
2778
+ "$ref": "#/components/schemas/Source"
2779
+ },
2780
+ "kind": {
2781
+ "type": "string",
2782
+ "enum": [
2783
+ "attended",
2784
+ "placed"
2785
+ ]
2786
+ },
2787
+ "place": {
2788
+ "type": [
2789
+ "integer",
2790
+ "null"
2791
+ ],
2792
+ "minimum": 1
2793
+ }
2794
+ }
2795
+ },
2796
+ "Participant": {
2797
+ "type": "object",
2798
+ "required": [
2799
+ "provider",
2800
+ "user_id"
2801
+ ],
2802
+ "properties": {
2803
+ "provider": {
2804
+ "$ref": "#/components/schemas/Provider"
2805
+ },
2806
+ "user_id": {
2807
+ "type": "string",
2808
+ "minLength": 1,
2809
+ "maxLength": 64
2810
+ },
2811
+ "place": {
2812
+ "type": [
2813
+ "integer",
2814
+ "null"
2815
+ ],
2816
+ "minimum": 1
2817
+ },
2818
+ "score": {
2819
+ "type": "number"
2820
+ },
2821
+ "rounds_played": {
2822
+ "type": "integer",
2823
+ "minimum": 0
2824
+ },
2825
+ "hidden": {
2826
+ "type": "boolean"
2827
+ }
2828
+ }
2829
+ },
2830
+ "Moment": {
2831
+ "type": "object",
2832
+ "required": [
2833
+ "kind",
2834
+ "subject"
2835
+ ],
2836
+ "properties": {
2837
+ "kind": {
2838
+ "type": "string",
2839
+ "description": "leader, comeback, group or streamer-fooled. An unknown kind drops the moment, not the result."
2840
+ },
2841
+ "subject": {
2842
+ "$ref": "#/components/schemas/Subject"
2843
+ }
2844
+ }
2845
+ },
2846
+ "Result": {
2847
+ "type": "object",
2848
+ "required": [
2849
+ "v",
2850
+ "handoff",
2851
+ "game",
2852
+ "room",
2853
+ "blocks_revision",
2854
+ "started_at",
2855
+ "ended_at",
2856
+ "ending",
2857
+ "rounds",
2858
+ "participants",
2859
+ "unidentified"
2860
+ ],
2861
+ "properties": {
2862
+ "v": {
2863
+ "$ref": "#/components/schemas/Version"
2864
+ },
2865
+ "handoff": {
2866
+ "$ref": "#/components/schemas/HandoffId"
2867
+ },
2868
+ "game": {
2869
+ "$ref": "#/components/schemas/Game"
2870
+ },
2871
+ "room": {
2872
+ "type": "string",
2873
+ "pattern": "^[A-Z0-9]{2,12}$"
2874
+ },
2875
+ "blocks_revision": {
2876
+ "type": "integer",
2877
+ "minimum": 0
2878
+ },
2879
+ "started_at": {
2880
+ "$ref": "#/components/schemas/Timestamp"
2881
+ },
2882
+ "ended_at": {
2883
+ "$ref": "#/components/schemas/Timestamp"
2884
+ },
2885
+ "ending": {
2886
+ "type": "string",
2887
+ "enum": [
2888
+ "complete",
2889
+ "ended-early",
2890
+ "interrupted"
2891
+ ]
2892
+ },
2893
+ "rounds": {
2894
+ "type": "object",
2895
+ "required": [
2896
+ "planned",
2897
+ "played"
2898
+ ],
2899
+ "properties": {
2900
+ "planned": {
2901
+ "type": "integer",
2902
+ "minimum": 0
2903
+ },
2904
+ "played": {
2905
+ "type": "integer",
2906
+ "minimum": 0
2907
+ }
2908
+ }
2909
+ },
2910
+ "participants": {
2911
+ "type": "array",
2912
+ "maxItems": 300,
2913
+ "items": {
2914
+ "$ref": "#/components/schemas/Participant"
2915
+ }
2916
+ },
2917
+ "unidentified": {
2918
+ "type": "integer",
2919
+ "minimum": 0
2920
+ },
2921
+ "moment": {
2922
+ "$ref": "#/components/schemas/Moment"
2923
+ }
2924
+ },
2925
+ "description": "No names, free text or URLs. Unknown fields are ignored and not stored."
2926
+ },
2927
+ "CleanResult": {
2928
+ "type": "object",
2929
+ "required": [
2930
+ "handoff",
2931
+ "ending",
2932
+ "rounds",
2933
+ "participants",
2934
+ "unidentified"
2935
+ ],
2936
+ "properties": {
2937
+ "handoff": {
2938
+ "$ref": "#/components/schemas/HandoffId"
2939
+ },
2940
+ "room": {
2941
+ "type": "string",
2942
+ "pattern": "^[A-Z0-9]{2,12}$"
2943
+ },
2944
+ "started_at": {
2945
+ "$ref": "#/components/schemas/Timestamp"
2946
+ },
2947
+ "ended_at": {
2948
+ "$ref": "#/components/schemas/Timestamp"
2949
+ },
2950
+ "ending": {
2951
+ "type": "string",
2952
+ "enum": [
2953
+ "complete",
2954
+ "ended-early",
2955
+ "interrupted"
2956
+ ]
2957
+ },
2958
+ "rounds": {
2959
+ "type": "object",
2960
+ "required": [
2961
+ "planned",
2962
+ "played"
2963
+ ],
2964
+ "properties": {
2965
+ "planned": {
2966
+ "type": "integer",
2967
+ "minimum": 0
2968
+ },
2969
+ "played": {
2970
+ "type": "integer",
2971
+ "minimum": 0
2972
+ }
2973
+ }
2974
+ },
2975
+ "participants": {
2976
+ "type": "array",
2977
+ "maxItems": 300,
2978
+ "items": {
2979
+ "$ref": "#/components/schemas/Participant"
2980
+ }
2981
+ },
2982
+ "unidentified": {
2983
+ "type": "integer",
2984
+ "minimum": 0
2985
+ },
2986
+ "moment": {
2987
+ "$ref": "#/components/schemas/Moment"
2988
+ }
2989
+ },
2990
+ "description": "The accepted result as every read returns it: without removed, deleted or suppressed subjects, and with moment cleared if it names one."
2991
+ },
2992
+ "HandoffState": {
2993
+ "type": "object",
2994
+ "required": [
2995
+ "v",
2996
+ "handoff",
2997
+ "show",
2998
+ "title",
2999
+ "state",
3000
+ "closed",
3001
+ "on_air",
3002
+ "first_on_air_at",
3003
+ "result_deadline",
3004
+ "etag"
3005
+ ],
3006
+ "properties": {
3007
+ "v": {
3008
+ "$ref": "#/components/schemas/Version"
3009
+ },
3010
+ "handoff": {
3011
+ "$ref": "#/components/schemas/HandoffId"
3012
+ },
3013
+ "show": {
3014
+ "$ref": "#/components/schemas/ShowId"
3015
+ },
3016
+ "title": {
3017
+ "$ref": "#/components/schemas/TitleId"
3018
+ },
3019
+ "state": {
3020
+ "type": "string",
3021
+ "enum": [
3022
+ "booked",
3023
+ "claimed",
3024
+ "returned",
3025
+ "closed-unplayed",
3026
+ "expired"
3027
+ ]
3028
+ },
3029
+ "closed": {
3030
+ "enum": [
3031
+ null,
3032
+ "played",
3033
+ "unplayed"
3034
+ ]
3035
+ },
3036
+ "on_air": {
3037
+ "type": "boolean"
3038
+ },
3039
+ "first_on_air_at": {
3040
+ "anyOf": [
3041
+ {
3042
+ "$ref": "#/components/schemas/Timestamp"
3043
+ },
3044
+ {
3045
+ "type": "null"
3046
+ }
3047
+ ]
3048
+ },
3049
+ "result_deadline": {
3050
+ "$ref": "#/components/schemas/Timestamp"
3051
+ },
3052
+ "room": {
3053
+ "type": "string"
3054
+ },
3055
+ "room_id": {
3056
+ "type": "string"
3057
+ },
3058
+ "board": {
3059
+ "type": "string",
3060
+ "format": "uri"
3061
+ },
3062
+ "phase": {
3063
+ "type": "string",
3064
+ "maxLength": 32
3065
+ },
3066
+ "last_host_action": {
3067
+ "type": "integer",
3068
+ "description": "ms since epoch"
3069
+ },
3070
+ "result": {
3071
+ "$ref": "#/components/schemas/CleanResult"
3072
+ },
3073
+ "etag": {
3074
+ "type": "string"
3075
+ }
3076
+ }
3077
+ },
3078
+ "ShowState": {
3079
+ "type": "object",
3080
+ "required": [
3081
+ "v",
3082
+ "show",
3083
+ "state",
3084
+ "started_at",
3085
+ "expires_at",
3086
+ "origin",
3087
+ "sources",
3088
+ "lang",
3089
+ "screen",
3090
+ "blocks_revision",
3091
+ "handoffs",
3092
+ "receipts",
3093
+ "etag"
3094
+ ],
3095
+ "properties": {
3096
+ "v": {
3097
+ "$ref": "#/components/schemas/Version"
3098
+ },
3099
+ "show": {
3100
+ "$ref": "#/components/schemas/ShowId"
3101
+ },
3102
+ "state": {
3103
+ "type": "string",
3104
+ "enum": [
3105
+ "pending",
3106
+ "active",
3107
+ "ended",
3108
+ "closed"
3109
+ ]
3110
+ },
3111
+ "started_at": {
3112
+ "$ref": "#/components/schemas/Timestamp"
3113
+ },
3114
+ "expires_at": {
3115
+ "$ref": "#/components/schemas/Timestamp"
3116
+ },
3117
+ "ended_at": {
3118
+ "$ref": "#/components/schemas/Timestamp"
3119
+ },
3120
+ "origin": {
3121
+ "$ref": "#/components/schemas/Origin"
3122
+ },
3123
+ "sources": {
3124
+ "type": "array",
3125
+ "minItems": 1,
3126
+ "items": {
3127
+ "$ref": "#/components/schemas/Source"
3128
+ }
3129
+ },
3130
+ "lang": {
3131
+ "$ref": "#/components/schemas/Lang"
3132
+ },
3133
+ "screen": {
3134
+ "$ref": "#/components/schemas/Screen"
3135
+ },
3136
+ "blocks_revision": {
3137
+ "type": "integer",
3138
+ "minimum": 0
3139
+ },
3140
+ "handoffs": {
3141
+ "type": "array",
3142
+ "items": {
3143
+ "$ref": "#/components/schemas/HandoffState"
3144
+ }
3145
+ },
3146
+ "receipts": {
3147
+ "type": "array",
3148
+ "items": {
3149
+ "$ref": "#/components/schemas/Receipt"
3150
+ }
3151
+ },
3152
+ "etag": {
3153
+ "type": "string"
3154
+ }
3155
+ },
3156
+ "description": "Recap data only. Never says who is linked."
3157
+ },
3158
+ "NotModified": {
3159
+ "type": "object",
3160
+ "required": [
3161
+ "v",
3162
+ "not_modified",
3163
+ "etag"
3164
+ ],
3165
+ "properties": {
3166
+ "v": {
3167
+ "$ref": "#/components/schemas/Version"
3168
+ },
3169
+ "not_modified": {
3170
+ "const": true
3171
+ },
3172
+ "etag": {
3173
+ "type": "string"
3174
+ }
3175
+ }
3176
+ },
3177
+ "LaunchContext": {
3178
+ "type": "object",
3179
+ "required": [
3180
+ "v",
3181
+ "handoff",
3182
+ "show",
3183
+ "game",
3184
+ "title",
3185
+ "hub",
3186
+ "sources",
3187
+ "lang",
3188
+ "screen",
3189
+ "minutes",
3190
+ "show_started_at",
3191
+ "started_at",
3192
+ "max_ms",
3193
+ "result_deadline",
3194
+ "room_request_id",
3195
+ "return"
3196
+ ],
3197
+ "properties": {
3198
+ "room_request_id": {
3199
+ "$ref": "#/components/schemas/RoomRequestId"
3200
+ },
3201
+ "v": {
3202
+ "$ref": "#/components/schemas/Version"
3203
+ },
3204
+ "handoff": {
3205
+ "$ref": "#/components/schemas/HandoffId"
3206
+ },
3207
+ "show": {
3208
+ "$ref": "#/components/schemas/ShowId"
3209
+ },
3210
+ "game": {
3211
+ "$ref": "#/components/schemas/Game"
3212
+ },
3213
+ "title": {
3214
+ "$ref": "#/components/schemas/TitleId"
3215
+ },
3216
+ "hub": {
3217
+ "type": "object",
3218
+ "required": [
3219
+ "id",
3220
+ "origin"
3221
+ ],
3222
+ "properties": {
3223
+ "id": {
3224
+ "$ref": "#/components/schemas/Game"
3225
+ },
3226
+ "origin": {
3227
+ "$ref": "#/components/schemas/Origin"
3228
+ }
3229
+ }
3230
+ },
3231
+ "sources": {
3232
+ "type": "array",
3233
+ "minItems": 1,
3234
+ "items": {
3235
+ "$ref": "#/components/schemas/Source"
3236
+ }
3237
+ },
3238
+ "lang": {
3239
+ "$ref": "#/components/schemas/Lang"
3240
+ },
3241
+ "screen": {
3242
+ "$ref": "#/components/schemas/Screen"
3243
+ },
3244
+ "cam": {
3245
+ "$ref": "#/components/schemas/Cam"
3246
+ },
3247
+ "minutes": {
3248
+ "type": "integer",
3249
+ "minimum": 1
3250
+ },
3251
+ "show_started_at": {
3252
+ "$ref": "#/components/schemas/Timestamp"
3253
+ },
3254
+ "started_at": {
3255
+ "$ref": "#/components/schemas/Timestamp"
3256
+ },
3257
+ "max_ms": {
3258
+ "type": "integer",
3259
+ "minimum": 1
3260
+ },
3261
+ "result_deadline": {
3262
+ "$ref": "#/components/schemas/Timestamp"
3263
+ },
3264
+ "return": {
3265
+ "type": "object",
3266
+ "required": [
3267
+ "url"
3268
+ ],
3269
+ "properties": {
3270
+ "url": {
3271
+ "type": "string",
3272
+ "format": "uri"
3273
+ }
3274
+ }
3275
+ }
3276
+ },
3277
+ "description": "The only source of these facts. Carries no host identity, viewer data or credential. v is the hand-off's pinned version."
3278
+ },
3279
+ "LaunchCode": {
3280
+ "type": "object",
3281
+ "required": [
3282
+ "v",
3283
+ "handoff",
3284
+ "launch_url",
3285
+ "code_expires_at"
3286
+ ],
3287
+ "properties": {
3288
+ "v": {
3289
+ "$ref": "#/components/schemas/Version"
3290
+ },
3291
+ "handoff": {
3292
+ "$ref": "#/components/schemas/HandoffId"
3293
+ },
3294
+ "launch_url": {
3295
+ "type": "string",
3296
+ "format": "uri",
3297
+ "description": "The code rides in the URL fragment."
3298
+ },
3299
+ "code_expires_at": {
3300
+ "$ref": "#/components/schemas/Timestamp"
3301
+ },
3302
+ "max_ms": {
3303
+ "type": "integer",
3304
+ "minimum": 1
3305
+ }
3306
+ }
3307
+ },
3308
+ "Member": {
3309
+ "type": "object",
3310
+ "required": [
3311
+ "title",
3312
+ "origin",
3313
+ "panel",
3314
+ "board",
3315
+ "screens",
3316
+ "providers",
3317
+ "sources",
3318
+ "langs",
3319
+ "minutes"
3320
+ ],
3321
+ "properties": {
3322
+ "title": {
3323
+ "$ref": "#/components/schemas/TitleId"
3324
+ },
3325
+ "origin": {
3326
+ "$ref": "#/components/schemas/Origin"
3327
+ },
3328
+ "panel": {
3329
+ "type": "string"
3330
+ },
3331
+ "board": {
3332
+ "type": "string"
3333
+ },
3334
+ "board_room_param": {
3335
+ "type": "string"
3336
+ },
3337
+ "screens": {
3338
+ "type": "array",
3339
+ "items": {
3340
+ "$ref": "#/components/schemas/Screen"
3341
+ }
3342
+ },
3343
+ "cam": {
3344
+ "type": "string"
3345
+ },
3346
+ "providers": {
3347
+ "type": "array",
3348
+ "items": {
3349
+ "$ref": "#/components/schemas/Provider"
3350
+ }
3351
+ },
3352
+ "sources": {
3353
+ "type": "integer",
3354
+ "minimum": 1
3355
+ },
3356
+ "langs": {
3357
+ "type": "array",
3358
+ "items": {
3359
+ "$ref": "#/components/schemas/Lang"
3360
+ }
3361
+ },
3362
+ "minutes": {
3363
+ "type": "array",
3364
+ "minItems": 2,
3365
+ "maxItems": 2,
3366
+ "items": {
3367
+ "type": "integer",
3368
+ "minimum": 1
3369
+ }
3370
+ }
3371
+ }
3372
+ }
3373
+ },
3374
+ "responses": {
3375
+ "InvalidRequest": {
3376
+ "description": "Existing request validation: not JSON, a query parameter or a browser Origin.",
3377
+ "content": {
3378
+ "application/json": {
3379
+ "schema": {
3380
+ "type": "object",
3381
+ "additionalProperties": false,
3382
+ "required": [
3383
+ "error"
3384
+ ],
3385
+ "properties": {
3386
+ "error": {
3387
+ "const": "accounts_request_invalid"
3388
+ }
3389
+ }
3390
+ }
3391
+ }
3392
+ }
3393
+ },
3394
+ "Unauthorized": {
3395
+ "description": "Missing or invalid game credential, a credential without the needed permission, a wrong game or environment, or a missing, ended or mismatched sign-in ticket or show_ref. Nothing about the target is disclosed.",
3396
+ "content": {
3397
+ "application/json": {
3398
+ "schema": {
3399
+ "type": "object",
3400
+ "additionalProperties": false,
3401
+ "required": [
3402
+ "error"
3403
+ ],
3404
+ "properties": {
3405
+ "error": {
3406
+ "const": "authorization_required"
3407
+ }
3408
+ }
3409
+ }
3410
+ }
3411
+ }
3412
+ },
3413
+ "MethodNotAllowed": {
3414
+ "description": "Only POST is supported.",
3415
+ "content": {
3416
+ "application/json": {
3417
+ "schema": {
3418
+ "type": "object",
3419
+ "additionalProperties": false,
3420
+ "required": [
3421
+ "error"
3422
+ ],
3423
+ "properties": {
3424
+ "error": {
3425
+ "const": "method_not_allowed"
3426
+ }
3427
+ }
3428
+ }
3429
+ }
3430
+ }
3431
+ },
3432
+ "Unavailable": {
3433
+ "description": "The platform is unavailable. Outage grace applies to eligible live rooms; nothing new is booked.",
3434
+ "content": {
3435
+ "application/json": {
3436
+ "schema": {
3437
+ "type": "object",
3438
+ "additionalProperties": false,
3439
+ "required": [
3440
+ "error"
3441
+ ],
3442
+ "properties": {
3443
+ "error": {
3444
+ "const": "account_unavailable"
3445
+ }
3446
+ }
3447
+ }
3448
+ }
3449
+ }
3450
+ }
3451
+ }
3452
+ }
3453
+ }