@freedome/protocol 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/validate.js CHANGED
@@ -4280,6 +4280,4070 @@ var schemaBundle = {
4280
4280
  }
4281
4281
  }
4282
4282
  },
4283
+ "https://freedome.nativemind.us/schemas/api/1.1/api-key.schema.json": {
4284
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4285
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/api-key.schema.json",
4286
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). API key `fdk_<id>_<secret>` (02e \xA73.6, \xA75.1 /api-keys, scope keys:manage). The secret is returned once (#/$defs/created); stored as a hash only.",
4287
+ title: "API key",
4288
+ allOf: [{ $ref: "#/$defs/apiKey" }],
4289
+ $defs: {
4290
+ apiKey: {
4291
+ type: "object",
4292
+ required: ["id", "name", "role", "scopes", "createdAt"],
4293
+ properties: {
4294
+ id: { $ref: "#/$defs/keyId" },
4295
+ name: { type: "string", minLength: 1, maxLength: 128 },
4296
+ role: { $ref: "auth.schema.json#/$defs/role" },
4297
+ scopes: { $ref: "auth.schema.json#/$defs/scopes" },
4298
+ prefix: {
4299
+ type: "string",
4300
+ pattern: "^fdk_[a-z0-9]{8,32}$",
4301
+ description: "public part of the token (fdk_<id>) for recognition in logs"
4302
+ },
4303
+ createdBy: { type: "string" },
4304
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
4305
+ expiresAt: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }] },
4306
+ lastUsedAt: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }] },
4307
+ revokedAt: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }] }
4308
+ },
4309
+ patternProperties: { "^x-": true },
4310
+ additionalProperties: false
4311
+ },
4312
+ keyId: { type: "string", pattern: "^[a-z0-9]{8,32}$" },
4313
+ input: {
4314
+ description: "POST /api-keys. A key never gets more than the caller's own role.",
4315
+ type: "object",
4316
+ required: ["name", "role"],
4317
+ properties: {
4318
+ name: { type: "string", minLength: 1, maxLength: 128 },
4319
+ role: { $ref: "auth.schema.json#/$defs/role" },
4320
+ scopes: { $ref: "auth.schema.json#/$defs/scopes", description: "optional narrowing of the role's scopes" },
4321
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4322
+ },
4323
+ additionalProperties: false
4324
+ },
4325
+ created: {
4326
+ description: "201 body of POST /api-keys: the key plus its token, shown once.",
4327
+ type: "object",
4328
+ required: ["key", "token"],
4329
+ properties: {
4330
+ key: { $ref: "#/$defs/apiKey" },
4331
+ token: { type: "string", pattern: "^fdk_[a-z0-9]{8,32}_[A-Za-z0-9]{32,128}$" }
4332
+ },
4333
+ additionalProperties: false
4334
+ },
4335
+ page: {
4336
+ type: "object",
4337
+ required: ["items", "nextCursor"],
4338
+ properties: {
4339
+ items: { type: "array", items: { $ref: "#/$defs/apiKey" } },
4340
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
4341
+ count: { type: "integer", minimum: 0 }
4342
+ },
4343
+ additionalProperties: false
4344
+ }
4345
+ }
4346
+ },
4347
+ "https://freedome.nativemind.us/schemas/api/1.1/app-payload.schema.json": {
4348
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4349
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/app-payload.schema.json",
4350
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Ecosystem-app content (02e \xA75.6 POST /apps/{app}/payloads) rendered by the app-content renderer (asset type realtime); replaces integration-event / integrateApp. Root = request body.",
4351
+ title: "App payload",
4352
+ type: "object",
4353
+ required: ["kind", "data"],
4354
+ properties: {
4355
+ kind: {
4356
+ anyOf: [{ enum: ["scene", "overlay", "state"] }, { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }]
4357
+ },
4358
+ schema: {
4359
+ type: "string",
4360
+ format: "uri",
4361
+ description: "$id of the app's payload schema (app payload registry, 4.CT.4)"
4362
+ },
4363
+ data: { description: "app-defined JSON (\u2264 1 MB)" },
4364
+ ttlSec: { type: "integer", minimum: 1, maximum: 86400, default: 300 },
4365
+ target: {
4366
+ type: "object",
4367
+ properties: {
4368
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
4369
+ playerId: { $ref: "../../common/1.0/ids.schema.json#/$defs/playerRef" }
4370
+ },
4371
+ additionalProperties: false
4372
+ }
4373
+ },
4374
+ patternProperties: { "^x-": true },
4375
+ additionalProperties: false,
4376
+ $defs: {
4377
+ published: {
4378
+ description: "Response of publishAppPayload and the `data.resource` of event app.payload.",
4379
+ type: "object",
4380
+ required: ["id", "app", "kind", "expiresAt"],
4381
+ properties: {
4382
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
4383
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
4384
+ kind: { type: "string" },
4385
+ schema: { type: "string" },
4386
+ data: {},
4387
+ publishedBy: { type: "string" },
4388
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4389
+ },
4390
+ additionalProperties: false
4391
+ }
4392
+ }
4393
+ },
4394
+ "https://freedome.nativemind.us/schemas/api/1.1/asset.schema.json": {
4395
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4396
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/asset.schema.json",
4397
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Stored asset (02e \xA74, \xA75.4) = .dome asset fields + storage (sha256, size, status, probe data, thumbnails). Root = GET /assets/{assetId}.",
4398
+ title: "Asset",
4399
+ allOf: [{ $ref: "#/$defs/asset" }],
4400
+ $defs: {
4401
+ asset: {
4402
+ type: "object",
4403
+ required: ["id", "name", "type", "status", "revision", "createdAt"],
4404
+ properties: {
4405
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4406
+ name: {
4407
+ type: "string",
4408
+ minLength: 1,
4409
+ maxLength: 512,
4410
+ description: "original file name (with extension) or a title"
4411
+ },
4412
+ type: { $ref: "#/$defs/type" },
4413
+ src: {
4414
+ type: "string",
4415
+ description: "external URI for registered (not stored) assets; absent for stored blobs. Type stream: also spout://<sender>, syphon://<app>/<server>, dmabuf://<pipewire-node>, v4l2:///dev/<device>, ndi://<source> (percent-encoded, docs/audio-reactive.md)"
4416
+ },
4417
+ texture: { $ref: "#/$defs/texture" },
4418
+ mediaType: { $ref: "../../common/1.0/units.schema.json#/$defs/mediaType" },
4419
+ sha256: { $ref: "../../common/1.0/ids.schema.json#/$defs/sha256" },
4420
+ size: { type: "integer", minimum: 0 },
4421
+ status: { $ref: "#/$defs/status" },
4422
+ problem: {
4423
+ $ref: "../../common/1.0/problem.schema.json",
4424
+ description: "why the asset failed (e.g. upload-checksum-mismatch)"
4425
+ },
4426
+ progress: {
4427
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4428
+ description: "upload / processing progress"
4429
+ },
4430
+ mapping: { $ref: "../../dome/1.1/dome.schema.json#/$defs/mapping" },
4431
+ media: { $ref: "#/$defs/media" },
4432
+ thumbnails: {
4433
+ type: "array",
4434
+ items: {
4435
+ type: "object",
4436
+ required: ["size", "url"],
4437
+ properties: { size: { type: "integer", minimum: 16 }, url: { type: "string", format: "uri-reference" } },
4438
+ additionalProperties: false
4439
+ }
4440
+ },
4441
+ tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 64 }, uniqueItems: true },
4442
+ usedBy: {
4443
+ type: "array",
4444
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4445
+ description: "ids of shows referencing the asset"
4446
+ },
4447
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
4448
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
4449
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4450
+ },
4451
+ patternProperties: { "^x-": true },
4452
+ additionalProperties: false,
4453
+ allOf: [
4454
+ {
4455
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
4456
+ then: { required: ["problem"] }
4457
+ }
4458
+ ]
4459
+ },
4460
+ textureTransport: {
4461
+ description: "Shared GPU texture or spare network transport of a live source. Open list.",
4462
+ anyOf: [
4463
+ { enum: ["spout", "syphon", "dmabuf", "capture", "ndi"] },
4464
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
4465
+ ]
4466
+ },
4467
+ texture: {
4468
+ description: "Stream asset fed by another application on the engine's machine (derived by the server from `src`, read-only).",
4469
+ type: "object",
4470
+ required: ["transport", "sender"],
4471
+ properties: {
4472
+ transport: { $ref: "#/$defs/textureTransport" },
4473
+ sender: {
4474
+ type: "string",
4475
+ minLength: 1,
4476
+ maxLength: 256,
4477
+ description: "Spout sender, Syphon server, PipeWire node, capture device or NDI source name"
4478
+ },
4479
+ application: { type: "string", maxLength: 256, description: "Syphon application name" },
4480
+ fallbackUrl: { type: "string", format: "uri" }
4481
+ },
4482
+ additionalProperties: false
4483
+ },
4484
+ textureSource: {
4485
+ description: "A live source seen by the engine (GET /venues/{venueId}/texture-sources, event textureSource.state).",
4486
+ type: "object",
4487
+ required: ["id", "transport", "sender", "status"],
4488
+ properties: {
4489
+ id: {
4490
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4491
+ description: "server-assigned, stable while the sender keeps its name"
4492
+ },
4493
+ transport: { $ref: "#/$defs/textureTransport" },
4494
+ sender: { type: "string", minLength: 1, maxLength: 256 },
4495
+ application: { type: "string", maxLength: 256 },
4496
+ status: { anyOf: [{ enum: ["online", "offline"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }] },
4497
+ width: { type: "integer", minimum: 1 },
4498
+ height: { type: "integer", minimum: 1 },
4499
+ fps: { type: "number", minimum: 0, description: "frames per second measured by the engine" },
4500
+ pixelFormat: { type: "string", maxLength: 32 },
4501
+ assetId: {
4502
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4503
+ description: "the stream asset bound to this source, if any"
4504
+ },
4505
+ node: { type: "string", maxLength: 64, description: "node whose engine sees the source" },
4506
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
4507
+ },
4508
+ patternProperties: { "^x-": true },
4509
+ additionalProperties: false
4510
+ },
4511
+ textureSourcePage: {
4512
+ type: "object",
4513
+ required: ["items", "nextCursor"],
4514
+ properties: {
4515
+ items: { type: "array", items: { $ref: "#/$defs/textureSource" } },
4516
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
4517
+ },
4518
+ additionalProperties: false
4519
+ },
4520
+ type: {
4521
+ anyOf: [
4522
+ { enum: ["video", "image", "audio", "zelim", "boranko", "comics", "realtime", "stream", "dome", "other"] },
4523
+ { type: "string", pattern: "^[a-z][a-z0-9._-]{0,63}$" }
4524
+ ]
4525
+ },
4526
+ status: {
4527
+ anyOf: [
4528
+ { enum: ["uploading", "processing", "ready", "failed"] },
4529
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
4530
+ ]
4531
+ },
4532
+ media: {
4533
+ description: "Probe result (ffprobe): container, streams, duration. `probeUnavailable` when the server has no prober (asset still ready).",
4534
+ type: "object",
4535
+ properties: {
4536
+ container: { type: "string" },
4537
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
4538
+ video: {
4539
+ type: "object",
4540
+ properties: {
4541
+ codec: { type: "string" },
4542
+ resolution: { type: "array", items: { type: "integer", minimum: 1 }, minItems: 2, maxItems: 2 },
4543
+ fps: { type: "number", exclusiveMinimum: 0 },
4544
+ bitDepth: { type: "integer", minimum: 1 },
4545
+ pixelFormat: { type: "string" }
4546
+ },
4547
+ additionalProperties: true
4548
+ },
4549
+ audio: {
4550
+ type: "object",
4551
+ properties: {
4552
+ codec: { type: "string" },
4553
+ channels: { type: "integer", minimum: 1 },
4554
+ layout: { type: "string" },
4555
+ sampleRate: { type: "integer", minimum: 1 },
4556
+ ambisonicOrder: { type: "integer", minimum: 0, maximum: 7 }
4557
+ },
4558
+ additionalProperties: true
4559
+ },
4560
+ probeUnavailable: { type: "boolean" }
4561
+ },
4562
+ additionalProperties: true
4563
+ },
4564
+ input: {
4565
+ description: "POST /assets JSON body: register a finished tus upload or an external URL (streams, CDN).",
4566
+ type: "object",
4567
+ properties: {
4568
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
4569
+ url: { type: "string", format: "uri" },
4570
+ id: {
4571
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4572
+ description: "client-chosen id (e.g. the .dome asset id); default UUIDv7"
4573
+ },
4574
+ name: { type: "string", minLength: 1, maxLength: 512 },
4575
+ type: { $ref: "#/$defs/type" },
4576
+ mapping: { $ref: "../../dome/1.1/dome.schema.json#/$defs/mapping" },
4577
+ tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 64 }, uniqueItems: true },
4578
+ sha256: {
4579
+ $ref: "../../common/1.0/ids.schema.json#/$defs/sha256",
4580
+ description: "expected digest of a URL asset (verified on fetch)"
4581
+ },
4582
+ fallbackUrl: {
4583
+ type: "string",
4584
+ format: "uri",
4585
+ description: "stream assets: source to use while `url` is unavailable, e.g. ndi://\u2026"
4586
+ }
4587
+ },
4588
+ additionalProperties: false,
4589
+ oneOf: [{ required: ["uploadId"] }, { required: ["url"] }]
4590
+ },
4591
+ multipart: {
4592
+ description: "POST /assets multipart/form-data body (simple upload \u2264 100 MB): part `file` + optional JSON fields.",
4593
+ type: "object",
4594
+ required: ["file"],
4595
+ properties: {
4596
+ file: { type: "string", contentMediaType: "application/octet-stream" },
4597
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4598
+ type: { $ref: "#/$defs/type" },
4599
+ tags: { type: "string", description: "comma-separated" }
4600
+ }
4601
+ },
4602
+ patch: {
4603
+ type: "object",
4604
+ minProperties: 1,
4605
+ properties: {
4606
+ name: { type: "string", minLength: 1, maxLength: 512 },
4607
+ type: { $ref: "#/$defs/type" },
4608
+ mapping: { $ref: "../../dome/1.1/dome.schema.json#/$defs/mapping" },
4609
+ tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 64 }, uniqueItems: true }
4610
+ },
4611
+ patternProperties: { "^x-": true },
4612
+ additionalProperties: false
4613
+ },
4614
+ page: {
4615
+ type: "object",
4616
+ required: ["items", "nextCursor"],
4617
+ properties: {
4618
+ items: { type: "array", items: { $ref: "#/$defs/asset" } },
4619
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
4620
+ count: { type: "integer", minimum: 0 }
4621
+ },
4622
+ additionalProperties: false
4623
+ },
4624
+ storage: {
4625
+ description: "GET /storage (replaces /api/v1/content/stats).",
4626
+ type: "object",
4627
+ required: ["totalBytes", "usedBytes", "freeBytes"],
4628
+ properties: {
4629
+ totalBytes: { type: "integer", minimum: 0 },
4630
+ usedBytes: { type: "integer", minimum: 0 },
4631
+ freeBytes: { type: "integer", minimum: 0 },
4632
+ quotaBytes: { anyOf: [{ type: "integer", minimum: 0 }, { type: "null" }] },
4633
+ assets: { $ref: "#/$defs/countBytes" },
4634
+ uploads: { $ref: "#/$defs/countBytes" },
4635
+ byType: { type: "object", additionalProperties: { $ref: "#/$defs/countBytes" } }
4636
+ },
4637
+ additionalProperties: false
4638
+ },
4639
+ countBytes: {
4640
+ type: "object",
4641
+ required: ["count", "bytes"],
4642
+ properties: { count: { type: "integer", minimum: 0 }, bytes: { type: "integer", minimum: 0 } },
4643
+ additionalProperties: false
4644
+ }
4645
+ }
4646
+ },
4647
+ "https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json": {
4648
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4649
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json",
4650
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Live audio analysis (produced by anAntaDigital, L1) and AudioReactive scenes (executed by the media server, L3): sdd-360-art-center 02-specifications \xA70, docs/audio-reactive.md. Root = GET /venues/{venueId}/audio/reactive.",
4651
+ title: "AudioReactive state",
4652
+ allOf: [{ $ref: "#/$defs/state" }],
4653
+ $defs: {
4654
+ status: {
4655
+ description: "Service status. Open list.",
4656
+ anyOf: [
4657
+ { enum: ["disabled", "starting", "running", "degraded", "down"] },
4658
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
4659
+ ]
4660
+ },
4661
+ metric: {
4662
+ description: "A value of the analysis frame. rms, peak: envelope; subBass, mid, highMid, treble: bands; centroid: spectral brightness; onset: attack strength. Open list.",
4663
+ anyOf: [
4664
+ { enum: ["rms", "peak", "subBass", "mid", "highMid", "treble", "centroid", "onset"] },
4665
+ { type: "string", pattern: "^[a-z][A-Za-z0-9]{0,31}$" }
4666
+ ]
4667
+ },
4668
+ bands: {
4669
+ description: "Band energies, each 0..1. Fixed ranges: subBass 30\u2013150 Hz, mid 150\u2013800 Hz, highMid 800\u20134000 Hz, treble 4000\u201316000 Hz.",
4670
+ type: "object",
4671
+ required: ["subBass", "mid", "highMid", "treble"],
4672
+ properties: {
4673
+ subBass: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4674
+ mid: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4675
+ highMid: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4676
+ treble: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" }
4677
+ },
4678
+ additionalProperties: false
4679
+ },
4680
+ frame: {
4681
+ description: "One analysis frame of one input (event audio.analysis). rms, peak and bands are linear amplitude relative to full scale, clamped to 0..1, after the input's envelope (a voice at -24 dBFS reads 0.06). Scene smoothing is applied after this.",
4682
+ type: "object",
4683
+ required: ["inputId", "frame", "captureUs", "rms", "peak", "bands", "centroid", "onset"],
4684
+ properties: {
4685
+ inputId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4686
+ frame: { type: "integer", minimum: 0, description: "frame counter of this input since the analysis started" },
4687
+ captureUs: {
4688
+ type: "integer",
4689
+ minimum: 0,
4690
+ description: "start of the audio block on the analysis node's monotonic clock, \xB5s; comparable only on that node"
4691
+ },
4692
+ rms: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4693
+ peak: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4694
+ rmsDb: { type: "number", description: "dBFS, before normalisation" },
4695
+ peakDb: { type: "number", description: "dBFS, before normalisation" },
4696
+ bands: { $ref: "#/$defs/bands" },
4697
+ centroid: {
4698
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4699
+ description: "centroidHz on a log scale over the input's centroidRange"
4700
+ },
4701
+ centroidHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
4702
+ onset: {
4703
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4704
+ description: "attack strength of this frame; 0 = no attack"
4705
+ },
4706
+ gated: { type: "boolean", description: "the input is below its gate: normalised values are 0" }
4707
+ },
4708
+ patternProperties: { "^x-": true },
4709
+ additionalProperties: false
4710
+ },
4711
+ onset: {
4712
+ description: "One detected attack (event audio.onset).",
4713
+ type: "object",
4714
+ required: ["inputId", "frame", "captureUs", "strength"],
4715
+ properties: {
4716
+ inputId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4717
+ frame: { type: "integer", minimum: 0 },
4718
+ captureUs: { type: "integer", minimum: 0 },
4719
+ strength: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4720
+ band: {
4721
+ enum: ["subBass", "mid", "highMid", "treble"],
4722
+ description: "band with the largest energy rise, when known"
4723
+ }
4724
+ },
4725
+ patternProperties: { "^x-": true },
4726
+ additionalProperties: false
4727
+ },
4728
+ input: {
4729
+ description: "One analysed input (a vocal microphone, an instrument group, a mix).",
4730
+ type: "object",
4731
+ required: ["id"],
4732
+ properties: {
4733
+ id: {
4734
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4735
+ description: "name used by scenes, e.g. vocal, drums, mix"
4736
+ },
4737
+ label: { type: "string", maxLength: 128 },
4738
+ device: {
4739
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4740
+ description: "audio device id (GET \u2026/audio/devices); default = the engine's default capture device"
4741
+ },
4742
+ channels: {
4743
+ type: "array",
4744
+ items: { type: "integer", minimum: 1, maximum: 1024 },
4745
+ minItems: 1,
4746
+ maxItems: 64,
4747
+ uniqueItems: true,
4748
+ description: "1-based capture channels, summed to mono; default [1]"
4749
+ },
4750
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
4751
+ gateDb: { type: "number", minimum: -144, maximum: 0, description: "noise gate threshold, dBFS" },
4752
+ envelope: {
4753
+ type: "object",
4754
+ properties: {
4755
+ attackMs: { type: "number", minimum: 0, maximum: 1e4, default: 8 },
4756
+ decayMs: { type: "number", minimum: 0, maximum: 1e4, default: 120 }
4757
+ },
4758
+ additionalProperties: false
4759
+ },
4760
+ onset: {
4761
+ type: "object",
4762
+ properties: {
4763
+ threshold: {
4764
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4765
+ description: "detector sensitivity: 0 = most sensitive"
4766
+ },
4767
+ refractoryMs: {
4768
+ type: "number",
4769
+ minimum: 0,
4770
+ maximum: 1e4,
4771
+ description: "minimum time between two onsets"
4772
+ }
4773
+ },
4774
+ additionalProperties: false
4775
+ },
4776
+ centroidRange: {
4777
+ description: "Frequencies that map to centroid 0 and 1.",
4778
+ type: "object",
4779
+ required: ["minHz", "maxHz"],
4780
+ properties: {
4781
+ minHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
4782
+ maxHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" }
4783
+ },
4784
+ additionalProperties: false
4785
+ }
4786
+ },
4787
+ patternProperties: { "^x-": true },
4788
+ additionalProperties: false
4789
+ },
4790
+ analysisSettings: {
4791
+ description: "PUT /venues/{venueId}/audio/analysis body: replaces the whole list of inputs.",
4792
+ type: "object",
4793
+ required: ["enabled", "inputs"],
4794
+ properties: {
4795
+ enabled: { type: "boolean" },
4796
+ inputs: { type: "array", items: { $ref: "#/$defs/input" }, maxItems: 64 }
4797
+ },
4798
+ additionalProperties: false
4799
+ },
4800
+ analysisState: {
4801
+ description: "GET /venues/{venueId}/audio/analysis, event audioAnalysis.state.",
4802
+ type: "object",
4803
+ required: ["venueId", "enabled", "status", "inputs"],
4804
+ properties: {
4805
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
4806
+ enabled: { type: "boolean" },
4807
+ status: { $ref: "#/$defs/status" },
4808
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
4809
+ engine: { type: "string", description: "engine that runs the analysis, `<kind>@<node>`" },
4810
+ sampleRate: { type: "integer", minimum: 1 },
4811
+ blockSize: { type: "integer", minimum: 1 },
4812
+ inputs: { type: "array", items: { $ref: "#/$defs/input" }, maxItems: 64 }
4813
+ },
4814
+ patternProperties: { "^x-": true },
4815
+ additionalProperties: false
4816
+ },
4817
+ smoothing: {
4818
+ description: "Asymmetric smoothing of the mapped value, applied by the media server.",
4819
+ type: "object",
4820
+ properties: {
4821
+ attackMs: { type: "number", minimum: 0, maximum: 1e4 },
4822
+ decayMs: { type: "number", minimum: 0, maximum: 1e4 }
4823
+ },
4824
+ additionalProperties: false
4825
+ },
4826
+ range: {
4827
+ description: "Linear map before the curve. inMax > inMin (422 otherwise); outMin > outMax inverts. Defaults 0, 1, 0, 1.",
4828
+ type: "object",
4829
+ properties: {
4830
+ inMin: { type: "number" },
4831
+ inMax: { type: "number" },
4832
+ outMin: { type: "number" },
4833
+ outMax: { type: "number" }
4834
+ },
4835
+ additionalProperties: false
4836
+ },
4837
+ target: {
4838
+ description: "Where a mapping goes. kind osc: an OSC address of an outbound gateway. Open list: a server that does not know a kind answers 422.",
4839
+ type: "object",
4840
+ required: ["kind"],
4841
+ properties: {
4842
+ kind: { anyOf: [{ enum: ["osc"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }] },
4843
+ gateway: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId", description: "gateway id, e.g. resolume" },
4844
+ address: {
4845
+ type: "string",
4846
+ pattern: "^/[^\\s#*,?\\[\\]{}]*$",
4847
+ description: "concrete address, e.g. /composition/layers/1/video/opacity"
4848
+ },
4849
+ type: { enum: ["f", "i"], description: "OSC argument type" },
4850
+ value: { type: "number", description: "trigger mode: the argument to send; default 1" }
4851
+ },
4852
+ if: { properties: { kind: { const: "osc" } }, required: ["kind"] },
4853
+ then: { required: ["gateway", "address", "type"] },
4854
+ patternProperties: { "^x-": true },
4855
+ additionalProperties: false
4856
+ },
4857
+ mapping: {
4858
+ description: "One metric \u2192 one target. continuous: the mapped value is sent on every frame it changes. trigger: one message when the metric rises through `threshold`, then nothing for `cooldownMs`.",
4859
+ type: "object",
4860
+ required: ["id", "mode", "source", "target"],
4861
+ properties: {
4862
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4863
+ mode: { enum: ["continuous", "trigger"] },
4864
+ source: {
4865
+ type: "object",
4866
+ required: ["input", "metric"],
4867
+ properties: {
4868
+ input: {
4869
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
4870
+ description: "input id of the analysis settings"
4871
+ },
4872
+ metric: { $ref: "#/$defs/metric" }
4873
+ },
4874
+ additionalProperties: false
4875
+ },
4876
+ range: { $ref: "#/$defs/range" },
4877
+ curve: {
4878
+ anyOf: [
4879
+ { enum: ["linear", "exp", "log", "s-curve"] },
4880
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
4881
+ ],
4882
+ default: "linear",
4883
+ description: "for t in 0..1: linear t; exp t\xB2; log log10(1 + 9t); s-curve 3t\xB2 \u2212 2t\xB3"
4884
+ },
4885
+ smoothing: { $ref: "#/$defs/smoothing" },
4886
+ threshold: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
4887
+ cooldownMs: { type: "number", minimum: 0, maximum: 6e4 },
4888
+ target: { $ref: "#/$defs/target" }
4889
+ },
4890
+ if: { properties: { mode: { const: "trigger" } }, required: ["mode"] },
4891
+ then: { required: ["threshold"] },
4892
+ patternProperties: { "^x-": true },
4893
+ additionalProperties: false
4894
+ },
4895
+ sceneBody: {
4896
+ type: "object",
4897
+ properties: {
4898
+ title: { $ref: "../../common/1.0/i18n-text.schema.json#/$defs/textOrI18n" },
4899
+ description: { $ref: "../../common/1.0/i18n-text.schema.json#/$defs/textOrI18n" },
4900
+ mappings: { type: "array", items: { $ref: "#/$defs/mapping" }, maxItems: 256 }
4901
+ },
4902
+ patternProperties: { "^x-": true }
4903
+ },
4904
+ scene: {
4905
+ description: "A scene is data: which metrics drive which targets. Mapping ids are unique within the scene.",
4906
+ type: "object",
4907
+ allOf: [{ $ref: "#/$defs/sceneBody" }],
4908
+ required: ["id", "title", "revision", "mappings"],
4909
+ properties: {
4910
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4911
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
4912
+ },
4913
+ unevaluatedProperties: false
4914
+ },
4915
+ sceneInput: {
4916
+ description: "PUT \u2026/audio/reactive/scenes/{sceneId} body.",
4917
+ type: "object",
4918
+ allOf: [{ $ref: "#/$defs/sceneBody" }],
4919
+ required: ["title", "mappings"],
4920
+ unevaluatedProperties: false
4921
+ },
4922
+ scenePage: {
4923
+ type: "object",
4924
+ required: ["items", "nextCursor"],
4925
+ properties: {
4926
+ items: { type: "array", items: { $ref: "#/$defs/scene" } },
4927
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
4928
+ },
4929
+ additionalProperties: false
4930
+ },
4931
+ state: {
4932
+ description: "GET /venues/{venueId}/audio/reactive, event audioReactive.state.",
4933
+ type: "object",
4934
+ required: ["venueId", "enabled", "status", "activeSceneId", "intensity"],
4935
+ properties: {
4936
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/venueRef" },
4937
+ enabled: { type: "boolean" },
4938
+ status: { $ref: "#/$defs/status" },
4939
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
4940
+ activeSceneId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
4941
+ intensity: {
4942
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
4943
+ description: "master amount of all continuous mappings"
4944
+ },
4945
+ stats: {
4946
+ type: "object",
4947
+ additionalProperties: { type: "number" },
4948
+ description: "counters, e.g. framesIn, messagesOut, framesDropped"
4949
+ },
4950
+ resolume: {
4951
+ $ref: "gateway.schema.json#/$defs/resolumeStatus",
4952
+ description: "connection status of gateway `resolume`, the same object as its gateway member, so that playback:read can see it without gateways:manage; absent when no such gateway is configured. Read-only."
4953
+ }
4954
+ },
4955
+ patternProperties: { "^x-": true },
4956
+ additionalProperties: false
4957
+ },
4958
+ patch: {
4959
+ description: "PATCH /venues/{venueId}/audio/reactive. activeSceneId null = no scene. An unknown scene, or a scene whose gateway or input does not exist, is refused with 422.",
4960
+ type: "object",
4961
+ minProperties: 1,
4962
+ properties: {
4963
+ enabled: { type: "boolean" },
4964
+ activeSceneId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
4965
+ intensity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" }
4966
+ },
4967
+ additionalProperties: false
4968
+ }
4969
+ }
4970
+ },
4971
+ "https://freedome.nativemind.us/schemas/api/1.1/audio.schema.json": {
4972
+ $schema: "https://json-schema.org/draft/2020-12/schema",
4973
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/audio.schema.json",
4974
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Audio through the media server (02e \xA75.5, 02c A8): venue audio state + patch, zones, devices (+ test, resonance sweep), presets (02c ananta/1.0 programme / pattern / session, RC2), sessions (+ pause, resume, role \u2192 zone), generator (+ MULTI block), source position. Rules of the 1.1 additions: docs/audio-control.md. Root = GET /venues/{venueId}/audio.",
4975
+ title: "Audio state",
4976
+ type: "object",
4977
+ required: ["venueId", "mode", "masterGainDb", "mute", "revision"],
4978
+ properties: {
4979
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
4980
+ mode: { $ref: "#/$defs/mode" },
4981
+ masterGainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
4982
+ mute: { type: "boolean" },
4983
+ engines: {
4984
+ type: "object",
4985
+ properties: { anantasound: { $ref: "#/$defs/engineRef" }, anantadigital: { $ref: "#/$defs/engineRef" } },
4986
+ additionalProperties: { $ref: "#/$defs/engineRef" }
4987
+ },
4988
+ layoutRevision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
4989
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
4990
+ },
4991
+ patternProperties: { "^x-": true },
4992
+ additionalProperties: false,
4993
+ $defs: {
4994
+ mode: {
4995
+ description: "A8: digital = anAntaDigital only; hybrid = anAntaSound (mechanical devices); combined = both.",
4996
+ anyOf: [{ enum: ["digital", "hybrid", "combined"] }, { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }]
4997
+ },
4998
+ engineRef: {
4999
+ type: "object",
5000
+ required: ["status"],
5001
+ properties: {
5002
+ status: { anyOf: [{ enum: ["up", "degraded", "down", "incompatible", "disabled"] }, { type: "string" }] },
5003
+ version: { type: "string" }
5004
+ },
5005
+ additionalProperties: false
5006
+ },
5007
+ patch: {
5008
+ type: "object",
5009
+ minProperties: 1,
5010
+ properties: {
5011
+ mode: { $ref: "#/$defs/mode" },
5012
+ masterGainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5013
+ mute: { type: "boolean" }
5014
+ },
5015
+ patternProperties: { "^x-": true },
5016
+ additionalProperties: false
5017
+ },
5018
+ eqBand: {
5019
+ type: "object",
5020
+ required: ["type", "frequencyHz"],
5021
+ properties: {
5022
+ type: {
5023
+ anyOf: [
5024
+ { enum: ["peak", "lowShelf", "highShelf", "lowPass", "highPass", "notch", "allPass"] },
5025
+ { type: "string" }
5026
+ ]
5027
+ },
5028
+ frequencyHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5029
+ gainDb: { type: "number", minimum: -48, maximum: 24 },
5030
+ q: { type: "number", exclusiveMinimum: 0, maximum: 100 },
5031
+ enabled: { type: "boolean", default: true }
5032
+ },
5033
+ additionalProperties: false
5034
+ },
5035
+ zoneBody: {
5036
+ type: "object",
5037
+ properties: {
5038
+ name: { type: "string", maxLength: 128 },
5039
+ speakers: {
5040
+ type: "array",
5041
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5042
+ uniqueItems: true
5043
+ },
5044
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5045
+ delayMs: { type: "number", minimum: 0, maximum: 2e3 },
5046
+ eq: { type: "array", items: { $ref: "#/$defs/eqBand" }, maxItems: 32 },
5047
+ mute: { type: "boolean" }
5048
+ },
5049
+ patternProperties: { "^x-": true }
5050
+ },
5051
+ zone: {
5052
+ description: "anAntaDigital zone: a subset of speakers with gain, delay, EQ.",
5053
+ type: "object",
5054
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5055
+ required: ["id", "speakers", "gainDb", "mute", "revision"],
5056
+ properties: {
5057
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5058
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5059
+ },
5060
+ unevaluatedProperties: false
5061
+ },
5062
+ zoneInput: {
5063
+ type: "object",
5064
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5065
+ required: ["speakers"],
5066
+ unevaluatedProperties: false
5067
+ },
5068
+ zonePatch: {
5069
+ type: "object",
5070
+ allOf: [{ $ref: "#/$defs/zoneBody" }],
5071
+ minProperties: 1,
5072
+ unevaluatedProperties: false
5073
+ },
5074
+ zonePage: {
5075
+ type: "object",
5076
+ required: ["items", "nextCursor"],
5077
+ properties: {
5078
+ items: { type: "array", items: { $ref: "#/$defs/zone" } },
5079
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5080
+ },
5081
+ additionalProperties: false
5082
+ },
5083
+ deviceKind: {
5084
+ anyOf: [
5085
+ { enum: ["speaker", "speaker_amp", "microphone", "qrd", "patefon", "karmic_cluster", "resonator"] },
5086
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5087
+ ]
5088
+ },
5089
+ device: {
5090
+ description: "Audio device = .dome audio.devices[] / speakers[] entry + live state (02c \xA76).",
5091
+ type: "object",
5092
+ required: ["id", "kind", "state"],
5093
+ properties: {
5094
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5095
+ kind: { $ref: "#/$defs/deviceKind" },
5096
+ name: { type: "string" },
5097
+ config: { type: "object", description: "the .dome audio device / speaker entry", additionalProperties: true },
5098
+ state: {
5099
+ type: "object",
5100
+ required: ["online"],
5101
+ properties: {
5102
+ online: { type: "boolean" },
5103
+ engine: { anyOf: [{ enum: ["anantasound", "anantadigital"] }, { type: "string" }] },
5104
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5105
+ mute: { type: "boolean" },
5106
+ levelDb: { type: "number", maximum: 24, description: "last meter value (dBFS)" },
5107
+ temperatureC: { type: "number" },
5108
+ firmware: { type: "string" },
5109
+ faults: { type: "array", items: { type: "string" } },
5110
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5111
+ },
5112
+ additionalProperties: true
5113
+ }
5114
+ },
5115
+ patternProperties: { "^x-": true },
5116
+ additionalProperties: false
5117
+ },
5118
+ devicePatch: {
5119
+ type: "object",
5120
+ minProperties: 1,
5121
+ properties: {
5122
+ name: { type: "string" },
5123
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
5124
+ mute: { type: "boolean" },
5125
+ config: { type: "object", additionalProperties: true }
5126
+ },
5127
+ additionalProperties: false
5128
+ },
5129
+ devicePage: {
5130
+ type: "object",
5131
+ required: ["items", "nextCursor"],
5132
+ properties: {
5133
+ items: { type: "array", items: { $ref: "#/$defs/device" } },
5134
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5135
+ },
5136
+ additionalProperties: false
5137
+ },
5138
+ deviceTest: {
5139
+ type: "object",
5140
+ properties: {
5141
+ kind: { anyOf: [{ enum: ["ping", "tone", "selftest", "strike"] }, { type: "string" }], default: "ping" },
5142
+ frequencyHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5143
+ gainDb: { type: "number", minimum: -96, maximum: 0 },
5144
+ durationS: { type: "number", exclusiveMinimum: 0, maximum: 30 }
5145
+ },
5146
+ additionalProperties: false
5147
+ },
5148
+ deviceTestResult: {
5149
+ type: "object",
5150
+ required: ["deviceId", "ok"],
5151
+ properties: {
5152
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5153
+ ok: { type: "boolean" },
5154
+ latencyMs: { type: "number", minimum: 0 },
5155
+ detail: { type: "string" },
5156
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
5157
+ },
5158
+ additionalProperties: false
5159
+ },
5160
+ presetKind: { enum: ["programme", "pattern", "session"] },
5161
+ preset: {
5162
+ description: "Installed L6 preset: an ananta/1.0 programme, pattern or session document (02c, RC2).",
5163
+ type: "object",
5164
+ required: ["id", "kind", "revision", "document"],
5165
+ properties: {
5166
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5167
+ kind: { $ref: "#/$defs/presetKind" },
5168
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
5169
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
5170
+ document: { type: "object" },
5171
+ sha256: { $ref: "../../common/1.0/ids.schema.json#/$defs/sha256" },
5172
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5173
+ },
5174
+ additionalProperties: false,
5175
+ allOf: [
5176
+ {
5177
+ if: { properties: { kind: { const: "programme" } }, required: ["kind"] },
5178
+ then: { properties: { document: { $ref: "../../ananta/1.0/programme.schema.json" } } }
5179
+ },
5180
+ {
5181
+ if: { properties: { kind: { const: "pattern" } }, required: ["kind"] },
5182
+ then: { properties: { document: { $ref: "../../ananta/1.0/pattern.schema.json" } } }
5183
+ },
5184
+ {
5185
+ if: { properties: { kind: { const: "session" } }, required: ["kind"] },
5186
+ then: { properties: { document: { $ref: "../../ananta/1.0/session.schema.json" } } }
5187
+ }
5188
+ ]
5189
+ },
5190
+ presetInput: {
5191
+ description: "PUT /venues/{venueId}/audio/presets/{presetId} body.",
5192
+ type: "object",
5193
+ required: ["kind", "document"],
5194
+ properties: { kind: { $ref: "#/$defs/presetKind" }, document: { type: "object" } },
5195
+ additionalProperties: false,
5196
+ allOf: [
5197
+ {
5198
+ if: { properties: { kind: { const: "programme" } }, required: ["kind"] },
5199
+ then: { properties: { document: { $ref: "../../ananta/1.0/programme.schema.json" } } }
5200
+ },
5201
+ {
5202
+ if: { properties: { kind: { const: "pattern" } }, required: ["kind"] },
5203
+ then: { properties: { document: { $ref: "../../ananta/1.0/pattern.schema.json" } } }
5204
+ },
5205
+ {
5206
+ if: { properties: { kind: { const: "session" } }, required: ["kind"] },
5207
+ then: { properties: { document: { $ref: "../../ananta/1.0/session.schema.json" } } }
5208
+ }
5209
+ ]
5210
+ },
5211
+ presetPage: {
5212
+ type: "object",
5213
+ required: ["items", "nextCursor"],
5214
+ properties: {
5215
+ items: {
5216
+ type: "array",
5217
+ items: {
5218
+ type: "object",
5219
+ required: ["id", "kind", "revision"],
5220
+ properties: {
5221
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5222
+ kind: { $ref: "#/$defs/presetKind" },
5223
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
5224
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" }
5225
+ },
5226
+ additionalProperties: false
5227
+ }
5228
+ },
5229
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5230
+ },
5231
+ additionalProperties: false
5232
+ },
5233
+ targets: {
5234
+ type: "object",
5235
+ properties: {
5236
+ devices: {
5237
+ type: "array",
5238
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5239
+ uniqueItems: true
5240
+ },
5241
+ zones: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, uniqueItems: true },
5242
+ speakers: {
5243
+ type: "array",
5244
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5245
+ uniqueItems: true
5246
+ }
5247
+ },
5248
+ additionalProperties: false
5249
+ },
5250
+ sessionStart: {
5251
+ description: "POST /venues/{venueId}/audio/sessions: run an installed preset (programme or session).",
5252
+ type: "object",
5253
+ required: ["presetId"],
5254
+ properties: {
5255
+ presetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5256
+ gainDb: { type: "number", minimum: -96, maximum: 12 },
5257
+ targets: { $ref: "#/$defs/targets" },
5258
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5259
+ loop: { type: "boolean" },
5260
+ roleZones: { $ref: "#/$defs/roleZones" }
5261
+ },
5262
+ additionalProperties: false
5263
+ },
5264
+ roleZones: {
5265
+ description: "Preset role \u2192 the zones it plays in (02c \xA75.1, \xA75.3). Only for roles of class `speakers`. A role not named plays in `targets.zones`, or on the main bus when there are none.",
5266
+ type: "object",
5267
+ propertyNames: { $ref: "../../ananta/1.0/programme.schema.json#/$defs/id" },
5268
+ additionalProperties: {
5269
+ type: "array",
5270
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5271
+ minItems: 1,
5272
+ uniqueItems: true
5273
+ }
5274
+ },
5275
+ session: {
5276
+ type: "object",
5277
+ required: ["id", "venueId", "presetId", "status", "startedAt"],
5278
+ properties: {
5279
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5280
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5281
+ presetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5282
+ status: {
5283
+ anyOf: [{ enum: ["starting", "running", "paused", "finished", "stopped", "failed"] }, { type: "string" }]
5284
+ },
5285
+ engines: { type: "array", items: { type: "string" } },
5286
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
5287
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
5288
+ itemIndex: { type: "integer", minimum: 0 },
5289
+ targets: { $ref: "#/$defs/targets" },
5290
+ roleZones: { $ref: "#/$defs/roleZones" },
5291
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
5292
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5293
+ endedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5294
+ },
5295
+ additionalProperties: false
5296
+ },
5297
+ sessionPage: {
5298
+ type: "object",
5299
+ required: ["items", "nextCursor"],
5300
+ properties: {
5301
+ items: { type: "array", items: { $ref: "#/$defs/session" } },
5302
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5303
+ },
5304
+ additionalProperties: false
5305
+ },
5306
+ generator: {
5307
+ description: "Test / MULTI generator (iScillator semantics; replaces generate_test_signal).",
5308
+ type: "object",
5309
+ required: ["signal"],
5310
+ properties: {
5311
+ signal: { anyOf: [{ enum: ["sine", "pink", "white", "sweep", "multi"] }, { type: "string" }] },
5312
+ frequencies: {
5313
+ type: "array",
5314
+ items: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5315
+ maxItems: 64,
5316
+ description: "sine: [f]; sweep: [from, to]; multi: up to 64 partials"
5317
+ },
5318
+ gainDb: { type: "number", minimum: -96, maximum: 0 },
5319
+ durationS: { type: "number", exclusiveMinimum: 0 },
5320
+ targets: { $ref: "#/$defs/targets" },
5321
+ multi: { $ref: "#/$defs/generatorMulti" }
5322
+ },
5323
+ additionalProperties: false
5324
+ },
5325
+ generatorMulti: {
5326
+ description: "NmSoundParams of a MULTI generator, the same object as `multi` of an ananta/1.0 programme segment: `program`, `target`, `enviroment` (spelling kept), `modulation`, `multi`, `channel`, `audio`, `compatJava`. `channel` is the angle code: 0, 1, 2, 60, 90, 120, 137, 180; 1000\u20261999 binaural, right channel at base + (code \u2212 1000) Hz; 5000\u20265999, 6000\u20266999, 7000\u20267999 stereo phase offsets (no multichannel output). Only with `signal: multi`, and without `frequencies`: anything else is 422. Codes and bit-exactness: docs/audio-control.md.",
5327
+ $ref: "../../ananta/1.0/programme.schema.json#/$defs/multi"
5328
+ },
5329
+ generatorState: {
5330
+ type: "object",
5331
+ required: ["running"],
5332
+ properties: {
5333
+ running: { type: "boolean" },
5334
+ settings: { $ref: "#/$defs/generator" },
5335
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5336
+ },
5337
+ additionalProperties: false
5338
+ },
5339
+ deviceSweep: {
5340
+ description: "POST /venues/{venueId}/audio/devices/{deviceId}/sweep body: resonance sweep of one resonator channel (`Calibration.Sweep` of ananta.sound.v1). Every member is optional; the defaults are the engine's.",
5341
+ type: "object",
5342
+ properties: {
5343
+ actuator: {
5344
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
5345
+ description: "resonator channel id; absent = the first one"
5346
+ },
5347
+ fromHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz", default: 20 },
5348
+ toHz: {
5349
+ $ref: "../../common/1.0/units.schema.json#/$defs/hertz",
5350
+ default: 2e3,
5351
+ description: "above `fromHz`, else 422"
5352
+ },
5353
+ durationS: { type: "number", exclusiveMinimum: 0, maximum: 300, default: 5 },
5354
+ level: {
5355
+ type: "number",
5356
+ exclusiveMinimum: 0,
5357
+ maximum: 1,
5358
+ default: 0.3,
5359
+ description: "share of the channel's limit"
5360
+ },
5361
+ modelHz: {
5362
+ type: "array",
5363
+ items: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5364
+ maxItems: 64,
5365
+ description: "expected partials. With them the partials and warnings are stored with the device's calibration; without them the sweep only reports peaks."
5366
+ },
5367
+ tolerance: {
5368
+ type: "number",
5369
+ exclusiveMinimum: 0,
5370
+ maximum: 1,
5371
+ default: 0.01,
5372
+ description: "relative; four times this and a partial counts as gone (`cracked`)"
5373
+ }
5374
+ },
5375
+ additionalProperties: false
5376
+ },
5377
+ sourcePosition: {
5378
+ description: "Interactive / realtime source position (spherical, listener at the dome centre).",
5379
+ type: "object",
5380
+ required: ["azimuth", "elevation"],
5381
+ properties: {
5382
+ azimuth: {
5383
+ type: "number",
5384
+ minimum: -360,
5385
+ maximum: 360,
5386
+ description: "degrees, 0 = front, positive = left (ambisonic convention)"
5387
+ },
5388
+ elevation: { type: "number", minimum: -90, maximum: 90 },
5389
+ distance: { type: "number", exclusiveMinimum: 0, description: "metres" },
5390
+ rampMs: { type: "number", minimum: 0, maximum: 1e4 }
5391
+ },
5392
+ additionalProperties: false
5393
+ }
5394
+ }
5395
+ },
5396
+ "https://freedome.nativemind.us/schemas/api/1.1/auth.schema.json": {
5397
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5398
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/auth.schema.json",
5399
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Authentication bodies (02e \xA73.6, \xA75.1): sessions, refresh, cloud token exchange, pairing, principal. Root = token pair returned by createSession / refreshSession / exchangeCloudToken.",
5400
+ title: "Session tokens",
5401
+ allOf: [{ $ref: "#/$defs/tokens" }],
5402
+ $defs: {
5403
+ role: {
5404
+ description: "Role = scope bundle (02e \xA73.6). Open enum: clients map unknown roles to UNKNOWN.",
5405
+ anyOf: [
5406
+ { enum: ["guest", "operator", "admin", "superadmin"] },
5407
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5408
+ ]
5409
+ },
5410
+ scopes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/scope" }, uniqueItems: true },
5411
+ tokens: {
5412
+ type: "object",
5413
+ required: ["accessToken", "tokenType", "expiresIn"],
5414
+ properties: {
5415
+ accessToken: { type: "string", minLength: 16, description: "access JWT (15 min)" },
5416
+ tokenType: { const: "Bearer" },
5417
+ expiresIn: { type: "integer", minimum: 1, description: "access token lifetime in seconds" },
5418
+ refreshToken: {
5419
+ type: "string",
5420
+ minLength: 16,
5421
+ description: "rotating refresh token; reuse of a rotated one revokes the whole family"
5422
+ },
5423
+ refreshExpiresIn: { type: "integer", minimum: 1 },
5424
+ scopes: { $ref: "#/$defs/scopes" },
5425
+ principal: { $ref: "#/$defs/principal" }
5426
+ },
5427
+ patternProperties: { "^x-": true },
5428
+ additionalProperties: false
5429
+ },
5430
+ sessionRequest: {
5431
+ description: "POST /auth/session (local account).",
5432
+ type: "object",
5433
+ required: ["username", "password"],
5434
+ properties: {
5435
+ username: { type: "string", minLength: 1, maxLength: 128 },
5436
+ password: { type: "string", minLength: 1, maxLength: 1024, writeOnly: true },
5437
+ client: { $ref: "#/$defs/clientInfo" }
5438
+ },
5439
+ additionalProperties: false
5440
+ },
5441
+ refreshRequest: {
5442
+ description: "POST /auth/refresh.",
5443
+ type: "object",
5444
+ required: ["refreshToken"],
5445
+ properties: { refreshToken: { type: "string", minLength: 16 } },
5446
+ additionalProperties: false
5447
+ },
5448
+ tokenExchangeRequest: {
5449
+ description: "POST /auth/token-exchange: an L7 (freedome.nativemind.us) access JWT for a local session; linked installations only (JWKS of the cloud).",
5450
+ type: "object",
5451
+ required: ["subjectToken"],
5452
+ properties: {
5453
+ subjectToken: { type: "string", minLength: 16 },
5454
+ subjectTokenType: {
5455
+ const: "urn:ietf:params:oauth:token-type:jwt",
5456
+ default: "urn:ietf:params:oauth:token-type:jwt"
5457
+ },
5458
+ client: { $ref: "#/$defs/clientInfo" }
5459
+ },
5460
+ additionalProperties: false
5461
+ },
5462
+ clientInfo: {
5463
+ type: "object",
5464
+ properties: {
5465
+ app: { type: "string", minLength: 1, maxLength: 128 },
5466
+ appVersion: { type: "string", maxLength: 64 },
5467
+ deviceName: { type: "string", maxLength: 128 }
5468
+ },
5469
+ additionalProperties: false
5470
+ },
5471
+ pairingRequest: {
5472
+ description: "POST /auth/pairings (anonymous; ecosystem app asks for a guest token).",
5473
+ type: "object",
5474
+ required: ["app", "deviceName"],
5475
+ properties: {
5476
+ app: {
5477
+ type: "string",
5478
+ minLength: 1,
5479
+ maxLength: 128,
5480
+ description: "application id, e.g. net.nativemind.starveda"
5481
+ },
5482
+ deviceName: { type: "string", minLength: 1, maxLength: 128 },
5483
+ requestedRole: { $ref: "#/$defs/role" }
5484
+ },
5485
+ additionalProperties: false
5486
+ },
5487
+ pairing: {
5488
+ description: "Pairing state. `code` (6 digits) is returned only to the requester on creation and shown on the dome / in Manager; `tokens` only once, to the requester's first poll after approval.",
5489
+ type: "object",
5490
+ required: ["pairingId", "status", "expiresAt"],
5491
+ properties: {
5492
+ pairingId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5493
+ status: {
5494
+ anyOf: [
5495
+ { enum: ["pending", "approved", "denied", "expired"] },
5496
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
5497
+ ]
5498
+ },
5499
+ code: { type: "string", pattern: "^[0-9]{6}$" },
5500
+ qr: { type: "string", pattern: "^freedome://pair\\?", description: "freedome://pair?host=\u2026&code=\u2026" },
5501
+ app: { type: "string" },
5502
+ deviceName: { type: "string" },
5503
+ role: { $ref: "#/$defs/role" },
5504
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5505
+ tokens: { $ref: "#/$defs/tokens" }
5506
+ },
5507
+ patternProperties: { "^x-": true },
5508
+ additionalProperties: false
5509
+ },
5510
+ pairingApproval: {
5511
+ description: "POST /auth/pairings/{pairingId}/approve body (operator side).",
5512
+ type: "object",
5513
+ properties: {
5514
+ approve: { type: "boolean", default: true, description: "false = deny" },
5515
+ role: { $ref: "#/$defs/role", description: "granted role (default guest)" },
5516
+ ttlSec: { type: "integer", minimum: 60, maximum: 31536e3 }
5517
+ },
5518
+ additionalProperties: false
5519
+ },
5520
+ principal: {
5521
+ description: "GET /auth/me: who is calling and what they may do.",
5522
+ type: "object",
5523
+ required: ["subject", "kind", "role", "scopes"],
5524
+ properties: {
5525
+ subject: { type: "string", minLength: 1, description: "user id, api key id or pairing id" },
5526
+ kind: {
5527
+ anyOf: [
5528
+ { enum: ["user", "apiKey", "pairing", "cloud", "anonymous"] },
5529
+ { type: "string", pattern: "^[a-zA-Z]{1,32}$" }
5530
+ ]
5531
+ },
5532
+ name: { type: "string" },
5533
+ role: { $ref: "#/$defs/role" },
5534
+ scopes: { $ref: "#/$defs/scopes" },
5535
+ origin: {
5536
+ type: "string",
5537
+ description: "transport the request came in on (rest, graphql, ws, socketio, osc, grpc)"
5538
+ },
5539
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5540
+ },
5541
+ patternProperties: { "^x-": true },
5542
+ additionalProperties: false
5543
+ }
5544
+ }
5545
+ },
5546
+ "https://freedome.nativemind.us/schemas/api/1.1/calibration-job.schema.json": {
5547
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5548
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/calibration-job.schema.json",
5549
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Calibration job (02e \xA75.2, 02a \xA72.5 / \xA74.7, 02b \xA74.5); `audio-device-sweep` jobs are started by startAudioDeviceSweep (docs/audio-control.md). Root = GET \u2026/calibration/jobs/{jobId}.",
5550
+ title: "Calibration job",
5551
+ allOf: [{ $ref: "#/$defs/calibrationJob" }],
5552
+ $defs: {
5553
+ calibrationJob: {
5554
+ type: "object",
5555
+ required: ["id", "venueId", "kind", "status", "steps", "createdAt"],
5556
+ properties: {
5557
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5558
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5559
+ kind: { $ref: "#/$defs/kind" },
5560
+ status: { $ref: "job.schema.json#/$defs/status" },
5561
+ progress: { type: "number", minimum: 0, maximum: 1 },
5562
+ displays: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
5563
+ speakers: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
5564
+ steps: {
5565
+ type: "array",
5566
+ items: {
5567
+ type: "object",
5568
+ required: ["id", "status"],
5569
+ properties: {
5570
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5571
+ name: { type: "string" },
5572
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5573
+ status: { enum: ["pending", "running", "awaiting_input", "done", "failed", "skipped"] }
5574
+ },
5575
+ additionalProperties: false
5576
+ }
5577
+ },
5578
+ currentStep: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
5579
+ awaiting: {
5580
+ description: "Set while status = awaiting_input: what the operator / camera must provide.",
5581
+ anyOf: [{ type: "null" }, { $ref: "#/$defs/awaiting" }]
5582
+ },
5583
+ errors: {
5584
+ description: "Per-display residual error after solving.",
5585
+ type: "array",
5586
+ items: {
5587
+ type: "object",
5588
+ required: ["displayId"],
5589
+ properties: {
5590
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5591
+ meanError: { type: "number", minimum: 0 },
5592
+ maxError: { type: "number", minimum: 0 },
5593
+ unit: { type: "string" }
5594
+ },
5595
+ additionalProperties: false
5596
+ }
5597
+ },
5598
+ result: {
5599
+ description: "Proposed calibration (applied to the venue by POST \u2026/apply).",
5600
+ anyOf: [{ type: "null" }, { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" }]
5601
+ },
5602
+ sweep: { $ref: "#/$defs/sweep" },
5603
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
5604
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5605
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5606
+ },
5607
+ additionalProperties: false
5608
+ },
5609
+ sweep: {
5610
+ description: "Kind `audio-device-sweep`: what was asked; `peaks`, `partials` and `warnings` once the job has succeeded.",
5611
+ type: "object",
5612
+ required: ["deviceId"],
5613
+ properties: {
5614
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5615
+ actuator: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5616
+ fromHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5617
+ toHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5618
+ durationS: { type: "number", exclusiveMinimum: 0 },
5619
+ level: { type: "number", exclusiveMinimum: 0, maximum: 1 },
5620
+ peaks: {
5621
+ description: "Strongest first.",
5622
+ type: "array",
5623
+ items: {
5624
+ type: "object",
5625
+ required: ["hz", "db"],
5626
+ properties: {
5627
+ hz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5628
+ db: { type: "number" },
5629
+ q: { type: "number", minimum: 0 }
5630
+ },
5631
+ additionalProperties: false
5632
+ }
5633
+ },
5634
+ partials: {
5635
+ description: "Comparison with `modelHz`; `measuredHz` is absent for a partial with no peak near it.",
5636
+ type: "array",
5637
+ items: {
5638
+ type: "object",
5639
+ required: ["modelHz"],
5640
+ properties: {
5641
+ modelHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" },
5642
+ measuredHz: { $ref: "../../common/1.0/units.schema.json#/$defs/hertz" }
5643
+ },
5644
+ additionalProperties: false
5645
+ }
5646
+ },
5647
+ warnings: { type: "array", items: { anyOf: [{ enum: ["detuned", "cracked", "weak"] }, { type: "string" }] } }
5648
+ },
5649
+ additionalProperties: false
5650
+ },
5651
+ kind: {
5652
+ anyOf: [
5653
+ { enum: ["visual-camera", "visual-manual", "visual-import", "audio-room", "audio-speaker-check"] },
5654
+ { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" }
5655
+ ]
5656
+ },
5657
+ start: {
5658
+ description: "POST /venues/{venueId}/calibration/jobs body.",
5659
+ type: "object",
5660
+ required: ["kind"],
5661
+ properties: {
5662
+ kind: { $ref: "#/$defs/kind" },
5663
+ displays: {
5664
+ type: "array",
5665
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5666
+ uniqueItems: true
5667
+ },
5668
+ speakers: {
5669
+ type: "array",
5670
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5671
+ uniqueItems: true
5672
+ },
5673
+ options: { type: "object", description: "kind-specific (grid density, camera model, import format \u2026)" }
5674
+ },
5675
+ additionalProperties: false
5676
+ },
5677
+ capture: {
5678
+ description: "POST \u2026/captures JSON body: a camera frame uploaded before (tus upload id); multipart/form-data with an `image` part is the alternative (\u2264 32 MB).",
5679
+ type: "object",
5680
+ required: ["uploadId"],
5681
+ properties: {
5682
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5683
+ stepId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }
5684
+ },
5685
+ additionalProperties: false
5686
+ },
5687
+ awaiting: {
5688
+ type: "object",
5689
+ required: ["kind"],
5690
+ properties: {
5691
+ kind: { anyOf: [{ enum: ["camera-capture", "manual-adjust", "confirm"] }, { type: "string" }] },
5692
+ stepId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5693
+ displayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5694
+ pattern: { $ref: "display.schema.json#/$defs/testPattern" },
5695
+ instructions: { $ref: "../../common/1.0/i18n-text.schema.json" }
5696
+ },
5697
+ additionalProperties: false
5698
+ },
5699
+ page: {
5700
+ type: "object",
5701
+ required: ["items", "nextCursor"],
5702
+ properties: {
5703
+ items: { type: "array", items: { $ref: "#/$defs/calibrationJob" } },
5704
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5705
+ },
5706
+ additionalProperties: false
5707
+ }
5708
+ }
5709
+ },
5710
+ "https://freedome.nativemind.us/schemas/api/1.1/client.schema.json": {
5711
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5712
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/client.schema.json",
5713
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Connected client devices (02e \xA75.6 /clients: churyavzrosliy device fx \u2014 vibration, camera, sensors, biometric). Root = registered client.",
5714
+ title: "Client",
5715
+ allOf: [{ $ref: "#/$defs/client" }],
5716
+ $defs: {
5717
+ capability: {
5718
+ anyOf: [
5719
+ {
5720
+ enum: [
5721
+ "vibration",
5722
+ "camera",
5723
+ "biometric",
5724
+ "sensors.accelerometer",
5725
+ "sensors.gyroscope",
5726
+ "sensors.magnetometer",
5727
+ "sensors.heartRate",
5728
+ "sensors.location"
5729
+ ]
5730
+ },
5731
+ { type: "string", pattern: "^[a-z][A-Za-z0-9.]{0,63}$" }
5732
+ ]
5733
+ },
5734
+ client: {
5735
+ type: "object",
5736
+ required: ["id", "app", "deviceName", "capabilities", "registeredAt"],
5737
+ properties: {
5738
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
5739
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
5740
+ appVersion: { type: "string" },
5741
+ deviceName: { type: "string", maxLength: 128 },
5742
+ platform: { type: "string" },
5743
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true },
5744
+ principal: { type: "string" },
5745
+ commandsTopic: {
5746
+ $ref: "../../common/1.0/ids.schema.json#/$defs/topic",
5747
+ description: "clients/{clientId}/commands"
5748
+ },
5749
+ registeredAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5750
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5751
+ },
5752
+ additionalProperties: false
5753
+ },
5754
+ input: {
5755
+ type: "object",
5756
+ required: ["app", "deviceName"],
5757
+ properties: {
5758
+ app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" },
5759
+ appVersion: { type: "string", maxLength: 64 },
5760
+ deviceName: { type: "string", minLength: 1, maxLength: 128 },
5761
+ platform: { type: "string", maxLength: 64 },
5762
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true, default: [] }
5763
+ },
5764
+ additionalProperties: false
5765
+ },
5766
+ page: {
5767
+ type: "object",
5768
+ required: ["items", "nextCursor"],
5769
+ properties: {
5770
+ items: { type: "array", items: { $ref: "#/$defs/client" } },
5771
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5772
+ },
5773
+ additionalProperties: false
5774
+ },
5775
+ telemetry: {
5776
+ description: "POST /clients/{clientId}/telemetry: batched sensor samples (replaces sendSensorData).",
5777
+ type: "object",
5778
+ required: ["samples"],
5779
+ properties: {
5780
+ samples: {
5781
+ type: "array",
5782
+ minItems: 1,
5783
+ maxItems: 1e3,
5784
+ items: {
5785
+ type: "object",
5786
+ required: ["ts", "sensor", "values"],
5787
+ properties: {
5788
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5789
+ sensor: { $ref: "#/$defs/capability" },
5790
+ values: { type: "array", items: { type: "number" }, maxItems: 64 },
5791
+ unit: { type: "string" }
5792
+ },
5793
+ additionalProperties: false
5794
+ }
5795
+ }
5796
+ },
5797
+ additionalProperties: false
5798
+ },
5799
+ command: {
5800
+ description: "Server \u2192 device command, delivered as event client.command on clients/{clientId}/commands.",
5801
+ type: "object",
5802
+ required: ["command"],
5803
+ properties: {
5804
+ command: {
5805
+ anyOf: [
5806
+ { enum: ["vibrate", "capture", "sensors", "biometric"] },
5807
+ { type: "string", pattern: "^[a-z][A-Za-z0-9_.-]{0,63}$" }
5808
+ ]
5809
+ },
5810
+ params: { type: "object", additionalProperties: true },
5811
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5812
+ },
5813
+ additionalProperties: false
5814
+ }
5815
+ }
5816
+ },
5817
+ "https://freedome.nativemind.us/schemas/api/1.1/device.schema.json": {
5818
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5819
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/device.schema.json",
5820
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Visual device agents speaking freedome.device.v1 (projector variants FD-VP-*, master PR3, MS 1.MS.18): discovery, pairing, binding to a display, telemetry. Root = GET /devices/{deviceId}.",
5821
+ title: "Visual device",
5822
+ allOf: [{ $ref: "#/$defs/device" }],
5823
+ $defs: {
5824
+ device: {
5825
+ type: "object",
5826
+ required: ["id", "variant", "address", "paired", "state"],
5827
+ properties: {
5828
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5829
+ serial: { type: "string" },
5830
+ product: { type: "string" },
5831
+ variant: { type: "string", description: "fd-vp-f-1, fd-vp-p-s, \u2026" },
5832
+ hwRevision: { type: "string" },
5833
+ agentVersion: { type: "string" },
5834
+ protocolVersion: { type: "string" },
5835
+ capabilities: { type: "array", items: { type: "string" }, uniqueItems: true },
5836
+ address: { type: "string", description: "host:port of the agent" },
5837
+ paired: { type: "boolean" },
5838
+ displayId: {
5839
+ anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }],
5840
+ description: "venue display this device drives"
5841
+ },
5842
+ state: {
5843
+ type: "object",
5844
+ required: ["online"],
5845
+ properties: {
5846
+ online: { type: "boolean" },
5847
+ power: {
5848
+ anyOf: [{ enum: ["on", "off", "standby", "warming", "cooling", "unknown"] }, { type: "string" }]
5849
+ },
5850
+ temperatureC: { type: "number" },
5851
+ fanRpm: { type: "number", minimum: 0 },
5852
+ lampHours: { type: "number", minimum: 0 },
5853
+ battery: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
5854
+ faults: { type: "array", items: { type: "string" } },
5855
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
5856
+ },
5857
+ additionalProperties: true
5858
+ }
5859
+ },
5860
+ patternProperties: { "^x-": true },
5861
+ additionalProperties: false
5862
+ },
5863
+ page: {
5864
+ type: "object",
5865
+ required: ["items", "nextCursor"],
5866
+ properties: {
5867
+ items: { type: "array", items: { $ref: "#/$defs/device" } },
5868
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
5869
+ },
5870
+ additionalProperties: false
5871
+ },
5872
+ pairingStarted: {
5873
+ description: "POST /devices/{deviceId}/pairing: the device shows a code (display / LED); the operator confirms it.",
5874
+ type: "object",
5875
+ required: ["deviceId", "expiresAt"],
5876
+ properties: {
5877
+ deviceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5878
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5879
+ codeLength: { type: "integer", minimum: 4, maximum: 8 }
5880
+ },
5881
+ additionalProperties: false
5882
+ },
5883
+ pairingConfirm: {
5884
+ type: "object",
5885
+ required: ["code"],
5886
+ properties: { code: { type: "string", pattern: "^[0-9A-Z]{4,8}$" } },
5887
+ additionalProperties: false
5888
+ },
5889
+ bind: {
5890
+ type: "object",
5891
+ required: ["displayId"],
5892
+ properties: {
5893
+ displayId: {
5894
+ anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }],
5895
+ description: "null unbinds"
5896
+ }
5897
+ },
5898
+ additionalProperties: false
5899
+ }
5900
+ }
5901
+ },
5902
+ "https://freedome.nativemind.us/schemas/api/1.1/display.schema.json": {
5903
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5904
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/display.schema.json",
5905
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Display resource (02e \xA74, \xA75.2): `config` = the .dome 1.1 display entry, `state` = live device state. Root = GET representation.",
5906
+ title: "Display",
5907
+ allOf: [{ $ref: "#/$defs/display" }],
5908
+ $defs: {
5909
+ display: {
5910
+ type: "object",
5911
+ required: ["id", "venueId", "config", "state"],
5912
+ properties: {
5913
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5914
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
5915
+ revision: {
5916
+ $ref: "../../common/1.0/ids.schema.json#/$defs/revision",
5917
+ description: "venue revision the config belongs to"
5918
+ },
5919
+ config: { $ref: "../../dome/1.1/dome.schema.json#/$defs/display" },
5920
+ state: { $ref: "#/$defs/state" }
5921
+ },
5922
+ additionalProperties: false
5923
+ },
5924
+ state: {
5925
+ type: "object",
5926
+ required: ["online"],
5927
+ properties: {
5928
+ online: { type: "boolean", description: "engine output / device agent reachable" },
5929
+ power: {
5930
+ anyOf: [
5931
+ { enum: ["on", "off", "standby", "warming", "cooling", "unknown"] },
5932
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
5933
+ ]
5934
+ },
5935
+ shutter: { enum: ["open", "closed", "unknown"] },
5936
+ signal: { type: "boolean" },
5937
+ temperatureC: { type: ["number", "null"] },
5938
+ pattern: { anyOf: [{ $ref: "#/$defs/testPattern" }, { type: "null" }] },
5939
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
5940
+ capabilities: {
5941
+ type: "array",
5942
+ items: { anyOf: [{ enum: ["power", "shutter", "identify", "temperature", "pjlink"] }, { type: "string" }] }
5943
+ },
5944
+ faults: {
5945
+ type: "array",
5946
+ items: {
5947
+ type: "object",
5948
+ required: ["code"],
5949
+ properties: { code: { type: "string" }, detail: { type: "string" } },
5950
+ additionalProperties: false
5951
+ }
5952
+ }
5953
+ },
5954
+ additionalProperties: false
5955
+ },
5956
+ testPattern: {
5957
+ description: "PUT /venues/{venueId}/displays/{displayId}/pattern body (engine freedome_pattern_*).",
5958
+ type: "object",
5959
+ required: ["kind"],
5960
+ properties: {
5961
+ kind: {
5962
+ anyOf: [
5963
+ {
5964
+ enum: [
5965
+ "off",
5966
+ "grid",
5967
+ "checker",
5968
+ "gray-ramp",
5969
+ "colour-bars",
5970
+ "dots",
5971
+ "crosshair",
5972
+ "solid",
5973
+ "structured-light"
5974
+ ]
5975
+ },
5976
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
5977
+ ]
5978
+ },
5979
+ params: {
5980
+ description: "Kind-specific: grid {spacingDeg, lineWidthPx, colour}, checker {cells}, solid {colour}, structured-light {sequence, index} \u2026",
5981
+ type: "object"
5982
+ },
5983
+ face: { type: "integer", minimum: 0, maximum: 5, description: "prism / pyramid: limit to one optics face" }
5984
+ },
5985
+ additionalProperties: false
5986
+ },
5987
+ power: {
5988
+ description: "POST \u2026/power body; only what the device supports (state.capabilities).",
5989
+ type: "object",
5990
+ minProperties: 1,
5991
+ properties: { on: { type: "boolean" }, shutter: { enum: ["open", "closed"] } },
5992
+ additionalProperties: false
5993
+ },
5994
+ identify: {
5995
+ description: "POST \u2026/identify body (optional): how long to show the id overlay.",
5996
+ type: "object",
5997
+ properties: { durationS: { type: "number", minimum: 0.5, maximum: 60, default: 5 } },
5998
+ additionalProperties: false
5999
+ },
6000
+ patch: {
6001
+ description: "PATCH body (application/merge-patch+json) over `config`; `id` cannot change.",
6002
+ type: "object",
6003
+ minProperties: 1,
6004
+ not: { required: ["id"] }
6005
+ },
6006
+ page: {
6007
+ type: "object",
6008
+ allOf: [{ $ref: "../../common/1.0/pagination.schema.json" }],
6009
+ properties: { items: { type: "array", items: { $ref: "#/$defs/display" } } }
6010
+ }
6011
+ }
6012
+ },
6013
+ "https://freedome.nativemind.us/schemas/api/1.1/engine.schema.json": {
6014
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6015
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/engine.schema.json",
6016
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). gRPC engine status mirror (02e \xA74, \xA75.6): visual (freedome.engine.v1), anantasound (ananta.sound.v1), anantadigital (ananta.digital.v1). Root = GET /engines/{name}.",
6017
+ title: "Engine",
6018
+ allOf: [{ $ref: "#/$defs/engine" }],
6019
+ $defs: {
6020
+ engine: {
6021
+ type: "object",
6022
+ required: ["name", "status"],
6023
+ properties: {
6024
+ name: {
6025
+ anyOf: [
6026
+ { enum: ["visual", "anantasound", "anantadigital"] },
6027
+ { $ref: "../../common/1.0/ids.schema.json#/$defs/engineName" }
6028
+ ]
6029
+ },
6030
+ status: {
6031
+ anyOf: [
6032
+ { enum: ["up", "degraded", "down", "incompatible"] },
6033
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6034
+ ]
6035
+ },
6036
+ version: { type: "string" },
6037
+ protocol: {
6038
+ type: "string",
6039
+ pattern: "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*\\.v[0-9]+$",
6040
+ description: "gRPC package, e.g. freedome.engine.v1"
6041
+ },
6042
+ endpoint: { type: "string", description: "unix:/run/freedome/engine.sock, host:port" },
6043
+ nodes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6044
+ backend: {
6045
+ anyOf: [{ enum: ["vulkan", "metal", "d3d12", "opengl", "software"] }, { type: "string" }],
6046
+ description: "visual: active compute / render backend"
6047
+ },
6048
+ backends: { type: "array", items: { type: "string" }, description: "visual: available backends" },
6049
+ capabilities: {
6050
+ type: "object",
6051
+ additionalProperties: true,
6052
+ description: "engine-reported capabilities (outputs, codecs, max resolution, audio channels \u2026); keys listed in docs/capabilities.yaml"
6053
+ },
6054
+ metrics: {
6055
+ type: "object",
6056
+ additionalProperties: { type: "number" },
6057
+ description: "fps, droppedFrames, gpuLoad, latencyMs \u2026"
6058
+ },
6059
+ problem: { $ref: "../../common/1.0/problem.schema.json", description: "why degraded / down / incompatible" },
6060
+ since: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6061
+ },
6062
+ patternProperties: { "^x-": true },
6063
+ additionalProperties: false
6064
+ },
6065
+ page: {
6066
+ type: "object",
6067
+ required: ["items", "nextCursor"],
6068
+ properties: {
6069
+ items: { type: "array", items: { $ref: "#/$defs/engine" } },
6070
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
6071
+ },
6072
+ additionalProperties: false
6073
+ },
6074
+ backendRequest: {
6075
+ type: "object",
6076
+ required: ["backend"],
6077
+ properties: {
6078
+ backend: {
6079
+ anyOf: [
6080
+ { enum: ["vulkan", "metal", "d3d12", "opengl", "software"] },
6081
+ { type: "string", pattern: "^[a-z0-9_-]{1,32}$" }
6082
+ ]
6083
+ }
6084
+ },
6085
+ additionalProperties: false
6086
+ }
6087
+ }
6088
+ },
6089
+ "https://freedome.nativemind.us/schemas/api/1.1/event-kinds.schema.json": {
6090
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6091
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/event-kinds.schema.json",
6092
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). `data` of an event message (02e \xA77.1) with the payload bound to its `kind` (events/topics.yaml). v1: every kind of the topic tree (02e \xA77.2 + scenarios, parameters, nodes, devices). Unknown kinds stay valid (open catalogue, 02e \xA713).",
6093
+ title: "Event data by kind",
6094
+ type: "object",
6095
+ allOf: [
6096
+ { $ref: "../../common/1.0/envelope.schema.json#/$defs/eventData" },
6097
+ {
6098
+ if: { properties: { kind: { const: "system.info" } }, required: ["kind"] },
6099
+ then: { properties: { resource: { $ref: "info.schema.json" } } }
6100
+ },
6101
+ {
6102
+ if: { properties: { kind: { const: "system.health" } }, required: ["kind"] },
6103
+ then: { properties: { resource: { $ref: "info.schema.json#/$defs/health" } } }
6104
+ },
6105
+ {
6106
+ if: { properties: { kind: { const: "engine.status" } }, required: ["kind"] },
6107
+ then: { properties: { resource: { $ref: "#/$defs/engineStatus" } } }
6108
+ },
6109
+ {
6110
+ if: { properties: { kind: { const: "engine.metrics" } }, required: ["kind"] },
6111
+ then: { properties: { resource: { $ref: "#/$defs/engineMetrics" }, patch: { $ref: "#/$defs/engineMetrics" } } }
6112
+ },
6113
+ {
6114
+ if: { properties: { kind: { const: "engine.error" } }, required: ["kind"] },
6115
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6116
+ },
6117
+ {
6118
+ if: { properties: { kind: { const: "venue.updated" } }, required: ["kind"] },
6119
+ then: {
6120
+ properties: { resource: { $ref: "venue.schema.json" }, patch: { $ref: "venue.schema.json#/$defs/patch" } }
6121
+ }
6122
+ },
6123
+ {
6124
+ if: { properties: { kind: { const: "venue.deleted" } }, required: ["kind"] },
6125
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6126
+ },
6127
+ {
6128
+ if: { properties: { kind: { const: "venue.activeShow" } }, required: ["kind"] },
6129
+ then: { properties: { resource: { $ref: "#/$defs/activeShow" } } }
6130
+ },
6131
+ {
6132
+ if: { properties: { kind: { const: "output.state" } }, required: ["kind"] },
6133
+ then: {
6134
+ properties: { resource: { $ref: "output.schema.json" }, patch: { $ref: "output.schema.json#/$defs/patch" } }
6135
+ }
6136
+ },
6137
+ {
6138
+ if: { properties: { kind: { const: "display.state" } }, required: ["kind"] },
6139
+ then: { properties: { resource: { $ref: "display.schema.json#/$defs/state" }, patch: { type: "object" } } }
6140
+ },
6141
+ {
6142
+ if: { properties: { kind: { const: "display.pattern" } }, required: ["kind"] },
6143
+ then: {
6144
+ properties: { resource: { anyOf: [{ $ref: "display.schema.json#/$defs/testPattern" }, { type: "null" }] } }
6145
+ }
6146
+ },
6147
+ {
6148
+ if: { properties: { kind: { const: "display.error" } }, required: ["kind"] },
6149
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6150
+ },
6151
+ {
6152
+ if: { properties: { kind: { const: "calibration.updated" } }, required: ["kind"] },
6153
+ then: { properties: { resource: { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" } } }
6154
+ },
6155
+ {
6156
+ if: { properties: { kind: { const: "calibrationJob.state" } }, required: ["kind"] },
6157
+ then: { properties: { resource: { $ref: "calibration-job.schema.json" } } }
6158
+ },
6159
+ {
6160
+ if: { properties: { kind: { const: "calibrationJob.progress" } }, required: ["kind"] },
6161
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6162
+ },
6163
+ {
6164
+ if: { properties: { kind: { const: "calibrationJob.awaiting" } }, required: ["kind"] },
6165
+ then: { properties: { resource: { $ref: "#/$defs/awaiting" } } }
6166
+ },
6167
+ {
6168
+ if: { properties: { kind: { const: "job.state" } }, required: ["kind"] },
6169
+ then: { properties: { resource: { $ref: "job.schema.json" } } }
6170
+ },
6171
+ {
6172
+ if: { properties: { kind: { const: "job.progress" } }, required: ["kind"] },
6173
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6174
+ },
6175
+ {
6176
+ if: { properties: { kind: { const: "log.entry" } }, required: ["kind"] },
6177
+ then: { properties: { resource: { $ref: "system.schema.json#/$defs/logEntry" } } }
6178
+ },
6179
+ {
6180
+ if: { properties: { kind: { const: "node.state" } }, required: ["kind"] },
6181
+ then: {
6182
+ properties: { resource: { $ref: "system.schema.json#/$defs/node" }, patch: { $ref: "#/$defs/anyPatch" } }
6183
+ }
6184
+ },
6185
+ {
6186
+ if: { properties: { kind: { const: "player.state" } }, required: ["kind"] },
6187
+ then: { properties: { resource: { $ref: "player.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6188
+ },
6189
+ {
6190
+ if: { properties: { kind: { const: "player.position" } }, required: ["kind"] },
6191
+ then: { properties: { patch: { $ref: "#/$defs/positionPatch" } } }
6192
+ },
6193
+ {
6194
+ if: { properties: { kind: { const: "player.ended" } }, required: ["kind"] },
6195
+ then: { properties: { resource: { $ref: "player.schema.json" } } }
6196
+ },
6197
+ {
6198
+ if: { properties: { kind: { const: "player.error" } }, required: ["kind"] },
6199
+ then: { properties: { resource: { $ref: "../../common/1.0/problem.schema.json" } } }
6200
+ },
6201
+ {
6202
+ if: { properties: { kind: { const: "cue.fired" } }, required: ["kind"] },
6203
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/cueFired" } } }
6204
+ },
6205
+ {
6206
+ if: { properties: { kind: { const: "cue.failed" } }, required: ["kind"] },
6207
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/cueFired" } } }
6208
+ },
6209
+ {
6210
+ if: { properties: { kind: { const: "parameter.changed" } }, required: ["kind"] },
6211
+ then: { properties: { resource: { $ref: "player.schema.json#/$defs/parameter" } } }
6212
+ },
6213
+ {
6214
+ if: { properties: { kind: { const: "audio.state" } }, required: ["kind"] },
6215
+ then: {
6216
+ properties: { resource: { $ref: "audio.schema.json" }, patch: { $ref: "audio.schema.json#/$defs/patch" } }
6217
+ }
6218
+ },
6219
+ {
6220
+ if: { properties: { kind: { const: "audio.layout" } }, required: ["kind"] },
6221
+ then: { properties: { resource: { $ref: "../../dome/1.1/dome.schema.json#/$defs/audio" } } }
6222
+ },
6223
+ {
6224
+ if: { properties: { kind: { const: "audio.levels" } }, required: ["kind"] },
6225
+ then: { properties: { resource: { $ref: "#/$defs/levels" } } }
6226
+ },
6227
+ {
6228
+ if: { properties: { kind: { const: "zone.state" } }, required: ["kind"] },
6229
+ then: {
6230
+ properties: { resource: { $ref: "audio.schema.json#/$defs/zone" }, patch: { $ref: "#/$defs/anyPatch" } }
6231
+ }
6232
+ },
6233
+ {
6234
+ if: { properties: { kind: { const: "zone.deleted" } }, required: ["kind"] },
6235
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6236
+ },
6237
+ {
6238
+ if: { properties: { kind: { const: "audioDevice.state" } }, required: ["kind"] },
6239
+ then: {
6240
+ properties: { resource: { $ref: "audio.schema.json#/$defs/device" }, patch: { $ref: "#/$defs/anyPatch" } }
6241
+ }
6242
+ },
6243
+ {
6244
+ if: { properties: { kind: { const: "audioSession.state" } }, required: ["kind"] },
6245
+ then: {
6246
+ properties: { resource: { $ref: "audio.schema.json#/$defs/session" }, patch: { $ref: "#/$defs/anyPatch" } }
6247
+ }
6248
+ },
6249
+ {
6250
+ if: { properties: { kind: { const: "generator.state" } }, required: ["kind"] },
6251
+ then: { properties: { resource: { $ref: "audio.schema.json#/$defs/generatorState" } } }
6252
+ },
6253
+ {
6254
+ if: { properties: { kind: { const: "show.updated" } }, required: ["kind"] },
6255
+ then: {
6256
+ properties: { resource: { $ref: "show.schema.json" }, patch: { $ref: "show.schema.json#/$defs/patch" } }
6257
+ }
6258
+ },
6259
+ {
6260
+ if: { properties: { kind: { const: "show.deleted" } }, required: ["kind"] },
6261
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6262
+ },
6263
+ {
6264
+ if: { properties: { kind: { const: "playlist.updated" } }, required: ["kind"] },
6265
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6266
+ },
6267
+ {
6268
+ if: { properties: { kind: { const: "playlist.deleted" } }, required: ["kind"] },
6269
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6270
+ },
6271
+ {
6272
+ if: { properties: { kind: { const: "timeline.updated" } }, required: ["kind"] },
6273
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6274
+ },
6275
+ {
6276
+ if: { properties: { kind: { const: "timeline.deleted" } }, required: ["kind"] },
6277
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6278
+ },
6279
+ {
6280
+ if: { properties: { kind: { const: "cue.updated" } }, required: ["kind"] },
6281
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6282
+ },
6283
+ {
6284
+ if: { properties: { kind: { const: "cue.deleted" } }, required: ["kind"] },
6285
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6286
+ },
6287
+ {
6288
+ if: { properties: { kind: { const: "trigger.updated" } }, required: ["kind"] },
6289
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6290
+ },
6291
+ {
6292
+ if: { properties: { kind: { const: "trigger.deleted" } }, required: ["kind"] },
6293
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6294
+ },
6295
+ {
6296
+ if: { properties: { kind: { const: "matrix.updated" } }, required: ["kind"] },
6297
+ then: { properties: { resource: { $ref: "#/$defs/showItem" } } }
6298
+ },
6299
+ {
6300
+ if: { properties: { kind: { const: "asset.created" } }, required: ["kind"] },
6301
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6302
+ },
6303
+ {
6304
+ if: { properties: { kind: { const: "asset.progress" } }, required: ["kind"] },
6305
+ then: { properties: { patch: { $ref: "#/$defs/progressPatch" } } }
6306
+ },
6307
+ {
6308
+ if: { properties: { kind: { const: "asset.ready" } }, required: ["kind"] },
6309
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6310
+ },
6311
+ {
6312
+ if: { properties: { kind: { const: "asset.failed" } }, required: ["kind"] },
6313
+ then: { properties: { resource: { $ref: "asset.schema.json" } } }
6314
+ },
6315
+ {
6316
+ if: { properties: { kind: { const: "asset.deleted" } }, required: ["kind"] },
6317
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6318
+ },
6319
+ {
6320
+ if: { properties: { kind: { const: "upload.progress" } }, required: ["kind"] },
6321
+ then: { properties: { resource: { $ref: "upload.schema.json" }, patch: { $ref: "#/$defs/uploadProgress" } } }
6322
+ },
6323
+ {
6324
+ if: { properties: { kind: { const: "gateway.state" } }, required: ["kind"] },
6325
+ then: { properties: { resource: { $ref: "gateway.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6326
+ },
6327
+ {
6328
+ if: { properties: { kind: { const: "gateway.message" } }, required: ["kind"] },
6329
+ then: { properties: { resource: { $ref: "#/$defs/gatewayMessage" } } }
6330
+ },
6331
+ {
6332
+ if: { properties: { kind: { const: "app.payload" } }, required: ["kind"] },
6333
+ then: { properties: { resource: { $ref: "app-payload.schema.json#/$defs/published" } } }
6334
+ },
6335
+ {
6336
+ if: { properties: { kind: { const: "app.cleared" } }, required: ["kind"] },
6337
+ then: { properties: { resource: { $ref: "#/$defs/appCleared" } } }
6338
+ },
6339
+ {
6340
+ if: { properties: { kind: { const: "client.command" } }, required: ["kind"] },
6341
+ then: { properties: { resource: { $ref: "client.schema.json#/$defs/command" } } }
6342
+ },
6343
+ {
6344
+ if: { properties: { kind: { const: "session.revoked" } }, required: ["kind"] },
6345
+ then: { properties: { resource: { $ref: "#/$defs/sessionRevoked" } } }
6346
+ },
6347
+ {
6348
+ if: { properties: { kind: { const: "scenarioSession.state" } }, required: ["kind"] },
6349
+ then: {
6350
+ properties: { resource: { $ref: "scenario-session.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } }
6351
+ }
6352
+ },
6353
+ {
6354
+ if: { properties: { kind: { const: "scenarioSession.log" } }, required: ["kind"] },
6355
+ then: { properties: { resource: { $ref: "scenario-session.schema.json#/$defs/logEntry" } } }
6356
+ },
6357
+ {
6358
+ if: { properties: { kind: { const: "device.state" } }, required: ["kind"] },
6359
+ then: { properties: { resource: { $ref: "device.schema.json" }, patch: { $ref: "#/$defs/anyPatch" } } }
6360
+ },
6361
+ {
6362
+ if: { properties: { kind: { const: "audioAnalysis.state" } }, required: ["kind"] },
6363
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/analysisState" } } }
6364
+ },
6365
+ {
6366
+ if: { properties: { kind: { const: "audio.analysis" } }, required: ["kind"] },
6367
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/frame" } } }
6368
+ },
6369
+ {
6370
+ if: { properties: { kind: { const: "audio.onset" } }, required: ["kind"] },
6371
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/onset" } } }
6372
+ },
6373
+ {
6374
+ if: { properties: { kind: { const: "audioReactive.state" } }, required: ["kind"] },
6375
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/state" } } }
6376
+ },
6377
+ {
6378
+ if: { properties: { kind: { const: "audioReactiveScene.updated" } }, required: ["kind"] },
6379
+ then: { properties: { resource: { $ref: "audio-reactive.schema.json#/$defs/scene" } } }
6380
+ },
6381
+ {
6382
+ if: { properties: { kind: { const: "audioReactiveScene.deleted" } }, required: ["kind"] },
6383
+ then: { properties: { resource: { $ref: "#/$defs/deleted" } } }
6384
+ },
6385
+ {
6386
+ if: { properties: { kind: { const: "textureSource.state" } }, required: ["kind"] },
6387
+ then: { properties: { resource: { $ref: "asset.schema.json#/$defs/textureSource" } } }
6388
+ }
6389
+ ],
6390
+ $defs: {
6391
+ knownKind: {
6392
+ description: "Kinds of the v1 topic tree (events/topics.yaml); open catalogue \u2014 clients ignore unknown kinds.",
6393
+ enum: [
6394
+ "system.info",
6395
+ "system.health",
6396
+ "engine.status",
6397
+ "engine.metrics",
6398
+ "engine.error",
6399
+ "venue.updated",
6400
+ "venue.deleted",
6401
+ "venue.activeShow",
6402
+ "output.state",
6403
+ "display.state",
6404
+ "display.pattern",
6405
+ "display.error",
6406
+ "calibration.updated",
6407
+ "calibrationJob.state",
6408
+ "calibrationJob.progress",
6409
+ "calibrationJob.awaiting",
6410
+ "job.state",
6411
+ "job.progress",
6412
+ "log.entry",
6413
+ "node.state",
6414
+ "player.state",
6415
+ "player.position",
6416
+ "player.ended",
6417
+ "player.error",
6418
+ "cue.fired",
6419
+ "cue.failed",
6420
+ "parameter.changed",
6421
+ "audio.state",
6422
+ "audio.layout",
6423
+ "audio.levels",
6424
+ "zone.state",
6425
+ "zone.deleted",
6426
+ "audioDevice.state",
6427
+ "audioSession.state",
6428
+ "generator.state",
6429
+ "show.updated",
6430
+ "show.deleted",
6431
+ "playlist.updated",
6432
+ "playlist.deleted",
6433
+ "timeline.updated",
6434
+ "timeline.deleted",
6435
+ "cue.updated",
6436
+ "cue.deleted",
6437
+ "trigger.updated",
6438
+ "trigger.deleted",
6439
+ "matrix.updated",
6440
+ "asset.created",
6441
+ "asset.progress",
6442
+ "asset.ready",
6443
+ "asset.failed",
6444
+ "asset.deleted",
6445
+ "upload.progress",
6446
+ "gateway.state",
6447
+ "gateway.message",
6448
+ "app.payload",
6449
+ "app.cleared",
6450
+ "client.command",
6451
+ "session.revoked",
6452
+ "scenarioSession.state",
6453
+ "scenarioSession.log",
6454
+ "device.state",
6455
+ "audioAnalysis.state",
6456
+ "audio.analysis",
6457
+ "audio.onset",
6458
+ "audioReactive.state",
6459
+ "audioReactiveScene.updated",
6460
+ "audioReactiveScene.deleted",
6461
+ "textureSource.state"
6462
+ ]
6463
+ },
6464
+ engineStatus: {
6465
+ type: "object",
6466
+ required: ["name", "status"],
6467
+ properties: {
6468
+ name: {
6469
+ anyOf: [
6470
+ { enum: ["visual", "anantasound", "anantadigital"] },
6471
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}(@[A-Za-z0-9._-]{1,64})?$" }
6472
+ ]
6473
+ },
6474
+ status: { enum: ["up", "degraded", "down", "incompatible"] },
6475
+ version: { type: "string" },
6476
+ protocol: { type: "string", examples: ["freedome.engine.v1"] },
6477
+ capabilities: { type: "array", items: { type: "string" } },
6478
+ message: { type: "string" }
6479
+ },
6480
+ additionalProperties: false
6481
+ },
6482
+ engineMetrics: {
6483
+ description: "\u2264 1 Hz; any subset (patch) of the metrics.",
6484
+ type: "object",
6485
+ properties: {
6486
+ fps: { type: "number", minimum: 0 },
6487
+ frameTimeMs: { type: "number", minimum: 0 },
6488
+ droppedFrames: { type: "integer", minimum: 0 },
6489
+ gpuLoad: { type: "number", minimum: 0, maximum: 1 },
6490
+ cpuLoad: { type: "number", minimum: 0, maximum: 1 },
6491
+ temperatureC: { type: "number" }
6492
+ },
6493
+ patternProperties: { "^x-": true },
6494
+ additionalProperties: false
6495
+ },
6496
+ deleted: {
6497
+ type: "object",
6498
+ required: ["id"],
6499
+ properties: { id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6500
+ additionalProperties: false
6501
+ },
6502
+ activeShow: {
6503
+ type: "object",
6504
+ required: ["activeShowId"],
6505
+ properties: {
6506
+ activeShowId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] }
6507
+ },
6508
+ additionalProperties: false
6509
+ },
6510
+ progressPatch: {
6511
+ type: "object",
6512
+ minProperties: 1,
6513
+ properties: {
6514
+ progress: { type: "number", minimum: 0, maximum: 1 },
6515
+ currentStep: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
6516
+ message: { type: "string" }
6517
+ },
6518
+ additionalProperties: false
6519
+ },
6520
+ awaiting: {
6521
+ description: "Same object as calibration-job `awaiting` (null when nothing is awaited).",
6522
+ anyOf: [{ type: "null" }, { $ref: "calibration-job.schema.json#/$defs/awaiting" }]
6523
+ },
6524
+ anyPatch: { description: "Merge patch of the resource (high-rate kinds).", type: "object", minProperties: 1 },
6525
+ positionPatch: {
6526
+ description: "player.position (default 4 Hz, \u2264 30 Hz per subscription option positionHz).",
6527
+ type: "object",
6528
+ required: ["position"],
6529
+ properties: {
6530
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
6531
+ duration: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/seconds" }, { type: "null" }] },
6532
+ rate: { type: "number" },
6533
+ timecode: { type: "string", pattern: "^\\d{2}:\\d{2}:\\d{2}[:;]\\d{2}$" }
6534
+ },
6535
+ additionalProperties: false
6536
+ },
6537
+ levels: {
6538
+ description: "audio.levels meters (\u2264 10 Hz): id (speaker / zone / device / master) \u2192 dBFS.",
6539
+ type: "object",
6540
+ required: ["levels"],
6541
+ properties: {
6542
+ levels: { type: "object", additionalProperties: { type: "number", maximum: 24 } },
6543
+ peak: { type: "object", additionalProperties: { type: "number", maximum: 24 } }
6544
+ },
6545
+ additionalProperties: false
6546
+ },
6547
+ showItem: {
6548
+ description: "Fine-grained show edit (sub-kind of show.updated).",
6549
+ type: "object",
6550
+ required: ["showId", "itemId", "revision"],
6551
+ properties: {
6552
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6553
+ itemId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6554
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
6555
+ item: { type: "object", description: "the stored .dome entry (absent on delete)" }
6556
+ },
6557
+ additionalProperties: false
6558
+ },
6559
+ uploadProgress: {
6560
+ type: "object",
6561
+ required: ["offset"],
6562
+ properties: {
6563
+ offset: { type: "integer", minimum: 0 },
6564
+ length: { type: "integer", minimum: 0 },
6565
+ status: { type: "string" }
6566
+ },
6567
+ additionalProperties: false
6568
+ },
6569
+ gatewayMessage: {
6570
+ description: "Debug trace of a gateway message (gateways:manage only).",
6571
+ type: "object",
6572
+ required: ["direction", "summary"],
6573
+ properties: {
6574
+ direction: { enum: ["in", "out"] },
6575
+ peer: { type: "string" },
6576
+ summary: { type: "string" },
6577
+ mapsTo: { $ref: "../../common/1.0/ids.schema.json#/$defs/operationId" },
6578
+ raw: { type: "string", maxLength: 4096 }
6579
+ },
6580
+ additionalProperties: false
6581
+ },
6582
+ appCleared: {
6583
+ type: "object",
6584
+ required: ["app"],
6585
+ properties: { app: { type: "string", pattern: "^[A-Za-z0-9._-]{1,128}$" } },
6586
+ additionalProperties: false
6587
+ },
6588
+ sessionRevoked: {
6589
+ type: "object",
6590
+ required: ["reason"],
6591
+ properties: {
6592
+ sessionId: { type: "string" },
6593
+ reason: {
6594
+ anyOf: [
6595
+ { enum: ["signed-out", "refresh-reuse", "password-changed", "user-deleted", "key-revoked", "admin"] },
6596
+ { type: "string" }
6597
+ ]
6598
+ }
6599
+ },
6600
+ additionalProperties: false
6601
+ }
6602
+ }
6603
+ },
6604
+ "https://freedome.nativemind.us/schemas/api/1.1/gateway.schema.json": {
6605
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6606
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/gateway.schema.json",
6607
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Compatibility gateways (inbound emulators, outbound drivers, 02d) and the OSC send integration (02e \xA75.6). Root = GET /gateways/{gatewayId}.",
6608
+ title: "Gateway",
6609
+ allOf: [{ $ref: "#/$defs/gateway" }],
6610
+ $defs: {
6611
+ gateway: {
6612
+ type: "object",
6613
+ required: ["id", "direction", "protocol", "enabled", "status"],
6614
+ properties: {
6615
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6616
+ name: { type: "string" },
6617
+ direction: { enum: ["inbound", "outbound", "converter"] },
6618
+ protocol: {
6619
+ type: "string",
6620
+ description: "e.g. screenberry-json, dome360-http, watchout, resolume, osc, pjlink, artnet"
6621
+ },
6622
+ vendor: { type: "string" },
6623
+ enabled: { type: "boolean" },
6624
+ status: {
6625
+ anyOf: [
6626
+ { enum: ["disabled", "starting", "up", "degraded", "down"] },
6627
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6628
+ ]
6629
+ },
6630
+ docsOnly: {
6631
+ type: "boolean",
6632
+ description: "provenance of the driver, not its health: implemented from public docs, no recorded fixtures from a real system yet. A gateway can be `status: up` and `docsOnly: true`."
6633
+ },
6634
+ listeners: {
6635
+ type: "array",
6636
+ items: {
6637
+ type: "object",
6638
+ required: ["transport", "port"],
6639
+ properties: {
6640
+ transport: { enum: ["http", "tcp", "udp", "osc", "ws", "socketio", "serial"] },
6641
+ port: { type: "integer", minimum: 0, maximum: 65535 },
6642
+ bind: { type: "string" }
6643
+ },
6644
+ additionalProperties: false
6645
+ }
6646
+ },
6647
+ peers: {
6648
+ type: "array",
6649
+ items: {
6650
+ type: "object",
6651
+ properties: {
6652
+ address: { type: "string" },
6653
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6654
+ },
6655
+ additionalProperties: false
6656
+ }
6657
+ },
6658
+ config: {
6659
+ type: "object",
6660
+ additionalProperties: true,
6661
+ description: 'gateway-specific; secrets redacted as "***"'
6662
+ },
6663
+ allowCidrs: { type: "array", items: { type: "string" } },
6664
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
6665
+ stats: { type: "object", additionalProperties: { type: "number" } },
6666
+ resolume: {
6667
+ $ref: "#/$defs/resolumeStatus",
6668
+ description: "live driver status; only on protocol resolume, read-only"
6669
+ }
6670
+ },
6671
+ if: { properties: { protocol: { const: "resolume" } }, required: ["protocol"] },
6672
+ then: { properties: { config: { $ref: "#/$defs/resolumeConfig" } } },
6673
+ patternProperties: { "^x-": true },
6674
+ additionalProperties: false
6675
+ },
6676
+ resolumeConfig: {
6677
+ description: "`config` of the outbound Resolume Arena / Avenue driver (protocol resolume). Defaults are Resolume's own ports; they equal the media server's defaults, so on one machine move the media server (docs/audio-reactive.md).",
6678
+ type: "object",
6679
+ required: ["host"],
6680
+ properties: {
6681
+ host: {
6682
+ type: "string",
6683
+ minLength: 1,
6684
+ maxLength: 253,
6685
+ description: "host name or IP of the Resolume machine"
6686
+ },
6687
+ oscPort: { type: "integer", minimum: 1, maximum: 65535, default: 7e3 },
6688
+ restPort: { type: "integer", minimum: 1, maximum: 65535, default: 8080 },
6689
+ ws: {
6690
+ type: "boolean",
6691
+ default: true,
6692
+ description: "keep the WebSocket API connection (ws://host:restPort/api/v1) for state"
6693
+ },
6694
+ oscMaxRateHz: {
6695
+ type: "number",
6696
+ exclusiveMinimum: 0,
6697
+ maximum: 1e3,
6698
+ description: "highest send rate per OSC address; newer values replace unsent ones"
6699
+ }
6700
+ },
6701
+ patternProperties: { "^x-": true },
6702
+ additionalProperties: false
6703
+ },
6704
+ resolumeLink: {
6705
+ type: "object",
6706
+ required: ["state"],
6707
+ properties: {
6708
+ state: {
6709
+ anyOf: [
6710
+ { enum: ["disabled", "connecting", "up", "down"] },
6711
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
6712
+ ],
6713
+ description: "for OSC over UDP, up means sending: there is no acknowledgement"
6714
+ },
6715
+ lastOkAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
6716
+ sent: { type: "integer", minimum: 0 },
6717
+ dropped: { type: "integer", minimum: 0 },
6718
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
6719
+ },
6720
+ additionalProperties: false
6721
+ },
6722
+ resolumeStatus: {
6723
+ type: "object",
6724
+ required: ["osc", "rest", "ws"],
6725
+ properties: {
6726
+ osc: { $ref: "#/$defs/resolumeLink" },
6727
+ rest: { $ref: "#/$defs/resolumeLink" },
6728
+ ws: { $ref: "#/$defs/resolumeLink" },
6729
+ product: {
6730
+ description: "GET /api/v1/product of Resolume, when reachable.",
6731
+ type: "object",
6732
+ properties: {
6733
+ name: { type: "string" },
6734
+ major: { type: "integer", minimum: 0 },
6735
+ minor: { type: "integer", minimum: 0 },
6736
+ micro: { type: "integer", minimum: 0 },
6737
+ revision: { type: "integer", minimum: 0 }
6738
+ },
6739
+ additionalProperties: false
6740
+ },
6741
+ composition: {
6742
+ description: "Summary of the open composition.",
6743
+ type: "object",
6744
+ properties: {
6745
+ name: { type: "string" },
6746
+ layers: { type: "integer", minimum: 0 },
6747
+ columns: { type: "integer", minimum: 0 },
6748
+ decks: { type: "integer", minimum: 0 }
6749
+ },
6750
+ additionalProperties: false
6751
+ },
6752
+ lastSyncAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
6753
+ },
6754
+ additionalProperties: false
6755
+ },
6756
+ patch: {
6757
+ type: "object",
6758
+ minProperties: 1,
6759
+ properties: {
6760
+ enabled: { type: "boolean" },
6761
+ config: { type: "object", additionalProperties: true },
6762
+ allowCidrs: { type: "array", items: { type: "string" } }
6763
+ },
6764
+ additionalProperties: false
6765
+ },
6766
+ page: {
6767
+ type: "object",
6768
+ required: ["items", "nextCursor"],
6769
+ properties: {
6770
+ items: { type: "array", items: { $ref: "#/$defs/gateway" } },
6771
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
6772
+ },
6773
+ additionalProperties: false
6774
+ },
6775
+ testResult: {
6776
+ type: "object",
6777
+ required: ["gatewayId", "ok"],
6778
+ properties: {
6779
+ gatewayId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6780
+ ok: { type: "boolean" },
6781
+ latencyMs: { type: "number", minimum: 0 },
6782
+ remoteVersion: { type: "string" },
6783
+ detail: { type: "string" },
6784
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
6785
+ },
6786
+ additionalProperties: false
6787
+ },
6788
+ oscArg: {
6789
+ type: "object",
6790
+ required: ["type", "value"],
6791
+ properties: {
6792
+ type: { enum: ["i", "f", "s", "b", "T", "F", "h", "d", "t", "N"] },
6793
+ value: {
6794
+ anyOf: [{ type: "number" }, { type: "string" }, { type: "boolean" }, { type: "null" }],
6795
+ description: "b = base64 blob; t = NTP time tag as RFC 3339"
6796
+ }
6797
+ },
6798
+ additionalProperties: false
6799
+ },
6800
+ sendOsc: {
6801
+ description: "POST /integrations/osc/send: to a configured OSC target only (never an arbitrary host).",
6802
+ type: "object",
6803
+ required: ["target", "address"],
6804
+ properties: {
6805
+ target: {
6806
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6807
+ description: "configured target id (gateway or osc target)"
6808
+ },
6809
+ address: { type: "string", pattern: "^/[^\\s#*,?\\[\\]{}]*$" },
6810
+ args: { type: "array", items: { $ref: "#/$defs/oscArg" }, maxItems: 64 }
6811
+ },
6812
+ additionalProperties: false
6813
+ }
6814
+ }
6815
+ },
6816
+ "https://freedome.nativemind.us/schemas/api/1.1/import.schema.json": {
6817
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6818
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/import.schema.json",
6819
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). POST /imports body (02e \xA75.3) and the result of a finished import job. Root = request.",
6820
+ title: "Import request",
6821
+ type: "object",
6822
+ required: ["format"],
6823
+ properties: {
6824
+ uploadId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7", description: "tus upload (purpose import)" },
6825
+ url: {
6826
+ type: "string",
6827
+ format: "uri",
6828
+ pattern: "^https?://",
6829
+ description: "server-side fetch (allow-listed hosts only)"
6830
+ },
6831
+ assetId: {
6832
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6833
+ description: "an already stored asset (e.g. a .zelim uploaded as asset)"
6834
+ },
6835
+ format: { $ref: "#/$defs/format" },
6836
+ target: {
6837
+ type: "object",
6838
+ properties: {
6839
+ kind: { enum: ["auto", "show", "venue", "assets"], default: "auto" },
6840
+ id: {
6841
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
6842
+ description: "id to create (default: meta.id / generated)"
6843
+ },
6844
+ replace: {
6845
+ type: "boolean",
6846
+ default: false,
6847
+ description: "replace an existing show / venue with the same id (409 otherwise)"
6848
+ },
6849
+ activate: {
6850
+ type: "boolean",
6851
+ default: false,
6852
+ description: "venue: make it the active venue; show: set as the active show"
6853
+ }
6854
+ },
6855
+ additionalProperties: false
6856
+ },
6857
+ options: {
6858
+ type: "object",
6859
+ additionalProperties: true,
6860
+ description: "format-specific (e.g. domemaster-folder: fps, loop)"
6861
+ }
6862
+ },
6863
+ patternProperties: { "^x-": true },
6864
+ additionalProperties: false,
6865
+ oneOf: [{ required: ["uploadId"] }, { required: ["url"] }, { required: ["assetId"] }],
6866
+ $defs: {
6867
+ format: {
6868
+ anyOf: [
6869
+ {
6870
+ enum: [
6871
+ "dome",
6872
+ "domemaster-folder",
6873
+ "screenberry-project",
6874
+ "dome360-playlist",
6875
+ "zelim",
6876
+ "boranko",
6877
+ "comics",
6878
+ "mpcdi"
6879
+ ]
6880
+ },
6881
+ { type: "string", pattern: "^[a-z0-9][a-z0-9.-]{0,63}$" }
6882
+ ]
6883
+ },
6884
+ result: {
6885
+ description: "`result` of a succeeded import job.",
6886
+ type: "object",
6887
+ properties: {
6888
+ format: { $ref: "#/$defs/format" },
6889
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6890
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6891
+ assetIds: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
6892
+ warnings: { type: "array", items: { $ref: "show.schema.json#/$defs/warning" } }
6893
+ },
6894
+ additionalProperties: false
6895
+ }
6896
+ }
6897
+ },
6898
+ "https://freedome.nativemind.us/schemas/api/1.1/info.schema.json": {
6899
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6900
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/info.schema.json",
6901
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). GET /api/v1/info (02e \xA75.1) and the unversioned /health, /ready bodies ($defs/health).",
6902
+ title: "Server info",
6903
+ type: "object",
6904
+ required: ["product", "serverVersion", "instanceId", "apiVersions"],
6905
+ properties: {
6906
+ product: { anyOf: [{ enum: ["freedome-mediaserver", "freedome-cloud"] }, { type: "string", minLength: 1 }] },
6907
+ serverVersion: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
6908
+ contractVersion: {
6909
+ $ref: "../../common/1.0/ids.schema.json#/$defs/semver",
6910
+ description: "freedome_contract release the server implements"
6911
+ },
6912
+ instanceId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
6913
+ name: { type: "string" },
6914
+ apiVersions: { type: "array", minItems: 1, items: { type: "string", pattern: "^v\\d+$" } },
6915
+ legacyProfile: { type: "boolean", description: "legacy (flutter_freedome 3.0 / razvivalka) listener enabled" },
6916
+ transports: {
6917
+ type: "object",
6918
+ properties: {
6919
+ rest: { type: "object", properties: { basePath: { type: "string" } }, additionalProperties: true },
6920
+ graphql: {
6921
+ type: "object",
6922
+ properties: { enabled: { type: "boolean" }, path: { type: "string" } },
6923
+ additionalProperties: true
6924
+ },
6925
+ ws: {
6926
+ type: "object",
6927
+ properties: { path: { type: "string" }, subprotocol: { type: "string" } },
6928
+ additionalProperties: true
6929
+ },
6930
+ socketio: {
6931
+ type: "object",
6932
+ properties: { path: { type: "string" }, namespace: { type: "string" } },
6933
+ additionalProperties: true
6934
+ },
6935
+ osc: {
6936
+ type: "object",
6937
+ properties: {
6938
+ udpIn: { type: "integer", minimum: 1, maximum: 65535 },
6939
+ udpOut: { type: "integer", minimum: 1, maximum: 65535 },
6940
+ tcp: { type: "integer", minimum: 1, maximum: 65535 }
6941
+ },
6942
+ additionalProperties: true
6943
+ }
6944
+ },
6945
+ additionalProperties: true
6946
+ },
6947
+ auth: {
6948
+ type: "object",
6949
+ properties: {
6950
+ methods: {
6951
+ type: "array",
6952
+ items: { anyOf: [{ enum: ["password", "apiKey", "pairing", "cloud", "anonymous"] }, { type: "string" }] }
6953
+ }
6954
+ },
6955
+ additionalProperties: true
6956
+ },
6957
+ venues: {
6958
+ type: "array",
6959
+ items: {
6960
+ type: "object",
6961
+ required: ["id"],
6962
+ properties: {
6963
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
6964
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
6965
+ default: { type: "boolean" },
6966
+ status: { type: "string" }
6967
+ },
6968
+ additionalProperties: true
6969
+ }
6970
+ },
6971
+ capabilities: {
6972
+ description: "Engines, audio modes, display types, test patterns, gateways \u2026 (open object; clients ignore unknown keys).",
6973
+ type: "object",
6974
+ additionalProperties: true
6975
+ },
6976
+ links: { type: "object", additionalProperties: { type: "string", format: "uri-reference" } }
6977
+ },
6978
+ additionalProperties: true,
6979
+ $defs: {
6980
+ health: {
6981
+ description: "GET /health and /ready (unversioned, anonymous).",
6982
+ type: "object",
6983
+ required: ["status"],
6984
+ properties: {
6985
+ status: { enum: ["ok", "degraded", "down"] },
6986
+ checks: {
6987
+ type: "object",
6988
+ additionalProperties: {
6989
+ type: "object",
6990
+ required: ["status"],
6991
+ properties: { status: { enum: ["ok", "degraded", "down"] }, detail: { type: "string" } },
6992
+ additionalProperties: false
6993
+ }
6994
+ }
6995
+ },
6996
+ additionalProperties: false
6997
+ }
6998
+ }
6999
+ },
7000
+ "https://freedome.nativemind.us/schemas/api/1.1/job.schema.json": {
7001
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7002
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/job.schema.json",
7003
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Generic long-running operation (02e \xA73.1, \xA75.1 GET /jobs/{jobId}).",
7004
+ title: "Job",
7005
+ allOf: [{ $ref: "#/$defs/job" }],
7006
+ $defs: {
7007
+ job: {
7008
+ type: "object",
7009
+ required: ["id", "kind", "status", "createdAt"],
7010
+ properties: {
7011
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7012
+ kind: {
7013
+ anyOf: [
7014
+ { enum: ["calibration", "import", "export", "backup", "restore", "diagnostics", "update", "probe"] },
7015
+ { $ref: "#/$defs/token" }
7016
+ ]
7017
+ },
7018
+ status: { $ref: "#/$defs/status" },
7019
+ progress: { type: "number", minimum: 0, maximum: 1 },
7020
+ message: { type: "string" },
7021
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7022
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7023
+ finishedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7024
+ result: { description: "Kind-specific result (e.g. { venueId } of an import)." },
7025
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7026
+ links: {
7027
+ type: "object",
7028
+ properties: {
7029
+ self: { type: "string", format: "uri-reference" },
7030
+ cancel: { type: "string", format: "uri-reference" },
7031
+ resource: { type: "string", format: "uri-reference" }
7032
+ },
7033
+ additionalProperties: false
7034
+ }
7035
+ },
7036
+ patternProperties: { "^x-": true },
7037
+ additionalProperties: false,
7038
+ allOf: [
7039
+ {
7040
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
7041
+ then: { required: ["problem"] }
7042
+ }
7043
+ ]
7044
+ },
7045
+ token: { type: "string", pattern: "^[a-z0-9][a-z0-9._-]{0,63}$" },
7046
+ status: {
7047
+ description: "queued \u2192 running \u21C4 awaiting_input \u2192 succeeded | failed | cancelled.",
7048
+ enum: ["queued", "running", "awaiting_input", "succeeded", "failed", "cancelled"]
7049
+ },
7050
+ page: {
7051
+ type: "object",
7052
+ required: ["items", "nextCursor"],
7053
+ properties: {
7054
+ items: { type: "array", items: { $ref: "#/$defs/job" } },
7055
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7056
+ },
7057
+ additionalProperties: false
7058
+ }
7059
+ }
7060
+ },
7061
+ "https://freedome.nativemind.us/schemas/api/1.1/output.schema.json": {
7062
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7063
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/output.schema.json",
7064
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Venue output state (02e \xA75.2 GET/PATCH /venues/{venueId}/output; fulldome /@1/* coverage).",
7065
+ title: "Venue output",
7066
+ type: "object",
7067
+ required: ["brightness", "volume", "blackout"],
7068
+ properties: {
7069
+ brightness: {
7070
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
7071
+ description: "master brightness 0..1"
7072
+ },
7073
+ volume: {
7074
+ $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval",
7075
+ description: "master volume, linear 0..1 (C5)"
7076
+ },
7077
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
7078
+ mute: { type: "boolean" },
7079
+ blackout: { type: "boolean" },
7080
+ rotation: { type: "number", minimum: -360, maximum: 360, description: "\xB0 content rotation about the dome axis" },
7081
+ lighting: { type: "boolean", description: "stage / house light relay" },
7082
+ ndi: {
7083
+ type: "object",
7084
+ properties: { enabled: { type: "boolean" }, name: { type: "string" } },
7085
+ additionalProperties: false
7086
+ }
7087
+ },
7088
+ patternProperties: { "^x-": true },
7089
+ additionalProperties: false,
7090
+ $defs: {
7091
+ patch: {
7092
+ description: "PATCH body (application/merge-patch+json): any subset of the output fields.",
7093
+ type: "object",
7094
+ minProperties: 1,
7095
+ properties: {
7096
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7097
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7098
+ gainDb: { $ref: "../../common/1.0/units.schema.json#/$defs/gainDb" },
7099
+ mute: { type: "boolean" },
7100
+ blackout: { type: "boolean" },
7101
+ rotation: { type: "number", minimum: -360, maximum: 360 },
7102
+ lighting: { type: "boolean" },
7103
+ ndi: {
7104
+ type: "object",
7105
+ properties: { enabled: { type: "boolean" }, name: { type: "string" } },
7106
+ additionalProperties: false
7107
+ }
7108
+ },
7109
+ patternProperties: { "^x-": true },
7110
+ additionalProperties: false
7111
+ }
7112
+ }
7113
+ },
7114
+ "https://freedome.nativemind.us/schemas/api/1.1/player.schema.json": {
7115
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7116
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/player.schema.json",
7117
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Media player state and playback command bodies (02e \xA75.3: players, play / pause / resume / stop / next / previous / seek, fireCue, setActiveShow, parameters). Root = GET /venues/{venueId}/players/{playerId}.",
7118
+ title: "Media player",
7119
+ allOf: [{ $ref: "#/$defs/player" }],
7120
+ $defs: {
7121
+ player: {
7122
+ type: "object",
7123
+ required: ["id", "venueId", "status", "position", "revision"],
7124
+ properties: {
7125
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7126
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7127
+ name: { type: "string" },
7128
+ status: { $ref: "#/$defs/status" },
7129
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7130
+ playlistId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7131
+ timelineId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7132
+ matrixCell: { anyOf: [{ $ref: "#/$defs/matrixCell" }, { type: "null" }] },
7133
+ itemIndex: { anyOf: [{ type: "integer", minimum: 0 }, { type: "null" }] },
7134
+ assetId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7135
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7136
+ duration: { anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/seconds" }, { type: "null" }] },
7137
+ rate: { $ref: "#/$defs/rate" },
7138
+ loop: { type: "boolean" },
7139
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7140
+ opacity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7141
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7142
+ rotation: { type: "number", minimum: -360, maximum: 360 },
7143
+ target: {
7144
+ type: "object",
7145
+ properties: {
7146
+ displays: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" } },
7147
+ layer: { type: "integer", minimum: 0 }
7148
+ },
7149
+ additionalProperties: false
7150
+ },
7151
+ pending: {
7152
+ type: "boolean",
7153
+ description: "last command not yet acknowledged by the engine (2 s timeout); a later player.state resolves it"
7154
+ },
7155
+ scheduledAt: {
7156
+ anyOf: [{ $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }, { type: "null" }],
7157
+ description: "pending scheduled start (play.at)"
7158
+ },
7159
+ error: { anyOf: [{ $ref: "../../common/1.0/problem.schema.json" }, { type: "null" }] },
7160
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7161
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7162
+ },
7163
+ patternProperties: { "^x-": true },
7164
+ additionalProperties: false
7165
+ },
7166
+ status: {
7167
+ anyOf: [
7168
+ { enum: ["idle", "loading", "playing", "paused", "stopped", "error"] },
7169
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
7170
+ ]
7171
+ },
7172
+ rate: { type: "number", exclusiveMinimum: 0, maximum: 16, description: "playback rate, 1 = normal" },
7173
+ matrixCell: {
7174
+ type: "object",
7175
+ required: ["row", "column"],
7176
+ properties: {
7177
+ matrixId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7178
+ row: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7179
+ column: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }
7180
+ },
7181
+ additionalProperties: false
7182
+ },
7183
+ page: {
7184
+ type: "object",
7185
+ required: ["items", "nextCursor"],
7186
+ properties: {
7187
+ items: { type: "array", items: { $ref: "#/$defs/player" } },
7188
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7189
+ },
7190
+ additionalProperties: false
7191
+ },
7192
+ patch: {
7193
+ description: "PATCH /venues/{venueId}/players/{playerId} (merge-patch; playback is last-writer-wins, no If-Match).",
7194
+ type: "object",
7195
+ minProperties: 1,
7196
+ properties: {
7197
+ rate: { $ref: "#/$defs/rate" },
7198
+ loop: { type: "boolean" },
7199
+ volume: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7200
+ opacity: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7201
+ brightness: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7202
+ rotation: { type: "number", minimum: -360, maximum: 360 }
7203
+ },
7204
+ patternProperties: { "^x-": true },
7205
+ additionalProperties: false
7206
+ },
7207
+ play: {
7208
+ description: "POST \u2026/play: what to play (absent = resume the loaded source / startup) and when. `at` = scheduled start on the server clock (multi-node sync, 02d UC-K5).",
7209
+ type: "object",
7210
+ properties: {
7211
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7212
+ playlistId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7213
+ itemIndex: { type: "integer", minimum: 0 },
7214
+ timelineId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7215
+ matrixCell: { $ref: "#/$defs/matrixCell" },
7216
+ assetId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7217
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7218
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7219
+ loop: { type: "boolean" }
7220
+ },
7221
+ patternProperties: { "^x-": true },
7222
+ additionalProperties: false,
7223
+ not: {
7224
+ anyOf: [
7225
+ { required: ["playlistId", "timelineId"] },
7226
+ { required: ["playlistId", "assetId"] },
7227
+ { required: ["timelineId", "assetId"] },
7228
+ { required: ["matrixCell", "playlistId"] },
7229
+ { required: ["matrixCell", "timelineId"] },
7230
+ { required: ["matrixCell", "assetId"] }
7231
+ ]
7232
+ }
7233
+ },
7234
+ seek: {
7235
+ description: "POST \u2026/seek: exactly one of position (s), marker (timeline marker id) or normalized (0..1).",
7236
+ type: "object",
7237
+ properties: {
7238
+ position: { $ref: "../../common/1.0/units.schema.json#/$defs/position" },
7239
+ marker: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7240
+ normalized: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7241
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7242
+ },
7243
+ additionalProperties: false,
7244
+ oneOf: [{ required: ["position"] }, { required: ["marker"] }, { required: ["normalized"] }]
7245
+ },
7246
+ activeShow: {
7247
+ description: "PUT /venues/{venueId}/active-show: load a show onto the venue (mapped onto its geometry); showId null unloads.",
7248
+ type: "object",
7249
+ required: ["showId"],
7250
+ properties: {
7251
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7252
+ autoplay: { type: "boolean", default: false, description: "start `show.startup` on player main" }
7253
+ },
7254
+ additionalProperties: false
7255
+ },
7256
+ activeShowState: {
7257
+ type: "object",
7258
+ required: ["venueId", "showId"],
7259
+ properties: {
7260
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7261
+ showId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
7262
+ warnings: { type: "array", items: { $ref: "show.schema.json#/$defs/warning" } }
7263
+ },
7264
+ additionalProperties: false
7265
+ },
7266
+ fireCue: {
7267
+ type: "object",
7268
+ properties: {
7269
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId", description: "default = active show" }
7270
+ },
7271
+ additionalProperties: false
7272
+ },
7273
+ cueFired: {
7274
+ type: "object",
7275
+ required: ["cueId", "showId", "firedAt"],
7276
+ properties: {
7277
+ cueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7278
+ showId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7279
+ firedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7280
+ actions: {
7281
+ type: "array",
7282
+ items: {
7283
+ type: "object",
7284
+ required: ["do", "status"],
7285
+ properties: {
7286
+ do: { type: "string" },
7287
+ status: { enum: ["ok", "failed", "skipped"] },
7288
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
7289
+ },
7290
+ additionalProperties: false
7291
+ }
7292
+ }
7293
+ },
7294
+ additionalProperties: false
7295
+ },
7296
+ parameterValue: {
7297
+ description: "PUT /venues/{venueId}/parameters/{path} body.",
7298
+ type: "object",
7299
+ required: ["value"],
7300
+ properties: {
7301
+ value: { anyOf: [{ type: "number" }, { type: "boolean" }, { type: "string" }] },
7302
+ fadeSec: { type: "number", minimum: 0, maximum: 3600 }
7303
+ },
7304
+ additionalProperties: false
7305
+ },
7306
+ parameter: {
7307
+ description: "A node / layer parameter (02d ParameterService UC-N1\u2013N3; Screenberry-compatible surface).",
7308
+ type: "object",
7309
+ required: ["path", "type", "value"],
7310
+ properties: {
7311
+ path: { type: "string", pattern: "^[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+){0,15}$" },
7312
+ type: { enum: ["float", "int", "bool", "string", "enum", "colour"] },
7313
+ value: { anyOf: [{ type: "number" }, { type: "boolean" }, { type: "string" }] },
7314
+ min: { type: "number" },
7315
+ max: { type: "number" },
7316
+ unit: { type: "string" },
7317
+ values: { type: "array", items: { type: "string" }, description: "allowed values of an enum parameter" },
7318
+ readOnly: { type: "boolean" },
7319
+ description: { type: "string" }
7320
+ },
7321
+ additionalProperties: false
7322
+ },
7323
+ parameterPage: {
7324
+ type: "object",
7325
+ required: ["items", "nextCursor"],
7326
+ properties: {
7327
+ items: { type: "array", items: { $ref: "#/$defs/parameter" } },
7328
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7329
+ },
7330
+ additionalProperties: false
7331
+ }
7332
+ }
7333
+ },
7334
+ "https://freedome.nativemind.us/schemas/api/1.1/scenario-session.schema.json": {
7335
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7336
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/scenario-session.schema.json",
7337
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Scenario session (02d \xA73 ScenarioSession, UC-SC2\u2013SC4; topic venues/{venueId}/scenarios/{sessionId}, RC5). Root = GET /venues/{venueId}/scenario-sessions/{sessionId}.",
7338
+ title: "Scenario session",
7339
+ allOf: [{ $ref: "#/$defs/session" }],
7340
+ $defs: {
7341
+ status: {
7342
+ anyOf: [
7343
+ { enum: ["starting", "running", "paused", "finished", "stopped", "failed"] },
7344
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
7345
+ ]
7346
+ },
7347
+ session: {
7348
+ type: "object",
7349
+ required: ["id", "venueId", "scenarioId", "status", "params", "startedAt"],
7350
+ properties: {
7351
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7352
+ venueId: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7353
+ scenarioId: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7354
+ scenarioVersion: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7355
+ status: { $ref: "#/$defs/status" },
7356
+ params: { type: "object" },
7357
+ owner: { type: "string", description: "principal that started it (the session runs with its role)" },
7358
+ progress: { $ref: "../../common/1.0/units.schema.json#/$defs/unitInterval" },
7359
+ phase: { type: "string" },
7360
+ message: { type: "string" },
7361
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7362
+ startedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7363
+ endedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7364
+ },
7365
+ patternProperties: { "^x-": true },
7366
+ additionalProperties: false,
7367
+ allOf: [
7368
+ {
7369
+ if: { properties: { status: { const: "failed" } }, required: ["status"] },
7370
+ then: { required: ["problem"] }
7371
+ }
7372
+ ]
7373
+ },
7374
+ start: {
7375
+ description: "POST /venues/{venueId}/scenario-sessions (UC-SC2); params are validated against the scenario's paramsSchema (422).",
7376
+ type: "object",
7377
+ required: ["scenarioId"],
7378
+ properties: {
7379
+ scenarioId: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7380
+ params: { type: "object", default: {} },
7381
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7382
+ },
7383
+ additionalProperties: false
7384
+ },
7385
+ page: {
7386
+ type: "object",
7387
+ required: ["items", "nextCursor"],
7388
+ properties: {
7389
+ items: { type: "array", items: { $ref: "#/$defs/session" } },
7390
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7391
+ },
7392
+ additionalProperties: false
7393
+ },
7394
+ logEntry: {
7395
+ type: "object",
7396
+ required: ["seq", "ts", "level", "message"],
7397
+ properties: {
7398
+ seq: { type: "integer", minimum: 0 },
7399
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7400
+ level: { enum: ["debug", "info", "warn", "error"] },
7401
+ message: { type: "string" },
7402
+ fields: { type: "object", additionalProperties: true }
7403
+ },
7404
+ additionalProperties: false
7405
+ },
7406
+ logPage: {
7407
+ type: "object",
7408
+ required: ["items", "nextCursor"],
7409
+ properties: {
7410
+ items: { type: "array", items: { $ref: "#/$defs/logEntry" } },
7411
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7412
+ },
7413
+ additionalProperties: false
7414
+ }
7415
+ }
7416
+ },
7417
+ "https://freedome.nativemind.us/schemas/api/1.1/scenario.schema.json": {
7418
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7419
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/scenario.schema.json",
7420
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Installed L6 scenario plugin (02d \xA74a ScenarioManifest, UC-SC1 / SC5; RC5). Root = GET /scenarios/{scenarioId}.",
7421
+ title: "Scenario",
7422
+ allOf: [{ $ref: "#/$defs/scenario" }],
7423
+ $defs: {
7424
+ capability: {
7425
+ anyOf: [
7426
+ {
7427
+ enum: [
7428
+ "playback",
7429
+ "parameters",
7430
+ "audioDigital",
7431
+ "audioHybrid",
7432
+ "cues",
7433
+ "timers",
7434
+ "events",
7435
+ "storage",
7436
+ "http"
7437
+ ]
7438
+ },
7439
+ { type: "string", pattern: "^[a-z][A-Za-z0-9]{0,31}$" }
7440
+ ]
7441
+ },
7442
+ scenario: {
7443
+ type: "object",
7444
+ required: ["id", "version", "api", "title", "enabled", "paramsSchema", "capabilities"],
7445
+ properties: {
7446
+ id: { type: "string", pattern: "^[a-z][a-z0-9_]{0,63}$" },
7447
+ version: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7448
+ api: {
7449
+ type: "string",
7450
+ pattern: "^[0-9]+\\.[0-9]+$",
7451
+ description: "freedome-scenario-api major.minor the plugin is built against"
7452
+ },
7453
+ title: { $ref: "../../common/1.0/i18n-text.schema.json" },
7454
+ description: { $ref: "../../common/1.0/i18n-text.schema.json" },
7455
+ enabled: { type: "boolean" },
7456
+ paramsSchema: {
7457
+ type: "object",
7458
+ description: "JSON Schema of the start parameters (Manager renders the form)"
7459
+ },
7460
+ capabilities: { type: "array", items: { $ref: "#/$defs/capability" }, uniqueItems: true },
7461
+ minRole: { $ref: "auth.schema.json#/$defs/role" },
7462
+ sessions: { type: "integer", minimum: 0, description: "running sessions" }
7463
+ },
7464
+ patternProperties: { "^x-": true },
7465
+ additionalProperties: false
7466
+ },
7467
+ patch: {
7468
+ description: "PATCH /scenarios/{scenarioId} (admin, UC-SC5).",
7469
+ type: "object",
7470
+ required: ["enabled"],
7471
+ properties: { enabled: { type: "boolean" } },
7472
+ additionalProperties: false
7473
+ },
7474
+ page: {
7475
+ type: "object",
7476
+ required: ["items", "nextCursor"],
7477
+ properties: {
7478
+ items: { type: "array", items: { $ref: "#/$defs/scenario" } },
7479
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7480
+ },
7481
+ additionalProperties: false
7482
+ }
7483
+ }
7484
+ },
7485
+ "https://freedome.nativemind.us/schemas/api/1.1/show.schema.json": {
7486
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7487
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/show.schema.json",
7488
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Show resource (02e \xA74, \xA75.3) = .dome 1.1 show manifest without format / kind ($defs reused from dome/1.1, never duplicated) + server fields. Root = GET representation.",
7489
+ title: "Show",
7490
+ allOf: [{ $ref: "#/$defs/show" }],
7491
+ $defs: {
7492
+ show: {
7493
+ type: "object",
7494
+ allOf: [{ $ref: "#/$defs/body" }],
7495
+ required: ["id", "revision", "meta", "assets", "show"],
7496
+ properties: {
7497
+ id: {
7498
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7499
+ description: "show id (= meta.id for shows created from a .dome)"
7500
+ },
7501
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7502
+ status: {
7503
+ anyOf: [{ enum: ["ready", "incomplete", "invalid"] }, { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }],
7504
+ description: "incomplete = referenced assets not ready yet"
7505
+ },
7506
+ warnings: {
7507
+ type: "array",
7508
+ items: { $ref: "#/$defs/warning" },
7509
+ description: "UC-S6 validation against the active venue (remapping, missing assets)"
7510
+ },
7511
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7512
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7513
+ },
7514
+ unevaluatedProperties: false
7515
+ },
7516
+ body: {
7517
+ description: "Show content shared by GET / PUT / POST: the .dome show sections.",
7518
+ type: "object",
7519
+ properties: {
7520
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
7521
+ assets: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/asset" } },
7522
+ show: { $ref: "../../dome/1.1/dome.schema.json#/$defs/show" },
7523
+ compat: { $ref: "../../dome/1.1/dome.schema.json#/$defs/compat" }
7524
+ },
7525
+ patternProperties: { "^x-": true }
7526
+ },
7527
+ input: {
7528
+ description: "POST /shows and PUT /shows/{showId} body. Assets are referenced by .dome asset entries; an entry whose `src` is `asset:<assetId>` points to an asset already stored on the server.",
7529
+ type: "object",
7530
+ allOf: [{ $ref: "#/$defs/body" }],
7531
+ required: ["meta", "assets", "show"],
7532
+ unevaluatedProperties: false
7533
+ },
7534
+ patch: {
7535
+ description: "PATCH /shows/{showId} (application/merge-patch+json): any subset of the sections; arrays are replaced whole (RFC 7396).",
7536
+ type: "object",
7537
+ minProperties: 1,
7538
+ properties: {
7539
+ meta: { type: "object" },
7540
+ assets: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/asset" } },
7541
+ show: { type: "object" },
7542
+ compat: { anyOf: [{ type: "object" }, { type: "null" }] }
7543
+ },
7544
+ patternProperties: { "^x-": true },
7545
+ additionalProperties: false
7546
+ },
7547
+ warning: {
7548
+ type: "object",
7549
+ required: ["code", "detail"],
7550
+ properties: {
7551
+ code: { type: "string", pattern: "^[a-z][a-z0-9-]{0,63}$" },
7552
+ detail: { type: "string" },
7553
+ pointer: { type: "string" }
7554
+ },
7555
+ additionalProperties: false
7556
+ },
7557
+ page: {
7558
+ type: "object",
7559
+ required: ["items", "nextCursor"],
7560
+ properties: {
7561
+ items: { type: "array", items: { $ref: "#/$defs/summary" } },
7562
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
7563
+ count: { type: "integer", minimum: 0 }
7564
+ },
7565
+ additionalProperties: false
7566
+ },
7567
+ summary: {
7568
+ description: "Collection item: no assets / show body.",
7569
+ type: "object",
7570
+ required: ["id", "revision", "meta"],
7571
+ properties: {
7572
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7573
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7574
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
7575
+ status: { type: "string" },
7576
+ assetCount: { type: "integer", minimum: 0 },
7577
+ duration: { $ref: "../../common/1.0/units.schema.json#/$defs/seconds" },
7578
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7579
+ },
7580
+ patternProperties: { "^x-": true },
7581
+ additionalProperties: false
7582
+ }
7583
+ }
7584
+ },
7585
+ "https://freedome.nativemind.us/schemas/api/1.1/system.schema.json": {
7586
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7587
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/system.schema.json",
7588
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Host / service status and system operations (02e \xA75.1 /system/*): status, logs, config (redacted), diagnostics, backup / restore, update, reboot / shutdown; cluster nodes + clock (02d UC-K1\u2013K3). Root = GET /system.",
7589
+ title: "System status",
7590
+ type: "object",
7591
+ required: ["host", "uptimeSec", "versions"],
7592
+ properties: {
7593
+ host: {
7594
+ type: "object",
7595
+ required: ["hostname", "os", "arch"],
7596
+ properties: {
7597
+ hostname: { type: "string" },
7598
+ os: { type: "string", description: "e.g. Debian 12, Astra Linux 1.8, Windows 11, macOS 15" },
7599
+ kernel: { type: "string" },
7600
+ arch: {
7601
+ anyOf: [{ enum: ["x86_64", "aarch64", "riscv64", "loongarch64", "e2k", "mips64el"] }, { type: "string" }]
7602
+ },
7603
+ cpu: {
7604
+ type: "object",
7605
+ properties: {
7606
+ model: { type: "string" },
7607
+ cores: { type: "integer", minimum: 1 },
7608
+ loadPercent: { type: "number", minimum: 0 }
7609
+ },
7610
+ additionalProperties: true
7611
+ },
7612
+ memory: {
7613
+ type: "object",
7614
+ properties: { totalBytes: { type: "integer", minimum: 0 }, usedBytes: { type: "integer", minimum: 0 } },
7615
+ additionalProperties: true
7616
+ },
7617
+ gpus: {
7618
+ type: "array",
7619
+ items: {
7620
+ type: "object",
7621
+ properties: {
7622
+ name: { type: "string" },
7623
+ driver: { type: "string" },
7624
+ loadPercent: { type: "number", minimum: 0 },
7625
+ memoryBytes: { type: "integer", minimum: 0 }
7626
+ },
7627
+ additionalProperties: true
7628
+ }
7629
+ }
7630
+ },
7631
+ additionalProperties: true
7632
+ },
7633
+ temperatures: {
7634
+ description: "Sensor name \u2192 \xB0C (replaces /api/system/temperature).",
7635
+ type: "object",
7636
+ additionalProperties: { type: "number" }
7637
+ },
7638
+ disks: {
7639
+ type: "array",
7640
+ items: {
7641
+ type: "object",
7642
+ required: ["mount", "totalBytes", "freeBytes"],
7643
+ properties: {
7644
+ mount: { type: "string" },
7645
+ totalBytes: { type: "integer", minimum: 0 },
7646
+ freeBytes: { type: "integer", minimum: 0 }
7647
+ },
7648
+ additionalProperties: false
7649
+ }
7650
+ },
7651
+ uptimeSec: { type: "number", minimum: 0 },
7652
+ serviceUptimeSec: { type: "number", minimum: 0 },
7653
+ versions: {
7654
+ description: "Component \u2192 version (server, contract, engines, OS packages).",
7655
+ type: "object",
7656
+ additionalProperties: { type: "string" }
7657
+ }
7658
+ },
7659
+ patternProperties: { "^x-": true },
7660
+ additionalProperties: false,
7661
+ $defs: {
7662
+ logLevel: { enum: ["trace", "debug", "info", "warn", "error"] },
7663
+ logEntry: {
7664
+ type: "object",
7665
+ required: ["ts", "level", "message"],
7666
+ properties: {
7667
+ seq: { type: "integer", minimum: 0 },
7668
+ ts: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7669
+ level: { $ref: "#/$defs/logLevel" },
7670
+ target: { type: "string", description: "module / component" },
7671
+ message: { type: "string" },
7672
+ fields: { type: "object", additionalProperties: true },
7673
+ traceId: { type: "string" }
7674
+ },
7675
+ additionalProperties: false
7676
+ },
7677
+ logPage: {
7678
+ type: "object",
7679
+ required: ["items", "nextCursor"],
7680
+ properties: {
7681
+ items: { type: "array", items: { $ref: "#/$defs/logEntry" } },
7682
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7683
+ },
7684
+ additionalProperties: false
7685
+ },
7686
+ config: {
7687
+ description: 'Effective server configuration (TOML sections as JSON). Secret values are always returned as "***" and a PUT that sends "***" keeps the stored secret (redaction rule, 01a \xA73).',
7688
+ type: "object",
7689
+ required: ["revision", "values"],
7690
+ properties: {
7691
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7692
+ values: { type: "object", additionalProperties: true },
7693
+ redacted: {
7694
+ type: "array",
7695
+ items: { type: "string" },
7696
+ description: "JSON pointers of redacted secret values"
7697
+ },
7698
+ restartRequired: {
7699
+ type: "array",
7700
+ items: { type: "string" },
7701
+ description: "pointers whose change takes effect only after a restart"
7702
+ }
7703
+ },
7704
+ additionalProperties: false
7705
+ },
7706
+ configInput: {
7707
+ description: "PUT /system/config body (If-Match = config revision).",
7708
+ type: "object",
7709
+ required: ["values"],
7710
+ properties: { values: { type: "object", additionalProperties: true } },
7711
+ additionalProperties: false
7712
+ },
7713
+ diagnosticsRequest: {
7714
+ type: "object",
7715
+ properties: {
7716
+ checks: {
7717
+ type: "array",
7718
+ items: {
7719
+ anyOf: [
7720
+ { enum: ["engines", "displays", "audio", "network", "storage", "sync", "gateways"] },
7721
+ { type: "string" }
7722
+ ]
7723
+ },
7724
+ uniqueItems: true
7725
+ }
7726
+ },
7727
+ additionalProperties: false
7728
+ },
7729
+ backupRequest: {
7730
+ type: "object",
7731
+ properties: {
7732
+ include: {
7733
+ type: "array",
7734
+ items: {
7735
+ anyOf: [{ enum: ["config", "database", "venues", "shows", "keys", "assets"] }, { type: "string" }]
7736
+ },
7737
+ uniqueItems: true
7738
+ },
7739
+ note: { type: "string", maxLength: 512 }
7740
+ },
7741
+ additionalProperties: false
7742
+ },
7743
+ restoreRequest: {
7744
+ type: "object",
7745
+ required: ["uploadId", "confirm"],
7746
+ properties: {
7747
+ uploadId: {
7748
+ $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7",
7749
+ description: "tus upload (purpose restore) holding the backup archive"
7750
+ },
7751
+ confirm: { const: true }
7752
+ },
7753
+ additionalProperties: false
7754
+ },
7755
+ updateRequest: {
7756
+ type: "object",
7757
+ properties: {
7758
+ channel: { anyOf: [{ enum: ["stable", "beta"] }, { type: "string" }] },
7759
+ version: { $ref: "../../common/1.0/ids.schema.json#/$defs/semver" },
7760
+ uploadId: {
7761
+ $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7",
7762
+ description: "offline update package (purpose update)"
7763
+ },
7764
+ components: {
7765
+ type: "array",
7766
+ items: { type: "string" },
7767
+ uniqueItems: true,
7768
+ description: "server, engines, firmware:<deviceId> \u2026; absent = all"
7769
+ }
7770
+ },
7771
+ additionalProperties: false
7772
+ },
7773
+ updateStatus: {
7774
+ type: "object",
7775
+ required: ["status"],
7776
+ properties: {
7777
+ status: {
7778
+ anyOf: [
7779
+ { enum: ["idle", "checking", "available", "downloading", "installing", "restartPending", "failed"] },
7780
+ { type: "string" }
7781
+ ]
7782
+ },
7783
+ current: { type: "object", additionalProperties: { type: "string" } },
7784
+ available: { type: "object", additionalProperties: { type: "string" } },
7785
+ jobId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7786
+ checkedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7787
+ },
7788
+ additionalProperties: false
7789
+ },
7790
+ power: {
7791
+ description: "POST /system/reboot and /system/shutdown body.",
7792
+ type: "object",
7793
+ required: ["confirm"],
7794
+ properties: {
7795
+ confirm: { const: true },
7796
+ delaySec: { type: "integer", minimum: 0, maximum: 3600, default: 5 },
7797
+ reason: { type: "string", maxLength: 256 }
7798
+ },
7799
+ additionalProperties: false
7800
+ },
7801
+ powerAccepted: {
7802
+ type: "object",
7803
+ required: ["action", "at"],
7804
+ properties: {
7805
+ action: { enum: ["reboot", "shutdown"] },
7806
+ at: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7807
+ },
7808
+ additionalProperties: false
7809
+ },
7810
+ clock: {
7811
+ description: "Clock status of a node (02d ClockStatus).",
7812
+ type: "object",
7813
+ required: ["source", "locked"],
7814
+ properties: {
7815
+ source: { anyOf: [{ enum: ["ptp", "ntp", "local"] }, { type: "string" }] },
7816
+ offsetMs: { type: "number" },
7817
+ jitterMs: { type: "number", minimum: 0 },
7818
+ masterId: { type: "string" },
7819
+ locked: { type: "boolean" }
7820
+ },
7821
+ additionalProperties: false
7822
+ },
7823
+ node: {
7824
+ description: "Cluster node (02d UC-K1\u2013K3): this server and the engine hosts it drives.",
7825
+ type: "object",
7826
+ required: ["id", "role", "status"],
7827
+ properties: {
7828
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/docId" },
7829
+ name: { type: "string" },
7830
+ role: { anyOf: [{ enum: ["primary", "engine", "peer"] }, { type: "string" }] },
7831
+ status: { anyOf: [{ enum: ["up", "degraded", "down"] }, { type: "string" }] },
7832
+ address: { type: "string" },
7833
+ engines: { type: "array", items: { type: "string" } },
7834
+ clock: { $ref: "#/$defs/clock" },
7835
+ lastSeen: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7836
+ },
7837
+ patternProperties: { "^x-": true },
7838
+ additionalProperties: false
7839
+ },
7840
+ nodePage: {
7841
+ type: "object",
7842
+ required: ["items", "nextCursor"],
7843
+ properties: {
7844
+ items: { type: "array", items: { $ref: "#/$defs/node" } },
7845
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] }
7846
+ },
7847
+ additionalProperties: false
7848
+ }
7849
+ }
7850
+ },
7851
+ "https://freedome.nativemind.us/schemas/api/1.1/upload.schema.json": {
7852
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7853
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/upload.schema.json",
7854
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). tus 1.0.0 upload (02e \xA75.4, C12): JSON status of GET /uploads/{uploadId} for non-tus clients; the decoded Upload-Metadata. Root = upload status.",
7855
+ title: "Upload",
7856
+ type: "object",
7857
+ required: ["id", "length", "offset", "status", "metadata", "createdAt"],
7858
+ properties: {
7859
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7860
+ length: { type: "integer", minimum: 0, description: "Upload-Length" },
7861
+ offset: { type: "integer", minimum: 0, description: "Upload-Offset (bytes received and persisted)" },
7862
+ status: {
7863
+ anyOf: [
7864
+ { enum: ["uploading", "complete", "failed", "expired"] },
7865
+ { type: "string", pattern: "^[a-z_]{1,32}$" }
7866
+ ]
7867
+ },
7868
+ metadata: { $ref: "#/$defs/metadata" },
7869
+ assetId: {
7870
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7871
+ description: "asset created / updated on completion (purpose asset)"
7872
+ },
7873
+ problem: { $ref: "../../common/1.0/problem.schema.json" },
7874
+ expiresAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7875
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7876
+ links: {
7877
+ type: "object",
7878
+ properties: {
7879
+ self: { type: "string", format: "uri-reference" },
7880
+ asset: { type: "string", format: "uri-reference" }
7881
+ },
7882
+ additionalProperties: false
7883
+ }
7884
+ },
7885
+ additionalProperties: false,
7886
+ $defs: {
7887
+ metadata: {
7888
+ description: "Upload-Metadata (tus: comma-separated `key base64(value)` pairs), decoded.",
7889
+ type: "object",
7890
+ required: ["filename", "purpose"],
7891
+ properties: {
7892
+ filename: { type: "string", minLength: 1, maxLength: 512 },
7893
+ contentType: { $ref: "../../common/1.0/units.schema.json#/$defs/mediaType" },
7894
+ sha256: {
7895
+ $ref: "../../common/1.0/ids.schema.json#/$defs/sha256",
7896
+ description: "digest of the whole file, verified on completion (upload-checksum-mismatch)"
7897
+ },
7898
+ purpose: {
7899
+ anyOf: [
7900
+ { enum: ["asset", "import", "restore", "capture", "update"] },
7901
+ { type: "string", pattern: "^[a-z][a-z0-9_-]{0,31}$" }
7902
+ ]
7903
+ },
7904
+ assetId: {
7905
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
7906
+ description: "purpose asset: create the asset with this id (or replace the content of an existing one)"
7907
+ }
7908
+ },
7909
+ additionalProperties: true
7910
+ },
7911
+ capabilities: {
7912
+ description: "Informative mirror of the OPTIONS /uploads headers (Tus-Version, Tus-Extension, Tus-Max-Size, Tus-Checksum-Algorithm).",
7913
+ type: "object",
7914
+ required: ["version", "extensions"],
7915
+ properties: {
7916
+ version: { type: "array", items: { type: "string" } },
7917
+ extensions: {
7918
+ type: "array",
7919
+ items: {
7920
+ anyOf: [
7921
+ { enum: ["creation", "creation-with-upload", "termination", "checksum", "expiration"] },
7922
+ { type: "string" }
7923
+ ]
7924
+ }
7925
+ },
7926
+ maxSize: { type: "integer", minimum: 0 },
7927
+ checksumAlgorithms: { type: "array", items: { type: "string" } },
7928
+ maxChunkBytes: {
7929
+ type: "integer",
7930
+ minimum: 1,
7931
+ description: "server-recommended PATCH size (\u2264 95 MB behind Cloudflare)"
7932
+ }
7933
+ },
7934
+ additionalProperties: false
7935
+ }
7936
+ }
7937
+ },
7938
+ "https://freedome.nativemind.us/schemas/api/1.1/user.schema.json": {
7939
+ $schema: "https://json-schema.org/draft/2020-12/schema",
7940
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/user.schema.json",
7941
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Local user account of a media server (02e \xA75.1 /users, scope users:manage). Root = GET representation.",
7942
+ title: "User",
7943
+ allOf: [{ $ref: "#/$defs/user" }],
7944
+ $defs: {
7945
+ user: {
7946
+ type: "object",
7947
+ required: ["id", "username", "role", "revision", "createdAt"],
7948
+ properties: {
7949
+ id: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
7950
+ username: { $ref: "#/$defs/username" },
7951
+ displayName: { type: "string", maxLength: 128 },
7952
+ role: { $ref: "auth.schema.json#/$defs/role" },
7953
+ disabled: { type: "boolean" },
7954
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
7955
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7956
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
7957
+ lastLoginAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
7958
+ },
7959
+ patternProperties: { "^x-": true },
7960
+ additionalProperties: false
7961
+ },
7962
+ username: { type: "string", pattern: "^[a-z0-9][a-z0-9._-]{1,63}$" },
7963
+ input: {
7964
+ description: "POST /users.",
7965
+ type: "object",
7966
+ required: ["username", "password", "role"],
7967
+ properties: {
7968
+ username: { $ref: "#/$defs/username" },
7969
+ displayName: { type: "string", maxLength: 128 },
7970
+ password: { type: "string", minLength: 12, maxLength: 1024, writeOnly: true },
7971
+ role: { $ref: "auth.schema.json#/$defs/role" },
7972
+ disabled: { type: "boolean" }
7973
+ },
7974
+ additionalProperties: false
7975
+ },
7976
+ patch: {
7977
+ description: "PATCH /users/{userId} (merge-patch). Changing the password revokes the user's sessions.",
7978
+ type: "object",
7979
+ minProperties: 1,
7980
+ properties: {
7981
+ displayName: { type: "string", maxLength: 128 },
7982
+ password: { type: "string", minLength: 12, maxLength: 1024, writeOnly: true },
7983
+ role: { $ref: "auth.schema.json#/$defs/role" },
7984
+ disabled: { type: "boolean" }
7985
+ },
7986
+ additionalProperties: false
7987
+ },
7988
+ page: {
7989
+ type: "object",
7990
+ required: ["items", "nextCursor"],
7991
+ properties: {
7992
+ items: { type: "array", items: { $ref: "#/$defs/user" } },
7993
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
7994
+ count: { type: "integer", minimum: 0 }
7995
+ },
7996
+ additionalProperties: false
7997
+ }
7998
+ }
7999
+ },
8000
+ "https://freedome.nativemind.us/schemas/api/1.1/venue.schema.json": {
8001
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8002
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/venue.schema.json",
8003
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Venue resource (02e \xA74, \xA75.2) = .dome 1.1 venue manifest without format / kind ($defs reused from dome/1.1) + server fields. Root = GET representation.",
8004
+ title: "Venue",
8005
+ allOf: [{ $ref: "#/$defs/venue" }],
8006
+ $defs: {
8007
+ venue: {
8008
+ type: "object",
8009
+ allOf: [{ $ref: "#/$defs/body" }],
8010
+ required: ["id", "revision", "status", "meta", "dome", "displays"],
8011
+ properties: {
8012
+ id: {
8013
+ $ref: "../../common/1.0/ids.schema.json#/$defs/docId",
8014
+ description: "venue id (= meta.id for venues created from a .dome)"
8015
+ },
8016
+ revision: { $ref: "../../common/1.0/ids.schema.json#/$defs/revision" },
8017
+ status: {
8018
+ anyOf: [
8019
+ { enum: ["idle", "loading", "ready", "playing", "degraded", "error"] },
8020
+ { type: "string", pattern: "^[a-z][a-z_-]{0,31}$" }
8021
+ ]
8022
+ },
8023
+ default: { type: "boolean", description: "true for the venue the alias `default` resolves to" },
8024
+ activeShowId: { anyOf: [{ $ref: "../../common/1.0/ids.schema.json#/$defs/docId" }, { type: "null" }] },
8025
+ createdAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" },
8026
+ updatedAt: { $ref: "../../common/1.0/units.schema.json#/$defs/timestamp" }
8027
+ },
8028
+ unevaluatedProperties: false
8029
+ },
8030
+ body: {
8031
+ description: "Venue content shared by GET / PUT / POST: the .dome venue sections.",
8032
+ type: "object",
8033
+ properties: {
8034
+ meta: { $ref: "../../dome/1.1/dome.schema.json#/$defs/meta" },
8035
+ dome: { $ref: "../../dome/1.1/dome.schema.json#/$defs/dome" },
8036
+ displays: { type: "array", items: { $ref: "../../dome/1.1/dome.schema.json#/$defs/display" } },
8037
+ calibration: { $ref: "../../dome/1.1/dome.schema.json#/$defs/calibration" },
8038
+ audio: { $ref: "../../dome/1.1/dome.schema.json#/$defs/audio" },
8039
+ compat: { $ref: "../../dome/1.1/dome.schema.json#/$defs/compat" }
8040
+ },
8041
+ patternProperties: { "^x-": true }
8042
+ },
8043
+ input: {
8044
+ description: "POST /venues and PUT /venues/{venueId} body.",
8045
+ type: "object",
8046
+ allOf: [{ $ref: "#/$defs/body" }],
8047
+ required: ["meta", "dome", "displays"],
8048
+ unevaluatedProperties: false
8049
+ },
8050
+ patch: {
8051
+ description: "PATCH body (application/merge-patch+json, RFC 7396) over the venue sections; the merged result must be a valid input.",
8052
+ type: "object",
8053
+ minProperties: 1,
8054
+ propertyNames: { pattern: "^(meta|dome|displays|calibration|audio|compat|x-.+)$" }
8055
+ },
8056
+ page: {
8057
+ description: "GET /venues page.",
8058
+ type: "object",
8059
+ allOf: [{ $ref: "../../common/1.0/pagination.schema.json" }],
8060
+ properties: { items: { type: "array", items: { $ref: "#/$defs/venue" } } }
8061
+ }
8062
+ }
8063
+ },
8064
+ "https://freedome.nativemind.us/schemas/api/1.1/ws-messages.schema.json": {
8065
+ $schema: "https://json-schema.org/draft/2020-12/schema",
8066
+ $id: "https://freedome.nativemind.us/schemas/api/1.1/ws-messages.schema.json",
8067
+ $comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Plain WebSocket messages, sub-protocol freedome.v1 (02e \xA78.1; asyncapi/ws.yaml). Each $def `<type>` is a full envelope with its `data`; the root accepts any known message.",
8068
+ title: "WebSocket messages (freedome.v1)",
8069
+ oneOf: [
8070
+ { $ref: "#/$defs/hello" },
8071
+ { $ref: "#/$defs/welcome" },
8072
+ { $ref: "#/$defs/subscribe" },
8073
+ { $ref: "#/$defs/unsubscribe" },
8074
+ { $ref: "#/$defs/call" },
8075
+ { $ref: "#/$defs/result" },
8076
+ { $ref: "#/$defs/error" },
8077
+ { $ref: "#/$defs/event" },
8078
+ { $ref: "#/$defs/resync" },
8079
+ { $ref: "#/$defs/ping" },
8080
+ { $ref: "#/$defs/pong" },
8081
+ { $ref: "#/$defs/bye" }
8082
+ ],
8083
+ $defs: {
8084
+ helloData: {
8085
+ type: "object",
8086
+ required: ["app"],
8087
+ properties: {
8088
+ token: {
8089
+ type: "string",
8090
+ description: "access JWT or fdk_ key (or Authorization header / ?access_token= for browsers)"
8091
+ },
8092
+ app: { type: "string", minLength: 1 },
8093
+ appVersion: { type: "string" },
8094
+ sdk: { type: "string", examples: ["freedome_client/1.0.0"] },
8095
+ resume: {
8096
+ type: "object",
8097
+ required: ["sinceSeq"],
8098
+ properties: { sinceSeq: { type: "integer", minimum: 0 } },
8099
+ patternProperties: { "^x-": true },
8100
+ additionalProperties: false
8101
+ }
8102
+ },
8103
+ patternProperties: { "^x-": true },
8104
+ additionalProperties: false
8105
+ },
8106
+ welcomeData: {
8107
+ type: "object",
8108
+ required: ["sessionId", "server", "scopes", "heartbeatSec"],
8109
+ properties: {
8110
+ sessionId: { $ref: "../../common/1.0/ids.schema.json#/$defs/uuidv7" },
8111
+ server: { $ref: "info.schema.json" },
8112
+ scopes: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/scope" } },
8113
+ heartbeatSec: { type: "integer", minimum: 1, default: 20 },
8114
+ maxMessageBytes: { type: "integer", minimum: 1024, default: 1048576 }
8115
+ },
8116
+ patternProperties: { "^x-": true },
8117
+ additionalProperties: false
8118
+ },
8119
+ subscribeData: {
8120
+ type: "object",
8121
+ required: ["topics"],
8122
+ properties: {
8123
+ topics: {
8124
+ type: "array",
8125
+ minItems: 1,
8126
+ maxItems: 256,
8127
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" }
8128
+ },
8129
+ sinceSeq: { type: "integer", minimum: 0 },
8130
+ options: {
8131
+ type: "object",
8132
+ properties: {
8133
+ positionHz: {
8134
+ type: "number",
8135
+ exclusiveMinimum: 0,
8136
+ maximum: 30,
8137
+ description: "player.position rate (default 4)"
8138
+ },
8139
+ analysisHz: {
8140
+ type: "number",
8141
+ exclusiveMinimum: 0,
8142
+ maximum: 60,
8143
+ description: "audio.analysis rate (default 15); the server sends the newest frame"
8144
+ }
8145
+ },
8146
+ patternProperties: { "^x-": true },
8147
+ additionalProperties: false
8148
+ }
8149
+ },
8150
+ patternProperties: { "^x-": true },
8151
+ additionalProperties: false
8152
+ },
8153
+ unsubscribeData: {
8154
+ type: "object",
8155
+ required: ["topics"],
8156
+ properties: {
8157
+ topics: {
8158
+ type: "array",
8159
+ minItems: 1,
8160
+ maxItems: 256,
8161
+ items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" }
8162
+ }
8163
+ },
8164
+ patternProperties: { "^x-": true },
8165
+ additionalProperties: false
8166
+ },
8167
+ subscribeResult: {
8168
+ description: "`result.body` of subscribe / unsubscribe: accepted filters + denied ones with a problem (no leak of existence).",
8169
+ type: "object",
8170
+ required: ["topics"],
8171
+ properties: {
8172
+ topics: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" } },
8173
+ denied: {
8174
+ type: "array",
8175
+ items: {
8176
+ type: "object",
8177
+ required: ["topic", "problem"],
8178
+ properties: {
8179
+ topic: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" },
8180
+ problem: { $ref: "../../common/1.0/problem.schema.json" }
8181
+ },
8182
+ patternProperties: { "^x-": true },
8183
+ additionalProperties: false
8184
+ }
8185
+ }
8186
+ },
8187
+ patternProperties: { "^x-": true },
8188
+ additionalProperties: false
8189
+ },
8190
+ resultData: {
8191
+ type: "object",
8192
+ required: ["status"],
8193
+ properties: {
8194
+ status: {
8195
+ type: "integer",
8196
+ minimum: 100,
8197
+ maximum: 599,
8198
+ description: "HTTP status of the equivalent REST call"
8199
+ },
8200
+ etag: { type: "string" },
8201
+ body: { description: "REST response body of the operation (absent for 204)" }
8202
+ },
8203
+ patternProperties: { "^x-": true },
8204
+ additionalProperties: false
8205
+ },
8206
+ resyncData: {
8207
+ description: "Client must re-read state via REST / GraphQL for these topics.",
8208
+ type: "object",
8209
+ required: ["topics", "reason"],
8210
+ properties: {
8211
+ topics: { type: "array", items: { $ref: "../../common/1.0/ids.schema.json#/$defs/topicFilter" } },
8212
+ reason: { anyOf: [{ enum: ["gap-too-old", "server-restart", "overflow"] }, { type: "string" }] }
8213
+ },
8214
+ patternProperties: { "^x-": true },
8215
+ additionalProperties: false
8216
+ },
8217
+ emptyData: { type: "object", maxProperties: 0 },
8218
+ byeData: {
8219
+ type: "object",
8220
+ required: ["reason"],
8221
+ properties: {
8222
+ reason: { type: "string" },
8223
+ code: {
8224
+ type: "integer",
8225
+ description: "WebSocket close code that follows: 4401 unauthenticated, 4403 forbidden, 4408 heartbeat timeout, 4409 superseded, 4413 message too large, 1012 restart"
8226
+ }
8227
+ },
8228
+ patternProperties: { "^x-": true },
8229
+ additionalProperties: false
8230
+ },
8231
+ hello: {
8232
+ description: "C\u2192S first message.",
8233
+ type: "object",
8234
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8235
+ required: ["type", "id", "ts", "data"],
8236
+ properties: { type: { const: "hello" }, data: { $ref: "#/$defs/helloData" } }
8237
+ },
8238
+ welcome: {
8239
+ description: "S\u2192C answer to hello.",
8240
+ type: "object",
8241
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8242
+ required: ["type", "id", "ts", "data", "replyTo"],
8243
+ properties: { type: { const: "welcome" }, data: { $ref: "#/$defs/welcomeData" } }
8244
+ },
8245
+ subscribe: {
8246
+ description: "C\u2192S; answered by result (subscribeResult).",
8247
+ type: "object",
8248
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8249
+ required: ["type", "id", "ts", "data"],
8250
+ properties: { type: { const: "subscribe" }, data: { $ref: "#/$defs/subscribeData" } }
8251
+ },
8252
+ unsubscribe: {
8253
+ description: "C\u2192S; answered by result.",
8254
+ type: "object",
8255
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8256
+ required: ["type", "id", "ts", "data"],
8257
+ properties: { type: { const: "unsubscribe" }, data: { $ref: "#/$defs/unsubscribeData" } }
8258
+ },
8259
+ call: {
8260
+ description: "C\u2192S operation call (`op` = OpenAPI operationId; envelope id = idempotency key).",
8261
+ type: "object",
8262
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8263
+ required: ["type", "id", "ts", "data"],
8264
+ properties: {
8265
+ type: { const: "call" },
8266
+ data: { $ref: "../../common/1.0/envelope.schema.json#/$defs/callData" }
8267
+ }
8268
+ },
8269
+ result: {
8270
+ description: "S\u2192C reply to subscribe / unsubscribe / call.",
8271
+ type: "object",
8272
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8273
+ required: ["type", "id", "ts", "data", "replyTo"],
8274
+ properties: { type: { const: "result" }, data: { $ref: "#/$defs/resultData" } }
8275
+ },
8276
+ error: {
8277
+ description: "S\u2192C problem reply (replyTo set when answering a message).",
8278
+ type: "object",
8279
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8280
+ required: ["type", "id", "ts", "data"],
8281
+ properties: { type: { const: "error" }, data: { $ref: "../../common/1.0/problem.schema.json" } }
8282
+ },
8283
+ event: {
8284
+ description: "S\u2192C event (02e \xA77.1).",
8285
+ type: "object",
8286
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8287
+ required: ["type", "id", "ts", "data", "topic"],
8288
+ properties: { type: { const: "event" }, data: { $ref: "event-kinds.schema.json" } }
8289
+ },
8290
+ resync: {
8291
+ description: "S\u2192C: resume gap too old.",
8292
+ type: "object",
8293
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8294
+ required: ["type", "id", "ts", "data"],
8295
+ properties: { type: { const: "resync" }, data: { $ref: "#/$defs/resyncData" } }
8296
+ },
8297
+ ping: {
8298
+ description: "Either side; 2 missed heartbeats \u2192 close 4408.",
8299
+ type: "object",
8300
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8301
+ required: ["type", "id", "ts", "data"],
8302
+ properties: { type: { const: "ping" }, data: { $ref: "#/$defs/emptyData" } }
8303
+ },
8304
+ pong: {
8305
+ description: "Reply to ping.",
8306
+ type: "object",
8307
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8308
+ required: ["type", "id", "ts", "data", "replyTo"],
8309
+ properties: { type: { const: "pong" }, data: { $ref: "#/$defs/emptyData" } }
8310
+ },
8311
+ bye: {
8312
+ description: "S\u2192C before closing.",
8313
+ type: "object",
8314
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json" }],
8315
+ required: ["type", "id", "ts", "data"],
8316
+ properties: { type: { const: "bye" }, data: { $ref: "#/$defs/byeData" } }
8317
+ },
8318
+ eventPage: {
8319
+ description: "GET /events (history ring buffer, resume after reconnect): events with seq > sinceSeq on the requested topics. `resync: true` = the gap is older than the buffer; re-read state.",
8320
+ type: "object",
8321
+ required: ["items", "nextCursor"],
8322
+ properties: {
8323
+ items: { type: "array", items: { $ref: "#/$defs/event" } },
8324
+ nextCursor: { anyOf: [{ type: "string" }, { type: "null" }] },
8325
+ lastSeq: { type: "integer", minimum: 0 },
8326
+ resync: { type: "boolean" }
8327
+ },
8328
+ additionalProperties: false
8329
+ },
8330
+ socketioAck: {
8331
+ description: "socket.io acknowledgement arguments `(err, result)` of subscribe / unsubscribe / call on namespace /v1 (02e \xA78.2): always two arguments: err = problem or null, result = the WS result data (status, etag, body).",
8332
+ type: "array",
8333
+ minItems: 2,
8334
+ maxItems: 2,
8335
+ prefixItems: [
8336
+ { anyOf: [{ $ref: "../../common/1.0/problem.schema.json" }, { type: "null" }] },
8337
+ { anyOf: [{ $ref: "#/$defs/resultData" }, { type: "null" }] }
8338
+ ],
8339
+ items: false
8340
+ },
8341
+ socketioCall: {
8342
+ description: "socket.io `call` payload = WS call data (02e \xA78.2).",
8343
+ allOf: [{ $ref: "../../common/1.0/envelope.schema.json#/$defs/callData" }]
8344
+ }
8345
+ }
8346
+ },
4283
8347
  "https://freedome.nativemind.us/schemas/boranko/1.0/boranko.schema.json": {
4284
8348
  $schema: "https://json-schema.org/draft/2020-12/schema",
4285
8349
  $id: "https://freedome.nativemind.us/schemas/boranko/1.0/boranko.schema.json",