@voltade/envoy-sdk 1.0.3 → 1.0.5

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.
@@ -2025,6 +2025,7 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
2025
2025
  avatar?: string | undefined;
2026
2026
  }>;
2027
2027
  source_id: z.ZodNullable<z.ZodString>;
2028
+ } & {
2028
2029
  event: z.ZodLiteral<"message_created">;
2029
2030
  }, "strip", z.ZodTypeAny, {
2030
2031
  content: string | null;
@@ -2359,6 +2360,3353 @@ export declare const MessageCreatedEventSchema: z.ZodObject<{
2359
2360
  };
2360
2361
  event: "message_created";
2361
2362
  }>;
2363
+ export declare const MessageUpdatedEventSchema: z.ZodObject<{
2364
+ account: z.ZodObject<{
2365
+ id: z.ZodNumber;
2366
+ name: z.ZodString;
2367
+ }, "strip", z.ZodTypeAny, {
2368
+ id: number;
2369
+ name: string;
2370
+ }, {
2371
+ id: number;
2372
+ name: string;
2373
+ }>;
2374
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2375
+ content_attributes: z.ZodObject<{
2376
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
2377
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2378
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
2379
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2380
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
2381
+ }, z.ZodTypeAny, "passthrough">>;
2382
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
2383
+ content: z.ZodNullable<z.ZodString>;
2384
+ conversation: z.ZodObject<{
2385
+ additional_attributes: z.ZodObject<{
2386
+ browser: z.ZodOptional<z.ZodObject<{
2387
+ device_name: z.ZodString;
2388
+ browser_name: z.ZodString;
2389
+ platform_name: z.ZodString;
2390
+ browser_version: z.ZodString;
2391
+ platform_version: z.ZodString;
2392
+ }, "strip", z.ZodTypeAny, {
2393
+ device_name: string;
2394
+ browser_name: string;
2395
+ platform_name: string;
2396
+ browser_version: string;
2397
+ platform_version: string;
2398
+ }, {
2399
+ device_name: string;
2400
+ browser_name: string;
2401
+ platform_name: string;
2402
+ browser_version: string;
2403
+ platform_version: string;
2404
+ }>>;
2405
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2406
+ initiated_at: z.ZodOptional<z.ZodObject<{
2407
+ timestamp: z.ZodString;
2408
+ }, "strip", z.ZodTypeAny, {
2409
+ timestamp: string;
2410
+ }, {
2411
+ timestamp: string;
2412
+ }>>;
2413
+ browser_language: z.ZodOptional<z.ZodString>;
2414
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2415
+ browser: z.ZodOptional<z.ZodObject<{
2416
+ device_name: z.ZodString;
2417
+ browser_name: z.ZodString;
2418
+ platform_name: z.ZodString;
2419
+ browser_version: z.ZodString;
2420
+ platform_version: z.ZodString;
2421
+ }, "strip", z.ZodTypeAny, {
2422
+ device_name: string;
2423
+ browser_name: string;
2424
+ platform_name: string;
2425
+ browser_version: string;
2426
+ platform_version: string;
2427
+ }, {
2428
+ device_name: string;
2429
+ browser_name: string;
2430
+ platform_name: string;
2431
+ browser_version: string;
2432
+ platform_version: string;
2433
+ }>>;
2434
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2435
+ initiated_at: z.ZodOptional<z.ZodObject<{
2436
+ timestamp: z.ZodString;
2437
+ }, "strip", z.ZodTypeAny, {
2438
+ timestamp: string;
2439
+ }, {
2440
+ timestamp: string;
2441
+ }>>;
2442
+ browser_language: z.ZodOptional<z.ZodString>;
2443
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2444
+ browser: z.ZodOptional<z.ZodObject<{
2445
+ device_name: z.ZodString;
2446
+ browser_name: z.ZodString;
2447
+ platform_name: z.ZodString;
2448
+ browser_version: z.ZodString;
2449
+ platform_version: z.ZodString;
2450
+ }, "strip", z.ZodTypeAny, {
2451
+ device_name: string;
2452
+ browser_name: string;
2453
+ platform_name: string;
2454
+ browser_version: string;
2455
+ platform_version: string;
2456
+ }, {
2457
+ device_name: string;
2458
+ browser_name: string;
2459
+ platform_name: string;
2460
+ browser_version: string;
2461
+ platform_version: string;
2462
+ }>>;
2463
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2464
+ initiated_at: z.ZodOptional<z.ZodObject<{
2465
+ timestamp: z.ZodString;
2466
+ }, "strip", z.ZodTypeAny, {
2467
+ timestamp: string;
2468
+ }, {
2469
+ timestamp: string;
2470
+ }>>;
2471
+ browser_language: z.ZodOptional<z.ZodString>;
2472
+ }, z.ZodTypeAny, "passthrough">>;
2473
+ can_reply: z.ZodBoolean;
2474
+ channel: z.ZodString;
2475
+ contact_inbox: z.ZodObject<{
2476
+ id: z.ZodNumber;
2477
+ contact_id: z.ZodNumber;
2478
+ inbox_id: z.ZodNumber;
2479
+ source_id: z.ZodNullable<z.ZodString>;
2480
+ created_at: z.ZodString;
2481
+ updated_at: z.ZodString;
2482
+ hmac_verified: z.ZodBoolean;
2483
+ pubsub_token: z.ZodString;
2484
+ }, "strip", z.ZodTypeAny, {
2485
+ id: number;
2486
+ created_at: string;
2487
+ contact_id: number;
2488
+ inbox_id: number;
2489
+ source_id: string | null;
2490
+ updated_at: string;
2491
+ hmac_verified: boolean;
2492
+ pubsub_token: string;
2493
+ }, {
2494
+ id: number;
2495
+ created_at: string;
2496
+ contact_id: number;
2497
+ inbox_id: number;
2498
+ source_id: string | null;
2499
+ updated_at: string;
2500
+ hmac_verified: boolean;
2501
+ pubsub_token: string;
2502
+ }>;
2503
+ id: z.ZodNumber;
2504
+ inbox_id: z.ZodNumber;
2505
+ messages: z.ZodArray<z.ZodObject<{
2506
+ id: z.ZodNumber;
2507
+ content: z.ZodNullable<z.ZodString>;
2508
+ account_id: z.ZodNumber;
2509
+ inbox_id: z.ZodNumber;
2510
+ conversation_id: z.ZodNumber;
2511
+ message_type: z.ZodNumber;
2512
+ created_at: z.ZodNumber;
2513
+ updated_at: z.ZodString;
2514
+ private: z.ZodBoolean;
2515
+ status: z.ZodString;
2516
+ source_id: z.ZodNullable<z.ZodString>;
2517
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
2518
+ content_attributes: z.ZodObject<{
2519
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
2520
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2521
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
2522
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2523
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
2524
+ }, z.ZodTypeAny, "passthrough">>;
2525
+ sender_type: z.ZodEnum<["Contact", "User"]>;
2526
+ sender_id: z.ZodNumber;
2527
+ external_source_ids: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2528
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2529
+ processed_message_content: z.ZodNullable<z.ZodString>;
2530
+ sentiment: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2531
+ campaign_id: z.ZodNullable<z.ZodNumber>;
2532
+ streaming: z.ZodBoolean;
2533
+ is_ai_triggered: z.ZodBoolean;
2534
+ sent_from_external_system: z.ZodBoolean;
2535
+ conversation: z.ZodObject<{
2536
+ assignee_id: z.ZodNullable<z.ZodNumber>;
2537
+ unread_count: z.ZodNumber;
2538
+ last_activity_at: z.ZodNumber;
2539
+ contact_inbox: z.ZodObject<{
2540
+ source_id: z.ZodString;
2541
+ }, "strip", z.ZodTypeAny, {
2542
+ source_id: string;
2543
+ }, {
2544
+ source_id: string;
2545
+ }>;
2546
+ }, "strip", z.ZodTypeAny, {
2547
+ contact_inbox: {
2548
+ source_id: string;
2549
+ };
2550
+ unread_count: number;
2551
+ last_activity_at: number;
2552
+ assignee_id: number | null;
2553
+ }, {
2554
+ contact_inbox: {
2555
+ source_id: string;
2556
+ };
2557
+ unread_count: number;
2558
+ last_activity_at: number;
2559
+ assignee_id: number | null;
2560
+ }>;
2561
+ sender: z.ZodObject<{
2562
+ id: z.ZodNumber;
2563
+ name: z.ZodNullable<z.ZodString>;
2564
+ email: z.ZodNullable<z.ZodString>;
2565
+ phone_number: z.ZodNullable<z.ZodString>;
2566
+ thumbnail: z.ZodString;
2567
+ identifier: z.ZodNullable<z.ZodString>;
2568
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2569
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2570
+ blocked: z.ZodBoolean;
2571
+ customer_stage: z.ZodString;
2572
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
2573
+ type: z.ZodOptional<z.ZodString>;
2574
+ }, "strip", z.ZodTypeAny, {
2575
+ id: number;
2576
+ name: string | null;
2577
+ email: string | null;
2578
+ thumbnail: string;
2579
+ phone_number: string | null;
2580
+ identifier: string | null;
2581
+ additional_attributes: Record<string, unknown>;
2582
+ custom_attributes: Record<string, unknown>;
2583
+ blocked: boolean;
2584
+ customer_stage: string;
2585
+ customer_stage_explanation: string | null;
2586
+ type?: string | undefined;
2587
+ }, {
2588
+ id: number;
2589
+ name: string | null;
2590
+ email: string | null;
2591
+ thumbnail: string;
2592
+ phone_number: string | null;
2593
+ identifier: string | null;
2594
+ additional_attributes: Record<string, unknown>;
2595
+ custom_attributes: Record<string, unknown>;
2596
+ blocked: boolean;
2597
+ customer_stage: string;
2598
+ customer_stage_explanation: string | null;
2599
+ type?: string | undefined;
2600
+ }>;
2601
+ }, "strip", z.ZodTypeAny, {
2602
+ content: string | null;
2603
+ message_type: number;
2604
+ private: boolean;
2605
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2606
+ status: string;
2607
+ content_attributes: {
2608
+ in_reply_to?: unknown;
2609
+ } & {
2610
+ [k: string]: unknown;
2611
+ };
2612
+ id: number;
2613
+ created_at: number;
2614
+ conversation_id: number;
2615
+ sender: {
2616
+ id: number;
2617
+ name: string | null;
2618
+ email: string | null;
2619
+ thumbnail: string;
2620
+ phone_number: string | null;
2621
+ identifier: string | null;
2622
+ additional_attributes: Record<string, unknown>;
2623
+ custom_attributes: Record<string, unknown>;
2624
+ blocked: boolean;
2625
+ customer_stage: string;
2626
+ customer_stage_explanation: string | null;
2627
+ type?: string | undefined;
2628
+ };
2629
+ additional_attributes: Record<string, unknown>;
2630
+ inbox_id: number;
2631
+ source_id: string | null;
2632
+ updated_at: string;
2633
+ account_id: number;
2634
+ sender_type: "Contact" | "User";
2635
+ sender_id: number;
2636
+ external_source_ids: Record<string, unknown>;
2637
+ processed_message_content: string | null;
2638
+ sentiment: Record<string, unknown>;
2639
+ campaign_id: number | null;
2640
+ streaming: boolean;
2641
+ is_ai_triggered: boolean;
2642
+ sent_from_external_system: boolean;
2643
+ conversation: {
2644
+ contact_inbox: {
2645
+ source_id: string;
2646
+ };
2647
+ unread_count: number;
2648
+ last_activity_at: number;
2649
+ assignee_id: number | null;
2650
+ };
2651
+ }, {
2652
+ content: string | null;
2653
+ message_type: number;
2654
+ private: boolean;
2655
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2656
+ status: string;
2657
+ content_attributes: {
2658
+ in_reply_to?: unknown;
2659
+ } & {
2660
+ [k: string]: unknown;
2661
+ };
2662
+ id: number;
2663
+ created_at: number;
2664
+ conversation_id: number;
2665
+ sender: {
2666
+ id: number;
2667
+ name: string | null;
2668
+ email: string | null;
2669
+ thumbnail: string;
2670
+ phone_number: string | null;
2671
+ identifier: string | null;
2672
+ additional_attributes: Record<string, unknown>;
2673
+ custom_attributes: Record<string, unknown>;
2674
+ blocked: boolean;
2675
+ customer_stage: string;
2676
+ customer_stage_explanation: string | null;
2677
+ type?: string | undefined;
2678
+ };
2679
+ additional_attributes: Record<string, unknown>;
2680
+ inbox_id: number;
2681
+ source_id: string | null;
2682
+ updated_at: string;
2683
+ account_id: number;
2684
+ sender_type: "Contact" | "User";
2685
+ sender_id: number;
2686
+ external_source_ids: Record<string, unknown>;
2687
+ processed_message_content: string | null;
2688
+ sentiment: Record<string, unknown>;
2689
+ campaign_id: number | null;
2690
+ streaming: boolean;
2691
+ is_ai_triggered: boolean;
2692
+ sent_from_external_system: boolean;
2693
+ conversation: {
2694
+ contact_inbox: {
2695
+ source_id: string;
2696
+ };
2697
+ unread_count: number;
2698
+ last_activity_at: number;
2699
+ assignee_id: number | null;
2700
+ };
2701
+ }>, "many">;
2702
+ labels: z.ZodArray<z.ZodString, "many">;
2703
+ meta: z.ZodObject<{
2704
+ sender: z.ZodObject<{
2705
+ id: z.ZodNumber;
2706
+ name: z.ZodNullable<z.ZodString>;
2707
+ email: z.ZodNullable<z.ZodString>;
2708
+ phone_number: z.ZodNullable<z.ZodString>;
2709
+ thumbnail: z.ZodString;
2710
+ identifier: z.ZodNullable<z.ZodString>;
2711
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2712
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2713
+ blocked: z.ZodBoolean;
2714
+ customer_stage: z.ZodString;
2715
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
2716
+ type: z.ZodOptional<z.ZodString>;
2717
+ }, "strip", z.ZodTypeAny, {
2718
+ id: number;
2719
+ name: string | null;
2720
+ email: string | null;
2721
+ thumbnail: string;
2722
+ phone_number: string | null;
2723
+ identifier: string | null;
2724
+ additional_attributes: Record<string, unknown>;
2725
+ custom_attributes: Record<string, unknown>;
2726
+ blocked: boolean;
2727
+ customer_stage: string;
2728
+ customer_stage_explanation: string | null;
2729
+ type?: string | undefined;
2730
+ }, {
2731
+ id: number;
2732
+ name: string | null;
2733
+ email: string | null;
2734
+ thumbnail: string;
2735
+ phone_number: string | null;
2736
+ identifier: string | null;
2737
+ additional_attributes: Record<string, unknown>;
2738
+ custom_attributes: Record<string, unknown>;
2739
+ blocked: boolean;
2740
+ customer_stage: string;
2741
+ customer_stage_explanation: string | null;
2742
+ type?: string | undefined;
2743
+ }>;
2744
+ assignee: z.ZodNullable<z.ZodObject<{
2745
+ id: z.ZodNumber;
2746
+ name: z.ZodString;
2747
+ email: z.ZodString;
2748
+ }, "strip", z.ZodTypeAny, {
2749
+ id: number;
2750
+ name: string;
2751
+ email: string;
2752
+ }, {
2753
+ id: number;
2754
+ name: string;
2755
+ email: string;
2756
+ }>>;
2757
+ team: z.ZodNullable<z.ZodUnknown>;
2758
+ hmac_verified: z.ZodBoolean;
2759
+ }, "strip", z.ZodTypeAny, {
2760
+ sender: {
2761
+ id: number;
2762
+ name: string | null;
2763
+ email: string | null;
2764
+ thumbnail: string;
2765
+ phone_number: string | null;
2766
+ identifier: string | null;
2767
+ additional_attributes: Record<string, unknown>;
2768
+ custom_attributes: Record<string, unknown>;
2769
+ blocked: boolean;
2770
+ customer_stage: string;
2771
+ customer_stage_explanation: string | null;
2772
+ type?: string | undefined;
2773
+ };
2774
+ hmac_verified: boolean;
2775
+ assignee: {
2776
+ id: number;
2777
+ name: string;
2778
+ email: string;
2779
+ } | null;
2780
+ team?: unknown;
2781
+ }, {
2782
+ sender: {
2783
+ id: number;
2784
+ name: string | null;
2785
+ email: string | null;
2786
+ thumbnail: string;
2787
+ phone_number: string | null;
2788
+ identifier: string | null;
2789
+ additional_attributes: Record<string, unknown>;
2790
+ custom_attributes: Record<string, unknown>;
2791
+ blocked: boolean;
2792
+ customer_stage: string;
2793
+ customer_stage_explanation: string | null;
2794
+ type?: string | undefined;
2795
+ };
2796
+ hmac_verified: boolean;
2797
+ assignee: {
2798
+ id: number;
2799
+ name: string;
2800
+ email: string;
2801
+ } | null;
2802
+ team?: unknown;
2803
+ }>;
2804
+ status: z.ZodEnum<["open", "resolved", "pending", "snoozed"]>;
2805
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2806
+ snoozed_until: z.ZodNullable<z.ZodNumber>;
2807
+ unread_count: z.ZodNumber;
2808
+ first_reply_created_at: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
2809
+ priority: z.ZodNullable<z.ZodString>;
2810
+ waiting_since: z.ZodNullable<z.ZodNumber>;
2811
+ ai_disabled: z.ZodBoolean;
2812
+ reenable_ai_at: z.ZodNullable<z.ZodNumber>;
2813
+ ai_summary: z.ZodNullable<z.ZodString>;
2814
+ conversation_type: z.ZodString;
2815
+ agent_last_seen_at: z.ZodNumber;
2816
+ contact_last_seen_at: z.ZodNumber;
2817
+ last_activity_at: z.ZodNumber;
2818
+ timestamp: z.ZodNumber;
2819
+ created_at: z.ZodNumber;
2820
+ updated_at: z.ZodNumber;
2821
+ }, "strip", z.ZodTypeAny, {
2822
+ status: "open" | "resolved" | "pending" | "snoozed";
2823
+ id: number;
2824
+ created_at: number;
2825
+ priority: string | null;
2826
+ additional_attributes: {
2827
+ browser?: {
2828
+ device_name: string;
2829
+ browser_name: string;
2830
+ platform_name: string;
2831
+ browser_version: string;
2832
+ platform_version: string;
2833
+ } | undefined;
2834
+ referer?: string | null | undefined;
2835
+ initiated_at?: {
2836
+ timestamp: string;
2837
+ } | undefined;
2838
+ browser_language?: string | undefined;
2839
+ } & {
2840
+ [k: string]: unknown;
2841
+ };
2842
+ custom_attributes: Record<string, unknown>;
2843
+ inbox_id: number;
2844
+ updated_at: number;
2845
+ channel: string;
2846
+ can_reply: boolean;
2847
+ contact_inbox: {
2848
+ id: number;
2849
+ created_at: string;
2850
+ contact_id: number;
2851
+ inbox_id: number;
2852
+ source_id: string | null;
2853
+ updated_at: string;
2854
+ hmac_verified: boolean;
2855
+ pubsub_token: string;
2856
+ };
2857
+ messages: {
2858
+ content: string | null;
2859
+ message_type: number;
2860
+ private: boolean;
2861
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2862
+ status: string;
2863
+ content_attributes: {
2864
+ in_reply_to?: unknown;
2865
+ } & {
2866
+ [k: string]: unknown;
2867
+ };
2868
+ id: number;
2869
+ created_at: number;
2870
+ conversation_id: number;
2871
+ sender: {
2872
+ id: number;
2873
+ name: string | null;
2874
+ email: string | null;
2875
+ thumbnail: string;
2876
+ phone_number: string | null;
2877
+ identifier: string | null;
2878
+ additional_attributes: Record<string, unknown>;
2879
+ custom_attributes: Record<string, unknown>;
2880
+ blocked: boolean;
2881
+ customer_stage: string;
2882
+ customer_stage_explanation: string | null;
2883
+ type?: string | undefined;
2884
+ };
2885
+ additional_attributes: Record<string, unknown>;
2886
+ inbox_id: number;
2887
+ source_id: string | null;
2888
+ updated_at: string;
2889
+ account_id: number;
2890
+ sender_type: "Contact" | "User";
2891
+ sender_id: number;
2892
+ external_source_ids: Record<string, unknown>;
2893
+ processed_message_content: string | null;
2894
+ sentiment: Record<string, unknown>;
2895
+ campaign_id: number | null;
2896
+ streaming: boolean;
2897
+ is_ai_triggered: boolean;
2898
+ sent_from_external_system: boolean;
2899
+ conversation: {
2900
+ contact_inbox: {
2901
+ source_id: string;
2902
+ };
2903
+ unread_count: number;
2904
+ last_activity_at: number;
2905
+ assignee_id: number | null;
2906
+ };
2907
+ }[];
2908
+ meta: {
2909
+ sender: {
2910
+ id: number;
2911
+ name: string | null;
2912
+ email: string | null;
2913
+ thumbnail: string;
2914
+ phone_number: string | null;
2915
+ identifier: string | null;
2916
+ additional_attributes: Record<string, unknown>;
2917
+ custom_attributes: Record<string, unknown>;
2918
+ blocked: boolean;
2919
+ customer_stage: string;
2920
+ customer_stage_explanation: string | null;
2921
+ type?: string | undefined;
2922
+ };
2923
+ hmac_verified: boolean;
2924
+ assignee: {
2925
+ id: number;
2926
+ name: string;
2927
+ email: string;
2928
+ } | null;
2929
+ team?: unknown;
2930
+ };
2931
+ labels: string[];
2932
+ snoozed_until: number | null;
2933
+ unread_count: number;
2934
+ first_reply_created_at: string | number | null;
2935
+ waiting_since: number | null;
2936
+ ai_disabled: boolean;
2937
+ reenable_ai_at: number | null;
2938
+ ai_summary: string | null;
2939
+ conversation_type: string;
2940
+ agent_last_seen_at: number;
2941
+ contact_last_seen_at: number;
2942
+ last_activity_at: number;
2943
+ timestamp: number;
2944
+ }, {
2945
+ status: "open" | "resolved" | "pending" | "snoozed";
2946
+ id: number;
2947
+ created_at: number;
2948
+ priority: string | null;
2949
+ additional_attributes: {
2950
+ browser?: {
2951
+ device_name: string;
2952
+ browser_name: string;
2953
+ platform_name: string;
2954
+ browser_version: string;
2955
+ platform_version: string;
2956
+ } | undefined;
2957
+ referer?: string | null | undefined;
2958
+ initiated_at?: {
2959
+ timestamp: string;
2960
+ } | undefined;
2961
+ browser_language?: string | undefined;
2962
+ } & {
2963
+ [k: string]: unknown;
2964
+ };
2965
+ custom_attributes: Record<string, unknown>;
2966
+ inbox_id: number;
2967
+ updated_at: number;
2968
+ channel: string;
2969
+ can_reply: boolean;
2970
+ contact_inbox: {
2971
+ id: number;
2972
+ created_at: string;
2973
+ contact_id: number;
2974
+ inbox_id: number;
2975
+ source_id: string | null;
2976
+ updated_at: string;
2977
+ hmac_verified: boolean;
2978
+ pubsub_token: string;
2979
+ };
2980
+ messages: {
2981
+ content: string | null;
2982
+ message_type: number;
2983
+ private: boolean;
2984
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
2985
+ status: string;
2986
+ content_attributes: {
2987
+ in_reply_to?: unknown;
2988
+ } & {
2989
+ [k: string]: unknown;
2990
+ };
2991
+ id: number;
2992
+ created_at: number;
2993
+ conversation_id: number;
2994
+ sender: {
2995
+ id: number;
2996
+ name: string | null;
2997
+ email: string | null;
2998
+ thumbnail: string;
2999
+ phone_number: string | null;
3000
+ identifier: string | null;
3001
+ additional_attributes: Record<string, unknown>;
3002
+ custom_attributes: Record<string, unknown>;
3003
+ blocked: boolean;
3004
+ customer_stage: string;
3005
+ customer_stage_explanation: string | null;
3006
+ type?: string | undefined;
3007
+ };
3008
+ additional_attributes: Record<string, unknown>;
3009
+ inbox_id: number;
3010
+ source_id: string | null;
3011
+ updated_at: string;
3012
+ account_id: number;
3013
+ sender_type: "Contact" | "User";
3014
+ sender_id: number;
3015
+ external_source_ids: Record<string, unknown>;
3016
+ processed_message_content: string | null;
3017
+ sentiment: Record<string, unknown>;
3018
+ campaign_id: number | null;
3019
+ streaming: boolean;
3020
+ is_ai_triggered: boolean;
3021
+ sent_from_external_system: boolean;
3022
+ conversation: {
3023
+ contact_inbox: {
3024
+ source_id: string;
3025
+ };
3026
+ unread_count: number;
3027
+ last_activity_at: number;
3028
+ assignee_id: number | null;
3029
+ };
3030
+ }[];
3031
+ meta: {
3032
+ sender: {
3033
+ id: number;
3034
+ name: string | null;
3035
+ email: string | null;
3036
+ thumbnail: string;
3037
+ phone_number: string | null;
3038
+ identifier: string | null;
3039
+ additional_attributes: Record<string, unknown>;
3040
+ custom_attributes: Record<string, unknown>;
3041
+ blocked: boolean;
3042
+ customer_stage: string;
3043
+ customer_stage_explanation: string | null;
3044
+ type?: string | undefined;
3045
+ };
3046
+ hmac_verified: boolean;
3047
+ assignee: {
3048
+ id: number;
3049
+ name: string;
3050
+ email: string;
3051
+ } | null;
3052
+ team?: unknown;
3053
+ };
3054
+ labels: string[];
3055
+ snoozed_until: number | null;
3056
+ unread_count: number;
3057
+ first_reply_created_at: string | number | null;
3058
+ waiting_since: number | null;
3059
+ ai_disabled: boolean;
3060
+ reenable_ai_at: number | null;
3061
+ ai_summary: string | null;
3062
+ conversation_type: string;
3063
+ agent_last_seen_at: number;
3064
+ contact_last_seen_at: number;
3065
+ last_activity_at: number;
3066
+ timestamp: number;
3067
+ }>;
3068
+ created_at: z.ZodString;
3069
+ id: z.ZodNumber;
3070
+ inbox: z.ZodObject<{
3071
+ id: z.ZodNumber;
3072
+ name: z.ZodString;
3073
+ }, "strip", z.ZodTypeAny, {
3074
+ id: number;
3075
+ name: string;
3076
+ }, {
3077
+ id: number;
3078
+ name: string;
3079
+ }>;
3080
+ message_type: z.ZodEnum<["incoming", "outgoing"]>;
3081
+ private: z.ZodBoolean;
3082
+ status: z.ZodString;
3083
+ sender: z.ZodObject<Omit<{
3084
+ id: z.ZodNumber;
3085
+ name: z.ZodNullable<z.ZodString>;
3086
+ email: z.ZodNullable<z.ZodString>;
3087
+ phone_number: z.ZodNullable<z.ZodString>;
3088
+ thumbnail: z.ZodString;
3089
+ identifier: z.ZodNullable<z.ZodString>;
3090
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3091
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3092
+ blocked: z.ZodBoolean;
3093
+ customer_stage: z.ZodString;
3094
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
3095
+ type: z.ZodOptional<z.ZodString>;
3096
+ }, "type"> & {
3097
+ account: z.ZodOptional<z.ZodObject<{
3098
+ id: z.ZodNumber;
3099
+ name: z.ZodString;
3100
+ }, "strip", z.ZodTypeAny, {
3101
+ id: number;
3102
+ name: string;
3103
+ }, {
3104
+ id: number;
3105
+ name: string;
3106
+ }>>;
3107
+ avatar: z.ZodOptional<z.ZodString>;
3108
+ }, "strip", z.ZodTypeAny, {
3109
+ id: number;
3110
+ name: string | null;
3111
+ email: string | null;
3112
+ thumbnail: string;
3113
+ phone_number: string | null;
3114
+ identifier: string | null;
3115
+ additional_attributes: Record<string, unknown>;
3116
+ custom_attributes: Record<string, unknown>;
3117
+ blocked: boolean;
3118
+ customer_stage: string;
3119
+ customer_stage_explanation: string | null;
3120
+ account?: {
3121
+ id: number;
3122
+ name: string;
3123
+ } | undefined;
3124
+ avatar?: string | undefined;
3125
+ }, {
3126
+ id: number;
3127
+ name: string | null;
3128
+ email: string | null;
3129
+ thumbnail: string;
3130
+ phone_number: string | null;
3131
+ identifier: string | null;
3132
+ additional_attributes: Record<string, unknown>;
3133
+ custom_attributes: Record<string, unknown>;
3134
+ blocked: boolean;
3135
+ customer_stage: string;
3136
+ customer_stage_explanation: string | null;
3137
+ account?: {
3138
+ id: number;
3139
+ name: string;
3140
+ } | undefined;
3141
+ avatar?: string | undefined;
3142
+ }>;
3143
+ source_id: z.ZodNullable<z.ZodString>;
3144
+ } & {
3145
+ event: z.ZodLiteral<"message_updated">;
3146
+ }, "strip", z.ZodTypeAny, {
3147
+ content: string | null;
3148
+ message_type: "incoming" | "outgoing";
3149
+ private: boolean;
3150
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
3151
+ status: string;
3152
+ content_attributes: {
3153
+ in_reply_to?: unknown;
3154
+ } & {
3155
+ [k: string]: unknown;
3156
+ };
3157
+ id: number;
3158
+ created_at: string;
3159
+ sender: {
3160
+ id: number;
3161
+ name: string | null;
3162
+ email: string | null;
3163
+ thumbnail: string;
3164
+ phone_number: string | null;
3165
+ identifier: string | null;
3166
+ additional_attributes: Record<string, unknown>;
3167
+ custom_attributes: Record<string, unknown>;
3168
+ blocked: boolean;
3169
+ customer_stage: string;
3170
+ customer_stage_explanation: string | null;
3171
+ account?: {
3172
+ id: number;
3173
+ name: string;
3174
+ } | undefined;
3175
+ avatar?: string | undefined;
3176
+ };
3177
+ additional_attributes: Record<string, unknown>;
3178
+ source_id: string | null;
3179
+ account: {
3180
+ id: number;
3181
+ name: string;
3182
+ };
3183
+ conversation: {
3184
+ status: "open" | "resolved" | "pending" | "snoozed";
3185
+ id: number;
3186
+ created_at: number;
3187
+ priority: string | null;
3188
+ additional_attributes: {
3189
+ browser?: {
3190
+ device_name: string;
3191
+ browser_name: string;
3192
+ platform_name: string;
3193
+ browser_version: string;
3194
+ platform_version: string;
3195
+ } | undefined;
3196
+ referer?: string | null | undefined;
3197
+ initiated_at?: {
3198
+ timestamp: string;
3199
+ } | undefined;
3200
+ browser_language?: string | undefined;
3201
+ } & {
3202
+ [k: string]: unknown;
3203
+ };
3204
+ custom_attributes: Record<string, unknown>;
3205
+ inbox_id: number;
3206
+ updated_at: number;
3207
+ channel: string;
3208
+ can_reply: boolean;
3209
+ contact_inbox: {
3210
+ id: number;
3211
+ created_at: string;
3212
+ contact_id: number;
3213
+ inbox_id: number;
3214
+ source_id: string | null;
3215
+ updated_at: string;
3216
+ hmac_verified: boolean;
3217
+ pubsub_token: string;
3218
+ };
3219
+ messages: {
3220
+ content: string | null;
3221
+ message_type: number;
3222
+ private: boolean;
3223
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
3224
+ status: string;
3225
+ content_attributes: {
3226
+ in_reply_to?: unknown;
3227
+ } & {
3228
+ [k: string]: unknown;
3229
+ };
3230
+ id: number;
3231
+ created_at: number;
3232
+ conversation_id: number;
3233
+ sender: {
3234
+ id: number;
3235
+ name: string | null;
3236
+ email: string | null;
3237
+ thumbnail: string;
3238
+ phone_number: string | null;
3239
+ identifier: string | null;
3240
+ additional_attributes: Record<string, unknown>;
3241
+ custom_attributes: Record<string, unknown>;
3242
+ blocked: boolean;
3243
+ customer_stage: string;
3244
+ customer_stage_explanation: string | null;
3245
+ type?: string | undefined;
3246
+ };
3247
+ additional_attributes: Record<string, unknown>;
3248
+ inbox_id: number;
3249
+ source_id: string | null;
3250
+ updated_at: string;
3251
+ account_id: number;
3252
+ sender_type: "Contact" | "User";
3253
+ sender_id: number;
3254
+ external_source_ids: Record<string, unknown>;
3255
+ processed_message_content: string | null;
3256
+ sentiment: Record<string, unknown>;
3257
+ campaign_id: number | null;
3258
+ streaming: boolean;
3259
+ is_ai_triggered: boolean;
3260
+ sent_from_external_system: boolean;
3261
+ conversation: {
3262
+ contact_inbox: {
3263
+ source_id: string;
3264
+ };
3265
+ unread_count: number;
3266
+ last_activity_at: number;
3267
+ assignee_id: number | null;
3268
+ };
3269
+ }[];
3270
+ meta: {
3271
+ sender: {
3272
+ id: number;
3273
+ name: string | null;
3274
+ email: string | null;
3275
+ thumbnail: string;
3276
+ phone_number: string | null;
3277
+ identifier: string | null;
3278
+ additional_attributes: Record<string, unknown>;
3279
+ custom_attributes: Record<string, unknown>;
3280
+ blocked: boolean;
3281
+ customer_stage: string;
3282
+ customer_stage_explanation: string | null;
3283
+ type?: string | undefined;
3284
+ };
3285
+ hmac_verified: boolean;
3286
+ assignee: {
3287
+ id: number;
3288
+ name: string;
3289
+ email: string;
3290
+ } | null;
3291
+ team?: unknown;
3292
+ };
3293
+ labels: string[];
3294
+ snoozed_until: number | null;
3295
+ unread_count: number;
3296
+ first_reply_created_at: string | number | null;
3297
+ waiting_since: number | null;
3298
+ ai_disabled: boolean;
3299
+ reenable_ai_at: number | null;
3300
+ ai_summary: string | null;
3301
+ conversation_type: string;
3302
+ agent_last_seen_at: number;
3303
+ contact_last_seen_at: number;
3304
+ last_activity_at: number;
3305
+ timestamp: number;
3306
+ };
3307
+ inbox: {
3308
+ id: number;
3309
+ name: string;
3310
+ };
3311
+ event: "message_updated";
3312
+ }, {
3313
+ content: string | null;
3314
+ message_type: "incoming" | "outgoing";
3315
+ private: boolean;
3316
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
3317
+ status: string;
3318
+ content_attributes: {
3319
+ in_reply_to?: unknown;
3320
+ } & {
3321
+ [k: string]: unknown;
3322
+ };
3323
+ id: number;
3324
+ created_at: string;
3325
+ sender: {
3326
+ id: number;
3327
+ name: string | null;
3328
+ email: string | null;
3329
+ thumbnail: string;
3330
+ phone_number: string | null;
3331
+ identifier: string | null;
3332
+ additional_attributes: Record<string, unknown>;
3333
+ custom_attributes: Record<string, unknown>;
3334
+ blocked: boolean;
3335
+ customer_stage: string;
3336
+ customer_stage_explanation: string | null;
3337
+ account?: {
3338
+ id: number;
3339
+ name: string;
3340
+ } | undefined;
3341
+ avatar?: string | undefined;
3342
+ };
3343
+ additional_attributes: Record<string, unknown>;
3344
+ source_id: string | null;
3345
+ account: {
3346
+ id: number;
3347
+ name: string;
3348
+ };
3349
+ conversation: {
3350
+ status: "open" | "resolved" | "pending" | "snoozed";
3351
+ id: number;
3352
+ created_at: number;
3353
+ priority: string | null;
3354
+ additional_attributes: {
3355
+ browser?: {
3356
+ device_name: string;
3357
+ browser_name: string;
3358
+ platform_name: string;
3359
+ browser_version: string;
3360
+ platform_version: string;
3361
+ } | undefined;
3362
+ referer?: string | null | undefined;
3363
+ initiated_at?: {
3364
+ timestamp: string;
3365
+ } | undefined;
3366
+ browser_language?: string | undefined;
3367
+ } & {
3368
+ [k: string]: unknown;
3369
+ };
3370
+ custom_attributes: Record<string, unknown>;
3371
+ inbox_id: number;
3372
+ updated_at: number;
3373
+ channel: string;
3374
+ can_reply: boolean;
3375
+ contact_inbox: {
3376
+ id: number;
3377
+ created_at: string;
3378
+ contact_id: number;
3379
+ inbox_id: number;
3380
+ source_id: string | null;
3381
+ updated_at: string;
3382
+ hmac_verified: boolean;
3383
+ pubsub_token: string;
3384
+ };
3385
+ messages: {
3386
+ content: string | null;
3387
+ message_type: number;
3388
+ private: boolean;
3389
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
3390
+ status: string;
3391
+ content_attributes: {
3392
+ in_reply_to?: unknown;
3393
+ } & {
3394
+ [k: string]: unknown;
3395
+ };
3396
+ id: number;
3397
+ created_at: number;
3398
+ conversation_id: number;
3399
+ sender: {
3400
+ id: number;
3401
+ name: string | null;
3402
+ email: string | null;
3403
+ thumbnail: string;
3404
+ phone_number: string | null;
3405
+ identifier: string | null;
3406
+ additional_attributes: Record<string, unknown>;
3407
+ custom_attributes: Record<string, unknown>;
3408
+ blocked: boolean;
3409
+ customer_stage: string;
3410
+ customer_stage_explanation: string | null;
3411
+ type?: string | undefined;
3412
+ };
3413
+ additional_attributes: Record<string, unknown>;
3414
+ inbox_id: number;
3415
+ source_id: string | null;
3416
+ updated_at: string;
3417
+ account_id: number;
3418
+ sender_type: "Contact" | "User";
3419
+ sender_id: number;
3420
+ external_source_ids: Record<string, unknown>;
3421
+ processed_message_content: string | null;
3422
+ sentiment: Record<string, unknown>;
3423
+ campaign_id: number | null;
3424
+ streaming: boolean;
3425
+ is_ai_triggered: boolean;
3426
+ sent_from_external_system: boolean;
3427
+ conversation: {
3428
+ contact_inbox: {
3429
+ source_id: string;
3430
+ };
3431
+ unread_count: number;
3432
+ last_activity_at: number;
3433
+ assignee_id: number | null;
3434
+ };
3435
+ }[];
3436
+ meta: {
3437
+ sender: {
3438
+ id: number;
3439
+ name: string | null;
3440
+ email: string | null;
3441
+ thumbnail: string;
3442
+ phone_number: string | null;
3443
+ identifier: string | null;
3444
+ additional_attributes: Record<string, unknown>;
3445
+ custom_attributes: Record<string, unknown>;
3446
+ blocked: boolean;
3447
+ customer_stage: string;
3448
+ customer_stage_explanation: string | null;
3449
+ type?: string | undefined;
3450
+ };
3451
+ hmac_verified: boolean;
3452
+ assignee: {
3453
+ id: number;
3454
+ name: string;
3455
+ email: string;
3456
+ } | null;
3457
+ team?: unknown;
3458
+ };
3459
+ labels: string[];
3460
+ snoozed_until: number | null;
3461
+ unread_count: number;
3462
+ first_reply_created_at: string | number | null;
3463
+ waiting_since: number | null;
3464
+ ai_disabled: boolean;
3465
+ reenable_ai_at: number | null;
3466
+ ai_summary: string | null;
3467
+ conversation_type: string;
3468
+ agent_last_seen_at: number;
3469
+ contact_last_seen_at: number;
3470
+ last_activity_at: number;
3471
+ timestamp: number;
3472
+ };
3473
+ inbox: {
3474
+ id: number;
3475
+ name: string;
3476
+ };
3477
+ event: "message_updated";
3478
+ }>;
3479
+ export declare const WebhookEventSchema: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
3480
+ account: z.ZodObject<{
3481
+ id: z.ZodNumber;
3482
+ name: z.ZodString;
3483
+ }, "strip", z.ZodTypeAny, {
3484
+ id: number;
3485
+ name: string;
3486
+ }, {
3487
+ id: number;
3488
+ name: string;
3489
+ }>;
3490
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3491
+ content_attributes: z.ZodObject<{
3492
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
3493
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3494
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
3495
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3496
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
3497
+ }, z.ZodTypeAny, "passthrough">>;
3498
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
3499
+ content: z.ZodNullable<z.ZodString>;
3500
+ conversation: z.ZodObject<{
3501
+ additional_attributes: z.ZodObject<{
3502
+ browser: z.ZodOptional<z.ZodObject<{
3503
+ device_name: z.ZodString;
3504
+ browser_name: z.ZodString;
3505
+ platform_name: z.ZodString;
3506
+ browser_version: z.ZodString;
3507
+ platform_version: z.ZodString;
3508
+ }, "strip", z.ZodTypeAny, {
3509
+ device_name: string;
3510
+ browser_name: string;
3511
+ platform_name: string;
3512
+ browser_version: string;
3513
+ platform_version: string;
3514
+ }, {
3515
+ device_name: string;
3516
+ browser_name: string;
3517
+ platform_name: string;
3518
+ browser_version: string;
3519
+ platform_version: string;
3520
+ }>>;
3521
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3522
+ initiated_at: z.ZodOptional<z.ZodObject<{
3523
+ timestamp: z.ZodString;
3524
+ }, "strip", z.ZodTypeAny, {
3525
+ timestamp: string;
3526
+ }, {
3527
+ timestamp: string;
3528
+ }>>;
3529
+ browser_language: z.ZodOptional<z.ZodString>;
3530
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3531
+ browser: z.ZodOptional<z.ZodObject<{
3532
+ device_name: z.ZodString;
3533
+ browser_name: z.ZodString;
3534
+ platform_name: z.ZodString;
3535
+ browser_version: z.ZodString;
3536
+ platform_version: z.ZodString;
3537
+ }, "strip", z.ZodTypeAny, {
3538
+ device_name: string;
3539
+ browser_name: string;
3540
+ platform_name: string;
3541
+ browser_version: string;
3542
+ platform_version: string;
3543
+ }, {
3544
+ device_name: string;
3545
+ browser_name: string;
3546
+ platform_name: string;
3547
+ browser_version: string;
3548
+ platform_version: string;
3549
+ }>>;
3550
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3551
+ initiated_at: z.ZodOptional<z.ZodObject<{
3552
+ timestamp: z.ZodString;
3553
+ }, "strip", z.ZodTypeAny, {
3554
+ timestamp: string;
3555
+ }, {
3556
+ timestamp: string;
3557
+ }>>;
3558
+ browser_language: z.ZodOptional<z.ZodString>;
3559
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3560
+ browser: z.ZodOptional<z.ZodObject<{
3561
+ device_name: z.ZodString;
3562
+ browser_name: z.ZodString;
3563
+ platform_name: z.ZodString;
3564
+ browser_version: z.ZodString;
3565
+ platform_version: z.ZodString;
3566
+ }, "strip", z.ZodTypeAny, {
3567
+ device_name: string;
3568
+ browser_name: string;
3569
+ platform_name: string;
3570
+ browser_version: string;
3571
+ platform_version: string;
3572
+ }, {
3573
+ device_name: string;
3574
+ browser_name: string;
3575
+ platform_name: string;
3576
+ browser_version: string;
3577
+ platform_version: string;
3578
+ }>>;
3579
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3580
+ initiated_at: z.ZodOptional<z.ZodObject<{
3581
+ timestamp: z.ZodString;
3582
+ }, "strip", z.ZodTypeAny, {
3583
+ timestamp: string;
3584
+ }, {
3585
+ timestamp: string;
3586
+ }>>;
3587
+ browser_language: z.ZodOptional<z.ZodString>;
3588
+ }, z.ZodTypeAny, "passthrough">>;
3589
+ can_reply: z.ZodBoolean;
3590
+ channel: z.ZodString;
3591
+ contact_inbox: z.ZodObject<{
3592
+ id: z.ZodNumber;
3593
+ contact_id: z.ZodNumber;
3594
+ inbox_id: z.ZodNumber;
3595
+ source_id: z.ZodNullable<z.ZodString>;
3596
+ created_at: z.ZodString;
3597
+ updated_at: z.ZodString;
3598
+ hmac_verified: z.ZodBoolean;
3599
+ pubsub_token: z.ZodString;
3600
+ }, "strip", z.ZodTypeAny, {
3601
+ id: number;
3602
+ created_at: string;
3603
+ contact_id: number;
3604
+ inbox_id: number;
3605
+ source_id: string | null;
3606
+ updated_at: string;
3607
+ hmac_verified: boolean;
3608
+ pubsub_token: string;
3609
+ }, {
3610
+ id: number;
3611
+ created_at: string;
3612
+ contact_id: number;
3613
+ inbox_id: number;
3614
+ source_id: string | null;
3615
+ updated_at: string;
3616
+ hmac_verified: boolean;
3617
+ pubsub_token: string;
3618
+ }>;
3619
+ id: z.ZodNumber;
3620
+ inbox_id: z.ZodNumber;
3621
+ messages: z.ZodArray<z.ZodObject<{
3622
+ id: z.ZodNumber;
3623
+ content: z.ZodNullable<z.ZodString>;
3624
+ account_id: z.ZodNumber;
3625
+ inbox_id: z.ZodNumber;
3626
+ conversation_id: z.ZodNumber;
3627
+ message_type: z.ZodNumber;
3628
+ created_at: z.ZodNumber;
3629
+ updated_at: z.ZodString;
3630
+ private: z.ZodBoolean;
3631
+ status: z.ZodString;
3632
+ source_id: z.ZodNullable<z.ZodString>;
3633
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
3634
+ content_attributes: z.ZodObject<{
3635
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
3636
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3637
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
3638
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3639
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
3640
+ }, z.ZodTypeAny, "passthrough">>;
3641
+ sender_type: z.ZodEnum<["Contact", "User"]>;
3642
+ sender_id: z.ZodNumber;
3643
+ external_source_ids: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3644
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3645
+ processed_message_content: z.ZodNullable<z.ZodString>;
3646
+ sentiment: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3647
+ campaign_id: z.ZodNullable<z.ZodNumber>;
3648
+ streaming: z.ZodBoolean;
3649
+ is_ai_triggered: z.ZodBoolean;
3650
+ sent_from_external_system: z.ZodBoolean;
3651
+ conversation: z.ZodObject<{
3652
+ assignee_id: z.ZodNullable<z.ZodNumber>;
3653
+ unread_count: z.ZodNumber;
3654
+ last_activity_at: z.ZodNumber;
3655
+ contact_inbox: z.ZodObject<{
3656
+ source_id: z.ZodString;
3657
+ }, "strip", z.ZodTypeAny, {
3658
+ source_id: string;
3659
+ }, {
3660
+ source_id: string;
3661
+ }>;
3662
+ }, "strip", z.ZodTypeAny, {
3663
+ contact_inbox: {
3664
+ source_id: string;
3665
+ };
3666
+ unread_count: number;
3667
+ last_activity_at: number;
3668
+ assignee_id: number | null;
3669
+ }, {
3670
+ contact_inbox: {
3671
+ source_id: string;
3672
+ };
3673
+ unread_count: number;
3674
+ last_activity_at: number;
3675
+ assignee_id: number | null;
3676
+ }>;
3677
+ sender: z.ZodObject<{
3678
+ id: z.ZodNumber;
3679
+ name: z.ZodNullable<z.ZodString>;
3680
+ email: z.ZodNullable<z.ZodString>;
3681
+ phone_number: z.ZodNullable<z.ZodString>;
3682
+ thumbnail: z.ZodString;
3683
+ identifier: z.ZodNullable<z.ZodString>;
3684
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3685
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3686
+ blocked: z.ZodBoolean;
3687
+ customer_stage: z.ZodString;
3688
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
3689
+ type: z.ZodOptional<z.ZodString>;
3690
+ }, "strip", z.ZodTypeAny, {
3691
+ id: number;
3692
+ name: string | null;
3693
+ email: string | null;
3694
+ thumbnail: string;
3695
+ phone_number: string | null;
3696
+ identifier: string | null;
3697
+ additional_attributes: Record<string, unknown>;
3698
+ custom_attributes: Record<string, unknown>;
3699
+ blocked: boolean;
3700
+ customer_stage: string;
3701
+ customer_stage_explanation: string | null;
3702
+ type?: string | undefined;
3703
+ }, {
3704
+ id: number;
3705
+ name: string | null;
3706
+ email: string | null;
3707
+ thumbnail: string;
3708
+ phone_number: string | null;
3709
+ identifier: string | null;
3710
+ additional_attributes: Record<string, unknown>;
3711
+ custom_attributes: Record<string, unknown>;
3712
+ blocked: boolean;
3713
+ customer_stage: string;
3714
+ customer_stage_explanation: string | null;
3715
+ type?: string | undefined;
3716
+ }>;
3717
+ }, "strip", z.ZodTypeAny, {
3718
+ content: string | null;
3719
+ message_type: number;
3720
+ private: boolean;
3721
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
3722
+ status: string;
3723
+ content_attributes: {
3724
+ in_reply_to?: unknown;
3725
+ } & {
3726
+ [k: string]: unknown;
3727
+ };
3728
+ id: number;
3729
+ created_at: number;
3730
+ conversation_id: number;
3731
+ sender: {
3732
+ id: number;
3733
+ name: string | null;
3734
+ email: string | null;
3735
+ thumbnail: string;
3736
+ phone_number: string | null;
3737
+ identifier: string | null;
3738
+ additional_attributes: Record<string, unknown>;
3739
+ custom_attributes: Record<string, unknown>;
3740
+ blocked: boolean;
3741
+ customer_stage: string;
3742
+ customer_stage_explanation: string | null;
3743
+ type?: string | undefined;
3744
+ };
3745
+ additional_attributes: Record<string, unknown>;
3746
+ inbox_id: number;
3747
+ source_id: string | null;
3748
+ updated_at: string;
3749
+ account_id: number;
3750
+ sender_type: "Contact" | "User";
3751
+ sender_id: number;
3752
+ external_source_ids: Record<string, unknown>;
3753
+ processed_message_content: string | null;
3754
+ sentiment: Record<string, unknown>;
3755
+ campaign_id: number | null;
3756
+ streaming: boolean;
3757
+ is_ai_triggered: boolean;
3758
+ sent_from_external_system: boolean;
3759
+ conversation: {
3760
+ contact_inbox: {
3761
+ source_id: string;
3762
+ };
3763
+ unread_count: number;
3764
+ last_activity_at: number;
3765
+ assignee_id: number | null;
3766
+ };
3767
+ }, {
3768
+ content: string | null;
3769
+ message_type: number;
3770
+ private: boolean;
3771
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
3772
+ status: string;
3773
+ content_attributes: {
3774
+ in_reply_to?: unknown;
3775
+ } & {
3776
+ [k: string]: unknown;
3777
+ };
3778
+ id: number;
3779
+ created_at: number;
3780
+ conversation_id: number;
3781
+ sender: {
3782
+ id: number;
3783
+ name: string | null;
3784
+ email: string | null;
3785
+ thumbnail: string;
3786
+ phone_number: string | null;
3787
+ identifier: string | null;
3788
+ additional_attributes: Record<string, unknown>;
3789
+ custom_attributes: Record<string, unknown>;
3790
+ blocked: boolean;
3791
+ customer_stage: string;
3792
+ customer_stage_explanation: string | null;
3793
+ type?: string | undefined;
3794
+ };
3795
+ additional_attributes: Record<string, unknown>;
3796
+ inbox_id: number;
3797
+ source_id: string | null;
3798
+ updated_at: string;
3799
+ account_id: number;
3800
+ sender_type: "Contact" | "User";
3801
+ sender_id: number;
3802
+ external_source_ids: Record<string, unknown>;
3803
+ processed_message_content: string | null;
3804
+ sentiment: Record<string, unknown>;
3805
+ campaign_id: number | null;
3806
+ streaming: boolean;
3807
+ is_ai_triggered: boolean;
3808
+ sent_from_external_system: boolean;
3809
+ conversation: {
3810
+ contact_inbox: {
3811
+ source_id: string;
3812
+ };
3813
+ unread_count: number;
3814
+ last_activity_at: number;
3815
+ assignee_id: number | null;
3816
+ };
3817
+ }>, "many">;
3818
+ labels: z.ZodArray<z.ZodString, "many">;
3819
+ meta: z.ZodObject<{
3820
+ sender: z.ZodObject<{
3821
+ id: z.ZodNumber;
3822
+ name: z.ZodNullable<z.ZodString>;
3823
+ email: z.ZodNullable<z.ZodString>;
3824
+ phone_number: z.ZodNullable<z.ZodString>;
3825
+ thumbnail: z.ZodString;
3826
+ identifier: z.ZodNullable<z.ZodString>;
3827
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3828
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3829
+ blocked: z.ZodBoolean;
3830
+ customer_stage: z.ZodString;
3831
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
3832
+ type: z.ZodOptional<z.ZodString>;
3833
+ }, "strip", z.ZodTypeAny, {
3834
+ id: number;
3835
+ name: string | null;
3836
+ email: string | null;
3837
+ thumbnail: string;
3838
+ phone_number: string | null;
3839
+ identifier: string | null;
3840
+ additional_attributes: Record<string, unknown>;
3841
+ custom_attributes: Record<string, unknown>;
3842
+ blocked: boolean;
3843
+ customer_stage: string;
3844
+ customer_stage_explanation: string | null;
3845
+ type?: string | undefined;
3846
+ }, {
3847
+ id: number;
3848
+ name: string | null;
3849
+ email: string | null;
3850
+ thumbnail: string;
3851
+ phone_number: string | null;
3852
+ identifier: string | null;
3853
+ additional_attributes: Record<string, unknown>;
3854
+ custom_attributes: Record<string, unknown>;
3855
+ blocked: boolean;
3856
+ customer_stage: string;
3857
+ customer_stage_explanation: string | null;
3858
+ type?: string | undefined;
3859
+ }>;
3860
+ assignee: z.ZodNullable<z.ZodObject<{
3861
+ id: z.ZodNumber;
3862
+ name: z.ZodString;
3863
+ email: z.ZodString;
3864
+ }, "strip", z.ZodTypeAny, {
3865
+ id: number;
3866
+ name: string;
3867
+ email: string;
3868
+ }, {
3869
+ id: number;
3870
+ name: string;
3871
+ email: string;
3872
+ }>>;
3873
+ team: z.ZodNullable<z.ZodUnknown>;
3874
+ hmac_verified: z.ZodBoolean;
3875
+ }, "strip", z.ZodTypeAny, {
3876
+ sender: {
3877
+ id: number;
3878
+ name: string | null;
3879
+ email: string | null;
3880
+ thumbnail: string;
3881
+ phone_number: string | null;
3882
+ identifier: string | null;
3883
+ additional_attributes: Record<string, unknown>;
3884
+ custom_attributes: Record<string, unknown>;
3885
+ blocked: boolean;
3886
+ customer_stage: string;
3887
+ customer_stage_explanation: string | null;
3888
+ type?: string | undefined;
3889
+ };
3890
+ hmac_verified: boolean;
3891
+ assignee: {
3892
+ id: number;
3893
+ name: string;
3894
+ email: string;
3895
+ } | null;
3896
+ team?: unknown;
3897
+ }, {
3898
+ sender: {
3899
+ id: number;
3900
+ name: string | null;
3901
+ email: string | null;
3902
+ thumbnail: string;
3903
+ phone_number: string | null;
3904
+ identifier: string | null;
3905
+ additional_attributes: Record<string, unknown>;
3906
+ custom_attributes: Record<string, unknown>;
3907
+ blocked: boolean;
3908
+ customer_stage: string;
3909
+ customer_stage_explanation: string | null;
3910
+ type?: string | undefined;
3911
+ };
3912
+ hmac_verified: boolean;
3913
+ assignee: {
3914
+ id: number;
3915
+ name: string;
3916
+ email: string;
3917
+ } | null;
3918
+ team?: unknown;
3919
+ }>;
3920
+ status: z.ZodEnum<["open", "resolved", "pending", "snoozed"]>;
3921
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3922
+ snoozed_until: z.ZodNullable<z.ZodNumber>;
3923
+ unread_count: z.ZodNumber;
3924
+ first_reply_created_at: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
3925
+ priority: z.ZodNullable<z.ZodString>;
3926
+ waiting_since: z.ZodNullable<z.ZodNumber>;
3927
+ ai_disabled: z.ZodBoolean;
3928
+ reenable_ai_at: z.ZodNullable<z.ZodNumber>;
3929
+ ai_summary: z.ZodNullable<z.ZodString>;
3930
+ conversation_type: z.ZodString;
3931
+ agent_last_seen_at: z.ZodNumber;
3932
+ contact_last_seen_at: z.ZodNumber;
3933
+ last_activity_at: z.ZodNumber;
3934
+ timestamp: z.ZodNumber;
3935
+ created_at: z.ZodNumber;
3936
+ updated_at: z.ZodNumber;
3937
+ }, "strip", z.ZodTypeAny, {
3938
+ status: "open" | "resolved" | "pending" | "snoozed";
3939
+ id: number;
3940
+ created_at: number;
3941
+ priority: string | null;
3942
+ additional_attributes: {
3943
+ browser?: {
3944
+ device_name: string;
3945
+ browser_name: string;
3946
+ platform_name: string;
3947
+ browser_version: string;
3948
+ platform_version: string;
3949
+ } | undefined;
3950
+ referer?: string | null | undefined;
3951
+ initiated_at?: {
3952
+ timestamp: string;
3953
+ } | undefined;
3954
+ browser_language?: string | undefined;
3955
+ } & {
3956
+ [k: string]: unknown;
3957
+ };
3958
+ custom_attributes: Record<string, unknown>;
3959
+ inbox_id: number;
3960
+ updated_at: number;
3961
+ channel: string;
3962
+ can_reply: boolean;
3963
+ contact_inbox: {
3964
+ id: number;
3965
+ created_at: string;
3966
+ contact_id: number;
3967
+ inbox_id: number;
3968
+ source_id: string | null;
3969
+ updated_at: string;
3970
+ hmac_verified: boolean;
3971
+ pubsub_token: string;
3972
+ };
3973
+ messages: {
3974
+ content: string | null;
3975
+ message_type: number;
3976
+ private: boolean;
3977
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
3978
+ status: string;
3979
+ content_attributes: {
3980
+ in_reply_to?: unknown;
3981
+ } & {
3982
+ [k: string]: unknown;
3983
+ };
3984
+ id: number;
3985
+ created_at: number;
3986
+ conversation_id: number;
3987
+ sender: {
3988
+ id: number;
3989
+ name: string | null;
3990
+ email: string | null;
3991
+ thumbnail: string;
3992
+ phone_number: string | null;
3993
+ identifier: string | null;
3994
+ additional_attributes: Record<string, unknown>;
3995
+ custom_attributes: Record<string, unknown>;
3996
+ blocked: boolean;
3997
+ customer_stage: string;
3998
+ customer_stage_explanation: string | null;
3999
+ type?: string | undefined;
4000
+ };
4001
+ additional_attributes: Record<string, unknown>;
4002
+ inbox_id: number;
4003
+ source_id: string | null;
4004
+ updated_at: string;
4005
+ account_id: number;
4006
+ sender_type: "Contact" | "User";
4007
+ sender_id: number;
4008
+ external_source_ids: Record<string, unknown>;
4009
+ processed_message_content: string | null;
4010
+ sentiment: Record<string, unknown>;
4011
+ campaign_id: number | null;
4012
+ streaming: boolean;
4013
+ is_ai_triggered: boolean;
4014
+ sent_from_external_system: boolean;
4015
+ conversation: {
4016
+ contact_inbox: {
4017
+ source_id: string;
4018
+ };
4019
+ unread_count: number;
4020
+ last_activity_at: number;
4021
+ assignee_id: number | null;
4022
+ };
4023
+ }[];
4024
+ meta: {
4025
+ sender: {
4026
+ id: number;
4027
+ name: string | null;
4028
+ email: string | null;
4029
+ thumbnail: string;
4030
+ phone_number: string | null;
4031
+ identifier: string | null;
4032
+ additional_attributes: Record<string, unknown>;
4033
+ custom_attributes: Record<string, unknown>;
4034
+ blocked: boolean;
4035
+ customer_stage: string;
4036
+ customer_stage_explanation: string | null;
4037
+ type?: string | undefined;
4038
+ };
4039
+ hmac_verified: boolean;
4040
+ assignee: {
4041
+ id: number;
4042
+ name: string;
4043
+ email: string;
4044
+ } | null;
4045
+ team?: unknown;
4046
+ };
4047
+ labels: string[];
4048
+ snoozed_until: number | null;
4049
+ unread_count: number;
4050
+ first_reply_created_at: string | number | null;
4051
+ waiting_since: number | null;
4052
+ ai_disabled: boolean;
4053
+ reenable_ai_at: number | null;
4054
+ ai_summary: string | null;
4055
+ conversation_type: string;
4056
+ agent_last_seen_at: number;
4057
+ contact_last_seen_at: number;
4058
+ last_activity_at: number;
4059
+ timestamp: number;
4060
+ }, {
4061
+ status: "open" | "resolved" | "pending" | "snoozed";
4062
+ id: number;
4063
+ created_at: number;
4064
+ priority: string | null;
4065
+ additional_attributes: {
4066
+ browser?: {
4067
+ device_name: string;
4068
+ browser_name: string;
4069
+ platform_name: string;
4070
+ browser_version: string;
4071
+ platform_version: string;
4072
+ } | undefined;
4073
+ referer?: string | null | undefined;
4074
+ initiated_at?: {
4075
+ timestamp: string;
4076
+ } | undefined;
4077
+ browser_language?: string | undefined;
4078
+ } & {
4079
+ [k: string]: unknown;
4080
+ };
4081
+ custom_attributes: Record<string, unknown>;
4082
+ inbox_id: number;
4083
+ updated_at: number;
4084
+ channel: string;
4085
+ can_reply: boolean;
4086
+ contact_inbox: {
4087
+ id: number;
4088
+ created_at: string;
4089
+ contact_id: number;
4090
+ inbox_id: number;
4091
+ source_id: string | null;
4092
+ updated_at: string;
4093
+ hmac_verified: boolean;
4094
+ pubsub_token: string;
4095
+ };
4096
+ messages: {
4097
+ content: string | null;
4098
+ message_type: number;
4099
+ private: boolean;
4100
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
4101
+ status: string;
4102
+ content_attributes: {
4103
+ in_reply_to?: unknown;
4104
+ } & {
4105
+ [k: string]: unknown;
4106
+ };
4107
+ id: number;
4108
+ created_at: number;
4109
+ conversation_id: number;
4110
+ sender: {
4111
+ id: number;
4112
+ name: string | null;
4113
+ email: string | null;
4114
+ thumbnail: string;
4115
+ phone_number: string | null;
4116
+ identifier: string | null;
4117
+ additional_attributes: Record<string, unknown>;
4118
+ custom_attributes: Record<string, unknown>;
4119
+ blocked: boolean;
4120
+ customer_stage: string;
4121
+ customer_stage_explanation: string | null;
4122
+ type?: string | undefined;
4123
+ };
4124
+ additional_attributes: Record<string, unknown>;
4125
+ inbox_id: number;
4126
+ source_id: string | null;
4127
+ updated_at: string;
4128
+ account_id: number;
4129
+ sender_type: "Contact" | "User";
4130
+ sender_id: number;
4131
+ external_source_ids: Record<string, unknown>;
4132
+ processed_message_content: string | null;
4133
+ sentiment: Record<string, unknown>;
4134
+ campaign_id: number | null;
4135
+ streaming: boolean;
4136
+ is_ai_triggered: boolean;
4137
+ sent_from_external_system: boolean;
4138
+ conversation: {
4139
+ contact_inbox: {
4140
+ source_id: string;
4141
+ };
4142
+ unread_count: number;
4143
+ last_activity_at: number;
4144
+ assignee_id: number | null;
4145
+ };
4146
+ }[];
4147
+ meta: {
4148
+ sender: {
4149
+ id: number;
4150
+ name: string | null;
4151
+ email: string | null;
4152
+ thumbnail: string;
4153
+ phone_number: string | null;
4154
+ identifier: string | null;
4155
+ additional_attributes: Record<string, unknown>;
4156
+ custom_attributes: Record<string, unknown>;
4157
+ blocked: boolean;
4158
+ customer_stage: string;
4159
+ customer_stage_explanation: string | null;
4160
+ type?: string | undefined;
4161
+ };
4162
+ hmac_verified: boolean;
4163
+ assignee: {
4164
+ id: number;
4165
+ name: string;
4166
+ email: string;
4167
+ } | null;
4168
+ team?: unknown;
4169
+ };
4170
+ labels: string[];
4171
+ snoozed_until: number | null;
4172
+ unread_count: number;
4173
+ first_reply_created_at: string | number | null;
4174
+ waiting_since: number | null;
4175
+ ai_disabled: boolean;
4176
+ reenable_ai_at: number | null;
4177
+ ai_summary: string | null;
4178
+ conversation_type: string;
4179
+ agent_last_seen_at: number;
4180
+ contact_last_seen_at: number;
4181
+ last_activity_at: number;
4182
+ timestamp: number;
4183
+ }>;
4184
+ created_at: z.ZodString;
4185
+ id: z.ZodNumber;
4186
+ inbox: z.ZodObject<{
4187
+ id: z.ZodNumber;
4188
+ name: z.ZodString;
4189
+ }, "strip", z.ZodTypeAny, {
4190
+ id: number;
4191
+ name: string;
4192
+ }, {
4193
+ id: number;
4194
+ name: string;
4195
+ }>;
4196
+ message_type: z.ZodEnum<["incoming", "outgoing"]>;
4197
+ private: z.ZodBoolean;
4198
+ status: z.ZodString;
4199
+ sender: z.ZodObject<Omit<{
4200
+ id: z.ZodNumber;
4201
+ name: z.ZodNullable<z.ZodString>;
4202
+ email: z.ZodNullable<z.ZodString>;
4203
+ phone_number: z.ZodNullable<z.ZodString>;
4204
+ thumbnail: z.ZodString;
4205
+ identifier: z.ZodNullable<z.ZodString>;
4206
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4207
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4208
+ blocked: z.ZodBoolean;
4209
+ customer_stage: z.ZodString;
4210
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
4211
+ type: z.ZodOptional<z.ZodString>;
4212
+ }, "type"> & {
4213
+ account: z.ZodOptional<z.ZodObject<{
4214
+ id: z.ZodNumber;
4215
+ name: z.ZodString;
4216
+ }, "strip", z.ZodTypeAny, {
4217
+ id: number;
4218
+ name: string;
4219
+ }, {
4220
+ id: number;
4221
+ name: string;
4222
+ }>>;
4223
+ avatar: z.ZodOptional<z.ZodString>;
4224
+ }, "strip", z.ZodTypeAny, {
4225
+ id: number;
4226
+ name: string | null;
4227
+ email: string | null;
4228
+ thumbnail: string;
4229
+ phone_number: string | null;
4230
+ identifier: string | null;
4231
+ additional_attributes: Record<string, unknown>;
4232
+ custom_attributes: Record<string, unknown>;
4233
+ blocked: boolean;
4234
+ customer_stage: string;
4235
+ customer_stage_explanation: string | null;
4236
+ account?: {
4237
+ id: number;
4238
+ name: string;
4239
+ } | undefined;
4240
+ avatar?: string | undefined;
4241
+ }, {
4242
+ id: number;
4243
+ name: string | null;
4244
+ email: string | null;
4245
+ thumbnail: string;
4246
+ phone_number: string | null;
4247
+ identifier: string | null;
4248
+ additional_attributes: Record<string, unknown>;
4249
+ custom_attributes: Record<string, unknown>;
4250
+ blocked: boolean;
4251
+ customer_stage: string;
4252
+ customer_stage_explanation: string | null;
4253
+ account?: {
4254
+ id: number;
4255
+ name: string;
4256
+ } | undefined;
4257
+ avatar?: string | undefined;
4258
+ }>;
4259
+ source_id: z.ZodNullable<z.ZodString>;
4260
+ } & {
4261
+ event: z.ZodLiteral<"message_created">;
4262
+ }, "strip", z.ZodTypeAny, {
4263
+ content: string | null;
4264
+ message_type: "incoming" | "outgoing";
4265
+ private: boolean;
4266
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
4267
+ status: string;
4268
+ content_attributes: {
4269
+ in_reply_to?: unknown;
4270
+ } & {
4271
+ [k: string]: unknown;
4272
+ };
4273
+ id: number;
4274
+ created_at: string;
4275
+ sender: {
4276
+ id: number;
4277
+ name: string | null;
4278
+ email: string | null;
4279
+ thumbnail: string;
4280
+ phone_number: string | null;
4281
+ identifier: string | null;
4282
+ additional_attributes: Record<string, unknown>;
4283
+ custom_attributes: Record<string, unknown>;
4284
+ blocked: boolean;
4285
+ customer_stage: string;
4286
+ customer_stage_explanation: string | null;
4287
+ account?: {
4288
+ id: number;
4289
+ name: string;
4290
+ } | undefined;
4291
+ avatar?: string | undefined;
4292
+ };
4293
+ additional_attributes: Record<string, unknown>;
4294
+ source_id: string | null;
4295
+ account: {
4296
+ id: number;
4297
+ name: string;
4298
+ };
4299
+ conversation: {
4300
+ status: "open" | "resolved" | "pending" | "snoozed";
4301
+ id: number;
4302
+ created_at: number;
4303
+ priority: string | null;
4304
+ additional_attributes: {
4305
+ browser?: {
4306
+ device_name: string;
4307
+ browser_name: string;
4308
+ platform_name: string;
4309
+ browser_version: string;
4310
+ platform_version: string;
4311
+ } | undefined;
4312
+ referer?: string | null | undefined;
4313
+ initiated_at?: {
4314
+ timestamp: string;
4315
+ } | undefined;
4316
+ browser_language?: string | undefined;
4317
+ } & {
4318
+ [k: string]: unknown;
4319
+ };
4320
+ custom_attributes: Record<string, unknown>;
4321
+ inbox_id: number;
4322
+ updated_at: number;
4323
+ channel: string;
4324
+ can_reply: boolean;
4325
+ contact_inbox: {
4326
+ id: number;
4327
+ created_at: string;
4328
+ contact_id: number;
4329
+ inbox_id: number;
4330
+ source_id: string | null;
4331
+ updated_at: string;
4332
+ hmac_verified: boolean;
4333
+ pubsub_token: string;
4334
+ };
4335
+ messages: {
4336
+ content: string | null;
4337
+ message_type: number;
4338
+ private: boolean;
4339
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
4340
+ status: string;
4341
+ content_attributes: {
4342
+ in_reply_to?: unknown;
4343
+ } & {
4344
+ [k: string]: unknown;
4345
+ };
4346
+ id: number;
4347
+ created_at: number;
4348
+ conversation_id: number;
4349
+ sender: {
4350
+ id: number;
4351
+ name: string | null;
4352
+ email: string | null;
4353
+ thumbnail: string;
4354
+ phone_number: string | null;
4355
+ identifier: string | null;
4356
+ additional_attributes: Record<string, unknown>;
4357
+ custom_attributes: Record<string, unknown>;
4358
+ blocked: boolean;
4359
+ customer_stage: string;
4360
+ customer_stage_explanation: string | null;
4361
+ type?: string | undefined;
4362
+ };
4363
+ additional_attributes: Record<string, unknown>;
4364
+ inbox_id: number;
4365
+ source_id: string | null;
4366
+ updated_at: string;
4367
+ account_id: number;
4368
+ sender_type: "Contact" | "User";
4369
+ sender_id: number;
4370
+ external_source_ids: Record<string, unknown>;
4371
+ processed_message_content: string | null;
4372
+ sentiment: Record<string, unknown>;
4373
+ campaign_id: number | null;
4374
+ streaming: boolean;
4375
+ is_ai_triggered: boolean;
4376
+ sent_from_external_system: boolean;
4377
+ conversation: {
4378
+ contact_inbox: {
4379
+ source_id: string;
4380
+ };
4381
+ unread_count: number;
4382
+ last_activity_at: number;
4383
+ assignee_id: number | null;
4384
+ };
4385
+ }[];
4386
+ meta: {
4387
+ sender: {
4388
+ id: number;
4389
+ name: string | null;
4390
+ email: string | null;
4391
+ thumbnail: string;
4392
+ phone_number: string | null;
4393
+ identifier: string | null;
4394
+ additional_attributes: Record<string, unknown>;
4395
+ custom_attributes: Record<string, unknown>;
4396
+ blocked: boolean;
4397
+ customer_stage: string;
4398
+ customer_stage_explanation: string | null;
4399
+ type?: string | undefined;
4400
+ };
4401
+ hmac_verified: boolean;
4402
+ assignee: {
4403
+ id: number;
4404
+ name: string;
4405
+ email: string;
4406
+ } | null;
4407
+ team?: unknown;
4408
+ };
4409
+ labels: string[];
4410
+ snoozed_until: number | null;
4411
+ unread_count: number;
4412
+ first_reply_created_at: string | number | null;
4413
+ waiting_since: number | null;
4414
+ ai_disabled: boolean;
4415
+ reenable_ai_at: number | null;
4416
+ ai_summary: string | null;
4417
+ conversation_type: string;
4418
+ agent_last_seen_at: number;
4419
+ contact_last_seen_at: number;
4420
+ last_activity_at: number;
4421
+ timestamp: number;
4422
+ };
4423
+ inbox: {
4424
+ id: number;
4425
+ name: string;
4426
+ };
4427
+ event: "message_created";
4428
+ }, {
4429
+ content: string | null;
4430
+ message_type: "incoming" | "outgoing";
4431
+ private: boolean;
4432
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
4433
+ status: string;
4434
+ content_attributes: {
4435
+ in_reply_to?: unknown;
4436
+ } & {
4437
+ [k: string]: unknown;
4438
+ };
4439
+ id: number;
4440
+ created_at: string;
4441
+ sender: {
4442
+ id: number;
4443
+ name: string | null;
4444
+ email: string | null;
4445
+ thumbnail: string;
4446
+ phone_number: string | null;
4447
+ identifier: string | null;
4448
+ additional_attributes: Record<string, unknown>;
4449
+ custom_attributes: Record<string, unknown>;
4450
+ blocked: boolean;
4451
+ customer_stage: string;
4452
+ customer_stage_explanation: string | null;
4453
+ account?: {
4454
+ id: number;
4455
+ name: string;
4456
+ } | undefined;
4457
+ avatar?: string | undefined;
4458
+ };
4459
+ additional_attributes: Record<string, unknown>;
4460
+ source_id: string | null;
4461
+ account: {
4462
+ id: number;
4463
+ name: string;
4464
+ };
4465
+ conversation: {
4466
+ status: "open" | "resolved" | "pending" | "snoozed";
4467
+ id: number;
4468
+ created_at: number;
4469
+ priority: string | null;
4470
+ additional_attributes: {
4471
+ browser?: {
4472
+ device_name: string;
4473
+ browser_name: string;
4474
+ platform_name: string;
4475
+ browser_version: string;
4476
+ platform_version: string;
4477
+ } | undefined;
4478
+ referer?: string | null | undefined;
4479
+ initiated_at?: {
4480
+ timestamp: string;
4481
+ } | undefined;
4482
+ browser_language?: string | undefined;
4483
+ } & {
4484
+ [k: string]: unknown;
4485
+ };
4486
+ custom_attributes: Record<string, unknown>;
4487
+ inbox_id: number;
4488
+ updated_at: number;
4489
+ channel: string;
4490
+ can_reply: boolean;
4491
+ contact_inbox: {
4492
+ id: number;
4493
+ created_at: string;
4494
+ contact_id: number;
4495
+ inbox_id: number;
4496
+ source_id: string | null;
4497
+ updated_at: string;
4498
+ hmac_verified: boolean;
4499
+ pubsub_token: string;
4500
+ };
4501
+ messages: {
4502
+ content: string | null;
4503
+ message_type: number;
4504
+ private: boolean;
4505
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
4506
+ status: string;
4507
+ content_attributes: {
4508
+ in_reply_to?: unknown;
4509
+ } & {
4510
+ [k: string]: unknown;
4511
+ };
4512
+ id: number;
4513
+ created_at: number;
4514
+ conversation_id: number;
4515
+ sender: {
4516
+ id: number;
4517
+ name: string | null;
4518
+ email: string | null;
4519
+ thumbnail: string;
4520
+ phone_number: string | null;
4521
+ identifier: string | null;
4522
+ additional_attributes: Record<string, unknown>;
4523
+ custom_attributes: Record<string, unknown>;
4524
+ blocked: boolean;
4525
+ customer_stage: string;
4526
+ customer_stage_explanation: string | null;
4527
+ type?: string | undefined;
4528
+ };
4529
+ additional_attributes: Record<string, unknown>;
4530
+ inbox_id: number;
4531
+ source_id: string | null;
4532
+ updated_at: string;
4533
+ account_id: number;
4534
+ sender_type: "Contact" | "User";
4535
+ sender_id: number;
4536
+ external_source_ids: Record<string, unknown>;
4537
+ processed_message_content: string | null;
4538
+ sentiment: Record<string, unknown>;
4539
+ campaign_id: number | null;
4540
+ streaming: boolean;
4541
+ is_ai_triggered: boolean;
4542
+ sent_from_external_system: boolean;
4543
+ conversation: {
4544
+ contact_inbox: {
4545
+ source_id: string;
4546
+ };
4547
+ unread_count: number;
4548
+ last_activity_at: number;
4549
+ assignee_id: number | null;
4550
+ };
4551
+ }[];
4552
+ meta: {
4553
+ sender: {
4554
+ id: number;
4555
+ name: string | null;
4556
+ email: string | null;
4557
+ thumbnail: string;
4558
+ phone_number: string | null;
4559
+ identifier: string | null;
4560
+ additional_attributes: Record<string, unknown>;
4561
+ custom_attributes: Record<string, unknown>;
4562
+ blocked: boolean;
4563
+ customer_stage: string;
4564
+ customer_stage_explanation: string | null;
4565
+ type?: string | undefined;
4566
+ };
4567
+ hmac_verified: boolean;
4568
+ assignee: {
4569
+ id: number;
4570
+ name: string;
4571
+ email: string;
4572
+ } | null;
4573
+ team?: unknown;
4574
+ };
4575
+ labels: string[];
4576
+ snoozed_until: number | null;
4577
+ unread_count: number;
4578
+ first_reply_created_at: string | number | null;
4579
+ waiting_since: number | null;
4580
+ ai_disabled: boolean;
4581
+ reenable_ai_at: number | null;
4582
+ ai_summary: string | null;
4583
+ conversation_type: string;
4584
+ agent_last_seen_at: number;
4585
+ contact_last_seen_at: number;
4586
+ last_activity_at: number;
4587
+ timestamp: number;
4588
+ };
4589
+ inbox: {
4590
+ id: number;
4591
+ name: string;
4592
+ };
4593
+ event: "message_created";
4594
+ }>, z.ZodObject<{
4595
+ account: z.ZodObject<{
4596
+ id: z.ZodNumber;
4597
+ name: z.ZodString;
4598
+ }, "strip", z.ZodTypeAny, {
4599
+ id: number;
4600
+ name: string;
4601
+ }, {
4602
+ id: number;
4603
+ name: string;
4604
+ }>;
4605
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4606
+ content_attributes: z.ZodObject<{
4607
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
4608
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4609
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
4610
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4611
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
4612
+ }, z.ZodTypeAny, "passthrough">>;
4613
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
4614
+ content: z.ZodNullable<z.ZodString>;
4615
+ conversation: z.ZodObject<{
4616
+ additional_attributes: z.ZodObject<{
4617
+ browser: z.ZodOptional<z.ZodObject<{
4618
+ device_name: z.ZodString;
4619
+ browser_name: z.ZodString;
4620
+ platform_name: z.ZodString;
4621
+ browser_version: z.ZodString;
4622
+ platform_version: z.ZodString;
4623
+ }, "strip", z.ZodTypeAny, {
4624
+ device_name: string;
4625
+ browser_name: string;
4626
+ platform_name: string;
4627
+ browser_version: string;
4628
+ platform_version: string;
4629
+ }, {
4630
+ device_name: string;
4631
+ browser_name: string;
4632
+ platform_name: string;
4633
+ browser_version: string;
4634
+ platform_version: string;
4635
+ }>>;
4636
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4637
+ initiated_at: z.ZodOptional<z.ZodObject<{
4638
+ timestamp: z.ZodString;
4639
+ }, "strip", z.ZodTypeAny, {
4640
+ timestamp: string;
4641
+ }, {
4642
+ timestamp: string;
4643
+ }>>;
4644
+ browser_language: z.ZodOptional<z.ZodString>;
4645
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4646
+ browser: z.ZodOptional<z.ZodObject<{
4647
+ device_name: z.ZodString;
4648
+ browser_name: z.ZodString;
4649
+ platform_name: z.ZodString;
4650
+ browser_version: z.ZodString;
4651
+ platform_version: z.ZodString;
4652
+ }, "strip", z.ZodTypeAny, {
4653
+ device_name: string;
4654
+ browser_name: string;
4655
+ platform_name: string;
4656
+ browser_version: string;
4657
+ platform_version: string;
4658
+ }, {
4659
+ device_name: string;
4660
+ browser_name: string;
4661
+ platform_name: string;
4662
+ browser_version: string;
4663
+ platform_version: string;
4664
+ }>>;
4665
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4666
+ initiated_at: z.ZodOptional<z.ZodObject<{
4667
+ timestamp: z.ZodString;
4668
+ }, "strip", z.ZodTypeAny, {
4669
+ timestamp: string;
4670
+ }, {
4671
+ timestamp: string;
4672
+ }>>;
4673
+ browser_language: z.ZodOptional<z.ZodString>;
4674
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4675
+ browser: z.ZodOptional<z.ZodObject<{
4676
+ device_name: z.ZodString;
4677
+ browser_name: z.ZodString;
4678
+ platform_name: z.ZodString;
4679
+ browser_version: z.ZodString;
4680
+ platform_version: z.ZodString;
4681
+ }, "strip", z.ZodTypeAny, {
4682
+ device_name: string;
4683
+ browser_name: string;
4684
+ platform_name: string;
4685
+ browser_version: string;
4686
+ platform_version: string;
4687
+ }, {
4688
+ device_name: string;
4689
+ browser_name: string;
4690
+ platform_name: string;
4691
+ browser_version: string;
4692
+ platform_version: string;
4693
+ }>>;
4694
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4695
+ initiated_at: z.ZodOptional<z.ZodObject<{
4696
+ timestamp: z.ZodString;
4697
+ }, "strip", z.ZodTypeAny, {
4698
+ timestamp: string;
4699
+ }, {
4700
+ timestamp: string;
4701
+ }>>;
4702
+ browser_language: z.ZodOptional<z.ZodString>;
4703
+ }, z.ZodTypeAny, "passthrough">>;
4704
+ can_reply: z.ZodBoolean;
4705
+ channel: z.ZodString;
4706
+ contact_inbox: z.ZodObject<{
4707
+ id: z.ZodNumber;
4708
+ contact_id: z.ZodNumber;
4709
+ inbox_id: z.ZodNumber;
4710
+ source_id: z.ZodNullable<z.ZodString>;
4711
+ created_at: z.ZodString;
4712
+ updated_at: z.ZodString;
4713
+ hmac_verified: z.ZodBoolean;
4714
+ pubsub_token: z.ZodString;
4715
+ }, "strip", z.ZodTypeAny, {
4716
+ id: number;
4717
+ created_at: string;
4718
+ contact_id: number;
4719
+ inbox_id: number;
4720
+ source_id: string | null;
4721
+ updated_at: string;
4722
+ hmac_verified: boolean;
4723
+ pubsub_token: string;
4724
+ }, {
4725
+ id: number;
4726
+ created_at: string;
4727
+ contact_id: number;
4728
+ inbox_id: number;
4729
+ source_id: string | null;
4730
+ updated_at: string;
4731
+ hmac_verified: boolean;
4732
+ pubsub_token: string;
4733
+ }>;
4734
+ id: z.ZodNumber;
4735
+ inbox_id: z.ZodNumber;
4736
+ messages: z.ZodArray<z.ZodObject<{
4737
+ id: z.ZodNumber;
4738
+ content: z.ZodNullable<z.ZodString>;
4739
+ account_id: z.ZodNumber;
4740
+ inbox_id: z.ZodNumber;
4741
+ conversation_id: z.ZodNumber;
4742
+ message_type: z.ZodNumber;
4743
+ created_at: z.ZodNumber;
4744
+ updated_at: z.ZodString;
4745
+ private: z.ZodBoolean;
4746
+ status: z.ZodString;
4747
+ source_id: z.ZodNullable<z.ZodString>;
4748
+ content_type: z.ZodEnum<["text", "input_select", "cards", "form", "article"]>;
4749
+ content_attributes: z.ZodObject<{
4750
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
4751
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4752
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
4753
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4754
+ in_reply_to: z.ZodNullable<z.ZodUnknown>;
4755
+ }, z.ZodTypeAny, "passthrough">>;
4756
+ sender_type: z.ZodEnum<["Contact", "User"]>;
4757
+ sender_id: z.ZodNumber;
4758
+ external_source_ids: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4759
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4760
+ processed_message_content: z.ZodNullable<z.ZodString>;
4761
+ sentiment: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4762
+ campaign_id: z.ZodNullable<z.ZodNumber>;
4763
+ streaming: z.ZodBoolean;
4764
+ is_ai_triggered: z.ZodBoolean;
4765
+ sent_from_external_system: z.ZodBoolean;
4766
+ conversation: z.ZodObject<{
4767
+ assignee_id: z.ZodNullable<z.ZodNumber>;
4768
+ unread_count: z.ZodNumber;
4769
+ last_activity_at: z.ZodNumber;
4770
+ contact_inbox: z.ZodObject<{
4771
+ source_id: z.ZodString;
4772
+ }, "strip", z.ZodTypeAny, {
4773
+ source_id: string;
4774
+ }, {
4775
+ source_id: string;
4776
+ }>;
4777
+ }, "strip", z.ZodTypeAny, {
4778
+ contact_inbox: {
4779
+ source_id: string;
4780
+ };
4781
+ unread_count: number;
4782
+ last_activity_at: number;
4783
+ assignee_id: number | null;
4784
+ }, {
4785
+ contact_inbox: {
4786
+ source_id: string;
4787
+ };
4788
+ unread_count: number;
4789
+ last_activity_at: number;
4790
+ assignee_id: number | null;
4791
+ }>;
4792
+ sender: z.ZodObject<{
4793
+ id: z.ZodNumber;
4794
+ name: z.ZodNullable<z.ZodString>;
4795
+ email: z.ZodNullable<z.ZodString>;
4796
+ phone_number: z.ZodNullable<z.ZodString>;
4797
+ thumbnail: z.ZodString;
4798
+ identifier: z.ZodNullable<z.ZodString>;
4799
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4800
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4801
+ blocked: z.ZodBoolean;
4802
+ customer_stage: z.ZodString;
4803
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
4804
+ type: z.ZodOptional<z.ZodString>;
4805
+ }, "strip", z.ZodTypeAny, {
4806
+ id: number;
4807
+ name: string | null;
4808
+ email: string | null;
4809
+ thumbnail: string;
4810
+ phone_number: string | null;
4811
+ identifier: string | null;
4812
+ additional_attributes: Record<string, unknown>;
4813
+ custom_attributes: Record<string, unknown>;
4814
+ blocked: boolean;
4815
+ customer_stage: string;
4816
+ customer_stage_explanation: string | null;
4817
+ type?: string | undefined;
4818
+ }, {
4819
+ id: number;
4820
+ name: string | null;
4821
+ email: string | null;
4822
+ thumbnail: string;
4823
+ phone_number: string | null;
4824
+ identifier: string | null;
4825
+ additional_attributes: Record<string, unknown>;
4826
+ custom_attributes: Record<string, unknown>;
4827
+ blocked: boolean;
4828
+ customer_stage: string;
4829
+ customer_stage_explanation: string | null;
4830
+ type?: string | undefined;
4831
+ }>;
4832
+ }, "strip", z.ZodTypeAny, {
4833
+ content: string | null;
4834
+ message_type: number;
4835
+ private: boolean;
4836
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
4837
+ status: string;
4838
+ content_attributes: {
4839
+ in_reply_to?: unknown;
4840
+ } & {
4841
+ [k: string]: unknown;
4842
+ };
4843
+ id: number;
4844
+ created_at: number;
4845
+ conversation_id: number;
4846
+ sender: {
4847
+ id: number;
4848
+ name: string | null;
4849
+ email: string | null;
4850
+ thumbnail: string;
4851
+ phone_number: string | null;
4852
+ identifier: string | null;
4853
+ additional_attributes: Record<string, unknown>;
4854
+ custom_attributes: Record<string, unknown>;
4855
+ blocked: boolean;
4856
+ customer_stage: string;
4857
+ customer_stage_explanation: string | null;
4858
+ type?: string | undefined;
4859
+ };
4860
+ additional_attributes: Record<string, unknown>;
4861
+ inbox_id: number;
4862
+ source_id: string | null;
4863
+ updated_at: string;
4864
+ account_id: number;
4865
+ sender_type: "Contact" | "User";
4866
+ sender_id: number;
4867
+ external_source_ids: Record<string, unknown>;
4868
+ processed_message_content: string | null;
4869
+ sentiment: Record<string, unknown>;
4870
+ campaign_id: number | null;
4871
+ streaming: boolean;
4872
+ is_ai_triggered: boolean;
4873
+ sent_from_external_system: boolean;
4874
+ conversation: {
4875
+ contact_inbox: {
4876
+ source_id: string;
4877
+ };
4878
+ unread_count: number;
4879
+ last_activity_at: number;
4880
+ assignee_id: number | null;
4881
+ };
4882
+ }, {
4883
+ content: string | null;
4884
+ message_type: number;
4885
+ private: boolean;
4886
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
4887
+ status: string;
4888
+ content_attributes: {
4889
+ in_reply_to?: unknown;
4890
+ } & {
4891
+ [k: string]: unknown;
4892
+ };
4893
+ id: number;
4894
+ created_at: number;
4895
+ conversation_id: number;
4896
+ sender: {
4897
+ id: number;
4898
+ name: string | null;
4899
+ email: string | null;
4900
+ thumbnail: string;
4901
+ phone_number: string | null;
4902
+ identifier: string | null;
4903
+ additional_attributes: Record<string, unknown>;
4904
+ custom_attributes: Record<string, unknown>;
4905
+ blocked: boolean;
4906
+ customer_stage: string;
4907
+ customer_stage_explanation: string | null;
4908
+ type?: string | undefined;
4909
+ };
4910
+ additional_attributes: Record<string, unknown>;
4911
+ inbox_id: number;
4912
+ source_id: string | null;
4913
+ updated_at: string;
4914
+ account_id: number;
4915
+ sender_type: "Contact" | "User";
4916
+ sender_id: number;
4917
+ external_source_ids: Record<string, unknown>;
4918
+ processed_message_content: string | null;
4919
+ sentiment: Record<string, unknown>;
4920
+ campaign_id: number | null;
4921
+ streaming: boolean;
4922
+ is_ai_triggered: boolean;
4923
+ sent_from_external_system: boolean;
4924
+ conversation: {
4925
+ contact_inbox: {
4926
+ source_id: string;
4927
+ };
4928
+ unread_count: number;
4929
+ last_activity_at: number;
4930
+ assignee_id: number | null;
4931
+ };
4932
+ }>, "many">;
4933
+ labels: z.ZodArray<z.ZodString, "many">;
4934
+ meta: z.ZodObject<{
4935
+ sender: z.ZodObject<{
4936
+ id: z.ZodNumber;
4937
+ name: z.ZodNullable<z.ZodString>;
4938
+ email: z.ZodNullable<z.ZodString>;
4939
+ phone_number: z.ZodNullable<z.ZodString>;
4940
+ thumbnail: z.ZodString;
4941
+ identifier: z.ZodNullable<z.ZodString>;
4942
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4943
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4944
+ blocked: z.ZodBoolean;
4945
+ customer_stage: z.ZodString;
4946
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
4947
+ type: z.ZodOptional<z.ZodString>;
4948
+ }, "strip", z.ZodTypeAny, {
4949
+ id: number;
4950
+ name: string | null;
4951
+ email: string | null;
4952
+ thumbnail: string;
4953
+ phone_number: string | null;
4954
+ identifier: string | null;
4955
+ additional_attributes: Record<string, unknown>;
4956
+ custom_attributes: Record<string, unknown>;
4957
+ blocked: boolean;
4958
+ customer_stage: string;
4959
+ customer_stage_explanation: string | null;
4960
+ type?: string | undefined;
4961
+ }, {
4962
+ id: number;
4963
+ name: string | null;
4964
+ email: string | null;
4965
+ thumbnail: string;
4966
+ phone_number: string | null;
4967
+ identifier: string | null;
4968
+ additional_attributes: Record<string, unknown>;
4969
+ custom_attributes: Record<string, unknown>;
4970
+ blocked: boolean;
4971
+ customer_stage: string;
4972
+ customer_stage_explanation: string | null;
4973
+ type?: string | undefined;
4974
+ }>;
4975
+ assignee: z.ZodNullable<z.ZodObject<{
4976
+ id: z.ZodNumber;
4977
+ name: z.ZodString;
4978
+ email: z.ZodString;
4979
+ }, "strip", z.ZodTypeAny, {
4980
+ id: number;
4981
+ name: string;
4982
+ email: string;
4983
+ }, {
4984
+ id: number;
4985
+ name: string;
4986
+ email: string;
4987
+ }>>;
4988
+ team: z.ZodNullable<z.ZodUnknown>;
4989
+ hmac_verified: z.ZodBoolean;
4990
+ }, "strip", z.ZodTypeAny, {
4991
+ sender: {
4992
+ id: number;
4993
+ name: string | null;
4994
+ email: string | null;
4995
+ thumbnail: string;
4996
+ phone_number: string | null;
4997
+ identifier: string | null;
4998
+ additional_attributes: Record<string, unknown>;
4999
+ custom_attributes: Record<string, unknown>;
5000
+ blocked: boolean;
5001
+ customer_stage: string;
5002
+ customer_stage_explanation: string | null;
5003
+ type?: string | undefined;
5004
+ };
5005
+ hmac_verified: boolean;
5006
+ assignee: {
5007
+ id: number;
5008
+ name: string;
5009
+ email: string;
5010
+ } | null;
5011
+ team?: unknown;
5012
+ }, {
5013
+ sender: {
5014
+ id: number;
5015
+ name: string | null;
5016
+ email: string | null;
5017
+ thumbnail: string;
5018
+ phone_number: string | null;
5019
+ identifier: string | null;
5020
+ additional_attributes: Record<string, unknown>;
5021
+ custom_attributes: Record<string, unknown>;
5022
+ blocked: boolean;
5023
+ customer_stage: string;
5024
+ customer_stage_explanation: string | null;
5025
+ type?: string | undefined;
5026
+ };
5027
+ hmac_verified: boolean;
5028
+ assignee: {
5029
+ id: number;
5030
+ name: string;
5031
+ email: string;
5032
+ } | null;
5033
+ team?: unknown;
5034
+ }>;
5035
+ status: z.ZodEnum<["open", "resolved", "pending", "snoozed"]>;
5036
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5037
+ snoozed_until: z.ZodNullable<z.ZodNumber>;
5038
+ unread_count: z.ZodNumber;
5039
+ first_reply_created_at: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
5040
+ priority: z.ZodNullable<z.ZodString>;
5041
+ waiting_since: z.ZodNullable<z.ZodNumber>;
5042
+ ai_disabled: z.ZodBoolean;
5043
+ reenable_ai_at: z.ZodNullable<z.ZodNumber>;
5044
+ ai_summary: z.ZodNullable<z.ZodString>;
5045
+ conversation_type: z.ZodString;
5046
+ agent_last_seen_at: z.ZodNumber;
5047
+ contact_last_seen_at: z.ZodNumber;
5048
+ last_activity_at: z.ZodNumber;
5049
+ timestamp: z.ZodNumber;
5050
+ created_at: z.ZodNumber;
5051
+ updated_at: z.ZodNumber;
5052
+ }, "strip", z.ZodTypeAny, {
5053
+ status: "open" | "resolved" | "pending" | "snoozed";
5054
+ id: number;
5055
+ created_at: number;
5056
+ priority: string | null;
5057
+ additional_attributes: {
5058
+ browser?: {
5059
+ device_name: string;
5060
+ browser_name: string;
5061
+ platform_name: string;
5062
+ browser_version: string;
5063
+ platform_version: string;
5064
+ } | undefined;
5065
+ referer?: string | null | undefined;
5066
+ initiated_at?: {
5067
+ timestamp: string;
5068
+ } | undefined;
5069
+ browser_language?: string | undefined;
5070
+ } & {
5071
+ [k: string]: unknown;
5072
+ };
5073
+ custom_attributes: Record<string, unknown>;
5074
+ inbox_id: number;
5075
+ updated_at: number;
5076
+ channel: string;
5077
+ can_reply: boolean;
5078
+ contact_inbox: {
5079
+ id: number;
5080
+ created_at: string;
5081
+ contact_id: number;
5082
+ inbox_id: number;
5083
+ source_id: string | null;
5084
+ updated_at: string;
5085
+ hmac_verified: boolean;
5086
+ pubsub_token: string;
5087
+ };
5088
+ messages: {
5089
+ content: string | null;
5090
+ message_type: number;
5091
+ private: boolean;
5092
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
5093
+ status: string;
5094
+ content_attributes: {
5095
+ in_reply_to?: unknown;
5096
+ } & {
5097
+ [k: string]: unknown;
5098
+ };
5099
+ id: number;
5100
+ created_at: number;
5101
+ conversation_id: number;
5102
+ sender: {
5103
+ id: number;
5104
+ name: string | null;
5105
+ email: string | null;
5106
+ thumbnail: string;
5107
+ phone_number: string | null;
5108
+ identifier: string | null;
5109
+ additional_attributes: Record<string, unknown>;
5110
+ custom_attributes: Record<string, unknown>;
5111
+ blocked: boolean;
5112
+ customer_stage: string;
5113
+ customer_stage_explanation: string | null;
5114
+ type?: string | undefined;
5115
+ };
5116
+ additional_attributes: Record<string, unknown>;
5117
+ inbox_id: number;
5118
+ source_id: string | null;
5119
+ updated_at: string;
5120
+ account_id: number;
5121
+ sender_type: "Contact" | "User";
5122
+ sender_id: number;
5123
+ external_source_ids: Record<string, unknown>;
5124
+ processed_message_content: string | null;
5125
+ sentiment: Record<string, unknown>;
5126
+ campaign_id: number | null;
5127
+ streaming: boolean;
5128
+ is_ai_triggered: boolean;
5129
+ sent_from_external_system: boolean;
5130
+ conversation: {
5131
+ contact_inbox: {
5132
+ source_id: string;
5133
+ };
5134
+ unread_count: number;
5135
+ last_activity_at: number;
5136
+ assignee_id: number | null;
5137
+ };
5138
+ }[];
5139
+ meta: {
5140
+ sender: {
5141
+ id: number;
5142
+ name: string | null;
5143
+ email: string | null;
5144
+ thumbnail: string;
5145
+ phone_number: string | null;
5146
+ identifier: string | null;
5147
+ additional_attributes: Record<string, unknown>;
5148
+ custom_attributes: Record<string, unknown>;
5149
+ blocked: boolean;
5150
+ customer_stage: string;
5151
+ customer_stage_explanation: string | null;
5152
+ type?: string | undefined;
5153
+ };
5154
+ hmac_verified: boolean;
5155
+ assignee: {
5156
+ id: number;
5157
+ name: string;
5158
+ email: string;
5159
+ } | null;
5160
+ team?: unknown;
5161
+ };
5162
+ labels: string[];
5163
+ snoozed_until: number | null;
5164
+ unread_count: number;
5165
+ first_reply_created_at: string | number | null;
5166
+ waiting_since: number | null;
5167
+ ai_disabled: boolean;
5168
+ reenable_ai_at: number | null;
5169
+ ai_summary: string | null;
5170
+ conversation_type: string;
5171
+ agent_last_seen_at: number;
5172
+ contact_last_seen_at: number;
5173
+ last_activity_at: number;
5174
+ timestamp: number;
5175
+ }, {
5176
+ status: "open" | "resolved" | "pending" | "snoozed";
5177
+ id: number;
5178
+ created_at: number;
5179
+ priority: string | null;
5180
+ additional_attributes: {
5181
+ browser?: {
5182
+ device_name: string;
5183
+ browser_name: string;
5184
+ platform_name: string;
5185
+ browser_version: string;
5186
+ platform_version: string;
5187
+ } | undefined;
5188
+ referer?: string | null | undefined;
5189
+ initiated_at?: {
5190
+ timestamp: string;
5191
+ } | undefined;
5192
+ browser_language?: string | undefined;
5193
+ } & {
5194
+ [k: string]: unknown;
5195
+ };
5196
+ custom_attributes: Record<string, unknown>;
5197
+ inbox_id: number;
5198
+ updated_at: number;
5199
+ channel: string;
5200
+ can_reply: boolean;
5201
+ contact_inbox: {
5202
+ id: number;
5203
+ created_at: string;
5204
+ contact_id: number;
5205
+ inbox_id: number;
5206
+ source_id: string | null;
5207
+ updated_at: string;
5208
+ hmac_verified: boolean;
5209
+ pubsub_token: string;
5210
+ };
5211
+ messages: {
5212
+ content: string | null;
5213
+ message_type: number;
5214
+ private: boolean;
5215
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
5216
+ status: string;
5217
+ content_attributes: {
5218
+ in_reply_to?: unknown;
5219
+ } & {
5220
+ [k: string]: unknown;
5221
+ };
5222
+ id: number;
5223
+ created_at: number;
5224
+ conversation_id: number;
5225
+ sender: {
5226
+ id: number;
5227
+ name: string | null;
5228
+ email: string | null;
5229
+ thumbnail: string;
5230
+ phone_number: string | null;
5231
+ identifier: string | null;
5232
+ additional_attributes: Record<string, unknown>;
5233
+ custom_attributes: Record<string, unknown>;
5234
+ blocked: boolean;
5235
+ customer_stage: string;
5236
+ customer_stage_explanation: string | null;
5237
+ type?: string | undefined;
5238
+ };
5239
+ additional_attributes: Record<string, unknown>;
5240
+ inbox_id: number;
5241
+ source_id: string | null;
5242
+ updated_at: string;
5243
+ account_id: number;
5244
+ sender_type: "Contact" | "User";
5245
+ sender_id: number;
5246
+ external_source_ids: Record<string, unknown>;
5247
+ processed_message_content: string | null;
5248
+ sentiment: Record<string, unknown>;
5249
+ campaign_id: number | null;
5250
+ streaming: boolean;
5251
+ is_ai_triggered: boolean;
5252
+ sent_from_external_system: boolean;
5253
+ conversation: {
5254
+ contact_inbox: {
5255
+ source_id: string;
5256
+ };
5257
+ unread_count: number;
5258
+ last_activity_at: number;
5259
+ assignee_id: number | null;
5260
+ };
5261
+ }[];
5262
+ meta: {
5263
+ sender: {
5264
+ id: number;
5265
+ name: string | null;
5266
+ email: string | null;
5267
+ thumbnail: string;
5268
+ phone_number: string | null;
5269
+ identifier: string | null;
5270
+ additional_attributes: Record<string, unknown>;
5271
+ custom_attributes: Record<string, unknown>;
5272
+ blocked: boolean;
5273
+ customer_stage: string;
5274
+ customer_stage_explanation: string | null;
5275
+ type?: string | undefined;
5276
+ };
5277
+ hmac_verified: boolean;
5278
+ assignee: {
5279
+ id: number;
5280
+ name: string;
5281
+ email: string;
5282
+ } | null;
5283
+ team?: unknown;
5284
+ };
5285
+ labels: string[];
5286
+ snoozed_until: number | null;
5287
+ unread_count: number;
5288
+ first_reply_created_at: string | number | null;
5289
+ waiting_since: number | null;
5290
+ ai_disabled: boolean;
5291
+ reenable_ai_at: number | null;
5292
+ ai_summary: string | null;
5293
+ conversation_type: string;
5294
+ agent_last_seen_at: number;
5295
+ contact_last_seen_at: number;
5296
+ last_activity_at: number;
5297
+ timestamp: number;
5298
+ }>;
5299
+ created_at: z.ZodString;
5300
+ id: z.ZodNumber;
5301
+ inbox: z.ZodObject<{
5302
+ id: z.ZodNumber;
5303
+ name: z.ZodString;
5304
+ }, "strip", z.ZodTypeAny, {
5305
+ id: number;
5306
+ name: string;
5307
+ }, {
5308
+ id: number;
5309
+ name: string;
5310
+ }>;
5311
+ message_type: z.ZodEnum<["incoming", "outgoing"]>;
5312
+ private: z.ZodBoolean;
5313
+ status: z.ZodString;
5314
+ sender: z.ZodObject<Omit<{
5315
+ id: z.ZodNumber;
5316
+ name: z.ZodNullable<z.ZodString>;
5317
+ email: z.ZodNullable<z.ZodString>;
5318
+ phone_number: z.ZodNullable<z.ZodString>;
5319
+ thumbnail: z.ZodString;
5320
+ identifier: z.ZodNullable<z.ZodString>;
5321
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5322
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5323
+ blocked: z.ZodBoolean;
5324
+ customer_stage: z.ZodString;
5325
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
5326
+ type: z.ZodOptional<z.ZodString>;
5327
+ }, "type"> & {
5328
+ account: z.ZodOptional<z.ZodObject<{
5329
+ id: z.ZodNumber;
5330
+ name: z.ZodString;
5331
+ }, "strip", z.ZodTypeAny, {
5332
+ id: number;
5333
+ name: string;
5334
+ }, {
5335
+ id: number;
5336
+ name: string;
5337
+ }>>;
5338
+ avatar: z.ZodOptional<z.ZodString>;
5339
+ }, "strip", z.ZodTypeAny, {
5340
+ id: number;
5341
+ name: string | null;
5342
+ email: string | null;
5343
+ thumbnail: string;
5344
+ phone_number: string | null;
5345
+ identifier: string | null;
5346
+ additional_attributes: Record<string, unknown>;
5347
+ custom_attributes: Record<string, unknown>;
5348
+ blocked: boolean;
5349
+ customer_stage: string;
5350
+ customer_stage_explanation: string | null;
5351
+ account?: {
5352
+ id: number;
5353
+ name: string;
5354
+ } | undefined;
5355
+ avatar?: string | undefined;
5356
+ }, {
5357
+ id: number;
5358
+ name: string | null;
5359
+ email: string | null;
5360
+ thumbnail: string;
5361
+ phone_number: string | null;
5362
+ identifier: string | null;
5363
+ additional_attributes: Record<string, unknown>;
5364
+ custom_attributes: Record<string, unknown>;
5365
+ blocked: boolean;
5366
+ customer_stage: string;
5367
+ customer_stage_explanation: string | null;
5368
+ account?: {
5369
+ id: number;
5370
+ name: string;
5371
+ } | undefined;
5372
+ avatar?: string | undefined;
5373
+ }>;
5374
+ source_id: z.ZodNullable<z.ZodString>;
5375
+ } & {
5376
+ event: z.ZodLiteral<"message_updated">;
5377
+ }, "strip", z.ZodTypeAny, {
5378
+ content: string | null;
5379
+ message_type: "incoming" | "outgoing";
5380
+ private: boolean;
5381
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
5382
+ status: string;
5383
+ content_attributes: {
5384
+ in_reply_to?: unknown;
5385
+ } & {
5386
+ [k: string]: unknown;
5387
+ };
5388
+ id: number;
5389
+ created_at: string;
5390
+ sender: {
5391
+ id: number;
5392
+ name: string | null;
5393
+ email: string | null;
5394
+ thumbnail: string;
5395
+ phone_number: string | null;
5396
+ identifier: string | null;
5397
+ additional_attributes: Record<string, unknown>;
5398
+ custom_attributes: Record<string, unknown>;
5399
+ blocked: boolean;
5400
+ customer_stage: string;
5401
+ customer_stage_explanation: string | null;
5402
+ account?: {
5403
+ id: number;
5404
+ name: string;
5405
+ } | undefined;
5406
+ avatar?: string | undefined;
5407
+ };
5408
+ additional_attributes: Record<string, unknown>;
5409
+ source_id: string | null;
5410
+ account: {
5411
+ id: number;
5412
+ name: string;
5413
+ };
5414
+ conversation: {
5415
+ status: "open" | "resolved" | "pending" | "snoozed";
5416
+ id: number;
5417
+ created_at: number;
5418
+ priority: string | null;
5419
+ additional_attributes: {
5420
+ browser?: {
5421
+ device_name: string;
5422
+ browser_name: string;
5423
+ platform_name: string;
5424
+ browser_version: string;
5425
+ platform_version: string;
5426
+ } | undefined;
5427
+ referer?: string | null | undefined;
5428
+ initiated_at?: {
5429
+ timestamp: string;
5430
+ } | undefined;
5431
+ browser_language?: string | undefined;
5432
+ } & {
5433
+ [k: string]: unknown;
5434
+ };
5435
+ custom_attributes: Record<string, unknown>;
5436
+ inbox_id: number;
5437
+ updated_at: number;
5438
+ channel: string;
5439
+ can_reply: boolean;
5440
+ contact_inbox: {
5441
+ id: number;
5442
+ created_at: string;
5443
+ contact_id: number;
5444
+ inbox_id: number;
5445
+ source_id: string | null;
5446
+ updated_at: string;
5447
+ hmac_verified: boolean;
5448
+ pubsub_token: string;
5449
+ };
5450
+ messages: {
5451
+ content: string | null;
5452
+ message_type: number;
5453
+ private: boolean;
5454
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
5455
+ status: string;
5456
+ content_attributes: {
5457
+ in_reply_to?: unknown;
5458
+ } & {
5459
+ [k: string]: unknown;
5460
+ };
5461
+ id: number;
5462
+ created_at: number;
5463
+ conversation_id: number;
5464
+ sender: {
5465
+ id: number;
5466
+ name: string | null;
5467
+ email: string | null;
5468
+ thumbnail: string;
5469
+ phone_number: string | null;
5470
+ identifier: string | null;
5471
+ additional_attributes: Record<string, unknown>;
5472
+ custom_attributes: Record<string, unknown>;
5473
+ blocked: boolean;
5474
+ customer_stage: string;
5475
+ customer_stage_explanation: string | null;
5476
+ type?: string | undefined;
5477
+ };
5478
+ additional_attributes: Record<string, unknown>;
5479
+ inbox_id: number;
5480
+ source_id: string | null;
5481
+ updated_at: string;
5482
+ account_id: number;
5483
+ sender_type: "Contact" | "User";
5484
+ sender_id: number;
5485
+ external_source_ids: Record<string, unknown>;
5486
+ processed_message_content: string | null;
5487
+ sentiment: Record<string, unknown>;
5488
+ campaign_id: number | null;
5489
+ streaming: boolean;
5490
+ is_ai_triggered: boolean;
5491
+ sent_from_external_system: boolean;
5492
+ conversation: {
5493
+ contact_inbox: {
5494
+ source_id: string;
5495
+ };
5496
+ unread_count: number;
5497
+ last_activity_at: number;
5498
+ assignee_id: number | null;
5499
+ };
5500
+ }[];
5501
+ meta: {
5502
+ sender: {
5503
+ id: number;
5504
+ name: string | null;
5505
+ email: string | null;
5506
+ thumbnail: string;
5507
+ phone_number: string | null;
5508
+ identifier: string | null;
5509
+ additional_attributes: Record<string, unknown>;
5510
+ custom_attributes: Record<string, unknown>;
5511
+ blocked: boolean;
5512
+ customer_stage: string;
5513
+ customer_stage_explanation: string | null;
5514
+ type?: string | undefined;
5515
+ };
5516
+ hmac_verified: boolean;
5517
+ assignee: {
5518
+ id: number;
5519
+ name: string;
5520
+ email: string;
5521
+ } | null;
5522
+ team?: unknown;
5523
+ };
5524
+ labels: string[];
5525
+ snoozed_until: number | null;
5526
+ unread_count: number;
5527
+ first_reply_created_at: string | number | null;
5528
+ waiting_since: number | null;
5529
+ ai_disabled: boolean;
5530
+ reenable_ai_at: number | null;
5531
+ ai_summary: string | null;
5532
+ conversation_type: string;
5533
+ agent_last_seen_at: number;
5534
+ contact_last_seen_at: number;
5535
+ last_activity_at: number;
5536
+ timestamp: number;
5537
+ };
5538
+ inbox: {
5539
+ id: number;
5540
+ name: string;
5541
+ };
5542
+ event: "message_updated";
5543
+ }, {
5544
+ content: string | null;
5545
+ message_type: "incoming" | "outgoing";
5546
+ private: boolean;
5547
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
5548
+ status: string;
5549
+ content_attributes: {
5550
+ in_reply_to?: unknown;
5551
+ } & {
5552
+ [k: string]: unknown;
5553
+ };
5554
+ id: number;
5555
+ created_at: string;
5556
+ sender: {
5557
+ id: number;
5558
+ name: string | null;
5559
+ email: string | null;
5560
+ thumbnail: string;
5561
+ phone_number: string | null;
5562
+ identifier: string | null;
5563
+ additional_attributes: Record<string, unknown>;
5564
+ custom_attributes: Record<string, unknown>;
5565
+ blocked: boolean;
5566
+ customer_stage: string;
5567
+ customer_stage_explanation: string | null;
5568
+ account?: {
5569
+ id: number;
5570
+ name: string;
5571
+ } | undefined;
5572
+ avatar?: string | undefined;
5573
+ };
5574
+ additional_attributes: Record<string, unknown>;
5575
+ source_id: string | null;
5576
+ account: {
5577
+ id: number;
5578
+ name: string;
5579
+ };
5580
+ conversation: {
5581
+ status: "open" | "resolved" | "pending" | "snoozed";
5582
+ id: number;
5583
+ created_at: number;
5584
+ priority: string | null;
5585
+ additional_attributes: {
5586
+ browser?: {
5587
+ device_name: string;
5588
+ browser_name: string;
5589
+ platform_name: string;
5590
+ browser_version: string;
5591
+ platform_version: string;
5592
+ } | undefined;
5593
+ referer?: string | null | undefined;
5594
+ initiated_at?: {
5595
+ timestamp: string;
5596
+ } | undefined;
5597
+ browser_language?: string | undefined;
5598
+ } & {
5599
+ [k: string]: unknown;
5600
+ };
5601
+ custom_attributes: Record<string, unknown>;
5602
+ inbox_id: number;
5603
+ updated_at: number;
5604
+ channel: string;
5605
+ can_reply: boolean;
5606
+ contact_inbox: {
5607
+ id: number;
5608
+ created_at: string;
5609
+ contact_id: number;
5610
+ inbox_id: number;
5611
+ source_id: string | null;
5612
+ updated_at: string;
5613
+ hmac_verified: boolean;
5614
+ pubsub_token: string;
5615
+ };
5616
+ messages: {
5617
+ content: string | null;
5618
+ message_type: number;
5619
+ private: boolean;
5620
+ content_type: "text" | "input_select" | "cards" | "form" | "article";
5621
+ status: string;
5622
+ content_attributes: {
5623
+ in_reply_to?: unknown;
5624
+ } & {
5625
+ [k: string]: unknown;
5626
+ };
5627
+ id: number;
5628
+ created_at: number;
5629
+ conversation_id: number;
5630
+ sender: {
5631
+ id: number;
5632
+ name: string | null;
5633
+ email: string | null;
5634
+ thumbnail: string;
5635
+ phone_number: string | null;
5636
+ identifier: string | null;
5637
+ additional_attributes: Record<string, unknown>;
5638
+ custom_attributes: Record<string, unknown>;
5639
+ blocked: boolean;
5640
+ customer_stage: string;
5641
+ customer_stage_explanation: string | null;
5642
+ type?: string | undefined;
5643
+ };
5644
+ additional_attributes: Record<string, unknown>;
5645
+ inbox_id: number;
5646
+ source_id: string | null;
5647
+ updated_at: string;
5648
+ account_id: number;
5649
+ sender_type: "Contact" | "User";
5650
+ sender_id: number;
5651
+ external_source_ids: Record<string, unknown>;
5652
+ processed_message_content: string | null;
5653
+ sentiment: Record<string, unknown>;
5654
+ campaign_id: number | null;
5655
+ streaming: boolean;
5656
+ is_ai_triggered: boolean;
5657
+ sent_from_external_system: boolean;
5658
+ conversation: {
5659
+ contact_inbox: {
5660
+ source_id: string;
5661
+ };
5662
+ unread_count: number;
5663
+ last_activity_at: number;
5664
+ assignee_id: number | null;
5665
+ };
5666
+ }[];
5667
+ meta: {
5668
+ sender: {
5669
+ id: number;
5670
+ name: string | null;
5671
+ email: string | null;
5672
+ thumbnail: string;
5673
+ phone_number: string | null;
5674
+ identifier: string | null;
5675
+ additional_attributes: Record<string, unknown>;
5676
+ custom_attributes: Record<string, unknown>;
5677
+ blocked: boolean;
5678
+ customer_stage: string;
5679
+ customer_stage_explanation: string | null;
5680
+ type?: string | undefined;
5681
+ };
5682
+ hmac_verified: boolean;
5683
+ assignee: {
5684
+ id: number;
5685
+ name: string;
5686
+ email: string;
5687
+ } | null;
5688
+ team?: unknown;
5689
+ };
5690
+ labels: string[];
5691
+ snoozed_until: number | null;
5692
+ unread_count: number;
5693
+ first_reply_created_at: string | number | null;
5694
+ waiting_since: number | null;
5695
+ ai_disabled: boolean;
5696
+ reenable_ai_at: number | null;
5697
+ ai_summary: string | null;
5698
+ conversation_type: string;
5699
+ agent_last_seen_at: number;
5700
+ contact_last_seen_at: number;
5701
+ last_activity_at: number;
5702
+ timestamp: number;
5703
+ };
5704
+ inbox: {
5705
+ id: number;
5706
+ name: string;
5707
+ };
5708
+ event: "message_updated";
5709
+ }>]>;
2362
5710
  /**
2363
5711
  * TypeScript Types (inferred from Zod schemas)
2364
5712
  */
@@ -2373,4 +5721,6 @@ export type WebhookMessage = z.infer<typeof WebhookMessageSchema>;
2373
5721
  export type WebhookConversationMeta = z.infer<typeof WebhookConversationMetaSchema>;
2374
5722
  export type WebhookConversation = z.infer<typeof WebhookConversationSchema>;
2375
5723
  export type MessageCreatedEvent = z.infer<typeof MessageCreatedEventSchema>;
5724
+ export type MessageUpdatedEvent = z.infer<typeof MessageUpdatedEventSchema>;
5725
+ export type WebhookEvent = z.infer<typeof WebhookEventSchema>;
2376
5726
  //# sourceMappingURL=types.d.ts.map