Brand Studio docs
Engineering manualSchema reference

Brand Studio selected-plan status response

Declared schema: schemas/selected-plan-status-response.schema.json

Source: schemas/selected-plan-status-response.schema.json. This is the complete declaration, including nested definitions and constraints. Its presence is not evidence that a runtime producer or consumer validates against it.

All schemas · Data structures and lineage

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mirrorfactory.com/schemas/selected-plan-status-response.schema.json",
  "title": "Brand Studio selected-plan status response",
  "description": "The owner, admin or public-example poll envelope returned by GET /api/comprehensive after browser sanitization.",
  "$comment": "Semantic invariant: legs_completed <= legs_total. Standard JSON Schema cannot compare sibling numeric values; the status producer must preserve this bound, exercised by tests/hosted-app-status-response.test.mjs.",
  "type": "object",
  "required": [
    "status",
    "pull_id",
    "run_id",
    "route",
    "source_url",
    "domain",
    "pull_profile_id",
    "elapsed_ms",
    "overall_score",
    "summary",
    "leg_summary",
    "legs_completed",
    "legs_total",
    "capture_result",
    "created_at",
    "contract_version"
  ],
  "properties": {
    "status": {
      "enum": [
        "running",
        "passed",
        "partial",
        "failed",
        "completed"
      ]
    },
    "pull_id": {
      "type": "string",
      "minLength": 1
    },
    "run_id": {
      "type": "string",
      "minLength": 1
    },
    "route": {
      "type": "string",
      "minLength": 1
    },
    "source_url": {
      "type": "string",
      "minLength": 1
    },
    "domain": {
      "type": "string",
      "minLength": 1
    },
    "pull_profile_id": {
      "type": "string",
      "minLength": 1
    },
    "elapsed_ms": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "overall_score": {
      "type": [
        "number",
        "null"
      ]
    },
    "summary": {
      "type": [
        "object",
        "null"
      ]
    },
    "leg_summary": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "legs_completed": {
      "type": "integer",
      "minimum": 0,
      "description": "Settled checks in the persisted leg summary, excluding pending, running and queued checks. Must not exceed legs_total."
    },
    "legs_total": {
      "type": "integer",
      "minimum": 0,
      "description": "Actual scope from the persisted summary, at least its recorded leg count. Zero means no scope is recorded yet; selected plans may exceed fourteen checks."
    },
    "capture_result": {
      "type": [
        "object",
        "null"
      ]
    },
    "query_manifest": {
      "type": "object"
    },
    "created_at": {
      "type": "string",
      "minLength": 1
    },
    "contract_version": {
      "const": "brand-studio-report/v1"
    },
    "billing_state": {
      "enum": [
        "pending",
        "unknown",
        "charged",
        "not_chargeable"
      ],
      "description": "Present for terminal pulls with a versioned billing marker; report completion does not itself confirm the debit."
    },
    "charged": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "True when billing is confirmed, false when not chargeable, null while reconciliation is unresolved."
    },
    "billing_retryable": {
      "type": "boolean",
      "description": "Whether the terminal pull has pending or unknown billing eligible for reconciliation."
    },
    "recovery": {
      "type": "object",
      "description": "Deterministic per-section recovery summary (brand-studio-section-recovery/v1): which items are complete, incomplete, blocked or not selected, whether a bounded completion is eligible, and the customer sentence to show."
    },
    "viewed_as_admin": {
      "const": true
    },
    "public_example": {
      "const": true
    }
  },
  "additionalProperties": false
}