@wppconnect/wa-js 3.4.1 → 3.4.2

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,4 +1,4 @@
1
- ## 3.4.1 (2024-06-24)
1
+ ## 3.4.2 (2024-07-08)
2
2
 
3
3
 
4
4
 
@@ -15,6 +15,7 @@
15
15
  */
16
16
  export { get } from './get';
17
17
  export { getMyStatus } from './getMyStatus';
18
+ export { remove } from './remove';
18
19
  export { ImageStatusOptions, sendImageStatus } from './sendImageStatus';
19
20
  export { sendRawStatus, SendStatusOptions } from './sendRawStatus';
20
21
  export { sendReadStatus } from './sendReadStatus';
@@ -0,0 +1,17 @@
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 { MsgKey } from '../../whatsapp';
17
+ export declare function remove(msgId: string | MsgKey): Promise<boolean>;
@@ -18,5 +18,6 @@ import { MsgKey } from '../../whatsapp';
18
18
  export interface SendStatusOptions {
19
19
  waitForAck?: boolean;
20
20
  messageId?: string | MsgKey;
21
+ caption?: string;
21
22
  }
22
23
  export declare function sendRawStatus(message: Chat.RawMessage, options?: SendStatusOptions): Promise<Chat.SendMessageReturn>;
@@ -18,7 +18,6 @@ import { SendStatusOptions } from './sendRawStatus';
18
18
  export interface TextStatusOptions extends SendStatusOptions {
19
19
  font?: TextFontStyle;
20
20
  backgroundColor?: string | number;
21
- textColor?: string | number;
22
21
  }
23
22
  /**
24
23
  * Send a text message to status stories
@@ -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 WAJids
18
+ */
19
+ export declare const STATUS_JID: string;
@@ -26,3 +26,20 @@ export declare function createGroup(groupName: string, participants: Wid[], ephe
26
26
  invite_code_exp: string | null;
27
27
  }[];
28
28
  }>;
29
+ export declare function createGroup(options: {
30
+ title: string;
31
+ ephemeralDuration: number;
32
+ restrict: boolean;
33
+ announce: boolean;
34
+ membershipApprovalMode: boolean;
35
+ memberAddMode: boolean;
36
+ parentGroupId?: Wid;
37
+ }, participants: Wid[]): Promise<{
38
+ wid: Wid;
39
+ participants: {
40
+ wid: Wid;
41
+ error: string;
42
+ invite_code: string | null;
43
+ invite_code_exp: string | null;
44
+ }[];
45
+ }>;
@@ -0,0 +1,35 @@
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 { MsgKey, Wid } from '../misc';
17
+ import { MsgModel } from '../models';
18
+ /**
19
+ * @whatsapp WAWebEncryptAndSendStatusMsg
20
+ */
21
+ export declare function encryptAndSendStatusMsg(msg: {
22
+ msg: {
23
+ type: string;
24
+ data: MsgModel;
25
+ };
26
+ data: {
27
+ ack: number;
28
+ author?: Wid;
29
+ from: Wid;
30
+ id: MsgKey;
31
+ subtype?: string;
32
+ to: Wid;
33
+ type: string;
34
+ };
35
+ }, proto: any, report: any): Promise<any>;
@@ -38,6 +38,7 @@ export * from './encodeMaybeMediaType';
38
38
  export * from './encryptAndSendGroupMsg';
39
39
  export * from './encryptAndSendMsg';
40
40
  export * from './encryptAndSendSenderKeyMsg';
41
+ export * from './encryptAndSendStatusMsg';
41
42
  export * from './encryptMsgProtobuf';
42
43
  export * from './fetchLinkPreview';
43
44
  export * from './findChat';
@@ -105,6 +106,7 @@ export * from './queryOrder';
105
106
  export * from './randomHex';
106
107
  export * from './randomId';
107
108
  export * from './resetGroupInviteCode';
109
+ export * from './revokeStatus';
108
110
  export * from './sendClear';
109
111
  export * from './sendCreateCommunity';
110
112
  export * from './sendCreateGroup';
@@ -125,6 +127,8 @@ export * from './setGroup';
125
127
  export * from './setPin';
126
128
  export * from './setPushname';
127
129
  export * from './status';
130
+ export * from './STATUS_JID';
131
+ export * from './statusEnable';
128
132
  export * from './syncABPropsTask';
129
133
  export * from './typeAttributeFromProtobuf';
130
134
  export * from './unixTime';
@@ -0,0 +1,20 @@
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 { ChatModel, MsgModel } from '../models';
17
+ /**
18
+ * @whatsapp WAWebRevokeStatusAction
19
+ */
20
+ export declare function revokeStatus(chat: ChatModel, msg: MsgModel): Promise<any>;
@@ -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 WAWebStatusSendGatingUtils >= 2.3000.0
18
+ */
19
+ export declare function primaryFeatureEnabled(key: string): boolean;
@@ -38,6 +38,7 @@ export declare class Wid {
38
38
  isPSA(): boolean;
39
39
  isServer(): boolean;
40
40
  isStatusV3(): boolean;
41
+ isStatus(): boolean;
41
42
  isUser(): boolean;
42
43
  isLid(): boolean;
43
44
  isUserNotPSA(): boolean;
@@ -60,6 +61,7 @@ export declare class Wid {
60
61
  static isPSA(wid: string | Wid): boolean;
61
62
  static isServer(wid: string | Wid): boolean;
62
63
  static isStatusV3(wid: string | Wid): boolean;
64
+ static isStatus(wid: string | Wid): boolean;
63
65
  static isUser(wid: string | Wid): boolean;
64
66
  static isLid(wid: string | Wid): boolean;
65
67
  static isWid(wid: string | Wid): boolean;