@wppconnect/wa-js 2.20.0 → 2.20.2
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 +3 -3
- package/dist/whatsapp/functions/fetchLinkPreview.d.ts +16 -1
- package/dist/whatsapp/functions/findFirstWebLink.d.ts +2 -1
- package/dist/whatsapp/functions/genMinimalLinkPreview.d.ts +2 -16
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +2 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
## 2.20.2 (2023-02-28)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Fixed link-preview function ([2fc38b1](https://github.com/wppconnect-team/wa-js/commit/2fc38b1d10f7723cce07201473446b32cb7d32d0))
|
|
@@ -13,6 +13,21 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
export interface LinkUrlData {
|
|
17
|
+
anchor: undefined;
|
|
18
|
+
domain?: string;
|
|
19
|
+
href: string;
|
|
20
|
+
index: number;
|
|
21
|
+
input: string;
|
|
22
|
+
isHttp: boolean;
|
|
23
|
+
params?: string;
|
|
24
|
+
path?: string;
|
|
25
|
+
port?: number;
|
|
26
|
+
scheme: string;
|
|
27
|
+
suspiciousCharacters?: string;
|
|
28
|
+
url: string;
|
|
29
|
+
username?: string;
|
|
30
|
+
}
|
|
16
31
|
export interface LinkPreviewResult {
|
|
17
32
|
url: string;
|
|
18
33
|
data: {
|
|
@@ -30,4 +45,4 @@ export interface LinkPreviewResult {
|
|
|
30
45
|
* @whatsapp 519146 >= 2.2222.8
|
|
31
46
|
* @whatsapp 632590 >= 2.2228.4
|
|
32
47
|
*/
|
|
33
|
-
export declare function fetchLinkPreview(url:
|
|
48
|
+
export declare function fetchLinkPreview(url: LinkUrlData): Promise<null | LinkPreviewResult>;
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { LinkUrlData } from './fetchLinkPreview';
|
|
16
17
|
/** @whatsapp 29929
|
|
17
18
|
* @whatsapp 31042 >= 2.2204.13
|
|
18
19
|
* @whatsapp 829929 >= 2.2222.8
|
|
19
20
|
*/
|
|
20
|
-
export declare function findFirstWebLink(message: string): undefined |
|
|
21
|
+
export declare function findFirstWebLink(message: string): undefined | LinkUrlData;
|
|
@@ -13,24 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { LinkPreviewResult } from './fetchLinkPreview';
|
|
16
|
+
import { LinkPreviewResult, LinkUrlData } from './fetchLinkPreview';
|
|
17
17
|
/**
|
|
18
18
|
* @whatsapp 92375
|
|
19
19
|
* @whatsapp 692375 >= 2.2222.8
|
|
20
20
|
* @whatsapp 321120 >= 2.2228.4
|
|
21
21
|
*/
|
|
22
|
-
export declare function genMinimalLinkPreview(data:
|
|
23
|
-
anchor: undefined;
|
|
24
|
-
domain?: string;
|
|
25
|
-
href: string;
|
|
26
|
-
index: number;
|
|
27
|
-
input: string;
|
|
28
|
-
isHttp: boolean;
|
|
29
|
-
params?: string;
|
|
30
|
-
path?: string;
|
|
31
|
-
port?: number;
|
|
32
|
-
scheme: string;
|
|
33
|
-
suspiciousCharacters?: string;
|
|
34
|
-
url: string;
|
|
35
|
-
username?: string;
|
|
36
|
-
}): Promise<null | LinkPreviewResult>;
|
|
22
|
+
export declare function genMinimalLinkPreview(data: LinkUrlData): Promise<null | LinkPreviewResult>;
|