diff --git a/src/resources/messages/index.ts b/src/resources/messages/index.ts index ef55fad..3e16f0f 100644 --- a/src/resources/messages/index.ts +++ b/src/resources/messages/index.ts @@ -76,7 +76,7 @@ export class Messages { async setStatus( messageId: string, - status: MessageEngagementStatus, + status: Exclude, ): Promise { if (!messageId) { throw new Error(`Incomplete arguments. You must provide a 'messageId'`); @@ -92,7 +92,7 @@ export class Messages { async deleteStatus( messageId: string, - status: MessageEngagementStatus, + status: Exclude, ): Promise { if (!messageId) { throw new Error(`Incomplete arguments. You must provide a 'messageId'`); @@ -107,7 +107,11 @@ export class Messages { async batchSetStatus( messageIds: string[], - status: MessageEngagementStatus | "unseen" | "unread" | "unarchived", + status: + | Exclude + | "unseen" + | "unread" + | "unarchived", ): Promise { const { data } = await this.knock.post(`/v1/messages/batch/${status}`, { message_ids: messageIds, diff --git a/src/resources/messages/interfaces.ts b/src/resources/messages/interfaces.ts index 4740f99..3aa92c2 100644 --- a/src/resources/messages/interfaces.ts +++ b/src/resources/messages/interfaces.ts @@ -61,4 +61,9 @@ type MessageStatus = | "undelivered" | "not_sent"; -export type MessageEngagementStatus = "seen" | "read" | "archived"; +export type MessageEngagementStatus = + | "seen" + | "read" + | "archived" + | "interacted" + | "link_clicked";