mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat(labels): add label association types
This commit is contained in:
35
src/Types/LabelAssociation.ts
Normal file
35
src/Types/LabelAssociation.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/** Association type */
|
||||
export enum LabelAssociationType {
|
||||
Chat = 'label_jid',
|
||||
Message = 'label_message'
|
||||
}
|
||||
|
||||
export type LabelAssociationTypes = `${LabelAssociationType}`
|
||||
|
||||
/** Association for chat */
|
||||
export interface ChatLabelAssociation {
|
||||
type: LabelAssociationType.Chat
|
||||
chatId: string
|
||||
labelId: string
|
||||
}
|
||||
|
||||
/** Association for message */
|
||||
export interface MessageLabelAssociation {
|
||||
type: LabelAssociationType.Message
|
||||
chatId: string
|
||||
messageId: string
|
||||
labelId: string
|
||||
}
|
||||
|
||||
export type LabelAssociation = ChatLabelAssociation | MessageLabelAssociation
|
||||
|
||||
/** Body for add/remove chat label association action */
|
||||
export interface ChatLabelAssociationActionBody {
|
||||
labelId: string
|
||||
}
|
||||
|
||||
/** body for add/remove message label association action */
|
||||
export interface MessageLabelAssociationActionBody {
|
||||
labelId: string
|
||||
messageId: string
|
||||
}
|
||||
Reference in New Issue
Block a user