@cossistant/core 0.0.28 → 0.0.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.
Files changed (54) hide show
  1. package/_virtual/rolldown_runtime.js +27 -12
  2. package/ai-sdk-utils.d.ts +141 -0
  3. package/ai-sdk-utils.d.ts.map +1 -0
  4. package/ai-sdk-utils.js +255 -0
  5. package/ai-sdk-utils.js.map +1 -0
  6. package/client.d.ts +17 -7
  7. package/client.d.ts.map +1 -1
  8. package/client.js +34 -3
  9. package/client.js.map +1 -1
  10. package/index.d.ts +3 -1
  11. package/index.js +3 -1
  12. package/package.json +1 -1
  13. package/privacy-filter.d.ts +112 -0
  14. package/privacy-filter.d.ts.map +1 -0
  15. package/privacy-filter.js +170 -0
  16. package/privacy-filter.js.map +1 -0
  17. package/rest-client.d.ts +4 -4
  18. package/rest-client.d.ts.map +1 -1
  19. package/rest-client.js +4 -4
  20. package/rest-client.js.map +1 -1
  21. package/store/conversations-store.d.ts +1 -1
  22. package/store/seen-store.d.ts +2 -2
  23. package/store/timeline-items-store.d.ts +5 -5
  24. package/store/timeline-items-store.d.ts.map +1 -1
  25. package/store/timeline-items-store.js +1 -1
  26. package/store/timeline-items-store.js.map +1 -1
  27. package/store/typing-store.d.ts +1 -1
  28. package/store/typing-store.d.ts.map +1 -1
  29. package/store/typing-store.js +12 -19
  30. package/store/typing-store.js.map +1 -1
  31. package/types/src/api/contact.d.ts.map +1 -0
  32. package/{conversation.d.ts → types/src/api/conversation.d.ts} +458 -78
  33. package/types/src/api/conversation.d.ts.map +1 -0
  34. package/types/src/api/timeline-item.d.ts +602 -0
  35. package/types/src/api/timeline-item.d.ts.map +1 -0
  36. package/types/src/api/timeline-item.js +67 -19
  37. package/types/src/api/timeline-item.js.map +1 -1
  38. package/types/src/api/upload.d.ts.map +1 -0
  39. package/types/src/enums.js +4 -1
  40. package/types/src/enums.js.map +1 -1
  41. package/types/src/realtime-events.d.ts +1000 -0
  42. package/types/src/realtime-events.d.ts.map +1 -0
  43. package/{schemas.d.ts → types/src/schemas.d.ts} +92 -16
  44. package/types/src/schemas.d.ts.map +1 -0
  45. package/contact.d.ts.map +0 -1
  46. package/conversation.d.ts.map +0 -1
  47. package/realtime-events.d.ts +0 -478
  48. package/realtime-events.d.ts.map +0 -1
  49. package/schemas.d.ts.map +0 -1
  50. package/timeline-item.d.ts +0 -298
  51. package/timeline-item.d.ts.map +0 -1
  52. package/upload.d.ts.map +0 -1
  53. /package/{contact.d.ts → types/src/api/contact.d.ts} +0 -0
  54. /package/{upload.d.ts → types/src/api/upload.d.ts} +0 -0
