@wppconnect/wa-js 3.22.0 → 3.22.1

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,9 @@
1
- # 3.22.0 (2026-02-27)
1
+ ## 3.22.1 (2026-02-28)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * getMessages (msgFindQuery doesn't exist anymore) ([#3360](https://github.com/wppconnect-team/wa-js/issues/3360)) ([568fc3d](https://github.com/wppconnect-team/wa-js/commit/568fc3d564c740e22e5dfcff272f5982a85d77e3))
6
+ * getMessages (msgs.push is not a function) ([#3364](https://github.com/wppconnect-team/wa-js/issues/3364)) ([bdd2224](https://github.com/wppconnect-team/wa-js/commit/bdd222400e594e98b74cadc06a3a21eef3f2ecd8))
7
7
 
8
8
 
9
9
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2026 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.
@@ -19,20 +19,27 @@ export interface MsgFindDirectionParams {
19
19
  anchor: MsgKey;
20
20
  count: number;
21
21
  }
22
+ export interface MsgFindDirectionResult {
23
+ messages: ModelPropertiesContructor<MsgModel>[];
24
+ status: number;
25
+ }
22
26
  /**
23
27
  * Find messages before a specific message
24
28
  * @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
29
+ * @returns Object with messages array and status code (200 on success, 404 if anchor not found)
25
30
  */
26
- export declare function msgFindBefore(params: MsgFindDirectionParams): Promise<ModelPropertiesContructor<MsgModel>[]>;
31
+ export declare function msgFindBefore(params: MsgFindDirectionParams): Promise<MsgFindDirectionResult>;
27
32
  /**
28
33
  * Find messages after a specific message
29
34
  * @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
35
+ * @returns Object with messages array and status code (200 on success, 404 if anchor not found)
30
36
  */
31
- export declare function msgFindAfter(params: MsgFindDirectionParams): Promise<ModelPropertiesContructor<MsgModel>[]>;
37
+ export declare function msgFindAfter(params: MsgFindDirectionParams): Promise<MsgFindDirectionResult>;
32
38
  /**
33
39
  * Find messages by direction (before or after)
34
40
  * @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
41
+ * @returns Object with messages array and status code (200 on success, 404 if anchor not found)
35
42
  */
36
43
  export declare function msgFindByDirection(params: MsgFindDirectionParams & {
37
44
  direction: 'before' | 'after';
38
- }): Promise<ModelPropertiesContructor<MsgModel>[]>;
45
+ }): Promise<MsgFindDirectionResult>;