diff --git a/types/alexa-sdk/index.d.ts b/types/alexa-sdk/index.d.ts index 3c74c3d026..c19892425d 100644 --- a/types/alexa-sdk/index.d.ts +++ b/types/alexa-sdk/index.d.ts @@ -1,12 +1,16 @@ -// Type definitions for Alexa SDK for Node.js v1.0.3 +// Type definitions for Alexa SDK for Node.js v1.1.0 // Project: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs -// Definitions by: Pete Beegle +// Definitions by: Pete Beegle , Huw // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 export function handler(event: RequestBody, context: Context, callback?: Function): AlexaObject; export function CreateStateHandler(state: string, obj: any): any; export var StateString: string; +type ConfirmationStatuses = "NONE" | "DENIED" | "CONFIRMED"; +type DialogStates = "STARTED" | "IN_PROGRESS" | "COMPLETED"; + interface AlexaObject extends Handler { _event: any; _context: any; @@ -74,12 +78,20 @@ interface SessionUser { interface LaunchRequest extends IRequest { } interface IntentRequest extends IRequest { + dialogState: DialogStates; intent: Intent; } -interface Intent { +interface SlotValue { + confirmationStatus: ConfirmationStatuses; name: string; - slots: any; + value?: any; +} + +interface Intent { + confirmationStatus: ConfirmationStatuses; + name: string; + slots: Record; } interface SessionEndedRequest extends IRequest { @@ -127,5 +139,3 @@ interface Image { interface Reprompt { outputSpeech: OutputSpeech; } - -