Skip to content

Commit 9ab421a

Browse files
ezhdan-nytbmoffatt
authored andcommitted
Add lex response (#197)
* Add missed LexResponse to events * Update README for events
1 parent 92f049f commit 9ab421a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

events/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ This package provides input types for Lambda functions that process AWS events.
3232

3333
[Kinesis Firehose Events](README_KinesisFirehose.md)
3434

35+
[Lex Events](README_Lex.md)
36+
3537
[S3 Events](README_S3.md)
3638

3739
[SES Events](README_SES.md)

events/lex.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type LexEvent struct {
55
InvocationSource string `json:"invocationSource,omitempty"`
66
UserID string `json:"userId,omitempty"`
77
InputTranscript string `json:"inputTranscript,omitempty"`
8-
SessionAttributes map[string]string `json:"sessionAttributes,omitempty"`
8+
SessionAttributes SessionAttributes `json:"sessionAttributes,omitempty"`
99
RequestAttributes map[string]string `json:"requestAttributes,omitempty"`
1010
Bot *LexBot `json:"bot,omitempty"`
1111
OutputDialogMode string `json:"outputDialogMode,omitempty"`
@@ -41,8 +41,15 @@ type LexDialogAction struct {
4141
ResponseCard *LexResponseCard `json:"responseCard,omitempty"`
4242
}
4343

44+
type SessionAttributes map[string]string
45+
4446
type Slots map[string]*string
4547

48+
type LexResponse struct {
49+
SessionAttributes SessionAttributes `json:"sessionAttributes,omitempty"`
50+
DialogAction *LexDialogAction `json:"dialogAction,omitempty"`
51+
}
52+
4653
type LexResponseCard struct {
4754
Version int64 `json:"version,omitempty"`
4855
ContentType string `json:"contentType,omitempty"`

0 commit comments

Comments
 (0)