talkyzap-wapp-api 1.0.9 → 1.0.11

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 CHANGED
@@ -1,4 +1,9 @@
1
- ## 3.14.2 (2024-11-14)
1
+ ## 3.16.6 (2025-03-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Fixed sendPixKeyMessage function ([1f57e78](https://github.com/wppconnect-team/wa-js/commit/1f57e785827ce11f4fd704dd6219aba814c1dd53))
2
7
 
3
8
 
4
9
 
@@ -56,6 +56,7 @@ export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
56
56
  export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
57
57
  export { prepareRawMessage } from './prepareRawMessage';
58
58
  export { requestPhoneNumber } from './requestPhoneNumber';
59
+ export { sendCatalogMessage } from './sendCatalogMessage';
59
60
  export { OrderItems, OrderMessageOptions, sendChargeMessage, } from './sendChargeMessage';
60
61
  export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
61
62
  export { sendEventMessage } from './sendEventMessage';
@@ -69,6 +70,7 @@ export { sendReactionToMessage } from './sendReactionToMessage';
69
70
  export { ScheduledCallMessageOptions, sendScheduledCallMessage, } from './sendScheduledCallMessage';
70
71
  export { sendTextMessage, TextMessageOptions } from './sendTextMessage';
71
72
  export { sendVCardContactMessage, VCardContact, } from './sendVCardContactMessage';
73
+ export { setChatList } from './setChatList';
72
74
  export { setInputText } from './setInputText';
73
75
  export { setNotes } from './setNotes';
74
76
  export { starMessage, StarMessageReturn } from './starMessage';
@@ -0,0 +1,43 @@
1
+ /*!
2
+ * Copyright 2024 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
+ import { SendMessageOptions, SendMessageReturn } from '..';
18
+ export interface CatalogMessageOptions extends SendMessageOptions {
19
+ jpegThumbnail?: string;
20
+ title?: string;
21
+ description?: string;
22
+ textMessage?: string;
23
+ }
24
+ /**
25
+ * Send catalog message
26
+ *
27
+ * @example
28
+ * ```javascript
29
+ * WPP.chat.sendCatalogMessage(
30
+ * '[number]@c.us',
31
+ * '[number]@c.us',
32
+ * {
33
+ * title: 'My Catalog',
34
+ * description: 'This is my catalog',
35
+ * textMessage: 'Check out my catalog',
36
+ * jpegThumbnail: 'data:image/jpeg;base64,...'
37
+ * }
38
+ * );
39
+ * ```
40
+ *
41
+ * @category Message
42
+ */
43
+ export declare function sendCatalogMessage(chatToSend: string | Wid, chatFromCatalog: string | Wid, opts: CatalogMessageOptions): Promise<SendMessageReturn>;
@@ -0,0 +1,42 @@
1
+ /*!
2
+ * Copyright 2023 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 declare enum FilterChatListTypes {
17
+ ALL = "all",
18
+ CUSTOM = "custom",
19
+ UNREAD = "unread",
20
+ PERSONAL = "personal",
21
+ NON_CONTACT = "non_contact",
22
+ GROUP = "group",
23
+ FAVORITES = "favorites",
24
+ CONTACT = "contact",
25
+ BUSINESS = "business",
26
+ BROADCAST = "broadcast",
27
+ LABELS = "labels",
28
+ ASSIGNED_TO_YOU = "assigned_to_you"
29
+ }
30
+ export declare function setChatList(type: FilterChatListTypes, ids?: string | string[]): Promise<{
31
+ type: FilterChatListTypes;
32
+ list?: string[];
33
+ }>;
34
+ /**
35
+ * Custom Wrap function with the callback
36
+ *
37
+ * This is not the best way to fix the wrapper for this function;
38
+ * I need to improve it soon. However, the idea is to make it work.
39
+ * Due to the lack of time and the urgency in the WhatsApp groups,
40
+ * I'm committing it this way to provide a quick solution.
41
+ */
42
+ export declare function wrapShouldAppearFunction<TFunc extends (...args: any[]) => any>(func: TFunc, callback: (func: TFunc, ...args: Parameters<TFunc>) => ReturnType<TFunc>): TFunc;
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright 2025 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 { LabelModel } from '../whatsapp';
17
+ export declare function patchLabelCount(label: LabelModel): number;
@@ -58,6 +58,10 @@ export declare function getIsGroup(contact: ContactModel): any;
58
58
  * @whatsapp 660666 >= 2.2327.4
