import type { components } from '../api.types'; import { Document } from '../document.types'; import { type Message } from '../message.types'; import type { MetricValueType } from '../metrics.types'; import type { JsonArray } from '../base.types'; export type StepAllowedInputType = string | Date | string[] | Record | Record[] | Message | Message[]; export type StepAllowedOutputType = string | Date | string[] | Record | Record[] | Message | Document | Document[]; export type LlmSpanAllowedInputType = string | Date | string[] | Record | Record[] | Message | Message[]; export type LlmSpanAllowedOutputType = string | Record | Message; export type RetrieverSpanAllowedOutputType = string | Record | Document | string[] | Record[] | Document[]; export type StepType = components['schemas']['StepType']; export declare const StepType: { readonly session: "session"; readonly trace: "trace"; readonly workflow: "workflow"; readonly llm: "llm"; readonly retriever: "retriever"; readonly tool: "tool"; readonly agent: "agent"; readonly control: "control"; }; export interface MetricsOptions { durationNs?: number; [key: string]: MetricValueType | undefined; } export type SerializedMetrics = MetricsOptions; export declare class Metrics { durationNs?: number; [key: string]: MetricValueType | undefined | (() => Record); constructor(options: MetricsOptions | Metrics); toJSON(): SerializedMetrics; } export interface BaseStepOptions { input?: StepAllowedInputType; redactedInput?: StepAllowedInputType; output?: StepAllowedOutputType; redactedOutput?: StepAllowedOutputType; name?: string; createdAt?: Date; metadata?: Record; tags?: string[]; statusCode?: number; metrics?: Metrics; externalId?: string; stepNumber?: number; datasetInput?: string; datasetOutput?: string; datasetMetadata?: Record; id?: string; } export interface SerializedStep extends Omit { metrics?: SerializedMetrics; type: StepType; createdAt: Date; userMetadata: Record; datasetMetadata?: Record; output?: StepAllowedOutputType | JsonArray; redactedOutput?: StepAllowedOutputType | JsonArray; } export declare class BaseStep { type: StepType; input?: StepAllowedInputType; redactedInput?: StepAllowedInputType; output?: StepAllowedOutputType; redactedOutput?: StepAllowedOutputType; name: string; createdAt: Date; userMetadata: Record; tags?: string[]; statusCode?: number; metrics: Metrics; externalId?: string; stepNumber?: number; datasetInput?: string; datasetOutput?: string; datasetMetadata?: Record; id: string; constructor(type: StepType, data: BaseStepOptions); validateInputOutputSerializable(val: T): T; toJSON(): SerializedStep; } export declare function isDocument(obj: unknown): obj is Document; export declare function isStepAllowedInputType(obj: unknown): obj is StepAllowedInputType; export declare function isStepAllowedOutputType(obj: unknown): obj is StepAllowedOutputType; export declare function isLlmSpanAllowedInputType(obj: unknown): obj is LlmSpanAllowedInputType; export declare function isLlmSpanAllowedOutputType(obj: unknown): obj is LlmSpanAllowedOutputType; export declare function isRetrieverSpanAllowedOutputType(obj: unknown): obj is RetrieverSpanAllowedOutputType;