zaileys 1.1.28 → 1.1.30

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
@@ -4,6 +4,124 @@ import { z } from 'zod';
4
4
  import * as stream from 'stream';
5
5
  import { Readable } from 'stream';
6
6
 
7
+ declare const AdapterDatabaseType: z.ZodDefault<z.ZodOptional<z.ZodObject<{
8
+ type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
9
+ connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
10
+ url: z.ZodDefault<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ url: string;
13
+ }, {
14
+ url?: string | undefined;
15
+ }>>>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ type: "sqlite" | "postgresql" | "mysql";
18
+ connection: {
19
+ url: string;
20
+ };
21
+ }, {
22
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
23
+ connection?: {
24
+ url?: string | undefined;
25
+ } | undefined;
26
+ }>>>;
27
+ declare const CitationType: 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>;
28
+ declare const ClientClassesBaseType: z.ZodObject<{
29
+ prefix: z.ZodOptional<z.ZodString>;
30
+ ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
31
+ showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
32
+ autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
33
+ autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
34
+ autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
35
+ autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
36
+ autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
37
+ loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
+ webhooks: z.ZodOptional<z.ZodObject<{
39
+ url: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ url: string;
42
+ }, {
43
+ url: string;
44
+ }>>;
45
+ limiter: z.ZodOptional<z.ZodObject<{
46
+ durationMs: z.ZodNumber;
47
+ maxMessages: z.ZodNumber;
48
+ }, "strip", z.ZodTypeAny, {
49
+ durationMs: number;
50
+ maxMessages: number;
51
+ }, {
52
+ durationMs: number;
53
+ maxMessages: number;
54
+ }>>;
55
+ database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
56
+ type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
57
+ connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
58
+ url: z.ZodDefault<z.ZodString>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ url: string;
61
+ }, {
62
+ url?: string | undefined;
63
+ }>>>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ type: "sqlite" | "postgresql" | "mysql";
66
+ connection: {
67
+ url: string;
68
+ };
69
+ }, {
70
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
71
+ connection?: {
72
+ url?: string | undefined;
73
+ } | undefined;
74
+ }>>>;
75
+ 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>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ citation: Record<string, number[]>;
78
+ ignoreMe: boolean;
79
+ showLogs: boolean;
80
+ autoMentions: boolean;
81
+ autoOnline: boolean;
82
+ autoRead: boolean;
83
+ autoPresence: boolean;
84
+ autoRejectCall: boolean;
85
+ loadLLMSchemas: boolean;
86
+ database: {
87
+ type: "sqlite" | "postgresql" | "mysql";
88
+ connection: {
89
+ url: string;
90
+ };
91
+ };
92
+ webhooks?: {
93
+ url: string;
94
+ } | undefined;
95
+ prefix?: string | undefined;
96
+ limiter?: {
97
+ durationMs: number;
98
+ maxMessages: number;
99
+ } | undefined;
100
+ }, {
101
+ citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
102
+ webhooks?: {
103
+ url: string;
104
+ } | undefined;
105
+ prefix?: string | undefined;
106
+ ignoreMe?: boolean | undefined;
107
+ showLogs?: boolean | undefined;
108
+ autoMentions?: boolean | undefined;
109
+ autoOnline?: boolean | undefined;
110
+ autoRead?: boolean | undefined;
111
+ autoPresence?: boolean | undefined;
112
+ autoRejectCall?: boolean | undefined;
113
+ loadLLMSchemas?: boolean | undefined;
114
+ limiter?: {
115
+ durationMs: number;
116
+ maxMessages: number;
117
+ } | undefined;
118
+ database?: {
119
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
120
+ connection?: {
121
+ url?: string | undefined;
122
+ } | undefined;
123
+ } | undefined;
124
+ }>;
7
125
  declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObject<{
8
126
  authType: z.ZodLiteral<"pairing">;
9
127
  phoneNumber: z.ZodNumber;
@@ -17,6 +135,23 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
17
135
  autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
18
136
  autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
137
  loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
138
+ webhooks: z.ZodOptional<z.ZodObject<{
139
+ url: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ url: string;
142
+ }, {
143
+ url: string;
144
+ }>>;
145
+ limiter: z.ZodOptional<z.ZodObject<{
146
+ durationMs: z.ZodNumber;
147
+ maxMessages: z.ZodNumber;
148
+ }, "strip", z.ZodTypeAny, {
149
+ durationMs: number;
150
+ maxMessages: number;
151
+ }, {
152
+ durationMs: number;
153
+ maxMessages: number;
154
+ }>>;
20
155
  database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
21
156
  type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
22
157
  connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
@@ -56,11 +191,21 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
56
191
  url: string;
57
192
  };
58
193
  };
194
+ webhooks?: {
195
+ url: string;
196
+ } | undefined;
59
197
  prefix?: string | undefined;
198
+ limiter?: {
199
+ durationMs: number;
200
+ maxMessages: number;
201
+ } | undefined;
60
202
  }, {
61
203
  authType: "pairing";
62
204
  phoneNumber: number;
63
205
  citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
206
+ webhooks?: {
207
+ url: string;
208
+ } | undefined;
64
209
  prefix?: string | undefined;
65
210
  ignoreMe?: boolean | undefined;
66
211
  showLogs?: boolean | undefined;
@@ -70,6 +215,10 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
70
215
  autoPresence?: boolean | undefined;
71
216
  autoRejectCall?: boolean | undefined;
72
217
  loadLLMSchemas?: boolean | undefined;
218
+ limiter?: {
219
+ durationMs: number;
220
+ maxMessages: number;
221
+ } | undefined;
73
222
  database?: {
74
223
  type?: "sqlite" | "postgresql" | "mysql" | undefined;
75
224
  connection?: {
@@ -89,6 +238,23 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
89
238
  autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
90
239
  autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
91
240
  loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
241
+ webhooks: z.ZodOptional<z.ZodObject<{
242
+ url: z.ZodString;
243
+ }, "strip", z.ZodTypeAny, {
244
+ url: string;
245
+ }, {
246
+ url: string;
247
+ }>>;
248
+ limiter: z.ZodOptional<z.ZodObject<{
249
+ durationMs: z.ZodNumber;
250
+ maxMessages: z.ZodNumber;
251
+ }, "strip", z.ZodTypeAny, {
252
+ durationMs: number;
253
+ maxMessages: number;
254
+ }, {
255
+ durationMs: number;
256
+ maxMessages: number;
257
+ }>>;
92
258
  database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
93
259
  type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
94
260
  connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
@@ -127,11 +293,21 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
127
293
  url: string;
128
294
  };
129
295
  };
296
+ webhooks?: {
297
+ url: string;
298
+ } | undefined;
130
299
  phoneNumber?: undefined;
131
300
  prefix?: string | undefined;
301
+ limiter?: {
302
+ durationMs: number;
303
+ maxMessages: number;
304
+ } | undefined;
132
305
  }, {
133
306
  authType: "qr";
134
307
  citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
308
+ webhooks?: {
309
+ url: string;
310
+ } | undefined;
135
311
  phoneNumber?: undefined;
136
312
  prefix?: string | undefined;
137
313
  ignoreMe?: boolean | undefined;
@@ -142,6 +318,10 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
142
318
  autoPresence?: boolean | undefined;
143
319
  autoRejectCall?: boolean | undefined;
144
320
  loadLLMSchemas?: boolean | undefined;
321
+ limiter?: {
322
+ durationMs: number;
323
+ maxMessages: number;
324
+ } | undefined;
145
325
  database?: {
146
326
  type?: "sqlite" | "postgresql" | "mysql" | undefined;
147
327
  connection?: {
@@ -150,6 +330,57 @@ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObjec
150
330
  } | undefined;
151
331
  }>]>;
152
332
 
