@open-wa/wa-automate 4.36.6 → 4.37.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.
- package/dist/api/Client.d.ts +10 -1
- package/dist/api/Client.js +12 -0
- package/dist/api/model/events.d.ts +4 -0
- package/dist/api/model/events.js +4 -0
- package/dist/api/model/index.d.ts +1 -0
- package/dist/api/model/index.js +1 -0
- package/dist/api/model/label.d.ts +24 -0
- package/dist/api/model/label.js +2 -0
- package/dist/api/model/product.d.ts +0 -24
- package/package.json +1 -1
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';
|
|
@@ -221,6 +222,14 @@ export declare class Client {
|
|
|
221
222
|
* @returns Observable stream of call request objects
|
|
222
223
|
*/
|
|
223
224
|
onIncomingCall(fn: (call: Call) => void): Promise<Listener | boolean>;
|
|
225
|
+
/**
|
|
226
|
+
* Listens to label change events
|
|
227
|
+
*
|
|
228
|
+
* @event
|
|
229
|
+
* @param fn callback
|
|
230
|
+
* @fires [[Label]]
|
|
231
|
+
*/
|
|
232
|
+
onLabel(fn: (label: Label) => void): Promise<Listener | boolean>;
|
|
224
233
|
/**
|
|
225
234
|
*[REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
|
226
235
|
*
|
package/dist/api/Client.js
CHANGED
|
@@ -807,6 +807,18 @@ class Client {
|
|
|
807
807
|
return this.registerListener(events_2.SimpleListener.IncomingCall, fn);
|
|
808
808
|
});
|
|
809
809
|
}
|
|
810
|
+
/**
|
|
811
|
+
* Listens to label change events
|
|
812
|
+
*
|
|
813
|
+
* @event
|
|
814
|
+
* @param fn callback
|
|
815
|
+
* @fires [[Label]]
|
|
816
|
+
*/
|
|
817
|
+
onLabel(fn) {
|
|
818
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
819
|
+
return this.registerListener(events_2.SimpleListener.Label, fn);
|
|
820
|
+
});
|
|
821
|
+
}
|
|
810
822
|
/**
|
|
811
823
|
*[REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
|
812
824
|
*
|
package/dist/api/model/events.js
CHANGED
package/dist/api/model/index.js
CHANGED
|
@@ -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
|
-
}
|
package/package.json
CHANGED