{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/locus-report/json-schema/locus-report-property-update-polled-status-schema.json",
  "title": "PropertyUpdatePolledStatus",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/locus-report-openapi.json#/components/schemas/PropertyUpdatePolledStatus",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "property_update_job"
        },
        "jobId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "payment_pending",
            "queued",
            "processing",
            "ready",
            "partial",
            "failed"
          ]
        },
        "stage": {
          "type": "string",
          "enum": [
            "request_received",
            "locating_property",
            "checking_recent_records",
            "researching_supporting_context",
            "building_report",
            "rendering_pdf",
            "rendering_video",
            "ready"
          ]
        },
        "statusUrl": {
          "type": "string",
          "format": "uri"
        },
        "expiresAt": {
          "type": "string"
        },
        "pollAfterSeconds": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "estimatedSecondsRemaining": {
          "type": "object",
          "properties": {
            "min": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "min",
            "max"
          ],
          "additionalProperties": false
        },
        "progressMessage": {
          "type": "string"
        },
        "deliverables": {
          "type": "object",
          "properties": {
            "report": {
              "type": "string",
              "enum": [
                "pending",
                "ready"
              ]
            },
            "pdf": {
              "type": "string",
              "enum": [
                "pending",
                "ready"
              ]
            },
            "video": {
              "type": "string",
              "enum": [
                "pending",
                "rendering",
                "ready",
                "failed"
              ]
            }
          },
          "required": [
            "report",
            "pdf",
            "video"
          ],
          "additionalProperties": false
        },
        "artifacts": {
          "type": "object",
          "properties": {
            "reportUrl": {
              "type": "string",
              "format": "uri"
            },
            "pdfUrl": {
              "type": "string",
              "format": "uri"
            },
            "videoUrl": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "reportUrl"
          ],
          "additionalProperties": false
        },
        "videoScenes": {
          "description": "Timestamp -> scene -> source map for the rendered MP4 (citable/scrubbable).",
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "startMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "endMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "kind": {
                "type": "string",
                "enum": [
                  "context",
                  "subject",
                  "finding",
                  "handoff"
                ]
              },
              "eyebrow": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "source": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "sourceName": {
                        "type": "string"
                      },
                      "sourceUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "recordId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "sourceName"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "startMs",
              "endMs",
              "kind",
              "eyebrow",
              "title",
              "source"
            ],
            "additionalProperties": false
          }
        },
        "errorCode": {
          "type": "string"
        },
        "emailPackage": {
          "description": "Present on a ready or partial job that was submitted with `brand`. Links are the proof-gated report, PDF, and video URLs.",
          "type": "object",
          "properties": {
            "subject": {
              "type": "string"
            },
            "fromLabel": {
              "type": "string",
              "description": "Display name to send as. Send from your own address."
            },
            "replyTo": {
              "description": "The brand email, when one was supplied.",
              "type": "string"
            },
            "html": {
              "type": "string",
              "description": "Complete inline-styled HTML body. Some mail clients drop the inline logo image; the text lockup always renders."
            },
            "text": {
              "type": "string",
              "description": "Plain-text alternative."
            },
            "proofPlaceholder": {
              "description": "When present, the report links in html and text contain this literal placeholder. Replace it with your proof parameter (see access.proofParams) before sending.",
              "type": "string"
            }
          },
          "required": [
            "subject",
            "fromLabel",
            "html",
            "text"
          ],
          "additionalProperties": false
        },
        "videoRender": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "pending",
                "rendering",
                "ready",
                "failed"
              ]
            },
            "attempts": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "lastErrorCode": {
              "type": "string"
            }
          },
          "required": [
            "status",
            "attempts"
          ],
          "additionalProperties": false
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "flyerReady": {
          "type": "boolean",
          "const": false
        }
      },
      "required": [
        "kind",
        "jobId",
        "status",
        "stage",
        "statusUrl",
        "expiresAt",
        "estimatedSecondsRemaining",
        "progressMessage",
        "deliverables",
        "videoRender",
        "createdAt",
        "updatedAt",
        "flyerReady"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "property_update_job"
        },
        "jobId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "payment_pending",
            "queued",
            "processing",
            "ready",
            "partial",
            "failed"
          ]
        },
        "stage": {
          "type": "string",
          "enum": [
            "request_received",
            "locating_property",
            "checking_recent_records",
            "researching_supporting_context",
            "building_report",
            "rendering_pdf",
            "rendering_video",
            "ready"
          ]
        },
        "statusUrl": {
          "type": "string",
          "format": "uri"
        },
        "expiresAt": {
          "type": "string"
        },
        "pollAfterSeconds": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "estimatedSecondsRemaining": {
          "type": "object",
          "properties": {
            "min": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "min",
            "max"
          ],
          "additionalProperties": false
        },
        "progressMessage": {
          "type": "string"
        },
        "deliverables": {
          "type": "object",
          "properties": {
            "report": {
              "type": "string",
              "enum": [
                "pending",
                "ready"
              ]
            },
            "pdf": {
              "type": "string",
              "enum": [
                "pending",
                "ready"
              ]
            },
            "video": {
              "type": "string",
              "enum": [
                "pending",
                "rendering",
                "ready",
                "failed"
              ]
            }
          },
          "required": [
            "report",
            "pdf",
            "video"
          ],
          "additionalProperties": false
        },
        "artifacts": {
          "type": "object",
          "properties": {
            "reportUrl": {
              "type": "string",
              "format": "uri"
            },
            "pdfUrl": {
              "type": "string",
              "format": "uri"
            },
            "videoUrl": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "reportUrl"
          ],
          "additionalProperties": false
        },
        "videoScenes": {
          "description": "Timestamp -> scene -> source map for the rendered MP4 (citable/scrubbable).",
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "startMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "endMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "kind": {
                "type": "string",
                "enum": [
                  "context",
                  "subject",
                  "finding",
                  "handoff"
                ]
              },
              "eyebrow": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "source": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "sourceName": {
                        "type": "string"
                      },
                      "sourceUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "recordId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "sourceName"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "startMs",
              "endMs",
              "kind",
              "eyebrow",
              "title",
              "source"
            ],
            "additionalProperties": false
          }
        },
        "errorCode": {
          "type": "string"
        },
        "emailPackage": {
          "description": "Present on a ready or partial job that was submitted with `brand`. Links are the proof-gated report, PDF, and video URLs.",
          "type": "object",
          "properties": {
            "subject": {
              "type": "string"
            },
            "fromLabel": {
              "type": "string",
              "description": "Display name to send as. Send from your own address."
            },
            "replyTo": {
              "description": "The brand email, when one was supplied.",
              "type": "string"
            },
            "html": {
              "type": "string",
              "description": "Complete inline-styled HTML body. Some mail clients drop the inline logo image; the text lockup always renders."
            },
            "text": {
              "type": "string",
              "description": "Plain-text alternative."
            },
            "proofPlaceholder": {
              "description": "When present, the report links in html and text contain this literal placeholder. Replace it with your proof parameter (see access.proofParams) before sending.",
              "type": "string"
            }
          },
          "required": [
            "subject",
            "fromLabel",
            "html",
            "text"
          ],
          "additionalProperties": false
        },
        "videoRender": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "pending",
                "rendering",
                "ready",
                "failed"
              ]
            },
            "attempts": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "lastErrorCode": {
              "type": "string"
            }
          },
          "required": [
            "status",
            "attempts"
          ],
          "additionalProperties": false
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "flyerReady": {
          "type": "boolean",
          "const": true
        },
        "flyerHandoffUrl": {
          "type": "string",
          "format": "uri",
          "description": "Ready proof-gated PDF URL. Use the emitted URL; do not transform the private job token."
        },
        "flyerHandoff": {
          "type": "object",
          "properties": {
            "pdfUrl": {
              "type": "string",
              "format": "uri"
            },
            "expiresAt": {
              "type": "string"
            }
          },
          "required": [
            "pdfUrl",
            "expiresAt"
          ],
          "additionalProperties": false,
          "description": "Pass this object directly as reportHandoff to locus-property-flyer."
        }
      },
      "required": [
        "kind",
        "jobId",
        "status",
        "stage",
        "statusUrl",
        "expiresAt",
        "estimatedSecondsRemaining",
        "progressMessage",
        "deliverables",
        "videoRender",
        "createdAt",
        "updatedAt",
        "flyerReady",
        "flyerHandoffUrl",
        "flyerHandoff"
      ],
      "additionalProperties": false
    }
  ]
}