@emulates/daily 2.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.
package/openapi.yaml ADDED
@@ -0,0 +1,737 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: Daily.co REST API (Emulates subset)
4
+ description: |
5
+ Stateful mock subset of the Daily.co REST API: rooms (create, get, update, delete, presence,
6
+ eject) and meeting tokens (create, validate). Trimmed from Daily's documented API to the
7
+ calls our backend and EMR make; request schemas follow the fields our consumers send
8
+ (daily-video.schemas.ts strict zod schemas, EMR RoomConfig / TokenConfig).
9
+ version: "1"
10
+ x-emulates-upstream:
11
+ note: >-
12
+ Hand-authored from docs.daily.co/reference/rest-api and our consumers
13
+ (apps/backend daily-video.service.ts + schemas, the consumer app's daily-service.ts).
14
+ servers:
15
+ - url: https://api.daily.co
16
+ security:
17
+ - bearerAuth: []
18
+ paths:
19
+ /v1/rooms:
20
+ get:
21
+ operationId: ListRooms
22
+ x-emulates:
23
+ supported: true
24
+ parity:
25
+ enabled: true
26
+ safe: true
27
+ parameters:
28
+ - name: limit
29
+ in: query
30
+ schema:
31
+ type: integer
32
+ minimum: 1
33
+ - name: ending_before
34
+ in: query
35
+ schema:
36
+ type: string
37
+ - name: starting_after
38
+ in: query
39
+ schema:
40
+ type: string
41
+ responses:
42
+ "200":
43
+ description: Rooms in reverse creation order, with the account total
44
+ content:
45
+ application/json:
46
+ schema:
47
+ type: object
48
+ required: [total_count, data]
49
+ properties:
50
+ total_count:
51
+ type: integer
52
+ data:
53
+ type: array
54
+ items:
55
+ $ref: "#/components/schemas/Room"
56
+ "400":
57
+ $ref: "#/components/responses/InvalidRequest"
58
+ "401":
59
+ $ref: "#/components/responses/Unauthorized"
60
+ "429":
61
+ $ref: "#/components/responses/RateLimited"
62
+ "500":
63
+ $ref: "#/components/responses/ServerError"
64
+ post:
65
+ operationId: CreateRoom
66
+ x-emulates:
67
+ supported: true
68
+ parity:
69
+ enabled: true
70
+ safe: false
71
+ requestBody:
72
+ required: true
73
+ content:
74
+ application/json:
75
+ schema:
76
+ $ref: "#/components/schemas/CreateRoomBody"
77
+ responses:
78
+ "200":
79
+ description: The created room
80
+ content:
81
+ application/json:
82
+ schema:
83
+ $ref: "#/components/schemas/Room"
84
+ "400":
85
+ $ref: "#/components/responses/InvalidRequest"
86
+ "401":
87
+ $ref: "#/components/responses/Unauthorized"
88
+ "429":
89
+ $ref: "#/components/responses/RateLimited"
90
+ "500":
91
+ $ref: "#/components/responses/ServerError"
92
+ /v1/rooms/{name}:
93
+ parameters:
94
+ - $ref: "#/components/parameters/RoomName"
95
+ get:
96
+ operationId: GetRoom
97
+ x-emulates:
98
+ supported: true
99
+ parity:
100
+ enabled: true
101
+ safe: true
102
+ responses:
103
+ "200":
104
+ description: The room
105
+ content:
106
+ application/json:
107
+ schema:
108
+ $ref: "#/components/schemas/Room"
109
+ "401":
110
+ $ref: "#/components/responses/Unauthorized"
111
+ "404":
112
+ $ref: "#/components/responses/NotFound"
113
+ "429":
114
+ $ref: "#/components/responses/RateLimited"
115
+ "500":
116
+ $ref: "#/components/responses/ServerError"
117
+ post:
118
+ operationId: UpdateRoom
119
+ x-emulates:
120
+ supported: true
121
+ parity:
122
+ enabled: true
123
+ safe: false
124
+ requestBody:
125
+ required: true
126
+ content:
127
+ application/json:
128
+ schema:
129
+ $ref: "#/components/schemas/UpdateRoomBody"
130
+ responses:
131
+ "200":
132
+ description: The updated room
133
+ content:
134
+ application/json:
135
+ schema:
136
+ $ref: "#/components/schemas/Room"
137
+ "400":
138
+ $ref: "#/components/responses/InvalidRequest"
139
+ "401":
140
+ $ref: "#/components/responses/Unauthorized"
141
+ "404":
142
+ $ref: "#/components/responses/NotFound"
143
+ "429":
144
+ $ref: "#/components/responses/RateLimited"
145
+ "500":
146
+ $ref: "#/components/responses/ServerError"
147
+ delete:
148
+ operationId: DeleteRoom
149
+ x-emulates:
150
+ supported: true
151
+ parity:
152
+ enabled: true
153
+ safe: false
154
+ responses:
155
+ "200":
156
+ description: Deleted
157
+ content:
158
+ application/json:
159
+ schema:
160
+ type: object
161
+ required: [deleted, name]
162
+ properties:
163
+ deleted:
164
+ type: boolean
165
+ name:
166
+ type: string
167
+ "401":
168
+ $ref: "#/components/responses/Unauthorized"
169
+ "404":
170
+ $ref: "#/components/responses/NotFound"
171
+ "429":
172
+ $ref: "#/components/responses/RateLimited"
173
+ "500":
174
+ $ref: "#/components/responses/ServerError"
175
+ /v1/rooms/{name}/presence:
176
+ parameters:
177
+ - $ref: "#/components/parameters/RoomName"
178
+ get:
179
+ operationId: GetRoomPresence
180
+ x-emulates:
181
+ supported: true
182
+ parity:
183
+ enabled: true
184
+ safe: true
185
+ responses:
186
+ "200":
187
+ description: Participants currently in the room
188
+ content:
189
+ application/json:
190
+ schema:
191
+ type: object
192
+ additionalProperties: false
193
+ required: [total_count, data]
194
+ properties:
195
+ total_count:
196
+ type: integer
197
+ data:
198
+ type: array
199
+ items:
200
+ $ref: "#/components/schemas/PresenceParticipant"
201
+ "401":
202
+ $ref: "#/components/responses/Unauthorized"
203
+ "404":
204
+ $ref: "#/components/responses/NotFound"
205
+ "429":
206
+ $ref: "#/components/responses/RateLimited"
207
+ "500":
208
+ $ref: "#/components/responses/ServerError"
209
+ /v1/rooms/{name}/eject:
210
+ parameters:
211
+ - $ref: "#/components/parameters/RoomName"
212
+ post:
213
+ operationId: EjectParticipants
214
+ x-emulates:
215
+ supported: true
216
+ parity:
217
+ enabled: true
218
+ safe: false
219
+ requestBody:
220
+ required: true
221
+ content:
222
+ application/json:
223
+ schema:
224
+ type: object
225
+ additionalProperties: false
226
+ properties:
227
+ ids:
228
+ type: array
229
+ maxItems: 10
230
+ items:
231
+ type: string
232
+ maxLength: 64
233
+ user_ids:
234
+ type: array
235
+ maxItems: 10
236
+ items:
237
+ type: string
238
+ maxLength: 36
239
+ responses:
240
+ "200":
241
+ description: Session ids of the ejected participants
242
+ content:
243
+ application/json:
244
+ schema:
245
+ type: object
246
+ additionalProperties: false
247
+ required: [ejectedIds]
248
+ properties:
249
+ ejectedIds:
250
+ type: array
251
+ items:
252
+ type: string
253
+ "400":
254
+ $ref: "#/components/responses/InvalidRequest"
255
+ "401":
256
+ $ref: "#/components/responses/Unauthorized"
257
+ "404":
258
+ $ref: "#/components/responses/NotFound"
259
+ "429":
260
+ $ref: "#/components/responses/RateLimited"
261
+ "500":
262
+ $ref: "#/components/responses/ServerError"
263
+ /v1/meeting-tokens:
264
+ post:
265
+ operationId: CreateMeetingToken
266
+ x-emulates:
267
+ supported: true
268
+ parity:
269
+ enabled: true
270
+ safe: true
271
+ requestBody:
272
+ required: true
273
+ content:
274
+ application/json:
275
+ schema:
276
+ type: object
277
+ additionalProperties: false
278
+ required: [properties]
279
+ properties:
280
+ properties:
281
+ $ref: "#/components/schemas/TokenProperties"
282
+ responses:
283
+ "200":
284
+ description: A signed meeting token
285
+ content:
286
+ application/json:
287
+ schema:
288
+ type: object
289
+ required: [token]
290
+ properties:
291
+ token:
292
+ type: string
293
+ x-emulates-resource:
294
+ type: meeting_token
295
+ identity: true
296
+ x-emulates-volatile:
297
+ kind: token
298
+ "400":
299
+ $ref: "#/components/responses/InvalidRequest"
300
+ "401":
301
+ $ref: "#/components/responses/Unauthorized"
302
+ "429":
303
+ $ref: "#/components/responses/RateLimited"
304
+ "500":
305
+ $ref: "#/components/responses/ServerError"
306
+ /v1/meeting-tokens/{token}:
307
+ parameters:
308
+ - name: token
309
+ in: path
310
+ required: true
311
+ description: A meeting token, minted by Daily or self-signed (HS256 with the API key).
312
+ schema:
313
+ type: string
314
+ x-emulates-resource-ref:
315
+ type: meeting_token
316
+ missing: eyJhbGciOiJIUzI1NiJ9.e30.bm90LWEtc2lnbmF0dXJl
317
+ - name: ignoreNbf
318
+ in: query
319
+ required: false
320
+ schema:
321
+ type: boolean
322
+ get:
323
+ operationId: ValidateMeetingToken
324
+ x-emulates:
325
+ supported: true
326
+ parity:
327
+ enabled: true
328
+ safe: true
329
+ responses:
330
+ "200":
331
+ description: The token's properties (it verifies with this API key and is in its time window)
332
+ content:
333
+ application/json:
334
+ schema:
335
+ $ref: "#/components/schemas/DecodedTokenProperties"
336
+ "400":
337
+ $ref: "#/components/responses/InvalidRequest"
338
+ "401":
339
+ $ref: "#/components/responses/Unauthorized"
340
+ "429":
341
+ $ref: "#/components/responses/RateLimited"
342
+ "500":
343
+ $ref: "#/components/responses/ServerError"
344
+ components:
345
+ securitySchemes:
346
+ bearerAuth:
347
+ type: http
348
+ scheme: bearer
349
+ parameters:
350
+ RoomName:
351
+ name: name
352
+ in: path
353
+ required: true
354
+ schema:
355
+ type: string
356
+ x-emulates-resource-ref:
357
+ type: room
358
+ missing: no-such-room
359
+ responses:
360
+ InvalidRequest:
361
+ description: The request was not valid
362
+ content:
363
+ application/json:
364
+ schema:
365
+ $ref: "#/components/schemas/Error"
366
+ Unauthorized:
367
+ description: Missing or invalid API key
368
+ content:
369
+ application/json:
370
+ schema:
371
+ $ref: "#/components/schemas/Error"
372
+ NotFound:
373
+ description: No such room
374
+ content:
375
+ application/json:
376
+ schema:
377
+ $ref: "#/components/schemas/Error"
378
+ RateLimited:
379
+ description: Rate limited
380
+ content:
381
+ application/json:
382
+ schema:
383
+ $ref: "#/components/schemas/Error"
384
+ ServerError:
385
+ description: Server error
386
+ content:
387
+ application/json:
388
+ schema:
389
+ $ref: "#/components/schemas/Error"
390
+ schemas:
391
+ Error:
392
+ type: object
393
+ required: [error, info]
394
+ properties:
395
+ error:
396
+ type: string
397
+ info:
398
+ type: string
399
+ Bucket:
400
+ type: object
401
+ additionalProperties: false
402
+ required: [bucket_name, assume_role_arn]
403
+ properties:
404
+ bucket_name:
405
+ type: string
406
+ maxLength: 63
407
+ bucket_region:
408
+ type: string
409
+ maxLength: 32
410
+ assume_role_arn:
411
+ type: string
412
+ maxLength: 256
413
+ allow_api_access:
414
+ type: boolean
415
+ allow_streaming_from_bucket:
416
+ type: boolean
417
+ storage_provider:
418
+ type: string
419
+ maxLength: 32
420
+ namespace:
421
+ type: string
422
+ maxLength: 64
423
+ Permissions:
424
+ type: object
425
+ additionalProperties: false
426
+ properties:
427
+ hasPresence:
428
+ type: boolean
429
+ canSend:
430
+ oneOf:
431
+ - type: boolean
432
+ - type: array
433
+ maxItems: 4
434
+ items:
435
+ type: string
436
+ enum: [video, audio, screenVideo, screenAudio]
437
+ canReceive:
438
+ type: object
439
+ canAdmin:
440
+ oneOf:
441
+ - type: boolean
442
+ - type: array
443
+ maxItems: 3
444
+ items:
445
+ type: string
446
+ enum: [participants, streaming, transcription]
447
+ Recording:
448
+ oneOf:
449
+ - type: string
450
+ enum: [cloud, local, raw-tracks]
451
+ - type: boolean
452
+ enum: [false]
453
+ RoomProperties:
454
+ type: object
455
+ additionalProperties: false
456
+ properties:
457
+ nbf:
458
+ type: number
459
+ description: Unix seconds (some callers send milliseconds; tolerated with a warning).
460
+ exp:
461
+ type: number
462
+ description: Unix seconds (some callers send milliseconds; tolerated with a warning).
463
+ max_participants:
464
+ type: integer
465
+ minimum: 1
466
+ maximum: 200
467
+ enable_people_ui:
468
+ type: boolean
469
+ enable_cpu_warning_notifications:
470
+ type: boolean
471
+ enable_pip_ui:
472
+ type: boolean
473
+ enable_emoji_reactions:
474
+ type: boolean
475
+ enable_hand_raising:
476
+ type: boolean
477
+ enable_prejoin_ui:
478
+ type: boolean
479
+ enable_live_captions_ui:
480
+ type: boolean
481
+ enable_network_ui:
482
+ type: boolean
483
+ enable_noise_cancellation_ui:
484
+ type: boolean
485
+ enable_breakout_rooms:
486
+ type: boolean
487
+ enable_video_processing_ui:
488
+ type: boolean
489
+ enable_knocking:
490
+ type: boolean
491
+ enable_screenshare:
492
+ type: boolean
493
+ enable_chat:
494
+ type: boolean
495
+ enable_shared_chat_history:
496
+ type: boolean
497
+ enable_advanced_chat:
498
+ type: boolean
499
+ start_video_off:
500
+ type: boolean
501
+ start_audio_off:
502
+ type: boolean
503
+ owner_only_broadcast:
504
+ type: boolean
505
+ enable_recording:
506
+ $ref: "#/components/schemas/Recording"
507
+ eject_at_room_exp:
508
+ type: boolean
509
+ eject_after_elapsed:
510
+ type: integer
511
+ minimum: 0
512
+ enable_hidden_participants:
513
+ type: boolean
514
+ enable_mesh_sfu:
515
+ type: boolean
516
+ experimental_optimize_large_calls:
517
+ type: boolean
518
+ enable_terse_logging:
519
+ type: boolean
520
+ close_tab_on_exit:
521
+ type: boolean
522
+ description: >-
523
+ Documented on meeting tokens; the live API also accepts it on a room, so a body
524
+ that sets it on both is not rejected.
525
+ sfu_switchover:
526
+ type: number
527
+ enable_adaptive_simulcast:
528
+ type: boolean
529
+ enable_multiparty_adaptive_simulcast:
530
+ type: boolean
531
+ enforce_unique_user_ids:
532
+ type: boolean
533
+ lang:
534
+ type: string
535
+ enum: [da, de, en, es, fi, fr, it, jp, ka, nl, "no", pt, pt-BR, pl, ru, sv, tr, user]
536
+ meeting_join_hook:
537
+ type: string
538
+ maxLength: 255
539
+ geo:
540
+ type: string
541
+ enum:
542
+ - af-south-1
543
+ - ap-northeast-2
544
+ - ap-southeast-1
545
+ - ap-southeast-2
546
+ - ap-south-1
547
+ - eu-central-1
548
+ - eu-west-2
549
+ - sa-east-1
550
+ - us-east-1
551
+ - us-west-2
552
+ rtmp_geo:
553
+ type: string
554
+ enum: [us-west-2, eu-central-1, ap-south-1]
555
+ disable_rtmp_geo_fallback:
556
+ type: boolean
557
+ recordings_bucket:
558
+ $ref: "#/components/schemas/Bucket"
559
+ transcription_bucket:
560
+ $ref: "#/components/schemas/Bucket"
561
+ recordings_template:
562
+ type: string
563
+ maxLength: 1024
564
+ transcription_template:
565
+ type: string
566
+ maxLength: 1024
567
+ auto_transcription_settings:
568
+ type: object
569
+ enable_transcription_storage:
570
+ type: boolean
571
+ enable_dialout:
572
+ type: boolean
573
+ dialout_config:
574
+ type: object
575
+ additionalProperties: false
576
+ properties:
577
+ allow_room_start:
578
+ type: boolean
579
+ dialout_geo:
580
+ type: string
581
+ maxLength: 32
582
+ max_idle_timeout_sec:
583
+ type: number
584
+ max_idle_timeout_post_conversation_sec:
585
+ type: number
586
+ streaming_endpoints:
587
+ type: [array, "null"]
588
+ maxItems: 3
589
+ items:
590
+ type: object
591
+ permissions:
592
+ $ref: "#/components/schemas/Permissions"
593
+ CreateRoomBody:
594
+ type: object
595
+ additionalProperties: false
596
+ properties:
597
+ name:
598
+ type: string
599
+ pattern: "^[A-Za-z0-9_-]{1,128}$"
600
+ privacy:
601
+ type: string
602
+ enum: [public, private]
603
+ properties:
604
+ $ref: "#/components/schemas/RoomProperties"
605
+ UpdateRoomBody:
606
+ type: object
607
+ additionalProperties: false
608
+ properties:
609
+ privacy:
610
+ type: string
611
+ enum: [public, private]
612
+ properties:
613
+ $ref: "#/components/schemas/RoomProperties"
614
+ Room:
615
+ type: object
616
+ required: [id, name, api_created, privacy, url, created_at, config]
617
+ properties:
618
+ id:
619
+ type: string
620
+ x-emulates-volatile:
621
+ kind: id
622
+ name:
623
+ type: string
624
+ x-emulates-resource:
625
+ type: room
626
+ identity: true
627
+ x-emulates-volatile:
628
+ kind: id
629
+ api_created:
630
+ type: boolean
631
+ privacy:
632
+ type: string
633
+ enum: [public, private]
634
+ url:
635
+ type: string
636
+ x-emulates-volatile:
637
+ kind: url
638
+ created_at:
639
+ type: string
640
+ x-emulates-volatile:
641
+ kind: timestamp
642
+ config:
643
+ type: object
644
+ PresenceParticipant:
645
+ type: object
646
+ additionalProperties: false
647
+ required: [room, id, userId, userName, joinTime, duration]
648
+ properties:
649
+ room:
650
+ type: string
651
+ id:
652
+ type: string
653
+ userId:
654
+ type: string
655
+ userName:
656
+ type: string
657
+ joinTime:
658
+ type: string
659
+ duration:
660
+ type: number
661
+ TokenProperties:
662
+ type: object
663
+ additionalProperties: false
664
+ properties:
665
+ room_name:
666
+ type: string
667
+ maxLength: 128
668
+ x-emulates-resource-ref:
669
+ type: room
670
+ missing: no-such-room
671
+ knocking:
672
+ type: boolean
673
+ nbf:
674
+ type: number
675
+ exp:
676
+ type: number
677
+ eject_at_token_exp:
678
+ type: boolean
679
+ eject_after_elapsed:
680
+ type: integer
681
+ minimum: 0
682
+ is_owner:
683
+ type: boolean
684
+ user_name:
685
+ type: string
686
+ maxLength: 128
687
+ user_id:
688
+ type: string
689
+ maxLength: 36
690
+ enable_screenshare:
691
+ type: boolean
692
+ start_video_off:
693
+ type: boolean
694
+ start_audio_off:
695
+ type: boolean
696
+ enable_recording:
697
+ $ref: "#/components/schemas/Recording"
698
+ enable_recording_ui:
699
+ type: boolean
700
+ start_cloud_recording:
701
+ type: boolean
702
+ start_cloud_recording_opts:
703
+ type: object
704
+ auto_start_transcription:
705
+ type: boolean
706
+ enable_prejoin_ui:
707
+ type: boolean
708
+ enable_live_captions_ui:
709
+ type: boolean
710
+ enable_terse_logging:
711
+ type: boolean
712
+ close_tab_on_exit:
713
+ type: boolean
714
+ redirect_on_meeting_exit:
715
+ type: string
716
+ maxLength: 255
717
+ lang:
718
+ type: string
719
+ enum: [da, de, en, es, fi, fr, it, jp, ka, nl, "no", pt, pt-BR, pl, ru, sv, tr, user]
720
+ permissions:
721
+ $ref: "#/components/schemas/Permissions"
722
+ DecodedTokenProperties:
723
+ type: object
724
+ description: The token's claims under Daily's full property names.
725
+ properties:
726
+ room_name:
727
+ type: string
728
+ is_owner:
729
+ type: boolean
730
+ user_name:
731
+ type: string
732
+ user_id:
733
+ type: string
734
+ nbf:
735
+ type: number
736
+ exp:
737
+ type: number