import { Ast, Type } from 'thingtalk'; import { ContextInfo } from '../state_manip'; import { SlotBag } from '../slot_bag'; /** * Find the filter expression in the context. * * Like findFilterExpression, but if we don't have one, make it up right before the invocation. * * Returns [root, filterTable] */ declare function findOrMakeFilterExpression(root: Ast.ChainExpression): Ast.FilterExpression | null; export declare type RefineFilterCallback = (old: Ast.BooleanExpression, new_: Ast.BooleanExpression) => Ast.BooleanExpression | null; declare function queryRefinement(ctxExpression: Ast.ChainExpression, newFilter: Ast.BooleanExpression | null, refineFilter: RefineFilterCallback | null, newProjection: string[] | null): Ast.ChainExpression | null; declare function refineFilterToAnswerQuestion(ctxFilter: Ast.BooleanExpression, refinedFilter: Ast.BooleanExpression): any; declare function refineFilterToAnswerQuestionOrChangeFilter(ctxFilter: Ast.BooleanExpression, refinedFilter: Ast.BooleanExpression): any; declare function refineFilterToChangeFilter(ctxFilter: Ast.BooleanExpression, refinedFilter: Ast.BooleanExpression): any; declare function refineFilterForEmptySearch(ctxFilter: Ast.BooleanExpression, refinedFilter: Ast.BooleanExpression): any; /** * User act: in response to any proposal from the agent (refined query, recommendation, list * proposal), the user replies with a search. */ declare function proposalReply(ctx: ContextInfo, request: Ast.Expression, refinementFunction: RefineFilterCallback): Ast.DialogueState | null; declare function combinePreambleAndRequest(preamble: Ast.FilterExpression | null, request: Ast.FilterExpression | null, info: SlotBag | null, proposalType: Type | null): Ast.FilterExpression | null; export { findOrMakeFilterExpression, queryRefinement, refineFilterToAnswerQuestion, refineFilterToAnswerQuestionOrChangeFilter, refineFilterToChangeFilter, refineFilterForEmptySearch, proposalReply, combinePreambleAndRequest };