{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tokencanopy-com/json-schema/tokencanopy-com-artifact-out-schema.json",
  "title": "ArtifactOut",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tokencanopy-com-openapi.json#/components/schemas/ArtifactOut",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^art_[a-f0-9]{16}$",
      "title": "Id"
    },
    "drive_id": {
      "type": "string",
      "pattern": "^drv_[a-f0-9]{16}$",
      "title": "Drive Id"
    },
    "parent_id": {
      "type": "string",
      "pattern": "^fld_[a-f0-9]{16}$",
      "title": "Parent Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "content_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content Type"
    },
    "content_preview": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content Preview"
    },
    "labels": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Labels"
    },
    "metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Metadata"
    },
    "head_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Head Version Id"
    },
    "revision": {
      "type": "string",
      "pattern": "^rev_[a-f0-9]{16}$",
      "title": "Revision"
    },
    "state": {
      "type": "string",
      "enum": [
        "active",
        "deleted"
      ],
      "title": "State"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "deleted_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deleted At"
    },
    "effective_visibility": {
      "type": "string",
      "enum": [
        "public",
        "shared",
        "private"
      ],
      "title": "Effective Visibility",
      "description": "Server-computed exposure summary, resolved over the artifact's live grants, its whole folder ancestry, and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access."
    }
  },
  "type": "object",
  "required": [
    "id",
    "drive_id",
    "parent_id",
    "name",
    "content_type",
    "content_preview",
    "labels",
    "metadata",
    "head_version_id",
    "revision",
    "state",
    "created_at",
    "updated_at",
    "deleted_at",
    "effective_visibility"
  ]
}