export type ScenarioInput = Record; export type OutputField = { key: string; name: string; type: string; source: string; value: unknown; }; export type ResultField = { key: string; name: string; type: string; required?: boolean; options?: unknown[]; fields?: ResultField[]; items?: Omit; }; export type ResultSchema = { fields: ResultField[]; }; export type NodeField = { key: string; name: string; type: string; required: boolean; options: unknown[]; validation: Record; }; export type PresentationField = { key: string; label: string; kind: 'text' | 'image'; value: unknown; }; export type NodePresentation = { summary: PresentationField[]; items: Array<{ fields: PresentationField[]; }>; opening?: { title: string; content: string; }; }; export type KnowledgeCollectionOption = { value: string; label: string; parents?: string[]; suggested?: boolean; }; export type KnowledgeCollectionStep = { field_key: string; name: string; required: boolean; multiple: boolean; from_field?: string; options: KnowledgeCollectionOption[]; }; export type KnowledgeCollection = { context_fields: NodeField[]; context_title?: string; context_hint?: string; selection_title?: string; selection_hint?: string; steps: KnowledgeCollectionStep[]; }; export type NodeView = { node_key: string; type: string; title: string; content: string; fields?: NodeField[]; presentation?: NodePresentation; outputs?: unknown[]; collection?: KnowledgeCollection; }; export type ScenarioState = { run_id: number; external_ref: string; status: string; final_result?: Record | null; result_schema: ResultSchema; session_token?: string; node: NodeView; outputs: OutputField[]; }; export type SDKEvent = 'ready' | 'node_change' | 'form_submit' | 'finish' | 'error'; export type CreateOptions = { baseURL?: string; publicKey: string; scenarioKey: string; sopId?: number; input?: ScenarioInput; initialValues?: ScenarioInput; externalRef?: string; }; export type FinishOptions = { result?: string; finalResult?: Record | null; }; export declare class SalesScenario { private readonly options; private token; private state?; private handlers; constructor(options: CreateOptions); start(): Promise; getState(): ScenarioState; getCurrentNode(): Promise; submit(values: ScenarioInput): Promise; next(): Promise; finish(options?: FinishOptions): Promise; reset(): Promise; destroy(): void; on(event: SDKEvent, handler: (payload: unknown) => void): () => boolean; private update; private setState; private emit; private request; } export declare function create(options: CreateOptions): SalesScenario;