@voltade/envoy-sdk 1.0.1 → 1.0.3

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.
@@ -0,0 +1,2376 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Zod Schemas for Webhook Events
4
+ */
5
+ export declare const AccountRefSchema: z.ZodObject<{
6
+ id: z.ZodNumber;
7
+ name: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ id: number;
10
+ name: string;
11
+ }, {
12
+ id: number;
13
+ name: string;
14
+ }>;
15
+ export declare const InboxRefSchema: z.ZodObject<{
16
+ id: z.ZodNumber;
17
+ name: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ id: number;
20
+ name: string;
21
+ }, {
22
+ id: number;
23
+ name: string;
24
+ }>;
25
+ export declare const BrowserInfoSchema: z.ZodObject<{
26
+ device_name: z.ZodString;
27
+ browser_name: z.ZodString;
28
+ platform_name: z.ZodString;
29
+ browser_version: z.ZodString;
30
+ platform_version: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ device_name: string;
33
+ browser_name: string;
34
+ platform_name: string;
35
+ browser_version: string;
36
+ platform_version: string;
37
+ }, {
38
+ device_name: string;
39
+ browser_name: string;
40
+ platform_name: string;
41
+ browser_version: string;
42
+ platform_version: string;
43
+ }>;
44
+ export declare const ConversationAdditionalAttributesSchema: z.ZodObject<{
45
+ browser: z.ZodOptional<z.ZodObject<{
46
+ device_name: z.ZodString;
47
+ browser_name: z.ZodString;
48
+ platform_name: z.ZodString;
49
+ browser_version: z.ZodString;
50
+ platform_version: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ device_name: string;
53
+ browser_name: string;
54
+ platform_name: string;
55
+ browser_version: string;
56
+ platform_version: string;
57
+ }, {
58
+ device_name: string;
59
+ browser_name: string;
60
+ platform_name: string;
61
+ browser_version: string;
62
+ platform_version: string;
63
+ }>>;
64
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ initiated_at: z.ZodOptional<z.ZodObject<{
66
+ timestamp: z.ZodString;
67
+ }, "strip", z.ZodTypeAny, {
68
+ timestamp: string;
69
+ }, {
70
+ timestamp: string;
71
+ }>>;
72
+ browser_language: z.ZodOptional<z.ZodString>;
73
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
74
+ browser: z.ZodOptional<z.ZodObject<{
75
+ device_name: z.ZodString;
76
+ browser_name: z.ZodString;
77
+ platform_name: z.ZodString;
78
+ browser_version: z.ZodString;
79
+ platform_version: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ device_name: string;
82
+ browser_name: string;
83
+ platform_name: string;
84
+ browser_version: string;
85
+ platform_version: string;
86
+ }, {
87
+ device_name: string;
88
+ browser_name: string;
89
+ platform_name: string;
90
+ browser_version: string;
91
+ platform_version: string;
92
+ }>>;
93
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ initiated_at: z.ZodOptional<z.ZodObject<{
95
+ timestamp: z.ZodString;
96
+ }, "strip", z.ZodTypeAny, {
97
+ timestamp: string;
98
+ }, {
99
+ timestamp: string;
100
+ }>>;
101
+ browser_language: z.ZodOptional<z.ZodString>;
102
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
103
+ browser: z.ZodOptional<z.ZodObject<{
104
+ device_name: z.ZodString;
105
+ browser_name: z.ZodString;
106
+ platform_name: z.ZodString;
107
+ browser_version: z.ZodString;
108
+ platform_version: z.ZodString;
109
+ }, "strip", z.ZodTypeAny, {
110
+ device_name: string;
111
+ browser_name: string;
112
+ platform_name: string;
113
+ browser_version: string;
114
+ platform_version: string;
115
+ }, {
116
+ device_name: string;
117
+ browser_name: string;
118
+ platform_name: string;
119
+ browser_version: string;
120
+ platform_version: string;
121
+ }>>;
122
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ initiated_at: z.ZodOptional<z.ZodObject<{
124
+ timestamp: z.ZodString;
125
+ }, "strip", z.ZodTypeAny, {
126
+ timestamp: string;
127
+ }, {
128
+ timestamp: string;
129
+ }>>;
130
+ browser_language: z.ZodOptional<z.ZodString>;
131
+ }, z.ZodTypeAny, "passthrough">>;
132
+ export declare const WebhookSenderSchema: z.ZodObject<Omit<{
133
+ id: z.ZodNumber;
134
+ name: z.ZodNullable<z.ZodString>;
135
+ email: z.ZodNullable<z.ZodString>;
136
+ phone_number: z.ZodNullable<z.ZodString>;
137
+ thumbnail: z.ZodString;
138
+ identifier: z.ZodNullable<z.ZodString>;
139
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
140
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
141
+ blocked: z.ZodBoolean;
142
+ customer_stage: z.ZodString;
143
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
144
+ type: z.ZodOptional<z.ZodString>;
145
+ }, "type"> & {
146
+ account: z.ZodOptional<z.ZodObject<{
147
+ id: z.ZodNumber;
148
+ name: z.ZodString;
149
+ }, "strip", z.ZodTypeAny, {
150
+ id: number;
151
+ name: string;
152
+ }, {
153
+ id: number;
154
+ name: string;
155
+ }>>;
156
+ avatar: z.ZodOptional<z.ZodString>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ id: number;
159
+ name: string | null;
160
+ email: string | null;
161
+ thumbnail: string;
162
+ phone_number: string | null;
163
+ identifier: string | null;
164
+ additional_attributes: Record<string, unknown>;
165
+ custom_attributes: Record<string, unknown>;
166
+ blocked: boolean;
167
+ customer_stage: string;
168
+ customer_stage_explanation: string | null;
169
+ account?: {
170
+ id: number;
171
+ name: string;
172
+ } | undefined;
173
+ avatar?: string | undefined;
174
+ }, {
175
+ id: number;
176
+ name: string | null;
177
+ email: string | null;
178
+ thumbnail: string;
179
+ phone_number: string | null;
180
+ identifier: string | null;
181
+ additional_attributes: Record<string, unknown>;
182
+ custom_attributes: Record<string, unknown>;
183
+ blocked: boolean;
184
+ customer_stage: string;
185
+ customer_stage_explanation: string | null;
186
+ account?: {
187
+ id: number;
188
+ name: string;
189
+ } | undefined;
190
+ avatar?: string | undefined;
191
+ }>;
192
+ export declare const MinimalContactInboxSchema: z.ZodObject<{
193
+ source_id: z.ZodString;
194
+ }, "strip", z.ZodTypeAny, {
195
+ source_id: string;
196
+ }, {
197
+ source_id: string;
198
+ }>;
199
+ export declare const NestedMessageConversationSchema: z.ZodObject<{
200
+ assignee_id: z.ZodNullable<z.ZodNumber>;
201
+ unread_count: z.ZodNumber;
202
+ last_activity_at: z.ZodNumber;
203
+ contact_inbox: z.ZodObject<{
204
+ source_id: z.ZodString;
205
+ }, "strip", z.ZodTypeAny, {
206
+ source_id: string;
207
+ }, {
208
+ source_id: string;
209
+ }>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ contact_inbox: {
212
+ source_id: string;
213
+ };
214
+ unread_count: number;
215
+ last_activity_at: number;
216
+ assignee_id: number | null;
217
+ }, {
218
+ contact_inbox: {
219
+ source_id: string;
220
+ };
221
+ unread_count: number;
222
+ last_activity_at: number;
223
+ assignee_id: number | null;
224
+ }>;
225
+ export declare const MessageSenderSchema: z.ZodObject<{
226
+ id: z.ZodNumber;
227
+ name: z.ZodNullable<z.ZodString>;
228
+ email: z.ZodNullable<z.ZodString>;
229
+ phone_number: z.ZodNullable<z.ZodString>;
230
+ thumbnail: z.ZodString;
231
+ identifier: z.ZodNullable<z.ZodString>;
232
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
233
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
234
+ blocked: z.ZodBoolean;
235
+ customer_stage: z.ZodString;
236
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
237
+ type: z.ZodOptional<z.ZodString>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ id: number;
240
+ name: string | null;
241
+ email: string | null;
242
+ thumbnail: string;
243
+ phone_number: string | null;
244
+ identifier: string | null;
245
+ additional_attributes: Record<string, unknown>;
246
+ custom_attributes: Record<string, unknown>;
247
+ blocked: boolean;
248
+ customer_stage: string;
249
+ customer_stage_explanation: string | null;
250
+ type?: string | undefined;
251
+ }, {
252
+ id: number;
253
+ name: string | null;
254
+ email: string | null;
255
+ thumbnail: string;
256
+ phone_number: string | null;
257
+ identifier: string | null;
258
+ additional_attributes: Record<string, unknown>;
259
+ custom_attributes: Record<string, unknown>;
260
+ blocked: boolean;
261
+ customer_stage: string;
262
+ customer_stage_explanation: string | null;
263
+ type?: string | undefined;
264
+ }>;
265
+ export declare const WebhookMessageSchema: z.ZodObject<{
266
+ id: z.ZodNumber;
267
+ content: z.ZodNullable<z.ZodString>;
268
+ account_id: z.ZodNumber;
269
+ inbox_id: z.ZodNumber;
270
+ conversation_id: z.ZodNumber;
271
+ message_type: z.ZodNumber;
272
+ created_at: z.ZodNumber;
273
+ updated_at: z.ZodString;
274
+ private: z.ZodBoolean;
275
+ status: z.ZodString;
276
+ source_id: z.ZodNullable<z.ZodString>;
277
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
278
+ content_attributes: z.ZodObject<{
279
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
280
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
281
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
282
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
283
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
284
+ }, z.ZodTypeAny, "passthrough">>;
285
+ sender_type: z.ZodEnum<["Contact", "User"]>;
286
+ sender_id: z.ZodNumber;
287
+ external_source_ids: z.ZodRecord<z.ZodString, z.ZodUnknown>;
288
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
289
+ processed_message_content: z.ZodNullable<z.ZodString>;
290
+ sentiment: z.ZodRecord<z.ZodString, z.ZodUnknown>;
291
+ campaign_id: z.ZodNullable<z.ZodNumber>;
292
+ streaming: z.ZodBoolean;
293
+ is_ai_triggered: z.ZodBoolean;
294
+ sent_from_external_system: z.ZodBoolean;
295
+ conversation: z.ZodObject<{
296
+ assignee_id: z.ZodNullable<z.ZodNumber>;
297
+ unread_count: z.ZodNumber;
298
+ last_activity_at: z.ZodNumber;
299
+ contact_inbox: z.ZodObject<{
300
+ source_id: z.ZodString;
301
+ }, "strip", z.ZodTypeAny, {
302
+ source_id: string;
303
+ }, {
304
+ source_id: string;
305
+ }>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ contact_inbox: {
308
+ source_id: string;
309
+ };
310
+ unread_count: number;
311
+ last_activity_at: number;
312
+ assignee_id: number | null;
313
+ }, {
314
+ contact_inbox: {
315
+ source_id: string;
316
+ };
317
+ unread_count: number;
318
+ last_activity_at: number;
319
+ assignee_id: number | null;
320
+ }>;
321
+ sender: z.ZodObject<{
322
+ id: z.ZodNumber;
323
+ name: z.ZodNullable<z.ZodString>;
324
+ email: z.ZodNullable<z.ZodString>;
325
+ phone_number: z.ZodNullable<z.ZodString>;
326
+ thumbnail: z.ZodString;
327
+ identifier: z.ZodNullable<z.ZodString>;
328
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
329
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
330
+ blocked: z.ZodBoolean;
331
+ customer_stage: z.ZodString;
332
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
333
+ type: z.ZodOptional<z.ZodString>;
334
+ }, "strip", z.ZodTypeAny, {
335
+ id: number;
336
+ name: string | null;
337
+ email: string | null;
338
+ thumbnail: string;
339
+ phone_number: string | null;
340
+ identifier: string | null;
341
+ additional_attributes: Record<string, unknown>;
342
+ custom_attributes: Record<string, unknown>;
343
+ blocked: boolean;
344
+ customer_stage: string;
345
+ customer_stage_explanation: string | null;
346
+ type?: string | undefined;
347
+ }, {
348
+ id: number;
349
+ name: string | null;
350
+ email: string | null;
351
+ thumbnail: string;
352
+ phone_number: string | null;
353
+ identifier: string | null;
354
+ additional_attributes: Record<string, unknown>;
355
+ custom_attributes: Record<string, unknown>;
356
+ blocked: boolean;
357
+ customer_stage: string;
358
+ customer_stage_explanation: string | null;
359
+ type?: string | undefined;
360
+ }>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ content: string | null;
363
+ message_type: number;
364
+ private: boolean;
365
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
366
+ status: string;
367
+ content_attributes: {
368
+ in_reply_to?: unknown;
369
+ } & {
370
+ [k: string]: unknown;
371
+ };
372
+ id: number;
373
+ created_at: number;
374
+ conversation_id: number;
375
+ sender: {
376
+ id: number;
377
+ name: string | null;
378
+ email: string | null;
379
+ thumbnail: string;
380
+ phone_number: string | null;
381
+ identifier: string | null;
382
+ additional_attributes: Record<string, unknown>;
383
+ custom_attributes: Record<string, unknown>;
384
+ blocked: boolean;
385
+ customer_stage: string;
386
+ customer_stage_explanation: string | null;
387
+ type?: string | undefined;
388
+ };
389
+ additional_attributes: Record<string, unknown>;
390
+ inbox_id: number;
391
+ source_id: string | null;
392
+ updated_at: string;
393
+ account_id: number;
394
+ sender_type: "Contact" | "User";
395
+ sender_id: number;
396
+ external_source_ids: Record<string, unknown>;
397
+ processed_message_content: string | null;
398
+ sentiment: Record<string, unknown>;
399
+ campaign_id: number | null;
400
+ streaming: boolean;
401
+ is_ai_triggered: boolean;
402
+ sent_from_external_system: boolean;
403
+ conversation: {
404
+ contact_inbox: {
405
+ source_id: string;
406
+ };
407
+ unread_count: number;
408
+ last_activity_at: number;
409
+ assignee_id: number | null;
410
+ };
411
+ }, {
412
+ content: string | null;
413
+ message_type: number;
414
+ private: boolean;
415
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
416
+ status: string;
417
+ content_attributes: {
418
+ in_reply_to?: unknown;
419
+ } & {
420
+ [k: string]: unknown;
421
+ };
422
+ id: number;
423
+ created_at: number;
424
+ conversation_id: number;
425
+ sender: {
426
+ id: number;
427
+ name: string | null;
428
+ email: string | null;
429
+ thumbnail: string;
430
+ phone_number: string | null;
431
+ identifier: string | null;
432
+ additional_attributes: Record<string, unknown>;
433
+ custom_attributes: Record<string, unknown>;
434
+ blocked: boolean;
435
+ customer_stage: string;
436
+ customer_stage_explanation: string | null;
437
+ type?: string | undefined;
438
+ };
439
+ additional_attributes: Record<string, unknown>;
440
+ inbox_id: number;
441
+ source_id: string | null;
442
+ updated_at: string;
443
+ account_id: number;
444
+ sender_type: "Contact" | "User";
445
+ sender_id: number;
446
+ external_source_ids: Record<string, unknown>;
447
+ processed_message_content: string | null;
448
+ sentiment: Record<string, unknown>;
449
+ campaign_id: number | null;
450
+ streaming: boolean;
451
+ is_ai_triggered: boolean;
452
+ sent_from_external_system: boolean;
453
+ conversation: {
454
+ contact_inbox: {
455
+ source_id: string;
456
+ };
457
+ unread_count: number;
458
+ last_activity_at: number;
459
+ assignee_id: number | null;
460
+ };
461
+ }>;
462
+ export declare const WebhookConversationMetaSchema: z.ZodObject<{
463
+ sender: z.ZodObject<{
464
+ id: z.ZodNumber;
465
+ name: z.ZodNullable<z.ZodString>;
466
+ email: z.ZodNullable<z.ZodString>;
467
+ phone_number: z.ZodNullable<z.ZodString>;
468
+ thumbnail: z.ZodString;
469
+ identifier: z.ZodNullable<z.ZodString>;
470
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
471
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
472
+ blocked: z.ZodBoolean;
473
+ customer_stage: z.ZodString;
474
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
475
+ type: z.ZodOptional<z.ZodString>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ id: number;
478
+ name: string | null;
479
+ email: string | null;
480
+ thumbnail: string;
481
+ phone_number: string | null;
482
+ identifier: string | null;
483
+ additional_attributes: Record<string, unknown>;
484
+ custom_attributes: Record<string, unknown>;
485
+ blocked: boolean;
486
+ customer_stage: string;
487
+ customer_stage_explanation: string | null;
488
+ type?: string | undefined;
489
+ }, {
490
+ id: number;
491
+ name: string | null;
492
+ email: string | null;
493
+ thumbnail: string;
494
+ phone_number: string | null;
495
+ identifier: string | null;
496
+ additional_attributes: Record<string, unknown>;
497
+ custom_attributes: Record<string, unknown>;
498
+ blocked: boolean;
499
+ customer_stage: string;
500
+ customer_stage_explanation: string | null;
501
+ type?: string | undefined;
502
+ }>;
503
+ assignee: z.ZodNullable<z.ZodObject<{
504
+ id: z.ZodNumber;
505
+ name: z.ZodString;
506
+ email: z.ZodString;
507
+ }, "strip", z.ZodTypeAny, {
508
+ id: number;
509
+ name: string;
510
+ email: string;
511
+ }, {
512
+ id: number;
513
+ name: string;
514
+ email: string;
515
+ }>>;
516
+ team: z.ZodNullable<z.ZodUnknown>;
517
+ hmac_verified: z.ZodBoolean;
518
+ }, "strip", z.ZodTypeAny, {
519
+ sender: {
520
+ id: number;
521
+ name: string | null;
522
+ email: string | null;
523
+ thumbnail: string;
524
+ phone_number: string | null;
525
+ identifier: string | null;
526
+ additional_attributes: Record<string, unknown>;
527
+ custom_attributes: Record<string, unknown>;
528
+ blocked: boolean;
529
+ customer_stage: string;
530
+ customer_stage_explanation: string | null;
531
+ type?: string | undefined;
532
+ };
533
+ hmac_verified: boolean;
534
+ assignee: {
535
+ id: number;
536
+ name: string;
537
+ email: string;
538
+ } | null;
539
+ team?: unknown;
540
+ }, {
541
+ sender: {
542
+ id: number;
543
+ name: string | null;
544
+ email: string | null;
545
+ thumbnail: string;
546
+ phone_number: string | null;
547
+ identifier: string | null;
548
+ additional_attributes: Record<string, unknown>;
549
+ custom_attributes: Record<string, unknown>;
550
+ blocked: boolean;
551
+ customer_stage: string;
552
+ customer_stage_explanation: string | null;
553
+ type?: string | undefined;
554
+ };
555
+ hmac_verified: boolean;
556
+ assignee: {
557
+ id: number;
558
+ name: string;
559
+ email: string;
560
+ } | null;
561
+ team?: unknown;
562
+ }>;
563
+ export declare const WebhookConversationSchema: z.ZodObject<{
564
+ additional_attributes: z.ZodObject<{
565
+ browser: z.ZodOptional<z.ZodObject<{
566
+ device_name: z.ZodString;
567
+ browser_name: z.ZodString;
568
+ platform_name: z.ZodString;
569
+ browser_version: z.ZodString;
570
+ platform_version: z.ZodString;
571
+ }, "strip", z.ZodTypeAny, {
572
+ device_name: string;
573
+ browser_name: string;
574
+ platform_name: string;
575
+ browser_version: string;
576
+ platform_version: string;
577
+ }, {
578
+ device_name: string;
579
+ browser_name: string;
580
+ platform_name: string;
581
+ browser_version: string;
582
+ platform_version: string;
583
+ }>>;
584
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
585
+ initiated_at: z.ZodOptional<z.ZodObject<{
586
+ timestamp: z.ZodString;
587
+ }, "strip", z.ZodTypeAny, {
588
+ timestamp: string;
589
+ }, {
590
+ timestamp: string;
591
+ }>>;
592
+ browser_language: z.ZodOptional<z.ZodString>;
593
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
594
+ browser: z.ZodOptional<z.ZodObject<{
595
+ device_name: z.ZodString;
596
+ browser_name: z.ZodString;
597
+ platform_name: z.ZodString;
598
+ browser_version: z.ZodString;
599
+ platform_version: z.ZodString;
600
+ }, "strip", z.ZodTypeAny, {
601
+ device_name: string;
602
+ browser_name: string;
603
+ platform_name: string;
604
+ browser_version: string;
605
+ platform_version: string;
606
+ }, {
607
+ device_name: string;
608
+ browser_name: string;
609
+ platform_name: string;
610
+ browser_version: string;
611
+ platform_version: string;
612
+ }>>;
613
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
614
+ initiated_at: z.ZodOptional<z.ZodObject<{
615
+ timestamp: z.ZodString;
616
+ }, "strip", z.ZodTypeAny, {
617
+ timestamp: string;
618
+ }, {
619
+ timestamp: string;
620
+ }>>;
621
+ browser_language: z.ZodOptional<z.ZodString>;
622
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
623
+ browser: z.ZodOptional<z.ZodObject<{
624
+ device_name: z.ZodString;
625
+ browser_name: z.ZodString;
626
+ platform_name: z.ZodString;
627
+ browser_version: z.ZodString;
628
+ platform_version: z.ZodString;
629
+ }, "strip", z.ZodTypeAny, {
630
+ device_name: string;
631
+ browser_name: string;
632
+ platform_name: string;
633
+ browser_version: string;
634
+ platform_version: string;
635
+ }, {
636
+ device_name: string;
637
+ browser_name: string;
638
+ platform_name: string;
639
+ browser_version: string;
640
+ platform_version: string;
641
+ }>>;
642
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
643
+ initiated_at: z.ZodOptional<z.ZodObject<{
644
+ timestamp: z.ZodString;
645
+ }, "strip", z.ZodTypeAny, {
646
+ timestamp: string;
647
+ }, {
648
+ timestamp: string;
649
+ }>>;
650
+ browser_language: z.ZodOptional<z.ZodString>;
651
+ }, z.ZodTypeAny, "passthrough">>;
652
+ can_reply: z.ZodBoolean;
653
+ channel: z.ZodString;
654
+ contact_inbox: z.ZodObject<{
655
+ id: z.ZodNumber;
656
+ contact_id: z.ZodNumber;
657
+ inbox_id: z.ZodNumber;
658
+ source_id: z.ZodNullable<z.ZodString>;
659
+ created_at: z.ZodString;
660
+ updated_at: z.ZodString;
661
+ hmac_verified: z.ZodBoolean;
662
+ pubsub_token: z.ZodString;
663
+ }, "strip", z.ZodTypeAny, {
664
+ id: number;
665
+ created_at: string;
666
+ contact_id: number;
667
+ inbox_id: number;
668
+ source_id: string | null;
669
+ updated_at: string;
670
+ hmac_verified: boolean;
671
+ pubsub_token: string;
672
+ }, {
673
+ id: number;
674
+ created_at: string;
675
+ contact_id: number;
676
+ inbox_id: number;
677
+ source_id: string | null;
678
+ updated_at: string;
679
+ hmac_verified: boolean;
680
+ pubsub_token: string;
681
+ }>;
682
+ id: z.ZodNumber;
683
+ inbox_id: z.ZodNumber;
684
+ messages: z.ZodArray<z.ZodObject<{
685
+ id: z.ZodNumber;
686
+ content: z.ZodNullable<z.ZodString>;
687
+ account_id: z.ZodNumber;
688
+ inbox_id: z.ZodNumber;
689
+ conversation_id: z.ZodNumber;
690
+ message_type: z.ZodNumber;
691
+ created_at: z.ZodNumber;
692
+ updated_at: z.ZodString;
693
+ private: z.ZodBoolean;
694
+ status: z.ZodString;
695
+ source_id: z.ZodNullable<z.ZodString>;
696
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
697
+ content_attributes: z.ZodObject<{
698
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
699
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
700
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
701
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
702
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
703
+ }, z.ZodTypeAny, "passthrough">>;
704
+ sender_type: z.ZodEnum<["Contact", "User"]>;
705
+ sender_id: z.ZodNumber;
706
+ external_source_ids: z.ZodRecord<z.ZodString, z.ZodUnknown>;
707
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
708
+ processed_message_content: z.ZodNullable<z.ZodString>;
709
+ sentiment: z.ZodRecord<z.ZodString, z.ZodUnknown>;
710
+ campaign_id: z.ZodNullable<z.ZodNumber>;
711
+ streaming: z.ZodBoolean;
712
+ is_ai_triggered: z.ZodBoolean;
713
+ sent_from_external_system: z.ZodBoolean;
714
+ conversation: z.ZodObject<{
715
+ assignee_id: z.ZodNullable<z.ZodNumber>;
716
+ unread_count: z.ZodNumber;
717
+ last_activity_at: z.ZodNumber;
718
+ contact_inbox: z.ZodObject<{
719
+ source_id: z.ZodString;
720
+ }, "strip", z.ZodTypeAny, {
721
+ source_id: string;
722
+ }, {
723
+ source_id: string;
724
+ }>;
725
+ }, "strip", z.ZodTypeAny, {
726
+ contact_inbox: {
727
+ source_id: string;
728
+ };
729
+ unread_count: number;
730
+ last_activity_at: number;
731
+ assignee_id: number | null;
732
+ }, {
733
+ contact_inbox: {
734
+ source_id: string;
735
+ };
736
+ unread_count: number;
737
+ last_activity_at: number;
738
+ assignee_id: number | null;
739
+ }>;
740
+ sender: z.ZodObject<{
741
+ id: z.ZodNumber;
742
+ name: z.ZodNullable<z.ZodString>;
743
+ email: z.ZodNullable<z.ZodString>;
744
+ phone_number: z.ZodNullable<z.ZodString>;
745
+ thumbnail: z.ZodString;
746
+ identifier: z.ZodNullable<z.ZodString>;
747
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
748
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
749
+ blocked: z.ZodBoolean;
750
+ customer_stage: z.ZodString;
751
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
752
+ type: z.ZodOptional<z.ZodString>;
753
+ }, "strip", z.ZodTypeAny, {
754
+ id: number;
755
+ name: string | null;
756
+ email: string | null;
757
+ thumbnail: string;
758
+ phone_number: string | null;
759
+ identifier: string | null;
760
+ additional_attributes: Record<string, unknown>;
761
+ custom_attributes: Record<string, unknown>;
762
+ blocked: boolean;
763
+ customer_stage: string;
764
+ customer_stage_explanation: string | null;
765
+ type?: string | undefined;
766
+ }, {
767
+ id: number;
768
+ name: string | null;
769
+ email: string | null;
770
+ thumbnail: string;
771
+ phone_number: string | null;
772
+ identifier: string | null;
773
+ additional_attributes: Record<string, unknown>;
774
+ custom_attributes: Record<string, unknown>;
775
+ blocked: boolean;
776
+ customer_stage: string;
777
+ customer_stage_explanation: string | null;
778
+ type?: string | undefined;
779
+ }>;
780
+ }, "strip", z.ZodTypeAny, {
781
+ content: string | null;
782
+ message_type: number;
783
+ private: boolean;
784
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
785
+ status: string;
786
+ content_attributes: {
787
+ in_reply_to?: unknown;
788
+ } & {
789
+ [k: string]: unknown;
790
+ };
791
+ id: number;
792
+ created_at: number;
793
+ conversation_id: number;
794
+ sender: {
795
+ id: number;
796
+ name: string | null;
797
+ email: string | null;
798
+ thumbnail: string;
799
+ phone_number: string | null;
800
+ identifier: string | null;
801
+ additional_attributes: Record<string, unknown>;
802
+ custom_attributes: Record<string, unknown>;
803
+ blocked: boolean;
804
+ customer_stage: string;
805
+ customer_stage_explanation: string | null;
806
+ type?: string | undefined;
807
+ };
808
+ additional_attributes: Record<string, unknown>;
809
+ inbox_id: number;
810
+ source_id: string | null;
811
+ updated_at: string;
812
+ account_id: number;
813
+ sender_type: "Contact" | "User";
814
+ sender_id: number;
815
+ external_source_ids: Record<string, unknown>;
816
+ processed_message_content: string | null;
817
+ sentiment: Record<string, unknown>;
818
+ campaign_id: number | null;
819
+ streaming: boolean;
820
+ is_ai_triggered: boolean;
821
+ sent_from_external_system: boolean;
822
+ conversation: {
823
+ contact_inbox: {
824
+ source_id: string;
825
+ };
826
+ unread_count: number;
827
+ last_activity_at: number;
828
+ assignee_id: number | null;
829
+ };
830
+ }, {
831
+ content: string | null;
832
+ message_type: number;
833
+ private: boolean;
834
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
835
+ status: string;
836
+ content_attributes: {
837
+ in_reply_to?: unknown;
838
+ } & {
839
+ [k: string]: unknown;
840
+ };
841
+ id: number;
842
+ created_at: number;
843
+ conversation_id: number;
844
+ sender: {
845
+ id: number;
846
+ name: string | null;
847
+ email: string | null;
848
+ thumbnail: string;
849
+ phone_number: string | null;
850
+ identifier: string | null;
851
+ additional_attributes: Record<string, unknown>;
852
+ custom_attributes: Record<string, unknown>;
853
+ blocked: boolean;
854
+ customer_stage: string;
855
+ customer_stage_explanation: string | null;
856
+ type?: string | undefined;
857
+ };
858
+ additional_attributes: Record<string, unknown>;
859
+ inbox_id: number;
860
+ source_id: string | null;
861
+ updated_at: string;
862
+ account_id: number;
863
+ sender_type: "Contact" | "User";
864
+ sender_id: number;
865
+ external_source_ids: Record<string, unknown>;
866
+ processed_message_content: string | null;
867
+ sentiment: Record<string, unknown>;
868
+ campaign_id: number | null;
869
+ streaming: boolean;
870
+ is_ai_triggered: boolean;
871
+ sent_from_external_system: boolean;
872
+ conversation: {
873
+ contact_inbox: {
874
+ source_id: string;
875
+ };
876
+ unread_count: number;
877
+ last_activity_at: number;
878
+ assignee_id: number | null;
879
+ };
880
+ }>, "many">;
881
+ labels: z.ZodArray<z.ZodString, "many">;
882
+ meta: z.ZodObject<{
883
+ sender: z.ZodObject<{
884
+ id: z.ZodNumber;
885
+ name: z.ZodNullable<z.ZodString>;
886
+ email: z.ZodNullable<z.ZodString>;
887
+ phone_number: z.ZodNullable<z.ZodString>;
888
+ thumbnail: z.ZodString;
889
+ identifier: z.ZodNullable<z.ZodString>;
890
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
891
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
892
+ blocked: z.ZodBoolean;
893
+ customer_stage: z.ZodString;
894
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
895
+ type: z.ZodOptional<z.ZodString>;
896
+ }, "strip", z.ZodTypeAny, {
897
+ id: number;
898
+ name: string | null;
899
+ email: string | null;
900
+ thumbnail: string;
901
+ phone_number: string | null;
902
+ identifier: string | null;
903
+ additional_attributes: Record<string, unknown>;
904
+ custom_attributes: Record<string, unknown>;
905
+ blocked: boolean;
906
+ customer_stage: string;
907
+ customer_stage_explanation: string | null;
908
+ type?: string | undefined;
909
+ }, {
910
+ id: number;
911
+ name: string | null;
912
+ email: string | null;
913
+ thumbnail: string;
914
+ phone_number: string | null;
915
+ identifier: string | null;
916
+ additional_attributes: Record<string, unknown>;
917
+ custom_attributes: Record<string, unknown>;
918
+ blocked: boolean;
919
+ customer_stage: string;
920
+ customer_stage_explanation: string | null;
921
+ type?: string | undefined;
922
+ }>;
923
+ assignee: z.ZodNullable<z.ZodObject<{
924
+ id: z.ZodNumber;
925
+ name: z.ZodString;
926
+ email: z.ZodString;
927
+ }, "strip", z.ZodTypeAny, {
928
+ id: number;
929
+ name: string;
930
+ email: string;
931
+ }, {
932
+ id: number;
933
+ name: string;
934
+ email: string;
935
+ }>>;
936
+ team: z.ZodNullable<z.ZodUnknown>;
937
+ hmac_verified: z.ZodBoolean;
938
+ }, "strip", z.ZodTypeAny, {
939
+ sender: {
940
+ id: number;
941
+ name: string | null;
942
+ email: string | null;
943
+ thumbnail: string;
944
+ phone_number: string | null;
945
+ identifier: string | null;
946
+ additional_attributes: Record<string, unknown>;
947
+ custom_attributes: Record<string, unknown>;
948
+ blocked: boolean;
949
+ customer_stage: string;
950
+ customer_stage_explanation: string | null;
951
+ type?: string | undefined;
952
+ };
953
+ hmac_verified: boolean;
954
+ assignee: {
955
+ id: number;
956
+ name: string;
957
+ email: string;
958
+ } | null;
959
+ team?: unknown;
960
+ }, {
961
+ sender: {
962
+ id: number;
963
+ name: string | null;
964
+ email: string | null;
965
+ thumbnail: string;
966
+ phone_number: string | null;
967
+ identifier: string | null;
968
+ additional_attributes: Record<string, unknown>;
969
+ custom_attributes: Record<string, unknown>;
970
+ blocked: boolean;
971
+ customer_stage: string;
972
+ customer_stage_explanation: string | null;
973
+ type?: string | undefined;
974
+ };
975
+ hmac_verified: boolean;
976
+ assignee: {
977
+ id: number;
978
+ name: string;
979
+ email: string;
980
+ } | null;
981
+ team?: unknown;
982
+ }>;
983
+ status: z.ZodEnum<["open", "resolved", "pending", "snoozed"]>;
984
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
985
+ snoozed_until: z.ZodNullable<z.ZodNumber>;
986
+ unread_count: z.ZodNumber;
987
+ first_reply_created_at: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
988
+ priority: z.ZodNullable<z.ZodString>;
989
+ waiting_since: z.ZodNullable<z.ZodNumber>;
990
+ ai_disabled: z.ZodBoolean;
991
+ reenable_ai_at: z.ZodNullable<z.ZodNumber>;
992
+ ai_summary: z.ZodNullable<z.ZodString>;
993
+ conversation_type: z.ZodString;
994
+ agent_last_seen_at: z.ZodNumber;
995
+ contact_last_seen_at: z.ZodNumber;
996
+ last_activity_at: z.ZodNumber;
997
+ timestamp: z.ZodNumber;
998
+ created_at: z.ZodNumber;
999
+ updated_at: z.ZodNumber;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ status: "open" | "resolved" | "pending" | "snoozed";
1002
+ id: number;
1003
+ created_at: number;
1004
+ priority: string | null;
1005
+ additional_attributes: {
1006
+ browser?: {
1007
+ device_name: string;
1008
+ browser_name: string;
1009
+ platform_name: string;
1010
+ browser_version: string;
1011
+ platform_version: string;
1012
+ } | undefined;
1013
+ referer?: string | null | undefined;
1014
+ initiated_at?: {
1015
+ timestamp: string;
1016
+ } | undefined;
1017
+ browser_language?: string | undefined;
1018
+ } & {
1019
+ [k: string]: unknown;
1020
+ };
1021
+ custom_attributes: Record<string, unknown>;
1022
+ inbox_id: number;
1023
+ updated_at: number;
1024
+ channel: string;
1025
+ can_reply: boolean;
1026
+ contact_inbox: {
1027
+ id: number;
1028
+ created_at: string;
1029
+ contact_id: number;
1030
+ inbox_id: number;
1031
+ source_id: string | null;
1032
+ updated_at: string;
1033
+ hmac_verified: boolean;
1034
+ pubsub_token: string;
1035
+ };
1036
+ messages: {
1037
+ content: string | null;
1038
+ message_type: number;
1039
+ private: boolean;
1040
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
1041
+ status: string;
1042
+ content_attributes: {
1043
+ in_reply_to?: unknown;
1044
+ } & {
1045
+ [k: string]: unknown;
1046
+ };
1047
+ id: number;
1048
+ created_at: number;
1049
+ conversation_id: number;
1050
+ sender: {
1051
+ id: number;
1052
+ name: string | null;
1053
+ email: string | null;
1054
+ thumbnail: string;
1055
+ phone_number: string | null;
1056
+ identifier: string | null;
1057
+ additional_attributes: Record<string, unknown>;
1058
+ custom_attributes: Record<string, unknown>;
1059
+ blocked: boolean;
1060
+ customer_stage: string;
1061
+ customer_stage_explanation: string | null;
1062
+ type?: string | undefined;
1063
+ };
1064
+ additional_attributes: Record<string, unknown>;
1065
+ inbox_id: number;
1066
+ source_id: string | null;
1067
+ updated_at: string;
1068
+ account_id: number;
1069
+ sender_type: "Contact" | "User";
1070
+ sender_id: number;
1071
+ external_source_ids: Record<string, unknown>;
1072
+ processed_message_content: string | null;
1073
+ sentiment: Record<string, unknown>;
1074
+ campaign_id: number | null;
1075
+ streaming: boolean;
1076
+ is_ai_triggered: boolean;
1077
+ sent_from_external_system: boolean;
1078
+ conversation: {
1079
+ contact_inbox: {
1080
+ source_id: string;
1081
+ };
1082
+ unread_count: number;
1083
+ last_activity_at: number;
1084
+ assignee_id: number | null;
1085
+ };
1086
+ }[];
1087
+ meta: {
1088
+ sender: {
1089
+ id: number;
1090
+ name: string | null;
1091
+ email: string | null;
1092
+ thumbnail: string;
1093
+ phone_number: string | null;
1094
+ identifier: string | null;
1095
+ additional_attributes: Record<string, unknown>;
1096
+ custom_attributes: Record<string, unknown>;
1097
+ blocked: boolean;
1098
+ customer_stage: string;
1099
+ customer_stage_explanation: string | null;
1100
+ type?: string | undefined;
1101
+ };
1102
+ hmac_verified: boolean;
1103
+ assignee: {
1104
+ id: number;
1105
+ name: string;
1106
+ email: string;
1107
+ } | null;
1108
+ team?: unknown;
1109
+ };
1110
+ labels: string[];
1111
+ snoozed_until: number | null;
1112
+ unread_count: number;
1113
+ first_reply_created_at: string | number | null;
1114
+ waiting_since: number | null;
1115
+ ai_disabled: boolean;
1116
+ reenable_ai_at: number | null;
1117
+ ai_summary: string | null;
1118
+ conversation_type: string;
1119
+ agent_last_seen_at: number;
1120
+ contact_last_seen_at: number;
1121
+ last_activity_at: number;
1122
+ timestamp: number;
1123
+ }, {
1124
+ status: "open" | "resolved" | "pending" | "snoozed";
1125
+ id: number;
1126
+ created_at: number;
1127
+ priority: string | null;
1128
+ additional_attributes: {
1129
+ browser?: {
1130
+ device_name: string;
1131
+ browser_name: string;
1132
+ platform_name: string;
1133
+ browser_version: string;
1134
+ platform_version: string;
1135
+ } | undefined;
1136
+ referer?: string | null | undefined;
1137
+ initiated_at?: {
1138
+ timestamp: string;
1139
+ } | undefined;
1140
+ browser_language?: string | undefined;
1141
+ } & {
1142
+ [k: string]: unknown;
1143
+ };
1144
+ custom_attributes: Record<string, unknown>;
1145
+ inbox_id: number;
1146
+ updated_at: number;
1147
+ channel: string;
1148
+ can_reply: boolean;
1149
+ contact_inbox: {
1150
+ id: number;
1151
+ created_at: string;
1152
+ contact_id: number;
1153
+ inbox_id: number;
1154
+ source_id: string | null;
1155
+ updated_at: string;
1156
+ hmac_verified: boolean;
1157
+ pubsub_token: string;
1158
+ };
1159
+ messages: {
1160
+ content: string | null;
1161
+ message_type: number;
1162
+ private: boolean;
1163
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
1164
+ status: string;
1165
+ content_attributes: {
1166
+ in_reply_to?: unknown;
1167
+ } & {
1168
+ [k: string]: unknown;
1169
+ };
1170
+ id: number;
1171
+ created_at: number;
1172
+ conversation_id: number;
1173
+ sender: {
1174
+ id: number;
1175
+ name: string | null;
1176
+ email: string | null;
1177
+ thumbnail: string;
1178
+ phone_number: string | null;
1179
+ identifier: string | null;
1180
+ additional_attributes: Record<string, unknown>;
1181
+ custom_attributes: Record<string, unknown>;
1182
+ blocked: boolean;
1183
+ customer_stage: string;
1184
+ customer_stage_explanation: string | null;
1185
+ type?: string | undefined;
1186
+ };
1187
+ additional_attributes: Record<string, unknown>;
1188
+ inbox_id: number;
1189
+ source_id: string | null;
1190
+ updated_at: string;
1191
+ account_id: number;
1192
+ sender_type: "Contact" | "User";
1193
+ sender_id: number;
1194
+ external_source_ids: Record<string, unknown>;
1195
+ processed_message_content: string | null;
1196
+ sentiment: Record<string, unknown>;
1197
+ campaign_id: number | null;
1198
+ streaming: boolean;
1199
+ is_ai_triggered: boolean;
1200
+ sent_from_external_system: boolean;
1201
+ conversation: {
1202
+ contact_inbox: {
1203
+ source_id: string;
1204
+ };
1205
+ unread_count: number;
1206
+ last_activity_at: number;
1207
+ assignee_id: number | null;
1208
+ };
1209
+ }[];
1210
+ meta: {
1211
+ sender: {
1212
+ id: number;
1213
+ name: string | null;
1214
+ email: string | null;
1215
+ thumbnail: string;
1216
+ phone_number: string | null;
1217
+ identifier: string | null;
1218
+ additional_attributes: Record<string, unknown>;
1219
+ custom_attributes: Record<string, unknown>;
1220
+ blocked: boolean;
1221
+ customer_stage: string;
1222
+ customer_stage_explanation: string | null;
1223
+ type?: string | undefined;
1224
+ };
1225
+ hmac_verified: boolean;
1226
+ assignee: {
1227
+ id: number;
1228
+ name: string;
1229
+ email: string;
1230
+ } | null;
1231
+ team?: unknown;
1232
+ };
1233
+ labels: string[];
1234
+ snoozed_until: number | null;
1235
+ unread_count: number;
1236
+ first_reply_created_at: string | number | null;
1237
+ waiting_since: number | null;
1238
+ ai_disabled: boolean;
1239
+ reenable_ai_at: number | null;
1240
+ ai_summary: string | null;
1241
+ conversation_type: string;
1242
+ agent_last_seen_at: number;
1243
+ contact_last_seen_at: number;
1244
+ last_activity_at: number;
1245
+ timestamp: number;
1246
+ }>;
1247
+ export declare const MessageCreatedEventSchema: z.ZodObject<{
1248
+ account: z.ZodObject<{
1249
+ id: z.ZodNumber;
1250
+ name: z.ZodString;
1251
+ }, "strip", z.ZodTypeAny, {
1252
+ id: number;
1253
+ name: string;
1254
+ }, {
1255
+ id: number;
1256
+ name: string;
1257
+ }>;
1258
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1259
+ content_attributes: z.ZodObject<{
1260
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
1261
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1262
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
1263
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1264
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
1265
+ }, z.ZodTypeAny, "passthrough">>;
1266
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
1267
+ content: z.ZodNullable<z.ZodString>;
1268
+ conversation: z.ZodObject<{
1269
+ additional_attributes: z.ZodObject<{
1270
+ browser: z.ZodOptional<z.ZodObject<{
1271
+ device_name: z.ZodString;
1272
+ browser_name: z.ZodString;
1273
+ platform_name: z.ZodString;
1274
+ browser_version: z.ZodString;
1275
+ platform_version: z.ZodString;
1276
+ }, "strip", z.ZodTypeAny, {
1277
+ device_name: string;
1278
+ browser_name: string;
1279
+ platform_name: string;
1280
+ browser_version: string;
1281
+ platform_version: string;
1282
+ }, {
1283
+ device_name: string;
1284
+ browser_name: string;
1285
+ platform_name: string;
1286
+ browser_version: string;
1287
+ platform_version: string;
1288
+ }>>;
1289
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1290
+ initiated_at: z.ZodOptional<z.ZodObject<{
1291
+ timestamp: z.ZodString;
1292
+ }, "strip", z.ZodTypeAny, {
1293
+ timestamp: string;
1294
+ }, {
1295
+ timestamp: string;
1296
+ }>>;
1297
+ browser_language: z.ZodOptional<z.ZodString>;
1298
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1299
+ browser: z.ZodOptional<z.ZodObject<{
1300
+ device_name: z.ZodString;
1301
+ browser_name: z.ZodString;
1302
+ platform_name: z.ZodString;
1303
+ browser_version: z.ZodString;
1304
+ platform_version: z.ZodString;
1305
+ }, "strip", z.ZodTypeAny, {
1306
+ device_name: string;
1307
+ browser_name: string;
1308
+ platform_name: string;
1309
+ browser_version: string;
1310
+ platform_version: string;
1311
+ }, {
1312
+ device_name: string;
1313
+ browser_name: string;
1314
+ platform_name: string;
1315
+ browser_version: string;
1316
+ platform_version: string;
1317
+ }>>;
1318
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1319
+ initiated_at: z.ZodOptional<z.ZodObject<{
1320
+ timestamp: z.ZodString;
1321
+ }, "strip", z.ZodTypeAny, {
1322
+ timestamp: string;
1323
+ }, {
1324
+ timestamp: string;
1325
+ }>>;
1326
+ browser_language: z.ZodOptional<z.ZodString>;
1327
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1328
+ browser: z.ZodOptional<z.ZodObject<{
1329
+ device_name: z.ZodString;
1330
+ browser_name: z.ZodString;
1331
+ platform_name: z.ZodString;
1332
+ browser_version: z.ZodString;
1333
+ platform_version: z.ZodString;
1334
+ }, "strip", z.ZodTypeAny, {
1335
+ device_name: string;
1336
+ browser_name: string;
1337
+ platform_name: string;
1338
+ browser_version: string;
1339
+ platform_version: string;
1340
+ }, {
1341
+ device_name: string;
1342
+ browser_name: string;
1343
+ platform_name: string;
1344
+ browser_version: string;
1345
+ platform_version: string;
1346
+ }>>;
1347
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1348
+ initiated_at: z.ZodOptional<z.ZodObject<{
1349
+ timestamp: z.ZodString;
1350
+ }, "strip", z.ZodTypeAny, {
1351
+ timestamp: string;
1352
+ }, {
1353
+ timestamp: string;
1354
+ }>>;
1355
+ browser_language: z.ZodOptional<z.ZodString>;
1356
+ }, z.ZodTypeAny, "passthrough">>;
1357
+ can_reply: z.ZodBoolean;
1358
+ channel: z.ZodString;
1359
+ contact_inbox: z.ZodObject<{
1360
+ id: z.ZodNumber;
1361
+ contact_id: z.ZodNumber;
1362
+ inbox_id: z.ZodNumber;
1363
+ source_id: z.ZodNullable<z.ZodString>;
1364
+ created_at: z.ZodString;
1365
+ updated_at: z.ZodString;
1366
+ hmac_verified: z.ZodBoolean;
1367
+ pubsub_token: z.ZodString;
1368
+ }, "strip", z.ZodTypeAny, {
1369
+ id: number;
1370
+ created_at: string;
1371
+ contact_id: number;
1372
+ inbox_id: number;
1373
+ source_id: string | null;
1374
+ updated_at: string;
1375
+ hmac_verified: boolean;
1376
+ pubsub_token: string;
1377
+ }, {
1378
+ id: number;
1379
+ created_at: string;
1380
+ contact_id: number;
1381
+ inbox_id: number;
1382
+ source_id: string | null;
1383
+ updated_at: string;
1384
+ hmac_verified: boolean;
1385
+ pubsub_token: string;
1386
+ }>;
1387
+ id: z.ZodNumber;
1388
+ inbox_id: z.ZodNumber;
1389
+ messages: z.ZodArray<z.ZodObject<{
1390
+ id: z.ZodNumber;
1391
+ content: z.ZodNullable<z.ZodString>;
1392
+ account_id: z.ZodNumber;
1393
+ inbox_id: z.ZodNumber;
1394
+ conversation_id: z.ZodNumber;
1395
+ message_type: z.ZodNumber;
1396
+ created_at: z.ZodNumber;
1397
+ updated_at: z.ZodString;
1398
+ private: z.ZodBoolean;
1399
+ status: z.ZodString;
1400
+ source_id: z.ZodNullable<z.ZodString>;
1401
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
1402
+ content_attributes: z.ZodObject<{
1403
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
1404
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1405
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
1406
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1407
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
1408
+ }, z.ZodTypeAny, "passthrough">>;
1409
+ sender_type: z.ZodEnum<["Contact", "User"]>;
1410
+ sender_id: z.ZodNumber;
1411
+ external_source_ids: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1412
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1413
+ processed_message_content: z.ZodNullable<z.ZodString>;
1414
+ sentiment: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1415
+ campaign_id: z.ZodNullable<z.ZodNumber>;
1416
+ streaming: z.ZodBoolean;
1417
+ is_ai_triggered: z.ZodBoolean;
1418
+ sent_from_external_system: z.ZodBoolean;
1419
+ conversation: z.ZodObject<{
1420
+ assignee_id: z.ZodNullable<z.ZodNumber>;
1421
+ unread_count: z.ZodNumber;
1422
+ last_activity_at: z.ZodNumber;
1423
+ contact_inbox: z.ZodObject<{
1424
+ source_id: z.ZodString;
1425
+ }, "strip", z.ZodTypeAny, {
1426
+ source_id: string;
1427
+ }, {
1428
+ source_id: string;
1429
+ }>;
1430
+ }, "strip", z.ZodTypeAny, {
1431
+ contact_inbox: {
1432
+ source_id: string;
1433
+ };
1434
+ unread_count: number;
1435
+ last_activity_at: number;
1436
+ assignee_id: number | null;
1437
+ }, {
1438
+ contact_inbox: {
1439
+ source_id: string;
1440
+ };
1441
+ unread_count: number;
1442
+ last_activity_at: number;
1443
+ assignee_id: number | null;
1444
+ }>;
1445
+ sender: z.ZodObject<{
1446
+ id: z.ZodNumber;
1447
+ name: z.ZodNullable<z.ZodString>;
1448
+ email: z.ZodNullable<z.ZodString>;
1449
+ phone_number: z.ZodNullable<z.ZodString>;
1450
+ thumbnail: z.ZodString;
1451
+ identifier: z.ZodNullable<z.ZodString>;
1452
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1453
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1454
+ blocked: z.ZodBoolean;
1455
+ customer_stage: z.ZodString;
1456
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
1457
+ type: z.ZodOptional<z.ZodString>;
1458
+ }, "strip", z.ZodTypeAny, {
1459
+ id: number;
1460
+ name: string | null;
1461
+ email: string | null;
1462
+ thumbnail: string;
1463
+ phone_number: string | null;
1464
+ identifier: string | null;
1465
+ additional_attributes: Record<string, unknown>;
1466
+ custom_attributes: Record<string, unknown>;
1467
+ blocked: boolean;
1468
+ customer_stage: string;
1469
+ customer_stage_explanation: string | null;
1470
+ type?: string | undefined;
1471
+ }, {
1472
+ id: number;
1473
+ name: string | null;
1474
+ email: string | null;
1475
+ thumbnail: string;
1476
+ phone_number: string | null;
1477
+ identifier: string | null;
1478
+ additional_attributes: Record<string, unknown>;
1479
+ custom_attributes: Record<string, unknown>;
1480
+ blocked: boolean;
1481
+ customer_stage: string;
1482
+ customer_stage_explanation: string | null;
1483
+ type?: string | undefined;
1484
+ }>;
1485
+ }, "strip", z.ZodTypeAny, {
1486
+ content: string | null;
1487
+ message_type: number;
1488
+ private: boolean;
1489
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
1490
+ status: string;
1491
+ content_attributes: {
1492
+ in_reply_to?: unknown;
1493
+ } & {
1494
+ [k: string]: unknown;
1495
+ };
1496
+ id: number;
1497
+ created_at: number;
1498
+ conversation_id: number;
1499
+ sender: {
1500
+ id: number;
1501
+ name: string | null;
1502
+ email: string | null;
1503
+ thumbnail: string;
1504
+ phone_number: string | null;
1505
+ identifier: string | null;
1506
+ additional_attributes: Record<string, unknown>;
1507
+ custom_attributes: Record<string, unknown>;
1508
+ blocked: boolean;
1509
+ customer_stage: string;
1510
+ customer_stage_explanation: string | null;
1511
+ type?: string | undefined;
1512
+ };
1513
+ additional_attributes: Record<string, unknown>;
1514
+ inbox_id: number;
1515
+ source_id: string | null;
1516
+ updated_at: string;
1517
+ account_id: number;
1518
+ sender_type: "Contact" | "User";
1519
+ sender_id: number;
1520
+ external_source_ids: Record<string, unknown>;
1521
+ processed_message_content: string | null;
1522
+ sentiment: Record<string, unknown>;
1523
+ campaign_id: number | null;
1524
+ streaming: boolean;
1525
+ is_ai_triggered: boolean;
1526
+ sent_from_external_system: boolean;
1527
+ conversation: {
1528
+ contact_inbox: {
1529
+ source_id: string;
1530
+ };
1531
+ unread_count: number;
1532
+ last_activity_at: number;
1533
+ assignee_id: number | null;
1534
+ };
1535
+ }, {
1536
+ content: string | null;
1537
+ message_type: number;
1538
+ private: boolean;
1539
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
1540
+ status: string;
1541
+ content_attributes: {
1542
+ in_reply_to?: unknown;
1543
+ } & {
1544
+ [k: string]: unknown;
1545
+ };
1546
+ id: number;
1547
+ created_at: number;
1548
+ conversation_id: number;
1549
+ sender: {
1550
+ id: number;
1551
+ name: string | null;
1552
+ email: string | null;
1553
+ thumbnail: string;
1554
+ phone_number: string | null;
1555
+ identifier: string | null;
1556
+ additional_attributes: Record<string, unknown>;
1557
+ custom_attributes: Record<string, unknown>;
1558
+ blocked: boolean;
1559
+ customer_stage: string;
1560
+ customer_stage_explanation: string | null;
1561
+ type?: string | undefined;
1562
+ };
1563
+ additional_attributes: Record<string, unknown>;
1564
+ inbox_id: number;
1565
+ source_id: string | null;
1566
+ updated_at: string;
1567
+ account_id: number;
1568
+ sender_type: "Contact" | "User";
1569
+ sender_id: number;
1570
+ external_source_ids: Record<string, unknown>;
1571
+ processed_message_content: string | null;
1572
+ sentiment: Record<string, unknown>;
1573
+ campaign_id: number | null;
1574
+ streaming: boolean;
1575
+ is_ai_triggered: boolean;
1576
+ sent_from_external_system: boolean;
1577
+ conversation: {
1578
+ contact_inbox: {
1579
+ source_id: string;
1580
+ };
1581
+ unread_count: number;
1582
+ last_activity_at: number;
1583
+ assignee_id: number | null;
1584
+ };
1585
+ }>, "many">;
1586
+ labels: z.ZodArray<z.ZodString, "many">;
1587
+ meta: z.ZodObject<{
1588
+ sender: z.ZodObject<{
1589
+ id: z.ZodNumber;
1590
+ name: z.ZodNullable<z.ZodString>;
1591
+ email: z.ZodNullable<z.ZodString>;
1592
+ phone_number: z.ZodNullable<z.ZodString>;
1593
+ thumbnail: z.ZodString;
1594
+ identifier: z.ZodNullable<z.ZodString>;
1595
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1596
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1597
+ blocked: z.ZodBoolean;
1598
+ customer_stage: z.ZodString;
1599
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
1600
+ type: z.ZodOptional<z.ZodString>;
1601
+ }, "strip", z.ZodTypeAny, {
1602
+ id: number;
1603
+ name: string | null;
1604
+ email: string | null;
1605
+ thumbnail: string;
1606
+ phone_number: string | null;
1607
+ identifier: string | null;
1608
+ additional_attributes: Record<string, unknown>;
1609
+ custom_attributes: Record<string, unknown>;
1610
+ blocked: boolean;
1611
+ customer_stage: string;
1612
+ customer_stage_explanation: string | null;
1613
+ type?: string | undefined;
1614
+ }, {
1615
+ id: number;
1616
+ name: string | null;
1617
+ email: string | null;
1618
+ thumbnail: string;
1619
+ phone_number: string | null;
1620
+ identifier: string | null;
1621
+ additional_attributes: Record<string, unknown>;
1622
+ custom_attributes: Record<string, unknown>;
1623
+ blocked: boolean;
1624
+ customer_stage: string;
1625
+ customer_stage_explanation: string | null;
1626
+ type?: string | undefined;
1627
+ }>;
1628
+ assignee: z.ZodNullable<z.ZodObject<{
1629
+ id: z.ZodNumber;
1630
+ name: z.ZodString;
1631
+ email: z.ZodString;
1632
+ }, "strip", z.ZodTypeAny, {
1633
+ id: number;
1634
+ name: string;
1635
+ email: string;
1636
+ }, {
1637
+ id: number;
1638
+ name: string;
1639
+ email: string;
1640
+ }>>;
1641
+ team: z.ZodNullable<z.ZodUnknown>;
1642
+ hmac_verified: z.ZodBoolean;
1643
+ }, "strip", z.ZodTypeAny, {
1644
+ sender: {
1645
+ id: number;
1646
+ name: string | null;
1647
+ email: string | null;
1648
+ thumbnail: string;
1649
+ phone_number: string | null;
1650
+ identifier: string | null;
1651
+ additional_attributes: Record<string, unknown>;
1652
+ custom_attributes: Record<string, unknown>;
1653
+ blocked: boolean;
1654
+ customer_stage: string;
1655
+ customer_stage_explanation: string | null;
1656
+ type?: string | undefined;
1657
+ };
1658
+ hmac_verified: boolean;
1659
+ assignee: {
1660
+ id: number;
1661
+ name: string;
1662
+ email: string;
1663
+ } | null;
1664
+ team?: unknown;
1665
+ }, {
1666
+ sender: {
1667
+ id: number;
1668
+ name: string | null;
1669
+ email: string | null;
1670
+ thumbnail: string;
1671
+ phone_number: string | null;
1672
+ identifier: string | null;
1673
+ additional_attributes: Record<string, unknown>;
1674
+ custom_attributes: Record<string, unknown>;
1675
+ blocked: boolean;
1676
+ customer_stage: string;
1677
+ customer_stage_explanation: string | null;
1678
+ type?: string | undefined;
1679
+ };
1680
+ hmac_verified: boolean;
1681
+ assignee: {
1682
+ id: number;
1683
+ name: string;
1684
+ email: string;
1685
+ } | null;
1686
+ team?: unknown;
1687
+ }>;
1688
+ status: z.ZodEnum<["open", "resolved", "pending", "snoozed"]>;
1689
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1690
+ snoozed_until: z.ZodNullable<z.ZodNumber>;
1691
+ unread_count: z.ZodNumber;
1692
+ first_reply_created_at: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1693
+ priority: z.ZodNullable<z.ZodString>;
1694
+ waiting_since: z.ZodNullable<z.ZodNumber>;
1695
+ ai_disabled: z.ZodBoolean;
1696
+ reenable_ai_at: z.ZodNullable<z.ZodNumber>;
1697
+ ai_summary: z.ZodNullable<z.ZodString>;
1698
+ conversation_type: z.ZodString;
1699
+ agent_last_seen_at: z.ZodNumber;
1700
+ contact_last_seen_at: z.ZodNumber;
1701
+ last_activity_at: z.ZodNumber;
1702
+ timestamp: z.ZodNumber;
1703
+ created_at: z.ZodNumber;
1704
+ updated_at: z.ZodNumber;
1705
+ }, "strip", z.ZodTypeAny, {
1706
+ status: "open" | "resolved" | "pending" | "snoozed";
1707
+ id: number;
1708
+ created_at: number;
1709
+ priority: string | null;
1710
+ additional_attributes: {
1711
+ browser?: {
1712
+ device_name: string;
1713
+ browser_name: string;
1714
+ platform_name: string;
1715
+ browser_version: string;
1716
+ platform_version: string;
1717
+ } | undefined;
1718
+ referer?: string | null | undefined;
1719
+ initiated_at?: {
1720
+ timestamp: string;
1721
+ } | undefined;
1722
+ browser_language?: string | undefined;
1723
+ } & {
1724
+ [k: string]: unknown;
1725
+ };
1726
+ custom_attributes: Record<string, unknown>;
1727
+ inbox_id: number;
1728
+ updated_at: number;
1729
+ channel: string;
1730
+ can_reply: boolean;
1731
+ contact_inbox: {
1732
+ id: number;
1733
+ created_at: string;
1734
+ contact_id: number;
1735
+ inbox_id: number;
1736
+ source_id: string | null;
1737
+ updated_at: string;
1738
+ hmac_verified: boolean;
1739
+ pubsub_token: string;
1740
+ };
1741
+ messages: {
1742
+ content: string | null;
1743
+ message_type: number;
1744
+ private: boolean;
1745
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
1746
+ status: string;
1747
+ content_attributes: {
1748
+ in_reply_to?: unknown;
1749
+ } & {
1750
+ [k: string]: unknown;
1751
+ };
1752
+ id: number;
1753
+ created_at: number;
1754
+ conversation_id: number;
1755
+ sender: {
1756
+ id: number;
1757
+ name: string | null;
1758
+ email: string | null;
1759
+ thumbnail: string;
1760
+ phone_number: string | null;
1761
+ identifier: string | null;
1762
+ additional_attributes: Record<string, unknown>;
1763
+ custom_attributes: Record<string, unknown>;
1764
+ blocked: boolean;
1765
+ customer_stage: string;
1766
+ customer_stage_explanation: string | null;
1767
+ type?: string | undefined;
1768
+ };
1769
+ additional_attributes: Record<string, unknown>;
1770
+ inbox_id: number;
1771
+ source_id: string | null;
1772
+ updated_at: string;
1773
+ account_id: number;
1774
+ sender_type: "Contact" | "User";
1775
+ sender_id: number;
1776
+ external_source_ids: Record<string, unknown>;
1777
+ processed_message_content: string | null;
1778
+ sentiment: Record<string, unknown>;
1779
+ campaign_id: number | null;
1780
+ streaming: boolean;
1781
+ is_ai_triggered: boolean;
1782
+ sent_from_external_system: boolean;
1783
+ conversation: {
1784
+ contact_inbox: {
1785
+ source_id: string;
1786
+ };
1787
+ unread_count: number;
1788
+ last_activity_at: number;
1789
+ assignee_id: number | null;
1790
+ };
1791
+ }[];
1792
+ meta: {
1793
+ sender: {
1794
+ id: number;
1795
+ name: string | null;
1796
+ email: string | null;
1797
+ thumbnail: string;
1798
+ phone_number: string | null;
1799
+ identifier: string | null;
1800
+ additional_attributes: Record<string, unknown>;
1801
+ custom_attributes: Record<string, unknown>;
1802
+ blocked: boolean;
1803
+ customer_stage: string;
1804
+ customer_stage_explanation: string | null;
1805
+ type?: string | undefined;
1806
+ };
1807
+ hmac_verified: boolean;
1808
+ assignee: {
1809
+ id: number;
1810
+ name: string;
1811
+ email: string;
1812
+ } | null;
1813
+ team?: unknown;
1814
+ };
1815
+ labels: string[];
1816
+ snoozed_until: number | null;
1817
+ unread_count: number;
1818
+ first_reply_created_at: string | number | null;
1819
+ waiting_since: number | null;
1820
+ ai_disabled: boolean;
1821
+ reenable_ai_at: number | null;
1822
+ ai_summary: string | null;
1823
+ conversation_type: string;
1824
+ agent_last_seen_at: number;
1825
+ contact_last_seen_at: number;
1826
+ last_activity_at: number;
1827
+ timestamp: number;
1828
+ }, {
1829
+ status: "open" | "resolved" | "pending" | "snoozed";
1830
+ id: number;
1831
+ created_at: number;
1832
+ priority: string | null;
1833
+ additional_attributes: {
1834
+ browser?: {
1835
+ device_name: string;
1836
+ browser_name: string;
1837
+ platform_name: string;
1838
+ browser_version: string;
1839
+ platform_version: string;
1840
+ } | undefined;
1841
+ referer?: string | null | undefined;
1842
+ initiated_at?: {
1843
+ timestamp: string;
1844
+ } | undefined;
1845
+ browser_language?: string | undefined;
1846
+ } & {
1847
+ [k: string]: unknown;
1848
+ };
1849
+ custom_attributes: Record<string, unknown>;
1850
+ inbox_id: number;
1851
+ updated_at: number;
1852
+ channel: string;
1853
+ can_reply: boolean;
1854
+ contact_inbox: {
1855
+ id: number;
1856
+ created_at: string;
1857
+ contact_id: number;
1858
+ inbox_id: number;
1859
+ source_id: string | null;
1860
+ updated_at: string;
1861
+ hmac_verified: boolean;
1862
+ pubsub_token: string;
1863
+ };
1864
+ messages: {
1865
+ content: string | null;
1866
+ message_type: number;
1867
+ private: boolean;
1868
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
1869
+ status: string;
1870
+ content_attributes: {
1871
+ in_reply_to?: unknown;
1872
+ } & {
1873
+ [k: string]: unknown;
1874
+ };
1875
+ id: number;
1876
+ created_at: number;
1877
+ conversation_id: number;
1878
+ sender: {
1879
+ id: number;
1880
+ name: string | null;
1881
+ email: string | null;
1882
+ thumbnail: string;
1883
+ phone_number: string | null;
1884
+ identifier: string | null;
1885
+ additional_attributes: Record<string, unknown>;
1886
+ custom_attributes: Record<string, unknown>;
1887
+ blocked: boolean;
1888
+ customer_stage: string;
1889
+ customer_stage_explanation: string | null;
1890
+ type?: string | undefined;
1891
+ };
1892
+ additional_attributes: Record<string, unknown>;
1893
+ inbox_id: number;
1894
+ source_id: string | null;
1895
+ updated_at: string;
1896
+ account_id: number;
1897
+ sender_type: "Contact" | "User";
1898
+ sender_id: number;
1899
+ external_source_ids: Record<string, unknown>;
1900
+ processed_message_content: string | null;
1901
+ sentiment: Record<string, unknown>;
1902
+ campaign_id: number | null;
1903
+ streaming: boolean;
1904
+ is_ai_triggered: boolean;
1905
+ sent_from_external_system: boolean;
1906
+ conversation: {
1907
+ contact_inbox: {
1908
+ source_id: string;
1909
+ };
1910
+ unread_count: number;
1911
+ last_activity_at: number;
1912
+ assignee_id: number | null;
1913
+ };
1914
+ }[];
1915
+ meta: {
1916
+ sender: {
1917
+ id: number;
1918
+ name: string | null;
1919
+ email: string | null;
1920
+ thumbnail: string;
1921
+ phone_number: string | null;
1922
+ identifier: string | null;
1923
+ additional_attributes: Record<string, unknown>;
1924
+ custom_attributes: Record<string, unknown>;
1925
+ blocked: boolean;
1926
+ customer_stage: string;
1927
+ customer_stage_explanation: string | null;
1928
+ type?: string | undefined;
1929
+ };
1930
+ hmac_verified: boolean;
1931
+ assignee: {
1932
+ id: number;
1933
+ name: string;
1934
+ email: string;
1935
+ } | null;
1936
+ team?: unknown;
1937
+ };
1938
+ labels: string[];
1939
+ snoozed_until: number | null;
1940
+ unread_count: number;
1941
+ first_reply_created_at: string | number | null;
1942
+ waiting_since: number | null;
1943
+ ai_disabled: boolean;
1944
+ reenable_ai_at: number | null;
1945
+ ai_summary: string | null;
1946
+ conversation_type: string;
1947
+ agent_last_seen_at: number;
1948
+ contact_last_seen_at: number;
1949
+ last_activity_at: number;
1950
+ timestamp: number;
1951
+ }>;
1952
+ created_at: z.ZodString;
1953
+ id: z.ZodNumber;
1954
+ inbox: z.ZodObject<{
1955
+ id: z.ZodNumber;
1956
+ name: z.ZodString;
1957
+ }, "strip", z.ZodTypeAny, {
1958
+ id: number;
1959
+ name: string;
1960
+ }, {
1961
+ id: number;
1962
+ name: string;
1963
+ }>;
1964
+ message_type: z.ZodEnum<["incoming", "outgoing"]>;
1965
+ private: z.ZodBoolean;
1966
+ status: z.ZodString;
1967
+ sender: z.ZodObject<Omit<{
1968
+ id: z.ZodNumber;
1969
+ name: z.ZodNullable<z.ZodString>;
1970
+ email: z.ZodNullable<z.ZodString>;
1971
+ phone_number: z.ZodNullable<z.ZodString>;
1972
+ thumbnail: z.ZodString;
1973
+ identifier: z.ZodNullable<z.ZodString>;
1974
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1975
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1976
+ blocked: z.ZodBoolean;
1977
+ customer_stage: z.ZodString;
1978
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
1979
+ type: z.ZodOptional<z.ZodString>;
1980
+ }, "type"> & {
1981
+ account: z.ZodOptional<z.ZodObject<{
1982
+ id: z.ZodNumber;
1983
+ name: z.ZodString;
1984
+ }, "strip", z.ZodTypeAny, {
1985
+ id: number;
1986
+ name: string;
1987
+ }, {
1988
+ id: number;
1989
+ name: string;
1990
+ }>>;
1991
+ avatar: z.ZodOptional<z.ZodString>;
1992
+ }, "strip", z.ZodTypeAny, {
1993
+ id: number;
1994
+ name: string | null;
1995
+ email: string | null;
1996
+ thumbnail: string;
1997
+ phone_number: string | null;
1998
+ identifier: string | null;
1999
+ additional_attributes: Record<string, unknown>;
2000
+ custom_attributes: Record<string, unknown>;
2001
+ blocked: boolean;
2002
+ customer_stage: string;
2003
+ customer_stage_explanation: string | null;
2004
+ account?: {
2005
+ id: number;
2006
+ name: string;
2007
+ } | undefined;
2008
+ avatar?: string | undefined;
2009
+ }, {
2010
+ id: number;
2011
+ name: string | null;
2012
+ email: string | null;
2013
+ thumbnail: string;
2014
+ phone_number: string | null;
2015
+ identifier: string | null;
2016
+ additional_attributes: Record<string, unknown>;
2017
+ custom_attributes: Record<string, unknown>;
2018
+ blocked: boolean;
2019
+ customer_stage: string;
2020
+ customer_stage_explanation: string | null;
2021
+ account?: {
2022
+ id: number;
2023
+ name: string;
2024
+ } | undefined;
2025
+ avatar?: string | undefined;
2026
+ }>;
2027
+ source_id: z.ZodNullable<z.ZodString>;
2028
+ event: z.ZodLiteral<"message_created">;
2029
+ }, "strip", z.ZodTypeAny, {
2030
+ content: string | null;
2031
+ message_type: "incoming" | "outgoing";
2032
+ private: boolean;
2033
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2034
+ status: string;
2035
+ content_attributes: {
2036
+ in_reply_to?: unknown;
2037
+ } & {
2038
+ [k: string]: unknown;
2039
+ };
2040
+ id: number;
2041
+ created_at: string;
2042
+ sender: {
2043
+ id: number;
2044
+ name: string | null;
2045
+ email: string | null;
2046
+ thumbnail: string;
2047
+ phone_number: string | null;
2048
+ identifier: string | null;
2049
+ additional_attributes: Record<string, unknown>;
2050
+ custom_attributes: Record<string, unknown>;
2051
+ blocked: boolean;
2052
+ customer_stage: string;
2053
+ customer_stage_explanation: string | null;
2054
+ account?: {
2055
+ id: number;
2056
+ name: string;
2057
+ } | undefined;
2058
+ avatar?: string | undefined;
2059
+ };
2060
+ additional_attributes: Record<string, unknown>;
2061
+ source_id: string | null;
2062
+ account: {
2063
+ id: number;
2064
+ name: string;
2065
+ };
2066
+ conversation: {
2067
+ status: "open" | "resolved" | "pending" | "snoozed";
2068
+ id: number;
2069
+ created_at: number;
2070
+ priority: string | null;
2071
+ additional_attributes: {
2072
+ browser?: {
2073
+ device_name: string;
2074
+ browser_name: string;
2075
+ platform_name: string;
2076
+ browser_version: string;
2077
+ platform_version: string;
2078
+ } | undefined;
2079
+ referer?: string | null | undefined;
2080
+ initiated_at?: {
2081
+ timestamp: string;
2082
+ } | undefined;
2083
+ browser_language?: string | undefined;
2084
+ } & {
2085
+ [k: string]: unknown;
2086
+ };
2087
+ custom_attributes: Record<string, unknown>;
2088
+ inbox_id: number;
2089
+ updated_at: number;
2090
+ channel: string;
2091
+ can_reply: boolean;
2092
+ contact_inbox: {
2093
+ id: number;
2094
+ created_at: string;
2095
+ contact_id: number;
2096
+ inbox_id: number;
2097
+ source_id: string | null;
2098
+ updated_at: string;
2099
+ hmac_verified: boolean;
2100
+ pubsub_token: string;
2101
+ };
2102
+ messages: {
2103
+ content: string | null;
2104
+ message_type: number;
2105
+ private: boolean;
2106
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2107
+ status: string;
2108
+ content_attributes: {
2109
+ in_reply_to?: unknown;
2110
+ } & {
2111
+ [k: string]: unknown;
2112
+ };
2113
+ id: number;
2114
+ created_at: number;
2115
+ conversation_id: number;
2116
+ sender: {
2117
+ id: number;
2118
+ name: string | null;
2119
+ email: string | null;
2120
+ thumbnail: string;
2121
+ phone_number: string | null;
2122
+ identifier: string | null;
2123
+ additional_attributes: Record<string, unknown>;
2124
+ custom_attributes: Record<string, unknown>;
2125
+ blocked: boolean;
2126
+ customer_stage: string;
2127
+ customer_stage_explanation: string | null;
2128
+ type?: string | undefined;
2129
+ };
2130
+ additional_attributes: Record<string, unknown>;
2131
+ inbox_id: number;
2132
+ source_id: string | null;
2133
+ updated_at: string;
2134
+ account_id: number;
2135
+ sender_type: "Contact" | "User";
2136
+ sender_id: number;
2137
+ external_source_ids: Record<string, unknown>;
2138
+ processed_message_content: string | null;
2139
+ sentiment: Record<string, unknown>;
2140
+ campaign_id: number | null;
2141
+ streaming: boolean;
2142
+ is_ai_triggered: boolean;
2143
+ sent_from_external_system: boolean;
2144
+ conversation: {
2145
+ contact_inbox: {
2146
+ source_id: string;
2147
+ };
2148
+ unread_count: number;
2149
+ last_activity_at: number;
2150
+ assignee_id: number | null;
2151
+ };
2152
+ }[];
2153
+ meta: {
2154
+ sender: {
2155
+ id: number;
2156
+ name: string | null;
2157
+ email: string | null;
2158
+ thumbnail: string;
2159
+ phone_number: string | null;
2160
+ identifier: string | null;
2161
+ additional_attributes: Record<string, unknown>;
2162
+ custom_attributes: Record<string, unknown>;
2163
+ blocked: boolean;
2164
+ customer_stage: string;
2165
+ customer_stage_explanation: string | null;
2166
+ type?: string | undefined;
2167
+ };
2168
+ hmac_verified: boolean;
2169
+ assignee: {
2170
+ id: number;
2171
+ name: string;
2172
+ email: string;
2173
+ } | null;
2174
+ team?: unknown;
2175
+ };
2176
+ labels: string[];
2177
+ snoozed_until: number | null;
2178
+ unread_count: number;
2179
+ first_reply_created_at: string | number | null;
2180
+ waiting_since: number | null;
2181
+ ai_disabled: boolean;
2182
+ reenable_ai_at: number | null;
2183
+ ai_summary: string | null;
2184
+ conversation_type: string;
2185
+ agent_last_seen_at: number;
2186
+ contact_last_seen_at: number;
2187
+ last_activity_at: number;
2188
+ timestamp: number;
2189
+ };
2190
+ inbox: {
2191
+ id: number;
2192
+ name: string;
2193
+ };
2194
+ event: "message_created";
2195
+ }, {
2196
+ content: string | null;
2197
+ message_type: "incoming" | "outgoing";
2198
+ private: boolean;
2199
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2200
+ status: string;
2201
+ content_attributes: {
2202
+ in_reply_to?: unknown;
2203
+ } & {
2204
+ [k: string]: unknown;
2205
+ };
2206
+ id: number;
2207
+ created_at: string;
2208
+ sender: {
2209
+ id: number;
2210
+ name: string | null;
2211
+ email: string | null;
2212
+ thumbnail: string;
2213
+ phone_number: string | null;
2214
+ identifier: string | null;
2215
+ additional_attributes: Record<string, unknown>;
2216
+ custom_attributes: Record<string, unknown>;
2217
+ blocked: boolean;
2218
+ customer_stage: string;
2219
+ customer_stage_explanation: string | null;
2220
+ account?: {
2221
+ id: number;
2222
+ name: string;
2223
+ } | undefined;
2224
+ avatar?: string | undefined;
2225
+ };
2226
+ additional_attributes: Record<string, unknown>;
2227
+ source_id: string | null;
2228
+ account: {
2229
+ id: number;
2230
+ name: string;
2231
+ };
2232
+ conversation: {
2233
+ status: "open" | "resolved" | "pending" | "snoozed";
2234
+ id: number;
2235
+ created_at: number;
2236
+ priority: string | null;
2237
+ additional_attributes: {
2238
+ browser?: {
2239
+ device_name: string;
2240
+ browser_name: string;
2241
+ platform_name: string;
2242
+ browser_version: string;
2243
+ platform_version: string;
2244
+ } | undefined;
2245
+ referer?: string | null | undefined;
2246
+ initiated_at?: {
2247
+ timestamp: string;
2248
+ } | undefined;
2249
+ browser_language?: string | undefined;
2250
+ } & {
2251
+ [k: string]: unknown;
2252
+ };
2253
+ custom_attributes: Record<string, unknown>;
2254
+ inbox_id: number;
2255
+ updated_at: number;
2256
+ channel: string;
2257
+ can_reply: boolean;
2258
+ contact_inbox: {
2259
+ id: number;
2260
+ created_at: string;
2261
+ contact_id: number;
2262
+ inbox_id: number;
2263
+ source_id: string | null;
2264
+ updated_at: string;
2265
+ hmac_verified: boolean;
2266
+ pubsub_token: string;
2267
+ };
2268
+ messages: {
2269
+ content: string | null;
2270
+ message_type: number;
2271
+ private: boolean;
2272
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2273
+ status: string;
2274
+ content_attributes: {
2275
+ in_reply_to?: unknown;
2276
+ } & {
2277
+ [k: string]: unknown;
2278
+ };
2279
+ id: number;
2280
+ created_at: number;
2281
+ conversation_id: number;
2282
+ sender: {
2283
+ id: number;
2284
+ name: string | null;
2285
+ email: string | null;
2286
+ thumbnail: string;
2287
+ phone_number: string | null;
2288
+ identifier: string | null;
2289
+ additional_attributes: Record<string, unknown>;
2290
+ custom_attributes: Record<string, unknown>;
2291
+ blocked: boolean;
2292
+ customer_stage: string;
2293
+ customer_stage_explanation: string | null;
2294
+ type?: string | undefined;
2295
+ };
2296
+ additional_attributes: Record<string, unknown>;
2297
+ inbox_id: number;
2298
+ source_id: string | null;
2299
+ updated_at: string;
2300
+ account_id: number;
2301
+ sender_type: "Contact" | "User";
2302
+ sender_id: number;
2303
+ external_source_ids: Record<string, unknown>;
2304
+ processed_message_content: string | null;
2305
+ sentiment: Record<string, unknown>;
2306
+ campaign_id: number | null;
2307
+ streaming: boolean;
2308
+ is_ai_triggered: boolean;
2309
+ sent_from_external_system: boolean;
2310
+ conversation: {
2311
+ contact_inbox: {
2312
+ source_id: string;
2313
+ };
2314
+ unread_count: number;
2315
+ last_activity_at: number;
2316
+ assignee_id: number | null;
2317
+ };
2318
+ }[];
2319
+ meta: {
2320
+ sender: {
2321
+ id: number;
2322
+ name: string | null;
2323
+ email: string | null;
2324
+ thumbnail: string;
2325
+ phone_number: string | null;
2326
+ identifier: string | null;
2327
+ additional_attributes: Record<string, unknown>;
2328
+ custom_attributes: Record<string, unknown>;
2329
+ blocked: boolean;
2330
+ customer_stage: string;
2331
+ customer_stage_explanation: string | null;
2332
+ type?: string | undefined;
2333
+ };
2334
+ hmac_verified: boolean;
2335
+ assignee: {
2336
+ id: number;
2337
+ name: string;
2338
+ email: string;
2339
+ } | null;
2340
+ team?: unknown;
2341
+ };
2342
+ labels: string[];
2343
+ snoozed_until: number | null;
2344
+ unread_count: number;
2345
+ first_reply_created_at: string | number | null;
2346
+ waiting_since: number | null;
2347
+ ai_disabled: boolean;
2348
+ reenable_ai_at: number | null;
2349
+ ai_summary: string | null;
2350
+ conversation_type: string;
2351
+ agent_last_seen_at: number;
2352
+ contact_last_seen_at: number;
2353
+ last_activity_at: number;
2354
+ timestamp: number;
2355
+ };
2356
+ inbox: {
2357
+ id: number;
2358
+ name: string;
2359
+ };
2360
+ event: "message_created";
2361
+ }>;
2362
+ /**
2363
+ * TypeScript Types (inferred from Zod schemas)
2364
+ */
2365
+ export type AccountRef = z.infer<typeof AccountRefSchema>;
2366
+ export type InboxRef = z.infer<typeof InboxRefSchema>;
2367
+ export type BrowserInfo = z.infer<typeof BrowserInfoSchema>;
2368
+ export type ConversationAdditionalAttributes = z.infer<typeof ConversationAdditionalAttributesSchema>;
2369
+ export type WebhookSender = z.infer<typeof WebhookSenderSchema>;
2370
+ export type NestedMessageConversation = z.infer<typeof NestedMessageConversationSchema>;
2371
+ export type MessageSender = z.infer<typeof MessageSenderSchema>;
2372
+ export type WebhookMessage = z.infer<typeof WebhookMessageSchema>;
2373
+ export type WebhookConversationMeta = z.infer<typeof WebhookConversationMetaSchema>;
2374
+ export type WebhookConversation = z.infer<typeof WebhookConversationSchema>;
2375
+ export type MessageCreatedEvent = z.infer<typeof MessageCreatedEventSchema>;
2376
+ //# sourceMappingURL=types.d.ts.map