Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lex response #197

Merged
merged 2 commits into from
May 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ This package provides input types for Lambda functions that process AWS events.

[Kinesis Firehose Events](README_KinesisFirehose.md)

[Lex Events](README_Lex.md)

[S3 Events](README_S3.md)

[SES Events](README_SES.md)
Expand Down
9 changes: 8 additions & 1 deletion events/lex.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type LexEvent struct {
InvocationSource string `json:"invocationSource,omitempty"`
UserID string `json:"userId,omitempty"`
InputTranscript string `json:"inputTranscript,omitempty"`
SessionAttributes map[string]string `json:"sessionAttributes,omitempty"`
SessionAttributes SessionAttributes `json:"sessionAttributes,omitempty"`
RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
Bot *LexBot `json:"bot,omitempty"`
OutputDialogMode string `json:"outputDialogMode,omitempty"`
Expand Down Expand Up @@ -41,8 +41,15 @@ type LexDialogAction struct {
ResponseCard *LexResponseCard `json:"responseCard,omitempty"`
}

type SessionAttributes map[string]string

type Slots map[string]*string

type LexResponse struct {
SessionAttributes SessionAttributes `json:"sessionAttributes,omitempty"`
DialogAction *LexDialogAction `json:"dialogAction,omitempty"`
}

type LexResponseCard struct {
Version int64 `json:"version,omitempty"`
ContentType string `json:"contentType,omitempty"`
Expand Down