import { Intent, Slot } from 'ask-sdk-model'; /** * Utility to construct intent objects for testing. */ export declare class IntentBuilder { /** * Create an Intent object from a name and a set of slot values. * * - Multi-value slots can be provided as an array of values. * @param name - Intent name * @param slotValues - Slot value map */ static of(name: string, slotValues?: { [k: string]: any; }): Intent; } /** * Represents a single slot value and whether it was an ER_MATCH. */ export interface SlotResolutionValue { slotValue: string; isEntityResolutionMatch: boolean; } /** * Simplified representation of the data contained in a full Intent object. */ export declare class SimplifiedIntent { readonly name: string; readonly slotResolutions: { [k: string]: SlotResolutionValue | undefined; }; constructor(name: string, slotResolutions: { [k: string]: SlotResolutionValue | undefined; }); /** * Factory method to create a SimplifiedIntent from an Intent. * @param intent - Intent name */ static fromIntent(intent: Intent): SimplifiedIntent; toString(): string; } /** * If there is an ER-Success, this returns the canonical value id of the first match resolution along with * isEntityResolutionMatch: boolean to indicate the status of ER_SUCCESS_MATCH * Otherwise this returns the object of literal slot value and isEntityResolutionMatch set to false. * * @param slot - Slot */ export declare function getSlotResolutions(slot: Slot | undefined): SlotResolutionValue | undefined; /** * Simplified representation of the data contained in a full Intent object. * * - supports Multi-value-slots */ export declare class SimplifiedMVSIntent { readonly name: string; readonly slotResolutions: { [k: string]: SlotResolutionValue | SlotResolutionValue[] | undefined; }; constructor(name: string, slotResolutions: { [k: string]: SlotResolutionValue | SlotResolutionValue[] | undefined; }); /** * Factory method to create a SimplifiedMVSIntent from an Intent. * @param intent - Intent */ static fromIntent(intent: Intent): SimplifiedMVSIntent; toString(): string; } /** * If there is an ER-Success, this returns the canonical value id of the first match resolution along with * isEntityResolutionMatch: boolean to indicate the status of ER_SUCCESS_MATCH * Otherwise this returns the object of literal slot value and isEntityResolutionMatch set to false. * * @param slot - Slot */ export declare function getMVSSlotResolutions(slot: Slot | undefined): SlotResolutionValue | SlotResolutionValue[] | undefined; /** * Utility to extract a 'valueId' from common intent name shapes. * * Purpose: * - this is intended to be used with the ListControl prop: nlu.slotValueConflictExtensions.intentToValueMapper * * Behavior: * The name is processed with the following rules: * - the longest prefix ending in a period is removed. * - a suffix of 'Intent' is removed. * - the first character of the result is converted to lowerCase * * Supported shapes: * ``` * ThingIntent -> 'thing', * SomeThingIntent -> 'someThing', * AMAZON.YesIntent -> 'yes' * AMAZON.ShuffleOffIntent -> 'shuffleOFf' * ``` * */ export declare function defaultIntentToValueMapper(intent: Intent): string; //# sourceMappingURL=IntentUtils.d.ts.map