@wppconnect/wa-js 2.8.1 → 2.10.0
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/CHANGELOG.md +10 -0
- package/dist/chat/functions/getLastSeen.d.ts +25 -0
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/sendTextMessage.d.ts +31 -0
- package/dist/chat/functions/sendVCardContactMessage.d.ts +20 -0
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/patch.d.ts +16 -0
- package/dist/conn/functions/getPlatform.d.ts +25 -0
- package/dist/conn/functions/index.d.ts +2 -0
- package/dist/eventEmitter/eventEmitter.d.ts +1 -2
- package/dist/eventEmitter/eventTypes.d.ts +3 -1
- package/dist/eventEmitter/index.d.ts +195 -0
- package/dist/group/events/eventTypes.d.ts +53 -0
- package/dist/group/events/index.d.ts +16 -0
- package/dist/group/events/registerParticipantsChangedEvent.d.ts +16 -0
- package/dist/group/index.d.ts +1 -0
- package/dist/gtag/index.d.ts +1 -0
- package/dist/profile/functions/index.d.ts +1 -0
- package/dist/profile/functions/isBusiness.d.ts +24 -0
- package/dist/status/functions/postSendStatus.d.ts +17 -0
- package/dist/status/functions/sendRawStatus.d.ts +2 -0
- package/dist/whatsapp/collections/StatusV3Collection.d.ts +2 -2
- package/dist/whatsapp/functions/index.d.ts +2 -0
- package/dist/whatsapp/functions/mediaTypeFromProtobuf.d.ts +1 -1
- package/dist/whatsapp/functions/randomHex.d.ts +19 -0
- package/dist/whatsapp/functions/updateDBForGroupAction.d.ts +37 -0
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# 2.10.0 (2022-08-04)
|
|
2
|
+
|
|
3
|
+
# 2.9.0 (2022-07-31)
|
|
4
|
+
|
|
5
|
+
## 2.8.2 (2022-07-12)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- Fixed eventEmitter export ([2532a20](https://github.com/wppconnect-team/wa-js/commit/2532a200933d13f61e37fa3557bbb790798330bc))
|
|
10
|
+
|
|
1
11
|
## 2.8.1 (2022-07-11)
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Wid } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Get timestamp of last seen
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* WPP.chat.getLastSeen('[number]@c.us');
|
|
22
|
+
* ```
|
|
23
|
+
* @category Chat
|
|
24
|
+
*/
|
|
25
|
+
export declare function getLastSeen(chatId: string | Wid): Promise<number | boolean>;
|
|
@@ -22,6 +22,7 @@ export { downloadMedia } from './downloadMedia';
|
|
|
22
22
|
export { find } from './find';
|
|
23
23
|
export { generateMessageID } from './generateMessageID';
|
|
24
24
|
export { get } from './get';
|
|
25
|
+
export { getLastSeen } from './getLastSeen';
|
|
25
26
|
export { getMessageById } from './getMessageById';
|
|
26
27
|
export { getMessages, GetMessagesOptions } from './getMessages';
|
|
27
28
|
export { ChatListOptions, list } from './list';
|
|
@@ -18,6 +18,37 @@ export declare type TextMessageOptions = SendMessageOptions & MessageButtonsOpti
|
|
|
18
18
|
/**
|
|
19
19
|
* Send a text message
|
|
20
20
|
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```javascript
|
|
23
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Hello new contact', {
|
|
24
|
+
* createChat: true
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* // With Buttons
|
|
28
|
+
* WPP.chat.sendTextMessage('[number]@c.us', 'Hello', {
|
|
29
|
+
* useTemplateButtons: true, // False for legacy
|
|
30
|
+
* buttons: [
|
|
31
|
+
* {
|
|
32
|
+
* url: 'https://wppconnect.io/',
|
|
33
|
+
* text: 'WPPConnect Site'
|
|
34
|
+
* },
|
|
35
|
+
* {
|
|
36
|
+
* phoneNumber: '+55 11 22334455',
|
|
37
|
+
* text: 'Call me'
|
|
38
|
+
* },
|
|
39
|
+
* {
|
|
40
|
+
* id: 'your custom id 1',
|
|
41
|
+
* text: 'Some text'
|
|
42
|
+
* },
|
|
43
|
+
* {
|
|
44
|
+
* id: 'another id 2',
|
|
45
|
+
* text: 'Another text'
|
|
46
|
+
* }
|
|
47
|
+
* ],
|
|
48
|
+
* title: 'Title text', // Optional
|
|
49
|
+
* footer: 'Footer text' // Optional
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
21
52
|
* @category Message
|
|
22
53
|
*/
|
|
23
54
|
export declare function sendTextMessage(chatId: any, content: any, options?: TextMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -21,7 +21,27 @@ export interface VCardContact {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Send a VCard as message
|
|
24
|
+
* @example
|
|
25
|
+
* ```javascript
|
|
26
|
+
* // single contact
|
|
27
|
+
* WPP.chat.sendVCardContactMessage('[number]@c.us', {
|
|
28
|
+
* id: '123456@c.us',
|
|
29
|
+
* name: 'The Contact Name'
|
|
30
|
+
* });
|
|
24
31
|
*
|
|
32
|
+
* // multiple contacts
|
|
33
|
+
* WPP.chat.sendVCardContactMessage('[number]@c.us', [
|
|
34
|
+
* {
|
|
35
|
+
* id: '123456@c.us',
|
|
36
|
+
* name: 'The Contact Name'
|
|
37
|
+
* },
|
|
38
|
+
* {
|
|
39
|
+
* id: '456789@c.us',
|
|
40
|
+
* name: 'Another Contact'
|
|
41
|
+
* },
|
|
42
|
+
* ]);
|
|
43
|
+
*
|
|
44
|
+
* ```
|
|
25
45
|
* @category Message
|
|
26
46
|
*/
|
|
27
47
|
export declare function sendVCardContactMessage(chatId: any, contacts: string | Wid | VCardContact | (string | Wid | VCardContact)[], options?: SendMessageOptions): Promise<SendMessageReturn>;
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Check what's device platform is connected
|
|
18
|
+
* @returns android | iphone | wp
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* const getPlatform = WPP.conn.getPlatform();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function getPlatform(): any;
|
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
export { getAuthCode } from './getAuthCode';
|
|
17
17
|
export { getMyDeviceId } from './getMyDeviceId';
|
|
18
18
|
export { getMyUserId } from './getMyUserId';
|
|
19
|
+
export { getPlatform } from './getPlatform';
|
|
19
20
|
export { isAuthenticated } from './isAuthenticated';
|
|
20
21
|
export { isIdle } from './isIdle';
|
|
21
22
|
export { isMainLoaded } from './isMainLoaded';
|
|
23
|
+
export { isMainReady } from './isMainReady';
|
|
22
24
|
export { isMultiDevice } from './isMultiDevice';
|
|
23
25
|
export { logout } from './logout';
|
|
24
26
|
export { refreshQR } from './refreshQR';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { CancelablePromise, ConstructorOptions, event, EventAndListener, EventEmitter2, eventNS, GeneralEventEmitter, Listener, ListenerFn, ListenToOptions, OnceOptions, WaitForOptions } from 'eventemitter2';
|
|
17
|
-
interface WaitForFilter {
|
|
17
|
+
export interface WaitForFilter {
|
|
18
18
|
(...values: any[]): boolean;
|
|
19
19
|
}
|
|
20
20
|
export interface OnOptions {
|
|
@@ -170,4 +170,3 @@ export declare class EventEmitter<EventData> {
|
|
|
170
170
|
static once(emitter: EventEmitter2, event: string, options?: OnceOptions): CancelablePromise<any[]>;
|
|
171
171
|
static defaultMaxListeners: number;
|
|
172
172
|
}
|
|
173
|
-
export {};
|
|
@@ -17,12 +17,14 @@ import { BlocklistEventTypes } from '../blocklist/events/eventTypes';
|
|
|
17
17
|
import { CallEventTypes } from '../call/events/eventTypes';
|
|
18
18
|
import { ChatEventTypes } from '../chat/events/eventTypes';
|
|
19
19
|
import { ConnEventTypes } from '../conn/events/eventTypes';
|
|
20
|
+
import { GroupEventTypes } from '../group/events/eventTypes';
|
|
20
21
|
import { StatusEventTypes } from '../status/events/eventTypes';
|
|
21
22
|
import { WebpackEvents } from '../webpack/eventTypes';
|
|
22
23
|
export { BlocklistEventTypes } from '../blocklist/events/eventTypes';
|
|
23
24
|
export { CallEventTypes } from '../call/events/eventTypes';
|
|
24
25
|
export { ChatEventTypes } from '../chat/events/eventTypes';
|
|
25
26
|
export { ConnEventTypes } from '../conn/events/eventTypes';
|
|
27
|
+
export { GroupEventTypes } from '../group/events/eventTypes';
|
|
26
28
|
export { StatusEventTypes } from '../status/events/eventTypes';
|
|
27
29
|
export { WebpackEvents } from '../webpack/eventTypes';
|
|
28
|
-
export declare type EventTypes = BlocklistEventTypes & CallEventTypes & ChatEventTypes & ConnEventTypes & StatusEventTypes & WebpackEvents;
|
|
30
|
+
export declare type EventTypes = BlocklistEventTypes & CallEventTypes & ChatEventTypes & ConnEventTypes & GroupEventTypes & StatusEventTypes & WebpackEvents;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { EventEmitter } from './eventEmitter';
|
|
17
|
+
import { EventTypes } from './eventTypes';
|
|
18
|
+
export * from './eventTypes';
|
|
19
|
+
export declare const internalEv: EventEmitter<EventTypes>;
|
|
20
|
+
export declare const ev: EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
21
|
+
alfa: string;
|
|
22
|
+
beta: (from: number, to: string) => void;
|
|
23
|
+
}>;
|
|
24
|
+
export { EventEmitter };
|
|
25
|
+
export declare const addListener: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
26
|
+
alfa: string;
|
|
27
|
+
beta: (from: number, to: string) => void;
|
|
28
|
+
})[Name]>) => void) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
29
|
+
alfa: string;
|
|
30
|
+
beta: (from: number, to: string) => void;
|
|
31
|
+
}> | import("eventemitter2").Listener;
|
|
32
|
+
export declare const emit: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, ...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
33
|
+
alfa: string;
|
|
34
|
+
beta: (from: number, to: string) => void;
|
|
35
|
+
})[Name]>) => boolean;
|
|
36
|
+
export declare const emitAsync: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, ...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
37
|
+
alfa: string;
|
|
38
|
+
beta: (from: number, to: string) => void;
|
|
39
|
+
})[Name]>) => Promise<any[]>;
|
|
40
|
+
export declare const eventNames: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(nsAsArray?: boolean | undefined) => Name[];
|
|
41
|
+
export declare const getMaxListeners: () => number;
|
|
42
|
+
export declare const hasListeners: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => boolean;
|
|
43
|
+
export declare const listenTo: {
|
|
44
|
+
(target: import("eventemitter2").GeneralEventEmitter, events: string | symbol | import("eventemitter2").event[], options?: import("eventemitter2").ListenToOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
45
|
+
alfa: string;
|
|
46
|
+
beta: (from: number, to: string) => void;
|
|
47
|
+
}>;
|
|
48
|
+
(target: import("eventemitter2").GeneralEventEmitter, events: import("eventemitter2").event[], options?: import("eventemitter2").ListenToOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
49
|
+
alfa: string;
|
|
50
|
+
beta: (from: number, to: string) => void;
|
|
51
|
+
}>;
|
|
52
|
+
(target: import("eventemitter2").GeneralEventEmitter, events: object, options?: import("eventemitter2").ListenToOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
53
|
+
alfa: string;
|
|
54
|
+
beta: (from: number, to: string) => void;
|
|
55
|
+
}>;
|
|
56
|
+
};
|
|
57
|
+
export declare const listenerCount: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => number;
|
|
58
|
+
export declare const listeners: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => import("eventemitter2").ListenerFn[];
|
|
59
|
+
export declare const listenersAny: () => import("eventemitter2").ListenerFn[];
|
|
60
|
+
export declare const many: {
|
|
61
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
62
|
+
alfa: string;
|
|
63
|
+
beta: (from: number, to: string) => void;
|
|
64
|
+
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
65
|
+
objectify: true;
|
|
66
|
+
}): import("eventemitter2").Listener;
|
|
67
|
+
<Name_1 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_1, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
68
|
+
alfa: string;
|
|
69
|
+
beta: (from: number, to: string) => void;
|
|
70
|
+
})[Name_1]>) => void, options?: boolean | import("./eventEmitter").OnOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
71
|
+
alfa: string;
|
|
72
|
+
beta: (from: number, to: string) => void;
|
|
73
|
+
}>;
|
|
74
|
+
};
|
|
75
|
+
export declare const off: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
76
|
+
alfa: string;
|
|
77
|
+
beta: (from: number, to: string) => void;
|
|
78
|
+
})[Name]>) => void) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
79
|
+
alfa: string;
|
|
80
|
+
beta: (from: number, to: string) => void;
|
|
81
|
+
}>;
|
|
82
|
+
export declare const offAny: (listener: import("eventemitter2").ListenerFn) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
83
|
+
alfa: string;
|
|
84
|
+
beta: (from: number, to: string) => void;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const on: {
|
|
87
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
88
|
+
alfa: string;
|
|
89
|
+
beta: (from: number, to: string) => void;
|
|
90
|
+
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
91
|
+
objectify: true;
|
|
92
|
+
}): import("eventemitter2").Listener;
|
|
93
|
+
<Name_1 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_1, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
94
|
+
alfa: string;
|
|
95
|
+
beta: (from: number, to: string) => void;
|
|
96
|
+
})[Name_1]>) => void, options?: boolean | import("./eventEmitter").OnOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
97
|
+
alfa: string;
|
|
98
|
+
beta: (from: number, to: string) => void;
|
|
99
|
+
}>;
|
|
100
|
+
};
|
|
101
|
+
export declare const onAny: (listener: import("eventemitter2").EventAndListener) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
102
|
+
alfa: string;
|
|
103
|
+
beta: (from: number, to: string) => void;
|
|
104
|
+
}>;
|
|
105
|
+
export declare const once: {
|
|
106
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
107
|
+
alfa: string;
|
|
108
|
+
beta: (from: number, to: string) => void;
|
|
109
|
+
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
110
|
+
objectify: true;
|
|
111
|
+
}): import("eventemitter2").Listener;
|
|
112
|
+
<Name_1 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_1, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
113
|
+
alfa: string;
|
|
114
|
+
beta: (from: number, to: string) => void;
|
|
115
|
+
})[Name_1]>) => void, options?: true | import("./eventEmitter").OnOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
116
|
+
alfa: string;
|
|
117
|
+
beta: (from: number, to: string) => void;
|
|
118
|
+
}>;
|
|
119
|
+
};
|
|
120
|
+
export declare const prependAny: (listener: import("eventemitter2").EventAndListener) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
121
|
+
alfa: string;
|
|
122
|
+
beta: (from: number, to: string) => void;
|
|
123
|
+
}>;
|
|
124
|
+
export declare const prependListener: {
|
|
125
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
126
|
+
alfa: string;
|
|
127
|
+
beta: (from: number, to: string) => void;
|
|
128
|
+
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
129
|
+
objectify: true;
|
|
130
|
+
}): import("eventemitter2").Listener;
|
|
131
|
+
<Name_1 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_1, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
132
|
+
alfa: string;
|
|
133
|
+
beta: (from: number, to: string) => void;
|
|
134
|
+
})[Name_1]>) => void, options?: boolean | import("./eventEmitter").OnOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
135
|
+
alfa: string;
|
|
136
|
+
beta: (from: number, to: string) => void;
|
|
137
|
+
}>;
|
|
138
|
+
};
|
|
139
|
+
export declare const prependMany: {
|
|
140
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
141
|
+
alfa: string;
|
|
142
|
+
beta: (from: number, to: string) => void;
|
|
143
|
+
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
144
|
+
objectify: true;
|
|
145
|
+
}): import("eventemitter2").Listener;
|
|
146
|
+
<Name_1 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_1, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
147
|
+
alfa: string;
|
|
148
|
+
beta: (from: number, to: string) => void;
|
|
149
|
+
})[Name_1]>) => void, options?: boolean | import("./eventEmitter").OnOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
150
|
+
alfa: string;
|
|
151
|
+
beta: (from: number, to: string) => void;
|
|
152
|
+
}>;
|
|
153
|
+
};
|
|
154
|
+
export declare const prependOnceListener: {
|
|
155
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
156
|
+
alfa: string;
|
|
157
|
+
beta: (from: number, to: string) => void;
|
|
158
|
+
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
159
|
+
objectify: true;
|
|
160
|
+
}): import("eventemitter2").Listener;
|
|
161
|
+
<Name_1 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_1, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
162
|
+
alfa: string;
|
|
163
|
+
beta: (from: number, to: string) => void;
|
|
164
|
+
})[Name_1]>) => void, options?: boolean | import("./eventEmitter").OnOptions | undefined): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
165
|
+
alfa: string;
|
|
166
|
+
beta: (from: number, to: string) => void;
|
|
167
|
+
}>;
|
|
168
|
+
};
|
|
169
|
+
export declare const removeAllListeners: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
170
|
+
alfa: string;
|
|
171
|
+
beta: (from: number, to: string) => void;
|
|
172
|
+
}>;
|
|
173
|
+
export declare const removeListener: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
174
|
+
alfa: string;
|
|
175
|
+
beta: (from: number, to: string) => void;
|
|
176
|
+
})[Name]>) => void) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
177
|
+
alfa: string;
|
|
178
|
+
beta: (from: number, to: string) => void;
|
|
179
|
+
}>;
|
|
180
|
+
export declare const setMaxListeners: (n: number) => void;
|
|
181
|
+
export declare const stopListeningTo: (target?: import("eventemitter2").GeneralEventEmitter | undefined, event?: string | symbol | import("eventemitter2").event[] | undefined) => boolean;
|
|
182
|
+
export declare const waitFor: {
|
|
183
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timeout?: number | undefined): import("eventemitter2").CancelablePromise<import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
184
|
+
alfa: string;
|
|
185
|
+
beta: (from: number, to: string) => void;
|
|
186
|
+
})[Name]>>;
|
|
187
|
+
<Name_1 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_1, filter?: import("./eventEmitter").WaitForFilter | undefined): import("eventemitter2").CancelablePromise<import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
188
|
+
alfa: string;
|
|
189
|
+
beta: (from: number, to: string) => void;
|
|
190
|
+
})[Name_1]>>;
|
|
191
|
+
<Name_2 extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name_2, options?: import("eventemitter2").WaitForOptions | undefined): import("eventemitter2").CancelablePromise<import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
192
|
+
alfa: string;
|
|
193
|
+
beta: (from: number, to: string) => void;
|
|
194
|
+
})[Name_2]>>;
|
|
195
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface GroupEventTypes {
|
|
17
|
+
/**
|
|
18
|
+
* Triggered when some member of group has changed
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* WPP.on('group.participant_changed', (event) => {
|
|
23
|
+
* // Your code
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
'group.participant_changed': {
|
|
28
|
+
/**
|
|
29
|
+
* Author of action for add, remove, demote and promote members
|
|
30
|
+
*/
|
|
31
|
+
author?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Author name of action for add, remove, demote and promote members
|
|
34
|
+
*/
|
|
35
|
+
authorPushName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The group id
|
|
38
|
+
*/
|
|
39
|
+
groupId: string;
|
|
40
|
+
/**
|
|
41
|
+
* The action by member
|
|
42
|
+
*/
|
|
43
|
+
action: 'add' | 'remove' | 'demote' | 'promote' | 'leaver' | 'join';
|
|
44
|
+
/**
|
|
45
|
+
* The operation in group
|
|
46
|
+
*/
|
|
47
|
+
operation: 'add' | 'remove' | 'demote' | 'promote';
|
|
48
|
+
/**
|
|
49
|
+
* List of members
|
|
50
|
+
*/
|
|
51
|
+
participants: string[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import './registerParticipantsChangedEvent';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
package/dist/group/index.d.ts
CHANGED
package/dist/gtag/index.d.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Return the current logged user is Bussiness or not
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* WPP.profile.isBusiness();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function isBusiness(): boolean | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SendMessageReturn } from '../../chat';
|
|
17
|
+
export declare function postSendStatus(result: SendMessageReturn): void;
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import * as Chat from '../../chat';
|
|
17
|
+
import { MsgKey } from '../../whatsapp';
|
|
17
18
|
export interface SendStatusOptions {
|
|
18
19
|
waitForAck?: boolean;
|
|
20
|
+
messageId?: string | MsgKey;
|
|
19
21
|
}
|
|
20
22
|
export declare function sendRawStatus(message: Chat.RawMessage, options?: SendStatusOptions): Promise<Chat.SendMessageReturn>;
|
|
@@ -24,10 +24,10 @@ export declare class StatusV3Collection extends BaseCollection<StatusV3Model> {
|
|
|
24
24
|
sync(e?: any): any;
|
|
25
25
|
logMetrics(e?: any): any;
|
|
26
26
|
hasSynced(): boolean;
|
|
27
|
-
handleUpdate(
|
|
27
|
+
handleUpdate(rawMsg?: any, checksum?: any, isMsgUpdate?: boolean): any;
|
|
28
28
|
updateChecksum(e?: any): any;
|
|
29
29
|
addStatusMessages(e?: any, t?: any): any;
|
|
30
30
|
getUnexpired(e?: any): any;
|
|
31
|
-
getMyStatus():
|
|
31
|
+
getMyStatus(): StatusV3Model;
|
|
32
32
|
static comparator(): any;
|
|
33
33
|
}
|