@holocronlab/botruntime-chat 0.5.5

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.
Files changed (59) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +64 -0
  3. package/dist/client.d.ts +363 -0
  4. package/dist/consts.d.ts +1 -0
  5. package/dist/errors.d.ts +20 -0
  6. package/dist/event-emitter.d.ts +10 -0
  7. package/dist/eventsource.d.ts +32 -0
  8. package/dist/gen/client/errors.d.ts +229 -0
  9. package/dist/gen/client/index.d.ts +77 -0
  10. package/dist/gen/client/models.d.ts +212 -0
  11. package/dist/gen/client/operations/addParticipant.d.ts +55 -0
  12. package/dist/gen/client/operations/createConversation.d.ts +39 -0
  13. package/dist/gen/client/operations/createEvent.d.ts +55 -0
  14. package/dist/gen/client/operations/createMessage.d.ts +294 -0
  15. package/dist/gen/client/operations/createUser.d.ts +66 -0
  16. package/dist/gen/client/operations/deleteConversation.d.ts +22 -0
  17. package/dist/gen/client/operations/deleteMessage.d.ts +22 -0
  18. package/dist/gen/client/operations/deleteUser.d.ts +21 -0
  19. package/dist/gen/client/operations/getConversation.d.ts +36 -0
  20. package/dist/gen/client/operations/getEvent.d.ts +46 -0
  21. package/dist/gen/client/operations/getMessage.d.ts +167 -0
  22. package/dist/gen/client/operations/getOrCreateConversation.d.ts +39 -0
  23. package/dist/gen/client/operations/getOrCreateUser.d.ts +62 -0
  24. package/dist/gen/client/operations/getParticipant.d.ts +52 -0
  25. package/dist/gen/client/operations/getUser.d.ts +50 -0
  26. package/dist/gen/client/operations/listConversations.d.ts +42 -0
  27. package/dist/gen/client/operations/listMessages.d.ts +171 -0
  28. package/dist/gen/client/operations/listParticipants.d.ts +55 -0
  29. package/dist/gen/client/operations/listenConversation.d.ts +22 -0
  30. package/dist/gen/client/operations/removeParticipant.d.ts +23 -0
  31. package/dist/gen/client/operations/updateUser.d.ts +62 -0
  32. package/dist/gen/client/to-axios.d.ts +16 -0
  33. package/dist/gen/signals/eventCreated.j.d.ts +3 -0
  34. package/dist/gen/signals/eventCreated.t.d.ts +28 -0
  35. package/dist/gen/signals/eventCreated.z.d.ts +47 -0
  36. package/dist/gen/signals/index.d.ts +924 -0
  37. package/dist/gen/signals/messageCreated.j.d.ts +3 -0
  38. package/dist/gen/signals/messageCreated.t.d.ts +149 -0
  39. package/dist/gen/signals/messageCreated.z.d.ts +780 -0
  40. package/dist/gen/signals/messageDeleted.j.d.ts +3 -0
  41. package/dist/gen/signals/messageDeleted.t.d.ts +8 -0
  42. package/dist/gen/signals/messageDeleted.z.d.ts +32 -0
  43. package/dist/gen/signals/participantAdded.j.d.ts +3 -0
  44. package/dist/gen/signals/participantAdded.t.d.ts +7 -0
  45. package/dist/gen/signals/participantAdded.z.d.ts +27 -0
  46. package/dist/gen/signals/participantRemoved.j.d.ts +3 -0
  47. package/dist/gen/signals/participantRemoved.t.d.ts +7 -0
  48. package/dist/gen/signals/participantRemoved.z.d.ts +27 -0
  49. package/dist/index.cjs +1660 -0
  50. package/dist/index.cjs.map +7 -0
  51. package/dist/index.d.ts +5 -0
  52. package/dist/index.mjs +138836 -0
  53. package/dist/index.mjs.map +7 -0
  54. package/dist/jsonwebtoken.d.ts +3 -0
  55. package/dist/listing.d.ts +16 -0
  56. package/dist/signal-listener.d.ts +51 -0
  57. package/dist/types.d.ts +41 -0
  58. package/dist/watchdog.d.ts +11 -0
  59. package/package.json +35 -0
