@cossistant/types 0.0.20 → 0.0.23

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.
@@ -1,16 +1,23 @@
1
1
  import { $strip } from "../schemas2.js";
2
2
  import { output } from "../core.js";
3
- import { ZodArray, ZodEnum, ZodNullable, ZodNumber, ZodObject, ZodString } from "../schemas3.js";
3
+ import { ZodArray, ZodBoolean, ZodEnum, ZodLiteral, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodString, ZodULID, ZodUnion } from "../schemas3.js";
4
4
 
5
5
  //#region src/trpc/conversation.d.ts
6
6
  declare const conversationStatusSchema: ZodEnum<{
7
- [x: string]: any;
7
+ open: "open";
8
+ resolved: "resolved";
9
+ spam: "spam";
8
10
  }>;
9
11
  declare const conversationPrioritySchema: ZodEnum<{
10
- [x: string]: any;
12
+ low: "low";
13
+ normal: "normal";
14
+ high: "high";
15
+ urgent: "urgent";
11
16
  }>;
12
17
  declare const conversationSentimentSchema: ZodNullable<ZodEnum<{
13
- [x: string]: any;
18
+ positive: "positive";
19
+ negative: "negative";
20
+ neutral: "neutral";
14
21
  }>>;
15
22
  declare const conversationRecordSchema: ZodObject<{
16
23
  id: ZodString;
@@ -18,13 +25,20 @@ declare const conversationRecordSchema: ZodObject<{
18
25
  visitorId: ZodString;
19
26
  websiteId: ZodString;
20
27
  status: ZodEnum<{
21
- [x: string]: any;
28
+ open: "open";
29
+ resolved: "resolved";
30
+ spam: "spam";
22
31
  }>;
23
32
  priority: ZodEnum<{
24
- [x: string]: any;
33
+ low: "low";
34
+ normal: "normal";
35
+ high: "high";
36
+ urgent: "urgent";
25
37
  }>;
26
38
  sentiment: ZodNullable<ZodEnum<{
27
- [x: string]: any;
39
+ positive: "positive";
40
+ negative: "negative";
41
+ neutral: "neutral";
28
42
  }>>;
29
43
  sentimentConfidence: ZodNullable<ZodNumber>;
30
44
  channel: ZodString;
@@ -49,13 +63,20 @@ declare const conversationMutationResponseSchema: ZodObject<{
49
63
  visitorId: ZodString;
50
64
  websiteId: ZodString;
51
65
  status: ZodEnum<{
52
- [x: string]: any;
66
+ open: "open";
67
+ resolved: "resolved";
68
+ spam: "spam";
53
69
  }>;
54
70
  priority: ZodEnum<{
55
- [x: string]: any;
71
+ low: "low";
72
+ normal: "normal";
73
+ high: "high";
74
+ urgent: "urgent";
56
75
  }>;
57
76
  sentiment: ZodNullable<ZodEnum<{
58
- [x: string]: any;
77
+ positive: "positive";
78
+ negative: "negative";
79
+ neutral: "neutral";
59
80
  }>>;
60
81
  sentimentConfidence: ZodNullable<ZodNumber>;
61
82
  channel: ZodString;
@@ -76,14 +97,32 @@ declare const conversationMutationResponseSchema: ZodObject<{
76
97
  declare const conversationHeaderSchema: ZodObject<{
77
98
  id: ZodString;
78
99
  status: ZodEnum<{
79
- [x: string]: any;
100
+ open: "open";
101
+ resolved: "resolved";
102
+ spam: "spam";
80
103
  }>;
81
104
  priority: ZodEnum<{
82
- [x: string]: any;
105
+ low: "low";
106
+ normal: "normal";
107
+ high: "high";
108
+ urgent: "urgent";
83
109
  }>;
84
110
  organizationId: ZodString;
85
111
  visitorId: ZodString;
86
- visitor: any;
112
+ visitor: ZodObject<{
113
+ id: ZodULID;
114
+ lastSeenAt: ZodNullable<ZodString>;
115
+ blockedAt: ZodNullable<ZodString>;
116
+ blockedByUserId: ZodNullable<ZodString>;
117
+ isBlocked: ZodBoolean;
118
+ contact: ZodNullable<ZodObject<{
119
+ id: ZodULID;
120
+ name: ZodNullable<ZodString>;
121
+ email: ZodNullable<ZodString>;
122
+ image: ZodNullable<ZodString>;
123
+ metadataHash: ZodOptional<ZodString>;
124
+ }, $strip>>;
125
+ }, $strip>;
87
126
  websiteId: ZodString;
88
127
  channel: ZodString;
89
128
  title: ZodNullable<ZodString>;
@@ -98,22 +137,187 @@ declare const conversationHeaderSchema: ZodObject<{
98
137
  deletedAt: ZodNullable<ZodString>;
99
138
  lastMessageAt: ZodNullable<ZodString>;
100
139
  lastSeenAt: ZodNullable<ZodString>;
101
- lastTimelineItem: any;
140
+ lastMessageTimelineItem: ZodNullable<ZodObject<{
141
+ id: ZodOptional<ZodString>;
142
+ conversationId: ZodString;
143
+ organizationId: ZodString;
144
+ visibility: ZodEnum<{
145
+ private: "private";
146
+ public: "public";
147
+ }>;
148
+ type: ZodEnum<{
149
+ message: "message";
150
+ event: "event";
151
+ identification: "identification";
152
+ }>;
153
+ text: ZodNullable<ZodString>;
154
+ tool: ZodOptional<ZodNullable<ZodString>>;
155
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
156
+ type: ZodLiteral<"text">;
157
+ text: ZodString;
158
+ }, $strip>, ZodObject<{
159
+ type: ZodLiteral<"event">;
160
+ eventType: ZodEnum<{
161
+ resolved: "resolved";
162
+ assigned: "assigned";
163
+ unassigned: "unassigned";
164
+ participant_requested: "participant_requested";
165
+ participant_joined: "participant_joined";
166
+ participant_left: "participant_left";
167
+ status_changed: "status_changed";
168
+ priority_changed: "priority_changed";
169
+ tag_added: "tag_added";
170
+ tag_removed: "tag_removed";
171
+ reopened: "reopened";
172
+ visitor_blocked: "visitor_blocked";
173
+ visitor_unblocked: "visitor_unblocked";
174
+ visitor_identified: "visitor_identified";
175
+ }>;
176
+ actorUserId: ZodNullable<ZodString>;
177
+ actorAiAgentId: ZodNullable<ZodString>;
178
+ targetUserId: ZodNullable<ZodString>;
179
+ targetAiAgentId: ZodNullable<ZodString>;
180
+ message: ZodOptional<ZodNullable<ZodString>>;
181
+ }, $strip>, ZodObject<{
182
+ type: ZodLiteral<"image">;
183
+ url: ZodString;
184
+ mediaType: ZodString;
185
+ fileName: ZodOptional<ZodString>;
186
+ size: ZodOptional<ZodNumber>;
187
+ width: ZodOptional<ZodNumber>;
188
+ height: ZodOptional<ZodNumber>;
189
+ }, $strip>, ZodObject<{
190
+ type: ZodLiteral<"file">;
191
+ url: ZodString;
192
+ mediaType: ZodString;
193
+ fileName: ZodOptional<ZodString>;
194
+ size: ZodOptional<ZodNumber>;
195
+ }, $strip>, ZodObject<{
196
+ type: ZodLiteral<"metadata">;
197
+ source: ZodEnum<{
198
+ email: "email";
199
+ widget: "widget";
200
+ api: "api";
201
+ }>;
202
+ }, $strip>]>>;
203
+ userId: ZodNullable<ZodString>;
204
+ aiAgentId: ZodNullable<ZodString>;
205
+ visitorId: ZodNullable<ZodString>;
206
+ createdAt: ZodString;
207
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
208
+ }, $strip>>;
209
+ lastTimelineItem: ZodNullable<ZodObject<{
210
+ id: ZodOptional<ZodString>;
211
+ conversationId: ZodString;
212
+ organizationId: ZodString;
213
+ visibility: ZodEnum<{
214
+ private: "private";
215
+ public: "public";
216
+ }>;
217
+ type: ZodEnum<{
218
+ message: "message";
219
+ event: "event";
220
+ identification: "identification";
221
+ }>;
222
+ text: ZodNullable<ZodString>;
223
+ tool: ZodOptional<ZodNullable<ZodString>>;
224
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
225
+ type: ZodLiteral<"text">;
226
+ text: ZodString;
227
+ }, $strip>, ZodObject<{
228
+ type: ZodLiteral<"event">;
229
+ eventType: ZodEnum<{
230
+ resolved: "resolved";
231
+ assigned: "assigned";
232
+ unassigned: "unassigned";
233
+ participant_requested: "participant_requested";
234
+ participant_joined: "participant_joined";
235
+ participant_left: "participant_left";
236
+ status_changed: "status_changed";
237
+ priority_changed: "priority_changed";
238
+ tag_added: "tag_added";
239
+ tag_removed: "tag_removed";
240
+ reopened: "reopened";
241
+ visitor_blocked: "visitor_blocked";
242
+ visitor_unblocked: "visitor_unblocked";
243
+ visitor_identified: "visitor_identified";
244
+ }>;
245
+ actorUserId: ZodNullable<ZodString>;
246
+ actorAiAgentId: ZodNullable<ZodString>;
247
+ targetUserId: ZodNullable<ZodString>;
248
+ targetAiAgentId: ZodNullable<ZodString>;
249
+ message: ZodOptional<ZodNullable<ZodString>>;
250
+ }, $strip>, ZodObject<{
251
+ type: ZodLiteral<"image">;
252
+ url: ZodString;
253
+ mediaType: ZodString;
254
+ fileName: ZodOptional<ZodString>;
255
+ size: ZodOptional<ZodNumber>;
256
+ width: ZodOptional<ZodNumber>;
257
+ height: ZodOptional<ZodNumber>;
258
+ }, $strip>, ZodObject<{
259
+ type: ZodLiteral<"file">;
260
+ url: ZodString;
261
+ mediaType: ZodString;
262
+ fileName: ZodOptional<ZodString>;
263
+ size: ZodOptional<ZodNumber>;
264
+ }, $strip>, ZodObject<{
265
+ type: ZodLiteral<"metadata">;
266
+ source: ZodEnum<{
267
+ email: "email";
268
+ widget: "widget";
269
+ api: "api";
270
+ }>;
271
+ }, $strip>]>>;
272
+ userId: ZodNullable<ZodString>;
273
+ aiAgentId: ZodNullable<ZodString>;
274
+ visitorId: ZodNullable<ZodString>;
275
+ createdAt: ZodString;
276
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
277
+ }, $strip>>;
102
278
  viewIds: ZodArray<ZodString>;
103
- seenData: ZodArray<any>;
279
+ seenData: ZodArray<ZodObject<{
280
+ id: ZodString;
281
+ conversationId: ZodString;
282
+ userId: ZodNullable<ZodString>;
283
+ visitorId: ZodNullable<ZodString>;
284
+ aiAgentId: ZodNullable<ZodString>;
285
+ lastSeenAt: ZodString;
286
+ createdAt: ZodString;
287
+ updatedAt: ZodString;
288
+ deletedAt: ZodNullable<ZodString>;
289
+ }, $strip>>;
104
290
  }, $strip>;
105
291
  declare const listConversationHeadersResponseSchema: ZodObject<{
106
292
  items: ZodArray<ZodObject<{
107
293
  id: ZodString;
108
294
  status: ZodEnum<{
109
- [x: string]: any;
295
+ open: "open";
296
+ resolved: "resolved";
297
+ spam: "spam";
110
298
  }>;
111
299
  priority: ZodEnum<{
112
- [x: string]: any;
300
+ low: "low";
301
+ normal: "normal";
302
+ high: "high";
303
+ urgent: "urgent";
113
304
  }>;
114
305
  organizationId: ZodString;
115
306
  visitorId: ZodString;
116
- visitor: any;
307
+ visitor: ZodObject<{
308
+ id: ZodULID;
309
+ lastSeenAt: ZodNullable<ZodString>;
310
+ blockedAt: ZodNullable<ZodString>;
311
+ blockedByUserId: ZodNullable<ZodString>;
312
+ isBlocked: ZodBoolean;
313
+ contact: ZodNullable<ZodObject<{
314
+ id: ZodULID;
315
+ name: ZodNullable<ZodString>;
316
+ email: ZodNullable<ZodString>;
317
+ image: ZodNullable<ZodString>;
318
+ metadataHash: ZodOptional<ZodString>;
319
+ }, $strip>>;
320
+ }, $strip>;
117
321
  websiteId: ZodString;
118
322
  channel: ZodString;
119
323
  title: ZodNullable<ZodString>;
@@ -128,9 +332,156 @@ declare const listConversationHeadersResponseSchema: ZodObject<{
128
332
  deletedAt: ZodNullable<ZodString>;
129
333
  lastMessageAt: ZodNullable<ZodString>;
130
334
  lastSeenAt: ZodNullable<ZodString>;
131
- lastTimelineItem: any;
335
+ lastMessageTimelineItem: ZodNullable<ZodObject<{
336
+ id: ZodOptional<ZodString>;
337
+ conversationId: ZodString;
338
+ organizationId: ZodString;
339
+ visibility: ZodEnum<{
340
+ private: "private";
341
+ public: "public";
342
+ }>;
343
+ type: ZodEnum<{
344
+ message: "message";
345
+ event: "event";
346
+ identification: "identification";
347
+ }>;
348
+ text: ZodNullable<ZodString>;
349
+ tool: ZodOptional<ZodNullable<ZodString>>;
350
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
351
+ type: ZodLiteral<"text">;
352
+ text: ZodString;
353
+ }, $strip>, ZodObject<{
354
+ type: ZodLiteral<"event">;
355
+ eventType: ZodEnum<{
356
+ resolved: "resolved";
357
+ assigned: "assigned";
358
+ unassigned: "unassigned";
359
+ participant_requested: "participant_requested";
360
+ participant_joined: "participant_joined";
361
+ participant_left: "participant_left";
362
+ status_changed: "status_changed";
363
+ priority_changed: "priority_changed";
364
+ tag_added: "tag_added";
365
+ tag_removed: "tag_removed";
366
+ reopened: "reopened";
367
+ visitor_blocked: "visitor_blocked";
368
+ visitor_unblocked: "visitor_unblocked";
369
+ visitor_identified: "visitor_identified";
370
+ }>;
371
+ actorUserId: ZodNullable<ZodString>;
372
+ actorAiAgentId: ZodNullable<ZodString>;
373
+ targetUserId: ZodNullable<ZodString>;
374
+ targetAiAgentId: ZodNullable<ZodString>;
375
+ message: ZodOptional<ZodNullable<ZodString>>;
376
+ }, $strip>, ZodObject<{
377
+ type: ZodLiteral<"image">;
378
+ url: ZodString;
379
+ mediaType: ZodString;
380
+ fileName: ZodOptional<ZodString>;
381
+ size: ZodOptional<ZodNumber>;
382
+ width: ZodOptional<ZodNumber>;
383
+ height: ZodOptional<ZodNumber>;
384
+ }, $strip>, ZodObject<{
385
+ type: ZodLiteral<"file">;
386
+ url: ZodString;
387
+ mediaType: ZodString;
388
+ fileName: ZodOptional<ZodString>;
389
+ size: ZodOptional<ZodNumber>;
390
+ }, $strip>, ZodObject<{
391
+ type: ZodLiteral<"metadata">;
392
+ source: ZodEnum<{
393
+ email: "email";
394
+ widget: "widget";
395
+ api: "api";
396
+ }>;
397
+ }, $strip>]>>;
398
+ userId: ZodNullable<ZodString>;
399
+ aiAgentId: ZodNullable<ZodString>;
400
+ visitorId: ZodNullable<ZodString>;
401
+ createdAt: ZodString;
402
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
403
+ }, $strip>>;
404
+ lastTimelineItem: ZodNullable<ZodObject<{
405
+ id: ZodOptional<ZodString>;
406
+ conversationId: ZodString;
407
+ organizationId: ZodString;
408
+ visibility: ZodEnum<{
409
+ private: "private";
410
+ public: "public";
411
+ }>;
412
+ type: ZodEnum<{
413
+ message: "message";
414
+ event: "event";
415
+ identification: "identification";
416
+ }>;
417
+ text: ZodNullable<ZodString>;
418
+ tool: ZodOptional<ZodNullable<ZodString>>;
419
+ parts: ZodArray<ZodUnion<readonly [ZodObject<{
420
+ type: ZodLiteral<"text">;
421
+ text: ZodString;
422
+ }, $strip>, ZodObject<{
423
+ type: ZodLiteral<"event">;
424
+ eventType: ZodEnum<{
425
+ resolved: "resolved";
426
+ assigned: "assigned";
427
+ unassigned: "unassigned";
428
+ participant_requested: "participant_requested";
429
+ participant_joined: "participant_joined";
430
+ participant_left: "participant_left";
431
+ status_changed: "status_changed";
432
+ priority_changed: "priority_changed";
433
+ tag_added: "tag_added";
434
+ tag_removed: "tag_removed";
435
+ reopened: "reopened";
436
+ visitor_blocked: "visitor_blocked";
437
+ visitor_unblocked: "visitor_unblocked";
438
+ visitor_identified: "visitor_identified";
439
+ }>;
440
+ actorUserId: ZodNullable<ZodString>;
441
+ actorAiAgentId: ZodNullable<ZodString>;
442
+ targetUserId: ZodNullable<ZodString>;
443
+ targetAiAgentId: ZodNullable<ZodString>;
444
+ message: ZodOptional<ZodNullable<ZodString>>;
445
+ }, $strip>, ZodObject<{
446
+ type: ZodLiteral<"image">;
447
+ url: ZodString;
448
+ mediaType: ZodString;
449
+ fileName: ZodOptional<ZodString>;
450
+ size: ZodOptional<ZodNumber>;
451
+ width: ZodOptional<ZodNumber>;
452
+ height: ZodOptional<ZodNumber>;
453
+ }, $strip>, ZodObject<{
454
+ type: ZodLiteral<"file">;
455
+ url: ZodString;
456
+ mediaType: ZodString;
457
+ fileName: ZodOptional<ZodString>;
458
+ size: ZodOptional<ZodNumber>;
459
+ }, $strip>, ZodObject<{
460
+ type: ZodLiteral<"metadata">;
461
+ source: ZodEnum<{
462
+ email: "email";
463
+ widget: "widget";
464
+ api: "api";
465
+ }>;
466
+ }, $strip>]>>;
467
+ userId: ZodNullable<ZodString>;
468
+ aiAgentId: ZodNullable<ZodString>;
469
+ visitorId: ZodNullable<ZodString>;
470
+ createdAt: ZodString;
471
+ deletedAt: ZodOptional<ZodNullable<ZodString>>;
472
+ }, $strip>>;
132
473
  viewIds: ZodArray<ZodString>;
133
- seenData: ZodArray<any>;
474
+ seenData: ZodArray<ZodObject<{
475
+ id: ZodString;
476
+ conversationId: ZodString;
477
+ userId: ZodNullable<ZodString>;
478
+ visitorId: ZodNullable<ZodString>;
479
+ aiAgentId: ZodNullable<ZodString>;
480
+ lastSeenAt: ZodString;
481
+ createdAt: ZodString;
482
+ updatedAt: ZodString;
483
+ deletedAt: ZodNullable<ZodString>;
484
+ }, $strip>>;
134
485
  }, $strip>>;
135
486
  nextCursor: ZodNullable<ZodString>;
136
487
  }, $strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":[],"mappings":";;;;;cAUa,0BAAwB;;;cAMxB,4BAA0B;EAN1B,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,GAAA;AAMb,CAAA,CAAA;AAOa,cAAA,2BAA2B,EAAA,WAAA,CAAA,OAAA,CAAA;EAQ3B,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,GAAA;;cAAA,0BAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwBzB,0BAAA,GAA6B,cACjC;cAGK,oCAAkC;;;IA5BV,cAAA,WAAA;IAAA,SAAA,WAAA;IAwBzB,SAAA,WAAA;IAIC,MAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;cAIA,0BAAwB;;;;;;;;;;;;EAJU,OAAA,WAAA;EAAA,KAAA,aAAA,UAAA,CAAA;EAIlC,cAAA,aAwBX,UAAA,CAAA;;;;;;;;;;;;;;;cAEW,uCAAqC;;;;;;;;;;;;;;;;;;;IA1Bb,gBAAA,aAAA,UAAA,CAAA;IAAA,mBAAA,aAAA,UAAA,CAAA;IA0BxB,SAAA,WAAA;;;;;;;;;;;KAKD,4BAAA,GAA+B,cACnC;KAGI,kBAAA,GAAqB,cAAe"}
