Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jajbshjahavahh
GitHub Repository: jajbshjahavahh/Gojo-Satoru
Path: blob/master/node_modules/@adiwajshing/baileys/lib/LegacySocket/groups.d_1.ts
2593 views
1
/// <reference types="node" />
2
/// <reference types="ws" />
3
import { GroupMetadata, LegacySocketConfig, ParticipantAction } from '../Types';
4
import { BinaryNode } from '../WABinary';
5
declare const makeGroupsSocket: (config: LegacySocketConfig) => {
6
groupMetadata: (jid: string, minimal: boolean) => Promise<GroupMetadata>;
7
/**
8
* Create a group
9
* @param title like, the title of the group
10
* @param participants people to include in the group
11
*/
12
groupCreate: (title: string, participants: string[]) => Promise<GroupMetadata>;
13
/**
14
* Leave a group
15
* @param jid the ID of the group
16
*/
17
groupLeave: (id: string) => Promise<void>;
18
/**
19
* Update the subject of the group
20
* @param {string} jid the ID of the group
21
* @param {string} title the new title of the group
22
*/
23
groupUpdateSubject: (id: string, title: string) => Promise<void>;
24
/**
25
* Update the group description
26
* @param {string} jid the ID of the group
27
* @param {string} title the new title of the group
28
*/
29
groupUpdateDescription: (jid: string, description: string) => Promise<{
30
status: number;
31
}>;
32
/**
33
* Update participants in the group
34
* @param jid the ID of the group
35
* @param participants the people to add
36
*/
37
groupParticipantsUpdate: (id: string, participants: string[], action: ParticipantAction) => Promise<string[]>;
38
/** Query broadcast list info */
39
getBroadcastListInfo: (jid: string) => Promise<GroupMetadata>;
40
groupInviteCode: (jid: string) => Promise<string>;
41
relayMessage: (message: import("../Types").WAProto.IWebMessageInfo, { waitForAck }?: {
42
waitForAck: boolean;
43
}) => Promise<void>;
44
generateUrlInfo: (text: string) => Promise<import("../Types").WAUrlInfo>;
45
messageInfo: (jid: string, messageID: string) => Promise<import("../Types").WAProto.IUserReceipt[]>;
46
downloadMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo, type?: "stream" | "buffer") => Promise<Buffer | import("stream").Readable>;
47
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<BinaryNode>;
48
fetchMessagesFromWA: (jid: string, count: number, cursor?: import("../Types").WAMessageCursor) => Promise<import("../Types").WAProto.WebMessageInfo[]>;
49
loadMessageFromWA: (jid: string, id: string) => Promise<import("../Types").WAProto.WebMessageInfo>;
50
searchMessages: (txt: string, inJid: string, count: number, page: number) => Promise<{
51
last: boolean;
52
messages: import("../Types").WAProto.WebMessageInfo[];
53
}>;
54
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions & {
55
waitForAck?: boolean;
56
}) => Promise<import("../Types").WAProto.WebMessageInfo>;
57
sendChatsQuery: (epoch: number) => Promise<string>;
58
profilePictureUrl: (jid: string, timeoutMs?: number) => Promise<string>;
59
chatRead: (fromMessage: import("../Types").WAProto.IMessageKey, count: number) => Promise<void>;
60
chatModify: (modification: import("../Types").ChatModification, jid: string, chatInfo: Pick<import("../Types").Chat, "mute" | "pin">, timestampNow?: number) => Promise<void | {
61
status: number;
62
}>;
63
onWhatsApp: (str: string) => Promise<{
64
exists: boolean;
65
jid: string;
66
isBusiness: boolean;
67
}>;
68
sendPresenceUpdate: (type: import("../Types").WAPresence, jid: string) => Promise<string>;
69
presenceSubscribe: (jid: string) => Promise<string>;
70
getStatus: (jid: string) => Promise<{
71
status: string;
72
}>;
73
setStatus: (status: string) => Promise<{
74
status: number;
75
}>;
76
updateBusinessProfile: (profile: import("../Types").WABusinessProfile) => Promise<void>;
77
updateProfileName: (name: string) => Promise<{
78
status: number;
79
pushname: string;
80
}>;
81
updateProfilePicture(jid: string, img: Buffer): Promise<void>;
82
blockUser: (jid: string, type?: "add" | "remove") => Promise<void>;
83
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile>;
84
state: import("../Types").ConnectionState;
85
authInfo: import("../Types").LegacyAuthenticationCreds;
86
ev: import("../Types").LegacyBaileysEventEmitter;
87
canLogin: () => boolean;
88
logout: () => Promise<void>;
89
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean, timeoutMs?: number) => Promise<void>;
90
type: "legacy";
91
ws: import("ws");
92
sendAdminTest: () => Promise<string>;
93
updateKeys: (info: {
94
encKey: Buffer;
95
macKey: Buffer;
96
}) => {
97
encKey: Buffer;
98
macKey: Buffer;
99
};
100
waitForSocketOpen: () => Promise<void>;
101
sendNode: ({ json, binaryTag, tag, longTag }: import("../Types").SocketSendMessageOptions) => Promise<string>;
102
generateMessageTag: (longTag?: boolean) => string;
103
waitForMessage: (tag: string, requiresPhoneConnection: boolean, timeoutMs?: number) => {
104
promise: Promise<any>;
105
cancelToken: () => void;
106
};
107
query: ({ json, timeoutMs, expect200, tag, longTag, binaryTag, requiresPhoneConnection }: import("../Types").SocketQueryOptions) => Promise<any>;
108
setQuery: (nodes: BinaryNode[], binaryTag?: import("../Types").WATag, tag?: string) => Promise<{
109
status: number;
110
}>;
111
currentEpoch: () => number;
112
end: (error: Error) => void;
113
};
114
export default makeGroupsSocket;
115
116