@@ -260,7 +260,7 @@ export type FlexBox = {
260
260
261
261
export type FlexButton = {
262
262
type : "button" ;
263
- action : Action < { label : string } > ;
263
+ action : Action ;
264
264
flex ?: number ;
265
265
margin ?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" ;
266
266
height ?: "sm" | "md" ;
@@ -325,7 +325,7 @@ export type FlexImage = {
325
325
| "1:3" ;
326
326
aspectMode ?: "cover" | "fit" ;
327
327
backgroundColor ?: string ;
328
- action ?: Action < { label : string } > ;
328
+ action ?: Action ;
329
329
} ;
330
330
331
331
export type FlexSeparator = {
@@ -360,7 +360,7 @@ export type FlexText = {
360
360
wrap ?: boolean ;
361
361
weight ?: "regular" | "bold" ;
362
362
color ?: string ;
363
- action ?: Action < { label : string } > ;
363
+ action ?: Action ;
364
364
} ;
365
365
366
366
export type TemplateContent =
@@ -377,13 +377,13 @@ export type TemplateButtons = {
377
377
imageBackgroundColor ?: string ;
378
378
title ?: string ;
379
379
text : string ;
380
- actions : Action < { label : string } > [ ] ;
380
+ actions : Action [ ] ;
381
381
} ;
382
382
383
383
export type TemplateConfirm = {
384
384
type : "confirm" ;
385
385
text : string ;
386
- actions : Action < { label : string } > [ ] ;
386
+ actions : Action [ ] ;
387
387
} ;
388
388
389
389
export type TemplateCarousel = {
@@ -398,7 +398,7 @@ export type TemplateColumn = {
398
398
imageBackgroundColor ?: string ;
399
399
title ?: string ;
400
400
text : string ;
401
- actions : Action < { label : string } > [ ] ;
401
+ actions : Action [ ] ;
402
402
} ;
403
403
404
404
export type TemplateImageCarousel = {
@@ -411,11 +411,12 @@ export type TemplateImageColumn = {
411
411
action : Action < { label ?: string } > ;
412
412
} ;
413
413
414
- export type Action < Label > =
415
- | PostbackAction & Label
416
- | MessageAction & Label
417
- | URIAction & Label
418
- | DatetimePickerAction & Label ;
414
+ export type Action < ExtraFields = { label : string } > = (
415
+ | PostbackAction
416
+ | MessageAction
417
+ | URIAction
418
+ | DatetimePickerAction ) &
419
+ ExtraFields ;
419
420
420
421
export type PostbackAction = {
421
422
type : "postback" ;
0 commit comments