{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/coactive/main/json-schema/coactive-paged-concept-labels-schema.json",
  "title": "PagedConceptLabels",
  "description": "A paginated list of labels",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coactive-concept-api-openapi.yml#/components/schemas/PagedConceptLabels",
  "type": "object",
  "properties": {
    "meta": {
      "$ref": "#/$defs/PagedMetaResponse",
      "description": "Metadata for the set of data returned"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ConceptLabel"
      },
      "description": "The paginated data"
    }
  },
  "required": [
    "meta",
    "data"
  ],
  "$defs": {
    "ConceptLabel": {
      "type": "object",
      "properties": {
        "createdUserId": {
          "type": "string",
          "description": "The user that created the resource"
        },
        "createdDt": {
          "type": "string",
          "format": "date-time",
          "description": "The created datetime of the resource"
        },
        "updatedUserId": {
          "type": "string",
          "description": "The user that last updated the resource"
        },
        "updatedDt": {
          "type": "string",
          "format": "date-time",
          "description": "The datetime the resource was last updated"
        },
        "labelId": {
          "type": "string",
          "format": "uuid4",
          "description": "The label id"
        },
        "label": {
          "$ref": "#/$defs/ConceptLabelEnum",
          "description": "The label for the image or video keyframe"
        },
        "image": {
          "oneOf": [
            {
              "$ref": "#/$defs/Image"
            },
            {
              "type": "null"
            }
          ],
          "description": "The labelled image (if the labelled image is not a video keyframe)"
        },
        "keyframe": {
          "oneOf": [
            {
              "$ref": "#/$defs/Keyframe"
            },
            {
              "type": "null"
            }
          ],
          "description": "The labelled video keyframe (if the labelled image is a video keyframe)"
        }
      },
      "required": [
        "createdUserId",
        "createdDt",
        "updatedUserId",
        "updatedDt",
        "labelId",
        "label"
      ],
      "description": "An association of an image or video keyframe to a concept",
      "title": "ConceptLabel"
    },
    "ConceptLabelEnum": {
      "type": "string",
      "enum": [
        "positive",
        "negative"
      ],
      "description": "Concept label values",
      "title": "ConceptLabelEnum"
    },
    "Image": {
      "type": "object",
      "properties": {
        "createdUserId": {
          "type": "string",
          "description": "The user that created the resource"
        },
        "createdDt": {
          "type": "string",
          "format": "date-time",
          "description": "The created datetime of the resource"
        },
        "updatedUserId": {
          "type": "string",
          "description": "The user that last updated the resource"
        },
        "updatedDt": {
          "type": "string",
          "format": "date-time",
          "description": "The datetime the resource was last updated"
        },
        "coactiveImageId": {
          "type": "string",
          "format": "uuid4",
          "description": "The coactive image id"
        },
        "path": {
          "type": "string",
          "description": "The original path of the image"
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user provided image id"
        },
        "metadata": {
          "oneOf": [
            {
              "$ref": "#/$defs/ImageMetadata"
            },
            {
              "type": "null"
            }
          ],
          "description": "The user provided metadata for the image"
        }
      },
      "required": [
        "createdUserId",
        "createdDt",
        "updatedUserId",
        "updatedDt",
        "coactiveImageId"
      ],
      "description": "An image asset response",
      "title": "Image"
    },
    "ImageMetadata": {
      "type": "object",
      "properties": {},
      "description": "The user provided metadata for the image",
      "title": "ImageMetadata"
    },
    "Keyframe": {
      "type": "object",
      "properties": {
        "coactiveImageId": {
          "type": "string",
          "format": "uuid4",
          "description": "The coactive image id"
        },
        "video": {
          "$ref": "#/$defs/Video",
          "description": "The video the keyframe belongs to"
        },
        "shot": {
          "$ref": "#/$defs/app__shared__v1__schema__Shot",
          "description": "The video shot metadata"
        },
        "audioSegment": {
          "oneOf": [
            {
              "$ref": "#/$defs/app__shared__v1__schema__AudioSegment"
            },
            {
              "type": "null"
            }
          ],
          "description": "Audio segment associated with the keyframe (if the asset_type is 'keyframe')"
        },
        "timestamp": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The timestamp of the keyframe in the video in milliseconds"
        }
      },
      "required": [
        "coactiveImageId",
        "video",
        "shot"
      ],
      "description": "A keyframe asset response",
      "title": "Keyframe"
    },
    "PagedLinksResponse": {
      "type": "object",
      "properties": {
        "prev": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to previous page"
        },
        "next": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to next page"
        },
        "first": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to first page"
        },
        "last": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to last page"
        }
      },
      "description": "Metadata for retrieving paginated data",
      "title": "PagedLinksResponse"
    },
    "PagedMetaResponse": {
      "type": "object",
      "properties": {
        "page": {
          "$ref": "#/$defs/PagedPageDetailsResponse",
          "description": "Details about the total set of data"
        },
        "links": {
          "$ref": "#/$defs/PagedLinksResponse",
          "description": "Helpful links to other pages in the pagination"
        },
        "sort": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SortItem"
          },
          "description": "Ordered list of fields to sort on, order of list determines priority"
        }
      },
      "required": [
        "page",
        "links",
        "sort"
      ],
      "description": "Metadata about the paginated response",
      "title": "PagedMetaResponse"
    },
    "PagedPageDetailsResponse": {
      "type": "object",
      "properties": {
        "currentPage": {
          "type": "integer",
          "description": "Current page number"
        },
        "lastPage": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Max page number based on limit and total number of items"
        },
        "limit": {
          "type": "integer",
          "description": "Number of items to return"
        },
        "offset": {
          "type": "integer",
          "description": "Starting index to return"
        },
        "total": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Total number of items"
        }
      },
      "required": [
        "currentPage",
        "limit",
        "offset"
      ],
      "description": "Pagination metadata",
      "title": "PagedPageDetailsResponse"
    },
    "SortDirection": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ],
      "description": "Possible sort orders\n\nasc: ascending\n desc: descending",
      "title": "SortDirection"
    },
    "SortItem": {
      "type": "object",
      "properties": {
        "direction": {
          "$ref": "#/$defs/SortDirection",
          "description": "The sort order"
        },
        "field": {
          "type": "string",
          "description": "Which field to sort on"
        }
      },
      "required": [
        "direction",
        "field"
      ],
      "description": "Metadata about the sort order of the response",
      "title": "SortItem"
    },
    "Video": {
      "type": "object",
      "properties": {
        "createdUserId": {
          "type": "string",
          "description": "The user that created the resource"
        },
        "createdDt": {
          "type": "string",
          "format": "date-time",
          "description": "The created datetime of the resource"
        },
        "updatedUserId": {
          "type": "string",
          "description": "The user that last updated the resource"
        },
        "updatedDt": {
          "type": "string",
          "format": "date-time",
          "description": "The datetime the resource was last updated"
        },
        "path": {
          "type": [
            "string",
            "null"
          ],
          "description": "The original path of the video"
        },
        "coactiveVideoId": {
          "type": "string",
          "format": "uuid4",
          "description": "The coactive video id"
        },
        "metadata": {
          "oneOf": [
            {
              "$ref": "#/$defs/VideoMetadata"
            },
            {
              "type": "null"
            }
          ],
          "description": "The user provided metadata for the video"
        }
      },
      "required": [
        "createdUserId",
        "createdDt",
        "updatedUserId",
        "updatedDt",
        "coactiveVideoId"
      ],
      "description": "A video asset response",
      "title": "Video"
    },
    "VideoMetadata": {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "additionalProperties": {
            "description": "Any type"
          }
        }
      },
      "description": "Metadata associated with a video shot.",
      "title": "VideoMetadata"
    },
    "app__shared__v1__schema__AudioSegment": {
      "type": "object",
      "properties": {
        "startTimeMs": {
          "type": "integer",
          "description": "The start time in milliseconds of the beginning of the audio clip"
        },
        "endTimeMs": {
          "type": "integer",
          "description": "The end time in milliseconds of the end of the audio clip"
        },
        "speechToTextTranscription": {
          "type": "string",
          "description": "The text transcription of the audio clip"
        }
      },
      "required": [
        "startTimeMs",
        "endTimeMs",
        "speechToTextTranscription"
      ],
      "description": "Metadata about a video audio segment",
      "title": "app__shared__v1__schema__AudioSegment"
    },
    "app__shared__v1__schema__Shot": {
      "type": "object",
      "properties": {
        "shotId": {
          "type": "string",
          "format": "uuid4",
          "description": "The unique shot id"
        },
        "startTimeMs": {
          "type": "integer",
          "description": "The start time in milliseconds from the beginning of the video"
        },
        "endTimeMs": {
          "type": "integer",
          "description": "The end time in milliseconds from the beginning of the video"
        }
      },
      "required": [
        "shotId",
        "startTimeMs",
        "endTimeMs"
      ],
      "description": "Metadata about a video shot",
      "title": "app__shared__v1__schema__Shot"
    }
  }
}