@wppconnect/wa-js 3.12.0 → 3.13.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,9 +1,4 @@
1
- # 3.12.0 (2024-10-24)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * Fixed 'chat.new_message' event on receive replied [@lid](https://github.com/lid) msgs ([2a40d01](https://github.com/wppconnect-team/wa-js/commit/2a40d0126c6c4f16ae27add91f4fc7d1263073af))
1
+ # 3.13.0 (2024-10-29)
7
2
 
8
3
 
9
4
 
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@wppconnect/wa-js.svg?color=green)](https://www.npmjs.com/package/@wppconnect/wa-js)
4
4
  [![Downloads](https://img.shields.io/npm/dm/@wppconnect/wa-js.svg)](https://www.npmjs.com/package/@wppconnect/wa-js)
5
- [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect/wa-js 'Average time to resolve an issue')
6
- [![Percentage of issues still open](https://isitmaintained.com/badge/open/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect/wa-js 'Percentage of issues still open')
5
+ [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect-team/wa-js 'Average time to resolve an issue')
6
+ [![Percentage of issues still open](https://isitmaintained.com/badge/open/wppconnect-team/wa-js.svg)](https://isitmaintained.com/project/wppconnect-team/wa-js 'Percentage of issues still open')
7
7
 
8
8
  [![Build Status](https://img.shields.io/github/actions/workflow/status/wppconnect-team/wa-js/build.yml?branch=main)](https://github.com/wppconnect-team/wa-js/actions/workflows/build.yml)
9
9
  [![Build Status](https://img.shields.io/github/actions/workflow/status/wppconnect-team/wa-js/test.yml?branch=main)](https://github.com/wppconnect-team/wa-js/actions/workflows/test.yml)
@@ -15,9 +15,9 @@
15
15
  ## Our online channels
16
16
 
17
17
  [![Discord](https://img.shields.io/discord/844351092758413353?color=blueviolet&label=Discord&logo=discord&style=flat)](https://discord.gg/JU5JGGKGNG)
18
- [![Telegram Group](https://img.shields.io/badge/Telegram-Group-32AFED?logo=telegram)](https://t.me/wppconnect)
19
- [![WhatsApp Group](https://img.shields.io/badge/WhatsApp-Group-25D366?logo=whatsapp)](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
20
18
  [![YouTube](https://img.shields.io/youtube/channel/subscribers/UCD7J9LG08PmGQrF5IS7Yv9A?label=YouTube)](https://www.youtube.com/c/wppconnect)
19
+ [![WhatsApp Group](https://img.shields.io/badge/WhatsApp-Group-25D366?logo=whatsapp)](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
20
+ [![Telegram Group](https://img.shields.io/badge/Telegram-Group-32AFED?logo=telegram)](https://t.me/wppconnect)
21
21
 
22
22
 
23
23
  ### Top Contributors (last 45 days) widget
@@ -0,0 +1,28 @@
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 { Wid } from '../../whatsapp';
17
+ /**
18
+ * Get the default announcement group of a community
19
+ * You can pass any group id inside a community
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * WPP.community.getAnnouncementGroup('123456@g.us');
24
+ * ```
25
+ *
26
+ * @category Community
27
+ */
28
+ export declare function getAnnouncementGroup(communityId: string | Wid): Wid | undefined;
@@ -0,0 +1,28 @@
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 { Wid } from '../../whatsapp';
17
+ /**
18
+ * Get all subgroups of a community
19
+ * You can pass id of group community, or id of a inside a grupo
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * await WPP.community.getSubgroups('123456@g.us');
24
+ * ```
25
+ *
26
+ * @category Community
27
+ */
28
+ export declare function getSubgroups(communityId: string | Wid): Wid[];
@@ -17,6 +17,8 @@ export { addSubgroups } from './addSubgroups';
17
17
  export { create } from './create';
18
18
  export { deactivate } from './deactivate';
19
19
  export { demoteParticipants } from './demoteParticipants';
20
+ export { getAnnouncementGroup } from './getAnnouncementGroup';
20
21
  export { getParticipants } from './getParticipants';
22
+ export { getSubgroups } from './getSubgroups';
21
23
  export { promoteParticipants } from './promoteParticipants';
22
24
  export { removeSubgroups } from './removeSubgroups';
@@ -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
+ import { BotProfileModel } from '../models/BotProfileModel';
17
+ import { Collection } from './Collection';
18
+ /** @whatsapp WAWebBotProfileCollection
19
+ */
20
+ export declare class BotProfileCollection extends Collection<BotProfileModel> {
21
+ static model: BotProfileModel;
22
+ static staleCollection?: any;
23
+ getDefaultBot(): any;
24
+ findImpl(a?: any): any;
25
+ update(): any;
26
+ }
@@ -16,6 +16,7 @@
16
16
  export * from './AggReactionsCollection';
17
17
  export * from './BaseCollection';
18
18
  export * from './BlocklistCollection';
19
+ export * from './BotProfileCollection';
19
20
  export * from './BusinessCategoriesResultCollection';
20
21
  export * from './BusinessProfileCollection';
21
22
  export * from './ButtonCollection';
@@ -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 WAWebBotMessageSecret
18
+ */
19
+ export declare function genBotMsgSecretFromMsgSecret(a: any): Promise<any>;
@@ -49,6 +49,7 @@ export * from './findCommonGroups';
49
49
  export * from './findFirstWebLink';
50
50
  export * from './forwardMessagesToChats';
51
51
  export * from './frontendFireAndForget';
52
+ export * from './genBotMsgSecretFromMsgSecret';
52
53
  export * from './generateVideoThumbsAndDuration';
53
54
  export * from './genLinkDeviceCodeForPhoneNumber';
54
55
  export * from './genMinimalLinkPreview';
@@ -27,6 +27,7 @@ export declare class Wid {
27
27
  equals(wid: unknown): boolean;
28
28
  getDeviceId(): number;
29
29
  getSignalAddress(): string;
30
+ isBot(): boolean;
30
31
  isBroadcast(): boolean;
31
32
  isCompanion(): boolean;
32
33
  isSameAccount(wid: Wid): boolean;
@@ -0,0 +1,51 @@
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 { BotProfileCollection } from '../collections';
17
+ import { Wid } from '../misc';
18
+ import { ContactModel } from './ContactModel';
19
+ import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
20
+ interface Props {
21
+ id: Wid;
22
+ name: string;
23
+ attrs?: any;
24
+ description?: any;
25
+ category?: any;
26
+ isDefault: boolean;
27
+ prompts?: any[];
28
+ personaId: string;
29
+ commands: any[];
30
+ commandsDescription: any;
31
+ isMetaCreated: boolean;
32
+ creatorName?: string;
33
+ creatorProfileUrl?: string;
34
+ lastUpdateTs: number;
35
+ }
36
+ interface Session {
37
+ contact: ContactModel;
38
+ }
39
+ interface Derived {
40
+ }
41
+ /** @whatsapp WAWebBotProfileModel
42
+ */
43
+ export declare interface BotProfileModel extends ModelProxy<Props, Session, Derived> {
44
+ }
45
+ /** @whatsapp WAWebBotProfileModel
46
+ */
47
+ export declare class BotProfileModel extends Model<BotProfileCollection> {
48
+ idClass: typeof Wid;
49
+ constructor(proterties?: ModelPropertiesContructor<BotProfileModel>, options?: ModelOptions);
50
+ }
51
+ export {};
@@ -86,6 +86,7 @@ interface Derived {
86
86
  isUser: boolean;
87
87
  isPSA: boolean;
88
88
  isGroup: boolean;
89
+ isParentGroup: boolean;
89
90
  isBroadcast: boolean;
90
91
  isNewsletter: boolean;
91
92
  canUnread: boolean;
@@ -16,6 +16,7 @@
16
16
  export * from './AggReactionsModel';
17
17
  export * from './AttachMediaModel';
18
18
  export * from './BlocklistModel';
19
+ export * from './BotProfileModel';
19
20
  export * from './BusinessCategoriesResultModel';
20
21
  export * from './BusinessProfileModel';
21
22
  export * from './CallModel';
@@ -26,6 +26,9 @@ export declare const BusinessCategoriesResultStore: collections.BusinessCategori
26
26
  * @whatsapp 493581 >= 2.2222.8
27
27
  */
28
28
  export declare const BusinessProfileStore: collections.BusinessProfileCollection;
29
+ /** @whatsapp WAWebBotProfileCollection
30
+ */
31
+ export declare const BotProfileStore: collections.BotProfileCollection;
29
32
  /** @whatsapp 60868
30
33
  * @whatsapp 31218 >= 2.2204.13
31
34
  * @whatsapp 160868 >= 2.2222.8