@crvouga/mockingbird-service-daily 1.0.0 → 1.0.2

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/CHANGELOG.md CHANGED
@@ -1,15 +1,24 @@
1
1
  # Changelog — @crvouga/mockingbird-service-daily
2
2
 
3
+ ## 1.0.2 (2026-09-26)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - take the rejected-request byte count from content-length, never by reading the body ([a0e5fb2](https://github.com/crvouga/mockingbird/commit/a0e5fb2fc80ab725c3552b612f3f091fd6c857fb))
8
+ - reject a present body by media type, and log what a rejected request sent ([12e351a](https://github.com/crvouga/mockingbird/commit/12e351aba53cfb7b41e31a7809419455fc2902eb))
9
+
10
+ ## 1.0.1 (2026-09-25)
11
+
12
+ ### Fixes and improvements
13
+
14
+ - accept close_tab_on_exit and Daily's documented room properties on POST /v1/rooms ([f6a5dc7](https://github.com/crvouga/mockingbird/commit/f6a5dc7cc82f490d8a4b47b739f1cecc3f88ba52))
15
+
3
16
  ## 1.0.0 (2026-09-24)
4
17
 
5
18
  ### ⚠️ Breaking changes
6
19
 
7
20
  - vendor branding for every service; purge internal mocks and consumer names ([f689534](https://github.com/crvouga/mockingbird/commit/f6895343543550dafcb7d76b426cae7635e03226))
8
21
 
9
- ### Dependencies
10
-
11
- - `@crvouga/mockingbird-service-sqlite`
12
-
13
22
  ## 0.2.0 (2026-09-23)
14
23
 
15
24
  ### Features
@@ -1366,6 +1366,90 @@ var operationMetadata = (operation) => {
1366
1366
 
1367
1367
  // ../core/dist/service.js
1368
1368
  import { Hono } from "hono";
1369
+
1370
+ // ../core/dist/validation.js
1371
+ var requestBodyOf = (context) => {
1372
+ const requestBody = context.operation.operation.requestBody;
1373
+ return requestBody ? deref(context.document, requestBody) : void 0;
1374
+ };
1375
+ var mediaTypeMatches = (accepted, actual) => {
1376
+ const pattern = mediaTypeOf(accepted) ?? accepted.toLowerCase();
1377
+ if (pattern === actual || pattern === "*/*")
1378
+ return true;
1379
+ const [type, subtype] = pattern.split("/");
1380
+ const [actualType, actualSubtype] = actual.split("/");
1381
+ if (type !== actualType && type !== "*")
1382
+ return false;
1383
+ if (subtype === void 0 || subtype === "*")
1384
+ return true;
1385
+ if (subtype.startsWith("*+"))
1386
+ return actualSubtype?.endsWith(subtype.slice(1)) === true;
1387
+ return false;
1388
+ };
1389
+ var acceptedKeyFor = (content, mediaType) => {
1390
+ if (!content || mediaType === void 0)
1391
+ return void 0;
1392
+ const keys = Object.keys(content);
1393
+ return keys.find((key) => mediaTypeOf(key) === mediaType) ?? keys.find((key) => mediaTypeMatches(key, mediaType));
1394
+ };
1395
+ var unsupportedMediaType = (context, options = {}) => {
1396
+ if (context.body.kind === "empty" && options.includeEmpty !== true)
1397
+ return void 0;
1398
+ const content = requestBodyOf(context)?.content;
1399
+ if (!content || Object.keys(content).length === 0)
1400
+ return void 0;
1401
+ const mediaType = mediaTypeOf(context.request.headers.get("content-type"));
1402
+ if (acceptedKeyFor(content, mediaType) !== void 0)
1403
+ return void 0;
1404
+ return { mediaType: mediaType ?? null, accepted: Object.keys(content) };
1405
+ };
1406
+ var recorded = /* @__PURE__ */ new WeakMap();
1407
+ var recordedIssues = (request) => recorded.get(request);
1408
+ var bodyIssues = (context, contentType = "application/json") => {
1409
+ const issues = findBodyIssues(context, contentType);
1410
+ if (issues.length > 0)
1411
+ recorded.set(context.request, issues);
1412
+ return issues;
1413
+ };
1414
+ var findBodyIssues = (context, contentType) => {
1415
+ const resolved = requestBodyOf(context);
1416
+ if (!resolved)
1417
+ return [];
1418
+ const unsupported = unsupportedMediaType(context);
1419
+ if (unsupported) {
1420
+ return [
1421
+ {
1422
+ path: "",
1423
+ kind: "media_type",
1424
+ message: unsupported.mediaType === null ? "request body has no content-type" : `request body media type ${unsupported.mediaType} is not supported`
1425
+ }
1426
+ ];
1427
+ }
1428
+ const key = acceptedKeyFor(resolved.content, mediaTypeOf(context.request.headers.get("content-type"))) ?? contentType;
1429
+ const schema = resolved.content?.[key]?.schema;
1430
+ if (!schema)
1431
+ return [];
1432
+ if (context.body.kind === "invalid") {
1433
+ return [
1434
+ {
1435
+ path: "",
1436
+ kind: "syntax",
1437
+ message: `request body is not valid ${context.body.mediaType}`
1438
+ }
1439
+ ];
1440
+ }
1441
+ const value = context.body.kind === "json" || context.body.kind === "form" || context.body.kind === "text" ? context.body.value : void 0;
1442
+ if (value === void 0) {
1443
+ return resolved.required && context.body.kind === "empty" ? [{ path: "", kind: "required", message: "request body is required" }] : [];
1444
+ }
1445
+ return validateValue(context.document, resolveSchema(context.document, schema), value).map((issue) => ({ path: issue.path.join("."), kind: "schema", message: issue.message }));
1446
+ };
1447
+
1448
+ // ../core/dist/service.js
1449
+ var withIssues = (request, response) => {
1450
+ const issues = response.status >= 400 ? recordedIssues(request) : void 0;
1451
+ return issues && issues.length > 0 ? annotateResponse(response, { issues }) : response;
1452
+ };
1369
1453
  var defineOperations = (handlers) => handlers;
1370
1454
  var OperationRegistryError = class extends Error {
1371
1455
  problems;
@@ -1451,9 +1535,7 @@ var createService = (options) => {
1451
1535
  now
1452
1536
  };
1453
1537
  const short = await options.before?.(context);
1454
- if (short)
1455
- return short;
1456
- return handler(context);
1538
+ return withIssues(request, short ?? await handler(context));
1457
1539
  };
1458
1540
  app.on(operation.method.toUpperCase(), honoPath(operation.path), route);
1459
1541
  }
@@ -1490,7 +1572,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
1490
1572
  };
1491
1573
 
1492
1574
  // ../core/dist/version.js
1493
- var PACKAGE_VERSION = true ? "1.0.0" : UNRELEASED_VERSION;
1575
+ var PACKAGE_VERSION = true ? "1.0.2" : UNRELEASED_VERSION;
1494
1576
 
1495
1577
  // ../core/dist/signing.js
1496
1578
  var encoder = new TextEncoder();
@@ -2258,8 +2340,15 @@ var createRuntime = (options) => {
2258
2340
  const started = monotonicNow();
2259
2341
  const url = new URL(request.url);
2260
2342
  const operationId = operationIdFor(request, url.pathname);
2343
+ const contentLength = request.headers.get("content-length");
2344
+ const received = {
2345
+ contentType: request.headers.get("content-type"),
2346
+ bodyBytes: contentLength !== null && /^\d+$/.test(contentLength) ? Number(contentLength) : null,
2347
+ transferEncoding: request.headers.get("transfer-encoding")
2348
+ };
2261
2349
  const log = (status, faultId, response2) => {
2262
2350
  const noted = response2 ? responseNotes(response2) : void 0;
2351
+ const rejected = status >= 400 && faultId === void 0;
2263
2352
  const entry = {
2264
2353
  service: options.name,
2265
2354
  namespace,
@@ -2271,7 +2360,9 @@ var createRuntime = (options) => {
2271
2360
  unmatched: options.document !== void 0 && operationId === void 0,
2272
2361
  ...faultId !== void 0 ? { faultId } : {},
2273
2362
  ...noted?.ids && Object.keys(noted.ids).length > 0 ? { ids: noted.ids } : {},
2274
- ...noted?.adopted ? { adopted: true } : {}
2363
+ ...noted?.adopted ? { adopted: true } : {},
2364
+ ...rejected ? { request: { ...received } } : {},
2365
+ ...rejected && noted?.issues && noted.issues.length > 0 ? { issues: noted.issues.map((issue) => ({ ...issue })) } : {}
2275
2366
  };
2276
2367
  metrics.record(entry);
2277
2368
  journal.record({ ...entry, at: new Date(clock.now()).toISOString() });
@@ -2543,27 +2634,8 @@ var putObject = async (target, key, body, contentType = "application/octet-strea
2543
2634
  return `s3://${target.bucket}/${key}`;
2544
2635
  };
2545
2636
 
2546
- // ../core/dist/validation.js
2547
- var bodyIssues = (context, contentType = "application/json") => {
2548
- const requestBody = context.operation.operation.requestBody;
2549
- if (!requestBody)
2550
- return [];
2551
- const resolved = deref(context.document, requestBody);
2552
- const schema = resolved.content?.[contentType]?.schema;
2553
- if (!schema)
2554
- return [];
2555
- const value = context.body.kind === "json" || context.body.kind === "form" ? context.body.value : void 0;
2556
- if (context.body.kind === "invalid") {
2557
- return [{ path: "", message: `request body is not valid ${context.body.mediaType}` }];
2558
- }
2559
- if (value === void 0) {
2560
- return resolved.required ? [{ path: "", message: "request body is required" }] : [];
2561
- }
2562
- return validateValue(context.document, resolveSchema(context.document, schema), value).map((issue) => ({ path: issue.path.join("."), message: issue.message }));
2563
- };
2564
-
2565
2637
  // src/generated/openapi.ts
2566
- var document = JSON.parse(`{"openapi":"3.1.0","info":{"title":"Daily.co REST API (Mockingbird subset)","description":"Stateful mock subset of the Daily.co REST API: rooms (create, get, update, delete, presence,\\neject) and meeting tokens (create, validate). Trimmed from Daily's documented API to the\\ncalls our backend and EMR make; request schemas follow the fields our consumers send\\n(daily-video.schemas.ts strict zod schemas, EMR RoomConfig / TokenConfig).\\n","version":"1","x-mockingbird-upstream":{"note":"Hand-authored from docs.daily.co/reference/rest-api and our consumers (apps/backend daily-video.service.ts + schemas, the consumer app's daily-service.ts)."}},"servers":[{"url":"https://api.daily.co"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/rooms":{"post":{"operationId":"CreateRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoomBody"}}}},"responses":{"200":{"description":"The created room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Room"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/rooms/{name}":{"parameters":[{"$ref":"#/components/parameters/RoomName"}],"get":{"operationId":"GetRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"The room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Room"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"operationId":"UpdateRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoomBody"}}}},"responses":{"200":{"description":"The updated room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Room"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"operationId":"DeleteRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","required":["deleted","name"],"properties":{"deleted":{"type":"boolean"},"name":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/rooms/{name}/presence":{"parameters":[{"$ref":"#/components/parameters/RoomName"}],"get":{"operationId":"GetRoomPresence","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Participants currently in the room","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["total_count","data"],"properties":{"total_count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PresenceParticipant"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/rooms/{name}/eject":{"parameters":[{"$ref":"#/components/parameters/RoomName"}],"post":{"operationId":"EjectParticipants","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"ids":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":64}},"user_ids":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":36}}}}}}},"responses":{"200":{"description":"Session ids of the ejected participants","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ejectedIds"],"properties":{"ejectedIds":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/meeting-tokens":{"post":{"operationId":"CreateMeetingToken","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["properties"],"properties":{"properties":{"$ref":"#/components/schemas/TokenProperties"}}}}}},"responses":{"200":{"description":"A signed meeting token","content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","x-mockingbird-resource":{"type":"meeting_token","identity":true},"x-mockingbird-volatile":{"kind":"token"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/meeting-tokens/{token}":{"parameters":[{"name":"token","in":"path","required":true,"description":"A meeting token, minted by Daily or self-signed (HS256 with the API key).","schema":{"type":"string","x-mockingbird-resource-ref":{"type":"meeting_token","missing":"eyJhbGciOiJIUzI1NiJ9.e30.bm90LWEtc2lnbmF0dXJl"}}},{"name":"ignoreNbf","in":"query","required":false,"schema":{"type":"boolean"}}],"get":{"operationId":"ValidateMeetingToken","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"The token's properties (it verifies with this API key and is in its time window)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodedTokenProperties"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"RoomName":{"name":"name","in":"path","required":true,"schema":{"type":"string","x-mockingbird-resource-ref":{"type":"room","missing":"no-such-room"}}}},"responses":{"InvalidRequest":{"description":"The request was not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error","info"],"properties":{"error":{"type":"string"},"info":{"type":"string"}}},"Bucket":{"type":"object","additionalProperties":false,"required":["bucket_name","assume_role_arn"],"properties":{"bucket_name":{"type":"string","maxLength":63},"bucket_region":{"type":"string","maxLength":32},"assume_role_arn":{"type":"string","maxLength":256},"allow_api_access":{"type":"boolean"},"allow_streaming_from_bucket":{"type":"boolean"}}},"Permissions":{"type":"object","additionalProperties":false,"properties":{"hasPresence":{"type":"boolean"},"canSend":{"oneOf":[{"type":"boolean"},{"type":"array","maxItems":4,"items":{"type":"string","enum":["video","audio","screenVideo","screenAudio"]}}]},"canReceive":{"type":"object"},"canAdmin":{"oneOf":[{"type":"boolean"},{"type":"array","maxItems":3,"items":{"type":"string","enum":["participants","streaming","transcription"]}}]}}},"Recording":{"oneOf":[{"type":"string","enum":["cloud","local","raw-tracks"]},{"type":"boolean","enum":[false]}]},"RoomProperties":{"type":"object","additionalProperties":false,"properties":{"nbf":{"type":"number","description":"Unix seconds (some callers send milliseconds; tolerated with a warning)."},"exp":{"type":"number","description":"Unix seconds (some callers send milliseconds; tolerated with a warning)."},"max_participants":{"type":"integer","minimum":1,"maximum":200},"enable_people_ui":{"type":"boolean"},"enable_pip_ui":{"type":"boolean"},"enable_emoji_reactions":{"type":"boolean"},"enable_hand_raising":{"type":"boolean"},"enable_prejoin_ui":{"type":"boolean"},"enable_live_captions_ui":{"type":"boolean"},"enable_network_ui":{"type":"boolean"},"enable_noise_cancellation_ui":{"type":"boolean"},"enable_breakout_rooms":{"type":"boolean"},"enable_video_processing_ui":{"type":"boolean"},"enable_knocking":{"type":"boolean"},"enable_screenshare":{"type":"boolean"},"enable_chat":{"type":"boolean"},"enable_shared_chat_history":{"type":"boolean"},"enable_advanced_chat":{"type":"boolean"},"start_video_off":{"type":"boolean"},"start_audio_off":{"type":"boolean"},"owner_only_broadcast":{"type":"boolean"},"enable_recording":{"$ref":"#/components/schemas/Recording"},"eject_at_room_exp":{"type":"boolean"},"eject_after_elapsed":{"type":"integer","minimum":0},"enable_hidden_participants":{"type":"boolean"},"enable_mesh_sfu":{"type":"boolean"},"experimental_optimize_large_calls":{"type":"boolean"},"enable_terse_logging":{"type":"boolean"},"sfu_switchover":{"type":"number"},"enable_adaptive_simulcast":{"type":"boolean"},"enable_multiparty_adaptive_simulcast":{"type":"boolean"},"enforce_unique_user_ids":{"type":"boolean"},"lang":{"type":"string","enum":["da","de","en","es","fi","fr","it","jp","ka","nl","no","pt","pt-BR","pl","ru","sv","tr","user"]},"meeting_join_hook":{"type":"string","maxLength":255},"geo":{"type":"string","enum":["af-south-1","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-south-1","eu-central-1","eu-west-2","sa-east-1","us-east-1","us-west-2"]},"rtmp_geo":{"type":"string","enum":["us-west-2","eu-central-1","ap-south-1"]},"disable_rtmp_geo_fallback":{"type":"boolean"},"recordings_bucket":{"$ref":"#/components/schemas/Bucket"},"transcription_bucket":{"$ref":"#/components/schemas/Bucket"},"recordings_template":{"type":"string","maxLength":1024},"transcription_template":{"type":"string","maxLength":1024},"auto_transcription_settings":{"type":"object"},"enable_transcription_storage":{"type":"boolean"},"enable_dialout":{"type":"boolean"},"dialout_config":{"type":"object","additionalProperties":false,"properties":{"allow_room_start":{"type":"boolean"},"dialout_geo":{"type":"string","maxLength":32},"max_idle_timeout_sec":{"type":"number"}}},"streaming_endpoints":{"type":["array","null"],"maxItems":3,"items":{"type":"object"}},"permissions":{"$ref":"#/components/schemas/Permissions"}}},"CreateRoomBody":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"privacy":{"type":"string","enum":["public","private"]},"properties":{"$ref":"#/components/schemas/RoomProperties"}}},"UpdateRoomBody":{"type":"object","additionalProperties":false,"properties":{"privacy":{"type":"string","enum":["public","private"]},"properties":{"$ref":"#/components/schemas/RoomProperties"}}},"Room":{"type":"object","required":["id","name","api_created","privacy","url","created_at","config"],"properties":{"id":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"name":{"type":"string","x-mockingbird-resource":{"type":"room","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"api_created":{"type":"boolean"},"privacy":{"type":"string","enum":["public","private"]},"url":{"type":"string","x-mockingbird-volatile":{"kind":"url"}},"created_at":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"config":{"type":"object"}}},"PresenceParticipant":{"type":"object","additionalProperties":false,"required":["room","id","userId","userName","joinTime","duration"],"properties":{"room":{"type":"string"},"id":{"type":"string"},"userId":{"type":"string"},"userName":{"type":"string"},"joinTime":{"type":"string"},"duration":{"type":"number"}}},"TokenProperties":{"type":"object","additionalProperties":false,"properties":{"room_name":{"type":"string","maxLength":128,"x-mockingbird-resource-ref":{"type":"room","missing":"no-such-room"}},"knocking":{"type":"boolean"},"nbf":{"type":"number"},"exp":{"type":"number"},"eject_at_token_exp":{"type":"boolean"},"eject_after_elapsed":{"type":"integer","minimum":0},"is_owner":{"type":"boolean"},"user_name":{"type":"string","maxLength":128},"user_id":{"type":"string","maxLength":36},"enable_screenshare":{"type":"boolean"},"start_video_off":{"type":"boolean"},"start_audio_off":{"type":"boolean"},"enable_recording":{"$ref":"#/components/schemas/Recording"},"enable_recording_ui":{"type":"boolean"},"start_cloud_recording":{"type":"boolean"},"start_cloud_recording_opts":{"type":"object"},"auto_start_transcription":{"type":"boolean"},"enable_prejoin_ui":{"type":"boolean"},"enable_live_captions_ui":{"type":"boolean"},"enable_terse_logging":{"type":"boolean"},"close_tab_on_exit":{"type":"boolean"},"redirect_on_meeting_exit":{"type":"string","maxLength":255},"lang":{"type":"string","enum":["da","de","en","es","fi","fr","it","jp","ka","nl","no","pt","pt-BR","pl","ru","sv","tr","user"]},"permissions":{"$ref":"#/components/schemas/Permissions"}}},"DecodedTokenProperties":{"type":"object","description":"The token's claims under Daily's full property names.","properties":{"room_name":{"type":"string"},"is_owner":{"type":"boolean"},"user_name":{"type":"string"},"user_id":{"type":"string"},"nbf":{"type":"number"},"exp":{"type":"number"}}}}}}`);
2638
+ var document = JSON.parse(`{"openapi":"3.1.0","info":{"title":"Daily.co REST API (Mockingbird subset)","description":"Stateful mock subset of the Daily.co REST API: rooms (create, get, update, delete, presence,\\neject) and meeting tokens (create, validate). Trimmed from Daily's documented API to the\\ncalls our backend and EMR make; request schemas follow the fields our consumers send\\n(daily-video.schemas.ts strict zod schemas, EMR RoomConfig / TokenConfig).\\n","version":"1","x-mockingbird-upstream":{"note":"Hand-authored from docs.daily.co/reference/rest-api and our consumers (apps/backend daily-video.service.ts + schemas, the consumer app's daily-service.ts)."}},"servers":[{"url":"https://api.daily.co"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/rooms":{"post":{"operationId":"CreateRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoomBody"}}}},"responses":{"200":{"description":"The created room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Room"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/rooms/{name}":{"parameters":[{"$ref":"#/components/parameters/RoomName"}],"get":{"operationId":"GetRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"The room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Room"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"post":{"operationId":"UpdateRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoomBody"}}}},"responses":{"200":{"description":"The updated room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Room"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}},"delete":{"operationId":"DeleteRoom","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","required":["deleted","name"],"properties":{"deleted":{"type":"boolean"},"name":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/rooms/{name}/presence":{"parameters":[{"$ref":"#/components/parameters/RoomName"}],"get":{"operationId":"GetRoomPresence","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Participants currently in the room","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["total_count","data"],"properties":{"total_count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PresenceParticipant"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/rooms/{name}/eject":{"parameters":[{"$ref":"#/components/parameters/RoomName"}],"post":{"operationId":"EjectParticipants","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"ids":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":64}},"user_ids":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":36}}}}}}},"responses":{"200":{"description":"Session ids of the ejected participants","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ejectedIds"],"properties":{"ejectedIds":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/meeting-tokens":{"post":{"operationId":"CreateMeetingToken","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["properties"],"properties":{"properties":{"$ref":"#/components/schemas/TokenProperties"}}}}}},"responses":{"200":{"description":"A signed meeting token","content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","x-mockingbird-resource":{"type":"meeting_token","identity":true},"x-mockingbird-volatile":{"kind":"token"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/v1/meeting-tokens/{token}":{"parameters":[{"name":"token","in":"path","required":true,"description":"A meeting token, minted by Daily or self-signed (HS256 with the API key).","schema":{"type":"string","x-mockingbird-resource-ref":{"type":"meeting_token","missing":"eyJhbGciOiJIUzI1NiJ9.e30.bm90LWEtc2lnbmF0dXJl"}}},{"name":"ignoreNbf","in":"query","required":false,"schema":{"type":"boolean"}}],"get":{"operationId":"ValidateMeetingToken","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"The token's properties (it verifies with this API key and is in its time window)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodedTokenProperties"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"RoomName":{"name":"name","in":"path","required":true,"schema":{"type":"string","x-mockingbird-resource-ref":{"type":"room","missing":"no-such-room"}}}},"responses":{"InvalidRequest":{"description":"The request was not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error","info"],"properties":{"error":{"type":"string"},"info":{"type":"string"}}},"Bucket":{"type":"object","additionalProperties":false,"required":["bucket_name","assume_role_arn"],"properties":{"bucket_name":{"type":"string","maxLength":63},"bucket_region":{"type":"string","maxLength":32},"assume_role_arn":{"type":"string","maxLength":256},"allow_api_access":{"type":"boolean"},"allow_streaming_from_bucket":{"type":"boolean"},"storage_provider":{"type":"string","maxLength":32},"namespace":{"type":"string","maxLength":64}}},"Permissions":{"type":"object","additionalProperties":false,"properties":{"hasPresence":{"type":"boolean"},"canSend":{"oneOf":[{"type":"boolean"},{"type":"array","maxItems":4,"items":{"type":"string","enum":["video","audio","screenVideo","screenAudio"]}}]},"canReceive":{"type":"object"},"canAdmin":{"oneOf":[{"type":"boolean"},{"type":"array","maxItems":3,"items":{"type":"string","enum":["participants","streaming","transcription"]}}]}}},"Recording":{"oneOf":[{"type":"string","enum":["cloud","local","raw-tracks"]},{"type":"boolean","enum":[false]}]},"RoomProperties":{"type":"object","additionalProperties":false,"properties":{"nbf":{"type":"number","description":"Unix seconds (some callers send milliseconds; tolerated with a warning)."},"exp":{"type":"number","description":"Unix seconds (some callers send milliseconds; tolerated with a warning)."},"max_participants":{"type":"integer","minimum":1,"maximum":200},"enable_people_ui":{"type":"boolean"},"enable_cpu_warning_notifications":{"type":"boolean"},"enable_pip_ui":{"type":"boolean"},"enable_emoji_reactions":{"type":"boolean"},"enable_hand_raising":{"type":"boolean"},"enable_prejoin_ui":{"type":"boolean"},"enable_live_captions_ui":{"type":"boolean"},"enable_network_ui":{"type":"boolean"},"enable_noise_cancellation_ui":{"type":"boolean"},"enable_breakout_rooms":{"type":"boolean"},"enable_video_processing_ui":{"type":"boolean"},"enable_knocking":{"type":"boolean"},"enable_screenshare":{"type":"boolean"},"enable_chat":{"type":"boolean"},"enable_shared_chat_history":{"type":"boolean"},"enable_advanced_chat":{"type":"boolean"},"start_video_off":{"type":"boolean"},"start_audio_off":{"type":"boolean"},"owner_only_broadcast":{"type":"boolean"},"enable_recording":{"$ref":"#/components/schemas/Recording"},"eject_at_room_exp":{"type":"boolean"},"eject_after_elapsed":{"type":"integer","minimum":0},"enable_hidden_participants":{"type":"boolean"},"enable_mesh_sfu":{"type":"boolean"},"experimental_optimize_large_calls":{"type":"boolean"},"enable_terse_logging":{"type":"boolean"},"close_tab_on_exit":{"type":"boolean","description":"Documented on meeting tokens; the live API also accepts it on a room, so a body that sets it on both is not rejected."},"sfu_switchover":{"type":"number"},"enable_adaptive_simulcast":{"type":"boolean"},"enable_multiparty_adaptive_simulcast":{"type":"boolean"},"enforce_unique_user_ids":{"type":"boolean"},"lang":{"type":"string","enum":["da","de","en","es","fi","fr","it","jp","ka","nl","no","pt","pt-BR","pl","ru","sv","tr","user"]},"meeting_join_hook":{"type":"string","maxLength":255},"geo":{"type":"string","enum":["af-south-1","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-south-1","eu-central-1","eu-west-2","sa-east-1","us-east-1","us-west-2"]},"rtmp_geo":{"type":"string","enum":["us-west-2","eu-central-1","ap-south-1"]},"disable_rtmp_geo_fallback":{"type":"boolean"},"recordings_bucket":{"$ref":"#/components/schemas/Bucket"},"transcription_bucket":{"$ref":"#/components/schemas/Bucket"},"recordings_template":{"type":"string","maxLength":1024},"transcription_template":{"type":"string","maxLength":1024},"auto_transcription_settings":{"type":"object"},"enable_transcription_storage":{"type":"boolean"},"enable_dialout":{"type":"boolean"},"dialout_config":{"type":"object","additionalProperties":false,"properties":{"allow_room_start":{"type":"boolean"},"dialout_geo":{"type":"string","maxLength":32},"max_idle_timeout_sec":{"type":"number"},"max_idle_timeout_post_conversation_sec":{"type":"number"}}},"streaming_endpoints":{"type":["array","null"],"maxItems":3,"items":{"type":"object"}},"permissions":{"$ref":"#/components/schemas/Permissions"}}},"CreateRoomBody":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"privacy":{"type":"string","enum":["public","private"]},"properties":{"$ref":"#/components/schemas/RoomProperties"}}},"UpdateRoomBody":{"type":"object","additionalProperties":false,"properties":{"privacy":{"type":"string","enum":["public","private"]},"properties":{"$ref":"#/components/schemas/RoomProperties"}}},"Room":{"type":"object","required":["id","name","api_created","privacy","url","created_at","config"],"properties":{"id":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"name":{"type":"string","x-mockingbird-resource":{"type":"room","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"api_created":{"type":"boolean"},"privacy":{"type":"string","enum":["public","private"]},"url":{"type":"string","x-mockingbird-volatile":{"kind":"url"}},"created_at":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"config":{"type":"object"}}},"PresenceParticipant":{"type":"object","additionalProperties":false,"required":["room","id","userId","userName","joinTime","duration"],"properties":{"room":{"type":"string"},"id":{"type":"string"},"userId":{"type":"string"},"userName":{"type":"string"},"joinTime":{"type":"string"},"duration":{"type":"number"}}},"TokenProperties":{"type":"object","additionalProperties":false,"properties":{"room_name":{"type":"string","maxLength":128,"x-mockingbird-resource-ref":{"type":"room","missing":"no-such-room"}},"knocking":{"type":"boolean"},"nbf":{"type":"number"},"exp":{"type":"number"},"eject_at_token_exp":{"type":"boolean"},"eject_after_elapsed":{"type":"integer","minimum":0},"is_owner":{"type":"boolean"},"user_name":{"type":"string","maxLength":128},"user_id":{"type":"string","maxLength":36},"enable_screenshare":{"type":"boolean"},"start_video_off":{"type":"boolean"},"start_audio_off":{"type":"boolean"},"enable_recording":{"$ref":"#/components/schemas/Recording"},"enable_recording_ui":{"type":"boolean"},"start_cloud_recording":{"type":"boolean"},"start_cloud_recording_opts":{"type":"object"},"auto_start_transcription":{"type":"boolean"},"enable_prejoin_ui":{"type":"boolean"},"enable_live_captions_ui":{"type":"boolean"},"enable_terse_logging":{"type":"boolean"},"close_tab_on_exit":{"type":"boolean"},"redirect_on_meeting_exit":{"type":"string","maxLength":255},"lang":{"type":"string","enum":["da","de","en","es","fi","fr","it","jp","ka","nl","no","pt","pt-BR","pl","ru","sv","tr","user"]},"permissions":{"$ref":"#/components/schemas/Permissions"}}},"DecodedTokenProperties":{"type":"object","description":"The token's claims under Daily's full property names.","properties":{"room_name":{"type":"string"},"is_owner":{"type":"boolean"},"user_name":{"type":"string"},"user_id":{"type":"string"},"nbf":{"type":"number"},"exp":{"type":"number"}}}}}}`);
2567
2639
  var operationIds = ["CreateRoom", "GetRoom", "UpdateRoom", "DeleteRoom", "GetRoomPresence", "EjectParticipants", "CreateMeetingToken", "ValidateMeetingToken"];
2568
2640
  var supportedOperationIds = ["CreateRoom", "GetRoom", "UpdateRoom", "DeleteRoom", "GetRoomPresence", "EjectParticipants", "CreateMeetingToken", "ValidateMeetingToken"];
2569
2641
 
@@ -3337,4 +3409,4 @@ export {
3337
3409
  DailyAPI,
3338
3410
  synthesizeTranscript
3339
3411
  };
3340
- //# sourceMappingURL=chunk-RT2B2MAU.js.map
3412
+ //# sourceMappingURL=chunk-4PYYJPLY.js.map