{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/percher-app/json-schema/percher-app-deployment-schema.json",
  "title": "Deployment",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/percher-app-openapi.json#/components/schemas/Deployment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "appId": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "building",
        "deploying",
        "live",
        "failed"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "live",
        "preview"
      ]
    },
    "previewSlug": {
      "type": [
        "string",
        "null"
      ]
    },
    "buildLog": {
      "type": [
        "string",
        "null"
      ]
    },
    "errorMessage": {
      "type": [
        "string",
        "null"
      ]
    },
    "errorCode": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "WORKER_UNAVAILABLE",
        "WORKER_UNAVAILABLE_PERSISTENT",
        "BUILD_TIMEOUT",
        "BUILD_FAILED",
        "WORKER_ERROR",
        "DEPLOY_STALLED"
      ]
    },
    "containerId": {
      "type": [
        "string",
        "null"
      ]
    },
    "commitSha": {
      "type": [
        "string",
        "null"
      ]
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "finishedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}