@wppconnect/wa-js 2.24.7 → 2.25.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 +1,9 @@
1
- ## 2.24.7 (2023-07-11)
1
+ # 2.25.0 (2023-08-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * Added cache for link preview result (close [#1316](https://github.com/wppconnect-team/wa-js/issues/1316)) ([e19d4a6](https://github.com/wppconnect-team/wa-js/commit/e19d4a6f7d8a1d16435296320f2c3d991dc3d9dc))
7
+
8
+
9
+
@@ -14,7 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { MsgKey, Wid } from '../../whatsapp';
17
- import { RawMessage } from '..';
18
17
  export interface ForwardMessagesOptions {
19
18
  displayCaptionText?: boolean;
20
19
  multicast?: boolean;
@@ -30,4 +29,4 @@ export interface ForwardMessagesOptions {
30
29
  * @category Message
31
30
  * @return {any} Any
32
31
  */
33
- export declare function forwardMessage(toChatId: string | Wid, msgId: string | MsgKey, options?: ForwardMessagesOptions): Promise<RawMessage[]>;
32
+ export declare function forwardMessage(toChatId: string | Wid, msgId: string | MsgKey, options?: ForwardMessagesOptions): Promise<boolean>;
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ import './deviceName';
18
18
  import './gtag';
19
19
  import * as webpack from './webpack';
20
20
  export { webpack };
21
- export { isInjected, isReady } from './webpack';
21
+ export { isInjected, isReady, isFullReady } from './webpack';
22
22
  export { config, Config } from './config';
23
23
  export * as blocklist from './blocklist';
24
24
  export * as call from './call';
@@ -24,7 +24,7 @@ export declare function fetchRemoteLinkPreviewData(url: string): Promise<{
24
24
  richPreviewType: number;
25
25
  doNotPlayInline: boolean;
26
26
  imageUrl: any;
27
- } | null>;
27
+ } | null | undefined>;
28
28
  /**
29
29
  * Generate the preview link thumbnail data
30
30
  */
@@ -16,4 +16,5 @@
16
16
  export interface WebpackEvents {
17
17
  'webpack.injected': void;
18
18
  'webpack.ready': void;
19
+ 'webpack.full_ready': void;
19
20
  }
@@ -18,11 +18,15 @@
18
18
  */
19
19
  export declare let isInjected: boolean;
20
20
  /**
21
- * Is setted true when the all webpack modules are fully loaded
21
+ * Is setted true when the main webpack modules are fully loaded
22
22
  */
23
23
  export declare let isReady: boolean;
24
- export declare function onInjected(listener: () => void): void;
25
- export declare function onReady(listener: () => void): void;
24
+ /**
25
+ * Is setted true when the all webpack modules are fully loaded
26
+ */
27
+ export declare let isFullReady: boolean;
28
+ export declare function onInjected(listener: () => void, delay?: number): void;
29
+ export declare function onReady(listener: () => void, delay?: number): void;
26
30
  export type SearchModuleCondition = (module: any, moduleId: string) => boolean;
27
31
  export declare let webpackRequire: (<T = any>(moduleId: string) => T) & {
28
32
  /**