@relaycast/types 0.2.3 → 0.2.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 (61) hide show
  1. package/dist/agent.d.ts +189 -23
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +73 -1
  4. package/dist/agent.js.map +1 -1
  5. package/dist/api.d.ts +209 -14
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +22 -1
  8. package/dist/api.js.map +1 -1
  9. package/dist/billing.d.ts +97 -17
  10. package/dist/billing.d.ts.map +1 -1
  11. package/dist/billing.js +44 -1
  12. package/dist/billing.js.map +1 -1
  13. package/dist/channel.d.ts +80 -16
  14. package/dist/channel.d.ts.map +1 -1
  15. package/dist/channel.js +35 -1
  16. package/dist/channel.js.map +1 -1
  17. package/dist/command.d.ts +188 -26
  18. package/dist/command.d.ts.map +1 -1
  19. package/dist/command.js +47 -1
  20. package/dist/command.js.map +1 -1
  21. package/dist/dashboard.d.ts +141 -14
  22. package/dist/dashboard.d.ts.map +1 -1
  23. package/dist/dashboard.js +32 -1
  24. package/dist/dashboard.js.map +1 -1
  25. package/dist/dm.d.ts +74 -15
  26. package/dist/dm.d.ts.map +1 -1
  27. package/dist/dm.js +33 -1
  28. package/dist/dm.js.map +1 -1
  29. package/dist/events.d.ts +1479 -75
  30. package/dist/events.d.ts.map +1 -1
  31. package/dist/events.js +186 -1
  32. package/dist/events.js.map +1 -1
  33. package/dist/file.d.ts +83 -14
  34. package/dist/file.d.ts.map +1 -1
  35. package/dist/file.js +38 -1
  36. package/dist/file.js.map +1 -1
  37. package/dist/message.d.ts +875 -52
  38. package/dist/message.d.ts.map +1 -1
  39. package/dist/message.js +75 -1
  40. package/dist/message.js.map +1 -1
  41. package/dist/reaction.d.ts +35 -7
  42. package/dist/reaction.d.ts.map +1 -1
  43. package/dist/reaction.js +16 -1
  44. package/dist/reaction.js.map +1 -1
  45. package/dist/receipt.d.ts +34 -6
  46. package/dist/receipt.d.ts.map +1 -1
  47. package/dist/receipt.js +16 -1
  48. package/dist/receipt.js.map +1 -1
  49. package/dist/subscription.d.ts +119 -20
  50. package/dist/subscription.d.ts.map +1 -1
  51. package/dist/subscription.js +49 -1
  52. package/dist/subscription.js.map +1 -1
  53. package/dist/webhook.d.ts +81 -17
  54. package/dist/webhook.d.ts.map +1 -1
  55. package/dist/webhook.js +35 -1
  56. package/dist/webhook.js.map +1 -1
  57. package/dist/workspace.d.ts +77 -12
  58. package/dist/workspace.d.ts.map +1 -1
  59. package/dist/workspace.js +32 -1
  60. package/dist/workspace.js.map +1 -1
  61. package/package.json +4 -1
