@cossistant/types 0.0.29 → 0.0.31
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 +28 -40
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +17 -25
- package/api/ai-agent.js.map +1 -1
- package/api/common.d.ts.map +1 -1
- package/api/contact.d.ts.map +1 -1
- package/api/conversation.d.ts +468 -71
- package/api/conversation.d.ts.map +1 -1
- package/api/conversation.js +13 -1
- package/api/conversation.js.map +1 -1
- package/api/index.d.ts +4 -4
- package/api/index.js +4 -4
- package/api/knowledge.d.ts +57 -25
- package/api/knowledge.d.ts.map +1 -1
- package/api/knowledge.js +61 -11
- package/api/knowledge.js.map +1 -1
- package/api/link-source.d.ts +6 -4
- package/api/link-source.d.ts.map +1 -1
- package/api/link-source.js +8 -0
- package/api/link-source.js.map +1 -1
- package/api/timeline-item.d.ts +574 -85
- 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/index.d.ts +6 -6
- package/index.js +6 -6
- package/package.json +1 -1
- package/realtime-events.d.ts +445 -43
- package/realtime-events.d.ts.map +1 -1
- package/realtime-events.js +116 -1
- package/realtime-events.js.map +1 -1
- package/schemas.d.ts +92 -14
- package/schemas.d.ts.map +1 -1
- package/schemas.js +2 -0
- package/schemas.js.map +1 -1
- package/trpc/conversation.d.ts +406 -57
- package/trpc/conversation.d.ts.map +1 -1
- package/trpc/conversation.js +32 -1
- package/trpc/conversation.js.map +1 -1
- package/trpc/visitor.d.ts +2 -0
- package/trpc/visitor.d.ts.map +1 -1
package/trpc/conversation.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ declare const conversationRecordSchema: z.ZodObject<{
|
|
|
42
42
|
channel: z.ZodString;
|
|
43
43
|
title: z.ZodNullable<z.ZodString>;
|
|
44
44
|
resolutionTime: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
visitorRating: z.ZodNullable<z.ZodNumber>;
|
|
46
|
+
visitorRatingAt: z.ZodNullable<z.ZodString>;
|
|
45
47
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
46
48
|
firstResponseAt: z.ZodNullable<z.ZodString>;
|
|
47
49
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -86,6 +88,8 @@ declare const conversationMutationResponseSchema: z.ZodObject<{
|
|
|
86
88
|
channel: z.ZodString;
|
|
87
89
|
title: z.ZodNullable<z.ZodString>;
|
|
88
90
|
resolutionTime: z.ZodNullable<z.ZodNumber>;
|
|
91
|
+
visitorRating: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
visitorRatingAt: z.ZodNullable<z.ZodString>;
|
|
89
93
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
90
94
|
firstResponseAt: z.ZodNullable<z.ZodString>;
|
|
91
95
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -137,6 +141,8 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
137
141
|
channel: z.ZodString;
|
|
138
142
|
title: z.ZodNullable<z.ZodString>;
|
|
139
143
|
resolutionTime: z.ZodNullable<z.ZodNumber>;
|
|
144
|
+
visitorRating: z.ZodNullable<z.ZodNumber>;
|
|
145
|
+
visitorRatingAt: z.ZodNullable<z.ZodString>;
|
|
140
146
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
141
147
|
firstResponseAt: z.ZodNullable<z.ZodString>;
|
|
142
148
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -171,6 +177,96 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
171
177
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
172
178
|
type: z.ZodLiteral<"text">;
|
|
173
179
|
text: z.ZodString;
|
|
180
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
181
|
+
streaming: "streaming";
|
|
182
|
+
done: "done";
|
|
183
|
+
}>>;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
type: z.ZodLiteral<"reasoning">;
|
|
186
|
+
text: z.ZodString;
|
|
187
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
streaming: "streaming";
|
|
189
|
+
done: "done";
|
|
190
|
+
}>>;
|
|
191
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
194
|
+
public: "public";
|
|
195
|
+
private: "private";
|
|
196
|
+
}>>;
|
|
197
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
198
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>>;
|
|
200
|
+
}, z.core.$loose>>;
|
|
201
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
202
|
+
type: z.ZodString;
|
|
203
|
+
toolCallId: z.ZodString;
|
|
204
|
+
toolName: z.ZodString;
|
|
205
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
206
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
207
|
+
state: z.ZodEnum<{
|
|
208
|
+
error: "error";
|
|
209
|
+
partial: "partial";
|
|
210
|
+
result: "result";
|
|
211
|
+
}>;
|
|
212
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
213
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
214
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
216
|
+
public: "public";
|
|
217
|
+
private: "private";
|
|
218
|
+
}>>;
|
|
219
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
220
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
}, z.core.$loose>>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
type: z.ZodLiteral<"source-url">;
|
|
225
|
+
sourceId: z.ZodString;
|
|
226
|
+
url: z.ZodString;
|
|
227
|
+
title: z.ZodOptional<z.ZodString>;
|
|
228
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
231
|
+
public: "public";
|
|
232
|
+
private: "private";
|
|
233
|
+
}>>;
|
|
234
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
235
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
236
|
+
}, z.core.$strip>>;
|
|
237
|
+
}, z.core.$loose>>;
|
|
238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
+
type: z.ZodLiteral<"source-document">;
|
|
240
|
+
sourceId: z.ZodString;
|
|
241
|
+
mediaType: z.ZodString;
|
|
242
|
+
title: z.ZodString;
|
|
243
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
244
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
247
|
+
public: "public";
|
|
248
|
+
private: "private";
|
|
249
|
+
}>>;
|
|
250
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
251
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
}, z.core.$loose>>;
|
|
254
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
255
|
+
type: z.ZodLiteral<"step-start">;
|
|
256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
257
|
+
type: z.ZodLiteral<"file">;
|
|
258
|
+
url: z.ZodString;
|
|
259
|
+
mediaType: z.ZodString;
|
|
260
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
261
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
263
|
+
type: z.ZodLiteral<"image">;
|
|
264
|
+
url: z.ZodString;
|
|
265
|
+
mediaType: z.ZodString;
|
|
266
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
267
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
174
270
|
}, z.core.$strip>, z.ZodObject<{
|
|
175
271
|
type: z.ZodLiteral<"event">;
|
|
176
272
|
eventType: z.ZodEnum<{
|
|
@@ -194,20 +290,6 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
194
290
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
195
291
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
196
292
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
198
|
-
type: z.ZodLiteral<"image">;
|
|
199
|
-
url: z.ZodString;
|
|
200
|
-
mediaType: z.ZodString;
|
|
201
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
202
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
203
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
204
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
205
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
206
|
-
type: z.ZodLiteral<"file">;
|
|
207
|
-
url: z.ZodString;
|
|
208
|
-
mediaType: z.ZodString;
|
|
209
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
210
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
211
293
|
}, z.core.$strip>, z.ZodObject<{
|
|
212
294
|
type: z.ZodLiteral<"metadata">;
|
|
213
295
|
source: z.ZodEnum<{
|
|
@@ -240,6 +322,96 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
240
322
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
241
323
|
type: z.ZodLiteral<"text">;
|
|
242
324
|
text: z.ZodString;
|
|
325
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
326
|
+
streaming: "streaming";
|
|
327
|
+
done: "done";
|
|
328
|
+
}>>;
|
|
329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
+
type: z.ZodLiteral<"reasoning">;
|
|
331
|
+
text: z.ZodString;
|
|
332
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
333
|
+
streaming: "streaming";
|
|
334
|
+
done: "done";
|
|
335
|
+
}>>;
|
|
336
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
339
|
+
public: "public";
|
|
340
|
+
private: "private";
|
|
341
|
+
}>>;
|
|
342
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
343
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
344
|
+
}, z.core.$strip>>;
|
|
345
|
+
}, z.core.$loose>>;
|
|
346
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
+
type: z.ZodString;
|
|
348
|
+
toolCallId: z.ZodString;
|
|
349
|
+
toolName: z.ZodString;
|
|
350
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
351
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
352
|
+
state: z.ZodEnum<{
|
|
353
|
+
error: "error";
|
|
354
|
+
partial: "partial";
|
|
355
|
+
result: "result";
|
|
356
|
+
}>;
|
|
357
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
358
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
361
|
+
public: "public";
|
|
362
|
+
private: "private";
|
|
363
|
+
}>>;
|
|
364
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
365
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
366
|
+
}, z.core.$strip>>;
|
|
367
|
+
}, z.core.$loose>>;
|
|
368
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
369
|
+
type: z.ZodLiteral<"source-url">;
|
|
370
|
+
sourceId: z.ZodString;
|
|
371
|
+
url: z.ZodString;
|
|
372
|
+
title: z.ZodOptional<z.ZodString>;
|
|
373
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
374
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
375
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
376
|
+
public: "public";
|
|
377
|
+
private: "private";
|
|
378
|
+
}>>;
|
|
379
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
380
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
381
|
+
}, z.core.$strip>>;
|
|
382
|
+
}, z.core.$loose>>;
|
|
383
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
384
|
+
type: z.ZodLiteral<"source-document">;
|
|
385
|
+
sourceId: z.ZodString;
|
|
386
|
+
mediaType: z.ZodString;
|
|
387
|
+
title: z.ZodString;
|
|
388
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
389
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
390
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
391
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
392
|
+
public: "public";
|
|
393
|
+
private: "private";
|
|
394
|
+
}>>;
|
|
395
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
396
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
397
|
+
}, z.core.$strip>>;
|
|
398
|
+
}, z.core.$loose>>;
|
|
399
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
400
|
+
type: z.ZodLiteral<"step-start">;
|
|
401
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
402
|
+
type: z.ZodLiteral<"file">;
|
|
403
|
+
url: z.ZodString;
|
|
404
|
+
mediaType: z.ZodString;
|
|
405
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
406
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
407
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
408
|
+
type: z.ZodLiteral<"image">;
|
|
409
|
+
url: z.ZodString;
|
|
410
|
+
mediaType: z.ZodString;
|
|
411
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
412
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
413
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
414
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
243
415
|
}, z.core.$strip>, z.ZodObject<{
|
|
244
416
|
type: z.ZodLiteral<"event">;
|
|
245
417
|
eventType: z.ZodEnum<{
|
|
@@ -263,20 +435,6 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
263
435
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
264
436
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
265
437
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
266
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
-
type: z.ZodLiteral<"image">;
|
|
268
|
-
url: z.ZodString;
|
|
269
|
-
mediaType: z.ZodString;
|
|
270
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
271
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
272
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
273
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
274
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
-
type: z.ZodLiteral<"file">;
|
|
276
|
-
url: z.ZodString;
|
|
277
|
-
mediaType: z.ZodString;
|
|
278
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
279
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
280
438
|
}, z.core.$strip>, z.ZodObject<{
|
|
281
439
|
type: z.ZodLiteral<"metadata">;
|
|
282
440
|
source: z.ZodEnum<{
|
|
@@ -338,6 +496,8 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
338
496
|
channel: z.ZodString;
|
|
339
497
|
title: z.ZodNullable<z.ZodString>;
|
|
340
498
|
resolutionTime: z.ZodNullable<z.ZodNumber>;
|
|
499
|
+
visitorRating: z.ZodNullable<z.ZodNumber>;
|
|
500
|
+
visitorRatingAt: z.ZodNullable<z.ZodString>;
|
|
341
501
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
342
502
|
firstResponseAt: z.ZodNullable<z.ZodString>;
|
|
343
503
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -372,6 +532,96 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
372
532
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
373
533
|
type: z.ZodLiteral<"text">;
|
|
374
534
|
text: z.ZodString;
|
|
535
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
536
|
+
streaming: "streaming";
|
|
537
|
+
done: "done";
|
|
538
|
+
}>>;
|
|
539
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
540
|
+
type: z.ZodLiteral<"reasoning">;
|
|
541
|
+
text: z.ZodString;
|
|
542
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
543
|
+
streaming: "streaming";
|
|
544
|
+
done: "done";
|
|
545
|
+
}>>;
|
|
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.ZodString;
|
|
558
|
+
toolCallId: z.ZodString;
|
|
559
|
+
toolName: z.ZodString;
|
|
560
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
561
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
562
|
+
state: z.ZodEnum<{
|
|
563
|
+
error: "error";
|
|
564
|
+
partial: "partial";
|
|
565
|
+
result: "result";
|
|
566
|
+
}>;
|
|
567
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
568
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
569
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
570
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
571
|
+
public: "public";
|
|
572
|
+
private: "private";
|
|
573
|
+
}>>;
|
|
574
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
575
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
576
|
+
}, z.core.$strip>>;
|
|
577
|
+
}, z.core.$loose>>;
|
|
578
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
579
|
+
type: z.ZodLiteral<"source-url">;
|
|
580
|
+
sourceId: z.ZodString;
|
|
581
|
+
url: z.ZodString;
|
|
582
|
+
title: z.ZodOptional<z.ZodString>;
|
|
583
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
584
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
585
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
586
|
+
public: "public";
|
|
587
|
+
private: "private";
|
|
588
|
+
}>>;
|
|
589
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
590
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
591
|
+
}, z.core.$strip>>;
|
|
592
|
+
}, z.core.$loose>>;
|
|
593
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
594
|
+
type: z.ZodLiteral<"source-document">;
|
|
595
|
+
sourceId: z.ZodString;
|
|
596
|
+
mediaType: z.ZodString;
|
|
597
|
+
title: z.ZodString;
|
|
598
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
599
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
600
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
601
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
602
|
+
public: "public";
|
|
603
|
+
private: "private";
|
|
604
|
+
}>>;
|
|
605
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
606
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
607
|
+
}, z.core.$strip>>;
|
|
608
|
+
}, z.core.$loose>>;
|
|
609
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
610
|
+
type: z.ZodLiteral<"step-start">;
|
|
611
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
612
|
+
type: z.ZodLiteral<"file">;
|
|
613
|
+
url: z.ZodString;
|
|
614
|
+
mediaType: z.ZodString;
|
|
615
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
616
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
617
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
618
|
+
type: z.ZodLiteral<"image">;
|
|
619
|
+
url: z.ZodString;
|
|
620
|
+
mediaType: z.ZodString;
|
|
621
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
622
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
623
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
624
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
375
625
|
}, z.core.$strip>, z.ZodObject<{
|
|
376
626
|
type: z.ZodLiteral<"event">;
|
|
377
627
|
eventType: z.ZodEnum<{
|
|
@@ -395,20 +645,6 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
395
645
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
396
646
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
397
647
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
398
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
399
|
-
type: z.ZodLiteral<"image">;
|
|
400
|
-
url: z.ZodString;
|
|
401
|
-
mediaType: z.ZodString;
|
|
402
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
403
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
404
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
405
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
406
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
-
type: z.ZodLiteral<"file">;
|
|
408
|
-
url: z.ZodString;
|
|
409
|
-
mediaType: z.ZodString;
|
|
410
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
411
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
412
648
|
}, z.core.$strip>, z.ZodObject<{
|
|
413
649
|
type: z.ZodLiteral<"metadata">;
|
|
414
650
|
source: z.ZodEnum<{
|
|
@@ -441,6 +677,96 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
441
677
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
442
678
|
type: z.ZodLiteral<"text">;
|
|
443
679
|
text: z.ZodString;
|
|
680
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
681
|
+
streaming: "streaming";
|
|
682
|
+
done: "done";
|
|
683
|
+
}>>;
|
|
684
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
685
|
+
type: z.ZodLiteral<"reasoning">;
|
|
686
|
+
text: z.ZodString;
|
|
687
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
688
|
+
streaming: "streaming";
|
|
689
|
+
done: "done";
|
|
690
|
+
}>>;
|
|
691
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
692
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
693
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
694
|
+
public: "public";
|
|
695
|
+
private: "private";
|
|
696
|
+
}>>;
|
|
697
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
698
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
699
|
+
}, z.core.$strip>>;
|
|
700
|
+
}, z.core.$loose>>;
|
|
701
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
702
|
+
type: z.ZodString;
|
|
703
|
+
toolCallId: z.ZodString;
|
|
704
|
+
toolName: z.ZodString;
|
|
705
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
706
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
707
|
+
state: z.ZodEnum<{
|
|
708
|
+
error: "error";
|
|
709
|
+
partial: "partial";
|
|
710
|
+
result: "result";
|
|
711
|
+
}>;
|
|
712
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
713
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
714
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
715
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
716
|
+
public: "public";
|
|
717
|
+
private: "private";
|
|
718
|
+
}>>;
|
|
719
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
720
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
721
|
+
}, z.core.$strip>>;
|
|
722
|
+
}, z.core.$loose>>;
|
|
723
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
724
|
+
type: z.ZodLiteral<"source-url">;
|
|
725
|
+
sourceId: z.ZodString;
|
|
726
|
+
url: z.ZodString;
|
|
727
|
+
title: z.ZodOptional<z.ZodString>;
|
|
728
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
729
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
730
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
731
|
+
public: "public";
|
|
732
|
+
private: "private";
|
|
733
|
+
}>>;
|
|
734
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
735
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
736
|
+
}, z.core.$strip>>;
|
|
737
|
+
}, z.core.$loose>>;
|
|
738
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
739
|
+
type: z.ZodLiteral<"source-document">;
|
|
740
|
+
sourceId: z.ZodString;
|
|
741
|
+
mediaType: z.ZodString;
|
|
742
|
+
title: z.ZodString;
|
|
743
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
744
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
745
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
746
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
747
|
+
public: "public";
|
|
748
|
+
private: "private";
|
|
749
|
+
}>>;
|
|
750
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
751
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
752
|
+
}, z.core.$strip>>;
|
|
753
|
+
}, z.core.$loose>>;
|
|
754
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
755
|
+
type: z.ZodLiteral<"step-start">;
|
|
756
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
757
|
+
type: z.ZodLiteral<"file">;
|
|
758
|
+
url: z.ZodString;
|
|
759
|
+
mediaType: z.ZodString;
|
|
760
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
761
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
762
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
763
|
+
type: z.ZodLiteral<"image">;
|
|
764
|
+
url: z.ZodString;
|
|
765
|
+
mediaType: z.ZodString;
|
|
766
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
767
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
768
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
769
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
444
770
|
}, z.core.$strip>, z.ZodObject<{
|
|
445
771
|
type: z.ZodLiteral<"event">;
|
|
446
772
|
eventType: z.ZodEnum<{
|
|
@@ -464,20 +790,6 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
464
790
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
465
791
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
466
792
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
467
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
468
|
-
type: z.ZodLiteral<"image">;
|
|
469
|
-
url: z.ZodString;
|
|
470
|
-
mediaType: z.ZodString;
|
|
471
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
472
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
473
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
474
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
475
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
476
|
-
type: z.ZodLiteral<"file">;
|
|
477
|
-
url: z.ZodString;
|
|
478
|
-
mediaType: z.ZodString;
|
|
479
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
480
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
481
793
|
}, z.core.$strip>, z.ZodObject<{
|
|
482
794
|
type: z.ZodLiteral<"metadata">;
|
|
483
795
|
source: z.ZodEnum<{
|
|
@@ -507,8 +819,45 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
507
819
|
}, z.core.$strip>>;
|
|
508
820
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
509
821
|
}, z.core.$strip>;
|
|
822
|
+
declare const inboxAnalyticsRangeSchema: z.ZodUnion<readonly [z.ZodLiteral<7>, z.ZodLiteral<14>, z.ZodLiteral<30>]>;
|
|
823
|
+
declare const inboxAnalyticsRequestSchema: z.ZodObject<{
|
|
824
|
+
websiteSlug: z.ZodString;
|
|
825
|
+
rangeDays: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<7>, z.ZodLiteral<14>, z.ZodLiteral<30>]>>>;
|
|
826
|
+
}, z.core.$strip>;
|
|
827
|
+
declare const inboxAnalyticsMetricsSchema: z.ZodObject<{
|
|
828
|
+
medianResponseTimeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
829
|
+
medianResolutionTimeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
830
|
+
aiHandledRate: z.ZodNullable<z.ZodNumber>;
|
|
831
|
+
satisfactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
832
|
+
uniqueVisitors: z.ZodNumber;
|
|
833
|
+
}, z.core.$strip>;
|
|
834
|
+
declare const inboxAnalyticsResponseSchema: z.ZodObject<{
|
|
835
|
+
range: z.ZodObject<{
|
|
836
|
+
rangeDays: z.ZodUnion<readonly [z.ZodLiteral<7>, z.ZodLiteral<14>, z.ZodLiteral<30>]>;
|
|
837
|
+
currentStart: z.ZodString;
|
|
838
|
+
currentEnd: z.ZodString;
|
|
839
|
+
previousStart: z.ZodString;
|
|
840
|
+
previousEnd: z.ZodString;
|
|
841
|
+
}, z.core.$strip>;
|
|
842
|
+
current: z.ZodObject<{
|
|
843
|
+
medianResponseTimeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
844
|
+
medianResolutionTimeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
845
|
+
aiHandledRate: z.ZodNullable<z.ZodNumber>;
|
|
846
|
+
satisfactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
847
|
+
uniqueVisitors: z.ZodNumber;
|
|
848
|
+
}, z.core.$strip>;
|
|
849
|
+
previous: z.ZodObject<{
|
|
850
|
+
medianResponseTimeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
851
|
+
medianResolutionTimeSeconds: z.ZodNullable<z.ZodNumber>;
|
|
852
|
+
aiHandledRate: z.ZodNullable<z.ZodNumber>;
|
|
853
|
+
satisfactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
854
|
+
uniqueVisitors: z.ZodNumber;
|
|
855
|
+
}, z.core.$strip>;
|
|
856
|
+
}, z.core.$strip>;
|
|
510
857
|
type ConversationMutationResponse = z.infer<typeof conversationMutationResponseSchema>;
|
|
511
858
|
type ConversationHeader = z.infer<typeof conversationHeaderSchema>;
|
|
859
|
+
type InboxAnalyticsRequest = z.infer<typeof inboxAnalyticsRequestSchema>;
|
|
860
|
+
type InboxAnalyticsResponse = z.infer<typeof inboxAnalyticsResponseSchema>;
|
|
512
861
|
//#endregion
|
|
513
|
-
export { ConversationHeader, ConversationMutationResponse, ConversationRecordResponse, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, listConversationHeadersResponseSchema };
|
|
862
|
+
export { ConversationHeader, ConversationMutationResponse, ConversationRecordResponse, InboxAnalyticsRequest, InboxAnalyticsResponse, conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, listConversationHeadersResponseSchema };
|
|
514
863
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":[],"mappings":";;;cAUa,0BAAwB,CAAA,CAAA;;EAAxB,QAAA,EAAA,UAAA;EAMA,IAAA,EAAA,MAAA;AAOb,CAAA,CAAA;AAQa,cAfA,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":[],"mappings":";;;cAUa,0BAAwB,CAAA,CAAA;;EAAxB,QAAA,EAAA,UAAA;EAMA,IAAA,EAAA,MAAA;AAOb,CAAA,CAAA;AAQa,cAfA,0BA+CX,EA/CqC,CAAA,CAAA,OA+CrC,CAAA;;;;;;cAxCW,6BAA2B,CAAA,CAAA,YAAA,CAAA,CAAA;;;;;cAQ3B,0BAAwB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,SAAA,aAAA;EAAA,SAAA,aAAA;EAkCz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A,CAAA,mBAAA,CAAA,CAAA,eAAA,CAAA,CAAA,gBAAA,CAAA,CAAA;cAMzB,6BAA2B,CAAA,CAAA;;;;cAK3B,6BAA2B,CAAA,CAAA;;;;;;;cAQ3B,8BAA4B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;KAY7B,4BAAA,GAA+B,CAAA,CAAE,aACrC;KAGI,kBAAA,GAAqB,CAAA,CAAE,aAAa;KAEpC,qBAAA,GAAwB,CAAA,CAAE,aAAa;KACvC,sBAAA,GAAyB,CAAA,CAAE,aAC/B"}
|
package/trpc/conversation.js
CHANGED
|
@@ -33,6 +33,8 @@ const conversationRecordSchema = z.object({
|
|
|
33
33
|
channel: z.string(),
|
|
34
34
|
title: z.string().nullable(),
|
|
35
35
|
resolutionTime: z.number().nullable(),
|
|
36
|
+
visitorRating: z.number().int().min(1).max(5).nullable(),
|
|
37
|
+
visitorRatingAt: z.string().nullable(),
|
|
36
38
|
startedAt: z.string().nullable(),
|
|
37
39
|
firstResponseAt: z.string().nullable(),
|
|
38
40
|
resolvedAt: z.string().nullable(),
|
|
@@ -62,6 +64,8 @@ const conversationHeaderSchema = z.object({
|
|
|
62
64
|
channel: z.string(),
|
|
63
65
|
title: z.string().nullable(),
|
|
64
66
|
resolutionTime: z.number().nullable(),
|
|
67
|
+
visitorRating: z.number().int().min(1).max(5).nullable(),
|
|
68
|
+
visitorRatingAt: z.string().nullable(),
|
|
65
69
|
startedAt: z.string().nullable(),
|
|
66
70
|
firstResponseAt: z.string().nullable(),
|
|
67
71
|
resolvedAt: z.string().nullable(),
|
|
@@ -87,7 +91,34 @@ const listConversationHeadersResponseSchema = z.object({
|
|
|
87
91
|
items: z.array(conversationHeaderSchema),
|
|
88
92
|
nextCursor: z.string().nullable()
|
|
89
93
|
});
|
|
94
|
+
const inboxAnalyticsRangeSchema = z.union([
|
|
95
|
+
z.literal(7),
|
|
96
|
+
z.literal(14),
|
|
97
|
+
z.literal(30)
|
|
98
|
+
]);
|
|
99
|
+
const inboxAnalyticsRequestSchema = z.object({
|
|
100
|
+
websiteSlug: z.string(),
|
|
101
|
+
rangeDays: inboxAnalyticsRangeSchema.optional().default(7)
|
|
102
|
+
});
|
|
103
|
+
const inboxAnalyticsMetricsSchema = z.object({
|
|
104
|
+
medianResponseTimeSeconds: z.number().nullable(),
|
|
105
|
+
medianResolutionTimeSeconds: z.number().nullable(),
|
|
106
|
+
aiHandledRate: z.number().nullable(),
|
|
107
|
+
satisfactionIndex: z.number().nullable(),
|
|
108
|
+
uniqueVisitors: z.number()
|
|
109
|
+
});
|
|
110
|
+
const inboxAnalyticsResponseSchema = z.object({
|
|
111
|
+
range: z.object({
|
|
112
|
+
rangeDays: inboxAnalyticsRangeSchema,
|
|
113
|
+
currentStart: z.string(),
|
|
114
|
+
currentEnd: z.string(),
|
|
115
|
+
previousStart: z.string(),
|
|
116
|
+
previousEnd: z.string()
|
|
117
|
+
}),
|
|
118
|
+
current: inboxAnalyticsMetricsSchema,
|
|
119
|
+
previous: inboxAnalyticsMetricsSchema
|
|
120
|
+
});
|
|
90
121
|
|
|
91
122
|
//#endregion
|
|
92
|
-
export { conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, listConversationHeadersResponseSchema };
|
|
123
|
+
export { conversationHeaderSchema, conversationMutationResponseSchema, conversationPrioritySchema, conversationRecordSchema, conversationSentimentSchema, conversationStatusSchema, inboxAnalyticsMetricsSchema, inboxAnalyticsRangeSchema, inboxAnalyticsRequestSchema, inboxAnalyticsResponseSchema, listConversationHeadersResponseSchema };
|
|
93
124
|
//# sourceMappingURL=conversation.js.map
|
package/trpc/conversation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.js","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { timelineItemSchema } from \"../api/timeline-item\";\nimport { visitorProfileSchema } from \"../api/visitor\";\nimport {\n\tConversationPriority,\n\tConversationSentiment,\n\tConversationStatus,\n} from \"../enums\";\nimport { conversationSeenSchema } from \"../schemas\";\n\nexport const conversationStatusSchema = z.enum([\n\tConversationStatus.OPEN,\n\tConversationStatus.RESOLVED,\n\tConversationStatus.SPAM,\n]);\n\nexport const conversationPrioritySchema = z.enum([\n\tConversationPriority.LOW,\n\tConversationPriority.NORMAL,\n\tConversationPriority.HIGH,\n\tConversationPriority.URGENT,\n]);\n\nexport const conversationSentimentSchema = z\n\t.enum([\n\t\tConversationSentiment.POSITIVE,\n\t\tConversationSentiment.NEGATIVE,\n\t\tConversationSentiment.NEUTRAL,\n\t])\n\t.nullable();\n\nexport const conversationRecordSchema = z.object({\n\tid: z.string(),\n\torganizationId: z.string(),\n\tvisitorId: z.string(),\n\twebsiteId: z.string(),\n\tstatus: conversationStatusSchema,\n\tpriority: conversationPrioritySchema,\n\tsentiment: conversationSentimentSchema,\n\tsentimentConfidence: z.number().nullable(),\n\tchannel: z.string(),\n\ttitle: z.string().nullable(),\n\tresolutionTime: z.number().nullable(),\n\tstartedAt: z.string().nullable(),\n\tfirstResponseAt: z.string().nullable(),\n\tresolvedAt: z.string().nullable(),\n\tlastMessageAt: z.string().nullable(),\n\tlastMessageBy: z.string().nullable(),\n\tresolvedByUserId: z.string().nullable(),\n\tresolvedByAiAgentId: z.string().nullable(),\n\t// Escalation tracking\n\tescalatedAt: z.string().nullable(),\n\tescalatedByAiAgentId: z.string().nullable(),\n\tescalationReason: z.string().nullable(),\n\tescalationHandledAt: z.string().nullable(),\n\tescalationHandledByUserId: z.string().nullable(),\n\t// AI pause control\n\taiPausedUntil: z.string().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().nullable(),\n});\n\nexport type ConversationRecordResponse = z.infer<\n\ttypeof conversationRecordSchema\n>;\n\nexport const conversationMutationResponseSchema = z.object({\n\tconversation: conversationRecordSchema,\n});\n\nexport const conversationHeaderSchema = z.object({\n\tid: z.string(),\n\tstatus: conversationStatusSchema,\n\tpriority: conversationPrioritySchema,\n\torganizationId: z.string(),\n\tvisitorId: z.string(),\n\tvisitor: visitorProfileSchema,\n\twebsiteId: z.string(),\n\tchannel: z.string(),\n\ttitle: z.string().nullable(),\n\tresolutionTime: z.number().nullable(),\n\tstartedAt: z.string().nullable(),\n\tfirstResponseAt: z.string().nullable(),\n\tresolvedAt: z.string().nullable(),\n\tresolvedByUserId: z.string().nullable(),\n\tresolvedByAiAgentId: z.string().nullable(),\n\t// Escalation tracking\n\tescalatedAt: z.string().nullable(),\n\tescalatedByAiAgentId: z.string().nullable(),\n\tescalationReason: z.string().nullable(),\n\tescalationHandledAt: z.string().nullable(),\n\tescalationHandledByUserId: z.string().nullable(),\n\t// AI pause control\n\taiPausedUntil: z.string().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().nullable(),\n\tlastMessageAt: z.string().nullable(),\n\tlastSeenAt: z.string().nullable(),\n\tlastMessageTimelineItem: timelineItemSchema.nullable(),\n\tlastTimelineItem: timelineItemSchema.nullable(),\n\tviewIds: z.array(z.string()),\n\tseenData: z.array(conversationSeenSchema),\n});\n\nexport const listConversationHeadersResponseSchema = z.object({\n\titems: z.array(conversationHeaderSchema),\n\tnextCursor: z.string().nullable(),\n});\n\nexport type ConversationMutationResponse = z.infer<\n\ttypeof conversationMutationResponseSchema\n>;\n\nexport type ConversationHeader = z.infer<typeof conversationHeaderSchema>;\n"],"mappings":";;;;;;;AAUA,MAAa,2BAA2B,EAAE,KAAK;CAC9C,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,CAAC;AAEF,MAAa,6BAA6B,EAAE,KAAK;CAChD,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;CACrB,CAAC;AAEF,MAAa,8BAA8B,EACzC,KAAK;CACL,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,CAAC,CACD,UAAU;AAEZ,MAAa,2BA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AU;CACrC,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,iBAAiB,EAAE,QAAQ,CAAC,UAAU;CACtC,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,kBAAkB,EAAE,QAAQ,CAAC,UAAU;CACvC,qBAAqB,EAAE,QAAQ,CAAC,UAAU;CAE1C,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,sBAAsB,EAAE,QAAQ,CAAC,UAAU;CAC3C,kBAAkB,EAAE,QAAQ,CAAC,UAAU;CACvC,qBAAqB,EAAE,QAAQ,CAAC,UAAU;CAC1C,2BAA2B,EAAE,QAAQ,CAAC,UAAU;CAEhD,eAAe,EAAE,QAAQ,CAAC,UAAU;CACpC,WAAW,EAAE,QAAQ;CACrB,WAAW,EAAE,QAAQ;CACrB,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,eAAe,EAAE,QAAQ,CAAC,UAAU;CACpC,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,yBAAyB,mBAAmB,UAAU;CACtD,kBAAkB,mBAAmB,UAAU;CAC/C,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC;CAC5B,UAAU,EAAE,MAAM,uBAAuB;CACzC,CAAC;AAEF,MAAa,wCAAwC,EAAE,OAAO;CAC7D,OAAO,EAAE,MAAM,yBAAyB;CACxC,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"conversation.js","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { timelineItemSchema } from \"../api/timeline-item\";\nimport { visitorProfileSchema } from \"../api/visitor\";\nimport {\n\tConversationPriority,\n\tConversationSentiment,\n\tConversationStatus,\n} from \"../enums\";\nimport { conversationSeenSchema } from \"../schemas\";\n\nexport const conversationStatusSchema = z.enum([\n\tConversationStatus.OPEN,\n\tConversationStatus.RESOLVED,\n\tConversationStatus.SPAM,\n]);\n\nexport const conversationPrioritySchema = z.enum([\n\tConversationPriority.LOW,\n\tConversationPriority.NORMAL,\n\tConversationPriority.HIGH,\n\tConversationPriority.URGENT,\n]);\n\nexport const conversationSentimentSchema = z\n\t.enum([\n\t\tConversationSentiment.POSITIVE,\n\t\tConversationSentiment.NEGATIVE,\n\t\tConversationSentiment.NEUTRAL,\n\t])\n\t.nullable();\n\nexport const conversationRecordSchema = z.object({\n\tid: z.string(),\n\torganizationId: z.string(),\n\tvisitorId: z.string(),\n\twebsiteId: z.string(),\n\tstatus: conversationStatusSchema,\n\tpriority: conversationPrioritySchema,\n\tsentiment: conversationSentimentSchema,\n\tsentimentConfidence: z.number().nullable(),\n\tchannel: z.string(),\n\ttitle: z.string().nullable(),\n\tresolutionTime: z.number().nullable(),\n\tvisitorRating: z.number().int().min(1).max(5).nullable(),\n\tvisitorRatingAt: z.string().nullable(),\n\tstartedAt: z.string().nullable(),\n\tfirstResponseAt: z.string().nullable(),\n\tresolvedAt: z.string().nullable(),\n\tlastMessageAt: z.string().nullable(),\n\tlastMessageBy: z.string().nullable(),\n\tresolvedByUserId: z.string().nullable(),\n\tresolvedByAiAgentId: z.string().nullable(),\n\t// Escalation tracking\n\tescalatedAt: z.string().nullable(),\n\tescalatedByAiAgentId: z.string().nullable(),\n\tescalationReason: z.string().nullable(),\n\tescalationHandledAt: z.string().nullable(),\n\tescalationHandledByUserId: z.string().nullable(),\n\t// AI pause control\n\taiPausedUntil: z.string().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().nullable(),\n});\n\nexport type ConversationRecordResponse = z.infer<\n\ttypeof conversationRecordSchema\n>;\n\nexport const conversationMutationResponseSchema = z.object({\n\tconversation: conversationRecordSchema,\n});\n\nexport const conversationHeaderSchema = z.object({\n\tid: z.string(),\n\tstatus: conversationStatusSchema,\n\tpriority: conversationPrioritySchema,\n\torganizationId: z.string(),\n\tvisitorId: z.string(),\n\tvisitor: visitorProfileSchema,\n\twebsiteId: z.string(),\n\tchannel: z.string(),\n\ttitle: z.string().nullable(),\n\tresolutionTime: z.number().nullable(),\n\tvisitorRating: z.number().int().min(1).max(5).nullable(),\n\tvisitorRatingAt: z.string().nullable(),\n\tstartedAt: z.string().nullable(),\n\tfirstResponseAt: z.string().nullable(),\n\tresolvedAt: z.string().nullable(),\n\tresolvedByUserId: z.string().nullable(),\n\tresolvedByAiAgentId: z.string().nullable(),\n\t// Escalation tracking\n\tescalatedAt: z.string().nullable(),\n\tescalatedByAiAgentId: z.string().nullable(),\n\tescalationReason: z.string().nullable(),\n\tescalationHandledAt: z.string().nullable(),\n\tescalationHandledByUserId: z.string().nullable(),\n\t// AI pause control\n\taiPausedUntil: z.string().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().nullable(),\n\tlastMessageAt: z.string().nullable(),\n\tlastSeenAt: z.string().nullable(),\n\tlastMessageTimelineItem: timelineItemSchema.nullable(),\n\tlastTimelineItem: timelineItemSchema.nullable(),\n\tviewIds: z.array(z.string()),\n\tseenData: z.array(conversationSeenSchema),\n});\n\nexport const listConversationHeadersResponseSchema = z.object({\n\titems: z.array(conversationHeaderSchema),\n\tnextCursor: z.string().nullable(),\n});\n\nexport const inboxAnalyticsRangeSchema = z.union([\n\tz.literal(7),\n\tz.literal(14),\n\tz.literal(30),\n]);\n\nexport const inboxAnalyticsRequestSchema = z.object({\n\twebsiteSlug: z.string(),\n\trangeDays: inboxAnalyticsRangeSchema.optional().default(7),\n});\n\nexport const inboxAnalyticsMetricsSchema = z.object({\n\tmedianResponseTimeSeconds: z.number().nullable(),\n\tmedianResolutionTimeSeconds: z.number().nullable(),\n\taiHandledRate: z.number().nullable(),\n\tsatisfactionIndex: z.number().nullable(),\n\tuniqueVisitors: z.number(),\n});\n\nexport const inboxAnalyticsResponseSchema = z.object({\n\trange: z.object({\n\t\trangeDays: inboxAnalyticsRangeSchema,\n\t\tcurrentStart: z.string(),\n\t\tcurrentEnd: z.string(),\n\t\tpreviousStart: z.string(),\n\t\tpreviousEnd: z.string(),\n\t}),\n\tcurrent: inboxAnalyticsMetricsSchema,\n\tprevious: inboxAnalyticsMetricsSchema,\n});\n\nexport type ConversationMutationResponse = z.infer<\n\ttypeof conversationMutationResponseSchema\n>;\n\nexport type ConversationHeader = z.infer<typeof conversationHeaderSchema>;\n\nexport type InboxAnalyticsRequest = z.infer<typeof inboxAnalyticsRequestSchema>;\nexport type InboxAnalyticsResponse = z.infer<\n\ttypeof inboxAnalyticsResponseSchema\n>;\n"],"mappings":";;;;;;;AAUA,MAAa,2BAA2B,EAAE,KAAK;CAC9C,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,CAAC;AAEF,MAAa,6BAA6B,EAAE,KAAK;CAChD,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;CACrB,CAAC;AAEF,MAAa,8BAA8B,EACzC,KAAK;CACL,sBAAsB;CACtB,sBAAsB;CACtB,sBAAsB;CACtB,CAAC,CACD,UAAU;AAEZ,MAAa,2BAA2B,EAAE,OAAO;CAChD,IAAI,EAAE,QAAQ;CACd,gBAAgB,EAAE,QAAQ;CAC1B,WAAW,EAAE,QAAQ;CACrB,WAAW,EAAE,QAAQ;CACrB,QAAQ;CACR,UAAU;CACV,WAAW;CACX,qBAAqB,EAAE,QAAQ,CAAC,UAAU;CAC1C,SAAS,EAAE,QAAQ;CACnB,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,gBAAgB,EAAE,QAAQ,CAAC,UAAU;CACrC,eAAe,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU;CACxD,iBAAiB,EAAE,QAAQ,CAAC,UAAU;CACtC,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,iBAAiB,EAAE,QAAQ,CAAC,UAAU;CACtC,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,eAAe,EAAE,QAAQ,CAAC,UAAU;CACpC,eAAe,EAAE,QAAQ,CAAC,UAA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const blockVisitorResponseSchema: z.ZodObject<{
|
|
|
27
27
|
channel: z.ZodString;
|
|
28
28
|
title: z.ZodNullable<z.ZodString>;
|
|
29
29
|
resolutionTime: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
visitorRating: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
visitorRatingAt: z.ZodNullable<z.ZodString>;
|
|
30
32
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
31
33
|
firstResponseAt: z.ZodNullable<z.ZodString>;
|
|
32
34
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
package/trpc/visitor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitor.d.ts","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":[],"mappings":";;;cAIa,4BAA0B,CAAA,CAAA;;IAA1B,EAAA,aAAA
|
|
1
|
+
{"version":3,"file":"visitor.d.ts","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":[],"mappings":";;;cAIa,4BAA0B,CAAA,CAAA;;IAA1B,EAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKD,oBAAA,GAAuB,CAAA,CAAE,aAAa;cAErC,4BAA0B,CAAA,CAAA;;;;;;;;;;;;;;;;;cAe1B,mCAAiC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;KAQlC,oBAAA,GAAuB,CAAA,CAAE,aAAa;KACtC,2BAAA,GAA8B,CAAA,CAAE,aACpC"}
|