###
"""
A moment in time described by the date, the time and the timezone offset from UTC.
This is specified by [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601).
"""
scalar DateTimeOffset

"""
A duration between two DateTimeOffsets.
This is specified by [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Durations).
"""
scalar DateTimeDuration

"""
Arbitrary data in JSON format. Commonly used for metadata added by custom processes.
See [JSON](https://www.json.org/json-en.html) and the
[ECMA-404](https://ecma-international.org/publications-and-standards/standards/ecma-404/) standard.
"""
scalar JSON

###
type Query

type Mutation

type Subscription

"""
Indicates that the annotated type or field is experimental and may change in the future.  Documentation may not be provided for experimental types.
"""
directive @experimental(
    reason: String
) on INPUT_OBJECT | INPUT_FIELD_DEFINITION | OBJECT | ENUM | FIELD_DEFINITION

###
"""Indicates the state of a message from a subscription."""
enum MessageState {
    """The start of the messages for a given group of messages."""
    START
    """An update to an existing group of messages."""
    UPDATE
    """The ending of an existing group of messages."""
    END
}

"""Indicates the state of a message from a `devices` subscription."""
enum DeviceMessageState {
    """A new device is created."""
    CREATE
    """A device is updated."""
    UPDATE
    """A device receives a new `lastHeartbeat`."""
    HEARTBEAT
}

# Types of collision activities for Geofences and Zones
"""
Indicates the type of [GeofenceEvent]({{Types.GeofenceEvent}}) or [ZoneEvent]({{Types.ZoneEvent}}) reported by a [Geofence]({{Types.Geofence}}) or a [Zone]({{Types.Zone}}).
"""
enum ActivityType {
    """
    A detection entering a [Geofence]({{Types.Geofence}}) or a [Zone]({{Types.Zone}}).
    """
    INGRESS
    """
    A detection remaining inside a [Geofence]({{Types.Geofence}}) or a [Zone]({{Types.Zone}}).
    """
    DWELL
    """
    A detection exiting a [Geofence]({{Types.Geofence}}) or a [Zone]({{Types.Zone}}).
    """
    EGRESS
}

###
## PAGINATION TYPES
#
# Shared types for pagination. See templates/pagination/readme.md for more information

"""Pagination info for any connection"""
type PageInfo {
    """
    True if the connection `edges` field does not contain the last element available, otherwise false.
    """
    hasNextPage: Boolean!
    """
    True if the connection `edges` field does not contain the first element available, otherwise false.
    """
    hasPreviousPage: Boolean!
    """
    The `cursor` of the first edge returned. Used for the query `after` argument.
    """
    startCursor: String
    """
    The `cursor` of the last edge returned. Used for the query `after` argument.
    """
    endCursor: String
}

"""
Indicates the direction of sorting based on a particular field's value.
"""
enum SortDirection {
    """Sort the resulting list in ascending order."""
    ASC
    """Sort the resulting list in descending order."""
    DESC
}

###
"""
A [GeoJSON][geojson] point represents a single position in the world. GeoJSON is a formal specification as defined by [RFC 7946][geojson-rfc].
"""
type GeoJSONPoint {
    """
    The type of the GeoJSON node. For the GeoJSON point, this will be "Point".
    """
    type: String!
    """
    The coordinates for the the GeoJSON point, as determined by the `crs` (coordinate reference system).

    """
    coordinates: [Float!]!
    """
    The coordinate reference system used for this geographical position. See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    crs: GeoJSONCRS
}

"""
A [GeoJSON][geojson] polygon represents a region in the world. GeoJSON is a formal
specification as defined by [RFC 7946][geojson-rfc].
"""
type GeoJSONPolygon {
    """
    The type of the GeoJSON node. For the GeoJSON polygon, this will be "Polygon".
    """
    type: String!
    """
    The coordinates that define the region, as determined by the `crs` (coordinate reference system).
    The first element in the array represents the exterior
    ring.  Any subsequent elements represent interior rings (or holes).
    For more information, see [Polygons in RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946#appendix-A.3).
    """
    coordinates: [[[Float!]!]!]!
    """
    The coordinate reference system used for this  polygon. See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    crs: GeoJSONCRS
}

"""
A [GeoJSON][geojson] multi-polygon represents any number of regions in the world.
GeoJSON is a formal specification as defined by [RFC 7946][geojson-rfc].
"""
type GeoJSONMultiPolygon {
    """
    The type of the GeoJSON node. For the GeoJSON multi-polygon, this will be "MultiPolygon".
    """
    type: String!
    """
    The coordinates that define the regions, as determined by the `crs` (coordinate reference system).
    Each element of the outermost array represent a region; the first element in each array represents the exterior
    ring.  Any subsequent elements represent interior rings (or holes).
    For more information, see [MultiPolygons in RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946#appendix-A.6).
    """
    coordinates: [[[[Float!]!]!]!]!
    """
    The coordinate reference system used for this multipolygon. See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    crs: GeoJSONCRS
}

union GeoJSONGeometry = GeoJSONPoint | GeoJSONPolygon | GeoJSONMultiPolygon

"""
A [GeoJSON][geojson] feature represents any spatially bounded thing.
GeoJSON is a formal specification as defined by [RFC 7946][geojson-rfc].
"""
type GeoJSONFeature {
    """
    The type of the GeoJSON node. For the GeoJSON feature, this will be "Feature".
    """
    type: String!
    """Any supported GeoJSON geometry object."""
    geometry: GeoJSONGeometry
    """
    An arbitrary set of properties associated with the coordinate reference system.
    """
    properties: JSON
}

"""
A [GeoJSON][geojson] coordinate reference system is a way to specify how the
coordinates should be interpretted.
If no coordinate reference system is specified for a GeoJSON object, the
coordinates for a single point must be an array of either two or three
floating-point numbers, in order as follows:
1. Longitude (in degrees)
2. Latitude (in degrees)
3. Altitude (in meters, optional, assumed to be sea-level if omitted)
For more information, see the [RFC 7946, Section 4 Coordinate Reference
System][rfc7946-4] and the [GeoJSON 1.0 specification][GJ2008].
"""
type GeoJSONCRS {
    """
    An Open Geospatial Consortium URN that indicates the coordinate reference system.
    """
    type: String
    """
    An arbitrary set of properties associated with the coordinate reference system.
    """
    properties: JSON
}

"""
A `H3Cell` represents a geographical area, useful for grouping nearby points.  Refer to [the H3 documentation](https://h3geo.org/docs) for more information on the structure.
"""
type H3Cell {
    """
    The canonical string index of the cell.  Can be used with H3 libraries for additional information on the cell's shape, size, and position.  See [the H3 docs](https://h3geo.org/docs/library/index/cell) for more information.
    """
    index: String!
    """
    The coordinates of the approximate centroid of the cell.
    """
    center: GeoJSONPoint
}

"""
This type represents the input data needed to initialize a [GeoJSON point]({{Types.GeoJSONPoint}}).
"""
input GeoJSONPointInput {
    """The type of the GeoJSON node. This must be "Point"."""
    type: String! = "Point"
    """
    The coordinates for the the GeoJSON point, as determined by the `crs` (coordinate reference system).
    Typically, this should be an array of coordinates, with each coordinate having either two or three values, as follows:
    1. Longitude (in degrees)
    2. Latitude (in degrees)
    3. Altitude (in meters, optional, assumed to be sea-level if omitted)
    See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    coordinates: [Float!]!
    """
    The coordinate reference system used for this geographical position. See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    crs: GeoJSONCRSInput
}

"""
This type represents the input data needed to initialize a [GeoJSON polygon]({{Types.GeoJSONPolygon}}).
"""
input GeoJSONPolygonInput {
    """The type of the GeoJSON node. This defaults to and must be "Polygon"."""
    type: String! = "Polygon"
    """
    The coordinates for the the GeoJSON polygon, as determined by the `crs` (coordinate reference system).
    The first element in the array represents the exterior
    ring.  Any subsequent elements represent interior rings (or holes).
    Each element consists of the points that make up the shape.
    See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    coordinates: [[[Float!]!]!]!
    """
    The coordinate reference system used for this geographical position. See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    crs: GeoJSONCRSInput
}

"""
This type represents the input data needed to initialize a [GeoJSON multipolygon]({{Types.GeoJSONMultiPolygon}}).
"""
input GeoJSONMultiPolygonInput {
    """
    The type of the GeoJSON node. This defaults to and must be "MultiPolygon".
    """
    type: String! = "MultiPolygon"
    """
    The coordinates for the the GeoJSON multipolygon, as determined by the `crs` (coordinate reference system).
    Each element of the outermost array represent a region; the first element in each array represents the exterior
    ring.  Any subsequent elements represent interior rings (or holes).
    Each element consists of the points that make up the polygon.
    See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    coordinates: [[[[Float!]!]!]!]!
    """
    The coordinate reference system used for thismultipolygon. See
    [`GeoJSONCRS`]({{Types.GeoJSONCRS}}) for more information.
    """
    crs: GeoJSONCRSInput
}

"""
This type represents the input data needed to initialize a [GeoJSON coordinate reference system]({{Types.GeoJSONCRS}}).
"""
input GeoJSONCRSInput {
    """
    An Open Geospatial Consortium URN that indicates the coordinate reference system.
    """
    type: String = "name"
    """
    An arbitrary set of properties associated with the coordinate reference system.
    """
    properties: JSON
}

###
"""
`FilterIDInput` allows for filtering based on an ID parameter. Only one field should be provided per filter object.
"""
input FilterIDInput {
    """
    If provided, the ID input must not be equal to the value provided to match the filter.
    """
    ne: ID
    """
    If provided, the ID input must be equal to the value provided to match the filter.
    """
    eq: ID
    """
    If provided, the ID input must be present in the value provided to match the filter.
    """
    in: [ID!]
}

"""
`FilterIDListInput` allows for filtering based on a list of identifiers. Only one field should be provided per filter object.
"""
input FilterIDListInput @experimental {
    """
    If provided, the filtered object must contain exactly the IDs provided to match the filter.
    """
    eq: [ID!]
    """
    If provided, the filtered object must contain each of the IDs provided to match the filter, but can contain additional IDs not provided.
    """
    in: [ID!]
}

"""
`FilterIDListInput` allows for filtering based on a list of identifiers. Only one field should be provided per filter object.
"""
input FilterStringListInput @experimental {
    """
    If provided, the filtered object must contain exactly the strings provided to match the filter.
    """
    eq: [String!]
    """
    If provided, the filtered object must contain each of the strings provided to match the filter, but can contain additional strings not provided.
    """
    in: [String!]
}

"""
`FilterIntInput` allows for filtering based on an Int parameter. Only one field should be provided per filter object.
"""
input FilterIntInput {
    """
    If provided, the Int input must not be equal to the value provided to match the filter.
    """
    ne: Int
    """
    If provided, the Int input must be equal to the value provided to match the filter.
    """
    eq: Int
    """
    If provided, the Int input must be less than or equal to the value provided to match the filter.
    """
    le: Int
    """
    If provided, the Int input must be less than the value provided to match the filter.
    """
    lt: Int
    """
    If provided, the Int input must be greater than or equal to the value provided to match the filter.
    """
    ge: Int
    """
    If provided, the Int input must be greater than the value provided to match the filter.
    """
    gt: Int
    """
    If provided, the Int input must be present in the values provided to match the filter.
    """
    in: [Int!]
    """
    If provided, the Int input must be between the two values provided to match the filter.
    """
    between: [Int!]
    """
    If provided and true, the filter will pass only if there is a Int in the corresponding field. If provided and false,
    the filter will pass only if there is not a Int in the corresponding field.
    """
    attributeExists: Boolean
}

"""
`FilterFloatInput` allows for filtering based on a Float parameter. Only one field  should be provided per filter object.
"""
input FilterFloatInput {
    """
    If provided, the Float input must not be equal to the value provided to match the filter.
    """
    ne: Float
    """
    If provided, the Float input must be equal to the value provided to match the filter.
    """
    eq: Float
    """
    If provided, the Float input must be less than or equal to the value provided to match the filter.
    """
    le: Float
    """
    If provided, the Float input must be less than the value provided to match the filter.
    """
    lt: Float
    """
    If provided, the Float input must be greater than or equal to the value provided to match the filter.
    """
    ge: Float
    """
    If provided, the Float input must be greater than the value provided to match the filter.
    """
    gt: Float
    """
    If provided, the Float input must be present in the values provided to match the filter.
    """
    in: [Float!]
    """
    If provided, the Float input must be between the two values provided to match the filter.
    """
    between: [Float!]
    """
    If provided and true, the filter will pass only if there is a Float in the corresponding field. If provided and false,
    the filter will pass only if there is not a Float in the corresponding field.
    """
    attributeExists: Boolean
}

"""
`FilterStringInput` allows for filtering based on a string parameter. Only one field should be provided per filter object.
"""
input FilterStringInput {
    """
    If provided, the string input must not be equal to the value provided to match the filter.
    """
    ne: String
    """
    If provided, the string input must be equal to the value provided to match the filter.
    """
    eq: String
    """
    If provided, the string input must be a case-insensitive substring of the value provided to match the filter.
    """
    like: String
    """
    If provided, the string input must be present in the value provided to match the filter.
    """
    in: [String!]
    """
    If provided and true, the filter will pass only if there is a string in the corresponding field. If provided and false, the filter will pass only if there is not a string in the corresponding field.
    """
    attributeExists: Boolean
}

"""
`FilterDateTimeOffsetInput` allows for filtering based on a DateTimeOffset parameter. Only one field should be provided per filter object.
"""
input FilterDateTimeOffsetInput {
    """
    If provided, the DateTimeOffset input must be the same as the value provided to match the filter.
    """
    eq: DateTimeOffset
    """
    If provided, the DateTimeOffset input must be between the two values provided to match the filter.
    """
    between: [DateTimeOffset!]
    """
    If provided and true, the filter will pass only if there is a DateTimeOffset in the corresponding field. If provided and false,
    the filter will pass only if there is not a DateTimeOffset in the corresponding field.
    """
    attributeExists: Boolean
}

"""
`FilterBooleanInput` allows for filtering based on a Boolean parameter. Only one field should be provided per filter object.
"""
input FilterBooleanInput {
    """
    If provided, the Boolean input must be the same as the value provided to match the filter.
    """
    eq: Boolean
    """
    If provided, the Boolean input must not be the same as the value provided to match the filter.
    """
    ne: Boolean
    """
    If provided and true, the filter will pass only if there is a Boolean in the corresponding field. If provided and false,
    the filter will pass only if there is not a Boolean in the corresponding field.
    """
    attributeExists: Boolean
}

"""FilterPointInput is used to filter records by their positional values"""
input FilterPointInput {
    """
    If provided, returns records with positions that are inside the specified polygon
    """
    in: GeoJSONPolygonInput
    """
    If provided, returns records that are near the record according to the input
    """
    near: FilterPointNearInput
    """
    If provided and true, the filter will pass only if there is a position in the corresponding field. If provided and false,
    the filter will pass only if there is not a position in the corresponding field.
    """
    attributeExists: Boolean
}

"""
FilterPointNearInput is used to filter records with positional arguments by proximity to the specified point
"""
input FilterPointNearInput {
    """The point from which the distance is being checked"""
    point: GeoJSONPointInput!
    """The maximum distance that the record can be from the point"""
    radius: Float! = 500.0
}

"""
`FilterMessageStateInput` allows for filtering based on a [MessageState]({{Types.MessageState}}) parameter. Only one field should be provided per filter object.
Note that the `UPDATE` state will exclude `START` and `END` messages.
"""
input FilterMessageStateInput {
    """
    If provided, the MessageState must be equal to the value provided to match the filter.
    """
    eq: MessageState
    """
    If provided, the MessageState must not be equal to the value provided to match the filter.
    """
    ne: MessageState
    """
    If provided, the MessageState must be present in the list provided to match the filter.
    """
    in: [MessageState!]
}

"""
`FilterDeviceMessageStateInput` allows for filtering based on a [DeviceMessageState]({{Types.DeviceMessageState}}) parameter. Only one field should be provided per filter object.
Note that the `UPDATE` state alone will not include `CREATE` and `HEARTBEAT` messages.
"""
input FilterDeviceMessageStateInput {
    """
    If provided, the DeviceMessageState must be equal to the value provided to match the filter.
    """
    eq: DeviceMessageState
    """
    If provided, the DeviceMessageState must not be equal to the value provided to match the filter.
    """
    ne: DeviceMessageState
    """
    If provided, the DeviceMessageState must be present in the list provided to match the filter.
    """
    in: [DeviceMessageState!]
}

"""
`FilterEventValidationStatusInput` allows for filtering based on an event's validation status. Only one field should be provided per filter object.
"""
input FilterEventValidationStatusInput {
    """
    If provided, the event's validation status must be equal to the value provided to match the filter.
    """
    eq: EventValidationStatus
    """
    If provided, the event's validation status must not be equal to the value provided to match the filter.
    """
    ne: EventValidationStatus
    """
    If provided, the event's validation status must be present in the value provided to match the filter.
    """
    in: [EventValidationStatus!]
    """
    If provided and true, the filter will pass only if the event has a validation status. If provided and false, the filter will pass only if there is no validation status.
    """
    attributeExists: Boolean
}

"""
A filter for a JSON value.  The value will be cast to the relevant type if present.
"""
input FilterJSONFieldMode @oneOf {
    """An integer filter for the JSON value."""
    integer: FilterIntInput
    """An float filter for the JSON value."""
    float: FilterFloatInput
    """An boolean filter for the JSON value."""
    boolean: FilterBooleanInput
    """An string filter for the JSON value."""
    string: FilterStringInput
}

"""
`FilterJSONFieldInput` allows for filtering based on user-defined metadata fields.
"""
input FilterJSONFieldInput {
    """
    The path to the metadata field on which to filter.
    Entries in the list may be either field keys (strings) or array indexes (integers).
    If no data exists at the path, it will be treated as a null value.
    """
    path: [String]!
    """
    The filter for the value found at the provided path.
    """
    filter: FilterJSONFieldMode!
}

"""
`FilterJSONFieldStringInput` allows for filtering based on user-defined metadata fields, treating all values as strings.
"""
input FilterJSONFieldStringInput {
    """
    The path to the metadata field on which to filter.
    Entries in the list may be either field keys (strings) or array indexes (integers).
    If no data exists at the path, it will be treated as a null value.
    """
    path: [String]!
    """
    The string filter for the value found at the provided path.
    """
    filter: FilterStringInput!
}

###
"""A user is an object that represents an existing user in the database."""
type User {
    """The unique identifier for the user."""
    id: ID!
    """The email address of the user."""
    emailAddress: String!
}

###
type TrackConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of track edges."""
    edges: [TrackEdge]!
}

type TrackEdge {
    """Information about a particular track."""
    node: Track
    """
    The cursor to use with the [`tracks` query]({{Queries.tracks}}) `after` argument.
    """
    cursor: String!
}

###
type Track {
    """The unique identifier for the Track."""
    id: ID!
    """The data source that captured the Track."""
    dataSource: DataSource
    """The video that this detection was captured in"""
    video: Video
    """The class label of the tracked object, i.e person, car, truck, etc."""
    tag: String!
    """The time of the first detection of the tracked object."""
    startTime: DateTimeOffset!
    """
    The time of the last detection of the tracked object, or null if it is still being tracked.
    """
    endTime: DateTimeOffset
    """A collection of every Detection associated with the Track."""
    detections(
        """Filter detections based on the time period, etc."""
        filter: FilterTrackDetectionInput
        """Returns the first _n_ elements from the list."""
        first: Int
        """The field and direction by which to sort the results"""
        sort: [DetectionsSort!]! = [{field: DETECTION_TIME, direction: ASC}, {field: GLOBAL_TRACK_ID, direction: ASC}]
    ): [Detection!]!
    """The identifying and descriptive attributes of the Track"""
    properties: TrackProperties
    """Arbitrary information about the Track."""
    metadata: JSON
    """Intersections triggered by this track interacting with a zone."""
    zoneIntersections: [ZoneIntersection!]
    """
    Point-in-time representations of an interaction between the track and a geofence.
    """
    geofenceIntersections: [GeofenceIntersection!]
    """
    The unique identifiers of the devices that captured the Track.
    """
    deviceIds: [ID!] @deprecated(reason: "`deviceIds` is deprecated. Use `dataSource.id` instead")
}

type TrackProperties {
    """A property that identifies the Track"""
    identifier: TrackProperty
    """Properties that describe the Track"""
    attributes: [TrackProperty!]
}

type TrackProperty {
    """The type or name of the property"""
    type: String!
    """The stored value of the property"""
    value: String!
}

"""
This type is used to create a new [`Detection`]({{Types.Detection}}) when [creating]({{Types.CreateTrackInput}}) or [updating]({{Types.UpdateTrackInput}}) a [`Track`]({{Types.Track}})
"""
input TrackDetectionInput {
    """The time at which the detection occurred."""
    timestamp: DateTimeOffset!
    """
    A GeoJSON point that represents the location of the detection in the world.
    """
    position: GeoJSONPointInput
    """
    A GeoJSON polygon that represents the two dimensional bounds of the detection in its captured video or image.
    """
    polygon: GeoJSONPolygonInput
    """
    The direction, in degrees, of the detection in the world.
    Direction is measured clockwise from north, so `0` is north, `90` is east, `180` is south and `270` is west.
    The direction should be between `0` and `360` degrees.
    """
    direction: Float
    """Arbitrary metadata associated with the detection."""
    metadata: JSON
}

input TrackPropertiesInput {
    """A property that identifies the Track"""
    identifier: TrackPropertyInput
    """Properties that describe the Track"""
    attributes: [TrackPropertyInput!]
}

input TrackPropertyInput {
    """The type or name of the property"""
    type: String!
    """The stored value of the property"""
    value: String!
}

"""
This input type is used to create a new [`Track`]({{Types.Track}}).
"""
input CreateTrackInput {
    """
    The unique identifier for the Track. Will be autogenerated if one is not provided.
    """
    id: ID
    """
    The unique identifier of the [`data source`]({{Types.DataSource}}) that captured the Track.
    """
    dataSourceId: ID!
    """The class label of the tracked object, i.e person, car, truck, etc."""
    tag: String!
    """The time of the first detection of the tracked object."""
    startTime: DateTimeOffset!
    """
    The time of the last detection of the tracked object, or null if it is still being tracked.
    """
    endTime: DateTimeOffset
    """
    A list of detections that will also be created and associated to the new track.
    """
    detections: [TrackDetectionInput!]!
    """The identifying and descriptive attributes of a new track."""
    properties: TrackPropertiesInput
    """Arbitrary information about the Track."""
    metadata: JSON
}

"""
This input type is used to update an existing [`Track`]({{Types.Track}}).
"""
input UpdateTrackInput {
    """The unique identifier of the Track."""
    id: ID!
    """The class label of the tracked object, i.e person, car, truck, etc."""
    tag: String
    """The time of the first detection of the tracked object."""
    startTime: DateTimeOffset
    """
    The time of the last detection of the tracked object, or null if it is still being tracked.
    """
    endTime: DateTimeOffset
    """
    A list of detections that will be created and associated to the existing track.
    """
    detections: [TrackDetectionInput!]
    """The identifying and descriptive attributes of a track."""
    properties: TrackPropertiesInput
    """Arbitrary information about the Track."""
    metadata: JSON
}

type TrackMessage {
    """The track."""
    message: Track!
    """The state of the track message."""
    state: MessageState!
}

###
extend type Subscription {
    """
    Subscribes to changes in any [`Track`]({{Types.Track}}) based on the given filter.
    """
    tracks(
        """
        Filter tracks by unique identifier of the data source, tag, message state, etc.
        """
        filter: FilterTrackMessageInput
    ): TrackMessage
}

###
"""
Indicates the field used for sorting a [Tracks query]({{Queries.tracks}}).
"""
enum TracksSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list by the track start time."""
    TRACK_START_TIME
}

"""
TracksSort allows for sorting a [`tracks` query]({{Queries.tracks}}) by field and direction.
"""
input TracksSort {
    """
    Any sortable field available to the `TracksSort`. See the link to the type below
    for more details.
    """
    field: TracksSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """
    Look up a track, a record of the motion of a detected object, by its unique identifier.
    """
    track(
        """The track's unique identifier."""
        id: ID!
        """
        If provided, locate the track within 24 hours of the given time. Otherwise, the track will only be identified if it is less than 24 hours since it was active.
        """
        timestamp: DateTimeOffset
    ): Track
    """
    Finds tracks, which are records of a detected object over time, based on a set of filters.
    """
    tracks(
        """Filter tracks based on the originating device, time period, etc."""
        filter: FilterTrackInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [TracksSort!]! = [{field: TRACK_START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): TrackConnection
}

###
extend type Mutation {
    """Creates a new Track."""
    createTrack(
        """Arguments to create a new track."""
        track: CreateTrackInput!
    ): Track
    """Updates an existing Track."""
    updateTrack(
        """Arguments to update an existing track."""
        track: UpdateTrackInput!
    ): Track
}

###
"""
`FilterTrackInput` allows for filtering a [`tracks` query]({{Queries.tracks}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterTrackInput {
    """
    If provided, specifies filters that work against the unique id of the track.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [unique id]({{Types.DataSource}}) of the data source that initiated the track.
    """
    dataSourceId: FilterIDInput
    """
    If provided, specifies filters that work against the [time]({{Types.Track}}) associated with the start time of a track.
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, specifies case-insensitive filters that work against the [tag]({{Types.Track}}) of a track
    """
    tag: FilterStringInput
    """
    If provided, specifies filters that work against the [positions]({{Types.Detection}}) of the track's detections
    """
    position: FilterPointInput
    """
    If provided, specifies filters that work against the [identifier]({{Types.TrackProperties}}) of the track
    """
    identifier: FilterTrackPropertyInput
    """
    If provided, specifies filters that work against the [attributes]({{Types.TrackProperties}}) of the track
    """
    attribute: FilterTrackPropertyInput
    """
    If provided, specifies filters that work against the [unique identifier of the point of interest]({{Types.Site}}) of the track's data source.
    """
    pointOfInterestId: FilterIDInput
    """
    If provided, specifies filters that work against the `type` of the track's [`dataSource`]({{Types.DataSource}}).
    """
    dataSourceType: FilterStringInput
    """
    If provided, specifies filters that work against the `labels` of the track's [`dataSource`]({{Types.DataSource}}).
    """
    dataSourceLabels: FilterStringListInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterTrackInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterTrackInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterTrackInput
    """
    If provided, specifies filters that work against the [unique id]({{Types.Detection}}) of the device that initiated the track.
    """
    deviceId: FilterIDInput @deprecated(reason: "`deviceId` is deprecated. Use `dataSourceId` instead")
}

"""
`FilterTrackMessageInput` allows for filtering a [`tracks` subscription]({{Subscriptions.tracks}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterTrackMessageInput {
    """
    If provided, specifies filters that work against the unique id of the track.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [unique id]({{Types.DataSource}}) of the data source that initiated the track.
    """
    dataSourceId: FilterIDInput
    """
    If provided, specifies case-insensitive filters that work against the [tag]({{Types.Track}}) of a track
    """
    tag: FilterStringInput
    """
    If provided, specifies filters that work against the [positions]({{Types.Detection}}) of the track's detections
    """
    position: FilterPointInput
    """
    If provided, specifies filters that work against the [identifier]({{Types.TrackProperties}}) of the track
    """
    identifier: FilterTrackPropertyInput
    """
    If provided, specifies filters that work against the [attributes]({{Types.TrackProperties}}) of the track
    """
    attribute: FilterTrackPropertyInput
    """
    If provided, specifies filters that work against the [unique identifier of the point of interest]({{Types.Site}}) of the track's data source.
    """
    pointOfInterestId: FilterIDInput
    """
    If provided, specifies filters that work against the `type` of the track's [`dataSource`]({{Types.DataSource}}).
    """
    dataSourceType: FilterStringInput
    """
    If provided, specifies filters that work against the `labels` of the track's [`dataSource`]({{Types.DataSource}}).
    """
    dataSourceLabels: FilterStringListInput
    """
    Specifies filters that work against the [state]({{Types.MessageState}}) of the track message.
    """
    state: FilterMessageStateInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterTrackMessageInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterTrackMessageInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterTrackMessageInput
}

"""
FilterTrackDetectionInput allows for filtering a track's detections based on criteria described below.
Tracks will only contain detections with a matching trackId.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterTrackDetectionInput {
    """
    If provided, specifies filters that work against the unique id of the zone in which a zone event was triggered by the [detection]({{Types.Detection}}).
    """
    zoneId: FilterIDInput
    """
    If provided, specifies filters that work against the unique id of the geofence in which a geofence event was triggered by the [detection]({{Types.Detection}}).
    """
    geofenceId: FilterIDInput
    """
    If provided, specifies filters that work against the timestamp associated with the [detection]({{Types.Detection}}).
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, specifies filters that work against the position of the [detection]({{Types.Detection}})
    """
    position: FilterPointInput
    """
    If provided, a detection must pass all filters in this list to match the current filter.
    """
    and: [FilterTrackDetectionInput!]
    """
    If provided, a detection must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterTrackDetectionInput!]
    """
    If provided, a detection may not match this filter to match the current filter.
    """
    not: FilterTrackDetectionInput
}

"""
`FilterTrackPropertyInput` allows for filtering a [`tracks` query]({{Queries.tracks}}) based on criteria described below
"""
input FilterTrackPropertyInput {
    """
    If provided, specifies filters that work against the type or name of the track's property
    """
    type: FilterStringInput
    """
    If provided, specifies filters that work against value of the track's property
    """
    value: FilterStringInput
}

###
"""
A video represents a video from a data source, including its start and end time.
"""
type Video {
    """The unique identifier for the video."""
    id: ID!
    """The data source that created the video."""
    dataSource: DataSource!
    """The time at which the video started."""
    startTime: DateTimeOffset!
    """
    The time at which the video ended. If not provided, the video is still ongoing.
    """
    endTime: DateTimeOffset
    """The signed URL to be used to stream the video."""
    url: String!
    """The signed URL to be used to retrieve the video thumbnail."""
    thumbnailUrl: String
    """The display name of the video."""
    displayName: String
    """The resolution height of the video."""
    resolutionHeight: String
    """The resolution width of the video."""
    resolutionWidth: String
    """The frame rate of the video."""
    frameRate: Float
    """The user the video was created by."""
    createdBy: User
}

###
"""
A `VideoConnection` is the paginated result of a [`videos` query]({{Queries.videos}})
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type VideoConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of Video edges."""
    edges: [VideoEdge]!
}

"""
A video edge is the pairing of a [Video]({{Types.Video}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type VideoEdge {
    """Information about a particular [Video]({{Types.Video}})."""
    node: Video
    """
    The cursor to use with the [Query `videos` field]({{Queries.videos}}) `after` argument.
    """
    cursor: String!
}

###
extend type Subscription {
    """
    Subscribes to any created [`Video`]({{Types.Video}}) from a given [`DataSource`]({{Types.DataSource}}).
    """
    videoActivity(
        """Filter videos by unique identifier of the data source."""
        filter: FilterVideoActivityInput
    ): Video
}

###
"""
Indicates the field used for sorting a [Videos query]({{Queries.videos}}).
"""
enum VideosSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list by the datasource identifier."""
    DATA_SOURCE_ID
    """Sort the resulting list by start time."""
    START_TIME
    """Sort the resulting list by end time."""
    END_TIME
}

"""
VideosSort allows for sorting a [`videos` query]({{Queries.videos}}) by field and direction.
"""
input VideosSort {
    """
    Any sortable field available to the `VideosSort`. See the link to the type below for more details.
    """
    field: VideosSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up a video by its unique identifier."""
    video(
        """The video's UUID."""
        id: ID!
    ): Video
    """Search for videos based on a set of filters."""
    videos(
        """Filter videos by Fields to filter videos"""
        filter: FilterVideoInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [VideosSort!]! = [{field: START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): VideoConnection
}

###
extend type Mutation {
    clip(
        """Arguments to create a video clip from a data source."""
        input: CreateClipInput!
        """Optional IDs for [events]({{Types.Event}}) to associate with the clip."""
        eventIds: [ID!]
        """Optional IDs for [activity chronicles]({{Types.ActivityChronicle}}) to associate with the clip."""
        activityChronicleIds: [ID!]
    ): DataSourceClip
}

###
"""
FilterEventActivityInput filters [events]({{Types.Event}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterVideoActivityInput {
    """
    If provided, specifies filters that work against the [`DataSource`](({{Types.DataSource}}))'s unique id of the video that created the event.
    """
    dataSourceId: FilterIDInput
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    and: [FilterVideoActivityInput!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterVideoActivityInput!]
    """
    If provided, an event may not match this filter to match the current filter.
    """
    not: FilterVideoActivityInput
}

"""
FilterVideoInput filters [videos]({{Types.Video}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterVideoInput {
    """
    If provided, specifies filters that work against the [`Videos`](({{Types.Video}}))'s unique id.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the unique ID of the [`data source`]({{Types.DataSource}}) that the video belongs to.
    """
    dataSourceId: FilterIDInput
    """
    If provided, specifies filters that work against the [`Videos`](({{Types.Video}}))'s start time.
    """
    startTime: FilterDateTimeOffsetInput!
    """
    If provided, specifies filters that work against the [`Videos`](({{Types.Video}}))'s end time.
    """
    endTime: FilterDateTimeOffsetInput
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    and: [FilterVideoInput!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterVideoInput!]
    """
    If provided, an event may not match this filter to match the current filter.
    """
    not: FilterVideoInput
}

###
"""
A data source clip represents a video from a data source, bounded by a start and end time.
"""
type DataSourceClip {
    """The unique identifier of the data source clip."""
    id: ID!
    """The data source that created the video."""
    dataSource: DataSource!
    """Start time of the clip"""
    startTime: DateTimeOffset!
    """End time of the clip"""
    endTime: DateTimeOffset!
    """The signed URL to be used to stream the clip."""
    url: String!
    """The signed URL to be used to retrieve the clip thumbnail."""
    thumbnailUrl: String
    """Optional display name for a clip"""
    displayName: String
}

###
type Zone {
    """The unique identifier for the camera zone."""
    id: ID!
    """The data source that owns the zone"""
    dataSource: DataSource
    """The name given to the camera zone."""
    name: String!
    """The geometrical boundry of the camera zone."""
    polygon: GeoJSONPolygon!
    """True if the zone is currently active, otherwise false."""
    active: Boolean!
    """The timestamp the zone was created at."""
    createdAt: DateTimeOffset
    """The timestamp the zone was most recently updated."""
    updatedAt: DateTimeOffset
    """
    The unique identifier for the camera the zone belongs to.
    """
    deviceId: ID! @deprecated(reason: "`deviceId` is deprecated. Use `dataSource.id` instead")
}

type ZoneEvent {
    """The unique idenifier for the zone event."""
    id: ID!
    """The camera zone the event happened in."""
    zone: Zone!
    """The track associated with the object that triggered the zone event."""
    track: Track!
    """
    [`zoneEvents`]({{Queries.zoneEvents}}) is deprecated in favor of [`zoneIntersections`]({{Queries.zoneIntersections}}),
    and `tag` will not be present on [`ZoneIntersection`]({{Types.ZoneIntersection}}).
    Use [track's tag]({{Types.Track}}) instead.

    The class label of the object that triggered the zone event, i.e person, car, truck, etc.
    """
    tag: String! @deprecated(reason: "tag is deprecated and can instead be retrieved from the track.")
    """
    [`zoneEvents`]({{Queries.zoneEvents}}) is deprecated in favor of [`zoneIntersections`]({{Queries.zoneIntersections}}),
    and `type` will not be present on [`ZoneIntersection`]({{Types.ZoneIntersection}}).

    The type of zone event, i.e ingress (an object entered the zone), dwell (an object remained in the zone), and egress.
    (an object exited the zone)
    """
    type: ActivityType! @deprecated(reason: "zoneEvent is deprecated in favor of zoneIntersection, which does not use type.")
    """The time at which the event started."""
    startTime: DateTimeOffset!
    """The time at which the event ended."""
    endTime: DateTimeOffset
    """
    [`zoneEvents`]({{Queries.zoneEvents}}) is deprecated in favor of [`zoneIntersections`]({{Queries.zoneIntersections}}),
    and `polygon` will not be present on [`ZoneIntersection`]({{Types.ZoneIntersection}}).

    The two-dimensional shape of the detection that triggered the event.
    """
    polygon: GeoJSONMultiPolygon @deprecated(reason: "zoneEvent is deprecated in favor of zoneIntersection, which does not use polygon.")
}

type ZoneIntersection {
    """The unique identifier for the zone intersection."""
    id: ID!
    """The camera zone the intersection happened in."""
    zone: Zone!
    """
    The track associated with the object that triggered the zone intersection.
    """
    track: Track!
    """The time at which the intersection started."""
    startTime: DateTimeOffset!
    """The time at which the intersection ended."""
    endTime: DateTimeOffset
}

type ZoneIntersectionMessage {
    """The zone intersection."""
    message: ZoneIntersection!
    """
    The state of the intersection message. Within the message, the [`endTime`]({{Types.ZoneIntersection}}) will only be present on an [`END`]({{Types.MessageState}}) event.
    """
    state: MessageState!
}

input CreateZoneInput {
    """The unique identifier of the data source that owns the zone"""
    dataSourceId: ID!
    """The name given to the camera zone."""
    name: String!
    """The geometrical boundry of the camera zone."""
    polygon: GeoJSONPolygonInput!
    """True if the zone is currently active, otherwise false."""
    active: Boolean
}

input UpdateZoneInput {
    """The unique identifier of the zone."""
    id: ID!
    """The unique identifier of the data source that owns the zone."""
    dataSourceId: ID
    """The name given to the camera zone."""
    name: String
    """The geometrical boundry of the camera zone."""
    polygon: GeoJSONPolygonInput
    """True if the zone is currently active, otherwise false."""
    active: Boolean
}

###
type ZoneEventConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of zone events edges."""
    edges: [ZoneEventEdge]!
}

type ZoneEventEdge {
    """
    Information about a particular [ZoneEvent]({{Types.ZoneEvent}}).
    """
    node: ZoneEvent
    """
    The cursor to use with the [Query `zoneEvents` field]({{Queries.zoneEvents}}) `after` argument.
    """
    cursor: String!
}

type ZoneIntersectionConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of zone intersections edges."""
    edges: [ZoneIntersectionEdge]!
}

type ZoneIntersectionEdge {
    """
    Information about a particular [ZoneIntersection]({{Types.ZoneIntersection}}).
    """
    node: ZoneIntersection
    """
    The cursor to use with the [Query `zoneIntersections` field]({{Queries.zoneIntersections}}) `after` argument.
    """
    cursor: String!
}

type ZoneConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of zone edges."""
    edges: [ZoneEdge]!
}

type ZoneEdge {
    """Information about a particular [Zone]({{Types.Zone}})."""
    node: Zone
    """
    The cursor to use with the [Query `zones` field]({{Queries.zones}}) `after` argument.
    """
    cursor: String!
}

###
extend type Subscription {
    """
    Subscribes to changes in any [`ZoneIntersection`]({{Types.ZoneIntersection}}) based on the given filter.
    """
    zoneIntersections(
        """
        Filter detections by unique identifier of the device, unique identifier of the zone, message state, etc.
        """
        filter: FilterZoneIntersectionMessageInput
    ): ZoneIntersectionMessage
}

###
"""
Indicates the field used for sorting a [zones query]({{Queries.zones}}).
"""
enum ZonesSortField {
    """Sort the resulting list by the zone's unique identifiers."""
    ID
    """Sort the resulting list by the zone's names"""
    NAME
}

"""ZonesSort allows for sorting zones by a sort field and direction."""
input ZonesSort {
    """
    Any sortable field available to the ZonesSortField. See the link to the
    type below for more details.
    """
    field: ZonesSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

"""
Indicates the field used for sorting a [zoneEvents query]({{Queries.zoneEvents}}).
"""
enum ZoneEventsSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list by the track start time."""
    START_TIME
}

"""
ZoneEventsSort allows for sorting zone events by a sort field and direction.
"""
input ZoneEventsSort {
    """
    Any sortable field available to the ZoneEventsSortField. See the link to the
    type below for more details.
    """
    field: ZoneEventsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

"""
Indicates the field used for sorting a [zoneIntersections query]({{Queries.zoneIntersections}}).
"""
enum ZoneIntersectionsSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list by the intersection start time."""
    START_TIME
}

"""
ZoneIntersectionsSort allows for sorting zone intersections by a sort field and direction.
"""
input ZoneIntersectionsSort {
    """
    Any sortable field available to the ZoneIntersectionsSortField. See the link to the
    type below for more details.
    """
    field: ZoneIntersectionsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up a zone, a region on a camera, by its unique identifier."""
    zone(
        """The zone's unique identifier."""
        id: ID!
    ): Zone
    """Find zones based on a set of filters"""
    zones(
        """Filter zones based on the specified filters."""
        filter: FilterZoneInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [ZonesSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): ZoneConnection
    """
    Find events for a zone based on a set of filters.
    """
    zoneEvents(
        """Filter zone events based on the zone id, time period, etc."""
        filter: FilterZoneEventInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [ZoneEventsSort!]! = [{field: START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): ZoneEventConnection @deprecated(reason: "`zoneEvents` is deprecated. Use `zoneIntersections` instead")
    """Find intersections for a zone based on a set of filters."""
    zoneIntersections(
        """Filter zone intersections based on the zone id, time period, etc."""
        filter: FilterZoneIntersectionInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [ZoneIntersectionsSort!]! = [{field: START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): ZoneIntersectionConnection
}

###
extend type Mutation {
    """Creates a new Zone."""
    createZone(
        """Arguments to create a new zone."""
        zone: CreateZoneInput!
    ): Zone
    """Updates an existing Zone."""
    updateZone(
        """Arguments to update an existing zone."""
        zone: UpdateZoneInput!
    ): Zone
}

###
"""
`FilterZoneInput` allows for filtering zones based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterZoneInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.Zone}}) of a zone.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [name]({{Types.Zone}}) of a zone.
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the id of the [data source]({{Types.Zone}}) that owns the zone.
    """
    dataSourceId: FilterIDInput
    """
    If provided, specifies filters that work against the [active]({{Types.Zones}}) state of the zone
    """
    active: FilterBooleanInput
    """
    If provided, specifies filters that work against the [timestamp the zone was created at]({{Types.Zones}}).
    """
    createdAt: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the [timestamp the zone was most recently updated]({{Types.Zones}}).
    """
    updatedAt: FilterDateTimeOffsetInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterZoneInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterZoneInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterZoneInput
}

"""
`FilterZoneEventInput` allows for filtering a zone event based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterZoneEventInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.ZoneEvent}}) of a zone event.
    """
    zoneId: FilterIDInput
    """
    If provided, specifies filters that work against the [timestamp]({{Types.ZoneEvent}}) associated with the zone event.
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterZoneEventInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterZoneEventInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterZoneEventInput
}

"""
`FilterZoneIntersectionInput` allows for filtering a zone intersection based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterZoneIntersectionInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.ZoneIntersection}}) of a zone intersection.
    """
    zoneId: FilterIDInput
    """
    Specifies filters that work against the [startTime]({{Types.ZoneIntersection}}) associated with the zone intersection.
    """
    time: FilterDateTimeOffsetInput!
    """
    Specifies filters that work against the [tag]({{Types.Track}}) associated with the zone intersection.
    """
    tag: FilterStringInput
    """
    Specifies filters that work against the [dataSource]({{Types.Zone}}) associated with the zone intersection.
    """
    dataSourceId: FilterIDInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterZoneIntersectionInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterZoneIntersectionInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterZoneIntersectionInput
}

"""
`FilterZoneIntersectionMessageInput` allows for filtering a zone intersection subscription based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterZoneIntersectionMessageInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.ZoneIntersection}}) of the zone collided with.
    """
    zoneId: FilterIDInput
    """
    Specifies filters that work against the [dataSource]({{Types.Track}}) associated with the zone intersection's [track]({{Types.ZoneIntersection}}).
    """
    dataSourceId: FilterIDInput
    """
    Specifies filters that work against the [state]({{Types.MessageState}}) of the zone intersection message.
    """
    state: FilterMessageStateInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterZoneIntersectionMessageInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterZoneIntersectionMessageInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterZoneIntersectionMessageInput
}

