@wppconnect/wa-js 2.27.0 → 2.28.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 CHANGED
@@ -1,9 +1,4 @@
1
- # 2.27.0 (2023-10-08)
2
-
3
-
4
- ### Features
5
-
6
- * Added newsletter functions (close [#1365](https://github.com/wppconnect-team/wa-js/issues/1365)) ([#1386](https://github.com/wppconnect-team/wa-js/issues/1386)) ([b0bab71](https://github.com/wppconnect-team/wa-js/commit/b0bab717f9370a0be9767c6500df697cce083415))
1
+ # 2.28.0 (2023-10-29)
7
2
 
8
3
 
9
4
 
@@ -0,0 +1,30 @@
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
+ /**
17
+ * Alternative login method using code
18
+ * Get the Link Device Code for Authentication using the phone number
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * const code = await WPP.conn.genLinkDeviceCodeForPhoneNumber('[number]');
23
+ *
24
+ * // Disable push notification
25
+ * const code = await WPP.conn.genLinkDeviceCodeForPhoneNumber('[number]', false);
26
+ * ```
27
+ *
28
+ * @category Conn
29
+ */
30
+ export declare function genLinkDeviceCodeForPhoneNumber(phone: string, sendPushNotification?: boolean): Promise<string>;
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export { genLinkDeviceCodeForPhoneNumber } from './genLinkDeviceCodeForPhoneNumber';
16
17
  export { getAuthCode } from './getAuthCode';
17
18
  export { getHistorySyncProgress, HistorySyncProgress, } from './getHistorySyncProgress';
18
19
  export { getMyDeviceId } from './getMyDeviceId';
@@ -0,0 +1,27 @@
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 { Wid } from '../../whatsapp';
17
+ /**
18
+ * Get all commons groups for the contact
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * const groups_ids = await WPP.contact.getCommonGroups('[number]@c.us');
23
+ * ```
24
+ *
25
+ * @category Contact
26
+ */
27
+ export declare function getCommonGroups(wid: Wid | string): Promise<Wid[]>;
@@ -14,6 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export { getBusinessProfile } from './getBusinessProfile';
17
+ export { getCommonGroups } from './getCommonGroups';
17
18
  export { getProfilePictureUrl } from './getProfilePictureUrl';
18
19
  export { getStatus } from './getStatus';
19
20
  export { ContactListOptions, list } from './list';
@@ -17,7 +17,7 @@ import { MsgModel, websocket, Wid } from '..';
17
17
  /**
18
18
  *
19
19
  */
20
- export declare function createFanoutMsgStanza(msg: MsgModel, proto: {
20
+ export declare function createFanoutMsgStanza(msg: MsgModel, data: any, proto: {
21
21
  [key: string]: any;
22
22
  }, devices: Wid[], options: {
23
23
  [key: string]: any;
@@ -0,0 +1,21 @@
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 { BaseCollection } from '../collections';
17
+ import { ChatModel, ContactModel } from '../models';
18
+ /**
19
+ * @whatsapp 714574
20
+ */
21
+ export declare function findCommonGroups(wid: ContactModel): Promise<BaseCollection<ChatModel>>;
@@ -0,0 +1,19 @@
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
+ /**
17
+ * @whatsapp 61777
18
+ */
19
+ export declare function genLinkDeviceCodeForPhoneNumber(phone: string, pushNotification: boolean): Promise<string>;
@@ -39,9 +39,11 @@ export * from './encryptAndSendSenderKeyMsg';
39
39
  export * from './encryptMsgProtobuf';
40
40
  export * from './fetchLinkPreview';
41
41
  export * from './findChat';
42
+ export * from './findCommonGroups';
42
43
  export * from './findFirstWebLink';
43
44
  export * from './frontendFireAndForget';
44
45
  export * from './generateVideoThumbsAndDuration';
46
+ export * from './genLinkDeviceCodeForPhoneNumber';
45
47
  export * from './genMinimalLinkPreview';
46
48
  export * from './getABPropConfigValue';
47
49
  export * from './getAsMms';
@@ -65,6 +67,7 @@ export * from './getWhatsAppWebExternalBetaJoinedIdb';
65
67
  export * from './groupParticipants';
66
68
  export * from './handleAck';
67
69
  export * from './handleSingleMsg';
70
+ export * from './initializeAltDeviceLinking';
68
71
  export * from './isAnimatedWebp';
69
72
  export * from './isAuthenticated';
70
73
  export * from './isRegistered';
@@ -0,0 +1,19 @@
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
+ /**
17
+ * @whatsapp 518043
18
+ */
19
+ export declare function initializeAltDeviceLinking(): Promise<void>;