@@ -41,7 +41,13 @@ declare namespace Line {
41
41
export type UnfollowEvent = { type : "unfollow" } & EventBase ;
42
42
export type JoinEvent = { type : "join" } & ReplyableEvent ;
43
43
export type LeaveEvent = { type : "leave" } & EventBase ;
44
- export type PostbackEvent = { type : "postback" , postback : { data : string } } & ReplyableEvent ;
44
+ export type PostbackEvent = {
45
+ type : "postback" ,
46
+ postback : {
47
+ data : string ,
48
+ params ?: string ,
49
+ } ,
50
+ } & ReplyableEvent ;
45
51
export type BeaconEvent = ReplyableEvent & {
46
52
type : "beacon" ,
47
53
beacon : {
@@ -135,20 +141,20 @@ declare namespace Line {
135
141
thumbnailImageUrl ?: string ,
136
142
title ?: string ,
137
143
text : string ,
138
- actions : TemplateAction [ ] ,
144
+ actions : TemplateAction < { label : string } > [ ] ,
139
145
} ;
140
146
export type TemplateConfirm = {
141
147
type : "confirm" ,
142
148
text : string ,
143
- actions : TemplateAction [ ] ,
149
+ actions : TemplateAction < { label : string } > [ ] ,
144
150
} ;
145
151
export type TemplateCarousel = { type : "carousel" , columns : TemplateColumn [ ] } ;
146
152
147
153
export type TemplateColumn = {
148
154
thumbnailImageUrl ?: string ,
149
155
title ?: string ,
150
156
text : string ,
151
- actions : TemplateAction [ ] ,
157
+ actions : TemplateAction < { label : string } > [ ] ,
152
158
} ;
153
159
154
160
export type TemplateImageCarousel = {
@@ -158,22 +164,33 @@ declare namespace Line {
158
164
159
165
export type TemplateImageColumn = {
160
166
imageUrl : string ,
161
- action : TemplateAction ,
167
+ action : TemplateAction < { label ?: string } > ,
162
168
} ;
163
169
164
- export type TemplateAction = TemplatePostbackAction | TemplateMessageAction | TemplateURIAction ;
165
- export type TemplateActionBase = { label : string } ;
170
+ export type TemplateAction < Label > =
171
+ | TemplatePostbackAction & Label
172
+ | TemplateMessageAction & Label
173
+ | TemplateURIAction & Label
174
+ | TemplateDatetimePickerAction & Label ;
166
175
export type TemplatePostbackAction = {
167
176
type : "postback" ,
168
177
data : string ,
169
178
text ?: string ,
170
- } & TemplateActionBase ;
179
+ } ;
171
180
export type TemplateMessageAction = {
172
181
type : "message" ,
173
182
text : string ,
174
- } & TemplateActionBase ;
183
+ } ;
175
184
export type TemplateURIAction = {
176
185
type : "template" ,
177
186
uri : string ,
178
- } & TemplateActionBase ;
187
+ } ;
188
+ export type TemplateDatetimePickerAction = {
189
+ type : "datetimepicker" ,
190
+ data : string ,
191
+ mode : "date" | "time" | "datetime" ,
192
+ initial ?: string ,
193
+ max ?: string ,
194
+ min ?: string ,
195
+ } ;
179
196
}
0 commit comments