59
59
  */
60
60
  export declare function getIsBroadcast(contact: ContactModel): any;
61
+ /**
62
+ * @whatsapp 660666 >= 2.2327.4
63
+ */
64
+ export declare function getIsNewsletter(contact: ContactModel): any;
61
65
  /**
62
66
  * @whatsapp 660666 >= 2.2327.4
63
67
  */
@@ -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
+ * @whatsapp WAWebCreateChat >= 2.3000.0
18
+ */
19
+ export declare function createChat(chatParams: any, context: any, options: any, extra: any): Promise<any>;
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Copyright 2025 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 '../misc';
17
+ /**
18
+ * @whatsapp WAWebApiChat >= 2.3000.0
19
+ */
20
+ export declare function getChatRecordByAccountLid(a: Wid): Promise<any>;
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Copyright 2025 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 '../misc';
17
+ /**
18
+ * @whatsapp WAWebLidMigrationUtils >= 2.3000.0
19
+ */
20
+ export declare function getEnforceCurrentLid(chatId: Wid): any;
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Copyright 2025 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 '../misc';
17
+ /**
18
+ * @whatsapp WAWebChatGetExistingBridge >= 2.3000.0
19
+ */
20
+ export declare function getExisting(chatId: Wid): Promise<any>;
@@ -18,7 +18,7 @@ import { ChatModel, MsgModel } from '../models';
18
18
  /**
19
19
  * @whatsapp 738599 >= 2.2242.5
20
20
  */