333
+ declare const WebhooksParserBaseType: z.ZodObject<{
334
+ id: z.ZodString;
335
+ method: z.ZodEnum<["GET", "POST"]>;
336
+ host: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
337
+ referer: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
338
+ date: z.ZodString;
339
+ size: z.ZodUnion<[z.ZodNumber, z.ZodUndefined]>;
340
+ data: z.ZodObject<{
341
+ query: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
342
+ json: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
343
+ form: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
344
+ raw: z.ZodUnion<[z.ZodString, z.ZodNull]>;
345
+ }, "strip", z.ZodTypeAny, {
346
+ query: Record<string, any> | null;
347
+ json: Record<string, any> | null;
348
+ form: Record<string, any> | null;
349
+ raw: string | null;
350
+ }, {
351
+ query: Record<string, any> | null;
352
+ json: Record<string, any> | null;
353
+ form: Record<string, any> | null;
354
+ raw: string | null;
355
+ }>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ id: string;
358
+ date: string;
359
+ method: "GET" | "POST";
360
+ data: {
361
+ query: Record<string, any> | null;
362
+ json: Record<string, any> | null;
363
+ form: Record<string, any> | null;
364
+ raw: string | null;
365
+ };
366
+ host?: string | undefined;
367
+ referer?: string | undefined;
368
+ size?: number | undefined;
369
+ }, {
370
+ id: string;
371
+ date: string;
372
+ method: "GET" | "POST";
373
+ data: {
374
+ query: Record<string, any> | null;
375
+ json: Record<string, any> | null;
376
+ form: Record<string, any> | null;
377
+ raw: string | null;
378
+ };
379
+ host?: string | undefined;
380
+ referer?: string | undefined;
381
+ size?: number | undefined;
382
+ }>;
383
+
153
384
  declare const EventConnectionType: z.ZodObject<{
154
385
  status: z.ZodEnum<["connecting", "open", "close"]>;
155
386
  }, "strip", z.ZodTypeAny, {
@@ -174,6 +405,7 @@ declare const EventMessagesType: z.ZodObject<{
174
405
  text: z.ZodNullable<z.ZodString>;
175
406
  links: z.ZodArray<z.ZodString, "many">;
176
407
  isPrefix: z.ZodBoolean;
408
+ isSpam: z.ZodBoolean;
177
409
  isFromMe: z.ZodBoolean;
178
410
  isTagMe: z.ZodBoolean;
179
411
  isGroup: z.ZodBoolean;
@@ -217,6 +449,7 @@ declare const EventMessagesType: z.ZodObject<{
217
449
  text: z.ZodNullable<z.ZodString>;
218
450
  links: z.ZodArray<z.ZodString, "many">;
219
451
  isPrefix: z.ZodBoolean;
452
+ isSpam: z.ZodBoolean;
220
453
  isFromMe: z.ZodBoolean;
221
454
  isTagMe: z.ZodBoolean;
222
455
  isGroup: z.ZodBoolean;
@@ -261,6 +494,7 @@ declare const EventMessagesType: z.ZodObject<{
261
494
  mentions: string[];
262
495
  links: string[];
263
496
  isPrefix: boolean;
497
+ isSpam: boolean;
264
498
  isFromMe: boolean;
265
499
  isTagMe: boolean;
266
500
  isStory: boolean;
@@ -297,6 +531,7 @@ declare const EventMessagesType: z.ZodObject<{
297
531
  mentions: string[];
298
532
  links: string[];
299
533
  isPrefix: boolean;
534
+ isSpam: boolean;
300
535
  isFromMe: boolean;
301
536
  isTagMe: boolean;
302
537
  isStory: boolean;
@@ -334,6 +569,7 @@ declare const EventMessagesType: z.ZodObject<{
334
569
  mentions: string[];
335
570
  links: string[];
336
571
  isPrefix: boolean;
572
+ isSpam: boolean;
337
573
  isFromMe: boolean;
338
574
  isTagMe: boolean;
339
575
  isStory: boolean;
@@ -370,6 +606,7 @@ declare const EventMessagesType: z.ZodObject<{
370
606
  mentions: string[];
371
607
  links: string[];
372
608
  isPrefix: boolean;
609
+ isSpam: boolean;
373
610
  isFromMe: boolean;
374
611
  isTagMe: boolean;
375
612
  isStory: boolean;
@@ -407,6 +644,7 @@ declare const EventMessagesType: z.ZodObject<{
407
644
  mentions: string[];
408
645
  links: string[];
409
646
  isPrefix: boolean;
647
+ isSpam: boolean;
410
648
  isFromMe: boolean;
411
649
  isTagMe: boolean;
412
650
  isStory: boolean;
@@ -443,6 +681,7 @@ declare const EventMessagesType: z.ZodObject<{
443
681
  mentions: string[];
444
682
  links: string[];
445
683
  isPrefix: boolean;
684
+ isSpam: boolean;
446
685
  isFromMe: boolean;
447
686
  isTagMe: boolean;
448
687
  isStory: boolean;
@@ -490,111 +729,430 @@ declare const EventCallType: z.ZodObject<{
490
729
  isVideo: boolean;
491
730
  isGroup: boolean;
492
731
  }>;
493
- declare const EventEnumType: z.ZodEnum<["connection", "messages", "calls"]>;
732
+ declare const EventEnumType: z.ZodEnum<["connection", "messages", "calls", "webhooks"]>;
494
733
  type EventEnumType = z.infer<typeof EventEnumType>;
495
734
  type EventCallbackType = {
496
735
  connection: (ctx: z.infer<typeof EventConnectionType>) => void;
497
736
  messages: (ctx: z.infer<typeof EventMessagesType>) => void;
498
737
  calls: (ctx: z.infer<typeof EventCallType>) => void;
738
+ webhooks: (ctx: z.infer<typeof WebhooksParserBaseType>) => void;
499
739
  };
500
740
 
501
- declare const llmMessagesTable: z.ZodObject<{
741
+ declare const chatsGetMessage: z.ZodObject<{
742
+ chatId: z.ZodString;
502
743
  channelId: z.ZodString;
503
744
  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;
745
+ receiverId: z.ZodString;
746
+ receiverName: z.ZodString;
747
+ roomId: z.ZodString;
748
+ roomName: z.ZodString;
525
749
  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>;
750
+ senderName: z.ZodString;
751
+ senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
752
+ chatType: z.ZodEnum<["text", "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", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
753
+ timestamp: z.ZodNumber;
754
+ mentions: z.ZodArray<z.ZodString, "many">;
755
+ text: z.ZodNullable<z.ZodString>;
756
+ links: z.ZodArray<z.ZodString, "many">;
757
+ isPrefix: z.ZodBoolean;
758
+ isSpam: z.ZodBoolean;
759
+ isFromMe: z.ZodBoolean;
760
+ isTagMe: z.ZodBoolean;
761
+ isGroup: z.ZodBoolean;
762
+ isStory: z.ZodBoolean;
763
+ isViewOnce: z.ZodBoolean;
764
+ isEdited: z.ZodBoolean;
765
+ isDeleted: z.ZodBoolean;
766
+ isPinned: z.ZodBoolean;
767
+ isUnPinned: z.ZodBoolean;
768
+ isChannel: z.ZodBoolean;
769
+ isBroadcast: z.ZodBoolean;
770
+ isEphemeral: z.ZodBoolean;
771
+ isForwarded: z.ZodBoolean;
772
+ citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
773
+ media: z.ZodNullable<z.ZodObject<{
774
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
775
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
776
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
777
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
778
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
779
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
780
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
781
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
782
+ }, z.ZodTypeAny, "passthrough">>>;
783
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
784
+ } & {
785
+ replied: z.ZodNullable<z.ZodObject<{
786
+ chatId: z.ZodString;
787
+ channelId: z.ZodString;
788
+ uniqueId: z.ZodString;
789
+ receiverId: z.ZodString;
790
+ receiverName: z.ZodString;
791
+ roomId: z.ZodString;
792
+ roomName: z.ZodString;
793
+ senderId: z.ZodString;
794
+ senderName: z.ZodString;
795
+ senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
796
+ chatType: z.ZodEnum<["text", "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", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
797
+ timestamp: z.ZodNumber;
798
+ mentions: z.ZodArray<z.ZodString, "many">;
799
+ text: z.ZodNullable<z.ZodString>;
800
+ links: z.ZodArray<z.ZodString, "many">;
801
+ isPrefix: z.ZodBoolean;
802
+ isSpam: z.ZodBoolean;
803
+ isFromMe: z.ZodBoolean;
804
+ isTagMe: z.ZodBoolean;
805
+ isGroup: z.ZodBoolean;
806
+ isStory: z.ZodBoolean;
807
+ isViewOnce: z.ZodBoolean;
808
+ isEdited: z.ZodBoolean;
809
+ isDeleted: z.ZodBoolean;
810
+ isPinned: z.ZodBoolean;
811
+ isUnPinned: z.ZodBoolean;
812
+ isChannel: z.ZodBoolean;
813
+ isBroadcast: z.ZodBoolean;
814
+ isEphemeral: z.ZodBoolean;
815
+ isForwarded: z.ZodBoolean;
816
+ citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
817
+ media: z.ZodNullable<z.ZodObject<{
818
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
819
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
820
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
821
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
822
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
823
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
824
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
825
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
826
+ }, z.ZodTypeAny, "passthrough">>>;
827
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
559
828
  }, "strip", z.ZodTypeAny, {
560
- id: string;
561
- }, {
562
- id?: string | undefined;
563
- }>>;
564
- pageContent: z.ZodString;
565
- }, "pageContent">, "strip", z.ZodTypeAny, {
566
- pageContent: string;
829
+ channelId: string;
830
+ uniqueId: string;
831
+ message: (...args: unknown[]) => Record<string, any>;
832
+ senderId: string;
833
+ roomId: string;
834
+ isGroup: boolean;
835
+ text: string | null;
836
+ chatId: string;
837
+ receiverId: string;
838
+ receiverName: string;
839
+ roomName: string;
840
+ senderName: string;
841
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
842
+ 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";
843
+ timestamp: number;
844
+ mentions: string[];
845
+ links: string[];
846
+ isPrefix: boolean;
847
+ isSpam: boolean;
848
+ isFromMe: boolean;
849
+ isTagMe: boolean;
850
+ isStory: boolean;
851
+ isViewOnce: boolean;
852
+ isEdited: boolean;
853
+ isDeleted: boolean;
854
+ isPinned: boolean;
855
+ isUnPinned: boolean;
856
+ isChannel: boolean;
857
+ isBroadcast: boolean;
858
+ isEphemeral: boolean;
859
+ isForwarded: boolean;
860
+ citation: Record<string, boolean> | null;
861
+ media: z.objectOutputType<{
862
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
863
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
864
+ }, z.ZodTypeAny, "passthrough"> | null;
865
+ }, {
866
+ channelId: string;
867
+ uniqueId: string;
868
+ message: (...args: unknown[]) => Record<string, any>;
869
+ senderId: string;
870
+ roomId: string;
871
+ isGroup: boolean;
872
+ text: string | null;
873
+ chatId: string;
874
+ receiverId: string;
875
+ receiverName: string;
876
+ roomName: string;
877
+ senderName: string;
878
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
879
+ 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";
880
+ timestamp: number;
881
+ mentions: string[];
882
+ links: string[];
883
+ isPrefix: boolean;
884
+ isSpam: 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> | null;
898
+ media: z.objectInputType<{
899
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
900
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
901
+ }, z.ZodTypeAny, "passthrough"> | null;
902
+ }>>;
903
+ }, "strip", z.ZodTypeAny, {
904
+ channelId: string;
905
+ uniqueId: string;
906
+ message: (...args: unknown[]) => Record<string, any>;
907
+ senderId: string;
908
+ roomId: string;
909
+ isGroup: boolean;
910
+ text: string | null;
911
+ chatId: string;
912
+ receiverId: string;
913
+ receiverName: string;
914
+ roomName: 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
+ isSpam: boolean;
923
+ isFromMe: boolean;
924
+ isTagMe: boolean;
925
+ isStory: boolean;
926
+ isViewOnce: boolean;
927
+ isEdited: boolean;
928
+ isDeleted: boolean;
929
+ isPinned: boolean;
930
+ isUnPinned: boolean;
931
+ isChannel: boolean;
932
+ isBroadcast: boolean;
933
+ isEphemeral: boolean;
934
+ isForwarded: boolean;
935
+ citation: Record<string, boolean> | null;
936
+ media: z.objectOutputType<{
937
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
938
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
939
+ }, z.ZodTypeAny, "passthrough"> | null;
940
+ replied: {
941
+ channelId: string;
942
+ uniqueId: string;
943
+ message: (...args: unknown[]) => Record<string, any>;
944
+ senderId: string;
945
+ roomId: string;
946
+ isGroup: boolean;
947
+ text: string | null;
948
+ chatId: string;
949
+ receiverId: string;
950
+ receiverName: string;
951
+ roomName: string;
952
+ senderName: string;
953
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
954
+ 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";
955
+ timestamp: number;
956
+ mentions: string[];
957
+ links: string[];
958
+ isPrefix: boolean;
959
+ isSpam: boolean;
960
+ isFromMe: boolean;
961
+ isTagMe: boolean;
962
+ isStory: boolean;
963
+ isViewOnce: boolean;
964
+ isEdited: boolean;
965
+ isDeleted: boolean;
966
+ isPinned: boolean;
967
+ isUnPinned: boolean;
968
+ isChannel: boolean;
969
+ isBroadcast: boolean;
970
+ isEphemeral: boolean;
971
+ isForwarded: boolean;
972
+ citation: Record<string, boolean> | null;
973
+ media: z.objectOutputType<{
974
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
975
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
976
+ }, z.ZodTypeAny, "passthrough"> | null;
977
+ } | null;
567
978
  }, {
568
- pageContent: string;
979
+ channelId: string;
980
+ uniqueId: string;
981
+ message: (...args: unknown[]) => Record<string, any>;
982
+ senderId: string;
983
+ roomId: string;
984
+ isGroup: boolean;
985
+ text: string | null;
986
+ chatId: string;
987
+ receiverId: string;
988
+ receiverName: string;
989
+ roomName: string;
990
+ senderName: string;
991
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
992
+ 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";
993
+ timestamp: number;
994
+ mentions: string[];
995
+ links: string[];
996
+ isPrefix: boolean;
997
+ isSpam: 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> | null;
1011
+ media: z.objectInputType<{
1012
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1013
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1014
+ }, z.ZodTypeAny, "passthrough"> | null;
1015
+ replied: {
1016
+ channelId: string;
1017
+ uniqueId: string;
1018
+ message: (...args: unknown[]) => Record<string, any>;
1019
+ senderId: string;
1020
+ roomId: string;
1021
+ isGroup: boolean;
1022
+ text: string | null;
1023
+ chatId: string;
1024
+ receiverId: string;
1025
+ receiverName: string;
1026
+ roomName: string;
1027
+ senderName: string;
1028
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1029
+ 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";
1030
+ timestamp: number;
1031
+ mentions: string[];
1032
+ links: string[];
1033
+ isPrefix: boolean;
1034
+ isSpam: boolean;
1035
+ isFromMe: boolean;
1036
+ isTagMe: boolean;
1037
+ isStory: boolean;
1038
+ isViewOnce: boolean;
1039
+ isEdited: boolean;
1040
+ isDeleted: boolean;
1041
+ isPinned: boolean;
1042
+ isUnPinned: boolean;
1043
+ isChannel: boolean;
1044
+ isBroadcast: boolean;
1045
+ isEphemeral: boolean;
1046
+ isForwarded: boolean;
1047
+ citation: Record<string, boolean> | null;
1048
+ media: z.objectInputType<{
1049
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1050
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1051
+ }, z.ZodTypeAny, "passthrough"> | null;
1052
+ } | null;
569
1053
  }>;
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>[]>;
1054
+ type chatsAdapter = {
1055
+ getMessage: (chatId: string) => Promise<z.infer<typeof chatsGetMessage> | null>;
587
1056
  };
588
1057
 
589
- declare const TextWorkerBaseType: z.ZodUnion<[z.ZodString, z.ZodObject<{
590
- image: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
591
- text: z.ZodOptional<z.ZodString>;
1058
+ declare const llmMessagesTable: z.ZodObject<{
1059
+ channelId: z.ZodString;
1060
+ uniqueId: z.ZodString;
1061
+ model: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1062
+ role: z.ZodString;
1063
+ content: z.ZodString;
1064
+ additional: z.ZodNullable<z.ZodOptional<z.ZodString>>;
592
1065
  }, "strip", z.ZodTypeAny, {
593
- image: string | Buffer<ArrayBufferLike> | Readable;
594
- text?: string | undefined;
1066
+ channelId: string;
1067
+ uniqueId: string;
1068
+ role: string;
1069
+ content: string;
1070
+ model?: string | null | undefined;
1071
+ additional?: string | null | undefined;
595
1072
  }, {
596
- image: string | Buffer<ArrayBufferLike> | Readable;
597
- text?: string | undefined;
1073
+ channelId: string;
1074
+ uniqueId: string;
1075
+ role: string;
1076
+ content: string;
1077
+ model?: string | null | undefined;
1078
+ additional?: string | null | undefined;
1079
+ }>;
1080
+ declare const llmPersonalizationTable: z.ZodObject<{
1081
+ uniqueId: z.ZodString;
1082
+ senderId: z.ZodString;
1083
+ content: z.ZodString;
1084
+ }, "strip", z.ZodTypeAny, {
1085
+ uniqueId: string;
1086
+ content: string;
1087
+ senderId: string;
1088
+ }, {
1089
+ uniqueId: string;
1090
+ content: string;
1091
+ senderId: string;
1092
+ }>;
1093
+ declare const llmRAGTable: z.ZodObject<{
1094
+ metadata: z.ZodDefault<z.ZodObject<{
1095
+ id: z.ZodDefault<z.ZodString>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ id: string;
1098
+ }, {
1099
+ id?: string | undefined;
1100
+ }>>;
1101
+ pageContent: z.ZodString;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ metadata: {
1104
+ id: string;
1105
+ };
1106
+ pageContent: string;
1107
+ }, {
1108
+ pageContent: string;
1109
+ metadata?: {
1110
+ id?: string | undefined;
1111
+ } | undefined;
1112
+ }>;
1113
+ declare const addRAGType: z.ZodObject<Pick<{
1114
+ metadata: z.ZodDefault<z.ZodObject<{
1115
+ id: z.ZodDefault<z.ZodString>;
1116
+ }, "strip", z.ZodTypeAny, {
1117
+ id: string;
1118
+ }, {
1119
+ id?: string | undefined;
1120
+ }>>;
1121
+ pageContent: z.ZodString;
1122
+ }, "pageContent">, "strip", z.ZodTypeAny, {
1123
+ pageContent: string;
1124
+ }, {
1125
+ pageContent: string;
1126
+ }>;
1127
+ type llmsAdapter = {
1128
+ addCompletion: (props: z.infer<typeof llmMessagesTable>) => Promise<z.infer<typeof llmMessagesTable>>;
1129
+ deleteCompletion: (uniqueId: string) => Promise<boolean>;
1130
+ updateCompletion: (uniqueId: string, props: Partial<z.infer<typeof llmMessagesTable>>) => Promise<z.infer<typeof llmMessagesTable>>;
1131
+ clearCompletions: (channelId: string) => Promise<boolean>;
1132
+ getCompletion: (uniqueId: string) => Promise<z.infer<typeof llmMessagesTable> | null>;
1133
+ getCompletions: (channelId: string) => Promise<z.infer<typeof llmMessagesTable>[]>;
1134
+ addPersonalization: (props: z.infer<typeof llmPersonalizationTable>) => Promise<z.infer<typeof llmPersonalizationTable>>;
1135
+ deletePersonalization: (uniqueId: string) => Promise<boolean>;
1136
+ clearPersonalization: (senderId: string) => Promise<boolean>;
1137
+ getPersonalization: (senderId: string) => Promise<z.infer<typeof llmPersonalizationTable>[]>;
1138
+ addRAG: (props: z.infer<typeof addRAGType>) => Promise<z.infer<typeof llmRAGTable>>;
1139
+ deleteRAG: (id: string) => Promise<boolean>;
1140
+ updateRAG: (id: string) => Promise<z.infer<typeof llmRAGTable>>;
1141
+ clearRAGs: () => Promise<boolean>;
1142
+ getRAG: (id: string) => Promise<z.infer<typeof llmRAGTable> | null>;
1143
+ getRAGs: (keyword: string) => Promise<z.infer<typeof llmRAGTable>[]>;
1144
+ };
1145
+
1146
+ declare const MediaInputWorkerType: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1147
+ declare const TextWorkerBaseType: z.ZodUnion<[z.ZodString, z.ZodObject<{
1148
+ image: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1149
+ text: z.ZodOptional<z.ZodString>;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ image: string | Buffer<ArrayBufferLike> | Readable;
1152
+ text?: string | undefined;
1153
+ }, {
1154
+ image: string | Buffer<ArrayBufferLike> | Readable;
1155
+ text?: string | undefined;
598
1156
  }>, z.ZodObject<{
599
1157
  video: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
600
1158
  text: z.ZodOptional<z.ZodString>;
@@ -974,6 +1532,387 @@ declare class Worker {
974
1532
  mentions: string[];
975
1533
  links: string[];
976
1534
  isPrefix: boolean;
1535
+ isSpam: boolean;
1536
+ isFromMe: boolean;
1537
+ isTagMe: boolean;
1538
+ isStory: boolean;
1539
+ isViewOnce: boolean;
1540
+ isEdited: boolean;
1541
+ isDeleted: boolean;
1542
+ isPinned: boolean;
1543
+ isUnPinned: boolean;
1544
+ isChannel: boolean;
1545
+ isBroadcast: boolean;
1546
+ isEphemeral: boolean;
1547
+ isForwarded: boolean;
1548
+ citation: Record<string, boolean> | null;
1549
+ media: z.objectOutputType<{
1550
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1551
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1552
+ }, z.ZodTypeAny, "passthrough"> | null;
1553
+ replied: {
1554
+ channelId: string;
1555
+ uniqueId: string;
1556
+ message: (...args: unknown[]) => Record<string, any>;
1557
+ senderId: string;
1558
+ roomId: string;
1559
+ isGroup: boolean;
1560
+ text: string | null;
1561
+ chatId: string;
1562
+ receiverId: string;
1563
+ receiverName: string;
1564
+ roomName: string;
1565
+ senderName: string;
1566
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1567
+ 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";
1568
+ timestamp: number;
1569
+ mentions: string[];
1570
+ links: string[];
1571
+ isPrefix: boolean;
1572
+ isSpam: boolean;
1573
+ isFromMe: boolean;
1574
+ isTagMe: boolean;
1575
+ isStory: boolean;
1576
+ isViewOnce: boolean;
1577
+ isEdited: boolean;
1578
+ isDeleted: boolean;
1579
+ isPinned: boolean;
1580
+ isUnPinned: boolean;
1581
+ isChannel: boolean;
1582
+ isBroadcast: boolean;
1583
+ isEphemeral: boolean;
1584
+ isForwarded: boolean;
1585
+ citation: Record<string, boolean> | null;
1586
+ media: z.objectOutputType<{
1587
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1588
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1589
+ }, z.ZodTypeAny, "passthrough"> | null;
1590
+ } | null;
1591
+ } | null | undefined>;
1592
+ location(loc: z.infer<typeof LocationWorkerBaseType>, options: z.infer<typeof LocationWorkerOptionsType>): Promise<{
1593
+ channelId: string;
1594
+ uniqueId: string;
1595
+ message: (...args: unknown[]) => Record<string, any>;
1596
+ senderId: string;
1597
+ roomId: string;
1598
+ isGroup: boolean;
1599
+ text: string | null;
1600
+ chatId: string;
1601
+ receiverId: string;
1602
+ receiverName: string;
1603
+ roomName: string;
1604
+ senderName: string;
1605
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1606
+ 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";
1607
+ timestamp: number;
1608
+ mentions: string[];
1609
+ links: string[];
1610
+ isPrefix: boolean;
1611
+ isSpam: boolean;
1612
+ isFromMe: boolean;
1613
+ isTagMe: boolean;
1614
+ isStory: boolean;
1615
+ isViewOnce: boolean;
1616
+ isEdited: boolean;
1617
+ isDeleted: boolean;
1618
+ isPinned: boolean;
1619
+ isUnPinned: boolean;
1620
+ isChannel: boolean;
1621
+ isBroadcast: boolean;
1622
+ isEphemeral: boolean;
1623
+ isForwarded: boolean;
1624
+ citation: Record<string, boolean> | null;
1625
+ media: z.objectOutputType<{
1626
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1627
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1628
+ }, z.ZodTypeAny, "passthrough"> | null;
1629
+ replied: {
1630
+ channelId: string;
1631
+ uniqueId: string;
1632
+ message: (...args: unknown[]) => Record<string, any>;
1633
+ senderId: string;
1634
+ roomId: string;
1635
+ isGroup: boolean;
1636
+ text: string | null;
1637
+ chatId: string;
1638
+ receiverId: string;
1639
+ receiverName: string;
1640
+ roomName: string;
1641
+ senderName: string;
1642
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1643
+ 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";
1644
+ timestamp: number;
1645
+ mentions: string[];
1646
+ links: string[];
1647
+ isPrefix: boolean;
1648
+ isSpam: boolean;
1649
+ isFromMe: boolean;
1650
+ isTagMe: boolean;
1651
+ isStory: boolean;
1652
+ isViewOnce: boolean;
1653
+ isEdited: boolean;
1654
+ isDeleted: boolean;
1655
+ isPinned: boolean;
1656
+ isUnPinned: boolean;
1657
+ isChannel: boolean;
1658
+ isBroadcast: boolean;
1659
+ isEphemeral: boolean;
1660
+ isForwarded: boolean;
1661
+ citation: Record<string, boolean> | null;
1662
+ media: z.objectOutputType<{
1663
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1664
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1665
+ }, z.ZodTypeAny, "passthrough"> | null;
1666
+ } | null;
1667
+ } | null>;
1668
+ contact(vcard: z.infer<typeof ContactWorkerBaseType>, options: z.infer<typeof ContactWorkerOptionsType>): Promise<{
1669
+ channelId: string;
1670
+ uniqueId: string;
1671
+ message: (...args: unknown[]) => Record<string, any>;
1672
+ senderId: string;
1673
+ roomId: string;
1674
+ isGroup: boolean;
1675
+ text: string | null;
1676
+ chatId: string;
1677
+ receiverId: string;
1678
+ receiverName: string;
1679
+ roomName: string;
1680
+ senderName: string;
1681
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1682
+ 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";
1683
+ timestamp: number;
1684
+ mentions: string[];
1685
+ links: string[];
1686
+ isPrefix: boolean;
1687
+ isSpam: boolean;
1688
+ isFromMe: boolean;
1689
+ isTagMe: boolean;
1690
+ isStory: boolean;
1691
+ isViewOnce: boolean;
1692
+ isEdited: boolean;
1693
+ isDeleted: boolean;
1694
+ isPinned: boolean;
1695
+ isUnPinned: boolean;
1696
+ isChannel: boolean;
1697
+ isBroadcast: boolean;
1698
+ isEphemeral: boolean;
1699
+ isForwarded: boolean;
1700
+ citation: Record<string, boolean> | null;
1701
+ media: z.objectOutputType<{
1702
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1703
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1704
+ }, z.ZodTypeAny, "passthrough"> | null;
1705
+ replied: {
1706
+ channelId: string;
1707
+ uniqueId: string;
1708
+ message: (...args: unknown[]) => Record<string, any>;
1709
+ senderId: string;
1710
+ roomId: string;
1711
+ isGroup: boolean;
1712
+ text: string | null;
1713
+ chatId: string;
1714
+ receiverId: string;
1715
+ receiverName: string;
1716
+ roomName: string;
1717
+ senderName: string;
1718
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1719
+ 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";
1720
+ timestamp: number;
1721
+ mentions: string[];
1722
+ links: string[];
1723
+ isPrefix: boolean;
1724
+ isSpam: boolean;
1725
+ isFromMe: boolean;
1726
+ isTagMe: boolean;
1727
+ isStory: boolean;
1728
+ isViewOnce: boolean;
1729
+ isEdited: boolean;
1730
+ isDeleted: boolean;
1731
+ isPinned: boolean;
1732
+ isUnPinned: boolean;
1733
+ isChannel: boolean;
1734
+ isBroadcast: boolean;
1735
+ isEphemeral: boolean;
1736
+ isForwarded: boolean;
1737
+ citation: Record<string, boolean> | null;
1738
+ media: z.objectOutputType<{
1739
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1740
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1741
+ }, z.ZodTypeAny, "passthrough"> | null;
1742
+ } | null;
1743
+ } | null>;
1744
+ reaction(emoticon: z.infer<typeof ReactionWorkerBaseType>, options: z.infer<typeof ReactionWorkerOptionsType>): Promise<{
1745
+ channelId: string;
1746
+ uniqueId: string;
1747
+ message: (...args: unknown[]) => Record<string, any>;
1748
+ senderId: string;
1749
+ roomId: string;
1750
+ isGroup: boolean;
1751
+ text: string | null;
1752
+ chatId: string;
1753
+ receiverId: string;
1754
+ receiverName: string;
1755
+ roomName: string;
1756
+ senderName: string;
1757
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1758
+ 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";
1759
+ timestamp: number;
1760
+ mentions: string[];
1761
+ links: string[];
1762
+ isPrefix: boolean;
1763
+ isSpam: boolean;
1764
+ isFromMe: boolean;
1765
+ isTagMe: boolean;
1766
+ isStory: boolean;
1767
+ isViewOnce: boolean;
1768
+ isEdited: boolean;
1769
+ isDeleted: boolean;
1770
+ isPinned: boolean;
1771
+ isUnPinned: boolean;
1772
+ isChannel: boolean;
1773
+ isBroadcast: boolean;
1774
+ isEphemeral: boolean;
1775
+ isForwarded: boolean;
1776
+ citation: Record<string, boolean> | null;
1777
+ media: z.objectOutputType<{
1778
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1779
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1780
+ }, z.ZodTypeAny, "passthrough"> | null;
1781
+ replied: {
1782
+ channelId: string;
1783
+ uniqueId: string;
1784
+ message: (...args: unknown[]) => Record<string, any>;
1785
+ senderId: string;
1786
+ roomId: string;
1787
+ isGroup: boolean;
1788
+ text: string | null;
1789
+ chatId: string;
1790
+ receiverId: string;
1791
+ receiverName: string;
1792
+ roomName: string;
1793
+ senderName: string;
1794
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1795
+ 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";
1796
+ timestamp: number;
1797
+ mentions: string[];
1798
+ links: string[];
1799
+ isPrefix: boolean;
1800
+ isSpam: boolean;
1801
+ isFromMe: boolean;
1802
+ isTagMe: boolean;
1803
+ isStory: boolean;
1804
+ isViewOnce: boolean;
1805
+ isEdited: boolean;
1806
+ isDeleted: boolean;
1807
+ isPinned: boolean;
1808
+ isUnPinned: boolean;
1809
+ isChannel: boolean;
1810
+ isBroadcast: boolean;
1811
+ isEphemeral: boolean;
1812
+ isForwarded: boolean;
1813
+ citation: Record<string, boolean> | null;
1814
+ media: z.objectOutputType<{
1815
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1816
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1817
+ }, z.ZodTypeAny, "passthrough"> | null;
1818
+ } | null;
1819
+ } | null>;
1820
+ pin(pin: z.infer<typeof PinWorkerBaseType>, options: z.infer<typeof PinWorkerOptionsType>): Promise<{
1821
+ channelId: string;
1822
+ uniqueId: string;
1823
+ message: (...args: unknown[]) => Record<string, any>;
1824
+ senderId: string;
1825
+ roomId: string;
1826
+ isGroup: boolean;
1827
+ text: string | null;
1828
+ chatId: string;
1829
+ receiverId: string;
1830
+ receiverName: string;
1831
+ roomName: string;
1832
+ senderName: string;
1833
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1834
+ 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";
1835
+ timestamp: number;
1836
+ mentions: string[];
1837
+ links: string[];
1838
+ isPrefix: boolean;
1839
+ isSpam: boolean;
1840
+ isFromMe: boolean;
1841
+ isTagMe: boolean;
1842
+ isStory: boolean;
1843
+ isViewOnce: boolean;
1844
+ isEdited: boolean;
1845
+ isDeleted: boolean;
1846
+ isPinned: boolean;
1847
+ isUnPinned: boolean;
1848
+ isChannel: boolean;
1849
+ isBroadcast: boolean;
1850
+ isEphemeral: boolean;
1851
+ isForwarded: boolean;
1852
+ citation: Record<string, boolean> | null;
1853
+ media: z.objectOutputType<{
1854
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1855
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1856
+ }, z.ZodTypeAny, "passthrough"> | null;
1857
+ replied: {
1858
+ channelId: string;
1859
+ uniqueId: string;
1860
+ message: (...args: unknown[]) => Record<string, any>;
1861
+ senderId: string;
1862
+ roomId: string;
1863
+ isGroup: boolean;
1864
+ text: string | null;
1865
+ chatId: string;
1866
+ receiverId: string;
1867
+ receiverName: string;
1868
+ roomName: string;
1869
+ senderName: string;
1870
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1871
+ 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";
1872
+ timestamp: number;
1873
+ mentions: string[];
1874
+ links: string[];
1875
+ isPrefix: boolean;
1876
+ isSpam: boolean;
1877
+ isFromMe: boolean;
1878
+ isTagMe: boolean;
1879
+ isStory: boolean;
1880
+ isViewOnce: boolean;
1881
+ isEdited: boolean;
1882
+ isDeleted: boolean;
1883
+ isPinned: boolean;
1884
+ isUnPinned: boolean;
1885
+ isChannel: boolean;
1886
+ isBroadcast: boolean;
1887
+ isEphemeral: boolean;
1888
+ isForwarded: boolean;
1889
+ citation: Record<string, boolean> | null;
1890
+ media: z.objectOutputType<{
1891
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1892
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1893
+ }, z.ZodTypeAny, "passthrough"> | null;
1894
+ } | null;
1895
+ } | null>;
1896
+ poll(poll: z.infer<typeof PollWorkerBaseType>, options: z.infer<typeof PollWorkerOptionsType>): Promise<{
1897
+ channelId: string;
1898
+ uniqueId: string;
1899
+ message: (...args: unknown[]) => Record<string, any>;
1900
+ senderId: string;
1901
+ roomId: string;
1902
+ isGroup: boolean;
1903
+ text: string | null;
1904
+ chatId: string;
1905
+ receiverId: string;
1906
+ receiverName: string;
1907
+ roomName: string;
1908
+ senderName: string;
1909
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1910
+ 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";
1911
+ timestamp: number;
1912
+ mentions: string[];
1913
+ links: string[];
1914
+ isPrefix: boolean;
1915
+ isSpam: boolean;
977
1916
  isFromMe: boolean;
978
1917
  isTagMe: boolean;
979
1918
  isStory: boolean;
@@ -1010,6 +1949,7 @@ declare class Worker {
1010
1949
  mentions: string[];
1011
1950
  links: string[];
1012
1951
  isPrefix: boolean;
1952
+ isSpam: boolean;
1013
1953
  isFromMe: boolean;
1014
1954
  isTagMe: boolean;
1015
1955
  isStory: boolean;
@@ -1028,8 +1968,231 @@ declare class Worker {
1028
1968
  stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1029
1969
  }, z.ZodTypeAny, "passthrough"> | null;
1030
1970
  } | null;
1031
- } | null | undefined>;
1032
- location(loc: z.infer<typeof LocationWorkerBaseType>, options: z.infer<typeof LocationWorkerOptionsType>): Promise<{
1971
+ } | null>;
1972
+ edit(text: z.infer<typeof EditWorkerBaseType>, options: z.infer<typeof EditWorkerOptionsType>): Promise<{
1973
+ channelId: string;
1974
+ uniqueId: string;
1975
+ message: (...args: unknown[]) => Record<string, any>;
1976
+ senderId: string;
1977
+ roomId: string;
1978
+ isGroup: boolean;
1979
+ text: string | null;
1980
+ chatId: string;
1981
+ receiverId: string;
1982
+ receiverName: string;
1983
+ roomName: string;
1984
+ senderName: string;
1985
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1986
+ 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";
1987
+ timestamp: number;
1988
+ mentions: string[];
1989
+ links: string[];
1990
+ isPrefix: boolean;
1991
+ isSpam: boolean;
1992
+ isFromMe: boolean;
1993
+ isTagMe: boolean;
1994
+ isStory: boolean;
1995
+ isViewOnce: boolean;
1996
+ isEdited: boolean;
1997
+ isDeleted: boolean;
1998
+ isPinned: boolean;
1999
+ isUnPinned: boolean;
2000
+ isChannel: boolean;
2001
+ isBroadcast: boolean;
2002
+ isEphemeral: boolean;
2003
+ isForwarded: boolean;
2004
+ citation: Record<string, boolean> | null;
2005
+ media: z.objectOutputType<{
2006
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2007
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2008
+ }, z.ZodTypeAny, "passthrough"> | null;
2009
+ replied: {
2010
+ channelId: string;
2011
+ uniqueId: string;
2012
+ message: (...args: unknown[]) => Record<string, any>;
2013
+ senderId: string;
2014
+ roomId: string;
2015
+ isGroup: boolean;
2016
+ text: string | null;
2017
+ chatId: string;
2018
+ receiverId: string;
2019
+ receiverName: string;
2020
+ roomName: string;
2021
+ senderName: string;
2022
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2023
+ 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";
2024
+ timestamp: number;
2025
+ mentions: string[];
2026
+ links: string[];
2027
+ isPrefix: boolean;
2028
+ isSpam: boolean;
2029
+ isFromMe: boolean;
2030
+ isTagMe: boolean;
2031
+ isStory: boolean;
2032
+ isViewOnce: boolean;
2033
+ isEdited: boolean;
2034
+ isDeleted: boolean;
2035
+ isPinned: boolean;
2036
+ isUnPinned: boolean;
2037
+ isChannel: boolean;
2038
+ isBroadcast: boolean;
2039
+ isEphemeral: boolean;
2040
+ isForwarded: boolean;
2041
+ citation: Record<string, boolean> | null;
2042
+ media: z.objectOutputType<{
2043
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2044
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2045
+ }, z.ZodTypeAny, "passthrough"> | null;
2046
+ } | null;
2047
+ } | null>;
2048
+ delete(del: z.infer<typeof DeleteWorkerBaseType>): Promise<{
2049
+ channelId: string;
2050
+ uniqueId: string;
2051
+ message: (...args: unknown[]) => Record<string, any>;
2052
+ senderId: string;
2053
+ roomId: string;
2054
+ isGroup: boolean;
2055
+ text: string | null;
2056
+ chatId: string;
2057
+ receiverId: string;
2058
+ receiverName: string;
2059
+ roomName: string;
2060
+ senderName: string;
2061
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2062
+ 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";
2063
+ timestamp: number;
2064
+ mentions: string[];
2065
+ links: string[];
2066
+ isPrefix: boolean;
2067
+ isSpam: boolean;
2068
+ isFromMe: boolean;
2069
+ isTagMe: boolean;
2070
+ isStory: boolean;
2071
+ isViewOnce: boolean;
2072
+ isEdited: boolean;
2073
+ isDeleted: boolean;
2074
+ isPinned: boolean;
2075
+ isUnPinned: boolean;
2076
+ isChannel: boolean;
2077
+ isBroadcast: boolean;
2078
+ isEphemeral: boolean;
2079
+ isForwarded: boolean;
2080
+ citation: Record<string, boolean> | null;
2081
+ media: z.objectOutputType<{
2082
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2083
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2084
+ }, z.ZodTypeAny, "passthrough"> | null;
2085
+ replied: {
2086
+ channelId: string;
2087
+ uniqueId: string;
2088
+ message: (...args: unknown[]) => Record<string, any>;
2089
+ senderId: string;
2090
+ roomId: string;
2091
+ isGroup: boolean;
2092
+ text: string | null;
2093
+ chatId: string;
2094
+ receiverId: string;
2095
+ receiverName: string;
2096
+ roomName: string;
2097
+ senderName: string;
2098
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2099
+ 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";
2100
+ timestamp: number;
2101
+ mentions: string[];
2102
+ links: string[];
2103
+ isPrefix: boolean;
2104
+ isSpam: boolean;
2105
+ isFromMe: boolean;
2106
+ isTagMe: boolean;
2107
+ isStory: boolean;
2108
+ isViewOnce: boolean;
2109
+ isEdited: boolean;
2110
+ isDeleted: boolean;
2111
+ isPinned: boolean;
2112
+ isUnPinned: boolean;
2113
+ isChannel: boolean;
2114
+ isBroadcast: boolean;
2115
+ isEphemeral: boolean;
2116
+ isForwarded: boolean;
2117
+ citation: Record<string, boolean> | null;
2118
+ media: z.objectOutputType<{
2119
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2120
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2121
+ }, z.ZodTypeAny, "passthrough"> | null;
2122
+ } | null;
2123
+ } | null>;
2124
+ rejectCall(call: z.infer<typeof RejectCallWorkerBaseType>): Promise<void | undefined>;
2125
+ mute(mute: z.infer<typeof MuteWorkerBaseType>, options: z.infer<typeof MuteWorkerOptionsType>): Promise<void | undefined>;
2126
+ profile(roomId: z.infer<typeof ProfileWorkerBaseType>): Promise<z.infer<typeof ProfileWorkerBaseOutputType> | null>;
2127
+ presence(action: z.infer<typeof PresenceWorkerBaseType>, options: z.infer<typeof PresenceWorkerOptionsType>): Promise<void | undefined>;
2128
+ addCompletion(props: z.infer<typeof llmMessagesTable>): Promise<{
2129
+ channelId: string;
2130
+ uniqueId: string;
2131
+ role: string;
2132
+ content: string;
2133
+ model?: string | null | undefined;
2134
+ additional?: string | null | undefined;
2135
+ }>;
2136
+ deleteCompletion(uniqueId: string): Promise<boolean>;
2137
+ updateCompletion(uniqueId: string, props: Partial<z.infer<typeof llmMessagesTable>>): Promise<{
2138
+ channelId: string;
2139
+ uniqueId: string;
2140
+ role: string;
2141
+ content: string;
2142
+ model?: string | null | undefined;
2143
+ additional?: string | null | undefined;
2144
+ }>;
2145
+ clearCompletions(channelId: string): Promise<boolean>;
2146
+ getCompletion(uniqueId: string): Promise<{
2147
+ channelId: string;
2148
+ uniqueId: string;
2149
+ role: string;
2150
+ content: string;
2151
+ model?: string | null | undefined;
2152
+ additional?: string | null | undefined;
2153
+ } | null>;
2154
+ getCompletions(channelId: string): Promise<{
2155
+ channelId: string;
2156
+ uniqueId: string;
2157
+ role: string;
2158
+ content: string;
2159
+ model?: string | null | undefined;
2160
+ additional?: string | null | undefined;
2161
+ }[]>;
2162
+ addPersonalization(props: z.infer<typeof llmPersonalizationTable>): Promise<{
2163
+ uniqueId: string;
2164
+ content: string;
2165
+ senderId: string;
2166
+ }>;
2167
+ deletePersonalization(uniqueId: string): Promise<boolean>;
2168
+ clearPersonalization(senderId: string): Promise<boolean>;
2169
+ getPersonalization(senderId: string): Promise<{
2170
+ uniqueId: string;
2171
+ content: string;
2172
+ senderId: string;
2173
+ }[]>;
2174
+ addRAG(props: z.infer<typeof addRAGType>): Promise<any>;
2175
+ deleteRAG(id: string): Promise<boolean>;
2176
+ updateRAG(id: string): Promise<{
2177
+ metadata: {
2178
+ id: string;
2179
+ };
2180
+ pageContent: string;
2181
+ }>;
2182
+ clearRAGs(): Promise<boolean>;
2183
+ getRAG(id: string): Promise<{
2184
+ metadata: {
2185
+ id: string;
2186
+ };
2187
+ pageContent: string;
2188
+ } | null>;
2189
+ getRAGs(keyword: string): Promise<{
2190
+ metadata: {
2191
+ id: string;
2192
+ };
2193
+ pageContent: string;
2194
+ }[]>;
2195
+ getMessage(chatId: string): Promise<{
1033
2196
  channelId: string;
1034
2197
  uniqueId: string;
1035
2198
  message: (...args: unknown[]) => Record<string, any>;
@@ -1048,6 +2211,7 @@ declare class Worker {
1048
2211
  mentions: string[];
1049
2212
  links: string[];
1050
2213
  isPrefix: boolean;
2214
+ isSpam: boolean;
1051
2215
  isFromMe: boolean;
1052
2216
  isTagMe: boolean;
1053
2217
  isStory: boolean;
@@ -1084,6 +2248,7 @@ declare class Worker {
1084
2248
  mentions: string[];
1085
2249
  links: string[];
1086
2250
  isPrefix: boolean;
2251
+ isSpam: boolean;
1087
2252
  isFromMe: boolean;
1088
2253
  isTagMe: boolean;
1089
2254
  isStory: boolean;
@@ -1103,155 +2268,342 @@ declare class Worker {
1103
2268
  }, z.ZodTypeAny, "passthrough"> | null;
1104
2269
  } | null;
1105
2270
  } | null>;
1106
- contact(vcard: z.infer<typeof ContactWorkerBaseType>, options: z.infer<typeof ContactWorkerOptionsType>): Promise<{
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<{
2271
+ llms: llmsAdapter;
2272
+ chats: chatsAdapter;
2273
+ }
2274
+
2275
+ declare class Client {
2276
+ private props;
2277
+ options: z.infer<typeof ClientClassesType>;
2278
+ cache: NodeCache;
2279
+ private chatId;
2280
+ private logger;
2281
+ private db;
2282
+ private socket;
2283
+ private events;
2284
+ private spinners;
2285
+ private worker;
2286
+ constructor(props: z.input<typeof ClientClassesType>);
2287
+ initialize(): Promise<void>;
2288
+ startSpinner(key: string, message: string): Ora;
2289
+ stopSpinner(key: string, succeed: boolean, message?: string): void;
2290
+ failSpinner(key: string, message?: string): void;
2291
+ on<T extends EventEnumType>(event: T, handler: EventCallbackType[T]): void;
2292
+ emit<T extends EventEnumType>(event: T, ...args: Parameters<EventCallbackType[T]>): void;
2293
+ }
2294
+ interface Client extends Worker {
2295
+ }
2296
+
2297
+ declare const CallsParserBaseType: z.ZodObject<{
2298
+ callId: z.ZodString;
2299
+ roomId: z.ZodString;
2300
+ callerId: z.ZodString;
2301
+ date: z.ZodDate;
2302
+ offline: z.ZodBoolean;
2303
+ status: z.ZodEnum<["accept", "offer", "reject", "ringing", "terminate", "timeout"]>;
2304
+ isVideo: z.ZodBoolean;
2305
+ isGroup: z.ZodBoolean;
2306
+ }, "strip", z.ZodTypeAny, {
2307
+ status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
2308
+ callId: string;
2309
+ roomId: string;
2310
+ callerId: string;
2311
+ date: Date;
2312
+ offline: boolean;
2313
+ isVideo: boolean;
2314
+ isGroup: boolean;
2315
+ }, {
2316
+ status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
2317
+ callId: string;
2318
+ roomId: string;
2319
+ callerId: string;
2320
+ date: Date;
2321
+ offline: boolean;
2322
+ isVideo: boolean;
2323
+ isGroup: boolean;
2324
+ }>;
2325
+
2326
+ declare const MessagesMediaType: {
2327
+ readonly text: "text";
2328
+ readonly conversation: "text";
2329
+ readonly imageMessage: "image";
2330
+ readonly contactMessage: "contact";
2331
+ readonly locationMessage: "location";
2332
+ readonly documentMessage: "document";
2333
+ readonly audioMessage: "audio";
2334
+ readonly videoMessage: "video";
2335
+ readonly protocolMessage: "protocol";
2336
+ readonly contactsArrayMessage: "contactsArray";
2337
+ readonly highlyStructuredMessage: "highlyStructured";
2338
+ readonly sendPaymentMessage: "sendPayment";
2339
+ readonly liveLocationMessage: "liveLocation";
2340
+ readonly requestPaymentMessage: "requestPayment";
2341
+ readonly declinePaymentRequestMessage: "declinePaymentRequest";
2342
+ readonly cancelPaymentRequestMessage: "cancelPaymentRequest";
2343
+ readonly templateMessage: "template";
2344
+ readonly stickerMessage: "sticker";
2345
+ readonly groupInviteMessage: "groupInvite";
2346
+ readonly templateButtonReplyMessage: "templateButtonReply";
2347
+ readonly productMessage: "product";
2348
+ readonly deviceSentMessage: "deviceSent";
2349
+ readonly listMessage: "list";
2350
+ readonly viewOnceMessage: "viewOnce";
2351
+ readonly orderMessage: "order";
2352
+ readonly listResponseMessage: "listResponse";
2353
+ readonly ephemeralMessage: "ephemeral";
2354
+ readonly invoiceMessage: "invoice";
2355
+ readonly buttonsMessage: "buttons";
2356
+ readonly buttonsResponseMessage: "buttonsResponse";
2357
+ readonly paymentInviteMessage: "paymentInvite";
2358
+ readonly interactiveMessage: "interactive";
2359
+ readonly reactionMessage: "reaction";
2360
+ readonly stickerSyncRmrMessage: "sticker";
2361
+ readonly interactiveResponseMessage: "interactiveResponse";
2362
+ readonly pollCreationMessage: "pollCreation";
2363
+ readonly pollUpdateMessage: "pollUpdate";
2364
+ readonly keepInChatMessage: "keepInChat";
2365
+ readonly documentWithCaptionMessage: "document";
2366
+ readonly requestPhoneNumberMessage: "requestPhoneNumber";
2367
+ readonly viewOnceMessageV2: "viewOnce";
2368
+ readonly encReactionMessage: "reaction";
2369
+ readonly editedMessage: "text";
2370
+ readonly viewOnceMessageV2Extension: "viewOnce";
2371
+ readonly pollCreationMessageV2: "pollCreation";
2372
+ readonly scheduledCallCreationMessage: "scheduledCallCreation";
2373
+ readonly groupMentionedMessage: "groupMentioned";
2374
+ readonly pinInChatMessage: "pinInChat";
2375
+ readonly pollCreationMessageV3: "pollCreation";
2376
+ readonly scheduledCallEditMessage: "scheduledCallEdit";
2377
+ readonly ptvMessage: "ptv";
2378
+ readonly botInvokeMessage: "botInvoke";
2379
+ readonly callLogMesssage: "callLog";
2380
+ readonly encCommentMessage: "encComment";
2381
+ readonly bcallMessage: "bcall";
2382
+ readonly lottieStickerMessage: "lottieSticker";
2383
+ readonly eventMessage: "event";
2384
+ readonly commentMessage: "comment";
2385
+ readonly newsletterAdminInviteMessage: "text";
2386
+ readonly extendedTextMessageWithParentKey: "text";
2387
+ readonly extendedTextMessage: "text";
2388
+ readonly placeholderMessage: "placeholder";
2389
+ readonly encEventUpdateMessage: "encEventUpdate";
2390
+ };
2391
+ declare const MessagesVerifiedPlatformType: {
2392
+ readonly whatsapp: "0@s.whatsapp.net";
2393
+ readonly meta: "13135550002@s.whatsapp.net";
2394
+ readonly chatgpt: "18002428478@s.whatsapp.net";
2395
+ readonly copilot: "18772241042@s.whatsapp.net";
2396
+ readonly instagram: "447723442971@s.whatsapp.net";
2397
+ readonly tiktok: "6285574670498@s.whatsapp.net";
2398
+ };
2399
+ declare const MessagesEnumType: z.ZodEnum<["text", "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", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
2400
+ declare const MessagesDeviceEnumType: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2401
+ declare const MessagesParserBaseType: z.ZodObject<{
2402
+ chatId: z.ZodString;
2403
+ channelId: z.ZodString;
2404
+ uniqueId: z.ZodString;
2405
+ receiverId: z.ZodString;
2406
+ receiverName: z.ZodString;
2407
+ roomId: z.ZodString;
2408
+ roomName: z.ZodString;
2409
+ senderId: z.ZodString;
2410
+ senderName: z.ZodString;
2411
+ senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2412
+ chatType: z.ZodEnum<["text", "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", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
2413
+ timestamp: z.ZodNumber;
2414
+ mentions: z.ZodArray<z.ZodString, "many">;
2415
+ text: z.ZodNullable<z.ZodString>;
2416
+ links: z.ZodArray<z.ZodString, "many">;
2417
+ isPrefix: z.ZodBoolean;
2418
+ isSpam: z.ZodBoolean;
2419
+ isFromMe: z.ZodBoolean;
2420
+ isTagMe: z.ZodBoolean;
2421
+ isGroup: z.ZodBoolean;
2422
+ isStory: z.ZodBoolean;
2423
+ isViewOnce: z.ZodBoolean;
2424
+ isEdited: z.ZodBoolean;
2425
+ isDeleted: z.ZodBoolean;
2426
+ isPinned: z.ZodBoolean;
2427
+ isUnPinned: z.ZodBoolean;
2428
+ isChannel: z.ZodBoolean;
2429
+ isBroadcast: z.ZodBoolean;
2430
+ isEphemeral: z.ZodBoolean;
2431
+ isForwarded: z.ZodBoolean;
2432
+ citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2433
+ media: z.ZodNullable<z.ZodObject<{
2434
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2435
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2436
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2437
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2438
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2439
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2440
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2441
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2442
+ }, z.ZodTypeAny, "passthrough">>>;
2443
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
2444
+ }, "strip", z.ZodTypeAny, {
2445
+ channelId: string;
2446
+ uniqueId: string;
2447
+ message: (...args: unknown[]) => Record<string, any>;
2448
+ senderId: string;
2449
+ roomId: string;
2450
+ isGroup: boolean;
2451
+ text: string | null;
2452
+ chatId: string;
2453
+ receiverId: string;
2454
+ receiverName: string;
2455
+ roomName: string;
2456
+ senderName: string;
2457
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2458
+ 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";
2459
+ timestamp: number;
2460
+ mentions: string[];
2461
+ links: string[];
2462
+ isPrefix: boolean;
2463
+ isSpam: boolean;
2464
+ isFromMe: boolean;
2465
+ isTagMe: boolean;
2466
+ isStory: boolean;
2467
+ isViewOnce: boolean;
2468
+ isEdited: boolean;
2469
+ isDeleted: boolean;
2470
+ isPinned: boolean;
2471
+ isUnPinned: boolean;
2472
+ isChannel: boolean;
2473
+ isBroadcast: boolean;
2474
+ isEphemeral: boolean;
2475
+ isForwarded: boolean;
2476
+ citation: Record<string, boolean> | null;
2477
+ media: z.objectOutputType<{
2478
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2479
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2480
+ }, z.ZodTypeAny, "passthrough"> | null;
2481
+ }, {
2482
+ channelId: string;
2483
+ uniqueId: string;
2484
+ message: (...args: unknown[]) => Record<string, any>;
2485
+ senderId: string;
2486
+ roomId: string;
2487
+ isGroup: boolean;
2488
+ text: string | null;
2489
+ chatId: string;
2490
+ receiverId: string;
2491
+ receiverName: string;
2492
+ roomName: string;
2493
+ senderName: string;
2494
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2495
+ 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";
2496
+ timestamp: number;
2497
+ mentions: string[];
2498
+ links: string[];
2499
+ isPrefix: boolean;
2500
+ isSpam: boolean;
2501
+ isFromMe: boolean;
2502
+ isTagMe: boolean;
2503
+ isStory: boolean;
2504
+ isViewOnce: boolean;
2505
+ isEdited: boolean;
2506
+ isDeleted: boolean;
2507
+ isPinned: boolean;
2508
+ isUnPinned: boolean;
2509
+ isChannel: boolean;
2510
+ isBroadcast: boolean;
2511
+ isEphemeral: boolean;
2512
+ isForwarded: boolean;
2513
+ citation: Record<string, boolean> | null;
2514
+ media: z.objectInputType<{
2515
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2516
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2517
+ }, z.ZodTypeAny, "passthrough"> | null;
2518
+ }>;
2519
+ declare const MessagesParserType: z.ZodObject<{
2520
+ chatId: z.ZodString;
2521
+ channelId: z.ZodString;
2522
+ uniqueId: z.ZodString;
2523
+ receiverId: z.ZodString;
2524
+ receiverName: z.ZodString;
2525
+ roomId: z.ZodString;
2526
+ roomName: z.ZodString;
2527
+ senderId: z.ZodString;
2528
+ senderName: z.ZodString;
2529
+ senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2530
+ chatType: z.ZodEnum<["text", "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", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
2531
+ timestamp: z.ZodNumber;
2532
+ mentions: z.ZodArray<z.ZodString, "many">;
2533
+ text: z.ZodNullable<z.ZodString>;
2534
+ links: z.ZodArray<z.ZodString, "many">;
2535
+ isPrefix: z.ZodBoolean;
2536
+ isSpam: z.ZodBoolean;
2537
+ isFromMe: z.ZodBoolean;
2538
+ isTagMe: z.ZodBoolean;
2539
+ isGroup: z.ZodBoolean;
2540
+ isStory: z.ZodBoolean;
2541
+ isViewOnce: z.ZodBoolean;
2542
+ isEdited: z.ZodBoolean;
2543
+ isDeleted: z.ZodBoolean;
2544
+ isPinned: z.ZodBoolean;
2545
+ isUnPinned: z.ZodBoolean;
2546
+ isChannel: z.ZodBoolean;
2547
+ isBroadcast: z.ZodBoolean;
2548
+ isEphemeral: z.ZodBoolean;
2549
+ isForwarded: z.ZodBoolean;
2550
+ citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2551
+ media: z.ZodNullable<z.ZodObject<{
2552
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2553
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2554
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2555
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2556
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2557
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2558
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2559
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2560
+ }, z.ZodTypeAny, "passthrough">>>;
2561
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
2562
+ } & {
2563
+ replied: z.ZodNullable<z.ZodObject<{
2564
+ chatId: z.ZodString;
2565
+ channelId: z.ZodString;
2566
+ uniqueId: z.ZodString;
2567
+ receiverId: z.ZodString;
2568
+ receiverName: z.ZodString;
2569
+ roomId: z.ZodString;
2570
+ roomName: z.ZodString;
2571
+ senderId: z.ZodString;
2572
+ senderName: z.ZodString;
2573
+ senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2574
+ chatType: z.ZodEnum<["text", "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", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
2575
+ timestamp: z.ZodNumber;
2576
+ mentions: z.ZodArray<z.ZodString, "many">;
2577
+ text: z.ZodNullable<z.ZodString>;
2578
+ links: z.ZodArray<z.ZodString, "many">;
2579
+ isPrefix: z.ZodBoolean;
2580
+ isSpam: z.ZodBoolean;
2581
+ isFromMe: z.ZodBoolean;
2582
+ isTagMe: z.ZodBoolean;
2583
+ isGroup: z.ZodBoolean;
2584
+ isStory: z.ZodBoolean;
2585
+ isViewOnce: z.ZodBoolean;
2586
+ isEdited: z.ZodBoolean;
2587
+ isDeleted: z.ZodBoolean;
2588
+ isPinned: z.ZodBoolean;
2589
+ isUnPinned: z.ZodBoolean;
2590
+ isChannel: z.ZodBoolean;
2591
+ isBroadcast: z.ZodBoolean;
2592
+ isEphemeral: z.ZodBoolean;
2593
+ isForwarded: z.ZodBoolean;
2594
+ citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2595
+ media: z.ZodNullable<z.ZodObject<{
1139
2596
  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>;
1180
- reaction(emoticon: z.infer<typeof ReactionWorkerBaseType>, options: z.infer<typeof ReactionWorkerOptionsType>): Promise<{
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<{
2597
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2598
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1213
2599
  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>;
1254
- pin(pin: z.infer<typeof PinWorkerBaseType>, options: z.infer<typeof PinWorkerOptionsType>): Promise<{
2600
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2601
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2602
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2603
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2604
+ }, z.ZodTypeAny, "passthrough">>>;
2605
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
2606
+ }, "strip", z.ZodTypeAny, {
1255
2607
  channelId: string;
1256
2608
  uniqueId: string;
1257
2609
  message: (...args: unknown[]) => Record<string, any>;
@@ -1270,6 +2622,7 @@ declare class Worker {
1270
2622
  mentions: string[];
1271
2623
  links: string[];
1272
2624
  isPrefix: boolean;
2625
+ isSpam: boolean;
1273
2626
  isFromMe: boolean;
1274
2627
  isTagMe: boolean;
1275
2628
  isStory: boolean;
@@ -1285,47 +2638,9 @@ declare class Worker {
1285
2638
  citation: Record<string, boolean> | null;
1286
2639
  media: z.objectOutputType<{
1287
2640
  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>>;
2641
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
1289
2642
  }, 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>;
1328
- poll(poll: z.infer<typeof PollWorkerBaseType>, options: z.infer<typeof PollWorkerOptionsType>): Promise<{
2643
+ }, {
1329
2644
  channelId: string;
1330
2645
  uniqueId: string;
1331
2646
  message: (...args: unknown[]) => Record<string, any>;
@@ -1344,6 +2659,7 @@ declare class Worker {
1344
2659
  mentions: string[];
1345
2660
  links: string[];
1346
2661
  isPrefix: boolean;
2662
+ isSpam: boolean;
1347
2663
  isFromMe: boolean;
1348
2664
  isTagMe: boolean;
1349
2665
  isStory: boolean;
@@ -1356,50 +2672,50 @@ declare class Worker {
1356
2672
  isBroadcast: boolean;
1357
2673
  isEphemeral: boolean;
1358
2674
  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>;
1402
- edit(text: z.infer<typeof EditWorkerBaseType>, options: z.infer<typeof EditWorkerOptionsType>): Promise<{
2675
+ citation: Record<string, boolean> | null;
2676
+ media: z.objectInputType<{
2677
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2678
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2679
+ }, z.ZodTypeAny, "passthrough"> | null;
2680
+ }>>;
2681
+ }, "strip", z.ZodTypeAny, {
2682
+ channelId: string;
2683
+ uniqueId: string;
2684
+ message: (...args: unknown[]) => Record<string, any>;
2685
+ senderId: string;
2686
+ roomId: string;
2687
+ isGroup: boolean;
2688
+ text: string | null;
2689
+ chatId: string;
2690
+ receiverId: string;
2691
+ receiverName: string;
2692
+ roomName: string;
2693
+ senderName: string;
2694
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2695
+ 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";
2696
+ timestamp: number;
2697
+ mentions: string[];
2698
+ links: string[];
2699
+ isPrefix: boolean;
2700
+ isSpam: boolean;
2701
+ isFromMe: boolean;
2702
+ isTagMe: boolean;
2703
+ isStory: boolean;
2704
+ isViewOnce: boolean;
2705
+ isEdited: boolean;
2706
+ isDeleted: boolean;
2707
+ isPinned: boolean;
2708
+ isUnPinned: boolean;
2709
+ isChannel: boolean;
2710
+ isBroadcast: boolean;
2711
+ isEphemeral: boolean;
2712
+ isForwarded: boolean;
2713
+ citation: Record<string, boolean> | null;
2714
+ media: z.objectOutputType<{
2715
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2716
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2717
+ }, z.ZodTypeAny, "passthrough"> | null;
2718
+ replied: {
1403
2719
  channelId: string;
1404
2720
  uniqueId: string;
1405
2721
  message: (...args: unknown[]) => Record<string, any>;
@@ -1418,6 +2734,7 @@ declare class Worker {
1418
2734
  mentions: string[];
1419
2735
  links: string[];
1420
2736
  isPrefix: boolean;
2737
+ isSpam: boolean;
1421
2738
  isFromMe: boolean;
1422
2739
  isTagMe: boolean;
1423
2740
  isStory: boolean;
@@ -1433,47 +2750,47 @@ declare class Worker {
1433
2750
  citation: Record<string, boolean> | null;
1434
2751
  media: z.objectOutputType<{
1435
2752
  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>>;
2753
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
1437
2754
  }, 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<{
2755
+ } | null;
2756
+ }, {
2757
+ channelId: string;
2758
+ uniqueId: string;
2759
+ message: (...args: unknown[]) => Record<string, any>;
2760
+ senderId: string;
2761
+ roomId: string;
2762
+ isGroup: boolean;
2763
+ text: string | null;
2764
+ chatId: string;
2765
+ receiverId: string;
2766
+ receiverName: string;
2767
+ roomName: string;
2768
+ senderName: string;
2769
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2770
+ 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";
2771
+ timestamp: number;
2772
+ mentions: string[];
2773
+ links: string[];
2774
+ isPrefix: boolean;
2775
+ isSpam: boolean;
2776
+ isFromMe: boolean;
2777
+ isTagMe: boolean;
2778
+ isStory: boolean;
2779
+ isViewOnce: boolean;
2780
+ isEdited: boolean;
2781
+ isDeleted: boolean;
2782
+ isPinned: boolean;
2783
+ isUnPinned: boolean;
2784
+ isChannel: boolean;
2785
+ isBroadcast: boolean;
2786
+ isEphemeral: boolean;
2787
+ isForwarded: boolean;
2788
+ citation: Record<string, boolean> | null;
2789
+ media: z.objectInputType<{
2790
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2791
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2792
+ }, z.ZodTypeAny, "passthrough"> | null;
2793
+ replied: {
1477
2794
  channelId: string;
1478
2795
  uniqueId: string;
1479
2796
  message: (...args: unknown[]) => Record<string, any>;
@@ -1492,6 +2809,7 @@ declare class Worker {
1492
2809
  mentions: string[];
1493
2810
  links: string[];
1494
2811
  isPrefix: boolean;
2812
+ isSpam: boolean;
1495
2813
  isFromMe: boolean;
1496
2814
  isTagMe: boolean;
1497
2815
  isStory: boolean;
@@ -1505,142 +2823,11 @@ declare class Worker {
1505
2823
  isEphemeral: boolean;
1506
2824
  isForwarded: boolean;
1507
2825
  citation: Record<string, boolean> | null;
1508
- media: z.objectOutputType<{
2826
+ media: z.objectInputType<{
1509
2827
  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>>;
2828
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
1511
2829
  }, 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;
1605
- };
1606
- pageContent: string;
1607
- }>;
1608
- clearRAGs(): Promise<boolean>;
1609
- getRAG(id: string): Promise<{
1610
- metadata: {
1611
- id: string;
1612
- };
1613
- pageContent: string;
1614
- } | null>;
1615
- getRAGs(keyword: string): Promise<{
1616
- metadata: {
1617
- id: string;
1618
- };
1619
- pageContent: string;
1620
- }[]>;
1621
- llms: llmsAdapter;
1622
- }
1623
-
1624
- declare class Client {
1625
- private props;
1626
- options: z.infer<typeof ClientClassesType>;
1627
- cache: NodeCache;
1628
- private chatId;
1629
- private logger;
1630
- private db;
1631
- private socket;
1632
- private events;
1633
- private spinners;
1634
- private worker;
1635
- constructor(props: z.input<typeof ClientClassesType>);
1636
- initialize(): Promise<void>;
1637
- startSpinner(key: string, message: string): Ora;
1638
- stopSpinner(key: string, succeed: boolean, message?: string): void;
1639
- failSpinner(key: string, message?: string): void;
1640
- on<T extends EventEnumType>(event: T, handler: EventCallbackType[T]): void;
1641
- emit<T extends EventEnumType>(event: T, ...args: Parameters<EventCallbackType[T]>): void;
1642
- }
1643
- interface Client extends Worker {
1644
- }
2830
+ } | null;
2831
+ }>;
1645
2832
 
1646
- export { Client };
2833
+ export { AdapterDatabaseType, CallsParserBaseType, CitationType, Client, ClientClassesBaseType, ClientClassesType, ContactWorkerBaseType, ContactWorkerOptionsType, DeleteWorkerBaseType, EditWorkerBaseType, EditWorkerOptionsType, type EventCallbackType, EventEnumType, LocationWorkerBaseType, LocationWorkerOptionsType, MediaInputWorkerType, MessagesDeviceEnumType, MessagesEnumType, MessagesMediaType, MessagesParserBaseType, MessagesParserType, MessagesVerifiedPlatformType, MuteWorkerBaseType, MuteWorkerOptionsType, PinWorkerBaseType, PinWorkerOptionsType, PollWorkerBaseType, PollWorkerOptionsType, PresenceWorkerBaseType, PresenceWorkerOptionsType, ProfileWorkerBaseOutputType, ProfileWorkerBaseType, ReactionWorkerBaseType, ReactionWorkerOptionsType, RejectCallWorkerBaseType, TextWorkerBaseType, TextWorkerOptionsType, addRAGType, llmMessagesTable, llmPersonalizationTable, llmRAGTable, type llmsAdapter };