@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.
@@ -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';
@@ -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
  *
@@ -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.2",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",