import { Intent } from 'ask-sdk-model'; import { v1 } from 'ask-smapi-model'; import { BaseControlIntent } from './BaseControlIntent'; /** * Slot values conveyed by a ValueControlIntent */ export interface ValueControlIntentSlots { feedback?: string; action?: string; target?: string; [key: string]: string[] | string | undefined; } export interface MultiValueSlot { [key: string]: string | boolean; } export interface MultiValuePayload { feedback?: string; action?: string; target?: string; values: Array<{ slotValue: string; isEntityResolutionMatch: boolean; }>; valueType?: string; } /** * Unpacks the complete intent object into a simpler representation. * * Note re "empty slots": * - Slots in the intent with no value appear in the intent object as "". * However, these are unpacked as **`undefined`** to be more explicit and ease * the implementation of predicates. * @param intent - Intent */ export declare function unpackValueControlIntent(intent: Intent): MultiValuePayload; /** * * ValueControlIntent is an intent that can carry multiple values for one value-type. * * - For example an utterance like "Plan a trip to go hiking, camping, and fishing" * all three values 'hiking, camping, fishing' can be captured using a multiple-value slot like `activity`. * * Every sample utterance for a ValueControlIntent includes the value * slot. Utterances that do not include a value slot are handled by * `GeneralControlIntent`. * * * Limitations * - `AMAZON.SearchQuery` cannot be used due to restrictions in NLU. Custom * intents should be defined instead. * * - It does not support multiple value of different slottypes, see: * https://developer.amazon.com/en-US/docs/alexa/custom-skills/collect-multiple-values-in-a-slot.html#about-multiple-value-slots * */ export declare class ValueControlIntent extends BaseControlIntent { valueSlotType: string; filteredValueSlotType: string; /** * Constructor. * * @param valueSlotType - SlotType that defines all legal values. * @param filteredValueSlotType - SlotType that defines legal values except those * that conflict with other intents. Defaults to `valueSlotType`. */ constructor(valueSlotType: string, filteredValueSlotType?: string); /** * Generates the intent name of a specialized `ValueControlIntent`. * * Example: * - The intent name for a `ValueControlIntent` that conveys an * `AMAZON.NUMBER` is `AMAZON_NUMBER_ValueControlIntent`. * * @param slotTypeId - Specific slot type id. */ static intentName(slotTypeId: string): string; /** * Create Intent from specification of the slots * */ static of(slotType: string, slots: ValueControlIntentSlots): Intent; generateIntent(): v1.skill.interactionModel.Intent; private generateSlots; } //# sourceMappingURL=ValueControlIntent.d.ts.map