@@ -0,0 +1,924 @@
1
+ import type { MessageCreated } from './messageCreated.t';
2
+ import type { EventCreated } from './eventCreated.t';
3
+ import type { ParticipantAdded } from './participantAdded.t';
4
+ import type { ParticipantRemoved } from './participantRemoved.t';
5
+ import type { MessageDeleted } from './messageDeleted.t';
6
+ export declare const json: {
7
+ messageCreated: import("json-schema").JSONSchema7;
8
+ eventCreated: import("json-schema").JSONSchema7;
9
+ participantAdded: import("json-schema").JSONSchema7;
10
+ participantRemoved: import("json-schema").JSONSchema7;
11
+ messageDeleted: import("json-schema").JSONSchema7;
12
+ };
13
+ export declare const zod: {
14
+ messageCreated: import("zod").ZodObject<{
15
+ type: import("zod").ZodLiteral<"message_created">;
16
+ data: import("zod").ZodObject<{
17
+ id: import("zod").ZodString;
18
+ createdAt: import("zod").ZodString;
19
+ payload: import("zod").ZodUnion<[import("zod").ZodObject<{
20
+ type: import("zod").ZodLiteral<"audio">;
21
+ audioUrl: import("zod").ZodString;
22
+ }, "strip", import("zod").ZodTypeAny, {
23
+ type: "audio";
24
+ audioUrl: string;
25
+ }, {
26
+ type: "audio";
27
+ audioUrl: string;
28
+ }>, import("zod").ZodObject<{
29
+ type: import("zod").ZodLiteral<"card">;
30
+ title: import("zod").ZodString;
31
+ subtitle: import("zod").ZodOptional<import("zod").ZodString>;
32
+ imageUrl: import("zod").ZodOptional<import("zod").ZodString>;
33
+ actions: import("zod").ZodArray<import("zod").ZodObject<{
34
+ action: import("zod").ZodEnum<["postback", "url", "say"]>;
35
+ label: import("zod").ZodString;
36
+ value: import("zod").ZodString;
37
+ }, "strip", import("zod").ZodTypeAny, {
38
+ action: "postback" | "url" | "say";
39
+ label: string;
40
+ value: string;
41
+ }, {
42
+ action: "postback" | "url" | "say";
43
+ label: string;
44
+ value: string;
45
+ }>, "many">;
46
+ }, "strip", import("zod").ZodTypeAny, {
47
+ type: "card";
48
+ title: string;
49
+ actions: {
50
+ action: "postback" | "url" | "say";
51
+ label: string;
52
+ value: string;
53
+ }[];
54
+ subtitle?: string | undefined;
55
+ imageUrl?: string | undefined;
56
+ }, {
57
+ type: "card";
58
+ title: string;
59
+ actions: {
60
+ action: "postback" | "url" | "say";
61
+ label: string;
62
+ value: string;
63
+ }[];
64
+ subtitle?: string | undefined;
65
+ imageUrl?: string | undefined;
66
+ }>, import("zod").ZodObject<{
67
+ type: import("zod").ZodLiteral<"carousel">;
68
+ items: import("zod").ZodArray<import("zod").ZodObject<{
69
+ type: import("zod").ZodLiteral<"card">;
70
+ title: import("zod").ZodString;
71
+ subtitle: import("zod").ZodOptional<import("zod").ZodString>;
72
+ imageUrl: import("zod").ZodOptional<import("zod").ZodString>;
73
+ actions: import("zod").ZodArray<import("zod").ZodObject<{
74
+ action: import("zod").ZodEnum<["postback", "url", "say"]>;
75
+ label: import("zod").ZodString;
76
+ value: import("zod").ZodString;
77
+ }, "strip", import("zod").ZodTypeAny, {
78
+ action: "postback" | "url" | "say";
79
+ label: string;
80
+ value: string;
81
+ }, {
82
+ action: "postback" | "url" | "say";
83
+ label: string;
84
+ value: string;
85
+ }>, "many">;
86
+ }, "strip", import("zod").ZodTypeAny, {
87
+ type: "card";
88
+ title: string;
89
+ actions: {
90
+ action: "postback" | "url" | "say";
91
+ label: string;
92
+ value: string;
93
+ }[];
94
+ subtitle?: string | undefined;
95
+ imageUrl?: string | undefined;
96
+ }, {
97
+ type: "card";
98
+ title: string;
99
+ actions: {
100
+ action: "postback" | "url" | "say";
101
+ label: string;
102
+ value: string;
103
+ }[];
104
+ subtitle?: string | undefined;
105
+ imageUrl?: string | undefined;
106
+ }>, "many">;
107
+ }, "strip", import("zod").ZodTypeAny, {
108
+ type: "carousel";
109
+ items: {
110
+ type: "card";
111
+ title: string;
112
+ actions: {
113
+ action: "postback" | "url" | "say";
114
+ label: string;
115
+ value: string;
116
+ }[];
117
+ subtitle?: string | undefined;
118
+ imageUrl?: string | undefined;
119
+ }[];
120
+ }, {
121
+ type: "carousel";
122
+ items: {
123
+ type: "card";
124
+ title: string;
125
+ actions: {
126
+ action: "postback" | "url" | "say";
127
+ label: string;
128
+ value: string;
129
+ }[];
130
+ subtitle?: string | undefined;
131
+ imageUrl?: string | undefined;
132
+ }[];
133
+ }>, import("zod").ZodObject<{
134
+ text: import("zod").ZodString;
135
+ options: import("zod").ZodArray<import("zod").ZodObject<{
136
+ label: import("zod").ZodString;
137
+ value: import("zod").ZodString;
138
+ }, "strip", import("zod").ZodTypeAny, {
139
+ label: string;
140
+ value: string;
141
+ }, {
142
+ label: string;
143
+ value: string;
144
+ }>, "many">;
145
+ type: import("zod").ZodLiteral<"choice">;
146
+ }, "strip", import("zod").ZodTypeAny, {
147
+ type: "choice";
148
+ options: {
149
+ label: string;
150
+ value: string;
151
+ }[];
152
+ text: string;
153
+ }, {
154
+ type: "choice";
155
+ options: {
156
+ label: string;
157
+ value: string;
158
+ }[];
159
+ text: string;
160
+ }>, import("zod").ZodObject<{
161
+ text: import("zod").ZodString;
162
+ options: import("zod").ZodArray<import("zod").ZodObject<{
163
+ label: import("zod").ZodString;
164
+ value: import("zod").ZodString;
165
+ }, "strip", import("zod").ZodTypeAny, {
166
+ label: string;
167
+ value: string;
168
+ }, {
169
+ label: string;
170
+ value: string;
171
+ }>, "many">;
172
+ type: import("zod").ZodLiteral<"dropdown">;
173
+ }, "strip", import("zod").ZodTypeAny, {
174
+ type: "dropdown";
175
+ options: {
176
+ label: string;
177
+ value: string;
178
+ }[];
179
+ text: string;
180
+ }, {
181
+ type: "dropdown";
182
+ options: {
183
+ label: string;
184
+ value: string;
185
+ }[];
186
+ text: string;
187
+ }>, import("zod").ZodObject<{
188
+ type: import("zod").ZodLiteral<"file">;
189
+ fileUrl: import("zod").ZodString;
190
+ title: import("zod").ZodOptional<import("zod").ZodString>;
191
+ }, "strip", import("zod").ZodTypeAny, {
192
+ type: "file";
193
+ fileUrl: string;
194
+ title?: string | undefined;
195
+ }, {
196
+ type: "file";
197
+ fileUrl: string;
198
+ title?: string | undefined;
199
+ }>, import("zod").ZodObject<{
200
+ type: import("zod").ZodLiteral<"image">;
201
+ imageUrl: import("zod").ZodString;
202
+ }, "strip", import("zod").ZodTypeAny, {
203
+ type: "image";
204
+ imageUrl: string;
205
+ }, {
206
+ type: "image";
207
+ imageUrl: string;
208
+ }>, import("zod").ZodObject<{
209
+ type: import("zod").ZodLiteral<"location">;
210
+ latitude: import("zod").ZodNumber;
211
+ longitude: import("zod").ZodNumber;
212
+ address: import("zod").ZodOptional<import("zod").ZodString>;
213
+ title: import("zod").ZodOptional<import("zod").ZodString>;
214
+ }, "strip", import("zod").ZodTypeAny, {
215
+ type: "location";
216
+ latitude: number;
217
+ longitude: number;
218
+ address?: string | undefined;
219
+ title?: string | undefined;
220
+ }, {
221
+ type: "location";
222
+ latitude: number;
223
+ longitude: number;
224
+ address?: string | undefined;
225
+ title?: string | undefined;
226
+ }>, import("zod").ZodObject<{
227
+ type: import("zod").ZodLiteral<"text">;
228
+ text: import("zod").ZodString;
229
+ }, "strip", import("zod").ZodTypeAny, {
230
+ type: "text";
231
+ text: string;
232
+ }, {
233
+ type: "text";
234
+ text: string;
235
+ }>, import("zod").ZodObject<{
236
+ type: import("zod").ZodLiteral<"video">;
237
+ videoUrl: import("zod").ZodString;
238
+ }, "strip", import("zod").ZodTypeAny, {
239
+ type: "video";
240
+ videoUrl: string;
241
+ }, {
242
+ type: "video";
243
+ videoUrl: string;
244
+ }>, import("zod").ZodObject<{
245
+ type: import("zod").ZodLiteral<"markdown">;
246
+ markdown: import("zod").ZodString;
247
+ }, "strip", import("zod").ZodTypeAny, {
248
+ type: "markdown";
249
+ markdown: string;
250
+ }, {
251
+ type: "markdown";
252
+ markdown: string;
253
+ }>, import("zod").ZodObject<{
254
+ type: import("zod").ZodLiteral<"bloc">;
255
+ items: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
256
+ type: import("zod").ZodLiteral<"text">;
257
+ text: import("zod").ZodString;
258
+ }, "strip", import("zod").ZodTypeAny, {
259
+ type: "text";
260
+ text: string;
261
+ }, {
262
+ type: "text";
263
+ text: string;
264
+ }>, import("zod").ZodObject<{
265
+ type: import("zod").ZodLiteral<"markdown">;
266
+ markdown: import("zod").ZodString;
267
+ }, "strip", import("zod").ZodTypeAny, {
268
+ type: "markdown";
269
+ markdown: string;
270
+ }, {
271
+ type: "markdown";
272
+ markdown: string;
273
+ }>, import("zod").ZodObject<{
274
+ type: import("zod").ZodLiteral<"image">;
275
+ imageUrl: import("zod").ZodString;
276
+ }, "strip", import("zod").ZodTypeAny, {
277
+ type: "image";
278
+ imageUrl: string;
279
+ }, {
280
+ type: "image";
281
+ imageUrl: string;
282
+ }>, import("zod").ZodObject<{
283
+ type: import("zod").ZodLiteral<"audio">;
284
+ audioUrl: import("zod").ZodString;
285
+ }, "strip", import("zod").ZodTypeAny, {
286
+ type: "audio";
287
+ audioUrl: string;
288
+ }, {
289
+ type: "audio";
290
+ audioUrl: string;
291
+ }>, import("zod").ZodObject<{
292
+ type: import("zod").ZodLiteral<"video">;
293
+ videoUrl: import("zod").ZodString;
294
+ }, "strip", import("zod").ZodTypeAny, {
295
+ type: "video";
296
+ videoUrl: string;
297
+ }, {
298
+ type: "video";
299
+ videoUrl: string;
300
+ }>, import("zod").ZodObject<{
301
+ type: import("zod").ZodLiteral<"file">;
302
+ fileUrl: import("zod").ZodString;
303
+ title: import("zod").ZodOptional<import("zod").ZodString>;
304
+ }, "strip", import("zod").ZodTypeAny, {
305
+ type: "file";
306
+ fileUrl: string;
307
+ title?: string | undefined;
308
+ }, {
309
+ type: "file";
310
+ fileUrl: string;
311
+ title?: string | undefined;
312
+ }>, import("zod").ZodObject<{
313
+ type: import("zod").ZodLiteral<"location">;
314
+ latitude: import("zod").ZodNumber;
315
+ longitude: import("zod").ZodNumber;
316
+ address: import("zod").ZodOptional<import("zod").ZodString>;
317
+ title: import("zod").ZodOptional<import("zod").ZodString>;
318
+ }, "strip", import("zod").ZodTypeAny, {
319
+ type: "location";
320
+ latitude: number;
321
+ longitude: number;
322
+ address?: string | undefined;
323
+ title?: string | undefined;
324
+ }, {
325
+ type: "location";
326
+ latitude: number;
327
+ longitude: number;
328
+ address?: string | undefined;
329
+ title?: string | undefined;
330
+ }>]>, "many">;
331
+ }, "strip", import("zod").ZodTypeAny, {
332
+ type: "bloc";
333
+ items: ({
334
+ type: "text";
335
+ text: string;
336
+ } | {
337
+ type: "markdown";
338
+ markdown: string;
339
+ } | {
340
+ type: "image";
341
+ imageUrl: string;
342
+ } | {
343
+ type: "audio";
344
+ audioUrl: string;
345
+ } | {
346
+ type: "video";
347
+ videoUrl: string;
348
+ } | {
349
+ type: "file";
350
+ fileUrl: string;
351
+ title?: string | undefined;
352
+ } | {
353
+ type: "location";
354
+ latitude: number;
355
+ longitude: number;
356
+ address?: string | undefined;
357
+ title?: string | undefined;
358
+ })[];
359
+ }, {
360
+ type: "bloc";
361
+ items: ({
362
+ type: "text";
363
+ text: string;
364
+ } | {
365
+ type: "markdown";
366
+ markdown: string;
367
+ } | {
368
+ type: "image";
369
+ imageUrl: string;
370
+ } | {
371
+ type: "audio";
372
+ audioUrl: string;
373
+ } | {
374
+ type: "video";
375
+ videoUrl: string;
376
+ } | {
377
+ type: "file";
378
+ fileUrl: string;
379
+ title?: string | undefined;
380
+ } | {
381
+ type: "location";
382
+ latitude: number;
383
+ longitude: number;
384
+ address?: string | undefined;
385
+ title?: string | undefined;
386
+ })[];
387
+ }>]>;
388
+ userId: import("zod").ZodString;
389
+ conversationId: import("zod").ZodString;
390
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodAny, import("zod").ZodNull]>>>;
391
+ isBot: import("zod").ZodBoolean;
392
+ }, "strip", import("zod").ZodTypeAny, {
393
+ id: string;
394
+ conversationId: string;
395
+ userId: string;
396
+ payload: {
397
+ type: "audio";
398
+ audioUrl: string;
399
+ } | {
400
+ type: "card";
401
+ title: string;
402
+ actions: {
403
+ action: "postback" | "url" | "say";
404
+ label: string;
405
+ value: string;
406
+ }[];
407
+ subtitle?: string | undefined;
408
+ imageUrl?: string | undefined;
409
+ } | {
410
+ type: "carousel";
411
+ items: {
412
+ type: "card";
413
+ title: string;
414
+ actions: {
415
+ action: "postback" | "url" | "say";
416
+ label: string;
417
+ value: string;
418
+ }[];
419
+ subtitle?: string | undefined;
420
+ imageUrl?: string | undefined;
421
+ }[];
422
+ } | {
423
+ type: "choice";
424
+ options: {
425
+ label: string;
426
+ value: string;
427
+ }[];
428
+ text: string;
429
+ } | {
430
+ type: "dropdown";
431
+ options: {
432
+ label: string;
433
+ value: string;
434
+ }[];
435
+ text: string;
436
+ } | {
437
+ type: "file";
438
+ fileUrl: string;
439
+ title?: string | undefined;
440
+ } | {
441
+ type: "image";
442
+ imageUrl: string;
443
+ } | {
444
+ type: "location";
445
+ latitude: number;
446
+ longitude: number;
447
+ address?: string | undefined;
448
+ title?: string | undefined;
449
+ } | {
450
+ type: "text";
451
+ text: string;
452
+ } | {
453
+ type: "video";
454
+ videoUrl: string;
455
+ } | {
456
+ type: "markdown";
457
+ markdown: string;
458
+ } | {
459
+ type: "bloc";
460
+ items: ({
461
+ type: "text";
462
+ text: string;
463
+ } | {
464
+ type: "markdown";
465
+ markdown: string;
466
+ } | {
467
+ type: "image";
468
+ imageUrl: string;
469
+ } | {
470
+ type: "audio";
471
+ audioUrl: string;
472
+ } | {
473
+ type: "video";
474
+ videoUrl: string;
475
+ } | {
476
+ type: "file";
477
+ fileUrl: string;
478
+ title?: string | undefined;
479
+ } | {
480
+ type: "location";
481
+ latitude: number;
482
+ longitude: number;
483
+ address?: string | undefined;
484
+ title?: string | undefined;
485
+ })[];
486
+ };
487
+ createdAt: string;
488
+ isBot: boolean;
489
+ metadata?: Record<string, any> | undefined;
490
+ }, {
491
+ id: string;
492
+ conversationId: string;
493
+ userId: string;
494
+ payload: {
495
+ type: "audio";
496
+ audioUrl: string;
497
+ } | {
498
+ type: "card";
499
+ title: string;
500
+ actions: {
501
+ action: "postback" | "url" | "say";
502
+ label: string;
503
+ value: string;
504
+ }[];
505
+ subtitle?: string | undefined;
506
+ imageUrl?: string | undefined;
507
+ } | {
508
+ type: "carousel";
509
+ items: {
510
+ type: "card";
511
+ title: string;
512
+ actions: {
513
+ action: "postback" | "url" | "say";
514
+ label: string;
515
+ value: string;
516
+ }[];
517
+ subtitle?: string | undefined;
518
+ imageUrl?: string | undefined;
519
+ }[];
520
+ } | {
521
+ type: "choice";
522
+ options: {
523
+ label: string;
524
+ value: string;
525
+ }[];
526
+ text: string;
527
+ } | {
528
+ type: "dropdown";
529
+ options: {
530
+ label: string;
531
+ value: string;
532
+ }[];
533
+ text: string;
534
+ } | {
535
+ type: "file";
536
+ fileUrl: string;
537
+ title?: string | undefined;
538
+ } | {
539
+ type: "image";
540
+ imageUrl: string;
541
+ } | {
542
+ type: "location";
543
+ latitude: number;
544
+ longitude: number;
545
+ address?: string | undefined;
546
+ title?: string | undefined;
547
+ } | {
548
+ type: "text";
549
+ text: string;
550
+ } | {
551
+ type: "video";
552
+ videoUrl: string;
553
+ } | {
554
+ type: "markdown";
555
+ markdown: string;
556
+ } | {
557
+ type: "bloc";
558
+ items: ({
559
+ type: "text";
560
+ text: string;
561
+ } | {
562
+ type: "markdown";
563
+ markdown: string;
564
+ } | {
565
+ type: "image";
566
+ imageUrl: string;
567
+ } | {
568
+ type: "audio";
569
+ audioUrl: string;
570
+ } | {
571
+ type: "video";
572
+ videoUrl: string;
573
+ } | {
574
+ type: "file";
575
+ fileUrl: string;
576
+ title?: string | undefined;
577
+ } | {
578
+ type: "location";
579
+ latitude: number;
580
+ longitude: number;
581
+ address?: string | undefined;
582
+ title?: string | undefined;
583
+ })[];
584
+ };
585
+ createdAt: string;
586
+ isBot: boolean;
587
+ metadata?: Record<string, any> | undefined;
588
+ }>;
589
+ }, "strip", import("zod").ZodTypeAny, {
590
+ type: "message_created";
591
+ data: {
592
+ id: string;
593
+ conversationId: string;
594
+ userId: string;
595
+ payload: {
596
+ type: "audio";
597
+ audioUrl: string;
598
+ } | {
599
+ type: "card";
600
+ title: string;
601
+ actions: {
602
+ action: "postback" | "url" | "say";
603
+ label: string;
604
+ value: string;
605
+ }[];
606
+ subtitle?: string | undefined;
607
+ imageUrl?: string | undefined;
608
+ } | {
609
+ type: "carousel";
610
+ items: {
611
+ type: "card";
612
+ title: string;
613
+ actions: {
614
+ action: "postback" | "url" | "say";
615
+ label: string;
616
+ value: string;
617
+ }[];
618
+ subtitle?: string | undefined;
619
+ imageUrl?: string | undefined;
620
+ }[];
621
+ } | {
622
+ type: "choice";
623
+ options: {
624
+ label: string;
625
+ value: string;
626
+ }[];
627
+ text: string;
628
+ } | {
629
+ type: "dropdown";
630
+ options: {
631
+ label: string;
632
+ value: string;
633
+ }[];
634
+ text: string;
635
+ } | {
636
+ type: "file";
637
+ fileUrl: string;
638
+ title?: string | undefined;
639
+ } | {
640
+ type: "image";
641
+ imageUrl: string;
642
+ } | {
643
+ type: "location";
644
+ latitude: number;
645
+ longitude: number;
646
+ address?: string | undefined;
647
+ title?: string | undefined;
648
+ } | {
649
+ type: "text";
650
+ text: string;
651
+ } | {
652
+ type: "video";
653
+ videoUrl: string;
654
+ } | {
655
+ type: "markdown";
656
+ markdown: string;
657
+ } | {
658
+ type: "bloc";
659
+ items: ({
660
+ type: "text";
661
+ text: string;
662
+ } | {
663
+ type: "markdown";
664
+ markdown: string;
665
+ } | {
666
+ type: "image";
667
+ imageUrl: string;
668
+ } | {
669
+ type: "audio";
670
+ audioUrl: string;
671
+ } | {
672
+ type: "video";
673
+ videoUrl: string;
674
+ } | {
675
+ type: "file";
676
+ fileUrl: string;
677
+ title?: string | undefined;
678
+ } | {
679
+ type: "location";
680
+ latitude: number;
681
+ longitude: number;
682
+ address?: string | undefined;
683
+ title?: string | undefined;
684
+ })[];
685
+ };
686
+ createdAt: string;
687
+ isBot: boolean;
688
+ metadata?: Record<string, any> | undefined;
689
+ };
690
+ }, {
691
+ type: "message_created";
692
+ data: {
693
+ id: string;
694
+ conversationId: string;
695
+ userId: string;
696
+ payload: {
697
+ type: "audio";
698
+ audioUrl: string;
699
+ } | {
700
+ type: "card";
701
+ title: string;
702
+ actions: {
703
+ action: "postback" | "url" | "say";
704
+ label: string;
705
+ value: string;
706
+ }[];
707
+ subtitle?: string | undefined;
708
+ imageUrl?: string | undefined;
709
+ } | {
710
+ type: "carousel";
711
+ items: {
712
+ type: "card";
713
+ title: string;
714
+ actions: {
715
+ action: "postback" | "url" | "say";
716
+ label: string;
717
+ value: string;
718
+ }[];
719
+ subtitle?: string | undefined;
720
+ imageUrl?: string | undefined;
721
+ }[];
722
+ } | {
723
+ type: "choice";
724
+ options: {
725
+ label: string;
726
+ value: string;
727
+ }[];
728
+ text: string;
729
+ } | {
730
+ type: "dropdown";
731
+ options: {
732
+ label: string;
733
+ value: string;
734
+ }[];
735
+ text: string;
736
+ } | {
737
+ type: "file";
738
+ fileUrl: string;
739
+ title?: string | undefined;
740
+ } | {
741
+ type: "image";
742
+ imageUrl: string;
743
+ } | {
744
+ type: "location";
745
+ latitude: number;
746
+ longitude: number;
747
+ address?: string | undefined;
748
+ title?: string | undefined;
749
+ } | {
750
+ type: "text";
751
+ text: string;
752
+ } | {
753
+ type: "video";
754
+ videoUrl: string;
755
+ } | {
756
+ type: "markdown";
757
+ markdown: string;
758
+ } | {
759
+ type: "bloc";
760
+ items: ({
761
+ type: "text";
762
+ text: string;
763
+ } | {
764
+ type: "markdown";
765
+ markdown: string;
766
+ } | {
767
+ type: "image";
768
+ imageUrl: string;
769
+ } | {
770
+ type: "audio";
771
+ audioUrl: string;
772
+ } | {
773
+ type: "video";
774
+ videoUrl: string;
775
+ } | {
776
+ type: "file";
777
+ fileUrl: string;
778
+ title?: string | undefined;
779
+ } | {
780
+ type: "location";
781
+ latitude: number;
782
+ longitude: number;
783
+ address?: string | undefined;
784
+ title?: string | undefined;
785
+ })[];
786
+ };
787
+ createdAt: string;
788
+ isBot: boolean;
789
+ metadata?: Record<string, any> | undefined;
790
+ };
791
+ }>;
792
+ eventCreated: import("zod").ZodObject<{
793
+ type: import("zod").ZodLiteral<"event_created">;
794
+ data: import("zod").ZodObject<{
795
+ createdAt: import("zod").ZodString;
796
+ payload: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
797
+ conversationId: import("zod").ZodString;
798
+ userId: import("zod").ZodString;
799
+ id: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNull]>;
800
+ isBot: import("zod").ZodBoolean;
801
+ }, "strip", import("zod").ZodTypeAny, {
802
+ id: string | null;
803
+ conversationId: string;
804
+ userId: string;
805
+ payload: Record<string, any>;
806
+ createdAt: string;
807
+ isBot: boolean;
808
+ }, {
809
+ id: string | null;
810
+ conversationId: string;
811
+ userId: string;
812
+ payload: Record<string, any>;
813
+ createdAt: string;
814
+ isBot: boolean;
815
+ }>;
816
+ }, "strip", import("zod").ZodTypeAny, {
817
+ type: "event_created";
818
+ data: {
819
+ id: string | null;
820
+ conversationId: string;
821
+ userId: string;
822
+ payload: Record<string, any>;
823
+ createdAt: string;
824
+ isBot: boolean;
825
+ };
826
+ }, {
827
+ type: "event_created";
828
+ data: {
829
+ id: string | null;
830
+ conversationId: string;
831
+ userId: string;
832
+ payload: Record<string, any>;
833
+ createdAt: string;
834
+ isBot: boolean;
835
+ };
836
+ }>;
837
+ participantAdded: import("zod").ZodObject<{
838
+ type: import("zod").ZodLiteral<"participant_added">;
839
+ data: import("zod").ZodObject<{
840
+ conversationId: import("zod").ZodString;
841
+ participantId: import("zod").ZodString;
842
+ }, "strip", import("zod").ZodTypeAny, {
843
+ conversationId: string;
844
+ participantId: string;
845
+ }, {
846
+ conversationId: string;
847
+ participantId: string;
848
+ }>;
849
+ }, "strip", import("zod").ZodTypeAny, {
850
+ type: "participant_added";
851
+ data: {
852
+ conversationId: string;
853
+ participantId: string;
854
+ };
855
+ }, {
856
+ type: "participant_added";
857
+ data: {
858
+ conversationId: string;
859
+ participantId: string;
860
+ };
861
+ }>;
862
+ participantRemoved: import("zod").ZodObject<{
863
+ type: import("zod").ZodLiteral<"participant_removed">;
864
+ data: import("zod").ZodObject<{
865
+ conversationId: import("zod").ZodString;
866
+ participantId: import("zod").ZodString;
867
+ }, "strip", import("zod").ZodTypeAny, {
868
+ conversationId: string;
869
+ participantId: string;
870
+ }, {
871
+ conversationId: string;
872
+ participantId: string;
873
+ }>;
874
+ }, "strip", import("zod").ZodTypeAny, {
875
+ type: "participant_removed";
876
+ data: {
877
+ conversationId: string;
878
+ participantId: string;
879
+ };
880
+ }, {
881
+ type: "participant_removed";
882
+ data: {
883
+ conversationId: string;
884
+ participantId: string;
885
+ };
886
+ }>;
887
+ messageDeleted: import("zod").ZodObject<{
888
+ type: import("zod").ZodLiteral<"message_deleted">;
889
+ data: import("zod").ZodObject<{
890
+ id: import("zod").ZodString;
891
+ conversationId: import("zod").ZodString;
892
+ userId: import("zod").ZodString;
893
+ }, "strip", import("zod").ZodTypeAny, {
894
+ id: string;
895
+ conversationId: string;
896
+ userId: string;
897
+ }, {
898
+ id: string;
899
+ conversationId: string;
900
+ userId: string;
901
+ }>;
902
+ }, "strip", import("zod").ZodTypeAny, {
903
+ type: "message_deleted";
904
+ data: {
905
+ id: string;
906
+ conversationId: string;
907
+ userId: string;
908
+ };
909
+ }, {
910
+ type: "message_deleted";
911
+ data: {
912
+ id: string;
913
+ conversationId: string;
914
+ userId: string;
915
+ };
916
+ }>;
917
+ };
918
+ export type Types = {
919
+ messageCreated: MessageCreated;
920
+ eventCreated: EventCreated;
921
+ participantAdded: ParticipantAdded;
922
+ participantRemoved: ParticipantRemoved;
923
+ messageDeleted: MessageDeleted;
924
+ };