@wppconnect/wa-js 3.4.0 → 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.0 (2024-06-21)
1
+ ## 3.4.2 (2024-07-08)
2
2
 
3
3
 
4
4
 
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { MsgKey } from '../../whatsapp';
16
+ import { MsgKey, OrderModel } from '../../whatsapp';
17
17
  /**
18
- * Get info of your sended order
18
+ * Get info of a order
19
19
  *
20
20
  * @example
21
21
  * ```javascript
@@ -24,4 +24,4 @@ import { MsgKey } from '../../whatsapp';
24
24
  *
25
25
  * @return Your current catalog
26
26
  */
27
- export declare function get(msgId: string | MsgKey): Promise<boolean>;
27
+ export declare function get(msgId: string | MsgKey): Promise<OrderModel>;
@@ -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';
@@ -101,9 +102,11 @@ export * from './profilePic';
101
102
  export * from './queryAllGroups';
102
103
  export * from './queryGroupInviteCode';
103
104
  export * from './queryNewsletterMetadataByJid';
105
+ export * from './queryOrder';
104
106
  export * from './randomHex';
105
107
  export * from './randomId';
106
108
  export * from './resetGroupInviteCode';
109
+ export * from './revokeStatus';
107
110
  export * from './sendClear';
108
111
  export * from './sendCreateCommunity';
109
112
  export * from './sendCreateGroup';
@@ -124,6 +127,8 @@ export * from './setGroup';
124
127
  export * from './setPin';
125
128
  export * from './setPushname';
126
129
  export * from './status';
130
+ export * from './STATUS_JID';
131
+ export * from './statusEnable';
127
132
  export * from './syncABPropsTask';
128
133
  export * from './typeAttributeFromProtobuf';
129
134
  export * from './unixTime';
@@ -0,0 +1,32 @@
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
+ /** @whatsapp WAWebBizQueryOrderJob >= 2.30000.0 */
17
+ export declare function queryOrder(productId: string, imageWidth: number, imageHeight: number, token: string, e?: any): Promise<{
18
+ currency: string;
19
+ createdAt: number;
20
+ products: {
21
+ id: string;
22
+ price: number;
23
+ thumbnailId: string;
24
+ thumbnailUrl: string;
25
+ currency: string;
26
+ name: string;
27
+ quantity: number;
28
+ }[];
29
+ subtotal: number;
30
+ total: number;
31
+ tax: number | null;
32
+ }>;
@@ -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;