###
"""
A `TagConnection` is the paginated result of a [`tags` query]({{Queries.tags}})
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type TagConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of Tag edges."""
    edges: [TagEdge]!
}

"""
A tag edge is the pairing of a [Tag]({{Types.Tag}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type TagEdge {
    """Information about a particular [Tag]({{Types.Tag}})."""
    node: Tag
    """
    The cursor to use with the [Query `tags` field]({{Queries.tags}}) `after` argument.
    """
    cursor: String!
}

###
"""
Tags are descriptive labels used to classify and group both detections and training data for models.
"""
type Tag {
    """The unique identifier for a tag."""
    id: ID!
    """
    The name of the tag. The name is not case-sensitive, and this field will always return as lowercase.
    """
    name: String!
    """The bounding box color used for detections of this tag type."""
    color: String
}

###
"""
Indicates the field used for sorting a [Tags query]({{Queries.tags}}).
"""
enum TagsSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list by the tag name."""
    LABEL_NAME
}

"""
TagsSort allows for sorting a [`tags` query]({{Queries.tags}}) by field and direction.
"""
input TagsSort {
    """
    Any sortable field available to the `TagsSort`. See the link to the type below for more details.
    """
    field: TagsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up a tag's information by its unique identifier."""
    tag(
        """The tag's unique numeric ID."""
        id: ID
        """The tag's name."""
        name: String
    ): Tag
    """Search for tags based on a set of filters."""
    tags(
        """Filter tags by id or name."""
        filter: FilterTagInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [TagsSort!]! = [{field: LABEL_NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): TagConnection
}

###
"""
`FilterTagInput` allows for filtering tags based on criteria described below.
Only one field should be provided per Filter object unless an operator
(`and` `or` `not`) as specified below.
"""
input FilterTagInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.Tag}}) of a tag.
    """
    id: FilterIDInput
    """
    If provided, specifies case-insensitive filters that work against the [name]({{Types.Tag}}) of a tag.
    """
    name: FilterStringInput
    """
    If provided, a tag must pass all filters in this list to match the current filter.
    """
    and: [FilterTagInput!]
    """
    If provided, a tag must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterTagInput!]
    """
    If provided, a tag may not match this filter to match the current filter.
    """
    not: FilterTagInput
}

###
"""Indicates the time bucket size for a summary query."""
enum SummaryBucketSize {
    """Bucket by minutes.  Not valid on summaries longer than 1 day."""
    MINUTES
    """Bucket by groups of 10 minutes.  Not valid on summaries longer than 1 day."""
    MINUTES_10
    """Bucket by groups of 12 minutes.  Not valid on summaries longer than 1 day."""
    MINUTES_12
    """Bucket by groups of 15 minutes.  Not valid on summaries longer than 1 day."""
    MINUTES_15
    """Bucket by groups of 20 minutes.  Not valid on summaries longer than 1 day."""
    MINUTES_20
    """Bucket by groups of 30 minutes.  Not valid on summaries longer than 1 day."""
    MINUTES_30
    """Bucket by hours.  Not valid on summaries longer than 7 days."""
    HOURS
    """Bucket by days."""
    DAYS
}

"""Indicates how to bucket objects.  In buckets, `total` count will differ by the bucketing strategy."""
enum BucketingStrategy {
    """Bucket into all buckets where the object was active.  With this strategy, an object may be present in multiple time buckets."""
    ACTIVE
    """Bucket into the bucket where the object ended. `total` will be equal to `startedCount`. `endedCount` will return as 0."""
    STARTED
    """Bucket into the bucket where the object ended. `total` will be equal to `endedCount`. `startedCount` will return as 0."""
    ENDED
}

"""
Request to bucket by string data at a specified JSON path.
If no data exists at the path, it will be treated as null.
"""
input JSONFieldStringBucket {
    """
    The path to the metadata field on which to bucket.
    Entries in the list may be either field keys (strings) or array indexes (integers).
    If no data exists at the path, it will be treated as a null value.
    """
    path: [String!]!
}

"""Indicates the bucket to group tracks by in an tracksSummary query."""
enum TracksSummaryBucketField {
    """Bucket by the track's type"""
    TAG
    """Bucket by the track's dataSource id"""
    DATA_SOURCE_ID
    """Bucket by the site of the track's dataSource"""
    DATA_SOURCE_SITE
    """Bucket by the point of interest of the track's dataSource"""
    DATA_SOURCE_POINT_OF_INTEREST
}

"""
Input to indicate which field(s) to group tracks by in an `tracksSummary` query.
Any combination of up to three distinct fields may be provided.
If multiple fields are provided, the buckets will be sorted by time, then fields.
"""
input TracksSummaryBucketType {
    """If provided, group the summary buckets by time buckets of the provided size."""
    size: SummaryBucketSize
    """How to bucket tracks.  Defaults to `ACTIVE`."""
    bucketingStrategy: BucketingStrategy @deprecated(reason: "bucketingStrategy is deprecated on TracksSummaryBucketType.  Instead, use the query parameter for bucketingStrategy to specify for both top-level and bucketed results.  If this field is provided, it will overwrite the query parameter.")
    """If provided, group the summary buckets by the values of the provided fields."""
    fields: [TracksSummaryBucketField!]
}

"""Indicates the bucket to group events by in an eventsSummary query."""
enum EventsSummaryBucketField {
    """Bucket by the event's type"""
    TYPE
    """Bucket by the event's subType"""
    SUB_TYPE
    """Bucket by the event's eventProducer Id"""
    EVENT_PRODUCER_ID
    """Bucket by the event's priority"""
    PRIORITY
    """Bucket by the event's draft status"""
    DRAFT
    """Bucket by the event's validation status"""
    VALIDATION_STATUS
}

