@kl1/contracts 1.0.9 → 1.0.11

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 (98) hide show
  1. package/dist/index.js +1331 -1064
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +1325 -1060
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/auth/index.d.ts +92 -0
  6. package/dist/src/auth/index.d.ts.map +1 -1
  7. package/dist/src/aws/index.d.ts +4 -4
  8. package/dist/src/aws/validation.d.ts +2 -2
  9. package/dist/src/call-log/schema.d.ts +2 -2
  10. package/dist/src/category/index.d.ts +3 -3
  11. package/dist/src/channel/index.d.ts +1357 -0
  12. package/dist/src/channel/index.d.ts.map +1 -0
  13. package/dist/src/channel/schema.d.ts +385 -0
  14. package/dist/src/channel/schema.d.ts.map +1 -0
  15. package/dist/src/channel/validation.d.ts +337 -0
  16. package/dist/src/channel/validation.d.ts.map +1 -0
  17. package/dist/src/chat/index.d.ts +18857 -8629
  18. package/dist/src/chat/index.d.ts.map +1 -1
  19. package/dist/src/chat/schema.d.ts +2170 -641
  20. package/dist/src/chat/schema.d.ts.map +1 -1
  21. package/dist/src/chat/validation.d.ts +3078 -278
  22. package/dist/src/chat/validation.d.ts.map +1 -1
  23. package/dist/src/company/schema.d.ts +197 -12
  24. package/dist/src/company/schema.d.ts.map +1 -1
  25. package/dist/src/contact/index.d.ts +2539 -0
  26. package/dist/src/contact/index.d.ts.map +1 -0
  27. package/dist/src/contact/schema.d.ts +978 -6
  28. package/dist/src/contact/schema.d.ts.map +1 -1
  29. package/dist/src/contact/validation.d.ts +981 -0
  30. package/dist/src/contact/validation.d.ts.map +1 -0
  31. package/dist/src/contract.d.ts +37764 -21769
  32. package/dist/src/contract.d.ts.map +1 -1
  33. package/dist/src/custom-field-upload/schema.d.ts +2 -2
  34. package/dist/src/cx-log/index.d.ts +4 -4
  35. package/dist/src/cx-log/schema.d.ts +2 -2
  36. package/dist/src/extension/index.d.ts +226 -60
  37. package/dist/src/extension/index.d.ts.map +1 -1
  38. package/dist/src/extension/schema.d.ts +6 -6
  39. package/dist/src/extension/validation.d.ts +6 -12
  40. package/dist/src/extension/validation.d.ts.map +1 -1
  41. package/dist/src/index.d.ts +1 -0
  42. package/dist/src/index.d.ts.map +1 -1
  43. package/dist/src/line/index.d.ts +2 -2
  44. package/dist/src/line/validation.d.ts +2 -2
  45. package/dist/src/mail/account-contract.d.ts +2 -2
  46. package/dist/src/mail/mail-contract.d.ts +2871 -3707
  47. package/dist/src/mail/mail-contract.d.ts.map +1 -1
  48. package/dist/src/mail/message-contract.d.ts +18 -18
  49. package/dist/src/mail/room-contract.d.ts +2860 -3696
  50. package/dist/src/mail/room-contract.d.ts.map +1 -1
  51. package/dist/src/mail/schemas/account-validation.schema.d.ts +2 -2
  52. package/dist/src/mail/schemas/message-validation.schema.d.ts +12 -12
  53. package/dist/src/mail/schemas/message.schema.d.ts +4 -4
  54. package/dist/src/mail/schemas/room-validation.schema.d.ts +70 -70
  55. package/dist/src/mail/schemas/room.schema.d.ts +50 -50
  56. package/dist/src/messenger/index.d.ts +2977 -0
  57. package/dist/src/messenger/index.d.ts.map +1 -0
  58. package/dist/src/messenger/schema.d.ts +2 -0
  59. package/dist/src/messenger/schema.d.ts.map +1 -0
  60. package/dist/src/messenger/validation.d.ts +2 -0
  61. package/dist/src/messenger/validation.d.ts.map +1 -0
  62. package/dist/src/permission/index.d.ts +2 -0
  63. package/dist/src/permission/index.d.ts.map +1 -1
  64. package/dist/src/role/index.d.ts +3 -3
  65. package/dist/src/telephony-agent-presence-status/index.d.ts +1376 -0
  66. package/dist/src/telephony-agent-presence-status/index.d.ts.map +1 -0
  67. package/dist/src/telephony-agent-presence-status/schema.d.ts +366 -0
  68. package/dist/src/telephony-agent-presence-status/schema.d.ts.map +1 -0
  69. package/dist/src/telephony-agent-presence-status/validation.d.ts +18 -0
  70. package/dist/src/telephony-agent-presence-status/validation.d.ts.map +1 -0
  71. package/dist/src/telephony-cdr/schema.d.ts +2 -2
  72. package/dist/src/telephony-extension/index.d.ts +5 -5
  73. package/dist/src/telephony-extension/schema.d.ts +5 -5
  74. package/dist/src/tenant/schema.d.ts +36 -0
  75. package/dist/src/tenant/schema.d.ts.map +1 -0
  76. package/dist/src/upload/schema.d.ts +4 -4
  77. package/dist/src/user/index.d.ts +318 -14
  78. package/dist/src/user/index.d.ts.map +1 -1
  79. package/dist/src/user/schema.d.ts +64 -0
  80. package/dist/src/user/schema.d.ts.map +1 -1
  81. package/dist/src/user/validation.d.ts +11 -11
  82. package/dist/src/user-presence-status-log/index.d.ts +342 -0
  83. package/dist/src/user-presence-status-log/index.d.ts.map +1 -0
  84. package/dist/src/user-presence-status-log/schema.d.ts +382 -0
  85. package/dist/src/user-presence-status-log/schema.d.ts.map +1 -0
  86. package/dist/src/user-presence-status-log/validation.d.ts +15 -0
  87. package/dist/src/user-presence-status-log/validation.d.ts.map +1 -0
  88. package/dist/src/widget/index.d.ts +31 -29
  89. package/dist/src/widget/index.d.ts.map +1 -1
  90. package/dist/src/widget/schema.d.ts +3 -3
  91. package/dist/src/wrap-up-form/index.d.ts +30 -30
  92. package/dist/src/wrap-up-form/validation.d.ts +27 -27
  93. package/dist/utils.d.ts +6 -6
  94. package/package.json +1 -1
  95. package/dist/src/app/index.d.ts +0 -17
  96. package/dist/src/app/index.d.ts.map +0 -1
  97. package/dist/src/mail/mail-server.d.ts +0 -216
  98. package/dist/src/mail/mail-server.d.ts.map +0 -1
@@ -1,244 +1,4 @@
1
1
  import z from 'zod';
2
- export declare const ConnectChannelSchema: z.ZodObject<{
3
- name: z.ZodString;
4
- type: z.ZodUnion<[z.ZodLiteral<"messenger">, z.ZodLiteral<"line">, z.ZodLiteral<"viber">, z.ZodLiteral<"lazada">, z.ZodLiteral<"shopee">, z.ZodLiteral<"whatsapp">, z.ZodLiteral<"telegram">, z.ZodLiteral<"kakao">]>;
5
- metadata: z.ZodObject<{
6
- id: z.ZodString;
7
- name: z.ZodString;
8
- accessToken: z.ZodString;
9
- additionalCredentials: z.ZodAny;
10
- }, "strip", z.ZodTypeAny, {
11
- id: string;
12
- name: string;
13
- accessToken: string;
14
- additionalCredentials?: any;
15
- }, {
16
- id: string;
17
- name: string;
18
- accessToken: string;
19
- additionalCredentials?: any;
20
- }>;
21
- brandName: z.ZodString;
22
- connectedUserName: z.ZodString;
23
- connectedUserId: z.ZodString;
24
- actor: z.ZodObject<{
25
- id: z.ZodString;
26
- createdAt: z.ZodDate;
27
- updatedAt: z.ZodDate;
28
- deletedAt: z.ZodNullable<z.ZodDate>;
29
- name: z.ZodString;
30
- email: z.ZodString;
31
- address: z.ZodNullable<z.ZodString>;
32
- phone: z.ZodNullable<z.ZodString>;
33
- notificationCount: z.ZodNullable<z.ZodNumber>;
34
- roles: z.ZodArray<z.ZodObject<{
35
- id: z.ZodString;
36
- createdAt: z.ZodDate;
37
- updatedAt: z.ZodDate;
38
- deletedAt: z.ZodNullable<z.ZodDate>;
39
- systemName: z.ZodString;
40
- displayName: z.ZodString;
41
- description: z.ZodNullable<z.ZodString>;
42
- permissions: z.ZodArray<z.ZodObject<{
43
- id: z.ZodString;
44
- createdAt: z.ZodDate;
45
- updatedAt: z.ZodDate;
46
- deletedAt: z.ZodNullable<z.ZodDate>;
47
- systemName: z.ZodString;
48
- displayName: z.ZodString;
49
- description: z.ZodNullable<z.ZodString>;
50
- }, "strip", z.ZodTypeAny, {
51
- id: string;
52
- description: string | null;
53
- createdAt: Date;
54
- updatedAt: Date;
55
- deletedAt: Date | null;
56
- systemName: string;
57
- displayName: string;
58
- }, {
59
- id: string;
60
- description: string | null;
61
- createdAt: Date;
62
- updatedAt: Date;
63
- deletedAt: Date | null;
64
- systemName: string;
65
- displayName: string;
66
- }>, "many">;
67
- }, "strip", z.ZodTypeAny, {
68
- id: string;
69
- description: string | null;
70
- createdAt: Date;
71
- updatedAt: Date;
72
- deletedAt: Date | null;
73
- systemName: string;
74
- displayName: string;
75
- permissions: {
76
- id: string;
77
- description: string | null;
78
- createdAt: Date;
79
- updatedAt: Date;
80
- deletedAt: Date | null;
81
- systemName: string;
82
- displayName: string;
83
- }[];
84
- }, {
85
- id: string;
86
- description: string | null;
87
- createdAt: Date;
88
- updatedAt: Date;
89
- deletedAt: Date | null;
90
- systemName: string;
91
- displayName: string;
92
- permissions: {
93
- id: string;
94
- description: string | null;
95
- createdAt: Date;
96
- updatedAt: Date;
97
- deletedAt: Date | null;
98
- systemName: string;
99
- displayName: string;
100
- }[];
101
- }>, "many">;
102
- }, "strip", z.ZodTypeAny, {
103
- id: string;
104
- address: string | null;
105
- name: string;
106
- email: string;
107
- createdAt: Date;
108
- updatedAt: Date;
109
- deletedAt: Date | null;
110
- phone: string | null;
111
- notificationCount: number | null;
112
- roles: {
113
- id: string;
114
- description: string | null;
115
- createdAt: Date;
116
- updatedAt: Date;
117
- deletedAt: Date | null;
118
- systemName: string;
119
- displayName: string;
120
- permissions: {
121
- id: string;
122
- description: string | null;
123
- createdAt: Date;
124
- updatedAt: Date;
125
- deletedAt: Date | null;
126
- systemName: string;
127
- displayName: string;
128
- }[];
129
- }[];
130
- }, {
131
- id: string;
132
- address: string | null;
133
- name: string;
134
- email: string;
135
- createdAt: Date;
136
- updatedAt: Date;
137
- deletedAt: Date | null;
138
- phone: string | null;
139
- notificationCount: number | null;
140
- roles: {
141
- id: string;
142
- description: string | null;
143
- createdAt: Date;
144
- updatedAt: Date;
145
- deletedAt: Date | null;
146
- systemName: string;
147
- displayName: string;
148
- permissions: {
149
- id: string;
150
- description: string | null;
151
- createdAt: Date;
152
- updatedAt: Date;
153
- deletedAt: Date | null;
154
- systemName: string;
155
- displayName: string;
156
- }[];
157
- }[];
158
- }>;
159
- }, "strip", z.ZodTypeAny, {
160
- type: "line" | "messenger" | "viber" | "lazada" | "shopee" | "whatsapp" | "telegram" | "kakao";
161
- name: string;
162
- metadata: {
163
- id: string;
164
- name: string;
165
- accessToken: string;
166
- additionalCredentials?: any;
167
- };
168
- brandName: string;
169
- connectedUserName: string;
170
- connectedUserId: string;
171
- actor: {
172
- id: string;
173
- address: string | null;
174
- name: string;
175
- email: string;
176
- createdAt: Date;
177
- updatedAt: Date;
178
- deletedAt: Date | null;
179
- phone: string | null;
180
- notificationCount: number | null;
181
- roles: {
182
- id: string;
183
- description: string | null;
184
- createdAt: Date;
185
- updatedAt: Date;
186
- deletedAt: Date | null;
187
- systemName: string;
188
- displayName: string;
189
- permissions: {
190
- id: string;
191
- description: string | null;
192
- createdAt: Date;
193
- updatedAt: Date;
194
- deletedAt: Date | null;
195
- systemName: string;
196
- displayName: string;
197
- }[];
198
- }[];
199
- };
200
- }, {
201
- type: "line" | "messenger" | "viber" | "lazada" | "shopee" | "whatsapp" | "telegram" | "kakao";
202
- name: string;
203
- metadata: {
204
- id: string;
205
- name: string;
206
- accessToken: string;
207
- additionalCredentials?: any;
208
- };
209
- brandName: string;
210
- connectedUserName: string;
211
- connectedUserId: string;
212
- actor: {
213
- id: string;
214
- address: string | null;
215
- name: string;
216
- email: string;
217
- createdAt: Date;
218
- updatedAt: Date;
219
- deletedAt: Date | null;
220
- phone: string | null;
221
- notificationCount: number | null;
222
- roles: {
223
- id: string;
224
- description: string | null;
225
- createdAt: Date;
226
- updatedAt: Date;
227
- deletedAt: Date | null;
228
- systemName: string;
229
- displayName: string;
230
- permissions: {
231
- id: string;
232
- description: string | null;
233
- createdAt: Date;
234
- updatedAt: Date;
235
- deletedAt: Date | null;
236
- systemName: string;
237
- displayName: string;
238
- }[];
239
- }[];
240
- };
241
- }>;
242
2
  export declare const GetRoomsSchema: z.ZodObject<{
243
3
  page: z.ZodDefault<z.ZodNumber>;
244
4
  pageSize: z.ZodDefault<z.ZodNumber>;
@@ -382,58 +142,57 @@ export declare const MessageAttachmentSchema: z.ZodObject<{
382
142
  bucketName: z.ZodString;
383
143
  fileKey: z.ZodString;
384
144
  fileName: z.ZodString;
385
- fileSize: z.ZodString;
145
+ fileSize: z.ZodNumber;
386
146
  url: z.ZodString;
387
- fileType: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"video">, z.ZodLiteral<"audio">, z.ZodLiteral<"file">, z.ZodLiteral<"fallback">, z.ZodLiteral<"location">, z.ZodLiteral<"attachment">, z.ZodLiteral<"assign">, z.ZodLiteral<"solve">, z.ZodLiteral<"reopen">, z.ZodLiteral<"open">, z.ZodLiteral<"sticker">, z.ZodLiteral<"closed">, z.ZodLiteral<"handed_over">, z.ZodLiteral<"updated">, z.ZodLiteral<"started">]>;
147
+ fileType: z.ZodEnum<["text", "image", "video", "audio", "file", "fallback", "location", "attachment", "assign", "solve", "reopen", "open", "sticker", "closed", "handed_over", "updated", "started"]>;
388
148
  thumbnailUrl: z.ZodOptional<z.ZodString>;
389
149
  }, "strip", z.ZodTypeAny, {
390
150
  url: string;
391
- bucketName: string;
392
151
  fileName: string;
393
- fileSize: string;
394
- fileKey: string;
395
152
  fileType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
153
+ fileKey: string;
154
+ bucketName: string;
155
+ fileSize: number;
396
156
  thumbnailUrl?: string | undefined;
397
157
  }, {
398
158
  url: string;
399
- bucketName: string;
400
159
  fileName: string;
401
- fileSize: string;
402
- fileKey: string;
403
160
  fileType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
161
+ fileKey: string;
162
+ bucketName: string;
163
+ fileSize: number;
404
164
  thumbnailUrl?: string | undefined;
405
165
  }>;
