Remove useless columns (#13312)
This commit is contained in:
@@ -80,8 +80,6 @@ export const useRunWorkflowVersion = () => {
|
||||
const recordInput: Partial<WorkflowRun> = {
|
||||
name: '#0',
|
||||
status: 'NOT_STARTED',
|
||||
output: null,
|
||||
context: null,
|
||||
workflowVersionId,
|
||||
workflowId,
|
||||
createdAt: new Date().toISOString(),
|
||||
|
||||
@@ -1,63 +1,26 @@
|
||||
import {
|
||||
workflowAiAgentActionSchema,
|
||||
workflowAiAgentActionSettingsSchema,
|
||||
workflowCodeActionSchema,
|
||||
workflowCodeActionSettingsSchema,
|
||||
workflowCreateRecordActionSchema,
|
||||
workflowCreateRecordActionSettingsSchema,
|
||||
workflowCronTriggerSchema,
|
||||
workflowDatabaseEventTriggerSchema,
|
||||
workflowDeleteRecordActionSchema,
|
||||
workflowDeleteRecordActionSettingsSchema,
|
||||
workflowExecutorOutputSchema,
|
||||
workflowFilterActionSchema,
|
||||
workflowFilterActionSettingsSchema,
|
||||
workflowFindRecordsActionSchema,
|
||||
workflowFindRecordsActionSettingsSchema,
|
||||
workflowFormActionSchema,
|
||||
workflowFormActionSettingsSchema,
|
||||
workflowHttpRequestActionSchema,
|
||||
workflowManualTriggerSchema,
|
||||
workflowRunOutputSchema,
|
||||
workflowRunOutputStepsOutputSchema,
|
||||
workflowRunSchema,
|
||||
workflowRunStateSchema,
|
||||
workflowRunStatusSchema,
|
||||
workflowRunStepStatusSchema,
|
||||
workflowSendEmailActionSchema,
|
||||
workflowSendEmailActionSettingsSchema,
|
||||
workflowTriggerSchema,
|
||||
workflowUpdateRecordActionSchema,
|
||||
workflowUpdateRecordActionSettingsSchema,
|
||||
workflowWebhookTriggerSchema,
|
||||
} from '@/workflow/validation-schemas/workflowSchema';
|
||||
import { z } from 'zod';
|
||||
|
||||
export type WorkflowCodeActionSettings = z.infer<
|
||||
typeof workflowCodeActionSettingsSchema
|
||||
>;
|
||||
export type WorkflowSendEmailActionSettings = z.infer<
|
||||
typeof workflowSendEmailActionSettingsSchema
|
||||
>;
|
||||
export type WorkflowCreateRecordActionSettings = z.infer<
|
||||
typeof workflowCreateRecordActionSettingsSchema
|
||||
>;
|
||||
export type WorkflowUpdateRecordActionSettings = z.infer<
|
||||
typeof workflowUpdateRecordActionSettingsSchema
|
||||
>;
|
||||
export type WorkflowDeleteRecordActionSettings = z.infer<
|
||||
typeof workflowDeleteRecordActionSettingsSchema
|
||||
>;
|
||||
export type WorkflowFindRecordsActionSettings = z.infer<
|
||||
typeof workflowFindRecordsActionSettingsSchema
|
||||
>;
|
||||
export type WorkflowFilterActionSettings = z.infer<
|
||||
typeof workflowFilterActionSettingsSchema
|
||||
>;
|
||||
export type WorkflowFormActionSettings = z.infer<
|
||||
typeof workflowFormActionSettingsSchema
|
||||
>;
|
||||
|
||||
export type WorkflowCodeAction = z.infer<typeof workflowCodeActionSchema>;
|
||||
export type WorkflowSendEmailAction = z.infer<
|
||||
typeof workflowSendEmailActionSchema
|
||||
@@ -80,10 +43,6 @@ export type WorkflowHttpRequestAction = z.infer<
|
||||
typeof workflowHttpRequestActionSchema
|
||||
>;
|
||||
|
||||
export type WorkflowAiAgentActionSettings = z.infer<
|
||||
typeof workflowAiAgentActionSettingsSchema
|
||||
>;
|
||||
|
||||
export type WorkflowAiAgentAction = z.infer<typeof workflowAiAgentActionSchema>;
|
||||
|
||||
export type WorkflowAction =
|
||||
@@ -143,14 +102,6 @@ export type ManualTriggerWorkflowVersion = WorkflowVersion & {
|
||||
trigger: WorkflowManualTrigger | null;
|
||||
};
|
||||
|
||||
export type WorkflowRunOutput = z.infer<typeof workflowRunOutputSchema>;
|
||||
export type WorkflowExecutorOutput = z.infer<
|
||||
typeof workflowExecutorOutputSchema
|
||||
>;
|
||||
export type WorkflowRunOutputStepsOutput = z.infer<
|
||||
typeof workflowRunOutputStepsOutputSchema
|
||||
>;
|
||||
|
||||
export type WorkflowRunStatus = z.infer<typeof workflowRunStatusSchema>;
|
||||
|
||||
export type WorkflowRun = z.infer<typeof workflowRunSchema>;
|
||||
|
||||
@@ -297,27 +297,6 @@ export const workflowTriggerSchema = z.discriminatedUnion('type', [
|
||||
workflowWebhookTriggerSchema,
|
||||
]);
|
||||
|
||||
// Step output schemas
|
||||
export const workflowExecutorOutputSchema = z.object({
|
||||
result: z.any().optional(),
|
||||
error: z.any().optional(),
|
||||
pendingEvent: z.boolean().optional(),
|
||||
});
|
||||
|
||||
export const workflowRunOutputStepsOutputSchema = z.record(
|
||||
workflowExecutorOutputSchema,
|
||||
);
|
||||
|
||||
// Final workflow run output schema
|
||||
export const workflowRunOutputSchema = z.object({
|
||||
flow: z.object({
|
||||
trigger: workflowTriggerSchema,
|
||||
steps: z.array(workflowActionSchema),
|
||||
}),
|
||||
stepsOutput: workflowRunOutputStepsOutputSchema.optional(),
|
||||
error: z.any().optional(),
|
||||
});
|
||||
|
||||
export const workflowRunStepStatusSchema = z.nativeEnum(StepStatus);
|
||||
|
||||
export const workflowRunStateStepInfoSchema = z.object({
|
||||
@@ -339,8 +318,6 @@ export const workflowRunStateSchema = z.object({
|
||||
workflowRunError: z.any().optional(),
|
||||
});
|
||||
|
||||
export const workflowRunContextSchema = z.record(z.any());
|
||||
|
||||
export const workflowRunStatusSchema = z.enum([
|
||||
'NOT_STARTED',
|
||||
'RUNNING',
|
||||
@@ -355,8 +332,6 @@ export const workflowRunSchema = z
|
||||
id: z.string(),
|
||||
workflowVersionId: z.string(),
|
||||
workflowId: z.string(),
|
||||
output: workflowRunOutputSchema.nullable(),
|
||||
context: workflowRunContextSchema.nullable(),
|
||||
state: workflowRunStateSchema.nullable(),
|
||||
status: workflowRunStatusSchema,
|
||||
createdAt: z.string(),
|
||||
|
||||
+3
-1
@@ -35,6 +35,8 @@ export const WorkflowRunStepOutputDetail = ({ stepId }: { stepId: string }) => {
|
||||
|
||||
const stepInfo = workflowRun.state.stepInfos[stepId];
|
||||
|
||||
const { status: _, ...stepInfoWithoutStatus } = stepInfo ?? {};
|
||||
|
||||
const stepDefinition = getStepDefinitionOrThrow({
|
||||
stepId,
|
||||
trigger: workflowRun.state.flow.trigger,
|
||||
@@ -84,7 +86,7 @@ export const WorkflowRunStepOutputDetail = ({ stepId }: { stepId: string }) => {
|
||||
|
||||
<WorkflowRunStepJsonContainer>
|
||||
<JsonTree
|
||||
value={stepInfo ?? t`No output available`}
|
||||
value={stepInfoWithoutStatus ?? t`No output available`}
|
||||
shouldExpandNodeInitially={isTwoFirstDepths}
|
||||
emptyArrayLabel={t`Empty Array`}
|
||||
emptyObjectLabel={t`Empty Object`}
|
||||
|
||||
-2
@@ -25,8 +25,6 @@ export const useSubmitFormStep = () => {
|
||||
id: true,
|
||||
name: true,
|
||||
status: true,
|
||||
output: true,
|
||||
context: true,
|
||||
startedAt: true,
|
||||
endedAt: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user