{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/xhostd-com/json-schema/xhostd-com-app-response-schema.json",
  "title": "AppResponse",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api.xhostd.com-openapi.json#/components/schemas/AppResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "repo_url": {
      "type": "string",
      "title": "Repo Url"
    },
    "template": {
      "type": "string",
      "title": "Template"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "external_db_access_enabled": {
      "type": "boolean",
      "title": "External Db Access Enabled"
    },
    "external_blob_access_enabled": {
      "type": "boolean",
      "title": "External Blob Access Enabled"
    },
    "port_forwarding_enabled": {
      "type": "boolean",
      "title": "Port Forwarding Enabled"
    },
    "port_forwarding_available": {
      "type": "boolean",
      "title": "Port Forwarding Available"
    },
    "agent_protected_actions_enabled": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Protected Actions Enabled"
    },
    "agent_protected_actions_effective": {
      "type": "boolean",
      "title": "Agent Protected Actions Effective"
    },
    "channels": {
      "items": {
        "$ref": "#/$defs/ChannelResponse"
      },
      "type": "array",
      "title": "Channels"
    },
    "services": {
      "items": {
        "$ref": "#/$defs/ServiceResponse"
      },
      "type": "array",
      "title": "Services"
    },
    "owner_username": {
      "type": "string",
      "title": "Owner Username"
    },
    "role": {
      "type": "string",
      "title": "Role"
    },
    "deleting": {
      "type": "boolean",
      "title": "Deleting"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "repo_url",
    "template",
    "created_at",
    "external_db_access_enabled",
    "external_blob_access_enabled",
    "port_forwarding_enabled",
    "port_forwarding_available",
    "agent_protected_actions_enabled",
    "agent_protected_actions_effective",
    "channels",
    "services",
    "owner_username",
    "role",
    "deleting"
  ],
  "$defs": {
    "AddressResponse": {
      "properties": {
        "hostname": {
          "type": "string",
          "title": "Hostname"
        },
        "url": {
          "type": "string",
          "title": "Url"
        },
        "service": {
          "type": "string",
          "title": "Service"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At"
        }
      },
      "type": "object",
      "required": [
        "hostname",
        "url",
        "service",
        "kind",
        "status"
      ],
      "title": "AddressResponse",
      "description": "One hostname that an environment answers on."
    },
    "ChannelResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "hostname": {
          "type": "string",
          "title": "Hostname"
        },
        "git_ref_binding": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Git Ref Binding"
        },
        "follows_branch": {
          "type": "boolean",
          "title": "Follows Branch"
        },
        "current_sha": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Current Sha"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "pending_deploy": {
          "anyOf": [
            {
              "$ref": "#/$defs/PendingDeployResponse"
            },
            {
              "type": "null"
            }
          ]
        },
        "env_pending": {
          "type": "boolean",
          "title": "Env Pending"
        },
        "services": {
          "items": {
            "$ref": "#/$defs/ChannelServiceResponse"
          },
          "type": "array",
          "title": "Services"
        },
        "addresses": {
          "items": {
            "$ref": "#/$defs/AddressResponse"
          },
          "type": "array",
          "title": "Addresses"
        },
        "databases": {
          "items": {
            "$ref": "#/$defs/ResourceResponse"
          },
          "type": "array",
          "title": "Databases"
        },
        "buckets": {
          "items": {
            "$ref": "#/$defs/ResourceResponse"
          },
          "type": "array",
          "title": "Buckets"
        },
        "deleting": {
          "type": "boolean",
          "title": "Deleting"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "hostname",
        "git_ref_binding",
        "follows_branch",
        "current_sha",
        "status",
        "pending_deploy",
        "env_pending",
        "services",
        "addresses",
        "databases",
        "buckets",
        "deleting"
      ],
      "title": "ChannelResponse"
    },
    "ChannelServiceResponse": {
      "properties": {
        "service_id": {
          "type": "string",
          "format": "uuid",
          "title": "Service Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "public": {
          "type": "boolean",
          "title": "Public"
        },
        "enabled": {
          "type": "boolean",
          "title": "Enabled"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "current_sha": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Current Sha"
        },
        "env_pending": {
          "type": "boolean",
          "title": "Env Pending"
        }
      },
      "type": "object",
      "required": [
        "service_id",
        "name",
        "public",
        "enabled",
        "status",
        "current_sha",
        "env_pending"
      ],
      "title": "ChannelServiceResponse",
      "description": "One service in one environment: its deployment."
    },
    "PendingDeployResponse": {
      "properties": {
        "deploy_id": {
          "type": "string",
          "format": "uuid",
          "title": "Deploy Id"
        },
        "sha": {
          "type": "string",
          "title": "Sha"
        },
        "status": {
          "type": "string",
          "title": "Status"
        }
      },
      "type": "object",
      "required": [
        "deploy_id",
        "sha",
        "status"
      ],
      "title": "PendingDeployResponse",
      "description": "The channel's in-flight deploy, if one is queued or running."
    },
    "ResourceResponse": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        }
      },
      "type": "object",
      "required": [
        "label",
        "id"
      ],
      "title": "ResourceResponse",
      "description": "One database or bucket of an environment."
    },
    "ServiceResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "position": {
          "type": "integer",
          "title": "Position"
        },
        "command": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Command"
        },
        "directory": {
          "type": "string",
          "title": "Directory"
        },
        "template": {
          "type": "string",
          "title": "Template"
        },
        "public": {
          "type": "boolean",
          "title": "Public"
        },
        "memory_mb": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Memory Mb"
        },
        "rollout": {
          "type": "string",
          "title": "Rollout"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "position",
        "command",
        "directory",
        "template",
        "public",
        "memory_mb",
        "rollout",
        "created_at"
      ],
      "title": "ServiceResponse",
      "description": "One service of a project (design/SERVICES.md)."
    }
  }
}