alwaysaqioo 1.1.1 → 1.1.3

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.
Files changed (50) hide show
  1. package/README.md +9 -110
  2. package/WAProto/GenerateStatics.sh +4 -0
  3. package/WAProto/WAProto.proto +3344 -0
  4. package/WAProto/index.d.ts +37016 -0
  5. package/WAProto/index.js +79296 -118676
  6. package/WASignalGroup/GroupProtocol.js +1697 -0
  7. package/WASignalGroup/ciphertext_message.js +16 -0
  8. package/WASignalGroup/group_cipher.js +120 -0
  9. package/WASignalGroup/group_session_builder.js +46 -0
  10. package/WASignalGroup/index.js +5 -0
  11. package/WASignalGroup/keyhelper.js +21 -0
  12. package/WASignalGroup/protobufs.js +3 -0
  13. package/WASignalGroup/queue_job.js +69 -0
  14. package/WASignalGroup/sender_chain_key.js +50 -0
  15. package/WASignalGroup/sender_key_distribution_message.js +78 -0
  16. package/WASignalGroup/sender_key_message.js +92 -0
  17. package/WASignalGroup/sender_key_name.js +70 -0
  18. package/WASignalGroup/sender_key_record.js +56 -0
  19. package/WASignalGroup/sender_key_state.js +129 -0
  20. package/WASignalGroup/sender_message_key.js +39 -0
  21. package/lib/Defaults/baileys-version.json +1 -1
  22. package/lib/Defaults/index.js +2 -19
  23. package/lib/Signal/Group/x +1 -0
  24. package/lib/Socket/chats.d.ts +32 -215
  25. package/lib/Socket/chats.js +75 -155
  26. package/lib/Socket/groups.js +18 -18
  27. package/lib/Socket/index.js +0 -1
  28. package/lib/Socket/messages-send.d.ts +2 -2
  29. package/lib/Socket/messages-send.js +348 -327
  30. package/lib/Socket/newsletter.js +21 -100
  31. package/lib/Socket/socket.js +30 -65
  32. package/lib/Types/Newsletter.d.ts +86 -97
  33. package/lib/Types/Newsletter.js +32 -38
  34. package/lib/Utils/generics.js +33 -65
  35. package/lib/Utils/messages-media.js +57 -145
  36. package/lib/Utils/messages.js +14 -26
  37. package/lib/Utils/signal.js +46 -48
  38. package/lib/Utils/use-multi-file-auth-state.js +6 -45
  39. package/lib/Utils/validate-connection.js +65 -89
  40. package/lib/WABinary/constants.d.ts +24 -27
  41. package/lib/WABinary/encode.js +123 -160
  42. package/lib/WABinary/generic-utils.d.ts +1 -2
  43. package/lib/WABinary/generic-utils.js +43 -123
  44. package/lib/WAUSync/index.d.ts +3 -0
  45. package/lib/index.d.ts +0 -1
  46. package/lib/index.js +2 -12
  47. package/package.json +98 -100
  48. package/engine-requirements.js +0 -10
  49. package/lib/Socket/luxu.d.ts +0 -268
  50. package/lib/Socket/luxu.js +0 -591
