import type EventRegistry from '../util/EventRegistry'; import type { TranslationFile } from '@qualtrics/plugin-client/src/models'; type ActionTaskEvents = { save: EventRegistry; next: EventRegistry; back: EventRegistry; uiOp: EventRegistry; }; type ActionTaskOptions = { pages: number; }; type ConnectionConfig = { id: string; paramFormat: string; paramName: string; paramTemplate: string; }; type CustomSaveConfig = { customSaveHandler: boolean; exportMappings: Record; exports: Array; pipedTextExports: PipedTextExports; }; type WebServiceSaveConfig = { url: string; method: string; headers: Record; body: Record; connection?: ConnectionConfig; config?: Record; pipedTextExports?: PipedTextExports; }; type XMFunctionSaveConfig = { arguments: Record; exports: Array; config?: Record; }; type SaveConfig = HostXmFunctionSaveConfig | HostWebServiceSaveConfig; type HostXmFunctionSaveConfig = { triggerAction: string; arguments: Record; exports: Array; attributes: { enable_profiling: boolean; }; functionPath: string; config?: Record; }; type HostWebServiceSaveConfig = { url: string; requestType: string; contentType: string; triggerAction: string; keyValues: Record; credential?: ConnectionConfig; paramsMap?: Record; headers?: Record; config?: Record; exports?: Array; exportMappings?: Record; pipedTextExports?: PipedTextExports; }; type PipedText = Array>; type Context = { instanceID: string; availableCredentials: Record | unknown; language: string; translations?: TranslationFile; pipedText: PipedText | unknown; config?: WebServiceSaveConfig | XMFunctionSaveConfig | unknown; availableDataSources?: Source[] | unknown; availableMediaSources?: WorkflowMediaSource[] | unknown; availableFileDescriptors?: AvailableFileDescriptor[] | unknown; }; type Workers = { [key: string]: string; }; type ExportItem = { key: string; display_name: string; }; type PathExport = { name: string; path: string; }; type DefaultExport = { name: string; key: string; }; type PipedTextExports = (PathExport | DefaultExport)[]; type UiOpName = 'target_element' | 'highlight_element' | 'clear_highlights'; type UiOpAck = { ok: boolean; reason?: 'element_not_found'; highlight_skipped?: boolean; }; type UiOpData = { op: UiOpName; payload: Record; }; type PipedTextMethodConfig = { method: string; argMap?: Record; }; interface WorkflowMediaSource { id?: string; name: string; fileType: string; actionId?: string; } interface AvailableFileDescriptor { name: string; types: string[]; sourceId: string; } interface Source { name: string; fileMetadata?: { delimiter?: string; qualtricsDataLakeLocation?: { projectId: string; collectionId: string; datasetId: string; }; }; fields: { [key: string]: { type: string; defaultMapping?: string; label?: string; }; }; actionId?: string; taskNumber?: number; uniqueId?: string; } export { ActionTaskEvents, ActionTaskOptions, SaveConfig, ConnectionConfig, PipedText, Context, Workers, ExportItem, HostWebServiceSaveConfig, HostXmFunctionSaveConfig, PathExport, DefaultExport, PipedTextExports, PipedTextMethodConfig, CustomSaveConfig, WebServiceSaveConfig, XMFunctionSaveConfig, Source, WorkflowMediaSource, AvailableFileDescriptor, UiOpName, UiOpAck, UiOpData };