@@ -0,0 +1,1000 @@
1
+ import { z } from "zod";
2
+
3
+ //#region ../types/src/realtime-events.d.ts
4
+
5
+ /**
6
+ * Central event system for real-time communication
7
+ * All WebSocket and Redis Pub/Sub events are defined here
8
+ */
9
+ declare const realtimeSchema: {
10
+ readonly userConnected: z.ZodObject<{
11
+ websiteId: z.ZodString;
12
+ organizationId: z.ZodString;
13
+ visitorId: z.ZodNullable<z.ZodString>;
14
+ userId: z.ZodNullable<z.ZodString>;
15
+ connectionId: z.ZodString;
16
+ }, z.core.$strip>;
17
+ readonly userDisconnected: z.ZodObject<{
18
+ websiteId: z.ZodString;
19
+ organizationId: z.ZodString;
20
+ visitorId: z.ZodNullable<z.ZodString>;
21
+ userId: z.ZodNullable<z.ZodString>;
22
+ connectionId: z.ZodString;
23
+ }, z.core.$strip>;
24
+ readonly visitorConnected: z.ZodObject<{
25
+ websiteId: z.ZodString;
26
+ organizationId: z.ZodString;
27
+ userId: z.ZodNullable<z.ZodString>;
28
+ visitorId: z.ZodString;
29
+ connectionId: z.ZodString;
30
+ }, z.core.$strip>;
31
+ readonly visitorDisconnected: z.ZodObject<{
32
+ websiteId: z.ZodString;
33
+ organizationId: z.ZodString;
34
+ userId: z.ZodNullable<z.ZodString>;
35
+ visitorId: z.ZodString;
36
+ connectionId: z.ZodString;
37
+ }, z.core.$strip>;
38
+ readonly userPresenceUpdate: z.ZodObject<{
39
+ websiteId: z.ZodString;
40
+ organizationId: z.ZodString;
41
+ visitorId: z.ZodNullable<z.ZodString>;
42
+ userId: z.ZodString;
43
+ status: z.ZodEnum<{
44
+ online: "online";
45
+ away: "away";
46
+ offline: "offline";
47
+ }>;
48
+ lastSeen: z.ZodString;
49
+ }, z.core.$strip>;
50
+ readonly conversationSeen: z.ZodObject<{
51
+ websiteId: z.ZodString;
52
+ organizationId: z.ZodString;
53
+ visitorId: z.ZodNullable<z.ZodString>;
54
+ userId: z.ZodNullable<z.ZodString>;
55
+ conversationId: z.ZodString;
56
+ aiAgentId: z.ZodNullable<z.ZodString>;
57
+ lastSeenAt: z.ZodString;
58
+ actorType: z.ZodEnum<{
59
+ user: "user";
60
+ visitor: "visitor";
61
+ ai_agent: "ai_agent";
62
+ }>;
63
+ actorId: z.ZodString;
64
+ }, z.core.$strip>;
65
+ readonly conversationTyping: z.ZodObject<{
66
+ websiteId: z.ZodString;
67
+ organizationId: z.ZodString;
68
+ visitorId: z.ZodNullable<z.ZodString>;
69
+ userId: z.ZodNullable<z.ZodString>;
70
+ conversationId: z.ZodString;
71
+ aiAgentId: z.ZodNullable<z.ZodString>;
72
+ isTyping: z.ZodBoolean;
73
+ visitorPreview: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
+ }, z.core.$strip>;
75
+ readonly timelineItemCreated: z.ZodObject<{
76
+ websiteId: z.ZodString;
77
+ organizationId: z.ZodString;
78
+ visitorId: z.ZodNullable<z.ZodString>;
79
+ userId: z.ZodNullable<z.ZodString>;
80
+ conversationId: z.ZodString;
81
+ item: z.ZodObject<{
82
+ id: z.ZodString;
83
+ conversationId: z.ZodString;
84
+ organizationId: z.ZodString;
85
+ visibility: z.ZodEnum<{
86
+ public: "public";
87
+ private: "private";
88
+ }>;
89
+ type: z.ZodEnum<{
90
+ message: "message";
91
+ event: "event";
92
+ identification: "identification";
93
+ }>;
94
+ text: z.ZodNullable<z.ZodString>;
95
+ parts: z.ZodArray<z.ZodUnknown>;
96
+ userId: z.ZodNullable<z.ZodString>;
97
+ visitorId: z.ZodNullable<z.ZodString>;
98
+ aiAgentId: z.ZodNullable<z.ZodString>;
99
+ createdAt: z.ZodString;
100
+ deletedAt: z.ZodNullable<z.ZodString>;
101
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ }, z.core.$strip>;
103
+ }, z.core.$strip>;
104
+ readonly conversationCreated: z.ZodObject<{
105
+ websiteId: z.ZodString;
106
+ organizationId: z.ZodString;
107
+ visitorId: z.ZodNullable<z.ZodString>;
108
+ userId: z.ZodNullable<z.ZodString>;
109
+ conversationId: z.ZodString;
110
+ conversation: z.ZodObject<{
111
+ id: z.ZodString;
112
+ title: z.ZodOptional<z.ZodString>;
113
+ createdAt: z.ZodString;
114
+ updatedAt: z.ZodString;
115
+ visitorId: z.ZodString;
116
+ websiteId: z.ZodString;
117
+ status: z.ZodDefault<z.ZodEnum<{
118
+ open: "open";
119
+ resolved: "resolved";
120
+ spam: "spam";
121
+ }>>;
122
+ deletedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
123
+ visitorLastSeenAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ lastTimelineItem: z.ZodOptional<z.ZodObject<{
125
+ id: z.ZodOptional<z.ZodString>;
126
+ conversationId: z.ZodString;
127
+ organizationId: z.ZodString;
128
+ visibility: z.ZodEnum<{
129
+ public: "public";
130
+ private: "private";
131
+ }>;
132
+ type: z.ZodEnum<{
133
+ message: "message";
134
+ event: "event";
135
+ identification: "identification";
136
+ }>;
137
+ text: z.ZodNullable<z.ZodString>;
138
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
140
+ type: z.ZodLiteral<"text">;
141
+ text: z.ZodString;
142
+ state: z.ZodOptional<z.ZodEnum<{
143
+ streaming: "streaming";
144
+ done: "done";
145
+ }>>;
146
+ }, z.core.$strip>, z.ZodObject<{
147
+ type: z.ZodLiteral<"reasoning">;
148
+ text: z.ZodString;
149
+ state: z.ZodOptional<z.ZodEnum<{
150
+ streaming: "streaming";
151
+ done: "done";
152
+ }>>;
153
+ providerMetadata: z.ZodOptional<z.ZodObject<{
154
+ cossistant: z.ZodOptional<z.ZodObject<{
155
+ visibility: z.ZodOptional<z.ZodEnum<{
156
+ public: "public";
157
+ private: "private";
158
+ }>>;
159
+ progressMessage: z.ZodOptional<z.ZodString>;
160
+ knowledgeId: z.ZodOptional<z.ZodString>;
161
+ }, z.core.$strip>>;
162
+ }, z.core.$loose>>;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ type: z.ZodString;
165
+ toolCallId: z.ZodString;
166
+ toolName: z.ZodString;
167
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
168
+ output: z.ZodOptional<z.ZodUnknown>;
169
+ state: z.ZodEnum<{
170
+ error: "error";
171
+ partial: "partial";
172
+ result: "result";
173
+ }>;
174
+ errorText: z.ZodOptional<z.ZodString>;
175
+ providerMetadata: z.ZodOptional<z.ZodObject<{
176
+ cossistant: z.ZodOptional<z.ZodObject<{
177
+ visibility: z.ZodOptional<z.ZodEnum<{
178
+ public: "public";
179
+ private: "private";
180
+ }>>;
181
+ progressMessage: z.ZodOptional<z.ZodString>;
182
+ knowledgeId: z.ZodOptional<z.ZodString>;
183
+ }, z.core.$strip>>;
184
+ }, z.core.$loose>>;
185
+ }, z.core.$strip>, z.ZodObject<{
186
+ type: z.ZodLiteral<"source-url">;
187
+ sourceId: z.ZodString;
188
+ url: z.ZodString;
189
+ title: z.ZodOptional<z.ZodString>;
190
+ providerMetadata: z.ZodOptional<z.ZodObject<{
191
+ cossistant: z.ZodOptional<z.ZodObject<{
192
+ visibility: z.ZodOptional<z.ZodEnum<{
193
+ public: "public";
194
+ private: "private";
195
+ }>>;
196
+ progressMessage: z.ZodOptional<z.ZodString>;
197
+ knowledgeId: z.ZodOptional<z.ZodString>;
198
+ }, z.core.$strip>>;
199
+ }, z.core.$loose>>;
200
+ }, z.core.$strip>, z.ZodObject<{
201
+ type: z.ZodLiteral<"source-document">;
202
+ sourceId: z.ZodString;
203
+ mediaType: z.ZodString;
204
+ title: z.ZodString;
205
+ filename: z.ZodOptional<z.ZodString>;
206
+ providerMetadata: z.ZodOptional<z.ZodObject<{
207
+ cossistant: z.ZodOptional<z.ZodObject<{
208
+ visibility: z.ZodOptional<z.ZodEnum<{
209
+ public: "public";
210
+ private: "private";
211
+ }>>;
212
+ progressMessage: z.ZodOptional<z.ZodString>;
213
+ knowledgeId: z.ZodOptional<z.ZodString>;
214
+ }, z.core.$strip>>;
215
+ }, z.core.$loose>>;
216
+ }, z.core.$strip>, z.ZodObject<{
217
+ type: z.ZodLiteral<"step-start">;
218
+ }, z.core.$strip>, z.ZodObject<{
219
+ type: z.ZodLiteral<"file">;
220
+ url: z.ZodString;
221
+ mediaType: z.ZodString;
222
+ filename: z.ZodOptional<z.ZodString>;
223
+ size: z.ZodOptional<z.ZodNumber>;
224
+ }, z.core.$strip>, z.ZodObject<{
225
+ type: z.ZodLiteral<"image">;
226
+ url: z.ZodString;
227
+ mediaType: z.ZodString;
228
+ filename: z.ZodOptional<z.ZodString>;
229
+ size: z.ZodOptional<z.ZodNumber>;
230
+ width: z.ZodOptional<z.ZodNumber>;
231
+ height: z.ZodOptional<z.ZodNumber>;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ type: z.ZodLiteral<"event">;
234
+ eventType: z.ZodEnum<{
235
+ resolved: "resolved";
236
+ assigned: "assigned";
237
+ unassigned: "unassigned";
238
+ participant_requested: "participant_requested";
239
+ participant_joined: "participant_joined";
240
+ participant_left: "participant_left";
241
+ status_changed: "status_changed";
242
+ priority_changed: "priority_changed";
243
+ tag_added: "tag_added";
244
+ tag_removed: "tag_removed";
245
+ reopened: "reopened";
246
+ visitor_blocked: "visitor_blocked";
247
+ visitor_unblocked: "visitor_unblocked";
248
+ visitor_identified: "visitor_identified";
249
+ }>;
250
+ actorUserId: z.ZodNullable<z.ZodString>;
251
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
252
+ targetUserId: z.ZodNullable<z.ZodString>;
253
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
254
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
+ }, z.core.$strip>, z.ZodObject<{
256
+ type: z.ZodLiteral<"metadata">;
257
+ source: z.ZodEnum<{
258
+ email: "email";
259
+ widget: "widget";
260
+ api: "api";
261
+ }>;
262
+ }, z.core.$strip>]>>;
263
+ userId: z.ZodNullable<z.ZodString>;
264
+ aiAgentId: z.ZodNullable<z.ZodString>;
265
+ visitorId: z.ZodNullable<z.ZodString>;
266
+ createdAt: z.ZodString;
267
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
268
+ }, z.core.$strip>>;
269
+ }, z.core.$strip>;
270
+ header: z.ZodObject<{
271
+ id: z.ZodString;
272
+ status: z.ZodEnum<{
273
+ open: "open";
274
+ resolved: "resolved";
275
+ spam: "spam";
276
+ }>;
277
+ priority: z.ZodEnum<{
278
+ low: "low";
279
+ normal: "normal";
280
+ high: "high";
281
+ urgent: "urgent";
282
+ }>;
283
+ organizationId: z.ZodString;
284
+ visitorId: z.ZodString;
285
+ visitor: z.ZodObject<{
286
+ id: z.ZodULID;
287
+ lastSeenAt: z.ZodNullable<z.ZodString>;
288
+ blockedAt: z.ZodNullable<z.ZodString>;
289
+ blockedByUserId: z.ZodNullable<z.ZodString>;
290
+ isBlocked: z.ZodBoolean;
291
+ contact: z.ZodNullable<z.ZodObject<{
292
+ id: z.ZodULID;
293
+ name: z.ZodNullable<z.ZodString>;
294
+ email: z.ZodNullable<z.ZodString>;
295
+ image: z.ZodNullable<z.ZodString>;
296
+ metadataHash: z.ZodOptional<z.ZodString>;
297
+ }, z.core.$strip>>;
298
+ }, z.core.$strip>;
299
+ websiteId: z.ZodString;
300
+ channel: z.ZodString;
301
+ title: z.ZodNullable<z.ZodString>;
302
+ resolutionTime: z.ZodNullable<z.ZodNumber>;
303
+ startedAt: z.ZodNullable<z.ZodString>;
304
+ firstResponseAt: z.ZodNullable<z.ZodString>;
305
+ resolvedAt: z.ZodNullable<z.ZodString>;
306
+ resolvedByUserId: z.ZodNullable<z.ZodString>;
307
+ resolvedByAiAgentId: z.ZodNullable<z.ZodString>;
308
+ escalatedAt: z.ZodNullable<z.ZodString>;
309
+ escalatedByAiAgentId: z.ZodNullable<z.ZodString>;
310
+ escalationReason: z.ZodNullable<z.ZodString>;
311
+ escalationHandledAt: z.ZodNullable<z.ZodString>;
312
+ escalationHandledByUserId: z.ZodNullable<z.ZodString>;
313
+ aiPausedUntil: z.ZodNullable<z.ZodString>;
314
+ createdAt: z.ZodString;
315
+ updatedAt: z.ZodString;
316
+ deletedAt: z.ZodNullable<z.ZodString>;
317
+ lastMessageAt: z.ZodNullable<z.ZodString>;
318
+ lastSeenAt: z.ZodNullable<z.ZodString>;
319
+ lastMessageTimelineItem: z.ZodNullable<z.ZodObject<{
320
+ id: z.ZodOptional<z.ZodString>;
321
+ conversationId: z.ZodString;
322
+ organizationId: z.ZodString;
323
+ visibility: z.ZodEnum<{
324
+ public: "public";
325
+ private: "private";
326
+ }>;
327
+ type: z.ZodEnum<{
328
+ message: "message";
329
+ event: "event";
330
+ identification: "identification";
331
+ }>;
332
+ text: z.ZodNullable<z.ZodString>;
333
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
334
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
335
+ type: z.ZodLiteral<"text">;
336
+ text: z.ZodString;
337
+ state: z.ZodOptional<z.ZodEnum<{
338
+ streaming: "streaming";
339
+ done: "done";
340
+ }>>;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ type: z.ZodLiteral<"reasoning">;
343
+ text: z.ZodString;
344
+ state: z.ZodOptional<z.ZodEnum<{
345
+ streaming: "streaming";
346
+ done: "done";
347
+ }>>;
348
+ providerMetadata: z.ZodOptional<z.ZodObject<{
349
+ cossistant: z.ZodOptional<z.ZodObject<{
350
+ visibility: z.ZodOptional<z.ZodEnum<{
351
+ public: "public";
352
+ private: "private";
353
+ }>>;
354
+ progressMessage: z.ZodOptional<z.ZodString>;
355
+ knowledgeId: z.ZodOptional<z.ZodString>;
356
+ }, z.core.$strip>>;
357
+ }, z.core.$loose>>;
358
+ }, z.core.$strip>, z.ZodObject<{
359
+ type: z.ZodString;
360
+ toolCallId: z.ZodString;
361
+ toolName: z.ZodString;
362
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
363
+ output: z.ZodOptional<z.ZodUnknown>;
364
+ state: z.ZodEnum<{
365
+ error: "error";
366
+ partial: "partial";
367
+ result: "result";
368
+ }>;
369
+ errorText: z.ZodOptional<z.ZodString>;
370
+ providerMetadata: z.ZodOptional<z.ZodObject<{
371
+ cossistant: z.ZodOptional<z.ZodObject<{
372
+ visibility: z.ZodOptional<z.ZodEnum<{
373
+ public: "public";
374
+ private: "private";
375
+ }>>;
376
+ progressMessage: z.ZodOptional<z.ZodString>;
377
+ knowledgeId: z.ZodOptional<z.ZodString>;
378
+ }, z.core.$strip>>;
379
+ }, z.core.$loose>>;
380
+ }, z.core.$strip>, z.ZodObject<{
381
+ type: z.ZodLiteral<"source-url">;
382
+ sourceId: z.ZodString;
383
+ url: z.ZodString;
384
+ title: z.ZodOptional<z.ZodString>;
385
+ providerMetadata: z.ZodOptional<z.ZodObject<{
386
+ cossistant: z.ZodOptional<z.ZodObject<{
387
+ visibility: z.ZodOptional<z.ZodEnum<{
388
+ public: "public";
389
+ private: "private";
390
+ }>>;
391
+ progressMessage: z.ZodOptional<z.ZodString>;
392
+ knowledgeId: z.ZodOptional<z.ZodString>;
393
+ }, z.core.$strip>>;
394
+ }, z.core.$loose>>;
395
+ }, z.core.$strip>, z.ZodObject<{
396
+ type: z.ZodLiteral<"source-document">;
397
+ sourceId: z.ZodString;
398
+ mediaType: z.ZodString;
399
+ title: z.ZodString;
400
+ filename: z.ZodOptional<z.ZodString>;
401
+ providerMetadata: z.ZodOptional<z.ZodObject<{
402
+ cossistant: z.ZodOptional<z.ZodObject<{
403
+ visibility: z.ZodOptional<z.ZodEnum<{
404
+ public: "public";
405
+ private: "private";
406
+ }>>;
407
+ progressMessage: z.ZodOptional<z.ZodString>;
408
+ knowledgeId: z.ZodOptional<z.ZodString>;
409
+ }, z.core.$strip>>;
410
+ }, z.core.$loose>>;
411
+ }, z.core.$strip>, z.ZodObject<{
412
+ type: z.ZodLiteral<"step-start">;
413
+ }, z.core.$strip>, z.ZodObject<{
414
+ type: z.ZodLiteral<"file">;
415
+ url: z.ZodString;
416
+ mediaType: z.ZodString;
417
+ filename: z.ZodOptional<z.ZodString>;
418
+ size: z.ZodOptional<z.ZodNumber>;
419
+ }, z.core.$strip>, z.ZodObject<{
420
+ type: z.ZodLiteral<"image">;
421
+ url: z.ZodString;
422
+ mediaType: z.ZodString;
423
+ filename: z.ZodOptional<z.ZodString>;
424
+ size: z.ZodOptional<z.ZodNumber>;
425
+ width: z.ZodOptional<z.ZodNumber>;
426
+ height: z.ZodOptional<z.ZodNumber>;
427
+ }, z.core.$strip>, z.ZodObject<{
428
+ type: z.ZodLiteral<"event">;
429
+ eventType: z.ZodEnum<{
430
+ resolved: "resolved";
431
+ assigned: "assigned";
432
+ unassigned: "unassigned";
433
+ participant_requested: "participant_requested";
434
+ participant_joined: "participant_joined";
435
+ participant_left: "participant_left";
436
+ status_changed: "status_changed";
437
+ priority_changed: "priority_changed";
438
+ tag_added: "tag_added";
439
+ tag_removed: "tag_removed";
440
+ reopened: "reopened";
441
+ visitor_blocked: "visitor_blocked";
442
+ visitor_unblocked: "visitor_unblocked";
443
+ visitor_identified: "visitor_identified";
444
+ }>;
445
+ actorUserId: z.ZodNullable<z.ZodString>;
446
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
447
+ targetUserId: z.ZodNullable<z.ZodString>;
448
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
449
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
450
+ }, z.core.$strip>, z.ZodObject<{
451
+ type: z.ZodLiteral<"metadata">;
452
+ source: z.ZodEnum<{
453
+ email: "email";
454
+ widget: "widget";
455
+ api: "api";
456
+ }>;
457
+ }, z.core.$strip>]>>;
458
+ userId: z.ZodNullable<z.ZodString>;
459
+ aiAgentId: z.ZodNullable<z.ZodString>;
460
+ visitorId: z.ZodNullable<z.ZodString>;
461
+ createdAt: z.ZodString;
462
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
463
+ }, z.core.$strip>>;
464
+ lastTimelineItem: z.ZodNullable<z.ZodObject<{
465
+ id: z.ZodOptional<z.ZodString>;
466
+ conversationId: z.ZodString;
467
+ organizationId: z.ZodString;
468
+ visibility: z.ZodEnum<{
469
+ public: "public";
470
+ private: "private";
471
+ }>;
472
+ type: z.ZodEnum<{
473
+ message: "message";
474
+ event: "event";
475
+ identification: "identification";
476
+ }>;
477
+ text: z.ZodNullable<z.ZodString>;
478
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
479
+ parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
480
+ type: z.ZodLiteral<"text">;
481
+ text: z.ZodString;
482
+ state: z.ZodOptional<z.ZodEnum<{
483
+ streaming: "streaming";
484
+ done: "done";
485
+ }>>;
486
+ }, z.core.$strip>, z.ZodObject<{
487
+ type: z.ZodLiteral<"reasoning">;
488
+ text: z.ZodString;
489
+ state: z.ZodOptional<z.ZodEnum<{
490
+ streaming: "streaming";
491
+ done: "done";
492
+ }>>;
493
+ providerMetadata: z.ZodOptional<z.ZodObject<{
494
+ cossistant: z.ZodOptional<z.ZodObject<{
495
+ visibility: z.ZodOptional<z.ZodEnum<{
496
+ public: "public";
497
+ private: "private";
498
+ }>>;
499
+ progressMessage: z.ZodOptional<z.ZodString>;
500
+ knowledgeId: z.ZodOptional<z.ZodString>;
501
+ }, z.core.$strip>>;
502
+ }, z.core.$loose>>;
503
+ }, z.core.$strip>, z.ZodObject<{
504
+ type: z.ZodString;
505
+ toolCallId: z.ZodString;
506
+ toolName: z.ZodString;
507
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
508
+ output: z.ZodOptional<z.ZodUnknown>;
509
+ state: z.ZodEnum<{
510
+ error: "error";
511
+ partial: "partial";
512
+ result: "result";
513
+ }>;
514
+ errorText: z.ZodOptional<z.ZodString>;
515
+ providerMetadata: z.ZodOptional<z.ZodObject<{
516
+ cossistant: z.ZodOptional<z.ZodObject<{
517
+ visibility: z.ZodOptional<z.ZodEnum<{
518
+ public: "public";
519
+ private: "private";
520
+ }>>;
521
+ progressMessage: z.ZodOptional<z.ZodString>;
522
+ knowledgeId: z.ZodOptional<z.ZodString>;
523
+ }, z.core.$strip>>;
524
+ }, z.core.$loose>>;
525
+ }, z.core.$strip>, z.ZodObject<{
526
+ type: z.ZodLiteral<"source-url">;
527
+ sourceId: z.ZodString;
528
+ url: z.ZodString;
529
+ title: z.ZodOptional<z.ZodString>;
530
+ providerMetadata: z.ZodOptional<z.ZodObject<{
531
+ cossistant: z.ZodOptional<z.ZodObject<{
532
+ visibility: z.ZodOptional<z.ZodEnum<{
533
+ public: "public";
534
+ private: "private";
535
+ }>>;
536
+ progressMessage: z.ZodOptional<z.ZodString>;
537
+ knowledgeId: z.ZodOptional<z.ZodString>;
538
+ }, z.core.$strip>>;
539
+ }, z.core.$loose>>;
540
+ }, z.core.$strip>, z.ZodObject<{
541
+ type: z.ZodLiteral<"source-document">;
542
+ sourceId: z.ZodString;
543
+ mediaType: z.ZodString;
544
+ title: z.ZodString;
545
+ filename: z.ZodOptional<z.ZodString>;
546
+ providerMetadata: z.ZodOptional<z.ZodObject<{
547
+ cossistant: z.ZodOptional<z.ZodObject<{
548
+ visibility: z.ZodOptional<z.ZodEnum<{
549
+ public: "public";
550
+ private: "private";
551
+ }>>;
552
+ progressMessage: z.ZodOptional<z.ZodString>;
553
+ knowledgeId: z.ZodOptional<z.ZodString>;
554
+ }, z.core.$strip>>;
555
+ }, z.core.$loose>>;
556
+ }, z.core.$strip>, z.ZodObject<{
557
+ type: z.ZodLiteral<"step-start">;
558
+ }, z.core.$strip>, z.ZodObject<{
559
+ type: z.ZodLiteral<"file">;
560
+ url: z.ZodString;
561
+ mediaType: z.ZodString;
562
+ filename: z.ZodOptional<z.ZodString>;
563
+ size: z.ZodOptional<z.ZodNumber>;
564
+ }, z.core.$strip>, z.ZodObject<{
565
+ type: z.ZodLiteral<"image">;
566
+ url: z.ZodString;
567
+ mediaType: z.ZodString;
568
+ filename: z.ZodOptional<z.ZodString>;
569
+ size: z.ZodOptional<z.ZodNumber>;
570
+ width: z.ZodOptional<z.ZodNumber>;
571
+ height: z.ZodOptional<z.ZodNumber>;
572
+ }, z.core.$strip>, z.ZodObject<{
573
+ type: z.ZodLiteral<"event">;
574
+ eventType: z.ZodEnum<{
575
+ resolved: "resolved";
576
+ assigned: "assigned";
577
+ unassigned: "unassigned";
578
+ participant_requested: "participant_requested";
579
+ participant_joined: "participant_joined";
580
+ participant_left: "participant_left";
581
+ status_changed: "status_changed";
582
+ priority_changed: "priority_changed";
583
+ tag_added: "tag_added";
584
+ tag_removed: "tag_removed";
585
+ reopened: "reopened";
586
+ visitor_blocked: "visitor_blocked";
587
+ visitor_unblocked: "visitor_unblocked";
588
+ visitor_identified: "visitor_identified";
589
+ }>;
590
+ actorUserId: z.ZodNullable<z.ZodString>;
591
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
592
+ targetUserId: z.ZodNullable<z.ZodString>;
593
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
594
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
595
+ }, z.core.$strip>, z.ZodObject<{
596
+ type: z.ZodLiteral<"metadata">;
597
+ source: z.ZodEnum<{
598
+ email: "email";
599
+ widget: "widget";
600
+ api: "api";
601
+ }>;
602
+ }, z.core.$strip>]>>;
603
+ userId: z.ZodNullable<z.ZodString>;
604
+ aiAgentId: z.ZodNullable<z.ZodString>;
605
+ visitorId: z.ZodNullable<z.ZodString>;
606
+ createdAt: z.ZodString;
607
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
608
+ }, z.core.$strip>>;
609
+ viewIds: z.ZodArray<z.ZodString>;
610
+ seenData: z.ZodArray<z.ZodObject<{
611
+ id: z.ZodString;
612
+ conversationId: z.ZodString;
613
+ userId: z.ZodNullable<z.ZodString>;
614
+ visitorId: z.ZodNullable<z.ZodString>;
615
+ aiAgentId: z.ZodNullable<z.ZodString>;
616
+ lastSeenAt: z.ZodString;
617
+ createdAt: z.ZodString;
618
+ updatedAt: z.ZodString;
619
+ deletedAt: z.ZodNullable<z.ZodString>;
620
+ }, z.core.$strip>>;
621
+ }, z.core.$strip>;
622
+ }, z.core.$strip>;
623
+ readonly visitorIdentified: z.ZodObject<{
624
+ websiteId: z.ZodString;
625
+ organizationId: z.ZodString;
626
+ userId: z.ZodNullable<z.ZodString>;
627
+ visitorId: z.ZodString;
628
+ visitor: z.ZodObject<{
629
+ id: z.ZodULID;
630
+ browser: z.ZodNullable<z.ZodString>;
631
+ browserVersion: z.ZodNullable<z.ZodString>;
632
+ os: z.ZodNullable<z.ZodString>;
633
+ osVersion: z.ZodNullable<z.ZodString>;
634
+ device: z.ZodNullable<z.ZodString>;
635
+ deviceType: z.ZodNullable<z.ZodString>;
636
+ ip: z.ZodNullable<z.ZodString>;
637
+ city: z.ZodNullable<z.ZodString>;
638
+ region: z.ZodNullable<z.ZodString>;
639
+ country: z.ZodNullable<z.ZodString>;
640
+ countryCode: z.ZodNullable<z.ZodString>;
641
+ latitude: z.ZodNullable<z.ZodNumber>;
642
+ longitude: z.ZodNullable<z.ZodNumber>;
643
+ language: z.ZodNullable<z.ZodString>;
644
+ timezone: z.ZodNullable<z.ZodString>;
645
+ screenResolution: z.ZodNullable<z.ZodString>;
646
+ viewport: z.ZodNullable<z.ZodString>;
647
+ createdAt: z.ZodString;
648
+ updatedAt: z.ZodString;
649
+ lastSeenAt: z.ZodNullable<z.ZodString>;
650
+ websiteId: z.ZodULID;
651
+ organizationId: z.ZodULID;
652
+ blockedAt: z.ZodNullable<z.ZodString>;
653
+ blockedByUserId: z.ZodNullable<z.ZodString>;
654
+ isBlocked: z.ZodBoolean;
655
+ contact: z.ZodNullable<z.ZodObject<{
656
+ id: z.ZodULID;
657
+ externalId: z.ZodNullable<z.ZodString>;
658
+ name: z.ZodNullable<z.ZodString>;
659
+ email: z.ZodNullable<z.ZodEmail>;
660
+ image: z.ZodNullable<z.ZodURL>;
661
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodBoolean]>, z.ZodNull]>>>;
662
+ contactOrganizationId: z.ZodNullable<z.ZodULID>;
663
+ websiteId: z.ZodULID;
664
+ organizationId: z.ZodULID;
665
+ userId: z.ZodNullable<z.ZodULID>;
666
+ createdAt: z.ZodString;
667
+ updatedAt: z.ZodString;
668
+ }, z.core.$strip>>;
669
+ }, z.core.$strip>;
670
+ }, z.core.$strip>;
671
+ readonly conversationEventCreated: z.ZodObject<{
672
+ websiteId: z.ZodString;
673
+ organizationId: z.ZodString;
674
+ visitorId: z.ZodNullable<z.ZodString>;
675
+ userId: z.ZodNullable<z.ZodString>;
676
+ conversationId: z.ZodString;
677
+ aiAgentId: z.ZodNullable<z.ZodString>;
678
+ event: z.ZodObject<{
679
+ id: z.ZodString;
680
+ conversationId: z.ZodString;
681
+ organizationId: z.ZodString;
682
+ type: z.ZodEnum<{
683
+ resolved: "resolved";
684
+ assigned: "assigned";
685
+ unassigned: "unassigned";
686
+ participant_requested: "participant_requested";
687
+ participant_joined: "participant_joined";
688
+ participant_left: "participant_left";
689
+ status_changed: "status_changed";
690
+ priority_changed: "priority_changed";
691
+ tag_added: "tag_added";
692
+ tag_removed: "tag_removed";
693
+ reopened: "reopened";
694
+ visitor_blocked: "visitor_blocked";
695
+ visitor_unblocked: "visitor_unblocked";
696
+ visitor_identified: "visitor_identified";
697
+ }>;
698
+ actorUserId: z.ZodNullable<z.ZodString>;
699
+ actorAiAgentId: z.ZodNullable<z.ZodString>;
700
+ targetUserId: z.ZodNullable<z.ZodString>;
701
+ targetAiAgentId: z.ZodNullable<z.ZodString>;
702
+ message: z.ZodNullable<z.ZodString>;
703
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
704
+ createdAt: z.ZodString;
705
+ updatedAt: z.ZodString;
706
+ deletedAt: z.ZodNullable<z.ZodString>;
707
+ }, z.core.$strip>;
708
+ }, z.core.$strip>;
709
+ readonly conversationUpdated: z.ZodObject<{
710
+ websiteId: z.ZodString;
711
+ organizationId: z.ZodString;
712
+ visitorId: z.ZodNullable<z.ZodString>;
713
+ userId: z.ZodNullable<z.ZodString>;
714
+ conversationId: z.ZodString;
715
+ updates: z.ZodObject<{
716
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
717
+ sentiment: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
718
+ positive: "positive";
719
+ negative: "negative";
720
+ neutral: "neutral";
721
+ }>>>;
722
+ sentimentConfidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
723
+ escalatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
724
+ escalationReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
725
+ }, z.core.$strip>;
726
+ aiAgentId: z.ZodNullable<z.ZodString>;
727
+ }, z.core.$strip>;
728
+ readonly aiAgentProcessingStarted: z.ZodObject<{
729
+ websiteId: z.ZodString;
730
+ organizationId: z.ZodString;
731
+ visitorId: z.ZodNullable<z.ZodString>;
732
+ userId: z.ZodNullable<z.ZodString>;
733
+ conversationId: z.ZodString;
734
+ aiAgentId: z.ZodString;
735
+ workflowRunId: z.ZodString;
736
+ triggerMessageId: z.ZodString;
737
+ phase: z.ZodOptional<z.ZodString>;
738
+ audience: z.ZodDefault<z.ZodEnum<{
739
+ all: "all";
740
+ dashboard: "dashboard";
741
+ }>>;
742
+ }, z.core.$strip>;
743
+ readonly aiAgentDecisionMade: z.ZodObject<{
744
+ websiteId: z.ZodString;
745
+ organizationId: z.ZodString;
746
+ visitorId: z.ZodNullable<z.ZodString>;
747
+ userId: z.ZodNullable<z.ZodString>;
748
+ conversationId: z.ZodString;
749
+ aiAgentId: z.ZodString;
750
+ workflowRunId: z.ZodString;
751
+ shouldAct: z.ZodBoolean;
752
+ reason: z.ZodString;
753
+ mode: z.ZodEnum<{
754
+ respond_to_visitor: "respond_to_visitor";
755
+ respond_to_command: "respond_to_command";
756
+ background_only: "background_only";
757
+ }>;
758
+ audience: z.ZodEnum<{
759
+ all: "all";
760
+ dashboard: "dashboard";
761
+ }>;
762
+ }, z.core.$strip>;
763
+ readonly aiAgentProcessingProgress: z.ZodObject<{
764
+ websiteId: z.ZodString;
765
+ organizationId: z.ZodString;
766
+ visitorId: z.ZodNullable<z.ZodString>;
767
+ userId: z.ZodNullable<z.ZodString>;
768
+ conversationId: z.ZodString;
769
+ aiAgentId: z.ZodString;
770
+ workflowRunId: z.ZodString;
771
+ phase: z.ZodString;
772
+ message: z.ZodNullable<z.ZodString>;
773
+ tool: z.ZodOptional<z.ZodObject<{
774
+ toolCallId: z.ZodString;
775
+ toolName: z.ZodString;
776
+ state: z.ZodEnum<{
777
+ error: "error";
778
+ partial: "partial";
779
+ result: "result";
780
+ }>;
781
+ }, z.core.$strip>>;
782
+ audience: z.ZodDefault<z.ZodEnum<{
783
+ all: "all";
784
+ dashboard: "dashboard";
785
+ }>>;
786
+ }, z.core.$strip>;
787
+ readonly aiAgentProcessingCompleted: z.ZodObject<{
788
+ websiteId: z.ZodString;
789
+ organizationId: z.ZodString;
790
+ visitorId: z.ZodNullable<z.ZodString>;
791
+ userId: z.ZodNullable<z.ZodString>;
792
+ conversationId: z.ZodString;
793
+ aiAgentId: z.ZodString;
794
+ workflowRunId: z.ZodString;
795
+ status: z.ZodEnum<{
796
+ success: "success";
797
+ error: "error";
798
+ skipped: "skipped";
799
+ cancelled: "cancelled";
800
+ }>;
801
+ action: z.ZodOptional<z.ZodNullable<z.ZodString>>;
802
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
803
+ audience: z.ZodDefault<z.ZodEnum<{
804
+ all: "all";
805
+ dashboard: "dashboard";
806
+ }>>;
807
+ }, z.core.$strip>;
808
+ readonly timelineItemUpdated: z.ZodObject<{
809
+ websiteId: z.ZodString;
810
+ organizationId: z.ZodString;
811
+ visitorId: z.ZodNullable<z.ZodString>;
812
+ userId: z.ZodNullable<z.ZodString>;
813
+ conversationId: z.ZodString;
814
+ item: z.ZodObject<{
815
+ id: z.ZodString;
816
+ conversationId: z.ZodString;
817
+ organizationId: z.ZodString;
818
+ visibility: z.ZodEnum<{
819
+ public: "public";
820
+ private: "private";
821
+ }>;
822
+ type: z.ZodEnum<{
823
+ message: "message";
824
+ event: "event";
825
+ identification: "identification";
826
+ }>;
827
+ text: z.ZodNullable<z.ZodString>;
828
+ parts: z.ZodArray<z.ZodUnknown>;
829
+ userId: z.ZodNullable<z.ZodString>;
830
+ visitorId: z.ZodNullable<z.ZodString>;
831
+ aiAgentId: z.ZodNullable<z.ZodString>;
832
+ createdAt: z.ZodString;
833
+ deletedAt: z.ZodNullable<z.ZodString>;
834
+ tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
835
+ }, z.core.$strip>;
836
+ }, z.core.$strip>;
837
+ readonly timelineItemPartUpdated: z.ZodObject<{
838
+ websiteId: z.ZodString;
839
+ organizationId: z.ZodString;
840
+ visitorId: z.ZodNullable<z.ZodString>;
841
+ userId: z.ZodNullable<z.ZodString>;
842
+ conversationId: z.ZodString;
843
+ timelineItemId: z.ZodString;
844
+ partIndex: z.ZodNumber;
845
+ part: z.ZodUnknown;
846
+ }, z.core.$strip>;
847
+ readonly crawlStarted: z.ZodObject<{
848
+ websiteId: z.ZodString;
849
+ organizationId: z.ZodString;
850
+ visitorId: z.ZodNullable<z.ZodString>;
851
+ userId: z.ZodNullable<z.ZodString>;
852
+ linkSourceId: z.ZodString;
853
+ url: z.ZodString;
854
+ discoveredPages: z.ZodArray<z.ZodObject<{
855
+ url: z.ZodString;
856
+ title: z.ZodNullable<z.ZodString>;
857
+ depth: z.ZodNumber;
858
+ }, z.core.$strip>>;
859
+ totalPagesCount: z.ZodNumber;
860
+ }, z.core.$strip>;
861
+ readonly crawlProgress: z.ZodObject<{
862
+ websiteId: z.ZodString;
863
+ organizationId: z.ZodString;
864
+ visitorId: z.ZodNullable<z.ZodString>;
865
+ userId: z.ZodNullable<z.ZodString>;
866
+ linkSourceId: z.ZodString;
867
+ url: z.ZodString;
868
+ page: z.ZodObject<{
869
+ url: z.ZodString;
870
+ title: z.ZodNullable<z.ZodString>;
871
+ status: z.ZodEnum<{
872
+ pending: "pending";
873
+ crawling: "crawling";
874
+ completed: "completed";
875
+ failed: "failed";
876
+ }>;
877
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
878
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
879
+ }, z.core.$strip>;
880
+ completedCount: z.ZodNumber;
881
+ totalCount: z.ZodNumber;
882
+ }, z.core.$strip>;
883
+ readonly crawlCompleted: z.ZodObject<{
884
+ websiteId: z.ZodString;
885
+ organizationId: z.ZodString;
886
+ visitorId: z.ZodNullable<z.ZodString>;
887
+ userId: z.ZodNullable<z.ZodString>;
888
+ linkSourceId: z.ZodString;
889
+ url: z.ZodString;
890
+ crawledPagesCount: z.ZodNumber;
891
+ totalSizeBytes: z.ZodNumber;
892
+ failedPagesCount: z.ZodNumber;
893
+ }, z.core.$strip>;
894
+ readonly crawlFailed: z.ZodObject<{
895
+ websiteId: z.ZodString;
896
+ organizationId: z.ZodString;
897
+ visitorId: z.ZodNullable<z.ZodString>;
898
+ userId: z.ZodNullable<z.ZodString>;
899
+ linkSourceId: z.ZodString;
900
+ url: z.ZodString;
901
+ error: z.ZodString;
902
+ }, z.core.$strip>;
903
+ readonly linkSourceUpdated: z.ZodObject<{
904
+ websiteId: z.ZodString;
905
+ organizationId: z.ZodString;
906
+ visitorId: z.ZodNullable<z.ZodString>;
907
+ userId: z.ZodNullable<z.ZodString>;
908
+ linkSourceId: z.ZodString;
909
+ status: z.ZodEnum<{
910
+ pending: "pending";
911
+ crawling: "crawling";
912
+ completed: "completed";
913
+ failed: "failed";
914
+ mapping: "mapping";
915
+ }>;
916
+ discoveredPagesCount: z.ZodOptional<z.ZodNumber>;
917
+ crawledPagesCount: z.ZodOptional<z.ZodNumber>;
918
+ totalSizeBytes: z.ZodOptional<z.ZodNumber>;
919
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
920
+ }, z.core.$strip>;
921
+ readonly crawlPagesDiscovered: z.ZodObject<{
922
+ websiteId: z.ZodString;
923
+ organizationId: z.ZodString;
924
+ visitorId: z.ZodNullable<z.ZodString>;
925
+ userId: z.ZodNullable<z.ZodString>;
926
+ linkSourceId: z.ZodString;
927
+ pages: z.ZodArray<z.ZodObject<{
928
+ url: z.ZodString;
929
+ path: z.ZodString;
930
+ depth: z.ZodNumber;
931
+ }, z.core.$strip>>;
932
+ }, z.core.$strip>;
933
+ readonly crawlPageCompleted: z.ZodObject<{
934
+ websiteId: z.ZodString;
935
+ organizationId: z.ZodString;
936
+ visitorId: z.ZodNullable<z.ZodString>;
937
+ userId: z.ZodNullable<z.ZodString>;
938
+ linkSourceId: z.ZodString;
939
+ page: z.ZodObject<{
940
+ url: z.ZodString;
941
+ title: z.ZodNullable<z.ZodString>;
942
+ sizeBytes: z.ZodNumber;
943
+ knowledgeId: z.ZodString;
944
+ }, z.core.$strip>;
945
+ }, z.core.$strip>;
946
+ readonly trainingStarted: z.ZodObject<{
947
+ websiteId: z.ZodString;
948
+ organizationId: z.ZodString;
949
+ visitorId: z.ZodNullable<z.ZodString>;
950
+ userId: z.ZodNullable<z.ZodString>;
951
+ aiAgentId: z.ZodString;
952
+ totalItems: z.ZodNumber;
953
+ }, z.core.$strip>;
954
+ readonly trainingProgress: z.ZodObject<{
955
+ websiteId: z.ZodString;
956
+ organizationId: z.ZodString;
957
+ visitorId: z.ZodNullable<z.ZodString>;
958
+ userId: z.ZodNullable<z.ZodString>;
959
+ aiAgentId: z.ZodString;
960
+ processedItems: z.ZodNumber;
961
+ totalItems: z.ZodNumber;
962
+ currentItem: z.ZodOptional<z.ZodObject<{
963
+ id: z.ZodString;
964
+ title: z.ZodNullable<z.ZodString>;
965
+ type: z.ZodEnum<{
966
+ url: "url";
967
+ faq: "faq";
968
+ article: "article";
969
+ }>;
970
+ }, z.core.$strip>>;
971
+ percentage: z.ZodNumber;
972
+ }, z.core.$strip>;
973
+ readonly trainingCompleted: z.ZodObject<{
974
+ websiteId: z.ZodString;
975
+ organizationId: z.ZodString;
976
+ visitorId: z.ZodNullable<z.ZodString>;
977
+ userId: z.ZodNullable<z.ZodString>;
978
+ aiAgentId: z.ZodString;
979
+ totalItems: z.ZodNumber;
980
+ totalChunks: z.ZodNumber;
981
+ duration: z.ZodNumber;
982
+ }, z.core.$strip>;
983
+ readonly trainingFailed: z.ZodObject<{
984
+ websiteId: z.ZodString;
985
+ organizationId: z.ZodString;
986
+ visitorId: z.ZodNullable<z.ZodString>;
987
+ userId: z.ZodNullable<z.ZodString>;
988
+ aiAgentId: z.ZodString;
989
+ error: z.ZodString;
990
+ }, z.core.$strip>;
991
+ };
992
+ type RealtimeEventType = keyof typeof realtimeSchema;
993
+ type RealtimeEventPayload<T extends RealtimeEventType> = z.infer<(typeof realtimeSchema)[T]>;
994
+ type RealtimeEvent<T extends RealtimeEventType> = {
995
+ type: T;
996
+ payload: RealtimeEventPayload<T>;
997
+ };
998
+ //#endregion
999
+ export { RealtimeEvent };
1000
+ //# sourceMappingURL=realtime-events.d.ts.map