import * as ThingTalk from 'thingtalk'; import { Ast, ExecEnvironment, SchemaRetriever, Runtime } from 'thingtalk'; import { SimulationDatabase } from './types'; declare class ResultGenerator { private _rng; private _timezone; private _overrides; private _candidates; private _constants; constructor(rng: () => number, timezone: string, overrides: Map); private _doAddCandidate; addCandidate(value: Ast.Value): void; generate(schema: Ast.FunctionDef, params: Record, index: number): Record; private _generateValue; private _generateTime; private _generateDate; private _generateLocation; private _generateNumber; private _generateString; generateString(): string; private _reuseConstant; } declare class SimulatedError extends Error { code: string | undefined; constructor(message: string, code?: string); } interface OutputDelegate { output(outputType: string, outputValue: Record): void; error(error: Error): void; } declare class SimulationExecEnvironment extends ExecEnvironment { private _schemas; private _database; private _rng; private _simulateErrors; private _testDevice; private _delegate; private _locale; private _timezone; private _execCache; generator: ResultGenerator | null; constructor(locale: string, timezone: string | undefined, schemas: SchemaRetriever, database: SimulationDatabase | undefined, { rng, simulateErrors }: { rng: () => number; simulateErrors?: boolean; }); setOutputDelegate(delegate: OutputDelegate): void; get program_id(): ThingTalk.Builtin.Entity; get locale(): string; get timezone(): string; clearGetCache(): void; reportError(message: string, error: Error & { code?: string; }): Promise; output(outputType: string, outputValues: Record): Promise; private _findInCache; private _failAction; private _getDevices; invokeAction(kind: string, attrs: Record, fname: string, params: Record): AsyncIterable<[string, Record]>; private _tryFromSimulationDatabase; private _doInvokeQuery; invokeQuery(kind: string, attrs: Record, fname: string, params: Record, hints: Runtime.CompiledQueryHints): AsyncIterable<[string, Record]>; invokeDBQuery(kind: string, attrs: Record, query: Ast.Program): AsyncIterable<[string, Record]>; formatEvent(outputType: string, output: Record, hint: string): Promise; } export { ResultGenerator, SimulationExecEnvironment, SimulatedError };