/* Elaina Baileys maintained distribution. Upstream notices and license are preserved in LICENSE and NOTICE.md. */ export interface NewsletterAddOnGroup { jid?: string; messages: { serverId?: number; reaction?: { code?: string; t?: number }; pollVote?: { t?: number; hashes: string[] }; }[]; } export interface NewsletterEnforcement { enforcementId?: string; createdAt?: number; violationCategory?: string; source?: string; appealState?: string; appealCreatedAt?: number; appealReasonOptions: { reason?: string; label?: string }[]; appealFormUrl?: string; policy?: { headline?: string; subtitle?: string; overview?: string; explanation?: string; adminDisclaimer?: string; }; } export function makeNewsletterSocket(config: any): { executeWMexQuery: (variables: any, queryId: any, dataPath: any) => Promise; newsletterCreate: (name: any, description: any) => Promise<{ id: any; owner: undefined; name: any; creation_time: number; description: any; invite: any; subscribers: number; verification: any; picture: { id: any; directPath: any; }; mute_state: any; }>; newsletterUpdate: (jid: any, updates: any) => Promise; newsletterSubscribers: (jid: string, options?: { count?: number; }) => Promise<{ id?: string; phoneNumber?: string; displayName?: string; username?: string; role?: string; followTime?: number; }[]>; newsletterSubscribed: (options?: { fetchStatusMetadata?: boolean; fetchWamoSub?: boolean; }) => Promise; newsletterMetadata: (type: 'invite' | 'jid', key: string, options?: { fetchCreationTime?: boolean; fetchFullImage?: boolean; fetchViewerMetadata?: boolean; fetchPinnedMessages?: boolean; fetchStatusMetadata?: boolean; fetchWamoSub?: boolean; }) => Promise; newsletterFollow: (jid: any) => Promise; newsletterUnfollow: (jid: any) => Promise; newsletterUpdateUserSetting: (jid: string, type: 'ADMIN_NOTIFICATIONS' | 'FOLLOWER_NOTIFICATIONS', value: boolean) => Promise<{ id: string; state?: string; }>; newsletterMute: (jid: any) => Promise; newsletterUnmute: (jid: any) => Promise; newsletterUpdateName: (jid: any, name: any) => Promise; newsletterUpdateReactions: (jid: string, setting: 'ALL' | 'BASIC' | 'NONE' | 'BLOCKLIST') => Promise; newsletterUpdateDescription: (jid: any, description: any) => Promise; newsletterUpdatePicture: (jid: any, content: any) => Promise; newsletterRemovePicture: (jid: any) => Promise; newsletterReactMessage: (jid: any, serverId: any, reaction: any) => Promise; newsletterFetchMessages: (type: any, key: any, count?: number, after?: any, before?: any) => Promise<{ [k: string]: any; }[]>; newsletterFetchMessageUpdates: (jid: string, options?: { count?: number; since?: number; before?: string | number; after?: string | number; }) => Promise<{ jid: string; messages: { [k: string]: any }[]; }>; newsletterQuestionResponses: (jid: string, serverId: string | number, options?: { count?: number; before?: string; filter?: 'contacts' | 'replied' | 'starred'; searchText?: string; }) => Promise<{ jid: string; serverId: number; responses: { id?: string; t?: number; isSender: boolean; responseServerId?: string; sender: { lid?: string; notifyName?: string; pictureDirectPath?: string; }; replied: boolean; starred: boolean; message?: any; }[]; }>; newsletterMyAddOns: (options?: { limit?: number; jid?: string; }) => Promise; newsletterStatusMyAddOns: (options?: { limit?: number; jid?: string; }) => Promise; subscribeNewsletterUpdates: (jid: any) => Promise<{ duration: any; } | null>; newsletterAdminCount: (jid: any) => Promise; newsletterChangeOwner: (jid: any, newOwnerJid: any) => Promise; newsletterDemote: (jid: any, userJid: any) => Promise; newsletterDelete: (jid: any) => Promise; newsletterAdminCapabilities: (jid: string) => Promise; newsletterEnforcements: (jid: string, locale?: string) => Promise<{ adminProfiles: NewsletterEnforcement[]; profilePictureDeletions: NewsletterEnforcement[]; suspensions: NewsletterEnforcement[]; violatingMessages: NewsletterEnforcement[]; geoSuspensions: NewsletterEnforcement[]; }>; newsletterReports: (locale?: string) => Promise; newsletterAppealReport: (reportId: string | number, reason: string) => Promise; newsletterCanPostStatus: (jid: string) => Promise<{ canPost: boolean; canPostMusic: boolean; capabilities: string[]; }>; newsletterAdminInfo: (jid: string) => Promise<{ id: string; adminCount: number; adminProfile?: { id?: string; name?: string; picture?: { id?: string; directPath?: string; }; }; adminProfilesEnabled: boolean; }>; newsletterPollVoters: (jid: string, serverId: string | number, options?: { limit?: number; voteHash?: string; }) => Promise; newsletterReactionSenders: (jid: string, serverId: string | number) => Promise; newsletterPinMessages: (jid: string, serverIds: (string | number)[] | string | number) => Promise; newsletterUnpinMessages: (jid: string, serverIds: (string | number)[] | string | number) => Promise; newsletterLabelAiContent: (jid: string, serverId: string | number, messageType?: 'MESSAGE' | 'STATUS') => Promise; newsletterLabelPaidPartnership: (jid: string, serverId: string | number, messageType?: 'MESSAGE' | 'STATUS') => Promise; newsletterCreateAdminInvite: (jid: string, userJid: string) => Promise; newsletterRevokeAdminInvite: (jid: string, userJid: string) => Promise; newsletterAcceptAdminInvite: (jid: string) => Promise; newsletterDirectoryList: (options?: { view?: 'RECOMMENDED' | 'NEW' | 'POPULAR' | 'FEATURED' | 'TRENDING'; categories?: string[]; countryCodes?: string[]; limit?: number; cursorToken?: string; fetchStatusMetadata?: boolean; }) => Promise; newsletterDirectorySearch: (searchText: string, options?: { categories?: string[]; limit?: number; cursorToken?: string; fetchStatusMetadata?: boolean; }) => Promise; newsletterDirectoryCategories: (options?: { categories?: string[]; countryCode?: string; perCategoryLimit?: number; fetchStatusMetadata?: boolean; }) => Promise; newsletterSendPollVote: (jid: string, parentServerId: string | number, options: string[] | string) => Promise<{ id: string; }>; newsletterInsights: (jid: string, options?: { metrics?: string[]; }) => Promise; newsletterFollowers: (jid: string, options?: { count?: number; }) => Promise; newsletterPendingAdminInvites: (jid: string) => Promise<{ id?: string; phoneNumber?: string; }[]>; newsletterQuestionResponseState: (jid: string, serverId: string | number, responseServerId: string | number, state: 'HIDDEN' | 'VISIBLE') => Promise; newsletterRecommended: (options?: { limit?: number; countryCodes?: string[]; fetchStatusMetadata?: boolean; }) => Promise; newsletterSimilar: (jid: string, options?: { limit?: number; countryCodes?: string[]; fetchStatusMetadata?: boolean; }) => Promise; groupQuery: (jid: any, type: any, content: any) => Promise; groupMetadata: (jid: any) => Promise<{ id: any; notify: any; addressingMode: any; subject: any; subjectOwner: any; subjectOwnerPn: any; subjectOwnerUsername: any; subjectTime: number; size: any; creation: number; owner: string | undefined; ownerPn: string | undefined; ownerUsername: any; owner_country_code: any; desc: any; descId: any; descOwner: string | undefined; descOwnerPn: string | undefined; descOwnerUsername: any; descTime: number | undefined; linkedParent: any; restrict: boolean; announce: boolean; isCommunity: boolean; isCommunityAnnounce: boolean; joinApprovalMode: boolean; memberAddMode: boolean; participants: any; ephemeralDuration: number | undefined; }>; groupCreate: (subject: any, participants: any) => Promise<{ id: any; notify: any; addressingMode: any; subject: any; subjectOwner: any; subjectOwnerPn: any; subjectOwnerUsername: any; subjectTime: number; size: any; creation: number; owner: string | undefined; ownerPn: string | undefined; ownerUsername: any; owner_country_code: any; desc: any; descId: any; descOwner: string | undefined; descOwnerPn: string | undefined; descOwnerUsername: any; descTime: number | undefined; linkedParent: any; restrict: boolean; announce: boolean; isCommunity: boolean; isCommunityAnnounce: boolean; joinApprovalMode: boolean; memberAddMode: boolean; participants: any; ephemeralDuration: number | undefined; }>; groupLeave: (id: any) => Promise; groupUpdateSubject: (jid: any, subject: any) => Promise; groupRequestParticipantsList: (jid: any) => Promise; groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise; groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise; groupUpdateDescription: (jid: any, description: any) => Promise; groupInviteCode: (jid: any) => Promise; groupRevokeInvite: (jid: any) => Promise; groupAcceptInvite: (code: any) => Promise; groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise; groupAcceptInviteV4: (...args: any[]) => Promise; groupGetInviteInfo: (code: any) => Promise<{ id: any; notify: any; addressingMode: any; subject: any; subjectOwner: any; subjectOwnerPn: any; subjectOwnerUsername: any; subjectTime: number; size: any; creation: number; owner: string | undefined; ownerPn: string | undefined; ownerUsername: any; owner_country_code: any; desc: any; descId: any; descOwner: string | undefined; descOwnerPn: string | undefined; descOwnerUsername: any; descTime: number | undefined; linkedParent: any; restrict: boolean; announce: boolean; isCommunity: boolean; isCommunityAnnounce: boolean; joinApprovalMode: boolean; memberAddMode: boolean; participants: any; ephemeralDuration: number | undefined; }>; groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise; groupSettingUpdate: (jid: any, setting: any) => Promise; groupMemberAddMode: (jid: any, mode: any) => Promise; groupJoinApprovalMode: (jid: any, mode: any) => Promise; groupFetchAllParticipating: () => Promise<{}>; findUserId: (pnLid: any) => Promise<{ lid: undefined; phoneNumber: undefined; }>; serverProps: { privacyTokenOn1to1: boolean; profilePicPrivacyToken: boolean; lidTrustedTokenIssueToLid: boolean; }; createCallLink: (type: any, event: any, timeoutMs: any) => Promise; getBotListV2: () => Promise<{ jid: any; personaId: any; }[]>; messageMutex: { mutex(code: any): any; }; receiptMutex: { mutex(code: any): any; }; appStatePatchMutex: { mutex(code: any): any; }; notificationMutex: { mutex(code: any): any; }; fetchPrivacySettings: (force?: boolean) => Promise; upsertMessage: (...args: any[]) => Promise; appPatch: (patchCreate: any) => Promise; sendPresenceUpdate: (type: any, toJid: any) => Promise; presenceSubscribe: (toJid: any) => Promise; profilePictureUrl: (jid: any, type?: string, timeoutMs?: number, shouldIncludeTcToken?: boolean) => Promise; fetchBlocklist: () => Promise; fetchStatus: (...jids: any[]) => Promise; fetchDisappearingDuration: (...jids: any[]) => Promise; updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise; removeProfilePicture: (jid: any) => Promise; updateProfileStatus: (status: any) => Promise; updateProfileName: (name: any) => Promise; updateBlockStatus: (jid: any, action: any) => Promise; reportSpam: (jid: string, options?: { flow?: string; source?: string; subject?: string; isKnownChat?: boolean; }) => Promise<{ jid: string; flow: string; reported: true; node: any; }>; updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise; updateCallPrivacy: (value: any) => Promise; updateMessagesPrivacy: (value: any) => Promise; updateLastSeenPrivacy: (value: any) => Promise; updateOnlinePrivacy: (value: any) => Promise; updateProfilePicturePrivacy: (value: any) => Promise; updateStatusPrivacy: (value: any) => Promise; updateReadReceiptsPrivacy: (value: any) => Promise; updateGroupsAddPrivacy: (value: any) => Promise; updateDefaultDisappearingMode: (duration: any) => Promise; getBusinessProfile: (jid: any) => Promise<{ wid: any; address: any; description: any; website: any[]; email: any; category: any; business_hours: { timezone: any; business_config: any; }; } | undefined>; resyncAppState: (...args: any[]) => Promise; chatModify: (mod: any, jid: any) => Promise; cleanDirtyBits: (type: any, fromTimestamp: any) => Promise; addOrEditContact: (jid: any, contact: any) => Promise; removeContact: (jid: any) => Promise; placeholderResendCache: any; addLabel: (jid: any, labels: any) => Promise; addChatLabel: (jid: any, labelId: any) => Promise; removeChatLabel: (jid: any, labelId: any) => Promise; addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise; removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise; star: (jid: any, messages: any, star: any) => Promise; addOrEditQuickReply: (quickReply: any) => Promise; removeQuickReply: (timestamp: any) => Promise; type: string; ws: import("./Client/websocket.js").WebSocketClient; ev: { process(handler: any): () => void; emit(event: any, evData: any): any; isBuffering(): boolean; buffer: () => void; flush: () => boolean; createBufferedFunction(work: any): (...args: any[]) => Promise; on: (...args: any[]) => any; off: (...args: any[]) => any; removeAllListeners: (...args: any[]) => any; destroy(): void; }; authState: { creds: any; keys: { get: (type: any, ids: any) => Promise; set: (data: any) => Promise; isInTransaction: () => boolean; transaction: (work: any, key: any) => Promise; }; }; signalRepository: any; user: any; generateMessageTag: () => string; query: (node: any, timeoutMs: any) => Promise; waitForMessage: (msgId: any, timeoutMs?: any) => Promise; waitForSocketOpen: () => Promise; sendRawMessage: (data: any) => Promise; sendNode: (frame: any) => Promise; logout: (msg: any) => Promise; end: (error: any) => Promise; registerSocketEndHandler: (handler: any) => void; onUnexpectedError: (err: any, msg: any) => void; uploadPreKeys: (count?: number) => Promise; uploadPreKeysToServerIfRequired: () => Promise; digestKeyBundle: () => Promise; rotateSignedPreKey: () => Promise; requestPairingCode: (phoneNumber: any, customPairingCode: any) => Promise; updateServerTimeOffset: ({ attrs }: { attrs: any; }) => void; sendUnifiedSession: () => Promise; wamBuffer: import("../index.js").BinaryInfo; waitForConnectionUpdate: (check: any, timeoutMs: any) => Promise; sendWAMBuffer: (wamBuffer: any) => Promise; executeUSyncQuery: (usyncQuery: any) => Promise; onWhatsApp: (...phoneNumber: any[]) => Promise; onWhatsAppUsername: (...usernames: any[]) => Promise; getUsernames: (...jids: any[]) => Promise; fetchAccountReachoutTimelock: () => Promise<{ isActive: boolean; timeEnforcementEnds: Date | undefined; enforcementType: any; }>; fetchNewChatMessageCap: () => Promise; };