import { APIResource } from "../resource.js"; import * as Core from "../core.js"; import * as LogsAPI from "./logs.js"; export declare class Logs extends APIResource { /** * Create new logs from the provided schema. */ create(params: LogCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Query for logs. */ filter(params?: LogFilterParams, options?: Core.RequestOptions): Core.APIPromise; filter(options?: Core.RequestOptions): Core.APIPromise; } /** * An ORM representation of log data. */ export interface Log { /** * The log level. */ level: number; /** * The log message. */ message: string; /** * The logger name. */ name: string; /** * The log timestamp. */ timestamp: string; id?: string; created?: string | null; /** * The flow run ID associated with the log. */ flow_run_id?: string | null; /** * The task run ID associated with the log. */ task_run_id?: string | null; updated?: string | null; } export type LogCreateResponse = unknown; export type LogFilterResponse = Array; export interface LogCreateParams { /** * Body param: */ body: Array; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace LogCreateParams { /** * Data used by the Prefect REST API to create a log. */ interface Body { /** * The log level. */ level: number; /** * The log message. */ message: string; /** * The logger name. */ name: string; /** * The log timestamp. */ timestamp: string; flow_run_id?: string | null; task_run_id?: string | null; } } export interface LogFilterParams { /** * Body param: Defaults to PREFECT_API_DEFAULT_LIMIT if not provided. */ limit?: number; /** * Body param: Filter logs. Only logs matching all criteria will be returned */ logs?: LogFilterParams.Logs; /** * Body param: */ offset?: number; /** * Body param: Defines log sorting options. */ sort?: 'TIMESTAMP_ASC' | 'TIMESTAMP_DESC'; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace LogFilterParams { /** * Filter logs. Only logs matching all criteria will be returned */ interface Logs { /** * Filter by `Log.flow_run_id`. */ flow_run_id?: Logs.FlowRunID | null; /** * Filter by `Log.level`. */ level?: Logs.Level | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Log.task_run_id`. */ task_run_id?: Logs.TaskRunID | null; /** * Filter by `Log.timestamp`. */ timestamp?: Logs.Timestamp | null; } namespace Logs { /** * Filter by `Log.flow_run_id`. */ interface FlowRunID { /** * A list of flow run IDs to include */ any_?: Array | null; } /** * Filter by `Log.level`. */ interface Level { /** * Include logs with a level greater than or equal to this level */ ge_?: number | null; /** * Include logs with a level less than or equal to this level */ le_?: number | null; } /** * Filter by `Log.task_run_id`. */ interface TaskRunID { /** * A list of task run IDs to include */ any_?: Array | null; /** * If true, only include logs without a task run id */ is_null_?: boolean | null; } /** * Filter by `Log.timestamp`. */ interface Timestamp { /** * Only include logs with a timestamp at or after this time */ after_?: string | null; /** * Only include logs with a timestamp at or before this time */ before_?: string | null; } } } export declare namespace Logs { export import Log = LogsAPI.Log; export import LogCreateResponse = LogsAPI.LogCreateResponse; export import LogFilterResponse = LogsAPI.LogFilterResponse; export import LogCreateParams = LogsAPI.LogCreateParams; export import LogFilterParams = LogsAPI.LogFilterParams; } //# sourceMappingURL=logs.d.ts.map