import { GrowError } from "@garden-io/grow-sdk/errors"; import { s } from "@garden-io/grow-sdk/schema"; import type { BaseTask, TaskResultType } from "../tasks/base"; import type { ValidResultType } from "../tasks/base-action"; declare const taskEventSchema: import("zod").ZodObject<{ type: import("zod").ZodString; description: import("zod").ZodString; key: import("zod").ZodString; name: import("zod").ZodString; inputVersion: import("zod").ZodNullable; }, "strip", import("zod").ZodTypeAny, { name: string; key: string; type: string; description: string; inputVersion: string | null; }, { name: string; key: string; type: string; description: string; inputVersion: string | null; }>; export type TaskEventBase = s.infer; export declare const graphExportSchema: import("zod").ZodObject; }, { result: import("zod").ZodNullable>; startedAt: import("zod").ZodNullable; completedAt: import("zod").ZodNullable; error: import("zod").ZodNullable>; aborted: import("zod").ZodBoolean; processed: import("zod").ZodBoolean; success: import("zod").ZodBoolean; }>, "strip", import("zod").ZodTypeAny, { name: string; key: string; type: string; aborted: boolean; startedAt: Date | null; error: GrowError | null; success: boolean; result: Record | null; description: string; processed: boolean; inputVersion: string | null; completedAt: Date | null; }, { name: string; key: string; type: string; aborted: boolean; startedAt: Date | null; error: GrowError | null; success: boolean; result: Record | null; description: string; processed: boolean; inputVersion: string | null; completedAt: Date | null; }>; export type GraphExport = s.infer; export declare const solveResultExportSchema: import("zod").ZodRecord; }, { result: import("zod").ZodNullable>; startedAt: import("zod").ZodNullable; completedAt: import("zod").ZodNullable; error: import("zod").ZodNullable>; aborted: import("zod").ZodBoolean; processed: import("zod").ZodBoolean; success: import("zod").ZodBoolean; }>, "strip", import("zod").ZodTypeAny, { name: string; key: string; type: string; aborted: boolean; startedAt: Date | null; error: GrowError | null; success: boolean; result: Record | null; description: string; processed: boolean; inputVersion: string | null; completedAt: Date | null; }, { name: string; key: string; type: string; aborted: boolean; startedAt: Date | null; error: GrowError | null; success: boolean; result: Record | null; description: string; processed: boolean; inputVersion: string | null; completedAt: Date | null; }>>>; export type SolveResultExport = s.infer; export type GraphResult = Omit & { result: R | null; error: Error | null; task: BaseTask; dependencyResults: GraphResultMapWithoutTask | null; }; export type GraphResultWithoutTask = Omit, "task">; export type GraphResultFromTask = GraphResult>; export interface GraphResultMap { [key: string]: GraphResultFromTask | null; } export interface GraphResultMapWithoutTask { [key: string]: GraphResultWithoutTask | null; } export declare class GraphResults { private results; private tasks; constructor(tasks: TaskType[]); setResult(task: T, result: GraphResultFromTask): void; getStatus(task: T): GraphResultFromTask | null; /** * Get statuses for all tasks with the same type as the given `task`. */ getStatusesByType(task: T): (GraphResultFromTask | null)[]; getTasks(): TaskType[]; getMissing(): TaskType[]; getAll(): (GraphResultFromTask | null)[]; getMap(): GraphResultMap; filterForGraphResult(): GraphResultMapWithoutTask; /** * Export the result object in a format that's suitable for JSON, command outputs etc. */ export(): SolveResultExport; exportForKey(key: string): GraphExport | null; private checkKey; } /** * Render a result to string. Used for debugging and errors. */ export declare function resultToString(result: GraphResult): string; export type GraphResultEventPayload = Omit & { error: string | null; }; export declare function toGraphResultEventPayload(result: GraphResult): GraphResultEventPayload; export {};