BusConsultas (qry)

qry.sources.resolve

Resuelve una fuente (`SeekableMediaSource`, r04) de sources-svc.

ImplementadoSin versión del tren todavía· generada desde packages/api-contracts/src/bus/nats.ts

Página generada desde packages/api-contracts/src/bus/nats.ts + packages/api-contracts/src/bus/routes.ts. No se edita a mano: bun run docs:gen la regenera y bun run docs:check falla si difiere.

qry.sources.resolve · v1

Resuelve una fuente (SeekableMediaSource, r04) de sources-svc. Hoy sólo la admite styx-ops: ningún servicio la llama en un production path.

CampoValor
Familiaqry
Versión1
Tope del payload65536 bytes
ContratoSourcesResolve en packages/api-contracts/src/bus/nats.ts

Rutas (BUS_ROUTES)

Deny-by-default: un emisor fuera de la allowlist se deniega y se audita (dec-0119 §4).

AtiendeTransporteEmisores admitidosRate (por emisor)
sources-svcnatsstyx-ops100/s, ráfaga 200

Petición

{
  "type": "object",
  "required": [
    "assetId",
    "client"
  ],
  "properties": {
    "assetId": {
      "type": "string",
      "minLength": 1
    },
    "client": {
      "type": "object",
      "properties": {
        "codecs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "containers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "maxBitrateBps": {
          "type": "integer"
        },
        "preferredKind": {
          "anyOf": [
            {
              "type": "string",
              "const": "local"
            },
            {
              "type": "string",
              "const": "http"
            },
            {
              "type": "string",
              "const": "s3"
            },
            {
              "type": "string",
              "const": "webdav"
            },
            {
              "type": "string",
              "const": "torrent"
            },
            {
              "type": "string",
              "const": "jellyfin"
            },
            {
              "type": "string",
              "const": "xtream"
            },
            {
              "type": "string",
              "const": "composite"
            }
          ]
        },
        "candidateLimit": {
          "type": "integer",
          "minimum": 1
        }
      }
    }
  }
}

Respuesta

{
  "anyOf": [
    {
      "type": "object",
      "required": [
        "ok",
        "data"
      ],
      "properties": {
        "ok": {
          "type": "boolean",
          "const": true
        },
        "data": {
          "type": "object",
          "required": [
            "resolved"
          ],
          "properties": {
            "resolved": {
              "type": "boolean"
            },
            "sourceKind": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "local"
                },
                {
                  "type": "string",
                  "const": "http"
                },
                {
                  "type": "string",
                  "const": "s3"
                },
                {
                  "type": "string",
                  "const": "webdav"
                },
                {
                  "type": "string",
                  "const": "torrent"
                },
                {
                  "type": "string",
                  "const": "jellyfin"
                },
                {
                  "type": "string",
                  "const": "xtream"
                },
                {
                  "type": "string",
                  "const": "composite"
                }
              ]
            },
            "uri": {
              "type": "string"
            },
            "score": {
              "type": "number"
            },
            "reasons": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "sourceKind",
                  "score",
                  "why"
                ],
                "properties": {
                  "sourceKind": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": "local"
                      },
                      {
                        "type": "string",
                        "const": "http"
                      },
                      {
                        "type": "string",
                        "const": "s3"
                      },
                      {
                        "type": "string",
                        "const": "webdav"
                      },
                      {
                        "type": "string",
                        "const": "torrent"
                      },
                      {
                        "type": "string",
                        "const": "jellyfin"
                      },
                      {
                        "type": "string",
                        "const": "xtream"
                      },
                      {
                        "type": "string",
                        "const": "composite"
                      }
                    ]
                  },
                  "score": {
                    "type": "number"
                  },
                  "why": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": "probe-ok"
                      },
                      {
                        "type": "string",
                        "const": "probe-failed"
                      },
                      {
                        "type": "string",
                        "const": "no-adapter"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "ok",
        "error"
      ],
      "properties": {
        "ok": {
          "type": "boolean",
          "const": false
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "category",
            "retryable"
          ],
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "category": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "transient"
                },
                {
                  "type": "string",
                  "const": "permanent"
                },
                {
                  "type": "string",
                  "const": "recoverable"
                }
              ]
            },
            "retryable": {
              "type": "boolean"
            },
            "suggestedAction": {
              "type": "string"
            },
            "details": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {}
                },
                {
                  "type": "array",
                  "items": {}
                }
              ]
            },
            "causedBy": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {}
                  },
                  {
                    "type": "array",
                    "items": {}
                  }
                ]
              }
            }
          }
        }
      }
    }
  ]
}