// This file was auto-generated by Fern from our API Definition.

import type * as Vapi from "../index.js";

export interface JsonQueryOnEventsTable {
    /** This is the type of query. Only allowed type is "vapiql-json". */
    type: Vapi.JsonQueryOnEventsTableType;
    /**
     * This is the table that will be queried.
     * Must be "events" for event-based insights.
     */
    table: Vapi.JsonQueryOnEventsTableTable;
    /** The event type to query */
    on: Vapi.JsonQueryOnEventsTableOn;
    /**
     * This is the operation to perform on matching events.
     * - "count": Returns the raw count of matching events
     * - "percentage": Returns (count of matching events / total calls) * 100
     */
    operation: Vapi.JsonQueryOnEventsTableOperation;
    /**
     * These are the filters to apply to the events query.
     * Each filter filters on a field specific to the event type.
     */
    filters?: Vapi.JsonQueryOnEventsTableFiltersItem[] | undefined;
    /**
     * This is the name of the query.
     * It will be used to label the query in the insight board on the UI.
     */
    name?: string | undefined;
}
