mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
refactor(alexa-sdk): moved Request types together
made their properties optional so each of them can be used
This commit is contained in:
Vendored
+19
-17
@@ -81,33 +81,34 @@ export interface SessionUser {
|
||||
export interface LaunchRequest extends Request { }
|
||||
|
||||
export interface IntentRequest extends Request {
|
||||
dialogState: DialogStates;
|
||||
intent: Intent;
|
||||
}
|
||||
|
||||
export interface SlotValue {
|
||||
confirmationStatus: ConfirmationStatuses;
|
||||
name: string;
|
||||
value?: any;
|
||||
}
|
||||
|
||||
export interface Intent {
|
||||
confirmationStatus: ConfirmationStatuses;
|
||||
name: string;
|
||||
slots: Record<string, SlotValue>;
|
||||
dialogState?: DialogStates;
|
||||
intent?: Intent;
|
||||
}
|
||||
|
||||
export interface SessionEndedRequest extends Request {
|
||||
reason: string;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export interface Request {
|
||||
type: "LaunchRequest" | "IntentRequest" | "SessionEndedRequest";
|
||||
requestId: string;
|
||||
timeStamp: string;
|
||||
locale?: string;
|
||||
timestamp: string;
|
||||
locale?: string
|
||||
}
|
||||
|
||||
export interface SlotValue {
|
||||
confirmationStatus?: ConfirmationStatuses;
|
||||
name: string;
|
||||
value?: any;
|
||||
}
|
||||
|
||||
export interface Intent {
|
||||
confirmationStatus?: ConfirmationStatuses;
|
||||
name: string;
|
||||
slots: Record<string, SlotValue>;
|
||||
}
|
||||
|
||||
|
||||
export interface ResponseBody {
|
||||
version: string;
|
||||
sessionAttributes?: any;
|
||||
@@ -143,3 +144,4 @@ export interface Image {
|
||||
export interface Reprompt {
|
||||
outputSpeech: OutputSpeech;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user