@kl1/contracts 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/index.js +1393 -1300
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +1389 -1300
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/call-log/schema.d.ts +4 -4
  6. package/dist/src/call-log/validation.d.ts +2 -2
  7. package/dist/src/chat/index.d.ts +240 -239
  8. package/dist/src/chat/index.d.ts.map +1 -1
  9. package/dist/src/chat/schema.d.ts +36 -36
  10. package/dist/src/chat/validation.d.ts +235 -84
  11. package/dist/src/chat/validation.d.ts.map +1 -1
  12. package/dist/src/contract.d.ts +7813 -2082
  13. package/dist/src/contract.d.ts.map +1 -1
  14. package/dist/src/cx-log/index.d.ts +5651 -87
  15. package/dist/src/cx-log/index.d.ts.map +1 -1
  16. package/dist/src/cx-log/schema.d.ts +4724 -5
  17. package/dist/src/cx-log/schema.d.ts.map +1 -1
  18. package/dist/src/dashboard/index.d.ts +6 -6
  19. package/dist/src/dashboard/schema.d.ts +4 -4
  20. package/dist/src/evaluate-form/schema.d.ts +2 -2
  21. package/dist/src/index.d.ts +4 -0
  22. package/dist/src/index.d.ts.map +1 -1
  23. package/dist/src/mail/mail-contract.d.ts +106 -106
  24. package/dist/src/mail/message-contract.d.ts +6 -6
  25. package/dist/src/mail/room-contract.d.ts +100 -100
  26. package/dist/src/mail/schemas/message.schema.d.ts +4 -4
  27. package/dist/src/mail/schemas/room-validation.schema.d.ts +32 -32
  28. package/dist/src/mail/schemas/room.schema.d.ts +26 -26
  29. package/dist/src/messenger/index.d.ts +209 -42
  30. package/dist/src/messenger/index.d.ts.map +1 -1
  31. package/dist/src/telephony-cdr/schema.d.ts +8 -8
  32. package/dist/src/telephony-cdr/validation.d.ts +4 -4
  33. package/dist/src/telephony-live-queue-call/schema.d.ts +2 -2
  34. package/dist/src/telephony-queue-call-count/schema.d.ts +2 -2
  35. package/dist/src/ticket/index.d.ts +4 -4
  36. package/dist/src/ticket/validation.d.ts +4 -4
  37. package/dist/src/ticket/validation.d.ts.map +1 -1
  38. package/dist/src/user/index.d.ts +2 -0
  39. package/dist/src/user/index.d.ts.map +1 -1
  40. package/dist/src/user-presence-status-log/index.d.ts +2 -0
  41. package/dist/src/user-presence-status-log/index.d.ts.map +1 -1
  42. package/dist/src/wrap-up-form/index.d.ts +15 -15
  43. package/dist/src/wrap-up-form/schema.d.ts +2 -2
  44. package/dist/src/wrap-up-form/validation.d.ts +3 -3
  45. package/package.json +10 -4
@@ -57,9 +57,9 @@ export declare const CxLogSchema: z.ZodObject<{
57
57
  updatedAt: Date;
58
58
  deletedAt: Date | null;
59
59
  }[];
60
- note: string | null;
61
60
  callFrom: string | null;
62
61
  callTo: string | null;
62
+ note: string | null;
63
63
  }, {
64
64
  id: string;
65
65
  disposition: string | null;
@@ -73,9 +73,9 @@ export declare const CxLogSchema: z.ZodObject<{
73
73
  updatedAt: Date;
74
74
  deletedAt: Date | null;
75
75
  }[];
76
- note: string | null;
77
76
  callFrom: string | null;
78
77
  callTo: string | null;
78
+ note: string | null;
79
79
  }>>;
