zaileys 1.1.27 → 1.1.29

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/index.d.mts CHANGED
@@ -16,63 +16,66 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
16
16
  autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
17
17
  autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
18
18
  autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
+ loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
20
  database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
20
21
  type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
21
22
  connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
22
23
  url: z.ZodDefault<z.ZodString>;
23
24
  }, "strip", z.ZodTypeAny, {
24
- url?: string;
25
+ url: string;
25
26
  }, {
26
- url?: string;
27
+ url?: string | undefined;
27
28
  }>>>;
28
29
  }, "strip", z.ZodTypeAny, {
29
- type?: "sqlite" | "postgresql" | "mysql";
30
- connection?: {
31
- url?: string;
30
+ type: "sqlite" | "postgresql" | "mysql";
31
+ connection: {
32
+ url: string;
32
33
  };
33
34
  }, {
34
- type?: "sqlite" | "postgresql" | "mysql";
35
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
35
36
  connection?: {
36
- url?: string;
37
- };
37
+ url?: string | undefined;
38
+ } | undefined;
38
39
  }>>>;
39
- citation: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>>>;
40
+ citation: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined>;
40
41
  }, "strip", z.ZodTypeAny, {
41
- citation?: Record<string, number[]>;
42
- authType?: "pairing";
43
- phoneNumber?: number;
44
- prefix?: string;
45
- ignoreMe?: boolean;
46
- showLogs?: boolean;
47
- autoMentions?: boolean;
48
- autoOnline?: boolean;
49
- autoRead?: boolean;
50
- autoPresence?: boolean;
51
- autoRejectCall?: boolean;
52
- database?: {
53
- type?: "sqlite" | "postgresql" | "mysql";
54
- connection?: {
55
- url?: string;
42
+ citation: Record<string, number[]>;
43
+ authType: "pairing";
44
+ phoneNumber: number;
45
+ ignoreMe: boolean;
46
+ showLogs: boolean;
47
+ autoMentions: boolean;
48
+ autoOnline: boolean;
49
+ autoRead: boolean;
50
+ autoPresence: boolean;
51
+ autoRejectCall: boolean;
52
+ loadLLMSchemas: boolean;
53
+ database: {
54
+ type: "sqlite" | "postgresql" | "mysql";
55
+ connection: {
56
+ url: string;
56
57
  };
57
58
  };
59
+ prefix?: string | undefined;
58
60
  }, {
59
- citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>>;
60
- authType?: "pairing";
61
- phoneNumber?: number;
62
- prefix?: string;
63
- ignoreMe?: boolean;
64
- showLogs?: boolean;
65
- autoMentions?: boolean;
66
- autoOnline?: boolean;
67
- autoRead?: boolean;
68
- autoPresence?: boolean;
69
- autoRejectCall?: boolean;
61
+ authType: "pairing";
62
+ phoneNumber: number;
63
+ citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
64
+ prefix?: string | undefined;
65
+ ignoreMe?: boolean | undefined;
66
+ showLogs?: boolean | undefined;
67
+ autoMentions?: boolean | undefined;
68
+ autoOnline?: boolean | undefined;
69
+ autoRead?: boolean | undefined;
70
+ autoPresence?: boolean | undefined;
71
+ autoRejectCall?: boolean | undefined;
72
+ loadLLMSchemas?: boolean | undefined;
70
73
  database?: {
71
- type?: "sqlite" | "postgresql" | "mysql";
74
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
72
75
  connection?: {
73
- url?: string;
74
- };
75
- };
76
+ url?: string | undefined;
77
+ } | undefined;
78
+ } | undefined;
76
79
  }>, z.ZodObject<{
77
80
  authType: z.ZodLiteral<"qr">;
78
81
  phoneNumber: z.ZodOptional<z.ZodUndefined>;
@@ -85,75 +88,79 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
85
88
  autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
86
89
  autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
87
90
  autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
91
+ loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
88
92
  database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
89
93
  type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
90
94
  connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
91
95
  url: z.ZodDefault<z.ZodString>;
92
96
  }, "strip", z.ZodTypeAny, {
93
- url?: string;
97
+ url: string;
94
98
  }, {
95
- url?: string;
99
+ url?: string | undefined;
96
100
  }>>>;
97
101
  }, "strip", z.ZodTypeAny, {
98
- type?: "sqlite" | "postgresql" | "mysql";
99
- connection?: {
100
- url?: string;
102
+ type: "sqlite" | "postgresql" | "mysql";
103
+ connection: {
104
+ url: string;
101
105
  };
102
106
  }, {
103
- type?: "sqlite" | "postgresql" | "mysql";
107
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
104
108
  connection?: {
105
- url?: string;
106
- };
109
+ url?: string | undefined;
110
+ } | undefined;
107
111
  }>>>;
108
- citation: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>>>;
112
+ citation: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined>;
109
113
  }, "strip", z.ZodTypeAny, {
110
- citation?: Record<string, number[]>;
111
- authType?: "qr";
112
- phoneNumber?: undefined;
113
- prefix?: string;
114
- ignoreMe?: boolean;
115
- showLogs?: boolean;
116
- autoMentions?: boolean;
117
- autoOnline?: boolean;
118
- autoRead?: boolean;
119
- autoPresence?: boolean;
120
- autoRejectCall?: boolean;
121
- database?: {
122
- type?: "sqlite" | "postgresql" | "mysql";
123
- connection?: {
124
- url?: string;
114
+ citation: Record<string, number[]>;
115
+ authType: "qr";
116
+ ignoreMe: boolean;
117
+ showLogs: boolean;
118
+ autoMentions: boolean;
119
+ autoOnline: boolean;
120
+ autoRead: boolean;
121
+ autoPresence: boolean;
122
+ autoRejectCall: boolean;
123
+ loadLLMSchemas: boolean;
124
+ database: {
125
+ type: "sqlite" | "postgresql" | "mysql";
126
+ connection: {
127
+ url: string;
125
128
  };
126
129
  };
130
+ phoneNumber?: undefined;
131
+ prefix?: string | undefined;
127
132
  }, {
128
- citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>>;
129
- authType?: "qr";
133
+ authType: "qr";
134
+ citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
130
135
  phoneNumber?: undefined;
131
- prefix?: string;
132
- ignoreMe?: boolean;
133
- showLogs?: boolean;
134
- autoMentions?: boolean;
135
- autoOnline?: boolean;
136
- autoRead?: boolean;
137
- autoPresence?: boolean;
138
- autoRejectCall?: boolean;
136
+ prefix?: string | undefined;
137
+ ignoreMe?: boolean | undefined;
138
+ showLogs?: boolean | undefined;
139
+ autoMentions?: boolean | undefined;
140
+ autoOnline?: boolean | undefined;
141
+ autoRead?: boolean | undefined;
142
+ autoPresence?: boolean | undefined;
143
+ autoRejectCall?: boolean | undefined;
144
+ loadLLMSchemas?: boolean | undefined;
139
145
  database?: {
140
- type?: "sqlite" | "postgresql" | "mysql";
146
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
141
147
  connection?: {
142
- url?: string;
143
- };
144
- };
148
+ url?: string | undefined;
149
+ } | undefined;
150
+ } | undefined;
145
151
  }>]>;
146
152
 
147
153
  declare const EventConnectionType: z.ZodObject<{
148
154
  status: z.ZodEnum<["connecting", "open", "close"]>;
149
155
  }, "strip", z.ZodTypeAny, {
150
- status?: "open" | "connecting" | "close";
156
+ status: "open" | "connecting" | "close";
151
157
  }, {
152
- status?: "open" | "connecting" | "close";
158
+ status: "open" | "connecting" | "close";
153
159
  }>;
