@wppconnect/wa-js 2.24.4 → 2.24.6

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,5 +1,5 @@
1
- ## 2.24.4 (2023-06-17)
1
+ ## 2.24.6 (2023-07-07)
2
2
 
3
3
  ### Bug Fixes
4
4
 
5
- - Fixed WPP.chat.sendLocationMessage function (fix [#1187](https://github.com/wppconnect-team/wa-js/issues/1187)) ([4b07663](https://github.com/wppconnect-team/wa-js/commit/4b0766323291a105b11e75979ff3033964205732))
5
+ - Fixed chat.new_message event for status reply (fix [#1211](https://github.com/wppconnect-team/wa-js/issues/1211)) ([a898151](https://github.com/wppconnect-team/wa-js/commit/a8981518b353b0dda7addefdaae77f8dcf267188))
@@ -0,0 +1,22 @@
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
+ import { MsgKey, MsgModel } from '../../whatsapp';
17
+ /**
18
+ * Get a quoted message
19
+ *
20
+ * @category Chat
21
+ */
22
+ export declare function getQuotedMsgKey(msg: MsgModel): MsgKey;
@@ -33,6 +33,7 @@ export { getMessageById } from './getMessageById';
33
33
  export { getMessages, GetMessagesOptions } from './getMessages';
34
34
  export { getPlatformFromMessage } from './getPlatformFromMessage';
35
35
  export { getQuotedMsg } from './getQuotedMsg';
36
+ export { getQuotedMsgKey } from './getQuotedMsgKey';
36
37
  export { getReactions } from './getReactions';
37
38
  export { getVotes } from './getVotes';
38
39
  export { ChatListOptions, list } from './list';
@@ -13,4 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import './patch';
16
17
  export * from './functions';
@@ -0,0 +1,16 @@
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 {};
@@ -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 831914
18
+ */
19
+ export declare const SANITIZED_VERSION_STR: string;
@@ -14,3 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export * from './DROP_ATTR';
17
+ export * from './SANITIZED_VERSION_STR';
@@ -15,7 +15,14 @@
15
15
  */
16
16
  import { InferArgs, InferReturn } from '../util';
17
17
  import * as webpack from '../webpack';
18
- export declare const _moduleIdMap: WeakMap<any, string>;
18
+ declare class CustomWeakMap extends WeakMap<object, string> {
19
+ protected stringMap: Map<string, string>;
20
+ delete(key: object | string): boolean;
21
+ get(key: object | string): string | undefined;
22
+ has(key: object | string): boolean;
23
+ set(key: object | string, value: string): this;
24
+ }
25
+ export declare const _moduleIdMap: CustomWeakMap;
19
26
  /**
20
27
  * The object of this function is to override the exports to create getters.
21
28
  *
@@ -48,3 +55,4 @@ export declare function exportProxyModel(exports: any, name: string): void;
48
55
  * ```
49
56
  */
50
57
  export declare function wrapModuleFunction<TFunc extends (...args: any[]) => any>(func: TFunc, callback: (func: TFunc, ...args: InferArgs<TFunc>) => InferReturn<TFunc>): void;
58
+ export {};
@@ -18,7 +18,11 @@ import { ContactModel } from '../models';
18
18
  * @whatsapp 780140 >= 2.2222.8
19
19
  * @whatsapp 48826 >= 2.2228.4
20
20
  */
21
- export declare function blockContact(contact: ContactModel): Promise<void>;
21
+ export declare function blockContact(contact: ContactModel | {
22
+ contact: ContactModel;
23
+ blockEntryPoint: string;
24
+ bizOptOutArgs: any | null;
25
+ }): Promise<void>;
22
26
  /** @whatsapp 80140
23
27
  * @whatsapp 780140 >= 2.2222.8
24
28
  * @whatsapp 48826 >= 2.2228.4
@@ -0,0 +1,140 @@
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
+ import { ContactModel } from '../models';
17
+ /**
18
+ * @whatsapp 660666 >= 2.2327.4
19
+ */
20
+ export declare function getMentionName(contact: ContactModel): string;
21
+ /**
22
+ * @whatsapp 660666 >= 2.2327.4
23
+ */
24
+ export declare function getNotifyName(contact: ContactModel): string;
25
+ /**
26
+ * @whatsapp 660666 >= 2.2327.4
27
+ */
28
+ export declare function getPremiumMessageName(contact: ContactModel): string;
29
+ /**
30
+ * @whatsapp 660666 >= 2.2327.4
31
+ */
32
+ export declare function getUserid(contact: ContactModel): any;
33
+ /**
34
+ * @whatsapp 660666 >= 2.2327.4
35
+ */
36
+ export declare function getUserhash(contact: ContactModel): any;
37
+ /**
38
+ * @whatsapp 660666 >= 2.2327.4
39
+ */
40
+ export declare function getSearchVerifiedName(contact: ContactModel): any;
41
+ /**
42
+ * @whatsapp 660666 >= 2.2327.4
43
+ */
44
+ export declare function getHeader(contact: ContactModel): any;
45
+ /**
46
+ * @whatsapp 660666 >= 2.2327.4
47
+ */
48
+ export declare function getIsMe(contact: ContactModel): any;
49
+ /**
50
+ * @whatsapp 660666 >= 2.2327.4
51
+ */
52
+ export declare function getIsUser(contact: ContactModel): any;
53
+ /**
54
+ * @whatsapp 660666 >= 2.2327.4
55
+ */
56
+ export declare function getIsGroup(contact: ContactModel): any;
57
+ /**
58
+ * @whatsapp 660666 >= 2.2327.4
59
+ */
60
+ export declare function getIsBroadcast(contact: ContactModel): any;
61
+ /**
62
+ * @whatsapp 660666 >= 2.2327.4
63
+ */
64
+ export declare function getIsPSA(contact: ContactModel): any;
65
+ /**
66
+ * @whatsapp 660666 >= 2.2327.4
67
+ */
68
+ export declare function getIsIAS(contact: ContactModel): any;
69
+ /**
70
+ * @whatsapp 660666 >= 2.2327.4
71
+ */
72
+ export declare function getIsSupportAccount(contact: ContactModel): any;
73
+ /**
74
+ * @whatsapp 660666 >= 2.2327.4
75
+ */
76
+ export declare function getIsWAContact(contact: ContactModel): any;
77
+ /**
78
+ * @whatsapp 660666 >= 2.2327.4
79
+ */
80
+ export declare function getIsMyContact(contact: ContactModel): boolean;
81
+ /**
82
+ * @whatsapp 660666 >= 2.2327.4
83
+ */
84
+ export declare function getCanRequestPhoneNumber(contact: ContactModel): boolean;
85
+ /**
86
+ * @whatsapp 660666 >= 2.2327.4
87
+ */
88
+ export declare function getShowBusinessCheckmarkAsPrimary(contact: ContactModel): any;
89
+ /**
90
+ * @whatsapp 660666 >= 2.2327.4
91
+ */
92
+ export declare function getShowBusinessCheckmarkAsSecondary(contact: ContactModel): any;
93
+ /**
94
+ * @whatsapp 660666 >= 2.2327.4
95
+ */
96
+ export declare function getShowBusinessCheckmarkInChatlist(contact: ContactModel): any;
97
+ /**
98
+ * @whatsapp 660666 >= 2.2327.4
99
+ */
100
+ export declare function getIsDisplayNameApproved(contact: ContactModel): any;
101
+ /**
102
+ * @whatsapp 660666 >= 2.2327.4
103
+ */
104
+ export declare function getShouldForceBusinessUpdate(contact: ContactModel): any;
105
+ /**
106
+ * @whatsapp 714574 >= 2.2327.4
107
+ */
108
+ export declare function getDisplayName(contact: ContactModel): string;
109
+ /**
110
+ * @whatsapp 714574 >= 2.2327.4
111
+ */
112
+ export declare function getPnForLid(contact: ContactModel): any;
113
+ /**
114
+ * @whatsapp 714574 >= 2.2327.4
115
+ */
116
+ export declare function getDisplayNameOrPnForLid(contact: ContactModel): any;
117
+ /**
118
+ * @whatsapp 714574 >= 2.2327.4
119
+ */
120
+ export declare function getFormattedPhone(contact: ContactModel): any;
121
+ /**
122
+ * @whatsapp 714574 >= 2.2327.4
123
+ */
124
+ export declare function getSearchName(contact: ContactModel): any;
125
+ /**
126
+ * @whatsapp 714574 >= 2.2327.4
127
+ */
128
+ export declare function getFormattedShortNameWithNonBreakingSpaces(contact: ContactModel): any;
129
+ /**
130
+ * @whatsapp 714574 >= 2.2327.4
131
+ */
132
+ export declare function getFormattedShortName(contact: ContactModel): any;
133
+ /**
134
+ * @whatsapp 714574 >= 2.2327.4
135
+ */
136
+ export declare function getFormattedName(contact: ContactModel): any;
137
+ /**
138
+ * @whatsapp 714574 >= 2.2327.4
139
+ */
140
+ export declare function getFormattedUser(contact: ContactModel): any;
@@ -21,6 +21,7 @@ export * from './canEditMsg';
21
21
  export * from './canReplyMsg';
22
22
  export * from './changeOptInStatusForExternalWebBeta';
23
23
  export * from './collections';
24
+ export * from './contactFunctions';
24
25
  export * from './createFanoutMsgStanza';
25
26
  export * from './createGroup';
26
27
  export * from './createMsgProtobuf';
@@ -49,27 +49,161 @@ interface Session {
49
49
  locale?: any;
50
50
  }
51
51
  interface Derived {
52
+ /**
53
+ * Deprecated in favor of getNotifyName
54
+ * @deprecated
55
+ */
52
56
  notifyName?: any;
57
+ /**
58
+ * Deprecated in favor of getMentionName
59
+ * @deprecated
60
+ */
53
61
  mentionName?: any;
62
+ /**
63
+ * Deprecated in favor of getDisplayName
64
+ * @deprecated
65
+ */
54
66
  displayName?: any;
67
+ /**
68
+ * Deprecated in favor of getPnForLid
69
+ * @deprecated
70
+ */
71
+ pnForLid?: any;
72
+ /**
73
+ * Deprecated in favor of getPremiumMessageName
74
+ * @deprecated
75
+ */
76
+ premiumMessageName?: any;
77
+ /**
78
+ * Deprecated in favor of getDisplayNameOrPnForLid
79
+ * @deprecated
80
+ */
81
+ displayNameOrPnForLid?: any;
82
+ /**
83
+ * Deprecated in favor of getFormattedPhone
84
+ * @deprecated
85
+ */
86
+ formattedPhone?: any;
87
+ /**
88
+ * Deprecated in favor of getUserid
89
+ * @deprecated
90
+ */
55
91
  userid?: any;
92
+ /**
93
+ * Deprecated in favor of getUserhash
94
+ * @deprecated
95
+ */
56
96
  userhash?: any;
97
+ /**
98
+ * Deprecated in favor of getSearchName
99
+ * @deprecated
100
+ */
57
101
  searchName?: any;
102
+ /**
103
+ * Deprecated in favor of getSearchVerifiedName
104
+ * @deprecated
105
+ */
58
106
  searchVerifiedName?: any;
107
+ /**
108
+ * Deprecated in favor of getHeader
109
+ * @deprecated
110
+ */
59
111
  header?: any;
112
+ /**
113
+ * Deprecated in favor of getIsMe
114
+ * @deprecated
115
+ */
60
116
  isMe: boolean;
117
+ /**
118
+ * Deprecated in favor of getIsUser
119
+ * @deprecated
120
+ */
61
121
  isUser: boolean;
122
+ /**
123
+ * Deprecated in favor of getIsGroup
124
+ * @deprecated
125
+ */
62
126
  isGroup: boolean;
127
+ /**
128
+ * Deprecated in favor of getIsBroadcast
129
+ * @deprecated
130
+ */
63
131
  isBroadcast: boolean;
132
+ /**
133
+ * Deprecated in favor of getIsPSA
134
+ * @deprecated
135
+ */
64
136
  isPSA: boolean;
137
+ /**
138
+ * Deprecated in favor of getIsIAS
139
+ * @deprecated
140
+ */
141
+ isIAS: boolean;
142
+ /**
143
+ * Deprecated in favor of getIsSupportAccount
144
+ * @deprecated
145
+ */
146
+ isSupportAccount: boolean;
147
+ /**
148
+ * Deprecated in favor of getFormattedShortNameWithNonBreakingSpaces
149
+ * @deprecated
150
+ */
65
151
  formattedShortNameWithNonBreakingSpaces?: any;
152
+ /**
153
+ * Deprecated in favor of getFormattedShortName
154
+ * @deprecated
155
+ */
66
156
  formattedShortName?: any;
157
+ /**
158
+ * Deprecated in favor of getFormattedName
159
+ * @deprecated
160
+ */
67
161
  formattedName?: any;
162
+ /**
163
+ * Deprecated in favor of getFormattedUser
164
+ * @deprecated
165
+ */
68
166
  formattedUser?: any;
167
+ /**
168
+ * Deprecated in favor of getIsWAContact
169
+ * @deprecated
170
+ */
69
171
  isWAContact: boolean;
172
+ /**
173
+ * Deprecated in favor of getIsMyContact
174
+ * @deprecated
175
+ */
70
176
  isMyContact: boolean;
177
+ /**
178
+ * Deprecated in favor of getCanRequestPhoneNumber
179
+ * @deprecated
180
+ */
181
+ canRequestPhoneNumber: boolean;
182
+ /**
183
+ * Deprecated in favor of getShowBusinessCheckmarkAsPrimary
184
+ * @deprecated
185
+ */
71
186
  showBusinessCheckmarkAsPrimary?: any;
187
+ /**
188
+ * Deprecated in favor of getShowBusinessCheckmarkAsSecondary
189
+ * @deprecated
190
+ */
72
191
  showBusinessCheckmarkAsSecondary?: any;
192
+ /**
193
+ * Deprecated in favor of getShowBusinessCheckmarkInChatlist
194
+ * @deprecated
195
+ */
196
+ showBusinessCheckmarkInChatlist?: any;
197
+ /**
198
+ * Deprecated in favor of getIsDisplayNameApproved
199
+ * @deprecated
200
+ */
201
+ isDisplayNameApproved?: any;
202
+ /**
203
+ * Deprecated in favor of getShouldForceBusinessUpdate
204
+ * @deprecated
205
+ */
206
+ shouldForceBusinessUpdate?: any;
73
207
  }
74
208
  /** @whatsapp 121
75
209
  * @whatsapp 400121 >= 2.2222.8