"""
Input to indicate which field(s) to group events by in an `eventsSummary` query.
Any combination of up to three distinct fields may be provided.
If multiple fields are provided, the buckets will be sorted by time, then fields.
"""
input EventsSummaryBucketType {
    """If provided, group the summary buckets by time buckets of the provided size."""
    size: SummaryBucketSize
    """How to bucket event summaries.  Defaults to `ACTIVE`."""
    bucketingStrategy: BucketingStrategy @deprecated(reason: "bucketingStrategy is deprecated on EventsSummaryBucketType.  Instead, use the query parameter for bucketingStrategy to specify for both top-level and bucketed results.  If this field is provided, it will overwrite the query parameter.")
    """If provided, group the summary buckets by the values of the provided fields."""
    fields: [EventsSummaryBucketField!]
    """If provided, group the summary buckets by the values of the provided metadata fields."""
    metadata: [JSONFieldStringBucket!]
}

"""Indicates the bucket to group videos by in an videosSummary query."""
enum VideosSummaryBucketField {
    """Bucket by the video's data source Id"""
    DATA_SOURCE_ID
}

"""
Input to indicate which field(s) to group videos by in an `videosSummary` query.
Any combination of up to three distinct fields may be provided.
If multiple fields are provided, the buckets will be sorted by time, then fields.
"""
input VideosSummaryBucketType {
    """If provided, group the summary buckets by the values of the provided fields."""
    fields: [VideosSummaryBucketField!]
}

"""Indicates the bucket to group activity chronicles by in an activityChronicleSummary query."""
enum ActivityChronicleSummaryBucketField {
    """Bucket by the activity chronicle's name"""
    NAME
    """Bucket by the activity chronicle's description"""
    DESCRIPTION
    """Bucket by the activity chronicle's priority"""
    PRIORITY
    """Bucket by the activity chronicle's status"""
    STATUS
    """Bucket by the activity chronicle's chronicle producer"""
    CHRONICLE_PRODUCER
    """Bucket by the activity chronicle's sites. An activity can have multiple sites, so one activity may be counted in multiple buckets."""
    SITE
    """Bucket by the activity chronicle's data sources. An activity can have multiple data sources, so one activity may be counted in multiple buckets."""
    DATA_SOURCE
    """Bucket by the activity chronicle's labels. An activity can have multiple labels, so one activity may be counted in multiple buckets."""
    LABEL
    """Bucket by the activity chronicle's validation status"""
    VALIDATION_STATUS
    """Bucket by the activity chronicle's approval status"""
    APPROVAL_STATUS
}

"""
Indicates the resolution level for position bucketing. Higher resolutions produce smaller cells.
Options will either be a H3 resolution (`RESOLUTION_0` through `RESOLUTION_15`), or a semantic name referring to one of the H3 resolutions.
On average, the area of a cell divides by 7 at each new resolution.
Refer to [the H3 docs](https://h3geo.org/docs/core-library/restable) for more detailed statistics on resolution.
"""
enum PositionBucketPrecision {
    """H3 resolution 0 (~4.3 million km² average cell area)"""
    RESOLUTION_0
    """Extra-large-scale resolution, ~4.3 million km² per cell. Alias for `RESOLUTION_0`"""
    CONTINENTAL
    """H3 resolution 1 (~600,000 km²)"""
    RESOLUTION_1
    """H3 resolution 2 (~87,000 km²)"""
    RESOLUTION_2
    """H3 resolution 3 (~12,000 km²)"""
    RESOLUTION_3
    """H3 resolution 4 (~1,770 km²)"""
    RESOLUTION_4
    """Large-scale resolution, ~1,700 km² per cell. Alias for `RESOLUTION_5`"""
    REGIONAL
    """H3 resolution 5 (~253 km²)"""
    RESOLUTION_5
    """H3 resolution 6 (~36 km²)"""
    RESOLUTION_6
    """H3 resolution 7 (~5 km²)"""
    RESOLUTION_7
    """Medium-scale resolution, ~5 km² per cell. Alias for `RESOLUTION_7`"""
    DISTRICT
    """H3 resolution 8 (~0.7 km²)"""
    RESOLUTION_8
    """H3 resolution 9 (~0.1 km² or ~100,000 m²)"""
    RESOLUTION_9
    """Small-scale resolution, ~100,000 m² per cell. Alias for `RESOLUTION_9`"""
    NEIGHBORHOOD
    """H3 resolution 10 (~15,000 m²)"""
    RESOLUTION_10
    """H3 resolution 11 (~2,000 m²)"""
    RESOLUTION_11
    """H3 resolution 12 (~300 m²)"""
    RESOLUTION_12
    """Small-scale resolution, ~300 m² per cell. Alias for `RESOLUTION_12`"""
    BUILDING
    """H3 resolution 13 (~40 m²)"""
    RESOLUTION_13
    """H3 resolution 14 (~6 m²)"""
    RESOLUTION_14
    """H3 resolution 15 (~0.9 m²)"""
    RESOLUTION_15
}

"""
Input to indicate which field(s) to group activity chronicles by in an `activityChronicleSummary` query.
Any combination of up to three distinct fields may be provided.
If multiple fields are provided, the buckets will be sorted by time, then fields.
"""
input ActivityChronicleSummaryBucketType {
    """If provided, group the summary buckets by time buckets of the provided size."""
    size: SummaryBucketSize
    """How to bucket activity chronicles.  Defaults to `ACTIVE`."""
    bucketingStrategy: BucketingStrategy @deprecated(reason: "bucketingStrategy is deprecated on ActivityChronicleSummaryBucketType.  Instead, use the query parameter for bucketingStrategy to specify for both top-level and bucketed results.  If this field is provided, it will overwrite the query parameter.")
    """If provided, group the summary buckets by the values of the provided fields."""
    fields: [ActivityChronicleSummaryBucketField!]
    """If provided, group the summary buckets by position at the specified H3 resolution. Activities without a position will be grouped under a null key."""
    position: PositionBucketPrecision
    """If provided, group the summary buckets by the values of the provided metadata fields."""
    metadata: [JSONFieldStringBucket!]
}

"""Indicates the bucket to group zone intersections by in a zoneIntersectionSummary query."""
enum ZoneIntersectionSummaryBucketField {
    """Bucket by the zone's name"""
    ZONE_NAME
    """Bucket by the zone intersection's tag"""
    TAG
    """Bucket by the zone intersection's data source"""
    DATA_SOURCE
}

"""
Input to indicate which field(s) to group zone intersections by in a `zoneIntersectionSummary` query.
Any combination of up to three distinct fields may be provided.
If multiple fields are provided, the buckets will be sorted by time, then fields.
"""
input ZoneIntersectionSummaryBucketType {
    """If provided, group the summary buckets by time buckets of the provided size."""
    size: SummaryBucketSize
    """How to bucket zone intersections.  Defaults to `ACTIVE`."""
    bucketingStrategy: BucketingStrategy @deprecated(reason: "bucketingStrategy is deprecated on ZoneIntersectionSummaryBucketType.  Instead, use the query parameter for bucketingStrategy to specify for both top-level and bucketed results.  If this field is provided, it will overwrite the query parameter.")
    """If provided, group the summary buckets by the values of the provided fields."""
    fields: [ZoneIntersectionSummaryBucketField!]
}

"""The grouping key for a ZoneIntersectionSummaryBucket.  Fields bucketed on will be present.  All other fields will be null."""
type ZoneIntersectionSummaryBucketKey {
    """The start time of the summary bucket."""
    time: DateTimeOffset
    """The zone name of the zone intersections in the summary bucket."""
    zoneName: String
    """The tag of the zone intersections in the summary bucket."""
    tag: Tag
    """The data source of the zone intersections in the summary bucket."""
    dataSource: DataSource
}

"""Indicates the bucket to group devices by in a deviceSummary query."""
enum DeviceSummaryBucketField {
    """Bucket by the device's site"""
    SITE
    """Bucket by the device's point of interest"""
    POINT_OF_INTEREST
}

"""
Input to indicate which field(s) to group devices by in a `deviceSummary` query.
Any combination of up to three distinct fields may be provided.
If multiple fields are provided, the buckets will be sorted by time, then fields.
"""
input DeviceSummaryBucketType {
    """If provided, group the summary buckets by time buckets of the provided size."""
    size: SummaryBucketSize
    """If provided, group the summary buckets by the values of the provided fields."""
    fields: [DeviceSummaryBucketField!]
}

"""The grouping key for a DeviceSummaryBucket.  Fields bucketed on will be present.  All other fields will be null."""
type DeviceSummaryBucketKey {
    """The start time of the summary bucket."""
    time: DateTimeOffset
    """The site of the devices in the summary bucket."""
    site: Site
    """The point of interest of the devices in the summary bucket."""
    pointOfInterest: PointOfInterest
}

"""
A bucket key for a JSON string value.
"""
type JSONFieldBucketKey {
    """
    The path to the bucketed metadata field.
    """
    path: [String!]!
    """The string value of the path."""
    string: String
}

"""The grouping key for an EventsSummaryBucket.  Fields bucketed on will be present.  All other fields will be null."""
type EventsSummaryBucketKey {
    """The start time of the summary bucket."""
    time: DateTimeOffset
    """The `type` of the events in the summary bucket."""
    type: String
    """The `subType` of the events in the summary bucket."""
    subType: String
    """The `id` of the EventProducer of the events in the summary bucket."""
    eventProducerId: ID @deprecated(reason: "Use eventProducer.id instead")
    """The EventProducer of the events in the summary bucket."""
    eventProducer: EventProducer
    """The `priority` of the events in the summary bucket."""
    priority: String
    """The `draft` status of the events in the summary bucket."""
    draft: Boolean
    """The `validationStatus` of the events in the summary bucket."""
    validationStatus: String
    """If provided, group the summary buckets by the values of the provided metadata fields."""
    metadata: [JSONFieldBucketKey!]
}

"""The grouping key for an TracksSummaryBucket.  Fields bucketed on will be present.  All other fields will be null."""
type TracksSummaryBucketKey {
    """The start time of the summary bucket."""
    time: DateTimeOffset
    """The tracks' tags."""
    tag: Tag
    """The data source which produced the tracks."""
    dataSource: DataSource
    """The site for data sources which produced the tracks."""
    dataSourceSite: Site
    """The point of interest for data sources which produced the tracks."""
    dataSourcePointOfInterest: Site
}

"""The grouping key for an VideosSummaryBucket.  Fields bucketed on will be present.  All other fields will be null."""
type VideosSummaryBucketKey {
    """The `id` of the DataSource of the videos in the summary bucket."""
    dataSourceId: ID @deprecated(reason: "Use dataSource.id instead")
    """The DataSource of the videos in the summary bucket."""
    dataSource: DataSource
}

## Summary statistics

"""
Summary statistics for a `DateTimeDuration` type.
"""
type DateTimeDurationSummaryStatistics {
    """The minimum duration in the group."""
    min: DateTimeDuration!
    """The average duration in the group."""
    average: DateTimeDuration!
    """The maximum duration in the group."""
    max: DateTimeDuration!
}

"""
Summary statistics for event fields, to be read from an `eventsSummary` or its buckets.
"""
type EventsSummaryStatistics {
    """Summary statistics from the events' durations.  Does not include unfinished events.  Will be null if no events are finished."""
    duration: DateTimeDurationSummaryStatistics
}

"""
Summary statistics for video fields, to be read from an `videosSummary` or its buckets.
"""
type VideosSummaryStatistics {
    """Summary statistics from the videos' durations."""
    duration: DateTimeDurationSummaryStatistics
}

###
type TracksSummary {
    """
    The total number of [Tracks]({{Types.Track}}) within the time range.
    """
    total: Int!
    """
    The number of tracks which started within the time range.
    """
    startedCount: Int!
    """
    The number of tracks which ended within the time range.
    """
    endedCount: Int!

    """
    The count of [Tracks]({{Types.Track}}) for each [Tag]({{Types.Tag}}) within the time range.
    """
    totalsByTag: [TracksCountByTag!]! @deprecated(reason: "To retrieve per-tag counts, group by the `TAG` field, either alone or in combination with a time bucket.  Counts will return as empty if a `tracksBucket` or `filter` is used.")
    """
    A detailed summary of each [bucket]({{Types.SummaryBucketSize}}) within the time range.
    Summary buckets are only returned if `bucket` is provided as a query parameter to [`tracksSummary`]({{Queries.tracksSummary}}).
    """
    buckets: [TracksSummaryBucket!]
}

type TracksCountByTag {
    """The name of the [tag]({{Types.Tag}})."""
    tag: String!
    """
    The total count of [Tracks]({{Types.Track}}) within the time range with a matching tag.
    """
    count: Int!
}

type TracksSummaryBucket {
    """The start time of the bucket."""
    time: DateTimeOffset! @deprecated(reason: "Use key.time instead.")
    """The key of the bucket."""
    key: TracksSummaryBucketKey!
    """
    The total number of tracks within the bucket.
    """
    total: Int!
    """
    The number of tracks which started within the bucket.
    """
    startedCount: Int!
    """
    The number of tracks which ended within the bucket.
    """
    endedCount: Int!

    """
    The count of [Tracks]({{Types.Track}}) for each [Tag]({{Types.Tag}}) within the bucket.
    """
    counts: [TracksCountByTag!]! @deprecated(reason: "To retrieve per-tag counts, group by the `TAG` field, either alone or in combination with a time bucket.  Counts will return as empty if a tracksBucket is used.")
}

"""
Summary information for events across a time range.  Includes total count and counts by buckets.
"""
type EventsSummary {
    """
    The total number of [Events]({{Types.Event}}) within the time range.
    """
    total: Int!
    """
    The number of events which started within the time range.
    """
    startedCount: Int!
    """
    The number of events which ended within the time range.
    """
    endedCount: Int!

    """
    Summary statistics for all events within the summary's time range and filters.
    """
    summaryStatistics: EventsSummaryStatistics!
    """
    A detailed summary of each [bucket]({{Types.SummaryBucketSize}}) within the time range.
    Summary buckets are only returned if `bucket` is provided as a query parameter to [`eventsSummary`]({{Queries.eventsSummary}}).
    """
    buckets: [EventsSummaryBucket!]
    """
    The distinct top-level keys found in the `metadata` field across all matching events.
    Useful for discovering available metadata keys that can be used for metadata bucketing.
    """
    metadataKeys: [String!]
}

"""
Summary information for events across a time range inside a given `EventsSummaryBucketType`.  Includes total count and the bucketed field values.
"""
type EventsSummaryBucket {
    """The start time of the bucket."""
    time: DateTimeOffset! @deprecated(reason: "Use key.time instead.")
    """The key of the bucket."""
    key: EventsSummaryBucketKey!
    """
    The total number of [Events]({{Types.Event}}) within the bucket.
    """
    total: Int!
    """
    The number of events which started within the bucket.
    """
    startedCount: Int!
    """
    The number of events which ended within the bucket.
    """
    endedCount: Int!

    """
    Summary statistics for all events within the bucket.
    """
    summaryStatistics: EventsSummaryStatistics!
}

"""
Summary information for videos across a time range.  Includes total count and counts by buckets.
"""
type VideosSummary {
    """
    The total number of [Videos]({{Types.Video}}) within the time range.
    """
    total: Int!
    """
    The number of videos which started in the time range.
    """
    startedCount: Int!
    """
    The number of videos which ended in the time range.
    """
    endedCount: Int!
    """
    Summary statistics for all videos within the summary's time range and filters.
    """
    summaryStatistics: VideosSummaryStatistics!
    """
    A detailed summary of each [bucket]({{Types.SummaryBucketSize}}) within the time range.
    Summary buckets are only returned if `bucket` is provided as a query parameter to [`videosSummary`]({{Queries.videosSummary}}).
    """
    buckets: [VideosSummaryBucket!]
}

"""
Summary information for activity chronicles across a time range.  Includes total count and counts by buckets.
"""
type ActivityChronicleSummary {
    """
    The total number of activity chronicles within the time range.
    """
    total: Int!
    """
    The number of activity chronicles which started in the time range.
    """
    startedCount: Int!
    """
    The number of activity chronicles which ended in the time range.
    """
    endedCount: Int!
    """
    Summary statistics for all activity chronicles within the summary's time range and filters.
    """
    summaryStatistics: ActivityChronicleSummaryStatistics!
    """
    A detailed summary of each bucket within the time range.
    Summary buckets are only returned if `activityChronicleBucket` is provided as a query parameter to `activityChronicleSummary`.
    """
    buckets: [ActivityChronicleSummaryBucket!]
    """
    The distinct top-level keys found in the `metadata` field across all matching activity chronicles.
    Useful for discovering available metadata keys that can be used for metadata bucketing.
    """
    metadataKeys: [String!]
}

"""
Summary information for activity chronicles across a time range inside a given `ActivityChronicleSummaryBucketType`.  Includes total count and the bucketed field values.
"""
type ActivityChronicleSummaryBucket {
    """The key of the bucket."""
    key: ActivityChronicleSummaryBucketKey!
    """
    The total number of activity chronicles within the bucket.
    """
    total: Int!
    """
    The number of activity chronicles which started in the bucket.
    """
    startedCount: Int!
    """
    The number of activity chronicles which ended in the bucket.
    """
    endedCount: Int!
    """
    Summary statistics for all activity chronicles within the bucket.
    """
    summaryStatistics: ActivityChronicleSummaryStatistics!
}

"""
Summary statistics for activity chronicle fields, to be read from an `activityChronicleSummary` or its buckets.
"""
type ActivityChronicleSummaryStatistics {
    """Summary statistics from the activity chronicles' durations.  Does not include unfinished activities.  Will be null if no activities are finished."""
    duration: DateTimeDurationSummaryStatistics
}

"""The grouping key for an ActivityChronicleSummaryBucket.  Fields bucketed on will be present.  All other fields will be null."""
type ActivityChronicleSummaryBucketKey {
    """The start time of the summary bucket."""
    time: DateTimeOffset
    """The name of the activity chronicles in the summary bucket."""
    name: String
    """The description of the activity chronicles in the summary bucket."""
    description: String
    """The `priority` of the activity chronicles in the summary bucket."""
    priority: String
    """The `status` of the activity chronicles in the summary bucket."""
    status: String
    """The ChronicleProducer of the activity chronicles in the summary bucket."""
    chronicleProducer: ChronicleProducer
    """The Site of the activity chronicles in the summary bucket."""
    site: Site
    """The DataSource of the activity chronicles in the summary bucket."""
    dataSource: DataSource
    """The label of the activity chronicles in the summary bucket."""
    label: String
    """The `validationStatus` of the activity chronicles in the summary bucket."""
    validationStatus: String
    """The `approvalStatus` of the activity chronicles in the summary bucket."""
    approvalStatus: String
    """The H3 cell for position-bucketed results."""
    position: H3Cell
    """The metadata values of the activity chronicles in the summary bucket."""
    metadata: [JSONFieldBucketKey!]
}

"""
Summary information for videos across a time range inside a given `VideosSummaryBucketType`.  Includes total count and the bucketed field values.
"""
type VideosSummaryBucket {
    """The key of the bucket."""
    key: VideosSummaryBucketKey!
    """
    The total number of [Videos]({{Types.Video}}) within the bucket.
    """
    total: Int!
    """
    The number of videos which started in the bucket.
    """
    startedCount: Int!
    """
    The number of videos which ended in the bucket.
    """
    endedCount: Int!

    """
    Summary statistics for all videos within the bucket.
    """
    summaryStatistics: VideosSummaryStatistics!
}

"""
Summary information for zone intersections across a time range.  Includes total count and counts by buckets.
"""
type ZoneIntersectionSummary {
    """
    The total number of zone intersections within the time range.
    """
    total: Int!
    """
    The number of zone intersections which started within the time range.
    """
    startedCount: Int!
    """
    The number of zone intersections which ended within the time range.
    """
    endedCount: Int!

    """
    Summary statistics for all zone intersections within the summary's time range and filters.
    """
    summaryStatistics: ZoneIntersectionSummaryStatistics!
    """
    A detailed summary of each bucket within the time range.
    Summary buckets are only returned if `zoneIntersectionBucket` is provided as a query parameter to `zoneIntersectionSummary`.
    """
    buckets: [ZoneIntersectionSummaryBucket!]
}

"""
Summary information for zone intersections across a time range inside a given `ZoneIntersectionSummaryBucketType`.  Includes total count and the bucketed field values.
"""
type ZoneIntersectionSummaryBucket {
    """The key of the bucket."""
    key: ZoneIntersectionSummaryBucketKey!
    """
    The total number of zone intersections within the bucket.
    """
    total: Int!
    """
    The number of zone intersections which started within the bucket.
    """
    startedCount: Int!
    """
    The number of zone intersections which ended within the bucket.
    """
    endedCount: Int!
    """
    Summary statistics for all zone intersections within the bucket.
    """
    summaryStatistics: ZoneIntersectionSummaryStatistics!
}

"""
Summary statistics for zone intersection fields, to be read from a `zoneIntersectionSummary` or its buckets.
"""
type ZoneIntersectionSummaryStatistics {
    """Summary statistics from the zone intersections' durations.  Does not include unfinished intersections.  Will be null if no intersections are finished."""
    duration: DateTimeDurationSummaryStatistics
}

"""
Summary information for devices across a time range.  Includes total count and counts by buckets.
"""
type DeviceSummary {
    """
    The total number of devices within the time range.
    """
    total: Int!
    """
    A detailed summary of each bucket within the time range.
    Summary buckets are only returned if `deviceBucket` is provided as a query parameter to `deviceSummary`.
    """
    buckets: [DeviceSummaryBucket!]
}

"""
Summary information for devices across a time range inside a given `DeviceSummaryBucketType`.  Includes total count and the bucketed field values.
"""
type DeviceSummaryBucket {
    """The key of the bucket."""
    key: DeviceSummaryBucketKey!
    """
    The total number of devices within the bucket.
    """
    total: Int!
}

###
extend type Query {
    """Summarizes tracks over a time range."""
    tracksSummary(
        """Start time for the summary."""
        startTime: DateTimeOffset!
        """End time for the summary."""
        endTime: DateTimeOffset!
        """If provided, filter tracks based on their tags."""
        tags: FilterTagInput @deprecated(reason: "Use `filter.tag` instead.")
        """If provided, only summarize events matching the filter."""
        filter: FilterTracksSummaryInput
        """
        If provided, return [summary buckets]({{Types.TracksSummaryBucket}}) of this size.
        """
        bucket: SummaryBucketSize @deprecated(reason: "Bucket by `tracksBucket.size` instead.")
        """How to bucket tracks.  Defaults to `ACTIVE`."""
        bucketingStrategy: BucketingStrategy! = ACTIVE
        """
        If provided, group the summary buckets by the provided grouping types.
        """
        tracksBucket: TracksSummaryBucketType
    ): TracksSummary
    """Summarizes events over a time range."""
    eventsSummary(
        """Start time for the summary."""
        startTime: DateTimeOffset!
        """End time for the summary."""
        endTime: DateTimeOffset!
        """If provided, only summarize events matching the filter."""
        filter: FilterEventsSummaryInput
        """
        If provided, return [summary buckets]({{Types.EventsSummaryBucket}}) of this size.
        """
        bucket: SummaryBucketSize @deprecated(reason: "Grouping by `buckets` is deprecated in favor of grouping by `eventsBucket`.  Use `eventsBucket.size` to group events by a `SummaryBucketSize`.")
        """How to bucket events.  Defaults to `ACTIVE`."""
        bucketingStrategy: BucketingStrategy! = ACTIVE
        """
        If provided, group the summary buckets by the provided grouping types.
        """
        eventsBucket: EventsSummaryBucketType
        """
        If provided, return metadata keys at this JSON path instead of root-level keys.
        Useful for drilling down into nested metadata objects.
        """
        metadataKeysPath: [String!]
    ): EventsSummary
    """Summarizes videos over a time range."""
    videosSummary(
        """Start time for the summary."""
        startTime: DateTimeOffset!
        """End time for the summary."""
        endTime: DateTimeOffset!
        """If provided, only summarize videos matching the filter."""
        filter: FilterVideosSummaryInput
        """How to bucket videos.  Defaults to `ACTIVE`."""
        bucketingStrategy: BucketingStrategy! = ACTIVE
        """
        If provided, group the summary buckets by the provided grouping types.
        """
        videosBucket: VideosSummaryBucketType
    ): VideosSummary
    """Summarizes activity chronicles over a time range."""
    activityChronicleSummary(
        """Start time for the summary."""
        startTime: DateTimeOffset!
        """End time for the summary."""
        endTime: DateTimeOffset!
        """If provided, only summarize activity chronicles matching the filter."""
        filter: FilterActivityChronicleSummaryInput
        """How to bucket activity chronicles.  Defaults to `ACTIVE`."""
        bucketingStrategy: BucketingStrategy! = ACTIVE
        """
        If provided, group the summary buckets by the provided grouping types.
        """
        activityChronicleBucket: ActivityChronicleSummaryBucketType
        """
        If provided, return metadata keys at this JSON path instead of root-level keys.
        Useful for drilling down into nested metadata objects.
        """
        metadataKeysPath: [String!]
    ): ActivityChronicleSummary
    """Summarizes zone intersections over a time range."""
    zoneIntersectionSummary(
        """Start time for the summary."""
        startTime: DateTimeOffset!
        """End time for the summary."""
        endTime: DateTimeOffset!
        """If provided, only summarize zone intersections matching the filter."""
        filter: FilterZoneIntersectionSummaryInput
        """How to bucket zone intersections.  Defaults to `ACTIVE`."""
        bucketingStrategy: BucketingStrategy! = ACTIVE
        """
        If provided, group the summary buckets by the provided grouping types.
        """
        zoneIntersectionBucket: ZoneIntersectionSummaryBucketType
    ): ZoneIntersectionSummary
    """Summarizes devices over a time range."""
    deviceSummary(
        """Start time for the summary."""
        startTime: DateTimeOffset!
        """End time for the summary."""
        endTime: DateTimeOffset!
        """If provided, only summarize devices matching the filter."""
        filter: FilterDeviceSummaryInput
        """
        If provided, group the summary buckets by the provided grouping types.
        """
        deviceBucket: DeviceSummaryBucketType
    ): DeviceSummary
}

