zaileys 0.28.98-beta → 0.29.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/.github/ISSUE_TEMPLATE/custom.md +10 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/README.md +1 -3
- package/dist/index.d.mts +193 -0
- package/dist/index.d.ts +193 -3
- package/dist/index.js +1 -6
- package/dist/index.mjs +1 -0
- package/package.json +12 -11
- package/tsup.config.ts +11 -0
- package/dist/Modules/Action.d.ts +0 -14
- package/dist/Modules/Action.js +0 -16
- package/dist/Modules/Client.d.ts +0 -36
- package/dist/Modules/Client.js +0 -274
- package/dist/Modules/Config.d.ts +0 -72
- package/dist/Modules/Config.js +0 -75
- package/dist/Modules/Utils.d.ts +0 -2
- package/dist/Modules/Utils.js +0 -26
- package/dist/Parser/Message.d.ts +0 -18
- package/dist/Parser/Message.js +0 -127
- package/dist/Types/Action.d.ts +0 -9
- package/dist/Types/Action.js +0 -2
- package/dist/Types/General.d.ts +0 -38
- package/dist/Types/General.js +0 -2
- package/dist/Types/Message.d.ts +0 -44
- package/dist/Types/Message.js +0 -2
package/dist/Types/General.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { MessageBaseContent } from "./Message";
|
|
2
|
-
export type AuthType = "pairing" | "qr";
|
|
3
|
-
export type CitationConfig = {
|
|
4
|
-
[key: string]: (() => string[]) | (() => Promise<string[]>);
|
|
5
|
-
};
|
|
6
|
-
export interface BaseClientConfig {
|
|
7
|
-
prefix?: string;
|
|
8
|
-
ignoreMe?: boolean;
|
|
9
|
-
authPath?: string;
|
|
10
|
-
authType: AuthType;
|
|
11
|
-
showLogs?: boolean;
|
|
12
|
-
autoMentions?: boolean;
|
|
13
|
-
autoOnline?: boolean;
|
|
14
|
-
autoRead?: boolean;
|
|
15
|
-
autoRejectCall?: boolean;
|
|
16
|
-
citation?: CitationConfig;
|
|
17
|
-
}
|
|
18
|
-
export interface PairingClientConfig extends BaseClientConfig {
|
|
19
|
-
authType: "pairing";
|
|
20
|
-
phoneNumber: number;
|
|
21
|
-
}
|
|
22
|
-
export interface QRClientConfig extends BaseClientConfig {
|
|
23
|
-
authType: "qr";
|
|
24
|
-
}
|
|
25
|
-
export type ClientConfig = PairingClientConfig | QRClientConfig;
|
|
26
|
-
export interface BaseContext {
|
|
27
|
-
}
|
|
28
|
-
export interface ConnectionContext extends BaseContext {
|
|
29
|
-
status: "connecting" | "open" | "close";
|
|
30
|
-
}
|
|
31
|
-
export interface ErrorContext extends BaseContext {
|
|
32
|
-
error: Error;
|
|
33
|
-
}
|
|
34
|
-
export interface ClientEvents<B> {
|
|
35
|
-
connection: (ctx: ConnectionContext) => void;
|
|
36
|
-
message: (ctx: MessageBaseContent<B>) => void;
|
|
37
|
-
error: (ctx: ErrorContext) => void;
|
|
38
|
-
}
|
package/dist/Types/General.js
DELETED
package/dist/Types/Message.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { proto, WABusinessProfile } from "@whiskeysockets/baileys";
|
|
4
|
-
import { MESSAGE_TYPE } from "../Modules/Config";
|
|
5
|
-
export type MessageTypeEnum = (typeof MESSAGE_TYPE)[keyof typeof MESSAGE_TYPE];
|
|
6
|
-
export type DeviceTypeEnum = "unknown" | "android" | "ios" | "desktop" | "web";
|
|
7
|
-
export type ExtractCitationType<T> = {
|
|
8
|
-
[K in keyof T as `is${Capitalize<K & string>}`]: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type MessageBaseContent<T> = {
|
|
11
|
-
fromMe: boolean;
|
|
12
|
-
chatId: string;
|
|
13
|
-
roomId: string;
|
|
14
|
-
roomImage: () => Promise<string | null>;
|
|
15
|
-
senderId: string;
|
|
16
|
-
senderName: string;
|
|
17
|
-
senderDevice: DeviceTypeEnum;
|
|
18
|
-
senderBio: () => Promise<string | null>;
|
|
19
|
-
senderImage: () => Promise<string | null>;
|
|
20
|
-
senderBusiness: () => Promise<WABusinessProfile | null>;
|
|
21
|
-
chatType: MessageTypeEnum;
|
|
22
|
-
timestamp: number;
|
|
23
|
-
text: string;
|
|
24
|
-
command: string;
|
|
25
|
-
mentions: string[] | null;
|
|
26
|
-
isGroup: boolean;
|
|
27
|
-
isStory: boolean;
|
|
28
|
-
isEdited: boolean;
|
|
29
|
-
isChannel: boolean;
|
|
30
|
-
isBroadcast: boolean;
|
|
31
|
-
isEphemeral: boolean;
|
|
32
|
-
isForwarded: boolean;
|
|
33
|
-
citation: {
|
|
34
|
-
[key: string]: unknown;
|
|
35
|
-
} | null;
|
|
36
|
-
media: {
|
|
37
|
-
buffer?: () => Promise<Buffer | null>;
|
|
38
|
-
stream?: () => Promise<Buffer | null>;
|
|
39
|
-
[key: string]: unknown;
|
|
40
|
-
} | null;
|
|
41
|
-
reply: MessageBaseContent<T> | null;
|
|
42
|
-
key: () => proto.IMessageKey;
|
|
43
|
-
message: () => proto.IWebMessageInfo;
|
|
44
|
-
};
|
package/dist/Types/Message.js
DELETED