package/dist/events.d.ts CHANGED
@@ -1,156 +1,1560 @@
1
- export interface SubscribeEvent {
2
- type: 'subscribe';
1
+ import { z } from 'zod';
2
+ export declare const SubscribeEventSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"subscribe">;
4
+ channels: z.ZodArray<z.ZodString, "many">;
5
+ }, "strip", z.ZodTypeAny, {
6
+ type: "subscribe";
3
7
  channels: string[];
4
- }
5
- export interface UnsubscribeEvent {
6
- type: 'unsubscribe';
8
+ }, {
9
+ type: "subscribe";
7
10
  channels: string[];
8
- }
9
- export interface PingEvent {
10
- type: 'ping';
11
- }
12
- export type ClientEvent = SubscribeEvent | UnsubscribeEvent | PingEvent;
13
- export interface MessageCreatedEvent {
14
- type: 'message.created';
11
+ }>;
12
+ export type SubscribeEvent = z.infer<typeof SubscribeEventSchema>;
13
+ export declare const UnsubscribeEventSchema: z.ZodObject<{
14
+ type: z.ZodLiteral<"unsubscribe">;
15
+ channels: z.ZodArray<z.ZodString, "many">;
16
+ }, "strip", z.ZodTypeAny, {
17
+ type: "unsubscribe";
18
+ channels: string[];
19
+ }, {
20
+ type: "unsubscribe";
21
+ channels: string[];
22
+ }>;
23
+ export type UnsubscribeEvent = z.infer<typeof UnsubscribeEventSchema>;
24
+ export declare const PingEventSchema: z.ZodObject<{
25
+ type: z.ZodLiteral<"ping">;
26
+ }, "strip", z.ZodTypeAny, {
27
+ type: "ping";
28
+ }, {
29
+ type: "ping";
30
+ }>;
31
+ export type PingEvent = z.infer<typeof PingEventSchema>;
32
+ export declare const ClientEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
33
+ type: z.ZodLiteral<"subscribe">;
34
+ channels: z.ZodArray<z.ZodString, "many">;
35
+ }, "strip", z.ZodTypeAny, {
36
+ type: "subscribe";
37
+ channels: string[];
38
+ }, {
39
+ type: "subscribe";
40
+ channels: string[];
41
+ }>, z.ZodObject<{
42
+ type: z.ZodLiteral<"unsubscribe">;
43
+ channels: z.ZodArray<z.ZodString, "many">;
44
+ }, "strip", z.ZodTypeAny, {
45
+ type: "unsubscribe";
46
+ channels: string[];
47
+ }, {
48
+ type: "unsubscribe";
49
+ channels: string[];
50
+ }>, z.ZodObject<{
51
+ type: z.ZodLiteral<"ping">;
52
+ }, "strip", z.ZodTypeAny, {
53
+ type: "ping";
54
+ }, {
55
+ type: "ping";
56
+ }>]>;
57
+ export type ClientEvent = z.infer<typeof ClientEventSchema>;
58
+ export declare const MessageCreatedEventSchema: z.ZodObject<{
59
+ type: z.ZodLiteral<"message.created">;
60
+ channel: z.ZodString;
61
+ message: z.ZodObject<{
62
+ id: z.ZodString;
63
+ agent_name: z.ZodString;
64
+ text: z.ZodString;
65
+ attachments: z.ZodArray<z.ZodObject<{
66
+ file_id: z.ZodString;
67
+ filename: z.ZodString;
68
+ url: z.ZodString;
69
+ size: z.ZodNumber;
70
+ }, "strip", z.ZodTypeAny, {
71
+ file_id: string;
72
+ filename: string;
73
+ url: string;
74
+ size: number;
75
+ }, {
76
+ file_id: string;
77
+ filename: string;
78
+ url: string;
79
+ size: number;
80
+ }>, "many">;
81
+ }, "strip", z.ZodTypeAny, {
82
+ id: string;
83
+ agent_name: string;
84
+ text: string;
85
+ attachments: {
86
+ file_id: string;
87
+ filename: string;
88
+ url: string;
89
+ size: number;
90
+ }[];
91
+ }, {
92
+ id: string;
93
+ agent_name: string;
94
+ text: string;
95
+ attachments: {
96
+ file_id: string;
97
+ filename: string;
98
+ url: string;
99
+ size: number;
100
+ }[];
101
+ }>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ message: {
104
+ id: string;
105
+ agent_name: string;
106
+ text: string;
107
+ attachments: {
108
+ file_id: string;
109
+ filename: string;
110
+ url: string;
111
+ size: number;
112
+ }[];
113
+ };
114
+ type: "message.created";
115
+ channel: string;
116
+ }, {
117
+ message: {
118
+ id: string;
119
+ agent_name: string;
120
+ text: string;
121
+ attachments: {
122
+ file_id: string;
123
+ filename: string;
124
+ url: string;
125
+ size: number;
126
+ }[];
127
+ };
128
+ type: "message.created";
129
+ channel: string;
130
+ }>;
131
+ export type MessageCreatedEvent = z.infer<typeof MessageCreatedEventSchema>;
132
+ export declare const MessageUpdatedEventSchema: z.ZodObject<{
133
+ type: z.ZodLiteral<"message.updated">;
134
+ channel: z.ZodString;
135
+ message: z.ZodObject<{
136
+ id: z.ZodString;
137
+ agent_name: z.ZodString;
138
+ text: z.ZodString;
139
+ }, "strip", z.ZodTypeAny, {
140
+ id: string;
141
+ agent_name: string;
142
+ text: string;
143
+ }, {
144
+ id: string;
145
+ agent_name: string;
146
+ text: string;
147
+ }>;
148
+ }, "strip", z.ZodTypeAny, {
149
+ message: {
150
+ id: string;
151
+ agent_name: string;
152
+ text: string;
153
+ };
154
+ type: "message.updated";
155
+ channel: string;
156
+ }, {
157
+ message: {
158
+ id: string;
159
+ agent_name: string;
160
+ text: string;
161
+ };
162
+ type: "message.updated";
163
+ channel: string;
164
+ }>;
165
+ export type MessageUpdatedEvent = z.infer<typeof MessageUpdatedEventSchema>;
166
+ export declare const ThreadReplyEventSchema: z.ZodObject<{
167
+ type: z.ZodLiteral<"thread.reply">;
168
+ parent_id: z.ZodString;
169
+ message: z.ZodObject<{
170
+ id: z.ZodString;
171
+ agent_name: z.ZodString;
172
+ text: z.ZodString;
173
+ }, "strip", z.ZodTypeAny, {
174
+ id: string;
175
+ agent_name: string;
176
+ text: string;
177
+ }, {
178
+ id: string;
179
+ agent_name: string;
180
+ text: string;
181
+ }>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ message: {
184
+ id: string;
185
+ agent_name: string;
186
+ text: string;
187
+ };
188
+ type: "thread.reply";
189
+ parent_id: string;
190
+ }, {
191
+ message: {
192
+ id: string;
193
+ agent_name: string;
194
+ text: string;
195
+ };
196
+ type: "thread.reply";
197
+ parent_id: string;
198
+ }>;
199
+ export type ThreadReplyEvent = z.infer<typeof ThreadReplyEventSchema>;
200
+ export declare const ReactionAddedEventSchema: z.ZodObject<{
201
+ type: z.ZodLiteral<"reaction.added">;
202
+ message_id: z.ZodString;
203
+ emoji: z.ZodString;
204
+ agent_name: z.ZodString;
205
+ }, "strip", z.ZodTypeAny, {
206
+ type: "reaction.added";
207
+ agent_name: string;
208
+ message_id: string;
209
+ emoji: string;
210
+ }, {
211
+ type: "reaction.added";
212
+ agent_name: string;
213
+ message_id: string;
214
+ emoji: string;
215
+ }>;
216
+ export type ReactionAddedEvent = z.infer<typeof ReactionAddedEventSchema>;
217
+ export declare const ReactionRemovedEventSchema: z.ZodObject<{
218
+ type: z.ZodLiteral<"reaction.removed">;
219
+ message_id: z.ZodString;
220
+ emoji: z.ZodString;
221
+ agent_name: z.ZodString;
222
+ }, "strip", z.ZodTypeAny, {
223
+ type: "reaction.removed";
224
+ agent_name: string;
225
+ message_id: string;
226
+ emoji: string;
227
+ }, {
228
+ type: "reaction.removed";
229
+ agent_name: string;
230
+ message_id: string;
231
+ emoji: string;
232
+ }>;
233
+ export type ReactionRemovedEvent = z.infer<typeof ReactionRemovedEventSchema>;
234
+ export declare const DmReceivedEventSchema: z.ZodObject<{
235
+ type: z.ZodLiteral<"dm.received">;
236
+ conversation_id: z.ZodString;
237
+ message: z.ZodObject<{
238
+ id: z.ZodString;
239
+ agent_name: z.ZodString;
240
+ text: z.ZodString;
241
+ }, "strip", z.ZodTypeAny, {
242
+ id: string;
243
+ agent_name: string;
244
+ text: string;
245
+ }, {
246
+ id: string;
247
+ agent_name: string;
248
+ text: string;
249
+ }>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ message: {
252
+ id: string;
253
+ agent_name: string;
254
+ text: string;
255
+ };
256
+ type: "dm.received";
257
+ conversation_id: string;
258
+ }, {
259
+ message: {
260
+ id: string;
261
+ agent_name: string;
262
+ text: string;
263
+ };
264
+ type: "dm.received";
265
+ conversation_id: string;
266
+ }>;
267
+ export type DmReceivedEvent = z.infer<typeof DmReceivedEventSchema>;
268
+ export declare const GroupDmReceivedEventSchema: z.ZodObject<{
269
+ type: z.ZodLiteral<"group_dm.received">;
270
+ conversation_id: z.ZodString;
271
+ message: z.ZodObject<{
272
+ id: z.ZodString;
273
+ agent_name: z.ZodString;
274
+ text: z.ZodString;
275
+ }, "strip", z.ZodTypeAny, {
276
+ id: string;
277
+ agent_name: string;
278
+ text: string;
279
+ }, {
280
+ id: string;
281
+ agent_name: string;
282
+ text: string;
283
+ }>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ message: {
286
+ id: string;
287
+ agent_name: string;
288
+ text: string;
289
+ };
290
+ type: "group_dm.received";
291
+ conversation_id: string;
292
+ }, {
293
+ message: {
294
+ id: string;
295
+ agent_name: string;
296
+ text: string;
297
+ };
298
+ type: "group_dm.received";
299
+ conversation_id: string;
300
+ }>;
301
+ export type GroupDmReceivedEvent = z.infer<typeof GroupDmReceivedEventSchema>;
302
+ export declare const AgentOnlineEventSchema: z.ZodObject<{
303
+ type: z.ZodLiteral<"agent.online">;
304
+ agent: z.ZodObject<{
305
+ name: z.ZodString;
306
+ }, "strip", z.ZodTypeAny, {
307
+ name: string;
308
+ }, {
309
+ name: string;
310
+ }>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ agent: {
313
+ name: string;
314
+ };
315
+ type: "agent.online";
316
+ }, {
317
+ agent: {
318
+ name: string;
319
+ };
320
+ type: "agent.online";
321
+ }>;
322
+ export type AgentOnlineEvent = z.infer<typeof AgentOnlineEventSchema>;
323
+ export declare const AgentOfflineEventSchema: z.ZodObject<{
324
+ type: z.ZodLiteral<"agent.offline">;
325
+ agent: z.ZodObject<{
326
+ name: z.ZodString;
327
+ }, "strip", z.ZodTypeAny, {
328
+ name: string;
329
+ }, {
330
+ name: string;
331
+ }>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ agent: {
334
+ name: string;
335
+ };
336
+ type: "agent.offline";
337
+ }, {
338
+ agent: {
339
+ name: string;
340
+ };
341
+ type: "agent.offline";
342
+ }>;
343
+ export type AgentOfflineEvent = z.infer<typeof AgentOfflineEventSchema>;
344
+ export declare const ChannelCreatedEventSchema: z.ZodObject<{
345
+ type: z.ZodLiteral<"channel.created">;
346
+ channel: z.ZodObject<{
347
+ name: z.ZodString;
348
+ topic: z.ZodNullable<z.ZodString>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ name: string;
351
+ topic: string | null;
352
+ }, {
353
+ name: string;
354
+ topic: string | null;
355
+ }>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ type: "channel.created";
358
+ channel: {
359
+ name: string;
360
+ topic: string | null;
361
+ };
362
+ }, {
363
+ type: "channel.created";
364
+ channel: {
365
+ name: string;
366
+ topic: string | null;
367
+ };
368
+ }>;
369
+ export type ChannelCreatedEvent = z.infer<typeof ChannelCreatedEventSchema>;
370
+ export declare const ChannelUpdatedEventSchema: z.ZodObject<{
371
+ type: z.ZodLiteral<"channel.updated">;
372
+ channel: z.ZodObject<{
373
+ name: z.ZodString;
374
+ topic: z.ZodNullable<z.ZodString>;
375
+ }, "strip", z.ZodTypeAny, {
376
+ name: string;
377
+ topic: string | null;
378
+ }, {
379
+ name: string;
380
+ topic: string | null;
381
+ }>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ type: "channel.updated";
384
+ channel: {
385
+ name: string;
386
+ topic: string | null;
387
+ };
388
+ }, {
389
+ type: "channel.updated";
390
+ channel: {
391
+ name: string;
392
+ topic: string | null;
393
+ };
394
+ }>;
395
+ export type ChannelUpdatedEvent = z.infer<typeof ChannelUpdatedEventSchema>;
396
+ export declare const ChannelArchivedEventSchema: z.ZodObject<{
397
+ type: z.ZodLiteral<"channel.archived">;
398
+ channel: z.ZodObject<{
399
+ name: z.ZodString;
400
+ }, "strip", z.ZodTypeAny, {
401
+ name: string;
402
+ }, {
403
+ name: string;
404
+ }>;
405
+ }, "strip", z.ZodTypeAny, {
406
+ type: "channel.archived";
407
+ channel: {
408
+ name: string;
409
+ };
410
+ }, {
411
+ type: "channel.archived";
412
+ channel: {
413
+ name: string;
414
+ };
415
+ }>;
416
+ export type ChannelArchivedEvent = z.infer<typeof ChannelArchivedEventSchema>;
417
+ export declare const MemberJoinedEventSchema: z.ZodObject<{
418
+ type: z.ZodLiteral<"member.joined">;
419
+ channel: z.ZodString;
420
+ agent_name: z.ZodString;
421
+ }, "strip", z.ZodTypeAny, {
422
+ type: "member.joined";
423
+ agent_name: string;
424
+ channel: string;
425
+ }, {
426
+ type: "member.joined";
427
+ agent_name: string;
428
+ channel: string;
429
+ }>;
430
+ export type MemberJoinedEvent = z.infer<typeof MemberJoinedEventSchema>;
431
+ export declare const MemberLeftEventSchema: z.ZodObject<{
432
+ type: z.ZodLiteral<"member.left">;
433
+ channel: z.ZodString;
434
+ agent_name: z.ZodString;
435
+ }, "strip", z.ZodTypeAny, {
436
+ type: "member.left";
437
+ agent_name: string;
438
+ channel: string;
439
+ }, {
440
+ type: "member.left";
441
+ agent_name: string;
442
+ channel: string;
443
+ }>;
444
+ export type MemberLeftEvent = z.infer<typeof MemberLeftEventSchema>;
445
+ export declare const MessageReadEventSchema: z.ZodObject<{
446
+ type: z.ZodLiteral<"message.read">;
447
+ message_id: z.ZodString;
448
+ agent_name: z.ZodString;
449
+ read_at: z.ZodString;
450
+ }, "strip", z.ZodTypeAny, {
451
+ type: "message.read";
452
+ agent_name: string;
453
+ message_id: string;
454
+ read_at: string;
455
+ }, {
456
+ type: "message.read";
457
+ agent_name: string;
458
+ message_id: string;
459
+ read_at: string;
460
+ }>;
461
+ export type MessageReadEvent = z.infer<typeof MessageReadEventSchema>;
462
+ export declare const FileUploadedEventSchema: z.ZodObject<{
463
+ type: z.ZodLiteral<"file.uploaded">;
464
+ file: z.ZodObject<{
465
+ file_id: z.ZodString;
466
+ filename: z.ZodString;
467
+ uploaded_by: z.ZodString;
468
+ }, "strip", z.ZodTypeAny, {
469
+ file_id: string;
470
+ filename: string;
471
+ uploaded_by: string;
472
+ }, {
473
+ file_id: string;
474
+ filename: string;
475
+ uploaded_by: string;
476
+ }>;
477
+ }, "strip", z.ZodTypeAny, {
478
+ type: "file.uploaded";
479
+ file: {
480
+ file_id: string;
481
+ filename: string;
482
+ uploaded_by: string;
483
+ };
484
+ }, {
485
+ type: "file.uploaded";
486
+ file: {
487
+ file_id: string;
488
+ filename: string;
489
+ uploaded_by: string;
490
+ };
491
+ }>;
492
+ export type FileUploadedEvent = z.infer<typeof FileUploadedEventSchema>;
493
+ export declare const PongEventSchema: z.ZodObject<{
494
+ type: z.ZodLiteral<"pong">;
495
+ }, "strip", z.ZodTypeAny, {
496
+ type: "pong";
497
+ }, {
498
+ type: "pong";
499
+ }>;
500
+ export type PongEvent = z.infer<typeof PongEventSchema>;
501
+ export declare const WebhookReceivedEventSchema: z.ZodObject<{
502
+ type: z.ZodLiteral<"webhook.received">;
503
+ webhook_id: z.ZodString;
504
+ channel: z.ZodString;
505
+ message: z.ZodObject<{
506
+ id: z.ZodString;
507
+ text: z.ZodString;
508
+ source: z.ZodNullable<z.ZodString>;
509
+ }, "strip", z.ZodTypeAny, {
510
+ id: string;
511
+ text: string;
512
+ source: string | null;
513
+ }, {
514
+ id: string;
515
+ text: string;
516
+ source: string | null;
517
+ }>;
518
+ }, "strip", z.ZodTypeAny, {
519
+ message: {
520
+ id: string;
521
+ text: string;
522
+ source: string | null;
523
+ };
524
+ type: "webhook.received";
525
+ channel: string;
526
+ webhook_id: string;
527
+ }, {
528
+ message: {
529
+ id: string;
530
+ text: string;
531
+ source: string | null;
532
+ };
533
+ type: "webhook.received";
534
+ channel: string;
535
+ webhook_id: string;
536
+ }>;
537
+ export type WebhookReceivedEvent = z.infer<typeof WebhookReceivedEventSchema>;
538
+ export declare const CommandInvokedEventSchema: z.ZodObject<{
539
+ type: z.ZodLiteral<"command.invoked">;
540
+ command: z.ZodString;
541
+ channel: z.ZodString;
542
+ invoked_by: z.ZodString;
543
+ args: z.ZodNullable<z.ZodString>;
544
+ parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ type: "command.invoked";
547
+ channel: string;
548
+ command: string;
549
+ parameters: Record<string, unknown> | null;
550
+ args: string | null;
551
+ invoked_by: string;
552
+ }, {
553
+ type: "command.invoked";
554
+ channel: string;
555
+ command: string;
556
+ parameters: Record<string, unknown> | null;
557
+ args: string | null;
558
+ invoked_by: string;
559
+ }>;
560
+ export type CommandInvokedEvent = z.infer<typeof CommandInvokedEventSchema>;
561
+ export declare const WsOpenEventSchema: z.ZodObject<{
562
+ type: z.ZodLiteral<"open">;
563
+ }, "strip", z.ZodTypeAny, {
564
+ type: "open";
565
+ }, {
566
+ type: "open";
567
+ }>;
568
+ export type WsOpenEvent = z.infer<typeof WsOpenEventSchema>;
569
+ export declare const WsErrorEventSchema: z.ZodObject<{
570
+ type: z.ZodLiteral<"error">;
571
+ }, "strip", z.ZodTypeAny, {
572
+ type: "error";
573
+ }, {
574
+ type: "error";
575
+ }>;
576
+ export type WsErrorEvent = z.infer<typeof WsErrorEventSchema>;
577
+ export declare const WsReconnectingEventSchema: z.ZodObject<{
578
+ type: z.ZodLiteral<"reconnecting">;
579
+ attempt: z.ZodNumber;
580
+ }, "strip", z.ZodTypeAny, {
581
+ type: "reconnecting";
582
+ attempt: number;
583
+ }, {
584
+ type: "reconnecting";
585
+ attempt: number;
586
+ }>;
587
+ export type WsReconnectingEvent = z.infer<typeof WsReconnectingEventSchema>;
588
+ export declare const WsCloseEventSchema: z.ZodObject<{
589
+ type: z.ZodLiteral<"close">;
590
+ }, "strip", z.ZodTypeAny, {
591
+ type: "close";
592
+ }, {
593
+ type: "close";
594
+ }>;
595
+ export type WsCloseEvent = z.infer<typeof WsCloseEventSchema>;
596
+ export declare const ServerEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
597
+ type: z.ZodLiteral<"message.created">;
598
+ channel: z.ZodString;
599
+ message: z.ZodObject<{
600
+ id: z.ZodString;
601
+ agent_name: z.ZodString;
602
+ text: z.ZodString;
603
+ attachments: z.ZodArray<z.ZodObject<{
604
+ file_id: z.ZodString;
605
+ filename: z.ZodString;
606
+ url: z.ZodString;
607
+ size: z.ZodNumber;
608
+ }, "strip", z.ZodTypeAny, {
609
+ file_id: string;
610
+ filename: string;
611
+ url: string;
612
+ size: number;
613
+ }, {
614
+ file_id: string;
615
+ filename: string;
616
+ url: string;
617
+ size: number;
618
+ }>, "many">;
619
+ }, "strip", z.ZodTypeAny, {
620
+ id: string;
621
+ agent_name: string;
622
+ text: string;
623
+ attachments: {
624
+ file_id: string;
625
+ filename: string;
626
+ url: string;
627
+ size: number;
628
+ }[];
629
+ }, {
630
+ id: string;
631
+ agent_name: string;
632
+ text: string;
633
+ attachments: {
634
+ file_id: string;
635
+ filename: string;
636
+ url: string;
637
+ size: number;
638
+ }[];
639
+ }>;
640
+ }, "strip", z.ZodTypeAny, {
641
+ message: {
642
+ id: string;
643
+ agent_name: string;
644
+ text: string;
645
+ attachments: {
646
+ file_id: string;
647
+ filename: string;
648
+ url: string;
649
+ size: number;
650
+ }[];
651
+ };
652
+ type: "message.created";
653
+ channel: string;
654
+ }, {
655
+ message: {
656
+ id: string;
657
+ agent_name: string;
658
+ text: string;
659
+ attachments: {
660
+ file_id: string;
661
+ filename: string;
662
+ url: string;
663
+ size: number;
664
+ }[];
665
+ };
666
+ type: "message.created";
667
+ channel: string;
668
+ }>, z.ZodObject<{
669
+ type: z.ZodLiteral<"message.updated">;
670
+ channel: z.ZodString;
671
+ message: z.ZodObject<{
672
+ id: z.ZodString;
673
+ agent_name: z.ZodString;
674
+ text: z.ZodString;
675
+ }, "strip", z.ZodTypeAny, {
676
+ id: string;
677
+ agent_name: string;
678
+ text: string;
679
+ }, {
680
+ id: string;
681
+ agent_name: string;
682
+ text: string;
683
+ }>;
684
+ }, "strip", z.ZodTypeAny, {
685
+ message: {
686
+ id: string;
687
+ agent_name: string;
688
+ text: string;
689
+ };
690
+ type: "message.updated";
691
+ channel: string;
692
+ }, {
693
+ message: {
694
+ id: string;
695
+ agent_name: string;
696
+ text: string;
697
+ };
698
+ type: "message.updated";
699
+ channel: string;
700
+ }>, z.ZodObject<{
701
+ type: z.ZodLiteral<"thread.reply">;
702
+ parent_id: z.ZodString;
703
+ message: z.ZodObject<{
704
+ id: z.ZodString;
705
+ agent_name: z.ZodString;
706
+ text: z.ZodString;
707
+ }, "strip", z.ZodTypeAny, {
708
+ id: string;
709
+ agent_name: string;
710
+ text: string;
711
+ }, {
712
+ id: string;
713
+ agent_name: string;
714
+ text: string;
715
+ }>;
716
+ }, "strip", z.ZodTypeAny, {
717
+ message: {
718
+ id: string;
719
+ agent_name: string;
720
+ text: string;
721
+ };
722
+ type: "thread.reply";
723
+ parent_id: string;
724
+ }, {
725
+ message: {
726
+ id: string;
727
+ agent_name: string;
728
+ text: string;
729
+ };
730
+ type: "thread.reply";
731
+ parent_id: string;
732
+ }>, z.ZodObject<{
733
+ type: z.ZodLiteral<"reaction.added">;
734
+ message_id: z.ZodString;
735
+ emoji: z.ZodString;
736
+ agent_name: z.ZodString;
737
+ }, "strip", z.ZodTypeAny, {
738
+ type: "reaction.added";
739
+ agent_name: string;
740
+ message_id: string;
741
+ emoji: string;
742
+ }, {
743
+ type: "reaction.added";
744
+ agent_name: string;
745
+ message_id: string;
746
+ emoji: string;
747
+ }>, z.ZodObject<{
748
+ type: z.ZodLiteral<"reaction.removed">;
749
+ message_id: z.ZodString;
750
+ emoji: z.ZodString;
751
+ agent_name: z.ZodString;
752
+ }, "strip", z.ZodTypeAny, {
753
+ type: "reaction.removed";
754
+ agent_name: string;
755
+ message_id: string;
756
+ emoji: string;
757
+ }, {
758
+ type: "reaction.removed";
759
+ agent_name: string;
760
+ message_id: string;
761
+ emoji: string;
762
+ }>, z.ZodObject<{
763
+ type: z.ZodLiteral<"dm.received">;
764
+ conversation_id: z.ZodString;
765
+ message: z.ZodObject<{
766
+ id: z.ZodString;
767
+ agent_name: z.ZodString;
768
+ text: z.ZodString;
769
+ }, "strip", z.ZodTypeAny, {
770
+ id: string;
771
+ agent_name: string;
772
+ text: string;
773
+ }, {
774
+ id: string;
775
+ agent_name: string;
776
+ text: string;
777
+ }>;
778
+ }, "strip", z.ZodTypeAny, {
779
+ message: {
780
+ id: string;
781
+ agent_name: string;
782
+ text: string;
783
+ };
784
+ type: "dm.received";
785
+ conversation_id: string;
786
+ }, {
787
+ message: {
788
+ id: string;
789
+ agent_name: string;
790
+ text: string;
791
+ };
792
+ type: "dm.received";
793
+ conversation_id: string;
794
+ }>, z.ZodObject<{
795
+ type: z.ZodLiteral<"group_dm.received">;
796
+ conversation_id: z.ZodString;
797
+ message: z.ZodObject<{
798
+ id: z.ZodString;
799
+ agent_name: z.ZodString;
800
+ text: z.ZodString;
801
+ }, "strip", z.ZodTypeAny, {
802
+ id: string;
803
+ agent_name: string;
804
+ text: string;
805
+ }, {
806
+ id: string;
807
+ agent_name: string;
808
+ text: string;
809
+ }>;
810
+ }, "strip", z.ZodTypeAny, {
811
+ message: {
812
+ id: string;
813
+ agent_name: string;
814
+ text: string;
815
+ };
816
+ type: "group_dm.received";
817
+ conversation_id: string;
818
+ }, {
819
+ message: {
820
+ id: string;
821
+ agent_name: string;
822
+ text: string;
823
+ };
824
+ type: "group_dm.received";
825
+ conversation_id: string;
826
+ }>, z.ZodObject<{
827
+ type: z.ZodLiteral<"agent.online">;
828
+ agent: z.ZodObject<{
829
+ name: z.ZodString;
830
+ }, "strip", z.ZodTypeAny, {
831
+ name: string;
832
+ }, {
833
+ name: string;
834
+ }>;
835
+ }, "strip", z.ZodTypeAny, {
836
+ agent: {
837
+ name: string;
838
+ };
839
+ type: "agent.online";
840
+ }, {
841
+ agent: {
842
+ name: string;
843
+ };
844
+ type: "agent.online";
845
+ }>, z.ZodObject<{
846
+ type: z.ZodLiteral<"agent.offline">;
847
+ agent: z.ZodObject<{
848
+ name: z.ZodString;
849
+ }, "strip", z.ZodTypeAny, {
850
+ name: string;
851
+ }, {
852
+ name: string;
853
+ }>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ agent: {
856
+ name: string;
857
+ };
858
+ type: "agent.offline";
859
+ }, {
860
+ agent: {
861
+ name: string;
862
+ };
863
+ type: "agent.offline";
864
+ }>, z.ZodObject<{
865
+ type: z.ZodLiteral<"channel.created">;
866
+ channel: z.ZodObject<{
867
+ name: z.ZodString;
868
+ topic: z.ZodNullable<z.ZodString>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ name: string;
871
+ topic: string | null;
872
+ }, {
873
+ name: string;
874
+ topic: string | null;
875
+ }>;
876
+ }, "strip", z.ZodTypeAny, {
877
+ type: "channel.created";
878
+ channel: {
879
+ name: string;
880
+ topic: string | null;
881
+ };
882
+ }, {
883
+ type: "channel.created";
884
+ channel: {
885
+ name: string;
886
+ topic: string | null;
887
+ };
888
+ }>, z.ZodObject<{
889
+ type: z.ZodLiteral<"channel.updated">;
890
+ channel: z.ZodObject<{
891
+ name: z.ZodString;
892
+ topic: z.ZodNullable<z.ZodString>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ name: string;
895
+ topic: string | null;
896
+ }, {
897
+ name: string;
898
+ topic: string | null;
899
+ }>;
900
+ }, "strip", z.ZodTypeAny, {
901
+ type: "channel.updated";
902
+ channel: {
903
+ name: string;
904
+ topic: string | null;
905
+ };
906
+ }, {
907
+ type: "channel.updated";
908
+ channel: {
909
+ name: string;
910
+ topic: string | null;
911
+ };
912
+ }>, z.ZodObject<{
913
+ type: z.ZodLiteral<"channel.archived">;
914
+ channel: z.ZodObject<{
915
+ name: z.ZodString;
916
+ }, "strip", z.ZodTypeAny, {
917
+ name: string;
918
+ }, {
919
+ name: string;
920
+ }>;
921
+ }, "strip", z.ZodTypeAny, {
922
+ type: "channel.archived";
923
+ channel: {
924
+ name: string;
925
+ };
926
+ }, {
927
+ type: "channel.archived";
928
+ channel: {
929
+ name: string;
930
+ };
931
+ }>, z.ZodObject<{
932
+ type: z.ZodLiteral<"member.joined">;
933
+ channel: z.ZodString;
934
+ agent_name: z.ZodString;
935
+ }, "strip", z.ZodTypeAny, {
936
+ type: "member.joined";
937
+ agent_name: string;
938
+ channel: string;
939
+ }, {
940
+ type: "member.joined";
941
+ agent_name: string;
942
+ channel: string;
943
+ }>, z.ZodObject<{
944
+ type: z.ZodLiteral<"member.left">;
945
+ channel: z.ZodString;
946
+ agent_name: z.ZodString;
947
+ }, "strip", z.ZodTypeAny, {
948
+ type: "member.left";
949
+ agent_name: string;
950
+ channel: string;
951
+ }, {
952
+ type: "member.left";
953
+ agent_name: string;
954
+ channel: string;
955
+ }>, z.ZodObject<{
956
+ type: z.ZodLiteral<"message.read">;
957
+ message_id: z.ZodString;
958
+ agent_name: z.ZodString;
959
+ read_at: z.ZodString;
960
+ }, "strip", z.ZodTypeAny, {
961
+ type: "message.read";
962
+ agent_name: string;
963
+ message_id: string;
964
+ read_at: string;
965
+ }, {
966
+ type: "message.read";
967
+ agent_name: string;
968
+ message_id: string;
969
+ read_at: string;
970
+ }>, z.ZodObject<{
971
+ type: z.ZodLiteral<"file.uploaded">;
972
+ file: z.ZodObject<{
973
+ file_id: z.ZodString;
974
+ filename: z.ZodString;
975
+ uploaded_by: z.ZodString;
976
+ }, "strip", z.ZodTypeAny, {
977
+ file_id: string;
978
+ filename: string;
979
+ uploaded_by: string;
980
+ }, {
981
+ file_id: string;
982
+ filename: string;
983
+ uploaded_by: string;
984
+ }>;
985
+ }, "strip", z.ZodTypeAny, {
986
+ type: "file.uploaded";
987
+ file: {
988
+ file_id: string;
989
+ filename: string;
990
+ uploaded_by: string;
991
+ };
992
+ }, {
993
+ type: "file.uploaded";
994
+ file: {
995
+ file_id: string;
996
+ filename: string;
997
+ uploaded_by: string;
998
+ };
999
+ }>, z.ZodObject<{
1000
+ type: z.ZodLiteral<"webhook.received">;
1001
+ webhook_id: z.ZodString;
1002
+ channel: z.ZodString;
1003
+ message: z.ZodObject<{
1004
+ id: z.ZodString;
1005
+ text: z.ZodString;
1006
+ source: z.ZodNullable<z.ZodString>;
1007
+ }, "strip", z.ZodTypeAny, {
1008
+ id: string;
1009
+ text: string;
1010
+ source: string | null;
1011
+ }, {
1012
+ id: string;
1013
+ text: string;
1014
+ source: string | null;
1015
+ }>;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ message: {
1018
+ id: string;
1019
+ text: string;
1020
+ source: string | null;
1021
+ };
1022
+ type: "webhook.received";
1023
+ channel: string;
1024
+ webhook_id: string;
1025
+ }, {
1026
+ message: {
1027
+ id: string;
1028
+ text: string;
1029
+ source: string | null;
1030
+ };
1031
+ type: "webhook.received";
1032
+ channel: string;
1033
+ webhook_id: string;
1034
+ }>, z.ZodObject<{
1035
+ type: z.ZodLiteral<"command.invoked">;
1036
+ command: z.ZodString;
1037
+ channel: z.ZodString;
1038
+ invoked_by: z.ZodString;
1039
+ args: z.ZodNullable<z.ZodString>;
1040
+ parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1041
+ }, "strip", z.ZodTypeAny, {
1042
+ type: "command.invoked";
1043
+ channel: string;
1044
+ command: string;
1045
+ parameters: Record<string, unknown> | null;
1046
+ args: string | null;
1047
+ invoked_by: string;
1048
+ }, {
1049
+ type: "command.invoked";
1050
+ channel: string;
1051
+ command: string;
1052
+ parameters: Record<string, unknown> | null;
1053
+ args: string | null;
1054
+ invoked_by: string;
1055
+ }>, z.ZodObject<{
1056
+ type: z.ZodLiteral<"pong">;
1057
+ }, "strip", z.ZodTypeAny, {
1058
+ type: "pong";
1059
+ }, {
1060
+ type: "pong";
1061
+ }>]>;
1062
+ export type ServerEvent = z.infer<typeof ServerEventSchema>;
1063
+ export type ServerEventType = ServerEvent['type'];
1064
+ export type ClientEventType = ClientEvent['type'];
1065
+ export declare const WsClientEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1066
+ type: z.ZodLiteral<"message.created">;
1067
+ channel: z.ZodString;
1068
+ message: z.ZodObject<{
1069
+ id: z.ZodString;
1070
+ agent_name: z.ZodString;
1071
+ text: z.ZodString;
1072
+ attachments: z.ZodArray<z.ZodObject<{
1073
+ file_id: z.ZodString;
1074
+ filename: z.ZodString;
1075
+ url: z.ZodString;
1076
+ size: z.ZodNumber;
1077
+ }, "strip", z.ZodTypeAny, {
1078
+ file_id: string;
1079
+ filename: string;
1080
+ url: string;
1081
+ size: number;
1082
+ }, {
1083
+ file_id: string;
1084
+ filename: string;
1085
+ url: string;
1086
+ size: number;
1087
+ }>, "many">;
1088
+ }, "strip", z.ZodTypeAny, {
1089
+ id: string;
1090
+ agent_name: string;
1091
+ text: string;
1092
+ attachments: {
1093
+ file_id: string;
1094
+ filename: string;
1095
+ url: string;
1096
+ size: number;
1097
+ }[];
1098
+ }, {
1099
+ id: string;
1100
+ agent_name: string;
1101
+ text: string;
1102
+ attachments: {
1103
+ file_id: string;
1104
+ filename: string;
1105
+ url: string;
1106
+ size: number;
1107
+ }[];
1108
+ }>;
1109
+ }, "strip", z.ZodTypeAny, {
1110
+ message: {
1111
+ id: string;
1112
+ agent_name: string;
1113
+ text: string;
1114
+ attachments: {
1115
+ file_id: string;
1116
+ filename: string;
1117
+ url: string;
1118
+ size: number;
1119
+ }[];
1120
+ };
1121
+ type: "message.created";
15
1122
  channel: string;
1123
+ }, {
16
1124
  message: {
17
1125
  id: string;
18
1126
  agent_name: string;
19
1127
  text: string;
20
- attachments: Array<{
1128
+ attachments: {
21
1129
  file_id: string;
22
1130
  filename: string;
23
1131
  url: string;
24
1132
  size: number;
25
- }>;
1133
+ }[];
1134
+ };
1135
+ type: "message.created";
1136
+ channel: string;
1137
+ }>, z.ZodObject<{
1138
+ type: z.ZodLiteral<"message.updated">;
1139
+ channel: z.ZodString;
1140
+ message: z.ZodObject<{
1141
+ id: z.ZodString;
1142
+ agent_name: z.ZodString;
1143
+ text: z.ZodString;
1144
+ }, "strip", z.ZodTypeAny, {
1145
+ id: string;
1146
+ agent_name: string;
1147
+ text: string;
1148
+ }, {
1149
+ id: string;
1150
+ agent_name: string;
1151
+ text: string;
1152
+ }>;
1153
+ }, "strip", z.ZodTypeAny, {
1154
+ message: {
1155
+ id: string;
1156
+ agent_name: string;
1157
+ text: string;
1158
+ };
1159
+ type: "message.updated";
1160
+ channel: string;
1161
+ }, {
1162
+ message: {
1163
+ id: string;
1164
+ agent_name: string;
1165
+ text: string;
26
1166
  };
27
- }
28
- export interface MessageUpdatedEvent {
29
- type: 'message.updated';
1167
+ type: "message.updated";
30
1168
  channel: string;
1169
+ }>, z.ZodObject<{
1170
+ type: z.ZodLiteral<"thread.reply">;
1171
+ parent_id: z.ZodString;
1172
+ message: z.ZodObject<{
1173
+ id: z.ZodString;
1174
+ agent_name: z.ZodString;
1175
+ text: z.ZodString;
1176
+ }, "strip", z.ZodTypeAny, {
1177
+ id: string;
1178
+ agent_name: string;
1179
+ text: string;
1180
+ }, {
1181
+ id: string;
1182
+ agent_name: string;
1183
+ text: string;
1184
+ }>;
1185
+ }, "strip", z.ZodTypeAny, {
31
1186
  message: {
32
1187
  id: string;
33
1188
  agent_name: string;
34
1189
  text: string;
35
1190
  };
36
- }
37
- export interface ThreadReplyEvent {
38
- type: 'thread.reply';
1191
+ type: "thread.reply";
39
1192
  parent_id: string;
1193
+ }, {
40
1194
  message: {
41
1195
  id: string;
42
1196
  agent_name: string;
43
1197
  text: string;
44
1198
  };
45
- }
46
- export interface ReactionAddedEvent {
47
- type: 'reaction.added';
1199
+ type: "thread.reply";
1200
+ parent_id: string;
1201
+ }>, z.ZodObject<{
1202
+ type: z.ZodLiteral<"reaction.added">;
1203
+ message_id: z.ZodString;
1204
+ emoji: z.ZodString;
1205
+ agent_name: z.ZodString;
1206
+ }, "strip", z.ZodTypeAny, {
1207
+ type: "reaction.added";
1208
+ agent_name: string;
48
1209
  message_id: string;
49
1210
  emoji: string;
1211
+ }, {
1212
+ type: "reaction.added";
50
1213
  agent_name: string;
51
- }
52
- export interface ReactionRemovedEvent {
53
- type: 'reaction.removed';
54
1214
  message_id: string;
55
1215
  emoji: string;
1216
+ }>, z.ZodObject<{
1217
+ type: z.ZodLiteral<"reaction.removed">;
1218
+ message_id: z.ZodString;
1219
+ emoji: z.ZodString;
1220
+ agent_name: z.ZodString;
1221
+ }, "strip", z.ZodTypeAny, {
1222
+ type: "reaction.removed";
56
1223
  agent_name: string;
57
- }
58
- export interface DmReceivedEvent {
59
- type: 'dm.received';
1224
+ message_id: string;
1225
+ emoji: string;
1226
+ }, {
1227
+ type: "reaction.removed";
1228
+ agent_name: string;
1229
+ message_id: string;
1230
+ emoji: string;
1231
+ }>, z.ZodObject<{
1232
+ type: z.ZodLiteral<"dm.received">;
1233
+ conversation_id: z.ZodString;
1234
+ message: z.ZodObject<{
1235
+ id: z.ZodString;
1236
+ agent_name: z.ZodString;
1237
+ text: z.ZodString;
1238
+ }, "strip", z.ZodTypeAny, {
1239
+ id: string;
1240
+ agent_name: string;
1241
+ text: string;
1242
+ }, {
1243
+ id: string;
1244
+ agent_name: string;
1245
+ text: string;
1246
+ }>;
1247
+ }, "strip", z.ZodTypeAny, {
1248
+ message: {
1249
+ id: string;
1250
+ agent_name: string;
1251
+ text: string;
1252
+ };
1253
+ type: "dm.received";
60
1254
  conversation_id: string;
1255
+ }, {
1256
+ message: {
1257
+ id: string;
1258
+ agent_name: string;
1259
+ text: string;
1260
+ };
1261
+ type: "dm.received";
1262
+ conversation_id: string;
1263
+ }>, z.ZodObject<{
1264
+ type: z.ZodLiteral<"group_dm.received">;
1265
+ conversation_id: z.ZodString;
1266
+ message: z.ZodObject<{
1267
+ id: z.ZodString;
1268
+ agent_name: z.ZodString;
1269
+ text: z.ZodString;
1270
+ }, "strip", z.ZodTypeAny, {
1271
+ id: string;
1272
+ agent_name: string;
1273
+ text: string;
1274
+ }, {
1275
+ id: string;
1276
+ agent_name: string;
1277
+ text: string;
1278
+ }>;
1279
+ }, "strip", z.ZodTypeAny, {
61
1280
  message: {
62
1281
  id: string;
63
1282
  agent_name: string;
64
1283
  text: string;
65
1284
  };
66
- }
67
- export interface GroupDmReceivedEvent {
68
- type: 'group_dm.received';
1285
+ type: "group_dm.received";
69
1286
  conversation_id: string;
1287
+ }, {
70
1288
  message: {
71
1289
  id: string;
72
1290
  agent_name: string;
73
1291
  text: string;
74
1292
  };
75
- }
76
- export interface AgentOnlineEvent {
77
- type: 'agent.online';
1293
+ type: "group_dm.received";
1294
+ conversation_id: string;
1295
+ }>, z.ZodObject<{
1296
+ type: z.ZodLiteral<"agent.online">;
1297
+ agent: z.ZodObject<{
1298
+ name: z.ZodString;
1299
+ }, "strip", z.ZodTypeAny, {
1300
+ name: string;
1301
+ }, {
1302
+ name: string;
1303
+ }>;
1304
+ }, "strip", z.ZodTypeAny, {
1305
+ agent: {
1306
+ name: string;
1307
+ };
1308
+ type: "agent.online";
1309
+ }, {
1310
+ agent: {
1311
+ name: string;
1312
+ };
1313
+ type: "agent.online";
1314
+ }>, z.ZodObject<{
1315
+ type: z.ZodLiteral<"agent.offline">;
1316
+ agent: z.ZodObject<{
1317
+ name: z.ZodString;
1318
+ }, "strip", z.ZodTypeAny, {
1319
+ name: string;
1320
+ }, {
1321
+ name: string;
1322
+ }>;
1323
+ }, "strip", z.ZodTypeAny, {
78
1324
  agent: {
79
1325
  name: string;
80
1326
  };
81
- }
82
- export interface AgentOfflineEvent {
83
- type: 'agent.offline';
1327
+ type: "agent.offline";
1328
+ }, {
84
1329
  agent: {
85
1330
  name: string;
86
1331
  };
87
- }
88
- export interface ChannelCreatedEvent {
89
- type: 'channel.created';
1332
+ type: "agent.offline";
1333
+ }>, z.ZodObject<{
1334
+ type: z.ZodLiteral<"channel.created">;
1335
+ channel: z.ZodObject<{
1336
+ name: z.ZodString;
1337
+ topic: z.ZodNullable<z.ZodString>;
1338
+ }, "strip", z.ZodTypeAny, {
1339
+ name: string;
1340
+ topic: string | null;
1341
+ }, {
1342
+ name: string;
1343
+ topic: string | null;
1344
+ }>;
1345
+ }, "strip", z.ZodTypeAny, {
1346
+ type: "channel.created";
1347
+ channel: {
1348
+ name: string;
1349
+ topic: string | null;
1350
+ };
1351
+ }, {
1352
+ type: "channel.created";
1353
+ channel: {
1354
+ name: string;
1355
+ topic: string | null;
1356
+ };
1357
+ }>, z.ZodObject<{
1358
+ type: z.ZodLiteral<"channel.updated">;
1359
+ channel: z.ZodObject<{
1360
+ name: z.ZodString;
1361
+ topic: z.ZodNullable<z.ZodString>;
1362
+ }, "strip", z.ZodTypeAny, {
1363
+ name: string;
1364
+ topic: string | null;
1365
+ }, {
1366
+ name: string;
1367
+ topic: string | null;
1368
+ }>;
1369
+ }, "strip", z.ZodTypeAny, {
1370
+ type: "channel.updated";
90
1371
  channel: {
91
1372
  name: string;
92
1373
  topic: string | null;
93
1374
  };
94
- }
95
- export interface ChannelUpdatedEvent {
96
- type: 'channel.updated';
1375
+ }, {
1376
+ type: "channel.updated";
97
1377
  channel: {
98
1378
  name: string;
99
1379
  topic: string | null;
100
1380
  };
101
- }
102
- export interface ChannelArchivedEvent {
103
- type: 'channel.archived';
1381
+ }>, z.ZodObject<{
1382
+ type: z.ZodLiteral<"channel.archived">;
1383
+ channel: z.ZodObject<{
1384
+ name: z.ZodString;
1385
+ }, "strip", z.ZodTypeAny, {
1386
+ name: string;
1387
+ }, {
1388
+ name: string;
1389
+ }>;
1390
+ }, "strip", z.ZodTypeAny, {
1391
+ type: "channel.archived";
1392
+ channel: {
1393
+ name: string;
1394
+ };
1395
+ }, {
1396
+ type: "channel.archived";
104
1397
  channel: {
105
1398
  name: string;
106
1399
  };
107
- }
108
- export interface MemberJoinedEvent {
109
- type: 'member.joined';
1400
+ }>, z.ZodObject<{
1401
+ type: z.ZodLiteral<"member.joined">;
1402
+ channel: z.ZodString;
1403
+ agent_name: z.ZodString;
1404
+ }, "strip", z.ZodTypeAny, {
1405
+ type: "member.joined";
1406
+ agent_name: string;
1407
+ channel: string;
1408
+ }, {
1409
+ type: "member.joined";
1410
+ agent_name: string;
1411
+ channel: string;
1412
+ }>, z.ZodObject<{
1413
+ type: z.ZodLiteral<"member.left">;
1414
+ channel: z.ZodString;
1415
+ agent_name: z.ZodString;
1416
+ }, "strip", z.ZodTypeAny, {
1417
+ type: "member.left";
1418
+ agent_name: string;
110
1419
  channel: string;
1420
+ }, {
1421
+ type: "member.left";
111
1422
  agent_name: string;
112
- }
113
- export interface MemberLeftEvent {
114
- type: 'member.left';
115
1423
  channel: string;
1424
+ }>, z.ZodObject<{
1425
+ type: z.ZodLiteral<"message.read">;
1426
+ message_id: z.ZodString;
1427
+ agent_name: z.ZodString;
1428
+ read_at: z.ZodString;
1429
+ }, "strip", z.ZodTypeAny, {
1430
+ type: "message.read";
116
1431
  agent_name: string;
117
- }
118
- export interface MessageReadEvent {
119
- type: 'message.read';
120
1432
  message_id: string;
1433
+ read_at: string;
1434
+ }, {
1435
+ type: "message.read";
121
1436
  agent_name: string;
1437
+ message_id: string;
122
1438
  read_at: string;
123
- }
124
- export interface FileUploadedEvent {
125
- type: 'file.uploaded';
1439
+ }>, z.ZodObject<{
1440
+ type: z.ZodLiteral<"file.uploaded">;
1441
+ file: z.ZodObject<{
1442
+ file_id: z.ZodString;
1443
+ filename: z.ZodString;
1444
+ uploaded_by: z.ZodString;
1445
+ }, "strip", z.ZodTypeAny, {
1446
+ file_id: string;
1447
+ filename: string;
1448
+ uploaded_by: string;
1449
+ }, {
1450
+ file_id: string;
1451
+ filename: string;
1452
+ uploaded_by: string;
1453
+ }>;
1454
+ }, "strip", z.ZodTypeAny, {
1455
+ type: "file.uploaded";
126
1456
  file: {
127
1457
  file_id: string;
128
1458
  filename: string;
129
1459
  uploaded_by: string;
130
1460
  };
131
- }
132
- export interface PongEvent {
133
- type: 'pong';
134
- }
135
- export interface WebhookReceivedEvent {
136
- type: 'webhook.received';
137
- webhook_id: string;
1461
+ }, {
1462
+ type: "file.uploaded";
1463
+ file: {
1464
+ file_id: string;
1465
+ filename: string;
1466
+ uploaded_by: string;
1467
+ };
1468
+ }>, z.ZodObject<{
1469
+ type: z.ZodLiteral<"webhook.received">;
1470
+ webhook_id: z.ZodString;
1471
+ channel: z.ZodString;
1472
+ message: z.ZodObject<{
1473
+ id: z.ZodString;
1474
+ text: z.ZodString;
1475
+ source: z.ZodNullable<z.ZodString>;
1476
+ }, "strip", z.ZodTypeAny, {
1477
+ id: string;
1478
+ text: string;
1479
+ source: string | null;
1480
+ }, {
1481
+ id: string;
1482
+ text: string;
1483
+ source: string | null;
1484
+ }>;
1485
+ }, "strip", z.ZodTypeAny, {
1486
+ message: {
1487
+ id: string;
1488
+ text: string;
1489
+ source: string | null;
1490
+ };
1491
+ type: "webhook.received";
138
1492
  channel: string;
1493
+ webhook_id: string;
1494
+ }, {
139
1495
  message: {
140
1496
  id: string;
141
1497
  text: string;
142
1498
  source: string | null;
143
1499
  };
144
- }
145
- export interface CommandInvokedEvent {
146
- type: 'command.invoked';
147
- command: string;
1500
+ type: "webhook.received";
148
1501
  channel: string;
149
- invoked_by: string;
1502
+ webhook_id: string;
1503
+ }>, z.ZodObject<{
1504
+ type: z.ZodLiteral<"command.invoked">;
1505
+ command: z.ZodString;
1506
+ channel: z.ZodString;
1507
+ invoked_by: z.ZodString;
1508
+ args: z.ZodNullable<z.ZodString>;
1509
+ parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ type: "command.invoked";
1512
+ channel: string;
1513
+ command: string;
1514
+ parameters: Record<string, unknown> | null;
150
1515
  args: string | null;
1516
+ invoked_by: string;
1517
+ }, {
1518
+ type: "command.invoked";
1519
+ channel: string;
1520
+ command: string;
151
1521
  parameters: Record<string, unknown> | null;
152
- }
153
- export type ServerEvent = MessageCreatedEvent | MessageUpdatedEvent | ThreadReplyEvent | ReactionAddedEvent | ReactionRemovedEvent | DmReceivedEvent | GroupDmReceivedEvent | AgentOnlineEvent | AgentOfflineEvent | ChannelCreatedEvent | ChannelUpdatedEvent | ChannelArchivedEvent | MemberJoinedEvent | MemberLeftEvent | MessageReadEvent | FileUploadedEvent | WebhookReceivedEvent | CommandInvokedEvent | PongEvent;
154
- export type ServerEventType = ServerEvent['type'];
155
- export type ClientEventType = ClientEvent['type'];
1522
+ args: string | null;
1523
+ invoked_by: string;
1524
+ }>, z.ZodObject<{
1525
+ type: z.ZodLiteral<"pong">;
1526
+ }, "strip", z.ZodTypeAny, {
1527
+ type: "pong";
1528
+ }, {
1529
+ type: "pong";
1530
+ }>, z.ZodObject<{
1531
+ type: z.ZodLiteral<"open">;
1532
+ }, "strip", z.ZodTypeAny, {
1533
+ type: "open";
1534
+ }, {
1535
+ type: "open";
1536
+ }>, z.ZodObject<{
1537
+ type: z.ZodLiteral<"error">;
1538
+ }, "strip", z.ZodTypeAny, {
1539
+ type: "error";
1540
+ }, {
1541
+ type: "error";
1542
+ }>, z.ZodObject<{
1543
+ type: z.ZodLiteral<"reconnecting">;
1544
+ attempt: z.ZodNumber;
1545
+ }, "strip", z.ZodTypeAny, {
1546
+ type: "reconnecting";
1547
+ attempt: number;
1548
+ }, {
1549
+ type: "reconnecting";
1550
+ attempt: number;
1551
+ }>, z.ZodObject<{
1552
+ type: z.ZodLiteral<"close">;
1553
+ }, "strip", z.ZodTypeAny, {
1554
+ type: "close";
1555
+ }, {
1556
+ type: "close";
1557
+ }>]>;
1558
+ export type WsClientEvent = z.infer<typeof WsClientEventSchema>;
1559
+ export type WsClientEventType = WsClientEvent['type'];
156
1560
  //# sourceMappingURL=events.d.ts.map