package/package.json CHANGED
@@ -1,106 +1,104 @@
1
1
  {
2
- "name": "alwaysaqioo",
3
- "version": "1.1.1",
4
- "description": "WhatsApp Modified By QioExec",
5
- "keywords": [
6
- "whatsapp-baileys"
7
- ],
8
- "homepage": "https://github.com/WhiskeySockets/Baileys",
9
- "repository": {
10
- "url": "https://github.com/WhiskeySockets/Baileys"
2
+ "name": "alwaysaqioo",
3
+ "version": "1.1.3",
4
+ "description": "WhatsApp API",
5
+ "keywords": [
6
+ "whatsapp",
7
+ "js-whatsapp",
8
+ "whatsapp-api",
9
+ "whatsapp-web",
10
+ "whatsapp-chat",
11
+ "whatsapp-group",
12
+ "automation",
13
+ "multi-device"
14
+ ],
15
+ "homepage": "https://github.com/WhiskeySockets/Baileys",
16
+ "repository": {
17
+ "url": "git@github.com:WhiskeySockets/Baileys.git"
18
+ },
19
+ "license": "MIT",
20
+ "author": "Adhiraj Singh",
21
+ "main": "lib/index.js",
22
+ "types": "lib/index.d.ts",
23
+ "files": [
24
+ "lib/*",
25
+ "WAProto/*",
26
+ "WASignalGroup/*.js"
27
+ ],
28
+ "scripts": {
29
+ "build:all": "tsc && typedoc",
30
+ "build:docs": "typedoc",
31
+ "build:tsc": "tsc",
32
+ "changelog:last": "conventional-changelog -p angular -r 2",
33
+ "changelog:preview": "conventional-changelog -p angular -u",
34
+ "changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
35
+ "example": "node --inspect -r ts-node/register Example/example.ts",
36
+ "example:mobile": "node --inspect -r ts-node/register Example/example.ts --mobile",
37
+ "gen:protobuf": "sh WAProto/GenerateStatics.sh",
38
+ "lint": "eslint src --ext .js,.ts,.jsx,.tsx",
39
+ "lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
40
+ "release": "release-it",
41
+ "test": "jest"
42
+ },
43
+ "dependencies": {
44
+ "@adiwajshing/keyed-db": "^0.2.4",
45
+ "@hapi/boom": "^9.1.3",
46
+ "@cacheable/node-cache": "^1.4.0",
47
+ "audio-decode": "^2.1.3",
48
+ "axios": "^1.3.3",
49
+ "cache-manager": "4.0.1",
50
+ "chalk": "^4.1.2",
51
+ "futoin-hkdf": "^1.5.1",
52
+ "libphonenumber-js": "^1.10.20",
53
+ "libsignal": "npm:@shennmine/libsignal-node",
54
+ "music-metadata": "^7.12.3",
55
+ "node-cache": "^5.1.2",
56
+ "pino": "^7.0.0",
57
+ "protobufjs": "^7.2.4",
58
+ "uuid": "^9.0.0",
59
+ "ws": "^8.13.0"
60
+ },
61
+ "devDependencies": {
62
+ "@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
63
+ "@types/got": "^9.6.11",
64
+ "@types/jest": "^27.5.1",
65
+ "@types/node": "^16.0.0",
66
+ "@types/sharp": "^0.29.4",
67
+ "@types/ws": "^8.0.0",
68
+ "conventional-changelog-cli": "^2.2.2",
69
+ "eslint": "^8.0.0",
70
+ "jest": "^27.0.6",
71
+ "jimp": "^0.16.1",
72
+ "link-preview-js": "^3.0.0",
73
+ "open": "^8.4.2",
74
+ "qrcode-terminal": "^0.12.0",
75
+ "release-it": "^15.10.3",
76
+ "sharp": "^0.30.5",
77
+ "ts-jest": "^27.0.3",
78
+ "ts-node": "^10.8.1",
79
+ "typedoc": "^0.24.7",
80
+ "typescript": "^4.6.4",
81
+ "json": "^11.0.0"
82
+ },
83
+ "peerDependencies": {
84
+ "jimp": "^0.16.1",
85
+ "link-preview-js": "^3.0.0",
86
+ "qrcode-terminal": "^0.12.0",
87
+ "sharp": "^0.32.2"
88
+ },
89
+ "peerDependenciesMeta": {
90
+ "jimp": {
91
+ "optional": true
11
92
  },
12
- "license": "MIT",
13
- "author": "Alwaysaqioo- Impps",
14
- "main": "lib/index.js",
15
- "types": "lib/index.d.ts",
16
- "files": [
17
- "lib/*",
18
- "WAProto/*.js",
19
- "engine-requirements.js"
20
- ],
21
- "scripts": {
22
- "build:all": "tsc && typedoc",
23
- "build:docs": "typedoc",
24
- "build:tsc": "tsc",
25
- "changelog:last": "conventional-changelog -p angular -r 2",
26
- "changelog:preview": "conventional-changelog -p angular -u",
27
- "gen:protobuf": "sh WAProto/GenerateStatics.sh",
28
- "lint": "eslint src --ext .js,.ts,.jsx,.tsx",
29
- "lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
30
- "prepack": "",
31
- "prepare": "",
32
- "preinstall": "node ./engine-requirements.js",
33
- "release": "release-it",
34
- "test": "jest"
93
+ "link-preview-js": {
94
+ "optional": true
35
95
  },
36
- "dependencies": {
37
- "@adiwajshing/keyed-db": "^0.2.4",
38
- "@hapi/boom": "^9.1.3",
39
- "@cacheable/node-cache": "^1.4.0",
40
- "async-mutex": "^0.5.0",
41
- "audio-decode": "^2.1.3",
42
- "axios": "^1.3.3",
43
- "cache-manager": "4.0.1",
44
- "chalk": "^4.1.2",
45
- "futoin-hkdf": "^1.5.1",
46
- "libphonenumber-js": "^1.10.20",
47
- "lodash": "^4.17.21",
48
- "libsignal": "npm:@shennmine/libsignal-node",
49
- "music-metadata": "^7.12.3",
50
- "node-cache": "^5.1.2",
51
- "node-fetch": "^2.6.1",
52
- "pino": "^7.0.0",
53
- "protobufjs": "^7.2.4",
54
- "uuid": "^9.0.0",
55
- "ws": "^8.13.0"
96
+ "qrcode-terminal": {
97
+ "optional": true
56
98
  },
57
- "devDependencies": {
58
- "@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
59
- "@types/got": "^9.6.11",
60
- "@types/jest": "^27.5.1",
61
- "@types/node": "^16.0.0",
62
- "@types/sharp": "^0.29.4",
63
- "@types/ws": "^8.0.0",
64
- "conventional-changelog-cli": "^2.2.2",
65
- "eslint": "^8.0.0",
66
- "jest": "^27.0.6",
67
- "jimp": "^0.16.1",
68
- "link-preview-js": "^3.0.0",
69
- "open": "^8.4.2",
70
- "qrcode-terminal": "^0.12.0",
71
- "release-it": "^15.10.3",
72
- "sharp": "^0.30.5",
73
- "ts-jest": "^27.0.3",
74
- "ts-node": "^10.8.1",
75
- "typedoc": "^0.24.7",
76
- "typescript": "^4.6.4",
77
- "json": "^11.0.0"
78
- },
79
- "peerDependencies": {
80
- "jimp": "^0.16.1",
81
- "link-preview-js": "^3.0.0",
82
- "qrcode-terminal": "^0.12.0",
83
- "sharp": "^0.32.2"
84
- },
85
- "peerDependenciesMeta": {
86
- "jimp": {
87
- "optional": true
88
- },
89
- "link-preview-js": {
90
- "optional": true
91
- },
92
- "qrcode-terminal": {
93
- "optional": true
94
- },
95
- "sharp": {
96
- "optional": true
97
- }
98
- },
99
- "packageManager": "yarn@1.22.19",
100
- "engines": {
101
- "node": ">=20.0.0"
102
- },
103
- "bugs": {
104
- "url": "https://alwaysaqioo.my.id"
99
+ "sharp": {
100
+ "optional": true
105
101
  }
102
+ },
103
+ "packageManager": "yarn@1.22.19"
106
104
  }
@@ -1,10 +0,0 @@
1
- const major = parseInt(process.versions.node.split('.')[0], 10);
2
-
3
- if (major < 20) {
4
- console.error(
5
- `\n❌ This package requires Node.js 20+ to run reliably.\n` +
6
- ` You are using Node.js ${process.versions.node}.\n` +
7
- ` Please upgrade to Node.js 20+ to proceed.\n`
8
- );
9
- process.exit(1);
10
- }
@@ -1,268 +0,0 @@
1
- import { proto } from '../../WAProto';
2
-
3
- declare namespace imup {
4
- interface MediaUploadOptions {
5
- fileEncSha256?: Buffer;
6
- mediaType?: string;
7
- newsletter?: boolean;
8
- }
9
-
10
- type WAMediaUploadFunction = (
11
- stream: Buffer | NodeJS.ReadableStream,
12
- options?: MediaUploadOptions
13
- ) => Promise<{ url: string; directPath: string }>;
14
-
15
- interface WAMessageContentGenerationOptions {
16
- upload?: WAMediaUploadFunction;
17
- mediaCache?: any;
18
- options?: any;
19
- logger?: any;
20
- }
21
-
22
- interface StickerMessage {
23
- url: string;
24
- fileSha256: Buffer | string;
25
- fileEncSha256: Buffer | string;
26
- mediaKey: Buffer | string;
27
- mimetype: string;
28
- directPath: string;
29
- fileLength: number | string;
30
- mediaKeyTimestamp: number | string;
31
- isAnimated?: boolean;
32
- stickerSentTs?: number | string;
33
- isAvatar?: boolean;
34
- isAiSticker?: boolean;
35
- isLottie?: boolean;
36
- }
37
-
38
- interface PaymentMessage {
39
- amount: number;
40
- currency?: string;
41
- from?: string;
42
- expiry?: number;
43
- sticker?: { stickerMessage: StickerMessage };
44
- note?: string;
45
- background?: {
46
- id?: string;
47
- fileLength?: string;
48
- width?: number;
49
- height?: number;
50
- mimetype?: string;
51
- placeholderArgb?: number;
52
- textArgb?: number;
53
- subtextArgb?: number;
54
- };
55
- }
56
-
57
- interface ProductMessage {
58
- title: string;
59
- description: string;
60
- thumbnail: Buffer | { url: string };
61
- productId: string;
62
- retailerId: string;
63
- url: string;
64
- body?: string;
65
- footer?: string;
66
- buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
67
- priceAmount1000?: number | null;
68
- currencyCode?: string;
69
- }
70
-
71
- interface InteractiveMessage {
72
- title: string;
73
- footer?: string;
74
- thumbnail?: string;
75
- image?: string | Buffer | { url: string };
76
- video?: string | Buffer | { url: string };
77
- document?: Buffer;
78
- mimetype?: string;
79
- fileName?: string;
80
- jpegThumbnail?: Buffer;
81
- contextInfo?: {
82
- mentionedJid?: string[];
83
- forwardingScore?: number;
84
- isForwarded?: boolean;
85
- forwardedNewsletterMessageInfo?: proto.Message.ContextInfo.ForwardedNewsletterMessageInfo;
86
- externalAdReply?: {
87
- title?: string;
88
- body?: string;
89
- mediaType?: number;
90
- thumbnailUrl?: string;
91
- mediaUrl?: string;
92
- sourceUrl?: string;
93
- showAdAttribution?: boolean;
94
- renderLargerThumbnail?: boolean;
95
- [key: string]: any;
96
- };
97
- [key: string]: any;
98
- };
99
- externalAdReply?: {
100
- title?: string;
101
- body?: string;
102
- mediaType?: number;
103
- thumbnailUrl?: string;
104
- mediaUrl?: string;
105
- sourceUrl?: string;
106
- showAdAttribution?: boolean;
107
- renderLargerThumbnail?: boolean;
108
- [key: string]: any;
109
- };
110
- buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
111
- nativeFlowMessage?: {
112
- messageParamsJson?: string;
113
- buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
114
- [key: string]: any;
115
- };
116
- }
117
-
118
- interface AlbumItem {
119
- image?: { url: string; caption?: string };
120
- video?: { url: string; caption?: string };
121
- }
122
-
123
- interface EventMessageLocation {
124
- degreesLatitude: number;
125
- degreesLongitude: number;
126
- name: string;
127
- }
128
-
129
- interface EventMessage {
130
- isCanceled?: boolean;
131
- name: string;
132
- description: string;
133
- location?: EventMessageLocation;
134
- joinLink?: string;
135
- startTime?: string | number;
136
- endTime?: string | number;
137
- extraGuestsAllowed?: boolean;
138
- }
139
-
140
- interface PollVote {
141
- optionName: string;
142
- optionVoteCount: string | number;
143
- }
144
-
145
- interface PollResultMessage {
146
- name: string;
147
- pollVotes: PollVote[];
148
- newsletter?: {
149
- newsletterName: string;
150
- newsletterJid: string;
151
- };
152
- }
153
-
154
- interface StatusMentionMessage {
155
- image?: { url: string } | string;
156
- video?: { url: string } | string;
157
- mentions: string[];
158
- }
159
-
160
- interface OrderMessage {
161
- thumbnail?: Buffer | string,
162
- itemCount?: string | number,
163
- message: string,
164
- orderTitle: string,
165
- totalAmount1000?: string | number,
166
- totalCurrencyCode?: string
167
- }
168
-
169
- interface GroupStatus {
170
- message?: any;
171
- image?: string | Buffer | { url: string };
172
- video?: string | Buffer | { url: string };
173
- text?: string;
174
- caption?: string;
175
- document?: string | Buffer | { url: string };
176
- [key: string]: any;
177
- }
178
-
179
- interface MessageContent {
180
- requestPaymentMessage?: PaymentMessage;
181
- productMessage?: ProductMessage;
182
- interactiveMessage?: InteractiveMessage;
183
- albumMessage?: AlbumItem[];
184
- eventMessage?: EventMessage;
185
- pollResultMessage?: PollResultMessage;
186
- statusMentionMessage?: StatusMentionMessage;
187
- orderMessage?: OrderMessage;
188
- sender?: string;
189
- }
190
-
191
- interface MessageOptions {
192
- quoted?: proto.IWebMessageInfo;
193
- filter?: boolean;
194
- }
195
-
196
- interface Utils {
197
- prepareWAMessageMedia: (media: any, options: WAMessageContentGenerationOptions) => Promise<any>;
198
- generateWAMessageContent: (content: any, options: WAMessageContentGenerationOptions) => Promise<any>;
199
- generateWAMessageFromContent: (jid: string, content: any, options?: any) => Promise<any>;
200
- generateWAMessage: (jid: string, content: any, options?: any) => Promise<any>;
201
- generateMessageID: () => string;
202
- }
203
- }
204
-
205
- declare class imup {
206
- constructor(
207
- utils: imup.Utils,
208
- waUploadToServer: imup.WAMediaUploadFunction,
209
- relayMessageFn?: (jid: string, content: any, options?: any) => Promise<any>
210
- );
211
-
212
- detectType(content: imup.MessageContent): 'PAYMENT' | 'PRODUCT' | 'INTERACTIVE' | 'ALBUM' | 'EVENT' | 'POLL_RESULT' | 'STATUS_MENTION' | 'ORDER' | null;
213
-
214
- handlePayment(
215
- content: { requestPaymentMessage: imup.PaymentMessage },
216
- quoted?: proto.IWebMessageInfo
217
- ): Promise<{ requestPaymentMessage: proto.Message.RequestPaymentMessage }>;
218
-
219
- handleProduct(
220
- content: { productMessage: imup.ProductMessage },
221
- jid: string,
222
- quoted?: proto.IWebMessageInfo
223
- ): Promise<{ viewOnceMessage: proto.Message.ViewOnceMessage }>;
224
-
225
- handleInteractive(
226
- content: { interactiveMessage: imup.InteractiveMessage },
227
- jid: string,
228
- quoted?: proto.IWebMessageInfo
229
- ): Promise<{ interactiveMessage: proto.Message.InteractiveMessage }>;
230
-
231
- handleAlbum(
232
- content: { albumMessage: imup.AlbumItem[] },
233
- jid: string,
234
- quoted?: proto.IWebMessageInfo
235
- ): Promise<any>;
236
-
237
- handleEvent(
238
- content: { eventMessage: imup.EventMessage },
239
- jid: string,
240
- quoted?: proto.IWebMessageInfo
241
- ): Promise<any>;
242
-
243
- handlePollResult(
244
- content: { pollResultMessage: imup.PollResultMessage },
245
- jid: string,
246
- quoted?: proto.IWebMessageInfo
247
- ): Promise<any>;
248
-
249
- handleStMention(
250
- content: { statusMentionMessage: imup.StatusMentionMessage },
251
- jid: string,
252
- quoted?: proto.IWebMessageInfo
253
- ): Promise<any>;
254
-
255
- handleOrderMessage(
256
- content: { orderMessage: imup.OrderMessage },
257
- jid: string,
258
- quoted?: proto.IWebMessageInfo
259
- ): Promise<any>;
260
-
261
- handleGroupStory(
262
- content: { orderMessage: imup.GroupStatus },
263
- jid: string,
264
- quoted?: proto.IWebMessageInfo
265
- ): Promise<any>;
266
- }
267
-
268
- export = imup;