###
"""
`FilterTracksSummaryInput` allows for filtering a tracks summarized by a `tracksSummary` query based on criteria described below.
If multiple filters are provided, all must pass.
"""
input FilterTracksSummaryInput {
    """
    If provided, specifies case-insensitive filters that work against the [tag]({{Types.Track}}) of a track
    """
    tag: FilterTagInput
    """
    If provided, specifies filters that work against the data source that initiated the track.
    """
    dataSource: FilterDataSourceInput
    """
    If provided, specifies filters that work against the site at which the track was captured.
    """
    site: FilterSiteInput
    """
    If provided, specifies filters that work against the site at which the track was captured.
    """
    pointOfInterest: FilterPointOfInterestInput
}

"""
FilterEventsSummaryInput filters events summarized by an [eventsSummary]({{Types.EventSummary}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterEventsSummaryInput {
    """
    If provided, specifies filters that work against the [EventProducer's unique id]({{Types.EventProducer}}) of the event producer owning the event.
    """
    eventProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the [type]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    type: FilterStringInput
    """
    If provided, specifies filters that work against the [subType]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    subType: FilterStringInput
    """
    If provided, specifies filters that work against the [draft status]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    draft: FilterBooleanInput
    """
    If provided, specifies filters that work against the [priority]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the [validation status]({{Types.EventValidation}}) of the [`Event`]({{Types.Event}}).
    """
    validation: FilterEventValidationStatusInput
    """
    If provided, specifies filters that work against the user-defined event metadata.
    """
    metadata: FilterJSONFieldStringInput
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    and: [FilterEventsSummaryInput!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterEventsSummaryInput!]
    """
    If provided, an event may not match this filter to match the current filter.
    """
    not: FilterEventsSummaryInput
}


"""
FilterActivityChronicleSummaryInput filters activity chronicles summarized by an `activityChronicleSummary` query.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterActivityChronicleSummaryInput {
    """
    If provided, specifies filters that work against the start time of the activity chronicle.
    Useful for avoiding double-counting chronicles that span multiple time buckets.
    """
    startTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the name of the activity.
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the description of the activity.
    """
    description: FilterStringInput
    """
    If provided, specifies filters that work against the chronicle producer ID of the activity.
    """
    chronicleProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the data source IDs associated with the activity.
    """
    dataSourceIds: FilterIDListInput
    """
    If provided, specifies filters that work against the site IDs associated with the activity.
    """
    siteIds: FilterIDListInput
    """
    If provided, specifies filters that work against the labels of the activity.
    """
    labels: FilterStringListInput
    """
    If provided, specifies filters that work against the priority of the activity.
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the status of the activity.
    """
    status: FilterStringInput
    """
    If provided, specifies filters that work against the validation status of the activity.
    """
    validationStatus: FilterChronicleValidationStatusInput
    """
    If provided, specifies filters that work against the approval status of the activity.
    """
    approvalStatus: FilterStringInput
    """
    If provided, specifies filters that work against the position of the activity.
    """
    position: FilterPointInput
    """
    If provided, specifies filters that work against the user-defined activity metadata.
    """
    metadata: FilterJSONFieldStringInput
    """
    If provided, an activity must pass all filters in this list to match the current filter.
    """
    and: [FilterActivityChronicleSummaryInput!]
    """
    If provided, an activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterActivityChronicleSummaryInput!]
    """
    If provided, an activity may not match this filter to match the current filter.
    """
    not: FilterActivityChronicleSummaryInput
}

"""
FilterZoneIntersectionSummaryInput filters zone intersections summarized by a `zoneIntersectionSummary` query.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterZoneIntersectionSummaryInput {
    """
    If provided, specifies filters that work against the zone ID of the zone intersection.
    """
    zoneId: FilterIDInput
    """
    If provided, specifies filters that work against the class ID of the zone intersection.
    """
    classId: FilterIDInput
    """
    If provided, specifies filters that work against the data source ID of the zone intersection.
    """
    dataSourceId: FilterIDInput
    """
    If provided, a zone intersection must pass all filters in this list to match the current filter.
    """
    and: [FilterZoneIntersectionSummaryInput!]
    """
    If provided, a zone intersection must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterZoneIntersectionSummaryInput!]
    """
    If provided, a zone intersection may not match this filter to match the current filter.
    """
    not: FilterZoneIntersectionSummaryInput
}

"""
FilterDeviceSummaryInput filters devices summarized by a `deviceSummary` query.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterDeviceSummaryInput {
    """
    If provided, specifies filters that work against the site ID of the device.
    """
    siteId: FilterIDInput
    """
    If provided, specifies filters that work against the point of interest ID of the device.
    """
    pointOfInterestId: FilterIDInput
    """
    If provided, a device must pass all filters in this list to match the current filter.
    """
    and: [FilterDeviceSummaryInput!]
    """
    If provided, a device must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterDeviceSummaryInput!]
    """
    If provided, a device may not match this filter to match the current filter.
    """
    not: FilterDeviceSummaryInput
}

"""
FilterVideosSummaryInput filters summarized by a `videosSummary` based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterVideosSummaryInput {
    """
    If provided, specifies filters that work against the unique ID of the [`data source`]({{Types.DataSource}}) that produced the video.
    """
    dataSourceId: FilterIDInput
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    and: [FilterVideosSummaryInput!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterVideosSummaryInput!]
    """
    If provided, an event may not match this filter to match the current filter.
    """
    not: FilterVideosSummaryInput
}

###
type SiteConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of site edges."""
    edges: [SiteEdge]!
}

"""
A site edge is the pairing of a [Site]({{Types.Site}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type SiteEdge {
    """Information about a particular [Site]({{Types.Site}})."""
    node: Site
    """
    The cursor to use with the [`sites` query]({{Queries.sites}}) `after` argument.
    """
    cursor: String!
}

###
"""
A site represents a business location, such as an office building, a facility or a campus. Sites can be used to logically and geospatially group various objects and events that share a physical space, such as [Devices]({{Types.Devices}}), [Geofences]({{Types.Geofences}}).
"""
type Site {
    """The unique identifier of the site."""
    id: ID!
    """The name of the site."""
    name: String!
    """The IANA timezone identifier for this site (e.g. 'America/New_York', 'UTC')."""
    timezone: String!
    """The geographic location of the site"""
    position: GeoJSONPoint
    """The geographic shape of the site"""
    polygon: GeoJSONMultiPolygon
    """The devices that are associated with the site"""
    devices: [Device!]!
    """The points of interest that are associated with this site"""
    pointsOfInterest: [PointOfInterest!]!
    """The geofences that are associated with this site"""
    geofences: [Geofence!]!
}

"""
Input type used to create a new [Site]({{Types.Site}.
"""
input CreateSiteInput {
    """The name of the site."""
    name: String!
    """The IANA timezone identifier for this site (e.g. 'America/New_York'). Defaults to 'UTC' if not provided."""
    timezone: String
    """The geographic location of the site"""
    position: GeoJSONPointInput
    """The geographic shape of the site"""
    polygon: GeoJSONMultiPolygonInput
}

"""
Input type used to update an existing [Site]({{Types.Site}.
"""
input UpdateSiteInput {
    """The unique identifier of the site."""
    id: ID!
    """The name of the site."""
    name: String
    """The IANA timezone identifier for this site (e.g. 'America/New_York')."""
    timezone: String
    """The geographic location of the site"""
    position: GeoJSONPointInput
    """The geographic shape of the site"""
    polygon: GeoJSONMultiPolygonInput
}


###
"""
Indicates the field used for sorting an [`sites` query]({{Queries.sites}}).
"""
enum SitesSortField {
    """
    Sort the resulting list by the [`sites`](({{Types.Site}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`sites`](({{Types.Site}}))'s name.
    """
    NAME
}

"""
SitesSort allows for sorting a [`sites` query]({{Queries.sites}}) by field and direction.
"""
input SitesSort {
    """
    Any sortable field available to the `SitesSort`. See the link to the type below
    for more details.
    """
    field: SitesSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """
    Look up a site's information, such as its name, location and devices, by its unique identifier.
    """
    site(
        """The site's unique identifier."""
        id: ID!
    ): Site
    """Find sites based on a set of filters."""
    sites(
        """Filter sites based on id."""
        filter: FilterSiteInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [SitesSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): SiteConnection
}

###
extend type Mutation {
    """Creates a new Site."""
    createSite(
        """Arguments to create a new site."""
        site: CreateSiteInput!
    ): Site
    """
    Updates an existing Site.
    """
    updateSite(
        """Arguments to update an existing site."""
        site: UpdateSiteInput!
    ): Site
}

###
"""
FilterSiteInput filters [sites]({{Types.Site}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterSiteInput {
    """
    If provided, specifies filters that work against the [Site's unique id]({{Types.Site}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [Site's name]({{Types.Site}}).
    """
    name: FilterStringInput
    """
    If provided, a site must pass all filters in this list to match the current filter.
    """
    and: [FilterSiteInput!]
    """
    If provided, a site must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterSiteInput!]
    """
    If provided, a site may not match this filter to match the current filter.
    """
    not: FilterSiteInput
}

###
type SensorConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of sensor edges."""
    edges: [SensorEdge]!
}

"""
A sensor edge is the pairing of a [Sensor]({{Types.Sensor}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type SensorEdge {
    """Information about a particular [Sensor]({{Types.Sensor}})."""
    node: Sensor
    """
    The cursor to use with the [`sensors` query]({{Queries.sensors}}) `after` argument.
    """
    cursor: String!
}

"""
A `MeasurementConnection` is the paginated results of an [`measurements` query]({{Queries.measurements}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type MeasurementConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of measurement edges."""
    edges: [MeasurementEdge]!
}

"""
An measurement edge is the pairing of an [Measurement]({{Types.Measurement}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type MeasurementEdge {
    """Information about a particular measurement."""
    node: Measurement
    """
    The cursor to use with the [`measurements` query]({{Queries.measurements}}) `after` argument.
    """
    cursor: String!
}

###
extend type Subscription {
    """
    Subscribes to changes in any [`Measurement`]({{Types.Measurement}}) based on the given filter.
    """
    measurementActivity(
        """
        Filter measurements by unique identifier of the sensor, type of the event, etc.
        """
        filter: FilterMeasurementActivityInput
    ): Measurement
}

###
"""
Indicates the type of data that is outputted by a [`sensor`]({{Types.Sensor}}).
"""
enum SensorType {
    """Numeric data types, i.e integers, floats, and doubles."""
    NUMBER
    """Boolean data types, i.e true or false."""
    BOOLEAN
    """Text-based data types."""
    TEXT
}

type Sensor {
    """The unique identifier for the Sensor."""
    id: ID!
    """The name of the Sensor."""
    name: String!
    """A brief description of the Sensor."""
    description: String
    """The class label of the Sensor, e.g. thermometer."""
    type: SensorType!
    """The geographic location of the Sensor."""
    position: GeoJSONPoint
    """The address of the Sensor."""
    address: String
    """Arbitrary information about the Sensor outside of configuration."""
    metadata: JSON
}

"""A `Measurement` is the specific output of a sensor at a given time."""
type Measurement {
    """The unique identifier for the measurement."""
    id: ID!
    """The sensor that provided the measurement."""
    sensor: Sensor!
    """The time the measurement took place."""
    timestamp: DateTimeOffset!
    """The actual output of the sensor."""
    value: String!
}

"""
This input type is used to create a new [`Sensor`]({{Types.Sensor}}).
"""
input SensorInput {
    """The name of the sensor."""
    name: String!
    """A text description of the sensor."""
    description: String
    """The type of data outputted by the sensor."""
    type: SensorType!
    """The geographic location of the sensor."""
    position: GeoJSONPointInput
    """The address of the sensor."""
    address: String
    """
    Additional metadata associated with the sensor. This may represent any JSON object structure.
    """
    metadata: JSON
}

"""
This input type is used update an existing [`Sensor`]({{Types.Sensor}}).
"""
input UpdateSensorInput {
    """The unique identifier of the sensor."""
    id: ID!
    """The name of the sensor."""
    name: String
    """A text description of the sensor."""
    description: String
    """The type of data outputted by the sensor."""
    type: SensorType
    """The geographic location of the sensor."""
    position: GeoJSONPointInput
    """The address of the sensor."""
    address: String
    """
    Additional metadata associated with the sensor. This may represent any JSON object structure.
    """
    metadata: JSON
}

"""
This input type is used to create new [`Measurement`]({{Types.Measurement}}) for a sensor. See [`Sensor`]({{Types.Sensor}}) for more details.
"""
input MeasurementInput {
    """
    The unique identifier of the [Sensor]({{Types.Sensor}}) that will own the measurement.
    """
    sensorId: ID!
    """The time at which the measurement was recorded."""
    timestamp: DateTimeOffset!
    """The value of the measurement"""
    value: String!
}

###
"""
Indicates the field used for sorting an [`sensors` query]({{Queries.sensors}}).
"""
enum SensorsSortField {
    """
    Sort the resulting list by the [`sensor`](({{Types.Sensor}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`sensor`](({{Types.Sensor}}))'s name.
    """
    NAME
}

"""
SensorsSort allows for sorting a [`sensors` query]({{Queries.sensors}}) by field and direction.
"""
input SensorsSort {
    """
    Any sortable field available to the `SensorsSort`. See the link to the type below
    for more details.
    """
    field: SensorsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

"""
Indicates the field used for sorting a [`measurements` query]({{Queries.measurements}}).
"""
enum MeasurementsSortField {
    """
    Sort the resulting list by the [`Measurement`](({{Types.Measurement}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`Measurement`](({{Types.Measurement}}))'s timestamp.
    """
    TIMESTAMP
}

"""
MeasurementsSort allows for sorting measurements by a sort field and direction.
"""
input MeasurementsSort {
    """
    Any sortable field available to the MeasurementsSortField. See the link to the
    type below for more details.
    """
    field: MeasurementsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """
    Look up a sensor's information, such as its name, description, and location, by its unique identifier.
    """
    sensor(
        """The sensor's unique identifier."""
        id: ID!
    ): Sensor
    """Find sensors based on a set of filters."""
    sensors(
        """Filter sensors based on id, name, type, or position."""
        filter: FilterSensorInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [SensorsSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): SensorConnection
    """Finds measurements of a sensor based on a set of filters."""
    measurements(
        """Filter measurements based on the originating sensor, time period, etc."""
        filter: FilterMeasurementInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [MeasurementsSort!]! = [{field: TIMESTAMP, direction: ASC}, {field: ID, direction: ASC}]
    ): MeasurementConnection
}

###
extend type Mutation {
    """Creates a new Sensor."""
    createSensor(
        """Arguments to create a new sensor."""
        sensor: SensorInput!
    ): Sensor
    """Updates an existing Sensor."""
    updateSensor(
        """Arguments to update an existing sensor."""
        sensor: UpdateSensorInput!
    ): Sensor
    """
    Creates a new Measurement for a [Sensor]({{Types.Sensor}}).
    """
    createMeasurement(
        """Arguments to create a new measurement."""
        measurement: MeasurementInput!
    ): Measurement
}

###
"""
FilterSensorInput filters [sensors]({{Types.Sensor}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterSensorInput {
    """
    If provided, specifies filters that work against the [Sensor's unique id]({{Types.Sensor}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [Sensor's name]({{Types.Sensor}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the [Sensor's type]({{Types.Sensor}}).
    """
    type: FilterStringInput
    """
    If provided, specifies filters that work against the [Sensor's position]({{Types.Sensor}}).
    """
    position: FilterPointInput
    """
    If provided, a sensor must pass all filters in this list to match the current filter.
    """
    and: [FilterSensorInput!]
    """
    If provided, a sensor must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterSensorInput!]
    """
    If provided, a sensor may not match this filter to match the current filter.
    """
    not: FilterSensorInput
}

"""
`FilterMeasurementInput` allows for filtering measurement of a sensor on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterMeasurementInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.Sensor}}) of the sensor that created a measurement.
    """
    sensorId: FilterIDInput
    """
    If provided, specifies filters that work against the [timestamp]({{Types.Measurement}}) associated with the sensor measurement.
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, a measurement must pass all filters in this list to match the current filter.
    """
    and: [FilterMeasurementInput!]
    """
    If provided, a measurement must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterMeasurementInput!]
    """
    If provided, a measurement may not match this filter to match the current filter.
    """
    not: FilterMeasurementInput
}

"""
`FilterMeasurementActivityInput` allows for filtering measurement activity based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterMeasurementActivityInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.Sensor}}) of the sensor that created a measurement.
    """
    sensorId: FilterIDInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterMeasurementActivityInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterMeasurementActivityInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterMeasurementActivityInput
}

###
"""The single track from a `searchTrackImages` query."""
type SearchTrackImageResponse {
    """The track matching the search query."""
    track: Track!
    """The data source which captured the track."""
    dataSource: DataSource!
    """A unique identifier representing the point in time that that the track was captured."""
    trackBoxId: ID!
    """The timestamp at which the track best matched the search query."""
    timestamp: DateTimeOffset!
    """The confidence score of the track to the query string, with greater values indicating higher confidence."""
    confidence: Float!
}

"""The response from a `searchTrackImages` query."""
type SearchTrackImagesResponse {
    """The tracks matching the search query."""
    tracks: [SearchTrackImageResponse]!
}

"""A possible response entity from a `unifiedSearch` query."""
union UnifiedSearchNameResponseEntity =
    Site
    | PointOfInterest
    | DataSource
    | Tag

"""A single entity from a `unifiedSearch` query, along with additional information specific to the entity."""
type UnifiedSearchResponseEntry {
    """The entity matching the query."""
    entity: UnifiedSearchNameResponseEntity!
    """The cosine similarity of the entity to the query string, in the range [0, 1]."""
    similarityScore: Float!
    """A textual description of the entity, plus parent information if relevant."""
    context: String!
}

"""The response from a `unifiedSearch` query."""
type UnifiedSearchResponse {
    """The entities matching the search query."""
    entities: [UnifiedSearchResponseEntry]!
}

###
extend type Query {
    """Search for tracks whose images match a text description."""
    searchTrackImages(
        """The text description to search against."""
        searchText: String!
        """
        If true, the searchText will refer to the entire image, rather than just the track.
        Defaults to false.
        """
        searchImage: Boolean! = false
        """If provided, only search for tracks from the given collection."""
        collectionId: ID
        """If provided, only search for tracks from the given point of interest."""
        pointOfInterestId: ID
        """If provided, only search for tracks from the given data source."""
        dataSourceIds: [ID!]
        """If provided, only search for tracks after the given start time."""
        startTime: DateTimeOffset
        """If provided, only search for tracks before the given end time."""
        endTime: DateTimeOffset
        """If provided, only search for tracks from matching one of the given tags."""
        includeTagIds: [ID!]
        """If provided, do not return tracks matching the given tags."""
        excludeTagIds: [ID!]
        """Returns the first _n_ entries from the search."""
        first: Int! = 20
    ): SearchTrackImagesResponse
    """Search for entities matching a text description."""
    unifiedSearch(
        """The text description to search against."""
        searchText: String!
        """Optional filter against entity types.  If provided, only entities whose types match the filter will be returned."""
        entityTypes: FilterUnifiedSearchEntityTypeInput
        """Optional threshold in the range [0, 1].  If provided, only objects with a greater similarity score will be returned"""
        similarityThreshold: Float
        """Optional site id.  If provided, only return entities from the given site."""
        siteId: ID
        """Returns the first _n_ entries from the search."""
        first: Int! = 20
    ): UnifiedSearchResponse
}

###
"""A possible entity type of a `unifiedSearch` query."""
    enum UnifiedSearchEntityType {
    SITE
    POINT_OF_INTEREST
    DATA_SOURCE
    TAG
}

"""
`FilterUnifiedSearchEntityTypeInput` allows for filtering the type of on a [UnifiedSearchEntityType]({{Types.UnifiedSearchEntityType}}) parameter. Only one field should be provided per filter object.
"""
input FilterUnifiedSearchEntityTypeInput {
    """
    If provided, the UnifiedSearchEntityType must be equal to the value provided to match the filter.
    """
    eq: UnifiedSearchEntityType
    """
    If provided, the UnifiedSearchEntityType must not be equal to the value provided to match the filter.
    """
    ne: UnifiedSearchEntityType
    """
    If provided, the UnifiedSearchEntityType must be present in the list provided to match the filter.
    """
    in: [UnifiedSearchEntityType!]
}


###
extend type Query {
    """
    Read text in an image. The image supplied should be a pre-cropped image containing text.
    """
    textReadingForImage(
        """The ID of the image"""
        imageId: ID!
    ): TextReadingResponse
    """
    Read text in the image at the specified URL. The URL supplied should be a pre-cropped image containing text.
    """
    textReadingForUrl(
        """The URL of the image"""
        url: String!
    ): TextReadingResponse
    """Detect text in a data source's asset at a specified timestamp"""
    textRecognitionForDataSource(
        """The ID of the data source"""
        dataSourceId: ID!
        """The time at which text will be detected"""
        timestamp: DateTimeOffset!
        """Optional text recognition parameters."""
        options: TextRecognitionOptionsInput
    ): TextRecognitionResponse
    """Detect text in a video at the specified timestamp"""
    textRecognitionForVideo(
        """The ID of the video"""
        videoId: ID!
        """The time at which text will be detected"""
        timestamp: DateTimeOffset!
        """Optional text recognition parameters."""
        options: TextRecognitionOptionsInput
    ): TextRecognitionResponse
    """Detect text in a frame"""
    textRecognitionForFrame(
        """The ID of the frame"""
        frameId: ID!
        """Optional text recognition parameters."""
        options: TextRecognitionOptionsInput
    ): TextRecognitionResponse
    """Detect text in an image"""
    textRecognitionForImage(
        """The ID of the image"""
        imageId: ID!
        """Optional text recognition parameters."""
        options: TextRecognitionOptionsInput
    ): TextRecognitionResponse
    """Detect text in the image at the specified URL"""
    textRecognitionForUrl(
        """The URL of the image"""
        url: String!
        """Optional text recognition parameters."""
        options: TextRecognitionOptionsInput
    ): TextRecognitionResponse
    """Detect text within the polygon defined by a track's detection"""
    textRecognitionForTrack(
        """The ID of the track"""
        trackId: ID!
        """
        The time of the track's detection. Will use the nearest detection if there isn't one at this exact timestamp
        """
        timestamp: DateTimeOffset!
        """Optional text recognition parameters."""
        options: TextRecognitionOptionsInput
    ): TextRecognitionResponse
    """Segment a data source's asset at a specified timestamp"""
    segmentationForDataSource(
        """The ID of the data source"""
        dataSourceId: ID!
        """The time at which the data source will be segmented"""
        timestamp: DateTimeOffset!
        """Optional segmentation parameters."""
        options: SegmentationOptionsInput
    ): SegmentationResponse
    """Segment a video at the specified timestamp"""
    segmentationForVideo(
        """The ID of the video"""
        videoId: ID!
        """The time at which the video will be segmented"""
        timestamp: DateTimeOffset!
        """Optional segmentation parameters."""
        options: SegmentationOptionsInput
    ): SegmentationResponse
    """Segment a frame"""
    segmentationForFrame(
        """The ID of the frame"""
        frameId: ID!
        """Optional segmentation parameters."""
        options: SegmentationOptionsInput
    ): SegmentationResponse
    """Segment an image"""
    segmentationForImage(
        """The ID of the image"""
        imageId: ID!
        """Optional segmentation parameters."""
        options: SegmentationOptionsInput
    ): SegmentationResponse
    """Segment the image at the specified URL"""
    segmentationForUrl(
        """The URL of the image"""
        url: String!
        """Optional segmentation parameters."""
        options: SegmentationOptionsInput
    ): SegmentationResponse
    """Segment an image within the polygon defined by a track's detection"""
    segmentationForTrack(
        """The ID of the track"""
        trackId: ID!
        """
        The time of the track's detection. Will use the nearest detection if there isn't one at this exact timestamp
        """
        timestamp: DateTimeOffset!
        """Optional segmentation parameters."""
        options: SegmentationOptionsInput
    ): SegmentationResponse
    """
    Generate an embedding vector of a data source's asset at a specified timestamp
    """
    embeddingForDataSource(
        """The ID of the data source"""
        dataSourceId: ID!
        """The time at which the embedding vector will be generated"""
        timestamp: DateTimeOffset!
        """Optional embedding parameters."""
        options: EmbeddingOptionsInput
    ): EmbeddingResponse
    """Generate an embedding vector of a video at the specified timestamp"""
    embeddingForVideo(
        """The ID of the video"""
        videoId: ID!
        """The time at which the embedding vector will be generated"""
        timestamp: DateTimeOffset!
        """Optional embedding parameters."""
        options: EmbeddingOptionsInput
    ): EmbeddingResponse
    """Generate an embedding vector of a frame"""
    embeddingForFrame(
        """The ID of the frame"""
        frameId: ID!
        """Optional embedding parameters."""
        options: EmbeddingOptionsInput
    ): EmbeddingResponse
    """Generate an embedding vector of an image"""
    embeddingForImage(
        """The ID of the image"""
        imageId: ID!
        """Optional embedding parameters."""
        options: EmbeddingOptionsInput
    ): EmbeddingResponse
    """Generate an embedding vector of the image at the specified URL"""
    embeddingForUrl(
        """The URL of the image"""
        url: String!
        """Optional embedding parameters."""
        options: EmbeddingOptionsInput
    ): EmbeddingResponse
    """
    Generate an embedding vector for the detection described by the provided track ID and timestamp.
    """
    embeddingForTrack(
        """The ID of the track"""
        trackId: ID!
        """
        A timestamp within the lifetime of the track. An embedding will be generated for the detection closest to this timestamp for the specified track.
        """
        timestamp: DateTimeOffset!
        """Optional embedding parameters."""
        options: EmbeddingOptionsInput
    ): EmbeddingResponse
}

###
type TextReadingResponse {
    """The recognized text"""
    text: String!
    """The confidence score for the recognized text's accuracy."""
    textConfidence: Float!
}

input TextRecognitionOptionsInput {
    """
    The model will only attempt to detect text inside the specified multipolygons
    """
    regions: [GeoJSONMultiPolygonInput!]
}

type TextRecognitionResponse {
    """The list of detected text"""
    results: [TextRecognitionResult!]!
}

type TextRecognitionResult {
    """The actual detected text"""
    textDetection: TextDetection!
    """
    The index of the region in the provided regions array that contains the text detection. Only applicable if `regions` was specified in the [original query]({{Types.TextRecognitionOptionsInput}}}).
    """
    regionIndex: Int
}

type TextDetection {
    """The position and shape of the detection in the image"""
    polygon: GeoJSONPolygon!
    """The confidence score for the detection's existance."""
    detectionConfidence: Float!
    """The recognized text"""
    text: String!
    """The confidence score for the recognized text's accuracy."""
    textConfidence: Float!
}

input SegmentationOptionsInput {
    """
    The model will only attempt to generate segments at the specified points
    """
    points: [GeoJSONPointInput!]
    """
    The model will only attempt to generate segments inside the specified multipolygons
    """
    regions: [GeoJSONMultiPolygonInput!]
}

type SegmentationResponse {
    """The list of segments"""
    results: [SegmentationResult!]!
}

type SegmentationResult {
    """The actual segment"""
    segment: Segment!
    """
    The index of the region in the provided regions array that contains the segment. Only applicable if `regions` was specified in the [original query]({{Types.SegmentationOptionsInput}}).
    """
    regionIndex: Int
}

type Segment {
    """The region of the image that defines the segment"""
    polygon: GeoJSONMultiPolygon!
    """A bounding box that covers the entire area of the segment"""
    box: GeoJSONPolygon!
}

input EmbeddingOptionsInput {
    """
    The model will only attempt to embed the image inside the specified multipolygons
    """
    regions: [GeoJSONMultiPolygonInput!]
}

type EmbeddingResponse {
    """The list of embeddings"""
    results: [EmbeddingResult!]!
}

type EmbeddingResult {
    """The embedding vector"""
    embedding: [Float!]!
    """
    The index of the region in the provided regions array that contains the embedding. Only applicable if `regions` was specified in the [original query]({{Types.EmbeddingOptionsInput}}).
    """
    regionIndex: Int
}

###
"""
A `ImageConnection` is the paginated results of a [`images` query]({{Queries.images}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type ImageConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of detection edges."""
    edges: [ImageEdge]!
}

"""
A image edge is the pairing of a [Image]({{Types.Image}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type ImageEdge {
    """
    Information about a particular [Image]({{Types.Image}}).
    """
    node: Image
    """
    The cursor to use with the [`images` query]({{Queries.images}}) `after` argument.
    """
    cursor: String!
}

###
"""
Indicates the field used for sorting an [`images` query]({{Queries.images}}).
"""
enum ImagesSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list in by the image's data source identifiers."""
    DATA_SOURCE_ID
    """Sort the resulting list by the timestamp."""
    TIMESTAMP
}

"""
ImagesSort allows for sorting an [`images` query]({{Queries.images}}) by field and direction.
"""
input ImagesSort {
    """
    Any sortable field available to the `ImageSort`. See the link to the type below
    for more details.
    """
    field: ImagesSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """
    Retrieve the URL for a screenshot from the given device at a particular timestamp.
    """
    imageUrl(
        """The unique identifier of the device from which to capture the image."""
        deviceId: ID!
        """
        The time at which the given image should have been recorded by the device.
        """
        timestamp: DateTimeOffset!
    ): String @deprecated(reason: "`imageUrl` is deprecated. Use `snapshot` query instead")
    """Retrieve an Image for the given data source at a particular timestamp."""
    snapshot(
        """Arguments for retrieving an image (A Data Source ID and a Timestamp)."""
        input: CreateSnapshotInput!
    ): Image
    """Retrieve a created or uploaded image by its `id`."""
    image(
        """The unique identifier of the image."""
        id: ID!
    ): Image
    """Retrieve created and uploaded images."""
    images(
        """Filter images by data source id, timestamp, etc."""
        filter: FilterImageInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [ImagesSort!]! = [{field: TIMESTAMP, direction: ASC}, {field: ID, direction: ASC}]
    ): ImageConnection
}

###
extend type Mutation {
    """Uploads an image."""
    uploadImage(
        """Arguments to upload an image."""
        image: UploadImageInput!
    ): Image
}

###
"""
This input type is used to create a new [`Image`]({{Types.Image}}) for an event. See [`Event`]({{Types.Event}}) for more details.
"""
input CreateSnapshotInput {
    """The unique ID of the datasource or device that will take the snapshot"""
    dataSourceId: ID!
    """The time when the snapshot will be taken"""
    timestamp: DateTimeOffset!
}

"""This input type is used to upload an image to worlds."""
input UploadImageInput {
    """
    The optional UUID of the data source that this image will be associated with
    """
    dataSourceId: ID
    """The optional name of the uploaded file"""
    fileName: String
    """The optional timestamp that will be associated with the image"""
    timestamp: DateTimeOffset
    """The image bytes as a base64 encoded string"""
    data: String!
    """Optional list of ids for events to associate to the image."""
    eventIds: [ID!]
    """Optional list of ids for activity chronicles to associate to the image."""
    activityChronicleIds: [ID!]
}

"""
This input type is used to create a new clip for an event. See [`Event`]({{Types.Event}}) for more details.
"""
input CreateClipInput {
    """The unique ID of the datasource or device of the clip"""
    dataSourceId: ID!
    """The start time of the clip"""
    startTime: DateTimeOffset!
    """The end time of the clip"""
    endTime: DateTimeOffset!
}

"""
An Image represents a stored image asset. It contains information about the datasource it belongs to and the URLs that can be used to access the image and its thumbnail.
"""
type Image {
    """The unique identifier of the image"""
    id: ID!
    """
    When applicable, the unique identifier of the datasource or device that generated this image.
    """
    dataSourceId: ID
    """When applicable, the time when the image was taken"""
    timestamp: DateTimeOffset
    """The URL of the image"""
    url: String!
    """The URL of the image's thumbnail"""
    thumbnailUrl: String
}

###
"""
FilterImageInput allows for filtering images based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterImageInput {
    """
    If provided, specifies filters that work against the `id` of an image.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `id` of the image's data source.
    """
    dataSourceId: FilterIDInput
    """
    If provided, specifies filters that work against the `timestamp` of the image.
    """
    timestamp: FilterDateTimeOffsetInput
    """
    If provided, a device must pass all filters in this list to match the current filter.
    """
    and: [FilterImageInput!]
    """
    If provided, a device must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterImageInput!]
    """
    If provided, a device may not match this filter to match the current filter.
    """
    not: FilterImageInput
}

###
"""
An `GeofenceConnection` is the paginated results of a [`geofences` query]({{Queries.geofences}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type GeofenceConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of geofence edges."""
    edges: [GeofenceEdge]!
}

"""
An geofence edge is the pairing of a [Geofence]({{Types.Geofence}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type GeofenceEdge {
    """
    Information about a particular [Geofence]({{Types.Geofence}}).
    """
    node: Geofence
    """
    The cursor to use with the [Query `geofences` field]({{Queries.geofences}}) `after` argument.
    """
    cursor: String!
}

type GeofenceEventConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of geofence events edges."""
    edges: [GeofenceEventEdge]!
}

type GeofenceEventEdge {
    """
    Information about a particular [GeofenceEvent]({{Types.GeofenceEvent}}).
    """
    node: GeofenceEvent
    """
    The cursor to use with the [Query `geofenceEvents` field]({{Queries.geofenceEvents}}) `after` argument.
    """
    cursor: String!
}

type GeofenceIntersectionConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of geofence intersections edges."""
    edges: [GeofenceIntersectionEdge]!
}

type GeofenceIntersectionEdge {
    """
    Information about a particular [GeofenceIntersection]({{Types.GeofenceIntersection}}).
    """
    node: GeofenceIntersection
    """
    The cursor to use with the [Query `geofenceIntersections` field]({{Queries.geofenceIntersections}}) `after` argument.
    """
    cursor: String!
}

###
extend type Subscription {
    """
    Subscribes to changes in any [`GeofenceIntersection`]({{Types.GeofenceIntersection}}) based on the given filter.
    """
    geofenceIntersections(
        """
        Filter detections by unique identifier of the device, unique identifier of the geofence, tag, message state, etc.
        """
        filter: FilterGeofenceIntersectionMessageInput
    ): GeofenceIntersectionMessage
}

###
"""
Indicates the field used for sorting a [`geofences` query]({{Queries.geofences}}).
"""
enum GeofencesSortField {
    """
    Sort the resulting list by the [`Geofence`](({{Types.Geofence}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`Geofence`](({{Types.Geofence}}))'s name.
    """
    NAME
}

"""
GeofencesSort allows for sorting a geofence by a sort field and direction.
"""
input GeofencesSort {
    """
    Any sortable field available to the GeofencesSortField. See the link to the
    type below for more details.
    """
    field: GeofencesSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

"""
Indicates the field used for sorting a [`geofenceEvents` query]({{Queries.geofenceEvents}}).
"""
enum GeofenceEventsSortField {
    """
    Sort the resulting list by the [`GeofenceEvent`](({{Types.GeofenceEvent}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`GeofenceEvent`](({{Types.GeofenceEvent}}))'s timestamp.
    """
    OCCURRED
}

"""
GeofenceEventsSort allows for sorting geofence events by a sort field and direction.
"""
input GeofenceEventsSort {
    """
    Any sortable field available to the GeofenceEventsSortField. See the link to the
    type below for more details.
    """
    field: GeofenceEventsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

"""
Indicates the field used for sorting a [`geofenceIntersections` query]({{Queries.geofenceIntersections}}).
"""
enum GeofenceIntersectionsSortField {
    """
    Sort the resulting list by the [`GeofenceIntersection`](({{Types.GeofenceIntersection}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`GeofenceIntersection`](({{Types.GeofenceIntersection}}))'s start time.
    """
    START_TIME
}

"""
GeofenceIntersectionsSort allows for sorting geofence intersections by a sort field and direction.
"""
input GeofenceIntersectionsSort {
    """
    Any sortable field available to the GeofenceIntersectionsSortField. See the link to the
    type below for more details.
    """
    field: GeofenceIntersectionsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """
    Look up a geofence, a real-world geographic area, by its unique identifier.
    """
    geofence(
        """The geofence's unique identifier."""
        id: ID!
    ): Geofence
    """Search for geofences based on a set of filters."""
    geofences(
        """Filter geofences by unique identifier, name, etc."""
        filter: FilterGeofenceInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [GeofencesSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): GeofenceConnection
    """
    Find events for a geofence based on a set of filters.
    """
    geofenceEvents(
        """Filter geofence events based on the geofence id, time period, etc."""
        filter: FilterGeofenceEventInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [GeofenceEventsSort!]! = [{field: OCCURRED, direction: ASC}, {field: ID, direction: ASC}]
    ): GeofenceEventConnection @deprecated(reason: "`geofenceEvents` is deprecated. Use `geofenceIntersections` instead")
    """Find events for a geofence based on a set of filters."""
    geofenceIntersections(
        """
        Filter geofence intersections based on the geofence id, time period, etc.
        """
        filter: FilterGeofenceIntersectionInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [GeofenceIntersectionsSort!]! = [{field: START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): GeofenceIntersectionConnection
}

###
extend type Mutation {
    """Creates a new Geofence."""
    createGeofence(
        """Arguments to create a new geofence."""
        geofence: CreateGeofenceInput!
    ): Geofence
    """
    Updates an existing Geofence.
    """
    updateGeofence(
        """Arguments to update an existing geofence."""
        geofence: UpdateGeofenceInput!
    ): Geofence
}

###
"""
A geofence is a user-defined region in world coordinates. When a
[detection]({{Types.Detection}}) occurs within a geofence, or a
[track]({{Types.Track}}) crosses the border of a geofence, a [geofence
event]({{Types.GeofenceEvent}}) is created. Geofence events, along
with [zone events]({{Types.ZoneEvent}}) are a key part of creating
custom business logic with Worlds.
"""
type Geofence {
    """The unique identifier of the geofence."""
    id: ID!
    """The display name of the geofence."""
    name: String!
    """Human-readable labels describing this geofence."""
    labels: [String!]!
    """The site that the geofence belongs to."""
    site: Site
    """The point of interest that the geofence belongs to."""
    pointOfInterest: PointOfInterest
    """An object that represents the bounds of the geofence."""
    bounds: GeofenceBounds!
    """
    True if the geofence is active, otherwise false. Geofences that are not active
    will not produce events.
    """
    active: Boolean!
}

"""
Fields to create a new Geofence.
"""
input CreateGeofenceInput {
    """The display name of the geofence."""
    name: String!
    """Human-readable labels describing this geofence."""
    labels: [String!]
    """The identifier of the site that the geofence belongs to."""
    siteId: ID!
    """The identifier of the point of interest that the geofence belongs to.  If provided, the point of interest must belong to the geofence's site."""
    pointOfInterestId: ID
    """An object that represents the bounds of the geofence."""
    bounds: GeofenceBoundsInput!
    """
    True if the geofence is active, otherwise false. Geofences that are not active
    will not produce events.
    """
    active: Boolean!
}

"""
Fields to update an existing Geofence.
"""
input UpdateGeofenceInput {
    """The unique identifier of the geofence."""
    id: ID!
    """The display name of the geofence."""
    name: String
    """Human-readable labels describing this geofence."""
    labels: [String!]
    """The identifier of the site that the geofence belongs to."""
    siteId: ID
    """The identifier of the point of interest that the geofence belongs to.  If provided, the point of interest must belong to the geofence's site."""
    pointOfInterestId: ID
    """An object that represents the bounds of the geofence."""
    bounds: GeofenceBoundsInput
    """
    True if the geofence is active, otherwise false. Geofences that are not active
    will not produce events.
    """
    active: Boolean
}

input GeofenceBoundsInput {
    """A GeoJSON polygon that represents the bounds of the geofence."""
    polygon: GeoJSONPolygonInput!
}

"""
A geofence event is a point-in-time representation of an interaction between a
[track]({{Types.Track}}) and a
[geofence]({{Types.Geofence}}). The event represents the track either
entering, leaving, or remaining within the geofence.
"""
type GeofenceEvent {
    """The unique identifier of the geofence event."""
    id: ID!
    """The geofence indicated by the event."""
    geofence: Geofence!
    """The track indicated by the event."""
    track: Track!
    """
    [`geofenceEvents`]({{Queries.geofenceIntersections}}) is deprecated in favor of [`geofenceIntersections`]({{Queries.geofenceIntersections}}),
    and `tag` will not be present on [`GeofenceIntersection`]({{Types.GeofenceIntersection}}).
    Use [track's tag]({{Types.Track}}) instead.

    The class label of the object that triggered the geofence event, i.e person,
    car, truck, etc.
    """
    tag: String! @deprecated(reason: "tag is deprecated and can instead be retrieved from the track.")
    """
    [`geofenceEvents`]({{Queries.geofenceIntersections}}) is deprecated in favor of [`geofenceIntersections`]({{Queries.geofenceIntersections}}),
    and `type` will not be present on [`GeofenceIntersection`]({{Types.GeofenceIntersection}}).

    The type of geofence event, i.e ingress (an object entered the geofence), dwell
    (an object remained in the geofence), and egress. (an object exited the
    geofence)
    """
    type: ActivityType! @deprecated(reason: "geofenceEvent is deprecated in favor of geofenceIntersection, which does not use type.")
    """
    [`geofenceEvents`]({{Queries.geofenceIntersections}}) is deprecated in favor of [`geofenceIntersections`]({{Queries.geofenceIntersections}}),
    and `position` will not be present on [`GeofenceIntersection`]({{Types.GeofenceIntersection}}).

    The GeoJSON point for the position of the track at the time of the geofence
    event.
    """
    position: GeoJSONPoint! @deprecated(reason: "geofenceEvent is deprecated in favor of geofenceIntersection, which does not use position.")
    """
    [`geofenceEvents`]({{Queries.geofenceIntersections}}) is deprecated in favor of [`geofenceIntersections`]({{Queries.geofenceIntersections}}),
    and `timestamp` will not be present on [`GeofenceIntersection`]({{Types.GeofenceIntersection}}).
    Use [`startTime`]({{Types.GeofenceIntersection}}) and [`endTime`]({{Types.GeofenceIntersection}}) instead.

    The timestamp at which the event occurred.
    """
    timestamp: DateTimeOffset! @deprecated(reason: "geofenceEvent is deprecated in favor of geofenceIntersection, which does not use type, using startTime and endTime instead.")
    """
    [`geofenceEvents`]({{Queries.geofenceIntersections}}) is deprecated in favor of [`geofenceIntersections`]({{Queries.geofenceIntersections}}),
    and `metadata` will not be present on [`GeofenceIntersection`]({{Types.GeofenceIntersection}}).

    Any additional information about the event will be stored here.
    """
    metadata: JSON @deprecated(reason: "geofenceEvent is deprecated in favor of geofenceIntersection, which does not use metadata.")
}

"""
A geofence intersection is a point-in-time representation of an interaction between a
[track]({{Types.Track}}) and a
[geofence]({{Types.Geofence}}).
"""
type GeofenceIntersection {
    """The unique identifier of the geofence intersection."""
    id: ID!
    """The geofence indicated by the intersection."""
    geofence: Geofence!
    """The track indicated by the intersection."""
    track: Track!
    """The time at which the intersection started."""
    startTime: DateTimeOffset!
    """The time at which the intersection ended."""
    endTime: DateTimeOffset
}

type GeofenceIntersectionMessage {
    """The geofence intersection."""
    message: GeofenceIntersection!
    """
    The state of the intersection message. Within the message, the [`endTime`]({{Types.GeofenceIntersection}}) will only be present on an [`END`]({{Types.MessageState}}) event.
    """
    state: MessageState!
}

"""
A `GeofenceBounds` object represents the coordinates and boundaries of a [`Geofence`]({{Types.Geofence}}).
"""
type GeofenceBounds {
    """A GeoJSON polygon that represents the bounds of the geofence."""
    polygon: GeoJSONPolygon!
    """The height of the geofence, in meters, if provided."""
    height: Float
}

###
"""
`FilterGeofenceInput` allows for filtering a [geofence]({{Types.Geofence}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterGeofenceInput {
    """
    If provided, specifies filters that work against the unique id of the geofence.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the name of the geofence.
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the active state of the geofence.
    """
    active: FilterBooleanInput
    """
    If provided, specifies filters that work against the unique id of the geofence's site.
    """
    siteId: FilterIDInput
    """
    If provided, specifies filters that work against the unique id of the geofence's point of interest.
    """
    pointOfInterestId: FilterIDInput
    """
    If provided, specifies filters that work against the labels of the geofence.
    """
    labels: FilterStringListInput
    """
    If provided, a geofence must pass all filters in this list to match the current filter.
    """
    and: [FilterGeofenceInput!]
    """
    If provided, a geofence must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterGeofenceInput!]
    """
    If provided, a geofence may not match this filter to match the current filter.
    """
    not: FilterGeofenceInput
}

"""
`FilterGeofenceEventInput` allows for filtering a geofence event based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterGeofenceEventInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.Geofence}}) of a geofence.
    """
    geofenceId: FilterIDInput
    """
    If provided, specifies filters that work against the [timestamp]({{Types.GeofenceEvent}}) associated with the geofence event.
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, a geofence event must pass all filters in this list to match the current filter.
    """
    and: [FilterGeofenceEventInput!]
    """
    If provided, a geofence event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterGeofenceEventInput!]
    """
    If provided, a geofence event may not match this filter to match the current filter.
    """
    not: FilterGeofenceEventInput
}

"""
`FilterGeofenceIntersectionInput` allows for filtering a geofence intersection based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterGeofenceIntersectionInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.Geofence}}) of a geofence.
    """
    geofenceId: FilterIDInput
    """
    Specifies filters that work against the [startTime]({{Types.GeofenceIntersection}}) associated with the geofence intersection.
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, a geofence intersection must pass all filters in this list to match the current filter.
    """
    and: [FilterGeofenceIntersectionInput!]
    """
    If provided, a geofence intersection must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterGeofenceIntersectionInput!]
    """
    If provided, a geofence intersection may not match this filter to match the current filter.
    """
    not: FilterGeofenceIntersectionInput
}

"""
`FilterGeofenceIntersectionMessageInput` allows for filtering a geofence intersection subscription based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterGeofenceIntersectionMessageInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.GeofenceIntersection}}) of the geofence collided with.
    """
    geofenceId: FilterIDInput
    """
    If provided, specifies case-insensitive filters that work against the [tag]({{Types.Track}}) associated with the geofence intersection's [track]({{Types.GeofenceIntersection}}).
    """
    tag: FilterStringInput
    """
    Specifies filters that work against the [dataSource]({{Types.Track}}) associated with the geofence intersection's [track]({{Types.GeofenceIntersection}}).
    """
    dataSourceId: FilterIDInput
    """
    Specifies filters that work against the [state]({{Types.MessageState}}) of the geofence intersection message.
    """
    state: FilterMessageStateInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterGeofenceIntersectionMessageInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterGeofenceIntersectionMessageInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterGeofenceIntersectionMessageInput
}

