{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/scalar/main/json-schema/scalar-publish-record-schema.json",
  "title": "publish-record",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scalar-publish-api-openapi.yml#/components/schemas/publish-record",
  "type": "object",
  "properties": {
    "uid": {
      "default": "nanoid()",
      "$ref": "#/$defs/nanoid"
    },
    "createdAt": {
      "default": "unixTimestamp()",
      "$ref": "#/$defs/timestamp"
    },
    "updatedAt": {
      "default": "unixTimestamp()",
      "$ref": "#/$defs/timestamp"
    },
    "projectUid": {
      "$ref": "#/$defs/nanoid"
    },
    "status": {
      "anyOf": [
        {
          "type": "string",
          "const": "pending"
        },
        {
          "type": "string",
          "const": "building"
        },
        {
          "type": "string",
          "const": "deployed"
        },
        {
          "type": "string",
          "const": "inactive"
        },
        {
          "type": "string",
          "const": "error"
        },
        {
          "type": "string",
          "const": "deleted"
        },
        {
          "type": "string",
          "const": "cancelled"
        }
      ]
    },
    "deployedAt": {
      "default": null,
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "message": {
      "default": "",
      "type": "string"
    },
    "domain": {
      "default": "",
      "type": "string"
    },
    "preview": {
      "default": false,
      "type": "boolean"
    },
    "commitSha": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "version": {
      "default": "1.0.0",
      "type": "string",
      "enum": [
        "1.0.0",
        "2.0.0"
      ]
    },
    "isWysiwyg": {
      "default": false,
      "type": "boolean"
    },
    "subpath": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "configPath": {
      "default": "scalar.config.json",
      "type": "string"
    },
    "registryApis": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uid": {
            "$ref": "#/$defs/nanoid"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "uid",
          "version"
        ],
        "additionalProperties": false
      }
    },
    "agentToken": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "uid",
    "createdAt",
    "updatedAt",
    "projectUid",
    "status",
    "deployedAt",
    "message",
    "domain",
    "preview",
    "commitSha",
    "version",
    "isWysiwyg",
    "subpath",
    "configPath",
    "registryApis",
    "agentToken"
  ],
  "additionalProperties": false,
  "$defs": {
    "nanoid": {
      "type": "string",
      "minLength": 5
    },
    "timestamp": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}