@wppconnect/wa-js 3.0.0 → 3.1.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/README.md +2 -2
  3. package/dist/chat/functions/index.d.ts +1 -0
  4. package/dist/chat/functions/pinMsg.d.ts +60 -0
  5. package/dist/conn/index.d.ts +1 -0
  6. package/dist/conn/patch.d.ts +16 -0
  7. package/dist/labels/functions/addNewLabel.d.ts +4 -3
  8. package/dist/labels/functions/deleteLabel.d.ts +1 -1
  9. package/dist/labels/functions/editLabel.d.ts +37 -0
  10. package/dist/labels/functions/getLabelColorPalette.d.ts +2 -2
  11. package/dist/labels/functions/index.d.ts +1 -0
  12. package/dist/labels/types.d.ts +1 -0
  13. package/dist/whatsapp/collections/LabelCollection.d.ts +1 -0
  14. package/dist/whatsapp/collections/PinInChatCollection.d.ts +29 -0
  15. package/dist/whatsapp/collections/index.d.ts +1 -0
  16. package/dist/whatsapp/enums/PIN_STATE.d.ts +22 -0
  17. package/dist/whatsapp/enums/index.d.ts +1 -0
  18. package/dist/whatsapp/functions/colorIndexToHex.d.ts +20 -0
  19. package/dist/whatsapp/functions/getNextLabelId.d.ts +18 -0
  20. package/dist/whatsapp/functions/index.d.ts +6 -0
  21. package/dist/whatsapp/functions/isLegitErrorStack.d.ts +19 -0
  22. package/dist/whatsapp/functions/labelAddAction.d.ts +20 -0
  23. package/dist/whatsapp/functions/sendPinInChatMsg.d.ts +25 -0
  24. package/dist/whatsapp/functions/setArchive.d.ts +9 -0
  25. package/dist/whatsapp/misc/IsOfficialClient.d.ts +21 -0
  26. package/dist/whatsapp/misc/index.d.ts +1 -0
  27. package/dist/whatsapp/models/MsgModel.d.ts +1 -0
  28. package/dist/whatsapp/models/MuteModel.d.ts +9 -3
  29. package/dist/whatsapp/models/PinInChatModel.d.ts +50 -0
  30. package/dist/whatsapp/stores.d.ts +1 -0
  31. package/dist/wppconnect-wa.js +1 -1
  32. package/dist/wppconnect-wa.js.LICENSE.txt +16 -0
  33. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- # 3.0.0 (2024-03-09)