###
"""A frame in a data source's video"""
type Frame {
    """The index of the frame in the video"""
    number: Int!
}

###
"""
An `EventProducerConnection` is the paginated results of an [`eventProducers` query]({{Queries.eventProducers}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type EventProducerConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of event producer edges."""
    edges: [EventProducerEdge]!
}

"""
An event producer edge is the pairing of an [EventProducer]({{Types.EventProducer}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type EventProducerEdge {
    """
    Information about a particular [EventProducer]({{Types.EventProducer}}).
    """
    node: EventProducer
    """
    The cursor to use with the [Query `eventProducers` field]({{Queries.eventProducers}}) `after` argument.
    """
    cursor: String!
}

"""
An `EventConnection` is the paginated results of an [`events` query]({{Queries.events}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type EventConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of event edges."""
    edges: [EventEdge]!
}

"""
An event edge is the pairing of an [Event]({{Types.Event}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type EventEdge {
    """Information about a particular [Event]({{Types.Event}})."""
    node: Event
    """
    The cursor to use with the [Query `events` field]({{Queries.events}}) `after` argument.
    """
    cursor: String!
}

###
extend type Subscription {
    """
    Subscribes to changes in any [`Event`]({{Types.Event}}) based on the given filter.
    """
    eventActivity(
        """
        Filter events by unique identifier of the event producer or type of event, etc.
        """
        filter: FilterEventActivityInput
    ): Event @deprecated(reason: "Use the Chronicles API instead. See `activityChronicles`, `eventChronicles`, or `summaryChronicles` subscriptions.")
}

###
"""
Indicates the field used for sorting an [`eventProducers` query]({{Queries.eventProducers}}).
"""
enum EventProducersSortField {
    """
    Sort the resulting list by the [`EventProducer`](({{Types.EventProducer}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`EventProducer`](({{Types.EventProducer}}))'s name.
    """
    EVENT_PRODUCER_NAME
}

"""
Indicates the field used for sorting an [`events` query]({{Queries.events}}).
"""
enum EventsSortField {
    """
    Sort the resulting list by the [`Event`](({{Types.Event}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`Event`](({{Types.Event}}))'s start time.
    """
    START_TIME
}

"""
EventProducersSort allows for sorting an event producer by a sort field and direction.
"""
input EventProducersSort {
    """
    Any sortable field available to the EventProducersSortField. See the link to the
    type below for more details.
    """
    field: EventProducersSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

"""EventsSort allows for sorting an event by a sort field and direction."""
input EventsSort {
    """
    Any sortable field available to the EventsSortField. See the link to the
    type below for more details.
    """
    field: EventsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up an event producer by its unique identifier."""
    eventProducer(
        """The event producer's unique identifier."""
        id: ID!
    ): EventProducer @deprecated(reason: "Use the Chronicles API instead. See `chronicleProducer` query.")
    """Search for event producers based on a set of filters."""
    eventProducers(
        """Filter event producers by unique identifier or name"""
        filter: FilterEventProducerInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [EventProducersSort!]! = [{field: EVENT_PRODUCER_NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): EventProducerConnection @deprecated(reason: "Use the Chronicles API instead. See `chronicleProducers` query.")
    """Look up an event by its unique identifier."""
    event(
        """The event's unique identifier."""
        id: ID!
    ): Event @deprecated(reason: "Use the Chronicles API instead. See `activityChronicle`, `eventChronicle`, or `summaryChronicle` queries.")
    """Search for events based on a set of filters."""
    events(
        """Filter events by unique identifier, type, time, etc."""
        filter: FilterEventInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [EventsSort!]! = [{field: START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): EventConnection @deprecated(reason: "Use the Chronicles API instead. See `activityChronicles`, `eventChronicles`, or `summaryChronicles` queries.")
}

###
extend type Mutation {
    """Creates a new EventProducer."""
    createEventProducer(
        """Arguments to create a new event producer."""
        eventProducer: EventProducerInput!
    ): EventProducer @deprecated(reason: "Use the Chronicles API instead. See `createChronicleProducer` mutation.")
    """
    Updates an existing EventProducer.
    """
    updateEventProducer(
        """Arguments to update an existing event producer."""
        eventProducer: UpdateEventProducerInput!
    ): EventProducer @deprecated(reason: "Use the Chronicles API instead. See `updateChronicleProducer` mutation.")
    """
    Creates a new Event. This allows for the creation of custom events within the Worlds system.
    """
    createEvent(
        """Arguments to create a new event."""
        event: CreateEventInput!
    ): Event @deprecated(reason: "Use the Chronicles API instead. See `createActivityChronicle`, `createEventChronicle`, or `createSummaryChronicle` mutations.")
    """Updates an existing Event."""
    updateEvent(
        """Arguments to update an existing event."""
        event: UpdateEventInput!
    ): Event @deprecated(reason: "Use the Chronicles API instead. See `updateActivityChronicle`, `updateEventChronicle`, or `updateSummaryChronicle` mutations.")
}

###
"""
FilterEventProducerInput filters [EventProducers]({{Types.EventProducer}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterEventProducerInput {
    """
    If provided, specifies filters that work against the [EventProducer's unique id]({{Types.EventProducer}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [EventProducer's name]({{Types.EventProducer}}).
    """
    name: FilterStringInput
    """
    If provided, an event producer must pass all filters in this list to match the current filter.
    """
    and: [FilterEventProducerInput!]
    """
    If provided, an event producer must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterEventProducerInput!]
    """
    If provided, an event producer may not match this filter to match the current filter.
    """
    not: FilterEventProducerInput
}

"""
FilterEventInput filters [events]({{Types.Event}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterEventInput {
    """
    If provided, specifies filters that work against the [EventProducer's unique id]({{Types.EventProducer}}) of the event producer owning the event.
    """
    eventProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the [type]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    type: FilterStringInput
    """
    If provided, specifies filters that work against the [subType]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    subType: FilterStringInput
    """
    If provided, specifies filters that work against the [time]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, specifies filters that work against the [draft status]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    draft: FilterBooleanInput
    """
    If provided, specifies filters that work against the [priority]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the [validation status]({{Types.EventValidation}}) of the [`Event`]({{Types.Event}}).
    """
    validation: FilterEventValidationStatusInput
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    and: [FilterEventInput!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterEventInput!]
    """
    If provided, an event may not match this filter to match the current filter.
    """
    not: FilterEventInput
}

"""
FilterEventActivityInput filters [events]({{Types.Event}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterEventActivityInput {
    """
    If provided, specifies filters that work against the [`EventProducer`](({{Types.EventProducer}}))'s unique id of the event producer owning the event.
    """
    eventProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the [type]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    type: FilterStringInput
    """
    If provided, specifies filters that work against the [subType]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    subType: FilterStringInput
    """
    If provided, specifies filters that work against the [draft status]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    draft: FilterBooleanInput
    """
    If provided, specifies filters that work against the [priority]({{Types.Event}}) of the [`Event`]({{Types.Event}}).
    """
    priority: FilterStringInput
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    and: [FilterEventActivityInput!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterEventActivityInput!]
    """
    If provided, an event may not match this filter to match the current filter.
    """
    not: FilterEventActivityInput
}

###
"""
An event producer represents a custom process that detects and records events. Events
created by an event producer can represent a wide variety of time-based activities to be
used by your application's specific needs that aren't expressed natively through
detections and geofences. For instance, an event producer could track detections of
hazards and people, creating an event for each case where a person was too close
to a hazard without personal protective equipment.
"""
type EventProducer {
    """The unique identifier for the event producer."""
    id: ID!
    """The name of the event producer."""
    name: String!
    """The text description of the event producer, if provided."""
    description: String
    """The timezone for the event producer, if provided."""
    timezone: String
    """True if the event producer is currently active, otherwise false."""
    active: Boolean!
    """A list of invalid reasons currently used by the event producer."""
    invalidReasons: [String!]!
    """Arbitrary information about the event producer."""
    metadata: JSON
}

"""
This input type is used to create a new custom [`EventProducer`]({{Types.EventProducer}}).
"""
input EventProducerInput {
    id: ID
    """The name of the event producer."""
    name: String!
    """The text description of the event producer."""
    description: String
    """The timezone for the event producer."""
    timezone: String
    """
    True if the event producer should be active by default, otherwise false.
    """
    active: Boolean
    """Arbitrary information about the event producer."""
    metadata: JSON
}

"""
This input type is used to update an existing [`EventProducer`]({{Types.EventProducer}}).
"""
input UpdateEventProducerInput {
    """The unique identifier for the event producer."""
    id: ID!
    """The name of the event producer."""
    name: String
    """The text description of the event producer."""
    description: String
    """The timezone for the event producer."""
    timezone: String
    """True if the event producer is active, otherwise false."""
    active: Boolean
    """Arbitrary information about the event producer."""
    metadata: JSON
}

"""
An event represents a custom event, including its start time, location, and duration. For more details on event producers and events, see [`EventProducer`]({{Types.EventProducer}}).
"""
type Event {
    """The unique identifier for the event."""
    id: ID!
    """The event producer that owns the event."""
    eventProducer: EventProducer!
    """
    The type of the event, which should convey the broad category of the event.
    """
    type: String!
    """
    The subtype of the event, if provided, which should provide more context on the
    category of the event.
    """
    subType: String
    """The time at which the event started."""
    startTime: DateTimeOffset!
    """
    The time at which the event ended. If not provided, the event is still ongoing.
    """
    endTime: DateTimeOffset
    """The GeoJSON point recorded with the event, if any."""
    position: GeoJSONPoint
    """The timezone for the event, if provided."""
    timezone: String
    """
    Additional metadata associated with the event. This may represent any JSON
    object structure.
    """
    metadata: JSON
    """The images that are associated with this event."""
    images: [Image!]!
    """
    The videos that are associated with this event.
    """
    videos: [Video!]! @deprecated(reason: "`videos` is deprecated. Use `dataSourceClips` instead.")
    """Video clips that are associated with this event."""
    dataSourceClips: [DataSourceClip!]!
    """
    Optional additional information associated with this event, including related data sources, sites, and tags.
    """
    properties: EventProperties
    """Indicate that the event is a draft.  Defaults to false."""
    draft: Boolean
    """Optional information to validate the accuracy of the event."""
    validation: EventValidation
    """Optional string to indicate the priority of an event."""
    priority: String
}

"""
Event Properties contain additional details and related information for an event. For more details on event producers and events, see [`EventProducer`]({{Types.EventProducer}}).
"""
type EventProperties {
    """The tracks associated with the event."""
    tracks: [Track!]
    """The sites associated with the event."""
    sites: [Site!]
    """The data sources associated with the event."""
    dataSources: [DataSource!]
    """The tag labels of detections associated with the event."""
    tags: [Tag!]
    """The points of interest associated with the event."""
    pointsOfInterest: [PointOfInterest!]
}

"""
This type indicates whether an event is valid and contains additional information about the validation.
"""
type EventValidation {
    """Whether the event is `VALID` or `INVALID`."""
    status: EventValidationStatus!
    """
    The reason for the event's validation status. Required if the `status` is `INVALID`.
    """
    reason: String
    """Optional details for the event's validation status."""
    details: String
}

"""
This input type is used to create a new [`Event`]({{Types.Event}}) for a custom event producer. See [`EventProducer`]({{Types.EventProducer}}) for more details.
"""
input CreateEventInput {
    """
    The unique identifier for the event. If not provided, one will be automatically assigned.
    """
    id: ID
    """
    The unique identifier of the [EventProducer]({{Types.EventProducer}}) that will own the event.
    """
    eventProducerId: String!
    """
    The type of the event, which should convey the broad category of the event.
    """
    type: String!
    """
    The subtype of the event, if provided, which should provide more context on the
    category of the event.
    """
    subType: String
    """The time at which the event started."""
    startTime: DateTimeOffset!
    """
    The time at which the event ended. If not provided, the event is still ongoing.
    """
    endTime: DateTimeOffset
    """The GeoJSON point to be recorded with the event, if any."""
    position: GeoJSONPointInput
    """The timezone for the event, if provided."""
    timezone: String
    """
    Additional metadata associated with the event. This may represent any JSON
    object structure.
    """
    metadata: JSON
    """Requests to generate snapshots for this event"""
    snapshots: [CreateSnapshotInput!]
    """Requests to upload images for this event."""
    uploads: [UploadImageInput!]
    """IDs of existing images to associate to this event."""
    imageIds: [ID!]
    """Requests to associate clips to this event"""
    clips: [CreateClipInput!]
    """
    List of Track IDs to attach to this event. Ensures that the Events UI page renders a map with plotted tracks.
    """
    trackIds: [ID!]
    """
    Optional additional information associated with this event, including related data sources, sites, and tags.
    """
    properties: EventPropertiesInput
    """Whether the event is a draft."""
    draft: Boolean! = false
    """Optional information to validate the accuracy of the event."""
    validation: EventValidationInput
    """Optional string to indicate the priority of an event."""
    priority: String
}

"""
This input type is used to update an existing [`Event`]({{Types.Event}}) for a custom event producer. See [`EventProducer`]({{Types.EventProducer}}) for more details.
"""
input UpdateEventInput {
    """The unique identifier for the event."""
    id: ID!
    """
    The type of the event, which should convey the broad category of the event.
    """
    type: String
    """
    The subtype of the event, if provided, which should provide more context on the
    category of the event.
    """
    subType: String
    """The time at which the event started."""
    startTime: DateTimeOffset
    """
    The time at which the event ended. If not provided, the event is still ongoing.
    """
    endTime: DateTimeOffset
    """The GeoJSON point to be recorded with the event, if any."""
    position: GeoJSONPointInput
    """The timezone for the event, if provided."""
    timezone: String
    """
    Additional metadata associated with the event. This may represent any JSON
    object structure.
    """
    metadata: JSON
    """
    Requests to generate snapshots for this event
    Snapshots are only generated when the event is ended for the first time.
    Therefore, snapshots will only be generated the first time that the `endTime` is specified for this event.
    """
    snapshots: [CreateSnapshotInput!]
    """
    Requests to upload images for this event.
    """
    uploads: [UploadImageInput!]
    """
    IDs of existing images to associate to this event.
    If this is provided, existing event images not included will be removed from the event,
    and only `uploads` and `imageIds` from the most update request will be associated with the event.
    """
    imageIds: [ID!]
    """Requests to associate clips to this event"""
    clips: [CreateClipInput!]
    """
    List of Track IDs to attach to this event. Ensures that the Events UI page renders a map with plotted tracks.
    """
    trackIds: [ID!]
    """
    Optional additional information associated with this event, including related data sources, sites, and tags.
    """
    properties: EventPropertiesInput
    """Whether the event is a draft."""
    draft: Boolean
    """Optional information to validate the accuracy of the event."""
    validation: EventValidationInput
    """Optional string to indicate the priority of an event."""
    priority: String
}

"""
This input type contains additional details and related information for an event. For more details on event producers and events, see [`EventProducer`]({{Types.EventProducer}}).
"""
input EventPropertiesInput {
    """The unique identifiers for the sites associated with the event."""
    siteIds: [ID!]
    """The unique identifiers for the data sources associated with the event."""
    dataSourceIds: [ID!]
    """The tag labels of detections associated with the event."""
    tags: [String!]
    """The points of interest associated with the event."""
    pointOfInterestIds: [ID!]
}

"""
Used in [EventValidationInput]({{Types.EventValidationInput}}) to indicate whether an event is `VALID` or `INVALID`.
"""
enum EventValidationStatus {
    """The event is valid."""
    VALID
    """The event is invalid."""
    INVALID
}

"""
This input type indicates whether an event is valid and contains additional information about the validation.
"""
input EventValidationInput {
    """Whether the event is `VALID` or `INVALID`."""
    status: EventValidationStatus!
    """
    The reason for the event's validation status.  Required if the `status` is `INVALID`.
    """
    reason: String
    """Additional details for the event's validation status."""
    details: String
}

###
"""
A `DeviceConnection` is the paginated results of a [`devices` query]({{Queries.devices}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type DeviceConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of Device edges."""
    edges: [DeviceEdge]!
}

"""
A device edge is the pairing of a [Device]({{Types.Device}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type DeviceEdge {
    """Information about a particular [Device]({{Types.Device}})."""
    node: Device
    """
    The cursor to use with the [Query `devices` field]({{Queries.devices}}) `after` argument.
    """
    cursor: String!
}

###
extend type Subscription {
    """
    Subscribes to changes in any [`Device`]({{Types.Device}}) based on the given filter.
    """
    devices(
        """
        Filter devices by unique identifier of the device, message state, etc.
        """
        filter: FilterDeviceMessageInput
    ): DeviceMessage
}

###
"""
Indicates the field used for sorting a [Devices query]({{Queries.devices}}).
"""
enum DevicesSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list by the device name."""
    NAME
}

"""
DevicesSort allows for sorting a [`devices` query]({{Queries.devices}}) by field and direction.
"""
input DevicesSort {
    """
    Any sortable field available to the `DevicesSort`. See the link to the type below
    for more details.
    """
    field: DevicesSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up a device's information by its unique identifier."""
    device(
        """The sensor's unique numeric ID or UUID."""
        id: ID!
    ): Device
    """Search for devices based on a set of filters."""
    devices(
        """Filter devices by id, uuid and/or name."""
        filter: FilterDeviceInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [DevicesSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): DeviceConnection
}

###
extend type Mutation {
    """Creates a new Device."""
    createDevice(
        """Arguments to create a new device."""
        device: CreateDeviceInput!
    ): Device
    """Updates an existing Device."""
    updateDevice(
        """Arguments to update an existing device."""
        device: UpdateDeviceInput!
    ): Device
}

###
"""
FilterDeviceInput allows for filtering devices based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterDeviceInput {
    """
    If provided, specifies filters that work against the `id` of a [device]({{Types.Device}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `uuid` of a [device]({{Types.Device}}).
    """
    uuid: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of a [device]({{Types.Device}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `externalId` of a [device]({{Types.Device}}).
    """
    externalId: FilterStringInput
    """
    If provided, specifies filters that work against the `address` of a [device]({{Types.Device}}).
    """
    address: FilterStringInput
    """
    If provided, specified filters that work against the `enabled` status of a [device]({{Types.Device}}).
    """
    enabled: FilterBooleanInput
    """
    If provided, a device must pass all filters in this list to match the current filter.
    """
    and: [FilterDeviceInput!]
    """
    If provided, a device must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterDeviceInput!]
    """
    If provided, a device may not match this filter to match the current filter.
    """
    not: FilterDeviceInput
}

"""
FilterDeviceMessageInput allows for filtering device messages based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterDeviceMessageInput {
    """
    If provided, specifies filters that work against the `id` of a [device]({{Types.Device}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `uuid` of a [device]({{Types.Device}}).
    """
    uuid: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of a [device]({{Types.Device}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `externalId` of a [device]({{Types.Device}}).
    """
    externalId: FilterStringInput
    """
    If provided, specifies filters that work against the `address` of a [device]({{Types.Device}}).
    """
    address: FilterStringInput
    """
    If provided, specified filters that work against the `enabled` status of a [device]({{Types.Device}}).
    """
    enabled: FilterBooleanInput
    """
    If provided, specified filters that work against the `state` of the `DeviceMessage`.
    """
    state: FilterDeviceMessageStateInput
    """
    If provided, a device must pass all filters in this list to match the current filter.
    """
    and: [FilterDeviceMessageInput!]
    """
    If provided, a device must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterDeviceMessageInput!]
    """
    If provided, a device may not match this filter to match the current filter.
    """
    not: FilterDeviceMessageInput
}

###
"""
A device represents a camera: a source of videos and images. These videos and images may then be processed to produce detections and tracks or to train models. For more details on detections, see [About Detections]({{Types.Detection}}).
"""
type Device {
    """The unique identifier of the device."""
    id: ID!
    """An alternative UUID for the device."""
    uuid: ID!
    """An identifier that the device may use outside of Worlds."""
    externalId: ID
    """The name of the device"""
    name: String!
    """`true` if the device's feed is being persisted by Worlds."""
    enabled: Boolean!
    """The address of the device"""
    address: String
    """The target frame rate for videos produced by this Device"""
    frameRate: Float
    """The geographic location of the device"""
    position: GeoJSONPoint
    """The data source associated with this device"""
    dataSource: DataSource
    """The site that this device belongs to"""
    site: Site
    """The list of calibrations for the device"""
    calibrations: [DeviceCalibration!]!
    """The point of interest the device belongs to"""
    pointOfInterest: PointOfInterest
    """Timestamp at which this device last received a heartbeat update.  Can be used to confirm the device is still active."""
    lastHeartbeat: DateTimeOffset
}

"""A message containing a `Device` from a `devices` subscription."""
type DeviceMessage {
    """The device."""
    message: Device!
    """The state of the device message."""
    state: DeviceMessageState!
}

"""
A device calibration determines how objects captured by in a video or image are geo-referenced into the real world.
"""
type DeviceCalibration {
    """The unique identifier of the device calibration."""
    id: ID!
    """
    The start time of the calibration. Detections generated after this time for this device will be geo-referenced according to this calibration.
    """
    timestamp: DateTimeOffset!
    """The markers associated with the calibration."""
    markers: [DeviceCalibrationMarker!]!
    """The time the calibration was precomputed, if any."""
    precomputeAt: DateTimeOffset
}

"""
DeviceCalibrationMarker represents a reference point used in device calibration. Markers consist of a point in an image and their corresponding point in the real world.
"""
type DeviceCalibrationMarker {
    """The unique identifier of the calibration marker."""
    id: ID!
    """The name of the calibration marker."""
    name: String!
    """The corresponding geographic position for the marker."""
    position: GeoJSONPoint!
    """The corresponding point in the video for the marker."""
    pixel: GeoJSONPoint!
}

"""
This input type is used to create a new [`Device`]({{Types.Device}}).
"""
input CreateDeviceInput {
    """The unique identifier for the site that this device belongs to."""
    siteId: ID
    """The unique identifier for the point of interest the device belongs to."""
    pointOfInterestId: ID
    """An identifier that the device may use outside of Worlds."""
    externalId: ID
    """The name of the device."""
    name: String!
    """The address of the device."""
    address: String
    """The geographic location of the device."""
    position: GeoJSONPointInput
    """`true` if the device's feed is being persisted by Worlds."""
    enabled: Boolean!
}

"""
This input type is used to update an existing [`Device`]({{Types.Device}}).
"""
input UpdateDeviceInput {
    """The unique identifier for the event."""
    id: ID!
    """The unique identifier for the site that this device belongs to."""
    siteId: ID
    """The unique identifier for the point of interest the device belongs to."""
    pointOfInterestId: ID
    """An identifier that the device may use outside of Worlds."""
    externalId: ID
    """The name of the device."""
    name: String
    """The address of the device."""
    address: String
    """The geographic location of the device."""
    position: GeoJSONPointInput
    """`true` if the device's feed is being persisted by Worlds."""
    enabled: Boolean
}

###
"""
A `DetectionConnection` is the paginated results of a [`detections` query]({{Queries.detections}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type DetectionConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of detection edges."""
    edges: [DetectionEdge]!
}

"""
A detection edge is the pairing of a [Detection]({{Types.Detection}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type DetectionEdge {
    """
    Information about a particular [Detection]({{Types.Detection}}).
    """
    node: Detection
    """
    The cursor to use with the [`detections` query]({{Queries.detections}}) `after` argument.
    """
    cursor: String!
}

###
extend type Subscription {
    """
    Subscribes to changes in any [`Detection`]({{Types.Detection}}) based on the given filter.
    """
    detectionActivity(
        """
        Filter detections by unique identifier of the device, unique identifier of the zone or geofence, type of the event, etc.
        """
        filter: FilterDetectionActivityInput
    ): Detection
}

###
"""
Indicates the field used for sorting a [Detections query]({{Queries.detections}}).
"""
enum DetectionsSortField {
    """
    Sort the resulting list by [detection time]({{Types.Detection}}).
    """
    DETECTION_TIME
    """
    Sort the resulting list by the corresponding Track's [unique identifier.]({{Types.Detection}}).
    """
    GLOBAL_TRACK_ID
}

"""
DetectionsSort allows for sorting a detection by detection sort field and direction.
"""
input DetectionsSort {
    """
    Any sortable field available to the DetectionsSort. See the link to the type
    below for more details.
    """
    field: DetectionsSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """
    Finds detections, which are objects detected by the Worlds system, based on a set of filters.
    """
    detections(
        """Filter detections based on the originating device, time period, etc."""
        filter: FilterDetectionInput!
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [DetectionsSort!]! = [{field: DETECTION_TIME, direction: ASC}, {field: GLOBAL_TRACK_ID, direction: ASC}]
    ): DetectionConnection
}

###
extend type Mutation {
    """Creates a new Detection."""
    createDetection(
        """Arguments to create a new detection."""
        detection: CreateDetectionInput!
    ): Detection
    """Creates multiple new Detections."""
    createDetections(
        """Arguments to create a list of detections."""
        detections: [CreateDetectionInput!]!
    ): [Detection]
}

###
"""
FilterDetectionInput allows for filtering a detection based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below
"""
input FilterDetectionInput {
    """
    If provided, specifies filters that work against the unique id of the data source]({{Types.DataSource}}) that initiated the detection.
    """
    dataSourceId: FilterIDInput
    """
    If provided, specifies filters that work against the unique id of the detection's [track]({{Types.Track}}).
    """
    trackId: FilterIDInput
    """
    If provided, specifies filters that work against the unique id of the zone in which a zone event was triggered by the [detection]({{Types.Detection}}).
    """
    zoneId: FilterIDInput
    """
    If provided, specifies filters that work against the unique id of the geofence in which a geofence event was triggered by the [detection]({{Types.Detection}}).
    """
    geofenceId: FilterIDInput
    """
    If provided, specifies case-insensitive filters that work against the tag associated with the [detection]({{Types.Detection}}).
    """
    tag: FilterStringInput
    """
    If provided, specifies filters that work against the timestamp associated with the [detection]({{Types.Detection}}).
    """
    time: FilterDateTimeOffsetInput!
    """
    If provided, specifies filters that work against the position of the [detection]({{Types.Detection}})
    """
    position: FilterPointInput
    """
    If provided, a detection must pass all filters in this list to match the current filter.
    """
    and: [FilterDetectionInput!]
    """
    If provided, a detection must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterDetectionInput!]
    """
    If provided, a detection may not match this filter to match the current filter.
    """
    not: FilterDetectionInput
    """
    If provided, specifies filters that work against the [unique id]({{Types.Detection}}) of the device that initiated the detection.
    """
    deviceId: FilterIDInput @deprecated(reason: "deviceId is deprecated use dataSourceId instead")
}

"""
FilterDetectionActivityInput allows for filtering a detection activity based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterDetectionActivityInput {
    """
    If provided, specifies filters that work against the unique id of the [data source]({{Types.DataSource}}) that initiated the detection activity.
    """
    dataSourceId: FilterIDInput
    """
    If provided, specifies filters that work against the unique id of the zone in which a zone event was triggered by the [detection]({{Types.Detection}}).
    """
    zoneId: FilterIDInput
    """
    If provided, specifies filters that work against the unique id of the geofence in which a geofence event was triggered by the [detection]({{Types.Detection}}).
    """
    geofenceId: FilterIDInput
    """
    If provided, specifies case-insensitive filters that work against the tag associated with the [detection]({{Types.Detection}}) activity.
    """
    tag: FilterStringInput
    """
    If provided, specifies filters that work against the position of the [detection]({{Types.Detection}})
    """
    position: FilterPointInput
    """
    If provided, a detection activity must pass all filters in this list to match the current filter.
    """
    and: [FilterDetectionActivityInput!]
    """
    If provided, a detection activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterDetectionActivityInput!]
    """
    If provided, a detection activity may not match this filter to match the current filter.
    """
    not: FilterDetectionActivityInput
    """
    If provided, specifies filters that work against the [unique id]({{Types.Detection}}) of the device that initiated the detection activity.
    """
    deviceId: FilterIDInput @deprecated(reason: "`deviceId` is deprecated. Use `dataSourceId` instead")
}

###
"""
Detections are the lowest level unit of computer vision primitive within Worlds.
A detection represents a single frame of a recognized object, which then has
additional data associated with it, including its position, track, and
interactions with zones and geofences.
"""
type Detection {
    """The track that is associated with the detection."""
    track: Track!
    """The time at which the detection occurred."""
    timestamp: DateTimeOffset!
    """Information about the video frame in which this detection was captured"""
    frame: Frame
    """A GeoJSON polygon that represents the spatial bounds of the detection."""
    polygon: GeoJSONPolygon
    """
    A GeoJSON point that represents the location of the detection in the world. This value may be `null` if the camera that captured the detection hasn't been calibrated. It may also be `null` if the location cannot be calculated (i.e the detected object is in the sky).
    """
    position: GeoJSONPoint
    """
    A list of [Zones]({{Types.Zone}}) with which the detection intersects.
    """
    zones: [Zone!]!
    """
    A list of [Geofences]({{Types.Geofence}}) with which the detection intersects.
    """
    geofences: [Geofence!]!
    """Arbitrary metadata associated with the detection."""
    metadata: JSON
    """
    Timestamp that the detection was created. May be delayed from the
    `timestamp` due to post-processing video feeds or other latency.
    """
    createdAt: DateTimeOffset
    """Timestamp that the detection was most recently updated."""
    updatedAt: DateTimeOffset
    """
    The direction in which the detection is moving, represented in degrees.
    """
    direction: Float
    """
    A list of [geofence]({{Queries.geofence}}) unique identifiers with which the
    detection intersects.
    """
    geofenceIds: [ID!]! @deprecated(reason: "`geofenceIds` is deprecated. Use `geofences.id` instead")
    """
    A list of [zone]({{Queries.zone}}) unique identifiers with which the
    detection intersects.
    """
    zoneIds: [ID!]! @deprecated(reason: "`zoneIds` is deprecated. Use `zones.id` instead")
    """A list of zone events related to this detection."""
    zoneEvents: [ZoneEvent!]! @deprecated(reason: "`zoneEvents` is deprecated. Use `track.zoneEvents` instead")
    """A list of geofence events related to this detection."""
    geofenceEvents: [GeofenceEvent!]! @deprecated(reason: "`geofenceEvents` is deprecated. Use `track.geofenceEvents` instead")
    """
    The global track id that governs the detection, if any.
    """
    globalTrackId: String @deprecated(reason: "`globalTrackId` is deprecated. Use `track.id` instead")
    """
    The unique identifier of the device where the detection occurred.
    """
    deviceId: ID @deprecated(reason: "`deviceId` is deprecated. Use `track.dataSourceId.id` instead")
    """
    The class label of the detected object, i.e person, car, truck, etc.
    """
    tag: String! @deprecated(reason: "`tag` is deprecated. Use `track.tag` instead")
}

"""
This type is used to create a new [`Detection`]({{Types.Detection}})
"""
input CreateDetectionInput {
    """The id of the track that governs the detection"""
    trackId: ID!
    """The time at which the detection occurred."""
    timestamp: DateTimeOffset!
    """
    A GeoJSON point that represents the location of the detection in the world.
    """
    position: GeoJSONPointInput
    """
    A GeoJSON polygon that represents the two dimensional bounds of the detection in its captured video or image.
    """
    polygon: GeoJSONPolygonInput
    """
    The direction, in degrees, of the detection in the world.
    Direction is measured clockwise from north, so `0` is north, `90` is east, `180` is south and `270` is west.
    The direction should be between `0` and `360` degrees.
    """
    direction: Float
    """Arbitrary metadata associated with the detection."""
    metadata: JSON
}

###
"""
A `DataSourceConnection` is the paginated results of a [`data sources` query]({{Queries.dataSources}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type DataSourceConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of detection edges."""
    edges: [DataSourceEdge]!
}

"""
A data source edge is the pairing of a [Data Source]({{Types.DataSource}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type DataSourceEdge {
    """
    Information about a particular [Data Source]({{Types.DataSource}}).
    """
    node: DataSource
    """
    The cursor to use with the [`dataSources` query]({{Queries.dataSources}}) `after` argument.
    """
    cursor: String!
}

###
"""
Indicates the field used for sorting a [`dataSources` query]({{Queries.dataSources}}).
"""
enum DataSourceSortField {
    """Sort the resulting list in by its unique identifier."""
    ID
    """Sort the resulting list by the device name."""
    NAME
}

"""
DataSourceSort allows for sorting a [`dataSources` query]({{Queries.dataSources}}) by field and direction.
"""
input DataSourceSort {
    """
    Any sortable field available to the `DataSourceSort`. See the link to the type below
    for more details.
    """
    field: DataSourceSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up a data source's information by its unique identifier."""
    dataSource(
        """The data source's unique numeric ID or UUID."""
        id: ID!
    ): DataSource
    """Search for data sources based on a set of filters."""
    dataSources(
        """Filter data sources by type and/or position."""
        filter: FilterDataSourceInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [DataSourceSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): DataSourceConnection
}

###
extend type Mutation {
    """Creates a new DataSource."""
    createDataSource(
        """Arguments to create a new data source."""
        dataSource: CreateDataSourceInput!
    ): DataSource
    """Updates an existing DataSource."""
    updateDataSource(
        """Arguments to update an existing data source."""
        dataSource: UpdateDataSourceInput!
    ): DataSource
}

###
"""
FilterDataSourceInput filters [DataSources]({{Types.DataSource}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterDataSourceInput {
    """
    If provided, specifies filters that work against the [`dataSource`]({{Types.DataSource}})'s type.
    The type of the data source
    """
    type: FilterStringInput
    """
    If provided, specifies filters that work against the position of the data source's [device]({{Types.DataSource}}).
    """
    position: FilterPointInput
    """
    If provided, specifies filters that work against the [data source`]({{Types.DataSource}})'s unique id.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [data source`]({{Types.DataSource}})'s name.
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `labels` of the [`DataSource`]({{Types.DataSource}}).
    """
    labels: FilterStringListInput
    """
    If provided, a data source must pass all filters in this list to match the current filter.
    """
    and: [FilterDataSourceInput!]
    """
    If provided, a data source must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterDataSourceInput!]
    """
    If provided, a data source may not match this filter to match the current filter.
    """
    not: FilterDataSourceInput
}

###
"""Indicates the type of a [DataSource]({{Types.DataSource}})"""
enum DataSourceType {
    """A data source that is simply meant to store videos or images"""
    FOLDER
    """
    A data source that corresponds to a [Device]({{Types.Device}}) that is generating video.
    """
    VIDEO_DEVICE
    """
    A data source that corresponds to a [Device]({{Types.Device}}) that is generating images.
    """
    IMAGE_DEVICE
    """
    A data source that directly produces [Tracks]({{Types.Track}}) and [detections]({{Types.Detection}})
    """
    GEOPOSITION
}

"""
A data source is responsible for producing the videos, images and other sensor data that may eventually produce detections and tracks. For more details on detections, see [About Detections]({{Types.Detection}})
"""
type DataSource {
    """The unique identifier of the data source."""
    id: ID!
    """The name of the data source"""
    name: String!
    """The type of the data source"""
    type: DataSourceType!
    """The device associated with this data source"""
    device: Device
    """The zones associated with this data source"""
    zones: [Zone!]!
    """Human-readable labels describing this data source"""
    labels: [String!]
}

"""
This type is used to create a new [`DataSource`]({{Types.DataSource}})
"""
input CreateDataSourceInput {
    """The name of the data source"""
    name: String!
    """The type of the data source"""
    type: DataSourceType!
    """Human-readable labels describing this data source"""
    labels: [String!]
}

"""
This type is used to update an existing [`DataSource`]({{Types.DataSource}})
"""
input UpdateDataSourceInput {
    """The unique identifier of the data source"""
    id: ID!
    """The name of the data source"""
    name: String
    """The type of the data source"""
    type: DataSourceType
    """Human-readable labels describing this data source"""
    labels: [String!]
}

###
"""
The paginated results of an [`chronicleProducers` query]({{Queries.chronicleProducers}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type ChronicleProducerConnection {
    """The resulting collection of chronicle producer edges."""
    edges: [ChronicleProducerEdge!]!
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
}

"""
The pairing of an [ChronicleProducer]({{Types.ChronicleProducer}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type ChronicleProducerEdge {
    """
    Information about a particular [ChronicleProducer]({{Types.ChronicleProducer}}).
    """
    node: ChronicleProducer!
    """
    The cursor to use with the [Query `chronicleProducers` field]({{Queries.chronicleProducers}}) `after` argument.
    """
    cursor: String!
}

###
"""
Indicates the field used for sorting an [`chronicleProducers` query]({{Queries.chronicleProducers}}).
"""
enum ChronicleProducersSortField {
    """
    Sort the resulting list by the [`ChronicleProducer`]({{Types.ChronicleProducer}})'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`ChronicleProducer`]({{Types.ChronicleProducer}})'s name.
    """
    NAME
}

"""
ChronicleProducersSort allows for sorting an chronicle producer by a sort field and direction.
"""
input ChronicleProducersSort {
    """
    Any sortable field available to the ChronicleProducersSortField. See the link to the
    type below for more details.
    """
    field: ChronicleProducersSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up an chronicle producer by its unique identifier."""
    chronicleProducer(
        """The chronicle producer's unique identifier."""
        id: ID!
    ): ChronicleProducer
    """Search for chronicle producers based on a set of filters."""
    chronicleProducers(
        """Filter chronicle producers by unique identifier or name"""
        filter: FilterChronicleProducerInput,
        """Returns the first _n_ elements from the list."""
        first: Int! = 20,
        """Returns the elements in the list that come after the specified cursor."""
        after: String,
        """The field and direction by which to sort the results"""
        sort: [ChronicleProducersSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): ChronicleProducerConnection
}

###
extend type Mutation {
    """Creates a new ChronicleProducer."""
    createChronicleProducer(
        """Arguments to create a new chronicle producer."""
        chronicleProducer: CreateChronicleProducerInput!
    ): ChronicleProducer!
    """
    Updates an existing ChronicleProducer.
    """
    updateChronicleProducer(
        """Arguments to update an existing chronicle producer."""
        chronicleProducer: UpdateChronicleProducerInput!
    ): ChronicleProducer!
}

###
"""
FilterChronicleProducerInput filters [ChronicleProducer]({{Types.ChronicleProducer}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterChronicleProducerInput {
    """
    If provided, specifies filters that work against the [ChronicleProducer]({{Types.ChronicleProducer}})'s unique id.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [ChronicleProducer]({{Types.ChronicleProducer}})'s name.
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the [ChronicleProducer]({{Types.ChronicleProducer}})'s active status.
    """
    active: FilterBooleanInput
    """
    If provided, an chronicle producer must pass all filters in this list to match the current filter.
    """and: [FilterChronicleProducerInput!]
    """
    If provided, an chronicle producer must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterChronicleProducerInput!]
    """
    If provided, an chronicle producer may not match this filter to match the current filter.
    """
    not: FilterChronicleProducerInput
}

"""
`FilterChronicleValidationStatusInput` allows for filtering based on an chronicle's validation status. Only one field should be provided per filter object.
"""
input FilterChronicleValidationStatusInput {
    """
    If provided, the chronicle's validation status must be equivalent to the value provided to match the current filter.
    """eq: ChronicleValidationStatus
    """
    If provided, the chronicle's validation status must not be equivalent to the value provided to match the current filter.
    """ne: ChronicleValidationStatus
    """
    If provided, the chronicle's validation status must be present in the value provided to match the current filter.
    """
    in: [ChronicleValidationStatus!]
    """
    If provided and true, the filter will pass only if the chronicle has a validation status. If provided and false, the filter will pass only if there is no validation status.
    """
    attributeExists: Boolean
}

###
"""
Used in [ChronicleValidationInput]({{Types.ChronicleValidationInput}}) to indicate whether an chronicle is `VALID` or `INVALID`.
"""
enum ChronicleValidationStatus {
    """The chronicle is valid."""
    VALID
    """The chronicle is invalid."""
    INVALID
}

"""
This input type indicates whether an chronicle is valid and contains additional information about the validation.
"""
type ChronicleValidation {
    """Whether the chronicle is `VALID` or `INVALID`."""
    status: ChronicleValidationStatus!
    """
    The reason for the chronicle's validation status.  Required if the `status` is `INVALID`.
    """
    reason: String
    """Additional details for the chronicle's validation status."""
    details: String
}

"""
An chronicle producer represents a custom process that detects and records chronicles. Chronicles
created by an chronicle producer can represent a wide variety of time-based activities to be
used by your application's specific needs that aren't expressed natively through
detections and geofences. For instance, an chronicle producer could track detections of
hazards and people, creating an event chronicle for each case where a person was too close
to a hazard without personal protective equipment.
"""
type ChronicleProducer {
    """The unique identifier for the chronicle producer."""
    id: ID!
    """The name of the chronicle producer."""
    name: String!
    """The text description of the chronicle producer, if provided."""
    description: String
    """The timezone for the chronicle producer, if provided."""
    timezone: String
    """True if the chronicle producer is currently active, otherwise false."""
    active: Boolean!
    """A list of validation reasons currently used by the chronicle producer."""
    validationReasons: [String!]!
    """Arbitrary information about the chronicle producer."""
    metadata: JSON
}

"""
This input type is used to create a new custom [`ChronicleProducer`]({{Types.ChronicleProducer}}).
"""
input CreateChronicleProducerInput {
    """The name of the chronicle producer."""
    name: String!
    """The text description of the chronicle producer."""
    description: String
    """The timezone for the chronicle producer."""
    timezone: String
    """
    True if the chronicle producer should be active by default, otherwise false.
    """
    active: Boolean!
    """Arbitrary information about the chronicle producer."""
    metadata: JSON
    """A list of validation reasons to be used by the chronicle producer."""
    validationReasons: [String!]
}

"""
This input type is used to update an existing [`ChronicleProducer`]({{Types.ChronicleProducer}}).
"""
input UpdateChronicleProducerInput {
    """The unique identifier for the chronicle producer."""
    id: ID!
    """The name of the chronicle producer."""
    name: String
    """The text description of the chronicle producer."""
    description: String
    """The timezone for the chronicle producer."""
    timezone: String
    """True if the chronicle producer is active, otherwise false."""
    active: Boolean
    """Arbitrary information about the chronicle producer."""
    metadata: JSON
    """A list of validation reasons to be used by the chronicle producer."""
    validationReasons: [String!]
}

"""
This input type indicates whether an chronicle is valid and contains additional information about the validation.
"""
input ChronicleValidationInput {
    """Whether the chronicle is `VALID` or `INVALID`."""
    status: ChronicleValidationStatus!
    """
    The reason for the chronicle's validation status.  Required if the `status` is `INVALID`.
    """
    summary: String
    """Additional details for the chronicle's validation status."""
    details: String
}

###
type PointOfInterestConnection {
    """Pagination information for the resulting edges."""
    pageInfo: PageInfo!
    """The resulting collection of site edges."""
    edges: [PointOfInterestEdge]!
}

"""
A point of interest edge is the pairing of a [PointOfInterest]({{Types.PointOfInterest}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type PointOfInterestEdge {
    """
    Information about a particular [PointOfInterest]({{Types.PointOfInterest}}).
    """
    node: PointOfInterest
    """
    The cursor to use with the [`pointsOfInterest` query]({{Queries.pointsOfInterest}}) `after` argument.
    """
    cursor: String!
}

###
"""
Indicates the field used for sorting a [`pointsOfInterest` query]({{Queries.pointsOfInterest}}).
"""
enum PointOfInterestSortField {
    """
    Sort the resulting list by the [`Point of Interest`](({{Types.PointOfInterest}}))'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`Point of Interest`](({{Types.PointOfInterest}}))'s name.
    """
    NAME
}

"""
PointOfInterestSort allows for sorting a [`pointsOfInterest` query]({{Queries.pointsOfInterest}}) by field and direction.
"""
input PointOfInterestSort {
    """
    Any sortable field available to the `PointOfInterestSort`. See the link to the type below
    for more details.
    """
    field: PointOfInterestSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """
    Look up a point of interest, such as its name, associated site, and devices.
    """
    pointOfInterest(
        """The point of interest's unique identifier."""
        id: ID!
    ): PointOfInterest
    """Search for points of interest based on a set of filters."""
    pointsOfInterest(
        """Filter points of interest by id or name."""
        filter: FilterPointOfInterestInput
        """Returns the first _n_ elements from the list."""
        first: Int! = 20
        """Returns the elements in the list that come after the specified cursor."""
        after: String
        """The field and direction by which to sort the results"""
        sort: [PointOfInterestSort!]! = [{field: NAME, direction: ASC}, {field: ID, direction: ASC}]
    ): PointOfInterestConnection
}

