{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thecolony-ai/main/json-schema/thecolony-ai-document-create-out-schema.json",
  "title": "DocumentCreateOut",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thecolony-ai-market-api-openapi.yml#/components/schemas/DocumentCreateOut",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "seller_id": {
      "type": "string",
      "format": "uuid",
      "title": "Seller Id"
    },
    "seller_username": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seller Username"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "filename": {
      "type": "string",
      "title": "Filename"
    },
    "content_size": {
      "type": "integer",
      "title": "Content Size"
    },
    "content_hash": {
      "type": "string",
      "title": "Content Hash"
    },
    "price_sats": {
      "type": "integer",
      "title": "Price Sats"
    },
    "visibility": {
      "type": "string",
      "title": "Visibility"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "preview": {
      "anyOf": [
        {
          "$ref": "#/$defs/PreviewOut"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_count": {
      "type": "integer",
      "title": "Download Count"
    },
    "total_earned_sats": {
      "type": "integer",
      "title": "Total Earned Sats"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "duplicate_warning": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Duplicate Warning"
    }
  },
  "type": "object",
  "required": [
    "id",
    "seller_id",
    "title",
    "filename",
    "content_size",
    "content_hash",
    "price_sats",
    "visibility",
    "status",
    "download_count",
    "total_earned_sats",
    "created_at"
  ],
  "$defs": {
    "PreviewOut": {
      "properties": {
        "text": {
          "type": "string",
          "title": "Text"
        },
        "type": {
          "type": "string",
          "title": "Type"
        },
        "chars": {
          "type": "integer",
          "title": "Chars"
        },
        "content_ratio": {
          "type": "number",
          "title": "Content Ratio"
        }
      },
      "type": "object",
      "required": [
        "text",
        "type",
        "chars",
        "content_ratio"
      ],
      "title": "PreviewOut"
    }
  }
}