@open-wa/wa-automate-types-only 4.36.6 → 4.37.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/dist/api/Client.d.ts
CHANGED
@@ -9,7 +9,8 @@ import { ConfigObject, STATE, LicenseType, Webhook, EventPayload } from './model
|
|
9
9
|
import PQueue, { DefaultAddOptions, Options } from 'p-queue';
|
10
10
|
import { HealthCheck, SessionInfo } from './model/sessionInfo';
|
11
11
|
import { ChatId, GroupChatId, Content, Base64, MessageId, ContactId, DataURL, FilePath } from './model/aliases';
|
12
|
-
import { CustomProduct,
|
12
|
+
import { CustomProduct, Order, Product } from './model/product';
|
13
|
+
import { Label } from './model/label';
|
13
14
|
import { Mp4StickerConversionProcessOptions, StickerMetadata } from './model/media';
|
14
15
|
import { SimpleListener } from './model/events';
|
15
16
|
import { AwaitMessagesOptions, Collection, CollectorFilter, CollectorOptions } from '../structures/Collector';
|
@@ -46,6 +47,7 @@ export declare class Client {
|
|
46
47
|
private _autoEmojiSet;
|
47
48
|
private _autoEmojiQ;
|
48
49
|
private _onLogoutSet;
|
50
|
+
private _preprocIdempotencyCheck;
|
49
51
|
/**
|
50
52
|
* This is used to track if a listener is already used via webhook. Before, webhooks used to be set once per listener. Now a listener can be set via multiple webhooks, or revoked from a specific webhook.
|
51
53
|
* For this reason, listeners assigned to a webhook are only set once and map through all possible webhooks to and fire only if the specific listener is assigned.
|
@@ -221,6 +223,14 @@ export declare class Client {
|
|
221
223
|
* @returns Observable stream of call request objects
|
222
224
|
*/
|
223
225
|
onIncomingCall(fn: (call: Call) => void): Promise<Listener | boolean>;
|
226
|
+
/**
|
227
|
+
* Listens to label change events
|
228
|
+
*
|
229
|
+
* @event
|
230
|
+
* @param fn callback
|
231
|
+
* @fires [[Label]]
|
232
|
+
*/
|
233
|
+
onLabel(fn: (label: Label) => void): Promise<Listener | boolean>;
|
224
234
|
/**
|
225
235
|
*[REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
226
236
|
*
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ContactId, ChatId, MessageId } from "./aliases";
|
2
|
+
export interface Label {
|
3
|
+
/**
|
4
|
+
* The internal ID of the label. Usually a number represented as a string e.g "1"
|
5
|
+
*/
|
6
|
+
id: string;
|
7
|
+
/**
|
8
|
+
* The text contents of the label
|
9
|
+
*/
|
10
|
+
name: string;
|
11
|
+
/**
|
12
|
+
* The items that are tagged with this label
|
13
|
+
*/
|
14
|
+
items: {
|
15
|
+
/**
|
16
|
+
* Labels can be applied to chats, contacts or individual messages. This represents the type of object the label is attached to.
|
17
|
+
*/
|
18
|
+
type: "Chat" | "Contact" | "Message";
|
19
|
+
/**
|
20
|
+
* The ID of the object that the label is atteched to.
|
21
|
+
*/
|
22
|
+
id: ContactId | ChatId | MessageId;
|
23
|
+
}[];
|
24
|
+
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { ChatId, ContactId, MessageId } from "./aliases";
|
2
1
|
import { Message } from "./message";
|
3
2
|
export interface CustomProduct {
|
4
3
|
/**
|
@@ -140,26 +139,3 @@ export interface Order {
|
|
140
139
|
*/
|
141
140
|
message?: Message;
|
142
141
|
}
|
143
|
-
export interface Label {
|
144
|
-
/**
|
145
|
-
* The internal ID of the label. Usually a number represented as a string e.g "1"
|
146
|
-
*/
|
147
|
-
id: string;
|
148
|
-
/**
|
149
|
-
* The text contents of the label
|
150
|
-
*/
|
151
|
-
name: string;
|
152
|
-
/**
|
153
|
-
* The items that are tagged with this label
|
154
|
-
*/
|
155
|
-
items: {
|
156
|
-
/**
|
157
|
-
* Labels can be applied to chats, contacts or individual messages. This represents the type of object the label is attached to.
|
158
|
-
*/
|
159
|
-
type: "Chat" | "Contact" | "Message";
|
160
|
-
/**
|
161
|
-
* The ID of the object that the label is atteched to.
|
162
|
-
*/
|
163
|
-
id: ContactId | ChatId | MessageId;
|
164
|
-
}[];
|
165
|
-
}
|