import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import * as CountByAPI from "./count-by.js"; import * as EventsAPI from "./events.js"; export declare class CountBy extends APIResource { /** * Returns distinct objects and the count of events associated with them. Objects * that can be counted include the day the event occurred, the type of event, or * the IDs of the resources associated with the event. */ create(countable: 'day' | 'time' | 'event' | 'resource', params: CountByCreateParams, options?: Core.RequestOptions): Core.APIPromise; } export type CountByCreateResponse = Array; export interface CountByCreateParams { /** * Body param: */ filter: CountByCreateParams.Filter; /** * Body param: */ time_interval?: number; /** * Body param: */ time_unit?: 'week' | 'day' | 'hour' | 'minute' | 'second'; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace CountByCreateParams { interface Filter { /** * Filter criteria for the events' ID */ id?: Filter.ID; /** * Filter criteria for any resource involved in the event */ any_resource?: Filter.AnyResource | null; /** * Filter criteria for the event name */ event?: Filter.Event | null; /** * Filter criteria for when the events occurred */ occurred?: Filter.Occurred; /** * The order to return filtered events */ order?: 'ASC' | 'DESC'; /** * Filter criteria for the related resources of the event */ related?: Filter.Related | null; /** * Filter criteria for the resource of the event */ resource?: Filter.Resource | null; } namespace Filter { /** * Filter criteria for the events' ID */ interface ID { /** * Only include events with one of these IDs */ id?: Array | null; } /** * Filter criteria for any resource involved in the event */ interface AnyResource { /** * Only include events for resources with these IDs */ id?: Array | null; /** * Only include events for resources with IDs starting with these prefixes */ id_prefix?: Array | null; /** * Only include events for related resources with these labels */ labels?: Record> | null; } /** * Filter criteria for the event name */ interface Event { /** * Exclude events matching one of these names exactly */ exclude_name?: Array | null; /** * Exclude events matching one of these prefixes */ exclude_prefix?: Array | null; /** * Only include events matching one of these names exactly */ name?: Array | null; /** * Only include events matching one of these prefixes */ prefix?: Array | null; } /** * Filter criteria for when the events occurred */ interface Occurred { /** * Only include events after this time (inclusive) */ since?: string; /** * Only include events prior to this time (inclusive) */ until?: string; } /** * Filter criteria for the related resources of the event */ interface Related { /** * Only include events for related resources with these IDs */ id?: Array | null; /** * Only include events for related resources with these labels */ labels?: Record> | null; /** * Only include events with specific related resources in specific roles */ resources_in_roles?: Array> | null; /** * Only include events for related resources in these roles */ role?: Array | null; } /** * Filter criteria for the resource of the event */ interface Resource { /** * Only include events for resources with these IDs */ id?: Array | null; /** * Only include events for distinct resources */ distinct?: boolean; /** * Only include events for resources with IDs starting with these prefixes. */ id_prefix?: Array | null; /** * Only include events for resources with these labels */ labels?: Record> | null; } } } export declare namespace CountBy { export import CountByCreateResponse = CountByAPI.CountByCreateResponse; export import CountByCreateParams = CountByAPI.CountByCreateParams; } //# sourceMappingURL=count-by.d.ts.map