superchats
Version:
SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp
102 lines (101 loc) • 5.05 kB
TypeScript
import { Paymentable, WAMediaUpload } from ".";
type Options = {
caption?: string;
viewOnce?: boolean;
msgId?: string;
ptv?: boolean;
filename?: string;
address?: string;
titleBtn?: string;
description?: string;
footerBtn?: string;
content?: any;
};
export type Types = {
sendText: (id: string, text: string, options?: Options) => {};
sendImage: (id: string, file: string, options?: Options) => {};
sendReaction: (id: string, text: string, msgId: string) => {};
sendVideo: (id: string, file: string, options?: Options) => {};
sendDocument: (id: string, file: string, options?: Options) => {};
sendLocation: (id: string, latitude: number, logitude: number, options?: Options) => {};
sendContact: (id: string, name: string, contact: string, options?: Options) => {};
sendSticker: (id: string, file: string, options?: Options) => {};
sendAudio: (id: string, file: string, options?: Options) => {};
sendVoice: (id: string, file: string, options?: Options) => {};
sendList: (id: string, btnName: string, sections: any, options?: Options) => {};
productCreate: (name: string, description: string, price: number, currency: string, retailerId?: string, url?: string, isHidden?: boolean, originCountryCode?: string | undefined, images?: WAMediaUpload[]) => {};
sendButtons: (id: string, title: string, buttons?: any, description?: string, type?: string, url?: string, footer?: string) => {};
sendPoll: (id: string, title: string, options: any) => {};
requestPayment: (id: string, options: Paymentable) => {};
onAnyMessage: (message: any) => {};
onAck: (message: any) => {};
onPresence: (message: any) => {};
syncHistory: (event: any) => {};
onDelete: (message: any) => {};
onParticipants: (message: any) => {};
onGroups: (message: any) => {};
forceStatusOn: () => {};
logout: () => {};
close: () => {};
getHostDevice: () => {};
getNumberProfile: (chatId: string) => {};
getProfileStatus: (chatId: string) => {};
getPicture: (chatId: string) => {};
getPresence: (chatId: string) => {};
setPicture: (chatId: string, file: string) => {};
archiveChat: (chatId: string, boolean: boolean) => {};
pinChat: (chatId: string, boolean: boolean) => {};
muteChat: (chatId: string, timer: timerMute) => {};
unmuteChat: (chatId: string) => {};
deleteChat: (chatId: string) => {};
blockContact: (chatId: string) => {};
unblockContact: (chatId: string) => {};
deleteMessageAll: (chatId: string, messageId: string) => {};
deleteMessageMe: (chatId: string, messageId: string) => {};
getBlockList: () => {};
getAllContacts: () => {};
getConnectionState: () => {};
getLabels: () => {};
getLabelsChats: () => {};
getLabelsMessages: () => {};
addLabelChat: (chatId: string, labelId: string) => {};
addLabelMessage: (chatId: string, msgId: string, labelId: string) => {};
removeLabelChat: (chatId: string, labelId: string) => {};
removeLabelMessage: (chatId: string, msgId: string, labelId: string) => {};
getChats: () => {};
getGroups: () => {};
setPresence: (chatId: string, type: string) => {};
createNews: (name: string, participants: any) => {};
setNewsPicture: (newsId: string, file: string) => {};
newsTitle: (newsId: string, title: string) => {};
newsDescription: (newsId: string, description: string) => {};
createCommunity: (name: string) => {};
createGroup: (name: string, participants: any) => {};
approveParticipantsGroup: (groupId: string, participants: any, action: "approve" | "reject") => {};
getParticipantsPending: (groupId: string) => {};
addParticipantsGroup: (groupId: string, participants: any) => {};
removeParticipantsGroup: (groupId: string, participants: any) => {};
addGroupAdmins: (groupId: string, participants: any) => {};
removeGroupAdmins: (groupId: string, participants: any) => {};
groupTitle: (groupId: string, title: string) => {};
groupDescription: (groupId: string, description: string) => {};
leaveGroup: (groupId: string) => {};
getGroupLink: (groupId: string) => {};
revokeGroupLink: (groupId: string) => {};
joinGroup: (code: string) => {};
infoGroup: (groupId: string) => {};
setGroupSettings: (groupId: string, option: listSettings, boolean: boolean) => {};
getChatMessages: (chatId: string, number: number) => {};
getChatAllMessages: (chatId: string) => {};
getMessageById: (chatId: string, idMsg: string) => {};
forwardMessage: (chatId: string, msgId: string, toId: string) => {};
markRead: (chatId: string) => {};
markReadAll: (msgId: string) => {};
sendTextStatus: (text: string, font: number, color: string) => {};
sendImageStatus: (file: string, text?: string) => {};
sendVideoStatus: (file: string, text?: string) => {};
deleteStatus: (msgId: string) => {};
};
type timerMute = "hour" | "week" | "ever";
type listSettings = "message" | "settings";
export {};