import { type WorkflowDocumentStepOutputType, workflowDocumentStepOutputTypes } from '@shipfox/workflow-document'; import type { ExpressionType } from '../expression/workflow-expression.js'; export type OutputType = WorkflowDocumentStepOutputType; export interface OutputTypeDeclaration { readonly type: OutputType; readonly schema?: unknown; } export type OutputDeclarations = Readonly>; export type JsonSchemaValidationResult = { readonly ok: true; } | { readonly ok: false; readonly reason: string; }; export type StepOutputCoercionErrorReason = 'missing' | 'undeclared' | 'invalid_type' | 'invalid_json' | 'schema_invalid'; export interface StepOutputCoercionError { readonly key: string; readonly reason: StepOutputCoercionErrorReason; readonly expectedType?: OutputType; readonly message: string; readonly schemaError?: string; } export type CoerceStepOutputsResult = { readonly ok: true; readonly output: Record; } | { readonly ok: false; readonly error: StepOutputCoercionError; }; export { workflowDocumentStepOutputTypes as outputTypes }; export declare function outputDeclarationToExpressionType(declaration: OutputTypeDeclaration): ExpressionType; export declare function outputDeclarationsToExpressionFields(declarations: OutputDeclarations): Readonly>; export declare function jsonSchemaToExpressionType(schema: unknown): ExpressionType; export declare function validateJsonSchema(schema: unknown): JsonSchemaValidationResult; export declare function coerceStepOutputs(params: { readonly declarations: OutputDeclarations; readonly output: Record | null | undefined; }): CoerceStepOutputsResult; //# sourceMappingURL=output-declarations.d.ts.map