/** * Configuration for Step Details Drawer (Edit In Depth). * Form is fully dynamic by Step Type – no hardcoded field lists. */ import type { DynamicFieldConfig } from './step-details-drawer-data'; import { TestCaseStepConfig } from '../test-case-step.models'; /** Field keys used for configuration-based rendering. */ export declare type StepDetailsFieldKey = 'description' | 'metadata' | 'retryCount' | 'advanced' | 'method' | 'url' | 'headers' | 'body' | 'saveOutputAsVariable' | 'agentTask' | 'type' | 'environment' | 'maxRetries' | 'onlyUseAttachedContext' | 'takeScreenshotsWhenVerifying' | 'iframeLocator' | 'otherLocators' | 'continueOnError' | 'disabled'; /** Step type for the drawer (drives which fields are shown). */ export declare type StepDetailsStepType = 'custom' | 'api' | 'aiAgent'; /** * Resolves drawer step type from a test case step config. */ export declare function getStepDetailsStepType(step: TestCaseStepConfig | null | undefined): StepDetailsStepType | null; /** * Fields shown per step type (configuration-based). * Custom: Description, Metadata, Retry Count (if configured), Advanced (if configured). * API: Method, URL, Headers, Body, Save Output as Variable, Advanced (if configured). * AI Agent: Agent Task, Type, Metadata, Environment, Description, Constraints (toggles + Max Retries), Advanced (toggles + Retry Count, Iframe locator, Other Locators). */ export declare const STEP_DETAILS_FIELDS_BY_TYPE: Record; /** Section for grouping fields (main form, constraints, or inside advanced). */ export declare type StepDetailsFieldSection = 'main' | 'constraints' | 'advanced'; /** Option for dropdown fields (value/label). */ export interface StepDetailsSelectOption { value: string; label: string; } /** Metadata per field (label, placeholder, control type, visibility). */ export interface StepDetailsFieldMeta { key: StepDetailsFieldKey; label: string; placeholder?: string; controlType: 'text' | 'textarea' | 'dropdown' | 'code' | 'toggleGroup' | 'toggle'; /** Section for grouping; used for conditional headings (e.g. "Constraints"). */ section?: StepDetailsFieldSection; /** Dropdown options (for controlType === 'dropdown'). */ options?: StepDetailsSelectOption[]; /** Whether the field is required (e.g. show Required pill). */ required?: boolean; /** Textarea rows. */ rows?: number; /** Helper text or tip below the field. */ tip?: string; /** Sub-label or description for toggles (e.g. "Only use elements from the attached context"). */ subLabel?: string; } export declare const STEP_DETAILS_FIELD_META: Record; /** Toggle fields always shown inside the Advanced section. */ export declare const ADVANCED_TOGGLE_KEYS: StepDetailsFieldKey[]; /** Field keys shown inside Advanced (per step type), in addition to ADVANCED_TOGGLE_KEYS. */ export declare const ADVANCED_SUBFIELDS_BY_TYPE: Record; /** * Converts legacy step-type config to DynamicFieldConfig[] for backward compatibility. * Use when opening the drawer without API-provided dynamic fields (e.g. Storybook, migration). */ export declare function getDynamicFieldsFromLegacyConfig(step: TestCaseStepConfig | null | undefined): DynamicFieldConfig[];