406
166
  export declare const SendMessageSchema: z.ZodObject<{
407
- platform: z.ZodUnion<[z.ZodLiteral<"messenger">, z.ZodLiteral<"line">, z.ZodLiteral<"viber">, z.ZodLiteral<"lazada">, z.ZodLiteral<"shopee">, z.ZodLiteral<"whatsapp">, z.ZodLiteral<"telegram">, z.ZodLiteral<"kakao">]>;
408
- room: z.ZodString;
409
- messageType: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"video">, z.ZodLiteral<"audio">, z.ZodLiteral<"file">, z.ZodLiteral<"fallback">, z.ZodLiteral<"location">, z.ZodLiteral<"attachment">, z.ZodLiteral<"assign">, z.ZodLiteral<"solve">, z.ZodLiteral<"reopen">, z.ZodLiteral<"open">, z.ZodLiteral<"sticker">, z.ZodLiteral<"closed">, z.ZodLiteral<"handed_over">, z.ZodLiteral<"updated">, z.ZodLiteral<"started">]>;
167
+ roomId: z.ZodString;
168
+ messageType: z.ZodEnum<["text", "image", "video", "audio", "file", "fallback", "location", "attachment", "assign", "solve", "reopen", "open", "sticker", "closed", "handed_over", "updated", "started"]>;
410
169
  message: z.ZodOptional<z.ZodString>;