1
+ # 3.1.0 (2024-03-28)
2
+
3
+
4
+ ### Reverts
5
+
6
+ * Added template to changelog ([9ebf70b](https://github.com/wppconnect-team/wa-js/commit/9ebf70b6defd370eba39cc5786bcc49df6cb5b2a))
2
7
 
3
8
 
4
9
 
package/README.md CHANGED
@@ -99,7 +99,7 @@ import * as playwright from 'playwright-chromium';
99
99
 
100
100
  async function start() {
101
101
  const browser = await playwright.chromium.launch();
102
- const page = browser.newPage();
102
+ const page = await browser.newPage();
103
103
 
104
104
  await page.goto('https://web.whatsapp.com/');
105
105
 
@@ -112,7 +112,7 @@ async function start() {
112
112
 
113
113
  // Evaluating code: See https://playwright.dev/docs/evaluating/
114
114
  const isAuthenticated: string = await page.evaluate(() =>
115
- WPP.auth.isAuthenticated()
115
+ WPP.conn.isAuthenticated()
116
116
  );
117
117
 
118
118
  // Sending message: See https://playwright.dev/docs/evaluating/
@@ -49,6 +49,7 @@ export { openChatAt } from './openChatAt';
49
49
  export { openChatBottom } from './openChatBottom';
50
50
  export { openChatFromUnread } from './openChatFromUnread';
51
51
  export { pin, unpin } from './pin';
52
+ export { pinMsg, unpinMsg } from './pinMsg';
52
53
  export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
53
54
  export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
54
55
  export { prepareRawMessage } from './prepareRawMessage';
@@ -0,0 +1,60 @@
1
+ /*!
2
+ * Copyright 2024 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 { MsgKey, MsgModel } from '../../whatsapp';
17
+ import { SendMsgResult } from '../../whatsapp/enums';
18
+ /**
19
+ * Pin a message in chat
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * // Pin a message in chat
24
+ * WPP.chat.pinMsg('true_[number]@c.us_ABCDEF');
25
+ *
26
+ * // Pin a message in chat for 30 days
27
+ * WPP.chat.pinMsg('true_[number]@c.us_ABCDEF', 2592000);
28
+ *
29
+ * // Unpin a message
30
+ * WPP.chat.pinMsg('true_[number]@c.us_ABCDEF', false);
31
+ * // or
32
+ * WPP.chat.unpinMsg('true_[number]@c.us_ABCDEF');
33
+ * ```
34
+ * @category Chat
35
+ */
36
+ export declare function pinMsg(msgId: string | MsgKey, pin?: boolean, seconds?: number): Promise<{
37
+ message: MsgModel;
38
+ pinned: boolean;
39
+ result: SendMsgResult;
40
+ }>;
41
+ /**
42
+ * Unpin a message in chat
43
+ *
44
+ * @alias pin
45
+ *
46
+ * @example
47
+ * ```javascript
48
+ * // Unpin a message
49
+ * WPP.chat.unpinMsg('true_[number]@c.us_ABCDEF');
50
+ *
51
+ * // Alias for
52
+ * WPP.chat.pinMsg('true_[number]@c.us_ABCDEF', false);
53
+ * ```
54
+ * @category Chat
55
+ */
56
+ export declare function unpinMsg(msgId: string | MsgKey): Promise<{
57
+ message: MsgModel;
58
+ pinned: boolean;
59
+ result: SendMsgResult;
60
+ }>;
@@ -14,5 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import './events';
17
+ import './patch';
17
18
  export * from './functions';
18
19
  export * from './types';
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright 2024 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 {};
@@ -28,8 +28,9 @@ export interface NewLabelOptions {
28
28
  * await WPP.labels.addNewLabel(`Name of label`);
29
29
  * //or
30
30
  * await WPP.labels.addNewLabel(`Name of label`, { labelColor: '#dfaef0' });
31
- * //or
32
- * await WPP.labels.addNewLabel(`Name of label`, { labelColor: 4292849392 });
31
+ * ```
32
+ * //or with color index
33
+ * await WPP.labels.addNewLabel(`Name of label`, { labelColor: 16 });
33
34
  * ```
34
35
  */
35
- export declare function addNewLabel(labelName: string, options?: NewLabelOptions): Promise<any>;
36
+ export declare function addNewLabel(labelName: string, options?: NewLabelOptions): Promise<import("..").Label>;
@@ -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.
@@ -0,0 +1,37 @@
1
+ /*!
2
+ * Copyright 2024 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 EditLabelOptions {
17
+ /**
18
+ * If it's decimal, send it as a number. If it's hexadecimal, send it as a string.
19
+ * If labelColor is omitted, the color will be generated automatically
20
+ */
21
+ labelColor?: string | number;
22
+ name?: string;
23
+ }
24
+ /**
25
+ * Edit a label
26
+ * For get a new color, use await WPP.labels.getLabelColorPalette() to get the list of available colors
27
+ * @example
28
+ * ```javascript
29
+ * await WPP.labels.editLabel(`Name of label`);
30
+ * //or
31
+ * await WPP.labels.editLabel(`Name of label`, { labelColor: '#dfaef0' });
32
+ * ```
33
+ * //or with color index
34
+ * await WPP.labels.editLabel(`Name of label`, { labelColor: 16 });
35
+ * ```
36
+ */
37
+ export declare function editLabel(id: string, options?: EditLabelOptions): Promise<import("..").Label>;
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /**
17
- * Returns an array of color palette in positive decimal
17
+ * Returns an array of color palette in hex code
18
18
  */
19
- export declare function getLabelColorPalette(): Promise<number[]>;
19
+ export declare function getLabelColorPalette(): Promise<string[]>;
@@ -18,6 +18,7 @@ export { addOrRemoveLabels, AddOrRemoveLabelsOptions, } from './addOrRemoveLabel
18
18
  export { colorIsInLabelPalette } from './colorIsInLabelPalette';
19
19
  export { deleteAllLabels } from './deleteAllLabels';
20
20
  export { deleteLabel, DeleteLabelReturn } from './deleteLabel';
21
+ export { editLabel } from './editLabel';
21
22
  export { getAllLabels } from './getAllLabels';
22
23
  export { getLabelById } from './getLabelById';
23
24
  export { getLabelColorPalette } from './getLabelColorPalette';
@@ -19,4 +19,5 @@ export interface Label {
19
19
  color: number | null;
20
20
  count: number;
21
21
  hexColor: string;
22
+ colorIndex: number;
22
23
  }
@@ -31,6 +31,7 @@ export declare class LabelCollection extends BaseCollection<LabelModel> {
31
31
  deleteLabel(id: string): any;
32
32
  updateLabel(e?: any, t?: any): any;
33
33
  getNewLabelColor(): any;
34
+ getNextAvailableColor(): any;
34
35
  getLabelColorPalette(): any;
35
36
  handleRemove(e?: any): any;
36
37
  updateChecksum(e?: any): any;
@@ -0,0 +1,29 @@
1
+ /*!
2
+ * Copyright 2024 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 { PinInChatModel } from '../models/PinInChatModel';
17
+ import { Collection } from './Collection';
18
+ /**
19
+ * @whatsapp WAWebPinInChatCollection >= 2.3000.1012170943
20
+ */
21
+ export declare class PinInChatCollection extends Collection<PinInChatModel> {
22
+ static model: PinInChatModel;
23
+ static cachePolicy?: any;
24
+ deleteByParentMessageKey(a?: any): any;
25
+ getByMsgKey(a?: any): PinInChatModel;
26
+ getByParentMsgKey(a?: any): PinInChatModel;
27
+ byChatId(a?: any): PinInChatModel[];
28
+ byIsFailedByMe(a?: any): any;
29
+ }
@@ -40,6 +40,7 @@ export * from './MuteCollection';
40
40
  export * from './OrderCollection';
41
41
  export * from './OrderItemCollection';
42
42
  export * from './ParticipantCollection';
43
+ export * from './PinInChatCollection';
43
44
  export * from './PresenceCollection';
44
45
  export * from './ProductCollCollection';
45
46
  export * from './ProductCollection';
@@ -0,0 +1,22 @@
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
+ /** @whatsapp WAWebPinMsgConstants >= 2.3000.1012170943
17
+ */
18
+ export declare enum PIN_STATE {
19
+ INVALID = 0,
20
+ PIN = 1,
21
+ UNPIN = 2
22
+ }
@@ -20,4 +20,5 @@ export * from './KIC_ENTRY_POINT_TYP';
20
20
  export * from './LogoutReason';
21
21
  export * from './MSG_TYPE';
22
22
  export * from './OUTWARD_TYPES';
23
+ export * from './PIN_STATE';
23
24
  export * from './SendMsgResult';
@@ -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
+ /**
17
+ * @whatsapp 885910
18
+ */
19
+ export declare function colorIndexToHex(index: number): string;
20
+ export declare function getAllLabelColors(): string[];
@@ -0,0 +1,18 @@
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
+ /** @whatsapp 263133
17
+ */
18
+ export declare function getNextLabelId(): Promise<number>;
@@ -22,6 +22,7 @@ export * from './canEditMsg';
22
22
  export * from './canReplyMsg';
23
23
  export * from './changeOptInStatusForExternalWebBeta';
24
24
  export * from './collections';
25
+ export * from './colorIndexToHex';
25
26
  export * from './contactFunctions';
26
27
  export * from './createFanoutMsgStanza';
27
28
  export * from './createGroup';
@@ -57,6 +58,7 @@ export * from './getGroupSenderKeyList';
57
58
  export * from './getGroupSizeLimit';
58
59
  export * from './getHistorySyncProgress';
59
60
  export * from './getMembershipApprovalRequests';
61
+ export * from './getNextLabelId';
60
62
  export * from './getNumChatsPinned';
61
63
  export * from './getOrderInfo';
62
64
  export * from './getParticipants';
@@ -73,10 +75,13 @@ export * from './handleSingleMsg';
73
75
  export * from './initializeAltDeviceLinking';
74
76
  export * from './isAnimatedWebp';
75
77
  export * from './isAuthenticated';
78
+ export * from './isLegitErrorStack';
76
79
  export * from './isRegistered';
77
80
  export * from './isUnreadTypeMsg';
78
81
  export * from './joinGroupViaInvite';
79
82
  export * from './keepMessage';
83
+ export * from './labelAddAction';
84
+ export * from './labelAddAction';
80
85
  export * from './markSeen';
81
86
  export * from './mediaTypeFromProtobuf';
82
87
  export * from './membershipApprovalRequestAction';
@@ -103,6 +108,7 @@ export * from './sendExitGroup';
103
108
  export * from './sendGroupParticipants';
104
109
  export * from './sendJoinGroupViaInvite';
105
110
  export * from './sendNewsletterMessageJob';
111
+ export * from './sendPinInChatMsg';
106
112
  export * from './sendQueryExists';
107
113
  export * from './sendQueryGroupInvite';
108
114
  export * from './sendQueryGroupInviteCode';
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2024 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 525438
18
+ */
19
+ export declare function isLegitErrorStack(): boolean;
@@ -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
+ /** @whatsapp 165820
17
+ */
18
+ export declare function labelAddAction(name: string, colorIndex: number): Promise<any>;
19
+ export declare function labelDeleteAction(id: string, name: string, colorIndex: number): Promise<number>;
20
+ export declare function labelEditAction(id: string, name: string, predefinedId: number, colorIndex: number): Promise<any>;
@@ -0,0 +1,25 @@
1
+ /*!
2
+ * Copyright 2024 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 { SendMsgResult } from '../enums';
17
+ import { PIN_STATE } from '../enums/PIN_STATE';
18
+ import { MsgModel } from '../models';
19
+ /** @whatsapp WAWebSendPinMessageAction >= 2.3000.1012170943
20
+ */
21
+ export declare function sendPinInChatMsg(msg: MsgModel, type: PIN_STATE, time?: number, d?: any): Promise<{
22
+ count: number;
23
+ messageSendResult: SendMsgResult;
24
+ t: number;
25
+ }>;
@@ -15,8 +15,17 @@
15
15
  */
16
16
  import { ChatModel } from '../models';
17
17
  /**
18
+ * @deprecated
18
19
  * @whatsapp 59992
19
20
  * @whatsapp 259992 >= 2.2222.8
20
21
  * @whatsapp 503153 >= 2.2228.4
22
+ * <= 2.3000.x
21
23
  */
22
24
  export declare function setArchive(chat: ChatModel, archive: boolean, id?: string): Promise<void>;
25
+ /**
26
+ * @whatsapp >= 2.3000.1012117641
27
+ */
28
+ export declare function setArchive(args: {
29
+ id: string;
30
+ archive: boolean;
31
+ }[]): Promise<void>;
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Copyright 2024 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 >= 2.3000.x
18
+ */
19
+ export declare namespace IsOfficialClient {
20
+ let isOfficialClient: boolean;
21
+ }
@@ -21,6 +21,7 @@ export * from './Conn';
21
21
  export * from './Constants';
22
22
  export * from './EventEmitter';
23
23
  export * from './ImageUtils';
24
+ export * from './IsOfficialClient';
24
25
  export * from './MediaBlobCache';
25
26
  export * from './MediaEntry';
26
27
  export * from './MediaObject';
@@ -190,6 +190,7 @@ interface Props {
190
190
  totalCurrencyCode?: any;
191
191
  historySyncMetaData?: any;
192
192
  mdDowngrade?: any;
193
+ isCaptionByUser: boolean;
193
194
  isSendFailure: boolean;
194
195
  appStateSyncKeyShare?: any;
195
196
  appStateSyncKeyRequest?: any;
@@ -39,10 +39,16 @@ export declare class MuteModel extends Model<MuteCollection> {
39
39
  idClass: typeof Wid;
40
40
  allowedIds?: any;
41
41
  constructor(proterties?: ModelPropertiesContructor<MuteModel>, options?: ModelOptions);
42
- setMute(e?: any, t?: any): any;
43
- mute(expiration: number, sendAction?: boolean, sequence?: number): Promise<number>;
42
+ setMute(expiration?: number, isAutoMuted?: boolean, sendDevice?: boolean): any;
43
+ mute(args: {
44
+ expiration: number;
45
+ sendDevice?: boolean;
46
+ isAutoMuted?: boolean;
47
+ }): Promise<number>;
44
48
  canMute(): boolean;
45
- unmute(sendAction?: boolean, sequence?: number): Promise<void>;
49
+ unmute(args: {
50
+ sendDevice?: boolean;
51
+ }): Promise<void>;
46
52
  getCollection(): MuteCollection;
47
53
  }
48
54
  export {};
@@ -0,0 +1,50 @@
1
+ /*!
2
+ * Copyright 2024 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 { CartCollection } from '../collections';
17
+ import { PinInChatCollection } from '../collections/PinInChatCollection';
18
+ import { MsgKey, Wid } from '../misc';
19
+ import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
20
+ interface Props {
21
+ msgKey: MsgKey;
22
+ parentMsgKey: MsgKey;
23
+ senderTimestampMs: number;
24
+ t: number;
25
+ sender: Wid;
26
+ chatId: Wid;
27
+ pinType: number;
28
+ pinExpiryDuration: number;
29
+ id: MsgKey;
30
+ read: boolean;
31
+ }
32
+ interface Session {
33
+ }
34
+ interface Derived {
35
+ }
36
+ /**
37
+ * @whatsapp WAWebPinInChatModel >= 2.3000.1012170943
38
+ */
39
+ export declare interface PinInChatModel extends ModelProxy<Props, Session, Derived> {
40
+ }
41
+ /**
42
+ * @whatsapp WAWebPinInChatModel >= 2.3000.1012170943
43
+ */
44
+ export declare class PinInChatModel extends Model<CartCollection> {
45
+ constructor(proterties?: ModelPropertiesContructor<PinInChatModel>, options?: ModelOptions);
46
+ deleteByParentMessageKey(): void;
47
+ getByMsgKey(): CartCollection;
48
+ getByParentMsgKey(): PinInChatCollection;
49
+ }
50
+ export {};
@@ -125,3 +125,4 @@ export declare const StickerPackStore: collections.StickerPackCollection;
125
125
  * @whatsapp 545068 >= 2.2222.8
126
126
  */
127
127
  export declare const StickerSearchStore: collections.StickerSearchCollection;
128
+ export declare const PinInChatStore: collections.PinInChatCollection;