@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/trpc/conversation.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
//#region src/trpc/conversation.d.ts
|
|
4
4
|
declare const conversationStatusSchema: z.ZodEnum<{
|
|
5
|
-
open: "open";
|
|
6
5
|
resolved: "resolved";
|
|
6
|
+
open: "open";
|
|
7
7
|
spam: "spam";
|
|
8
8
|
}>;
|
|
9
9
|
declare const conversationPrioritySchema: z.ZodEnum<{
|
|
@@ -23,8 +23,8 @@ declare const conversationRecordSchema: z.ZodObject<{
|
|
|
23
23
|
visitorId: z.ZodString;
|
|
24
24
|
websiteId: z.ZodString;
|
|
25
25
|
status: z.ZodEnum<{
|
|
26
|
-
open: "open";
|
|
27
26
|
resolved: "resolved";
|
|
27
|
+
open: "open";
|
|
28
28
|
spam: "spam";
|
|
29
29
|
}>;
|
|
30
30
|
priority: z.ZodEnum<{
|
|
@@ -49,6 +49,12 @@ declare const conversationRecordSchema: z.ZodObject<{
|
|
|
49
49
|
lastMessageBy: z.ZodNullable<z.ZodString>;
|
|
50
50
|
resolvedByUserId: z.ZodNullable<z.ZodString>;
|
|
51
51
|
resolvedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
52
|
+
escalatedAt: z.ZodNullable<z.ZodString>;
|
|
53
|
+
escalatedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
escalationReason: z.ZodNullable<z.ZodString>;
|
|
55
|
+
escalationHandledAt: z.ZodNullable<z.ZodString>;
|
|
56
|
+
escalationHandledByUserId: z.ZodNullable<z.ZodString>;
|
|
57
|
+
aiPausedUntil: z.ZodNullable<z.ZodString>;
|
|
52
58
|
createdAt: z.ZodString;
|
|
53
59
|
updatedAt: z.ZodString;
|
|
54
60
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -61,8 +67,8 @@ declare const conversationMutationResponseSchema: z.ZodObject<{
|
|
|
61
67
|
visitorId: z.ZodString;
|
|
62
68
|
websiteId: z.ZodString;
|
|
63
69
|
status: z.ZodEnum<{
|
|
64
|
-
open: "open";
|
|
65
70
|
resolved: "resolved";
|
|
71
|
+
open: "open";
|
|
66
72
|
spam: "spam";
|
|
67
73
|
}>;
|
|
68
74
|
priority: z.ZodEnum<{
|
|
@@ -87,6 +93,12 @@ declare const conversationMutationResponseSchema: z.ZodObject<{
|
|
|
87
93
|
lastMessageBy: z.ZodNullable<z.ZodString>;
|
|
88
94
|
resolvedByUserId: z.ZodNullable<z.ZodString>;
|
|
89
95
|
resolvedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
96
|
+
escalatedAt: z.ZodNullable<z.ZodString>;
|
|
97
|
+
escalatedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
98
|
+
escalationReason: z.ZodNullable<z.ZodString>;
|
|
99
|
+
escalationHandledAt: z.ZodNullable<z.ZodString>;
|
|
100
|
+
escalationHandledByUserId: z.ZodNullable<z.ZodString>;
|
|
101
|
+
aiPausedUntil: z.ZodNullable<z.ZodString>;
|
|
90
102
|
createdAt: z.ZodString;
|
|
91
103
|
updatedAt: z.ZodString;
|
|
92
104
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -95,8 +107,8 @@ declare const conversationMutationResponseSchema: z.ZodObject<{
|
|
|
95
107
|
declare const conversationHeaderSchema: z.ZodObject<{
|
|
96
108
|
id: z.ZodString;
|
|
97
109
|
status: z.ZodEnum<{
|
|
98
|
-
open: "open";
|
|
99
110
|
resolved: "resolved";
|
|
111
|
+
open: "open";
|
|
100
112
|
spam: "spam";
|
|
101
113
|
}>;
|
|
102
114
|
priority: z.ZodEnum<{
|
|
@@ -130,6 +142,12 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
130
142
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
|
131
143
|
resolvedByUserId: z.ZodNullable<z.ZodString>;
|
|
132
144
|
resolvedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
145
|
+
escalatedAt: z.ZodNullable<z.ZodString>;
|
|
146
|
+
escalatedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
147
|
+
escalationReason: z.ZodNullable<z.ZodString>;
|
|
148
|
+
escalationHandledAt: z.ZodNullable<z.ZodString>;
|
|
149
|
+
escalationHandledByUserId: z.ZodNullable<z.ZodString>;
|
|
150
|
+
aiPausedUntil: z.ZodNullable<z.ZodString>;
|
|
133
151
|
createdAt: z.ZodString;
|
|
134
152
|
updatedAt: z.ZodString;
|
|
135
153
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -153,10 +171,99 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
153
171
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
154
172
|
type: z.ZodLiteral<"text">;
|
|
155
173
|
text: z.ZodString;
|
|
174
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
175
|
+
streaming: "streaming";
|
|
176
|
+
done: "done";
|
|
177
|
+
}>>;
|
|
178
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
179
|
+
type: z.ZodLiteral<"reasoning">;
|
|
180
|
+
text: z.ZodString;
|
|
181
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
streaming: "streaming";
|
|
183
|
+
done: "done";
|
|
184
|
+
}>>;
|
|
185
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
186
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
public: "public";
|
|
189
|
+
private: "private";
|
|
190
|
+
}>>;
|
|
191
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
192
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
}, z.core.$loose>>;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
type: z.ZodString;
|
|
197
|
+
toolCallId: z.ZodString;
|
|
198
|
+
toolName: z.ZodString;
|
|
199
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
200
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
201
|
+
state: z.ZodEnum<{
|
|
202
|
+
error: "error";
|
|
203
|
+
partial: "partial";
|
|
204
|
+
result: "result";
|
|
205
|
+
}>;
|
|
206
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
207
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
210
|
+
public: "public";
|
|
211
|
+
private: "private";
|
|
212
|
+
}>>;
|
|
213
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
214
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
}, z.core.$loose>>;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"source-url">;
|
|
219
|
+
sourceId: z.ZodString;
|
|
220
|
+
url: z.ZodString;
|
|
221
|
+
title: z.ZodOptional<z.ZodString>;
|
|
222
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
223
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
225
|
+
public: "public";
|
|
226
|
+
private: "private";
|
|
227
|
+
}>>;
|
|
228
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
229
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
}, z.core.$loose>>;
|
|
232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"source-document">;
|
|
234
|
+
sourceId: z.ZodString;
|
|
235
|
+
mediaType: z.ZodString;
|
|
236
|
+
title: z.ZodString;
|
|
237
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
238
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
239
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
240
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
241
|
+
public: "public";
|
|
242
|
+
private: "private";
|
|
243
|
+
}>>;
|
|
244
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
245
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
246
|
+
}, z.core.$strip>>;
|
|
247
|
+
}, z.core.$loose>>;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
type: z.ZodLiteral<"step-start">;
|
|
250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
251
|
+
type: z.ZodLiteral<"file">;
|
|
252
|
+
url: z.ZodString;
|
|
253
|
+
mediaType: z.ZodString;
|
|
254
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
255
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
257
|
+
type: z.ZodLiteral<"image">;
|
|
258
|
+
url: z.ZodString;
|
|
259
|
+
mediaType: z.ZodString;
|
|
260
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
261
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
263
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
156
264
|
}, z.core.$strip>, z.ZodObject<{
|
|
157
265
|
type: z.ZodLiteral<"event">;
|
|
158
266
|
eventType: z.ZodEnum<{
|
|
159
|
-
resolved: "resolved";
|
|
160
267
|
assigned: "assigned";
|
|
161
268
|
unassigned: "unassigned";
|
|
162
269
|
participant_requested: "participant_requested";
|
|
@@ -166,6 +273,7 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
166
273
|
priority_changed: "priority_changed";
|
|
167
274
|
tag_added: "tag_added";
|
|
168
275
|
tag_removed: "tag_removed";
|
|
276
|
+
resolved: "resolved";
|
|
169
277
|
reopened: "reopened";
|
|
170
278
|
visitor_blocked: "visitor_blocked";
|
|
171
279
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -176,20 +284,6 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
176
284
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
177
285
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
178
286
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
-
type: z.ZodLiteral<"image">;
|
|
181
|
-
url: z.ZodString;
|
|
182
|
-
mediaType: z.ZodString;
|
|
183
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
184
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
185
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
186
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
187
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
-
type: z.ZodLiteral<"file">;
|
|
189
|
-
url: z.ZodString;
|
|
190
|
-
mediaType: z.ZodString;
|
|
191
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
192
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
193
287
|
}, z.core.$strip>, z.ZodObject<{
|
|
194
288
|
type: z.ZodLiteral<"metadata">;
|
|
195
289
|
source: z.ZodEnum<{
|
|
@@ -222,10 +316,99 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
222
316
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
223
317
|
type: z.ZodLiteral<"text">;
|
|
224
318
|
text: z.ZodString;
|
|
319
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
320
|
+
streaming: "streaming";
|
|
321
|
+
done: "done";
|
|
322
|
+
}>>;
|
|
323
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
324
|
+
type: z.ZodLiteral<"reasoning">;
|
|
325
|
+
text: z.ZodString;
|
|
326
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
327
|
+
streaming: "streaming";
|
|
328
|
+
done: "done";
|
|
329
|
+
}>>;
|
|
330
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
331
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
332
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
333
|
+
public: "public";
|
|
334
|
+
private: "private";
|
|
335
|
+
}>>;
|
|
336
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
337
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
338
|
+
}, z.core.$strip>>;
|
|
339
|
+
}, z.core.$loose>>;
|
|
340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
341
|
+
type: z.ZodString;
|
|
342
|
+
toolCallId: z.ZodString;
|
|
343
|
+
toolName: z.ZodString;
|
|
344
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
345
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
346
|
+
state: z.ZodEnum<{
|
|
347
|
+
error: "error";
|
|
348
|
+
partial: "partial";
|
|
349
|
+
result: "result";
|
|
350
|
+
}>;
|
|
351
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
352
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
354
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
355
|
+
public: "public";
|
|
356
|
+
private: "private";
|
|
357
|
+
}>>;
|
|
358
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
359
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
360
|
+
}, z.core.$strip>>;
|
|
361
|
+
}, z.core.$loose>>;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
type: z.ZodLiteral<"source-url">;
|
|
364
|
+
sourceId: z.ZodString;
|
|
365
|
+
url: z.ZodString;
|
|
366
|
+
title: z.ZodOptional<z.ZodString>;
|
|
367
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
368
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
369
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
370
|
+
public: "public";
|
|
371
|
+
private: "private";
|
|
372
|
+
}>>;
|
|
373
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
374
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
375
|
+
}, z.core.$strip>>;
|
|
376
|
+
}, z.core.$loose>>;
|
|
377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"source-document">;
|
|
379
|
+
sourceId: z.ZodString;
|
|
380
|
+
mediaType: z.ZodString;
|
|
381
|
+
title: z.ZodString;
|
|
382
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
383
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
385
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
386
|
+
public: "public";
|
|
387
|
+
private: "private";
|
|
388
|
+
}>>;
|
|
389
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
390
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
391
|
+
}, z.core.$strip>>;
|
|
392
|
+
}, z.core.$loose>>;
|
|
393
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
+
type: z.ZodLiteral<"step-start">;
|
|
395
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
396
|
+
type: z.ZodLiteral<"file">;
|
|
397
|
+
url: z.ZodString;
|
|
398
|
+
mediaType: z.ZodString;
|
|
399
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
400
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
402
|
+
type: z.ZodLiteral<"image">;
|
|
403
|
+
url: z.ZodString;
|
|
404
|
+
mediaType: z.ZodString;
|
|
405
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
406
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
407
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
225
409
|
}, z.core.$strip>, z.ZodObject<{
|
|
226
410
|
type: z.ZodLiteral<"event">;
|
|
227
411
|
eventType: z.ZodEnum<{
|
|
228
|
-
resolved: "resolved";
|
|
229
412
|
assigned: "assigned";
|
|
230
413
|
unassigned: "unassigned";
|
|
231
414
|
participant_requested: "participant_requested";
|
|
@@ -235,6 +418,7 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
235
418
|
priority_changed: "priority_changed";
|
|
236
419
|
tag_added: "tag_added";
|
|
237
420
|
tag_removed: "tag_removed";
|
|
421
|
+
resolved: "resolved";
|
|
238
422
|
reopened: "reopened";
|
|
239
423
|
visitor_blocked: "visitor_blocked";
|
|
240
424
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -245,20 +429,6 @@ declare const conversationHeaderSchema: z.ZodObject<{
|
|
|
245
429
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
246
430
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
247
431
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
-
type: z.ZodLiteral<"image">;
|
|
250
|
-
url: z.ZodString;
|
|
251
|
-
mediaType: z.ZodString;
|
|
252
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
253
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
254
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
255
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
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
432
|
}, z.core.$strip>, z.ZodObject<{
|
|
263
433
|
type: z.ZodLiteral<"metadata">;
|
|
264
434
|
source: z.ZodEnum<{
|
|
@@ -290,8 +460,8 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
290
460
|
items: z.ZodArray<z.ZodObject<{
|
|
291
461
|
id: z.ZodString;
|
|
292
462
|
status: z.ZodEnum<{
|
|
293
|
-
open: "open";
|
|
294
463
|
resolved: "resolved";
|
|
464
|
+
open: "open";
|
|
295
465
|
spam: "spam";
|
|
296
466
|
}>;
|
|
297
467
|
priority: z.ZodEnum<{
|
|
@@ -325,6 +495,12 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
325
495
|
resolvedAt: z.ZodNullable<z.ZodString>;
|
|
326
496
|
resolvedByUserId: z.ZodNullable<z.ZodString>;
|
|
327
497
|
resolvedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
498
|
+
escalatedAt: z.ZodNullable<z.ZodString>;
|
|
499
|
+
escalatedByAiAgentId: z.ZodNullable<z.ZodString>;
|
|
500
|
+
escalationReason: z.ZodNullable<z.ZodString>;
|
|
501
|
+
escalationHandledAt: z.ZodNullable<z.ZodString>;
|
|
502
|
+
escalationHandledByUserId: z.ZodNullable<z.ZodString>;
|
|
503
|
+
aiPausedUntil: z.ZodNullable<z.ZodString>;
|
|
328
504
|
createdAt: z.ZodString;
|
|
329
505
|
updatedAt: z.ZodString;
|
|
330
506
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -348,10 +524,99 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
348
524
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
349
525
|
type: z.ZodLiteral<"text">;
|
|
350
526
|
text: z.ZodString;
|
|
527
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
528
|
+
streaming: "streaming";
|
|
529
|
+
done: "done";
|
|
530
|
+
}>>;
|
|
531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
+
type: z.ZodLiteral<"reasoning">;
|
|
533
|
+
text: z.ZodString;
|
|
534
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
535
|
+
streaming: "streaming";
|
|
536
|
+
done: "done";
|
|
537
|
+
}>>;
|
|
538
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
539
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
541
|
+
public: "public";
|
|
542
|
+
private: "private";
|
|
543
|
+
}>>;
|
|
544
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
545
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
546
|
+
}, z.core.$strip>>;
|
|
547
|
+
}, z.core.$loose>>;
|
|
548
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
549
|
+
type: z.ZodString;
|
|
550
|
+
toolCallId: z.ZodString;
|
|
551
|
+
toolName: z.ZodString;
|
|
552
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
553
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
554
|
+
state: z.ZodEnum<{
|
|
555
|
+
error: "error";
|
|
556
|
+
partial: "partial";
|
|
557
|
+
result: "result";
|
|
558
|
+
}>;
|
|
559
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
560
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
561
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
562
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
563
|
+
public: "public";
|
|
564
|
+
private: "private";
|
|
565
|
+
}>>;
|
|
566
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
567
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
568
|
+
}, z.core.$strip>>;
|
|
569
|
+
}, z.core.$loose>>;
|
|
570
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
571
|
+
type: z.ZodLiteral<"source-url">;
|
|
572
|
+
sourceId: z.ZodString;
|
|
573
|
+
url: z.ZodString;
|
|
574
|
+
title: z.ZodOptional<z.ZodString>;
|
|
575
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
576
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
577
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
578
|
+
public: "public";
|
|
579
|
+
private: "private";
|
|
580
|
+
}>>;
|
|
581
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
582
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
583
|
+
}, z.core.$strip>>;
|
|
584
|
+
}, z.core.$loose>>;
|
|
585
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
586
|
+
type: z.ZodLiteral<"source-document">;
|
|
587
|
+
sourceId: z.ZodString;
|
|
588
|
+
mediaType: z.ZodString;
|
|
589
|
+
title: z.ZodString;
|
|
590
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
591
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
592
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
593
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
594
|
+
public: "public";
|
|
595
|
+
private: "private";
|
|
596
|
+
}>>;
|
|
597
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
598
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
599
|
+
}, z.core.$strip>>;
|
|
600
|
+
}, z.core.$loose>>;
|
|
601
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
602
|
+
type: z.ZodLiteral<"step-start">;
|
|
603
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
604
|
+
type: z.ZodLiteral<"file">;
|
|
605
|
+
url: z.ZodString;
|
|
606
|
+
mediaType: z.ZodString;
|
|
607
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
608
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
609
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
610
|
+
type: z.ZodLiteral<"image">;
|
|
611
|
+
url: z.ZodString;
|
|
612
|
+
mediaType: z.ZodString;
|
|
613
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
614
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
615
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
616
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
351
617
|
}, z.core.$strip>, z.ZodObject<{
|
|
352
618
|
type: z.ZodLiteral<"event">;
|
|
353
619
|
eventType: z.ZodEnum<{
|
|
354
|
-
resolved: "resolved";
|
|
355
620
|
assigned: "assigned";
|
|
356
621
|
unassigned: "unassigned";
|
|
357
622
|
participant_requested: "participant_requested";
|
|
@@ -361,6 +626,7 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
361
626
|
priority_changed: "priority_changed";
|
|
362
627
|
tag_added: "tag_added";
|
|
363
628
|
tag_removed: "tag_removed";
|
|
629
|
+
resolved: "resolved";
|
|
364
630
|
reopened: "reopened";
|
|
365
631
|
visitor_blocked: "visitor_blocked";
|
|
366
632
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -371,20 +637,6 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
371
637
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
372
638
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
373
639
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
374
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
375
|
-
type: z.ZodLiteral<"image">;
|
|
376
|
-
url: z.ZodString;
|
|
377
|
-
mediaType: z.ZodString;
|
|
378
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
379
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
380
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
381
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
382
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
383
|
-
type: z.ZodLiteral<"file">;
|
|
384
|
-
url: z.ZodString;
|
|
385
|
-
mediaType: z.ZodString;
|
|
386
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
387
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
388
640
|
}, z.core.$strip>, z.ZodObject<{
|
|
389
641
|
type: z.ZodLiteral<"metadata">;
|
|
390
642
|
source: z.ZodEnum<{
|
|
@@ -417,10 +669,99 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
417
669
|
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
418
670
|
type: z.ZodLiteral<"text">;
|
|
419
671
|
text: z.ZodString;
|
|
672
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
673
|
+
streaming: "streaming";
|
|
674
|
+
done: "done";
|
|
675
|
+
}>>;
|
|
676
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
677
|
+
type: z.ZodLiteral<"reasoning">;
|
|
678
|
+
text: z.ZodString;
|
|
679
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
680
|
+
streaming: "streaming";
|
|
681
|
+
done: "done";
|
|
682
|
+
}>>;
|
|
683
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
684
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
685
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
686
|
+
public: "public";
|
|
687
|
+
private: "private";
|
|
688
|
+
}>>;
|
|
689
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
690
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
691
|
+
}, z.core.$strip>>;
|
|
692
|
+
}, z.core.$loose>>;
|
|
693
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
694
|
+
type: z.ZodString;
|
|
695
|
+
toolCallId: z.ZodString;
|
|
696
|
+
toolName: z.ZodString;
|
|
697
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
698
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
699
|
+
state: z.ZodEnum<{
|
|
700
|
+
error: "error";
|
|
701
|
+
partial: "partial";
|
|
702
|
+
result: "result";
|
|
703
|
+
}>;
|
|
704
|
+
errorText: z.ZodOptional<z.ZodString>;
|
|
705
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
706
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
707
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
708
|
+
public: "public";
|
|
709
|
+
private: "private";
|
|
710
|
+
}>>;
|
|
711
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
712
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
713
|
+
}, z.core.$strip>>;
|
|
714
|
+
}, z.core.$loose>>;
|
|
715
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
716
|
+
type: z.ZodLiteral<"source-url">;
|
|
717
|
+
sourceId: z.ZodString;
|
|
718
|
+
url: z.ZodString;
|
|
719
|
+
title: z.ZodOptional<z.ZodString>;
|
|
720
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
721
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
722
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
723
|
+
public: "public";
|
|
724
|
+
private: "private";
|
|
725
|
+
}>>;
|
|
726
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
727
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
728
|
+
}, z.core.$strip>>;
|
|
729
|
+
}, z.core.$loose>>;
|
|
730
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
731
|
+
type: z.ZodLiteral<"source-document">;
|
|
732
|
+
sourceId: z.ZodString;
|
|
733
|
+
mediaType: z.ZodString;
|
|
734
|
+
title: z.ZodString;
|
|
735
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
736
|
+
providerMetadata: z.ZodOptional<z.ZodObject<{
|
|
737
|
+
cossistant: z.ZodOptional<z.ZodObject<{
|
|
738
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
739
|
+
public: "public";
|
|
740
|
+
private: "private";
|
|
741
|
+
}>>;
|
|
742
|
+
progressMessage: z.ZodOptional<z.ZodString>;
|
|
743
|
+
knowledgeId: z.ZodOptional<z.ZodString>;
|
|
744
|
+
}, z.core.$strip>>;
|
|
745
|
+
}, z.core.$loose>>;
|
|
746
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
747
|
+
type: z.ZodLiteral<"step-start">;
|
|
748
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
749
|
+
type: z.ZodLiteral<"file">;
|
|
750
|
+
url: z.ZodString;
|
|
751
|
+
mediaType: z.ZodString;
|
|
752
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
753
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
754
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
755
|
+
type: z.ZodLiteral<"image">;
|
|
756
|
+
url: z.ZodString;
|
|
757
|
+
mediaType: z.ZodString;
|
|
758
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
759
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
760
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
761
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
420
762
|
}, z.core.$strip>, z.ZodObject<{
|
|
421
763
|
type: z.ZodLiteral<"event">;
|
|
422
764
|
eventType: z.ZodEnum<{
|
|
423
|
-
resolved: "resolved";
|
|
424
765
|
assigned: "assigned";
|
|
425
766
|
unassigned: "unassigned";
|
|
426
767
|
participant_requested: "participant_requested";
|
|
@@ -430,6 +771,7 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
430
771
|
priority_changed: "priority_changed";
|
|
431
772
|
tag_added: "tag_added";
|
|
432
773
|
tag_removed: "tag_removed";
|
|
774
|
+
resolved: "resolved";
|
|
433
775
|
reopened: "reopened";
|
|
434
776
|
visitor_blocked: "visitor_blocked";
|
|
435
777
|
visitor_unblocked: "visitor_unblocked";
|
|
@@ -440,20 +782,6 @@ declare const listConversationHeadersResponseSchema: z.ZodObject<{
|
|
|
440
782
|
targetUserId: z.ZodNullable<z.ZodString>;
|
|
441
783
|
targetAiAgentId: z.ZodNullable<z.ZodString>;
|
|
442
784
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
443
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
444
|
-
type: z.ZodLiteral<"image">;
|
|
445
|
-
url: z.ZodString;
|
|
446
|
-
mediaType: z.ZodString;
|
|
447
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
448
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
449
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
450
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
451
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
452
|
-
type: z.ZodLiteral<"file">;
|
|
453
|
-
url: z.ZodString;
|
|
454
|
-
mediaType: z.ZodString;
|
|
455
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
456
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
457
785
|
}, z.core.$strip>, z.ZodObject<{
|
|
458
786
|
type: z.ZodLiteral<"metadata">;
|
|
459
787
|
source: z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":[],"mappings":";;;cAUa,0BAAwB,CAAA,CAAA;;EAAxB,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":[],"mappings":";;;cAUa,0BAAwB,CAAA,CAAA;;EAAxB,IAAA,EAAA,MAAA;EAMA,IAAA,EAAA,MAAA;AAOb,CAAA,CAAA;AAQa,cAfA,0BA6CX,EA7CqC,CAAA,CAAA,OA6CrC,CAAA;;;;;;cAtCW,6BAA2B,CAAA,CAAA,YAAA,CAAA,CAAA;;;;;cAQ3B,0BAAwB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,yBAAA,eAAA,YAAA,CAAA;EAAA,aAAA,eAAA,YAAA,CAAA;EAgCzB,SAAA,aAAA;EAIC,SAAA,aAAA;;;KAJD,0BAAA,GAA6B,CAAA,CAAE,aACnC;cAGK,oCAAkC,CAAA,CAAA;;;;;;;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object({
|
|
|
40
40
|
lastMessageBy: z.string().nullable(),
|
|
41
41
|
resolvedByUserId: z.string().nullable(),
|
|
42
42
|
resolvedByAiAgentId: z.string().nullable(),
|
|
43
|
+
escalatedAt: z.string().nullable(),
|
|
44
|
+
escalatedByAiAgentId: z.string().nullable(),
|
|
45
|
+
escalationReason: z.string().nullable(),
|
|
46
|
+
escalationHandledAt: z.string().nullable(),
|
|
47
|
+
escalationHandledByUserId: z.string().nullable(),
|
|
48
|
+
aiPausedUntil: z.string().nullable(),
|
|
43
49
|
createdAt: z.string(),
|
|
44
50
|
updatedAt: z.string(),
|
|
45
51
|
deletedAt: z.string().nullable()
|
|
@@ -61,6 +67,12 @@ const conversationHeaderSchema = z.object({
|
|
|
61
67
|
resolvedAt: z.string().nullable(),
|
|
62
68
|
resolvedByUserId: z.string().nullable(),
|
|
63
69
|
resolvedByAiAgentId: z.string().nullable(),
|
|
70
|
+
escalatedAt: z.string().nullable(),
|
|
71
|
+
escalatedByAiAgentId: z.string().nullable(),
|
|
72
|
+
escalationReason: z.string().nullable(),
|
|
73
|
+
escalationHandledAt: z.string().nullable(),
|
|
74
|
+
escalationHandledByUserId: z.string().nullable(),
|
|
75
|
+
aiPausedUntil: z.string().nullable(),
|
|
64
76
|
createdAt: z.string(),
|
|
65
77
|
updatedAt: z.string(),
|
|
66
78
|
deletedAt: z.string().nullable(),
|
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\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\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,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,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,UAAU;CACpC,kBAAkB,EAAE,QAAQ,CAAC,UAAU;CACvC,qBAAqB,EAAE,QAAQ,CAAC,UAAU;CAC1C,WAAW,EAAE,QAAQ;CACrB,WAAW,EAAE,QAAQ;CACrB,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,CAAC;AAMF,MAAa,qCAAqC,EAAE,OAAO,EAC1D,cAAc,0BACd,CAAC;AAEF,MAAa,2BAA2B,EAAE,OAAO;CAChD,IAAI,EAAE,QAAQ;CACd,QAAQ;CACR,UAAU;CACV,gBAAgB,EAAE,QAAQ;CAC1B,WAAW,EAAE,QAAQ;CACrB,SAAS;CACT,WAAW,EAAE,QAAQ;CACrB,SAAS,EAAE,QAAQ;CACnB,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,gBAAgB,EAAE,QAAQ,CAAC,UAAU;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;CAC1C,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\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,MA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