File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,14 @@ export type EventBase = {
7878 * Source user, group, or room object with information about the source of the event.
7979 */
8080 source : EventSource ;
81+ /**
82+ * Webhook Event ID, an ID that uniquely identifies a webhook event
83+ */
84+ webhookEventId : string ;
85+ /**
86+ * Whether the webhook event is a redelivered one or not
87+ */
88+ deliveryContext : DeliveryContext ;
8189} ;
8290
8391export type EventSource = User | Group | Room ;
@@ -110,6 +118,8 @@ export type Room = {
110118 userId ?: string ;
111119} ;
112120
121+ export type DeliveryContext = { isRedelivery : boolean } ;
122+
113123export type ReplyableEvent = EventBase & { replyToken : string } ;
114124
115125/**
Original file line number Diff line number Diff line change @@ -26,12 +26,16 @@ describe("middleware", () => {
2626 groupId : "test_group_id" ,
2727 type : "group" ,
2828 } ,
29+ webhookEventId : "test_webhook_event_id" ,
30+ deliveryContext : {
31+ isRedelivery : false ,
32+ } ,
2933 timestamp : 0 ,
3034 mode : "active" ,
3135 type : "message" ,
3236 } ;
3337 const webhookSignature = {
34- "X-Line-Signature" : "GzU7H3qOXDzDD6cNcS/9otLzlLFxnYYriz62rNu5BDE =" ,
38+ "X-Line-Signature" : "Ey7AjSuSI2GfTDQHICAiRLLJ+GSMseISNYaQ6qXSjrU =" ,
3539 } ;
3640
3741 const http = ( headers : any = { ...webhookSignature } ) =>
You can’t perform that action at this time.
0 commit comments