@deathnaitsa/wa-api 1.0.8 → 1.0.10
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/LICENSE +2 -21
- package/dist/Messaging/index.d.ts +4 -4
- package/dist/Socket/Socket.d.ts +1 -1
- package/dist/Socket/index.d.ts +1 -1
- package/dist/Socket/index.js +1 -1
- package/dist/Types/index.d.ts +1 -1
- package/dist/Utils/message-status.d.ts +1 -1
- package/dist/Utils/message-status.js +1 -1
- package/dist/Utils/phone-to-jid.js +1 -1
- package/dist/Utils/save-media.js +1 -1
- package/dist/whatsapp/index.js +1 -1
- package/package.json +3 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Muhammad Imam Choirudin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
Copyright (c) 2023 Deathnaitsa
|
|
2
|
+
Kopiergeschützt. Alle Rechte vorbehalten.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proto } from "@
|
|
1
|
+
import { proto } from "@deathnaitsa/wa-api";
|
|
2
2
|
import { SendMediaTypes, SendMessageTypes, SendReadTypes, SendTypingTypes } from "../Types";
|
|
3
3
|
export declare const sendTextMessage: ({ sessionId, to, text, isGroup, ...props }: SendMessageTypes) => Promise<proto.WebMessageInfo | undefined>;
|
|
4
4
|
export declare const sendImage: ({ sessionId, to, text, isGroup, media, ...props }: SendMediaTypes) => Promise<proto.WebMessageInfo | undefined>;
|
|
@@ -9,9 +9,9 @@ export declare const sendDocument: ({ sessionId, to, text, isGroup, media, filen
|
|
|
9
9
|
export declare function sendMessage(
|
|
10
10
|
sessionId: string,
|
|
11
11
|
jid: string,
|
|
12
|
-
content: import("@
|
|
13
|
-
options?: import("@
|
|
14
|
-
): Promise<import("@
|
|
12
|
+
content: import("@deathnaitsa/wa-api").AnyMessageContent,
|
|
13
|
+
options?: import("@deathnaitsa/wa-api").MiscMessageGenerationOptions
|
|
14
|
+
): Promise<import("@deathnaitsa/wa-api").proto.WebMessageInfo>;
|
|
15
15
|
|
|
16
16
|
export declare const kickusr: ({ sessionId, to, text }: SendMessageTypes) => Promise<proto.WebMessageInfo | undefined>;
|
|
17
17
|
export declare const del: ({ sessionId, to, id,sender }: SendMessageTypes) => Promise<proto.WebMessageInfo | undefined>;
|
package/dist/Socket/Socket.d.ts
CHANGED
package/dist/Socket/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WASocket } from "@
|
|
1
|
+
import { WASocket } from "@deathnaitsa/wa-api";
|
|
2
2
|
import type { MessageReceived, MessageUpdated, StartSessionParams } from "../Types";
|
|
3
3
|
export declare const startSession: (sessionId?: string, options?: StartSessionParams) => Promise<WASocket>;
|
|
4
4
|
/**
|
package/dist/Socket/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.onPairingCode = exports.onMessageUpdate = exports.onConnecting = exports.onDisconnected = exports.onConnected = exports.onQRUpdated = exports.onMessageReceived = exports.loadSessionsFromStorage = exports.getSession = exports.getAllSession = exports.deleteSession = exports.startWhatsapp = exports.startSession = void 0;
|
|
39
|
-
const baileys_1 = __importStar(require("@
|
|
39
|
+
const baileys_1 = __importStar(require("@deathnaitsa/wa-api"));
|
|
40
40
|
const pino_1 = __importDefault(require("pino"));
|
|
41
41
|
const path_1 = __importDefault(require("path"));
|
|
42
42
|
const fs_1 = __importDefault(require("fs"));
|
package/dist/Types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proto } from "@
|
|
1
|
+
import { proto } from "@deathnaitsa/wa-api";
|
|
2
2
|
import { MessageUpdated } from "../Types";
|
|
3
3
|
export declare const parseMessageStatusCodeToReadable: (code: proto.WebMessageInfo.Status) => MessageUpdated["messageStatus"];
|
|
4
4
|
//# sourceMappingURL=message-status.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseMessageStatusCodeToReadable = void 0;
|
|
4
|
-
const baileys_1 = require("@
|
|
4
|
+
const baileys_1 = require("@deathnaitsa/wa-api");
|
|
5
5
|
const parseMessageStatusCodeToReadable = (code) => {
|
|
6
6
|
if (code == baileys_1.proto.WebMessageInfo.Status.PENDING)
|
|
7
7
|
return "pending";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.phoneToJid = void 0;
|
|
4
4
|
const Error_1 = require("../Error");
|
|
5
|
-
const baileys_1 = require("@
|
|
5
|
+
const baileys_1 = require("@deathnaitsa/wa-api");
|
|
6
6
|
const isPhoneNumberValidCountry = (phone) => {
|
|
7
7
|
return Object.keys(baileys_1.PHONENUMBER_MCC).some((key) => {
|
|
8
8
|
return phone.startsWith(key);
|
package/dist/Utils/save-media.js
CHANGED
|
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.saveDocumentHandler = exports.saveVideoHandler = exports.saveImageHandler = void 0;
|
|
16
|
-
const baileys_1 = require("@
|
|
16
|
+
const baileys_1 = require("@deathnaitsa/wa-api");
|
|
17
17
|
const error_1 = __importDefault(require("./error"));
|
|
18
18
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
19
19
|
const saveMedia = (path, data) => __awaiter(void 0, void 0, void 0, function* () {
|
package/dist/whatsapp/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.Whatsapp = void 0;
|
|
39
|
-
const baileys_1 = __importStar(require("@
|
|
39
|
+
const baileys_1 = __importStar(require("@deathnaitsa/wa-api"));
|
|
40
40
|
const Defaults_1 = require("../Defaults");
|
|
41
41
|
const Socket_1 = require("../Socket/Socket");
|
|
42
42
|
const fs_1 = __importDefault(require("fs"));
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deathnaitsa/wa-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Multi Session Whatsapp Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"licenses": "MIT",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "git+https://github.com/DeathNaitsa/wa-api.git"
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"@adiwajshing/keyed-db": "^0.2.4",
|
|
28
29
|
"@hapi/boom": "^10.0.1",
|
|
29
|
-
"@
|
|
30
|
+
"@deathnaitsa/wa-api": "^1.0.0",
|
|
30
31
|
"mime": "^3.0.0",
|
|
31
32
|
"pino": "^9.6.0",
|
|
32
33
|
"qrcode-terminal": "^0.12.0"
|