{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getoneprofile-ai/json-schema/getoneprofile-ai-assistant-thread-read-schema-schema.json",
  "title": "AssistantThreadReadSchema",
  "description": "One thread in the list, from whichever assistant it belongs to.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getoneprofile-ai-assistant-api-openapi.yml#/components/schemas/AssistantThreadReadSchema",
  "properties": {
    "continued_from": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssistantThreadRefSchema"
        },
        {
          "type": "null"
        }
      ],
      "description": "The thread this one continues: the search that produced this table."
    },
    "continued_in": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssistantThreadRefSchema"
        },
        {
          "type": "null"
        }
      ],
      "description": "The thread this one continues in: the table this search produced."
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "last_message_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Message At"
    },
    "open_path": {
      "description": "Where the dashboard navigates to reopen the thread: its chat.",
      "title": "Open Path",
      "type": "string"
    },
    "origin": {
      "$ref": "#/$defs/ThreadOrigin"
    },
    "origin_ref_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The table or saved agent the thread is bound to; null for a lead search or the general chat.",
      "title": "Origin Ref Id"
    },
    "origin_ref_label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "That table's or agent's name, or what a lead search was for; null when the thread is bound to nothing, or its agent is gone.",
      "title": "Origin Ref Label"
    },
    "pinned": {
      "title": "Pinned",
      "type": "boolean"
    },
    "shared": {
      "description": "A legacy table thread nobody is recorded as starting, which the whole workspace sees and may rename, pin or delete.",
      "title": "Shared",
      "type": "boolean"
    },
    "thread_id": {
      "format": "uuid",
      "title": "Thread Id",
      "type": "string"
    },
    "title": {
      "title": "Title",
      "type": "string"
    }
  },
  "required": [
    "origin",
    "thread_id",
    "title",
    "last_message_at",
    "created_at",
    "pinned",
    "shared",
    "origin_ref_id",
    "origin_ref_label",
    "continued_from",
    "continued_in",
    "open_path"
  ],
  "type": "object",
  "$defs": {
    "AssistantThreadRefSchema": {
      "description": "One thread, named by its store and its id in that store.",
      "properties": {
        "origin": {
          "$ref": "#/$defs/ThreadOrigin"
        },
        "thread_id": {
          "format": "uuid",
          "title": "Thread Id",
          "type": "string"
        }
      },
      "required": [
        "origin",
        "thread_id"
      ],
      "title": "AssistantThreadRefSchema",
      "type": "object"
    },
    "ThreadOrigin": {
      "description": "Which store a thread lives in.\n\nONE MEMBER, on purpose. There were four assistants and four transcript\ntables; three were retired and there is one assistant now. The enum stays\nrather than collapsing to nothing, because `origin` is still half of how\na meta row names a thread and is still on the wire, and because a second\nstore arriving is a change to this list rather than to every signature\nthat carries it.\n\n``table``, ``find_leads`` and ``agent`` were the other three. Their rows\nare deleted by a release task in the same release that drops their\ntables: every read here coerces the column back into this enum, so a row\nnaming a member that no longer exists raises rather than being skipped.",
      "enum": [
        "chat"
      ],
      "title": "ThreadOrigin",
      "type": "string"
    }
  }
}