@wppconnect/wa-js 1.1.10 → 1.1.11

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,3 +1,12 @@
1
+ ## 1.1.11 (2022-01-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * Added WPP.profile.getMyStatus function ([7c5975d](https://github.com/wppconnect-team/wa-js/commit/7c5975df3eaacc6a4b98f5e9116574dfbcaf8cfa))
7
+
8
+
9
+
1
10
  ## 1.1.10 (2022-01-22)
2
11
 
3
12
 
@@ -37,4 +37,5 @@ export { ListMessageOptions, sendListMessage } from './sendListMessage';
37
37
  export { sendRawMessage } from './sendRawMessage';
38
38
  export { sendTextMessage, TextMessageOptions } from './sendTextMessage';
39
39
  export { sendVCardContactMessage, VCardContact, } from './sendVCardContactMessage';
40
+ export { starMessage, StarMessageReturn } from './starMessage';
40
41
  export { unmute } from './unmute';
@@ -0,0 +1,47 @@
1
+ /*!
2
+ * Copyright 2021 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 interface StarMessageReturn {
17
+ id: string;
18
+ star: boolean;
19
+ }
20
+ /**
21
+ * Star/Unstar a message
22
+ *
23
+ * @example
24
+ * ```javascript
25
+ * // star a message
26
+ * WPP.chat.starMessage('<message id>');
27
+ *
28
+ * // unstar a message
29
+ * WPP.chat.starMessage('<message id>', false);
30
+ * ```
31
+ * @category Message
32
+ */
33
+ export declare function starMessage(id: string, star: boolean): Promise<StarMessageReturn>;
34
+ /**
35
+ * Star/Unstar messages
36
+ *
37
+ * @example
38
+ * ```javascript
39
+ * // star messages
40
+ * WPP.chat.starMessage(['<message id>', '<message id>']);
41
+ *
42
+ * // unstar messages
43
+ * WPP.chat.starMessage(['<message id>', '<message id>'], false);
44
+ * ```
45
+ * @category Message
46
+ */
47
+ export declare function starMessage(ids: string[], star: boolean): Promise<StarMessageReturn[]>;
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright 2021 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
+ * Get your current text status
18
+ *
19
+ * @example
20
+ * ```javascript
21
+ * await WPP.profile.getMyStatus();
22
+ * ```
23
+ *
24
+ * @category Chat
25
+ */
26
+ export declare function getMyStatus(): Promise<string | undefined>;
@@ -13,4 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export { getMyStatus } from './getMyStatus';
16
17
  export { setMyStatus } from './setMyStatus';
@@ -138,7 +138,7 @@ export declare class ChatModel extends ModelChatBase {
138
138
  key?: MsgKey;
139
139
  highlightMsg: true;
140
140
  };
141
- sendStarMsgs(e?: any, t?: any): any;
141
+ sendStarMsgs(msgs: MsgModel[], star: boolean): any;
142
142
  sendRevokeMsgs(messages: MsgModel[], deleteMediaInDevice?: boolean): Promise<SendMsgResult>;
143
143
  sendDeleteMsgs(messages: MsgModel[], deleteMediaInDevice?: boolean): Promise<SendMsgResult>;
144
144
  deleteMsgs(e?: any, t?: any): any;
@@ -18,7 +18,7 @@ import { Wid } from '../misc';
18
18
  import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
19
19
  interface Props {
20
20
  id: Wid;
21
- status?: any;
21
+ status?: string;
22
22
  }
23
23
  interface Session {
24
24
  stale?: any;