mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: format everything
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { Contact } from './Contact'
|
||||
|
||||
export type GroupParticipant = (Contact & { isAdmin?: boolean, isSuperAdmin?: boolean, admin?: 'admin' | 'superadmin' | null })
|
||||
export type GroupParticipant = Contact & {
|
||||
isAdmin?: boolean
|
||||
isSuperAdmin?: boolean
|
||||
admin?: 'admin' | 'superadmin' | null
|
||||
}
|
||||
|
||||
export type ParticipantAction = 'add' | 'remove' | 'promote' | 'demote' | 'modify'
|
||||
|
||||
@@ -9,51 +13,50 @@ export type RequestJoinAction = 'created' | 'revoked' | 'rejected'
|
||||
export type RequestJoinMethod = 'invite_link' | 'linked_group_join' | 'non_admin_add' | undefined
|
||||
|
||||
export interface GroupMetadata {
|
||||
id: string
|
||||
/** group uses 'lid' or 'pn' to send messages */
|
||||
addressingMode: string
|
||||
owner: string | undefined
|
||||
subject: string
|
||||
/** group subject owner */
|
||||
subjectOwner?: string
|
||||
/** group subject modification date */
|
||||
subjectTime?: number
|
||||
creation?: number
|
||||
desc?: string
|
||||
descOwner?: string
|
||||
descId?: string
|
||||
/** if this group is part of a community, it returns the jid of the community to which it belongs */
|
||||
linkedParent?: string
|
||||
/** is set when the group only allows admins to change group settings */
|
||||
restrict?: boolean
|
||||
/** is set when the group only allows admins to write messages */
|
||||
announce?: boolean
|
||||
/** is set when the group also allows members to add participants */
|
||||
memberAddMode?: boolean
|
||||
/** Request approval to join the group */
|
||||
joinApprovalMode?: boolean
|
||||
/** is this a community */
|
||||
isCommunity?: boolean
|
||||
/** is this the announce of a community */
|
||||
isCommunityAnnounce?: boolean
|
||||
/** number of group participants */
|
||||
size?: number
|
||||
// Baileys modified array
|
||||
participants: GroupParticipant[]
|
||||
ephemeralDuration?: number
|
||||
inviteCode?: string
|
||||
/** the person who added you to group or changed some setting in group */
|
||||
author?: string
|
||||
id: string
|
||||
/** group uses 'lid' or 'pn' to send messages */
|
||||
addressingMode: string
|
||||
owner: string | undefined
|
||||
subject: string
|
||||
/** group subject owner */
|
||||
subjectOwner?: string
|
||||
/** group subject modification date */
|
||||
subjectTime?: number
|
||||
creation?: number
|
||||
desc?: string
|
||||
descOwner?: string
|
||||
descId?: string
|
||||
/** if this group is part of a community, it returns the jid of the community to which it belongs */
|
||||
linkedParent?: string
|
||||
/** is set when the group only allows admins to change group settings */
|
||||
restrict?: boolean
|
||||
/** is set when the group only allows admins to write messages */
|
||||
announce?: boolean
|
||||
/** is set when the group also allows members to add participants */
|
||||
memberAddMode?: boolean
|
||||
/** Request approval to join the group */
|
||||
joinApprovalMode?: boolean
|
||||
/** is this a community */
|
||||
isCommunity?: boolean
|
||||
/** is this the announce of a community */
|
||||
isCommunityAnnounce?: boolean
|
||||
/** number of group participants */
|
||||
size?: number
|
||||
// Baileys modified array
|
||||
participants: GroupParticipant[]
|
||||
ephemeralDuration?: number
|
||||
inviteCode?: string
|
||||
/** the person who added you to group or changed some setting in group */
|
||||
author?: string
|
||||
}
|
||||
|
||||
|
||||
export interface WAGroupCreateResponse {
|
||||
status: number
|
||||
gid?: string
|
||||
participants?: [{ [key: string]: {} }]
|
||||
status: number
|
||||
gid?: string
|
||||
participants?: [{ [key: string]: {} }]
|
||||
}
|
||||
|
||||
export interface GroupModificationResponse {
|
||||
status: number
|
||||
participants?: { [key: string]: {} }
|
||||
status: number
|
||||
participants?: { [key: string]: {} }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user