import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import * as WorkersAPI from "./workers.js"; export declare class Workers extends APIResource { /** * Delete a work pool's worker */ delete(workPoolName: string, name: string, params?: WorkerDeleteParams, options?: Core.RequestOptions): Core.APIPromise; delete(workPoolName: string, name: string, options?: Core.RequestOptions): Core.APIPromise; /** * Read all worker processes */ filter(workPoolName: string, params?: WorkerFilterParams, options?: Core.RequestOptions): Core.APIPromise; filter(workPoolName: string, options?: Core.RequestOptions): Core.APIPromise; /** * Worker Heartbeat */ heartbeat(workPoolName: string, params: WorkerHeartbeatParams, options?: Core.RequestOptions): Core.APIPromise; } export interface WorkerResponse { /** * The name of the worker. */ name: string; /** * The work pool with which the queue is associated. */ work_pool_id: string; id?: string; created?: string | null; /** * The number of seconds to expect between heartbeats sent by the worker. */ heartbeat_interval_seconds?: number | null; /** * The last time the worker process sent a heartbeat. */ last_heartbeat_time?: string; /** * Current status of the worker. */ status?: 'ONLINE' | 'OFFLINE'; updated?: string | null; } export type WorkerFilterResponse = Array; export interface WorkerDeleteParams { 'x-prefect-api-version'?: string; } export interface WorkerFilterParams { /** * Body param: Defaults to PREFECT_API_DEFAULT_LIMIT if not provided. */ limit?: number; /** * Body param: */ offset?: number; /** * Body param: Filter by `Worker.last_heartbeat_time`. */ workers?: WorkerFilterParams.Workers; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace WorkerFilterParams { /** * Filter by `Worker.last_heartbeat_time`. */ interface Workers { /** * Filter by `Worker.last_heartbeat_time`. */ last_heartbeat_time?: Workers.LastHeartbeatTime | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Worker.status`. */ status?: Workers.Status | null; } namespace Workers { /** * Filter by `Worker.last_heartbeat_time`. */ interface LastHeartbeatTime { /** * Only include processes whose last heartbeat was at or after this time */ after_?: string | null; /** * Only include processes whose last heartbeat was at or before this time */ before_?: string | null; } /** * Filter by `Worker.status`. */ interface Status { /** * A list of worker statuses to include */ any_?: Array<'ONLINE' | 'OFFLINE'> | null; /** * A list of worker statuses to exclude */ not_any_?: Array<'ONLINE' | 'OFFLINE'> | null; } } } export interface WorkerHeartbeatParams { /** * Body param: The worker process name */ name: string; /** * Body param: The worker's heartbeat interval in seconds */ heartbeat_interval_seconds?: number | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace Workers { export import WorkerResponse = WorkersAPI.WorkerResponse; export import WorkerFilterResponse = WorkersAPI.WorkerFilterResponse; export import WorkerDeleteParams = WorkersAPI.WorkerDeleteParams; export import WorkerFilterParams = WorkersAPI.WorkerFilterParams; export import WorkerHeartbeatParams = WorkersAPI.WorkerHeartbeatParams; } //# sourceMappingURL=workers.d.ts.map