- Create zod schemas for everything related to a workflow run - Update the types to be inferred from the zod schemas - Improper workflow run outputs will render a blank screen; we could show an error in the future https://github.com/user-attachments/assets/8e666c3e-82b0-4ab5-8804-2f70130ea257
17 lines
491 B
TypeScript
17 lines
491 B
TypeScript
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
|
import { useFindOneRecord } from '@/object-record/hooks/useFindOneRecord';
|
|
import { WorkflowRun } from '@/workflow/types/Workflow';
|
|
|
|
export const useWorkflowRunUnsafe = ({
|
|
workflowRunId,
|
|
}: {
|
|
workflowRunId: string;
|
|
}) => {
|
|
const { record } = useFindOneRecord<WorkflowRun>({
|
|
objectNameSingular: CoreObjectNameSingular.WorkflowRun,
|
|
objectRecordId: workflowRunId,
|
|
});
|
|
|
|
return record;
|
|
};
|