21
- export declare function getSearchContext(chat: ChatModel, msg: MsgModel | MsgKey, options?: {
21
+ export declare function getSearchContext(chat: ChatModel | string, msg: MsgModel | MsgKey | string, options?: {
22
22
  isQuotedMsgAvailable: boolean;
23
23
  }): {
24
24
  collection: MsgLoad;
@@ -26,6 +26,7 @@ export * from './changeOptInStatusForExternalWebBeta';
26
26
  export * from './collections';
27
27
  export * from './colorIndexToHex';
28
28
  export * from './contactFunctions';
29
+ export * from './createChat';
29
30
  export * from './createEventCallLink';
30
31
  export * from './createFanoutMsgStanza';
31
32
  export * from './createGroup';
@@ -56,11 +57,14 @@ export * from './genLinkDeviceCodeForPhoneNumber';
56
57
  export * from './genMinimalLinkPreview';
57
58
  export * from './getABPropConfigValue';
58
59
  export * from './getAsMms';
60
+ export * from './getChatRecordByAccountLid';
59
61
  export * from './getCommunityParticipants';
60
62
  export * from './getCountryShortcodeByPhone';
61
63
  export * from './getCurrentLid';
64
+ export * from './getEnforceCurrentLid';
62
65
  export * from './getEphemeralFields';
63
66
  export * from './getErrorCodeFromLogoutReason';
67
+ export * from './getExisting';
64
68
  export * from './getFanOutList';
65
69
  export * from './getGroupSenderKeyList';
66
70
  export * from './getGroupSizeLimit';
@@ -88,6 +92,7 @@ export * from './handleSingleMsg';
88
92
  export * from './initializeAltDeviceLinking';
89
93
  export * from './isAnimatedWebp';
90
94
  export * from './isAuthenticated';
95
+ export * from './isFilterExcludedFromSearchTreatmentInInboxFlow';
91
96
  export * from './isRegistered';
92
97
  export * from './isUnreadTypeMsg';
93
98
  export * from './isWid';
@@ -116,6 +121,7 @@ export * from './randomId';
116
121
  export * from './removeStatusMessage';
117
122
  export * from './resetGroupInviteCode';
118
123
  export * from './revokeStatus';
124
+ export * from './selectChatForOneOnOneMessage';
119
125
  export * from './sendClear';
120
126
  export * from './sendCreateCommunity';
121
127
  export * from './sendCreateGroup';
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright 2024 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 declare function isFilterExcludedFromSearchTreatmentInInboxFlow(type?: string): void;
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2025 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
+ * @whatsapp 973480 >= 2.2241.6
18
+ */
19
+ export declare function selectChatForOneOnOneMessage(params: any): Promise<any>;
@@ -73,7 +73,11 @@ export declare class CmdClass extends EventEmitter {
73
73
  toastPosition?: any;
74
74
  }): void;
75
75
  _openChat(e?: any, t?: any): void;
76
- openChatAt(chat: ChatModel, context: ReturnType<typeof getSearchContext>): Promise<boolean>;
76
+ openChatAt(chat: ChatModel, msgContext: ReturnType<typeof getSearchContext>): Promise<boolean>;
77
+ openChatAt(params?: {
78
+ chat: ChatModel;
79
+ msgContext: ReturnType<typeof getSearchContext>;
80
+ }): Promise<boolean>;
77
81
  openChatFromUnread(chat: ChatModel): Promise<boolean>;
78
82
  openChatBottom(chat: ChatModel): Promise<boolean>;
79
83
  scrollToPtt(e?: any): void;
@@ -166,6 +170,7 @@ export declare class CmdClass extends EventEmitter {
166
170
  showMerchantDetailsEntityTypePopup(e?: any, t?: any): void;
167
171
  showCountrySelector(e?: any, t?: any, r?: any): void;
168
172
  toggleStickerMaker(): void;
173
+ setActiveFilter(type?: 'unread' | 'favorites' | 'personal' | 'assigned_to_you' | 'labels'): Promise<void>;
169
174
  }
170
175
  /** @whatsapp 88102
171
176
  * @whatsapp 81572 >= 2.2218.4
@@ -0,0 +1,23 @@
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
+ /** @whatsapp 15688
17
+ */
18
+ export declare namespace Lid1X1MigrationUtils {
19
+ function isLidMigrated(): boolean;
20
+ function isSyncdSessionMigrated(): boolean;
21
+ function setIsLidMigrated(a?: any): any;
22
+ function shouldApplyNonMigratedMessagingRules(): any;
23
+ }
@@ -27,6 +27,7 @@ export declare class Wid {
27
27
  equals(wid: unknown): boolean;
28
28
  getDeviceId(): number;
29
29
  getSignalAddress(): string;
30
+ isNewsletter(): boolean;
30
31
  isBot(): boolean;
31
32
  isBroadcast(): boolean;
32
33
  isCompanion(): boolean;
@@ -23,6 +23,7 @@ export * from './Constants';
23
23
  export * from './EventEmitter';
24
24
  export * from './ImageUtils';
25
25
  export * from './IsOfficialClient';
26
+ export * from './Lid1X1MigrationUtils';
26
27
  export * from './MediaBlobCache';
27
28
  export * from './MediaEntry';
28
29
  export * from './MediaObject';
@@ -94,6 +94,10 @@ interface Derived {
94
94
  * @deprecated
95
95
  */
96
96
  isGroup: boolean;
97
+ /**
98
+ * Deprecated in favor of getIsGroup
99
+ * @deprecated
100
+ */
97
101
  isParentGroup: boolean;
98
102
  isBroadcast: boolean;
99
103
  isNewsletter: boolean;
@@ -161,7 +165,7 @@ export declare class ChatModel extends ModelChatBase {
161
165
  loadEarlierMsgs(e?: any, t?: any): any;
162
166
  isMostRecentCMC(e?: any): boolean;
163
167
  loadRecentMsgs(e?: any): any;
164
- getSearchContext?(msg: MsgModel | MsgKey, options?: {
168
+ getSearchContext?(chat: ChatModel | string, msg: MsgModel | MsgKey | string, options?: {
165
169
  isQuotedMsgAvailable: boolean;
166
170
  }): {
167
171
  collection: MsgLoad;
@@ -129,6 +129,11 @@ interface Derived {
129
129
  * @deprecated
130
130
  */
131
131
  isBroadcast: boolean;
132
+ /**
133
+ * Deprecated in favor of getIsBroadcast
134
+ * @deprecated
135
+ */
136
+ isNewsletter: boolean;
132
137
  /**
133
138
  * Deprecated in favor of getIsPSA
134
139
  * @deprecated