@wppconnect/wa-js 3.15.1 → 3.16.1

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.15.1 (2024-11-19)
1
+ ## 3.16.1 (2025-01-15)
2
2
 
3
3
 
4
4
 
@@ -15,12 +15,12 @@
15
15
  */
16
16
  import { WPPError } from '../util';
17
17
  export declare class InvalidColor extends WPPError {
18
- readonly color?: (string | number | {
18
+ readonly color?: string | number | {
19
19
  _serialized: string;
20
- }) | undefined;
21
- constructor(color?: (string | number | {
20
+ } | undefined;
21
+ constructor(color?: string | number | {
22
22
  _serialized: string;
23
- }) | undefined);
23
+ } | undefined);
24
24
  }
25
25
  /**
26
26
  * Return the color in positive decimal
@@ -56,6 +56,7 @@ export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
56
56
  export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
57
57
  export { prepareRawMessage } from './prepareRawMessage';
58
58
  export { requestPhoneNumber } from './requestPhoneNumber';
59
+ export { sendCatalogMessage } from './sendCatalogMessage';
59
60
  export { OrderItems, OrderMessageOptions, sendChargeMessage, } from './sendChargeMessage';
60
61
  export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
61
62
  export { sendEventMessage } from './sendEventMessage';
@@ -0,0 +1,43 @@
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
+ import { SendMessageOptions, SendMessageReturn } from '..';
18
+ export interface CatalogMessageOptions extends SendMessageOptions {
19
+ jpegThumbnail?: string;
20
+ title?: string;
21
+ description?: string;
22
+ textMessage?: string;
23
+ }
24
+ /**
25
+ * Send catalog message
26
+ *
27
+ * @example
28
+ * ```javascript
29
+ * WPP.chat.sendCatalogMessage(
30
+ * '[number]@c.us',
31
+ * '[number]@c.us',
32
+ * {
33
+ * title: 'My Catalog',
34
+ * description: 'This is my catalog',
35
+ * textMessage: 'Check out my catalog',
36
+ * jpegThumbnail: 'data:image/jpeg;base64,...'
37
+ * }
38
+ * );
39
+ * ```
40
+ *
41
+ * @category Message
42
+ */
43
+ export declare function sendCatalogMessage(chatToSend: string | Wid, chatFromCatalog: string | Wid, opts: CatalogMessageOptions): Promise<SendMessageReturn>;
@@ -58,6 +58,10 @@ export declare function getIsGroup(contact: ContactModel): any;
58
58
  * @whatsapp 660666 >= 2.2327.4
59
59
  */
60
60
  export declare function getIsBroadcast(contact: ContactModel): any;
61
+ /**
62
+ * @whatsapp 660666 >= 2.2327.4
63
+ */
64
+ export declare function getIsNewsletter(contact: ContactModel): any;
61
65
  /**
62
66
  * @whatsapp 660666 >= 2.2327.4
63
67
  */
@@ -0,0 +1,23 @@
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 15688
17
+ */
18
+ export declare namespace Lid1X1MigrationUtils {
19
+ function isLidMigrated(): boolean;
20
+ function isSyncdSessionMigrated(): boolean;
21
+ function setIsLidMigrated(a?: any): any;
22
+ function shouldApplyNonMigratedMessagingRules(): any;
23
+ }
@@ -27,6 +27,7 @@ export declare class Wid {
27
27
  equals(wid: unknown): boolean;
28
28
  getDeviceId(): number;
29
29
  getSignalAddress(): string;
30
+ isNewsletter(): boolean;
30
31
  isBot(): boolean;
31
32
  isBroadcast(): boolean;
32
33
  isCompanion(): boolean;
@@ -23,6 +23,7 @@ export * from './Constants';
23
23
  export * from './EventEmitter';
24
24
  export * from './ImageUtils';
25
25
  export * from './IsOfficialClient';
26
+ export * from './Lid1X1MigrationUtils';
26
27
  export * from './MediaBlobCache';
27
28
  export * from './MediaEntry';
28
29
  export * from './MediaObject';
@@ -129,6 +129,11 @@ interface Derived {
129
129
  * @deprecated
130
130
  */
131
131
  isBroadcast: boolean;
132
+ /**
133
+ * Deprecated in favor of getIsBroadcast
134
+ * @deprecated
135
+ */
136
+ isNewsletter: boolean;
132
137
  /**
133
138
  * Deprecated in favor of getIsPSA
134
139
  * @deprecated