100 lines
6.1 KiB
TypeScript
100 lines
6.1 KiB
TypeScript
import { Boom } from '@hapi/boom';
|
|
import { proto } from '../../WAProto/index.js';
|
|
import type { BotListInfo, ChatModification, MessageUpsertType, SocketConfig, WABusinessProfile, WAMediaUpload, WAMessage, WAPatchCreate, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyMessagesValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from '../Types/index.js';
|
|
import type { QuickReplyAction } from '../Types/Bussines.js';
|
|
import type { LabelActionBody } from '../Types/Label.js';
|
|
import { type BinaryNode } from '../WABinary/index.js';
|
|
import { USyncQuery } from '../WAUSync/index.js';
|
|
export declare const makeChatsSocket: (config: SocketConfig) => {
|
|
createCallLink: (type: "audio" | "video", event?: {
|
|
startTime: number;
|
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
getBotListV2: () => Promise<BotListInfo[]>;
|
|
processingMutex: {
|
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
};
|
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
[_: string]: string;
|
|
}>;
|
|
upsertMessage: (msg: WAMessage, type: MessageUpsertType) => Promise<void>;
|
|
appPatch: (patchCreate: WAPatchCreate) => Promise<void>;
|
|
sendPresenceUpdate: (type: WAPresence, toJid?: string) => Promise<void>;
|
|
presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
|
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
|
|
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
|
|
updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
|
|
width: number;
|
|
height: number;
|
|
}) => Promise<void>;
|
|
removeProfilePicture: (jid: string) => Promise<void>;
|
|
updateProfileStatus: (status: string) => Promise<void>;
|
|
updateProfileName: (name: string) => Promise<void>;
|
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
updateCallPrivacy: (value: WAPrivacyCallValue) => Promise<void>;
|
|
updateMessagesPrivacy: (value: WAPrivacyMessagesValue) => Promise<void>;
|
|
updateLastSeenPrivacy: (value: WAPrivacyValue) => Promise<void>;
|
|
updateOnlinePrivacy: (value: WAPrivacyOnlineValue) => Promise<void>;
|
|
updateProfilePicturePrivacy: (value: WAPrivacyValue) => Promise<void>;
|
|
updateStatusPrivacy: (value: WAPrivacyValue) => Promise<void>;
|
|
updateReadReceiptsPrivacy: (value: WAReadReceiptsValue) => Promise<void>;
|
|
updateGroupsAddPrivacy: (value: WAPrivacyGroupAddValue) => Promise<void>;
|
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
getBusinessProfile: (jid: string) => Promise<WABusinessProfile | void>;
|
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
chatModify: (mod: ChatModification, jid: string) => Promise<void>;
|
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
removeContact: (jid: string) => Promise<void>;
|
|
addLabel: (jid: string, labels: LabelActionBody) => Promise<void>;
|
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
star: (jid: string, messages: {
|
|
id: string;
|
|
fromMe?: boolean;
|
|
}[], star: boolean) => Promise<void>;
|
|
addOrEditQuickReply: (quickReply: QuickReplyAction) => Promise<void>;
|
|
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
type: "md";
|
|
ws: import("./Client/websocket.js").WebSocketClient;
|
|
ev: import("../Types/index.js").BaileysEventEmitter & {
|
|
process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
buffer(): void;
|
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
flush(): boolean;
|
|
isBuffering(): boolean;
|
|
};
|
|
authState: {
|
|
creds: import("../Types/index.js").AuthenticationCreds;
|
|
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
};
|
|
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
user: import("../Types/index.js").Contact | undefined;
|
|
generateMessageTag: () => string;
|
|
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
waitForSocketOpen: () => Promise<void>;
|
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
logout: (msg?: string) => Promise<void>;
|
|
end: (error: Error | undefined) => void;
|
|
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
|
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
digestKeyBundle: () => Promise<void>;
|
|
rotateSignedPreKey: () => Promise<void>;
|
|
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
|
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
jid: string;
|
|
exists: boolean;
|
|
}[] | undefined>;
|
|
};
|
|
//# sourceMappingURL=chats.d.ts.map
|