154
160
  declare const EventMessagesType: z.ZodObject<{
155
161
  chatId: z.ZodString;
156
162
  channelId: z.ZodString;
163
+ uniqueId: z.ZodString;
157
164
  receiverId: z.ZodString;
158
165
  receiverName: z.ZodString;
159
166
  roomId: z.ZodString;
@@ -196,6 +203,7 @@ declare const EventMessagesType: z.ZodObject<{
196
203
  replied: z.ZodNullable<z.ZodObject<{
197
204
  chatId: z.ZodString;
198
205
  channelId: z.ZodString;
206
+ uniqueId: z.ZodString;
199
207
  receiverId: z.ZodString;
200
208
  receiverName: z.ZodString;
201
209
  roomId: z.ZodString;
@@ -235,230 +243,224 @@ declare const EventMessagesType: z.ZodObject<{
235
243
  }, z.ZodTypeAny, "passthrough">>>;
236
244
  message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
237
245
  }, "strip", z.ZodTypeAny, {
238
- message?: (...args: unknown[]) => Record<string, any>;
239
- roomId?: string;
240
- isGroup?: boolean;
241
- text?: string;
242
- chatId?: string;
243
- channelId?: string;
244
- receiverId?: string;
245
- receiverName?: string;
246
- roomName?: string;
247
- senderId?: string;
248
- senderName?: string;
249
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
250
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
251
- timestamp?: number;
252
- mentions?: string[];
253
- links?: string[];
254
- isPrefix?: boolean;
255
- isFromMe?: boolean;
256
- isTagMe?: boolean;
257
- isStory?: boolean;
258
- isViewOnce?: boolean;
259
- isEdited?: boolean;
260
- isDeleted?: boolean;
261
- isPinned?: boolean;
262
- isUnPinned?: boolean;
263
- isChannel?: boolean;
264
- isBroadcast?: boolean;
265
- isEphemeral?: boolean;
266
- isForwarded?: boolean;
267
- citation?: Record<string, boolean>;
268
- media?: {
269
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
270
- stream?: (...args: unknown[]) => stream.Readable;
271
- } & {
272
- [k: string]: unknown;
273
- };
246
+ channelId: string;
247
+ uniqueId: string;
248
+ message: (...args: unknown[]) => Record<string, any>;
249
+ senderId: string;
250
+ roomId: string;
251
+ isGroup: boolean;
252
+ text: string | null;
253
+ chatId: string;
254
+ receiverId: string;
255
+ receiverName: string;
256
+ roomName: string;
257
+ senderName: string;
258
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
259
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
260
+ timestamp: number;
261
+ mentions: string[];
262
+ links: string[];
263
+ isPrefix: boolean;
264
+ isFromMe: boolean;
265
+ isTagMe: boolean;
266
+ isStory: boolean;
267
+ isViewOnce: boolean;
268
+ isEdited: boolean;
269
+ isDeleted: boolean;
270
+ isPinned: boolean;
271
+ isUnPinned: boolean;
272
+ isChannel: boolean;
273
+ isBroadcast: boolean;
274
+ isEphemeral: boolean;
275
+ isForwarded: boolean;
276
+ citation: Record<string, boolean> | null;
277
+ media: z.objectOutputType<{
278
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
279
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
280
+ }, z.ZodTypeAny, "passthrough"> | null;
274
281
  }, {
275
- message?: (...args: unknown[]) => Record<string, any>;
276
- roomId?: string;
277
- isGroup?: boolean;
278
- text?: string;
279
- chatId?: string;
280
- channelId?: string;
281
- receiverId?: string;
282
- receiverName?: string;
283
- roomName?: string;
284
- senderId?: string;
285
- senderName?: string;
286
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
287
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
288
- timestamp?: number;
289
- mentions?: string[];
290
- links?: string[];
291
- isPrefix?: boolean;
292
- isFromMe?: boolean;
293
- isTagMe?: boolean;
294
- isStory?: boolean;
295
- isViewOnce?: boolean;
296
- isEdited?: boolean;
297
- isDeleted?: boolean;
298
- isPinned?: boolean;
299
- isUnPinned?: boolean;
300
- isChannel?: boolean;
301
- isBroadcast?: boolean;
302
- isEphemeral?: boolean;
303
- isForwarded?: boolean;
304
- citation?: Record<string, boolean>;
305
- media?: {
306
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
307
- stream?: (...args: unknown[]) => stream.Readable;
308
- } & {
309
- [k: string]: unknown;
310
- };
282
+ channelId: string;
283
+ uniqueId: string;
284
+ message: (...args: unknown[]) => Record<string, any>;
285
+ senderId: string;
286
+ roomId: string;
287
+ isGroup: boolean;
288
+ text: string | null;
289
+ chatId: string;
290
+ receiverId: string;
291
+ receiverName: string;
292
+ roomName: string;
293
+ senderName: string;
294
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
295
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
296
+ timestamp: number;
297
+ mentions: string[];
298
+ links: string[];
299
+ isPrefix: boolean;
300
+ isFromMe: boolean;
301
+ isTagMe: boolean;
302
+ isStory: boolean;
303
+ isViewOnce: boolean;
304
+ isEdited: boolean;
305
+ isDeleted: boolean;
306
+ isPinned: boolean;
307
+ isUnPinned: boolean;
308
+ isChannel: boolean;
309
+ isBroadcast: boolean;
310
+ isEphemeral: boolean;
311
+ isForwarded: boolean;
312
+ citation: Record<string, boolean> | null;
313
+ media: z.objectInputType<{
314
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
315
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
316
+ }, z.ZodTypeAny, "passthrough"> | null;
311
317
  }>>;
312
318
  }, "strip", z.ZodTypeAny, {
313
- message?: (...args: unknown[]) => Record<string, any>;
314
- roomId?: string;
315
- isGroup?: boolean;
316
- text?: string;
317
- chatId?: string;
318
- channelId?: string;
319
- receiverId?: string;
320
- receiverName?: string;
321
- roomName?: string;
322
- senderId?: string;
323
- senderName?: string;
324
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
325
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
326
- timestamp?: number;
327
- mentions?: string[];
328
- links?: string[];
329
- isPrefix?: boolean;
330
- isFromMe?: boolean;
331
- isTagMe?: boolean;
332
- isStory?: boolean;
333
- isViewOnce?: boolean;
334
- isEdited?: boolean;
335
- isDeleted?: boolean;
336
- isPinned?: boolean;
337
- isUnPinned?: boolean;
338
- isChannel?: boolean;
339
- isBroadcast?: boolean;
340
- isEphemeral?: boolean;
341
- isForwarded?: boolean;
342
- citation?: Record<string, boolean>;
343
- media?: {
344
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
345
- stream?: (...args: unknown[]) => stream.Readable;
346
- } & {
347
- [k: string]: unknown;
348
- };
349
- replied?: {
350
- message?: (...args: unknown[]) => Record<string, any>;
351
- roomId?: string;
352
- isGroup?: boolean;
353
- text?: string;
354
- chatId?: string;
355
- channelId?: string;
356
- receiverId?: string;
357
- receiverName?: string;
358
- roomName?: string;
359
- senderId?: string;
360
- senderName?: string;
361
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
362
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
363
- timestamp?: number;
364
- mentions?: string[];
365
- links?: string[];
366
- isPrefix?: boolean;
367
- isFromMe?: boolean;
368
- isTagMe?: boolean;
369
- isStory?: boolean;
370
- isViewOnce?: boolean;
371
- isEdited?: boolean;
372
- isDeleted?: boolean;
373
- isPinned?: boolean;
374
- isUnPinned?: boolean;
375
- isChannel?: boolean;
376
- isBroadcast?: boolean;
377
- isEphemeral?: boolean;
378
- isForwarded?: boolean;
379
- citation?: Record<string, boolean>;
380
- media?: {
381
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
382
- stream?: (...args: unknown[]) => stream.Readable;
383
- } & {
384
- [k: string]: unknown;
385
- };
386
- };
319
+ channelId: string;
320
+ uniqueId: string;
321
+ message: (...args: unknown[]) => Record<string, any>;
322
+ senderId: string;
323
+ roomId: string;
324
+ isGroup: boolean;
325
+ text: string | null;
326
+ chatId: string;
327
+ receiverId: string;
328
+ receiverName: string;
329
+ roomName: string;
330
+ senderName: string;
331
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
332
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
333
+ timestamp: number;
334
+ mentions: string[];
335
+ links: string[];
336
+ isPrefix: boolean;
337
+ isFromMe: boolean;
338
+ isTagMe: boolean;
339
+ isStory: boolean;
340
+ isViewOnce: boolean;
341
+ isEdited: boolean;
342
+ isDeleted: boolean;
343
+ isPinned: boolean;
344
+ isUnPinned: boolean;
345
+ isChannel: boolean;
346
+ isBroadcast: boolean;
347
+ isEphemeral: boolean;
348
+ isForwarded: boolean;
349
+ citation: Record<string, boolean> | null;
350
+ media: z.objectOutputType<{
351
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
352
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
353
+ }, z.ZodTypeAny, "passthrough"> | null;
354
+ replied: {
355
+ channelId: string;
356
+ uniqueId: string;
357
+ message: (...args: unknown[]) => Record<string, any>;
358
+ senderId: string;
359
+ roomId: string;
360
+ isGroup: boolean;
361
+ text: string | null;
362
+ chatId: string;
363
+ receiverId: string;
364
+ receiverName: string;
365
+ roomName: string;
366
+ senderName: string;
367
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
368
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
369
+ timestamp: number;
370
+ mentions: string[];
371
+ links: string[];
372
+ isPrefix: boolean;
373
+ isFromMe: boolean;
374
+ isTagMe: boolean;
375
+ isStory: boolean;
376
+ isViewOnce: boolean;
377
+ isEdited: boolean;
378
+ isDeleted: boolean;
379
+ isPinned: boolean;
380
+ isUnPinned: boolean;
381
+ isChannel: boolean;
382
+ isBroadcast: boolean;
383
+ isEphemeral: boolean;
384
+ isForwarded: boolean;
385
+ citation: Record<string, boolean> | null;
386
+ media: z.objectOutputType<{
387
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
388
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
389
+ }, z.ZodTypeAny, "passthrough"> | null;
390
+ } | null;
387
391
  }, {
388
- message?: (...args: unknown[]) => Record<string, any>;
389
- roomId?: string;
390
- isGroup?: boolean;
391
- text?: string;
392
- chatId?: string;
393
- channelId?: string;
394
- receiverId?: string;
395
- receiverName?: string;
396
- roomName?: string;
397
- senderId?: string;
398
- senderName?: string;
399
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
400
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
401
- timestamp?: number;
402
- mentions?: string[];
403
- links?: string[];
404
- isPrefix?: boolean;
405
- isFromMe?: boolean;
406
- isTagMe?: boolean;
407
- isStory?: boolean;
408
- isViewOnce?: boolean;
409
- isEdited?: boolean;
410
- isDeleted?: boolean;
411
- isPinned?: boolean;
412
- isUnPinned?: boolean;
413
- isChannel?: boolean;
414
- isBroadcast?: boolean;
415
- isEphemeral?: boolean;
416
- isForwarded?: boolean;
417
- citation?: Record<string, boolean>;
418
- media?: {
419
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
420
- stream?: (...args: unknown[]) => stream.Readable;
421
- } & {
422
- [k: string]: unknown;
423
- };
424
- replied?: {
425
- message?: (...args: unknown[]) => Record<string, any>;
426
- roomId?: string;
427
- isGroup?: boolean;
428
- text?: string;
429
- chatId?: string;
430
- channelId?: string;
431
- receiverId?: string;
432
- receiverName?: string;
433
- roomName?: string;
434
- senderId?: string;
435
- senderName?: string;
436
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
437
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
438
- timestamp?: number;
439
- mentions?: string[];
440
- links?: string[];
441
- isPrefix?: boolean;
442
- isFromMe?: boolean;
443
- isTagMe?: boolean;
444
- isStory?: boolean;
445
- isViewOnce?: boolean;
446
- isEdited?: boolean;
447
- isDeleted?: boolean;
448
- isPinned?: boolean;
449
- isUnPinned?: boolean;
450
- isChannel?: boolean;
451
- isBroadcast?: boolean;
452
- isEphemeral?: boolean;
453
- isForwarded?: boolean;
454
- citation?: Record<string, boolean>;
455
- media?: {
456
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
457
- stream?: (...args: unknown[]) => stream.Readable;
458
- } & {
459
- [k: string]: unknown;
460
- };
461
- };
392
+ channelId: string;
393
+ uniqueId: string;
394
+ message: (...args: unknown[]) => Record<string, any>;
395
+ senderId: string;
396
+ roomId: string;
397
+ isGroup: boolean;
398
+ text: string | null;
399
+ chatId: string;
400
+ receiverId: string;
401
+ receiverName: string;
402
+ roomName: string;
403
+ senderName: string;
404
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
405
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
406
+ timestamp: number;
407
+ mentions: string[];
408
+ links: string[];
409
+ isPrefix: boolean;
410
+ isFromMe: boolean;
411
+ isTagMe: boolean;
412
+ isStory: boolean;
413
+ isViewOnce: boolean;
414
+ isEdited: boolean;
415
+ isDeleted: boolean;
416
+ isPinned: boolean;
417
+ isUnPinned: boolean;
418
+ isChannel: boolean;
419
+ isBroadcast: boolean;
420
+ isEphemeral: boolean;
421
+ isForwarded: boolean;
422
+ citation: Record<string, boolean> | null;
423
+ media: z.objectInputType<{
424
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
425
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
426
+ }, z.ZodTypeAny, "passthrough"> | null;
427
+ replied: {
428
+ channelId: string;
429
+ uniqueId: string;
430
+ message: (...args: unknown[]) => Record<string, any>;
431
+ senderId: string;
432
+ roomId: string;
433
+ isGroup: boolean;
434
+ text: string | null;
435
+ chatId: string;
436
+ receiverId: string;
437
+ receiverName: string;
438
+ roomName: string;
439
+ senderName: string;
440
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
441
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
442
+ timestamp: number;
443
+ mentions: string[];
444
+ links: string[];
445
+ isPrefix: boolean;
446
+ isFromMe: boolean;
447
+ isTagMe: boolean;
448
+ isStory: boolean;
449
+ isViewOnce: boolean;
450
+ isEdited: boolean;
451
+ isDeleted: boolean;
452
+ isPinned: boolean;
453
+ isUnPinned: boolean;
454
+ isChannel: boolean;
455
+ isBroadcast: boolean;
456
+ isEphemeral: boolean;
457
+ isForwarded: boolean;
458
+ citation: Record<string, boolean> | null;
459
+ media: z.objectInputType<{
460
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
461
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
462
+ }, z.ZodTypeAny, "passthrough"> | null;
463
+ } | null;
462
464
  }>;
463
465
  declare const EventCallType: z.ZodObject<{
464
466
  callId: z.ZodString;
@@ -470,23 +472,23 @@ declare const EventCallType: z.ZodObject<{
470
472
  isVideo: z.ZodBoolean;
471
473
  isGroup: z.ZodBoolean;
472
474
  }, "strip", z.ZodTypeAny, {
473
- status?: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
474
- callId?: string;
475
- roomId?: string;
476
- callerId?: string;
477
- date?: Date;
478
- offline?: boolean;
479
- isVideo?: boolean;
480
- isGroup?: boolean;
475
+ status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
476
+ callId: string;
477
+ roomId: string;
478
+ callerId: string;
479
+ date: Date;
480
+ offline: boolean;
481
+ isVideo: boolean;
482
+ isGroup: boolean;
481
483
  }, {
482
- status?: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
483
- callId?: string;
484
- roomId?: string;
485
- callerId?: string;
486
- date?: Date;
487
- offline?: boolean;
488
- isVideo?: boolean;
489
- isGroup?: boolean;
484
+ status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
485
+ callId: string;
486
+ roomId: string;
487
+ callerId: string;
488
+ date: Date;
489
+ offline: boolean;
490
+ isVideo: boolean;
491
+ isGroup: boolean;
490
492
  }>;
491
493
  declare const EventEnumType: z.ZodEnum<["connection", "messages", "calls"]>;
492
494
  type EventEnumType = z.infer<typeof EventEnumType>;
@@ -496,57 +498,145 @@ type EventCallbackType = {
496
498
  calls: (ctx: z.infer<typeof EventCallType>) => void;
497
499
  };
498
500
 
501
+ declare const llmMessagesTable: z.ZodObject<{
502
+ channelId: z.ZodString;
503
+ uniqueId: z.ZodString;
504
+ model: z.ZodNullable<z.ZodOptional<z.ZodString>>;
505
+ role: z.ZodString;
506
+ content: z.ZodString;
507
+ additional: z.ZodNullable<z.ZodOptional<z.ZodString>>;
508
+ }, "strip", z.ZodTypeAny, {
509
+ channelId: string;
510
+ uniqueId: string;
511
+ role: string;
512
+ content: string;
513
+ model?: string | null | undefined;
514
+ additional?: string | null | undefined;
515
+ }, {
516
+ channelId: string;
517
+ uniqueId: string;
518
+ role: string;
519
+ content: string;
520
+ model?: string | null | undefined;
521
+ additional?: string | null | undefined;
522
+ }>;
523
+ declare const llmPersonalizationTable: z.ZodObject<{
524
+ uniqueId: z.ZodString;
525
+ senderId: z.ZodString;
526
+ content: z.ZodString;
527
+ }, "strip", z.ZodTypeAny, {
528
+ uniqueId: string;
529
+ content: string;
530
+ senderId: string;
531
+ }, {
532
+ uniqueId: string;
533
+ content: string;
534
+ senderId: string;
535
+ }>;
536
+ declare const llmRAGTable: z.ZodObject<{
537
+ metadata: z.ZodDefault<z.ZodObject<{
538
+ id: z.ZodDefault<z.ZodString>;
539
+ }, "strip", z.ZodTypeAny, {
540
+ id: string;
541
+ }, {
542
+ id?: string | undefined;
543
+ }>>;
544
+ pageContent: z.ZodString;
545
+ }, "strip", z.ZodTypeAny, {
546
+ metadata: {
547
+ id: string;
548
+ };
549
+ pageContent: string;
550
+ }, {
551
+ pageContent: string;
552
+ metadata?: {
553
+ id?: string | undefined;
554
+ } | undefined;
555
+ }>;
556
+ declare const addRAGType: z.ZodObject<Pick<{
557
+ metadata: z.ZodDefault<z.ZodObject<{
558
+ id: z.ZodDefault<z.ZodString>;
559
+ }, "strip", z.ZodTypeAny, {
560
+ id: string;
561
+ }, {
562
+ id?: string | undefined;
563
+ }>>;
564
+ pageContent: z.ZodString;
565
+ }, "pageContent">, "strip", z.ZodTypeAny, {
566
+ pageContent: string;
567
+ }, {
568
+ pageContent: string;
569
+ }>;
570
+ type llmsAdapter = {
571
+ addCompletion: (props: z.infer<typeof llmMessagesTable>) => Promise<z.infer<typeof llmMessagesTable>>;
572
+ deleteCompletion: (uniqueId: string) => Promise<boolean>;
573
+ updateCompletion: (uniqueId: string, props: Partial<z.infer<typeof llmMessagesTable>>) => Promise<z.infer<typeof llmMessagesTable>>;
574
+ clearCompletions: (channelId: string) => Promise<boolean>;
575
+ getCompletion: (uniqueId: string) => Promise<z.infer<typeof llmMessagesTable> | null>;
576
+ getCompletions: (channelId: string) => Promise<z.infer<typeof llmMessagesTable>[]>;
577
+ addPersonalization: (props: z.infer<typeof llmPersonalizationTable>) => Promise<z.infer<typeof llmPersonalizationTable>>;
578
+ deletePersonalization: (uniqueId: string) => Promise<boolean>;
579
+ clearPersonalization: (senderId: string) => Promise<boolean>;
580
+ getPersonalization: (senderId: string) => Promise<z.infer<typeof llmPersonalizationTable>[]>;
581
+ addRAG: (props: z.infer<typeof addRAGType>) => Promise<z.infer<typeof llmRAGTable>>;
582
+ deleteRAG: (id: string) => Promise<boolean>;
583
+ updateRAG: (id: string) => Promise<z.infer<typeof llmRAGTable>>;
584
+ clearRAGs: () => Promise<boolean>;
585
+ getRAG: (id: string) => Promise<z.infer<typeof llmRAGTable> | null>;
586
+ getRAGs: (keyword: string) => Promise<z.infer<typeof llmRAGTable>[]>;
587
+ };
588
+
499
589
  declare const TextWorkerBaseType: z.ZodUnion<[z.ZodString, z.ZodObject<{
500
590
  image: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
501
591
  text: z.ZodOptional<z.ZodString>;
502
592
  }, "strip", z.ZodTypeAny, {
503
- text?: string;
504
- image?: string | Buffer<ArrayBufferLike> | Readable;
593
+ image: string | Buffer<ArrayBufferLike> | Readable;
594
+ text?: string | undefined;
505
595
  }, {
506
- text?: string;
507
- image?: string | Buffer<ArrayBufferLike> | Readable;
596
+ image: string | Buffer<ArrayBufferLike> | Readable;
597
+ text?: string | undefined;
508
598
  }>, z.ZodObject<{
509
599
  video: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
510
600
  text: z.ZodOptional<z.ZodString>;
511
601
  }, "strip", z.ZodTypeAny, {
512
- text?: string;
513
- video?: string | Buffer<ArrayBufferLike> | Readable;
602
+ video: string | Buffer<ArrayBufferLike> | Readable;
603
+ text?: string | undefined;
514
604
  }, {
515
- text?: string;
516
- video?: string | Buffer<ArrayBufferLike> | Readable;
605
+ video: string | Buffer<ArrayBufferLike> | Readable;
606
+ text?: string | undefined;
517
607
  }>, z.ZodObject<{
518
608
  videoNote: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
519
609
  }, "strip", z.ZodTypeAny, {
520
- videoNote?: string | Buffer<ArrayBufferLike> | Readable;
610
+ videoNote: string | Buffer<ArrayBufferLike> | Readable;
521
611
  }, {
522
- videoNote?: string | Buffer<ArrayBufferLike> | Readable;
612
+ videoNote: string | Buffer<ArrayBufferLike> | Readable;
523
613
  }>, z.ZodObject<{
524
614
  gif: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
525
615
  text: z.ZodOptional<z.ZodString>;
526
616
  }, "strip", z.ZodTypeAny, {
527
- text?: string;
528
- gif?: string | Buffer<ArrayBufferLike> | Readable;
617
+ gif: string | Buffer<ArrayBufferLike> | Readable;
618
+ text?: string | undefined;
529
619
  }, {
530
- text?: string;
531
- gif?: string | Buffer<ArrayBufferLike> | Readable;
620
+ gif: string | Buffer<ArrayBufferLike> | Readable;
621
+ text?: string | undefined;
532
622
  }>, z.ZodObject<{
533
623
  audio: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
534
624
  }, "strip", z.ZodTypeAny, {
535
- audio?: string | Buffer<ArrayBufferLike> | Readable;
625
+ audio: string | Buffer<ArrayBufferLike> | Readable;
536
626
  }, {
537
- audio?: string | Buffer<ArrayBufferLike> | Readable;
627
+ audio: string | Buffer<ArrayBufferLike> | Readable;
538
628
  }>, z.ZodObject<{
539
629
  audioNote: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
540
630
  }, "strip", z.ZodTypeAny, {
541
- audioNote?: string | Buffer<ArrayBufferLike> | Readable;
631
+ audioNote: string | Buffer<ArrayBufferLike> | Readable;
542
632
  }, {
543
- audioNote?: string | Buffer<ArrayBufferLike> | Readable;
633
+ audioNote: string | Buffer<ArrayBufferLike> | Readable;
544
634
  }>, z.ZodObject<{
545
635
  sticker: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
546
636
  }, "strip", z.ZodTypeAny, {
547
- sticker?: string | Buffer<ArrayBufferLike> | Readable;
637
+ sticker: string | Buffer<ArrayBufferLike> | Readable;
548
638
  }, {
549
- sticker?: string | Buffer<ArrayBufferLike> | Readable;
639
+ sticker: string | Buffer<ArrayBufferLike> | Readable;
550
640
  }>]>;
551
641
  declare const TextWorkerOptionsType: z.ZodObject<{
552
642
  roomId: z.ZodString;
@@ -555,17 +645,17 @@ declare const TextWorkerOptionsType: z.ZodObject<{
555
645
  verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
556
646
  quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
557
647
  }, "strip", z.ZodTypeAny, {
558
- roomId?: string;
559
- asForwarded?: boolean;
560
- asViewOnce?: boolean;
561
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok";
562
- quoted?: (...args: unknown[]) => Record<string, any>;
648
+ roomId: string;
649
+ asForwarded?: boolean | undefined;
650
+ asViewOnce?: boolean | undefined;
651
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
652
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
563
653
  }, {
564
- roomId?: string;
565
- asForwarded?: boolean;
566
- asViewOnce?: boolean;
567
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok";
568
- quoted?: (...args: unknown[]) => Record<string, any>;
654
+ roomId: string;
655
+ asForwarded?: boolean | undefined;
656
+ asViewOnce?: boolean | undefined;
657
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
658
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
569
659
  }>;
570
660
  declare const LocationWorkerOptionsType: z.ZodObject<{
571
661
  roomId: z.ZodString;
@@ -574,17 +664,17 @@ declare const LocationWorkerOptionsType: z.ZodObject<{
574
664
  verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
575
665
  quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
576
666
  }, "strip", z.ZodTypeAny, {
577
- roomId?: string;
578
- asForwarded?: boolean;
579
- asViewOnce?: boolean;
580
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok";
581
- quoted?: (...args: unknown[]) => Record<string, any>;
667
+ roomId: string;
668
+ asForwarded?: boolean | undefined;
669
+ asViewOnce?: boolean | undefined;
670
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
671
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
582
672
  }, {
583
- roomId?: string;
584
- asForwarded?: boolean;
585
- asViewOnce?: boolean;
586
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok";
587
- quoted?: (...args: unknown[]) => Record<string, any>;
673
+ roomId: string;
674
+ asForwarded?: boolean | undefined;
675
+ asViewOnce?: boolean | undefined;
676
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
677
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
588
678
  }>;
589
679
  declare const LocationWorkerBaseType: z.ZodObject<{
590
680
  latitude: z.ZodNumber;
@@ -592,15 +682,15 @@ declare const LocationWorkerBaseType: z.ZodObject<{
592
682
  title: z.ZodOptional<z.ZodString>;
593
683
  footer: z.ZodOptional<z.ZodString>;
594
684
  }, "strip", z.ZodTypeAny, {
595
- latitude?: number;
596
- longitude?: number;
597
- title?: string;
598
- footer?: string;
685
+ latitude: number;
686
+ longitude: number;
687
+ title?: string | undefined;
688
+ footer?: string | undefined;
599
689
  }, {
600
- latitude?: number;
601
- longitude?: number;
602
- title?: string;
603
- footer?: string;
690
+ latitude: number;
691
+ longitude: number;
692
+ title?: string | undefined;
693
+ footer?: string | undefined;
604
694
  }>;
605
695
  declare const ContactWorkerOptionsType: z.ZodObject<{
606
696
  roomId: z.ZodString;
@@ -609,17 +699,17 @@ declare const ContactWorkerOptionsType: z.ZodObject<{
609
699
  verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
610
700
  quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
611
701
  }, "strip", z.ZodTypeAny, {
612
- roomId?: string;
613
- asForwarded?: boolean;
614
- asViewOnce?: boolean;
615
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok";
616
- quoted?: (...args: unknown[]) => Record<string, any>;
702
+ roomId: string;
703
+ asForwarded?: boolean | undefined;
704
+ asViewOnce?: boolean | undefined;
705
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
706
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
617
707
  }, {
618
- roomId?: string;
619
- asForwarded?: boolean;
620
- asViewOnce?: boolean;
621
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok";
622
- quoted?: (...args: unknown[]) => Record<string, any>;
708
+ roomId: string;
709
+ asForwarded?: boolean | undefined;
710
+ asViewOnce?: boolean | undefined;
711
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
712
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
623
713
  }>;
624
714
  declare const ContactWorkerBaseType: z.ZodObject<{
625
715
  fullname: z.ZodString;
@@ -635,56 +725,56 @@ declare const ContactWorkerBaseType: z.ZodObject<{
635
725
  workAddress: z.ZodOptional<z.ZodString>;
636
726
  avatar: z.ZodOptional<z.ZodString>;
637
727
  }, "strip", z.ZodTypeAny, {
638
- fullname?: string;
639
- nickname?: string;
640
- organization?: string;
641
- role?: string;
642
- email?: string;
643
- whatsAppNumber?: number;
644
- callNumber?: number;
645
- voiceNumber?: number;
646
- website?: string;
647
- homeAddress?: string;
648
- workAddress?: string;
649
- avatar?: string;
728
+ fullname: string;
729
+ whatsAppNumber: number;
730
+ role?: string | undefined;
731
+ nickname?: string | undefined;
732
+ organization?: string | undefined;
733
+ email?: string | undefined;
734
+ callNumber?: number | undefined;
735
+ voiceNumber?: number | undefined;
736
+ website?: string | undefined;
737
+ homeAddress?: string | undefined;
738
+ workAddress?: string | undefined;
739
+ avatar?: string | undefined;
650
740
  }, {
651
- fullname?: string;
652
- nickname?: string;
653
- organization?: string;
654
- role?: string;
655
- email?: string;
656
- whatsAppNumber?: number;
657
- callNumber?: number;
658
- voiceNumber?: number;
659
- website?: string;
660
- homeAddress?: string;
661
- workAddress?: string;
662
- avatar?: string;
741
+ fullname: string;
742
+ whatsAppNumber: number;
743
+ role?: string | undefined;
744
+ nickname?: string | undefined;
745
+ organization?: string | undefined;
746
+ email?: string | undefined;
747
+ callNumber?: number | undefined;
748
+ voiceNumber?: number | undefined;
749
+ website?: string | undefined;
750
+ homeAddress?: string | undefined;
751
+ workAddress?: string | undefined;
752
+ avatar?: string | undefined;
663
753
  }>;
664
754
  declare const ReactionWorkerOptionsType: z.ZodObject<{
665
755
  message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
666
756
  }, "strip", z.ZodTypeAny, {
667
- message?: (...args: unknown[]) => Record<string, any>;
757
+ message: (...args: unknown[]) => Record<string, any>;
668
758
  }, {
669
- message?: (...args: unknown[]) => Record<string, any>;
759
+ message: (...args: unknown[]) => Record<string, any>;
670
760
  }>;
671
761
  declare const ReactionWorkerBaseType: z.ZodString;
672
762
  declare const PinWorkerOptionsType: z.ZodObject<{
673
763
  message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
674
764
  }, "strip", z.ZodTypeAny, {
675
- message?: (...args: unknown[]) => Record<string, any>;
765
+ message: (...args: unknown[]) => Record<string, any>;
676
766
  }, {
677
- message?: (...args: unknown[]) => Record<string, any>;
767
+ message: (...args: unknown[]) => Record<string, any>;
678
768
  }>;
679
769
  declare const PinWorkerBaseType: z.ZodObject<{
680
770
  action: z.ZodEnum<["pin", "unpin"]>;
681
771
  expired: z.ZodEnum<["24h", "7d", "30d"]>;
682
772
  }, "strip", z.ZodTypeAny, {
683
- action?: "pin" | "unpin";
684
- expired?: "24h" | "7d" | "30d";
773
+ action: "pin" | "unpin";
774
+ expired: "24h" | "7d" | "30d";
685
775
  }, {
686
- action?: "pin" | "unpin";
687
- expired?: "24h" | "7d" | "30d";
776
+ action: "pin" | "unpin";
777
+ expired: "24h" | "7d" | "30d";
688
778
  }>;
689
779
  declare const PollWorkerOptionsType: z.ZodObject<Pick<{
690
780
  roomId: z.ZodString;
@@ -693,47 +783,47 @@ declare const PollWorkerOptionsType: z.ZodObject<Pick<{
693
783
  verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
694
784
  quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
695
785
  }, "roomId">, "strip", z.ZodTypeAny, {
696
- roomId?: string;
786
+ roomId: string;
697
787
  }, {
698
- roomId?: string;
788
+ roomId: string;
699
789
  }>;
700
790
  declare const PollWorkerBaseType: z.ZodObject<{
701
791
  name: z.ZodString;
702
792
  answers: z.ZodArray<z.ZodString, "many">;
703
793
  multipleAnswers: z.ZodOptional<z.ZodBoolean>;
704
794
  }, "strip", z.ZodTypeAny, {
705
- name?: string;
706
- answers?: string[];
707
- multipleAnswers?: boolean;
795
+ name: string;
796
+ answers: string[];
797
+ multipleAnswers?: boolean | undefined;
708
798
  }, {
709
- name?: string;
710
- answers?: string[];
711
- multipleAnswers?: boolean;
799
+ name: string;
800
+ answers: string[];
801
+ multipleAnswers?: boolean | undefined;
712
802
  }>;
713
803
  declare const EditWorkerOptionsType: z.ZodObject<{
714
804
  message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
715
805
  }, "strip", z.ZodTypeAny, {
716
- message?: (...args: unknown[]) => Record<string, any>;
806
+ message: (...args: unknown[]) => Record<string, any>;
717
807
  }, {
718
- message?: (...args: unknown[]) => Record<string, any>;
808
+ message: (...args: unknown[]) => Record<string, any>;
719
809
  }>;
720
810
  declare const EditWorkerBaseType: z.ZodString;
721
811
  declare const DeleteWorkerBaseType: z.ZodObject<{
722
812
  message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
723
813
  }, "strip", z.ZodTypeAny, {
724
- message?: (...args: unknown[]) => Record<string, any>;
814
+ message: (...args: unknown[]) => Record<string, any>;
725
815
  }, {
726
- message?: (...args: unknown[]) => Record<string, any>;
816
+ message: (...args: unknown[]) => Record<string, any>;
727
817
  }>;
728
818
  declare const RejectCallWorkerBaseType: z.ZodObject<{
729
819
  callId: z.ZodString;
730
820
  callerId: z.ZodString;
731
821
  }, "strip", z.ZodTypeAny, {
732
- callId?: string;
733
- callerId?: string;
822
+ callId: string;
823
+ callerId: string;
734
824
  }, {
735
- callId?: string;
736
- callerId?: string;
825
+ callId: string;
826
+ callerId: string;
737
827
  }>;
738
828
  declare const MuteWorkerOptionsType: z.ZodObject<Pick<{
739
829
  roomId: z.ZodString;
@@ -742,16 +832,16 @@ declare const MuteWorkerOptionsType: z.ZodObject<Pick<{
742
832
  verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
743
833
  quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
744
834
  }, "roomId">, "strip", z.ZodTypeAny, {
745
- roomId?: string;
835
+ roomId: string;
746
836
  }, {
747
- roomId?: string;
837
+ roomId: string;
748
838
  }>;
749
839
  declare const MuteWorkerBaseType: z.ZodObject<{
750
840
  expired: z.ZodEnum<["remove", "8h", "7d"]>;
751
841
  }, "strip", z.ZodTypeAny, {
752
- expired?: "7d" | "remove" | "8h";
842
+ expired: "7d" | "remove" | "8h";
753
843
  }, {
754
- expired?: "7d" | "remove" | "8h";
844
+ expired: "7d" | "remove" | "8h";
755
845
  }>;
756
846
  declare const ProfileWorkerBaseType: z.ZodString;
757
847
  declare const ProfileWorkerBaseOutputType: z.ZodObject<{
@@ -771,11 +861,11 @@ declare const ProfileWorkerBaseOutputType: z.ZodObject<{
771
861
  type: z.ZodLiteral<"user">;
772
862
  id: z.ZodString;
773
863
  }, "strip", z.ZodTypeAny, {
774
- id?: string;
775
- type?: "user";
864
+ type: "user";
865
+ id: string;
776
866
  }, {
777
- id?: string;
778
- type?: "user";
867
+ type: "user";
868
+ id: string;
779
869
  }>>;
780
870
  roomCreatedAt: z.ZodOptional<z.ZodNumber>;
781
871
  nameUpdatedAt: z.ZodOptional<z.ZodNumber>;
@@ -785,62 +875,62 @@ declare const ProfileWorkerBaseOutputType: z.ZodObject<{
785
875
  type: z.ZodEnum<["user", "admin", "superadmin"]>;
786
876
  id: z.ZodString;
787
877
  }, "strip", z.ZodTypeAny, {
788
- id?: string;
789
- type?: "user" | "admin" | "superadmin";
878
+ type: "user" | "admin" | "superadmin";
879
+ id: string;
790
880
  }, {
791
- id?: string;
792
- type?: "user" | "admin" | "superadmin";
881
+ type: "user" | "admin" | "superadmin";
882
+ id: string;
793
883
  }>, "many">>;
794
884
  }, "strip", z.ZodTypeAny, {
795
- id?: string;
796
- type?: "user" | "group";
797
- owner?: {
798
- id?: string;
799
- type?: "user";
800
- };
801
- isCommunity?: boolean;
802
- isCommunityAnnounce?: boolean;
803
- ephemeralDuration?: number;
804
- avatar?: string;
805
- name?: string;
806
- bio?: string;
807
- isRestrict?: boolean;
808
- isAnnounce?: boolean;
809
- isJoinApprovalMode?: boolean;
810
- isMemberAddMode?: boolean;
811
- roomCreatedAt?: number;
812
- nameUpdatedAt?: number;
813
- bioUpdatedAt?: number;
814
- membersLength?: number;
885
+ type: "user" | "group";
886
+ id: string;
887
+ name: string;
888
+ owner: {
889
+ type: "user";
890
+ id: string;
891
+ } | null;
892
+ avatar: string;
893
+ bio: string;
894
+ isCommunity?: boolean | undefined;
895
+ isCommunityAnnounce?: boolean | undefined;
896
+ ephemeralDuration?: number | undefined;
897
+ isRestrict?: boolean | undefined;
898
+ isAnnounce?: boolean | undefined;
899
+ isJoinApprovalMode?: boolean | undefined;
900
+ isMemberAddMode?: boolean | undefined;
901
+ roomCreatedAt?: number | undefined;
902
+ nameUpdatedAt?: number | undefined;
903
+ bioUpdatedAt?: number | undefined;
904
+ membersLength?: number | undefined;
815
905
  members?: {
816
- id?: string;
817
- type?: "user" | "admin" | "superadmin";
818
- }[];
906
+ type: "user" | "admin" | "superadmin";
907
+ id: string;
908
+ }[] | undefined;
819
909
  }, {
820
- id?: string;
821
- type?: "user" | "group";
822
- owner?: {
823
- id?: string;
824
- type?: "user";
825
- };
826
- isCommunity?: boolean;
827
- isCommunityAnnounce?: boolean;
828
- ephemeralDuration?: number;
829
- avatar?: string;
830
- name?: string;
831
- bio?: string;
832
- isRestrict?: boolean;
833
- isAnnounce?: boolean;
834
- isJoinApprovalMode?: boolean;
835
- isMemberAddMode?: boolean;
836
- roomCreatedAt?: number;
837
- nameUpdatedAt?: number;
838
- bioUpdatedAt?: number;
839
- membersLength?: number;
910
+ type: "user" | "group";
911
+ id: string;
912
+ name: string;
913
+ owner: {
914
+ type: "user";
915
+ id: string;
916
+ } | null;
917
+ avatar: string;
918
+ bio: string;
919
+ isCommunity?: boolean | undefined;
920
+ isCommunityAnnounce?: boolean | undefined;
921
+ ephemeralDuration?: number | undefined;
922
+ isRestrict?: boolean | undefined;
923
+ isAnnounce?: boolean | undefined;
924
+ isJoinApprovalMode?: boolean | undefined;
925
+ isMemberAddMode?: boolean | undefined;
926
+ roomCreatedAt?: number | undefined;
927
+ nameUpdatedAt?: number | undefined;
928
+ bioUpdatedAt?: number | undefined;
929
+ membersLength?: number | undefined;
840
930
  members?: {
841
- id?: string;
842
- type?: "user" | "admin" | "superadmin";
843
- }[];
931
+ type: "user" | "admin" | "superadmin";
932
+ id: string;
933
+ }[] | undefined;
844
934
  }>;
845
935
  declare const PresenceWorkerOptionsType: z.ZodObject<Pick<{
846
936
  roomId: z.ZodString;
@@ -849,15 +939,16 @@ declare const PresenceWorkerOptionsType: z.ZodObject<Pick<{
849
939
  verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
850
940
  quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
851
941
  }, "roomId">, "strip", z.ZodTypeAny, {
852
- roomId?: string;
942
+ roomId: string;
853
943
  }, {
854
- roomId?: string;
944
+ roomId: string;
855
945
  }>;
856
946
  declare const PresenceWorkerBaseType: z.ZodEnum<["typing", "recording", "online", "offline", "paused"]>;
857
947
 
858
948
  declare class Worker {
859
949
  private wa;
860
950
  private parser;
951
+ private caching;
861
952
  constructor(wa: {
862
953
  client: Client;
863
954
  db: Client["db"];
@@ -865,617 +956,669 @@ declare class Worker {
865
956
  });
866
957
  private sendMessage;
867
958
  text(text: z.infer<typeof TextWorkerBaseType>, options: z.infer<typeof TextWorkerOptionsType>): Promise<{
868
- message?: (...args: unknown[]) => Record<string, any>;
869
- roomId?: string;
870
- isGroup?: boolean;
871
- text?: string;
872
- chatId?: string;
873
- channelId?: string;
874
- receiverId?: string;
875
- receiverName?: string;
876
- roomName?: string;
877
- senderId?: string;
878
- senderName?: string;
879
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
880
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
881
- timestamp?: number;
882
- mentions?: string[];
883
- links?: string[];
884
- isPrefix?: boolean;
885
- isFromMe?: boolean;
886
- isTagMe?: boolean;
887
- isStory?: boolean;
888
- isViewOnce?: boolean;
889
- isEdited?: boolean;
890
- isDeleted?: boolean;
891
- isPinned?: boolean;
892
- isUnPinned?: boolean;
893
- isChannel?: boolean;
894
- isBroadcast?: boolean;
895
- isEphemeral?: boolean;
896
- isForwarded?: boolean;
897
- citation?: Record<string, boolean>;
898
- media?: {
899
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
900
- stream?: (...args: unknown[]) => stream.Readable;
901
- } & {
902
- [k: string]: unknown;
903
- };
904
- replied?: {
905
- message?: (...args: unknown[]) => Record<string, any>;
906
- roomId?: string;
907
- isGroup?: boolean;
908
- text?: string;
909
- chatId?: string;
910
- channelId?: string;
911
- receiverId?: string;
912
- receiverName?: string;
913
- roomName?: string;
914
- senderId?: string;
915
- senderName?: string;
916
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
917
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
918
- timestamp?: number;
919
- mentions?: string[];
920
- links?: string[];
921
- isPrefix?: boolean;
922
- isFromMe?: boolean;
923
- isTagMe?: boolean;
924
- isStory?: boolean;
925
- isViewOnce?: boolean;
926
- isEdited?: boolean;
927
- isDeleted?: boolean;
928
- isPinned?: boolean;
929
- isUnPinned?: boolean;
930
- isChannel?: boolean;
931
- isBroadcast?: boolean;
932
- isEphemeral?: boolean;
933
- isForwarded?: boolean;
934
- citation?: Record<string, boolean>;
935
- media?: {
936
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
937
- stream?: (...args: unknown[]) => stream.Readable;
938
- } & {
939
- [k: string]: unknown;
940
- };
941
- };
942
- }>;
959
+ channelId: string;
960
+ uniqueId: string;
961
+ message: (...args: unknown[]) => Record<string, any>;
962
+ senderId: string;
963
+ roomId: string;
964
+ isGroup: boolean;
965
+ text: string | null;
966
+ chatId: string;
967
+ receiverId: string;
968
+ receiverName: string;
969
+ roomName: string;
970
+ senderName: string;
971
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
972
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
973
+ timestamp: number;
974
+ mentions: string[];
975
+ links: string[];
976
+ isPrefix: boolean;
977
+ isFromMe: boolean;
978
+ isTagMe: boolean;
979
+ isStory: boolean;
980
+ isViewOnce: boolean;
981
+ isEdited: boolean;
982
+ isDeleted: boolean;
983
+ isPinned: boolean;
984
+ isUnPinned: boolean;
985
+ isChannel: boolean;
986
+ isBroadcast: boolean;
987
+ isEphemeral: boolean;
988
+ isForwarded: boolean;
989
+ citation: Record<string, boolean> | null;
990
+ media: z.objectOutputType<{
991
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
992
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
993
+ }, z.ZodTypeAny, "passthrough"> | null;
994
+ replied: {
995
+ channelId: string;
996
+ uniqueId: string;
997
+ message: (...args: unknown[]) => Record<string, any>;
998
+ senderId: string;
999
+ roomId: string;
1000
+ isGroup: boolean;
1001
+ text: string | null;
1002
+ chatId: string;
1003
+ receiverId: string;
1004
+ receiverName: string;
1005
+ roomName: string;
1006
+ senderName: string;
1007
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1008
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1009
+ timestamp: number;
1010
+ mentions: string[];
1011
+ links: string[];
1012
+ isPrefix: boolean;
1013
+ isFromMe: boolean;
1014
+ isTagMe: boolean;
1015
+ isStory: boolean;
1016
+ isViewOnce: boolean;
1017
+ isEdited: boolean;
1018
+ isDeleted: boolean;
1019
+ isPinned: boolean;
1020
+ isUnPinned: boolean;
1021
+ isChannel: boolean;
1022
+ isBroadcast: boolean;
1023
+ isEphemeral: boolean;
1024
+ isForwarded: boolean;
1025
+ citation: Record<string, boolean> | null;
1026
+ media: z.objectOutputType<{
1027
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1028
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1029
+ }, z.ZodTypeAny, "passthrough"> | null;
1030
+ } | null;
1031
+ } | null | undefined>;
943
1032
  location(loc: z.infer<typeof LocationWorkerBaseType>, options: z.infer<typeof LocationWorkerOptionsType>): Promise<{
944
- message?: (...args: unknown[]) => Record<string, any>;
945
- roomId?: string;
946
- isGroup?: boolean;
947
- text?: string;
948
- chatId?: string;
949
- channelId?: string;
950
- receiverId?: string;
951
- receiverName?: string;
952
- roomName?: string;
953
- senderId?: string;
954
- senderName?: string;
955
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
956
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
957
- timestamp?: number;
958
- mentions?: string[];
959
- links?: string[];
960
- isPrefix?: boolean;
961
- isFromMe?: boolean;
962
- isTagMe?: boolean;
963
- isStory?: boolean;
964
- isViewOnce?: boolean;
965
- isEdited?: boolean;
966
- isDeleted?: boolean;
967
- isPinned?: boolean;
968
- isUnPinned?: boolean;
969
- isChannel?: boolean;
970
- isBroadcast?: boolean;
971
- isEphemeral?: boolean;
972
- isForwarded?: boolean;
973
- citation?: Record<string, boolean>;
974
- media?: {
975
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
976
- stream?: (...args: unknown[]) => stream.Readable;
977
- } & {
978
- [k: string]: unknown;
979
- };
980
- replied?: {
981
- message?: (...args: unknown[]) => Record<string, any>;
982
- roomId?: string;
983
- isGroup?: boolean;
984
- text?: string;
985
- chatId?: string;
986
- channelId?: string;
987
- receiverId?: string;
988
- receiverName?: string;
989
- roomName?: string;
990
- senderId?: string;
991
- senderName?: string;
992
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
993
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
994
- timestamp?: number;
995
- mentions?: string[];
996
- links?: string[];
997
- isPrefix?: boolean;
998
- isFromMe?: boolean;
999
- isTagMe?: boolean;
1000
- isStory?: boolean;
1001
- isViewOnce?: boolean;
1002
- isEdited?: boolean;
1003
- isDeleted?: boolean;
1004
- isPinned?: boolean;
1005
- isUnPinned?: boolean;
1006
- isChannel?: boolean;
1007
- isBroadcast?: boolean;
1008
- isEphemeral?: boolean;
1009
- isForwarded?: boolean;
1010
- citation?: Record<string, boolean>;
1011
- media?: {
1012
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1013
- stream?: (...args: unknown[]) => stream.Readable;
1014
- } & {
1015
- [k: string]: unknown;
1016
- };
1017
- };
1018
- }>;
1033
+ channelId: string;
1034
+ uniqueId: string;
1035
+ message: (...args: unknown[]) => Record<string, any>;
1036
+ senderId: string;
1037
+ roomId: string;
1038
+ isGroup: boolean;
1039
+ text: string | null;
1040
+ chatId: string;
1041
+ receiverId: string;
1042
+ receiverName: string;
1043
+ roomName: string;
1044
+ senderName: string;
1045
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1046
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1047
+ timestamp: number;
1048
+ mentions: string[];
1049
+ links: string[];
1050
+ isPrefix: boolean;
1051
+ isFromMe: boolean;
1052
+ isTagMe: boolean;
1053
+ isStory: boolean;
1054
+ isViewOnce: boolean;
1055
+ isEdited: boolean;
1056
+ isDeleted: boolean;
1057
+ isPinned: boolean;
1058
+ isUnPinned: boolean;
1059
+ isChannel: boolean;
1060
+ isBroadcast: boolean;
1061
+ isEphemeral: boolean;
1062
+ isForwarded: boolean;
1063
+ citation: Record<string, boolean> | null;
1064
+ media: z.objectOutputType<{
1065
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1066
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1067
+ }, z.ZodTypeAny, "passthrough"> | null;
1068
+ replied: {
1069
+ channelId: string;
1070
+ uniqueId: string;
1071
+ message: (...args: unknown[]) => Record<string, any>;
1072
+ senderId: string;
1073
+ roomId: string;
1074
+ isGroup: boolean;
1075
+ text: string | null;
1076
+ chatId: string;
1077
+ receiverId: string;
1078
+ receiverName: string;
1079
+ roomName: string;
1080
+ senderName: string;
1081
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1082
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1083
+ timestamp: number;
1084
+ mentions: string[];
1085
+ links: string[];
1086
+ isPrefix: boolean;
1087
+ isFromMe: boolean;
1088
+ isTagMe: boolean;
1089
+ isStory: boolean;
1090
+ isViewOnce: boolean;
1091
+ isEdited: boolean;
1092
+ isDeleted: boolean;
1093
+ isPinned: boolean;
1094
+ isUnPinned: boolean;
1095
+ isChannel: boolean;
1096
+ isBroadcast: boolean;
1097
+ isEphemeral: boolean;
1098
+ isForwarded: boolean;
1099
+ citation: Record<string, boolean> | null;
1100
+ media: z.objectOutputType<{
1101
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1102
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1103
+ }, z.ZodTypeAny, "passthrough"> | null;
1104
+ } | null;
1105
+ } | null>;
1019
1106
  contact(vcard: z.infer<typeof ContactWorkerBaseType>, options: z.infer<typeof ContactWorkerOptionsType>): Promise<{
1020
- message?: (...args: unknown[]) => Record<string, any>;
1021
- roomId?: string;
1022
- isGroup?: boolean;
1023
- text?: string;
1024
- chatId?: string;
1025
- channelId?: string;
1026
- receiverId?: string;
1027
- receiverName?: string;
1028
- roomName?: string;
1029
- senderId?: string;
1030
- senderName?: string;
1031
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1032
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1033
- timestamp?: number;
1034
- mentions?: string[];
1035
- links?: string[];
1036
- isPrefix?: boolean;
1037
- isFromMe?: boolean;
1038
- isTagMe?: boolean;
1039
- isStory?: boolean;
1040
- isViewOnce?: boolean;
1041
- isEdited?: boolean;
1042
- isDeleted?: boolean;
1043
- isPinned?: boolean;
1044
- isUnPinned?: boolean;
1045
- isChannel?: boolean;
1046
- isBroadcast?: boolean;
1047
- isEphemeral?: boolean;
1048
- isForwarded?: boolean;
1049
- citation?: Record<string, boolean>;
1050
- media?: {
1051
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1052
- stream?: (...args: unknown[]) => stream.Readable;
1053
- } & {
1054
- [k: string]: unknown;
1055
- };
1056
- replied?: {
1057
- message?: (...args: unknown[]) => Record<string, any>;
1058
- roomId?: string;
1059
- isGroup?: boolean;
1060
- text?: string;
1061
- chatId?: string;
1062
- channelId?: string;
1063
- receiverId?: string;
1064
- receiverName?: string;
1065
- roomName?: string;
1066
- senderId?: string;
1067
- senderName?: string;
1068
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1069
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1070
- timestamp?: number;
1071
- mentions?: string[];
1072
- links?: string[];
1073
- isPrefix?: boolean;
1074
- isFromMe?: boolean;
1075
- isTagMe?: boolean;
1076
- isStory?: boolean;
1077
- isViewOnce?: boolean;
1078
- isEdited?: boolean;
1079
- isDeleted?: boolean;
1080
- isPinned?: boolean;
1081
- isUnPinned?: boolean;
1082
- isChannel?: boolean;
1083
- isBroadcast?: boolean;
1084
- isEphemeral?: boolean;
1085
- isForwarded?: boolean;
1086
- citation?: Record<string, boolean>;
1087
- media?: {
1088
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1089
- stream?: (...args: unknown[]) => stream.Readable;
1090
- } & {
1091
- [k: string]: unknown;
1092
- };
1093
- };
1094
- }>;
1107
+ channelId: string;
1108
+ uniqueId: string;
1109
+ message: (...args: unknown[]) => Record<string, any>;
1110
+ senderId: string;
1111
+ roomId: string;
1112
+ isGroup: boolean;
1113
+ text: string | null;
1114
+ chatId: string;
1115
+ receiverId: string;
1116
+ receiverName: string;
1117
+ roomName: string;
1118
+ senderName: string;
1119
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1120
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1121
+ timestamp: number;
1122
+ mentions: string[];
1123
+ links: string[];
1124
+ isPrefix: boolean;
1125
+ isFromMe: boolean;
1126
+ isTagMe: boolean;
1127
+ isStory: boolean;
1128
+ isViewOnce: boolean;
1129
+ isEdited: boolean;
1130
+ isDeleted: boolean;
1131
+ isPinned: boolean;
1132
+ isUnPinned: boolean;
1133
+ isChannel: boolean;
1134
+ isBroadcast: boolean;
1135
+ isEphemeral: boolean;
1136
+ isForwarded: boolean;
1137
+ citation: Record<string, boolean> | null;
1138
+ media: z.objectOutputType<{
1139
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1140
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1141
+ }, z.ZodTypeAny, "passthrough"> | null;
1142
+ replied: {
1143
+ channelId: string;
1144
+ uniqueId: string;
1145
+ message: (...args: unknown[]) => Record<string, any>;
1146
+ senderId: string;
1147
+ roomId: string;
1148
+ isGroup: boolean;
1149
+ text: string | null;
1150
+ chatId: string;
1151
+ receiverId: string;
1152
+ receiverName: string;
1153
+ roomName: string;
1154
+ senderName: string;
1155
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1156
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1157
+ timestamp: number;
1158
+ mentions: string[];
1159
+ links: string[];
1160
+ isPrefix: boolean;
1161
+ isFromMe: boolean;
1162
+ isTagMe: boolean;
1163
+ isStory: boolean;
1164
+ isViewOnce: boolean;
1165
+ isEdited: boolean;
1166
+ isDeleted: boolean;
1167
+ isPinned: boolean;
1168
+ isUnPinned: boolean;
1169
+ isChannel: boolean;
1170
+ isBroadcast: boolean;
1171
+ isEphemeral: boolean;
1172
+ isForwarded: boolean;
1173
+ citation: Record<string, boolean> | null;
1174
+ media: z.objectOutputType<{
1175
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1176
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1177
+ }, z.ZodTypeAny, "passthrough"> | null;
1178
+ } | null;
1179
+ } | null>;
1095
1180
  reaction(emoticon: z.infer<typeof ReactionWorkerBaseType>, options: z.infer<typeof ReactionWorkerOptionsType>): Promise<{
1096
- message?: (...args: unknown[]) => Record<string, any>;
1097
- roomId?: string;
1098
- isGroup?: boolean;
1099
- text?: string;
1100
- chatId?: string;
1101
- channelId?: string;
1102
- receiverId?: string;
1103
- receiverName?: string;
1104
- roomName?: string;
1105
- senderId?: string;
1106
- senderName?: string;
1107
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1108
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1109
- timestamp?: number;
1110
- mentions?: string[];
1111
- links?: string[];
1112
- isPrefix?: boolean;
1113
- isFromMe?: boolean;
1114
- isTagMe?: boolean;
1115
- isStory?: boolean;
1116
- isViewOnce?: boolean;
1117
- isEdited?: boolean;
1118
- isDeleted?: boolean;
1119
- isPinned?: boolean;
1120
- isUnPinned?: boolean;
1121
- isChannel?: boolean;
1122
- isBroadcast?: boolean;
1123
- isEphemeral?: boolean;
1124
- isForwarded?: boolean;
1125
- citation?: Record<string, boolean>;
1126
- media?: {
1127
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1128
- stream?: (...args: unknown[]) => stream.Readable;
1129
- } & {
1130
- [k: string]: unknown;
1131
- };
1132
- replied?: {
1133
- message?: (...args: unknown[]) => Record<string, any>;
1134
- roomId?: string;
1135
- isGroup?: boolean;
1136
- text?: string;
1137
- chatId?: string;
1138
- channelId?: string;
1139
- receiverId?: string;
1140
- receiverName?: string;
1141
- roomName?: string;
1142
- senderId?: string;
1143
- senderName?: string;
1144
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1145
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1146
- timestamp?: number;
1147
- mentions?: string[];
1148
- links?: string[];
1149
- isPrefix?: boolean;
1150
- isFromMe?: boolean;
1151
- isTagMe?: boolean;
1152
- isStory?: boolean;
1153
- isViewOnce?: boolean;
1154
- isEdited?: boolean;
1155
- isDeleted?: boolean;
1156
- isPinned?: boolean;
1157
- isUnPinned?: boolean;
1158
- isChannel?: boolean;
1159
- isBroadcast?: boolean;
1160
- isEphemeral?: boolean;
1161
- isForwarded?: boolean;
1162
- citation?: Record<string, boolean>;
1163
- media?: {
1164
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1165
- stream?: (...args: unknown[]) => stream.Readable;
1166
- } & {
1167
- [k: string]: unknown;
1168
- };
1169
- };
1170
- }>;
1181
+ channelId: string;
1182
+ uniqueId: string;
1183
+ message: (...args: unknown[]) => Record<string, any>;
1184
+ senderId: string;
1185
+ roomId: string;
1186
+ isGroup: boolean;
1187
+ text: string | null;
1188
+ chatId: string;
1189
+ receiverId: string;
1190
+ receiverName: string;
1191
+ roomName: string;
1192
+ senderName: string;
1193
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1194
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1195
+ timestamp: number;
1196
+ mentions: string[];
1197
+ links: string[];
1198
+ isPrefix: boolean;
1199
+ isFromMe: boolean;
1200
+ isTagMe: boolean;
1201
+ isStory: boolean;
1202
+ isViewOnce: boolean;
1203
+ isEdited: boolean;
1204
+ isDeleted: boolean;
1205
+ isPinned: boolean;
1206
+ isUnPinned: boolean;
1207
+ isChannel: boolean;
1208
+ isBroadcast: boolean;
1209
+ isEphemeral: boolean;
1210
+ isForwarded: boolean;
1211
+ citation: Record<string, boolean> | null;
1212
+ media: z.objectOutputType<{
1213
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1214
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1215
+ }, z.ZodTypeAny, "passthrough"> | null;
1216
+ replied: {
1217
+ channelId: string;
1218
+ uniqueId: string;
1219
+ message: (...args: unknown[]) => Record<string, any>;
1220
+ senderId: string;
1221
+ roomId: string;
1222
+ isGroup: boolean;
1223
+ text: string | null;
1224
+ chatId: string;
1225
+ receiverId: string;
1226
+ receiverName: string;
1227
+ roomName: string;
1228
+ senderName: string;
1229
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1230
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1231
+ timestamp: number;
1232
+ mentions: string[];
1233
+ links: string[];
1234
+ isPrefix: boolean;
1235
+ isFromMe: boolean;
1236
+ isTagMe: boolean;
1237
+ isStory: boolean;
1238
+ isViewOnce: boolean;
1239
+ isEdited: boolean;
1240
+ isDeleted: boolean;
1241
+ isPinned: boolean;
1242
+ isUnPinned: boolean;
1243
+ isChannel: boolean;
1244
+ isBroadcast: boolean;
1245
+ isEphemeral: boolean;
1246
+ isForwarded: boolean;
1247
+ citation: Record<string, boolean> | null;
1248
+ media: z.objectOutputType<{
1249
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1250
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1251
+ }, z.ZodTypeAny, "passthrough"> | null;
1252
+ } | null;
1253
+ } | null>;
1171
1254
  pin(pin: z.infer<typeof PinWorkerBaseType>, options: z.infer<typeof PinWorkerOptionsType>): Promise<{
1172
- message?: (...args: unknown[]) => Record<string, any>;
1173
- roomId?: string;
1174
- isGroup?: boolean;
1175
- text?: string;
1176
- chatId?: string;
1177
- channelId?: string;
1178
- receiverId?: string;
1179
- receiverName?: string;
1180
- roomName?: string;
1181
- senderId?: string;
1182
- senderName?: string;
1183
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1184
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1185
- timestamp?: number;
1186
- mentions?: string[];
1187
- links?: string[];
1188
- isPrefix?: boolean;
1189
- isFromMe?: boolean;
1190
- isTagMe?: boolean;
1191
- isStory?: boolean;
1192
- isViewOnce?: boolean;
1193
- isEdited?: boolean;
1194
- isDeleted?: boolean;
1195
- isPinned?: boolean;
1196
- isUnPinned?: boolean;
1197
- isChannel?: boolean;
1198
- isBroadcast?: boolean;
1199
- isEphemeral?: boolean;
1200
- isForwarded?: boolean;
1201
- citation?: Record<string, boolean>;
1202
- media?: {
1203
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1204
- stream?: (...args: unknown[]) => stream.Readable;
1205
- } & {
1206
- [k: string]: unknown;
1207
- };
1208
- replied?: {
1209
- message?: (...args: unknown[]) => Record<string, any>;
1210
- roomId?: string;
1211
- isGroup?: boolean;
1212
- text?: string;
1213
- chatId?: string;
1214
- channelId?: string;
1215
- receiverId?: string;
1216
- receiverName?: string;
1217
- roomName?: string;
1218
- senderId?: string;
1219
- senderName?: string;
1220
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1221
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1222
- timestamp?: number;
1223
- mentions?: string[];
1224
- links?: string[];
1225
- isPrefix?: boolean;
1226
- isFromMe?: boolean;
1227
- isTagMe?: boolean;
1228
- isStory?: boolean;
1229
- isViewOnce?: boolean;
1230
- isEdited?: boolean;
1231
- isDeleted?: boolean;
1232
- isPinned?: boolean;
1233
- isUnPinned?: boolean;
1234
- isChannel?: boolean;
1235
- isBroadcast?: boolean;
1236
- isEphemeral?: boolean;
1237
- isForwarded?: boolean;
1238
- citation?: Record<string, boolean>;
1239
- media?: {
1240
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1241
- stream?: (...args: unknown[]) => stream.Readable;
1242
- } & {
1243
- [k: string]: unknown;
1244
- };
1245
- };
1246
- }>;
1255
+ channelId: string;
1256
+ uniqueId: string;
1257
+ message: (...args: unknown[]) => Record<string, any>;
1258
+ senderId: string;
1259
+ roomId: string;
1260
+ isGroup: boolean;
1261
+ text: string | null;
1262
+ chatId: string;
1263
+ receiverId: string;
1264
+ receiverName: string;
1265
+ roomName: string;
1266
+ senderName: string;
1267
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1268
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1269
+ timestamp: number;
1270
+ mentions: string[];
1271
+ links: string[];
1272
+ isPrefix: boolean;
1273
+ isFromMe: boolean;
1274
+ isTagMe: boolean;
1275
+ isStory: boolean;
1276
+ isViewOnce: boolean;
1277
+ isEdited: boolean;
1278
+ isDeleted: boolean;
1279
+ isPinned: boolean;
1280
+ isUnPinned: boolean;
1281
+ isChannel: boolean;
1282
+ isBroadcast: boolean;
1283
+ isEphemeral: boolean;
1284
+ isForwarded: boolean;
1285
+ citation: Record<string, boolean> | null;
1286
+ media: z.objectOutputType<{
1287
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1288
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1289
+ }, z.ZodTypeAny, "passthrough"> | null;
1290
+ replied: {
1291
+ channelId: string;
1292
+ uniqueId: string;
1293
+ message: (...args: unknown[]) => Record<string, any>;
1294
+ senderId: string;
1295
+ roomId: string;
1296
+ isGroup: boolean;
1297
+ text: string | null;
1298
+ chatId: string;
1299
+ receiverId: string;
1300
+ receiverName: string;
1301
+ roomName: string;
1302
+ senderName: string;
1303
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1304
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1305
+ timestamp: number;
1306
+ mentions: string[];
1307
+ links: string[];
1308
+ isPrefix: boolean;
1309
+ isFromMe: boolean;
1310
+ isTagMe: boolean;
1311
+ isStory: boolean;
1312
+ isViewOnce: boolean;
1313
+ isEdited: boolean;
1314
+ isDeleted: boolean;
1315
+ isPinned: boolean;
1316
+ isUnPinned: boolean;
1317
+ isChannel: boolean;
1318
+ isBroadcast: boolean;
1319
+ isEphemeral: boolean;
1320
+ isForwarded: boolean;
1321
+ citation: Record<string, boolean> | null;
1322
+ media: z.objectOutputType<{
1323
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1324
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1325
+ }, z.ZodTypeAny, "passthrough"> | null;
1326
+ } | null;
1327
+ } | null>;
1247
1328
  poll(poll: z.infer<typeof PollWorkerBaseType>, options: z.infer<typeof PollWorkerOptionsType>): Promise<{
1248
- message?: (...args: unknown[]) => Record<string, any>;
1249
- roomId?: string;
1250
- isGroup?: boolean;
1251
- text?: string;
1252
- chatId?: string;
1253
- channelId?: string;
1254
- receiverId?: string;
1255
- receiverName?: string;
1256
- roomName?: string;
1257
- senderId?: string;
1258
- senderName?: string;
1259
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1260
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1261
- timestamp?: number;
1262
- mentions?: string[];
1263
- links?: string[];
1264
- isPrefix?: boolean;
1265
- isFromMe?: boolean;
1266
- isTagMe?: boolean;
1267
- isStory?: boolean;
1268
- isViewOnce?: boolean;
1269
- isEdited?: boolean;
1270
- isDeleted?: boolean;
1271
- isPinned?: boolean;
1272
- isUnPinned?: boolean;
1273
- isChannel?: boolean;
1274
- isBroadcast?: boolean;
1275
- isEphemeral?: boolean;
1276
- isForwarded?: boolean;
1277
- citation?: Record<string, boolean>;
1278
- media?: {
1279
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1280
- stream?: (...args: unknown[]) => stream.Readable;
1281
- } & {
1282
- [k: string]: unknown;
1283
- };
1284
- replied?: {
1285
- message?: (...args: unknown[]) => Record<string, any>;
1286
- roomId?: string;
1287
- isGroup?: boolean;
1288
- text?: string;
1289
- chatId?: string;
1290
- channelId?: string;
1291
- receiverId?: string;
1292
- receiverName?: string;
1293
- roomName?: string;
1294
- senderId?: string;
1295
- senderName?: string;
1296
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1297
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1298
- timestamp?: number;
1299
- mentions?: string[];
1300
- links?: string[];
1301
- isPrefix?: boolean;
1302
- isFromMe?: boolean;
1303
- isTagMe?: boolean;
1304
- isStory?: boolean;
1305
- isViewOnce?: boolean;
1306
- isEdited?: boolean;
1307
- isDeleted?: boolean;
1308
- isPinned?: boolean;
1309
- isUnPinned?: boolean;
1310
- isChannel?: boolean;
1311
- isBroadcast?: boolean;
1312
- isEphemeral?: boolean;
1313
- isForwarded?: boolean;
1314
- citation?: Record<string, boolean>;
1315
- media?: {
1316
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1317
- stream?: (...args: unknown[]) => stream.Readable;
1318
- } & {
1319
- [k: string]: unknown;
1320
- };
1321
- };
1322
- }>;
1329
+ channelId: string;
1330
+ uniqueId: string;
1331
+ message: (...args: unknown[]) => Record<string, any>;
1332
+ senderId: string;
1333
+ roomId: string;
1334
+ isGroup: boolean;
1335
+ text: string | null;
1336
+ chatId: string;
1337
+ receiverId: string;
1338
+ receiverName: string;
1339
+ roomName: string;
1340
+ senderName: string;
1341
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1342
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1343
+ timestamp: number;
1344
+ mentions: string[];
1345
+ links: string[];
1346
+ isPrefix: boolean;
1347
+ isFromMe: boolean;
1348
+ isTagMe: boolean;
1349
+ isStory: boolean;
1350
+ isViewOnce: boolean;
1351
+ isEdited: boolean;
1352
+ isDeleted: boolean;
1353
+ isPinned: boolean;
1354
+ isUnPinned: boolean;
1355
+ isChannel: boolean;
1356
+ isBroadcast: boolean;
1357
+ isEphemeral: boolean;
1358
+ isForwarded: boolean;
1359
+ citation: Record<string, boolean> | null;
1360
+ media: z.objectOutputType<{
1361
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1362
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1363
+ }, z.ZodTypeAny, "passthrough"> | null;
1364
+ replied: {
1365
+ channelId: string;
1366
+ uniqueId: string;
1367
+ message: (...args: unknown[]) => Record<string, any>;
1368
+ senderId: string;
1369
+ roomId: string;
1370
+ isGroup: boolean;
1371
+ text: string | null;
1372
+ chatId: string;
1373
+ receiverId: string;
1374
+ receiverName: string;
1375
+ roomName: string;
1376
+ senderName: string;
1377
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1378
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1379
+ timestamp: number;
1380
+ mentions: string[];
1381
+ links: string[];
1382
+ isPrefix: boolean;
1383
+ isFromMe: boolean;
1384
+ isTagMe: boolean;
1385
+ isStory: boolean;
1386
+ isViewOnce: boolean;
1387
+ isEdited: boolean;
1388
+ isDeleted: boolean;
1389
+ isPinned: boolean;
1390
+ isUnPinned: boolean;
1391
+ isChannel: boolean;
1392
+ isBroadcast: boolean;
1393
+ isEphemeral: boolean;
1394
+ isForwarded: boolean;
1395
+ citation: Record<string, boolean> | null;
1396
+ media: z.objectOutputType<{
1397
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1398
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1399
+ }, z.ZodTypeAny, "passthrough"> | null;
1400
+ } | null;
1401
+ } | null>;
1323
1402
  edit(text: z.infer<typeof EditWorkerBaseType>, options: z.infer<typeof EditWorkerOptionsType>): Promise<{
1324
- message?: (...args: unknown[]) => Record<string, any>;
1325
- roomId?: string;
1326
- isGroup?: boolean;
1327
- text?: string;
1328
- chatId?: string;
1329
- channelId?: string;
1330
- receiverId?: string;
1331
- receiverName?: string;
1332
- roomName?: string;
1333
- senderId?: string;
1334
- senderName?: string;
1335
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1336
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1337
- timestamp?: number;
1338
- mentions?: string[];
1339
- links?: string[];
1340
- isPrefix?: boolean;
1341
- isFromMe?: boolean;
1342
- isTagMe?: boolean;
1343
- isStory?: boolean;
1344
- isViewOnce?: boolean;
1345
- isEdited?: boolean;
1346
- isDeleted?: boolean;
1347
- isPinned?: boolean;
1348
- isUnPinned?: boolean;
1349
- isChannel?: boolean;
1350
- isBroadcast?: boolean;
1351
- isEphemeral?: boolean;
1352
- isForwarded?: boolean;
1353
- citation?: Record<string, boolean>;
1354
- media?: {
1355
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1356
- stream?: (...args: unknown[]) => stream.Readable;
1357
- } & {
1358
- [k: string]: unknown;
1359
- };
1360
- replied?: {
1361
- message?: (...args: unknown[]) => Record<string, any>;
1362
- roomId?: string;
1363
- isGroup?: boolean;
1364
- text?: string;
1365
- chatId?: string;
1366
- channelId?: string;
1367
- receiverId?: string;
1368
- receiverName?: string;
1369
- roomName?: string;
1370
- senderId?: string;
1371
- senderName?: string;
1372
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1373
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1374
- timestamp?: number;
1375
- mentions?: string[];
1376
- links?: string[];
1377
- isPrefix?: boolean;
1378
- isFromMe?: boolean;
1379
- isTagMe?: boolean;
1380
- isStory?: boolean;
1381
- isViewOnce?: boolean;
1382
- isEdited?: boolean;
1383
- isDeleted?: boolean;
1384
- isPinned?: boolean;
1385
- isUnPinned?: boolean;
1386
- isChannel?: boolean;
1387
- isBroadcast?: boolean;
1388
- isEphemeral?: boolean;
1389
- isForwarded?: boolean;
1390
- citation?: Record<string, boolean>;
1391
- media?: {
1392
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1393
- stream?: (...args: unknown[]) => stream.Readable;
1394
- } & {
1395
- [k: string]: unknown;
1396
- };
1403
+ channelId: string;
1404
+ uniqueId: string;
1405
+ message: (...args: unknown[]) => Record<string, any>;
1406
+ senderId: string;
1407
+ roomId: string;
1408
+ isGroup: boolean;
1409
+ text: string | null;
1410
+ chatId: string;
1411
+ receiverId: string;
1412
+ receiverName: string;
1413
+ roomName: string;
1414
+ senderName: string;
1415
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1416
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1417
+ timestamp: number;
1418
+ mentions: string[];
1419
+ links: string[];
1420
+ isPrefix: boolean;
1421
+ isFromMe: boolean;
1422
+ isTagMe: boolean;
1423
+ isStory: boolean;
1424
+ isViewOnce: boolean;
1425
+ isEdited: boolean;
1426
+ isDeleted: boolean;
1427
+ isPinned: boolean;
1428
+ isUnPinned: boolean;
1429
+ isChannel: boolean;
1430
+ isBroadcast: boolean;
1431
+ isEphemeral: boolean;
1432
+ isForwarded: boolean;
1433
+ citation: Record<string, boolean> | null;
1434
+ media: z.objectOutputType<{
1435
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1436
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1437
+ }, z.ZodTypeAny, "passthrough"> | null;
1438
+ replied: {
1439
+ channelId: string;
1440
+ uniqueId: string;
1441
+ message: (...args: unknown[]) => Record<string, any>;
1442
+ senderId: string;
1443
+ roomId: string;
1444
+ isGroup: boolean;
1445
+ text: string | null;
1446
+ chatId: string;
1447
+ receiverId: string;
1448
+ receiverName: string;
1449
+ roomName: string;
1450
+ senderName: string;
1451
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1452
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1453
+ timestamp: number;
1454
+ mentions: string[];
1455
+ links: string[];
1456
+ isPrefix: boolean;
1457
+ isFromMe: boolean;
1458
+ isTagMe: boolean;
1459
+ isStory: boolean;
1460
+ isViewOnce: boolean;
1461
+ isEdited: boolean;
1462
+ isDeleted: boolean;
1463
+ isPinned: boolean;
1464
+ isUnPinned: boolean;
1465
+ isChannel: boolean;
1466
+ isBroadcast: boolean;
1467
+ isEphemeral: boolean;
1468
+ isForwarded: boolean;
1469
+ citation: Record<string, boolean> | null;
1470
+ media: z.objectOutputType<{
1471
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1472
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1473
+ }, z.ZodTypeAny, "passthrough"> | null;
1474
+ } | null;
1475
+ } | null>;
1476
+ delete(del: z.infer<typeof DeleteWorkerBaseType>): Promise<{
1477
+ channelId: string;
1478
+ uniqueId: string;
1479
+ message: (...args: unknown[]) => Record<string, any>;
1480
+ senderId: string;
1481
+ roomId: string;
1482
+ isGroup: boolean;
1483
+ text: string | null;
1484
+ chatId: string;
1485
+ receiverId: string;
1486
+ receiverName: string;
1487
+ roomName: string;
1488
+ senderName: string;
1489
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1490
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1491
+ timestamp: number;
1492
+ mentions: string[];
1493
+ links: string[];
1494
+ isPrefix: boolean;
1495
+ isFromMe: boolean;
1496
+ isTagMe: boolean;
1497
+ isStory: boolean;
1498
+ isViewOnce: boolean;
1499
+ isEdited: boolean;
1500
+ isDeleted: boolean;
1501
+ isPinned: boolean;
1502
+ isUnPinned: boolean;
1503
+ isChannel: boolean;
1504
+ isBroadcast: boolean;
1505
+ isEphemeral: boolean;
1506
+ isForwarded: boolean;
1507
+ citation: Record<string, boolean> | null;
1508
+ media: z.objectOutputType<{
1509
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1510
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1511
+ }, z.ZodTypeAny, "passthrough"> | null;
1512
+ replied: {
1513
+ channelId: string;
1514
+ uniqueId: string;
1515
+ message: (...args: unknown[]) => Record<string, any>;
1516
+ senderId: string;
1517
+ roomId: string;
1518
+ isGroup: boolean;
1519
+ text: string | null;
1520
+ chatId: string;
1521
+ receiverId: string;
1522
+ receiverName: string;
1523
+ roomName: string;
1524
+ senderName: string;
1525
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1526
+ chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1527
+ timestamp: number;
1528
+ mentions: string[];
1529
+ links: string[];
1530
+ isPrefix: boolean;
1531
+ isFromMe: boolean;
1532
+ isTagMe: boolean;
1533
+ isStory: boolean;
1534
+ isViewOnce: boolean;
1535
+ isEdited: boolean;
1536
+ isDeleted: boolean;
1537
+ isPinned: boolean;
1538
+ isUnPinned: boolean;
1539
+ isChannel: boolean;
1540
+ isBroadcast: boolean;
1541
+ isEphemeral: boolean;
1542
+ isForwarded: boolean;
1543
+ citation: Record<string, boolean> | null;
1544
+ media: z.objectOutputType<{
1545
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1546
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1547
+ }, z.ZodTypeAny, "passthrough"> | null;
1548
+ } | null;
1549
+ } | null>;
1550
+ rejectCall(call: z.infer<typeof RejectCallWorkerBaseType>): Promise<void | undefined>;
1551
+ mute(mute: z.infer<typeof MuteWorkerBaseType>, options: z.infer<typeof MuteWorkerOptionsType>): Promise<void | undefined>;
1552
+ profile(roomId: z.infer<typeof ProfileWorkerBaseType>): Promise<z.infer<typeof ProfileWorkerBaseOutputType> | null>;
1553
+ presence(action: z.infer<typeof PresenceWorkerBaseType>, options: z.infer<typeof PresenceWorkerOptionsType>): Promise<void | undefined>;
1554
+ addCompletion(props: z.infer<typeof llmMessagesTable>): Promise<{
1555
+ channelId: string;
1556
+ uniqueId: string;
1557
+ role: string;
1558
+ content: string;
1559
+ model?: string | null | undefined;
1560
+ additional?: string | null | undefined;
1561
+ }>;
1562
+ deleteCompletion(uniqueId: string): Promise<boolean>;
1563
+ updateCompletion(uniqueId: string, props: Partial<z.infer<typeof llmMessagesTable>>): Promise<{
1564
+ channelId: string;
1565
+ uniqueId: string;
1566
+ role: string;
1567
+ content: string;
1568
+ model?: string | null | undefined;
1569
+ additional?: string | null | undefined;
1570
+ }>;
1571
+ clearCompletions(channelId: string): Promise<boolean>;
1572
+ getCompletion(uniqueId: string): Promise<{
1573
+ channelId: string;
1574
+ uniqueId: string;
1575
+ role: string;
1576
+ content: string;
1577
+ model?: string | null | undefined;
1578
+ additional?: string | null | undefined;
1579
+ } | null>;
1580
+ getCompletions(channelId: string): Promise<{
1581
+ channelId: string;
1582
+ uniqueId: string;
1583
+ role: string;
1584
+ content: string;
1585
+ model?: string | null | undefined;
1586
+ additional?: string | null | undefined;
1587
+ }[]>;
1588
+ addPersonalization(props: z.infer<typeof llmPersonalizationTable>): Promise<{
1589
+ uniqueId: string;
1590
+ content: string;
1591
+ senderId: string;
1592
+ }>;
1593
+ deletePersonalization(uniqueId: string): Promise<boolean>;
1594
+ clearPersonalization(senderId: string): Promise<boolean>;
1595
+ getPersonalization(senderId: string): Promise<{
1596
+ uniqueId: string;
1597
+ content: string;
1598
+ senderId: string;
1599
+ }[]>;
1600
+ addRAG(props: z.infer<typeof addRAGType>): Promise<any>;
1601
+ deleteRAG(id: string): Promise<boolean>;
1602
+ updateRAG(id: string): Promise<{
1603
+ metadata: {
1604
+ id: string;
1397
1605
  };
1606
+ pageContent: string;
1398
1607
  }>;
1399
- delete(del: z.infer<typeof DeleteWorkerBaseType>): Promise<{
1400
- message?: (...args: unknown[]) => Record<string, any>;
1401
- roomId?: string;
1402
- isGroup?: boolean;
1403
- text?: string;
1404
- chatId?: string;
1405
- channelId?: string;
1406
- receiverId?: string;
1407
- receiverName?: string;
1408
- roomName?: string;
1409
- senderId?: string;
1410
- senderName?: string;
1411
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1412
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1413
- timestamp?: number;
1414
- mentions?: string[];
1415
- links?: string[];
1416
- isPrefix?: boolean;
1417
- isFromMe?: boolean;
1418
- isTagMe?: boolean;
1419
- isStory?: boolean;
1420
- isViewOnce?: boolean;
1421
- isEdited?: boolean;
1422
- isDeleted?: boolean;
1423
- isPinned?: boolean;
1424
- isUnPinned?: boolean;
1425
- isChannel?: boolean;
1426
- isBroadcast?: boolean;
1427
- isEphemeral?: boolean;
1428
- isForwarded?: boolean;
1429
- citation?: Record<string, boolean>;
1430
- media?: {
1431
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1432
- stream?: (...args: unknown[]) => stream.Readable;
1433
- } & {
1434
- [k: string]: unknown;
1608
+ clearRAGs(): Promise<boolean>;
1609
+ getRAG(id: string): Promise<{
1610
+ metadata: {
1611
+ id: string;
1435
1612
  };
1436
- replied?: {
1437
- message?: (...args: unknown[]) => Record<string, any>;
1438
- roomId?: string;
1439
- isGroup?: boolean;
1440
- text?: string;
1441
- chatId?: string;
1442
- channelId?: string;
1443
- receiverId?: string;
1444
- receiverName?: string;
1445
- roomName?: string;
1446
- senderId?: string;
1447
- senderName?: string;
1448
- senderDevice?: "unknown" | "android" | "ios" | "desktop" | "web";
1449
- chatType?: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
1450
- timestamp?: number;
1451
- mentions?: string[];
1452
- links?: string[];
1453
- isPrefix?: boolean;
1454
- isFromMe?: boolean;
1455
- isTagMe?: boolean;
1456
- isStory?: boolean;
1457
- isViewOnce?: boolean;
1458
- isEdited?: boolean;
1459
- isDeleted?: boolean;
1460
- isPinned?: boolean;
1461
- isUnPinned?: boolean;
1462
- isChannel?: boolean;
1463
- isBroadcast?: boolean;
1464
- isEphemeral?: boolean;
1465
- isForwarded?: boolean;
1466
- citation?: Record<string, boolean>;
1467
- media?: {
1468
- buffer?: (...args: unknown[]) => Buffer<ArrayBufferLike>;
1469
- stream?: (...args: unknown[]) => stream.Readable;
1470
- } & {
1471
- [k: string]: unknown;
1472
- };
1613
+ pageContent: string;
1614
+ } | null>;
1615
+ getRAGs(keyword: string): Promise<{
1616
+ metadata: {
1617
+ id: string;
1473
1618
  };
1474
- }>;
1475
- rejectCall(call: z.infer<typeof RejectCallWorkerBaseType>): Promise<void>;
1476
- mute(mute: z.infer<typeof MuteWorkerBaseType>, options: z.infer<typeof MuteWorkerOptionsType>): Promise<void>;
1477
- profile(roomId: z.infer<typeof ProfileWorkerBaseType>): Promise<z.infer<typeof ProfileWorkerBaseOutputType> | null>;
1478
- presence(action: z.infer<typeof PresenceWorkerBaseType>, options: z.infer<typeof PresenceWorkerOptionsType>): Promise<void>;
1619
+ pageContent: string;
1620
+ }[]>;
1621
+ llms: llmsAdapter;
1479
1622
  }
1480
1623
 
1481
1624
  declare class Client {