80
80
  }, "strip", z.ZodTypeAny, {
81
81
  id: string;
@@ -86,9 +86,9 @@ export declare const CxLogSchema: z.ZodObject<{
86
86
  updatedAt: Date;
87
87
  deletedAt: Date | null;
88
88
  entityId: string;
89
+ contactId: string | null;
89
90
  caseId: number;
90
91
  entityName: string;
91
- contactId: string | null;
92
92
  queueId: string | null;
93
93
  agentId: string | null;
94
94
  startedDate: Date | null;
@@ -107,9 +107,9 @@ export declare const CxLogSchema: z.ZodObject<{
107
107
  updatedAt: Date;
108
108
  deletedAt: Date | null;
109
109
  }[];
110
- note: string | null;
111
110
  callFrom: string | null;
112
111
  callTo: string | null;
112
+ note: string | null;
113
113
  } | null;
114
114
  }, {
115
115
  id: string;
@@ -120,9 +120,9 @@ export declare const CxLogSchema: z.ZodObject<{
120
120
  updatedAt: Date;
121
121
  deletedAt: Date | null;
122
122
  entityId: string;
123
+ contactId: string | null;
123
124
  caseId: number;
124
125
  entityName: string;
125
- contactId: string | null;
126
126
  queueId: string | null;
127
127
  agentId: string | null;
128
128
  startedDate: Date | null;
@@ -141,9 +141,4728 @@ export declare const CxLogSchema: z.ZodObject<{
141
141
  updatedAt: Date;
142
142
  deletedAt: Date | null;
143
143
  }[];
144
+ callFrom: string | null;
145
+ callTo: string | null;
146
+ note: string | null;
147
+ } | null;
148
+ }>;
149
+ export declare const CxLogSchemaWithRelations: z.ZodObject<{
150
+ id: z.ZodString;
151
+ createdAt: z.ZodDate;
152
+ updatedAt: z.ZodDate;
153
+ deletedAt: z.ZodNullable<z.ZodDate>;
154
+ caseId: z.ZodNumber;
155
+ entityId: z.ZodString;
156
+ entityName: z.ZodString;
157
+ channelType: z.ZodNullable<z.ZodString>;
158
+ channel: z.ZodNullable<z.ZodString>;
159
+ direction: z.ZodNullable<z.ZodString>;
160
+ startedDate: z.ZodNullable<z.ZodString>;
161
+ handledTime: z.ZodNullable<z.ZodString>;
162
+ firstResponseTime: z.ZodNullable<z.ZodString>;
163
+ disposition: z.ZodNullable<z.ZodString>;
164
+ slaMeet: z.ZodNullable<z.ZodString>;
165
+ evaluateForm: z.ZodNullable<z.ZodObject<{
166
+ id: z.ZodString;
167
+ createdAt: z.ZodDate;
168
+ updatedAt: z.ZodDate;
169
+ deletedAt: z.ZodNullable<z.ZodDate>;
170
+ cxLogId: z.ZodString;
171
+ sentimentScore: z.ZodNullable<z.ZodString>;
172
+ csatScore: z.ZodNullable<z.ZodString>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ id: string;
175
+ createdAt: Date;
176
+ updatedAt: Date;
177
+ deletedAt: Date | null;
178
+ cxLogId: string;
179
+ sentimentScore: string | null;
180
+ csatScore: string | null;
181
+ }, {
182
+ id: string;
183
+ createdAt: Date;
184
+ updatedAt: Date;
185
+ deletedAt: Date | null;
186
+ cxLogId: string;
187
+ sentimentScore: string | null;
188
+ csatScore: string | null;
189
+ }>>;
190
+ wrapUpForm: z.ZodNullable<z.ZodObject<{
191
+ id: z.ZodString;
192
+ createdAt: z.ZodDate;
193
+ updatedAt: z.ZodDate;
194
+ deletedAt: z.ZodNullable<z.ZodDate>;
195
+ note: z.ZodNullable<z.ZodString>;
196
+ disposition: z.ZodNullable<z.ZodString>;
197
+ callFrom: z.ZodNullable<z.ZodString>;
198
+ callTo: z.ZodNullable<z.ZodString>;
199
+ tags: z.ZodArray<z.ZodObject<{
200
+ id: z.ZodString;
201
+ createdAt: z.ZodDate;
202
+ updatedAt: z.ZodDate;
203
+ deletedAt: z.ZodNullable<z.ZodDate>;
204
+ name: z.ZodString;
205
+ }, "strip", z.ZodTypeAny, {
206
+ id: string;
207
+ name: string;
208
+ createdAt: Date;
209
+ updatedAt: Date;
210
+ deletedAt: Date | null;
211
+ }, {
212
+ id: string;
213
+ name: string;
214
+ createdAt: Date;
215
+ updatedAt: Date;
216
+ deletedAt: Date | null;
217
+ }>, "many">;
218
+ }, "strip", z.ZodTypeAny, {
219
+ id: string;
220
+ disposition: string | null;
221
+ createdAt: Date;
222
+ updatedAt: Date;
223
+ deletedAt: Date | null;
224
+ tags: {
225
+ id: string;
226
+ name: string;
227
+ createdAt: Date;
228
+ updatedAt: Date;
229
+ deletedAt: Date | null;
230
+ }[];
231
+ callFrom: string | null;
232
+ callTo: string | null;
144
233
  note: string | null;
234
+ }, {
235
+ id: string;
236
+ disposition: string | null;
237
+ createdAt: Date;
238
+ updatedAt: Date;
239
+ deletedAt: Date | null;
240
+ tags: {
241
+ id: string;
242
+ name: string;
243
+ createdAt: Date;
244
+ updatedAt: Date;
245
+ deletedAt: Date | null;
246
+ }[];
145
247
  callFrom: string | null;
146
248
  callTo: string | null;
249
+ note: string | null;
250
+ }>>;
251
+ room: z.ZodNullable<z.ZodObject<{
252
+ id: z.ZodString;
253
+ createdAt: z.ZodDate;
254
+ updatedAt: z.ZodDate;
255
+ deletedAt: z.ZodNullable<z.ZodDate>;
256
+ lastMessage: z.ZodString;
257
+ handleTime: z.ZodNumber;
258
+ closeAt: z.ZodDate;
259
+ unreadCount: z.ZodNumber;
260
+ firstResponseAt: z.ZodDate;
261
+ firstResponseTime: z.ZodNumber;
262
+ isLatest: z.ZodBoolean;
263
+ direction: z.ZodEnum<["incoming", "outgoing", "system"]>;
264
+ platformContact: z.ZodObject<{
265
+ id: z.ZodString;
266
+ createdAt: z.ZodDate;
267
+ updatedAt: z.ZodDate;
268
+ deletedAt: z.ZodNullable<z.ZodDate>;
269
+ channelId: z.ZodString;
270
+ socialPlatformId: z.ZodString;
271
+ type: z.ZodEnum<["whatsapp", "messenger", "telegram", "line", "viber", "kakao", "shopee", "lazada", "instagram"]>;
272
+ metadata: z.ZodObject<{
273
+ id: z.ZodString;
274
+ name: z.ZodString;
275
+ picture: z.ZodOptional<z.ZodString>;
276
+ additionalCredentials: z.ZodAny;
277
+ }, "strip", z.ZodTypeAny, {
278
+ id: string;
279
+ name: string;
280
+ picture?: string | undefined;
281
+ additionalCredentials?: any;
282
+ }, {
283
+ id: string;
284
+ name: string;
285
+ picture?: string | undefined;
286
+ additionalCredentials?: any;
287
+ }>;
288
+ contact: z.ZodObject<{
289
+ id: z.ZodString;
290
+ createdAt: z.ZodDate;
291
+ updatedAt: z.ZodDate;
292
+ deletedAt: z.ZodNullable<z.ZodDate>;
293
+ name: z.ZodString;
294
+ address: z.ZodNullable<z.ZodString>;
295
+ channel: z.ZodNullable<z.ZodString>;
296
+ notes: z.ZodNullable<z.ZodString>;
297
+ contactProfile: z.ZodNullable<z.ZodString>;
298
+ socialProfileUrl: z.ZodNullable<z.ZodString>;
299
+ tags: z.ZodArray<z.ZodObject<{
300
+ id: z.ZodString;
301
+ createdAt: z.ZodDate;
302
+ updatedAt: z.ZodDate;
303
+ deletedAt: z.ZodNullable<z.ZodDate>;
304
+ name: z.ZodString;
305
+ }, "strip", z.ZodTypeAny, {
306
+ id: string;
307
+ name: string;
308
+ createdAt: Date;
309
+ updatedAt: Date;
310
+ deletedAt: Date | null;
311
+ }, {
312
+ id: string;
313
+ name: string;
314
+ createdAt: Date;
315
+ updatedAt: Date;
316
+ deletedAt: Date | null;
317
+ }>, "many">;
318
+ company: z.ZodNullable<z.ZodObject<Omit<{
319
+ id: z.ZodString;
320
+ createdAt: z.ZodDate;
321
+ updatedAt: z.ZodDate;
322
+ deletedAt: z.ZodNullable<z.ZodDate>;
323
+ name: z.ZodOptional<z.ZodString>;
324
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
326
+ industry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
+ customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
328
+ id: z.ZodString;
329
+ createdAt: z.ZodDate;
330
+ updatedAt: z.ZodDate;
331
+ deletedAt: z.ZodNullable<z.ZodDate>;
332
+ textValue: z.ZodNullable<z.ZodString>;
333
+ booleanValue: z.ZodNullable<z.ZodBoolean>;
334
+ numberValue: z.ZodNullable<z.ZodNumber>;
335
+ dateValue: z.ZodNullable<z.ZodDate>;
336
+ attribute: z.ZodObject<Omit<{
337
+ id: z.ZodString;
338
+ createdAt: z.ZodDate;
339
+ updatedAt: z.ZodDate;
340
+ deletedAt: z.ZodNullable<z.ZodDate>;
341
+ systemName: z.ZodString;
342
+ displayName: z.ZodString;
343
+ type: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"textarea">, z.ZodLiteral<"date">, z.ZodLiteral<"select">, z.ZodLiteral<"link">, z.ZodLiteral<"attachment">]>;
344
+ position: z.ZodNumber;
345
+ isDefault: z.ZodBoolean;
346
+ isArchived: z.ZodBoolean;
347
+ isRequired: z.ZodBoolean;
348
+ isUnique: z.ZodBoolean;
349
+ options: z.ZodArray<z.ZodObject<{
350
+ position: z.ZodNumber;
351
+ value: z.ZodString;
352
+ label: z.ZodString;
353
+ isDefault: z.ZodBoolean;
354
+ id: z.ZodString;
355
+ }, "strip", z.ZodTypeAny, {
356
+ id: string;
357
+ position: number;
358
+ value: string;
359
+ label: string;
360
+ isDefault: boolean;
361
+ }, {
362
+ id: string;
363
+ position: number;
364
+ value: string;
365
+ label: string;
366
+ isDefault: boolean;
367
+ }>, "many">;
368
+ group: z.ZodObject<{
369
+ id: z.ZodString;
370
+ createdAt: z.ZodDate;
371
+ updatedAt: z.ZodDate;
372
+ deletedAt: z.ZodNullable<z.ZodDate>;
373
+ systemName: z.ZodString;
374
+ displayName: z.ZodString;
375
+ }, "strip", z.ZodTypeAny, {
376
+ id: string;
377
+ createdAt: Date;
378
+ updatedAt: Date;
379
+ deletedAt: Date | null;
380
+ systemName: string;
381
+ displayName: string;
382
+ }, {
383
+ id: string;
384
+ createdAt: Date;
385
+ updatedAt: Date;
386
+ deletedAt: Date | null;
387
+ systemName: string;
388
+ displayName: string;
389
+ }>;
390
+ }, "options" | "group">, "strip", z.ZodTypeAny, {
391
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
392
+ id: string;
393
+ position: number;
394
+ createdAt: Date;
395
+ updatedAt: Date;
396
+ deletedAt: Date | null;
397
+ isDefault: boolean;
398
+ systemName: string;
399
+ displayName: string;
400
+ isArchived: boolean;
401
+ isRequired: boolean;
402
+ isUnique: boolean;
403
+ }, {
404
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
405
+ id: string;
406
+ position: number;
407
+ createdAt: Date;
408
+ updatedAt: Date;
409
+ deletedAt: Date | null;
410
+ isDefault: boolean;
411
+ systemName: string;
412
+ displayName: string;
413
+ isArchived: boolean;
414
+ isRequired: boolean;
415
+ isUnique: boolean;
416
+ }>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ id: string;
419
+ createdAt: Date;
420
+ updatedAt: Date;
421
+ deletedAt: Date | null;
422
+ attribute: {
423
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
424
+ id: string;
425
+ position: number;
426
+ createdAt: Date;
427
+ updatedAt: Date;
428
+ deletedAt: Date | null;
429
+ isDefault: boolean;
430
+ systemName: string;
431
+ displayName: string;
432
+ isArchived: boolean;
433
+ isRequired: boolean;
434
+ isUnique: boolean;
435
+ };
436
+ textValue: string | null;
437
+ booleanValue: boolean | null;
438
+ numberValue: number | null;
439
+ dateValue: Date | null;
440
+ }, {
441
+ id: string;
442
+ createdAt: Date;
443
+ updatedAt: Date;
444
+ deletedAt: Date | null;
445
+ attribute: {
446
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
447
+ id: string;
448
+ position: number;
449
+ createdAt: Date;
450
+ updatedAt: Date;
451
+ deletedAt: Date | null;
452
+ isDefault: boolean;
453
+ systemName: string;
454
+ displayName: string;
455
+ isArchived: boolean;
456
+ isRequired: boolean;
457
+ isUnique: boolean;
458
+ };
459
+ textValue: string | null;
460
+ booleanValue: boolean | null;
461
+ numberValue: number | null;
462
+ dateValue: Date | null;
463
+ }>, "many">>;
464
+ }, "customFields">, "strip", z.ZodTypeAny, {
465
+ id: string;
466
+ createdAt: Date;
467
+ updatedAt: Date;
468
+ deletedAt: Date | null;
469
+ address?: string | null | undefined;
470
+ name?: string | undefined;
471
+ phone?: string | null | undefined;
472
+ industry?: string | null | undefined;
473
+ }, {
474
+ id: string;
475
+ createdAt: Date;
476
+ updatedAt: Date;
477
+ deletedAt: Date | null;
478
+ address?: string | null | undefined;
479
+ name?: string | undefined;
480
+ phone?: string | null | undefined;
481
+ industry?: string | null | undefined;
482
+ }>>;
483
+ customFields: z.ZodArray<z.ZodObject<{
484
+ id: z.ZodString;
485
+ createdAt: z.ZodDate;
486
+ updatedAt: z.ZodDate;
487
+ deletedAt: z.ZodNullable<z.ZodDate>;
488
+ textValue: z.ZodNullable<z.ZodString>;
489
+ booleanValue: z.ZodNullable<z.ZodBoolean>;
490
+ numberValue: z.ZodNullable<z.ZodNumber>;
491
+ dateValue: z.ZodNullable<z.ZodDate>;
492
+ attribute: z.ZodObject<Omit<{
493
+ id: z.ZodString;
494
+ createdAt: z.ZodDate;
495
+ updatedAt: z.ZodDate;
496
+ deletedAt: z.ZodNullable<z.ZodDate>;
497
+ systemName: z.ZodString;
498
+ displayName: z.ZodString;
499
+ type: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"textarea">, z.ZodLiteral<"date">, z.ZodLiteral<"select">, z.ZodLiteral<"link">, z.ZodLiteral<"attachment">]>;
500
+ position: z.ZodNumber;
501
+ isDefault: z.ZodBoolean;
502
+ isArchived: z.ZodBoolean;
503
+ isRequired: z.ZodBoolean;
504
+ isUnique: z.ZodBoolean;
505
+ options: z.ZodArray<z.ZodObject<{
506
+ position: z.ZodNumber;
507
+ value: z.ZodString;
508
+ label: z.ZodString;
509
+ isDefault: z.ZodBoolean;
510
+ id: z.ZodString;
511
+ }, "strip", z.ZodTypeAny, {
512
+ id: string;
513
+ position: number;
514
+ value: string;
515
+ label: string;
516
+ isDefault: boolean;
517
+ }, {
518
+ id: string;
519
+ position: number;
520
+ value: string;
521
+ label: string;
522
+ isDefault: boolean;
523
+ }>, "many">;
524
+ group: z.ZodObject<{
525
+ id: z.ZodString;
526
+ createdAt: z.ZodDate;
527
+ updatedAt: z.ZodDate;
528
+ deletedAt: z.ZodNullable<z.ZodDate>;
529
+ systemName: z.ZodString;
530
+ displayName: z.ZodString;
531
+ }, "strip", z.ZodTypeAny, {
532
+ id: string;
533
+ createdAt: Date;
534
+ updatedAt: Date;
535
+ deletedAt: Date | null;
536
+ systemName: string;
537
+ displayName: string;
538
+ }, {
539
+ id: string;
540
+ createdAt: Date;
541
+ updatedAt: Date;
542
+ deletedAt: Date | null;
543
+ systemName: string;
544
+ displayName: string;
545
+ }>;
546
+ }, "options" | "group">, "strip", z.ZodTypeAny, {
547
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
548
+ id: string;
549
+ position: number;
550
+ createdAt: Date;
551
+ updatedAt: Date;
552
+ deletedAt: Date | null;
553
+ isDefault: boolean;
554
+ systemName: string;
555
+ displayName: string;
556
+ isArchived: boolean;
557
+ isRequired: boolean;
558
+ isUnique: boolean;
559
+ }, {
560
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
561
+ id: string;
562
+ position: number;
563
+ createdAt: Date;
564
+ updatedAt: Date;
565
+ deletedAt: Date | null;
566
+ isDefault: boolean;
567
+ systemName: string;
568
+ displayName: string;
569
+ isArchived: boolean;
570
+ isRequired: boolean;
571
+ isUnique: boolean;
572
+ }>;
573
+ uploads: z.ZodArray<z.ZodObject<{
574
+ id: z.ZodString;
575
+ createdAt: z.ZodDate;
576
+ updatedAt: z.ZodDate;
577
+ deletedAt: z.ZodNullable<z.ZodDate>;
578
+ customFieldId: z.ZodString;
579
+ upload: z.ZodObject<{
580
+ id: z.ZodString;
581
+ createdAt: z.ZodDate;
582
+ updatedAt: z.ZodDate;
583
+ deletedAt: z.ZodNullable<z.ZodDate>;
584
+ bucketName: z.ZodString;
585
+ fileName: z.ZodString;
586
+ fileSize: z.ZodNumber;
587
+ fileKey: z.ZodString;
588
+ }, "strip", z.ZodTypeAny, {
589
+ id: string;
590
+ createdAt: Date;
591
+ updatedAt: Date;
592
+ deletedAt: Date | null;
593
+ fileName: string;
594
+ fileKey: string;
595
+ bucketName: string;
596
+ fileSize: number;
597
+ }, {
598
+ id: string;
599
+ createdAt: Date;
600
+ updatedAt: Date;
601
+ deletedAt: Date | null;
602
+ fileName: string;
603
+ fileKey: string;
604
+ bucketName: string;
605
+ fileSize: number;
606
+ }>;
607
+ }, "strip", z.ZodTypeAny, {
608
+ id: string;
609
+ createdAt: Date;
610
+ updatedAt: Date;
611
+ deletedAt: Date | null;
612
+ customFieldId: string;
613
+ upload: {
614
+ id: string;
615
+ createdAt: Date;
616
+ updatedAt: Date;
617
+ deletedAt: Date | null;
618
+ fileName: string;
619
+ fileKey: string;
620
+ bucketName: string;
621
+ fileSize: number;
622
+ };
623
+ }, {
624
+ id: string;
625
+ createdAt: Date;
626
+ updatedAt: Date;
627
+ deletedAt: Date | null;
628
+ customFieldId: string;
629
+ upload: {
630
+ id: string;
631
+ createdAt: Date;
632
+ updatedAt: Date;
633
+ deletedAt: Date | null;
634
+ fileName: string;
635
+ fileKey: string;
636
+ bucketName: string;
637
+ fileSize: number;
638
+ };
639
+ }>, "many">;
640
+ }, "strip", z.ZodTypeAny, {
641
+ id: string;
642
+ createdAt: Date;
643
+ updatedAt: Date;
644
+ deletedAt: Date | null;
645
+ attribute: {
646
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
647
+ id: string;
648
+ position: number;
649
+ createdAt: Date;
650
+ updatedAt: Date;
651
+ deletedAt: Date | null;
652
+ isDefault: boolean;
653
+ systemName: string;
654
+ displayName: string;
655
+ isArchived: boolean;
656
+ isRequired: boolean;
657
+ isUnique: boolean;
658
+ };
659
+ textValue: string | null;
660
+ booleanValue: boolean | null;
661
+ numberValue: number | null;
662
+ dateValue: Date | null;
663
+ uploads: {
664
+ id: string;
665
+ createdAt: Date;
666
+ updatedAt: Date;
667
+ deletedAt: Date | null;
668
+ customFieldId: string;
669
+ upload: {
670
+ id: string;
671
+ createdAt: Date;
672
+ updatedAt: Date;
673
+ deletedAt: Date | null;
674
+ fileName: string;
675
+ fileKey: string;
676
+ bucketName: string;
677
+ fileSize: number;
678
+ };
679
+ }[];
680
+ }, {
681
+ id: string;
682
+ createdAt: Date;
683
+ updatedAt: Date;
684
+ deletedAt: Date | null;
685
+ attribute: {
686
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
687
+ id: string;
688
+ position: number;
689
+ createdAt: Date;
690
+ updatedAt: Date;
691
+ deletedAt: Date | null;
692
+ isDefault: boolean;
693
+ systemName: string;
694
+ displayName: string;
695
+ isArchived: boolean;
696
+ isRequired: boolean;
697
+ isUnique: boolean;
698
+ };
699
+ textValue: string | null;
700
+ booleanValue: boolean | null;
701
+ numberValue: number | null;
702
+ dateValue: Date | null;
703
+ uploads: {
704
+ id: string;
705
+ createdAt: Date;
706
+ updatedAt: Date;
707
+ deletedAt: Date | null;
708
+ customFieldId: string;
709
+ upload: {
710
+ id: string;
711
+ createdAt: Date;
712
+ updatedAt: Date;
713
+ deletedAt: Date | null;
714
+ fileName: string;
715
+ fileKey: string;
716
+ bucketName: string;
717
+ fileSize: number;
718
+ };
719
+ }[];
720
+ }>, "many">;
721
+ contactEmails: z.ZodArray<z.ZodObject<{
722
+ id: z.ZodString;
723
+ createdAt: z.ZodDate;
724
+ updatedAt: z.ZodDate;
725
+ deletedAt: z.ZodNullable<z.ZodDate>;
726
+ email: z.ZodString;
727
+ isPrimary: z.ZodBoolean;
728
+ }, "strip", z.ZodTypeAny, {
729
+ id: string;
730
+ isPrimary: boolean;
731
+ email: string;
732
+ createdAt: Date;
733
+ updatedAt: Date;
734
+ deletedAt: Date | null;
735
+ }, {
736
+ id: string;
737
+ isPrimary: boolean;
738
+ email: string;
739
+ createdAt: Date;
740
+ updatedAt: Date;
741
+ deletedAt: Date | null;
742
+ }>, "many">;
743
+ contactPhones: z.ZodArray<z.ZodObject<{
744
+ id: z.ZodString;
745
+ createdAt: z.ZodDate;
746
+ updatedAt: z.ZodDate;
747
+ deletedAt: z.ZodNullable<z.ZodDate>;
748
+ phone: z.ZodString;
749
+ isPrimary: z.ZodBoolean;
750
+ }, "strip", z.ZodTypeAny, {
751
+ id: string;
752
+ isPrimary: boolean;
753
+ createdAt: Date;
754
+ updatedAt: Date;
755
+ deletedAt: Date | null;
756
+ phone: string;
757
+ }, {
758
+ id: string;
759
+ isPrimary: boolean;
760
+ createdAt: Date;
761
+ updatedAt: Date;
762
+ deletedAt: Date | null;
763
+ phone: string;
764
+ }>, "many">;
765
+ activityLogs: z.ZodOptional<z.ZodArray<z.ZodObject<{
766
+ id: z.ZodString;
767
+ createdAt: z.ZodDate;
768
+ updatedAt: z.ZodDate;
769
+ deletedAt: z.ZodNullable<z.ZodDate>;
770
+ entityId: z.ZodString;
771
+ description: z.ZodString;
772
+ entityType: z.ZodObject<{
773
+ id: z.ZodString;
774
+ createdAt: z.ZodDate;
775
+ updatedAt: z.ZodDate;
776
+ deletedAt: z.ZodNullable<z.ZodDate>;
777
+ entity: z.ZodString;
778
+ description: z.ZodNullable<z.ZodString>;
779
+ }, "strip", z.ZodTypeAny, {
780
+ id: string;
781
+ description: string | null;
782
+ createdAt: Date;
783
+ updatedAt: Date;
784
+ deletedAt: Date | null;
785
+ entity: string;
786
+ }, {
787
+ id: string;
788
+ description: string | null;
789
+ createdAt: Date;
790
+ updatedAt: Date;
791
+ deletedAt: Date | null;
792
+ entity: string;
793
+ }>;
794
+ }, "strip", z.ZodTypeAny, {
795
+ id: string;
796
+ description: string;
797
+ createdAt: Date;
798
+ updatedAt: Date;
799
+ deletedAt: Date | null;
800
+ entityId: string;
801
+ entityType: {
802
+ id: string;
803
+ description: string | null;
804
+ createdAt: Date;
805
+ updatedAt: Date;
806
+ deletedAt: Date | null;
807
+ entity: string;
808
+ };
809
+ }, {
810
+ id: string;
811
+ description: string;
812
+ createdAt: Date;
813
+ updatedAt: Date;
814
+ deletedAt: Date | null;
815
+ entityId: string;
816
+ entityType: {
817
+ id: string;
818
+ description: string | null;
819
+ createdAt: Date;
820
+ updatedAt: Date;
821
+ deletedAt: Date | null;
822
+ entity: string;
823
+ };
824
+ }>, "many">>;
825
+ }, "strip", z.ZodTypeAny, {
826
+ id: string;
827
+ channel: string | null;
828
+ address: string | null;
829
+ name: string;
830
+ createdAt: Date;
831
+ updatedAt: Date;
832
+ deletedAt: Date | null;
833
+ customFields: {
834
+ id: string;
835
+ createdAt: Date;
836
+ updatedAt: Date;
837
+ deletedAt: Date | null;
838
+ attribute: {
839
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
840
+ id: string;
841
+ position: number;
842
+ createdAt: Date;
843
+ updatedAt: Date;
844
+ deletedAt: Date | null;
845
+ isDefault: boolean;
846
+ systemName: string;
847
+ displayName: string;
848
+ isArchived: boolean;
849
+ isRequired: boolean;
850
+ isUnique: boolean;
851
+ };
852
+ textValue: string | null;
853
+ booleanValue: boolean | null;
854
+ numberValue: number | null;
855
+ dateValue: Date | null;
856
+ uploads: {
857
+ id: string;
858
+ createdAt: Date;
859
+ updatedAt: Date;
860
+ deletedAt: Date | null;
861
+ customFieldId: string;
862
+ upload: {
863
+ id: string;
864
+ createdAt: Date;
865
+ updatedAt: Date;
866
+ deletedAt: Date | null;
867
+ fileName: string;
868
+ fileKey: string;
869
+ bucketName: string;
870
+ fileSize: number;
871
+ };
872
+ }[];
873
+ }[];
874
+ notes: string | null;
875
+ contactProfile: string | null;
876
+ socialProfileUrl: string | null;
877
+ tags: {
878
+ id: string;
879
+ name: string;
880
+ createdAt: Date;
881
+ updatedAt: Date;
882
+ deletedAt: Date | null;
883
+ }[];
884
+ company: {
885
+ id: string;
886
+ createdAt: Date;
887
+ updatedAt: Date;
888
+ deletedAt: Date | null;
889
+ address?: string | null | undefined;
890
+ name?: string | undefined;
891
+ phone?: string | null | undefined;
892
+ industry?: string | null | undefined;
893
+ } | null;
894
+ contactEmails: {
895
+ id: string;
896
+ isPrimary: boolean;
897
+ email: string;
898
+ createdAt: Date;
899
+ updatedAt: Date;
900
+ deletedAt: Date | null;
901
+ }[];
902
+ contactPhones: {
903
+ id: string;
904
+ isPrimary: boolean;
905
+ createdAt: Date;
906
+ updatedAt: Date;
907
+ deletedAt: Date | null;
908
+ phone: string;
909
+ }[];
910
+ activityLogs?: {
911
+ id: string;
912
+ description: string;
913
+ createdAt: Date;
914
+ updatedAt: Date;
915
+ deletedAt: Date | null;
916
+ entityId: string;
917
+ entityType: {
918
+ id: string;
919
+ description: string | null;
920
+ createdAt: Date;
921
+ updatedAt: Date;
922
+ deletedAt: Date | null;
923
+ entity: string;
924
+ };
925
+ }[] | undefined;
926
+ }, {
927
+ id: string;
928
+ channel: string | null;
929
+ address: string | null;
930
+ name: string;
931
+ createdAt: Date;
932
+ updatedAt: Date;
933
+ deletedAt: Date | null;
934
+ customFields: {
935
+ id: string;
936
+ createdAt: Date;
937
+ updatedAt: Date;
938
+ deletedAt: Date | null;
939
+ attribute: {
940
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
941
+ id: string;
942
+ position: number;
943
+ createdAt: Date;
944
+ updatedAt: Date;
945
+ deletedAt: Date | null;
946
+ isDefault: boolean;
947
+ systemName: string;
948
+ displayName: string;
949
+ isArchived: boolean;
950
+ isRequired: boolean;
951
+ isUnique: boolean;
952
+ };
953
+ textValue: string | null;
954
+ booleanValue: boolean | null;
955
+ numberValue: number | null;
956
+ dateValue: Date | null;
957
+ uploads: {
958
+ id: string;
959
+ createdAt: Date;
960
+ updatedAt: Date;
961
+ deletedAt: Date | null;
962
+ customFieldId: string;
963
+ upload: {
964
+ id: string;
965
+ createdAt: Date;
966
+ updatedAt: Date;
967
+ deletedAt: Date | null;
968
+ fileName: string;
969
+ fileKey: string;
970
+ bucketName: string;
971
+ fileSize: number;
972
+ };
973
+ }[];
974
+ }[];
975
+ notes: string | null;
976
+ contactProfile: string | null;
977
+ socialProfileUrl: string | null;
978
+ tags: {
979
+ id: string;
980
+ name: string;
981
+ createdAt: Date;
982
+ updatedAt: Date;
983
+ deletedAt: Date | null;
984
+ }[];
985
+ company: {
986
+ id: string;
987
+ createdAt: Date;
988
+ updatedAt: Date;
989
+ deletedAt: Date | null;
990
+ address?: string | null | undefined;
991
+ name?: string | undefined;
992
+ phone?: string | null | undefined;
993
+ industry?: string | null | undefined;
994
+ } | null;
995
+ contactEmails: {
996
+ id: string;
997
+ isPrimary: boolean;
998
+ email: string;
999
+ createdAt: Date;
1000
+ updatedAt: Date;
1001
+ deletedAt: Date | null;
1002
+ }[];
1003
+ contactPhones: {
1004
+ id: string;
1005
+ isPrimary: boolean;
1006
+ createdAt: Date;
1007
+ updatedAt: Date;
1008
+ deletedAt: Date | null;
1009
+ phone: string;
1010
+ }[];
1011
+ activityLogs?: {
1012
+ id: string;
1013
+ description: string;
1014
+ createdAt: Date;
1015
+ updatedAt: Date;
1016
+ deletedAt: Date | null;
1017
+ entityId: string;
1018
+ entityType: {
1019
+ id: string;
1020
+ description: string | null;
1021
+ createdAt: Date;
1022
+ updatedAt: Date;
1023
+ deletedAt: Date | null;
1024
+ entity: string;
1025
+ };
1026
+ }[] | undefined;
1027
+ }>;
1028
+ }, "strip", z.ZodTypeAny, {
1029
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram";
1030
+ id: string;
1031
+ metadata: {
1032
+ id: string;
1033
+ name: string;
1034
+ picture?: string | undefined;
1035
+ additionalCredentials?: any;
1036
+ };
1037
+ createdAt: Date;
1038
+ updatedAt: Date;
1039
+ deletedAt: Date | null;
1040
+ contact: {
1041
+ id: string;
1042
+ channel: string | null;
1043
+ address: string | null;
1044
+ name: string;
1045
+ createdAt: Date;
1046
+ updatedAt: Date;
1047
+ deletedAt: Date | null;
1048
+ customFields: {
1049
+ id: string;
1050
+ createdAt: Date;
1051
+ updatedAt: Date;
1052
+ deletedAt: Date | null;
1053
+ attribute: {
1054
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
1055
+ id: string;
1056
+ position: number;
1057
+ createdAt: Date;
1058
+ updatedAt: Date;
1059
+ deletedAt: Date | null;
1060
+ isDefault: boolean;
1061
+ systemName: string;
1062
+ displayName: string;
1063
+ isArchived: boolean;
1064
+ isRequired: boolean;
1065
+ isUnique: boolean;
1066
+ };
1067
+ textValue: string | null;
1068
+ booleanValue: boolean | null;
1069
+ numberValue: number | null;
1070
+ dateValue: Date | null;
1071
+ uploads: {
1072
+ id: string;
1073
+ createdAt: Date;
1074
+ updatedAt: Date;
1075
+ deletedAt: Date | null;
1076
+ customFieldId: string;
1077
+ upload: {
1078
+ id: string;
1079
+ createdAt: Date;
1080
+ updatedAt: Date;
1081
+ deletedAt: Date | null;
1082
+ fileName: string;
1083
+ fileKey: string;
1084
+ bucketName: string;
1085
+ fileSize: number;
1086
+ };
1087
+ }[];
1088
+ }[];
1089
+ notes: string | null;
1090
+ contactProfile: string | null;
1091
+ socialProfileUrl: string | null;
1092
+ tags: {
1093
+ id: string;
1094
+ name: string;
1095
+ createdAt: Date;
1096
+ updatedAt: Date;
1097
+ deletedAt: Date | null;
1098
+ }[];
1099
+ company: {
1100
+ id: string;
1101
+ createdAt: Date;
1102
+ updatedAt: Date;
1103
+ deletedAt: Date | null;
1104
+ address?: string | null | undefined;
1105
+ name?: string | undefined;
1106
+ phone?: string | null | undefined;
1107
+ industry?: string | null | undefined;
1108
+ } | null;
1109
+ contactEmails: {
1110
+ id: string;
1111
+ isPrimary: boolean;
1112
+ email: string;
1113
+ createdAt: Date;
1114
+ updatedAt: Date;
1115
+ deletedAt: Date | null;
1116
+ }[];
1117
+ contactPhones: {
1118
+ id: string;
1119
+ isPrimary: boolean;
1120
+ createdAt: Date;
1121
+ updatedAt: Date;
1122
+ deletedAt: Date | null;
1123
+ phone: string;
1124
+ }[];
1125
+ activityLogs?: {
1126
+ id: string;
1127
+ description: string;
1128
+ createdAt: Date;
1129
+ updatedAt: Date;
1130
+ deletedAt: Date | null;
1131
+ entityId: string;
1132
+ entityType: {
1133
+ id: string;
1134
+ description: string | null;
1135
+ createdAt: Date;
1136
+ updatedAt: Date;
1137
+ deletedAt: Date | null;
1138
+ entity: string;
1139
+ };
1140
+ }[] | undefined;
1141
+ };
1142
+ channelId: string;
1143
+ socialPlatformId: string;
1144
+ }, {
1145
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram";
1146
+ id: string;
1147
+ metadata: {
1148
+ id: string;
1149
+ name: string;
1150
+ picture?: string | undefined;
1151
+ additionalCredentials?: any;
1152
+ };
1153
+ createdAt: Date;
1154
+ updatedAt: Date;
1155
+ deletedAt: Date | null;
1156
+ contact: {
1157
+ id: string;
1158
+ channel: string | null;
1159
+ address: string | null;
1160
+ name: string;
1161
+ createdAt: Date;
1162
+ updatedAt: Date;
1163
+ deletedAt: Date | null;
1164
+ customFields: {
1165
+ id: string;
1166
+ createdAt: Date;
1167
+ updatedAt: Date;
1168
+ deletedAt: Date | null;
1169
+ attribute: {
1170
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
1171
+ id: string;
1172
+ position: number;
1173
+ createdAt: Date;
1174
+ updatedAt: Date;
1175
+ deletedAt: Date | null;
1176
+ isDefault: boolean;
1177
+ systemName: string;
1178
+ displayName: string;
1179
+ isArchived: boolean;
1180
+ isRequired: boolean;
1181
+ isUnique: boolean;
1182
+ };
1183
+ textValue: string | null;
1184
+ booleanValue: boolean | null;
1185
+ numberValue: number | null;
1186
+ dateValue: Date | null;
1187
+ uploads: {
1188
+ id: string;
1189
+ createdAt: Date;
1190
+ updatedAt: Date;
1191
+ deletedAt: Date | null;
1192
+ customFieldId: string;
1193
+ upload: {
1194
+ id: string;
1195
+ createdAt: Date;
1196
+ updatedAt: Date;
1197
+ deletedAt: Date | null;
1198
+ fileName: string;
1199
+ fileKey: string;
1200
+ bucketName: string;
1201
+ fileSize: number;
1202
+ };
1203
+ }[];
1204
+ }[];
1205
+ notes: string | null;
1206
+ contactProfile: string | null;
1207
+ socialProfileUrl: string | null;
1208
+ tags: {
1209
+ id: string;
1210
+ name: string;
1211
+ createdAt: Date;
1212
+ updatedAt: Date;
1213
+ deletedAt: Date | null;
1214
+ }[];
1215
+ company: {
1216
+ id: string;
1217
+ createdAt: Date;
1218
+ updatedAt: Date;
1219
+ deletedAt: Date | null;
1220
+ address?: string | null | undefined;
1221
+ name?: string | undefined;
1222
+ phone?: string | null | undefined;
1223
+ industry?: string | null | undefined;
1224
+ } | null;
1225
+ contactEmails: {
1226
+ id: string;
1227
+ isPrimary: boolean;
1228
+ email: string;
1229
+ createdAt: Date;
1230
+ updatedAt: Date;
1231
+ deletedAt: Date | null;
1232
+ }[];
1233
+ contactPhones: {
1234
+ id: string;
1235
+ isPrimary: boolean;
1236
+ createdAt: Date;
1237
+ updatedAt: Date;
1238
+ deletedAt: Date | null;
1239
+ phone: string;
1240
+ }[];
1241
+ activityLogs?: {
1242
+ id: string;
1243
+ description: string;
1244
+ createdAt: Date;
1245
+ updatedAt: Date;
1246
+ deletedAt: Date | null;
1247
+ entityId: string;
1248
+ entityType: {
1249
+ id: string;
1250
+ description: string | null;
1251
+ createdAt: Date;
1252
+ updatedAt: Date;
1253
+ deletedAt: Date | null;
1254
+ entity: string;
1255
+ };
1256
+ }[] | undefined;
1257
+ };
1258
+ channelId: string;
1259
+ socialPlatformId: string;
1260
+ }>;
1261
+ actor: z.ZodObject<{
1262
+ id: z.ZodString;
1263
+ createdAt: z.ZodDate;
1264
+ updatedAt: z.ZodDate;
1265
+ deletedAt: z.ZodNullable<z.ZodDate>;
1266
+ name: z.ZodString;
1267
+ email: z.ZodString;
1268
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
1269
+ password: z.ZodString;
1270
+ address: z.ZodNullable<z.ZodString>;
1271
+ phone: z.ZodNullable<z.ZodString>;
1272
+ notificationCount: z.ZodNullable<z.ZodNumber>;
1273
+ roles: z.ZodArray<z.ZodObject<{
1274
+ id: z.ZodString;
1275
+ createdAt: z.ZodDate;
1276
+ updatedAt: z.ZodDate;
1277
+ deletedAt: z.ZodNullable<z.ZodDate>;
1278
+ systemName: z.ZodString;
1279
+ displayName: z.ZodString;
1280
+ description: z.ZodNullable<z.ZodString>;
1281
+ permissions: z.ZodArray<z.ZodObject<{
1282
+ id: z.ZodString;
1283
+ createdAt: z.ZodDate;
1284
+ updatedAt: z.ZodDate;
1285
+ deletedAt: z.ZodNullable<z.ZodDate>;
1286
+ systemName: z.ZodString;
1287
+ displayName: z.ZodString;
1288
+ description: z.ZodNullable<z.ZodString>;
1289
+ }, "strip", z.ZodTypeAny, {
1290
+ id: string;
1291
+ description: string | null;
1292
+ createdAt: Date;
1293
+ updatedAt: Date;
1294
+ deletedAt: Date | null;
1295
+ systemName: string;
1296
+ displayName: string;
1297
+ }, {
1298
+ id: string;
1299
+ description: string | null;
1300
+ createdAt: Date;
1301
+ updatedAt: Date;
1302
+ deletedAt: Date | null;
1303
+ systemName: string;
1304
+ displayName: string;
1305
+ }>, "many">;
1306
+ }, "strip", z.ZodTypeAny, {
1307
+ id: string;
1308
+ description: string | null;
1309
+ createdAt: Date;
1310
+ updatedAt: Date;
1311
+ deletedAt: Date | null;
1312
+ systemName: string;
1313
+ displayName: string;
1314
+ permissions: {
1315
+ id: string;
1316
+ description: string | null;
1317
+ createdAt: Date;
1318
+ updatedAt: Date;
1319
+ deletedAt: Date | null;
1320
+ systemName: string;
1321
+ displayName: string;
1322
+ }[];
1323
+ }, {
1324
+ id: string;
1325
+ description: string | null;
1326
+ createdAt: Date;
1327
+ updatedAt: Date;
1328
+ deletedAt: Date | null;
1329
+ systemName: string;
1330
+ displayName: string;
1331
+ permissions: {
1332
+ id: string;
1333
+ description: string | null;
1334
+ createdAt: Date;
1335
+ updatedAt: Date;
1336
+ deletedAt: Date | null;
1337
+ systemName: string;
1338
+ displayName: string;
1339
+ }[];
1340
+ }>, "many">;
1341
+ extension: z.ZodOptional<z.ZodObject<{
1342
+ id: z.ZodString;
1343
+ createdAt: z.ZodDate;
1344
+ updatedAt: z.ZodDate;
1345
+ deletedAt: z.ZodNullable<z.ZodDate>;
1346
+ userId: z.ZodNullable<z.ZodString>;
1347
+ sipServerUrl: z.ZodString;
1348
+ sipUserName: z.ZodString;
1349
+ extensionId: z.ZodNumber;
1350
+ extensionName: z.ZodString;
1351
+ telephonySignature: z.ZodNullable<z.ZodString>;
1352
+ }, "strip", z.ZodTypeAny, {
1353
+ id: string;
1354
+ createdAt: Date;
1355
+ updatedAt: Date;
1356
+ deletedAt: Date | null;
1357
+ userId: string | null;
1358
+ sipServerUrl: string;
1359
+ sipUserName: string;
1360
+ extensionId: number;
1361
+ extensionName: string;
1362
+ telephonySignature: string | null;
1363
+ }, {
1364
+ id: string;
1365
+ createdAt: Date;
1366
+ updatedAt: Date;
1367
+ deletedAt: Date | null;
1368
+ userId: string | null;
1369
+ sipServerUrl: string;
1370
+ sipUserName: string;
1371
+ extensionId: number;
1372
+ extensionName: string;
1373
+ telephonySignature: string | null;
1374
+ }>>;
1375
+ }, "strip", z.ZodTypeAny, {
1376
+ id: string;
1377
+ address: string | null;
1378
+ name: string;
1379
+ email: string;
1380
+ createdAt: Date;
1381
+ updatedAt: Date;
1382
+ deletedAt: Date | null;
1383
+ emailVerifiedAt: Date | null;
1384
+ password: string;
1385
+ phone: string | null;
1386
+ notificationCount: number | null;
1387
+ roles: {
1388
+ id: string;
1389
+ description: string | null;
1390
+ createdAt: Date;
1391
+ updatedAt: Date;
1392
+ deletedAt: Date | null;
1393
+ systemName: string;
1394
+ displayName: string;
1395
+ permissions: {
1396
+ id: string;
1397
+ description: string | null;
1398
+ createdAt: Date;
1399
+ updatedAt: Date;
1400
+ deletedAt: Date | null;
1401
+ systemName: string;
1402
+ displayName: string;
1403
+ }[];
1404
+ }[];
1405
+ extension?: {
1406
+ id: string;
1407
+ createdAt: Date;
1408
+ updatedAt: Date;
1409
+ deletedAt: Date | null;
1410
+ userId: string | null;
1411
+ sipServerUrl: string;
1412
+ sipUserName: string;
1413
+ extensionId: number;
1414
+ extensionName: string;
1415
+ telephonySignature: string | null;
1416
+ } | undefined;
1417
+ }, {
1418
+ id: string;
1419
+ address: string | null;
1420
+ name: string;
1421
+ email: string;
1422
+ createdAt: Date;
1423
+ updatedAt: Date;
1424
+ deletedAt: Date | null;
1425
+ emailVerifiedAt: Date | null;
1426
+ password: string;
1427
+ phone: string | null;
1428
+ notificationCount: number | null;
1429
+ roles: {
1430
+ id: string;
1431
+ description: string | null;
1432
+ createdAt: Date;
1433
+ updatedAt: Date;
1434
+ deletedAt: Date | null;
1435
+ systemName: string;
1436
+ displayName: string;
1437
+ permissions: {
1438
+ id: string;
1439
+ description: string | null;
1440
+ createdAt: Date;
1441
+ updatedAt: Date;
1442
+ deletedAt: Date | null;
1443
+ systemName: string;
1444
+ displayName: string;
1445
+ }[];
1446
+ }[];
1447
+ extension?: {
1448
+ id: string;
1449
+ createdAt: Date;
1450
+ updatedAt: Date;
1451
+ deletedAt: Date | null;
1452
+ userId: string | null;
1453
+ sipServerUrl: string;
1454
+ sipUserName: string;
1455
+ extensionId: number;
1456
+ extensionName: string;
1457
+ telephonySignature: string | null;
1458
+ } | undefined;
1459
+ }>;
1460
+ assignee: z.ZodObject<{
1461
+ id: z.ZodString;
1462
+ createdAt: z.ZodDate;
1463
+ updatedAt: z.ZodDate;
1464
+ deletedAt: z.ZodNullable<z.ZodDate>;
1465
+ name: z.ZodString;
1466
+ email: z.ZodString;
1467
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
1468
+ password: z.ZodString;
1469
+ address: z.ZodNullable<z.ZodString>;
1470
+ phone: z.ZodNullable<z.ZodString>;
1471
+ notificationCount: z.ZodNullable<z.ZodNumber>;
1472
+ roles: z.ZodArray<z.ZodObject<{
1473
+ id: z.ZodString;
1474
+ createdAt: z.ZodDate;
1475
+ updatedAt: z.ZodDate;
1476
+ deletedAt: z.ZodNullable<z.ZodDate>;
1477
+ systemName: z.ZodString;
1478
+ displayName: z.ZodString;
1479
+ description: z.ZodNullable<z.ZodString>;
1480
+ permissions: z.ZodArray<z.ZodObject<{
1481
+ id: z.ZodString;
1482
+ createdAt: z.ZodDate;
1483
+ updatedAt: z.ZodDate;
1484
+ deletedAt: z.ZodNullable<z.ZodDate>;
1485
+ systemName: z.ZodString;
1486
+ displayName: z.ZodString;
1487
+ description: z.ZodNullable<z.ZodString>;
1488
+ }, "strip", z.ZodTypeAny, {
1489
+ id: string;
1490
+ description: string | null;
1491
+ createdAt: Date;
1492
+ updatedAt: Date;
1493
+ deletedAt: Date | null;
1494
+ systemName: string;
1495
+ displayName: string;
1496
+ }, {
1497
+ id: string;
1498
+ description: string | null;
1499
+ createdAt: Date;
1500
+ updatedAt: Date;
1501
+ deletedAt: Date | null;
1502
+ systemName: string;
1503
+ displayName: string;
1504
+ }>, "many">;
1505
+ }, "strip", z.ZodTypeAny, {
1506
+ id: string;
1507
+ description: string | null;
1508
+ createdAt: Date;
1509
+ updatedAt: Date;
1510
+ deletedAt: Date | null;
1511
+ systemName: string;
1512
+ displayName: string;
1513
+ permissions: {
1514
+ id: string;
1515
+ description: string | null;
1516
+ createdAt: Date;
1517
+ updatedAt: Date;
1518
+ deletedAt: Date | null;
1519
+ systemName: string;
1520
+ displayName: string;
1521
+ }[];
1522
+ }, {
1523
+ id: string;
1524
+ description: string | null;
1525
+ createdAt: Date;
1526
+ updatedAt: Date;
1527
+ deletedAt: Date | null;
1528
+ systemName: string;
1529
+ displayName: string;
1530
+ permissions: {
1531
+ id: string;
1532
+ description: string | null;
1533
+ createdAt: Date;
1534
+ updatedAt: Date;
1535
+ deletedAt: Date | null;
1536
+ systemName: string;
1537
+ displayName: string;
1538
+ }[];
1539
+ }>, "many">;
1540
+ extension: z.ZodOptional<z.ZodObject<{
1541
+ id: z.ZodString;
1542
+ createdAt: z.ZodDate;
1543
+ updatedAt: z.ZodDate;
1544
+ deletedAt: z.ZodNullable<z.ZodDate>;
1545
+ userId: z.ZodNullable<z.ZodString>;
1546
+ sipServerUrl: z.ZodString;
1547
+ sipUserName: z.ZodString;
1548
+ extensionId: z.ZodNumber;
1549
+ extensionName: z.ZodString;
1550
+ telephonySignature: z.ZodNullable<z.ZodString>;
1551
+ }, "strip", z.ZodTypeAny, {
1552
+ id: string;
1553
+ createdAt: Date;
1554
+ updatedAt: Date;
1555
+ deletedAt: Date | null;
1556
+ userId: string | null;
1557
+ sipServerUrl: string;
1558
+ sipUserName: string;
1559
+ extensionId: number;
1560
+ extensionName: string;
1561
+ telephonySignature: string | null;
1562
+ }, {
1563
+ id: string;
1564
+ createdAt: Date;
1565
+ updatedAt: Date;
1566
+ deletedAt: Date | null;
1567
+ userId: string | null;
1568
+ sipServerUrl: string;
1569
+ sipUserName: string;
1570
+ extensionId: number;
1571
+ extensionName: string;
1572
+ telephonySignature: string | null;
1573
+ }>>;
1574
+ }, "strip", z.ZodTypeAny, {
1575
+ id: string;
1576
+ address: string | null;
1577
+ name: string;
1578
+ email: string;
1579
+ createdAt: Date;
1580
+ updatedAt: Date;
1581
+ deletedAt: Date | null;
1582
+ emailVerifiedAt: Date | null;
1583
+ password: string;
1584
+ phone: string | null;
1585
+ notificationCount: number | null;
1586
+ roles: {
1587
+ id: string;
1588
+ description: string | null;
1589
+ createdAt: Date;
1590
+ updatedAt: Date;
1591
+ deletedAt: Date | null;
1592
+ systemName: string;
1593
+ displayName: string;
1594
+ permissions: {
1595
+ id: string;
1596
+ description: string | null;
1597
+ createdAt: Date;
1598
+ updatedAt: Date;
1599
+ deletedAt: Date | null;
1600
+ systemName: string;
1601
+ displayName: string;
1602
+ }[];
1603
+ }[];
1604
+ extension?: {
1605
+ id: string;
1606
+ createdAt: Date;
1607
+ updatedAt: Date;
1608
+ deletedAt: Date | null;
1609
+ userId: string | null;
1610
+ sipServerUrl: string;
1611
+ sipUserName: string;
1612
+ extensionId: number;
1613
+ extensionName: string;
1614
+ telephonySignature: string | null;
1615
+ } | undefined;
1616
+ }, {
1617
+ id: string;
1618
+ address: string | null;
1619
+ name: string;
1620
+ email: string;
1621
+ createdAt: Date;
1622
+ updatedAt: Date;
1623
+ deletedAt: Date | null;
1624
+ emailVerifiedAt: Date | null;
1625
+ password: string;
1626
+ phone: string | null;
1627
+ notificationCount: number | null;
1628
+ roles: {
1629
+ id: string;
1630
+ description: string | null;
1631
+ createdAt: Date;
1632
+ updatedAt: Date;
1633
+ deletedAt: Date | null;
1634
+ systemName: string;
1635
+ displayName: string;
1636
+ permissions: {
1637
+ id: string;
1638
+ description: string | null;
1639
+ createdAt: Date;
1640
+ updatedAt: Date;
1641
+ deletedAt: Date | null;
1642
+ systemName: string;
1643
+ displayName: string;
1644
+ }[];
1645
+ }[];
1646
+ extension?: {
1647
+ id: string;
1648
+ createdAt: Date;
1649
+ updatedAt: Date;
1650
+ deletedAt: Date | null;
1651
+ userId: string | null;
1652
+ sipServerUrl: string;
1653
+ sipUserName: string;
1654
+ extensionId: number;
1655
+ extensionName: string;
1656
+ telephonySignature: string | null;
1657
+ } | undefined;
1658
+ }>;
1659
+ channel: z.ZodOptional<z.ZodObject<{
1660
+ id: z.ZodOptional<z.ZodString>;
1661
+ createdAt: z.ZodOptional<z.ZodDate>;
1662
+ updatedAt: z.ZodOptional<z.ZodDate>;
1663
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1664
+ name: z.ZodOptional<z.ZodString>;
1665
+ type: z.ZodOptional<z.ZodEnum<["whatsapp", "messenger", "telegram", "line", "viber", "kakao", "shopee", "lazada", "instagram"]>>;
1666
+ metadata: z.ZodOptional<z.ZodObject<{
1667
+ id: z.ZodString;
1668
+ name: z.ZodString;
1669
+ accessToken: z.ZodString;
1670
+ additionalCredentials: z.ZodOptional<z.ZodAny>;
1671
+ }, "strip", z.ZodTypeAny, {
1672
+ id: string;
1673
+ name: string;
1674
+ accessToken: string;
1675
+ additionalCredentials?: any;
1676
+ }, {
1677
+ id: string;
1678
+ name: string;
1679
+ accessToken: string;
1680
+ additionalCredentials?: any;
1681
+ }>>;
1682
+ brandName: z.ZodOptional<z.ZodString>;
1683
+ platformId: z.ZodOptional<z.ZodString>;
1684
+ status: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<true>, z.ZodLiteral<false>]>>;
1685
+ isReloginRequired: z.ZodOptional<z.ZodBoolean>;
1686
+ connectedUserName: z.ZodOptional<z.ZodString>;
1687
+ connectedUserId: z.ZodOptional<z.ZodString>;
1688
+ actor: z.ZodOptional<z.ZodObject<{
1689
+ id: z.ZodString;
1690
+ createdAt: z.ZodDate;
1691
+ updatedAt: z.ZodDate;
1692
+ deletedAt: z.ZodNullable<z.ZodDate>;
1693
+ name: z.ZodString;
1694
+ email: z.ZodString;
1695
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
1696
+ password: z.ZodString;
1697
+ address: z.ZodNullable<z.ZodString>;
1698
+ phone: z.ZodNullable<z.ZodString>;
1699
+ notificationCount: z.ZodNullable<z.ZodNumber>;
1700
+ roles: z.ZodArray<z.ZodObject<{
1701
+ id: z.ZodString;
1702
+ createdAt: z.ZodDate;
1703
+ updatedAt: z.ZodDate;
1704
+ deletedAt: z.ZodNullable<z.ZodDate>;
1705
+ systemName: z.ZodString;
1706
+ displayName: z.ZodString;
1707
+ description: z.ZodNullable<z.ZodString>;
1708
+ permissions: z.ZodArray<z.ZodObject<{
1709
+ id: z.ZodString;
1710
+ createdAt: z.ZodDate;
1711
+ updatedAt: z.ZodDate;
1712
+ deletedAt: z.ZodNullable<z.ZodDate>;
1713
+ systemName: z.ZodString;
1714
+ displayName: z.ZodString;
1715
+ description: z.ZodNullable<z.ZodString>;
1716
+ }, "strip", z.ZodTypeAny, {
1717
+ id: string;
1718
+ description: string | null;
1719
+ createdAt: Date;
1720
+ updatedAt: Date;
1721
+ deletedAt: Date | null;
1722
+ systemName: string;
1723
+ displayName: string;
1724
+ }, {
1725
+ id: string;
1726
+ description: string | null;
1727
+ createdAt: Date;
1728
+ updatedAt: Date;
1729
+ deletedAt: Date | null;
1730
+ systemName: string;
1731
+ displayName: string;
1732
+ }>, "many">;
1733
+ }, "strip", z.ZodTypeAny, {
1734
+ id: string;
1735
+ description: string | null;
1736
+ createdAt: Date;
1737
+ updatedAt: Date;
1738
+ deletedAt: Date | null;
1739
+ systemName: string;
1740
+ displayName: string;
1741
+ permissions: {
1742
+ id: string;
1743
+ description: string | null;
1744
+ createdAt: Date;
1745
+ updatedAt: Date;
1746
+ deletedAt: Date | null;
1747
+ systemName: string;
1748
+ displayName: string;
1749
+ }[];
1750
+ }, {
1751
+ id: string;
1752
+ description: string | null;
1753
+ createdAt: Date;
1754
+ updatedAt: Date;
1755
+ deletedAt: Date | null;
1756
+ systemName: string;
1757
+ displayName: string;
1758
+ permissions: {
1759
+ id: string;
1760
+ description: string | null;
1761
+ createdAt: Date;
1762
+ updatedAt: Date;
1763
+ deletedAt: Date | null;
1764
+ systemName: string;
1765
+ displayName: string;
1766
+ }[];
1767
+ }>, "many">;
1768
+ extension: z.ZodOptional<z.ZodObject<{
1769
+ id: z.ZodString;
1770
+ createdAt: z.ZodDate;
1771
+ updatedAt: z.ZodDate;
1772
+ deletedAt: z.ZodNullable<z.ZodDate>;
1773
+ userId: z.ZodNullable<z.ZodString>;
1774
+ sipServerUrl: z.ZodString;
1775
+ sipUserName: z.ZodString;
1776
+ extensionId: z.ZodNumber;
1777
+ extensionName: z.ZodString;
1778
+ telephonySignature: z.ZodNullable<z.ZodString>;
1779
+ }, "strip", z.ZodTypeAny, {
1780
+ id: string;
1781
+ createdAt: Date;
1782
+ updatedAt: Date;
1783
+ deletedAt: Date | null;
1784
+ userId: string | null;
1785
+ sipServerUrl: string;
1786
+ sipUserName: string;
1787
+ extensionId: number;
1788
+ extensionName: string;
1789
+ telephonySignature: string | null;
1790
+ }, {
1791
+ id: string;
1792
+ createdAt: Date;
1793
+ updatedAt: Date;
1794
+ deletedAt: Date | null;
1795
+ userId: string | null;
1796
+ sipServerUrl: string;
1797
+ sipUserName: string;
1798
+ extensionId: number;
1799
+ extensionName: string;
1800
+ telephonySignature: string | null;
1801
+ }>>;
1802
+ }, "strip", z.ZodTypeAny, {
1803
+ id: string;
1804
+ address: string | null;
1805
+ name: string;
1806
+ email: string;
1807
+ createdAt: Date;
1808
+ updatedAt: Date;
1809
+ deletedAt: Date | null;
1810
+ emailVerifiedAt: Date | null;
1811
+ password: string;
1812
+ phone: string | null;
1813
+ notificationCount: number | null;
1814
+ roles: {
1815
+ id: string;
1816
+ description: string | null;
1817
+ createdAt: Date;
1818
+ updatedAt: Date;
1819
+ deletedAt: Date | null;
1820
+ systemName: string;
1821
+ displayName: string;
1822
+ permissions: {
1823
+ id: string;
1824
+ description: string | null;
1825
+ createdAt: Date;
1826
+ updatedAt: Date;
1827
+ deletedAt: Date | null;
1828
+ systemName: string;
1829
+ displayName: string;
1830
+ }[];
1831
+ }[];
1832
+ extension?: {
1833
+ id: string;
1834
+ createdAt: Date;
1835
+ updatedAt: Date;
1836
+ deletedAt: Date | null;
1837
+ userId: string | null;
1838
+ sipServerUrl: string;
1839
+ sipUserName: string;
1840
+ extensionId: number;
1841
+ extensionName: string;
1842
+ telephonySignature: string | null;
1843
+ } | undefined;
1844
+ }, {
1845
+ id: string;
1846
+ address: string | null;
1847
+ name: string;
1848
+ email: string;
1849
+ createdAt: Date;
1850
+ updatedAt: Date;
1851
+ deletedAt: Date | null;
1852
+ emailVerifiedAt: Date | null;
1853
+ password: string;
1854
+ phone: string | null;
1855
+ notificationCount: number | null;
1856
+ roles: {
1857
+ id: string;
1858
+ description: string | null;
1859
+ createdAt: Date;
1860
+ updatedAt: Date;
1861
+ deletedAt: Date | null;
1862
+ systemName: string;
1863
+ displayName: string;
1864
+ permissions: {
1865
+ id: string;
1866
+ description: string | null;
1867
+ createdAt: Date;
1868
+ updatedAt: Date;
1869
+ deletedAt: Date | null;
1870
+ systemName: string;
1871
+ displayName: string;
1872
+ }[];
1873
+ }[];
1874
+ extension?: {
1875
+ id: string;
1876
+ createdAt: Date;
1877
+ updatedAt: Date;
1878
+ deletedAt: Date | null;
1879
+ userId: string | null;
1880
+ sipServerUrl: string;
1881
+ sipUserName: string;
1882
+ extensionId: number;
1883
+ extensionName: string;
1884
+ telephonySignature: string | null;
1885
+ } | undefined;
1886
+ }>>;
1887
+ }, "strip", z.ZodTypeAny, {
1888
+ id?: string | undefined;
1889
+ createdAt?: Date | undefined;
1890
+ updatedAt?: Date | undefined;
1891
+ deletedAt?: Date | null | undefined;
1892
+ name?: string | undefined;
1893
+ type?: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram" | undefined;
1894
+ metadata?: {
1895
+ id: string;
1896
+ name: string;
1897
+ accessToken: string;
1898
+ additionalCredentials?: any;
1899
+ } | undefined;
1900
+ brandName?: string | undefined;
1901
+ platformId?: string | undefined;
1902
+ status?: boolean | undefined;
1903
+ isReloginRequired?: boolean | undefined;
1904
+ connectedUserName?: string | undefined;
1905
+ connectedUserId?: string | undefined;
1906
+ actor?: {
1907
+ id: string;
1908
+ address: string | null;
1909
+ name: string;
1910
+ email: string;
1911
+ createdAt: Date;
1912
+ updatedAt: Date;
1913
+ deletedAt: Date | null;
1914
+ emailVerifiedAt: Date | null;
1915
+ password: string;
1916
+ phone: string | null;
1917
+ notificationCount: number | null;
1918
+ roles: {
1919
+ id: string;
1920
+ description: string | null;
1921
+ createdAt: Date;
1922
+ updatedAt: Date;
1923
+ deletedAt: Date | null;
1924
+ systemName: string;
1925
+ displayName: string;
1926
+ permissions: {
1927
+ id: string;
1928
+ description: string | null;
1929
+ createdAt: Date;
1930
+ updatedAt: Date;
1931
+ deletedAt: Date | null;
1932
+ systemName: string;
1933
+ displayName: string;
1934
+ }[];
1935
+ }[];
1936
+ extension?: {
1937
+ id: string;
1938
+ createdAt: Date;
1939
+ updatedAt: Date;
1940
+ deletedAt: Date | null;
1941
+ userId: string | null;
1942
+ sipServerUrl: string;
1943
+ sipUserName: string;
1944
+ extensionId: number;
1945
+ extensionName: string;
1946
+ telephonySignature: string | null;
1947
+ } | undefined;
1948
+ } | undefined;
1949
+ }, {
1950
+ id?: string | undefined;
1951
+ createdAt?: Date | undefined;
1952
+ updatedAt?: Date | undefined;
1953
+ deletedAt?: Date | null | undefined;
1954
+ name?: string | undefined;
1955
+ type?: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram" | undefined;
1956
+ metadata?: {
1957
+ id: string;
1958
+ name: string;
1959
+ accessToken: string;
1960
+ additionalCredentials?: any;
1961
+ } | undefined;
1962
+ brandName?: string | undefined;
1963
+ platformId?: string | undefined;
1964
+ status?: boolean | undefined;
1965
+ isReloginRequired?: boolean | undefined;
1966
+ connectedUserName?: string | undefined;
1967
+ connectedUserId?: string | undefined;
1968
+ actor?: {
1969
+ id: string;
1970
+ address: string | null;
1971
+ name: string;
1972
+ email: string;
1973
+ createdAt: Date;
1974
+ updatedAt: Date;
1975
+ deletedAt: Date | null;
1976
+ emailVerifiedAt: Date | null;
1977
+ password: string;
1978
+ phone: string | null;
1979
+ notificationCount: number | null;
1980
+ roles: {
1981
+ id: string;
1982
+ description: string | null;
1983
+ createdAt: Date;
1984
+ updatedAt: Date;
1985
+ deletedAt: Date | null;
1986
+ systemName: string;
1987
+ displayName: string;
1988
+ permissions: {
1989
+ id: string;
1990
+ description: string | null;
1991
+ createdAt: Date;
1992
+ updatedAt: Date;
1993
+ deletedAt: Date | null;
1994
+ systemName: string;
1995
+ displayName: string;
1996
+ }[];
1997
+ }[];
1998
+ extension?: {
1999
+ id: string;
2000
+ createdAt: Date;
2001
+ updatedAt: Date;
2002
+ deletedAt: Date | null;
2003
+ userId: string | null;
2004
+ sipServerUrl: string;
2005
+ sipUserName: string;
2006
+ extensionId: number;
2007
+ extensionName: string;
2008
+ telephonySignature: string | null;
2009
+ } | undefined;
2010
+ } | undefined;
2011
+ }>>;
2012
+ cxlog: z.ZodObject<{
2013
+ id: z.ZodString;
2014
+ createdAt: z.ZodDate;
2015
+ updatedAt: z.ZodDate;
2016
+ deletedAt: z.ZodNullable<z.ZodDate>;
2017
+ caseId: z.ZodNumber;
2018
+ entityId: z.ZodString;
2019
+ entityName: z.ZodString;
2020
+ contactId: z.ZodNullable<z.ZodString>;
2021
+ channel: z.ZodNullable<z.ZodString>;
2022
+ queueId: z.ZodNullable<z.ZodString>;
2023
+ agentId: z.ZodNullable<z.ZodString>;
2024
+ direction: z.ZodNullable<z.ZodString>;
2025
+ startedDate: z.ZodNullable<z.ZodDate>;
2026
+ handledTime: z.ZodNullable<z.ZodNumber>;
2027
+ firstResponseTime: z.ZodNullable<z.ZodNumber>;
2028
+ disposition: z.ZodNullable<z.ZodString>;
2029
+ wrapUpForm: z.ZodNullable<z.ZodObject<{
2030
+ id: z.ZodString;
2031
+ createdAt: z.ZodDate;
2032
+ updatedAt: z.ZodDate;
2033
+ deletedAt: z.ZodNullable<z.ZodDate>;
2034
+ note: z.ZodNullable<z.ZodString>;
2035
+ disposition: z.ZodNullable<z.ZodString>;
2036
+ callFrom: z.ZodNullable<z.ZodString>;
2037
+ callTo: z.ZodNullable<z.ZodString>;
2038
+ tags: z.ZodArray<z.ZodObject<{
2039
+ id: z.ZodString;
2040
+ createdAt: z.ZodDate;
2041
+ updatedAt: z.ZodDate;
2042
+ deletedAt: z.ZodNullable<z.ZodDate>;
2043
+ name: z.ZodString;
2044
+ }, "strip", z.ZodTypeAny, {
2045
+ id: string;
2046
+ name: string;
2047
+ createdAt: Date;
2048
+ updatedAt: Date;
2049
+ deletedAt: Date | null;
2050
+ }, {
2051
+ id: string;
2052
+ name: string;
2053
+ createdAt: Date;
2054
+ updatedAt: Date;
2055
+ deletedAt: Date | null;
2056
+ }>, "many">;
2057
+ }, "strip", z.ZodTypeAny, {
2058
+ id: string;
2059
+ disposition: string | null;
2060
+ createdAt: Date;
2061
+ updatedAt: Date;
2062
+ deletedAt: Date | null;
2063
+ tags: {
2064
+ id: string;
2065
+ name: string;
2066
+ createdAt: Date;
2067
+ updatedAt: Date;
2068
+ deletedAt: Date | null;
2069
+ }[];
2070
+ callFrom: string | null;
2071
+ callTo: string | null;
2072
+ note: string | null;
2073
+ }, {
2074
+ id: string;
2075
+ disposition: string | null;
2076
+ createdAt: Date;
2077
+ updatedAt: Date;
2078
+ deletedAt: Date | null;
2079
+ tags: {
2080
+ id: string;
2081
+ name: string;
2082
+ createdAt: Date;
2083
+ updatedAt: Date;
2084
+ deletedAt: Date | null;
2085
+ }[];
2086
+ callFrom: string | null;
2087
+ callTo: string | null;
2088
+ note: string | null;
2089
+ }>>;
2090
+ }, "strip", z.ZodTypeAny, {
2091
+ id: string;
2092
+ channel: string | null;
2093
+ disposition: string | null;
2094
+ direction: string | null;
2095
+ createdAt: Date;
2096
+ updatedAt: Date;
2097
+ deletedAt: Date | null;
2098
+ entityId: string;
2099
+ contactId: string | null;
2100
+ caseId: number;
2101
+ entityName: string;
2102
+ queueId: string | null;
2103
+ agentId: string | null;
2104
+ startedDate: Date | null;
2105
+ handledTime: number | null;
2106
+ firstResponseTime: number | null;
2107
+ wrapUpForm: {
2108
+ id: string;
2109
+ disposition: string | null;
2110
+ createdAt: Date;
2111
+ updatedAt: Date;
2112
+ deletedAt: Date | null;
2113
+ tags: {
2114
+ id: string;
2115
+ name: string;
2116
+ createdAt: Date;
2117
+ updatedAt: Date;
2118
+ deletedAt: Date | null;
2119
+ }[];
2120
+ callFrom: string | null;
2121
+ callTo: string | null;
2122
+ note: string | null;
2123
+ } | null;
2124
+ }, {
2125
+ id: string;
2126
+ channel: string | null;
2127
+ disposition: string | null;
2128
+ direction: string | null;
2129
+ createdAt: Date;
2130
+ updatedAt: Date;
2131
+ deletedAt: Date | null;
2132
+ entityId: string;
2133
+ contactId: string | null;
2134
+ caseId: number;
2135
+ entityName: string;
2136
+ queueId: string | null;
2137
+ agentId: string | null;
2138
+ startedDate: Date | null;
2139
+ handledTime: number | null;
2140
+ firstResponseTime: number | null;
2141
+ wrapUpForm: {
2142
+ id: string;
2143
+ disposition: string | null;
2144
+ createdAt: Date;
2145
+ updatedAt: Date;
2146
+ deletedAt: Date | null;
2147
+ tags: {
2148
+ id: string;
2149
+ name: string;
2150
+ createdAt: Date;
2151
+ updatedAt: Date;
2152
+ deletedAt: Date | null;
2153
+ }[];
2154
+ callFrom: string | null;
2155
+ callTo: string | null;
2156
+ note: string | null;
2157
+ } | null;
2158
+ }>;
2159
+ }, "strip", z.ZodTypeAny, {
2160
+ id: string;
2161
+ direction: "incoming" | "outgoing" | "system";
2162
+ createdAt: Date;
2163
+ updatedAt: Date;
2164
+ deletedAt: Date | null;
2165
+ actor: {
2166
+ id: string;
2167
+ address: string | null;
2168
+ name: string;
2169
+ email: string;
2170
+ createdAt: Date;
2171
+ updatedAt: Date;
2172
+ deletedAt: Date | null;
2173
+ emailVerifiedAt: Date | null;
2174
+ password: string;
2175
+ phone: string | null;
2176
+ notificationCount: number | null;
2177
+ roles: {
2178
+ id: string;
2179
+ description: string | null;
2180
+ createdAt: Date;
2181
+ updatedAt: Date;
2182
+ deletedAt: Date | null;
2183
+ systemName: string;
2184
+ displayName: string;
2185
+ permissions: {
2186
+ id: string;
2187
+ description: string | null;
2188
+ createdAt: Date;
2189
+ updatedAt: Date;
2190
+ deletedAt: Date | null;
2191
+ systemName: string;
2192
+ displayName: string;
2193
+ }[];
2194
+ }[];
2195
+ extension?: {
2196
+ id: string;
2197
+ createdAt: Date;
2198
+ updatedAt: Date;
2199
+ deletedAt: Date | null;
2200
+ userId: string | null;
2201
+ sipServerUrl: string;
2202
+ sipUserName: string;
2203
+ extensionId: number;
2204
+ extensionName: string;
2205
+ telephonySignature: string | null;
2206
+ } | undefined;
2207
+ };
2208
+ firstResponseTime: number;
2209
+ lastMessage: string;
2210
+ handleTime: number;
2211
+ closeAt: Date;
2212
+ unreadCount: number;
2213
+ firstResponseAt: Date;
2214
+ isLatest: boolean;
2215
+ platformContact: {
2216
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram";
2217
+ id: string;
2218
+ metadata: {
2219
+ id: string;
2220
+ name: string;
2221
+ picture?: string | undefined;
2222
+ additionalCredentials?: any;
2223
+ };
2224
+ createdAt: Date;
2225
+ updatedAt: Date;
2226
+ deletedAt: Date | null;
2227
+ contact: {
2228
+ id: string;
2229
+ channel: string | null;
2230
+ address: string | null;
2231
+ name: string;
2232
+ createdAt: Date;
2233
+ updatedAt: Date;
2234
+ deletedAt: Date | null;
2235
+ customFields: {
2236
+ id: string;
2237
+ createdAt: Date;
2238
+ updatedAt: Date;
2239
+ deletedAt: Date | null;
2240
+ attribute: {
2241
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
2242
+ id: string;
2243
+ position: number;
2244
+ createdAt: Date;
2245
+ updatedAt: Date;
2246
+ deletedAt: Date | null;
2247
+ isDefault: boolean;
2248
+ systemName: string;
2249
+ displayName: string;
2250
+ isArchived: boolean;
2251
+ isRequired: boolean;
2252
+ isUnique: boolean;
2253
+ };
2254
+ textValue: string | null;
2255
+ booleanValue: boolean | null;
2256
+ numberValue: number | null;
2257
+ dateValue: Date | null;
2258
+ uploads: {
2259
+ id: string;
2260
+ createdAt: Date;
2261
+ updatedAt: Date;
2262
+ deletedAt: Date | null;
2263
+ customFieldId: string;
2264
+ upload: {
2265
+ id: string;
2266
+ createdAt: Date;
2267
+ updatedAt: Date;
2268
+ deletedAt: Date | null;
2269
+ fileName: string;
2270
+ fileKey: string;
2271
+ bucketName: string;
2272
+ fileSize: number;
2273
+ };
2274
+ }[];
2275
+ }[];
2276
+ notes: string | null;
2277
+ contactProfile: string | null;
2278
+ socialProfileUrl: string | null;
2279
+ tags: {
2280
+ id: string;
2281
+ name: string;
2282
+ createdAt: Date;
2283
+ updatedAt: Date;
2284
+ deletedAt: Date | null;
2285
+ }[];
2286
+ company: {
2287
+ id: string;
2288
+ createdAt: Date;
2289
+ updatedAt: Date;
2290
+ deletedAt: Date | null;
2291
+ address?: string | null | undefined;
2292
+ name?: string | undefined;
2293
+ phone?: string | null | undefined;
2294
+ industry?: string | null | undefined;
2295
+ } | null;
2296
+ contactEmails: {
2297
+ id: string;
2298
+ isPrimary: boolean;
2299
+ email: string;
2300
+ createdAt: Date;
2301
+ updatedAt: Date;
2302
+ deletedAt: Date | null;
2303
+ }[];
2304
+ contactPhones: {
2305
+ id: string;
2306
+ isPrimary: boolean;
2307
+ createdAt: Date;
2308
+ updatedAt: Date;
2309
+ deletedAt: Date | null;
2310
+ phone: string;
2311
+ }[];
2312
+ activityLogs?: {
2313
+ id: string;
2314
+ description: string;
2315
+ createdAt: Date;
2316
+ updatedAt: Date;
2317
+ deletedAt: Date | null;
2318
+ entityId: string;
2319
+ entityType: {
2320
+ id: string;
2321
+ description: string | null;
2322
+ createdAt: Date;
2323
+ updatedAt: Date;
2324
+ deletedAt: Date | null;
2325
+ entity: string;
2326
+ };
2327
+ }[] | undefined;
2328
+ };
2329
+ channelId: string;
2330
+ socialPlatformId: string;
2331
+ };
2332
+ assignee: {
2333
+ id: string;
2334
+ address: string | null;
2335
+ name: string;
2336
+ email: string;
2337
+ createdAt: Date;
2338
+ updatedAt: Date;
2339
+ deletedAt: Date | null;
2340
+ emailVerifiedAt: Date | null;
2341
+ password: string;
2342
+ phone: string | null;
2343
+ notificationCount: number | null;
2344
+ roles: {
2345
+ id: string;
2346
+ description: string | null;
2347
+ createdAt: Date;
2348
+ updatedAt: Date;
2349
+ deletedAt: Date | null;
2350
+ systemName: string;
2351
+ displayName: string;
2352
+ permissions: {
2353
+ id: string;
2354
+ description: string | null;
2355
+ createdAt: Date;
2356
+ updatedAt: Date;
2357
+ deletedAt: Date | null;
2358
+ systemName: string;
2359
+ displayName: string;
2360
+ }[];
2361
+ }[];
2362
+ extension?: {
2363
+ id: string;
2364
+ createdAt: Date;
2365
+ updatedAt: Date;
2366
+ deletedAt: Date | null;
2367
+ userId: string | null;
2368
+ sipServerUrl: string;
2369
+ sipUserName: string;
2370
+ extensionId: number;
2371
+ extensionName: string;
2372
+ telephonySignature: string | null;
2373
+ } | undefined;
2374
+ };
2375
+ cxlog: {
2376
+ id: string;
2377
+ channel: string | null;
2378
+ disposition: string | null;
2379
+ direction: string | null;
2380
+ createdAt: Date;
2381
+ updatedAt: Date;
2382
+ deletedAt: Date | null;
2383
+ entityId: string;
2384
+ contactId: string | null;
2385
+ caseId: number;
2386
+ entityName: string;
2387
+ queueId: string | null;
2388
+ agentId: string | null;
2389
+ startedDate: Date | null;
2390
+ handledTime: number | null;
2391
+ firstResponseTime: number | null;
2392
+ wrapUpForm: {
2393
+ id: string;
2394
+ disposition: string | null;
2395
+ createdAt: Date;
2396
+ updatedAt: Date;
2397
+ deletedAt: Date | null;
2398
+ tags: {
2399
+ id: string;
2400
+ name: string;
2401
+ createdAt: Date;
2402
+ updatedAt: Date;
2403
+ deletedAt: Date | null;
2404
+ }[];
2405
+ callFrom: string | null;
2406
+ callTo: string | null;
2407
+ note: string | null;
2408
+ } | null;
2409
+ };
2410
+ channel?: {
2411
+ id?: string | undefined;
2412
+ createdAt?: Date | undefined;
2413
+ updatedAt?: Date | undefined;
2414
+ deletedAt?: Date | null | undefined;
2415
+ name?: string | undefined;
2416
+ type?: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram" | undefined;
2417
+ metadata?: {
2418
+ id: string;
2419
+ name: string;
2420
+ accessToken: string;
2421
+ additionalCredentials?: any;
2422
+ } | undefined;
2423
+ brandName?: string | undefined;
2424
+ platformId?: string | undefined;
2425
+ status?: boolean | undefined;
2426
+ isReloginRequired?: boolean | undefined;
2427
+ connectedUserName?: string | undefined;
2428
+ connectedUserId?: string | undefined;
2429
+ actor?: {
2430
+ id: string;
2431
+ address: string | null;
2432
+ name: string;
2433
+ email: string;
2434
+ createdAt: Date;
2435
+ updatedAt: Date;
2436
+ deletedAt: Date | null;
2437
+ emailVerifiedAt: Date | null;
2438
+ password: string;
2439
+ phone: string | null;
2440
+ notificationCount: number | null;
2441
+ roles: {
2442
+ id: string;
2443
+ description: string | null;
2444
+ createdAt: Date;
2445
+ updatedAt: Date;
2446
+ deletedAt: Date | null;
2447
+ systemName: string;
2448
+ displayName: string;
2449
+ permissions: {
2450
+ id: string;
2451
+ description: string | null;
2452
+ createdAt: Date;
2453
+ updatedAt: Date;
2454
+ deletedAt: Date | null;
2455
+ systemName: string;
2456
+ displayName: string;
2457
+ }[];
2458
+ }[];
2459
+ extension?: {
2460
+ id: string;
2461
+ createdAt: Date;
2462
+ updatedAt: Date;
2463
+ deletedAt: Date | null;
2464
+ userId: string | null;
2465
+ sipServerUrl: string;
2466
+ sipUserName: string;
2467
+ extensionId: number;
2468
+ extensionName: string;
2469
+ telephonySignature: string | null;
2470
+ } | undefined;
2471
+ } | undefined;
2472
+ } | undefined;
2473
+ }, {
2474
+ id: string;
2475
+ direction: "incoming" | "outgoing" | "system";
2476
+ createdAt: Date;
2477
+ updatedAt: Date;
2478
+ deletedAt: Date | null;
2479
+ actor: {
2480
+ id: string;
2481
+ address: string | null;
2482
+ name: string;
2483
+ email: string;
2484
+ createdAt: Date;
2485
+ updatedAt: Date;
2486
+ deletedAt: Date | null;
2487
+ emailVerifiedAt: Date | null;
2488
+ password: string;
2489
+ phone: string | null;
2490
+ notificationCount: number | null;
2491
+ roles: {
2492
+ id: string;
2493
+ description: string | null;
2494
+ createdAt: Date;
2495
+ updatedAt: Date;
2496
+ deletedAt: Date | null;
2497
+ systemName: string;
2498
+ displayName: string;
2499
+ permissions: {
2500
+ id: string;
2501
+ description: string | null;
2502
+ createdAt: Date;
2503
+ updatedAt: Date;
2504
+ deletedAt: Date | null;
2505
+ systemName: string;
2506
+ displayName: string;
2507
+ }[];
2508
+ }[];
2509
+ extension?: {
2510
+ id: string;
2511
+ createdAt: Date;
2512
+ updatedAt: Date;
2513
+ deletedAt: Date | null;
2514
+ userId: string | null;
2515
+ sipServerUrl: string;
2516
+ sipUserName: string;
2517
+ extensionId: number;
2518
+ extensionName: string;
2519
+ telephonySignature: string | null;
2520
+ } | undefined;
2521
+ };
2522
+ firstResponseTime: number;
2523
+ lastMessage: string;
2524
+ handleTime: number;
2525
+ closeAt: Date;
2526
+ unreadCount: number;
2527
+ firstResponseAt: Date;
2528
+ isLatest: boolean;
2529
+ platformContact: {
2530
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram";
2531
+ id: string;
2532
+ metadata: {
2533
+ id: string;
2534
+ name: string;
2535
+ picture?: string | undefined;
2536
+ additionalCredentials?: any;
2537
+ };
2538
+ createdAt: Date;
2539
+ updatedAt: Date;
2540
+ deletedAt: Date | null;
2541
+ contact: {
2542
+ id: string;
2543
+ channel: string | null;
2544
+ address: string | null;
2545
+ name: string;
2546
+ createdAt: Date;
2547
+ updatedAt: Date;
2548
+ deletedAt: Date | null;
2549
+ customFields: {
2550
+ id: string;
2551
+ createdAt: Date;
2552
+ updatedAt: Date;
2553
+ deletedAt: Date | null;
2554
+ attribute: {
2555
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
2556
+ id: string;
2557
+ position: number;
2558
+ createdAt: Date;
2559
+ updatedAt: Date;
2560
+ deletedAt: Date | null;
2561
+ isDefault: boolean;
2562
+ systemName: string;
2563
+ displayName: string;
2564
+ isArchived: boolean;
2565
+ isRequired: boolean;
2566
+ isUnique: boolean;
2567
+ };
2568
+ textValue: string | null;
2569
+ booleanValue: boolean | null;
2570
+ numberValue: number | null;
2571
+ dateValue: Date | null;
2572
+ uploads: {
2573
+ id: string;
2574
+ createdAt: Date;
2575
+ updatedAt: Date;
2576
+ deletedAt: Date | null;
2577
+ customFieldId: string;
2578
+ upload: {
2579
+ id: string;
2580
+ createdAt: Date;
2581
+ updatedAt: Date;
2582
+ deletedAt: Date | null;
2583
+ fileName: string;
2584
+ fileKey: string;
2585
+ bucketName: string;
2586
+ fileSize: number;
2587
+ };
2588
+ }[];
2589
+ }[];
2590
+ notes: string | null;
2591
+ contactProfile: string | null;
2592
+ socialProfileUrl: string | null;
2593
+ tags: {
2594
+ id: string;
2595
+ name: string;
2596
+ createdAt: Date;
2597
+ updatedAt: Date;
2598
+ deletedAt: Date | null;
2599
+ }[];
2600
+ company: {
2601
+ id: string;
2602
+ createdAt: Date;
2603
+ updatedAt: Date;
2604
+ deletedAt: Date | null;
2605
+ address?: string | null | undefined;
2606
+ name?: string | undefined;
2607
+ phone?: string | null | undefined;
2608
+ industry?: string | null | undefined;
2609
+ } | null;
2610
+ contactEmails: {
2611
+ id: string;
2612
+ isPrimary: boolean;
2613
+ email: string;
2614
+ createdAt: Date;
2615
+ updatedAt: Date;
2616
+ deletedAt: Date | null;
2617
+ }[];
2618
+ contactPhones: {
2619
+ id: string;
2620
+ isPrimary: boolean;
2621
+ createdAt: Date;
2622
+ updatedAt: Date;
2623
+ deletedAt: Date | null;
2624
+ phone: string;
2625
+ }[];
2626
+ activityLogs?: {
2627
+ id: string;
2628
+ description: string;
2629
+ createdAt: Date;
2630
+ updatedAt: Date;
2631
+ deletedAt: Date | null;
2632
+ entityId: string;
2633
+ entityType: {
2634
+ id: string;
2635
+ description: string | null;
2636
+ createdAt: Date;
2637
+ updatedAt: Date;
2638
+ deletedAt: Date | null;
2639
+ entity: string;
2640
+ };
2641
+ }[] | undefined;
2642
+ };
2643
+ channelId: string;
2644
+ socialPlatformId: string;
2645
+ };
2646
+ assignee: {
2647
+ id: string;
2648
+ address: string | null;
2649
+ name: string;
2650
+ email: string;
2651
+ createdAt: Date;
2652
+ updatedAt: Date;
2653
+ deletedAt: Date | null;
2654
+ emailVerifiedAt: Date | null;
2655
+ password: string;
2656
+ phone: string | null;
2657
+ notificationCount: number | null;
2658
+ roles: {
2659
+ id: string;
2660
+ description: string | null;
2661
+ createdAt: Date;
2662
+ updatedAt: Date;
2663
+ deletedAt: Date | null;
2664
+ systemName: string;
2665
+ displayName: string;
2666
+ permissions: {
2667
+ id: string;
2668
+ description: string | null;
2669
+ createdAt: Date;
2670
+ updatedAt: Date;
2671
+ deletedAt: Date | null;
2672
+ systemName: string;
2673
+ displayName: string;
2674
+ }[];
2675
+ }[];
2676
+ extension?: {
2677
+ id: string;
2678
+ createdAt: Date;
2679
+ updatedAt: Date;
2680
+ deletedAt: Date | null;
2681
+ userId: string | null;
2682
+ sipServerUrl: string;
2683
+ sipUserName: string;
2684
+ extensionId: number;
2685
+ extensionName: string;
2686
+ telephonySignature: string | null;
2687
+ } | undefined;
2688
+ };
2689
+ cxlog: {
2690
+ id: string;
2691
+ channel: string | null;
2692
+ disposition: string | null;
2693
+ direction: string | null;
2694
+ createdAt: Date;
2695
+ updatedAt: Date;
2696
+ deletedAt: Date | null;
2697
+ entityId: string;
2698
+ contactId: string | null;
2699
+ caseId: number;
2700
+ entityName: string;
2701
+ queueId: string | null;
2702
+ agentId: string | null;
2703
+ startedDate: Date | null;
2704
+ handledTime: number | null;
2705
+ firstResponseTime: number | null;
2706
+ wrapUpForm: {
2707
+ id: string;
2708
+ disposition: string | null;
2709
+ createdAt: Date;
2710
+ updatedAt: Date;
2711
+ deletedAt: Date | null;
2712
+ tags: {
2713
+ id: string;
2714
+ name: string;
2715
+ createdAt: Date;
2716
+ updatedAt: Date;
2717
+ deletedAt: Date | null;
2718
+ }[];
2719
+ callFrom: string | null;
2720
+ callTo: string | null;
2721
+ note: string | null;
2722
+ } | null;
2723
+ };
2724
+ channel?: {
2725
+ id?: string | undefined;
2726
+ createdAt?: Date | undefined;
2727
+ updatedAt?: Date | undefined;
2728
+ deletedAt?: Date | null | undefined;
2729
+ name?: string | undefined;
2730
+ type?: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram" | undefined;
2731
+ metadata?: {
2732
+ id: string;
2733
+ name: string;
2734
+ accessToken: string;
2735
+ additionalCredentials?: any;
2736
+ } | undefined;
2737
+ brandName?: string | undefined;
2738
+ platformId?: string | undefined;
2739
+ status?: boolean | undefined;
2740
+ isReloginRequired?: boolean | undefined;
2741
+ connectedUserName?: string | undefined;
2742
+ connectedUserId?: string | undefined;
2743
+ actor?: {
2744
+ id: string;
2745
+ address: string | null;
2746
+ name: string;
2747
+ email: string;
2748
+ createdAt: Date;
2749
+ updatedAt: Date;
2750
+ deletedAt: Date | null;
2751
+ emailVerifiedAt: Date | null;
2752
+ password: string;
2753
+ phone: string | null;
2754
+ notificationCount: number | null;
2755
+ roles: {
2756
+ id: string;
2757
+ description: string | null;
2758
+ createdAt: Date;
2759
+ updatedAt: Date;
2760
+ deletedAt: Date | null;
2761
+ systemName: string;
2762
+ displayName: string;
2763
+ permissions: {
2764
+ id: string;
2765
+ description: string | null;
2766
+ createdAt: Date;
2767
+ updatedAt: Date;
2768
+ deletedAt: Date | null;
2769
+ systemName: string;
2770
+ displayName: string;
2771
+ }[];
2772
+ }[];
2773
+ extension?: {
2774
+ id: string;
2775
+ createdAt: Date;
2776
+ updatedAt: Date;
2777
+ deletedAt: Date | null;
2778
+ userId: string | null;
2779
+ sipServerUrl: string;
2780
+ sipUserName: string;
2781
+ extensionId: number;
2782
+ extensionName: string;
2783
+ telephonySignature: string | null;
2784
+ } | undefined;
2785
+ } | undefined;
2786
+ } | undefined;
2787
+ }>>;
2788
+ telephonyCdr: z.ZodNullable<z.ZodObject<{
2789
+ id: z.ZodString;
2790
+ createdAt: z.ZodDate;
2791
+ updatedAt: z.ZodDate;
2792
+ deletedAt: z.ZodNullable<z.ZodDate>;
2793
+ uniqueCallId: z.ZodString;
2794
+ timeStart: z.ZodString;
2795
+ callFrom: z.ZodString;
2796
+ callTo: z.ZodString;
2797
+ callDuration: z.ZodNullable<z.ZodNumber>;
2798
+ talkDuration: z.ZodNullable<z.ZodNumber>;
2799
+ srcTrunkName: z.ZodNullable<z.ZodString>;
2800
+ dstTrunkName: z.ZodNullable<z.ZodString>;
2801
+ pinCode: z.ZodNullable<z.ZodString>;
2802
+ status: z.ZodString;
2803
+ type: z.ZodString;
2804
+ recording: z.ZodNullable<z.ZodString>;
2805
+ didNumber: z.ZodNullable<z.ZodString>;
2806
+ agentRingTime: z.ZodNullable<z.ZodNumber>;
2807
+ uploadId: z.ZodNullable<z.ZodString>;
2808
+ serialNumber: z.ZodNullable<z.ZodString>;
2809
+ extensionId: z.ZodNullable<z.ZodString>;
2810
+ telephonyQueueId: z.ZodNullable<z.ZodString>;
2811
+ contactId: z.ZodNullable<z.ZodString>;
2812
+ }, "strip", z.ZodTypeAny, {
2813
+ type: string;
2814
+ id: string;
2815
+ recording: string | null;
2816
+ status: string;
2817
+ createdAt: Date;
2818
+ updatedAt: Date;
2819
+ deletedAt: Date | null;
2820
+ extensionId: string | null;
2821
+ uniqueCallId: string;
2822
+ timeStart: string;
2823
+ callFrom: string;
2824
+ callTo: string;
2825
+ callDuration: number | null;
2826
+ talkDuration: number | null;
2827
+ srcTrunkName: string | null;
2828
+ dstTrunkName: string | null;
2829
+ pinCode: string | null;
2830
+ didNumber: string | null;
2831
+ agentRingTime: number | null;
2832
+ uploadId: string | null;
2833
+ serialNumber: string | null;
2834
+ telephonyQueueId: string | null;
2835
+ contactId: string | null;
2836
+ }, {
2837
+ type: string;
2838
+ id: string;
2839
+ recording: string | null;
2840
+ status: string;
2841
+ createdAt: Date;
2842
+ updatedAt: Date;
2843
+ deletedAt: Date | null;
2844
+ extensionId: string | null;
2845
+ uniqueCallId: string;
2846
+ timeStart: string;
2847
+ callFrom: string;
2848
+ callTo: string;
2849
+ callDuration: number | null;
2850
+ talkDuration: number | null;
2851
+ srcTrunkName: string | null;
2852
+ dstTrunkName: string | null;
2853
+ pinCode: string | null;
2854
+ didNumber: string | null;
2855
+ agentRingTime: number | null;
2856
+ uploadId: string | null;
2857
+ serialNumber: string | null;
2858
+ telephonyQueueId: string | null;
2859
+ contactId: string | null;
2860
+ }>>;
2861
+ queue: z.ZodNullable<z.ZodObject<{
2862
+ queueName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2863
+ }, "strip", z.ZodTypeAny, {
2864
+ queueName?: string | null | undefined;
2865
+ }, {
2866
+ queueName?: string | null | undefined;
2867
+ }>>;
2868
+ contact: z.ZodNullable<z.ZodObject<{
2869
+ id: z.ZodString;
2870
+ createdAt: z.ZodDate;
2871
+ updatedAt: z.ZodDate;
2872
+ deletedAt: z.ZodNullable<z.ZodDate>;
2873
+ name: z.ZodString;
2874
+ address: z.ZodNullable<z.ZodString>;
2875
+ channel: z.ZodNullable<z.ZodString>;
2876
+ notes: z.ZodNullable<z.ZodString>;
2877
+ contactProfile: z.ZodNullable<z.ZodString>;
2878
+ socialProfileUrl: z.ZodNullable<z.ZodString>;
2879
+ tags: z.ZodArray<z.ZodObject<{
2880
+ id: z.ZodString;
2881
+ createdAt: z.ZodDate;
2882
+ updatedAt: z.ZodDate;
2883
+ deletedAt: z.ZodNullable<z.ZodDate>;
2884
+ name: z.ZodString;
2885
+ }, "strip", z.ZodTypeAny, {
2886
+ id: string;
2887
+ name: string;
2888
+ createdAt: Date;
2889
+ updatedAt: Date;
2890
+ deletedAt: Date | null;
2891
+ }, {
2892
+ id: string;
2893
+ name: string;
2894
+ createdAt: Date;
2895
+ updatedAt: Date;
2896
+ deletedAt: Date | null;
2897
+ }>, "many">;
2898
+ company: z.ZodNullable<z.ZodObject<Omit<{
2899
+ id: z.ZodString;
2900
+ createdAt: z.ZodDate;
2901
+ updatedAt: z.ZodDate;
2902
+ deletedAt: z.ZodNullable<z.ZodDate>;
2903
+ name: z.ZodOptional<z.ZodString>;
2904
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2905
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2906
+ industry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2907
+ customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2908
+ id: z.ZodString;
2909
+ createdAt: z.ZodDate;
2910
+ updatedAt: z.ZodDate;
2911
+ deletedAt: z.ZodNullable<z.ZodDate>;
2912
+ textValue: z.ZodNullable<z.ZodString>;
2913
+ booleanValue: z.ZodNullable<z.ZodBoolean>;
2914
+ numberValue: z.ZodNullable<z.ZodNumber>;
2915
+ dateValue: z.ZodNullable<z.ZodDate>;
2916
+ attribute: z.ZodObject<Omit<{
2917
+ id: z.ZodString;
2918
+ createdAt: z.ZodDate;
2919
+ updatedAt: z.ZodDate;
2920
+ deletedAt: z.ZodNullable<z.ZodDate>;
2921
+ systemName: z.ZodString;
2922
+ displayName: z.ZodString;
2923
+ type: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"textarea">, z.ZodLiteral<"date">, z.ZodLiteral<"select">, z.ZodLiteral<"link">, z.ZodLiteral<"attachment">]>;
2924
+ position: z.ZodNumber;
2925
+ isDefault: z.ZodBoolean;
2926
+ isArchived: z.ZodBoolean;
2927
+ isRequired: z.ZodBoolean;
2928
+ isUnique: z.ZodBoolean;
2929
+ options: z.ZodArray<z.ZodObject<{
2930
+ position: z.ZodNumber;
2931
+ value: z.ZodString;
2932
+ label: z.ZodString;
2933
+ isDefault: z.ZodBoolean;
2934
+ id: z.ZodString;
2935
+ }, "strip", z.ZodTypeAny, {
2936
+ id: string;
2937
+ position: number;
2938
+ value: string;
2939
+ label: string;
2940
+ isDefault: boolean;
2941
+ }, {
2942
+ id: string;
2943
+ position: number;
2944
+ value: string;
2945
+ label: string;
2946
+ isDefault: boolean;
2947
+ }>, "many">;
2948
+ group: z.ZodObject<{
2949
+ id: z.ZodString;
2950
+ createdAt: z.ZodDate;
2951
+ updatedAt: z.ZodDate;
2952
+ deletedAt: z.ZodNullable<z.ZodDate>;
2953
+ systemName: z.ZodString;
2954
+ displayName: z.ZodString;
2955
+ }, "strip", z.ZodTypeAny, {
2956
+ id: string;
2957
+ createdAt: Date;
2958
+ updatedAt: Date;
2959
+ deletedAt: Date | null;
2960
+ systemName: string;
2961
+ displayName: string;
2962
+ }, {
2963
+ id: string;
2964
+ createdAt: Date;
2965
+ updatedAt: Date;
2966
+ deletedAt: Date | null;
2967
+ systemName: string;
2968
+ displayName: string;
2969
+ }>;
2970
+ }, "options" | "group">, "strip", z.ZodTypeAny, {
2971
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
2972
+ id: string;
2973
+ position: number;
2974
+ createdAt: Date;
2975
+ updatedAt: Date;
2976
+ deletedAt: Date | null;
2977
+ isDefault: boolean;
2978
+ systemName: string;
2979
+ displayName: string;
2980
+ isArchived: boolean;
2981
+ isRequired: boolean;
2982
+ isUnique: boolean;
2983
+ }, {
2984
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
2985
+ id: string;
2986
+ position: number;
2987
+ createdAt: Date;
2988
+ updatedAt: Date;
2989
+ deletedAt: Date | null;
2990
+ isDefault: boolean;
2991
+ systemName: string;
2992
+ displayName: string;
2993
+ isArchived: boolean;
2994
+ isRequired: boolean;
2995
+ isUnique: boolean;
2996
+ }>;
2997
+ }, "strip", z.ZodTypeAny, {
2998
+ id: string;
2999
+ createdAt: Date;
3000
+ updatedAt: Date;
3001
+ deletedAt: Date | null;
3002
+ attribute: {
3003
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3004
+ id: string;
3005
+ position: number;
3006
+ createdAt: Date;
3007
+ updatedAt: Date;
3008
+ deletedAt: Date | null;
3009
+ isDefault: boolean;
3010
+ systemName: string;
3011
+ displayName: string;
3012
+ isArchived: boolean;
3013
+ isRequired: boolean;
3014
+ isUnique: boolean;
3015
+ };
3016
+ textValue: string | null;
3017
+ booleanValue: boolean | null;
3018
+ numberValue: number | null;
3019
+ dateValue: Date | null;
3020
+ }, {
3021
+ id: string;
3022
+ createdAt: Date;
3023
+ updatedAt: Date;
3024
+ deletedAt: Date | null;
3025
+ attribute: {
3026
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3027
+ id: string;
3028
+ position: number;
3029
+ createdAt: Date;
3030
+ updatedAt: Date;
3031
+ deletedAt: Date | null;
3032
+ isDefault: boolean;
3033
+ systemName: string;
3034
+ displayName: string;
3035
+ isArchived: boolean;
3036
+ isRequired: boolean;
3037
+ isUnique: boolean;
3038
+ };
3039
+ textValue: string | null;
3040
+ booleanValue: boolean | null;
3041
+ numberValue: number | null;
3042
+ dateValue: Date | null;
3043
+ }>, "many">>;
3044
+ }, "customFields">, "strip", z.ZodTypeAny, {
3045
+ id: string;
3046
+ createdAt: Date;
3047
+ updatedAt: Date;
3048
+ deletedAt: Date | null;
3049
+ address?: string | null | undefined;
3050
+ name?: string | undefined;
3051
+ phone?: string | null | undefined;
3052
+ industry?: string | null | undefined;
3053
+ }, {
3054
+ id: string;
3055
+ createdAt: Date;
3056
+ updatedAt: Date;
3057
+ deletedAt: Date | null;
3058
+ address?: string | null | undefined;
3059
+ name?: string | undefined;
3060
+ phone?: string | null | undefined;
3061
+ industry?: string | null | undefined;
3062
+ }>>;
3063
+ customFields: z.ZodArray<z.ZodObject<{
3064
+ id: z.ZodString;
3065
+ createdAt: z.ZodDate;
3066
+ updatedAt: z.ZodDate;
3067
+ deletedAt: z.ZodNullable<z.ZodDate>;
3068
+ textValue: z.ZodNullable<z.ZodString>;
3069
+ booleanValue: z.ZodNullable<z.ZodBoolean>;
3070
+ numberValue: z.ZodNullable<z.ZodNumber>;
3071
+ dateValue: z.ZodNullable<z.ZodDate>;
3072
+ attribute: z.ZodObject<Omit<{
3073
+ id: z.ZodString;
3074
+ createdAt: z.ZodDate;
3075
+ updatedAt: z.ZodDate;
3076
+ deletedAt: z.ZodNullable<z.ZodDate>;
3077
+ systemName: z.ZodString;
3078
+ displayName: z.ZodString;
3079
+ type: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"textarea">, z.ZodLiteral<"date">, z.ZodLiteral<"select">, z.ZodLiteral<"link">, z.ZodLiteral<"attachment">]>;
3080
+ position: z.ZodNumber;
3081
+ isDefault: z.ZodBoolean;
3082
+ isArchived: z.ZodBoolean;
3083
+ isRequired: z.ZodBoolean;
3084
+ isUnique: z.ZodBoolean;
3085
+ options: z.ZodArray<z.ZodObject<{
3086
+ position: z.ZodNumber;
3087
+ value: z.ZodString;
3088
+ label: z.ZodString;
3089
+ isDefault: z.ZodBoolean;
3090
+ id: z.ZodString;
3091
+ }, "strip", z.ZodTypeAny, {
3092
+ id: string;
3093
+ position: number;
3094
+ value: string;
3095
+ label: string;
3096
+ isDefault: boolean;
3097
+ }, {
3098
+ id: string;
3099
+ position: number;
3100
+ value: string;
3101
+ label: string;
3102
+ isDefault: boolean;
3103
+ }>, "many">;
3104
+ group: z.ZodObject<{
3105
+ id: z.ZodString;
3106
+ createdAt: z.ZodDate;
3107
+ updatedAt: z.ZodDate;
3108
+ deletedAt: z.ZodNullable<z.ZodDate>;
3109
+ systemName: z.ZodString;
3110
+ displayName: z.ZodString;
3111
+ }, "strip", z.ZodTypeAny, {
3112
+ id: string;
3113
+ createdAt: Date;
3114
+ updatedAt: Date;
3115
+ deletedAt: Date | null;
3116
+ systemName: string;
3117
+ displayName: string;
3118
+ }, {
3119
+ id: string;
3120
+ createdAt: Date;
3121
+ updatedAt: Date;
3122
+ deletedAt: Date | null;
3123
+ systemName: string;
3124
+ displayName: string;
3125
+ }>;
3126
+ }, "options" | "group">, "strip", z.ZodTypeAny, {
3127
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3128
+ id: string;
3129
+ position: number;
3130
+ createdAt: Date;
3131
+ updatedAt: Date;
3132
+ deletedAt: Date | null;
3133
+ isDefault: boolean;
3134
+ systemName: string;
3135
+ displayName: string;
3136
+ isArchived: boolean;
3137
+ isRequired: boolean;
3138
+ isUnique: boolean;
3139
+ }, {
3140
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3141
+ id: string;
3142
+ position: number;
3143
+ createdAt: Date;
3144
+ updatedAt: Date;
3145
+ deletedAt: Date | null;
3146
+ isDefault: boolean;
3147
+ systemName: string;
3148
+ displayName: string;
3149
+ isArchived: boolean;
3150
+ isRequired: boolean;
3151
+ isUnique: boolean;
3152
+ }>;
3153
+ uploads: z.ZodArray<z.ZodObject<{
3154
+ id: z.ZodString;
3155
+ createdAt: z.ZodDate;
3156
+ updatedAt: z.ZodDate;
3157
+ deletedAt: z.ZodNullable<z.ZodDate>;
3158
+ customFieldId: z.ZodString;
3159
+ upload: z.ZodObject<{
3160
+ id: z.ZodString;
3161
+ createdAt: z.ZodDate;
3162
+ updatedAt: z.ZodDate;
3163
+ deletedAt: z.ZodNullable<z.ZodDate>;
3164
+ bucketName: z.ZodString;
3165
+ fileName: z.ZodString;
3166
+ fileSize: z.ZodNumber;
3167
+ fileKey: z.ZodString;
3168
+ }, "strip", z.ZodTypeAny, {
3169
+ id: string;
3170
+ createdAt: Date;
3171
+ updatedAt: Date;
3172
+ deletedAt: Date | null;
3173
+ fileName: string;
3174
+ fileKey: string;
3175
+ bucketName: string;
3176
+ fileSize: number;
3177
+ }, {
3178
+ id: string;
3179
+ createdAt: Date;
3180
+ updatedAt: Date;
3181
+ deletedAt: Date | null;
3182
+ fileName: string;
3183
+ fileKey: string;
3184
+ bucketName: string;
3185
+ fileSize: number;
3186
+ }>;
3187
+ }, "strip", z.ZodTypeAny, {
3188
+ id: string;
3189
+ createdAt: Date;
3190
+ updatedAt: Date;
3191
+ deletedAt: Date | null;
3192
+ customFieldId: string;
3193
+ upload: {
3194
+ id: string;
3195
+ createdAt: Date;
3196
+ updatedAt: Date;
3197
+ deletedAt: Date | null;
3198
+ fileName: string;
3199
+ fileKey: string;
3200
+ bucketName: string;
3201
+ fileSize: number;
3202
+ };
3203
+ }, {
3204
+ id: string;
3205
+ createdAt: Date;
3206
+ updatedAt: Date;
3207
+ deletedAt: Date | null;
3208
+ customFieldId: string;
3209
+ upload: {
3210
+ id: string;
3211
+ createdAt: Date;
3212
+ updatedAt: Date;
3213
+ deletedAt: Date | null;
3214
+ fileName: string;
3215
+ fileKey: string;
3216
+ bucketName: string;
3217
+ fileSize: number;
3218
+ };
3219
+ }>, "many">;
3220
+ }, "strip", z.ZodTypeAny, {
3221
+ id: string;
3222
+ createdAt: Date;
3223
+ updatedAt: Date;
3224
+ deletedAt: Date | null;
3225
+ attribute: {
3226
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3227
+ id: string;
3228
+ position: number;
3229
+ createdAt: Date;
3230
+ updatedAt: Date;
3231
+ deletedAt: Date | null;
3232
+ isDefault: boolean;
3233
+ systemName: string;
3234
+ displayName: string;
3235
+ isArchived: boolean;
3236
+ isRequired: boolean;
3237
+ isUnique: boolean;
3238
+ };
3239
+ textValue: string | null;
3240
+ booleanValue: boolean | null;
3241
+ numberValue: number | null;
3242
+ dateValue: Date | null;
3243
+ uploads: {
3244
+ id: string;
3245
+ createdAt: Date;
3246
+ updatedAt: Date;
3247
+ deletedAt: Date | null;
3248
+ customFieldId: string;
3249
+ upload: {
3250
+ id: string;
3251
+ createdAt: Date;
3252
+ updatedAt: Date;
3253
+ deletedAt: Date | null;
3254
+ fileName: string;
3255
+ fileKey: string;
3256
+ bucketName: string;
3257
+ fileSize: number;
3258
+ };
3259
+ }[];
3260
+ }, {
3261
+ id: string;
3262
+ createdAt: Date;
3263
+ updatedAt: Date;
3264
+ deletedAt: Date | null;
3265
+ attribute: {
3266
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3267
+ id: string;
3268
+ position: number;
3269
+ createdAt: Date;
3270
+ updatedAt: Date;
3271
+ deletedAt: Date | null;
3272
+ isDefault: boolean;
3273
+ systemName: string;
3274
+ displayName: string;
3275
+ isArchived: boolean;
3276
+ isRequired: boolean;
3277
+ isUnique: boolean;
3278
+ };
3279
+ textValue: string | null;
3280
+ booleanValue: boolean | null;
3281
+ numberValue: number | null;
3282
+ dateValue: Date | null;
3283
+ uploads: {
3284
+ id: string;
3285
+ createdAt: Date;
3286
+ updatedAt: Date;
3287
+ deletedAt: Date | null;
3288
+ customFieldId: string;
3289
+ upload: {
3290
+ id: string;
3291
+ createdAt: Date;
3292
+ updatedAt: Date;
3293
+ deletedAt: Date | null;
3294
+ fileName: string;
3295
+ fileKey: string;
3296
+ bucketName: string;
3297
+ fileSize: number;
3298
+ };
3299
+ }[];
3300
+ }>, "many">;
3301
+ contactEmails: z.ZodArray<z.ZodObject<{
3302
+ id: z.ZodString;
3303
+ createdAt: z.ZodDate;
3304
+ updatedAt: z.ZodDate;
3305
+ deletedAt: z.ZodNullable<z.ZodDate>;
3306
+ email: z.ZodString;
3307
+ isPrimary: z.ZodBoolean;
3308
+ }, "strip", z.ZodTypeAny, {
3309
+ id: string;
3310
+ isPrimary: boolean;
3311
+ email: string;
3312
+ createdAt: Date;
3313
+ updatedAt: Date;
3314
+ deletedAt: Date | null;
3315
+ }, {
3316
+ id: string;
3317
+ isPrimary: boolean;
3318
+ email: string;
3319
+ createdAt: Date;
3320
+ updatedAt: Date;
3321
+ deletedAt: Date | null;
3322
+ }>, "many">;
3323
+ contactPhones: z.ZodArray<z.ZodObject<{
3324
+ id: z.ZodString;
3325
+ createdAt: z.ZodDate;
3326
+ updatedAt: z.ZodDate;
3327
+ deletedAt: z.ZodNullable<z.ZodDate>;
3328
+ phone: z.ZodString;
3329
+ isPrimary: z.ZodBoolean;
3330
+ }, "strip", z.ZodTypeAny, {
3331
+ id: string;
3332
+ isPrimary: boolean;
3333
+ createdAt: Date;
3334
+ updatedAt: Date;
3335
+ deletedAt: Date | null;
3336
+ phone: string;
3337
+ }, {
3338
+ id: string;
3339
+ isPrimary: boolean;
3340
+ createdAt: Date;
3341
+ updatedAt: Date;
3342
+ deletedAt: Date | null;
3343
+ phone: string;
3344
+ }>, "many">;
3345
+ activityLogs: z.ZodOptional<z.ZodArray<z.ZodObject<{
3346
+ id: z.ZodString;
3347
+ createdAt: z.ZodDate;
3348
+ updatedAt: z.ZodDate;
3349
+ deletedAt: z.ZodNullable<z.ZodDate>;
3350
+ entityId: z.ZodString;
3351
+ description: z.ZodString;
3352
+ entityType: z.ZodObject<{
3353
+ id: z.ZodString;
3354
+ createdAt: z.ZodDate;
3355
+ updatedAt: z.ZodDate;
3356
+ deletedAt: z.ZodNullable<z.ZodDate>;
3357
+ entity: z.ZodString;
3358
+ description: z.ZodNullable<z.ZodString>;
3359
+ }, "strip", z.ZodTypeAny, {
3360
+ id: string;
3361
+ description: string | null;
3362
+ createdAt: Date;
3363
+ updatedAt: Date;
3364
+ deletedAt: Date | null;
3365
+ entity: string;
3366
+ }, {
3367
+ id: string;
3368
+ description: string | null;
3369
+ createdAt: Date;
3370
+ updatedAt: Date;
3371
+ deletedAt: Date | null;
3372
+ entity: string;
3373
+ }>;
3374
+ }, "strip", z.ZodTypeAny, {
3375
+ id: string;
3376
+ description: string;
3377
+ createdAt: Date;
3378
+ updatedAt: Date;
3379
+ deletedAt: Date | null;
3380
+ entityId: string;
3381
+ entityType: {
3382
+ id: string;
3383
+ description: string | null;
3384
+ createdAt: Date;
3385
+ updatedAt: Date;
3386
+ deletedAt: Date | null;
3387
+ entity: string;
3388
+ };
3389
+ }, {
3390
+ id: string;
3391
+ description: string;
3392
+ createdAt: Date;
3393
+ updatedAt: Date;
3394
+ deletedAt: Date | null;
3395
+ entityId: string;
3396
+ entityType: {
3397
+ id: string;
3398
+ description: string | null;
3399
+ createdAt: Date;
3400
+ updatedAt: Date;
3401
+ deletedAt: Date | null;
3402
+ entity: string;
3403
+ };
3404
+ }>, "many">>;
3405
+ }, "strip", z.ZodTypeAny, {
3406
+ id: string;
3407
+ channel: string | null;
3408
+ address: string | null;
3409
+ name: string;
3410
+ createdAt: Date;
3411
+ updatedAt: Date;
3412
+ deletedAt: Date | null;
3413
+ customFields: {
3414
+ id: string;
3415
+ createdAt: Date;
3416
+ updatedAt: Date;
3417
+ deletedAt: Date | null;
3418
+ attribute: {
3419
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3420
+ id: string;
3421
+ position: number;
3422
+ createdAt: Date;
3423
+ updatedAt: Date;
3424
+ deletedAt: Date | null;
3425
+ isDefault: boolean;
3426
+ systemName: string;
3427
+ displayName: string;
3428
+ isArchived: boolean;
3429
+ isRequired: boolean;
3430
+ isUnique: boolean;
3431
+ };
3432
+ textValue: string | null;
3433
+ booleanValue: boolean | null;
3434
+ numberValue: number | null;
3435
+ dateValue: Date | null;
3436
+ uploads: {
3437
+ id: string;
3438
+ createdAt: Date;
3439
+ updatedAt: Date;
3440
+ deletedAt: Date | null;
3441
+ customFieldId: string;
3442
+ upload: {
3443
+ id: string;
3444
+ createdAt: Date;
3445
+ updatedAt: Date;
3446
+ deletedAt: Date | null;
3447
+ fileName: string;
3448
+ fileKey: string;
3449
+ bucketName: string;
3450
+ fileSize: number;
3451
+ };
3452
+ }[];
3453
+ }[];
3454
+ notes: string | null;
3455
+ contactProfile: string | null;
3456
+ socialProfileUrl: string | null;
3457
+ tags: {
3458
+ id: string;
3459
+ name: string;
3460
+ createdAt: Date;
3461
+ updatedAt: Date;
3462
+ deletedAt: Date | null;
3463
+ }[];
3464
+ company: {
3465
+ id: string;
3466
+ createdAt: Date;
3467
+ updatedAt: Date;
3468
+ deletedAt: Date | null;
3469
+ address?: string | null | undefined;
3470
+ name?: string | undefined;
3471
+ phone?: string | null | undefined;
3472
+ industry?: string | null | undefined;
3473
+ } | null;
3474
+ contactEmails: {
3475
+ id: string;
3476
+ isPrimary: boolean;
3477
+ email: string;
3478
+ createdAt: Date;
3479
+ updatedAt: Date;
3480
+ deletedAt: Date | null;
3481
+ }[];
3482
+ contactPhones: {
3483
+ id: string;
3484
+ isPrimary: boolean;
3485
+ createdAt: Date;
3486
+ updatedAt: Date;
3487
+ deletedAt: Date | null;
3488
+ phone: string;
3489
+ }[];
3490
+ activityLogs?: {
3491
+ id: string;
3492
+ description: string;
3493
+ createdAt: Date;
3494
+ updatedAt: Date;
3495
+ deletedAt: Date | null;
3496
+ entityId: string;
3497
+ entityType: {
3498
+ id: string;
3499
+ description: string | null;
3500
+ createdAt: Date;
3501
+ updatedAt: Date;
3502
+ deletedAt: Date | null;
3503
+ entity: string;
3504
+ };
3505
+ }[] | undefined;
3506
+ }, {
3507
+ id: string;
3508
+ channel: string | null;
3509
+ address: string | null;
3510
+ name: string;
3511
+ createdAt: Date;
3512
+ updatedAt: Date;
3513
+ deletedAt: Date | null;
3514
+ customFields: {
3515
+ id: string;
3516
+ createdAt: Date;
3517
+ updatedAt: Date;
3518
+ deletedAt: Date | null;
3519
+ attribute: {
3520
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3521
+ id: string;
3522
+ position: number;
3523
+ createdAt: Date;
3524
+ updatedAt: Date;
3525
+ deletedAt: Date | null;
3526
+ isDefault: boolean;
3527
+ systemName: string;
3528
+ displayName: string;
3529
+ isArchived: boolean;
3530
+ isRequired: boolean;
3531
+ isUnique: boolean;
3532
+ };
3533
+ textValue: string | null;
3534
+ booleanValue: boolean | null;
3535
+ numberValue: number | null;
3536
+ dateValue: Date | null;
3537
+ uploads: {
3538
+ id: string;
3539
+ createdAt: Date;
3540
+ updatedAt: Date;
3541
+ deletedAt: Date | null;
3542
+ customFieldId: string;
3543
+ upload: {
3544
+ id: string;
3545
+ createdAt: Date;
3546
+ updatedAt: Date;
3547
+ deletedAt: Date | null;
3548
+ fileName: string;
3549
+ fileKey: string;
3550
+ bucketName: string;
3551
+ fileSize: number;
3552
+ };
3553
+ }[];
3554
+ }[];
3555
+ notes: string | null;
3556
+ contactProfile: string | null;
3557
+ socialProfileUrl: string | null;
3558
+ tags: {
3559
+ id: string;
3560
+ name: string;
3561
+ createdAt: Date;
3562
+ updatedAt: Date;
3563
+ deletedAt: Date | null;
3564
+ }[];
3565
+ company: {
3566
+ id: string;
3567
+ createdAt: Date;
3568
+ updatedAt: Date;
3569
+ deletedAt: Date | null;
3570
+ address?: string | null | undefined;
3571
+ name?: string | undefined;
3572
+ phone?: string | null | undefined;
3573
+ industry?: string | null | undefined;
3574
+ } | null;
3575
+ contactEmails: {
3576
+ id: string;
3577
+ isPrimary: boolean;
3578
+ email: string;
3579
+ createdAt: Date;
3580
+ updatedAt: Date;
3581
+ deletedAt: Date | null;
3582
+ }[];
3583
+ contactPhones: {
3584
+ id: string;
3585
+ isPrimary: boolean;
3586
+ createdAt: Date;
3587
+ updatedAt: Date;
3588
+ deletedAt: Date | null;
3589
+ phone: string;
3590
+ }[];
3591
+ activityLogs?: {
3592
+ id: string;
3593
+ description: string;
3594
+ createdAt: Date;
3595
+ updatedAt: Date;
3596
+ deletedAt: Date | null;
3597
+ entityId: string;
3598
+ entityType: {
3599
+ id: string;
3600
+ description: string | null;
3601
+ createdAt: Date;
3602
+ updatedAt: Date;
3603
+ deletedAt: Date | null;
3604
+ entity: string;
3605
+ };
3606
+ }[] | undefined;
3607
+ }>>;
3608
+ agent: z.ZodNullable<z.ZodObject<{
3609
+ id: z.ZodString;
3610
+ createdAt: z.ZodDate;
3611
+ updatedAt: z.ZodDate;
3612
+ deletedAt: z.ZodNullable<z.ZodDate>;
3613
+ name: z.ZodString;
3614
+ email: z.ZodString;
3615
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
3616
+ password: z.ZodString;
3617
+ address: z.ZodNullable<z.ZodString>;
3618
+ phone: z.ZodNullable<z.ZodString>;
3619
+ notificationCount: z.ZodNullable<z.ZodNumber>;
3620
+ roles: z.ZodArray<z.ZodObject<{
3621
+ id: z.ZodString;
3622
+ createdAt: z.ZodDate;
3623
+ updatedAt: z.ZodDate;
3624
+ deletedAt: z.ZodNullable<z.ZodDate>;
3625
+ systemName: z.ZodString;
3626
+ displayName: z.ZodString;
3627
+ description: z.ZodNullable<z.ZodString>;
3628
+ permissions: z.ZodArray<z.ZodObject<{
3629
+ id: z.ZodString;
3630
+ createdAt: z.ZodDate;
3631
+ updatedAt: z.ZodDate;
3632
+ deletedAt: z.ZodNullable<z.ZodDate>;
3633
+ systemName: z.ZodString;
3634
+ displayName: z.ZodString;
3635
+ description: z.ZodNullable<z.ZodString>;
3636
+ }, "strip", z.ZodTypeAny, {
3637
+ id: string;
3638
+ description: string | null;
3639
+ createdAt: Date;
3640
+ updatedAt: Date;
3641
+ deletedAt: Date | null;
3642
+ systemName: string;
3643
+ displayName: string;
3644
+ }, {
3645
+ id: string;
3646
+ description: string | null;
3647
+ createdAt: Date;
3648
+ updatedAt: Date;
3649
+ deletedAt: Date | null;
3650
+ systemName: string;
3651
+ displayName: string;
3652
+ }>, "many">;
3653
+ }, "strip", z.ZodTypeAny, {
3654
+ id: string;
3655
+ description: string | null;
3656
+ createdAt: Date;
3657
+ updatedAt: Date;
3658
+ deletedAt: Date | null;
3659
+ systemName: string;
3660
+ displayName: string;
3661
+ permissions: {
3662
+ id: string;
3663
+ description: string | null;
3664
+ createdAt: Date;
3665
+ updatedAt: Date;
3666
+ deletedAt: Date | null;
3667
+ systemName: string;
3668
+ displayName: string;
3669
+ }[];
3670
+ }, {
3671
+ id: string;
3672
+ description: string | null;
3673
+ createdAt: Date;
3674
+ updatedAt: Date;
3675
+ deletedAt: Date | null;
3676
+ systemName: string;
3677
+ displayName: string;
3678
+ permissions: {
3679
+ id: string;
3680
+ description: string | null;
3681
+ createdAt: Date;
3682
+ updatedAt: Date;
3683
+ deletedAt: Date | null;
3684
+ systemName: string;
3685
+ displayName: string;
3686
+ }[];
3687
+ }>, "many">;
3688
+ extension: z.ZodOptional<z.ZodObject<{
3689
+ id: z.ZodString;
3690
+ createdAt: z.ZodDate;
3691
+ updatedAt: z.ZodDate;
3692
+ deletedAt: z.ZodNullable<z.ZodDate>;
3693
+ userId: z.ZodNullable<z.ZodString>;
3694
+ sipServerUrl: z.ZodString;
3695
+ sipUserName: z.ZodString;
3696
+ extensionId: z.ZodNumber;
3697
+ extensionName: z.ZodString;
3698
+ telephonySignature: z.ZodNullable<z.ZodString>;
3699
+ }, "strip", z.ZodTypeAny, {
3700
+ id: string;
3701
+ createdAt: Date;
3702
+ updatedAt: Date;
3703
+ deletedAt: Date | null;
3704
+ userId: string | null;
3705
+ sipServerUrl: string;
3706
+ sipUserName: string;
3707
+ extensionId: number;
3708
+ extensionName: string;
3709
+ telephonySignature: string | null;
3710
+ }, {
3711
+ id: string;
3712
+ createdAt: Date;
3713
+ updatedAt: Date;
3714
+ deletedAt: Date | null;
3715
+ userId: string | null;
3716
+ sipServerUrl: string;
3717
+ sipUserName: string;
3718
+ extensionId: number;
3719
+ extensionName: string;
3720
+ telephonySignature: string | null;
3721
+ }>>;
3722
+ }, "strip", z.ZodTypeAny, {
3723
+ id: string;
3724
+ address: string | null;
3725
+ name: string;
3726
+ email: string;
3727
+ createdAt: Date;
3728
+ updatedAt: Date;
3729
+ deletedAt: Date | null;
3730
+ emailVerifiedAt: Date | null;
3731
+ password: string;
3732
+ phone: string | null;
3733
+ notificationCount: number | null;
3734
+ roles: {
3735
+ id: string;
3736
+ description: string | null;
3737
+ createdAt: Date;
3738
+ updatedAt: Date;
3739
+ deletedAt: Date | null;
3740
+ systemName: string;
3741
+ displayName: string;
3742
+ permissions: {
3743
+ id: string;
3744
+ description: string | null;
3745
+ createdAt: Date;
3746
+ updatedAt: Date;
3747
+ deletedAt: Date | null;
3748
+ systemName: string;
3749
+ displayName: string;
3750
+ }[];
3751
+ }[];
3752
+ extension?: {
3753
+ id: string;
3754
+ createdAt: Date;
3755
+ updatedAt: Date;
3756
+ deletedAt: Date | null;
3757
+ userId: string | null;
3758
+ sipServerUrl: string;
3759
+ sipUserName: string;
3760
+ extensionId: number;
3761
+ extensionName: string;
3762
+ telephonySignature: string | null;
3763
+ } | undefined;
3764
+ }, {
3765
+ id: string;
3766
+ address: string | null;
3767
+ name: string;
3768
+ email: string;
3769
+ createdAt: Date;
3770
+ updatedAt: Date;
3771
+ deletedAt: Date | null;
3772
+ emailVerifiedAt: Date | null;
3773
+ password: string;
3774
+ phone: string | null;
3775
+ notificationCount: number | null;
3776
+ roles: {
3777
+ id: string;
3778
+ description: string | null;
3779
+ createdAt: Date;
3780
+ updatedAt: Date;
3781
+ deletedAt: Date | null;
3782
+ systemName: string;
3783
+ displayName: string;
3784
+ permissions: {
3785
+ id: string;
3786
+ description: string | null;
3787
+ createdAt: Date;
3788
+ updatedAt: Date;
3789
+ deletedAt: Date | null;
3790
+ systemName: string;
3791
+ displayName: string;
3792
+ }[];
3793
+ }[];
3794
+ extension?: {
3795
+ id: string;
3796
+ createdAt: Date;
3797
+ updatedAt: Date;
3798
+ deletedAt: Date | null;
3799
+ userId: string | null;
3800
+ sipServerUrl: string;
3801
+ sipUserName: string;
3802
+ extensionId: number;
3803
+ extensionName: string;
3804
+ telephonySignature: string | null;
3805
+ } | undefined;
3806
+ }>>;
3807
+ }, "strip", z.ZodTypeAny, {
3808
+ id: string;
3809
+ channel: string | null;
3810
+ disposition: string | null;
3811
+ direction: string | null;
3812
+ createdAt: Date;
3813
+ updatedAt: Date;
3814
+ deletedAt: Date | null;
3815
+ contact: {
3816
+ id: string;
3817
+ channel: string | null;
3818
+ address: string | null;
3819
+ name: string;
3820
+ createdAt: Date;
3821
+ updatedAt: Date;
3822
+ deletedAt: Date | null;
3823
+ customFields: {
3824
+ id: string;
3825
+ createdAt: Date;
3826
+ updatedAt: Date;
3827
+ deletedAt: Date | null;
3828
+ attribute: {
3829
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3830
+ id: string;
3831
+ position: number;
3832
+ createdAt: Date;
3833
+ updatedAt: Date;
3834
+ deletedAt: Date | null;
3835
+ isDefault: boolean;
3836
+ systemName: string;
3837
+ displayName: string;
3838
+ isArchived: boolean;
3839
+ isRequired: boolean;
3840
+ isUnique: boolean;
3841
+ };
3842
+ textValue: string | null;
3843
+ booleanValue: boolean | null;
3844
+ numberValue: number | null;
3845
+ dateValue: Date | null;
3846
+ uploads: {
3847
+ id: string;
3848
+ createdAt: Date;
3849
+ updatedAt: Date;
3850
+ deletedAt: Date | null;
3851
+ customFieldId: string;
3852
+ upload: {
3853
+ id: string;
3854
+ createdAt: Date;
3855
+ updatedAt: Date;
3856
+ deletedAt: Date | null;
3857
+ fileName: string;
3858
+ fileKey: string;
3859
+ bucketName: string;
3860
+ fileSize: number;
3861
+ };
3862
+ }[];
3863
+ }[];
3864
+ notes: string | null;
3865
+ contactProfile: string | null;
3866
+ socialProfileUrl: string | null;
3867
+ tags: {
3868
+ id: string;
3869
+ name: string;
3870
+ createdAt: Date;
3871
+ updatedAt: Date;
3872
+ deletedAt: Date | null;
3873
+ }[];
3874
+ company: {
3875
+ id: string;
3876
+ createdAt: Date;
3877
+ updatedAt: Date;
3878
+ deletedAt: Date | null;
3879
+ address?: string | null | undefined;
3880
+ name?: string | undefined;
3881
+ phone?: string | null | undefined;
3882
+ industry?: string | null | undefined;
3883
+ } | null;
3884
+ contactEmails: {
3885
+ id: string;
3886
+ isPrimary: boolean;
3887
+ email: string;
3888
+ createdAt: Date;
3889
+ updatedAt: Date;
3890
+ deletedAt: Date | null;
3891
+ }[];
3892
+ contactPhones: {
3893
+ id: string;
3894
+ isPrimary: boolean;
3895
+ createdAt: Date;
3896
+ updatedAt: Date;
3897
+ deletedAt: Date | null;
3898
+ phone: string;
3899
+ }[];
3900
+ activityLogs?: {
3901
+ id: string;
3902
+ description: string;
3903
+ createdAt: Date;
3904
+ updatedAt: Date;
3905
+ deletedAt: Date | null;
3906
+ entityId: string;
3907
+ entityType: {
3908
+ id: string;
3909
+ description: string | null;
3910
+ createdAt: Date;
3911
+ updatedAt: Date;
3912
+ deletedAt: Date | null;
3913
+ entity: string;
3914
+ };
3915
+ }[] | undefined;
3916
+ } | null;
3917
+ entityId: string;
3918
+ caseId: number;
3919
+ entityName: string;
3920
+ startedDate: string | null;
3921
+ handledTime: string | null;
3922
+ firstResponseTime: string | null;
3923
+ wrapUpForm: {
3924
+ id: string;
3925
+ disposition: string | null;
3926
+ createdAt: Date;
3927
+ updatedAt: Date;
3928
+ deletedAt: Date | null;
3929
+ tags: {
3930
+ id: string;
3931
+ name: string;
3932
+ createdAt: Date;
3933
+ updatedAt: Date;
3934
+ deletedAt: Date | null;
3935
+ }[];
3936
+ callFrom: string | null;
3937
+ callTo: string | null;
3938
+ note: string | null;
3939
+ } | null;
3940
+ channelType: string | null;
3941
+ slaMeet: string | null;
3942
+ evaluateForm: {
3943
+ id: string;
3944
+ createdAt: Date;
3945
+ updatedAt: Date;
3946
+ deletedAt: Date | null;
3947
+ cxLogId: string;
3948
+ sentimentScore: string | null;
3949
+ csatScore: string | null;
3950
+ } | null;
3951
+ room: {
3952
+ id: string;
3953
+ direction: "incoming" | "outgoing" | "system";
3954
+ createdAt: Date;
3955
+ updatedAt: Date;
3956
+ deletedAt: Date | null;
3957
+ actor: {
3958
+ id: string;
3959
+ address: string | null;
3960
+ name: string;
3961
+ email: string;
3962
+ createdAt: Date;
3963
+ updatedAt: Date;
3964
+ deletedAt: Date | null;
3965
+ emailVerifiedAt: Date | null;
3966
+ password: string;
3967
+ phone: string | null;
3968
+ notificationCount: number | null;
3969
+ roles: {
3970
+ id: string;
3971
+ description: string | null;
3972
+ createdAt: Date;
3973
+ updatedAt: Date;
3974
+ deletedAt: Date | null;
3975
+ systemName: string;
3976
+ displayName: string;
3977
+ permissions: {
3978
+ id: string;
3979
+ description: string | null;
3980
+ createdAt: Date;
3981
+ updatedAt: Date;
3982
+ deletedAt: Date | null;
3983
+ systemName: string;
3984
+ displayName: string;
3985
+ }[];
3986
+ }[];
3987
+ extension?: {
3988
+ id: string;
3989
+ createdAt: Date;
3990
+ updatedAt: Date;
3991
+ deletedAt: Date | null;
3992
+ userId: string | null;
3993
+ sipServerUrl: string;
3994
+ sipUserName: string;
3995
+ extensionId: number;
3996
+ extensionName: string;
3997
+ telephonySignature: string | null;
3998
+ } | undefined;
3999
+ };
4000
+ firstResponseTime: number;
4001
+ lastMessage: string;
4002
+ handleTime: number;
4003
+ closeAt: Date;
4004
+ unreadCount: number;
4005
+ firstResponseAt: Date;
4006
+ isLatest: boolean;
4007
+ platformContact: {
4008
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram";
4009
+ id: string;
4010
+ metadata: {
4011
+ id: string;
4012
+ name: string;
4013
+ picture?: string | undefined;
4014
+ additionalCredentials?: any;
4015
+ };
4016
+ createdAt: Date;
4017
+ updatedAt: Date;
4018
+ deletedAt: Date | null;
4019
+ contact: {
4020
+ id: string;
4021
+ channel: string | null;
4022
+ address: string | null;
4023
+ name: string;
4024
+ createdAt: Date;
4025
+ updatedAt: Date;
4026
+ deletedAt: Date | null;
4027
+ customFields: {
4028
+ id: string;
4029
+ createdAt: Date;
4030
+ updatedAt: Date;
4031
+ deletedAt: Date | null;
4032
+ attribute: {
4033
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
4034
+ id: string;
4035
+ position: number;
4036
+ createdAt: Date;
4037
+ updatedAt: Date;
4038
+ deletedAt: Date | null;
4039
+ isDefault: boolean;
4040
+ systemName: string;
4041
+ displayName: string;
4042
+ isArchived: boolean;
4043
+ isRequired: boolean;
4044
+ isUnique: boolean;
4045
+ };
4046
+ textValue: string | null;
4047
+ booleanValue: boolean | null;
4048
+ numberValue: number | null;
4049
+ dateValue: Date | null;
4050
+ uploads: {
4051
+ id: string;
4052
+ createdAt: Date;
4053
+ updatedAt: Date;
4054
+ deletedAt: Date | null;
4055
+ customFieldId: string;
4056
+ upload: {
4057
+ id: string;
4058
+ createdAt: Date;
4059
+ updatedAt: Date;
4060
+ deletedAt: Date | null;
4061
+ fileName: string;
4062
+ fileKey: string;
4063
+ bucketName: string;
4064
+ fileSize: number;
4065
+ };
4066
+ }[];
4067
+ }[];
4068
+ notes: string | null;
4069
+ contactProfile: string | null;
4070
+ socialProfileUrl: string | null;
4071
+ tags: {
4072
+ id: string;
4073
+ name: string;
4074
+ createdAt: Date;
4075
+ updatedAt: Date;
4076
+ deletedAt: Date | null;
4077
+ }[];
4078
+ company: {
4079
+ id: string;
4080
+ createdAt: Date;
4081
+ updatedAt: Date;
4082
+ deletedAt: Date | null;
4083
+ address?: string | null | undefined;
4084
+ name?: string | undefined;
4085
+ phone?: string | null | undefined;
4086
+ industry?: string | null | undefined;
4087
+ } | null;
4088
+ contactEmails: {
4089
+ id: string;
4090
+ isPrimary: boolean;
4091
+ email: string;
4092
+ createdAt: Date;
4093
+ updatedAt: Date;
4094
+ deletedAt: Date | null;
4095
+ }[];
4096
+ contactPhones: {
4097
+ id: string;
4098
+ isPrimary: boolean;
4099
+ createdAt: Date;
4100
+ updatedAt: Date;
4101
+ deletedAt: Date | null;
4102
+ phone: string;
4103
+ }[];
4104
+ activityLogs?: {
4105
+ id: string;
4106
+ description: string;
4107
+ createdAt: Date;
4108
+ updatedAt: Date;
4109
+ deletedAt: Date | null;
4110
+ entityId: string;
4111
+ entityType: {
4112
+ id: string;
4113
+ description: string | null;
4114
+ createdAt: Date;
4115
+ updatedAt: Date;
4116
+ deletedAt: Date | null;
4117
+ entity: string;
4118
+ };
4119
+ }[] | undefined;
4120
+ };
4121
+ channelId: string;
4122
+ socialPlatformId: string;
4123
+ };
4124
+ assignee: {
4125
+ id: string;
4126
+ address: string | null;
4127
+ name: string;
4128
+ email: string;
4129
+ createdAt: Date;
4130
+ updatedAt: Date;
4131
+ deletedAt: Date | null;
4132
+ emailVerifiedAt: Date | null;
4133
+ password: string;
4134
+ phone: string | null;
4135
+ notificationCount: number | null;
4136
+ roles: {
4137
+ id: string;
4138
+ description: string | null;
4139
+ createdAt: Date;
4140
+ updatedAt: Date;
4141
+ deletedAt: Date | null;
4142
+ systemName: string;
4143
+ displayName: string;
4144
+ permissions: {
4145
+ id: string;
4146
+ description: string | null;
4147
+ createdAt: Date;
4148
+ updatedAt: Date;
4149
+ deletedAt: Date | null;
4150
+ systemName: string;
4151
+ displayName: string;
4152
+ }[];
4153
+ }[];
4154
+ extension?: {
4155
+ id: string;
4156
+ createdAt: Date;
4157
+ updatedAt: Date;
4158
+ deletedAt: Date | null;
4159
+ userId: string | null;
4160
+ sipServerUrl: string;
4161
+ sipUserName: string;
4162
+ extensionId: number;
4163
+ extensionName: string;
4164
+ telephonySignature: string | null;
4165
+ } | undefined;
4166
+ };
4167
+ cxlog: {
4168
+ id: string;
4169
+ channel: string | null;
4170
+ disposition: string | null;
4171
+ direction: string | null;
4172
+ createdAt: Date;
4173
+ updatedAt: Date;
4174
+ deletedAt: Date | null;
4175
+ entityId: string;
4176
+ contactId: string | null;
4177
+ caseId: number;
4178
+ entityName: string;
4179
+ queueId: string | null;
4180
+ agentId: string | null;
4181
+ startedDate: Date | null;
4182
+ handledTime: number | null;
4183
+ firstResponseTime: number | null;
4184
+ wrapUpForm: {
4185
+ id: string;
4186
+ disposition: string | null;
4187
+ createdAt: Date;
4188
+ updatedAt: Date;
4189
+ deletedAt: Date | null;
4190
+ tags: {
4191
+ id: string;
4192
+ name: string;
4193
+ createdAt: Date;
4194
+ updatedAt: Date;
4195
+ deletedAt: Date | null;
4196
+ }[];
4197
+ callFrom: string | null;
4198
+ callTo: string | null;
4199
+ note: string | null;
4200
+ } | null;
4201
+ };
4202
+ channel?: {
4203
+ id?: string | undefined;
4204
+ createdAt?: Date | undefined;
4205
+ updatedAt?: Date | undefined;
4206
+ deletedAt?: Date | null | undefined;
4207
+ name?: string | undefined;
4208
+ type?: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram" | undefined;
4209
+ metadata?: {
4210
+ id: string;
4211
+ name: string;
4212
+ accessToken: string;
4213
+ additionalCredentials?: any;
4214
+ } | undefined;
4215
+ brandName?: string | undefined;
4216
+ platformId?: string | undefined;
4217
+ status?: boolean | undefined;
4218
+ isReloginRequired?: boolean | undefined;
4219
+ connectedUserName?: string | undefined;
4220
+ connectedUserId?: string | undefined;
4221
+ actor?: {
4222
+ id: string;
4223
+ address: string | null;
4224
+ name: string;
4225
+ email: string;
4226
+ createdAt: Date;
4227
+ updatedAt: Date;
4228
+ deletedAt: Date | null;
4229
+ emailVerifiedAt: Date | null;
4230
+ password: string;
4231
+ phone: string | null;
4232
+ notificationCount: number | null;
4233
+ roles: {
4234
+ id: string;
4235
+ description: string | null;
4236
+ createdAt: Date;
4237
+ updatedAt: Date;
4238
+ deletedAt: Date | null;
4239
+ systemName: string;
4240
+ displayName: string;
4241
+ permissions: {
4242
+ id: string;
4243
+ description: string | null;
4244
+ createdAt: Date;
4245
+ updatedAt: Date;
4246
+ deletedAt: Date | null;
4247
+ systemName: string;
4248
+ displayName: string;
4249
+ }[];
4250
+ }[];
4251
+ extension?: {
4252
+ id: string;
4253
+ createdAt: Date;
4254
+ updatedAt: Date;
4255
+ deletedAt: Date | null;
4256
+ userId: string | null;
4257
+ sipServerUrl: string;
4258
+ sipUserName: string;
4259
+ extensionId: number;
4260
+ extensionName: string;
4261
+ telephonySignature: string | null;
4262
+ } | undefined;
4263
+ } | undefined;
4264
+ } | undefined;
4265
+ } | null;
4266
+ telephonyCdr: {
4267
+ type: string;
4268
+ id: string;
4269
+ recording: string | null;
4270
+ status: string;
4271
+ createdAt: Date;
4272
+ updatedAt: Date;
4273
+ deletedAt: Date | null;
4274
+ extensionId: string | null;
4275
+ uniqueCallId: string;
4276
+ timeStart: string;
4277
+ callFrom: string;
4278
+ callTo: string;
4279
+ callDuration: number | null;
4280
+ talkDuration: number | null;
4281
+ srcTrunkName: string | null;
4282
+ dstTrunkName: string | null;
4283
+ pinCode: string | null;
4284
+ didNumber: string | null;
4285
+ agentRingTime: number | null;
4286
+ uploadId: string | null;
4287
+ serialNumber: string | null;
4288
+ telephonyQueueId: string | null;
4289
+ contactId: string | null;
4290
+ } | null;
4291
+ queue: {
4292
+ queueName?: string | null | undefined;
4293
+ } | null;
4294
+ agent: {
4295
+ id: string;
4296
+ address: string | null;
4297
+ name: string;
4298
+ email: string;
4299
+ createdAt: Date;
4300
+ updatedAt: Date;
4301
+ deletedAt: Date | null;
4302
+ emailVerifiedAt: Date | null;
4303
+ password: string;
4304
+ phone: string | null;
4305
+ notificationCount: number | null;
4306
+ roles: {
4307
+ id: string;
4308
+ description: string | null;
4309
+ createdAt: Date;
4310
+ updatedAt: Date;
4311
+ deletedAt: Date | null;
4312
+ systemName: string;
4313
+ displayName: string;
4314
+ permissions: {
4315
+ id: string;
4316
+ description: string | null;
4317
+ createdAt: Date;
4318
+ updatedAt: Date;
4319
+ deletedAt: Date | null;
4320
+ systemName: string;
4321
+ displayName: string;
4322
+ }[];
4323
+ }[];
4324
+ extension?: {
4325
+ id: string;
4326
+ createdAt: Date;
4327
+ updatedAt: Date;
4328
+ deletedAt: Date | null;
4329
+ userId: string | null;
4330
+ sipServerUrl: string;
4331
+ sipUserName: string;
4332
+ extensionId: number;
4333
+ extensionName: string;
4334
+ telephonySignature: string | null;
4335
+ } | undefined;
4336
+ } | null;
4337
+ }, {
4338
+ id: string;
4339
+ channel: string | null;
4340
+ disposition: string | null;
4341
+ direction: string | null;
4342
+ createdAt: Date;
4343
+ updatedAt: Date;
4344
+ deletedAt: Date | null;
4345
+ contact: {
4346
+ id: string;
4347
+ channel: string | null;
4348
+ address: string | null;
4349
+ name: string;
4350
+ createdAt: Date;
4351
+ updatedAt: Date;
4352
+ deletedAt: Date | null;
4353
+ customFields: {
4354
+ id: string;
4355
+ createdAt: Date;
4356
+ updatedAt: Date;
4357
+ deletedAt: Date | null;
4358
+ attribute: {
4359
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
4360
+ id: string;
4361
+ position: number;
4362
+ createdAt: Date;
4363
+ updatedAt: Date;
4364
+ deletedAt: Date | null;
4365
+ isDefault: boolean;
4366
+ systemName: string;
4367
+ displayName: string;
4368
+ isArchived: boolean;
4369
+ isRequired: boolean;
4370
+ isUnique: boolean;
4371
+ };
4372
+ textValue: string | null;
4373
+ booleanValue: boolean | null;
4374
+ numberValue: number | null;
4375
+ dateValue: Date | null;
4376
+ uploads: {
4377
+ id: string;
4378
+ createdAt: Date;
4379
+ updatedAt: Date;
4380
+ deletedAt: Date | null;
4381
+ customFieldId: string;
4382
+ upload: {
4383
+ id: string;
4384
+ createdAt: Date;
4385
+ updatedAt: Date;
4386
+ deletedAt: Date | null;
4387
+ fileName: string;
4388
+ fileKey: string;
4389
+ bucketName: string;
4390
+ fileSize: number;
4391
+ };
4392
+ }[];
4393
+ }[];
4394
+ notes: string | null;
4395
+ contactProfile: string | null;
4396
+ socialProfileUrl: string | null;
4397
+ tags: {
4398
+ id: string;
4399
+ name: string;
4400
+ createdAt: Date;
4401
+ updatedAt: Date;
4402
+ deletedAt: Date | null;
4403
+ }[];
4404
+ company: {
4405
+ id: string;
4406
+ createdAt: Date;
4407
+ updatedAt: Date;
4408
+ deletedAt: Date | null;
4409
+ address?: string | null | undefined;
4410
+ name?: string | undefined;
4411
+ phone?: string | null | undefined;
4412
+ industry?: string | null | undefined;
4413
+ } | null;
4414
+ contactEmails: {
4415
+ id: string;
4416
+ isPrimary: boolean;
4417
+ email: string;
4418
+ createdAt: Date;
4419
+ updatedAt: Date;
4420
+ deletedAt: Date | null;
4421
+ }[];
4422
+ contactPhones: {
4423
+ id: string;
4424
+ isPrimary: boolean;
4425
+ createdAt: Date;
4426
+ updatedAt: Date;
4427
+ deletedAt: Date | null;
4428
+ phone: string;
4429
+ }[];
4430
+ activityLogs?: {
4431
+ id: string;
4432
+ description: string;
4433
+ createdAt: Date;
4434
+ updatedAt: Date;
4435
+ deletedAt: Date | null;
4436
+ entityId: string;
4437
+ entityType: {
4438
+ id: string;
4439
+ description: string | null;
4440
+ createdAt: Date;
4441
+ updatedAt: Date;
4442
+ deletedAt: Date | null;
4443
+ entity: string;
4444
+ };
4445
+ }[] | undefined;
4446
+ } | null;
4447
+ entityId: string;
4448
+ caseId: number;
4449
+ entityName: string;
4450
+ startedDate: string | null;
4451
+ handledTime: string | null;
4452
+ firstResponseTime: string | null;
4453
+ wrapUpForm: {
4454
+ id: string;
4455
+ disposition: string | null;
4456
+ createdAt: Date;
4457
+ updatedAt: Date;
4458
+ deletedAt: Date | null;
4459
+ tags: {
4460
+ id: string;
4461
+ name: string;
4462
+ createdAt: Date;
4463
+ updatedAt: Date;
4464
+ deletedAt: Date | null;
4465
+ }[];
4466
+ callFrom: string | null;
4467
+ callTo: string | null;
4468
+ note: string | null;
4469
+ } | null;
4470
+ channelType: string | null;
4471
+ slaMeet: string | null;
4472
+ evaluateForm: {
4473
+ id: string;
4474
+ createdAt: Date;
4475
+ updatedAt: Date;
4476
+ deletedAt: Date | null;
4477
+ cxLogId: string;
4478
+ sentimentScore: string | null;
4479
+ csatScore: string | null;
4480
+ } | null;
4481
+ room: {
4482
+ id: string;
4483
+ direction: "incoming" | "outgoing" | "system";
4484
+ createdAt: Date;
4485
+ updatedAt: Date;
4486
+ deletedAt: Date | null;
4487
+ actor: {
4488
+ id: string;
4489
+ address: string | null;
4490
+ name: string;
4491
+ email: string;
4492
+ createdAt: Date;
4493
+ updatedAt: Date;
4494
+ deletedAt: Date | null;
4495
+ emailVerifiedAt: Date | null;
4496
+ password: string;
4497
+ phone: string | null;
4498
+ notificationCount: number | null;
4499
+ roles: {
4500
+ id: string;
4501
+ description: string | null;
4502
+ createdAt: Date;
4503
+ updatedAt: Date;
4504
+ deletedAt: Date | null;
4505
+ systemName: string;
4506
+ displayName: string;
4507
+ permissions: {
4508
+ id: string;
4509
+ description: string | null;
4510
+ createdAt: Date;
4511
+ updatedAt: Date;
4512
+ deletedAt: Date | null;
4513
+ systemName: string;
4514
+ displayName: string;
4515
+ }[];
4516
+ }[];
4517
+ extension?: {
4518
+ id: string;
4519
+ createdAt: Date;
4520
+ updatedAt: Date;
4521
+ deletedAt: Date | null;
4522
+ userId: string | null;
4523
+ sipServerUrl: string;
4524
+ sipUserName: string;
4525
+ extensionId: number;
4526
+ extensionName: string;
4527
+ telephonySignature: string | null;
4528
+ } | undefined;
4529
+ };
4530
+ firstResponseTime: number;
4531
+ lastMessage: string;
4532
+ handleTime: number;
4533
+ closeAt: Date;
4534
+ unreadCount: number;
4535
+ firstResponseAt: Date;
4536
+ isLatest: boolean;
4537
+ platformContact: {
4538
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram";
4539
+ id: string;
4540
+ metadata: {
4541
+ id: string;
4542
+ name: string;
4543
+ picture?: string | undefined;
4544
+ additionalCredentials?: any;
4545
+ };
4546
+ createdAt: Date;
4547
+ updatedAt: Date;
4548
+ deletedAt: Date | null;
4549
+ contact: {
4550
+ id: string;
4551
+ channel: string | null;
4552
+ address: string | null;
4553
+ name: string;
4554
+ createdAt: Date;
4555
+ updatedAt: Date;
4556
+ deletedAt: Date | null;
4557
+ customFields: {
4558
+ id: string;
4559
+ createdAt: Date;
4560
+ updatedAt: Date;
4561
+ deletedAt: Date | null;
4562
+ attribute: {
4563
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
4564
+ id: string;
4565
+ position: number;
4566
+ createdAt: Date;
4567
+ updatedAt: Date;
4568
+ deletedAt: Date | null;
4569
+ isDefault: boolean;
4570
+ systemName: string;
4571
+ displayName: string;
4572
+ isArchived: boolean;
4573
+ isRequired: boolean;
4574
+ isUnique: boolean;
4575
+ };
4576
+ textValue: string | null;
4577
+ booleanValue: boolean | null;
4578
+ numberValue: number | null;
4579
+ dateValue: Date | null;
4580
+ uploads: {
4581
+ id: string;
4582
+ createdAt: Date;
4583
+ updatedAt: Date;
4584
+ deletedAt: Date | null;
4585
+ customFieldId: string;
4586
+ upload: {
4587
+ id: string;
4588
+ createdAt: Date;
4589
+ updatedAt: Date;
4590
+ deletedAt: Date | null;
4591
+ fileName: string;
4592
+ fileKey: string;
4593
+ bucketName: string;
4594
+ fileSize: number;
4595
+ };
4596
+ }[];
4597
+ }[];
4598
+ notes: string | null;
4599
+ contactProfile: string | null;
4600
+ socialProfileUrl: string | null;
4601
+ tags: {
4602
+ id: string;
4603
+ name: string;
4604
+ createdAt: Date;
4605
+ updatedAt: Date;
4606
+ deletedAt: Date | null;
4607
+ }[];
4608
+ company: {
4609
+ id: string;
4610
+ createdAt: Date;
4611
+ updatedAt: Date;
4612
+ deletedAt: Date | null;
4613
+ address?: string | null | undefined;
4614
+ name?: string | undefined;
4615
+ phone?: string | null | undefined;
4616
+ industry?: string | null | undefined;
4617
+ } | null;
4618
+ contactEmails: {
4619
+ id: string;
4620
+ isPrimary: boolean;
4621
+ email: string;
4622
+ createdAt: Date;
4623
+ updatedAt: Date;
4624
+ deletedAt: Date | null;
4625
+ }[];
4626
+ contactPhones: {
4627
+ id: string;
4628
+ isPrimary: boolean;
4629
+ createdAt: Date;
4630
+ updatedAt: Date;
4631
+ deletedAt: Date | null;
4632
+ phone: string;
4633
+ }[];
4634
+ activityLogs?: {
4635
+ id: string;
4636
+ description: string;
4637
+ createdAt: Date;
4638
+ updatedAt: Date;
4639
+ deletedAt: Date | null;
4640
+ entityId: string;
4641
+ entityType: {
4642
+ id: string;
4643
+ description: string | null;
4644
+ createdAt: Date;
4645
+ updatedAt: Date;
4646
+ deletedAt: Date | null;
4647
+ entity: string;
4648
+ };
4649
+ }[] | undefined;
4650
+ };
4651
+ channelId: string;
4652
+ socialPlatformId: string;
4653
+ };
4654
+ assignee: {
4655
+ id: string;
4656
+ address: string | null;
4657
+ name: string;
4658
+ email: string;
4659
+ createdAt: Date;
4660
+ updatedAt: Date;
4661
+ deletedAt: Date | null;
4662
+ emailVerifiedAt: Date | null;
4663
+ password: string;
4664
+ phone: string | null;
4665
+ notificationCount: number | null;
4666
+ roles: {
4667
+ id: string;
4668
+ description: string | null;
4669
+ createdAt: Date;
4670
+ updatedAt: Date;
4671
+ deletedAt: Date | null;
4672
+ systemName: string;
4673
+ displayName: string;
4674
+ permissions: {
4675
+ id: string;
4676
+ description: string | null;
4677
+ createdAt: Date;
4678
+ updatedAt: Date;
4679
+ deletedAt: Date | null;
4680
+ systemName: string;
4681
+ displayName: string;
4682
+ }[];
4683
+ }[];
4684
+ extension?: {
4685
+ id: string;
4686
+ createdAt: Date;
4687
+ updatedAt: Date;
4688
+ deletedAt: Date | null;
4689
+ userId: string | null;
4690
+ sipServerUrl: string;
4691
+ sipUserName: string;
4692
+ extensionId: number;
4693
+ extensionName: string;
4694
+ telephonySignature: string | null;
4695
+ } | undefined;
4696
+ };
4697
+ cxlog: {
4698
+ id: string;
4699
+ channel: string | null;
4700
+ disposition: string | null;
4701
+ direction: string | null;
4702
+ createdAt: Date;
4703
+ updatedAt: Date;
4704
+ deletedAt: Date | null;
4705
+ entityId: string;
4706
+ contactId: string | null;
4707
+ caseId: number;
4708
+ entityName: string;
4709
+ queueId: string | null;
4710
+ agentId: string | null;
4711
+ startedDate: Date | null;
4712
+ handledTime: number | null;
4713
+ firstResponseTime: number | null;
4714
+ wrapUpForm: {
4715
+ id: string;
4716
+ disposition: string | null;
4717
+ createdAt: Date;
4718
+ updatedAt: Date;
4719
+ deletedAt: Date | null;
4720
+ tags: {
4721
+ id: string;
4722
+ name: string;
4723
+ createdAt: Date;
4724
+ updatedAt: Date;
4725
+ deletedAt: Date | null;
4726
+ }[];
4727
+ callFrom: string | null;
4728
+ callTo: string | null;
4729
+ note: string | null;
4730
+ } | null;
4731
+ };
4732
+ channel?: {
4733
+ id?: string | undefined;
4734
+ createdAt?: Date | undefined;
4735
+ updatedAt?: Date | undefined;
4736
+ deletedAt?: Date | null | undefined;
4737
+ name?: string | undefined;
4738
+ type?: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada" | "instagram" | undefined;
4739
+ metadata?: {
4740
+ id: string;
4741
+ name: string;
4742
+ accessToken: string;
4743
+ additionalCredentials?: any;
4744
+ } | undefined;
4745
+ brandName?: string | undefined;
4746
+ platformId?: string | undefined;
4747
+ status?: boolean | undefined;
4748
+ isReloginRequired?: boolean | undefined;
4749
+ connectedUserName?: string | undefined;
4750
+ connectedUserId?: string | undefined;
4751
+ actor?: {
4752
+ id: string;
4753
+ address: string | null;
4754
+ name: string;
4755
+ email: string;
4756
+ createdAt: Date;
4757
+ updatedAt: Date;
4758
+ deletedAt: Date | null;
4759
+ emailVerifiedAt: Date | null;
4760
+ password: string;
4761
+ phone: string | null;
4762
+ notificationCount: number | null;
4763
+ roles: {
4764
+ id: string;
4765
+ description: string | null;
4766
+ createdAt: Date;
4767
+ updatedAt: Date;
4768
+ deletedAt: Date | null;
4769
+ systemName: string;
4770
+ displayName: string;
4771
+ permissions: {
4772
+ id: string;
4773
+ description: string | null;
4774
+ createdAt: Date;
4775
+ updatedAt: Date;
4776
+ deletedAt: Date | null;
4777
+ systemName: string;
4778
+ displayName: string;
4779
+ }[];
4780
+ }[];
4781
+ extension?: {
4782
+ id: string;
4783
+ createdAt: Date;
4784
+ updatedAt: Date;
4785
+ deletedAt: Date | null;
4786
+ userId: string | null;
4787
+ sipServerUrl: string;
4788
+ sipUserName: string;
4789
+ extensionId: number;
4790
+ extensionName: string;
4791
+ telephonySignature: string | null;
4792
+ } | undefined;
4793
+ } | undefined;
4794
+ } | undefined;
4795
+ } | null;
4796
+ telephonyCdr: {
4797
+ type: string;
4798
+ id: string;
4799
+ recording: string | null;
4800
+ status: string;
4801
+ createdAt: Date;
4802
+ updatedAt: Date;
4803
+ deletedAt: Date | null;
4804
+ extensionId: string | null;
4805
+ uniqueCallId: string;
4806
+ timeStart: string;
4807
+ callFrom: string;
4808
+ callTo: string;
4809
+ callDuration: number | null;
4810
+ talkDuration: number | null;
4811
+ srcTrunkName: string | null;
4812
+ dstTrunkName: string | null;
4813
+ pinCode: string | null;
4814
+ didNumber: string | null;
4815
+ agentRingTime: number | null;
4816
+ uploadId: string | null;
4817
+ serialNumber: string | null;
4818
+ telephonyQueueId: string | null;
4819
+ contactId: string | null;
4820
+ } | null;
4821
+ queue: {
4822
+ queueName?: string | null | undefined;
4823
+ } | null;
4824
+ agent: {
4825
+ id: string;
4826
+ address: string | null;
4827
+ name: string;
4828
+ email: string;
4829
+ createdAt: Date;
4830
+ updatedAt: Date;
4831
+ deletedAt: Date | null;
4832
+ emailVerifiedAt: Date | null;
4833
+ password: string;
4834
+ phone: string | null;
4835
+ notificationCount: number | null;
4836
+ roles: {
4837
+ id: string;
4838
+ description: string | null;
4839
+ createdAt: Date;
4840
+ updatedAt: Date;
4841
+ deletedAt: Date | null;
4842
+ systemName: string;
4843
+ displayName: string;
4844
+ permissions: {
4845
+ id: string;
4846
+ description: string | null;
4847
+ createdAt: Date;
4848
+ updatedAt: Date;
4849
+ deletedAt: Date | null;
4850
+ systemName: string;
4851
+ displayName: string;
4852
+ }[];
4853
+ }[];
4854
+ extension?: {
4855
+ id: string;
4856
+ createdAt: Date;
4857
+ updatedAt: Date;
4858
+ deletedAt: Date | null;
4859
+ userId: string | null;
4860
+ sipServerUrl: string;
4861
+ sipUserName: string;
4862
+ extensionId: number;
4863
+ extensionName: string;
4864
+ telephonySignature: string | null;
4865
+ } | undefined;
147
4866
  } | null;
148
4867
  }>;
149
4868
  //# sourceMappingURL=schema.d.ts.map