{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/trydatabook-com/main/json-schema/trydatabook-com-generated-asset-item-schema.json",
  "title": "GeneratedAssetItem",
  "x-generated": "2026-10-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trydatabook-com-openapi.json#/components/schemas/GeneratedAssetItem",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "createdAt": {
      "type": "string",
      "title": "Createdat"
    },
    "updatedAt": {
      "type": "string",
      "title": "Updatedat"
    },
    "source_library_id": {
      "type": "string",
      "title": "Source Library Id"
    },
    "status_name": {
      "$ref": "#/$defs/AssetGenerationStatus"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "company": {
      "anyOf": [
        {
          "$ref": "#/$defs/GeneratedAssetCompany"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Download Url"
    }
  },
  "type": "object",
  "required": [
    "id",
    "createdAt",
    "updatedAt",
    "source_library_id",
    "status_name"
  ],
  "$defs": {
    "AssetGenerationStatus": {
      "type": "string",
      "enum": [
        "pending",
        "limit exceeded",
        "in-progress",
        "completed",
        "cancelled",
        "error"
      ],
      "title": "AssetGenerationStatus"
    },
    "GeneratedAssetCompany": {
      "properties": {
        "id": {
          "type": "string",
          "format": "ObjectId",
          "title": "Id",
          "description": "MongoDB ObjectId (24-character hex)."
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "logo_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Logo Url"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "GeneratedAssetCompany"
    }
  }
}