###
"""
A point of interest is a designated area within a Site, used to subdivide a location into meaningful sections. Each POI belongs to a single [Site]({{Types.Site}}) and can contain multiple [Devices]({{Types.Device}}).
"""
type PointOfInterest {
    """The unique identifier of the point of interest."""
    id: ID!
    """The site the point of interest belongs to."""
    site: Site!
    """The name of the point of interest."""
    name: String!
    """The geographic position of the point of interest"""
    position: GeoJSONPoint!
    """The devices located within the point of interest."""
    devices: [Device!]!
    """The geofences located within the point of interest"""
    geofences: [Geofence!]!
    """The metadata associated with the point of interest."""
    metadata: JSON
}

"""
Fields to create a new [PointOfInterest]({{Types.PointOfInterest}})
"""
input CreatePointOfInterestInput {
    """
    The ID of the [Site]({{Types.Site}}) that the PointOfInterest belongs to
    """
    siteId: ID!
    """The name of the PointOfInterest."""
    name: String!
    """The geographic position of the PointOfInterest"""
    position: GeoJSONPointInput!
    """The metadata associated with the PointOfInterest."""
    metadata: JSON
}

"""
Fields to update an existing [PointOfInterest]({{Types.PointOfInterest}})
"""
input UpdatePointOfInterestInput {
    """The ID of the PointOfInterest that will be updated"""
    id: ID!
    """
    The ID of the [Site]({{Types.Site}}) that the PointOfInterest belongs to
    """
    siteId: ID
    """The name of the PointOfInterest."""
    name: String
    """The geographic position of the PointOfInterest"""
    position: GeoJSONPointInput
    """The metadata associated with the PointOfInterest."""
    metadata: JSON
}

