export type MaybePromise = T | Promise; export type Primitive = string | number | boolean | null | undefined; export interface ComponentOpts { secretProps?: string[]; // Property paths to mask in checkpoints secretOutputs?: boolean; // Whether to mask the output of the component name?: string; // Allows you to override the name of the component metadata?: Record; // Metadata to attach to the component aggregator?: (chunks: unknown[]) => unknown; // Aggregator function to use for streaming results, default is to accumulate all chunks into an array, and concatenate strings. __streamingResultKey?: string; // Key to use for the looking up streaming iterator, default is to use the component name. onComplete?: () => void; // Callback to call when the component completes idPropsKeys?: string[]; // Paths to values in the props to include in the id. Default is all props. } // omit name from ComponentOpts export type DefaultOpts = Omit; export interface DecoratorComponentOpts extends DefaultOpts { name?: string; } export interface DecoratorWorkflowOpts extends WorkflowOpts { name?: string; } export interface WorkflowOpts extends ComponentOpts { metadata?: Record; }