@kl1/contracts 1.0.19 → 1.0.21

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