###
extend type Mutation {
    """Creates a new PointOfInterest."""
    createPointOfInterest(
        """Arguments to create a new point of interest."""
        pointOfInterest: CreatePointOfInterestInput!
    ): PointOfInterest
    """
    Updates an existing PointOfInterest.
    """
    updatePointOfInterest(
        """Arguments to update an existing point of interest."""
        pointOfInterest: UpdatePointOfInterestInput!
    ): PointOfInterest
}

###
"""
`FilterPointOfInterestInput` allows for filtering points of interest based on criteria described below.
Only one field should be provided per Filter object unless an operator
(`and` `or` `not`) as specified below.
"""
input FilterPointOfInterestInput {
    """
    If provided, specifies filters that work against the [unique id]({{Types.PointOfInterest}}) of a point of interest.
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the [unique id]({{Types.PointOfInterest}}) of the site the point of interest is associated with.
    """
    siteId: FilterIDInput
    """
    If provided, specifies filters that work against the [name]({{Types.PointOfInterest}}) of a point of interest.
    """
    name: FilterStringInput
    """
    If provided, a point of interest must pass all filters in this list to match the current filter.
    """
    and: [FilterPointOfInterestInput!]
    """
    If provided, a point of interest must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterPointOfInterestInput!]
    """
    If provided, a point of interest may not match this filter to match the current filter.
    """
    not: FilterPointOfInterestInput
}

###
"""
An `SummaryConnection` is the paginated results of an [`summaries` query]({{Queries.summaryChronicles}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type SummaryChronicleConnection {
    """Pagination information for the resulting edges."""
    edges: [SummaryChronicleEdge!]!
    """The resulting collection of summary edges."""
    pageInfo: PageInfo!
}

"""
An summary edge is the pairing of an [Summary]({{Types.Summary}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type SummaryChronicleEdge {
    """Information about a particular [Summary]({{Types.Summary}})."""
    node: SummaryChronicle!
    """
    The cursor to use with the [Query `summaries` field]({{Queries.summaryChronicles}}) `after` argument.
    """
    cursor: String!
}

###
"""
A summary chronicle summarizes across a specific timeframe.  It can reference event and activity chronicles.
"""
type SummaryChronicle {
    """The unique identifier for the summary."""
    id: ID!
    """The name of the summary"""
    name: String!
    """The chronicle producer that created the summary."""
    chronicleProducer: ChronicleProducer!
    """A text description of the summary."""
    description: String
    """The start time of the summary."""
    startTime: DateTimeOffset!
    """The end time of the summary."""
    endTime: DateTimeOffset!
    """The timezone for the summary, if provided."""
    timezone: String
    """Additional metadata associated with the summary. This may represent any JSON object structure."""
    metadata: JSON
    """Optional information to validate the accuracy of the summary."""
    validation: ChronicleValidation
    """User-defined priority of the summary."""
    priority: String
    """User-defined status of the summary."""
    status: String
    """Human-readable labels describing the summary."""
    labels: [String!]
    """Human-readable locations describing the summary."""
    locations: [String!]
    """Activity chronicles associated with the summary."""
    activityChronicles: [ActivityChronicle!]!
    """Event chronicles associated with the summary."""
    eventChronicles: [EventChronicle!]!
    """Timestamp that the summary was created."""
    createdAt: DateTimeOffset!
    """Timestamp that the summary was most recently updated."""
    updatedAt: DateTimeOffset!
}

"""
This input type is used to create a new [`SummaryChronicle`]({{Types.SummaryChronicle}}).
"""
input CreateSummaryChronicleInput {
    """The name of the summary"""
    name: String!
    """The summary producer that owns the summary."""
    chronicleProducerId: ID!
    """A text description of the summary."""
    description: String
    """The start time of the summary."""
    startTime: DateTimeOffset!
    """The end time of the summary."""
    endTime: DateTimeOffset!
    """The timezone for the summary, if provided."""
    timezone: String
    """Additional metadata associated with the summary. This may represent any JSON object structure."""
    metadata: JSON
    """User-defined priority of the summary."""
    priority: String
    """User-defined status of the summary."""
    status: String
    """Human-readable labels describing the summary."""
    labels: [String!]
    """Human-readable locations describing the summary."""
    locations: [String!]
    """Optional information to validate the accuracy of the summary."""
    validation: ChronicleValidationInput
    """IDs of activity chronicles associated with the summary."""
    activityChronicleIds: [ID!]
    """IDs of event chronicles associated with the summary."""
    eventChronicleIds: [ID!]
}

"""
This input type is used to update an existing [`SummaryChronicle`]({{Types.SummaryChronicle}}).
"""
input UpdateSummaryChronicleInput {
    """The unique identifier for the summary."""
    id: ID!
    """The name of the summary"""
    name: String
    """A text description of the summary."""
    description: String
    """The start time of the summary."""
    startTime: DateTimeOffset
    """The end time of the summary."""
    endTime: DateTimeOffset
    """The timezone for the summary, if provided."""
    timezone: String
    """Additional metadata associated with the summary. This may represent any JSON object structure."""
    metadata: JSON
    """User-defined priority of the summary."""
    priority: String
    """User-defined status of the summary."""
    status: String
    """Human-readable labels describing the summary."""
    labels: [String!]
    """Human-readable locations describing the summary."""
    locations: [String!]
    """Optional information to validate the accuracy of the summary."""
    validation: ChronicleValidationInput
    """IDs of activity chronicles associated with the summary."""
    activityChronicleIds: [ID!]
    """IDs of event chronicles associated with the summary."""
    eventChronicleIds: [ID!]
}

###
"""
FilterSummaryChronicleInput filters [SummaryChronicles]({{Types.SummaryChronicle}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterSummaryChronicleInputSubscription {
    """
    If provided, specifies filters that work against the `id` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `chronicleProducerId` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    chronicleProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the `startTime` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    startTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `endTime` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    endTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `timezone` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    timezone: FilterStringInput
    """
    If provided, specifies filters that work against the `priority` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the `status` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    status: FilterStringInput
    """
    If provided, specifies filters that work against the `validation` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    validation: FilterStringInput
    """
    If provided, specifies filters that work against the `labels` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    labels: FilterStringListInput
    """
    If provided, specifies filters that work against the `locations` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    locations: FilterStringListInput
    """
    If provided, an summary must pass all filters in this list to match the current filter.
    """
    and: [FilterSummaryChronicleInputSubscription!]
    """
    If provided, an summary must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterSummaryChronicleInputSubscription!]
    """
    If provided, an summary may not match this filter to match the current filter.
    """
    not: FilterSummaryChronicleInputSubscription
}

extend type Subscription {
    """
    Subscribes to changes in any [`Event`]({{Types.Event}}) based on the given filter.
    """
    summaryChronicles(
        """
        Filter events by unique identifier of the event producer or type of event, etc.
        """
        filter: FilterSummaryChronicleInputSubscription
    ): SummaryChronicle!
}

###
"""
Indicates the field used for sorting an [`summaryChronicles` query]({{Queries.summaryChronicles}}).
"""
enum SummaryChronicleSortField {
    """
    Sort the resulting list by the [`summaryChronicle`]({{Types.SummaryChronicle}})'s unique identifier.
    """ID
    """
    Sort the resulting list by the [`summaryChronicle`]({{Types.SummaryChronicle}})'s start time.
    """
    START_TIME
    """
    Sort the resulting list by the [`summaryChronicle`]({{Types.SummaryChronicle}})'s end time.
    """
    END_TIME
    """
    Sort the resulting list by the [`summaryChronicle`]({{Types.SummaryChronicle}})'s name.
    """NAME
    """
    Sort the resulting list by the [`summaryChronicle`]({{Types.SummaryChronicle}})'s priority.
    """
    PRIORITY
    """
    Sort the resulting list by the [`summaryChronicle`]({{Types.SummaryChronicle}})'s status.
    """
    STATUS
}

"""
Indicates the field used for sorting a [`summaryChronicles` query]({{Queries.summaryChronicles}}).
"""
input SummaryChronicleSort {
    """
    Any sortable field available to the SummaryChroniclesSortField. See the link to the
    type below for more details.
    """
    field: SummaryChronicleSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up an summary by its unique identifier."""
    summaryChronicle(
        """The summary's unique identifier."""
        id: ID!
    ): SummaryChronicle
    """Search for summaries based on a set of filters."""
    summaryChronicles(
        """Filter summaries by unique identifier, type, time, etc."""
        filter: FilterSummaryChronicleInput,
        """Returns the first _n_ elements from the list."""
        first: Int! = 20,
        """Returns the elements in the list that come after the specified cursor."""
        after: String,
        """The field and direction by which to sort the results"""
        sort: [SummaryChronicleSort!]! = [{field: START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): SummaryChronicleConnection
}

###
extend type Mutation {
    """
    Creates a new [Summary Chronicle]({{Types.SummaryChronicle}}). This allows for the creation of custom summaries within the Worlds system.
    """
    createSummaryChronicle(
        """Arguments to create a new summary chronicle."""
        summaryChronicle: CreateSummaryChronicleInput!
    ): SummaryChronicle!
    """Updates an existing [Summary Chronicle]({{Types.SummaryChronicle}})."""
    updateSummaryChronicle(
        """Arguments to update an existing summary chronicle."""
        summaryChronicle: UpdateSummaryChronicleInput!
    ): SummaryChronicle!
}

###
"""
FilterSummaryChronicleInput filters [SummaryChronicles]({{Types.SummaryChronicle}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterSummaryChronicleInput {
    """
    If provided, specifies filters that work against the `id` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `chronicleProducerId` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    chronicleProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the `startTime` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    startTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `endTime` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    endTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `timezone` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    timezone: FilterStringInput
    """
    If provided, specifies filters that work against the `priority` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the `status` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    status: FilterStringInput
    """
    If provided, specifies filters that work against the `validation` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    validation: FilterChronicleValidationStatusInput
    """
    If provided, specifies filters that work against the `labels` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    labels: FilterStringListInput
    """
    If provided, specifies filters that work against the `locations` of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    locations: FilterStringListInput
    """
    If provided, specifies filters that work against the `activityChronicles` IDs of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    activityChronicleIds: FilterIDListInput
    """
    If provided, specifies filters that work against the `eventChronicles` IDs of the [`SummaryChronicle`]({{Types.SummaryChronicle}}).
    """
    eventChronicleIds: FilterIDListInput
    """
    If provided, an summary must pass all filters in this list to match the current filter.
    """
    and: [FilterSummaryChronicleInput!]
    """
    If provided, an summary must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterSummaryChronicleInput!]
    """
    If provided, an summary may not match this filter to match the current filter.
    """
    not: FilterSummaryChronicleInput
}

###
"""
An `EventConnection` is the paginated results of an [`events` query]({{Queries.eventChronicles}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type EventChronicleConnection {
    """Pagination information for the resulting edges."""
    edges: [EventChronicleEdge!]!
    """The resulting collection of event edges."""
    pageInfo: PageInfo!
}

"""
An event edge is the pairing of an [Event]({{Types.Event}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type EventChronicleEdge {
    """Information about a particular [Event]({{Types.Event}})."""
    node: EventChronicle!
    """
    The cursor to use with the [Query `events` field]({{Queries.eventChronicles}}) `after` argument.
    """
    cursor: String!
}

###
"""
FilterEventChronicleInput filters [EventChronicles]({{Types.EventChronicle}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterEventChronicleInputSubscription {
    """
    If provided, specifies filters that work against the `id` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `chronicleProducer` ID of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    chronicleProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the `timestamp` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    timestamp: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `timezone` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    timezone: FilterStringInput
    """
    If provided, specifies filters that work against the `priority` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the `status` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    status: FilterStringInput
    """
    If provided, specifies filters that work against the `validation` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    validation: FilterStringInput
    """
    If provided, specifies filters that work against the `labels` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    labels: FilterStringListInput
    """
    If provided, specifies filters that work against the `locations` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    locations: FilterStringListInput
    """
    If provided, specifies filters that work against the `activityChronicle` IDs of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    and: [FilterEventChronicleInputSubscription!]
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    or: [FilterEventChronicleInputSubscription!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    not: FilterEventChronicleInputSubscription
}

extend type Subscription {
    """
    Subscribes to changes in any [`Event`]({{Types.Event}}) based on the given filter.
    """
    eventChronicles(
        """
        Filter events by unique identifier of the event producer or type of event, etc.
        """
        filter: FilterEventChronicleInputSubscription
    ): EventChronicle!
}

###
"""
Indicates the field used for sorting an [`eventChronicles` query]({{Queries.eventChronicles}}).
"""
enum EventChronicleSortField {
    """
    Sort the resulting list by the [`eventChronicle`]({{Types.EventChronicle}})'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`eventChronicle`]({{Types.EventChronicle}})'s timestamp.
    """
    TIMESTAMP
    """
    Sort the resulting list by the [`eventChronicle`]({{Types.EventChronicle}})'s name.
    """
    NAME
    """
    Sort the resulting list by the [`eventChronicle`]({{Types.EventChronicle}})'s priority.
    """
    PRIORITY
    """
    Sort the resulting list by the [`eventChronicle`]({{Types.EventChronicle}})'s status.
    """
    STATUS
}

"""
Indicates the field used for sorting an [`eventChronicles` query]({{Queries.eventChronicles}}).
"""
input EventChronicleSort {
    """
    Any sortable field available to the EventChroniclesSortField. See the link to the
    type below for more details.
    """
    field: EventChronicleSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up an event by its unique identifier."""
    eventChronicle(
        """The event's unique identifier."""
        id: ID!
    ): EventChronicle
    """Search for events based on a set of filters."""
    eventChronicles(
        """Filter events by unique identifier, type, time, etc."""
        filter: FilterEventChronicleInput,
        """Returns the first _n_ elements from the list."""
        first: Int! = 20,
        """Returns the elements in the list that come after the specified cursor."""
        after: String,
        """The field and direction by which to sort the results"""
        sort: [EventChronicleSort!]! = [{field: TIMESTAMP, direction: ASC}, {field: ID, direction: ASC}]
    ): EventChronicleConnection
}

###
extend type Mutation {
    """
    Creates a new [Event Chronicle]({{Types.EventChronicle}}). This allows for the creation of custom events within the Worlds system.
    """
    createEventChronicle(
        """Arguments to create a new event chronicle."""
        eventChronicle: CreateEventChronicleInput!
    ): EventChronicle!
    """Updates an existing [Event Chronicle]({{Types.EventChronicle}})."""
    updateEventChronicle(
        """Arguments to update an existing event chronicle."""
        eventChronicle: UpdateEventChronicleInput!
    ): EventChronicle!
}

###
"""
FilterEventChronicleInput filters [EventChronicles]({{Types.EventChronicle}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterEventChronicleInput {
    """
    If provided, specifies filters that work against the `id` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `chronicleProducer` ID of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    chronicleProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the `timestamp` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    timestamp: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `timezone` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    timezone: FilterStringInput
    """
    If provided, specifies filters that work against the `priority` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the `status` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    status: FilterStringInput
    """
    If provided, specifies filters that work against the `validation` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    validation: FilterChronicleValidationStatusInput
    """
    If provided, specifies filters that work against the `labels` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    labels: FilterStringListInput
    """
    If provided, specifies filters that work against the `locations` of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    locations: FilterStringListInput
    """
    If provided, specifies filters that work against the `activityChronicles` IDs of the [`EventChronicle`]({{Types.EventChronicle}}).
    """
    activityChronicleIds: FilterIDListInput
    """
    If provided, an event must pass all filters in this list to match the current filter.
    """
    and: [FilterEventChronicleInput!]
    """
    If provided, an event must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterEventChronicleInput!]
    """
    If provided, an event may not match this filter to match the current filter.
    """
    not: FilterEventChronicleInput
}

###
"""
An event chronicle represents an occurrence at a single point at time.
"""
type EventChronicle {
    """The unique identifier for the event."""
    id: ID!
    """The chronicle producer that created the event."""
    chronicleProducer: ChronicleProducer!
    """The name of the event"""
    name: String!
    """A text description of the event."""
    description: String
    """The time at which the event occurred."""
    timestamp: DateTimeOffset!
    """The timezone for the event, if provided."""
    timezone: String
    """Additional metadata associated with the event. This may represent any JSON object structure."""
    metadata: JSON
    """Optional information to validate the accuracy of the event."""
    validation: ChronicleValidation
    """User-defined priority of the event."""
    priority: String
    """User-defined status of the event."""
    status: String
    """Human-readable labels describing the event."""
    labels: [String!]
    """Human-readable locations describing the event."""
    locations: [String!]
    """Activity chronicles associated with the event."""
    activityChronicles: [ActivityChronicle!]!
    """Timestamp that the event was created."""
    createdAt: DateTimeOffset!
    """Timestamp that the event was most recently updated."""
    updatedAt: DateTimeOffset!
}

"""
This input type is used to create a new [`EventChronicle`]({{Types.EventChronicle}}).
"""
input CreateEventChronicleInput {
    """The name of the event"""
    name: String!
    """The event producer that owns the event."""
    chronicleProducerId: ID!
    """A text description of the event."""
    description: String
    """The time at which the event occurred."""
    timestamp: DateTimeOffset!
    """The timezone for the event, if provided."""
    timezone: String
    """Additional metadata associated with the event. This may represent any JSON object structure."""
    metadata: JSON
    """User-defined priority of the event."""
    priority: String
    """User-defined status of the event."""
    status: String
    """Human-readable labels describing the event."""
    labels: [String!]
    """Human-readable locations describing the event."""
    locations: [String!]
    """Optional information to validate the accuracy of the event."""
    validation: ChronicleValidationInput
    """IDs of activity chronicles associated with the event."""
    activityChronicleIds: [ID!]
}

"""
This input type is used to update an existing [`EventChronicle`]({{Types.EventChronicle}}).
"""
input UpdateEventChronicleInput {
    """The unique identifier for the event."""
    id: ID!
    """The name of the event"""
    name: String
    """A text description of the event."""
    description: String
    """The time at which the event occurred."""
    timestamp: DateTimeOffset
    """The timezone for the event, if provided."""
    timezone: String
    """Additional metadata associated with the event. This may represent any JSON object structure."""
    metadata: JSON
    """User-defined priority of the event."""
    priority: String
    """User-defined status of the event."""
    status: String
    """Human-readable labels describing the event."""
    labels: [String!]
    """Human-readable locations describing the event."""
    locations: [String!]
    """Optional information to validate the accuracy of the event."""
    validation: ChronicleValidationInput
    """IDs of activity chronicles associated with the event."""
    activityChronicleIds: [ID!]
}

###
"""
An `ActivityConnection` is the paginated results of an [`activities` query]({{Queries.activityChronicles}}).
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type ActivityChronicleConnection {
    """Pagination information for the resulting edges."""
    edges: [ActivityChronicleEdge!]!
    """The resulting collection of activity edges."""
    pageInfo: PageInfo!
}

"""
An activity edge is the pairing of an [Activity]({{Types.Activity}}) with its query cursor.
See [about queries](/guides/types/#queries) for details on how "connection" and "edge" types are used with pagination.
"""
type ActivityChronicleEdge {
    """Information about a particular [Activity]({{Types.Activity}})."""
    node: ActivityChronicle!
    """
    The cursor to use with the [Query `activities` field]({{Queries.activityChronicles}}) `after` argument.
    """
    cursor: String!
}

###
"""
FilterActivityChronicleInput filters [ActivityChronicles]({{Types.ActivityChronicle}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterActivityChronicleInputSubscription {
    """
    If provided, specifies filters that work against the `id` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `startTime` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    startTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `endTime` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    endTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `timezone` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    timezone: FilterStringInput
    """
    If provided, specifies filters that work against the `priority` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the `status` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    status: FilterStringInput
    """
    If provided, specifies filters that work against the `validation` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    validation: FilterStringInput
    """
    If provided, specifies filters that work against the `labels` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    labels: FilterStringListInput
    """
    If provided, specifies filters that work against the `locations` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    locations: FilterStringListInput
    """
    If provided, specifies filters that work against the `chronicleProducer` ID of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    chronicleProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the `tag` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    tagIds: FilterIDListInput
    """
    If provided, specifies filters that work against the `site` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    siteIds: FilterIDListInput
    """
    If provided, specifies filters that work against the `dataSource` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    dataSourceIds: FilterIDListInput
    """
    If provided, specifies filters that work against the `pointOfInterest` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    pointOfInterestIds: FilterIDListInput
    """
    If provided, an activity must pass all filters in this list to match the current filter.
    """
    and: [FilterActivityChronicleInputSubscription!]
    """
    If provided, an activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterActivityChronicleInputSubscription!]
    """
    If provided, an activity may not match this filter to match the current filter.
    """
    not: FilterActivityChronicleInputSubscription
}

extend type Subscription {
    """
    Subscribes to changes in any [`Event`]({{Types.Event}}) based on the given filter.
    """
    activityChronicles(
        """
        Filter events by unique identifier of the event producer or type of event, etc.
        """filter: FilterActivityChronicleInputSubscription
    ): ActivityChronicle!
}

###
"""
Indicates the field used for sorting an [`activityChronicles` query]({{Queries.activityChronicles}}).
"""
enum ActivityChronicleSortField {
    """
    Sort the resulting list by the [`activityChronicle`]({{Types.ActivityChronicle}})'s unique identifier.
    """
    ID
    """
    Sort the resulting list by the [`activityChronicle`]({{Types.ActivityChronicle}})'s start time.
    """
    START_TIME
    """
    Sort the resulting list by the [`activityChronicle`]({{Types.ActivityChronicle}})'s end time.
    """
    END_TIME
    """
    Sort the resulting list by the [`activityChronicle`]({{Types.ActivityChronicle}})'s name.
    """
    NAME
    """
    Sort the resulting list by the [`activityChronicle`]({{Types.ActivityChronicle}})'s priority.
    """
    PRIORITY
    """
    Sort the resulting list by the [`activityChronicle`]({{Types.ActivityChronicle}})'s status.
    """
    STATUS
}

"""
Indicates the field used for sorting an [`activityChronicles` query]({{Queries.activityChronicles}}).
"""
input ActivityChronicleSort {
    """
    Any sortable field available to the ActivityChroniclesSortField. See the link to the
    type below for more details.
    """
    field: ActivityChronicleSortField!
    """Sort direction. See the link to the type below for more details."""
    direction: SortDirection!
}

extend type Query {
    """Look up an activity by its unique identifier."""
    activityChronicle(
        """The activity's unique identifier."""
        id: ID!
    ): ActivityChronicle
    """Search for activities based on a set of filters."""
    activityChronicles(
        """Filter activities by unique identifier, type, time, etc."""
        filter: FilterActivityChronicleInput,
        """Returns the first _n_ elements from the list."""
        first: Int! = 20,
        """Returns the elements in the list that come after the specified cursor."""
        after: String,
        """The field and direction by which to sort the results"""
        sort: [ActivityChronicleSort!]! = [{field: START_TIME, direction: ASC}, {field: ID, direction: ASC}]
    ): ActivityChronicleConnection
}

###
extend type Mutation {
    """
    Creates a new [Event Chronicle]({{Types.EventChronicle}}). This allows for the creation of custom events within the Worlds system.
    """
    createActivityChronicle(
        """Arguments to create a new event chronicle."""
        activityChronicle: CreateActivityChronicleInput!
    ): ActivityChronicle!
    """Updates an existing [Event Chronicle]({{Types.EventChronicle}})."""
    updateActivityChronicle(
        """Arguments to update an existing event chronicle."""
        activityChronicle: UpdateActivityChronicleInput!
    ): ActivityChronicle!
}

###
"""
FilterActivityChronicleInput filters [ActivityChronicles]({{Types.ActivityChronicle}}) based on criteria described below.
Only one field should be provided per Filter object unless using an operator (`and` `or` `not`) as specified below.
"""
input FilterActivityChronicleInput {
    """
    If provided, specifies filters that work against the `id` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    id: FilterIDInput
    """
    If provided, specifies filters that work against the `name` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    name: FilterStringInput
    """
    If provided, specifies filters that work against the `description` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    description: FilterStringInput
    """
    If provided, specifies filters that work against the `startTime` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    startTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `endTime` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    endTime: FilterDateTimeOffsetInput
    """
    If provided, specifies filters that work against the `timezone` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    timezone: FilterStringInput
    """
    If provided, specifies filters that work against the `priority` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    priority: FilterStringInput
    """
    If provided, specifies filters that work against the `status` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    status: FilterStringInput
    """
    If provided, specifies filters that work against the `validation` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    validation: FilterChronicleValidationStatusInput
    """
    If provided, specifies filters that work against the position of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    position: FilterPointInput
    """
    If provided, specifies filters that work against the `labels` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    labels: FilterStringListInput
    """
    If provided, specifies filters that work against the `locations` of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    locations: FilterStringListInput
    """
    If provided, specifies filters that work against the `chronicleProducer` ID of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    chronicleProducerId: FilterIDInput
    """
    If provided, specifies filters that work against the `tags` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    tagIds: FilterIDListInput
    """
    If provided, specifies filters that work against the `sites` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    siteIds: FilterIDListInput
    """
    If provided, specifies filters that work against the `dataSources` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    dataSourceIds: FilterIDListInput
    """
    If provided, specifies filters that work against the `pointsOfInterest` IDs of the [`ActivityChronicle`]({{Types.ActivityChronicle}}).
    """
    pointOfInterestIds: FilterIDListInput
    """
    If provided, an activity must pass all filters in this list to match the current filter.
    """
    and: [FilterActivityChronicleInput!]
    """
    If provided, an activity must pass at least one of the filters in this list to match the current filter.
    """
    or: [FilterActivityChronicleInput!]
    """
    If provided, an activity may not match this filter to match the current filter.
    """
    not: FilterActivityChronicleInput
}

###
"""
An activity chronicle represents behavior which occurs over a period of time.
"""
type ActivityChronicle {
    """The unique identifier for the activity."""
    id: ID!
    """The chronicle producer that created the activity."""
    chronicleProducer: ChronicleProducer!
    """The name of the activity"""
    name: String!
    """A text description of the activity."""
    description: String
    """The time at which the activity started."""
    startTime: DateTimeOffset!
    """The time at which the activity ended."""
    endTime: DateTimeOffset
    """The timezone for the activity, if provided."""
    timezone: String
    """Additional metadata associated with the activity. This may represent any JSON object structure."""
    metadata: JSON
    """Optional information to validate the accuracy of the activity."""
    validation: ChronicleValidation
    """User-defined priority of the activity."""
    priority: String
    """User-defined status of the activity."""
    status: String
    """A GeoJSON point that represents the location of the activity in the world."""
    position: GeoJSONPoint
    """Human-readable labels describing the activity."""
    labels: [String!]
    """Human-readable locations describing the activity."""
    locations: [String!]
    """Images associated with the activity."""
    images: [Image!]!
    """Clips associated with the activity."""
    dataSourceClips: [DataSourceClip!]!
    """Tracks associated with the activity."""
    tracks: [Track!] @experimental(reason: "trackIds cannot yet be directly associated to activityChronicles.  Use metadata if specific track information is required.")
    """Sites associated with the activity."""
    sites: [Site!]
    """Data Sources associated with the activity."""
    dataSources: [DataSource!]
    """Tags associated with the activity."""
    tags: [Tag!]
    """Points of Interest associated with the activity."""
    pointsOfInterest: [PointOfInterest!]
    """Timestamp that the activity was created."""
    createdAt: DateTimeOffset!
    """Timestamp that the activity was most recently updated."""
    updatedAt: DateTimeOffset!
}

"""
This input type is used to create a new [`ActivityChronicle`]({{Types.ActivityChronicle}}).
"""
input CreateActivityChronicleInput {
    """The chronicle producer that owns the activity."""
    name: String!
    """The name of the activity"""
    chronicleProducerId: ID!
    """A text description of the activity."""
    description: String
    """The time at which the activity started."""
    startTime: DateTimeOffset!
    """The time at which the activity ended."""
    endTime: DateTimeOffset
    """The timezone for the activity, if provided."""
    timezone: String
    """Additional metadata associated with the activity. This may represent any JSON object structure."""
    metadata: JSON
    """User-defined priority of the activity."""
    priority: String
    """User-defined status of the activity."""
    status: String
    """A GeoJSON point that represents the location of the activity in the world."""
    position: GeoJSONPointInput
    """Human-readable labels describing the activity."""
    labels: [String!]
    """Human-readable locations describing the activity."""
    locations: [String!]
    """Optional information to validate the accuracy of the activity."""
    validation: ChronicleValidationInput
    """IDs for images to associate with the activity."""
    imageIds: [ID!]
    """Requests to create clips associated with the activity."""
    clips: [CreateClipInput!]
    """IDs for tracks to associate with the activity."""
    trackIds: [ID!] @experimental(reason: "trackIds cannot yet be directly associated to activityChronicles.  Use metadata if specific track information is required.")
    """IDs for sites to associate with the activity."""
    siteIds: [ID!]
    """IDs for data sources to associate with the activity."""
    dataSourceIds: [ID!]
    """IDs for tags to associate with the activity."""
    tagIds: [ID!]
    """IDs for points of interest to associate with the activity."""
    pointOfInterestIds: [ID!]
}

"""
This input type is used to update an existing [`ActivityChronicle`]({{Types.ActivityChronicle}}).
"""
input UpdateActivityChronicleInput {
    """The unique identifier of activity."""
    id: ID!
    """The name of the activity"""
    name: String
    """A text description of the activity."""
    description: String
    """The time at which the activity started."""
    startTime: DateTimeOffset
    """The time at which the activity ended."""
    endTime: DateTimeOffset
    """The timezone for the activity, if provided."""
    timezone: String
    """Additional metadata associated with the activity. This may represent any JSON object structure."""
    metadata: JSON
    """User-defined priority of the activity."""
    priority: String
    """User-defined status of the activity."""
    status: String
    """A GeoJSON point that represents the location of the activity in the world."""
    position: GeoJSONPointInput
    """Human-readable labels describing the activity."""
    labels: [String!]
    """Human-readable locations describing the activity."""
    locations: [String!]
    """Optional information to validate the accuracy of the activity."""
    validation: ChronicleValidationInput
    """IDs for images to associate with the activity."""
    imageIds: [ID!]
    """Requests to create clips associated with the activity."""
    clips: [CreateClipInput!]
    """IDs for tracks to associate with the activity."""
    trackIds: [ID!] @experimental(reason: "trackIds cannot yet be directly associated to activityChronicles.  Use metadata if specific track information is required.")
    """IDs for sites to associate with the activity."""
    siteIds: [ID!]
    """IDs for data sources to associate with the activity."""
    dataSourceIds: [ID!]
    """IDs for tags to associate with the activity."""
    tagIds: [ID!]
    """IDs for points of interest to associate with the activity."""
    pointOfInterestIds: [ID!]
}