@cossistant/types 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.
- package/api/ai-agent.d.ts +170 -4
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +233 -7
- package/api/ai-agent.js.map +1 -1
- package/api/contact.d.ts.map +1 -1
- package/api/conversation.d.ts +458 -78
- package/api/conversation.d.ts.map +1 -1
- package/api/index.d.ts +5 -4
- package/api/index.js +5 -4
- package/api/knowledge.d.ts +63 -25
- package/api/knowledge.d.ts.map +1 -1
- package/api/knowledge.js +73 -11
- package/api/knowledge.js.map +1 -1
- package/api/link-source.d.ts +264 -0
- package/api/link-source.d.ts.map +1 -0
- package/api/link-source.js +461 -0
- package/api/link-source.js.map +1 -0
- package/api/timeline-item.d.ts +580 -91
- package/api/timeline-item.d.ts.map +1 -1
- package/api/timeline-item.js +68 -20
- package/api/timeline-item.js.map +1 -1
- package/enums.d.ts +3 -0
- package/enums.d.ts.map +1 -1
- package/enums.js +4 -1
- package/enums.js.map +1 -1
- package/index.d.ts +6 -5
- package/index.d.ts.map +1 -1
- package/index.js +6 -5
- package/package.json +1 -1
- package/realtime-events.d.ts +570 -48
- package/realtime-events.d.ts.map +1 -1
- package/realtime-events.js +202 -1
- package/realtime-events.js.map +1 -1
- package/schemas.d.ts +92 -16
- package/schemas.d.ts.map +1 -1
- package/trpc/conversation.d.ts +393 -65
- package/trpc/conversation.d.ts.map +1 -1
- package/trpc/conversation.js +12 -0
- package/trpc/conversation.js.map +1 -1
- package/trpc/visitor.d.ts +7 -1
- package/trpc/visitor.d.ts.map +1 -1
package/realtime-events.d.ts
CHANGED
|
@@ -60,6 +60,12 @@ declare const realtimeSchema: {
|
|
|
60
60
|
conversationId: z.ZodString;
|
|
61
61
|
aiAgentId: z.ZodNullable<z.ZodString>;
|
|
62
62
|
lastSeenAt: z.ZodString;
|
|
63
|
+
actorType: z.ZodEnum<{
|
|
64
|
+
visitor: "visitor";
|
|
65
|
+
user: "user";
|
|
66
|
+
ai_agent: "ai_agent";
|
|
67
|
+
}>;
|
|
68
|
+
actorId: z.ZodString;
|
|
63
69
|
}, z.core.$strip>;
|
|
64
70
|
readonly conversationTyping: z.ZodObject<{
|
|
65
71
|
websiteId: z.ZodString;
|
|
@@ -114,8 +120,8 @@ declare const realtimeSchema: {
|
|
|
114
120
|
visitorId: z.ZodString;
|
|
115
121
|
websiteId: z.ZodString;
|
|
116
122
|
status: z.ZodDefault<z.ZodEnum<{
|
|
117
|
-
open: "open";
|
|
118
123
|
resolved: "resolved";
|
|
124
|
+
open: "open";
|
|
119
125
|
spam: "spam";
|
|
120
126
|
}>>;
|
|
121
127
|
deletedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -138,10 +144,99 @@ declare const realtimeSchema: {
|
|
|
138
144
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
139
145
|
type: z.ZodLiteral<"text">;
|
|
140
146
|
text: z.ZodString;
|
|
147
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
streaming: "streaming";
|
|
149
|
+
done: "done";
|
|
150
|
+
}>>;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<"reasoning">;
|
|
153
|
+
text: z.ZodString;
|
|
154
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
streaming: "streaming";
|
|
156
|
+
done: "done";
|
|
157
|
+
}>>;
|
|
158
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
160
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
161
|
+
public: "public";
|
|
162
|
+
private: "private";
|
|
163
|
+
}>>;
|
|
164
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
165
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
}, z.core.$loose>>;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
type: z.ZodString;
|
|
170
|
+
toolCallId: z.ZodString;
|
|
171
|
+
toolName: z.ZodString;
|
|
172
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
173
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
174
|
+
state: z.ZodEnum<{
|
|
175
|
+
error: "error";
|
|
176
|
+
partial: "partial";
|
|
177
|
+
result: "result";
|
|
178
|
+
}>;
|
|
179
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
180
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
public: "public";
|
|
184
|
+
private: "private";
|
|
185
|
+
}>>;
|
|
186
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
187
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
}, z.core.$loose>>;
|
|
190
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
+
type: z.ZodLiteral<"source-url">;
|
|
192
|
+
sourceId: z.ZodString;
|
|
193
|
+
url: z.ZodString;
|
|
194
|
+
title: z.ZodOptional<z.ZodString>;
|
|
195
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
197
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
198
|
+
public: "public";
|
|
199
|
+
private: "private";
|
|
200
|
+
}>>;
|
|
201
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
202
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
}, z.core.$loose>>;
|
|
205
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
206
|
+
type: z.ZodLiteral<"source-document">;
|
|
207
|
+
sourceId: z.ZodString;
|
|
208
|
+
mediaType: z.ZodString;
|
|
209
|
+
title: z.ZodString;
|
|
210
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
211
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
212
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
213
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
214
|
+
public: "public";
|
|
215
|
+
private: "private";
|
|
216
|
+
}>>;
|
|
217
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
218
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
}, z.core.$loose>>;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
type: z.ZodLiteral<"step-start">;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
type: z.ZodLiteral<"file">;
|
|
225
|
+
url: z.ZodString;
|
|
226
|
+
mediaType: z.ZodString;
|
|
227
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
228
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
type: z.ZodLiteral<"image">;
|
|
231
|
+
url: z.ZodString;
|
|
232
|
+
mediaType: z.ZodString;
|
|
233
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
234
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
141
237
|
}, z.core.$strip>, z.ZodObject<{
|
|
142
238
|
type: z.ZodLiteral<"event">;
|
|
143
239
|
eventType: z.ZodEnum<{
|
|
144
|
-
resolved: "resolved";
|
|
145
240
|
assigned: "assigned";
|
|
146
241
|
unassigned: "unassigned";
|
|
147
242
|
participant_requested: "participant_requested";
|
|
@@ -151,6 +246,7 @@ declare const realtimeSchema: {
|
|
|
151
246
|
priority_changed: "priority_changed";
|
|
152
247
|
tag_added: "tag_added";
|
|
153
248
|
tag_removed: "tag_removed";
|
|
249
|
+
resolved: "resolved";
|
|
154
250
|
reopened: "reopened";
|
|
155
251
|
visitor_blocked: "visitor_blocked";
|
|
156
252
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -161,20 +257,6 @@ declare const realtimeSchema: {
|
|
|
161
257
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
162
258
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
163
259
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
165
|
-
type: z.ZodLiteral<"image">;
|
|
166
|
-
url: z.ZodString;
|
|
167
|
-
mediaType: z.ZodString;
|
|
168
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
169
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
170
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
171
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
172
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
-
type: z.ZodLiteral<"file">;
|
|
174
|
-
url: z.ZodString;
|
|
175
|
-
mediaType: z.ZodString;
|
|
176
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
177
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
178
260
|
}, z.core.$strip>, z.ZodObject<{
|
|
179
261
|
type: z.ZodLiteral<"metadata">;
|
|
180
262
|
source: z.ZodEnum<{
|
|
@@ -193,8 +275,8 @@ declare const realtimeSchema: {
|
|
|
193
275
|
header: z.ZodObject<{
|
|
194
276
|
id: z.ZodString;
|
|
195
277
|
status: z.ZodEnum<{
|
|
196
|
-
open: "open";
|
|
197
278
|
resolved: "resolved";
|
|
279
|
+
open: "open";
|
|
198
280
|
spam: "spam";
|
|
199
281
|
}>;
|
|
200
282
|
priority: z.ZodEnum<{
|
|
@@ -228,6 +310,12 @@ declare const realtimeSchema: {
|
|
|
228
310
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
|
229
311
|
resolvedByUserId: z.ZodNullable<z.ZodString>;
|
|
230
312
|
resolvedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
313
|
+
escalatedAt: z.ZodNullable<z.ZodString>;
|
|
314
|
+
escalatedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
315
|
+
escalationReason: z.ZodNullable<z.ZodString>;
|
|
316
|
+
escalationHandledAt: z.ZodNullable<z.ZodString>;
|
|
317
|
+
escalationHandledByUserId: z.ZodNullable<z.ZodString>;
|
|
318
|
+
aiPausedUntil: z.ZodNullable<z.ZodString>;
|
|
231
319
|
createdAt: z.ZodString;
|
|
232
320
|
updatedAt: z.ZodString;
|
|
233
321
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -251,10 +339,99 @@ declare const realtimeSchema: {
|
|
|
251
339
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
252
340
|
type: z.ZodLiteral<"text">;
|
|
253
341
|
text: z.ZodString;
|
|
342
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
streaming: "streaming";
|
|
344
|
+
done: "done";
|
|
345
|
+
}>>;
|
|
346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
+
type: z.ZodLiteral<"reasoning">;
|
|
348
|
+
text: z.ZodString;
|
|
349
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
350
|
+
streaming: "streaming";
|
|
351
|
+
done: "done";
|
|
352
|
+
}>>;
|
|
353
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
354
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
355
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
356
|
+
public: "public";
|
|
357
|
+
private: "private";
|
|
358
|
+
}>>;
|
|
359
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
360
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, z.core.$strip>>;
|
|
362
|
+
}, z.core.$loose>>;
|
|
363
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
364
|
+
type: z.ZodString;
|
|
365
|
+
toolCallId: z.ZodString;
|
|
366
|
+
toolName: z.ZodString;
|
|
367
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
368
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
369
|
+
state: z.ZodEnum<{
|
|
370
|
+
error: "error";
|
|
371
|
+
partial: "partial";
|
|
372
|
+
result: "result";
|
|
373
|
+
}>;
|
|
374
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
375
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
376
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
377
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
378
|
+
public: "public";
|
|
379
|
+
private: "private";
|
|
380
|
+
}>>;
|
|
381
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
382
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
383
|
+
}, z.core.$strip>>;
|
|
384
|
+
}, z.core.$loose>>;
|
|
385
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
386
|
+
type: z.ZodLiteral<"source-url">;
|
|
387
|
+
sourceId: z.ZodString;
|
|
388
|
+
url: z.ZodString;
|
|
389
|
+
title: z.ZodOptional<z.ZodString>;
|
|
390
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
391
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
392
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
393
|
+
public: "public";
|
|
394
|
+
private: "private";
|
|
395
|
+
}>>;
|
|
396
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
397
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
398
|
+
}, z.core.$strip>>;
|
|
399
|
+
}, z.core.$loose>>;
|
|
400
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
401
|
+
type: z.ZodLiteral<"source-document">;
|
|
402
|
+
sourceId: z.ZodString;
|
|
403
|
+
mediaType: z.ZodString;
|
|
404
|
+
title: z.ZodString;
|
|
405
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
406
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
407
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
409
|
+
public: "public";
|
|
410
|
+
private: "private";
|
|
411
|
+
}>>;
|
|
412
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
413
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
414
|
+
}, z.core.$strip>>;
|
|
415
|
+
}, z.core.$loose>>;
|
|
416
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
417
|
+
type: z.ZodLiteral<"step-start">;
|
|
418
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
419
|
+
type: z.ZodLiteral<"file">;
|
|
420
|
+
url: z.ZodString;
|
|
421
|
+
mediaType: z.ZodString;
|
|
422
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
423
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
424
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
425
|
+
type: z.ZodLiteral<"image">;
|
|
426
|
+
url: z.ZodString;
|
|
427
|
+
mediaType: z.ZodString;
|
|
428
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
429
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
430
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
431
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
254
432
|
}, z.core.$strip>, z.ZodObject<{
|
|
255
433
|
type: z.ZodLiteral<"event">;
|
|
256
434
|
eventType: z.ZodEnum<{
|
|
257
|
-
resolved: "resolved";
|
|
258
435
|
assigned: "assigned";
|
|
259
436
|
unassigned: "unassigned";
|
|
260
437
|
participant_requested: "participant_requested";
|
|
@@ -264,6 +441,7 @@ declare const realtimeSchema: {
|
|
|
264
441
|
priority_changed: "priority_changed";
|
|
265
442
|
tag_added: "tag_added";
|
|
266
443
|
tag_removed: "tag_removed";
|
|
444
|
+
resolved: "resolved";
|
|
267
445
|
reopened: "reopened";
|
|
268
446
|
visitor_blocked: "visitor_blocked";
|
|
269
447
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -274,20 +452,6 @@ declare const realtimeSchema: {
|
|
|
274
452
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
275
453
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
276
454
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
-
type: z.ZodLiteral<"image">;
|
|
279
|
-
url: z.ZodString;
|
|
280
|
-
mediaType: z.ZodString;
|
|
281
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
282
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
283
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
284
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
285
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
286
|
-
type: z.ZodLiteral<"file">;
|
|
287
|
-
url: z.ZodString;
|
|
288
|
-
mediaType: z.ZodString;
|
|
289
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
290
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
291
455
|
}, z.core.$strip>, z.ZodObject<{
|
|
292
456
|
type: z.ZodLiteral<"metadata">;
|
|
293
457
|
source: z.ZodEnum<{
|
|
@@ -320,10 +484,99 @@ declare const realtimeSchema: {
|
|
|
320
484
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
321
485
|
type: z.ZodLiteral<"text">;
|
|
322
486
|
text: z.ZodString;
|
|
487
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
488
|
+
streaming: "streaming";
|
|
489
|
+
done: "done";
|
|
490
|
+
}>>;
|
|
491
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
492
|
+
type: z.ZodLiteral<"reasoning">;
|
|
493
|
+
text: z.ZodString;
|
|
494
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
495
|
+
streaming: "streaming";
|
|
496
|
+
done: "done";
|
|
497
|
+
}>>;
|
|
498
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
499
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
500
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
501
|
+
public: "public";
|
|
502
|
+
private: "private";
|
|
503
|
+
}>>;
|
|
504
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
505
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
506
|
+
}, z.core.$strip>>;
|
|
507
|
+
}, z.core.$loose>>;
|
|
508
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
509
|
+
type: z.ZodString;
|
|
510
|
+
toolCallId: z.ZodString;
|
|
511
|
+
toolName: z.ZodString;
|
|
512
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
513
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
514
|
+
state: z.ZodEnum<{
|
|
515
|
+
error: "error";
|
|
516
|
+
partial: "partial";
|
|
517
|
+
result: "result";
|
|
518
|
+
}>;
|
|
519
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
520
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
522
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
523
|
+
public: "public";
|
|
524
|
+
private: "private";
|
|
525
|
+
}>>;
|
|
526
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
527
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
528
|
+
}, z.core.$strip>>;
|
|
529
|
+
}, z.core.$loose>>;
|
|
530
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
531
|
+
type: z.ZodLiteral<"source-url">;
|
|
532
|
+
sourceId: z.ZodString;
|
|
533
|
+
url: z.ZodString;
|
|
534
|
+
title: z.ZodOptional<z.ZodString>;
|
|
535
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
536
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
537
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
538
|
+
public: "public";
|
|
539
|
+
private: "private";
|
|
540
|
+
}>>;
|
|
541
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
542
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
543
|
+
}, z.core.$strip>>;
|
|
544
|
+
}, z.core.$loose>>;
|
|
545
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
546
|
+
type: z.ZodLiteral<"source-document">;
|
|
547
|
+
sourceId: z.ZodString;
|
|
548
|
+
mediaType: z.ZodString;
|
|
549
|
+
title: z.ZodString;
|
|
550
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
551
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
552
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
553
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
554
|
+
public: "public";
|
|
555
|
+
private: "private";
|
|
556
|
+
}>>;
|
|
557
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
558
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
559
|
+
}, z.core.$strip>>;
|
|
560
|
+
}, z.core.$loose>>;
|
|
561
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
562
|
+
type: z.ZodLiteral<"step-start">;
|
|
563
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
564
|
+
type: z.ZodLiteral<"file">;
|
|
565
|
+
url: z.ZodString;
|
|
566
|
+
mediaType: z.ZodString;
|
|
567
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
568
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
569
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
570
|
+
type: z.ZodLiteral<"image">;
|
|
571
|
+
url: z.ZodString;
|
|
572
|
+
mediaType: z.ZodString;
|
|
573
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
574
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
575
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
576
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
323
577
|
}, z.core.$strip>, z.ZodObject<{
|
|
324
578
|
type: z.ZodLiteral<"event">;
|
|
325
579
|
eventType: z.ZodEnum<{
|
|
326
|
-
resolved: "resolved";
|
|
327
580
|
assigned: "assigned";
|
|
328
581
|
unassigned: "unassigned";
|
|
329
582
|
participant_requested: "participant_requested";
|
|
@@ -333,6 +586,7 @@ declare const realtimeSchema: {
|
|
|
333
586
|
priority_changed: "priority_changed";
|
|
334
587
|
tag_added: "tag_added";
|
|
335
588
|
tag_removed: "tag_removed";
|
|
589
|
+
resolved: "resolved";
|
|
336
590
|
reopened: "reopened";
|
|
337
591
|
visitor_blocked: "visitor_blocked";
|
|
338
592
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -343,20 +597,6 @@ declare const realtimeSchema: {
|
|
|
343
597
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
344
598
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
345
599
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
346
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
-
type: z.ZodLiteral<"image">;
|
|
348
|
-
url: z.ZodString;
|
|
349
|
-
mediaType: z.ZodString;
|
|
350
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
351
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
352
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
353
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
354
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
355
|
-
type: z.ZodLiteral<"file">;
|
|
356
|
-
url: z.ZodString;
|
|
357
|
-
mediaType: z.ZodString;
|
|
358
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
359
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
360
600
|
}, z.core.$strip>, z.ZodObject<{
|
|
361
601
|
type: z.ZodLiteral<"metadata">;
|
|
362
602
|
source: z.ZodEnum<{
|
|
@@ -445,7 +685,6 @@ declare const realtimeSchema: {
|
|
|
445
685
|
conversationId: z.ZodString;
|
|
446
686
|
organizationId: z.ZodString;
|
|
447
687
|
type: z.ZodEnum<{
|
|
448
|
-
resolved: "resolved";
|
|
449
688
|
assigned: "assigned";
|
|
450
689
|
unassigned: "unassigned";
|
|
451
690
|
participant_requested: "participant_requested";
|
|
@@ -455,6 +694,7 @@ declare const realtimeSchema: {
|
|
|
455
694
|
priority_changed: "priority_changed";
|
|
456
695
|
tag_added: "tag_added";
|
|
457
696
|
tag_removed: "tag_removed";
|
|
697
|
+
resolved: "resolved";
|
|
458
698
|
reopened: "reopened";
|
|
459
699
|
visitor_blocked: "visitor_blocked";
|
|
460
700
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -471,6 +711,288 @@ declare const realtimeSchema: {
|
|
|
471
711
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
472
712
|
}, z.core.$strip>;
|
|
473
713
|
}, z.core.$strip>;
|
|
714
|
+
readonly conversationUpdated: z.ZodObject<{
|
|
715
|
+
websiteId: z.ZodString;
|
|
716
|
+
organizationId: z.ZodString;
|
|
717
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
718
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
719
|
+
conversationId: z.ZodString;
|
|
720
|
+
updates: z.ZodObject<{
|
|
721
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
722
|
+
sentiment: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
723
|
+
positive: "positive";
|
|
724
|
+
negative: "negative";
|
|
725
|
+
neutral: "neutral";
|
|
726
|
+
}>>>;
|
|
727
|
+
sentimentConfidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
728
|
+
escalatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
729
|
+
escalationReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
aiAgentId: z.ZodNullable<z.ZodString>;
|
|
732
|
+
}, z.core.$strip>;
|
|
733
|
+
readonly aiAgentProcessingStarted: z.ZodObject<{
|
|
734
|
+
websiteId: z.ZodString;
|
|
735
|
+
organizationId: z.ZodString;
|
|
736
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
737
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
738
|
+
conversationId: z.ZodString;
|
|
739
|
+
aiAgentId: z.ZodString;
|
|
740
|
+
workflowRunId: z.ZodString;
|
|
741
|
+
triggerMessageId: z.ZodString;
|
|
742
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
743
|
+
audience: z.ZodDefault<z.ZodEnum<{
|
|
744
|
+
all: "all";
|
|
745
|
+
dashboard: "dashboard";
|
|
746
|
+
}>>;
|
|
747
|
+
}, z.core.$strip>;
|
|
748
|
+
readonly aiAgentDecisionMade: z.ZodObject<{
|
|
749
|
+
websiteId: z.ZodString;
|
|
750
|
+
organizationId: z.ZodString;
|
|
751
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
752
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
753
|
+
conversationId: z.ZodString;
|
|
754
|
+
aiAgentId: z.ZodString;
|
|
755
|
+
workflowRunId: z.ZodString;
|
|
756
|
+
shouldAct: z.ZodBoolean;
|
|
757
|
+
reason: z.ZodString;
|
|
758
|
+
mode: z.ZodEnum<{
|
|
759
|
+
respond_to_visitor: "respond_to_visitor";
|
|
760
|
+
respond_to_command: "respond_to_command";
|
|
761
|
+
background_only: "background_only";
|
|
762
|
+
}>;
|
|
763
|
+
audience: z.ZodEnum<{
|
|
764
|
+
all: "all";
|
|
765
|
+
dashboard: "dashboard";
|
|
766
|
+
}>;
|
|
767
|
+
}, z.core.$strip>;
|
|
768
|
+
readonly aiAgentProcessingProgress: z.ZodObject<{
|
|
769
|
+
websiteId: z.ZodString;
|
|
770
|
+
organizationId: z.ZodString;
|
|
771
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
772
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
773
|
+
conversationId: z.ZodString;
|
|
774
|
+
aiAgentId: z.ZodString;
|
|
775
|
+
workflowRunId: z.ZodString;
|
|
776
|
+
phase: z.ZodString;
|
|
777
|
+
message: z.ZodNullable<z.ZodString>;
|
|
778
|
+
tool: z.ZodOptional<z.ZodObject<{
|
|
779
|
+
toolCallId: z.ZodString;
|
|
780
|
+
toolName: z.ZodString;
|
|
781
|
+
state: z.ZodEnum<{
|
|
782
|
+
error: "error";
|
|
783
|
+
partial: "partial";
|
|
784
|
+
result: "result";
|
|
785
|
+
}>;
|
|
786
|
+
}, z.core.$strip>>;
|
|
787
|
+
audience: z.ZodDefault<z.ZodEnum<{
|
|
788
|
+
all: "all";
|
|
789
|
+
dashboard: "dashboard";
|
|
790
|
+
}>>;
|
|
791
|
+
}, z.core.$strip>;
|
|
792
|
+
readonly aiAgentProcessingCompleted: z.ZodObject<{
|
|
793
|
+
websiteId: z.ZodString;
|
|
794
|
+
organizationId: z.ZodString;
|
|
795
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
796
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
797
|
+
conversationId: z.ZodString;
|
|
798
|
+
aiAgentId: z.ZodString;
|
|
799
|
+
workflowRunId: z.ZodString;
|
|
800
|
+
status: z.ZodEnum<{
|
|
801
|
+
error: "error";
|
|
802
|
+
success: "success";
|
|
803
|
+
skipped: "skipped";
|
|
804
|
+
cancelled: "cancelled";
|
|
805
|
+
}>;
|
|
806
|
+
action: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
807
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
808
|
+
audience: z.ZodDefault<z.ZodEnum<{
|
|
809
|
+
all: "all";
|
|
810
|
+
dashboard: "dashboard";
|
|
811
|
+
}>>;
|
|
812
|
+
}, z.core.$strip>;
|
|
813
|
+
readonly timelineItemUpdated: z.ZodObject<{
|
|
814
|
+
websiteId: z.ZodString;
|
|
815
|
+
organizationId: z.ZodString;
|
|
816
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
817
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
818
|
+
conversationId: z.ZodString;
|
|
819
|
+
item: z.ZodObject<{
|
|
820
|
+
id: z.ZodString;
|
|
821
|
+
conversationId: z.ZodString;
|
|
822
|
+
organizationId: z.ZodString;
|
|
823
|
+
visibility: z.ZodEnum<{
|
|
824
|
+
public: "public";
|
|
825
|
+
private: "private";
|
|
826
|
+
}>;
|
|
827
|
+
type: z.ZodEnum<{
|
|
828
|
+
message: "message";
|
|
829
|
+
event: "event";
|
|
830
|
+
identification: "identification";
|
|
831
|
+
}>;
|
|
832
|
+
text: z.ZodNullable<z.ZodString>;
|
|
833
|
+
parts: z.ZodArray<z.ZodUnknown>;
|
|
834
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
835
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
836
|
+
aiAgentId: z.ZodNullable<z.ZodString>;
|
|
837
|
+
createdAt: z.ZodString;
|
|
838
|
+
deletedAt: z.ZodNullable<z.ZodString>;
|
|
839
|
+
tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
840
|
+
}, z.core.$strip>;
|
|
841
|
+
}, z.core.$strip>;
|
|
842
|
+
readonly timelineItemPartUpdated: z.ZodObject<{
|
|
843
|
+
websiteId: z.ZodString;
|
|
844
|
+
organizationId: z.ZodString;
|
|
845
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
846
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
847
|
+
conversationId: z.ZodString;
|
|
848
|
+
timelineItemId: z.ZodString;
|
|
849
|
+
partIndex: z.ZodNumber;
|
|
850
|
+
part: z.ZodUnknown;
|
|
851
|
+
}, z.core.$strip>;
|
|
852
|
+
readonly crawlStarted: z.ZodObject<{
|
|
853
|
+
websiteId: z.ZodString;
|
|
854
|
+
organizationId: z.ZodString;
|
|
855
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
856
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
857
|
+
linkSourceId: z.ZodString;
|
|
858
|
+
url: z.ZodString;
|
|
859
|
+
discoveredPages: z.ZodArray<z.ZodObject<{
|
|
860
|
+
url: z.ZodString;
|
|
861
|
+
title: z.ZodNullable<z.ZodString>;
|
|
862
|
+
depth: z.ZodNumber;
|
|
863
|
+
}, z.core.$strip>>;
|
|
864
|
+
totalPagesCount: z.ZodNumber;
|
|
865
|
+
}, z.core.$strip>;
|
|
866
|
+
readonly crawlProgress: z.ZodObject<{
|
|
867
|
+
websiteId: z.ZodString;
|
|
868
|
+
organizationId: z.ZodString;
|
|
869
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
870
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
871
|
+
linkSourceId: z.ZodString;
|
|
872
|
+
url: z.ZodString;
|
|
873
|
+
page: z.ZodObject<{
|
|
874
|
+
url: z.ZodString;
|
|
875
|
+
title: z.ZodNullable<z.ZodString>;
|
|
876
|
+
status: z.ZodEnum<{
|
|
877
|
+
pending: "pending";
|
|
878
|
+
crawling: "crawling";
|
|
879
|
+
completed: "completed";
|
|
880
|
+
failed: "failed";
|
|
881
|
+
}>;
|
|
882
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
883
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
884
|
+
}, z.core.$strip>;
|
|
885
|
+
completedCount: z.ZodNumber;
|
|
886
|
+
totalCount: z.ZodNumber;
|
|
887
|
+
}, z.core.$strip>;
|
|
888
|
+
readonly crawlCompleted: z.ZodObject<{
|
|
889
|
+
websiteId: z.ZodString;
|
|
890
|
+
organizationId: z.ZodString;
|
|
891
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
892
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
893
|
+
linkSourceId: z.ZodString;
|
|
894
|
+
url: z.ZodString;
|
|
895
|
+
crawledPagesCount: z.ZodNumber;
|
|
896
|
+
totalSizeBytes: z.ZodNumber;
|
|
897
|
+
failedPagesCount: z.ZodNumber;
|
|
898
|
+
}, z.core.$strip>;
|
|
899
|
+
readonly crawlFailed: z.ZodObject<{
|
|
900
|
+
websiteId: z.ZodString;
|
|
901
|
+
organizationId: z.ZodString;
|
|
902
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
903
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
904
|
+
linkSourceId: z.ZodString;
|
|
905
|
+
url: z.ZodString;
|
|
906
|
+
error: z.ZodString;
|
|
907
|
+
}, z.core.$strip>;
|
|
908
|
+
readonly linkSourceUpdated: z.ZodObject<{
|
|
909
|
+
websiteId: z.ZodString;
|
|
910
|
+
organizationId: z.ZodString;
|
|
911
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
912
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
913
|
+
linkSourceId: z.ZodString;
|
|
914
|
+
status: z.ZodEnum<{
|
|
915
|
+
pending: "pending";
|
|
916
|
+
mapping: "mapping";
|
|
917
|
+
crawling: "crawling";
|
|
918
|
+
completed: "completed";
|
|
919
|
+
failed: "failed";
|
|
920
|
+
}>;
|
|
921
|
+
discoveredPagesCount: z.ZodOptional<z.ZodNumber>;
|
|
922
|
+
crawledPagesCount: z.ZodOptional<z.ZodNumber>;
|
|
923
|
+
totalSizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
924
|
+
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
925
|
+
}, z.core.$strip>;
|
|
926
|
+
readonly crawlPagesDiscovered: z.ZodObject<{
|
|
927
|
+
websiteId: z.ZodString;
|
|
928
|
+
organizationId: z.ZodString;
|
|
929
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
930
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
931
|
+
linkSourceId: z.ZodString;
|
|
932
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
933
|
+
url: z.ZodString;
|
|
934
|
+
path: z.ZodString;
|
|
935
|
+
depth: z.ZodNumber;
|
|
936
|
+
}, z.core.$strip>>;
|
|
937
|
+
}, z.core.$strip>;
|
|
938
|
+
readonly crawlPageCompleted: z.ZodObject<{
|
|
939
|
+
websiteId: z.ZodString;
|
|
940
|
+
organizationId: z.ZodString;
|
|
941
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
942
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
943
|
+
linkSourceId: z.ZodString;
|
|
944
|
+
page: z.ZodObject<{
|
|
945
|
+
url: z.ZodString;
|
|
946
|
+
title: z.ZodNullable<z.ZodString>;
|
|
947
|
+
sizeBytes: z.ZodNumber;
|
|
948
|
+
knowledgeId: z.ZodString;
|
|
949
|
+
}, z.core.$strip>;
|
|
950
|
+
}, z.core.$strip>;
|
|
951
|
+
readonly trainingStarted: z.ZodObject<{
|
|
952
|
+
websiteId: z.ZodString;
|
|
953
|
+
organizationId: z.ZodString;
|
|
954
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
955
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
956
|
+
aiAgentId: z.ZodString;
|
|
957
|
+
totalItems: z.ZodNumber;
|
|
958
|
+
}, z.core.$strip>;
|
|
959
|
+
readonly trainingProgress: z.ZodObject<{
|
|
960
|
+
websiteId: z.ZodString;
|
|
961
|
+
organizationId: z.ZodString;
|
|
962
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
963
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
964
|
+
aiAgentId: z.ZodString;
|
|
965
|
+
processedItems: z.ZodNumber;
|
|
966
|
+
totalItems: z.ZodNumber;
|
|
967
|
+
currentItem: z.ZodOptional<z.ZodObject<{
|
|
968
|
+
id: z.ZodString;
|
|
969
|
+
title: z.ZodNullable<z.ZodString>;
|
|
970
|
+
type: z.ZodEnum<{
|
|
971
|
+
url: "url";
|
|
972
|
+
faq: "faq";
|
|
973
|
+
article: "article";
|
|
974
|
+
}>;
|
|
975
|
+
}, z.core.$strip>>;
|
|
976
|
+
percentage: z.ZodNumber;
|
|
977
|
+
}, z.core.$strip>;
|
|
978
|
+
readonly trainingCompleted: z.ZodObject<{
|
|
979
|
+
websiteId: z.ZodString;
|
|
980
|
+
organizationId: z.ZodString;
|
|
981
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
982
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
983
|
+
aiAgentId: z.ZodString;
|
|
984
|
+
totalItems: z.ZodNumber;
|
|
985
|
+
totalChunks: z.ZodNumber;
|
|
986
|
+
duration: z.ZodNumber;
|
|
987
|
+
}, z.core.$strip>;
|
|
988
|
+
readonly trainingFailed: z.ZodObject<{
|
|
989
|
+
websiteId: z.ZodString;
|
|
990
|
+
organizationId: z.ZodString;
|
|
991
|
+
visitorId: z.ZodNullable<z.ZodString>;
|
|
992
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
993
|
+
aiAgentId: z.ZodString;
|
|
994
|
+
error: z.ZodString;
|
|
995
|
+
}, z.core.$strip>;
|
|
474
996
|
};
|
|
475
997
|
type RealtimeEventType = keyof typeof realtimeSchema;
|
|
476
998
|
type RealtimeEventPayload<T extends RealtimeEventType> = z.infer<(typeof realtimeSchema)[T]>;
|