@@ -508,28 +508,43 @@ export type StickerEventMessage = {
508508
509509export type Postback = {
510510 data : string ;
511+ params ?: DateTimePostback | RichMenuSwitchPostback ;
512+ } ;
513+
514+ /**
515+ * Object with the date and time selected by a user through a
516+ * [datetime picker action](https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action).
517+ * Only returned for postback actions via a
518+ * [datetime picker action](https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action).
519+ * The `full-date`, `time-hour`, and `time-minute` formats follow the
520+ * [RFC3339 protocol](https://www.ietf.org/rfc/rfc3339.txt).
521+ */
522+ type DateTimePostback = {
511523 /**
512- * Object with the date and time selected by a user through a
513- * [datetime picker action](https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action).
514- * Only returned for postback actions via a
515- * [datetime picker action](https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action).
516- * The `full-date`, `time-hour`, and `time-minute` formats follow the
517- * [RFC3339 protocol](https://www.ietf.org/rfc/rfc3339.txt).
524+ * Date selected by user. Only included in the `date` mode.
518525 */
519- params ?: {
520- /**
521- * Date selected by user. Only included in the `date` mode.
522- */
523- date ?: string ;
524- /**
525- * Time selected by the user. Only included in the `time` mode.
526- */
527- time ?: string ;
528- /**
529- * Date and time selected by the user. Only included in the `datetime` mode.
530- */
531- datetime ?: string ;
532- } ;
526+ date ?: string ;
527+ /**
528+ * Time selected by the user. Only included in the `time` mode.
529+ */
530+ time ?: string ;
531+ /**
532+ * Date and time selected by the user. Only included in the `datetime` mode.
533+ */
534+ datetime ?: string ;
535+ } ;
536+
537+ /**
538+ * Object with rich menu alias ID selected by user via rich menu switch action.
539+ * https://developers.line.biz/en/reference/messaging-api/#postback-params-object-for-richmenu-switch-action
540+ */
541+ type RichMenuSwitchPostback = {
542+ newRichMenuAliasId : string ;
543+ status :
544+ | "SUCCESS"
545+ | "RICHMENU_ALIAS_ID_NOTFOUND"
546+ | "RICHMENU_NOTFOUND"
547+ | "FAILED" ;
533548} ;
534549
535550/**
@@ -2657,6 +2672,15 @@ export type MembersCountResponse = {
26572672 count : number ;
26582673} ;
26592674
2675+ export type GetRichMenuAliasResponse = {
2676+ richMenuAliasId : string ;
2677+ richMenuId : string ;
2678+ } ;
2679+
2680+ export type GetRichMenuAliasListResponse = {
2681+ aliases : GetRichMenuAliasResponse [ ] ;
2682+ } ;
2683+
26602684/**
26612685 * Response body of get bot info.
26622686 *
0 commit comments