@wppconnect/wa-js 2.24.8 → 2.26.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 (34) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/dist/chat/functions/forwardMessage.d.ts +1 -2
  3. package/dist/chat/functions/index.d.ts +1 -0
  4. package/dist/chat/functions/sendFileMessage.d.ts +22 -1
  5. package/dist/chat/functions/sendOrderMessage.d.ts +57 -0
  6. package/dist/eventEmitter/eventTypes.d.ts +3 -1
  7. package/dist/eventEmitter/index.d.ts +41 -41
  8. package/dist/index.d.ts +2 -1
  9. package/dist/order/events/eventTypes.d.ts +34 -0
  10. package/dist/order/events/index.d.ts +16 -0
  11. package/dist/order/events/registerUpdateOrderEvent.d.ts +16 -0
  12. package/dist/order/functions/get.d.ts +27 -0
  13. package/dist/order/functions/index.d.ts +16 -0
  14. package/dist/order/index.d.ts +17 -0
  15. package/dist/util/generateOrderUniqueId.d.ts +16 -0
  16. package/dist/util/index.d.ts +1 -0
  17. package/dist/util/linkPreview.d.ts +1 -1
  18. package/dist/webpack/eventTypes.d.ts +1 -0
  19. package/dist/webpack/index.d.ts +6 -2
  20. package/dist/whatsapp/collections/OrderCollection.d.ts +1 -0
  21. package/dist/whatsapp/enums/OUTWARD_TYPES.d.ts +1 -0
  22. package/dist/whatsapp/functions/addAndSendMessageEdit.d.ts +20 -0
  23. package/dist/whatsapp/functions/currencyForCountryShortcode.d.ts +19 -0
  24. package/dist/whatsapp/functions/getCountryShortcodeByPhone.d.ts +19 -0
  25. package/dist/whatsapp/functions/getOrderInfo.d.ts +20 -0
  26. package/dist/whatsapp/functions/index.d.ts +6 -0
  27. package/dist/whatsapp/functions/processRawAudioVideo.d.ts +28 -0
  28. package/dist/whatsapp/functions/processRawMedia.d.ts +26 -0
  29. package/dist/whatsapp/functions/products.d.ts +1 -1
  30. package/dist/whatsapp/functions/updateDBForGroupAction.d.ts +2 -0
  31. package/dist/whatsapp/models/MsgModel.d.ts +2 -0
  32. package/dist/whatsapp/models/OrderItemModel.d.ts +3 -0
  33. package/dist/wppconnect-wa.js +1 -1
  34. package/package.json +20 -20
@@ -0,0 +1,16 @@
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
+ export { get } from './get';
@@ -0,0 +1,17 @@
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
+ export * from './events';
17
+ export * from './functions';
@@ -0,0 +1,16 @@
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
+ export declare function generateOrderUniqueId(): string;
@@ -20,6 +20,7 @@ export * from './createWid';
20
20
  export * from './downloadImage';
21
21
  export * from './errors';
22
22
  export * from './fetchDataFromPNG';
23
+ export * from './generateOrderUniqueId';
23
24
  export * from './getVideoInfoFromBuffer';
24
25
  export * from './isBase64';
25
26
  export * from './resizeImage';
@@ -24,7 +24,7 @@ export declare function fetchRemoteLinkPreviewData(url: string): Promise<{
24
24
  richPreviewType: number;
25
25
  doNotPlayInline: boolean;
26
26
  imageUrl: any;
27
- } | null>;
27
+ } | null | undefined>;
28
28
  /**
29
29
  * Generate the preview link thumbnail data
30
30
  */
@@ -16,4 +16,5 @@
16
16
  export interface WebpackEvents {
17
17
  'webpack.injected': void;
18
18
  'webpack.ready': void;
19
+ 'webpack.full_ready': void;
19
20
  }
@@ -18,11 +18,15 @@
18
18
  */
19
19
  export declare let isInjected: boolean;
20
20
  /**
21
- * Is setted true when the all webpack modules are fully loaded
21
+ * Is setted true when the main webpack modules are fully loaded
22
22
  */
23
23
  export declare let isReady: boolean;
24
+ /**
25
+ * Is setted true when the all webpack modules are fully loaded
26
+ */
27
+ export declare let isFullReady: boolean;
24
28
  export declare function onInjected(listener: () => void, delay?: number): void;
25
- export declare function onReady(listener: () => void): void;
29
+ export declare function onReady(listener: () => void, delay?: number): void;
26
30
  export type SearchModuleCondition = (module: any, moduleId: string) => boolean;
