mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-07 08:02:40 +00:00
Add a configurable `defaultTimeout` to the script/flow editor whitelabel customUi (replaces the hardcoded 300s default) and an `onTestJob` callback on ScriptBuilder/FlowBuilder that fires with the preview job id when a test run starts. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
58 lines
2.2 KiB
TypeScript
58 lines
2.2 KiB
TypeScript
import type { OpenFlow } from '$lib/gen'
|
|
import type { StateStore } from '$lib/utils'
|
|
import type { FlowState } from './flows/flowState'
|
|
import type { FlowWithDraftAndDraftTriggers, Trigger } from './triggers/utils'
|
|
import type { DiffDrawerI } from './diff_drawer'
|
|
import type { FlowBuilderWhitelabelCustomUi } from './custom_ui'
|
|
import type { ScheduleTrigger } from './triggers'
|
|
import type { stepState } from './stepHistoryLoader.svelte'
|
|
import type { WorkspaceItem } from './workspacePicker'
|
|
|
|
export type FlowBuilderProps = {
|
|
initialPath?: string
|
|
pathStoreInit?: string | undefined
|
|
newFlow: boolean
|
|
selectedId: string | undefined
|
|
initialArgs?: Record<string, any>
|
|
loading?: boolean
|
|
flowStore: StateStore<OpenFlow>
|
|
flowStateStore: StateStore<FlowState>
|
|
savedFlow?: FlowWithDraftAndDraftTriggers | undefined
|
|
diffDrawer?: DiffDrawerI | undefined
|
|
customUi?: FlowBuilderWhitelabelCustomUi
|
|
disableAi?: boolean
|
|
disabledFlowInputs?: boolean
|
|
savedPrimarySchedule?: ScheduleTrigger | undefined // used to set the primary schedule in the legacy primaryScheduleStore
|
|
version?: number | undefined
|
|
setSavedraftCb?: ((cb: () => void) => void) | undefined
|
|
draftTriggersFromUrl?: Trigger[] | undefined
|
|
selectedTriggerIndexFromUrl?: number | undefined
|
|
children?: import('svelte').Snippet
|
|
loadedFromHistoryFromUrl?: {
|
|
flowJobInitial: boolean | undefined
|
|
stepsState: Record<string, stepState>
|
|
}
|
|
noInitial?: boolean
|
|
liveEditorDraftStoragePath?: string
|
|
onSaveInitial?: ({ path, id }: { path: string; id: string }) => void
|
|
onSaveDraft?: ({
|
|
path,
|
|
savedAtNewPath,
|
|
newFlow
|
|
}: {
|
|
path: string
|
|
savedAtNewPath: boolean
|
|
newFlow: boolean
|
|
}) => void
|
|
onSaveDraftError?: ({ error }: { error: any }) => void
|
|
onSaveDraftOnlyAtNewPath?: ({ path, selectedId }: { path: string; selectedId: string }) => void
|
|
onDeploy?: ({ path }: { path: string }) => void
|
|
onDeployError?: ({ error }: { error: any }) => void
|
|
onDetails?: ({ path }: { path: string }) => void
|
|
onHistoryRestore?: () => void
|
|
onNavigate?: (item: WorkspaceItem) => void
|
|
// Fired whenever a test run is started from the flow editor, with the
|
|
// preview job id. Used by whitelabel embedders to track test jobs.
|
|
onTestJob?: (e: { jobId: string }) => void
|
|
}
|