zaileys 0.28.1-dev → 0.28.2-dev
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/README.md +24 -0
- package/dist/index.d.mts +29 -159
- package/dist/index.d.ts +29 -159
- package/dist/index.js +104 -1
- package/dist/index.mjs +104 -1
- package/package.json +22 -50
- package/storage/store.json +1 -0
- package/storage/temp/session/app-state-sync-key-AAAAAFNh.json +1 -0
- package/storage/temp/session/app-state-sync-key-AAAAAFNi.json +1 -0
- package/storage/temp/session/app-state-sync-version-critical_block.json +1 -0
- package/storage/temp/session/app-state-sync-version-critical_unblock_low.json +1 -0
- package/storage/temp/session/app-state-sync-version-regular.json +1 -0
- package/storage/temp/session/app-state-sync-version-regular_high.json +1 -0
- package/storage/temp/session/app-state-sync-version-regular_low.json +1 -0
- package/storage/temp/session/creds.json +1 -0
- package/storage/temp/session/pre-key-1.json +1 -0
- package/storage/temp/session/pre-key-10.json +1 -0
- package/storage/temp/session/pre-key-11.json +1 -0
- package/storage/temp/session/pre-key-12.json +1 -0
- package/storage/temp/session/pre-key-13.json +1 -0
- package/storage/temp/session/pre-key-14.json +1 -0
- package/storage/temp/session/pre-key-15.json +1 -0
- package/storage/temp/session/pre-key-16.json +1 -0
- package/storage/temp/session/pre-key-17.json +1 -0
- package/storage/temp/session/pre-key-19.json +1 -0
- package/storage/temp/session/pre-key-2.json +1 -0
- package/storage/temp/session/pre-key-20.json +1 -0
- package/storage/temp/session/pre-key-21.json +1 -0
- package/storage/temp/session/pre-key-22.json +1 -0
- package/storage/temp/session/pre-key-23.json +1 -0
- package/storage/temp/session/pre-key-24.json +1 -0
- package/storage/temp/session/pre-key-25.json +1 -0
- package/storage/temp/session/pre-key-26.json +1 -0
- package/storage/temp/session/pre-key-27.json +1 -0
- package/storage/temp/session/pre-key-28.json +1 -0
- package/storage/temp/session/pre-key-29.json +1 -0
- package/storage/temp/session/pre-key-3.json +1 -0
- package/storage/temp/session/pre-key-30.json +1 -0
- package/storage/temp/session/pre-key-4.json +1 -0
- package/storage/temp/session/pre-key-5.json +1 -0
- package/storage/temp/session/pre-key-6.json +1 -0
- package/storage/temp/session/pre-key-7.json +1 -0
- package/storage/temp/session/pre-key-8.json +1 -0
- package/storage/temp/session/pre-key-9.json +1 -0
- package/storage/temp/session/session-6285878897780.0.json +1 -0
- package/storage/temp/session/session-62858788977802.0.json +1 -0
- package/LICENSE +0 -21
- package/README.MD +0 -3
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## my-ts-project
|
|
2
|
+
|
|
3
|
+
bot wa
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
if you want to build package :
|
|
7
|
+
```bash
|
|
8
|
+
yarn build
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
if you want to generate docs :
|
|
12
|
+
```bash
|
|
13
|
+
yarn build
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
if you want to publish :
|
|
17
|
+
```bash
|
|
18
|
+
yarn build
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
This is auto generating **Node Package Manager** by [setup-npm](https://www.npmjs.com/package/setup-npm) developing by [zaadevofc](https://instagram.com/zaadevofc)
|
|
24
|
+
|
package/dist/index.d.mts
CHANGED
|
@@ -1,161 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
isGroup: boolean;
|
|
30
|
-
isViewOnce: boolean;
|
|
31
|
-
isForwarded: boolean;
|
|
32
|
-
isAuthor: boolean;
|
|
33
|
-
media: any;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type Prettify<T> = {
|
|
38
|
-
[K in keyof T]: T[K];
|
|
39
|
-
} & {};
|
|
40
|
-
type ClientProps = {
|
|
41
|
-
phoneNumber: number;
|
|
42
|
-
pairing?: boolean;
|
|
43
|
-
markOnline?: boolean;
|
|
44
|
-
showLogs?: boolean;
|
|
45
|
-
ignoreMe?: boolean;
|
|
46
|
-
authors?: number[];
|
|
47
|
-
};
|
|
48
|
-
type ActionsProps = {
|
|
49
|
-
message: MessageParserProps;
|
|
50
|
-
connection: ReadyParserProps;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
declare class Actions {
|
|
54
|
-
constructor({ pairing, markOnline, phoneNumber, showLogs, authors, ignoreMe }: ClientProps);
|
|
55
|
-
sendText(): string;
|
|
56
|
-
sendReply(): void;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
declare class Client extends Actions {
|
|
60
|
-
pairing: boolean;
|
|
61
|
-
markOnline: boolean;
|
|
62
|
-
phoneNumber: number;
|
|
63
|
-
showLogs: boolean;
|
|
64
|
-
authors: number[];
|
|
65
|
-
ignoreMe: boolean;
|
|
66
|
-
private socket;
|
|
67
|
-
private socked;
|
|
68
|
-
private spinners;
|
|
69
|
-
private initialized;
|
|
70
|
-
private initPromise;
|
|
71
|
-
constructor({ pairing, markOnline, phoneNumber, showLogs, authors, ignoreMe }: ClientProps);
|
|
72
|
-
private init;
|
|
73
|
-
on<T extends keyof ActionsProps>(actions: T, callback: (ctx: Prettify<ActionsProps[T]>) => void): Promise<void>;
|
|
74
|
-
sendMsg(text: string, { jid }: {
|
|
75
|
-
jid: string;
|
|
76
|
-
}): Promise<void>;
|
|
1
|
+
import * as baileys from '@whiskeysockets/baileys';
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
|
|
4
|
+
type EventName = 'open' | 'message' | 'close' | 'error';
|
|
5
|
+
declare class Client extends EventEmitter {
|
|
6
|
+
private conn;
|
|
7
|
+
private store;
|
|
8
|
+
private logger;
|
|
9
|
+
private spinner;
|
|
10
|
+
isRunning: boolean;
|
|
11
|
+
constructor();
|
|
12
|
+
private showBanner;
|
|
13
|
+
private start;
|
|
14
|
+
private setupProcessHandlers;
|
|
15
|
+
private initClient;
|
|
16
|
+
private setupPairingCode;
|
|
17
|
+
private handleConnection;
|
|
18
|
+
private startLoading;
|
|
19
|
+
private stopLoading;
|
|
20
|
+
private handleMessages;
|
|
21
|
+
private handleContactsUpdate;
|
|
22
|
+
private handleContactsUpsert;
|
|
23
|
+
private handleGroupsUpdate;
|
|
24
|
+
sendMessage(jid: string, content: baileys.AnyMessageContent, options?: baileys.MiscMessageGenerationOptions): Promise<baileys.WAProto.WebMessageInfo | undefined>;
|
|
25
|
+
on(eventName: EventName, callback: (...args: any[]) => void): this;
|
|
26
|
+
simulateMessage(data: any): void;
|
|
27
|
+
simulateClose(code: number, reason: string): void;
|
|
28
|
+
simulateError(error: Error): void;
|
|
77
29
|
}
|
|
78
30
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
declare function MessageParser(ctx: WAMessage[], config: ClientProps, store: ReturnType<typeof makeInMemoryStore>, state: AuthenticationState): Promise<MessageParserProps[] | undefined>;
|
|
82
|
-
|
|
83
|
-
declare function ConnectionConfig(props: ClientProps, state: AuthenticationState, store: ReturnType<typeof makeInMemoryStore>): UserFacingSocketConfig;
|
|
84
|
-
declare const MESSAGE_TYPE: {
|
|
85
|
-
text: string;
|
|
86
|
-
conversation: string;
|
|
87
|
-
imageMessage: string;
|
|
88
|
-
contactMessage: string;
|
|
89
|
-
locationMessage: string;
|
|
90
|
-
extendedTextMessage: string;
|
|
91
|
-
documentMessage: string;
|
|
92
|
-
audioMessage: string;
|
|
93
|
-
videoMessage: string;
|
|
94
|
-
protocolMessage: string;
|
|
95
|
-
contactsArrayMessage: string;
|
|
96
|
-
highlyStructuredMessage: string;
|
|
97
|
-
sendPaymentMessage: string;
|
|
98
|
-
liveLocationMessage: string;
|
|
99
|
-
requestPaymentMessage: string;
|
|
100
|
-
declinePaymentRequestMessage: string;
|
|
101
|
-
cancelPaymentRequestMessage: string;
|
|
102
|
-
templateMessage: string;
|
|
103
|
-
stickerMessage: string;
|
|
104
|
-
groupInviteMessage: string;
|
|
105
|
-
templateButtonReplyMessage: string;
|
|
106
|
-
productMessage: string;
|
|
107
|
-
deviceSentMessage: string;
|
|
108
|
-
listMessage: string;
|
|
109
|
-
viewOnceMessage: string;
|
|
110
|
-
orderMessage: string;
|
|
111
|
-
listResponseMessage: string;
|
|
112
|
-
ephemeralMessage: string;
|
|
113
|
-
invoiceMessage: string;
|
|
114
|
-
buttonsMessage: string;
|
|
115
|
-
buttonsResponseMessage: string;
|
|
116
|
-
paymentInviteMessage: string;
|
|
117
|
-
interactiveMessage: string;
|
|
118
|
-
reactionMessage: string;
|
|
119
|
-
stickerSyncRmrMessage: string;
|
|
120
|
-
interactiveResponseMessage: string;
|
|
121
|
-
pollCreationMessage: string;
|
|
122
|
-
pollUpdateMessage: string;
|
|
123
|
-
keepInChatMessage: string;
|
|
124
|
-
documentWithCaptionMessage: string;
|
|
125
|
-
requestPhoneNumberMessage: string;
|
|
126
|
-
viewOnceMessageV2: string;
|
|
127
|
-
encReactionMessage: string;
|
|
128
|
-
editedMessage: string;
|
|
129
|
-
viewOnceMessageV2Extension: string;
|
|
130
|
-
pollCreationMessageV2: string;
|
|
131
|
-
scheduledCallCreationMessage: string;
|
|
132
|
-
groupMentionedMessage: string;
|
|
133
|
-
pinInChatMessage: string;
|
|
134
|
-
pollCreationMessageV3: string;
|
|
135
|
-
scheduledCallEditMessage: string;
|
|
136
|
-
ptvMessage: string;
|
|
137
|
-
botInvokeMessage: string;
|
|
138
|
-
callLogMesssage: string;
|
|
139
|
-
encCommentMessage: string;
|
|
140
|
-
bcallMessage: string;
|
|
141
|
-
lottieStickerMessage: string;
|
|
142
|
-
eventMessage: string;
|
|
143
|
-
commentMessage: string;
|
|
144
|
-
newsletterAdminInviteMessage: string;
|
|
145
|
-
extendedTextMessageWithParentKey: string;
|
|
146
|
-
placeholderMessage: string;
|
|
147
|
-
encEventUpdateMessage: string;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
declare function loop(cb: () => void, ms: number): NodeJS.Timeout;
|
|
151
|
-
declare function jsonString(obj: any): any;
|
|
152
|
-
declare function jsonParse(obj: any): any;
|
|
153
|
-
declare function timeout(cb: () => void, ms: number): NodeJS.Timeout;
|
|
154
|
-
declare function delay(ms: number): Promise<unknown>;
|
|
155
|
-
declare const fetchJson: (uri: any, method?: any) => Promise<any>;
|
|
156
|
-
declare const postJson: (uri: any, data: any) => Promise<any>;
|
|
157
|
-
declare function getValuesByKeys(object: any, keys: string[]): any[];
|
|
158
|
-
declare function removeKeys(object: any, keys: string[]): any;
|
|
159
|
-
declare function getMessageType(obj: any): string[];
|
|
160
|
-
|
|
161
|
-
export { Actions, type ActionsProps, Client, type ClientProps, ConnectionConfig, InitDisplay, MESSAGE_TYPE, MessageParser, type Prettify, delay, fetchJson, getMessageType, getValuesByKeys, jsonParse, jsonString, loop, postJson, removeKeys, timeout };
|
|
31
|
+
export { Client };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,161 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
isGroup: boolean;
|
|
30
|
-
isViewOnce: boolean;
|
|
31
|
-
isForwarded: boolean;
|
|
32
|
-
isAuthor: boolean;
|
|
33
|
-
media: any;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type Prettify<T> = {
|
|
38
|
-
[K in keyof T]: T[K];
|
|
39
|
-
} & {};
|
|
40
|
-
type ClientProps = {
|
|
41
|
-
phoneNumber: number;
|
|
42
|
-
pairing?: boolean;
|
|
43
|
-
markOnline?: boolean;
|
|
44
|
-
showLogs?: boolean;
|
|
45
|
-
ignoreMe?: boolean;
|
|
46
|
-
authors?: number[];
|
|
47
|
-
};
|
|
48
|
-
type ActionsProps = {
|
|
49
|
-
message: MessageParserProps;
|
|
50
|
-
connection: ReadyParserProps;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
declare class Actions {
|
|
54
|
-
constructor({ pairing, markOnline, phoneNumber, showLogs, authors, ignoreMe }: ClientProps);
|
|
55
|
-
sendText(): string;
|
|
56
|
-
sendReply(): void;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
declare class Client extends Actions {
|
|
60
|
-
pairing: boolean;
|
|
61
|
-
markOnline: boolean;
|
|
62
|
-
phoneNumber: number;
|
|
63
|
-
showLogs: boolean;
|
|
64
|
-
authors: number[];
|
|
65
|
-
ignoreMe: boolean;
|
|
66
|
-
private socket;
|
|
67
|
-
private socked;
|
|
68
|
-
private spinners;
|
|
69
|
-
private initialized;
|
|
70
|
-
private initPromise;
|
|
71
|
-
constructor({ pairing, markOnline, phoneNumber, showLogs, authors, ignoreMe }: ClientProps);
|
|
72
|
-
private init;
|
|
73
|
-
on<T extends keyof ActionsProps>(actions: T, callback: (ctx: Prettify<ActionsProps[T]>) => void): Promise<void>;
|
|
74
|
-
sendMsg(text: string, { jid }: {
|
|
75
|
-
jid: string;
|
|
76
|
-
}): Promise<void>;
|
|
1
|
+
import * as baileys from '@whiskeysockets/baileys';
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
|
|
4
|
+
type EventName = 'open' | 'message' | 'close' | 'error';
|
|
5
|
+
declare class Client extends EventEmitter {
|
|
6
|
+
private conn;
|
|
7
|
+
private store;
|
|
8
|
+
private logger;
|
|
9
|
+
private spinner;
|
|
10
|
+
isRunning: boolean;
|
|
11
|
+
constructor();
|
|
12
|
+
private showBanner;
|
|
13
|
+
private start;
|
|
14
|
+
private setupProcessHandlers;
|
|
15
|
+
private initClient;
|
|
16
|
+
private setupPairingCode;
|
|
17
|
+
private handleConnection;
|
|
18
|
+
private startLoading;
|
|
19
|
+
private stopLoading;
|
|
20
|
+
private handleMessages;
|
|
21
|
+
private handleContactsUpdate;
|
|
22
|
+
private handleContactsUpsert;
|
|
23
|
+
private handleGroupsUpdate;
|
|
24
|
+
sendMessage(jid: string, content: baileys.AnyMessageContent, options?: baileys.MiscMessageGenerationOptions): Promise<baileys.WAProto.WebMessageInfo | undefined>;
|
|
25
|
+
on(eventName: EventName, callback: (...args: any[]) => void): this;
|
|
26
|
+
simulateMessage(data: any): void;
|
|
27
|
+
simulateClose(code: number, reason: string): void;
|
|
28
|
+
simulateError(error: Error): void;
|
|
77
29
|
}
|
|
78
30
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
declare function MessageParser(ctx: WAMessage[], config: ClientProps, store: ReturnType<typeof makeInMemoryStore>, state: AuthenticationState): Promise<MessageParserProps[] | undefined>;
|
|
82
|
-
|
|
83
|
-
declare function ConnectionConfig(props: ClientProps, state: AuthenticationState, store: ReturnType<typeof makeInMemoryStore>): UserFacingSocketConfig;
|
|
84
|
-
declare const MESSAGE_TYPE: {
|
|
85
|
-
text: string;
|
|
86
|
-
conversation: string;
|
|
87
|
-
imageMessage: string;
|
|
88
|
-
contactMessage: string;
|
|
89
|
-
locationMessage: string;
|
|
90
|
-
extendedTextMessage: string;
|
|
91
|
-
documentMessage: string;
|
|
92
|
-
audioMessage: string;
|
|
93
|
-
videoMessage: string;
|
|
94
|
-
protocolMessage: string;
|
|
95
|
-
contactsArrayMessage: string;
|
|
96
|
-
highlyStructuredMessage: string;
|
|
97
|
-
sendPaymentMessage: string;
|
|
98
|
-
liveLocationMessage: string;
|
|
99
|
-
requestPaymentMessage: string;
|
|
100
|
-
declinePaymentRequestMessage: string;
|
|
101
|
-
cancelPaymentRequestMessage: string;
|
|
102
|
-
templateMessage: string;
|
|
103
|
-
stickerMessage: string;
|
|
104
|
-
groupInviteMessage: string;
|
|
105
|
-
templateButtonReplyMessage: string;
|
|
106
|
-
productMessage: string;
|
|
107
|
-
deviceSentMessage: string;
|
|
108
|
-
listMessage: string;
|
|
109
|
-
viewOnceMessage: string;
|
|
110
|
-
orderMessage: string;
|
|
111
|
-
listResponseMessage: string;
|
|
112
|
-
ephemeralMessage: string;
|
|
113
|
-
invoiceMessage: string;
|
|
114
|
-
buttonsMessage: string;
|
|
115
|
-
buttonsResponseMessage: string;
|
|
116
|
-
paymentInviteMessage: string;
|
|
117
|
-
interactiveMessage: string;
|
|
118
|
-
reactionMessage: string;
|
|
119
|
-
stickerSyncRmrMessage: string;
|
|
120
|
-
interactiveResponseMessage: string;
|
|
121
|
-
pollCreationMessage: string;
|
|
122
|
-
pollUpdateMessage: string;
|
|
123
|
-
keepInChatMessage: string;
|
|
124
|
-
documentWithCaptionMessage: string;
|
|
125
|
-
requestPhoneNumberMessage: string;
|
|
126
|
-
viewOnceMessageV2: string;
|
|
127
|
-
encReactionMessage: string;
|
|
128
|
-
editedMessage: string;
|
|
129
|
-
viewOnceMessageV2Extension: string;
|
|
130
|
-
pollCreationMessageV2: string;
|
|
131
|
-
scheduledCallCreationMessage: string;
|
|
132
|
-
groupMentionedMessage: string;
|
|
133
|
-
pinInChatMessage: string;
|
|
134
|
-
pollCreationMessageV3: string;
|
|
135
|
-
scheduledCallEditMessage: string;
|
|
136
|
-
ptvMessage: string;
|
|
137
|
-
botInvokeMessage: string;
|
|
138
|
-
callLogMesssage: string;
|
|
139
|
-
encCommentMessage: string;
|
|
140
|
-
bcallMessage: string;
|
|
141
|
-
lottieStickerMessage: string;
|
|
142
|
-
eventMessage: string;
|
|
143
|
-
commentMessage: string;
|
|
144
|
-
newsletterAdminInviteMessage: string;
|
|
145
|
-
extendedTextMessageWithParentKey: string;
|
|
146
|
-
placeholderMessage: string;
|
|
147
|
-
encEventUpdateMessage: string;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
declare function loop(cb: () => void, ms: number): NodeJS.Timeout;
|
|
151
|
-
declare function jsonString(obj: any): any;
|
|
152
|
-
declare function jsonParse(obj: any): any;
|
|
153
|
-
declare function timeout(cb: () => void, ms: number): NodeJS.Timeout;
|
|
154
|
-
declare function delay(ms: number): Promise<unknown>;
|
|
155
|
-
declare const fetchJson: (uri: any, method?: any) => Promise<any>;
|
|
156
|
-
declare const postJson: (uri: any, data: any) => Promise<any>;
|
|
157
|
-
declare function getValuesByKeys(object: any, keys: string[]): any[];
|
|
158
|
-
declare function removeKeys(object: any, keys: string[]): any;
|
|
159
|
-
declare function getMessageType(obj: any): string[];
|
|
160
|
-
|
|
161
|
-
export { Actions, type ActionsProps, Client, type ClientProps, ConnectionConfig, InitDisplay, MESSAGE_TYPE, MessageParser, type Prettify, delay, fetchJson, getMessageType, getValuesByKeys, jsonParse, jsonString, loop, postJson, removeKeys, timeout };
|
|
31
|
+
export { Client };
|