27
31
  export declare let webpackRequire: (<T = any>(moduleId: string) => T) & {
28
32
  /**
@@ -23,5 +23,6 @@ export declare class OrderCollection extends Collection<OrderModel> {
23
23
  static staleCollection?: any;
24
24
  width?: any;
25
25
  height?: any;
26
+ addOrder(): Promise<OrderModel>;
26
27
  findOrder(e?: any, t?: any, a?: any): any;
27
28
  }
@@ -19,6 +19,7 @@ export declare enum OUTWARD_TYPES {
19
19
  VIDEO = "video",
20
20
  AUDIO = "audio",
21
21
  PTT = "ptt",
22
+ PTV = "ptv",
22
23
  STICKER = "sticker",
23
24
  DOCUMENT = "document",
24
25
  PRODUCT = "product",
@@ -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
+ import { SendMsgResult } from '../enums';
17
+ import { ModelPropertiesContructor, MsgModel } from '../models';
18
+ /** @whatsapp 375399
19
+ */
20
+ export declare function addAndSendMessageEdit(editMsg: MsgModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResult>]>;
@@ -0,0 +1,19 @@
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 755707 >= 2.2307.10
18
+ */
19
+ export declare function currencyForCountryShortcode(params: any): any;
@@ -0,0 +1,19 @@
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 755707
18
+ */
19
+ export declare function getCountryShortcodeByPhone(params: any): any;
@@ -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
+ import { MsgModel } from '../models';
17
+ /**
18
+ * @whatsapp 706197 => 2.2335.9
19
+ */
20
+ export declare function getOrderInfo(msg: MsgModel): boolean;
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export * from './addAndSendMessageEdit';
16
17
  export * from './addAndSendMsgToChat';
17
18
  export * from './addToLabelCollection';
18
19
  export * from './blockContact';
@@ -26,6 +27,7 @@ export * from './createFanoutMsgStanza';
26
27
  export * from './createGroup';
27
28
  export * from './createMsgProtobuf';
28
29
  export * from './createOrUpdateReactions';
30
+ export * from './currencyForCountryShortcode';
29
31
  export * from './editBusinessProfile';
30
32
  export * from './encodeMaybeMediaType';
31
33
  export * from './encryptAndSendGroupMsg';
@@ -40,6 +42,7 @@ export * from './genMinimalLinkPreview';
40
42
  export * from './getABPropConfigValue';
41
43
  export * from './getAsMms';
42
44
  export * from './getCommunityParticipants';
45
+ export * from './getCountryShortcodeByPhone';
43
46
  export * from './getCurrentLid';
44
47
  export * from './getEphemeralFields';
45
48
  export * from './getFanOutList';
@@ -48,6 +51,7 @@ export * from './getGroupSizeLimit';
48
51
  export * from './getHistorySyncProgress';
49
52
  export * from './getMembershipApprovalRequests';
50
53
  export * from './getNumChatsPinned';
54
+ export * from './getOrderInfo';
51
55
  export * from './getParticipants';
52
56
  export * from './getQuotedMsgObj';
53
57
  export * from './getReactions';
@@ -66,6 +70,8 @@ export * from './markSeen';
66
70
  export * from './mediaTypeFromProtobuf';
67
71
  export * from './membershipApprovalRequestAction';
68
72
  export * from './msgFindQuery';
73
+ export * from './processRawAudioVideo';
74
+ export * from './processRawMedia';
69
75
  export * from './processRawSticker';
70
76
  export * from './products';
71
77
  export * from './productVisibilitySet';
@@ -0,0 +1,28 @@
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
+ import { OpaqueData } from '../misc';
17
+ /**
18
+ * @whatsapp 232294 >= 2.2242.6
19
+ */
20
+ export declare function processRawAudioVideo(mediaBlob: OpaqueData, isPtt: boolean, precomputedFields: any, asGif: boolean, m: any, type: string, isPtv?: boolean): Promise<{
21
+ mediaBlob: OpaqueData;
22
+ isPtt: boolean;
23
+ precomputedFields: any;
24
+ asGif: boolean;
25
+ m: any;
26
+ type: string;
27
+ isPtv?: boolean;
28
+ }>;
@@ -0,0 +1,26 @@
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
+ import { OpaqueData } from '../misc';
17
+ /**
18
+ * @whatsapp 232294 >= 2.2242.6
19
+ */
20
+ export declare function processRawMedia(data: OpaqueData): Promise<{
21
+ e: any;
22
+ t?: {
23
+ isPtt?: boolean;
24
+ isPtv?: boolean;
25
+ };
26
+ }>;
@@ -40,4 +40,4 @@ export declare function sendProductToChat(...args: any[]): Promise<any>;
40
40
  /** @whatsapp 621374 >= 2.2228.14 */
41
41
  export declare function queryCatalog(chatId?: Wid, t?: any, n?: number, r?: number, i?: number, s?: any, l?: any): any;
42
42
  /** @whatsapp 621374 >= 2.2228.14 */
43
- export declare function queryProduct(chatId?: Wid, productId?: any, imageWidth?: number, imageHeight?: number, i?: any, s?: boolean, l?: any): any;
43
+ export declare function queryProduct(chatId?: Wid, productId?: any, imageWidth?: number, imageHeight?: number, i?: any, s?: boolean): any;
@@ -25,6 +25,7 @@ export interface GroupActionParticipant {
25
25
  export interface GroupActionChange {
26
26
  action: string;
27
27
  actionType: string;
28
+ isLidAddressingMode?: boolean;
28
29
  isInvite?: boolean;
29
30
  isLinkedGroupJoin?: boolean;
30
31
  /**
@@ -32,6 +33,7 @@ export interface GroupActionChange {
32
33
  */
33
34
  participants: Wid[] | GroupActionParticipant[];
34
35
  prevVersion: number;
36
+ reason: string;
35
37
  version: number;
36
38
  }
37
39
  /**
@@ -320,6 +320,8 @@ interface Derived {
320
320
  pollOptions?: any;
321
321
  pollSelectableOptionsCount?: number;
322
322
  pollUpdateParentKey?: any;
323
+ nativeFlowName?: string;
324
+ interactivePayload?: any;
323
325
  }
324
326
  /** @whatsapp 17304 */
325
327
  export declare interface MsgModel extends ModelProxy<Props, Session, Derived> {
@@ -19,9 +19,12 @@ interface Props {
19
19
  id?: any;
20
20
  price?: any;
21
21
  currency?: any;
22
+ name?: string;
22
23
  quantity?: any;
23
24
  thumbnailId?: any;
24
25
  thumbnailUrl?: any;
26
+ isCustomItem?: boolean;
27
+ isQuantitySet?: boolean;
25
28
  }
26
29
  interface Session {
27
30
  stale?: any;