411
- direction: z.ZodUnion<[z.ZodLiteral<"incoming">, z.ZodLiteral<"outgoing">, z.ZodLiteral<"system">]>;
412
- messageAttachments: z.ZodObject<{
170
+ direction: z.ZodEnum<["incoming", "outgoing", "system"]>;
171
+ messageAttachments: z.ZodOptional<z.ZodObject<{
413
172
  bucketName: z.ZodString;
414
173
  fileKey: z.ZodString;
415
174
  fileName: z.ZodString;
416
- fileSize: z.ZodString;
175
+ fileSize: z.ZodNumber;
417
176
  url: z.ZodString;
418
- fileType: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"video">, z.ZodLiteral<"audio">, z.ZodLiteral<"file">, z.ZodLiteral<"fallback">, z.ZodLiteral<"location">, z.ZodLiteral<"attachment">, z.ZodLiteral<"assign">, z.ZodLiteral<"solve">, z.ZodLiteral<"reopen">, z.ZodLiteral<"open">, z.ZodLiteral<"sticker">, z.ZodLiteral<"closed">, z.ZodLiteral<"handed_over">, z.ZodLiteral<"updated">, z.ZodLiteral<"started">]>;
177
+ fileType: z.ZodEnum<["text", "image", "video", "audio", "file", "fallback", "location", "attachment", "assign", "solve", "reopen", "open", "sticker", "closed", "handed_over", "updated", "started"]>;
419
178
  thumbnailUrl: z.ZodOptional<z.ZodString>;
420
179
  }, "strip", z.ZodTypeAny, {
421
180
  url: string;
422
- bucketName: string;
423
181
  fileName: string;
424
- fileSize: string;
425
- fileKey: string;
426
182
  fileType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
183
+ fileKey: string;
184
+ bucketName: string;
185
+ fileSize: number;
427
186
  thumbnailUrl?: string | undefined;
428
187
  }, {
429
188
  url: string;
430
- bucketName: string;
431
189
  fileName: string;
432
- fileSize: string;
433
- fileKey: string;
434
190
  fileType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
191
+ fileKey: string;
192
+ bucketName: string;
193
+ fileSize: number;
435
194
  thumbnailUrl?: string | undefined;
436
- }>;
195
+ }>>;
437
196
  user: z.ZodOptional<z.ZodObject<{
438
197
  id: z.ZodString;
439
198
  createdAt: z.ZodDate;
@@ -441,6 +200,8 @@ export declare const SendMessageSchema: z.ZodObject<{
441
200
  deletedAt: z.ZodNullable<z.ZodDate>;
442
201
  name: z.ZodString;
443
202
  email: z.ZodString;
203
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
204
+ password: z.ZodString;
444
205
  address: z.ZodNullable<z.ZodString>;
445
206
  phone: z.ZodNullable<z.ZodString>;
446
207
  notificationCount: z.ZodNullable<z.ZodNumber>;
@@ -512,6 +273,40 @@ export declare const SendMessageSchema: z.ZodObject<{
512
273
  displayName: string;
513
274
  }[];
514
275
  }>, "many">;
276
+ extension: z.ZodOptional<z.ZodObject<{
277
+ id: z.ZodString;
278
+ createdAt: z.ZodDate;
279
+ updatedAt: z.ZodDate;
280
+ deletedAt: z.ZodNullable<z.ZodDate>;
281
+ userId: z.ZodNullable<z.ZodString>;
282
+ sipServerUrl: z.ZodString;
283
+ sipUserName: z.ZodString;
284
+ extensionId: z.ZodNumber;
285
+ extensionName: z.ZodString;
286
+ telephonySignature: z.ZodNullable<z.ZodString>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ id: string;
289
+ createdAt: Date;
290
+ updatedAt: Date;
291
+ deletedAt: Date | null;
292
+ userId: string | null;
293
+ sipServerUrl: string;
294
+ sipUserName: string;
295
+ extensionId: number;
296
+ extensionName: string;
297
+ telephonySignature: string | null;
298
+ }, {
299
+ id: string;
300
+ createdAt: Date;
301
+ updatedAt: Date;
302
+ deletedAt: Date | null;
303
+ userId: string | null;
304
+ sipServerUrl: string;
305
+ sipUserName: string;
306
+ extensionId: number;
307
+ extensionName: string;
308
+ telephonySignature: string | null;
309
+ }>>;
515
310
  }, "strip", z.ZodTypeAny, {
516
311
  id: string;
517
312
  address: string | null;
@@ -520,6 +315,8 @@ export declare const SendMessageSchema: z.ZodObject<{
520
315
  createdAt: Date;
521
316
  updatedAt: Date;
522
317
  deletedAt: Date | null;
318
+ emailVerifiedAt: Date | null;
319
+ password: string;
523
320
  phone: string | null;
524
321
  notificationCount: number | null;
525
322
  roles: {
@@ -540,6 +337,18 @@ export declare const SendMessageSchema: z.ZodObject<{
540
337
  displayName: string;
541
338
  }[];
542
339
  }[];
340
+ extension?: {
341
+ id: string;
342
+ createdAt: Date;
343
+ updatedAt: Date;
344
+ deletedAt: Date | null;
345
+ userId: string | null;
346
+ sipServerUrl: string;
347
+ sipUserName: string;
348
+ extensionId: number;
349
+ extensionName: string;
350
+ telephonySignature: string | null;
351
+ } | undefined;
543
352
  }, {
544
353
  id: string;
545
354
  address: string | null;
@@ -548,6 +357,8 @@ export declare const SendMessageSchema: z.ZodObject<{
548
357
  createdAt: Date;
549
358
  updatedAt: Date;
550
359
  deletedAt: Date | null;
360
+ emailVerifiedAt: Date | null;
361
+ password: string;
551
362
  phone: string | null;
552
363
  notificationCount: number | null;
553
364
  roles: {
@@ -568,24 +379,35 @@ export declare const SendMessageSchema: z.ZodObject<{
568
379
  displayName: string;
569
380
  }[];
570
381
  }[];
382
+ extension?: {
383
+ id: string;
384
+ createdAt: Date;
385
+ updatedAt: Date;
386
+ deletedAt: Date | null;
387
+ userId: string | null;
388
+ sipServerUrl: string;
389
+ sipUserName: string;
390
+ extensionId: number;
391
+ extensionName: string;
392
+ telephonySignature: string | null;
393
+ } | undefined;
571
394
  }>>;
572
395
  packageId: z.ZodOptional<z.ZodNumber>;
573
396
  stickerId: z.ZodOptional<z.ZodNumber>;
574
397
  }, "strip", z.ZodTypeAny, {
575
- platform: "line" | "messenger" | "viber" | "lazada" | "shopee" | "whatsapp" | "telegram" | "kakao";
576
398
  messageType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
577
399
  direction: "incoming" | "outgoing" | "system";
578
- room: string;
579
- messageAttachments: {
400
+ roomId: string;
401
+ message?: string | undefined;
402
+ messageAttachments?: {
580
403
  url: string;
581
- bucketName: string;
582
404
  fileName: string;
583
- fileSize: string;
584
- fileKey: string;
585
405
  fileType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
406
+ fileKey: string;
407
+ bucketName: string;
408
+ fileSize: number;
586
409
  thumbnailUrl?: string | undefined;
587
- };
588
- message?: string | undefined;
410
+ } | undefined;
589
411
  user?: {
590
412
  id: string;
591
413
  address: string | null;
@@ -594,6 +416,8 @@ export declare const SendMessageSchema: z.ZodObject<{
594
416
  createdAt: Date;
595
417
  updatedAt: Date;
596
418
  deletedAt: Date | null;
419
+ emailVerifiedAt: Date | null;
420
+ password: string;
597
421
  phone: string | null;
598
422
  notificationCount: number | null;
599
423
  roles: {
@@ -614,24 +438,35 @@ export declare const SendMessageSchema: z.ZodObject<{
614
438
  displayName: string;
615
439
  }[];
616
440
  }[];
441
+ extension?: {
442
+ id: string;
443
+ createdAt: Date;
444
+ updatedAt: Date;
445
+ deletedAt: Date | null;
446
+ userId: string | null;
447
+ sipServerUrl: string;
448
+ sipUserName: string;
449
+ extensionId: number;
450
+ extensionName: string;
451
+ telephonySignature: string | null;
452
+ } | undefined;
617
453
  } | undefined;
618
454
  packageId?: number | undefined;
619
455
  stickerId?: number | undefined;
620
456
  }, {
621
- platform: "line" | "messenger" | "viber" | "lazada" | "shopee" | "whatsapp" | "telegram" | "kakao";
622
457
  messageType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
623
458
  direction: "incoming" | "outgoing" | "system";
624
- room: string;
625
- messageAttachments: {
459
+ roomId: string;
460
+ message?: string | undefined;
461
+ messageAttachments?: {
626
462
  url: string;
627
- bucketName: string;
628
463
  fileName: string;
629
- fileSize: string;
630
- fileKey: string;
631
464
  fileType: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
465
+ fileKey: string;
466
+ bucketName: string;
467
+ fileSize: number;
632
468
  thumbnailUrl?: string | undefined;
633
- };
634
- message?: string | undefined;
469
+ } | undefined;
635
470
  user?: {
636
471
  id: string;
637
472
  address: string | null;
@@ -640,6 +475,8 @@ export declare const SendMessageSchema: z.ZodObject<{
640
475
  createdAt: Date;
641
476
  updatedAt: Date;
642
477
  deletedAt: Date | null;
478
+ emailVerifiedAt: Date | null;
479
+ password: string;
643
480
  phone: string | null;
644
481
  notificationCount: number | null;
645
482
  roles: {
@@ -660,6 +497,18 @@ export declare const SendMessageSchema: z.ZodObject<{
660
497
  displayName: string;
661
498
  }[];
662
499
  }[];
500
+ extension?: {
501
+ id: string;
502
+ createdAt: Date;
503
+ updatedAt: Date;
504
+ deletedAt: Date | null;
505
+ userId: string | null;
506
+ sipServerUrl: string;
507
+ sipUserName: string;
508
+ extensionId: number;
509
+ extensionName: string;
510
+ telephonySignature: string | null;
511
+ } | undefined;
663
512
  } | undefined;
664
513
  packageId?: number | undefined;
665
514
  stickerId?: number | undefined;
@@ -694,4 +543,2955 @@ export declare const SearchRoomsSchema: z.ZodObject<{
694
543
  page?: number | undefined;
695
544
  pageSize?: number | undefined;
696
545
  }>;
546
+ export declare const SendMessageToPlatformSchema: z.ZodObject<{
547
+ room: z.ZodObject<{
548
+ id: z.ZodString;
549
+ createdAt: z.ZodDate;
550
+ updatedAt: z.ZodDate;
551
+ deletedAt: z.ZodNullable<z.ZodDate>;
552
+ lastMessage: z.ZodString;
553
+ handleTime: z.ZodNumber;
554
+ isSolved: z.ZodBoolean;
555
+ notes: z.ZodString;
556
+ closeAt: z.ZodDate;
557
+ unreadCount: z.ZodNumber;
558
+ firstResponseTime: z.ZodDate;
559
+ isLatest: z.ZodBoolean;
560
+ direction: z.ZodEnum<["incoming", "outgoing", "system"]>;
561
+ platformContact: z.ZodObject<{
562
+ id: z.ZodString;
563
+ createdAt: z.ZodDate;
564
+ updatedAt: z.ZodDate;
565
+ deletedAt: z.ZodNullable<z.ZodDate>;
566
+ channelId: z.ZodString;
567
+ socialPlatformId: z.ZodString;
568
+ platform: z.ZodEnum<["whatsapp", "messenger", "telegram", "line", "viber", "kakao", "shopee", "lazada"]>;
569
+ metadata: z.ZodObject<{
570
+ id: z.ZodString;
571
+ name: z.ZodString;
572
+ additionalCredentials: z.ZodAny;
573
+ }, "strip", z.ZodTypeAny, {
574
+ id: string;
575
+ name: string;
576
+ additionalCredentials?: any;
577
+ }, {
578
+ id: string;
579
+ name: string;
580
+ additionalCredentials?: any;
581
+ }>;
582
+ contact: z.ZodObject<{
583
+ id: z.ZodString;
584
+ createdAt: z.ZodDate;
585
+ updatedAt: z.ZodDate;
586
+ deletedAt: z.ZodNullable<z.ZodDate>;
587
+ name: z.ZodString;
588
+ address: z.ZodNullable<z.ZodString>;
589
+ channel: z.ZodNullable<z.ZodString>;
590
+ notes: z.ZodNullable<z.ZodString>;
591
+ contactProfile: z.ZodNullable<z.ZodString>;
592
+ socialProfileUrl: z.ZodNullable<z.ZodString>;
593
+ tags: z.ZodArray<z.ZodObject<{
594
+ id: z.ZodString;
595
+ createdAt: z.ZodDate;
596
+ updatedAt: z.ZodDate;
597
+ deletedAt: z.ZodNullable<z.ZodDate>;
598
+ name: z.ZodString;
599
+ }, "strip", z.ZodTypeAny, {
600
+ id: string;
601
+ name: string;
602
+ createdAt: Date;
603
+ updatedAt: Date;
604
+ deletedAt: Date | null;
605
+ }, {
606
+ id: string;
607
+ name: string;
608
+ createdAt: Date;
609
+ updatedAt: Date;
610
+ deletedAt: Date | null;
611
+ }>, "many">;
612
+ company: z.ZodNullable<z.ZodObject<Omit<{
613
+ id: z.ZodString;
614
+ createdAt: z.ZodDate;
615
+ updatedAt: z.ZodDate;
616
+ deletedAt: z.ZodNullable<z.ZodDate>;
617
+ name: z.ZodOptional<z.ZodString>;
618
+ phone: z.ZodOptional<z.ZodString>;
619
+ address: z.ZodOptional<z.ZodString>;
620
+ industry: z.ZodOptional<z.ZodString>;
621
+ customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
622
+ id: z.ZodString;
623
+ createdAt: z.ZodDate;
624
+ updatedAt: z.ZodDate;
625
+ deletedAt: z.ZodNullable<z.ZodDate>;
626
+ textValue: z.ZodNullable<z.ZodString>;
627
+ booleanValue: z.ZodNullable<z.ZodBoolean>;
628
+ numberValue: z.ZodNullable<z.ZodNumber>;
629
+ dateValue: z.ZodNullable<z.ZodString>;
630
+ attribute: z.ZodObject<Omit<{
631
+ id: z.ZodString;
632
+ createdAt: z.ZodDate;
633
+ updatedAt: z.ZodDate;
634
+ deletedAt: z.ZodNullable<z.ZodDate>;
635
+ systemName: z.ZodString;
636
+ displayName: z.ZodString;
637
+ type: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"textarea">, z.ZodLiteral<"date">, z.ZodLiteral<"select">, z.ZodLiteral<"link">, z.ZodLiteral<"attachment">]>;
638
+ position: z.ZodNumber;
639
+ isDefault: z.ZodBoolean;
640
+ isArchived: z.ZodBoolean;
641
+ isRequired: z.ZodBoolean;
642
+ isUnique: z.ZodBoolean;
643
+ options: z.ZodArray<z.ZodObject<{
644
+ position: z.ZodNumber;
645
+ value: z.ZodString;
646
+ label: z.ZodString;
647
+ isDefault: z.ZodBoolean;
648
+ id: z.ZodString;
649
+ }, "strip", z.ZodTypeAny, {
650
+ id: string;
651
+ position: number;
652
+ value: string;
653
+ label: string;
654
+ isDefault: boolean;
655
+ }, {
656
+ id: string;
657
+ position: number;
658
+ value: string;
659
+ label: string;
660
+ isDefault: boolean;
661
+ }>, "many">;
662
+ group: z.ZodObject<{
663
+ id: z.ZodString;
664
+ createdAt: z.ZodDate;
665
+ updatedAt: z.ZodDate;
666
+ deletedAt: z.ZodNullable<z.ZodDate>;
667
+ systemName: z.ZodString;
668
+ displayName: z.ZodString;
669
+ }, "strip", z.ZodTypeAny, {
670
+ id: string;
671
+ createdAt: Date;
672
+ updatedAt: Date;
673
+ deletedAt: Date | null;
674
+ systemName: string;
675
+ displayName: string;
676
+ }, {
677
+ id: string;
678
+ createdAt: Date;
679
+ updatedAt: Date;
680
+ deletedAt: Date | null;
681
+ systemName: string;
682
+ displayName: string;
683
+ }>;
684
+ }, "options" | "group">, "strip", z.ZodTypeAny, {
685
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
686
+ id: string;
687
+ position: number;
688
+ createdAt: Date;
689
+ updatedAt: Date;
690
+ deletedAt: Date | null;
691
+ isDefault: boolean;
692
+ systemName: string;
693
+ displayName: string;
694
+ isArchived: boolean;
695
+ isRequired: boolean;
696
+ isUnique: boolean;
697
+ }, {
698
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
699
+ id: string;
700
+ position: number;
701
+ createdAt: Date;
702
+ updatedAt: Date;
703
+ deletedAt: Date | null;
704
+ isDefault: boolean;
705
+ systemName: string;
706
+ displayName: string;
707
+ isArchived: boolean;
708
+ isRequired: boolean;
709
+ isUnique: boolean;
710
+ }>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ id: string;
713
+ createdAt: Date;
714
+ updatedAt: Date;
715
+ deletedAt: Date | null;
716
+ attribute: {
717
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
718
+ id: string;
719
+ position: number;
720
+ createdAt: Date;
721
+ updatedAt: Date;
722
+ deletedAt: Date | null;
723
+ isDefault: boolean;
724
+ systemName: string;
725
+ displayName: string;
726
+ isArchived: boolean;
727
+ isRequired: boolean;
728
+ isUnique: boolean;
729
+ };
730
+ textValue: string | null;
731
+ booleanValue: boolean | null;
732
+ numberValue: number | null;
733
+ dateValue: string | null;
734
+ }, {
735
+ id: string;
736
+ createdAt: Date;
737
+ updatedAt: Date;
738
+ deletedAt: Date | null;
739
+ attribute: {
740
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
741
+ id: string;
742
+ position: number;
743
+ createdAt: Date;
744
+ updatedAt: Date;
745
+ deletedAt: Date | null;
746
+ isDefault: boolean;
747
+ systemName: string;
748
+ displayName: string;
749
+ isArchived: boolean;
750
+ isRequired: boolean;
751
+ isUnique: boolean;
752
+ };
753
+ textValue: string | null;
754
+ booleanValue: boolean | null;
755
+ numberValue: number | null;
756
+ dateValue: string | null;
757
+ }>, "many">>;
758
+ }, "customFields">, "strip", z.ZodTypeAny, {
759
+ id: string;
760
+ createdAt: Date;
761
+ updatedAt: Date;
762
+ deletedAt: Date | null;
763
+ address?: string | undefined;
764
+ name?: string | undefined;
765
+ phone?: string | undefined;
766
+ industry?: string | undefined;
767
+ }, {
768
+ id: string;
769
+ createdAt: Date;
770
+ updatedAt: Date;
771
+ deletedAt: Date | null;
772
+ address?: string | undefined;
773
+ name?: string | undefined;
774
+ phone?: string | undefined;
775
+ industry?: string | undefined;
776
+ }>>;
777
+ customFields: z.ZodArray<z.ZodObject<{
778
+ id: z.ZodString;
779
+ createdAt: z.ZodDate;
780
+ updatedAt: z.ZodDate;
781
+ deletedAt: z.ZodNullable<z.ZodDate>;
782
+ textValue: z.ZodNullable<z.ZodString>;
783
+ booleanValue: z.ZodNullable<z.ZodBoolean>;
784
+ numberValue: z.ZodNullable<z.ZodNumber>;
785
+ dateValue: z.ZodNullable<z.ZodDate>;
786
+ attribute: z.ZodObject<Omit<{
787
+ id: z.ZodString;
788
+ createdAt: z.ZodDate;
789
+ updatedAt: z.ZodDate;
790
+ deletedAt: z.ZodNullable<z.ZodDate>;
791
+ systemName: z.ZodString;
792
+ displayName: z.ZodString;
793
+ type: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"textarea">, z.ZodLiteral<"date">, z.ZodLiteral<"select">, z.ZodLiteral<"link">, z.ZodLiteral<"attachment">]>;
794
+ position: z.ZodNumber;
795
+ isDefault: z.ZodBoolean;
796
+ isArchived: z.ZodBoolean;
797
+ isRequired: z.ZodBoolean;
798
+ isUnique: z.ZodBoolean;
799
+ options: z.ZodArray<z.ZodObject<{
800
+ position: z.ZodNumber;
801
+ value: z.ZodString;
802
+ label: z.ZodString;
803
+ isDefault: z.ZodBoolean;
804
+ id: z.ZodString;
805
+ }, "strip", z.ZodTypeAny, {
806
+ id: string;
807
+ position: number;
808
+ value: string;
809
+ label: string;
810
+ isDefault: boolean;
811
+ }, {
812
+ id: string;
813
+ position: number;
814
+ value: string;
815
+ label: string;
816
+ isDefault: boolean;
817
+ }>, "many">;
818
+ group: z.ZodObject<{
819
+ id: z.ZodString;
820
+ createdAt: z.ZodDate;
821
+ updatedAt: z.ZodDate;
822
+ deletedAt: z.ZodNullable<z.ZodDate>;
823
+ systemName: z.ZodString;
824
+ displayName: z.ZodString;
825
+ }, "strip", z.ZodTypeAny, {
826
+ id: string;
827
+ createdAt: Date;
828
+ updatedAt: Date;
829
+ deletedAt: Date | null;
830
+ systemName: string;
831
+ displayName: string;
832
+ }, {
833
+ id: string;
834
+ createdAt: Date;
835
+ updatedAt: Date;
836
+ deletedAt: Date | null;
837
+ systemName: string;
838
+ displayName: string;
839
+ }>;
840
+ }, "options" | "group">, "strip", z.ZodTypeAny, {
841
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
842
+ id: string;
843
+ position: number;
844
+ createdAt: Date;
845
+ updatedAt: Date;
846
+ deletedAt: Date | null;
847
+ isDefault: boolean;
848
+ systemName: string;
849
+ displayName: string;
850
+ isArchived: boolean;
851
+ isRequired: boolean;
852
+ isUnique: boolean;
853
+ }, {
854
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
855
+ id: string;
856
+ position: number;
857
+ createdAt: Date;
858
+ updatedAt: Date;
859
+ deletedAt: Date | null;
860
+ isDefault: boolean;
861
+ systemName: string;
862
+ displayName: string;
863
+ isArchived: boolean;
864
+ isRequired: boolean;
865
+ isUnique: boolean;
866
+ }>;
867
+ uploads: z.ZodArray<z.ZodObject<{
868
+ id: z.ZodString;
869
+ createdAt: z.ZodDate;
870
+ updatedAt: z.ZodDate;
871
+ deletedAt: z.ZodNullable<z.ZodDate>;
872
+ customFieldId: z.ZodString;
873
+ upload: z.ZodObject<{
874
+ id: z.ZodString;
875
+ createdAt: z.ZodDate;
876
+ updatedAt: z.ZodDate;
877
+ deletedAt: z.ZodNullable<z.ZodDate>;
878
+ bucketName: z.ZodString;
879
+ fileName: z.ZodString;
880
+ fileSize: z.ZodNumber;
881
+ fileKey: z.ZodString;
882
+ }, "strip", z.ZodTypeAny, {
883
+ id: string;
884
+ createdAt: Date;
885
+ updatedAt: Date;
886
+ deletedAt: Date | null;
887
+ fileName: string;
888
+ fileKey: string;
889
+ bucketName: string;
890
+ fileSize: number;
891
+ }, {
892
+ id: string;
893
+ createdAt: Date;
894
+ updatedAt: Date;
895
+ deletedAt: Date | null;
896
+ fileName: string;
897
+ fileKey: string;
898
+ bucketName: string;
899
+ fileSize: number;
900
+ }>;
901
+ }, "strip", z.ZodTypeAny, {
902
+ id: string;
903
+ createdAt: Date;
904
+ updatedAt: Date;
905
+ deletedAt: Date | null;
906
+ customFieldId: string;
907
+ upload: {
908
+ id: string;
909
+ createdAt: Date;
910
+ updatedAt: Date;
911
+ deletedAt: Date | null;
912
+ fileName: string;
913
+ fileKey: string;
914
+ bucketName: string;
915
+ fileSize: number;
916
+ };
917
+ }, {
918
+ id: string;
919
+ createdAt: Date;
920
+ updatedAt: Date;
921
+ deletedAt: Date | null;
922
+ customFieldId: string;
923
+ upload: {
924
+ id: string;
925
+ createdAt: Date;
926
+ updatedAt: Date;
927
+ deletedAt: Date | null;
928
+ fileName: string;
929
+ fileKey: string;
930
+ bucketName: string;
931
+ fileSize: number;
932
+ };
933
+ }>, "many">;
934
+ }, "strip", z.ZodTypeAny, {
935
+ id: string;
936
+ createdAt: Date;
937
+ updatedAt: Date;
938
+ deletedAt: Date | null;
939
+ attribute: {
940
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
941
+ id: string;
942
+ position: number;
943
+ createdAt: Date;
944
+ updatedAt: Date;
945
+ deletedAt: Date | null;
946
+ isDefault: boolean;
947
+ systemName: string;
948
+ displayName: string;
949
+ isArchived: boolean;
950
+ isRequired: boolean;
951
+ isUnique: boolean;
952
+ };
953
+ textValue: string | null;
954
+ booleanValue: boolean | null;
955
+ numberValue: number | null;
956
+ dateValue: Date | null;
957
+ uploads: {
958
+ id: string;
959
+ createdAt: Date;
960
+ updatedAt: Date;
961
+ deletedAt: Date | null;
962
+ customFieldId: string;
963
+ upload: {
964
+ id: string;
965
+ createdAt: Date;
966
+ updatedAt: Date;
967
+ deletedAt: Date | null;
968
+ fileName: string;
969
+ fileKey: string;
970
+ bucketName: string;
971
+ fileSize: number;
972
+ };
973
+ }[];
974
+ }, {
975
+ id: string;
976
+ createdAt: Date;
977
+ updatedAt: Date;
978
+ deletedAt: Date | null;
979
+ attribute: {
980
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
981
+ id: string;
982
+ position: number;
983
+ createdAt: Date;
984
+ updatedAt: Date;
985
+ deletedAt: Date | null;
986
+ isDefault: boolean;
987
+ systemName: string;
988
+ displayName: string;
989
+ isArchived: boolean;
990
+ isRequired: boolean;
991
+ isUnique: boolean;
992
+ };
993
+ textValue: string | null;
994
+ booleanValue: boolean | null;
995
+ numberValue: number | null;
996
+ dateValue: Date | null;
997
+ uploads: {
998
+ id: string;
999
+ createdAt: Date;
1000
+ updatedAt: Date;
1001
+ deletedAt: Date | null;
1002
+ customFieldId: string;
1003
+ upload: {
1004
+ id: string;
1005
+ createdAt: Date;
1006
+ updatedAt: Date;
1007
+ deletedAt: Date | null;
1008
+ fileName: string;
1009
+ fileKey: string;
1010
+ bucketName: string;
1011
+ fileSize: number;
1012
+ };
1013
+ }[];
1014
+ }>, "many">;
1015
+ contactEmails: z.ZodArray<z.ZodObject<{
1016
+ id: z.ZodString;
1017
+ createdAt: z.ZodDate;
1018
+ updatedAt: z.ZodDate;
1019
+ deletedAt: z.ZodNullable<z.ZodDate>;
1020
+ email: z.ZodString;
1021
+ isPrimary: z.ZodBoolean;
1022
+ }, "strip", z.ZodTypeAny, {
1023
+ id: string;
1024
+ isPrimary: boolean;
1025
+ email: string;
1026
+ createdAt: Date;
1027
+ updatedAt: Date;
1028
+ deletedAt: Date | null;
1029
+ }, {
1030
+ id: string;
1031
+ isPrimary: boolean;
1032
+ email: string;
1033
+ createdAt: Date;
1034
+ updatedAt: Date;
1035
+ deletedAt: Date | null;
1036
+ }>, "many">;
1037
+ contactPhones: z.ZodArray<z.ZodObject<{
1038
+ id: z.ZodString;
1039
+ createdAt: z.ZodDate;
1040
+ updatedAt: z.ZodDate;
1041
+ deletedAt: z.ZodNullable<z.ZodDate>;
1042
+ phone: z.ZodString;
1043
+ isPrimary: z.ZodBoolean;
1044
+ }, "strip", z.ZodTypeAny, {
1045
+ id: string;
1046
+ isPrimary: boolean;
1047
+ createdAt: Date;
1048
+ updatedAt: Date;
1049
+ deletedAt: Date | null;
1050
+ phone: string;
1051
+ }, {
1052
+ id: string;
1053
+ isPrimary: boolean;
1054
+ createdAt: Date;
1055
+ updatedAt: Date;
1056
+ deletedAt: Date | null;
1057
+ phone: string;
1058
+ }>, "many">;
1059
+ activityLogs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1060
+ entityId: z.ZodString;
1061
+ description: z.ZodString;
1062
+ entityType: z.ZodObject<{
1063
+ entity: z.ZodString;
1064
+ description: z.ZodNullable<z.ZodString>;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ description: string | null;
1067
+ entity: string;
1068
+ }, {
1069
+ description: string | null;
1070
+ entity: string;
1071
+ }>;
1072
+ }, "strip", z.ZodTypeAny, {
1073
+ description: string;
1074
+ entityId: string;
1075
+ entityType: {
1076
+ description: string | null;
1077
+ entity: string;
1078
+ };
1079
+ }, {
1080
+ description: string;
1081
+ entityId: string;
1082
+ entityType: {
1083
+ description: string | null;
1084
+ entity: string;
1085
+ };
1086
+ }>, "many">>;
1087
+ }, "strip", z.ZodTypeAny, {
1088
+ id: string;
1089
+ channel: string | null;
1090
+ address: string | null;
1091
+ name: string;
1092
+ createdAt: Date;
1093
+ updatedAt: Date;
1094
+ deletedAt: Date | null;
1095
+ customFields: {
1096
+ id: string;
1097
+ createdAt: Date;
1098
+ updatedAt: Date;
1099
+ deletedAt: Date | null;
1100
+ attribute: {
1101
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
1102
+ id: string;
1103
+ position: number;
1104
+ createdAt: Date;
1105
+ updatedAt: Date;
1106
+ deletedAt: Date | null;
1107
+ isDefault: boolean;
1108
+ systemName: string;
1109
+ displayName: string;
1110
+ isArchived: boolean;
1111
+ isRequired: boolean;
1112
+ isUnique: boolean;
1113
+ };
1114
+ textValue: string | null;
1115
+ booleanValue: boolean | null;
1116
+ numberValue: number | null;
1117
+ dateValue: Date | null;
1118
+ uploads: {
1119
+ id: string;
1120
+ createdAt: Date;
1121
+ updatedAt: Date;
1122
+ deletedAt: Date | null;
1123
+ customFieldId: string;
1124
+ upload: {
1125
+ id: string;
1126
+ createdAt: Date;
1127
+ updatedAt: Date;
1128
+ deletedAt: Date | null;
1129
+ fileName: string;
1130
+ fileKey: string;
1131
+ bucketName: string;
1132
+ fileSize: number;
1133
+ };
1134
+ }[];
1135
+ }[];
1136
+ notes: string | null;
1137
+ contactProfile: string | null;
1138
+ socialProfileUrl: string | null;
1139
+ tags: {
1140
+ id: string;
1141
+ name: string;
1142
+ createdAt: Date;
1143
+ updatedAt: Date;
1144
+ deletedAt: Date | null;
1145
+ }[];
1146
+ company: {
1147
+ id: string;
1148
+ createdAt: Date;
1149
+ updatedAt: Date;
1150
+ deletedAt: Date | null;
1151
+ address?: string | undefined;
1152
+ name?: string | undefined;
1153
+ phone?: string | undefined;
1154
+ industry?: string | undefined;
1155
+ } | null;
1156
+ contactEmails: {
1157
+ id: string;
1158
+ isPrimary: boolean;
1159
+ email: string;
1160
+ createdAt: Date;
1161
+ updatedAt: Date;
1162
+ deletedAt: Date | null;
1163
+ }[];
1164
+ contactPhones: {
1165
+ id: string;
1166
+ isPrimary: boolean;
1167
+ createdAt: Date;
1168
+ updatedAt: Date;
1169
+ deletedAt: Date | null;
1170
+ phone: string;
1171
+ }[];
1172
+ activityLogs?: {
1173
+ description: string;
1174
+ entityId: string;
1175
+ entityType: {
1176
+ description: string | null;
1177
+ entity: string;
1178
+ };
1179
+ }[] | undefined;
1180
+ }, {
1181
+ id: string;
1182
+ channel: string | null;
1183
+ address: string | null;
1184
+ name: string;
1185
+ createdAt: Date;
1186
+ updatedAt: Date;
1187
+ deletedAt: Date | null;
1188
+ customFields: {
1189
+ id: string;
1190
+ createdAt: Date;
1191
+ updatedAt: Date;
1192
+ deletedAt: Date | null;
1193
+ attribute: {
1194
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
1195
+ id: string;
1196
+ position: number;
1197
+ createdAt: Date;
1198
+ updatedAt: Date;
1199
+ deletedAt: Date | null;
1200
+ isDefault: boolean;
1201
+ systemName: string;
1202
+ displayName: string;
1203
+ isArchived: boolean;
1204
+ isRequired: boolean;
1205
+ isUnique: boolean;
1206
+ };
1207
+ textValue: string | null;
1208
+ booleanValue: boolean | null;
1209
+ numberValue: number | null;
1210
+ dateValue: Date | null;
1211
+ uploads: {
1212
+ id: string;
1213
+ createdAt: Date;
1214
+ updatedAt: Date;
1215
+ deletedAt: Date | null;
1216
+ customFieldId: string;
1217
+ upload: {
1218
+ id: string;
1219
+ createdAt: Date;
1220
+ updatedAt: Date;
1221
+ deletedAt: Date | null;
1222
+ fileName: string;
1223
+ fileKey: string;
1224
+ bucketName: string;
1225
+ fileSize: number;
1226
+ };
1227
+ }[];
1228
+ }[];
1229
+ notes: string | null;
1230
+ contactProfile: string | null;
1231
+ socialProfileUrl: string | null;
1232
+ tags: {
1233
+ id: string;
1234
+ name: string;
1235
+ createdAt: Date;
1236
+ updatedAt: Date;
1237
+ deletedAt: Date | null;
1238
+ }[];
1239
+ company: {
1240
+ id: string;
1241
+ createdAt: Date;
1242
+ updatedAt: Date;
1243
+ deletedAt: Date | null;
1244
+ address?: string | undefined;
1245
+ name?: string | undefined;
1246
+ phone?: string | undefined;
1247
+ industry?: string | undefined;
1248
+ } | null;
1249
+ contactEmails: {
1250
+ id: string;
1251
+ isPrimary: boolean;
1252
+ email: string;
1253
+ createdAt: Date;
1254
+ updatedAt: Date;
1255
+ deletedAt: Date | null;
1256
+ }[];
1257
+ contactPhones: {
1258
+ id: string;
1259
+ isPrimary: boolean;
1260
+ createdAt: Date;
1261
+ updatedAt: Date;
1262
+ deletedAt: Date | null;
1263
+ phone: string;
1264
+ }[];
1265
+ activityLogs?: {
1266
+ description: string;
1267
+ entityId: string;
1268
+ entityType: {
1269
+ description: string | null;
1270
+ entity: string;
1271
+ };
1272
+ }[] | undefined;
1273
+ }>;
1274
+ }, "strip", z.ZodTypeAny, {
1275
+ platform: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
1276
+ id: string;
1277
+ metadata: {
1278
+ id: string;
1279
+ name: string;
1280
+ additionalCredentials?: any;
1281
+ };
1282
+ createdAt: Date;
1283
+ updatedAt: Date;
1284
+ deletedAt: Date | null;
1285
+ contact: {
1286
+ id: string;
1287
+ channel: string | null;
1288
+ address: string | null;
1289
+ name: string;
1290
+ createdAt: Date;
1291
+ updatedAt: Date;
1292
+ deletedAt: Date | null;
1293
+ customFields: {
1294
+ id: string;
1295
+ createdAt: Date;
1296
+ updatedAt: Date;
1297
+ deletedAt: Date | null;
1298
+ attribute: {
1299
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
1300
+ id: string;
1301
+ position: number;
1302
+ createdAt: Date;
1303
+ updatedAt: Date;
1304
+ deletedAt: Date | null;
1305
+ isDefault: boolean;
1306
+ systemName: string;
1307
+ displayName: string;
1308
+ isArchived: boolean;
1309
+ isRequired: boolean;
1310
+ isUnique: boolean;
1311
+ };
1312
+ textValue: string | null;
1313
+ booleanValue: boolean | null;
1314
+ numberValue: number | null;
1315
+ dateValue: Date | null;
1316
+ uploads: {
1317
+ id: string;
1318
+ createdAt: Date;
1319
+ updatedAt: Date;
1320
+ deletedAt: Date | null;
1321
+ customFieldId: string;
1322
+ upload: {
1323
+ id: string;
1324
+ createdAt: Date;
1325
+ updatedAt: Date;
1326
+ deletedAt: Date | null;
1327
+ fileName: string;
1328
+ fileKey: string;
1329
+ bucketName: string;
1330
+ fileSize: number;
1331
+ };
1332
+ }[];
1333
+ }[];
1334
+ notes: string | null;
1335
+ contactProfile: string | null;
1336
+ socialProfileUrl: string | null;
1337
+ tags: {
1338
+ id: string;
1339
+ name: string;
1340
+ createdAt: Date;
1341
+ updatedAt: Date;
1342
+ deletedAt: Date | null;
1343
+ }[];
1344
+ company: {
1345
+ id: string;
1346
+ createdAt: Date;
1347
+ updatedAt: Date;
1348
+ deletedAt: Date | null;
1349
+ address?: string | undefined;
1350
+ name?: string | undefined;
1351
+ phone?: string | undefined;
1352
+ industry?: string | undefined;
1353
+ } | null;
1354
+ contactEmails: {
1355
+ id: string;
1356
+ isPrimary: boolean;
1357
+ email: string;
1358
+ createdAt: Date;
1359
+ updatedAt: Date;
1360
+ deletedAt: Date | null;
1361
+ }[];
1362
+ contactPhones: {
1363
+ id: string;
1364
+ isPrimary: boolean;
1365
+ createdAt: Date;
1366
+ updatedAt: Date;
1367
+ deletedAt: Date | null;
1368
+ phone: string;
1369
+ }[];
1370
+ activityLogs?: {
1371
+ description: string;
1372
+ entityId: string;
1373
+ entityType: {
1374
+ description: string | null;
1375
+ entity: string;
1376
+ };
1377
+ }[] | undefined;
1378
+ };
1379
+ channelId: string;
1380
+ socialPlatformId: string;
1381
+ }, {
1382
+ platform: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
1383
+ id: string;
1384
+ metadata: {
1385
+ id: string;
1386
+ name: string;
1387
+ additionalCredentials?: any;
1388
+ };
1389
+ createdAt: Date;
1390
+ updatedAt: Date;
1391
+ deletedAt: Date | null;
1392
+ contact: {
1393
+ id: string;
1394
+ channel: string | null;
1395
+ address: string | null;
1396
+ name: string;
1397
+ createdAt: Date;
1398
+ updatedAt: Date;
1399
+ deletedAt: Date | null;
1400
+ customFields: {
1401
+ id: string;
1402
+ createdAt: Date;
1403
+ updatedAt: Date;
1404
+ deletedAt: Date | null;
1405
+ attribute: {
1406
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
1407
+ id: string;
1408
+ position: number;
1409
+ createdAt: Date;
1410
+ updatedAt: Date;
1411
+ deletedAt: Date | null;
1412
+ isDefault: boolean;
1413
+ systemName: string;
1414
+ displayName: string;
1415
+ isArchived: boolean;
1416
+ isRequired: boolean;
1417
+ isUnique: boolean;
1418
+ };
1419
+ textValue: string | null;
1420
+ booleanValue: boolean | null;
1421
+ numberValue: number | null;
1422
+ dateValue: Date | null;
1423
+ uploads: {
1424
+ id: string;
1425
+ createdAt: Date;
1426
+ updatedAt: Date;
1427
+ deletedAt: Date | null;
1428
+ customFieldId: string;
1429
+ upload: {
1430
+ id: string;
1431
+ createdAt: Date;
1432
+ updatedAt: Date;
1433
+ deletedAt: Date | null;
1434
+ fileName: string;
1435
+ fileKey: string;
1436
+ bucketName: string;
1437
+ fileSize: number;
1438
+ };
1439
+ }[];
1440
+ }[];
1441
+ notes: string | null;
1442
+ contactProfile: string | null;
1443
+ socialProfileUrl: string | null;
1444
+ tags: {
1445
+ id: string;
1446
+ name: string;
1447
+ createdAt: Date;
1448
+ updatedAt: Date;
1449
+ deletedAt: Date | null;
1450
+ }[];
1451
+ company: {
1452
+ id: string;
1453
+ createdAt: Date;
1454
+ updatedAt: Date;
1455
+ deletedAt: Date | null;
1456
+ address?: string | undefined;
1457
+ name?: string | undefined;
1458
+ phone?: string | undefined;
1459
+ industry?: string | undefined;
1460
+ } | null;
1461
+ contactEmails: {
1462
+ id: string;
1463
+ isPrimary: boolean;
1464
+ email: string;
1465
+ createdAt: Date;
1466
+ updatedAt: Date;
1467
+ deletedAt: Date | null;
1468
+ }[];
1469
+ contactPhones: {
1470
+ id: string;
1471
+ isPrimary: boolean;
1472
+ createdAt: Date;
1473
+ updatedAt: Date;
1474
+ deletedAt: Date | null;
1475
+ phone: string;
1476
+ }[];
1477
+ activityLogs?: {
1478
+ description: string;
1479
+ entityId: string;
1480
+ entityType: {
1481
+ description: string | null;
1482
+ entity: string;
1483
+ };
1484
+ }[] | undefined;
1485
+ };
1486
+ channelId: string;
1487
+ socialPlatformId: string;
1488
+ }>;
1489
+ actor: z.ZodObject<{
1490
+ id: z.ZodString;
1491
+ createdAt: z.ZodDate;
1492
+ updatedAt: z.ZodDate;
1493
+ deletedAt: z.ZodNullable<z.ZodDate>;
1494
+ name: z.ZodString;
1495
+ email: z.ZodString;
1496
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
1497
+ password: z.ZodString;
1498
+ address: z.ZodNullable<z.ZodString>;
1499
+ phone: z.ZodNullable<z.ZodString>;
1500
+ notificationCount: z.ZodNullable<z.ZodNumber>;
1501
+ roles: z.ZodArray<z.ZodObject<{
1502
+ id: z.ZodString;
1503
+ createdAt: z.ZodDate;
1504
+ updatedAt: z.ZodDate;
1505
+ deletedAt: z.ZodNullable<z.ZodDate>;
1506
+ systemName: z.ZodString;
1507
+ displayName: z.ZodString;
1508
+ description: z.ZodNullable<z.ZodString>;
1509
+ permissions: z.ZodArray<z.ZodObject<{
1510
+ id: z.ZodString;
1511
+ createdAt: z.ZodDate;
1512
+ updatedAt: z.ZodDate;
1513
+ deletedAt: z.ZodNullable<z.ZodDate>;
1514
+ systemName: z.ZodString;
1515
+ displayName: z.ZodString;
1516
+ description: z.ZodNullable<z.ZodString>;
1517
+ }, "strip", z.ZodTypeAny, {
1518
+ id: string;
1519
+ description: string | null;
1520
+ createdAt: Date;
1521
+ updatedAt: Date;
1522
+ deletedAt: Date | null;
1523
+ systemName: string;
1524
+ displayName: string;
1525
+ }, {
1526
+ id: string;
1527
+ description: string | null;
1528
+ createdAt: Date;
1529
+ updatedAt: Date;
1530
+ deletedAt: Date | null;
1531
+ systemName: string;
1532
+ displayName: string;
1533
+ }>, "many">;
1534
+ }, "strip", z.ZodTypeAny, {
1535
+ id: string;
1536
+ description: string | null;
1537
+ createdAt: Date;
1538
+ updatedAt: Date;
1539
+ deletedAt: Date | null;
1540
+ systemName: string;
1541
+ displayName: string;
1542
+ permissions: {
1543
+ id: string;
1544
+ description: string | null;
1545
+ createdAt: Date;
1546
+ updatedAt: Date;
1547
+ deletedAt: Date | null;
1548
+ systemName: string;
1549
+ displayName: string;
1550
+ }[];
1551
+ }, {
1552
+ id: string;
1553
+ description: string | null;
1554
+ createdAt: Date;
1555
+ updatedAt: Date;
1556
+ deletedAt: Date | null;
1557
+ systemName: string;
1558
+ displayName: string;
1559
+ permissions: {
1560
+ id: string;
1561
+ description: string | null;
1562
+ createdAt: Date;
1563
+ updatedAt: Date;
1564
+ deletedAt: Date | null;
1565
+ systemName: string;
1566
+ displayName: string;
1567
+ }[];
1568
+ }>, "many">;
1569
+ extension: z.ZodOptional<z.ZodObject<{
1570
+ id: z.ZodString;
1571
+ createdAt: z.ZodDate;
1572
+ updatedAt: z.ZodDate;
1573
+ deletedAt: z.ZodNullable<z.ZodDate>;
1574
+ userId: z.ZodNullable<z.ZodString>;
1575
+ sipServerUrl: z.ZodString;
1576
+ sipUserName: z.ZodString;
1577
+ extensionId: z.ZodNumber;
1578
+ extensionName: z.ZodString;
1579
+ telephonySignature: z.ZodNullable<z.ZodString>;
1580
+ }, "strip", z.ZodTypeAny, {
1581
+ id: string;
1582
+ createdAt: Date;
1583
+ updatedAt: Date;
1584
+ deletedAt: Date | null;
1585
+ userId: string | null;
1586
+ sipServerUrl: string;
1587
+ sipUserName: string;
1588
+ extensionId: number;
1589
+ extensionName: string;
1590
+ telephonySignature: string | null;
1591
+ }, {
1592
+ id: string;
1593
+ createdAt: Date;
1594
+ updatedAt: Date;
1595
+ deletedAt: Date | null;
1596
+ userId: string | null;
1597
+ sipServerUrl: string;
1598
+ sipUserName: string;
1599
+ extensionId: number;
1600
+ extensionName: string;
1601
+ telephonySignature: string | null;
1602
+ }>>;
1603
+ }, "strip", z.ZodTypeAny, {
1604
+ id: string;
1605
+ address: string | null;
1606
+ name: string;
1607
+ email: string;
1608
+ createdAt: Date;
1609
+ updatedAt: Date;
1610
+ deletedAt: Date | null;
1611
+ emailVerifiedAt: Date | null;
1612
+ password: string;
1613
+ phone: string | null;
1614
+ notificationCount: number | null;
1615
+ roles: {
1616
+ id: string;
1617
+ description: string | null;
1618
+ createdAt: Date;
1619
+ updatedAt: Date;
1620
+ deletedAt: Date | null;
1621
+ systemName: string;
1622
+ displayName: string;
1623
+ permissions: {
1624
+ id: string;
1625
+ description: string | null;
1626
+ createdAt: Date;
1627
+ updatedAt: Date;
1628
+ deletedAt: Date | null;
1629
+ systemName: string;
1630
+ displayName: string;
1631
+ }[];
1632
+ }[];
1633
+ extension?: {
1634
+ id: string;
1635
+ createdAt: Date;
1636
+ updatedAt: Date;
1637
+ deletedAt: Date | null;
1638
+ userId: string | null;
1639
+ sipServerUrl: string;
1640
+ sipUserName: string;
1641
+ extensionId: number;
1642
+ extensionName: string;
1643
+ telephonySignature: string | null;
1644
+ } | undefined;
1645
+ }, {
1646
+ id: string;
1647
+ address: string | null;
1648
+ name: string;
1649
+ email: string;
1650
+ createdAt: Date;
1651
+ updatedAt: Date;
1652
+ deletedAt: Date | null;
1653
+ emailVerifiedAt: Date | null;
1654
+ password: string;
1655
+ phone: string | null;
1656
+ notificationCount: number | null;
1657
+ roles: {
1658
+ id: string;
1659
+ description: string | null;
1660
+ createdAt: Date;
1661
+ updatedAt: Date;
1662
+ deletedAt: Date | null;
1663
+ systemName: string;
1664
+ displayName: string;
1665
+ permissions: {
1666
+ id: string;
1667
+ description: string | null;
1668
+ createdAt: Date;
1669
+ updatedAt: Date;
1670
+ deletedAt: Date | null;
1671
+ systemName: string;
1672
+ displayName: string;
1673
+ }[];
1674
+ }[];
1675
+ extension?: {
1676
+ id: string;
1677
+ createdAt: Date;
1678
+ updatedAt: Date;
1679
+ deletedAt: Date | null;
1680
+ userId: string | null;
1681
+ sipServerUrl: string;
1682
+ sipUserName: string;
1683
+ extensionId: number;
1684
+ extensionName: string;
1685
+ telephonySignature: string | null;
1686
+ } | undefined;
1687
+ }>;
1688
+ assignee: z.ZodObject<{
1689
+ id: z.ZodString;
1690
+ createdAt: z.ZodDate;
1691
+ updatedAt: z.ZodDate;
1692
+ deletedAt: z.ZodNullable<z.ZodDate>;
1693
+ name: z.ZodString;
1694
+ email: z.ZodString;
1695
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
1696
+ password: z.ZodString;
1697
+ address: z.ZodNullable<z.ZodString>;
1698
+ phone: z.ZodNullable<z.ZodString>;
1699
+ notificationCount: z.ZodNullable<z.ZodNumber>;
1700
+ roles: z.ZodArray<z.ZodObject<{
1701
+ id: z.ZodString;
1702
+ createdAt: z.ZodDate;
1703
+ updatedAt: z.ZodDate;
1704
+ deletedAt: z.ZodNullable<z.ZodDate>;
1705
+ systemName: z.ZodString;
1706
+ displayName: z.ZodString;
1707
+ description: z.ZodNullable<z.ZodString>;
1708
+ permissions: z.ZodArray<z.ZodObject<{
1709
+ id: z.ZodString;
1710
+ createdAt: z.ZodDate;
1711
+ updatedAt: z.ZodDate;
1712
+ deletedAt: z.ZodNullable<z.ZodDate>;
1713
+ systemName: z.ZodString;
1714
+ displayName: z.ZodString;
1715
+ description: z.ZodNullable<z.ZodString>;
1716
+ }, "strip", z.ZodTypeAny, {
1717
+ id: string;
1718
+ description: string | null;
1719
+ createdAt: Date;
1720
+ updatedAt: Date;
1721
+ deletedAt: Date | null;
1722
+ systemName: string;
1723
+ displayName: string;
1724
+ }, {
1725
+ id: string;
1726
+ description: string | null;
1727
+ createdAt: Date;
1728
+ updatedAt: Date;
1729
+ deletedAt: Date | null;
1730
+ systemName: string;
1731
+ displayName: string;
1732
+ }>, "many">;
1733
+ }, "strip", z.ZodTypeAny, {
1734
+ id: string;
1735
+ description: string | null;
1736
+ createdAt: Date;
1737
+ updatedAt: Date;
1738
+ deletedAt: Date | null;
1739
+ systemName: string;
1740
+ displayName: string;
1741
+ permissions: {
1742
+ id: string;
1743
+ description: string | null;
1744
+ createdAt: Date;
1745
+ updatedAt: Date;
1746
+ deletedAt: Date | null;
1747
+ systemName: string;
1748
+ displayName: string;
1749
+ }[];
1750
+ }, {
1751
+ id: string;
1752
+ description: string | null;
1753
+ createdAt: Date;
1754
+ updatedAt: Date;
1755
+ deletedAt: Date | null;
1756
+ systemName: string;
1757
+ displayName: string;
1758
+ permissions: {
1759
+ id: string;
1760
+ description: string | null;
1761
+ createdAt: Date;
1762
+ updatedAt: Date;
1763
+ deletedAt: Date | null;
1764
+ systemName: string;
1765
+ displayName: string;
1766
+ }[];
1767
+ }>, "many">;
1768
+ extension: z.ZodOptional<z.ZodObject<{
1769
+ id: z.ZodString;
1770
+ createdAt: z.ZodDate;
1771
+ updatedAt: z.ZodDate;
1772
+ deletedAt: z.ZodNullable<z.ZodDate>;
1773
+ userId: z.ZodNullable<z.ZodString>;
1774
+ sipServerUrl: z.ZodString;
1775
+ sipUserName: z.ZodString;
1776
+ extensionId: z.ZodNumber;
1777
+ extensionName: z.ZodString;
1778
+ telephonySignature: z.ZodNullable<z.ZodString>;
1779
+ }, "strip", z.ZodTypeAny, {
1780
+ id: string;
1781
+ createdAt: Date;
1782
+ updatedAt: Date;
1783
+ deletedAt: Date | null;
1784
+ userId: string | null;
1785
+ sipServerUrl: string;
1786
+ sipUserName: string;
1787
+ extensionId: number;
1788
+ extensionName: string;
1789
+ telephonySignature: string | null;
1790
+ }, {
1791
+ id: string;
1792
+ createdAt: Date;
1793
+ updatedAt: Date;
1794
+ deletedAt: Date | null;
1795
+ userId: string | null;
1796
+ sipServerUrl: string;
1797
+ sipUserName: string;
1798
+ extensionId: number;
1799
+ extensionName: string;
1800
+ telephonySignature: string | null;
1801
+ }>>;
1802
+ }, "strip", z.ZodTypeAny, {
1803
+ id: string;
1804
+ address: string | null;
1805
+ name: string;
1806
+ email: string;
1807
+ createdAt: Date;
1808
+ updatedAt: Date;
1809
+ deletedAt: Date | null;
1810
+ emailVerifiedAt: Date | null;
1811
+ password: string;
1812
+ phone: string | null;
1813
+ notificationCount: number | null;
1814
+ roles: {
1815
+ id: string;
1816
+ description: string | null;
1817
+ createdAt: Date;
1818
+ updatedAt: Date;
1819
+ deletedAt: Date | null;
1820
+ systemName: string;
1821
+ displayName: string;
1822
+ permissions: {
1823
+ id: string;
1824
+ description: string | null;
1825
+ createdAt: Date;
1826
+ updatedAt: Date;
1827
+ deletedAt: Date | null;
1828
+ systemName: string;
1829
+ displayName: string;
1830
+ }[];
1831
+ }[];
1832
+ extension?: {
1833
+ id: string;
1834
+ createdAt: Date;
1835
+ updatedAt: Date;
1836
+ deletedAt: Date | null;
1837
+ userId: string | null;
1838
+ sipServerUrl: string;
1839
+ sipUserName: string;
1840
+ extensionId: number;
1841
+ extensionName: string;
1842
+ telephonySignature: string | null;
1843
+ } | undefined;
1844
+ }, {
1845
+ id: string;
1846
+ address: string | null;
1847
+ name: string;
1848
+ email: string;
1849
+ createdAt: Date;
1850
+ updatedAt: Date;
1851
+ deletedAt: Date | null;
1852
+ emailVerifiedAt: Date | null;
1853
+ password: string;
1854
+ phone: string | null;
1855
+ notificationCount: number | null;
1856
+ roles: {
1857
+ id: string;
1858
+ description: string | null;
1859
+ createdAt: Date;
1860
+ updatedAt: Date;
1861
+ deletedAt: Date | null;
1862
+ systemName: string;
1863
+ displayName: string;
1864
+ permissions: {
1865
+ id: string;
1866
+ description: string | null;
1867
+ createdAt: Date;
1868
+ updatedAt: Date;
1869
+ deletedAt: Date | null;
1870
+ systemName: string;
1871
+ displayName: string;
1872
+ }[];
1873
+ }[];
1874
+ extension?: {
1875
+ id: string;
1876
+ createdAt: Date;
1877
+ updatedAt: Date;
1878
+ deletedAt: Date | null;
1879
+ userId: string | null;
1880
+ sipServerUrl: string;
1881
+ sipUserName: string;
1882
+ extensionId: number;
1883
+ extensionName: string;
1884
+ telephonySignature: string | null;
1885
+ } | undefined;
1886
+ }>;
1887
+ channel: z.ZodObject<{
1888
+ id: z.ZodString;
1889
+ createdAt: z.ZodDate;
1890
+ updatedAt: z.ZodDate;
1891
+ deletedAt: z.ZodNullable<z.ZodDate>;
1892
+ name: z.ZodString;
1893
+ type: z.ZodEnum<["whatsapp", "messenger", "telegram", "line", "viber", "kakao", "shopee", "lazada"]>;
1894
+ metadata: z.ZodObject<{
1895
+ id: z.ZodString;
1896
+ name: z.ZodString;
1897
+ accessToken: z.ZodString;
1898
+ additionalCredentials: z.ZodOptional<z.ZodAny>;
1899
+ }, "strip", z.ZodTypeAny, {
1900
+ id: string;
1901
+ name: string;
1902
+ accessToken: string;
1903
+ additionalCredentials?: any;
1904
+ }, {
1905
+ id: string;
1906
+ name: string;
1907
+ accessToken: string;
1908
+ additionalCredentials?: any;
1909
+ }>;
1910
+ brandName: z.ZodString;
1911
+ platformId: z.ZodString;
1912
+ status: z.ZodLazy<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<0>]>>;
1913
+ isReloginRequired: z.ZodBoolean;
1914
+ connectedUserName: z.ZodString;
1915
+ connectedUserId: z.ZodString;
1916
+ actor: z.ZodAny;
1917
+ }, "strip", z.ZodTypeAny, {
1918
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
1919
+ id: string;
1920
+ name: string;
1921
+ metadata: {
1922
+ id: string;
1923
+ name: string;
1924
+ accessToken: string;
1925
+ additionalCredentials?: any;
1926
+ };
1927
+ status: 0 | 1;
1928
+ createdAt: Date;
1929
+ updatedAt: Date;
1930
+ deletedAt: Date | null;
1931
+ brandName: string;
1932
+ platformId: string;
1933
+ isReloginRequired: boolean;
1934
+ connectedUserName: string;
1935
+ connectedUserId: string;
1936
+ actor?: any;
1937
+ }, {
1938
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
1939
+ id: string;
1940
+ name: string;
1941
+ metadata: {
1942
+ id: string;
1943
+ name: string;
1944
+ accessToken: string;
1945
+ additionalCredentials?: any;
1946
+ };
1947
+ status: 0 | 1;
1948
+ createdAt: Date;
1949
+ updatedAt: Date;
1950
+ deletedAt: Date | null;
1951
+ brandName: string;
1952
+ platformId: string;
1953
+ isReloginRequired: boolean;
1954
+ connectedUserName: string;
1955
+ connectedUserId: string;
1956
+ actor?: any;
1957
+ }>;
1958
+ tags: z.ZodArray<z.ZodObject<{
1959
+ id: z.ZodString;
1960
+ createdAt: z.ZodDate;
1961
+ updatedAt: z.ZodDate;
1962
+ deletedAt: z.ZodNullable<z.ZodDate>;
1963
+ name: z.ZodString;
1964
+ }, "strip", z.ZodTypeAny, {
1965
+ id: string;
1966
+ name: string;
1967
+ createdAt: Date;
1968
+ updatedAt: Date;
1969
+ deletedAt: Date | null;
1970
+ }, {
1971
+ id: string;
1972
+ name: string;
1973
+ createdAt: Date;
1974
+ updatedAt: Date;
1975
+ deletedAt: Date | null;
1976
+ }>, "many">;
1977
+ }, "strip", z.ZodTypeAny, {
1978
+ id: string;
1979
+ channel: {
1980
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
1981
+ id: string;
1982
+ name: string;
1983
+ metadata: {
1984
+ id: string;
1985
+ name: string;
1986
+ accessToken: string;
1987
+ additionalCredentials?: any;
1988
+ };
1989
+ status: 0 | 1;
1990
+ createdAt: Date;
1991
+ updatedAt: Date;
1992
+ deletedAt: Date | null;
1993
+ brandName: string;
1994
+ platformId: string;
1995
+ isReloginRequired: boolean;
1996
+ connectedUserName: string;
1997
+ connectedUserId: string;
1998
+ actor?: any;
1999
+ };
2000
+ direction: "incoming" | "outgoing" | "system";
2001
+ createdAt: Date;
2002
+ updatedAt: Date;
2003
+ deletedAt: Date | null;
2004
+ actor: {
2005
+ id: string;
2006
+ address: string | null;
2007
+ name: string;
2008
+ email: string;
2009
+ createdAt: Date;
2010
+ updatedAt: Date;
2011
+ deletedAt: Date | null;
2012
+ emailVerifiedAt: Date | null;
2013
+ password: string;
2014
+ phone: string | null;
2015
+ notificationCount: number | null;
2016
+ roles: {
2017
+ id: string;
2018
+ description: string | null;
2019
+ createdAt: Date;
2020
+ updatedAt: Date;
2021
+ deletedAt: Date | null;
2022
+ systemName: string;
2023
+ displayName: string;
2024
+ permissions: {
2025
+ id: string;
2026
+ description: string | null;
2027
+ createdAt: Date;
2028
+ updatedAt: Date;
2029
+ deletedAt: Date | null;
2030
+ systemName: string;
2031
+ displayName: string;
2032
+ }[];
2033
+ }[];
2034
+ extension?: {
2035
+ id: string;
2036
+ createdAt: Date;
2037
+ updatedAt: Date;
2038
+ deletedAt: Date | null;
2039
+ userId: string | null;
2040
+ sipServerUrl: string;
2041
+ sipUserName: string;
2042
+ extensionId: number;
2043
+ extensionName: string;
2044
+ telephonySignature: string | null;
2045
+ } | undefined;
2046
+ };
2047
+ notes: string;
2048
+ tags: {
2049
+ id: string;
2050
+ name: string;
2051
+ createdAt: Date;
2052
+ updatedAt: Date;
2053
+ deletedAt: Date | null;
2054
+ }[];
2055
+ lastMessage: string;
2056
+ handleTime: number;
2057
+ isSolved: boolean;
2058
+ closeAt: Date;
2059
+ unreadCount: number;
2060
+ firstResponseTime: Date;
2061
+ isLatest: boolean;
2062
+ platformContact: {
2063
+ platform: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
2064
+ id: string;
2065
+ metadata: {
2066
+ id: string;
2067
+ name: string;
2068
+ additionalCredentials?: any;
2069
+ };
2070
+ createdAt: Date;
2071
+ updatedAt: Date;
2072
+ deletedAt: Date | null;
2073
+ contact: {
2074
+ id: string;
2075
+ channel: string | null;
2076
+ address: string | null;
2077
+ name: string;
2078
+ createdAt: Date;
2079
+ updatedAt: Date;
2080
+ deletedAt: Date | null;
2081
+ customFields: {
2082
+ id: string;
2083
+ createdAt: Date;
2084
+ updatedAt: Date;
2085
+ deletedAt: Date | null;
2086
+ attribute: {
2087
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
2088
+ id: string;
2089
+ position: number;
2090
+ createdAt: Date;
2091
+ updatedAt: Date;
2092
+ deletedAt: Date | null;
2093
+ isDefault: boolean;
2094
+ systemName: string;
2095
+ displayName: string;
2096
+ isArchived: boolean;
2097
+ isRequired: boolean;
2098
+ isUnique: boolean;
2099
+ };
2100
+ textValue: string | null;
2101
+ booleanValue: boolean | null;
2102
+ numberValue: number | null;
2103
+ dateValue: Date | null;
2104
+ uploads: {
2105
+ id: string;
2106
+ createdAt: Date;
2107
+ updatedAt: Date;
2108
+ deletedAt: Date | null;
2109
+ customFieldId: string;
2110
+ upload: {
2111
+ id: string;
2112
+ createdAt: Date;
2113
+ updatedAt: Date;
2114
+ deletedAt: Date | null;
2115
+ fileName: string;
2116
+ fileKey: string;
2117
+ bucketName: string;
2118
+ fileSize: number;
2119
+ };
2120
+ }[];
2121
+ }[];
2122
+ notes: string | null;
2123
+ contactProfile: string | null;
2124
+ socialProfileUrl: string | null;
2125
+ tags: {
2126
+ id: string;
2127
+ name: string;
2128
+ createdAt: Date;
2129
+ updatedAt: Date;
2130
+ deletedAt: Date | null;
2131
+ }[];
2132
+ company: {
2133
+ id: string;
2134
+ createdAt: Date;
2135
+ updatedAt: Date;
2136
+ deletedAt: Date | null;
2137
+ address?: string | undefined;
2138
+ name?: string | undefined;
2139
+ phone?: string | undefined;
2140
+ industry?: string | undefined;
2141
+ } | null;
2142
+ contactEmails: {
2143
+ id: string;
2144
+ isPrimary: boolean;
2145
+ email: string;
2146
+ createdAt: Date;
2147
+ updatedAt: Date;
2148
+ deletedAt: Date | null;
2149
+ }[];
2150
+ contactPhones: {
2151
+ id: string;
2152
+ isPrimary: boolean;
2153
+ createdAt: Date;
2154
+ updatedAt: Date;
2155
+ deletedAt: Date | null;
2156
+ phone: string;
2157
+ }[];
2158
+ activityLogs?: {
2159
+ description: string;
2160
+ entityId: string;
2161
+ entityType: {
2162
+ description: string | null;
2163
+ entity: string;
2164
+ };
2165
+ }[] | undefined;
2166
+ };
2167
+ channelId: string;
2168
+ socialPlatformId: string;
2169
+ };
2170
+ assignee: {
2171
+ id: string;
2172
+ address: string | null;
2173
+ name: string;
2174
+ email: string;
2175
+ createdAt: Date;
2176
+ updatedAt: Date;
2177
+ deletedAt: Date | null;
2178
+ emailVerifiedAt: Date | null;
2179
+ password: string;
2180
+ phone: string | null;
2181
+ notificationCount: number | null;
2182
+ roles: {
2183
+ id: string;
2184
+ description: string | null;
2185
+ createdAt: Date;
2186
+ updatedAt: Date;
2187
+ deletedAt: Date | null;
2188
+ systemName: string;
2189
+ displayName: string;
2190
+ permissions: {
2191
+ id: string;
2192
+ description: string | null;
2193
+ createdAt: Date;
2194
+ updatedAt: Date;
2195
+ deletedAt: Date | null;
2196
+ systemName: string;
2197
+ displayName: string;
2198
+ }[];
2199
+ }[];
2200
+ extension?: {
2201
+ id: string;
2202
+ createdAt: Date;
2203
+ updatedAt: Date;
2204
+ deletedAt: Date | null;
2205
+ userId: string | null;
2206
+ sipServerUrl: string;
2207
+ sipUserName: string;
2208
+ extensionId: number;
2209
+ extensionName: string;
2210
+ telephonySignature: string | null;
2211
+ } | undefined;
2212
+ };
2213
+ }, {
2214
+ id: string;
2215
+ channel: {
2216
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
2217
+ id: string;
2218
+ name: string;
2219
+ metadata: {
2220
+ id: string;
2221
+ name: string;
2222
+ accessToken: string;
2223
+ additionalCredentials?: any;
2224
+ };
2225
+ status: 0 | 1;
2226
+ createdAt: Date;
2227
+ updatedAt: Date;
2228
+ deletedAt: Date | null;
2229
+ brandName: string;
2230
+ platformId: string;
2231
+ isReloginRequired: boolean;
2232
+ connectedUserName: string;
2233
+ connectedUserId: string;
2234
+ actor?: any;
2235
+ };
2236
+ direction: "incoming" | "outgoing" | "system";
2237
+ createdAt: Date;
2238
+ updatedAt: Date;
2239
+ deletedAt: Date | null;
2240
+ actor: {
2241
+ id: string;
2242
+ address: string | null;
2243
+ name: string;
2244
+ email: string;
2245
+ createdAt: Date;
2246
+ updatedAt: Date;
2247
+ deletedAt: Date | null;
2248
+ emailVerifiedAt: Date | null;
2249
+ password: string;
2250
+ phone: string | null;
2251
+ notificationCount: number | null;
2252
+ roles: {
2253
+ id: string;
2254
+ description: string | null;
2255
+ createdAt: Date;
2256
+ updatedAt: Date;
2257
+ deletedAt: Date | null;
2258
+ systemName: string;
2259
+ displayName: string;
2260
+ permissions: {
2261
+ id: string;
2262
+ description: string | null;
2263
+ createdAt: Date;
2264
+ updatedAt: Date;
2265
+ deletedAt: Date | null;
2266
+ systemName: string;
2267
+ displayName: string;
2268
+ }[];
2269
+ }[];
2270
+ extension?: {
2271
+ id: string;
2272
+ createdAt: Date;
2273
+ updatedAt: Date;
2274
+ deletedAt: Date | null;
2275
+ userId: string | null;
2276
+ sipServerUrl: string;
2277
+ sipUserName: string;
2278
+ extensionId: number;
2279
+ extensionName: string;
2280
+ telephonySignature: string | null;
2281
+ } | undefined;
2282
+ };
2283
+ notes: string;
2284
+ tags: {
2285
+ id: string;
2286
+ name: string;
2287
+ createdAt: Date;
2288
+ updatedAt: Date;
2289
+ deletedAt: Date | null;
2290
+ }[];
2291
+ lastMessage: string;
2292
+ handleTime: number;
2293
+ isSolved: boolean;
2294
+ closeAt: Date;
2295
+ unreadCount: number;
2296
+ firstResponseTime: Date;
2297
+ isLatest: boolean;
2298
+ platformContact: {
2299
+ platform: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
2300
+ id: string;
2301
+ metadata: {
2302
+ id: string;
2303
+ name: string;
2304
+ additionalCredentials?: any;
2305
+ };
2306
+ createdAt: Date;
2307
+ updatedAt: Date;
2308
+ deletedAt: Date | null;
2309
+ contact: {
2310
+ id: string;
2311
+ channel: string | null;
2312
+ address: string | null;
2313
+ name: string;
2314
+ createdAt: Date;
2315
+ updatedAt: Date;
2316
+ deletedAt: Date | null;
2317
+ customFields: {
2318
+ id: string;
2319
+ createdAt: Date;
2320
+ updatedAt: Date;
2321
+ deletedAt: Date | null;
2322
+ attribute: {
2323
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
2324
+ id: string;
2325
+ position: number;
2326
+ createdAt: Date;
2327
+ updatedAt: Date;
2328
+ deletedAt: Date | null;
2329
+ isDefault: boolean;
2330
+ systemName: string;
2331
+ displayName: string;
2332
+ isArchived: boolean;
2333
+ isRequired: boolean;
2334
+ isUnique: boolean;
2335
+ };
2336
+ textValue: string | null;
2337
+ booleanValue: boolean | null;
2338
+ numberValue: number | null;
2339
+ dateValue: Date | null;
2340
+ uploads: {
2341
+ id: string;
2342
+ createdAt: Date;
2343
+ updatedAt: Date;
2344
+ deletedAt: Date | null;
2345
+ customFieldId: string;
2346
+ upload: {
2347
+ id: string;
2348
+ createdAt: Date;
2349
+ updatedAt: Date;
2350
+ deletedAt: Date | null;
2351
+ fileName: string;
2352
+ fileKey: string;
2353
+ bucketName: string;
2354
+ fileSize: number;
2355
+ };
2356
+ }[];
2357
+ }[];
2358
+ notes: string | null;
2359
+ contactProfile: string | null;
2360
+ socialProfileUrl: string | null;
2361
+ tags: {
2362
+ id: string;
2363
+ name: string;
2364
+ createdAt: Date;
2365
+ updatedAt: Date;
2366
+ deletedAt: Date | null;
2367
+ }[];
2368
+ company: {
2369
+ id: string;
2370
+ createdAt: Date;
2371
+ updatedAt: Date;
2372
+ deletedAt: Date | null;
2373
+ address?: string | undefined;
2374
+ name?: string | undefined;
2375
+ phone?: string | undefined;
2376
+ industry?: string | undefined;
2377
+ } | null;
2378
+ contactEmails: {
2379
+ id: string;
2380
+ isPrimary: boolean;
2381
+ email: string;
2382
+ createdAt: Date;
2383
+ updatedAt: Date;
2384
+ deletedAt: Date | null;
2385
+ }[];
2386
+ contactPhones: {
2387
+ id: string;
2388
+ isPrimary: boolean;
2389
+ createdAt: Date;
2390
+ updatedAt: Date;
2391
+ deletedAt: Date | null;
2392
+ phone: string;
2393
+ }[];
2394
+ activityLogs?: {
2395
+ description: string;
2396
+ entityId: string;
2397
+ entityType: {
2398
+ description: string | null;
2399
+ entity: string;
2400
+ };
2401
+ }[] | undefined;
2402
+ };
2403
+ channelId: string;
2404
+ socialPlatformId: string;
2405
+ };
2406
+ assignee: {
2407
+ id: string;
2408
+ address: string | null;
2409
+ name: string;
2410
+ email: string;
2411
+ createdAt: Date;
2412
+ updatedAt: Date;
2413
+ deletedAt: Date | null;
2414
+ emailVerifiedAt: Date | null;
2415
+ password: string;
2416
+ phone: string | null;
2417
+ notificationCount: number | null;
2418
+ roles: {
2419
+ id: string;
2420
+ description: string | null;
2421
+ createdAt: Date;
2422
+ updatedAt: Date;
2423
+ deletedAt: Date | null;
2424
+ systemName: string;
2425
+ displayName: string;
2426
+ permissions: {
2427
+ id: string;
2428
+ description: string | null;
2429
+ createdAt: Date;
2430
+ updatedAt: Date;
2431
+ deletedAt: Date | null;
2432
+ systemName: string;
2433
+ displayName: string;
2434
+ }[];
2435
+ }[];
2436
+ extension?: {
2437
+ id: string;
2438
+ createdAt: Date;
2439
+ updatedAt: Date;
2440
+ deletedAt: Date | null;
2441
+ userId: string | null;
2442
+ sipServerUrl: string;
2443
+ sipUserName: string;
2444
+ extensionId: number;
2445
+ extensionName: string;
2446
+ telephonySignature: string | null;
2447
+ } | undefined;
2448
+ };
2449
+ }>;
2450
+ message: z.ZodObject<{
2451
+ id: z.ZodString;
2452
+ createdAt: z.ZodDate;
2453
+ updatedAt: z.ZodDate;
2454
+ deletedAt: z.ZodNullable<z.ZodDate>;
2455
+ message: z.ZodString;
2456
+ direction: z.ZodEnum<["incoming", "outgoing", "system"]>;
2457
+ type: z.ZodEnum<["text", "image", "video", "audio", "file", "fallback", "location", "attachment", "assign", "solve", "reopen", "open", "sticker", "closed", "handed_over", "updated", "started"]>;
2458
+ user: z.ZodObject<{
2459
+ id: z.ZodString;
2460
+ createdAt: z.ZodDate;
2461
+ updatedAt: z.ZodDate;
2462
+ deletedAt: z.ZodNullable<z.ZodDate>;
2463
+ name: z.ZodString;
2464
+ email: z.ZodString;
2465
+ emailVerifiedAt: z.ZodNullable<z.ZodDate>;
2466
+ password: z.ZodString;
2467
+ address: z.ZodNullable<z.ZodString>;
2468
+ phone: z.ZodNullable<z.ZodString>;
2469
+ notificationCount: z.ZodNullable<z.ZodNumber>;
2470
+ roles: z.ZodArray<z.ZodObject<{
2471
+ id: z.ZodString;
2472
+ createdAt: z.ZodDate;
2473
+ updatedAt: z.ZodDate;
2474
+ deletedAt: z.ZodNullable<z.ZodDate>;
2475
+ systemName: z.ZodString;
2476
+ displayName: z.ZodString;
2477
+ description: z.ZodNullable<z.ZodString>;
2478
+ permissions: z.ZodArray<z.ZodObject<{
2479
+ id: z.ZodString;
2480
+ createdAt: z.ZodDate;
2481
+ updatedAt: z.ZodDate;
2482
+ deletedAt: z.ZodNullable<z.ZodDate>;
2483
+ systemName: z.ZodString;
2484
+ displayName: z.ZodString;
2485
+ description: z.ZodNullable<z.ZodString>;
2486
+ }, "strip", z.ZodTypeAny, {
2487
+ id: string;
2488
+ description: string | null;
2489
+ createdAt: Date;
2490
+ updatedAt: Date;
2491
+ deletedAt: Date | null;
2492
+ systemName: string;
2493
+ displayName: string;
2494
+ }, {
2495
+ id: string;
2496
+ description: string | null;
2497
+ createdAt: Date;
2498
+ updatedAt: Date;
2499
+ deletedAt: Date | null;
2500
+ systemName: string;
2501
+ displayName: string;
2502
+ }>, "many">;
2503
+ }, "strip", z.ZodTypeAny, {
2504
+ id: string;
2505
+ description: string | null;
2506
+ createdAt: Date;
2507
+ updatedAt: Date;
2508
+ deletedAt: Date | null;
2509
+ systemName: string;
2510
+ displayName: string;
2511
+ permissions: {
2512
+ id: string;
2513
+ description: string | null;
2514
+ createdAt: Date;
2515
+ updatedAt: Date;
2516
+ deletedAt: Date | null;
2517
+ systemName: string;
2518
+ displayName: string;
2519
+ }[];
2520
+ }, {
2521
+ id: string;
2522
+ description: string | null;
2523
+ createdAt: Date;
2524
+ updatedAt: Date;
2525
+ deletedAt: Date | null;
2526
+ systemName: string;
2527
+ displayName: string;
2528
+ permissions: {
2529
+ id: string;
2530
+ description: string | null;
2531
+ createdAt: Date;
2532
+ updatedAt: Date;
2533
+ deletedAt: Date | null;
2534
+ systemName: string;
2535
+ displayName: string;
2536
+ }[];
2537
+ }>, "many">;
2538
+ extension: z.ZodOptional<z.ZodObject<{
2539
+ id: z.ZodString;
2540
+ createdAt: z.ZodDate;
2541
+ updatedAt: z.ZodDate;
2542
+ deletedAt: z.ZodNullable<z.ZodDate>;
2543
+ userId: z.ZodNullable<z.ZodString>;
2544
+ sipServerUrl: z.ZodString;
2545
+ sipUserName: z.ZodString;
2546
+ extensionId: z.ZodNumber;
2547
+ extensionName: z.ZodString;
2548
+ telephonySignature: z.ZodNullable<z.ZodString>;
2549
+ }, "strip", z.ZodTypeAny, {
2550
+ id: string;
2551
+ createdAt: Date;
2552
+ updatedAt: Date;
2553
+ deletedAt: Date | null;
2554
+ userId: string | null;
2555
+ sipServerUrl: string;
2556
+ sipUserName: string;
2557
+ extensionId: number;
2558
+ extensionName: string;
2559
+ telephonySignature: string | null;
2560
+ }, {
2561
+ id: string;
2562
+ createdAt: Date;
2563
+ updatedAt: Date;
2564
+ deletedAt: Date | null;
2565
+ userId: string | null;
2566
+ sipServerUrl: string;
2567
+ sipUserName: string;
2568
+ extensionId: number;
2569
+ extensionName: string;
2570
+ telephonySignature: string | null;
2571
+ }>>;
2572
+ }, "strip", z.ZodTypeAny, {
2573
+ id: string;
2574
+ address: string | null;
2575
+ name: string;
2576
+ email: string;
2577
+ createdAt: Date;
2578
+ updatedAt: Date;
2579
+ deletedAt: Date | null;
2580
+ emailVerifiedAt: Date | null;
2581
+ password: string;
2582
+ phone: string | null;
2583
+ notificationCount: number | null;
2584
+ roles: {
2585
+ id: string;
2586
+ description: string | null;
2587
+ createdAt: Date;
2588
+ updatedAt: Date;
2589
+ deletedAt: Date | null;
2590
+ systemName: string;
2591
+ displayName: string;
2592
+ permissions: {
2593
+ id: string;
2594
+ description: string | null;
2595
+ createdAt: Date;
2596
+ updatedAt: Date;
2597
+ deletedAt: Date | null;
2598
+ systemName: string;
2599
+ displayName: string;
2600
+ }[];
2601
+ }[];
2602
+ extension?: {
2603
+ id: string;
2604
+ createdAt: Date;
2605
+ updatedAt: Date;
2606
+ deletedAt: Date | null;
2607
+ userId: string | null;
2608
+ sipServerUrl: string;
2609
+ sipUserName: string;
2610
+ extensionId: number;
2611
+ extensionName: string;
2612
+ telephonySignature: string | null;
2613
+ } | undefined;
2614
+ }, {
2615
+ id: string;
2616
+ address: string | null;
2617
+ name: string;
2618
+ email: string;
2619
+ createdAt: Date;
2620
+ updatedAt: Date;
2621
+ deletedAt: Date | null;
2622
+ emailVerifiedAt: Date | null;
2623
+ password: string;
2624
+ phone: string | null;
2625
+ notificationCount: number | null;
2626
+ roles: {
2627
+ id: string;
2628
+ description: string | null;
2629
+ createdAt: Date;
2630
+ updatedAt: Date;
2631
+ deletedAt: Date | null;
2632
+ systemName: string;
2633
+ displayName: string;
2634
+ permissions: {
2635
+ id: string;
2636
+ description: string | null;
2637
+ createdAt: Date;
2638
+ updatedAt: Date;
2639
+ deletedAt: Date | null;
2640
+ systemName: string;
2641
+ displayName: string;
2642
+ }[];
2643
+ }[];
2644
+ extension?: {
2645
+ id: string;
2646
+ createdAt: Date;
2647
+ updatedAt: Date;
2648
+ deletedAt: Date | null;
2649
+ userId: string | null;
2650
+ sipServerUrl: string;
2651
+ sipUserName: string;
2652
+ extensionId: number;
2653
+ extensionName: string;
2654
+ telephonySignature: string | null;
2655
+ } | undefined;
2656
+ }>;
2657
+ readAt: z.ZodDate;
2658
+ metadata: z.ZodAny;
2659
+ platformId: z.ZodString;
2660
+ replyPlatformMessageId: z.ZodString;
2661
+ platformMessageId: z.ZodString;
2662
+ upload: z.ZodObject<{
2663
+ id: z.ZodString;
2664
+ createdAt: z.ZodDate;
2665
+ updatedAt: z.ZodDate;
2666
+ deletedAt: z.ZodNullable<z.ZodDate>;
2667
+ bucketName: z.ZodString;
2668
+ fileName: z.ZodString;
2669
+ fileSize: z.ZodNumber;
2670
+ fileKey: z.ZodString;
2671
+ }, "strip", z.ZodTypeAny, {
2672
+ id: string;
2673
+ createdAt: Date;
2674
+ updatedAt: Date;
2675
+ deletedAt: Date | null;
2676
+ fileName: string;
2677
+ fileKey: string;
2678
+ bucketName: string;
2679
+ fileSize: number;
2680
+ }, {
2681
+ id: string;
2682
+ createdAt: Date;
2683
+ updatedAt: Date;
2684
+ deletedAt: Date | null;
2685
+ fileName: string;
2686
+ fileKey: string;
2687
+ bucketName: string;
2688
+ fileSize: number;
2689
+ }>;
2690
+ template: z.ZodAny;
2691
+ locale: z.ZodEnum<["mm", "en", "th"]>;
2692
+ isSent: z.ZodBoolean;
2693
+ }, "strip", z.ZodTypeAny, {
2694
+ type: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
2695
+ message: string;
2696
+ id: string;
2697
+ direction: "incoming" | "outgoing" | "system";
2698
+ user: {
2699
+ id: string;
2700
+ address: string | null;
2701
+ name: string;
2702
+ email: string;
2703
+ createdAt: Date;
2704
+ updatedAt: Date;
2705
+ deletedAt: Date | null;
2706
+ emailVerifiedAt: Date | null;
2707
+ password: string;
2708
+ phone: string | null;
2709
+ notificationCount: number | null;
2710
+ roles: {
2711
+ id: string;
2712
+ description: string | null;
2713
+ createdAt: Date;
2714
+ updatedAt: Date;
2715
+ deletedAt: Date | null;
2716
+ systemName: string;
2717
+ displayName: string;
2718
+ permissions: {
2719
+ id: string;
2720
+ description: string | null;
2721
+ createdAt: Date;
2722
+ updatedAt: Date;
2723
+ deletedAt: Date | null;
2724
+ systemName: string;
2725
+ displayName: string;
2726
+ }[];
2727
+ }[];
2728
+ extension?: {
2729
+ id: string;
2730
+ createdAt: Date;
2731
+ updatedAt: Date;
2732
+ deletedAt: Date | null;
2733
+ userId: string | null;
2734
+ sipServerUrl: string;
2735
+ sipUserName: string;
2736
+ extensionId: number;
2737
+ extensionName: string;
2738
+ telephonySignature: string | null;
2739
+ } | undefined;
2740
+ };
2741
+ createdAt: Date;
2742
+ updatedAt: Date;
2743
+ deletedAt: Date | null;
2744
+ platformId: string;
2745
+ upload: {
2746
+ id: string;
2747
+ createdAt: Date;
2748
+ updatedAt: Date;
2749
+ deletedAt: Date | null;
2750
+ fileName: string;
2751
+ fileKey: string;
2752
+ bucketName: string;
2753
+ fileSize: number;
2754
+ };
2755
+ readAt: Date;
2756
+ replyPlatformMessageId: string;
2757
+ platformMessageId: string;
2758
+ locale: "th" | "mm" | "en";
2759
+ isSent: boolean;
2760
+ metadata?: any;
2761
+ template?: any;
2762
+ }, {
2763
+ type: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
2764
+ message: string;
2765
+ id: string;
2766
+ direction: "incoming" | "outgoing" | "system";
2767
+ user: {
2768
+ id: string;
2769
+ address: string | null;
2770
+ name: string;
2771
+ email: string;
2772
+ createdAt: Date;
2773
+ updatedAt: Date;
2774
+ deletedAt: Date | null;
2775
+ emailVerifiedAt: Date | null;
2776
+ password: string;
2777
+ phone: string | null;
2778
+ notificationCount: number | null;
2779
+ roles: {
2780
+ id: string;
2781
+ description: string | null;
2782
+ createdAt: Date;
2783
+ updatedAt: Date;
2784
+ deletedAt: Date | null;
2785
+ systemName: string;
2786
+ displayName: string;
2787
+ permissions: {
2788
+ id: string;
2789
+ description: string | null;
2790
+ createdAt: Date;
2791
+ updatedAt: Date;
2792
+ deletedAt: Date | null;
2793
+ systemName: string;
2794
+ displayName: string;
2795
+ }[];
2796
+ }[];
2797
+ extension?: {
2798
+ id: string;
2799
+ createdAt: Date;
2800
+ updatedAt: Date;
2801
+ deletedAt: Date | null;
2802
+ userId: string | null;
2803
+ sipServerUrl: string;
2804
+ sipUserName: string;
2805
+ extensionId: number;
2806
+ extensionName: string;
2807
+ telephonySignature: string | null;
2808
+ } | undefined;
2809
+ };
2810
+ createdAt: Date;
2811
+ updatedAt: Date;
2812
+ deletedAt: Date | null;
2813
+ platformId: string;
2814
+ upload: {
2815
+ id: string;
2816
+ createdAt: Date;
2817
+ updatedAt: Date;
2818
+ deletedAt: Date | null;
2819
+ fileName: string;
2820
+ fileKey: string;
2821
+ bucketName: string;
2822
+ fileSize: number;
2823
+ };
2824
+ readAt: Date;
2825
+ replyPlatformMessageId: string;
2826
+ platformMessageId: string;
2827
+ locale: "th" | "mm" | "en";
2828
+ isSent: boolean;
2829
+ metadata?: any;
2830
+ template?: any;
2831
+ }>;
2832
+ upload: z.ZodObject<{
2833
+ id: z.ZodString;
2834
+ createdAt: z.ZodDate;
2835
+ updatedAt: z.ZodDate;
2836
+ deletedAt: z.ZodNullable<z.ZodDate>;
2837
+ bucketName: z.ZodString;
2838
+ fileName: z.ZodString;
2839
+ fileSize: z.ZodNumber;
2840
+ fileKey: z.ZodString;
2841
+ }, "strip", z.ZodTypeAny, {
2842
+ id: string;
2843
+ createdAt: Date;
2844
+ updatedAt: Date;
2845
+ deletedAt: Date | null;
2846
+ fileName: string;
2847
+ fileKey: string;
2848
+ bucketName: string;
2849
+ fileSize: number;
2850
+ }, {
2851
+ id: string;
2852
+ createdAt: Date;
2853
+ updatedAt: Date;
2854
+ deletedAt: Date | null;
2855
+ fileName: string;
2856
+ fileKey: string;
2857
+ bucketName: string;
2858
+ fileSize: number;
2859
+ }>;
2860
+ }, "strip", z.ZodTypeAny, {
2861
+ message: {
2862
+ type: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
2863
+ message: string;
2864
+ id: string;
2865
+ direction: "incoming" | "outgoing" | "system";
2866
+ user: {
2867
+ id: string;
2868
+ address: string | null;
2869
+ name: string;
2870
+ email: string;
2871
+ createdAt: Date;
2872
+ updatedAt: Date;
2873
+ deletedAt: Date | null;
2874
+ emailVerifiedAt: Date | null;
2875
+ password: string;
2876
+ phone: string | null;
2877
+ notificationCount: number | null;
2878
+ roles: {
2879
+ id: string;
2880
+ description: string | null;
2881
+ createdAt: Date;
2882
+ updatedAt: Date;
2883
+ deletedAt: Date | null;
2884
+ systemName: string;
2885
+ displayName: string;
2886
+ permissions: {
2887
+ id: string;
2888
+ description: string | null;
2889
+ createdAt: Date;
2890
+ updatedAt: Date;
2891
+ deletedAt: Date | null;
2892
+ systemName: string;
2893
+ displayName: string;
2894
+ }[];
2895
+ }[];
2896
+ extension?: {
2897
+ id: string;
2898
+ createdAt: Date;
2899
+ updatedAt: Date;
2900
+ deletedAt: Date | null;
2901
+ userId: string | null;
2902
+ sipServerUrl: string;
2903
+ sipUserName: string;
2904
+ extensionId: number;
2905
+ extensionName: string;
2906
+ telephonySignature: string | null;
2907
+ } | undefined;
2908
+ };
2909
+ createdAt: Date;
2910
+ updatedAt: Date;
2911
+ deletedAt: Date | null;
2912
+ platformId: string;
2913
+ upload: {
2914
+ id: string;
2915
+ createdAt: Date;
2916
+ updatedAt: Date;
2917
+ deletedAt: Date | null;
2918
+ fileName: string;
2919
+ fileKey: string;
2920
+ bucketName: string;
2921
+ fileSize: number;
2922
+ };
2923
+ readAt: Date;
2924
+ replyPlatformMessageId: string;
2925
+ platformMessageId: string;
2926
+ locale: "th" | "mm" | "en";
2927
+ isSent: boolean;
2928
+ metadata?: any;
2929
+ template?: any;
2930
+ };
2931
+ upload: {
2932
+ id: string;
2933
+ createdAt: Date;
2934
+ updatedAt: Date;
2935
+ deletedAt: Date | null;
2936
+ fileName: string;
2937
+ fileKey: string;
2938
+ bucketName: string;
2939
+ fileSize: number;
2940
+ };
2941
+ room: {
2942
+ id: string;
2943
+ channel: {
2944
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
2945
+ id: string;
2946
+ name: string;
2947
+ metadata: {
2948
+ id: string;
2949
+ name: string;
2950
+ accessToken: string;
2951
+ additionalCredentials?: any;
2952
+ };
2953
+ status: 0 | 1;
2954
+ createdAt: Date;
2955
+ updatedAt: Date;
2956
+ deletedAt: Date | null;
2957
+ brandName: string;
2958
+ platformId: string;
2959
+ isReloginRequired: boolean;
2960
+ connectedUserName: string;
2961
+ connectedUserId: string;
2962
+ actor?: any;
2963
+ };
2964
+ direction: "incoming" | "outgoing" | "system";
2965
+ createdAt: Date;
2966
+ updatedAt: Date;
2967
+ deletedAt: Date | null;
2968
+ actor: {
2969
+ id: string;
2970
+ address: string | null;
2971
+ name: string;
2972
+ email: string;
2973
+ createdAt: Date;
2974
+ updatedAt: Date;
2975
+ deletedAt: Date | null;
2976
+ emailVerifiedAt: Date | null;
2977
+ password: string;
2978
+ phone: string | null;
2979
+ notificationCount: number | null;
2980
+ roles: {
2981
+ id: string;
2982
+ description: string | null;
2983
+ createdAt: Date;
2984
+ updatedAt: Date;
2985
+ deletedAt: Date | null;
2986
+ systemName: string;
2987
+ displayName: string;
2988
+ permissions: {
2989
+ id: string;
2990
+ description: string | null;
2991
+ createdAt: Date;
2992
+ updatedAt: Date;
2993
+ deletedAt: Date | null;
2994
+ systemName: string;
2995
+ displayName: string;
2996
+ }[];
2997
+ }[];
2998
+ extension?: {
2999
+ id: string;
3000
+ createdAt: Date;
3001
+ updatedAt: Date;
3002
+ deletedAt: Date | null;
3003
+ userId: string | null;
3004
+ sipServerUrl: string;
3005
+ sipUserName: string;
3006
+ extensionId: number;
3007
+ extensionName: string;
3008
+ telephonySignature: string | null;
3009
+ } | undefined;
3010
+ };
3011
+ notes: string;
3012
+ tags: {
3013
+ id: string;
3014
+ name: string;
3015
+ createdAt: Date;
3016
+ updatedAt: Date;
3017
+ deletedAt: Date | null;
3018
+ }[];
3019
+ lastMessage: string;
3020
+ handleTime: number;
3021
+ isSolved: boolean;
3022
+ closeAt: Date;
3023
+ unreadCount: number;
3024
+ firstResponseTime: Date;
3025
+ isLatest: boolean;
3026
+ platformContact: {
3027
+ platform: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
3028
+ id: string;
3029
+ metadata: {
3030
+ id: string;
3031
+ name: string;
3032
+ additionalCredentials?: any;
3033
+ };
3034
+ createdAt: Date;
3035
+ updatedAt: Date;
3036
+ deletedAt: Date | null;
3037
+ contact: {
3038
+ id: string;
3039
+ channel: string | null;
3040
+ address: string | null;
3041
+ name: string;
3042
+ createdAt: Date;
3043
+ updatedAt: Date;
3044
+ deletedAt: Date | null;
3045
+ customFields: {
3046
+ id: string;
3047
+ createdAt: Date;
3048
+ updatedAt: Date;
3049
+ deletedAt: Date | null;
3050
+ attribute: {
3051
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3052
+ id: string;
3053
+ position: number;
3054
+ createdAt: Date;
3055
+ updatedAt: Date;
3056
+ deletedAt: Date | null;
3057
+ isDefault: boolean;
3058
+ systemName: string;
3059
+ displayName: string;
3060
+ isArchived: boolean;
3061
+ isRequired: boolean;
3062
+ isUnique: boolean;
3063
+ };
3064
+ textValue: string | null;
3065
+ booleanValue: boolean | null;
3066
+ numberValue: number | null;
3067
+ dateValue: Date | null;
3068
+ uploads: {
3069
+ id: string;
3070
+ createdAt: Date;
3071
+ updatedAt: Date;
3072
+ deletedAt: Date | null;
3073
+ customFieldId: string;
3074
+ upload: {
3075
+ id: string;
3076
+ createdAt: Date;
3077
+ updatedAt: Date;
3078
+ deletedAt: Date | null;
3079
+ fileName: string;
3080
+ fileKey: string;
3081
+ bucketName: string;
3082
+ fileSize: number;
3083
+ };
3084
+ }[];
3085
+ }[];
3086
+ notes: string | null;
3087
+ contactProfile: string | null;
3088
+ socialProfileUrl: string | null;
3089
+ tags: {
3090
+ id: string;
3091
+ name: string;
3092
+ createdAt: Date;
3093
+ updatedAt: Date;
3094
+ deletedAt: Date | null;
3095
+ }[];
3096
+ company: {
3097
+ id: string;
3098
+ createdAt: Date;
3099
+ updatedAt: Date;
3100
+ deletedAt: Date | null;
3101
+ address?: string | undefined;
3102
+ name?: string | undefined;
3103
+ phone?: string | undefined;
3104
+ industry?: string | undefined;
3105
+ } | null;
3106
+ contactEmails: {
3107
+ id: string;
3108
+ isPrimary: boolean;
3109
+ email: string;
3110
+ createdAt: Date;
3111
+ updatedAt: Date;
3112
+ deletedAt: Date | null;
3113
+ }[];
3114
+ contactPhones: {
3115
+ id: string;
3116
+ isPrimary: boolean;
3117
+ createdAt: Date;
3118
+ updatedAt: Date;
3119
+ deletedAt: Date | null;
3120
+ phone: string;
3121
+ }[];
3122
+ activityLogs?: {
3123
+ description: string;
3124
+ entityId: string;
3125
+ entityType: {
3126
+ description: string | null;
3127
+ entity: string;
3128
+ };
3129
+ }[] | undefined;
3130
+ };
3131
+ channelId: string;
3132
+ socialPlatformId: string;
3133
+ };
3134
+ assignee: {
3135
+ id: string;
3136
+ address: string | null;
3137
+ name: string;
3138
+ email: string;
3139
+ createdAt: Date;
3140
+ updatedAt: Date;
3141
+ deletedAt: Date | null;
3142
+ emailVerifiedAt: Date | null;
3143
+ password: string;
3144
+ phone: string | null;
3145
+ notificationCount: number | null;
3146
+ roles: {
3147
+ id: string;
3148
+ description: string | null;
3149
+ createdAt: Date;
3150
+ updatedAt: Date;
3151
+ deletedAt: Date | null;
3152
+ systemName: string;
3153
+ displayName: string;
3154
+ permissions: {
3155
+ id: string;
3156
+ description: string | null;
3157
+ createdAt: Date;
3158
+ updatedAt: Date;
3159
+ deletedAt: Date | null;
3160
+ systemName: string;
3161
+ displayName: string;
3162
+ }[];
3163
+ }[];
3164
+ extension?: {
3165
+ id: string;
3166
+ createdAt: Date;
3167
+ updatedAt: Date;
3168
+ deletedAt: Date | null;
3169
+ userId: string | null;
3170
+ sipServerUrl: string;
3171
+ sipUserName: string;
3172
+ extensionId: number;
3173
+ extensionName: string;
3174
+ telephonySignature: string | null;
3175
+ } | undefined;
3176
+ };
3177
+ };
3178
+ }, {
3179
+ message: {
3180
+ type: "attachment" | "fallback" | "location" | "file" | "closed" | "open" | "audio" | "video" | "image" | "text" | "assign" | "solve" | "reopen" | "sticker" | "handed_over" | "updated" | "started";
3181
+ message: string;
3182
+ id: string;
3183
+ direction: "incoming" | "outgoing" | "system";
3184
+ user: {
3185
+ id: string;
3186
+ address: string | null;
3187
+ name: string;
3188
+ email: string;
3189
+ createdAt: Date;
3190
+ updatedAt: Date;
3191
+ deletedAt: Date | null;
3192
+ emailVerifiedAt: Date | null;
3193
+ password: string;
3194
+ phone: string | null;
3195
+ notificationCount: number | null;
3196
+ roles: {
3197
+ id: string;
3198
+ description: string | null;
3199
+ createdAt: Date;
3200
+ updatedAt: Date;
3201
+ deletedAt: Date | null;
3202
+ systemName: string;
3203
+ displayName: string;
3204
+ permissions: {
3205
+ id: string;
3206
+ description: string | null;
3207
+ createdAt: Date;
3208
+ updatedAt: Date;
3209
+ deletedAt: Date | null;
3210
+ systemName: string;
3211
+ displayName: string;
3212
+ }[];
3213
+ }[];
3214
+ extension?: {
3215
+ id: string;
3216
+ createdAt: Date;
3217
+ updatedAt: Date;
3218
+ deletedAt: Date | null;
3219
+ userId: string | null;
3220
+ sipServerUrl: string;
3221
+ sipUserName: string;
3222
+ extensionId: number;
3223
+ extensionName: string;
3224
+ telephonySignature: string | null;
3225
+ } | undefined;
3226
+ };
3227
+ createdAt: Date;
3228
+ updatedAt: Date;
3229
+ deletedAt: Date | null;
3230
+ platformId: string;
3231
+ upload: {
3232
+ id: string;
3233
+ createdAt: Date;
3234
+ updatedAt: Date;
3235
+ deletedAt: Date | null;
3236
+ fileName: string;
3237
+ fileKey: string;
3238
+ bucketName: string;
3239
+ fileSize: number;
3240
+ };
3241
+ readAt: Date;
3242
+ replyPlatformMessageId: string;
3243
+ platformMessageId: string;
3244
+ locale: "th" | "mm" | "en";
3245
+ isSent: boolean;
3246
+ metadata?: any;
3247
+ template?: any;
3248
+ };
3249
+ upload: {
3250
+ id: string;
3251
+ createdAt: Date;
3252
+ updatedAt: Date;
3253
+ deletedAt: Date | null;
3254
+ fileName: string;
3255
+ fileKey: string;
3256
+ bucketName: string;
3257
+ fileSize: number;
3258
+ };
3259
+ room: {
3260
+ id: string;
3261
+ channel: {
3262
+ type: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
3263
+ id: string;
3264
+ name: string;
3265
+ metadata: {
3266
+ id: string;
3267
+ name: string;
3268
+ accessToken: string;
3269
+ additionalCredentials?: any;
3270
+ };
3271
+ status: 0 | 1;
3272
+ createdAt: Date;
3273
+ updatedAt: Date;
3274
+ deletedAt: Date | null;
3275
+ brandName: string;
3276
+ platformId: string;
3277
+ isReloginRequired: boolean;
3278
+ connectedUserName: string;
3279
+ connectedUserId: string;
3280
+ actor?: any;
3281
+ };
3282
+ direction: "incoming" | "outgoing" | "system";
3283
+ createdAt: Date;
3284
+ updatedAt: Date;
3285
+ deletedAt: Date | null;
3286
+ actor: {
3287
+ id: string;
3288
+ address: string | null;
3289
+ name: string;
3290
+ email: string;
3291
+ createdAt: Date;
3292
+ updatedAt: Date;
3293
+ deletedAt: Date | null;
3294
+ emailVerifiedAt: Date | null;
3295
+ password: string;
3296
+ phone: string | null;
3297
+ notificationCount: number | null;
3298
+ roles: {
3299
+ id: string;
3300
+ description: string | null;
3301
+ createdAt: Date;
3302
+ updatedAt: Date;
3303
+ deletedAt: Date | null;
3304
+ systemName: string;
3305
+ displayName: string;
3306
+ permissions: {
3307
+ id: string;
3308
+ description: string | null;
3309
+ createdAt: Date;
3310
+ updatedAt: Date;
3311
+ deletedAt: Date | null;
3312
+ systemName: string;
3313
+ displayName: string;
3314
+ }[];
3315
+ }[];
3316
+ extension?: {
3317
+ id: string;
3318
+ createdAt: Date;
3319
+ updatedAt: Date;
3320
+ deletedAt: Date | null;
3321
+ userId: string | null;
3322
+ sipServerUrl: string;
3323
+ sipUserName: string;
3324
+ extensionId: number;
3325
+ extensionName: string;
3326
+ telephonySignature: string | null;
3327
+ } | undefined;
3328
+ };
3329
+ notes: string;
3330
+ tags: {
3331
+ id: string;
3332
+ name: string;
3333
+ createdAt: Date;
3334
+ updatedAt: Date;
3335
+ deletedAt: Date | null;
3336
+ }[];
3337
+ lastMessage: string;
3338
+ handleTime: number;
3339
+ isSolved: boolean;
3340
+ closeAt: Date;
3341
+ unreadCount: number;
3342
+ firstResponseTime: Date;
3343
+ isLatest: boolean;
3344
+ platformContact: {
3345
+ platform: "line" | "whatsapp" | "messenger" | "telegram" | "viber" | "kakao" | "shopee" | "lazada";
3346
+ id: string;
3347
+ metadata: {
3348
+ id: string;
3349
+ name: string;
3350
+ additionalCredentials?: any;
3351
+ };
3352
+ createdAt: Date;
3353
+ updatedAt: Date;
3354
+ deletedAt: Date | null;
3355
+ contact: {
3356
+ id: string;
3357
+ channel: string | null;
3358
+ address: string | null;
3359
+ name: string;
3360
+ createdAt: Date;
3361
+ updatedAt: Date;
3362
+ deletedAt: Date | null;
3363
+ customFields: {
3364
+ id: string;
3365
+ createdAt: Date;
3366
+ updatedAt: Date;
3367
+ deletedAt: Date | null;
3368
+ attribute: {
3369
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
3370
+ id: string;
3371
+ position: number;
3372
+ createdAt: Date;
3373
+ updatedAt: Date;
3374
+ deletedAt: Date | null;
3375
+ isDefault: boolean;
3376
+ systemName: string;
3377
+ displayName: string;
3378
+ isArchived: boolean;
3379
+ isRequired: boolean;
3380
+ isUnique: boolean;
3381
+ };
3382
+ textValue: string | null;
3383
+ booleanValue: boolean | null;
3384
+ numberValue: number | null;
3385
+ dateValue: Date | null;
3386
+ uploads: {
3387
+ id: string;
3388
+ createdAt: Date;
3389
+ updatedAt: Date;
3390
+ deletedAt: Date | null;
3391
+ customFieldId: string;
3392
+ upload: {
3393
+ id: string;
3394
+ createdAt: Date;
3395
+ updatedAt: Date;
3396
+ deletedAt: Date | null;
3397
+ fileName: string;
3398
+ fileKey: string;
3399
+ bucketName: string;
3400
+ fileSize: number;
3401
+ };
3402
+ }[];
3403
+ }[];
3404
+ notes: string | null;
3405
+ contactProfile: string | null;
3406
+ socialProfileUrl: string | null;
3407
+ tags: {
3408
+ id: string;
3409
+ name: string;
3410
+ createdAt: Date;
3411
+ updatedAt: Date;
3412
+ deletedAt: Date | null;
3413
+ }[];
3414
+ company: {
3415
+ id: string;
3416
+ createdAt: Date;
3417
+ updatedAt: Date;
3418
+ deletedAt: Date | null;
3419
+ address?: string | undefined;
3420
+ name?: string | undefined;
3421
+ phone?: string | undefined;
3422
+ industry?: string | undefined;
3423
+ } | null;
3424
+ contactEmails: {
3425
+ id: string;
3426
+ isPrimary: boolean;
3427
+ email: string;
3428
+ createdAt: Date;
3429
+ updatedAt: Date;
3430
+ deletedAt: Date | null;
3431
+ }[];
3432
+ contactPhones: {
3433
+ id: string;
3434
+ isPrimary: boolean;
3435
+ createdAt: Date;
3436
+ updatedAt: Date;
3437
+ deletedAt: Date | null;
3438
+ phone: string;
3439
+ }[];
3440
+ activityLogs?: {
3441
+ description: string;
3442
+ entityId: string;
3443
+ entityType: {
3444
+ description: string | null;
3445
+ entity: string;
3446
+ };
3447
+ }[] | undefined;
3448
+ };
3449
+ channelId: string;
3450
+ socialPlatformId: string;
3451
+ };
3452
+ assignee: {
3453
+ id: string;
3454
+ address: string | null;
3455
+ name: string;
3456
+ email: string;
3457
+ createdAt: Date;
3458
+ updatedAt: Date;
3459
+ deletedAt: Date | null;
3460
+ emailVerifiedAt: Date | null;
3461
+ password: string;
3462
+ phone: string | null;
3463
+ notificationCount: number | null;
3464
+ roles: {
3465
+ id: string;
3466
+ description: string | null;
3467
+ createdAt: Date;
3468
+ updatedAt: Date;
3469
+ deletedAt: Date | null;
3470
+ systemName: string;
3471
+ displayName: string;
3472
+ permissions: {
3473
+ id: string;
3474
+ description: string | null;
3475
+ createdAt: Date;
3476
+ updatedAt: Date;
3477
+ deletedAt: Date | null;
3478
+ systemName: string;
3479
+ displayName: string;
3480
+ }[];
3481
+ }[];
3482
+ extension?: {
3483
+ id: string;
3484
+ createdAt: Date;
3485
+ updatedAt: Date;
3486
+ deletedAt: Date | null;
3487
+ userId: string | null;
3488
+ sipServerUrl: string;
3489
+ sipUserName: string;
3490
+ extensionId: number;
3491
+ extensionName: string;
3492
+ telephonySignature: string | null;
3493
+ } | undefined;
3494
+ };
3495
+ };
3496
+ }>;
697
3497
  //# sourceMappingURL=validation.d.ts.map