@wppconnect/wa-js 2.18.2 → 2.18.4

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.18.2 (2023-01-13)
1
+ ## 2.18.4 (2023-01-23)
2
2
 
3
3
  ### Bug Fixes
4
4
 
5
- - Fixed hsm/template message is not flagging chat as unread ([3b9a84b](https://github.com/wppconnect-team/wa-js/commit/3b9a84b33334567b1911e217db6120dd4ad710c9))
5
+ - Fixed WPP.conn.getAuthCode function for WhatsApp >= 2.2301.5 ([357b62b](https://github.com/wppconnect-team/wa-js/commit/357b62bb9a06a868cc416e203b655088c469a6c4))
@@ -23,10 +23,10 @@ import { MsgKey, MsgModel } from '../../whatsapp';
23
23
  * @example
24
24
  * ```javascript
25
25
  * // to react a message
26
- * WPP.chat.sendReactionMessage('[message_id]', '🤯');
26
+ * WPP.chat.sendReactionToMessage('[message_id]', '🤯');
27
27
  *
28
28
  * // to remove
29
- * WPP.chat.sendReactionMessage('[message_id]', false);
29
+ * WPP.chat.sendReactionToMessage('[message_id]', false);
30
30
  *
31
31
  * ```
32
32
  * @category Message
@@ -17,6 +17,12 @@ import { AuthCode } from '..';
17
17
  /**
18
18
  * Return the current auth code
19
19
  *
20
+ * @example
21
+ * ```javascript
22
+ * const authCode = await WPP.conn.getAuthCode();
23
+ * console.log(authCode.fullCode); // Output: a long string to generate a QRCode
24
+ * ```
25
+ *
20
26
  * @return {Promise<AuthCode>}[return description]
21
27
  */
22
28
  export declare function getAuthCode(): Promise<AuthCode | null>;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2023 WPPConnect Team
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -22,3 +22,4 @@ export * from './misc';
22
22
  export * from './models';
23
23
  export * as multidevice from './multidevice';
24
24
  export * from './stores';
25
+ export * as websocket from './websocket';
@@ -19,7 +19,7 @@
19
19
  */
20
20
  export declare namespace adv {
21
21
  function generateADVSecretKey(): string;
22
- function getADVSecretKey(): string;
22
+ function getADVSecretKey(): string | Promise<string>;
23
23
  function setADVSignedIdentity(e: any): string;
24
24
  function getADVEncodedIdentity(): any;
25
25
  function verifyDeviceIdentityAccountSignature(): any;
@@ -0,0 +1,29 @@
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 504784 >= 2.2301.6
18
+ */
19
+ export declare class WapNode {
20
+ tag: any;
21
+ attrs: {
22
+ [key: string]: any;
23
+ };
24
+ content: any[];
25
+ constructor(tag: any, attrs?: {
26
+ [key: string]: any;
27
+ }, content?: any[]);
28
+ toString(): string;
29
+ }
@@ -0,0 +1,20 @@
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 '../misc';
17
+ /**
18
+ * @whatsapp 917504 >= 2.2301.6
19
+ */
20
+ export declare function ensureE2ESessions(wid: Wid[]): Promise<any>;
@@ -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 504784 >= 2.2301.6
18
+ */
19
+ export declare function generateId(): string;
@@ -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
+ export * from './ensureE2ESessions';
17
+ export * from './generateId';
18
+ export * from './sendSmaxStanza';
19
+ export * from './smax';
20
+ export * from './wap';
21
+ export * from './WapNode';
@@ -0,0 +1,20 @@
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 { WapNode } from './';
17
+ /**
18
+ * @whatsapp 67201 >= 2.2301.6
19
+ */
20
+ export declare function sendSmaxStanza(node: WapNode, options?: any): Promise<WapNode>;
@@ -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 { WapNode } from './WapNode';
17
+ /**
18
+ * @whatsapp 898165 >= 2.2301.6
19
+ */
20
+ export declare function smax(tag: any, attrs?: {
21
+ [key: string]: any;
22
+ }, content?: any[] | string | null | ArrayBuffer | Uint8Array): WapNode;
@@ -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 { WapNode } from './WapNode';
17
+ /**
18
+ * @whatsapp 504784 >= 2.2301.6
19
+ */
20
+ export declare function wap(tag: any, attrs?: {
21
+ [key: string]: any;
22
+ }, content?: any[] | string | null | ArrayBuffer | Uint8Array): WapNode;