@open-wa/wa-automate-types-only 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.
@@ -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, Label, Order, Product } from './model/product';
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
  *
@@ -62,6 +62,10 @@ export declare enum SimpleListener {
62
62
  * Represents [[onButton]]
63
63
  */
64
64
  Button = "onButton",
65
+ /**
66
+ * Represents [[onLabel]]
67
+ */
68
+ Label = "onLabel",
65
69
  /**
66
70
  * Requires licence
67
71
  * Represents [[onStory]]
@@ -106,3 +106,4 @@ export declare type EasyApiResponse = {
106
106
  export * from './config';
107
107
  export * from './media';
108
108
  export * from './aliases';
109
+ export * from './label';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.36.6",
3
+ "version": "4.37.0",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",