talkyzap-wapp-api 1.0.23 → 1.0.24
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 +6 -1
- package/dist/call/functions/enableCallInterface.d.ts +19 -0
- package/dist/call/functions/index.d.ts +1 -0
- package/dist/chat/events/eventTypes.d.ts +11 -0
- package/dist/chat/events/index.d.ts +3 -2
- package/dist/chat/events/registerNewChat.d.ts +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/indexdb/functions/getMessagesFromRowId.d.ts +55 -0
- package/dist/indexdb/functions/index.d.ts +16 -0
- package/dist/indexdb/index.d.ts +16 -0
- package/dist/whatsapp/functions/index.d.ts +6 -0
- package/dist/whatsapp/functions/msgFindByDirection.d.ts +45 -0
- package/dist/whatsapp/functions/msgFindCallLog.d.ts +26 -0
- package/dist/whatsapp/functions/msgFindEvents.d.ts +27 -0
- package/dist/whatsapp/functions/msgFindMedia.d.ts +34 -0
- package/dist/whatsapp/functions/msgFindQuery.d.ts +12 -1
- package/dist/whatsapp/functions/msgFindSearch.d.ts +33 -0
- package/dist/whatsapp/functions/msgFindStarred.d.ts +27 -0
- package/dist/whatsapp/misc/MediaPrep.d.ts +28 -16
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
## 3.
|
|
1
|
+
## 3.22.1 (2026-02-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* getMessages (msgs.push is not a function) ([#3364](https://github.com/wppconnect-team/wa-js/issues/3364)) ([bdd2224](https://github.com/wppconnect-team/wa-js/commit/bdd222400e594e98b74cadc06a3a21eef3f2ecd8))
|
|
2
7
|
|
|
3
8
|
|
|
4
9
|
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
* Enable call interface from desktop app
|
|
18
|
+
*/
|
|
19
|
+
export declare function enableCallInterface(): Promise<void>;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export { accept } from './accept';
|
|
17
|
+
export { enableCallInterface } from './enableCallInterface';
|
|
17
18
|
export { end } from './end';
|
|
18
19
|
export { offer } from './offer';
|
|
19
20
|
export { reject, reject as rejectCall } from './reject';
|
|
@@ -27,6 +27,17 @@ export interface ChatEventTypes {
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
'chat.active_chat': ChatModel | null;
|
|
30
|
+
/**
|
|
31
|
+
* Triggered when a new chat is created
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```javascript
|
|
35
|
+
* WPP.on('chat.new_chat', (chat) => {
|
|
36
|
+
* // Your code
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
'chat.new_chat': ChatModel;
|
|
30
41
|
/**
|
|
31
42
|
* Triggered when new message is received
|
|
32
43
|
*
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import './registerAckMessageEvent';
|
|
17
17
|
import './registerActiveChatEvent';
|
|
18
|
+
import './registerEditedMessageEvent';
|
|
19
|
+
import './registerLabelEvent';
|
|
18
20
|
import './registerLiveLocationUpdateEvent';
|
|
21
|
+
import './registerNewChat';
|
|
19
22
|
import './registerNewMessageEvent';
|
|
20
23
|
import './registerPollEvent';
|
|
21
24
|
import './registerPresenceChange';
|
|
22
25
|
import './registerReactionsEvent';
|
|
23
26
|
import './registerRevokeMessageEvent';
|
|
24
|
-
import './registerLabelEvent';
|
|
25
|
-
import './registerEditedMessageEvent';
|
|
26
27
|
import './registerUnreadCountEvent';
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export * as contact from './contact';
|
|
|
31
31
|
export * as ev from './eventEmitter';
|
|
32
32
|
export * as community from './community';
|
|
33
33
|
export * as group from './group';
|
|
34
|
+
export * as indexdb from './indexdb';
|
|
34
35
|
export * as labels from './labels';
|
|
35
36
|
export * as profile from './profile';
|
|
36
37
|
export * as status from './status';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 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 GetMessagesFromRowIdOptions {
|
|
17
|
+
/**
|
|
18
|
+
* The minimum rowId (exclusive) to start fetching messages from
|
|
19
|
+
*/
|
|
20
|
+
minRowId: number;
|
|
21
|
+
/**
|
|
22
|
+
* Maximum number of messages to return
|
|
23
|
+
* @default 1000
|
|
24
|
+
* Use -1 to get all available messages (use with caution on large datasets)
|
|
25
|
+
*/
|
|
26
|
+
limit?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get messages from IndexedDB 'model-storage' database starting from a specific rowId
|
|
30
|
+
*
|
|
31
|
+
* This function queries the IndexedDB database directly using the rowId index,
|
|
32
|
+
* retrieving messages with rowId greater than the specified value.
|
|
33
|
+
* It's useful for pagination or fetching messages in chronological order.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```javascript
|
|
37
|
+
* // Get 1000 messages after rowId 999960610
|
|
38
|
+
* const messages = await WPP.indexdb.getMessagesFromRowId({ minRowId: 999960610 });
|
|
39
|
+
*
|
|
40
|
+
* // Get 500 messages after rowId 999960610
|
|
41
|
+
* const messages = await WPP.indexdb.getMessagesFromRowId({
|
|
42
|
+
* minRowId: 999960610,
|
|
43
|
+
* limit: 500
|
|
44
|
+
* });
|
|
45
|
+
*
|
|
46
|
+
* // Get all available messages after rowId (use with caution)
|
|
47
|
+
* const messages = await WPP.indexdb.getMessagesFromRowId({
|
|
48
|
+
* minRowId: 999960610,
|
|
49
|
+
* limit: -1
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
* @category IndexedDB
|
|
53
|
+
* @return Promise that resolves to an array of message objects from IndexedDB
|
|
54
|
+
*/
|
|
55
|
+
export declare function getMessagesFromRowId(options: GetMessagesFromRowIdOptions): Promise<any[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 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 { getMessagesFromRowId, GetMessagesFromRowIdOptions, } from './getMessagesFromRowId';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 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 * from './functions';
|
|
@@ -116,7 +116,13 @@ export * from './mexFetchNewsletterDirectorySearchResults';
|
|
|
116
116
|
export * from './mexJoinNewsletter';
|
|
117
117
|
export * from './mexLeaveNewsletter';
|
|
118
118
|
export * from './msgDataFromMsgModel';
|
|
119
|
+
export * from './msgFindByDirection';
|
|
120
|
+
export * from './msgFindCallLog';
|
|
121
|
+
export * from './msgFindEvents';
|
|
122
|
+
export * from './msgFindMedia';
|
|
119
123
|
export * from './msgFindQuery';
|
|
124
|
+
export * from './msgFindSearch';
|
|
125
|
+
export * from './msgFindStarred';
|
|
120
126
|
export * from './muteNewsletter';
|
|
121
127
|
export * from './processRawAudioVideo';
|
|
122
128
|
export * from './processRawMedia';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 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 { MsgKey } from '..';
|
|
17
|
+
import { ModelPropertiesContructor, MsgModel } from '../models';
|
|
18
|
+
export interface MsgFindDirectionParams {
|
|
19
|
+
anchor: MsgKey;
|
|
20
|
+
count: number;
|
|
21
|
+
}
|
|
22
|
+
export interface MsgFindDirectionResult {
|
|
23
|
+
messages: ModelPropertiesContructor<MsgModel>[];
|
|
24
|
+
status: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Find messages before a specific message
|
|
28
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
29
|
+
* @returns Object with messages array and status code (200 on success, 404 if anchor not found)
|
|
30
|
+
*/
|
|
31
|
+
export declare function msgFindBefore(params: MsgFindDirectionParams): Promise<MsgFindDirectionResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Find messages after a specific message
|
|
34
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
35
|
+
* @returns Object with messages array and status code (200 on success, 404 if anchor not found)
|
|
36
|
+
*/
|
|
37
|
+
export declare function msgFindAfter(params: MsgFindDirectionParams): Promise<MsgFindDirectionResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Find messages by direction (before or after)
|
|
40
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
41
|
+
* @returns Object with messages array and status code (200 on success, 404 if anchor not found)
|
|
42
|
+
*/
|
|
43
|
+
export declare function msgFindByDirection(params: MsgFindDirectionParams & {
|
|
44
|
+
direction: 'before' | 'after';
|
|
45
|
+
}): Promise<MsgFindDirectionResult>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { MsgKey } from '..';
|
|
17
|
+
import { ModelPropertiesContructor, MsgModel } from '../models';
|
|
18
|
+
export interface MsgFindCallLogParams {
|
|
19
|
+
count: number;
|
|
20
|
+
anchor?: MsgKey;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Find call log messages
|
|
24
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
25
|
+
*/
|
|
26
|
+
export declare function msgFindCallLog(params: MsgFindCallLogParams): Promise<ModelPropertiesContructor<MsgModel>[]>;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { MsgKey, Wid } from '..';
|
|
17
|
+
import { ModelPropertiesContructor, MsgModel } from '../models';
|
|
18
|
+
export interface MsgFindEventsParams {
|
|
19
|
+
count: number;
|
|
20
|
+
chat?: Wid;
|
|
21
|
+
anchor?: MsgKey;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Find event messages
|
|
25
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
26
|
+
*/
|
|
27
|
+
export declare function msgFindEvents(params: MsgFindEventsParams): Promise<ModelPropertiesContructor<MsgModel>[]>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { MsgKey } from '..';
|
|
17
|
+
import { ModelPropertiesContructor, MsgModel } from '../models';
|
|
18
|
+
export interface MsgFindMediaParams {
|
|
19
|
+
anchor?: MsgKey;
|
|
20
|
+
count: number;
|
|
21
|
+
mediaType?: 'url' | 'document' | 'allMedia' | 'allLinks' | 'allDocs';
|
|
22
|
+
direction?: 'before' | 'after';
|
|
23
|
+
chat: any;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Find media messages (images, videos, documents, links)
|
|
27
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
28
|
+
*/
|
|
29
|
+
export declare function msgFindMedia(params: MsgFindMediaParams): Promise<ModelPropertiesContructor<MsgModel>[] | {
|
|
30
|
+
messages: ModelPropertiesContructor<MsgModel>[];
|
|
31
|
+
docCount?: number;
|
|
32
|
+
linkCount?: number;
|
|
33
|
+
mediaCount?: number;
|
|
34
|
+
}>;
|
|
@@ -25,6 +25,17 @@ export interface MsgFindQueryParams {
|
|
|
25
25
|
media?: 'url' | 'document';
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Find messages using the legacy API
|
|
29
|
+
*
|
|
30
|
+
* @deprecated Since WhatsApp version 2.3000.1034162388
|
|
31
|
+
* Use the new dedicated functions instead:
|
|
32
|
+
* - {@link msgFindByDirection} for 'before' and 'after' queries
|
|
33
|
+
* - {@link msgFindMedia} for 'media' queries
|
|
34
|
+
* - {@link msgFindStarred} for 'star' queries
|
|
35
|
+
* - {@link msgFindCallLog} for 'call_log' queries
|
|
36
|
+
* - {@link msgFindEvents} for 'event' queries
|
|
37
|
+
* - {@link msgFindSearch} for 'search' queries
|
|
38
|
+
*
|
|
39
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1029x, < 2.3000.1034162388
|
|
29
40
|
*/
|
|
30
41
|
export declare function msgFindQuery(type: 'after' | 'before' | 'call_log' | 'event' | 'media' | 'search' | 'star', params: MsgFindQueryParams): Promise<ModelPropertiesContructor<MsgModel>[] | any>;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { MsgKey, Wid } from '..';
|
|
17
|
+
import { ModelPropertiesContructor, MsgModel } from '../models';
|
|
18
|
+
export interface MsgFindSearchParams {
|
|
19
|
+
searchTerm: string;
|
|
20
|
+
page?: number;
|
|
21
|
+
count: number;
|
|
22
|
+
remote?: Wid;
|
|
23
|
+
anchor?: MsgKey;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Search for messages with a search term
|
|
27
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
28
|
+
*/
|
|
29
|
+
export declare function msgFindSearch(params: MsgFindSearchParams): Promise<{
|
|
30
|
+
messages: ModelPropertiesContructor<MsgModel>[];
|
|
31
|
+
eof: boolean;
|
|
32
|
+
canceled: boolean;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { MsgKey, Wid } from '..';
|
|
17
|
+
import { ModelPropertiesContructor, MsgModel } from '../models';
|
|
18
|
+
export interface MsgFindStarredParams {
|
|
19
|
+
count: number;
|
|
20
|
+
chat?: Wid;
|
|
21
|
+
anchor?: MsgKey;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Find starred messages
|
|
25
|
+
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
26
|
+
*/
|
|
27
|
+
export declare function msgFindStarred(params: MsgFindStarredParams): Promise<ModelPropertiesContructor<MsgModel>[]>;
|
|
@@ -13,10 +13,28 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ChatModel, MediaDataModel, ModelPropertiesContructor, MsgModel } from '..';
|
|
16
|
+
import { ChatModel, MediaDataModel, ModelPropertiesContructor, MsgModel, OpaqueData } from '..';
|
|
17
17
|
import { OUTWARD_TYPES } from '../enums';
|
|
18
18
|
import { SendMsgResultObject } from '../types';
|
|
19
|
-
|
|
19
|
+
export type SendToChatProps = {
|
|
20
|
+
chat: ChatModel;
|
|
21
|
+
earlyUpload?: Promise<any>;
|
|
22
|
+
options?: {
|
|
23
|
+
caption?: string;
|
|
24
|
+
footer?: string;
|
|
25
|
+
quotedMsg?: MsgModel;
|
|
26
|
+
productMsgOptions?: ModelPropertiesContructor<MsgModel>;
|
|
27
|
+
type?: null | string;
|
|
28
|
+
mentionedJidList?: any;
|
|
29
|
+
isForwarded?: boolean;
|
|
30
|
+
forwardingScore?: any;
|
|
31
|
+
multicast?: any;
|
|
32
|
+
forwardedFromWeb?: boolean;
|
|
33
|
+
ctwaContext?: any;
|
|
34
|
+
isViewOnce?: boolean;
|
|
35
|
+
addEvenWhilePreparing?: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
20
38
|
/** @whatsapp 78986
|
|
21
39
|
* @whatsapp 778986 >= 2.2222.8
|
|
22
40
|
*/
|
|
@@ -31,20 +49,14 @@ export declare namespace MediaPrep {
|
|
|
31
49
|
}): MediaPrep;
|
|
32
50
|
class MediaPrep {
|
|
33
51
|
constructor(type: OUTWARD_TYPES, p: any);
|
|
34
|
-
sendToChat(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
forwardingScore?: any;
|
|
43
|
-
multicast?: any;
|
|
44
|
-
forwardedFromWeb?: boolean;
|
|
45
|
-
ctwaContext?: any;
|
|
46
|
-
isViewOnce?: boolean;
|
|
47
|
-
}): Promise<SendMsgResultObject>;
|
|
52
|
+
sendToChat(params: SendToChatProps): Promise<SendMsgResultObject>;
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated Use sendToChat(params: SendToChatProps) instead
|
|
55
|
+
*
|
|
56
|
+
* @param chat
|
|
57
|
+
* @param params
|
|
58
|
+
*/
|
|
59
|
+
sendToChat(chat: ChatModel, params: Omit<SendToChatProps, 'chat'>): Promise<SendMsgResultObject>;
|
|
48
60
|
waitForPrep(): Promise<MediaDataModel>;
|
|
49
61
|
}
|
|
50
62
|
}
|