1
+ {"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/trpc/conversation.ts"],"sourcesContent":[],"mappings":";;;;;cAUa,0BAAwB;;;;AAArC,CAAA,CAAA;AAMa,cAAA,0BAA0B,EAAA,OAAA,CAAA;EAO1B,GAAA,EAAA,KAAA;EAQA,MAAA,EAAA,QAAA;;;;cARA,6BAA2B,YAAA;;;;;cAQ3B,0BAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,eAAA,aAAA,UAAA,CAAA;EAAA,UAAA,aAAA,UAAA,CAAA;EAwBzB,aAAA,aAAA,UAA0B,CAAA;EAIzB,aAAA,aAAA,UAEX,CAAA;;;;;;;KANU,0BAAA,GAA6B,cACjC;cAGK,oCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,aAAA,aAAA,UAAA,CAAA;IAAA,aAAA,aAAA,UAAA,CAAA;IAIlC,gBAAA,aAyBX,UAAA,CAAA;;;;;;;cAzBW,0BAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2BxB,uCAAqC;;;;;;;;;;;;MA3Bb,MAAA,EAAA,QAAA;IAAA,CAAA,CAAA;IA2BxB,cAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKD,4BAAA,GAA+B,cACnC;KAGI,kBAAA,GAAqB,cAAe"}
@@ -66,6 +66,7 @@ const conversationHeaderSchema = z.object({
66
66
  deletedAt: z.string().nullable(),
67
67
  lastMessageAt: z.string().nullable(),
68
68
  lastSeenAt: z.string().nullable(),
69
+ lastMessageTimelineItem: timelineItemSchema.nullable(),
69
70
  lastTimelineItem: timelineItemSchema.nullable(),
70
71
  viewIds: z.array(z.string()),
71
72
  seenData: z.array(conversationSeenSchema)
@@ -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\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,iB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U;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\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;CAC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AE,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"}
package/trpc/visitor.d.ts CHANGED
@@ -1,11 +1,87 @@
1
1
  import { $strip } from "../schemas2.js";
2
2
  import { output } from "../core.js";
3
- import { ZodArray, ZodEnum, ZodNullable, ZodNumber, ZodObject, ZodString, ZodULID } from "../schemas3.js";
3
+ import { ZodArray, ZodBoolean, ZodEmail, ZodEnum, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodRecord, ZodString, ZodULID, ZodURL, ZodUnion } from "../schemas3.js";
4
4
 
5
5
  //#region src/trpc/visitor.d.ts
6
6
  declare const blockVisitorResponseSchema: ZodObject<{
7
- conversation: any;
8
- visitor: any;
7
+ conversation: ZodObject<{
8
+ id: ZodString;
9
+ organizationId: ZodString;
10
+ visitorId: ZodString;
11
+ websiteId: ZodString;
12
+ status: ZodEnum<{
13
+ open: "open";
14
+ resolved: "resolved";
15
+ spam: "spam";
16
+ }>;
17
+ priority: ZodEnum<{
18
+ low: "low";
19
+ normal: "normal";
20
+ high: "high";
21
+ urgent: "urgent";
22
+ }>;
23
+ sentiment: ZodNullable<ZodEnum<{
24
+ positive: "positive";
25
+ negative: "negative";
26
+ neutral: "neutral";
27
+ }>>;
28
+ sentimentConfidence: ZodNullable<ZodNumber>;
29
+ channel: ZodString;
30
+ title: ZodNullable<ZodString>;
31
+ resolutionTime: ZodNullable<ZodNumber>;
32
+ startedAt: ZodNullable<ZodString>;
33
+ firstResponseAt: ZodNullable<ZodString>;
34
+ resolvedAt: ZodNullable<ZodString>;
35
+ lastMessageAt: ZodNullable<ZodString>;
36
+ lastMessageBy: ZodNullable<ZodString>;
37
+ resolvedByUserId: ZodNullable<ZodString>;
38
+ resolvedByAiAgentId: ZodNullable<ZodString>;
39
+ createdAt: ZodString;
40
+ updatedAt: ZodString;
41
+ deletedAt: ZodNullable<ZodString>;
42
+ }, $strip>;
43
+ visitor: ZodObject<{
44
+ id: ZodULID;
45
+ browser: ZodNullable<ZodString>;
46
+ browserVersion: ZodNullable<ZodString>;
47
+ os: ZodNullable<ZodString>;
48
+ osVersion: ZodNullable<ZodString>;
49
+ device: ZodNullable<ZodString>;
50
+ deviceType: ZodNullable<ZodString>;
51
+ ip: ZodNullable<ZodString>;
52
+ city: ZodNullable<ZodString>;
53
+ region: ZodNullable<ZodString>;
54
+ country: ZodNullable<ZodString>;
55
+ countryCode: ZodNullable<ZodString>;
56
+ latitude: ZodNullable<ZodNumber>;
57
+ longitude: ZodNullable<ZodNumber>;
58
+ language: ZodNullable<ZodString>;
59
+ timezone: ZodNullable<ZodString>;
60
+ screenResolution: ZodNullable<ZodString>;
61
+ viewport: ZodNullable<ZodString>;
62
+ createdAt: ZodString;
63
+ updatedAt: ZodString;
64
+ lastSeenAt: ZodNullable<ZodString>;
65
+ websiteId: ZodULID;
66
+ organizationId: ZodULID;
67
+ blockedAt: ZodNullable<ZodString>;
68
+ blockedByUserId: ZodNullable<ZodString>;
69
+ isBlocked: ZodBoolean;
70
+ contact: ZodNullable<ZodObject<{
71
+ id: ZodULID;
72
+ externalId: ZodNullable<ZodString>;
73
+ name: ZodNullable<ZodString>;
74
+ email: ZodNullable<ZodEmail>;
75
+ image: ZodNullable<ZodURL>;
76
+ metadata: ZodNullable<ZodRecord<ZodString, ZodUnion<[ZodUnion<[ZodUnion<[ZodString, ZodNumber]>, ZodBoolean]>, ZodNull]>>>;
77
+ contactOrganizationId: ZodNullable<ZodULID>;
78
+ websiteId: ZodULID;
79
+ organizationId: ZodULID;
80
+ userId: ZodNullable<ZodULID>;
81
+ createdAt: ZodString;
82
+ updatedAt: ZodString;
83
+ }, $strip>>;
84
+ }, $strip>;
9
85
  }, $strip>;
10
86
  type BlockVisitorResponse = output<typeof blockVisitorResponseSchema>;
11
87
  declare const visitorPresenceEntrySchema: ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"visitor.d.ts","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,4BAA0B;;;GAGrC;AAHW,KAKD,oBAAA,GAAuB,MAFjC,CAAA,OAEgD,0BALX,CAAA;AAK3B,cAEC,0BAFqC,EAEX,SAFW,CAAA;EAErC,EAAA,SAAA;;;;;;;;;;;;;;;;cAeA,mCAAiC;;;;;;;;IAfP,IAAA,aAAA,UAAA,CAAA;IAAA,KAAA,aAAA,UAAA,CAAA;IAe1B,KAAA,aAAA,UAMX,CAAA;;;;;;;;;;;;;KAEU,oBAAA,GAAuB,cAAe;KACtC,2BAAA,GAA8B,cAClC"}
1
+ {"version":3,"file":"visitor.d.ts","names":[],"sources":["../../src/trpc/visitor.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,4BAA0B;;;;IAA1B,SAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKD,oBAAA,GAAuB,cAAe;cAErC,4BAA0B;;;;;;;;;;;;;;;;;cAe1B,mCAAiC;;;;;;;;;;;;;;;;;;;;;EAtBP,CAAA,QAAA,CAAA;CAAA,QAAA,CAAA;AAK3B,KAyBA,oBAAA,GAAuB,MAzBe,CAAA,OAyBA,0BAzBR,CAAA;AAE7B,KAwBD,2BAAA,GAA8B,MAXxC,CAAA,OAYM,iCAZN,CAAA"}