@@ -182,7 +182,7 @@ export type TemplateMessage = {
182
182
183
183
export type ImageMapAction = ImageMapURIAction | ImageMapMessageAction ;
184
184
185
- export type ImageMapActionBase = { area : ImageMapArea } ;
185
+ export type ImageMapActionBase = { area : Area } ;
186
186
187
187
export type ImageMapURIAction = {
188
188
type : "uri" ;
@@ -194,7 +194,7 @@ export type ImageMapMessageAction = {
194
194
text : string ;
195
195
} & ImageMapActionBase ;
196
196
197
- export type ImageMapArea = {
197
+ export type Area = {
198
198
x : number ;
199
199
y : number ;
200
200
width : number ;
@@ -212,13 +212,13 @@ export type TemplateButtons = {
212
212
thumbnailImageUrl ?: string ;
213
213
title ?: string ;
214
214
text : string ;
215
- actions : TemplateAction < { label : string } > [ ] ;
215
+ actions : Action < { label : string } > [ ] ;
216
216
} ;
217
217
218
218
export type TemplateConfirm = {
219
219
type : "confirm" ;
220
220
text : string ;
221
- actions : TemplateAction < { label : string } > [ ] ;
221
+ actions : Action < { label : string } > [ ] ;
222
222
} ;
223
223
224
224
export type TemplateCarousel = { type : "carousel" ; columns : TemplateColumn [ ] } ;
@@ -227,7 +227,7 @@ export type TemplateColumn = {
227
227
thumbnailImageUrl ?: string ;
228
228
title ?: string ;
229
229
text : string ;
230
- actions : TemplateAction < { label : string } > [ ] ;
230
+ actions : Action < { label : string } > [ ] ;
231
231
} ;
232
232
233
233
export type TemplateImageCarousel = {
@@ -237,10 +237,10 @@ export type TemplateImageCarousel = {
237
237
238
238
export type TemplateImageColumn = {
239
239
imageUrl : string ;
240
- action : TemplateAction < { label ?: string } > ;
240
+ action : Action < { label ?: string } > ;
241
241
} ;
242
242
243
- export type TemplateAction < Label > =
243
+ export type Action < Label > =
244
244
| TemplatePostbackAction & Label
245
245
| TemplateMessageAction & Label
246
246
| TemplateURIAction & Label
@@ -276,15 +276,12 @@ export type Size = {
276
276
height : number ;
277
277
} ;
278
278
279
- export type RichMenuArea = {
280
- bounds : ImageMapArea ;
281
- action : TemplateAction < any > ;
282
- } ;
279
+ export type RichMenuId = { richMenuId : string } ;
283
280
284
281
export type RichMenu = {
285
282
size : Size ;
286
283
selected : boolean ;
287
284
name : string ;
288
285
chatBarText : string ;
289
- areas : RichMenuArea [ ] ;
286
+ areas : Array < { bounds : Area ; action : Action < { } > } > ;
290
287
} ;
0 commit comments