@@ -429,7 +429,12 @@ export type TextEventMessage = {
429
429
userId ?: string ;
430
430
} [ ] ;
431
431
} ;
432
- } & EventMessageBase ;
432
+ /**
433
+ * Message ID of a quoted message. Only included when the received message quotes a past message.
434
+ */
435
+ quotedMessageId ?: string ;
436
+ } & QuotableMessage &
437
+ EventMessageBase ;
433
438
434
439
export type ContentProvider < WithPreview extends boolean = true > =
435
440
| {
@@ -486,7 +491,8 @@ export type ImageEventMessage = {
486
491
*/
487
492
total : number ;
488
493
} ;
489
- } & EventMessageBase ;
494
+ } & QuotableMessage &
495
+ EventMessageBase ;
490
496
491
497
/**
492
498
* Message object which contains the video content sent from the source.
@@ -495,7 +501,8 @@ export type ImageEventMessage = {
495
501
export type VideoEventMessage = {
496
502
type : "video" ;
497
503
contentProvider : ContentProvider ;
498
- } & EventMessageBase ;
504
+ } & QuotableMessage &
505
+ EventMessageBase ;
499
506
500
507
/**
501
508
* Message object which contains the audio content sent from the source.
@@ -552,7 +559,12 @@ export type StickerEventMessage = {
552
559
* Max character limit: 100
553
560
*/
554
561
text ?: string ;
555
- } & EventMessageBase ;
562
+ /**
563
+ * Message ID of a quoted message. Only included when the received message quotes a past message.
564
+ */
565
+ quotedMessageId ?: string ;
566
+ } & QuotableMessage &
567
+ EventMessageBase ;
556
568
557
569
export type Postback = {
558
570
data : string ;
@@ -632,35 +644,50 @@ export type MessageCommon = {
632
644
sender ?: Sender ;
633
645
} ;
634
646
635
- /**
636
- * @see [Text message](https://developers.line.biz/en/reference/messaging-api/#text-message)
637
- */
638
- export type TextMessage = MessageCommon & {
639
- type : "text" ;
647
+ type QuotableMessage = {
640
648
/**
641
- * Message text. You can include the following emoji:
642
- *
643
- * - LINE emojis. Use a $ character as a placeholder and specify the product ID and emoji ID of the LINE emoji you want to use in the emojis property.
644
- * - Unicode emoji
645
- * - (Deprecated) LINE original unicode emojis
646
- * ([Unicode codepoint table for LINE original emoji](https://developers.line.biz/media/messaging-api/emoji-list.pdf))
647
- *
648
- * Max: 5000 characters
649
+ * Quote token to quote this message.
649
650
*/
650
- text : string ;
651
+ quoteToken : string ;
652
+ } ;
651
653
654
+ type CanQuoteMessage = {
652
655
/**
653
- * One or more LINE emoji.
654
- *
655
- * Max: 20 LINE emoji
656
+ * Quote token of the message you want to quote.
656
657
*/
657
- emojis ?: {
658
- index : number ;
659
- productId : string ;
660
- emojiId : string ;
661
- } [ ] ;
658
+ quoteText ?: string ;
662
659
} ;
663
660
661
+ /**
662
+ * @see [Text message](https://developers.line.biz/en/reference/messaging-api/#text-message)
663
+ */
664
+ export type TextMessage = MessageCommon &
665
+ CanQuoteMessage & {
666
+ type : "text" ;
667
+ /**
668
+ * Message text. You can include the following emoji:
669
+ *
670
+ * - LINE emojis. Use a $ character as a placeholder and specify the product ID and emoji ID of the LINE emoji you want to use in the emojis property.
671
+ * - Unicode emoji
672
+ * - (Deprecated) LINE original unicode emojis
673
+ * ([Unicode codepoint table for LINE original emoji](https://developers.line.biz/media/messaging-api/emoji-list.pdf))
674
+ *
675
+ * Max: 5000 characters
676
+ */
677
+ text : string ;
678
+
679
+ /**
680
+ * One or more LINE emoji.
681
+ *
682
+ * Max: 20 LINE emoji
683
+ */
684
+ emojis ?: {
685
+ index : number ;
686
+ productId : string ;
687
+ emojiId : string ;
688
+ } [ ] ;
689
+ } ;
690
+
664
691
/**
665
692
* @see [Image message](https://developers.line.biz/en/reference/messaging-api/#image-message)
666
693
*/
@@ -753,22 +780,23 @@ export type LocationMessage = MessageCommon & {
753
780
/**
754
781
* @see [Sticker message](https://developers.line.biz/en/reference/messaging-api/#sticker-message)
755
782
*/
756
- export type StickerMessage = MessageCommon & {
757
- type : "sticker" ;
758
- /**
759
- * Package ID for a set of stickers.
760
- * For information on package IDs, see the
761
- * [Sticker list](https://developers.line.biz/media/messaging-api/sticker_list.pdf).
762
- */
763
- packageId : string ;
764
- /**
765
- * Sticker ID.
766
- * For a list of sticker IDs for stickers that can be sent with the Messaging
767
- * API, see the
768
- * [Sticker list](https://developers.line.biz/media/messaging-api/sticker_list.pdf).
769
- */
770
- stickerId : string ;
771
- } ;
783
+ export type StickerMessage = MessageCommon &
784
+ CanQuoteMessage & {
785
+ type : "sticker" ;
786
+ /**
787
+ * Package ID for a set of stickers.
788
+ * For information on package IDs, see the
789
+ * [Sticker list](https://developers.line.biz/media/messaging-api/sticker_list.pdf).
790
+ */
791
+ packageId : string ;
792
+ /**
793
+ * Sticker ID.
794
+ * For a list of sticker IDs for stickers that can be sent with the Messaging
795
+ * API, see the
796
+ * [Sticker list](https://developers.line.biz/media/messaging-api/sticker_list.pdf).
797
+ */
798
+ stickerId : string ;
799
+ } ;
772
800
773
801
/**
774
802
* @see [Imagemap message](https://developers.line.biz/en/reference/messaging-api/#imagemap-message)
0 commit comments