@elevasis/ui 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/{chunk-POFDRPDI.js → chunk-4PHPENKX.js} +3044 -1753
  2. package/dist/chunk-7M2VOCYN.js +1 -0
  3. package/dist/{chunk-PEDPD3PU.js → chunk-7PDDPNQS.js} +1 -1
  4. package/dist/{chunk-YIWLA2B6.js → chunk-C2OFFC7J.js} +0 -1
  5. package/dist/{chunk-ZB5PKIX5.js → chunk-CTWYIRKW.js} +1 -2
  6. package/dist/{chunk-FH5QGCXL.js → chunk-F5QSLYUB.js} +180 -7
  7. package/dist/{chunk-CC4WGHGG.js → chunk-KGEYEUR5.js} +1 -3
  8. package/dist/{chunk-MU5EZV3L.js → chunk-MGEC63TE.js} +5 -6
  9. package/dist/{chunk-SMJLS23U.js → chunk-NYMKWGKN.js} +18 -1
  10. package/dist/{chunk-X4BLH3JL.js → chunk-OFT2QK6B.js} +6 -7
  11. package/dist/{chunk-O4PMRC6J.js → chunk-OPT74SGF.js} +118 -111
  12. package/dist/{chunk-6RGNVHG3.js → chunk-UX3Q4YYN.js} +21 -13
  13. package/dist/{chunk-4GZ6VZWO.js → chunk-YCHZ4U5V.js} +10 -2
  14. package/dist/{chunk-PHRDZFJT.js → chunk-ZZ35VSNF.js} +1 -3
  15. package/dist/components/index.d.ts +134 -68
  16. package/dist/components/index.js +34 -25
  17. package/dist/features/auth/index.d.ts +3 -3
  18. package/dist/features/auth/index.js +9 -2
  19. package/dist/features/crm/index.d.ts +61 -5
  20. package/dist/features/crm/index.js +5 -5
  21. package/dist/features/dashboard/index.js +5 -5
  22. package/dist/features/delivery/index.d.ts +64 -4
  23. package/dist/features/delivery/index.js +5 -5
  24. package/dist/features/lead-gen/index.d.ts +61 -5
  25. package/dist/features/lead-gen/index.js +8 -8
  26. package/dist/features/monitoring/index.d.ts +20 -1
  27. package/dist/features/monitoring/index.js +6 -6
  28. package/dist/features/operations/index.d.ts +20 -1
  29. package/dist/features/operations/index.js +7 -7
  30. package/dist/features/seo/index.d.ts +20 -1
  31. package/dist/features/seo/index.js +1 -1
  32. package/dist/features/settings/index.d.ts +22 -2
  33. package/dist/features/settings/index.js +5 -5
  34. package/dist/hooks/index.d.ts +7735 -7719
  35. package/dist/hooks/index.js +4 -4
  36. package/dist/hooks/published.d.ts +3495 -48
  37. package/dist/hooks/published.js +3 -3
  38. package/dist/index.d.ts +1188 -989
  39. package/dist/index.js +4 -4
  40. package/dist/initialization/index.d.ts +2 -1
  41. package/dist/layout/index.d.ts +60 -2
  42. package/dist/layout/index.js +1 -1
  43. package/dist/organization/index.d.ts +2 -1
  44. package/dist/provider/index.d.ts +203 -20
  45. package/dist/provider/index.js +2 -2
  46. package/dist/provider/published.d.ts +194 -19
  47. package/dist/provider/published.js +1 -1
  48. package/dist/types/index.d.ts +2 -1
  49. package/package.json +58 -86
  50. package/dist/chunk-DQJM7T2N.js +0 -1303
@@ -280,6 +280,2558 @@ interface ExecutionLogMessage$1 {
280
280
  context?: LogContext$1
281
281
  }
282
282
 
283
+ type Json$1 =
284
+ | string
285
+ | number
286
+ | boolean
287
+ | null
288
+ | { [key: string]: Json$1 | undefined }
289
+ | Json$1[]
290
+
291
+ type Database$1 = {
292
+ // Allows to automatically instantiate createClient with right options
293
+ // instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
294
+ __InternalSupabase: {
295
+ PostgrestVersion: "12.2.3 (519615d)"
296
+ }
297
+ public: {
298
+ Tables: {
299
+ acq_companies: {
300
+ Row: {
301
+ batch_id: string | null
302
+ category: string | null
303
+ category_pain: string | null
304
+ created_at: string
305
+ domain: string | null
306
+ enrichment_data: Json$1 | null
307
+ filter_reason: string | null
308
+ founded_year: number | null
309
+ id: string
310
+ linkedin_url: string | null
311
+ location_city: string | null
312
+ location_state: string | null
313
+ name: string
314
+ num_employees: number | null
315
+ organization_id: string
316
+ pipeline_status: Json$1
317
+ segment: string | null
318
+ source: string | null
319
+ status: string
320
+ updated_at: string
321
+ website: string | null
322
+ }
323
+ Insert: {
324
+ batch_id?: string | null
325
+ category?: string | null
326
+ category_pain?: string | null
327
+ created_at?: string
328
+ domain?: string | null
329
+ enrichment_data?: Json$1 | null
330
+ filter_reason?: string | null
331
+ founded_year?: number | null
332
+ id?: string
333
+ linkedin_url?: string | null
334
+ location_city?: string | null
335
+ location_state?: string | null
336
+ name: string
337
+ num_employees?: number | null
338
+ organization_id: string
339
+ pipeline_status?: Json$1
340
+ segment?: string | null
341
+ source?: string | null
342
+ status?: string
343
+ updated_at?: string
344
+ website?: string | null
345
+ }
346
+ Update: {
347
+ batch_id?: string | null
348
+ category?: string | null
349
+ category_pain?: string | null
350
+ created_at?: string
351
+ domain?: string | null
352
+ enrichment_data?: Json$1 | null
353
+ filter_reason?: string | null
354
+ founded_year?: number | null
355
+ id?: string
356
+ linkedin_url?: string | null
357
+ location_city?: string | null
358
+ location_state?: string | null
359
+ name?: string
360
+ num_employees?: number | null
361
+ organization_id?: string
362
+ pipeline_status?: Json$1
363
+ segment?: string | null
364
+ source?: string | null
365
+ status?: string
366
+ updated_at?: string
367
+ website?: string | null
368
+ }
369
+ Relationships: [
370
+ {
371
+ foreignKeyName: "acq_companies_organization_id_fkey"
372
+ columns: ["organization_id"]
373
+ isOneToOne: false
374
+ referencedRelation: "organizations"
375
+ referencedColumns: ["id"]
376
+ },
377
+ ]
378
+ }
379
+ acq_contacts: {
380
+ Row: {
381
+ batch_id: string | null
382
+ brochure_first_viewed_at: string | null
383
+ brochure_view_count: number
384
+ company_id: string | null
385
+ created_at: string
386
+ email: string
387
+ email_valid: string | null
388
+ enrichment_data: Json$1
389
+ filter_reason: string | null
390
+ first_name: string | null
391
+ headline: string | null
392
+ id: string
393
+ last_name: string | null
394
+ linkedin_url: string | null
395
+ nurture: boolean
396
+ opening_line: string | null
397
+ organization_id: string
398
+ pipeline_status: Json$1
399
+ source: string | null
400
+ source_id: string | null
401
+ status: string
402
+ title: string | null
403
+ updated_at: string
404
+ }
405
+ Insert: {
406
+ batch_id?: string | null
407
+ brochure_first_viewed_at?: string | null
408
+ brochure_view_count?: number
409
+ company_id?: string | null
410
+ created_at?: string
411
+ email: string
412
+ email_valid?: string | null
413
+ enrichment_data?: Json$1
414
+ filter_reason?: string | null
415
+ first_name?: string | null
416
+ headline?: string | null
417
+ id?: string
418
+ last_name?: string | null
419
+ linkedin_url?: string | null
420
+ nurture?: boolean
421
+ opening_line?: string | null
422
+ organization_id: string
423
+ pipeline_status?: Json$1
424
+ source?: string | null
425
+ source_id?: string | null
426
+ status?: string
427
+ title?: string | null
428
+ updated_at?: string
429
+ }
430
+ Update: {
431
+ batch_id?: string | null
432
+ brochure_first_viewed_at?: string | null
433
+ brochure_view_count?: number
434
+ company_id?: string | null
435
+ created_at?: string
436
+ email?: string
437
+ email_valid?: string | null
438
+ enrichment_data?: Json$1
439
+ filter_reason?: string | null
440
+ first_name?: string | null
441
+ headline?: string | null
442
+ id?: string
443
+ last_name?: string | null
444
+ linkedin_url?: string | null
445
+ nurture?: boolean
446
+ opening_line?: string | null
447
+ organization_id?: string
448
+ pipeline_status?: Json$1
449
+ source?: string | null
450
+ source_id?: string | null
451
+ status?: string
452
+ title?: string | null
453
+ updated_at?: string
454
+ }
455
+ Relationships: [
456
+ {
457
+ foreignKeyName: "acq_contacts_company_id_fkey"
458
+ columns: ["company_id"]
459
+ isOneToOne: false
460
+ referencedRelation: "acq_companies"
461
+ referencedColumns: ["id"]
462
+ },
463
+ {
464
+ foreignKeyName: "acq_contacts_organization_id_fkey"
465
+ columns: ["organization_id"]
466
+ isOneToOne: false
467
+ referencedRelation: "organizations"
468
+ referencedColumns: ["id"]
469
+ },
470
+ ]
471
+ }
472
+ acq_content: {
473
+ Row: {
474
+ body: string | null
475
+ created_at: string
476
+ id: string
477
+ organization_id: string
478
+ pillar: string
479
+ status: string
480
+ title: string
481
+ updated_at: string
482
+ }
483
+ Insert: {
484
+ body?: string | null
485
+ created_at?: string
486
+ id?: string
487
+ organization_id: string
488
+ pillar: string
489
+ status?: string
490
+ title: string
491
+ updated_at?: string
492
+ }
493
+ Update: {
494
+ body?: string | null
495
+ created_at?: string
496
+ id?: string
497
+ organization_id?: string
498
+ pillar?: string
499
+ status?: string
500
+ title?: string
501
+ updated_at?: string
502
+ }
503
+ Relationships: [
504
+ {
505
+ foreignKeyName: "acq_content_organization_id_fkey"
506
+ columns: ["organization_id"]
507
+ isOneToOne: false
508
+ referencedRelation: "organizations"
509
+ referencedColumns: ["id"]
510
+ },
511
+ ]
512
+ }
513
+ acq_content_distributions: {
514
+ Row: {
515
+ adapted_body: string | null
516
+ checklist: Json$1 | null
517
+ content_id: string
518
+ created_at: string
519
+ format: string
520
+ id: string
521
+ media_urls: Json$1
522
+ metrics: Json$1
523
+ metrics_updated_at: string | null
524
+ organization_id: string
525
+ platform: string
526
+ platform_content: Json$1 | null
527
+ platform_post_id: string | null
528
+ platform_url: string | null
529
+ published_at: string | null
530
+ status: string
531
+ updated_at: string
532
+ }
533
+ Insert: {
534
+ adapted_body?: string | null
535
+ checklist?: Json$1 | null
536
+ content_id: string
537
+ created_at?: string
538
+ format: string
539
+ id?: string
540
+ media_urls?: Json$1
541
+ metrics?: Json$1
542
+ metrics_updated_at?: string | null
543
+ organization_id: string
544
+ platform: string
545
+ platform_content?: Json$1 | null
546
+ platform_post_id?: string | null
547
+ platform_url?: string | null
548
+ published_at?: string | null
549
+ status?: string
550
+ updated_at?: string
551
+ }
552
+ Update: {
553
+ adapted_body?: string | null
554
+ checklist?: Json$1 | null
555
+ content_id?: string
556
+ created_at?: string
557
+ format?: string
558
+ id?: string
559
+ media_urls?: Json$1
560
+ metrics?: Json$1
561
+ metrics_updated_at?: string | null
562
+ organization_id?: string
563
+ platform?: string
564
+ platform_content?: Json$1 | null
565
+ platform_post_id?: string | null
566
+ platform_url?: string | null
567
+ published_at?: string | null
568
+ status?: string
569
+ updated_at?: string
570
+ }
571
+ Relationships: [
572
+ {
573
+ foreignKeyName: "acq_content_distributions_content_id_fkey"
574
+ columns: ["content_id"]
575
+ isOneToOne: false
576
+ referencedRelation: "acq_content"
577
+ referencedColumns: ["id"]
578
+ },
579
+ {
580
+ foreignKeyName: "acq_content_distributions_organization_id_fkey"
581
+ columns: ["organization_id"]
582
+ isOneToOne: false
583
+ referencedRelation: "organizations"
584
+ referencedColumns: ["id"]
585
+ },
586
+ ]
587
+ }
588
+ acq_deal_notes: {
589
+ Row: {
590
+ author_user_id: string | null
591
+ body: string
592
+ created_at: string
593
+ deal_id: string
594
+ id: string
595
+ organization_id: string
596
+ updated_at: string
597
+ }
598
+ Insert: {
599
+ author_user_id?: string | null
600
+ body: string
601
+ created_at?: string
602
+ deal_id: string
603
+ id?: string
604
+ organization_id: string
605
+ updated_at?: string
606
+ }
607
+ Update: {
608
+ author_user_id?: string | null
609
+ body?: string
610
+ created_at?: string
611
+ deal_id?: string
612
+ id?: string
613
+ organization_id?: string
614
+ updated_at?: string
615
+ }
616
+ Relationships: [
617
+ {
618
+ foreignKeyName: "acq_deal_notes_deal_id_fkey"
619
+ columns: ["deal_id"]
620
+ isOneToOne: false
621
+ referencedRelation: "acq_deals"
622
+ referencedColumns: ["id"]
623
+ },
624
+ {
625
+ foreignKeyName: "acq_deal_notes_organization_id_fkey"
626
+ columns: ["organization_id"]
627
+ isOneToOne: false
628
+ referencedRelation: "organizations"
629
+ referencedColumns: ["id"]
630
+ },
631
+ ]
632
+ }
633
+ acq_deal_tasks: {
634
+ Row: {
635
+ assignee_user_id: string | null
636
+ completed_at: string | null
637
+ completed_by_user_id: string | null
638
+ created_at: string
639
+ created_by_user_id: string | null
640
+ deal_id: string
641
+ description: string | null
642
+ due_at: string | null
643
+ id: string
644
+ kind: string
645
+ organization_id: string
646
+ title: string
647
+ updated_at: string
648
+ }
649
+ Insert: {
650
+ assignee_user_id?: string | null
651
+ completed_at?: string | null
652
+ completed_by_user_id?: string | null
653
+ created_at?: string
654
+ created_by_user_id?: string | null
655
+ deal_id: string
656
+ description?: string | null
657
+ due_at?: string | null
658
+ id?: string
659
+ kind?: string
660
+ organization_id: string
661
+ title: string
662
+ updated_at?: string
663
+ }
664
+ Update: {
665
+ assignee_user_id?: string | null
666
+ completed_at?: string | null
667
+ completed_by_user_id?: string | null
668
+ created_at?: string
669
+ created_by_user_id?: string | null
670
+ deal_id?: string
671
+ description?: string | null
672
+ due_at?: string | null
673
+ id?: string
674
+ kind?: string
675
+ organization_id?: string
676
+ title?: string
677
+ updated_at?: string
678
+ }
679
+ Relationships: [
680
+ {
681
+ foreignKeyName: "acq_deal_tasks_deal_id_fkey"
682
+ columns: ["deal_id"]
683
+ isOneToOne: false
684
+ referencedRelation: "acq_deals"
685
+ referencedColumns: ["id"]
686
+ },
687
+ {
688
+ foreignKeyName: "acq_deal_tasks_organization_id_fkey"
689
+ columns: ["organization_id"]
690
+ isOneToOne: false
691
+ referencedRelation: "organizations"
692
+ referencedColumns: ["id"]
693
+ },
694
+ ]
695
+ }
696
+ acq_deals: {
697
+ Row: {
698
+ activity_log: Json$1
699
+ cached_stage: string | null
700
+ closed_lost_at: string | null
701
+ closed_lost_reason: string | null
702
+ contact_email: string
703
+ contact_id: string | null
704
+ created_at: string
705
+ discovery_data: Json$1 | null
706
+ discovery_submitted_at: string | null
707
+ discovery_submitted_by: string | null
708
+ id: string
709
+ initial_fee: number | null
710
+ monthly_fee: number | null
711
+ organization_id: string
712
+ payment_link_sent_at: string | null
713
+ payment_received_at: string | null
714
+ proposal_data: Json$1 | null
715
+ proposal_generated_at: string | null
716
+ proposal_pdf_url: string | null
717
+ proposal_reviewed_at: string | null
718
+ proposal_reviewed_by: string | null
719
+ proposal_sent_at: string | null
720
+ proposal_signed_at: string | null
721
+ proposal_status: string | null
722
+ signature_envelope_id: string | null
723
+ source_list_id: string | null
724
+ source_type: string | null
725
+ stripe_payment_id: string | null
726
+ stripe_payment_link: string | null
727
+ stripe_payment_link_id: string | null
728
+ stripe_subscription_id: string | null
729
+ updated_at: string
730
+ }
731
+ Insert: {
732
+ activity_log?: Json$1
733
+ cached_stage?: string | null
734
+ closed_lost_at?: string | null
735
+ closed_lost_reason?: string | null
736
+ contact_email: string
737
+ contact_id?: string | null
738
+ created_at?: string
739
+ discovery_data?: Json$1 | null
740
+ discovery_submitted_at?: string | null
741
+ discovery_submitted_by?: string | null
742
+ id?: string
743
+ initial_fee?: number | null
744
+ monthly_fee?: number | null
745
+ organization_id: string
746
+ payment_link_sent_at?: string | null
747
+ payment_received_at?: string | null
748
+ proposal_data?: Json$1 | null
749
+ proposal_generated_at?: string | null
750
+ proposal_pdf_url?: string | null
751
+ proposal_reviewed_at?: string | null
752
+ proposal_reviewed_by?: string | null
753
+ proposal_sent_at?: string | null
754
+ proposal_signed_at?: string | null
755
+ proposal_status?: string | null
756
+ signature_envelope_id?: string | null
757
+ source_list_id?: string | null
758
+ source_type?: string | null
759
+ stripe_payment_id?: string | null
760
+ stripe_payment_link?: string | null
761
+ stripe_payment_link_id?: string | null
762
+ stripe_subscription_id?: string | null
763
+ updated_at?: string
764
+ }
765
+ Update: {
766
+ activity_log?: Json$1
767
+ cached_stage?: string | null
768
+ closed_lost_at?: string | null
769
+ closed_lost_reason?: string | null
770
+ contact_email?: string
771
+ contact_id?: string | null
772
+ created_at?: string
773
+ discovery_data?: Json$1 | null
774
+ discovery_submitted_at?: string | null
775
+ discovery_submitted_by?: string | null
776
+ id?: string
777
+ initial_fee?: number | null
778
+ monthly_fee?: number | null
779
+ organization_id?: string
780
+ payment_link_sent_at?: string | null
781
+ payment_received_at?: string | null
782
+ proposal_data?: Json$1 | null
783
+ proposal_generated_at?: string | null
784
+ proposal_pdf_url?: string | null
785
+ proposal_reviewed_at?: string | null
786
+ proposal_reviewed_by?: string | null
787
+ proposal_sent_at?: string | null
788
+ proposal_signed_at?: string | null
789
+ proposal_status?: string | null
790
+ signature_envelope_id?: string | null
791
+ source_list_id?: string | null
792
+ source_type?: string | null
793
+ stripe_payment_id?: string | null
794
+ stripe_payment_link?: string | null
795
+ stripe_payment_link_id?: string | null
796
+ stripe_subscription_id?: string | null
797
+ updated_at?: string
798
+ }
799
+ Relationships: [
800
+ {
801
+ foreignKeyName: "acq_deals_contact_id_fkey"
802
+ columns: ["contact_id"]
803
+ isOneToOne: false
804
+ referencedRelation: "acq_contacts"
805
+ referencedColumns: ["id"]
806
+ },
807
+ {
808
+ foreignKeyName: "acq_deals_organization_id_fkey"
809
+ columns: ["organization_id"]
810
+ isOneToOne: false
811
+ referencedRelation: "organizations"
812
+ referencedColumns: ["id"]
813
+ },
814
+ {
815
+ foreignKeyName: "acq_deals_source_list_id_fkey"
816
+ columns: ["source_list_id"]
817
+ isOneToOne: false
818
+ referencedRelation: "acq_lists"
819
+ referencedColumns: ["id"]
820
+ },
821
+ ]
822
+ }
823
+ acq_list_companies: {
824
+ Row: {
825
+ added_at: string
826
+ added_by: string | null
827
+ company_id: string
828
+ id: string
829
+ list_id: string
830
+ source_execution_id: string | null
831
+ source_input_hash: string | null
832
+ source_resource_id: string | null
833
+ stage: string | null
834
+ stage_updated_at: string | null
835
+ }
836
+ Insert: {
837
+ added_at?: string
838
+ added_by?: string | null
839
+ company_id: string
840
+ id?: string
841
+ list_id: string
842
+ source_execution_id?: string | null
843
+ source_input_hash?: string | null
844
+ source_resource_id?: string | null
845
+ stage?: string | null
846
+ stage_updated_at?: string | null
847
+ }
848
+ Update: {
849
+ added_at?: string
850
+ added_by?: string | null
851
+ company_id?: string
852
+ id?: string
853
+ list_id?: string
854
+ source_execution_id?: string | null
855
+ source_input_hash?: string | null
856
+ source_resource_id?: string | null
857
+ stage?: string | null
858
+ stage_updated_at?: string | null
859
+ }
860
+ Relationships: [
861
+ {
862
+ foreignKeyName: "acq_list_companies_company_id_fkey"
863
+ columns: ["company_id"]
864
+ isOneToOne: false
865
+ referencedRelation: "acq_companies"
866
+ referencedColumns: ["id"]
867
+ },
868
+ {
869
+ foreignKeyName: "acq_list_companies_list_id_fkey"
870
+ columns: ["list_id"]
871
+ isOneToOne: false
872
+ referencedRelation: "acq_lists"
873
+ referencedColumns: ["id"]
874
+ },
875
+ {
876
+ foreignKeyName: "acq_list_companies_source_execution_id_fkey"
877
+ columns: ["source_execution_id"]
878
+ isOneToOne: false
879
+ referencedRelation: "execution_logs"
880
+ referencedColumns: ["execution_id"]
881
+ },
882
+ ]
883
+ }
884
+ acq_list_executions: {
885
+ Row: {
886
+ created_at: string
887
+ execution_id: string
888
+ id: string
889
+ list_id: string
890
+ payload: Json$1
891
+ }
892
+ Insert: {
893
+ created_at?: string
894
+ execution_id: string
895
+ id?: string
896
+ list_id: string
897
+ payload?: Json$1
898
+ }
899
+ Update: {
900
+ created_at?: string
901
+ execution_id?: string
902
+ id?: string
903
+ list_id?: string
904
+ payload?: Json$1
905
+ }
906
+ Relationships: [
907
+ {
908
+ foreignKeyName: "acq_list_executions_execution_id_fkey"
909
+ columns: ["execution_id"]
910
+ isOneToOne: false
911
+ referencedRelation: "execution_logs"
912
+ referencedColumns: ["execution_id"]
913
+ },
914
+ {
915
+ foreignKeyName: "acq_list_executions_list_id_fkey"
916
+ columns: ["list_id"]
917
+ isOneToOne: false
918
+ referencedRelation: "acq_lists"
919
+ referencedColumns: ["id"]
920
+ },
921
+ ]
922
+ }
923
+ acq_list_members: {
924
+ Row: {
925
+ added_at: string
926
+ added_by: string | null
927
+ contact_id: string
928
+ id: string
929
+ list_id: string
930
+ source_execution_id: string | null
931
+ source_input_hash: string | null
932
+ source_resource_id: string | null
933
+ stage: string | null
934
+ stage_updated_at: string | null
935
+ }
936
+ Insert: {
937
+ added_at?: string
938
+ added_by?: string | null
939
+ contact_id: string
940
+ id?: string
941
+ list_id: string
942
+ source_execution_id?: string | null
943
+ source_input_hash?: string | null
944
+ source_resource_id?: string | null
945
+ stage?: string | null
946
+ stage_updated_at?: string | null
947
+ }
948
+ Update: {
949
+ added_at?: string
950
+ added_by?: string | null
951
+ contact_id?: string
952
+ id?: string
953
+ list_id?: string
954
+ source_execution_id?: string | null
955
+ source_input_hash?: string | null
956
+ source_resource_id?: string | null
957
+ stage?: string | null
958
+ stage_updated_at?: string | null
959
+ }
960
+ Relationships: [
961
+ {
962
+ foreignKeyName: "acq_list_members_contact_id_fkey"
963
+ columns: ["contact_id"]
964
+ isOneToOne: false
965
+ referencedRelation: "acq_contacts"
966
+ referencedColumns: ["id"]
967
+ },
968
+ {
969
+ foreignKeyName: "acq_list_members_list_id_fkey"
970
+ columns: ["list_id"]
971
+ isOneToOne: false
972
+ referencedRelation: "acq_lists"
973
+ referencedColumns: ["id"]
974
+ },
975
+ {
976
+ foreignKeyName: "acq_list_members_source_execution_id_fkey"
977
+ columns: ["source_execution_id"]
978
+ isOneToOne: false
979
+ referencedRelation: "execution_logs"
980
+ referencedColumns: ["execution_id"]
981
+ },
982
+ ]
983
+ }
984
+ acq_lists: {
985
+ Row: {
986
+ batch_ids: string[]
987
+ completed_at: string | null
988
+ config: Json$1
989
+ created_at: string
990
+ description: string | null
991
+ id: string
992
+ instantly_campaign_id: string | null
993
+ launched_at: string | null
994
+ metadata: Json$1
995
+ name: string
996
+ organization_id: string
997
+ status: string
998
+ type: string
999
+ }
1000
+ Insert: {
1001
+ batch_ids?: string[]
1002
+ completed_at?: string | null
1003
+ config?: Json$1
1004
+ created_at?: string
1005
+ description?: string | null
1006
+ id?: string
1007
+ instantly_campaign_id?: string | null
1008
+ launched_at?: string | null
1009
+ metadata?: Json$1
1010
+ name: string
1011
+ organization_id: string
1012
+ status?: string
1013
+ type?: string
1014
+ }
1015
+ Update: {
1016
+ batch_ids?: string[]
1017
+ completed_at?: string | null
1018
+ config?: Json$1
1019
+ created_at?: string
1020
+ description?: string | null
1021
+ id?: string
1022
+ instantly_campaign_id?: string | null
1023
+ launched_at?: string | null
1024
+ metadata?: Json$1
1025
+ name?: string
1026
+ organization_id?: string
1027
+ status?: string
1028
+ type?: string
1029
+ }
1030
+ Relationships: [
1031
+ {
1032
+ foreignKeyName: "acq_lists_organization_id_fkey"
1033
+ columns: ["organization_id"]
1034
+ isOneToOne: false
1035
+ referencedRelation: "organizations"
1036
+ referencedColumns: ["id"]
1037
+ },
1038
+ ]
1039
+ }
1040
+ acq_seo_metrics: {
1041
+ Row: {
1042
+ ai_citations: Json$1 | null
1043
+ avg_position: number | null
1044
+ clicks: number | null
1045
+ created_at: string
1046
+ cta_clicks: number | null
1047
+ ctr: number | null
1048
+ data_point_count: number | null
1049
+ faq_count: number | null
1050
+ form_submissions: number | null
1051
+ id: string
1052
+ impressions: number | null
1053
+ organization_id: string
1054
+ period: string
1055
+ quality_score: number | null
1056
+ readability: number | null
1057
+ scroll_100: number | null
1058
+ scroll_25: number | null
1059
+ scroll_50: number | null
1060
+ scroll_75: number | null
1061
+ seo_page_id: string
1062
+ word_count: number | null
1063
+ }
1064
+ Insert: {
1065
+ ai_citations?: Json$1 | null
1066
+ avg_position?: number | null
1067
+ clicks?: number | null
1068
+ created_at?: string
1069
+ cta_clicks?: number | null
1070
+ ctr?: number | null
1071
+ data_point_count?: number | null
1072
+ faq_count?: number | null
1073
+ form_submissions?: number | null
1074
+ id?: string
1075
+ impressions?: number | null
1076
+ organization_id: string
1077
+ period: string
1078
+ quality_score?: number | null
1079
+ readability?: number | null
1080
+ scroll_100?: number | null
1081
+ scroll_25?: number | null
1082
+ scroll_50?: number | null
1083
+ scroll_75?: number | null
1084
+ seo_page_id: string
1085
+ word_count?: number | null
1086
+ }
1087
+ Update: {
1088
+ ai_citations?: Json$1 | null
1089
+ avg_position?: number | null
1090
+ clicks?: number | null
1091
+ created_at?: string
1092
+ cta_clicks?: number | null
1093
+ ctr?: number | null
1094
+ data_point_count?: number | null
1095
+ faq_count?: number | null
1096
+ form_submissions?: number | null
1097
+ id?: string
1098
+ impressions?: number | null
1099
+ organization_id?: string
1100
+ period?: string
1101
+ quality_score?: number | null
1102
+ readability?: number | null
1103
+ scroll_100?: number | null
1104
+ scroll_25?: number | null
1105
+ scroll_50?: number | null
1106
+ scroll_75?: number | null
1107
+ seo_page_id?: string
1108
+ word_count?: number | null
1109
+ }
1110
+ Relationships: [
1111
+ {
1112
+ foreignKeyName: "acq_seo_metrics_organization_id_fkey"
1113
+ columns: ["organization_id"]
1114
+ isOneToOne: false
1115
+ referencedRelation: "organizations"
1116
+ referencedColumns: ["id"]
1117
+ },
1118
+ {
1119
+ foreignKeyName: "acq_seo_metrics_seo_page_id_fkey"
1120
+ columns: ["seo_page_id"]
1121
+ isOneToOne: false
1122
+ referencedRelation: "acq_seo_pages"
1123
+ referencedColumns: ["id"]
1124
+ },
1125
+ ]
1126
+ }
1127
+ acq_seo_pages: {
1128
+ Row: {
1129
+ city: string | null
1130
+ content: Json$1 | null
1131
+ created_at: string
1132
+ faq_items: Json$1 | null
1133
+ hero_image_url: string | null
1134
+ id: string
1135
+ internal_links: Json$1 | null
1136
+ local_data: Json$1 | null
1137
+ meta_description: string | null
1138
+ organization_id: string
1139
+ page_type: string
1140
+ published_at: string | null
1141
+ refreshed_at: string | null
1142
+ schema_markup: Json$1 | null
1143
+ slug: string
1144
+ state: string | null
1145
+ status: string
1146
+ title: string
1147
+ updated_at: string
1148
+ use_case: string | null
1149
+ vertical: string
1150
+ }
1151
+ Insert: {
1152
+ city?: string | null
1153
+ content?: Json$1 | null
1154
+ created_at?: string
1155
+ faq_items?: Json$1 | null
1156
+ hero_image_url?: string | null
1157
+ id?: string
1158
+ internal_links?: Json$1 | null
1159
+ local_data?: Json$1 | null
1160
+ meta_description?: string | null
1161
+ organization_id: string
1162
+ page_type: string
1163
+ published_at?: string | null
1164
+ refreshed_at?: string | null
1165
+ schema_markup?: Json$1 | null
1166
+ slug: string
1167
+ state?: string | null
1168
+ status?: string
1169
+ title: string
1170
+ updated_at?: string
1171
+ use_case?: string | null
1172
+ vertical: string
1173
+ }
1174
+ Update: {
1175
+ city?: string | null
1176
+ content?: Json$1 | null
1177
+ created_at?: string
1178
+ faq_items?: Json$1 | null
1179
+ hero_image_url?: string | null
1180
+ id?: string
1181
+ internal_links?: Json$1 | null
1182
+ local_data?: Json$1 | null
1183
+ meta_description?: string | null
1184
+ organization_id?: string
1185
+ page_type?: string
1186
+ published_at?: string | null
1187
+ refreshed_at?: string | null
1188
+ schema_markup?: Json$1 | null
1189
+ slug?: string
1190
+ state?: string | null
1191
+ status?: string
1192
+ title?: string
1193
+ updated_at?: string
1194
+ use_case?: string | null
1195
+ vertical?: string
1196
+ }
1197
+ Relationships: [
1198
+ {
1199
+ foreignKeyName: "acq_seo_pages_organization_id_fkey"
1200
+ columns: ["organization_id"]
1201
+ isOneToOne: false
1202
+ referencedRelation: "organizations"
1203
+ referencedColumns: ["id"]
1204
+ },
1205
+ ]
1206
+ }
1207
+ acq_social_posts: {
1208
+ Row: {
1209
+ author_name: string
1210
+ author_url: string | null
1211
+ comments_count: number
1212
+ created_at: string
1213
+ discovered_at: string
1214
+ engagement_count: number
1215
+ feedback: string | null
1216
+ final_response: string | null
1217
+ fully_reviewed: boolean
1218
+ id: string
1219
+ initial_draft: string | null
1220
+ matched_keywords: string[]
1221
+ matched_query: string | null
1222
+ metadata: Json$1
1223
+ organization_id: string
1224
+ platform: string
1225
+ platform_post_id: string
1226
+ post_text: string
1227
+ post_title: string
1228
+ post_url: string
1229
+ posted_at: string
1230
+ relevance_score: number
1231
+ responded_at: string | null
1232
+ reviewed_at: string | null
1233
+ skip_reason: string | null
1234
+ source_category: string | null
1235
+ status: string
1236
+ updated_at: string
1237
+ }
1238
+ Insert: {
1239
+ author_name: string
1240
+ author_url?: string | null
1241
+ comments_count?: number
1242
+ created_at?: string
1243
+ discovered_at?: string
1244
+ engagement_count?: number
1245
+ feedback?: string | null
1246
+ final_response?: string | null
1247
+ fully_reviewed?: boolean
1248
+ id?: string
1249
+ initial_draft?: string | null
1250
+ matched_keywords?: string[]
1251
+ matched_query?: string | null
1252
+ metadata?: Json$1
1253
+ organization_id: string
1254
+ platform: string
1255
+ platform_post_id: string
1256
+ post_text: string
1257
+ post_title: string
1258
+ post_url: string
1259
+ posted_at: string
1260
+ relevance_score?: number
1261
+ responded_at?: string | null
1262
+ reviewed_at?: string | null
1263
+ skip_reason?: string | null
1264
+ source_category?: string | null
1265
+ status?: string
1266
+ updated_at?: string
1267
+ }
1268
+ Update: {
1269
+ author_name?: string
1270
+ author_url?: string | null
1271
+ comments_count?: number
1272
+ created_at?: string
1273
+ discovered_at?: string
1274
+ engagement_count?: number
1275
+ feedback?: string | null
1276
+ final_response?: string | null
1277
+ fully_reviewed?: boolean
1278
+ id?: string
1279
+ initial_draft?: string | null
1280
+ matched_keywords?: string[]
1281
+ matched_query?: string | null
1282
+ metadata?: Json$1
1283
+ organization_id?: string
1284
+ platform?: string
1285
+ platform_post_id?: string
1286
+ post_text?: string
1287
+ post_title?: string
1288
+ post_url?: string
1289
+ posted_at?: string
1290
+ relevance_score?: number
1291
+ responded_at?: string | null
1292
+ reviewed_at?: string | null
1293
+ skip_reason?: string | null
1294
+ source_category?: string | null
1295
+ status?: string
1296
+ updated_at?: string
1297
+ }
1298
+ Relationships: [
1299
+ {
1300
+ foreignKeyName: "acq_social_posts_organization_id_fkey"
1301
+ columns: ["organization_id"]
1302
+ isOneToOne: false
1303
+ referencedRelation: "organizations"
1304
+ referencedColumns: ["id"]
1305
+ },
1306
+ ]
1307
+ }
1308
+ activities: {
1309
+ Row: {
1310
+ activity_type: string
1311
+ actor_id: string | null
1312
+ actor_type: string | null
1313
+ created_at: string
1314
+ description: string | null
1315
+ entity_id: string
1316
+ entity_name: string | null
1317
+ entity_type: string
1318
+ id: string
1319
+ metadata: Json$1 | null
1320
+ occurred_at: string
1321
+ organization_id: string
1322
+ status: string
1323
+ title: string
1324
+ }
1325
+ Insert: {
1326
+ activity_type: string
1327
+ actor_id?: string | null
1328
+ actor_type?: string | null
1329
+ created_at?: string
1330
+ description?: string | null
1331
+ entity_id: string
1332
+ entity_name?: string | null
1333
+ entity_type: string
1334
+ id?: string
1335
+ metadata?: Json$1 | null
1336
+ occurred_at?: string
1337
+ organization_id: string
1338
+ status: string
1339
+ title: string
1340
+ }
1341
+ Update: {
1342
+ activity_type?: string
1343
+ actor_id?: string | null
1344
+ actor_type?: string | null
1345
+ created_at?: string
1346
+ description?: string | null
1347
+ entity_id?: string
1348
+ entity_name?: string | null
1349
+ entity_type?: string
1350
+ id?: string
1351
+ metadata?: Json$1 | null
1352
+ occurred_at?: string
1353
+ organization_id?: string
1354
+ status?: string
1355
+ title?: string
1356
+ }
1357
+ Relationships: [
1358
+ {
1359
+ foreignKeyName: "activities_organization_id_fkey"
1360
+ columns: ["organization_id"]
1361
+ isOneToOne: false
1362
+ referencedRelation: "organizations"
1363
+ referencedColumns: ["id"]
1364
+ },
1365
+ ]
1366
+ }
1367
+ api_keys: {
1368
+ Row: {
1369
+ created_at: string | null
1370
+ id: string
1371
+ key_hash: string
1372
+ last_used_at: string | null
1373
+ name: string
1374
+ organization_id: string
1375
+ }
1376
+ Insert: {
1377
+ created_at?: string | null
1378
+ id?: string
1379
+ key_hash: string
1380
+ last_used_at?: string | null
1381
+ name: string
1382
+ organization_id: string
1383
+ }
1384
+ Update: {
1385
+ created_at?: string | null
1386
+ id?: string
1387
+ key_hash?: string
1388
+ last_used_at?: string | null
1389
+ name?: string
1390
+ organization_id?: string
1391
+ }
1392
+ Relationships: [
1393
+ {
1394
+ foreignKeyName: "api_keys_organization_id_fkey"
1395
+ columns: ["organization_id"]
1396
+ isOneToOne: false
1397
+ referencedRelation: "organizations"
1398
+ referencedColumns: ["id"]
1399
+ },
1400
+ ]
1401
+ }
1402
+ calibration_projects: {
1403
+ Row: {
1404
+ created_at: string | null
1405
+ description: string | null
1406
+ id: string
1407
+ name: string
1408
+ organization_id: string
1409
+ resource_id: string
1410
+ resource_type: string
1411
+ updated_at: string | null
1412
+ }
1413
+ Insert: {
1414
+ created_at?: string | null
1415
+ description?: string | null
1416
+ id?: string
1417
+ name: string
1418
+ organization_id: string
1419
+ resource_id: string
1420
+ resource_type: string
1421
+ updated_at?: string | null
1422
+ }
1423
+ Update: {
1424
+ created_at?: string | null
1425
+ description?: string | null
1426
+ id?: string
1427
+ name?: string
1428
+ organization_id?: string
1429
+ resource_id?: string
1430
+ resource_type?: string
1431
+ updated_at?: string | null
1432
+ }
1433
+ Relationships: [
1434
+ {
1435
+ foreignKeyName: "calibration_projects_organization_id_fkey"
1436
+ columns: ["organization_id"]
1437
+ isOneToOne: false
1438
+ referencedRelation: "organizations"
1439
+ referencedColumns: ["id"]
1440
+ },
1441
+ ]
1442
+ }
1443
+ calibration_runs: {
1444
+ Row: {
1445
+ completed_at: string | null
1446
+ config_variants: Json$1
1447
+ created_at: string | null
1448
+ description: string | null
1449
+ execution_mode: string
1450
+ grader_model: string | null
1451
+ grading_rubric: Json$1 | null
1452
+ id: string
1453
+ name: string
1454
+ organization_id: string
1455
+ project_id: string
1456
+ results: Json$1
1457
+ status: string
1458
+ test_inputs: Json$1
1459
+ }
1460
+ Insert: {
1461
+ completed_at?: string | null
1462
+ config_variants: Json$1
1463
+ created_at?: string | null
1464
+ description?: string | null
1465
+ execution_mode?: string
1466
+ grader_model?: string | null
1467
+ grading_rubric?: Json$1 | null
1468
+ id?: string
1469
+ name: string
1470
+ organization_id: string
1471
+ project_id: string
1472
+ results?: Json$1
1473
+ status?: string
1474
+ test_inputs: Json$1
1475
+ }
1476
+ Update: {
1477
+ completed_at?: string | null
1478
+ config_variants?: Json$1
1479
+ created_at?: string | null
1480
+ description?: string | null
1481
+ execution_mode?: string
1482
+ grader_model?: string | null
1483
+ grading_rubric?: Json$1 | null
1484
+ id?: string
1485
+ name?: string
1486
+ organization_id?: string
1487
+ project_id?: string
1488
+ results?: Json$1
1489
+ status?: string
1490
+ test_inputs?: Json$1
1491
+ }
1492
+ Relationships: [
1493
+ {
1494
+ foreignKeyName: "calibration_runs_organization_id_fkey"
1495
+ columns: ["organization_id"]
1496
+ isOneToOne: false
1497
+ referencedRelation: "organizations"
1498
+ referencedColumns: ["id"]
1499
+ },
1500
+ {
1501
+ foreignKeyName: "calibration_runs_project_id_fkey"
1502
+ columns: ["project_id"]
1503
+ isOneToOne: false
1504
+ referencedRelation: "calibration_projects"
1505
+ referencedColumns: ["id"]
1506
+ },
1507
+ ]
1508
+ }
1509
+ command_queue: {
1510
+ Row: {
1511
+ action_payload: Json$1 | null
1512
+ actions: Json$1
1513
+ completed_at: string | null
1514
+ completed_by: string | null
1515
+ context: Json$1
1516
+ created_at: string
1517
+ description: string | null
1518
+ expires_at: string | null
1519
+ human_checkpoint: string | null
1520
+ id: string
1521
+ idempotency_key: string | null
1522
+ metadata: Json$1 | null
1523
+ organization_id: string
1524
+ origin_execution_id: string
1525
+ origin_resource_id: string
1526
+ origin_resource_type: string
1527
+ priority: number
1528
+ selected_action: string | null
1529
+ status: string
1530
+ target_execution_id: string | null
1531
+ target_resource_id: string | null
1532
+ target_resource_type: string | null
1533
+ }
1534
+ Insert: {
1535
+ action_payload?: Json$1 | null
1536
+ actions: Json$1
1537
+ completed_at?: string | null
1538
+ completed_by?: string | null
1539
+ context: Json$1
1540
+ created_at?: string
1541
+ description?: string | null
1542
+ expires_at?: string | null
1543
+ human_checkpoint?: string | null
1544
+ id?: string
1545
+ idempotency_key?: string | null
1546
+ metadata?: Json$1 | null
1547
+ organization_id: string
1548
+ origin_execution_id: string
1549
+ origin_resource_id: string
1550
+ origin_resource_type: string
1551
+ priority?: number
1552
+ selected_action?: string | null
1553
+ status?: string
1554
+ target_execution_id?: string | null
1555
+ target_resource_id?: string | null
1556
+ target_resource_type?: string | null
1557
+ }
1558
+ Update: {
1559
+ action_payload?: Json$1 | null
1560
+ actions?: Json$1
1561
+ completed_at?: string | null
1562
+ completed_by?: string | null
1563
+ context?: Json$1
1564
+ created_at?: string
1565
+ description?: string | null
1566
+ expires_at?: string | null
1567
+ human_checkpoint?: string | null
1568
+ id?: string
1569
+ idempotency_key?: string | null
1570
+ metadata?: Json$1 | null
1571
+ organization_id?: string
1572
+ origin_execution_id?: string
1573
+ origin_resource_id?: string
1574
+ origin_resource_type?: string
1575
+ priority?: number
1576
+ selected_action?: string | null
1577
+ status?: string
1578
+ target_execution_id?: string | null
1579
+ target_resource_id?: string | null
1580
+ target_resource_type?: string | null
1581
+ }
1582
+ Relationships: [
1583
+ {
1584
+ foreignKeyName: "command_queue_completed_by_fkey"
1585
+ columns: ["completed_by"]
1586
+ isOneToOne: false
1587
+ referencedRelation: "users"
1588
+ referencedColumns: ["id"]
1589
+ },
1590
+ {
1591
+ foreignKeyName: "command_queue_organization_id_fkey"
1592
+ columns: ["organization_id"]
1593
+ isOneToOne: false
1594
+ referencedRelation: "organizations"
1595
+ referencedColumns: ["id"]
1596
+ },
1597
+ {
1598
+ foreignKeyName: "command_queue_target_execution_id_fkey"
1599
+ columns: ["target_execution_id"]
1600
+ isOneToOne: false
1601
+ referencedRelation: "execution_logs"
1602
+ referencedColumns: ["execution_id"]
1603
+ },
1604
+ ]
1605
+ }
1606
+ credentials: {
1607
+ Row: {
1608
+ created_at: string
1609
+ created_by: string | null
1610
+ encrypted_value: string
1611
+ id: string
1612
+ name: string
1613
+ organization_id: string
1614
+ provider: string | null
1615
+ type: string
1616
+ updated_at: string
1617
+ }
1618
+ Insert: {
1619
+ created_at?: string
1620
+ created_by?: string | null
1621
+ encrypted_value: string
1622
+ id?: string
1623
+ name: string
1624
+ organization_id: string
1625
+ provider?: string | null
1626
+ type?: string
1627
+ updated_at?: string
1628
+ }
1629
+ Update: {
1630
+ created_at?: string
1631
+ created_by?: string | null
1632
+ encrypted_value?: string
1633
+ id?: string
1634
+ name?: string
1635
+ organization_id?: string
1636
+ provider?: string | null
1637
+ type?: string
1638
+ updated_at?: string
1639
+ }
1640
+ Relationships: [
1641
+ {
1642
+ foreignKeyName: "credentials_created_by_fkey"
1643
+ columns: ["created_by"]
1644
+ isOneToOne: false
1645
+ referencedRelation: "users"
1646
+ referencedColumns: ["id"]
1647
+ },
1648
+ {
1649
+ foreignKeyName: "credentials_organization_id_fkey"
1650
+ columns: ["organization_id"]
1651
+ isOneToOne: false
1652
+ referencedRelation: "organizations"
1653
+ referencedColumns: ["id"]
1654
+ },
1655
+ ]
1656
+ }
1657
+ deployments: {
1658
+ Row: {
1659
+ compiled_docs: Json$1 | null
1660
+ created_at: string
1661
+ deployment_version: string | null
1662
+ documentation: Json$1 | null
1663
+ error_message: string | null
1664
+ id: string
1665
+ organization_id: string
1666
+ pid: number | null
1667
+ port: number | null
1668
+ sdk_version: string
1669
+ status: string
1670
+ tarball_path: string | null
1671
+ updated_at: string
1672
+ }
1673
+ Insert: {
1674
+ compiled_docs?: Json$1 | null
1675
+ created_at?: string
1676
+ deployment_version?: string | null
1677
+ documentation?: Json$1 | null
1678
+ error_message?: string | null
1679
+ id?: string
1680
+ organization_id: string
1681
+ pid?: number | null
1682
+ port?: number | null
1683
+ sdk_version: string
1684
+ status?: string
1685
+ tarball_path?: string | null
1686
+ updated_at?: string
1687
+ }
1688
+ Update: {
1689
+ compiled_docs?: Json$1 | null
1690
+ created_at?: string
1691
+ deployment_version?: string | null
1692
+ documentation?: Json$1 | null
1693
+ error_message?: string | null
1694
+ id?: string
1695
+ organization_id?: string
1696
+ pid?: number | null
1697
+ port?: number | null
1698
+ sdk_version?: string
1699
+ status?: string
1700
+ tarball_path?: string | null
1701
+ updated_at?: string
1702
+ }
1703
+ Relationships: [
1704
+ {
1705
+ foreignKeyName: "deployments_organization_id_fkey"
1706
+ columns: ["organization_id"]
1707
+ isOneToOne: false
1708
+ referencedRelation: "organizations"
1709
+ referencedColumns: ["id"]
1710
+ },
1711
+ ]
1712
+ }
1713
+ execution_errors: {
1714
+ Row: {
1715
+ created_at: string | null
1716
+ error_category: string
1717
+ error_message: string
1718
+ error_severity: string
1719
+ error_stack_trace: string | null
1720
+ error_type: string
1721
+ execution_id: string
1722
+ id: string
1723
+ metadata: Json$1 | null
1724
+ occurred_at: string
1725
+ organization_id: string
1726
+ resolved: boolean
1727
+ resolved_at: string | null
1728
+ resolved_by: string | null
1729
+ }
1730
+ Insert: {
1731
+ created_at?: string | null
1732
+ error_category: string
1733
+ error_message: string
1734
+ error_severity: string
1735
+ error_stack_trace?: string | null
1736
+ error_type: string
1737
+ execution_id: string
1738
+ id?: string
1739
+ metadata?: Json$1 | null
1740
+ occurred_at?: string
1741
+ organization_id: string
1742
+ resolved?: boolean
1743
+ resolved_at?: string | null
1744
+ resolved_by?: string | null
1745
+ }
1746
+ Update: {
1747
+ created_at?: string | null
1748
+ error_category?: string
1749
+ error_message?: string
1750
+ error_severity?: string
1751
+ error_stack_trace?: string | null
1752
+ error_type?: string
1753
+ execution_id?: string
1754
+ id?: string
1755
+ metadata?: Json$1 | null
1756
+ occurred_at?: string
1757
+ organization_id?: string
1758
+ resolved?: boolean
1759
+ resolved_at?: string | null
1760
+ resolved_by?: string | null
1761
+ }
1762
+ Relationships: [
1763
+ {
1764
+ foreignKeyName: "execution_errors_execution_id_fkey"
1765
+ columns: ["execution_id"]
1766
+ isOneToOne: false
1767
+ referencedRelation: "execution_logs"
1768
+ referencedColumns: ["execution_id"]
1769
+ },
1770
+ {
1771
+ foreignKeyName: "execution_errors_organization_id_fkey"
1772
+ columns: ["organization_id"]
1773
+ isOneToOne: false
1774
+ referencedRelation: "organizations"
1775
+ referencedColumns: ["id"]
1776
+ },
1777
+ {
1778
+ foreignKeyName: "execution_errors_resolved_by_fkey"
1779
+ columns: ["resolved_by"]
1780
+ isOneToOne: false
1781
+ referencedRelation: "users"
1782
+ referencedColumns: ["id"]
1783
+ },
1784
+ ]
1785
+ }
1786
+ execution_logs: {
1787
+ Row: {
1788
+ api_version: string | null
1789
+ completed_at: string | null
1790
+ created_at: string | null
1791
+ error: string | null
1792
+ execution_id: string
1793
+ input: Json$1 | null
1794
+ last_heartbeat_at: string | null
1795
+ logs: Json$1 | null
1796
+ organization_id: string
1797
+ origin_execution_id: string | null
1798
+ output: Json$1 | null
1799
+ resource_id: string
1800
+ resource_status: string
1801
+ resource_type: string
1802
+ resource_version: string | null
1803
+ sdk_version: string | null
1804
+ session_id: string | null
1805
+ session_turn_number: number | null
1806
+ started_at: string
1807
+ status: string
1808
+ trigger_type: string | null
1809
+ updated_at: string | null
1810
+ user_id: string | null
1811
+ }
1812
+ Insert: {
1813
+ api_version?: string | null
1814
+ completed_at?: string | null
1815
+ created_at?: string | null
1816
+ error?: string | null
1817
+ execution_id?: string
1818
+ input?: Json$1 | null
1819
+ last_heartbeat_at?: string | null
1820
+ logs?: Json$1 | null
1821
+ organization_id: string
1822
+ origin_execution_id?: string | null
1823
+ output?: Json$1 | null
1824
+ resource_id: string
1825
+ resource_status?: string
1826
+ resource_type?: string
1827
+ resource_version?: string | null
1828
+ sdk_version?: string | null
1829
+ session_id?: string | null
1830
+ session_turn_number?: number | null
1831
+ started_at?: string
1832
+ status: string
1833
+ trigger_type?: string | null
1834
+ updated_at?: string | null
1835
+ user_id?: string | null
1836
+ }
1837
+ Update: {
1838
+ api_version?: string | null
1839
+ completed_at?: string | null
1840
+ created_at?: string | null
1841
+ error?: string | null
1842
+ execution_id?: string
1843
+ input?: Json$1 | null
1844
+ last_heartbeat_at?: string | null
1845
+ logs?: Json$1 | null
1846
+ organization_id?: string
1847
+ origin_execution_id?: string | null
1848
+ output?: Json$1 | null
1849
+ resource_id?: string
1850
+ resource_status?: string
1851
+ resource_type?: string
1852
+ resource_version?: string | null
1853
+ sdk_version?: string | null
1854
+ session_id?: string | null
1855
+ session_turn_number?: number | null
1856
+ started_at?: string
1857
+ status?: string
1858
+ trigger_type?: string | null
1859
+ updated_at?: string | null
1860
+ user_id?: string | null
1861
+ }
1862
+ Relationships: [
1863
+ {
1864
+ foreignKeyName: "execution_history_organization_id_fkey"
1865
+ columns: ["organization_id"]
1866
+ isOneToOne: false
1867
+ referencedRelation: "organizations"
1868
+ referencedColumns: ["id"]
1869
+ },
1870
+ {
1871
+ foreignKeyName: "execution_logs_origin_execution_id_fkey"
1872
+ columns: ["origin_execution_id"]
1873
+ isOneToOne: false
1874
+ referencedRelation: "execution_logs"
1875
+ referencedColumns: ["execution_id"]
1876
+ },
1877
+ {
1878
+ foreignKeyName: "execution_logs_session_id_fkey"
1879
+ columns: ["session_id"]
1880
+ isOneToOne: false
1881
+ referencedRelation: "sessions"
1882
+ referencedColumns: ["session_id"]
1883
+ },
1884
+ {
1885
+ foreignKeyName: "execution_logs_user_id_fkey"
1886
+ columns: ["user_id"]
1887
+ isOneToOne: false
1888
+ referencedRelation: "users"
1889
+ referencedColumns: ["id"]
1890
+ },
1891
+ ]
1892
+ }
1893
+ execution_metrics: {
1894
+ Row: {
1895
+ ai_call_count: number
1896
+ ai_calls: Json$1 | null
1897
+ automation_savings_usd: number | null
1898
+ created_at: string | null
1899
+ duration_ms: number | null
1900
+ execution_id: string
1901
+ organization_id: string
1902
+ resource_id: string
1903
+ total_cost_usd: number
1904
+ total_input_tokens: number
1905
+ total_output_tokens: number
1906
+ }
1907
+ Insert: {
1908
+ ai_call_count: number
1909
+ ai_calls?: Json$1 | null
1910
+ automation_savings_usd?: number | null
1911
+ created_at?: string | null
1912
+ duration_ms?: number | null
1913
+ execution_id: string
1914
+ organization_id: string
1915
+ resource_id: string
1916
+ total_cost_usd: number
1917
+ total_input_tokens: number
1918
+ total_output_tokens: number
1919
+ }
1920
+ Update: {
1921
+ ai_call_count?: number
1922
+ ai_calls?: Json$1 | null
1923
+ automation_savings_usd?: number | null
1924
+ created_at?: string | null
1925
+ duration_ms?: number | null
1926
+ execution_id?: string
1927
+ organization_id?: string
1928
+ resource_id?: string
1929
+ total_cost_usd?: number
1930
+ total_input_tokens?: number
1931
+ total_output_tokens?: number
1932
+ }
1933
+ Relationships: [
1934
+ {
1935
+ foreignKeyName: "execution_metrics_execution_id_fkey"
1936
+ columns: ["execution_id"]
1937
+ isOneToOne: true
1938
+ referencedRelation: "execution_logs"
1939
+ referencedColumns: ["execution_id"]
1940
+ },
1941
+ {
1942
+ foreignKeyName: "execution_metrics_organization_id_fkey"
1943
+ columns: ["organization_id"]
1944
+ isOneToOne: false
1945
+ referencedRelation: "organizations"
1946
+ referencedColumns: ["id"]
1947
+ },
1948
+ ]
1949
+ }
1950
+ notifications: {
1951
+ Row: {
1952
+ action_url: string | null
1953
+ category: string
1954
+ created_at: string | null
1955
+ id: string
1956
+ message: string
1957
+ organization_id: string
1958
+ read: boolean | null
1959
+ read_at: string | null
1960
+ title: string
1961
+ user_id: string
1962
+ }
1963
+ Insert: {
1964
+ action_url?: string | null
1965
+ category: string
1966
+ created_at?: string | null
1967
+ id?: string
1968
+ message: string
1969
+ organization_id: string
1970
+ read?: boolean | null
1971
+ read_at?: string | null
1972
+ title: string
1973
+ user_id: string
1974
+ }
1975
+ Update: {
1976
+ action_url?: string | null
1977
+ category?: string
1978
+ created_at?: string | null
1979
+ id?: string
1980
+ message?: string
1981
+ organization_id?: string
1982
+ read?: boolean | null
1983
+ read_at?: string | null
1984
+ title?: string
1985
+ user_id?: string
1986
+ }
1987
+ Relationships: [
1988
+ {
1989
+ foreignKeyName: "notifications_organization_id_fkey"
1990
+ columns: ["organization_id"]
1991
+ isOneToOne: false
1992
+ referencedRelation: "organizations"
1993
+ referencedColumns: ["id"]
1994
+ },
1995
+ {
1996
+ foreignKeyName: "notifications_user_id_fkey"
1997
+ columns: ["user_id"]
1998
+ isOneToOne: false
1999
+ referencedRelation: "users"
2000
+ referencedColumns: ["id"]
2001
+ },
2002
+ ]
2003
+ }
2004
+ org_invitations: {
2005
+ Row: {
2006
+ accept_invitation_url: string | null
2007
+ accepted_at: string | null
2008
+ created_at: string | null
2009
+ email: string
2010
+ expires_at: string
2011
+ id: string
2012
+ invitation_state: string | null
2013
+ invitation_token: string | null
2014
+ inviter_user_id: string | null
2015
+ organization_id: string | null
2016
+ revoked_at: string | null
2017
+ role_slug: string | null
2018
+ updated_at: string | null
2019
+ workos_invitation_id: string
2020
+ }
2021
+ Insert: {
2022
+ accept_invitation_url?: string | null
2023
+ accepted_at?: string | null
2024
+ created_at?: string | null
2025
+ email: string
2026
+ expires_at: string
2027
+ id?: string
2028
+ invitation_state?: string | null
2029
+ invitation_token?: string | null
2030
+ inviter_user_id?: string | null
2031
+ organization_id?: string | null
2032
+ revoked_at?: string | null
2033
+ role_slug?: string | null
2034
+ updated_at?: string | null
2035
+ workos_invitation_id: string
2036
+ }
2037
+ Update: {
2038
+ accept_invitation_url?: string | null
2039
+ accepted_at?: string | null
2040
+ created_at?: string | null
2041
+ email?: string
2042
+ expires_at?: string
2043
+ id?: string
2044
+ invitation_state?: string | null
2045
+ invitation_token?: string | null
2046
+ inviter_user_id?: string | null
2047
+ organization_id?: string | null
2048
+ revoked_at?: string | null
2049
+ role_slug?: string | null
2050
+ updated_at?: string | null
2051
+ workos_invitation_id?: string
2052
+ }
2053
+ Relationships: [
2054
+ {
2055
+ foreignKeyName: "org_invitations_inviter_user_id_fkey"
2056
+ columns: ["inviter_user_id"]
2057
+ isOneToOne: false
2058
+ referencedRelation: "users"
2059
+ referencedColumns: ["id"]
2060
+ },
2061
+ {
2062
+ foreignKeyName: "org_invitations_organization_id_fkey"
2063
+ columns: ["organization_id"]
2064
+ isOneToOne: false
2065
+ referencedRelation: "organizations"
2066
+ referencedColumns: ["id"]
2067
+ },
2068
+ ]
2069
+ }
2070
+ org_memberships: {
2071
+ Row: {
2072
+ config: Json$1
2073
+ created_at: string | null
2074
+ id: string
2075
+ membership_status: string | null
2076
+ organization_id: string
2077
+ role_slug: string | null
2078
+ updated_at: string | null
2079
+ user_id: string
2080
+ workos_membership_id: string | null
2081
+ }
2082
+ Insert: {
2083
+ config?: Json$1
2084
+ created_at?: string | null
2085
+ id?: string
2086
+ membership_status?: string | null
2087
+ organization_id: string
2088
+ role_slug?: string | null
2089
+ updated_at?: string | null
2090
+ user_id: string
2091
+ workos_membership_id?: string | null
2092
+ }
2093
+ Update: {
2094
+ config?: Json$1
2095
+ created_at?: string | null
2096
+ id?: string
2097
+ membership_status?: string | null
2098
+ organization_id?: string
2099
+ role_slug?: string | null
2100
+ updated_at?: string | null
2101
+ user_id?: string
2102
+ workos_membership_id?: string | null
2103
+ }
2104
+ Relationships: [
2105
+ {
2106
+ foreignKeyName: "org_memberships_organization_id_fkey"
2107
+ columns: ["organization_id"]
2108
+ isOneToOne: false
2109
+ referencedRelation: "organizations"
2110
+ referencedColumns: ["id"]
2111
+ },
2112
+ {
2113
+ foreignKeyName: "org_memberships_user_id_fkey"
2114
+ columns: ["user_id"]
2115
+ isOneToOne: false
2116
+ referencedRelation: "users"
2117
+ referencedColumns: ["id"]
2118
+ },
2119
+ ]
2120
+ }
2121
+ organizations: {
2122
+ Row: {
2123
+ config: Json$1
2124
+ created_at: string
2125
+ id: string
2126
+ is_test: boolean
2127
+ metadata: Json$1
2128
+ name: string
2129
+ status: string
2130
+ updated_at: string
2131
+ workos_org_id: string
2132
+ }
2133
+ Insert: {
2134
+ config?: Json$1
2135
+ created_at?: string
2136
+ id?: string
2137
+ is_test?: boolean
2138
+ metadata?: Json$1
2139
+ name: string
2140
+ status?: string
2141
+ updated_at?: string
2142
+ workos_org_id: string
2143
+ }
2144
+ Update: {
2145
+ config?: Json$1
2146
+ created_at?: string
2147
+ id?: string
2148
+ is_test?: boolean
2149
+ metadata?: Json$1
2150
+ name?: string
2151
+ status?: string
2152
+ updated_at?: string
2153
+ workos_org_id?: string
2154
+ }
2155
+ Relationships: []
2156
+ }
2157
+ prj_milestones: {
2158
+ Row: {
2159
+ checklist: Json$1 | null
2160
+ completed_at: string | null
2161
+ created_at: string
2162
+ description: string | null
2163
+ due_date: string | null
2164
+ id: string
2165
+ metadata: Json$1 | null
2166
+ name: string
2167
+ organization_id: string
2168
+ project_id: string
2169
+ sequence: number
2170
+ status: string
2171
+ updated_at: string
2172
+ }
2173
+ Insert: {
2174
+ checklist?: Json$1 | null
2175
+ completed_at?: string | null
2176
+ created_at?: string
2177
+ description?: string | null
2178
+ due_date?: string | null
2179
+ id?: string
2180
+ metadata?: Json$1 | null
2181
+ name: string
2182
+ organization_id: string
2183
+ project_id: string
2184
+ sequence?: number
2185
+ status?: string
2186
+ updated_at?: string
2187
+ }
2188
+ Update: {
2189
+ checklist?: Json$1 | null
2190
+ completed_at?: string | null
2191
+ created_at?: string
2192
+ description?: string | null
2193
+ due_date?: string | null
2194
+ id?: string
2195
+ metadata?: Json$1 | null
2196
+ name?: string
2197
+ organization_id?: string
2198
+ project_id?: string
2199
+ sequence?: number
2200
+ status?: string
2201
+ updated_at?: string
2202
+ }
2203
+ Relationships: [
2204
+ {
2205
+ foreignKeyName: "prj_milestones_organization_id_fkey"
2206
+ columns: ["organization_id"]
2207
+ isOneToOne: false
2208
+ referencedRelation: "organizations"
2209
+ referencedColumns: ["id"]
2210
+ },
2211
+ {
2212
+ foreignKeyName: "prj_milestones_project_id_fkey"
2213
+ columns: ["project_id"]
2214
+ isOneToOne: false
2215
+ referencedRelation: "prj_projects"
2216
+ referencedColumns: ["id"]
2217
+ },
2218
+ ]
2219
+ }
2220
+ prj_notes: {
2221
+ Row: {
2222
+ content: string
2223
+ created_at: string
2224
+ created_by: string | null
2225
+ id: string
2226
+ metadata: Json$1 | null
2227
+ milestone_id: string | null
2228
+ occurred_at: string
2229
+ organization_id: string
2230
+ project_id: string
2231
+ summary: string | null
2232
+ task_id: string | null
2233
+ type: string
2234
+ }
2235
+ Insert: {
2236
+ content: string
2237
+ created_at?: string
2238
+ created_by?: string | null
2239
+ id?: string
2240
+ metadata?: Json$1 | null
2241
+ milestone_id?: string | null
2242
+ occurred_at?: string
2243
+ organization_id: string
2244
+ project_id: string
2245
+ summary?: string | null
2246
+ task_id?: string | null
2247
+ type?: string
2248
+ }
2249
+ Update: {
2250
+ content?: string
2251
+ created_at?: string
2252
+ created_by?: string | null
2253
+ id?: string
2254
+ metadata?: Json$1 | null
2255
+ milestone_id?: string | null
2256
+ occurred_at?: string
2257
+ organization_id?: string
2258
+ project_id?: string
2259
+ summary?: string | null
2260
+ task_id?: string | null
2261
+ type?: string
2262
+ }
2263
+ Relationships: [
2264
+ {
2265
+ foreignKeyName: "prj_notes_created_by_fkey"
2266
+ columns: ["created_by"]
2267
+ isOneToOne: false
2268
+ referencedRelation: "users"
2269
+ referencedColumns: ["id"]
2270
+ },
2271
+ {
2272
+ foreignKeyName: "prj_notes_milestone_id_fkey"
2273
+ columns: ["milestone_id"]
2274
+ isOneToOne: false
2275
+ referencedRelation: "prj_milestones"
2276
+ referencedColumns: ["id"]
2277
+ },
2278
+ {
2279
+ foreignKeyName: "prj_notes_organization_id_fkey"
2280
+ columns: ["organization_id"]
2281
+ isOneToOne: false
2282
+ referencedRelation: "organizations"
2283
+ referencedColumns: ["id"]
2284
+ },
2285
+ {
2286
+ foreignKeyName: "prj_notes_project_id_fkey"
2287
+ columns: ["project_id"]
2288
+ isOneToOne: false
2289
+ referencedRelation: "prj_projects"
2290
+ referencedColumns: ["id"]
2291
+ },
2292
+ {
2293
+ foreignKeyName: "prj_notes_task_id_fkey"
2294
+ columns: ["task_id"]
2295
+ isOneToOne: false
2296
+ referencedRelation: "prj_tasks"
2297
+ referencedColumns: ["id"]
2298
+ },
2299
+ ]
2300
+ }
2301
+ prj_projects: {
2302
+ Row: {
2303
+ actual_end_date: string | null
2304
+ client_company_id: string | null
2305
+ contract_value: number | null
2306
+ created_at: string
2307
+ deal_id: string | null
2308
+ description: string | null
2309
+ id: string
2310
+ kind: string
2311
+ metadata: Json$1 | null
2312
+ name: string
2313
+ organization_id: string
2314
+ start_date: string | null
2315
+ status: string
2316
+ target_end_date: string | null
2317
+ updated_at: string
2318
+ }
2319
+ Insert: {
2320
+ actual_end_date?: string | null
2321
+ client_company_id?: string | null
2322
+ contract_value?: number | null
2323
+ created_at?: string
2324
+ deal_id?: string | null
2325
+ description?: string | null
2326
+ id?: string
2327
+ kind?: string
2328
+ metadata?: Json$1 | null
2329
+ name: string
2330
+ organization_id: string
2331
+ start_date?: string | null
2332
+ status?: string
2333
+ target_end_date?: string | null
2334
+ updated_at?: string
2335
+ }
2336
+ Update: {
2337
+ actual_end_date?: string | null
2338
+ client_company_id?: string | null
2339
+ contract_value?: number | null
2340
+ created_at?: string
2341
+ deal_id?: string | null
2342
+ description?: string | null
2343
+ id?: string
2344
+ kind?: string
2345
+ metadata?: Json$1 | null
2346
+ name?: string
2347
+ organization_id?: string
2348
+ start_date?: string | null
2349
+ status?: string
2350
+ target_end_date?: string | null
2351
+ updated_at?: string
2352
+ }
2353
+ Relationships: [
2354
+ {
2355
+ foreignKeyName: "prj_projects_client_company_id_fkey"
2356
+ columns: ["client_company_id"]
2357
+ isOneToOne: false
2358
+ referencedRelation: "acq_companies"
2359
+ referencedColumns: ["id"]
2360
+ },
2361
+ {
2362
+ foreignKeyName: "prj_projects_deal_id_fkey"
2363
+ columns: ["deal_id"]
2364
+ isOneToOne: false
2365
+ referencedRelation: "acq_deals"
2366
+ referencedColumns: ["id"]
2367
+ },
2368
+ {
2369
+ foreignKeyName: "prj_projects_organization_id_fkey"
2370
+ columns: ["organization_id"]
2371
+ isOneToOne: false
2372
+ referencedRelation: "organizations"
2373
+ referencedColumns: ["id"]
2374
+ },
2375
+ ]
2376
+ }
2377
+ prj_tasks: {
2378
+ Row: {
2379
+ checklist: Json$1
2380
+ completed_at: string | null
2381
+ created_at: string
2382
+ description: string | null
2383
+ due_date: string | null
2384
+ file_url: string | null
2385
+ id: string
2386
+ metadata: Json$1 | null
2387
+ milestone_id: string | null
2388
+ name: string
2389
+ organization_id: string
2390
+ parent_task_id: string | null
2391
+ project_id: string
2392
+ resume_context: Json$1 | null
2393
+ status: string
2394
+ type: string
2395
+ updated_at: string
2396
+ }
2397
+ Insert: {
2398
+ checklist?: Json$1
2399
+ completed_at?: string | null
2400
+ created_at?: string
2401
+ description?: string | null
2402
+ due_date?: string | null
2403
+ file_url?: string | null
2404
+ id?: string
2405
+ metadata?: Json$1 | null
2406
+ milestone_id?: string | null
2407
+ name: string
2408
+ organization_id: string
2409
+ parent_task_id?: string | null
2410
+ project_id: string
2411
+ resume_context?: Json$1 | null
2412
+ status?: string
2413
+ type?: string
2414
+ updated_at?: string
2415
+ }
2416
+ Update: {
2417
+ checklist?: Json$1
2418
+ completed_at?: string | null
2419
+ created_at?: string
2420
+ description?: string | null
2421
+ due_date?: string | null
2422
+ file_url?: string | null
2423
+ id?: string
2424
+ metadata?: Json$1 | null
2425
+ milestone_id?: string | null
2426
+ name?: string
2427
+ organization_id?: string
2428
+ parent_task_id?: string | null
2429
+ project_id?: string
2430
+ resume_context?: Json$1 | null
2431
+ status?: string
2432
+ type?: string
2433
+ updated_at?: string
2434
+ }
2435
+ Relationships: [
2436
+ {
2437
+ foreignKeyName: "prj_tasks_milestone_id_fkey"
2438
+ columns: ["milestone_id"]
2439
+ isOneToOne: false
2440
+ referencedRelation: "prj_milestones"
2441
+ referencedColumns: ["id"]
2442
+ },
2443
+ {
2444
+ foreignKeyName: "prj_tasks_organization_id_fkey"
2445
+ columns: ["organization_id"]
2446
+ isOneToOne: false
2447
+ referencedRelation: "organizations"
2448
+ referencedColumns: ["id"]
2449
+ },
2450
+ {
2451
+ foreignKeyName: "prj_tasks_parent_task_id_fkey"
2452
+ columns: ["parent_task_id"]
2453
+ isOneToOne: false
2454
+ referencedRelation: "prj_tasks"
2455
+ referencedColumns: ["id"]
2456
+ },
2457
+ {
2458
+ foreignKeyName: "prj_tasks_project_id_fkey"
2459
+ columns: ["project_id"]
2460
+ isOneToOne: false
2461
+ referencedRelation: "prj_projects"
2462
+ referencedColumns: ["id"]
2463
+ },
2464
+ ]
2465
+ }
2466
+ session_messages: {
2467
+ Row: {
2468
+ created_at: string | null
2469
+ id: string
2470
+ message: string
2471
+ message_index: number | null
2472
+ message_type: string | null
2473
+ metadata: Json$1 | null
2474
+ role: string
2475
+ session_id: string
2476
+ session_turn_number: number
2477
+ }
2478
+ Insert: {
2479
+ created_at?: string | null
2480
+ id: string
2481
+ message: string
2482
+ message_index?: number | null
2483
+ message_type?: string | null
2484
+ metadata?: Json$1 | null
2485
+ role: string
2486
+ session_id: string
2487
+ session_turn_number: number
2488
+ }
2489
+ Update: {
2490
+ created_at?: string | null
2491
+ id?: string
2492
+ message?: string
2493
+ message_index?: number | null
2494
+ message_type?: string | null
2495
+ metadata?: Json$1 | null
2496
+ role?: string
2497
+ session_id?: string
2498
+ session_turn_number?: number
2499
+ }
2500
+ Relationships: [
2501
+ {
2502
+ foreignKeyName: "session_messages_session_id_fkey"
2503
+ columns: ["session_id"]
2504
+ isOneToOne: false
2505
+ referencedRelation: "sessions"
2506
+ referencedColumns: ["session_id"]
2507
+ },
2508
+ ]
2509
+ }
2510
+ sessions: {
2511
+ Row: {
2512
+ context_window_size: number
2513
+ created_at: string | null
2514
+ cumulative_input_tokens: number
2515
+ cumulative_output_tokens: number
2516
+ deleted_at: string | null
2517
+ ended_at: string | null
2518
+ memory_snapshot: Json$1
2519
+ metadata: Json$1 | null
2520
+ organization_id: string
2521
+ resource_id: string
2522
+ session_id: string
2523
+ session_total_turns: number | null
2524
+ updated_at: string | null
2525
+ user_id: string | null
2526
+ }
2527
+ Insert: {
2528
+ context_window_size?: number
2529
+ created_at?: string | null
2530
+ cumulative_input_tokens?: number
2531
+ cumulative_output_tokens?: number
2532
+ deleted_at?: string | null
2533
+ ended_at?: string | null
2534
+ memory_snapshot: Json$1
2535
+ metadata?: Json$1 | null
2536
+ organization_id: string
2537
+ resource_id: string
2538
+ session_id?: string
2539
+ session_total_turns?: number | null
2540
+ updated_at?: string | null
2541
+ user_id?: string | null
2542
+ }
2543
+ Update: {
2544
+ context_window_size?: number
2545
+ created_at?: string | null
2546
+ cumulative_input_tokens?: number
2547
+ cumulative_output_tokens?: number
2548
+ deleted_at?: string | null
2549
+ ended_at?: string | null
2550
+ memory_snapshot?: Json$1
2551
+ metadata?: Json$1 | null
2552
+ organization_id?: string
2553
+ resource_id?: string
2554
+ session_id?: string
2555
+ session_total_turns?: number | null
2556
+ updated_at?: string | null
2557
+ user_id?: string | null
2558
+ }
2559
+ Relationships: [
2560
+ {
2561
+ foreignKeyName: "fk_organization"
2562
+ columns: ["organization_id"]
2563
+ isOneToOne: false
2564
+ referencedRelation: "organizations"
2565
+ referencedColumns: ["id"]
2566
+ },
2567
+ {
2568
+ foreignKeyName: "fk_user"
2569
+ columns: ["user_id"]
2570
+ isOneToOne: false
2571
+ referencedRelation: "users"
2572
+ referencedColumns: ["id"]
2573
+ },
2574
+ ]
2575
+ }
2576
+ task_schedules: {
2577
+ Row: {
2578
+ created_at: string
2579
+ current_step: number
2580
+ description: string | null
2581
+ id: string
2582
+ idempotency_key: string | null
2583
+ last_execution_id: string | null
2584
+ last_run_at: string | null
2585
+ max_retries: number
2586
+ metadata: Json$1 | null
2587
+ name: string
2588
+ next_run_at: string | null
2589
+ organization_id: string
2590
+ origin_execution_id: string | null
2591
+ origin_resource_id: string | null
2592
+ origin_resource_type: string | null
2593
+ retry_count: number
2594
+ schedule_config: Json$1
2595
+ status: string
2596
+ target_resource_id: string
2597
+ target_resource_type: string
2598
+ updated_at: string
2599
+ }
2600
+ Insert: {
2601
+ created_at?: string
2602
+ current_step?: number
2603
+ description?: string | null
2604
+ id?: string
2605
+ idempotency_key?: string | null
2606
+ last_execution_id?: string | null
2607
+ last_run_at?: string | null
2608
+ max_retries?: number
2609
+ metadata?: Json$1 | null
2610
+ name: string
2611
+ next_run_at?: string | null
2612
+ organization_id: string
2613
+ origin_execution_id?: string | null
2614
+ origin_resource_id?: string | null
2615
+ origin_resource_type?: string | null
2616
+ retry_count?: number
2617
+ schedule_config: Json$1
2618
+ status?: string
2619
+ target_resource_id: string
2620
+ target_resource_type: string
2621
+ updated_at?: string
2622
+ }
2623
+ Update: {
2624
+ created_at?: string
2625
+ current_step?: number
2626
+ description?: string | null
2627
+ id?: string
2628
+ idempotency_key?: string | null
2629
+ last_execution_id?: string | null
2630
+ last_run_at?: string | null
2631
+ max_retries?: number
2632
+ metadata?: Json$1 | null
2633
+ name?: string
2634
+ next_run_at?: string | null
2635
+ organization_id?: string
2636
+ origin_execution_id?: string | null
2637
+ origin_resource_id?: string | null
2638
+ origin_resource_type?: string | null
2639
+ retry_count?: number
2640
+ schedule_config?: Json$1
2641
+ status?: string
2642
+ target_resource_id?: string
2643
+ target_resource_type?: string
2644
+ updated_at?: string
2645
+ }
2646
+ Relationships: [
2647
+ {
2648
+ foreignKeyName: "task_schedules_organization_id_fkey"
2649
+ columns: ["organization_id"]
2650
+ isOneToOne: false
2651
+ referencedRelation: "organizations"
2652
+ referencedColumns: ["id"]
2653
+ },
2654
+ ]
2655
+ }
2656
+ users: {
2657
+ Row: {
2658
+ config: Json$1
2659
+ created_at: string
2660
+ display_name: string | null
2661
+ email: string
2662
+ first_name: string | null
2663
+ id: string
2664
+ is_active: boolean
2665
+ is_platform_admin: boolean | null
2666
+ last_login_at: string | null
2667
+ last_name: string | null
2668
+ last_visited_org: string | null
2669
+ profile_picture_url: string | null
2670
+ updated_at: string
2671
+ workos_user_id: string | null
2672
+ }
2673
+ Insert: {
2674
+ config?: Json$1
2675
+ created_at?: string
2676
+ display_name?: string | null
2677
+ email: string
2678
+ first_name?: string | null
2679
+ id?: string
2680
+ is_active?: boolean
2681
+ is_platform_admin?: boolean | null
2682
+ last_login_at?: string | null
2683
+ last_name?: string | null
2684
+ last_visited_org?: string | null
2685
+ profile_picture_url?: string | null
2686
+ updated_at?: string
2687
+ workos_user_id?: string | null
2688
+ }
2689
+ Update: {
2690
+ config?: Json$1
2691
+ created_at?: string
2692
+ display_name?: string | null
2693
+ email?: string
2694
+ first_name?: string | null
2695
+ id?: string
2696
+ is_active?: boolean
2697
+ is_platform_admin?: boolean | null
2698
+ last_login_at?: string | null
2699
+ last_name?: string | null
2700
+ last_visited_org?: string | null
2701
+ profile_picture_url?: string | null
2702
+ updated_at?: string
2703
+ workos_user_id?: string | null
2704
+ }
2705
+ Relationships: [
2706
+ {
2707
+ foreignKeyName: "user_profiles_last_visited_org_fkey"
2708
+ columns: ["last_visited_org"]
2709
+ isOneToOne: false
2710
+ referencedRelation: "organizations"
2711
+ referencedColumns: ["id"]
2712
+ },
2713
+ ]
2714
+ }
2715
+ webhook_endpoints: {
2716
+ Row: {
2717
+ created_at: string
2718
+ description: string | null
2719
+ id: string
2720
+ key: string
2721
+ last_triggered_at: string | null
2722
+ name: string
2723
+ organization_id: string
2724
+ request_count: number
2725
+ resource_id: string | null
2726
+ status: string
2727
+ updated_at: string
2728
+ }
2729
+ Insert: {
2730
+ created_at?: string
2731
+ description?: string | null
2732
+ id?: string
2733
+ key: string
2734
+ last_triggered_at?: string | null
2735
+ name: string
2736
+ organization_id: string
2737
+ request_count?: number
2738
+ resource_id?: string | null
2739
+ status?: string
2740
+ updated_at?: string
2741
+ }
2742
+ Update: {
2743
+ created_at?: string
2744
+ description?: string | null
2745
+ id?: string
2746
+ key?: string
2747
+ last_triggered_at?: string | null
2748
+ name?: string
2749
+ organization_id?: string
2750
+ request_count?: number
2751
+ resource_id?: string | null
2752
+ status?: string
2753
+ updated_at?: string
2754
+ }
2755
+ Relationships: [
2756
+ {
2757
+ foreignKeyName: "webhook_endpoints_organization_id_fkey"
2758
+ columns: ["organization_id"]
2759
+ isOneToOne: false
2760
+ referencedRelation: "organizations"
2761
+ referencedColumns: ["id"]
2762
+ },
2763
+ ]
2764
+ }
2765
+ }
2766
+ Views: {
2767
+ [_ in never]: never
2768
+ }
2769
+ Functions: {
2770
+ acq_default_checklist: { Args: { p_platform: string }; Returns: Json$1 }
2771
+ append_deal_activity: {
2772
+ Args: { p_activity: Json$1; p_deal_id: string; p_organization_id: string }
2773
+ Returns: undefined
2774
+ }
2775
+ auth_jwt_claims: { Args: never; Returns: Json$1 }
2776
+ auth_uid_safe: { Args: never; Returns: string }
2777
+ current_user_is_platform_admin: { Args: never; Returns: boolean }
2778
+ current_user_supabase_id: { Args: never; Returns: string }
2779
+ detect_stalled_executions: { Args: never; Returns: undefined }
2780
+ execute_session_turn: {
2781
+ Args: { p_session_id: string }
2782
+ Returns: {
2783
+ created_at: string
2784
+ ended_at: string
2785
+ memory_snapshot: Json$1
2786
+ metadata: Json$1
2787
+ organization_id: string
2788
+ resource_id: string
2789
+ session_id: string
2790
+ session_total_turns: number
2791
+ updated_at: string
2792
+ user_id: string
2793
+ }[]
2794
+ }
2795
+ get_storage_org_id: { Args: { file_path: string }; Returns: string }
2796
+ get_workos_user_id: { Args: never; Returns: string }
2797
+ is_org_admin: { Args: { org_id: string }; Returns: boolean }
2798
+ is_org_member: { Args: { org_id: string }; Returns: boolean }
2799
+ link_workos_membership_on_accept: {
2800
+ Args: {
2801
+ p_email: string
2802
+ p_organization_id: string
2803
+ p_workos_membership_id: string
2804
+ }
2805
+ Returns: boolean
2806
+ }
2807
+ pre_provision_invited_user: {
2808
+ Args: {
2809
+ p_email: string
2810
+ p_organization_id: string
2811
+ p_role_slug?: string
2812
+ }
2813
+ Returns: Json$1
2814
+ }
2815
+ process_due_schedules: { Args: never; Returns: Json$1 }
2816
+ upsert_user_profile: {
2817
+ Args: never
2818
+ Returns: {
2819
+ profile_display_name: string
2820
+ profile_email: string
2821
+ profile_id: string
2822
+ profile_workos_user_id: string
2823
+ }[]
2824
+ }
2825
+ }
2826
+ Enums: {
2827
+ [_ in never]: never
2828
+ }
2829
+ CompositeTypes: {
2830
+ [_ in never]: never
2831
+ }
2832
+ }
2833
+ }
2834
+
283
2835
  /**
284
2836
  * Lead Service Types
285
2837
  * CRUD operation types for the acquisition platform (lists, companies, contacts, deals)
@@ -299,6 +2851,76 @@ interface AcqDealNote {
299
2851
  updatedAt: string
300
2852
  }
301
2853
 
2854
+ // Row types from Supabase
2855
+ type ProjectRow = Database$1['public']['Tables']['prj_projects']['Row']
2856
+ type ProjectUpdate = Database$1['public']['Tables']['prj_projects']['Update']
2857
+
2858
+ type MilestoneRow = Database$1['public']['Tables']['prj_milestones']['Row']
2859
+ type MilestoneUpdate = Database$1['public']['Tables']['prj_milestones']['Update']
2860
+
2861
+ type TaskRow = Database$1['public']['Tables']['prj_tasks']['Row']
2862
+
2863
+ // Status enums
2864
+ type ProjectStatus = 'active' | 'on_track' | 'at_risk' | 'blocked' | 'completed' | 'paused'
2865
+
2866
+ type ProjectKind = 'client_engagement' | 'internal'
2867
+
2868
+ type MilestoneStatus = 'upcoming' | 'in_progress' | 'completed' | 'overdue' | 'blocked'
2869
+
2870
+ type TaskStatus$1 =
2871
+ | 'planned'
2872
+ | 'in_progress'
2873
+ | 'blocked'
2874
+ | 'completed'
2875
+ | 'cancelled'
2876
+ | 'submitted'
2877
+ | 'approved'
2878
+ | 'rejected'
2879
+ | 'revision_requested'
2880
+
2881
+ type TaskType = 'documentation' | 'code' | 'report' | 'design' | 'other'
2882
+
2883
+ type NoteType = 'call_note' | 'status_update' | 'issue' | 'blocker'
2884
+
2885
+ // Filter types
2886
+ interface ProjectFilters {
2887
+ status?: ProjectStatus
2888
+ kind?: ProjectKind
2889
+ companyId?: string
2890
+ search?: string
2891
+ }
2892
+
2893
+ interface MilestoneFilters {
2894
+ status?: MilestoneStatus
2895
+ projectId?: string
2896
+ }
2897
+
2898
+ interface TaskFilters {
2899
+ status?: TaskStatus$1
2900
+ type?: TaskType
2901
+ milestoneId?: string
2902
+ projectId?: string
2903
+ }
2904
+
2905
+ interface NoteFilters {
2906
+ type?: NoteType
2907
+ projectId?: string
2908
+ }
2909
+
2910
+ // Display types (for JOINed data)
2911
+ interface ProjectWithCounts extends ProjectRow {
2912
+ milestoneCount: number
2913
+ taskCount: number
2914
+ completedMilestones?: number
2915
+ completedTasks?: number
2916
+ }
2917
+
2918
+ interface ProjectDetail extends ProjectRow {
2919
+ milestones: MilestoneRow[]
2920
+ tasks: TaskRow[]
2921
+ company: { id: string; name: string; domain: string | null } | null
2922
+ }
2923
+
302
2924
  /**
303
2925
  * Resource Registry type definitions
304
2926
  */
@@ -4189,6 +6811,9 @@ type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables
4189
6811
  } ? R : never : never;
4190
6812
 
4191
6813
  type SupabaseUserProfile = Tables<'users'>;
6814
+ type SupabaseApiKey = Tables<'api_keys'>;
6815
+ /** API response type for API key list items (omits sensitive key_hash) */
6816
+ type ApiKeyListItem = Omit<SupabaseApiKey, 'key_hash'>;
4192
6817
 
4193
6818
  /** Raw database row type for acq_deals table */
4194
6819
  type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
@@ -4662,13 +7287,14 @@ interface SessionTokenUsage {
4662
7287
  /**
4663
7288
  * Per-user-per-org config (stored in org_memberships.config)
4664
7289
  * Controls which features a specific member can access within their org
4665
- * Valid feature keys: operations, monitoring, acquisition, calibration, seo
7290
+ * Valid feature keys: operations, monitoring, acquisition, delivery, calibration, seo
4666
7291
  */
4667
7292
  interface MembershipFeatureConfig {
4668
7293
  features?: {
4669
7294
  operations?: boolean;
4670
7295
  monitoring?: boolean;
4671
7296
  acquisition?: boolean;
7297
+ delivery?: boolean;
4672
7298
  calibration?: boolean;
4673
7299
  seo?: boolean;
4674
7300
  };
@@ -4697,6 +7323,29 @@ interface UserConfig {
4697
7323
  };
4698
7324
  }
4699
7325
 
7326
+ /**
7327
+ * Memberships Domain - Zod Validation Schemas
7328
+ *
7329
+ * Validation schemas for membership management endpoints.
7330
+ * Includes request bodies, query params, and path params.
7331
+ *
7332
+ * Security:
7333
+ * - All schemas use .strict() to prevent mass assignment attacks
7334
+ * - UUID validation prevents invalid references
7335
+ * - Role enum validation prevents privilege escalation
7336
+ * - organizationId never accepted in body (from JWT when needed)
7337
+ */
7338
+
7339
+ /**
7340
+ * Membership status validation
7341
+ * Note: Database constraint only allows 'active' | 'inactive'
7342
+ */
7343
+ declare const MembershipStatusSchema: z.ZodEnum<{
7344
+ active: "active";
7345
+ inactive: "inactive";
7346
+ }>;
7347
+ type MembershipStatus = z.infer<typeof MembershipStatusSchema>;
7348
+
4700
7349
  /**
4701
7350
  * Organization Membership types based on WorkOS API
4702
7351
  */
@@ -4712,6 +7361,36 @@ interface OrganizationMembership {
4712
7361
  createdAt: string;
4713
7362
  updatedAt: string;
4714
7363
  }
7364
+ /**
7365
+ * Request interfaces for membership operations
7366
+ */
7367
+ interface CreateMembershipRequest {
7368
+ userId: string;
7369
+ organizationId: string;
7370
+ roleSlug?: string;
7371
+ }
7372
+ interface UpdateMembershipRequest {
7373
+ roleSlug: string;
7374
+ }
7375
+ interface ListMembershipsParams {
7376
+ userId?: string;
7377
+ organizationId?: string;
7378
+ statuses?: MembershipStatus[];
7379
+ limit?: number;
7380
+ before?: string;
7381
+ after?: string;
7382
+ order?: 'asc' | 'desc';
7383
+ }
7384
+ /**
7385
+ * Response interfaces
7386
+ */
7387
+ interface ListMembershipsResponse {
7388
+ data: OrganizationMembership[];
7389
+ listMetadata?: {
7390
+ before?: string | null;
7391
+ after?: string | null;
7392
+ };
7393
+ }
4715
7394
  /**
4716
7395
  * Extended membership with user and organization details for UI
4717
7396
  */
@@ -6811,17 +9490,17 @@ interface FeatureAccessResult {
6811
9490
  * @example
6812
9491
  * ```typescript
6813
9492
  * // In your app's feature-access module
6814
- * import { createUseFeatureAccess } from '@repo/ui/hooks'
9493
+ * import { createFeatureAccessHook } from '@repo/ui/hooks'
6815
9494
  * import { useInitialization } from '@repo/ui/initialization'
6816
9495
  * import { useOrganization } from '@repo/ui/organization'
6817
9496
  *
6818
- * export const useFeatureAccess = createUseFeatureAccess({
9497
+ * export const useFeatureAccess = createFeatureAccessHook({
6819
9498
  * useInitialization,
6820
9499
  * useOrganization,
6821
9500
  * })
6822
9501
  * ```
6823
9502
  */
6824
- declare function createUseFeatureAccess({ useInitialization, useOrganization }: {
9503
+ declare function createFeatureAccessHook({ useInitialization, useOrganization }: {
6825
9504
  useInitialization: () => Pick<AppInitializationState, 'profile' | 'organizationReady'>;
6826
9505
  useOrganization: () => Pick<OrganizationContextValue, 'currentMembership'>;
6827
9506
  }): () => {
@@ -6832,6 +9511,21 @@ declare function createUseFeatureAccess({ useInitialization, useOrganization }:
6832
9511
  checkFeature: (featureKey: string) => FeatureAccessResult;
6833
9512
  isReady: boolean;
6834
9513
  };
9514
+ /**
9515
+ * @deprecated Use `createFeatureAccessHook` instead. This alias will be removed in a future release.
9516
+ */
9517
+ declare const createUseFeatureAccess: typeof createFeatureAccessHook;
9518
+
9519
+ /**
9520
+ * Authoritative source for feature-key aliases used in feature access resolution.
9521
+ *
9522
+ * These aliases map the legacy/UI-facing feature keys (e.g. "crm", "lead-gen",
9523
+ * "projects") to their canonical organization-model keys ("acquisition", "delivery").
9524
+ *
9525
+ * Both `createFeatureAccessHook` and `ElevasisFeaturesProvider` import from here
9526
+ * to ensure a single source of truth.
9527
+ */
9528
+ declare const FEATURE_KEY_ALIASES: Record<string, string>;
6835
9529
 
6836
9530
  interface EventSourceMessage {
6837
9531
  id: string;
@@ -6967,6 +9661,65 @@ declare const WS_RECONNECT_MAX_DELAY = 30000;
6967
9661
  /** WebSocket retries before showing error state. */
6968
9662
  declare const WS_MAX_RETRIES_BEFORE_ERROR = 3;
6969
9663
 
9664
+ /**
9665
+ * Hook to fetch sessions list with optional filtering.
9666
+ */
9667
+ declare function useSessions(params?: {
9668
+ resourceId?: string;
9669
+ }, options?: {
9670
+ enabled?: boolean;
9671
+ }): _tanstack_react_query.UseQueryResult<SessionListItem[], Error>;
9672
+ /**
9673
+ * Hook to fetch a single session by ID.
9674
+ */
9675
+ declare function useSession(sessionId: string): _tanstack_react_query.UseQueryResult<SessionDTO, Error>;
9676
+ /**
9677
+ * Hook to create a new session.
9678
+ */
9679
+ declare function useCreateSession(): _tanstack_react_query.UseMutationResult<CreateSessionResponse, Error, string, unknown>;
9680
+ /**
9681
+ * Hook to delete a session.
9682
+ */
9683
+ declare function useDeleteSession(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
9684
+ /**
9685
+ * Hook to archive a session.
9686
+ */
9687
+ declare function useArchiveSession(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
9688
+
9689
+ /**
9690
+ * Hook to fetch all executions for a session, grouped by turn.
9691
+ * Each turn creates one execution.
9692
+ */
9693
+ declare function useSessionExecutions(sessionId: string): _tanstack_react_query.UseQueryResult<SessionExecutionsResponse, Error>;
9694
+ /**
9695
+ * Hook to fetch a single execution detail for a session turn.
9696
+ * Auto-refetches every 2 seconds while the execution is still running.
9697
+ */
9698
+ declare function useSessionExecution(sessionId: string, executionId: string): _tanstack_react_query.UseQueryResult<APIExecutionDetail, Error>;
9699
+
9700
+ /**
9701
+ * Hook to fetch message history for a session.
9702
+ * Transforms ISO date strings to Date objects on the returned messages.
9703
+ */
9704
+ declare function useSessionMessages(sessionId: string): _tanstack_react_query.UseQueryResult<ChatMessage[], Error>;
9705
+
9706
+ /**
9707
+ * WebSocket hook for real-time agent chat sessions.
9708
+ * Connects to backend WebSocket endpoint with authentication.
9709
+ * Auto-reconnects with exponential backoff.
9710
+ *
9711
+ * @param sessionId - The session to connect to.
9712
+ * @param apiUrl - Base URL of the API server (e.g. "https://api.example.com").
9713
+ * Callers typically obtain this from their service configuration.
9714
+ */
9715
+ declare function useSessionWebSocket(sessionId: string, apiUrl: string): {
9716
+ messages: ChatMessage[];
9717
+ state: WebSocketState;
9718
+ sendMessage: (text: string, pageContext?: Record<string, unknown>) => void;
9719
+ clearError: () => void;
9720
+ lastTokenUsage: SessionTokenUsage | null;
9721
+ };
9722
+
6970
9723
  declare function useCommandQueue({ status, limit, offset, humanCheckpoint, timeRange, priorityMin, priorityMax, }?: {
6971
9724
  status?: TaskStatus;
6972
9725
  limit?: number;
@@ -7026,7 +9779,7 @@ interface SubmitActionResponse {
7026
9779
  }
7027
9780
  declare function useSubmitAction(): _tanstack_react_query.UseMutationResult<SubmitActionResponse, Error, SubmitActionRequest, OptimisticContext>;
7028
9781
 
7029
- declare function useDeleteTask(): _tanstack_react_query.UseMutationResult<void, Error, string, {
9782
+ declare function useDeleteTask$1(): _tanstack_react_query.UseMutationResult<void, Error, string, {
7030
9783
  previousData: Map<readonly unknown[], Task[] | undefined>;
7031
9784
  }>;
7032
9785
 
@@ -7300,11 +10053,11 @@ interface CommandViewGraph {
7300
10053
  edges: CommandViewEdge[];
7301
10054
  }
7302
10055
 
7303
- type StatusFilter = ResourceStatus | 'all';
10056
+ type StatusFilter$1 = ResourceStatus | 'all';
7304
10057
 
7305
10058
  interface CommandViewStore {
7306
- statusFilter: StatusFilter;
7307
- setStatusFilter: (v: StatusFilter) => void;
10059
+ statusFilter: StatusFilter$1;
10060
+ setStatusFilter: (v: StatusFilter$1) => void;
7308
10061
  showIntegrations: boolean;
7309
10062
  setShowIntegrations: (v: boolean) => void;
7310
10063
  fitViewOnFilter: boolean;
@@ -7467,19 +10220,19 @@ declare function useAllCalibrationProjects(): _tanstack_react_query.UseQueryResu
7467
10220
  */
7468
10221
  declare function useCalibrationProjects(resourceId: string, resourceType: 'agent' | 'workflow'): _tanstack_react_query.UseQueryResult<CalibrationProject[], Error>;
7469
10222
  declare function useCalibrationProject(projectId: string): _tanstack_react_query.UseQueryResult<CalibrationProject, Error>;
7470
- declare function useCreateProject(): _tanstack_react_query.UseMutationResult<CalibrationProject, Error, {
10223
+ declare function useCreateProject$1(): _tanstack_react_query.UseMutationResult<CalibrationProject, Error, {
7471
10224
  resourceId: string;
7472
10225
  resourceType: "agent" | "workflow";
7473
10226
  name: string;
7474
10227
  description?: string | undefined;
7475
10228
  }, unknown>;
7476
- declare function useUpdateProject(): _tanstack_react_query.UseMutationResult<CalibrationProject, Error, {
10229
+ declare function useUpdateProject$1(): _tanstack_react_query.UseMutationResult<CalibrationProject, Error, {
7477
10230
  name?: string | undefined;
7478
10231
  description?: string | undefined;
7479
10232
  } & {
7480
10233
  id: string;
7481
10234
  }, unknown>;
7482
- declare function useDeleteProject(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
10235
+ declare function useDeleteProject$1(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
7483
10236
 
7484
10237
  declare function useCalibrationRuns(projectId: string): _tanstack_react_query.UseQueryResult<CalibrationRun[], Error>;
7485
10238
  declare function useCalibrationRun(runId: string): _tanstack_react_query.UseQueryResult<CalibrationRun, Error>;
@@ -8213,64 +10966,758 @@ declare function useUpdateContact(contactId: string): _tanstack_react_query.UseM
8213
10966
  }, unknown>;
8214
10967
  declare function useDeleteContacts(): _tanstack_react_query.UseMutationResult<void, Error, string[], unknown>;
8215
10968
 
10969
+ interface CreateApiKeyRequest {
10970
+ name: string;
10971
+ }
10972
+ interface CreateApiKeyResponse {
10973
+ id: string;
10974
+ key: string;
10975
+ message: string;
10976
+ }
10977
+ interface ListApiKeysResponse {
10978
+ keys: ApiKeyListItem[];
10979
+ }
10980
+ type ApiRequest$3 = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
10981
+ declare class ApiKeyService {
10982
+ private apiRequest;
10983
+ constructor(apiRequest: ApiRequest$3);
10984
+ /**
10985
+ * List API keys for the current organization
10986
+ */
10987
+ listApiKeys(): Promise<ApiKeyListItem[]>;
10988
+ /**
10989
+ * Create a new API key
10990
+ */
10991
+ createApiKey(data: CreateApiKeyRequest): Promise<CreateApiKeyResponse>;
10992
+ /**
10993
+ * Update an API key's name
10994
+ */
10995
+ updateApiKey(keyId: string, data: {
10996
+ name: string;
10997
+ }): Promise<void>;
10998
+ /**
10999
+ * Delete an API key
11000
+ */
11001
+ deleteApiKey(keyId: string): Promise<void>;
11002
+ }
11003
+
11004
+ declare function useListApiKeys(): _tanstack_react_query.UseQueryResult<ApiKeyListItem[], Error>;
11005
+
11006
+ declare function useCreateApiKey(): _tanstack_react_query.UseMutationResult<CreateApiKeyResponse, Error, CreateApiKeyRequest, unknown>;
11007
+
11008
+ declare function useDeleteApiKey(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
11009
+
11010
+ declare function useUpdateApiKey(): _tanstack_react_query.UseMutationResult<void, Error, {
11011
+ keyId: string;
11012
+ name: string;
11013
+ }, unknown>;
11014
+
8216
11015
  /**
8217
- * Hook to fetch sessions list with optional filtering.
11016
+ * GET /api/credentials - List credentials
8218
11017
  */
8219
- declare function useSessions(params?: {
8220
- resourceId?: string;
8221
- }, options?: {
8222
- enabled?: boolean;
8223
- }): _tanstack_react_query.UseQueryResult<SessionListItem[], Error>;
11018
+ declare const ListCredentialsResponseSchema = z.object({
11019
+ credentials: z.array(
11020
+ z.object({
11021
+ id: UuidSchema,
11022
+ name: z.string(),
11023
+ type: z.string(),
11024
+ provider: z.string().nullable(), // OAuth provider or null for non-OAuth
11025
+ createdAt: z.string().datetime()
11026
+ })
11027
+ )
11028
+ })
11029
+
11030
+ /** API response type for a single credential list item */
11031
+ type CredentialListItem = z.infer<typeof ListCredentialsResponseSchema>['credentials'][number]
11032
+
11033
+ interface CreateCredentialRequest {
11034
+ name: string;
11035
+ type: string;
11036
+ value: Record<string, unknown>;
11037
+ }
11038
+ interface CreateCredentialResponse {
11039
+ id: string;
11040
+ name: string;
11041
+ type: string;
11042
+ }
11043
+ interface ListCredentialsResponse {
11044
+ credentials: CredentialListItem[];
11045
+ }
11046
+ type ApiRequest$2 = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
11047
+ declare class CredentialService {
11048
+ private apiRequest;
11049
+ constructor(apiRequest: ApiRequest$2);
11050
+ /**
11051
+ * List credentials for the current organization
11052
+ * Organization context is provided via workos-organization-id header
11053
+ */
11054
+ listCredentials(): Promise<CredentialListItem[]>;
11055
+ /**
11056
+ * Create a new credential
11057
+ * Organization context is provided via workos-organization-id header
11058
+ */
11059
+ createCredential(data: CreateCredentialRequest): Promise<CreateCredentialResponse>;
11060
+ /**
11061
+ * Update a credential value or metadata
11062
+ * Organization context is provided via workos-organization-id header
11063
+ */
11064
+ updateCredential(credentialId: string, updates: {
11065
+ value?: Record<string, unknown>;
11066
+ name?: string;
11067
+ }): Promise<void>;
11068
+ /**
11069
+ * Delete a credential
11070
+ * Organization context is provided via workos-organization-id header
11071
+ */
11072
+ deleteCredential(credentialId: string): Promise<void>;
11073
+ }
11074
+
11075
+ declare function useCredentials(): _tanstack_react_query.UseQueryResult<{
11076
+ id: string;
11077
+ name: string;
11078
+ type: string;
11079
+ provider: string | null;
11080
+ createdAt: string;
11081
+ }[], Error>;
11082
+
11083
+ declare function useCreateCredential(): _tanstack_react_query.UseMutationResult<CreateCredentialResponse, Error, CreateCredentialRequest, unknown>;
11084
+
11085
+ declare function useDeleteCredential(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
11086
+
11087
+ interface UpdateCredentialParams {
11088
+ credentialId: string;
11089
+ updates: {
11090
+ value?: Record<string, unknown>;
11091
+ name?: string;
11092
+ };
11093
+ }
11094
+ declare function useUpdateCredential(): _tanstack_react_query.UseMutationResult<void, Error, UpdateCredentialParams, unknown>;
11095
+
11096
+ type ApiRequest$1 = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
11097
+ declare class DeploymentService {
11098
+ private apiRequest;
11099
+ constructor(apiRequest: ApiRequest$1);
11100
+ listDeployments(): Promise<Deployment[]>;
11101
+ getDeployment(id: string): Promise<Deployment>;
11102
+ activateDeployment(id: string): Promise<Deployment>;
11103
+ deactivateDeployment(id: string): Promise<Deployment>;
11104
+ deleteDeployment(id: string): Promise<void>;
11105
+ }
11106
+
11107
+ declare function useListDeployments(): _tanstack_react_query.UseQueryResult<Deployment[], Error>;
11108
+
11109
+ declare function useActivateDeployment(): _tanstack_react_query.UseMutationResult<Deployment, Error, string, unknown>;
11110
+ declare function useDeactivateDeployment(): _tanstack_react_query.UseMutationResult<Deployment, Error, string, unknown>;
11111
+ declare function useDeleteDeployment(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
11112
+
11113
+ type ApiRequest = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
11114
+ declare class OrganizationMembershipService {
11115
+ private apiRequest;
11116
+ constructor(apiRequest: ApiRequest);
11117
+ /**
11118
+ * Get user's organization memberships
11119
+ */
11120
+ getUserMemberships(userId: string): Promise<MembershipWithDetails[]>;
11121
+ /**
11122
+ * Get organization members
11123
+ */
11124
+ getOrganizationMembers(organizationId: string): Promise<MembershipWithDetails[]>;
11125
+ /**
11126
+ * List memberships with filtering
11127
+ */
11128
+ listMemberships(params?: ListMembershipsParams): Promise<ListMembershipsResponse>;
11129
+ /**
11130
+ * Get a single membership by ID
11131
+ */
11132
+ getMembership(membershipId: string): Promise<MembershipWithDetails>;
11133
+ /**
11134
+ * Create a new organization membership
11135
+ */
11136
+ createMembership(data: CreateMembershipRequest): Promise<MembershipWithDetails>;
11137
+ /**
11138
+ * Update an existing membership
11139
+ */
11140
+ updateMembership(membershipId: string, data: UpdateMembershipRequest): Promise<MembershipWithDetails>;
11141
+ /**
11142
+ * Delete a membership
11143
+ */
11144
+ deleteMembership(membershipId: string): Promise<void>;
11145
+ /**
11146
+ * Deactivate a membership (soft delete)
11147
+ */
11148
+ deactivateMembership(membershipId: string): Promise<MembershipWithDetails>;
11149
+ /**
11150
+ * Reactivate a membership
11151
+ */
11152
+ reactivateMembership(membershipId: string): Promise<MembershipWithDetails>;
11153
+ }
11154
+
11155
+ declare function useUserMemberships(userId: string, params?: Omit<ListMembershipsParams, 'userId'>): _tanstack_react_query.UseQueryResult<MembershipWithDetails[], Error>;
11156
+
11157
+ interface UpdateMemberConfigParams {
11158
+ membershipId: string;
11159
+ config: MembershipFeatureConfig;
11160
+ }
11161
+ declare function useUpdateMemberConfig(): _tanstack_react_query.UseMutationResult<unknown, Error, UpdateMemberConfigParams, unknown>;
11162
+
11163
+ interface DeactivateMembershipMutationData {
11164
+ membershipId: string;
11165
+ userId?: string;
11166
+ organizationId?: string;
11167
+ }
11168
+ declare function useDeactivateMembership(): _tanstack_react_query.UseMutationResult<MembershipWithDetails, Error, DeactivateMembershipMutationData, {
11169
+ previousData: unknown;
11170
+ }>;
11171
+
11172
+ interface ReactivateMembershipMutationData {
11173
+ membershipId: string;
11174
+ userId?: string;
11175
+ organizationId?: string;
11176
+ }
11177
+ declare function useReactivateMembership(): _tanstack_react_query.UseMutationResult<MembershipWithDetails, Error, ReactivateMembershipMutationData, {
11178
+ previousData: unknown;
11179
+ }>;
11180
+
11181
+ declare function useListWebhookEndpoints(): _tanstack_react_query.UseQueryResult<{
11182
+ id: string;
11183
+ organizationId: string;
11184
+ key: string;
11185
+ name: string;
11186
+ description: string | null;
11187
+ resourceId: string | null;
11188
+ status: "active" | "paused";
11189
+ lastTriggeredAt: string | null;
11190
+ requestCount: number;
11191
+ createdAt: string;
11192
+ updatedAt: string;
11193
+ }[], Error>;
11194
+
11195
+ declare function useCreateWebhookEndpoint(): _tanstack_react_query.UseMutationResult<{
11196
+ id: string;
11197
+ organizationId: string;
11198
+ key: string;
11199
+ name: string;
11200
+ description: string | null;
11201
+ resourceId: string | null;
11202
+ status: "active" | "paused";
11203
+ lastTriggeredAt: string | null;
11204
+ requestCount: number;
11205
+ createdAt: string;
11206
+ updatedAt: string;
11207
+ }, Error, {
11208
+ name: string;
11209
+ resourceId?: string | undefined;
11210
+ description?: string | undefined;
11211
+ }, unknown>;
11212
+
11213
+ declare function useDeleteWebhookEndpoint(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
11214
+
8224
11215
  /**
8225
- * Hook to fetch a single session by ID.
11216
+ * POST /api/webhook-endpoints - Create a new webhook endpoint
11217
+ *
11218
+ * The `key` and `id` are generated server-side and not accepted in the request.
8226
11219
  */
8227
- declare function useSession(sessionId: string): _tanstack_react_query.UseQueryResult<SessionDTO, Error>;
11220
+ declare const CreateWebhookEndpointRequestSchema = z
11221
+ .object({
11222
+ /** User-facing label for the endpoint */
11223
+ name: NonEmptyStringSchema,
11224
+ /** Target workflow resourceId to invoke on inbound requests (can be set later) */
11225
+ resourceId: NonEmptyStringSchema.optional(),
11226
+ /** Optional description */
11227
+ description: z.string().optional()
11228
+ })
11229
+ .strict()
11230
+
11231
+ type CreateWebhookEndpointRequest = z.infer<typeof CreateWebhookEndpointRequestSchema>
11232
+
8228
11233
  /**
8229
- * Hook to create a new session.
11234
+ * PATCH /api/webhook-endpoints/:id - Update an existing webhook endpoint
11235
+ *
11236
+ * At least one field must be provided.
8230
11237
  */
8231
- declare function useCreateSession(): _tanstack_react_query.UseMutationResult<CreateSessionResponse, Error, string, unknown>;
11238
+ declare const UpdateWebhookEndpointRequestSchema = z
11239
+ .object({
11240
+ name: NonEmptyStringSchema.optional(),
11241
+ description: z.string().optional(),
11242
+ resourceId: NonEmptyStringSchema.optional(),
11243
+ status: WebhookEndpointStatusSchema.optional()
11244
+ })
11245
+ .strict()
11246
+ .refine(
11247
+ (data) =>
11248
+ data.name !== undefined ||
11249
+ data.description !== undefined ||
11250
+ data.resourceId !== undefined ||
11251
+ data.status !== undefined,
11252
+ { message: 'At least one field (name, description, resourceId, or status) must be provided' }
11253
+ )
11254
+
11255
+ type UpdateWebhookEndpointRequest = z.infer<typeof UpdateWebhookEndpointRequestSchema>
11256
+
8232
11257
  /**
8233
- * Hook to delete a session.
11258
+ * Response shape for a single webhook endpoint.
11259
+ * NOT strict — response schemas allow extra fields for forward compatibility.
8234
11260
  */
8235
- declare function useDeleteSession(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
11261
+ declare const WebhookEndpointResponseSchema = z.object({
11262
+ id: UuidSchema,
11263
+ organizationId: UuidSchema,
11264
+ key: z.string(),
11265
+ name: z.string(),
11266
+ description: z.string().nullable(),
11267
+ resourceId: z.string().nullable(),
11268
+ status: WebhookEndpointStatusSchema,
11269
+ lastTriggeredAt: z.string().datetime().nullable(),
11270
+ requestCount: z.number().int().min(0),
11271
+ createdAt: z.string().datetime(),
11272
+ updatedAt: z.string().datetime()
11273
+ })
11274
+
11275
+ type WebhookEndpointResponse = z.infer<typeof WebhookEndpointResponseSchema>
11276
+
11277
+ declare function useUpdateWebhookEndpoint(): _tanstack_react_query.UseMutationResult<{
11278
+ id: string;
11279
+ organizationId: string;
11280
+ key: string;
11281
+ name: string;
11282
+ description: string | null;
11283
+ resourceId: string | null;
11284
+ status: "active" | "paused";
11285
+ lastTriggeredAt: string | null;
11286
+ requestCount: number;
11287
+ createdAt: string;
11288
+ updatedAt: string;
11289
+ }, Error, {
11290
+ endpointId: string;
11291
+ data: UpdateWebhookEndpointRequest;
11292
+ }, unknown>;
11293
+
8236
11294
  /**
8237
- * Hook to archive a session.
11295
+ * Service context value exposed by ElevasisServiceProvider.
11296
+ * Provides a ready-to-use apiRequest function and organization state.
11297
+ *
11298
+ * For standalone usage (testing, embedding), use ElevasisServiceProvider directly.
11299
+ * For standard SDK usage, ElevasisUIProvider composes this automatically when apiUrl is provided.
8238
11300
  */
8239
- declare function useArchiveSession(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
11301
+ interface ElevasisServiceContextValue {
11302
+ apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
11303
+ organizationId: string | null;
11304
+ isReady: boolean;
11305
+ }
8240
11306
 
8241
11307
  /**
8242
- * Hook to fetch all executions for a session, grouped by turn.
8243
- * Each turn creates one execution.
11308
+ * Hook to access the ElevasisServiceProvider context.
11309
+ * Provides apiRequest, organizationId, and isReady.
11310
+ *
11311
+ * Throws if used outside of an ElevasisServiceProvider or ElevasisUIProvider (with apiUrl).
8244
11312
  */
8245
- declare function useSessionExecutions(sessionId: string): _tanstack_react_query.UseQueryResult<SessionExecutionsResponse, Error>;
11313
+ declare function useElevasisServices(): ElevasisServiceContextValue;
11314
+
11315
+ interface ListWebhookEndpointsResponse {
11316
+ data: WebhookEndpointResponse[];
11317
+ count: number;
11318
+ }
11319
+ declare class WebhookEndpointService {
11320
+ private apiRequest;
11321
+ constructor(apiRequest: ReturnType<typeof useElevasisServices>['apiRequest']);
11322
+ /**
11323
+ * List webhook endpoints for the current organization
11324
+ */
11325
+ listEndpoints(): Promise<WebhookEndpointResponse[]>;
11326
+ /**
11327
+ * Create a new webhook endpoint
11328
+ */
11329
+ createEndpoint(data: CreateWebhookEndpointRequest): Promise<WebhookEndpointResponse>;
11330
+ /**
11331
+ * Update an existing webhook endpoint (e.g., toggle status, rename)
11332
+ */
11333
+ updateEndpoint(endpointId: string, data: UpdateWebhookEndpointRequest): Promise<WebhookEndpointResponse>;
11334
+ /**
11335
+ * Delete a webhook endpoint
11336
+ */
11337
+ deleteEndpoint(endpointId: string): Promise<void>;
11338
+ }
11339
+
11340
+ interface ResourceSearchStore {
11341
+ query: string;
11342
+ set: (query: string) => void;
11343
+ }
11344
+ declare const useResourceSearch: zustand.UseBoundStore<zustand.StoreApi<ResourceSearchStore>>;
11345
+
11346
+ type StatusFilter = 'all' | 'dev' | 'prod';
11347
+ interface StatusFilterStore {
11348
+ value: StatusFilter;
11349
+ set: (value: StatusFilter) => void;
11350
+ }
11351
+ declare const useStatusFilter: zustand.UseBoundStore<zustand.StoreApi<StatusFilterStore>>;
11352
+
8246
11353
  /**
8247
- * Hook to fetch a single execution detail for a session turn.
8248
- * Auto-refetches every 2 seconds while the execution is still running.
11354
+ * Tracks which resource cards are visible in the viewport using Intersection Observer.
11355
+ * Returns a Set of visible resource IDs and a ref callback to attach to card elements.
11356
+ *
11357
+ * Cards must have a `data-resource-id` attribute to be tracked.
8249
11358
  */
8250
- declare function useSessionExecution(sessionId: string, executionId: string): _tanstack_react_query.UseQueryResult<APIExecutionDetail, Error>;
11359
+ declare function useVisibleResources(): {
11360
+ visibleIds: Set<string>;
11361
+ setContainerRef: (node: HTMLDivElement | null) => void;
11362
+ };
11363
+
11364
+ type DomainFilterState = 'neutral' | 'include' | 'exclude';
11365
+ interface DomainFiltersStore {
11366
+ filters: Record<string, DomainFilterState>;
11367
+ cycle: (domainId: string) => void;
11368
+ reset: () => void;
11369
+ }
11370
+ declare const useResourcesDomainFilters: zustand.UseBoundStore<Omit<zustand.StoreApi<DomainFiltersStore>, "setState" | "persist"> & {
11371
+ setState(partial: DomainFiltersStore | Partial<DomainFiltersStore> | ((state: DomainFiltersStore) => DomainFiltersStore | Partial<DomainFiltersStore>), replace?: false | undefined): unknown;
11372
+ setState(state: DomainFiltersStore | ((state: DomainFiltersStore) => DomainFiltersStore), replace: true): unknown;
11373
+ persist: {
11374
+ setOptions: (options: Partial<zustand_middleware.PersistOptions<DomainFiltersStore, DomainFiltersStore, unknown>>) => void;
11375
+ clearStorage: () => void;
11376
+ rehydrate: () => Promise<void> | void;
11377
+ hasHydrated: () => boolean;
11378
+ onHydrate: (fn: (state: DomainFiltersStore) => void) => () => void;
11379
+ onFinishHydration: (fn: (state: DomainFiltersStore) => void) => () => void;
11380
+ getOptions: () => Partial<zustand_middleware.PersistOptions<DomainFiltersStore, DomainFiltersStore, unknown>>;
11381
+ };
11382
+ }>;
11383
+ declare const useCommandViewDomainFilters: zustand.UseBoundStore<Omit<zustand.StoreApi<DomainFiltersStore>, "setState" | "persist"> & {
11384
+ setState(partial: DomainFiltersStore | Partial<DomainFiltersStore> | ((state: DomainFiltersStore) => DomainFiltersStore | Partial<DomainFiltersStore>), replace?: false | undefined): unknown;
11385
+ setState(state: DomainFiltersStore | ((state: DomainFiltersStore) => DomainFiltersStore), replace: true): unknown;
11386
+ persist: {
11387
+ setOptions: (options: Partial<zustand_middleware.PersistOptions<DomainFiltersStore, DomainFiltersStore, unknown>>) => void;
11388
+ clearStorage: () => void;
11389
+ rehydrate: () => Promise<void> | void;
11390
+ hasHydrated: () => boolean;
11391
+ onHydrate: (fn: (state: DomainFiltersStore) => void) => () => void;
11392
+ onFinishHydration: (fn: (state: DomainFiltersStore) => void) => () => void;
11393
+ getOptions: () => Partial<zustand_middleware.PersistOptions<DomainFiltersStore, DomainFiltersStore, unknown>>;
11394
+ };
11395
+ }>;
11396
+ declare function filterByDomainFilters(items: ResourceDefinition[], filters: Record<string, DomainFilterState>): ResourceDefinition[];
8251
11397
 
8252
11398
  /**
8253
- * Hook to fetch message history for a session.
8254
- * Transforms ISO date strings to Date objects on the returned messages.
11399
+ * Converts the global time range setting into startDate/endDate strings
11400
+ * for use in data guide suggested params.
8255
11401
  */
8256
- declare function useSessionMessages(sessionId: string): _tanstack_react_query.UseQueryResult<ChatMessage[], Error>;
11402
+ declare function useTimeRangeDates(timeRange: TimeRange): {
11403
+ startDate: string;
11404
+ endDate: string;
11405
+ };
8257
11406
 
11407
+ interface ActivityFilters {
11408
+ activityType?: ActivityType | 'all';
11409
+ status?: ActivityStatus | 'all';
11410
+ search?: string;
11411
+ }
11412
+ declare function useActivityFilters(timeRange: TimeRange): {
11413
+ filters: ActivityFilters;
11414
+ updateFilter: <K extends keyof ActivityFilters>(key: K, value: ActivityFilters[K]) => void;
11415
+ resetFilters: () => void;
11416
+ getApiParams: () => {
11417
+ activityType?: ActivityType;
11418
+ startDate?: string;
11419
+ status?: string;
11420
+ search?: string;
11421
+ };
11422
+ };
11423
+
11424
+ interface ExecutionLogsFilters {
11425
+ resourceId: string | undefined;
11426
+ status: 'all' | ExecutionStatus;
11427
+ resourceStatus: 'all' | 'dev' | 'prod';
11428
+ }
8258
11429
  /**
8259
- * WebSocket hook for real-time agent chat sessions.
8260
- * Connects to backend WebSocket endpoint with authentication.
8261
- * Auto-reconnects with exponential backoff.
11430
+ * Pure client-side state hook for execution log filtering.
11431
+ * No data fetching -- manages filter state with reset capability.
8262
11432
  *
8263
- * @param sessionId - The session to connect to.
8264
- * @param apiUrl - Base URL of the API server (e.g. "https://api.example.com").
8265
- * Callers typically obtain this from their service configuration.
11433
+ * @param _timeRange - Time range context (reserved for future use)
11434
+ * @returns filters state, updateFilter setter, and resetFilters utility
11435
+ *
11436
+ * @example
11437
+ * ```tsx
11438
+ * const { filters, updateFilter, resetFilters } = useExecutionLogsFilters(timeRange)
11439
+ *
11440
+ * updateFilter('status', 'failed')
11441
+ * updateFilter('resourceId', 'wf-123')
11442
+ * resetFilters()
11443
+ * ```
8266
11444
  */
8267
- declare function useSessionWebSocket(sessionId: string, apiUrl: string): {
8268
- messages: ChatMessage[];
8269
- state: WebSocketState;
8270
- sendMessage: (text: string, pageContext?: Record<string, unknown>) => void;
8271
- clearError: () => void;
8272
- lastTokenUsage: SessionTokenUsage | null;
11445
+ declare function useExecutionLogsFilters(_timeRange: TimeRange): {
11446
+ filters: ExecutionLogsFilters;
11447
+ updateFilter: <K extends keyof ExecutionLogsFilters>(key: K, value: ExecutionLogsFilters[K]) => void;
11448
+ resetFilters: () => void;
11449
+ };
11450
+
11451
+ /**
11452
+ * Fetch organization members with membership details.
11453
+ *
11454
+ * Note: `organizationId` is passed as a parameter (not read from context)
11455
+ * so consumers can query for a specific organization independently.
11456
+ *
11457
+ * @param organizationId - The organization to fetch members for
11458
+ * @param params - Optional additional filters (reserved for future use)
11459
+ * @returns TanStack Query result with MembershipWithDetails array
11460
+ *
11461
+ * @example
11462
+ * ```tsx
11463
+ * const { data: members, isLoading } = useOrganizationMembers(organizationId)
11464
+ * ```
11465
+ */
11466
+ declare function useOrganizationMembers(organizationId: string, params?: Omit<ListMembershipsParams, 'organizationId'>): _tanstack_react_query.UseQueryResult<MembershipWithDetails[], Error>;
11467
+
11468
+ declare const projectKeys: {
11469
+ all: readonly ["projects"];
11470
+ lists: () => readonly ["projects", "list"];
11471
+ list: (orgId: string | null, filters: ProjectFilters) => readonly ["projects", "list", string | null, ProjectFilters];
11472
+ details: () => readonly ["projects", "detail"];
11473
+ detail: (id: string) => readonly ["projects", "detail", string];
11474
+ };
11475
+ declare function useProjects(filters?: ProjectFilters): _tanstack_react_query.UseQueryResult<ProjectWithCounts[], Error>;
11476
+ declare function useProject(id: string): _tanstack_react_query.UseQueryResult<ProjectDetail | null, Error>;
11477
+ declare function useCreateProject(): _tanstack_react_query.UseMutationResult<{
11478
+ actual_end_date: string | null;
11479
+ client_company_id: string | null;
11480
+ contract_value: number | null;
11481
+ created_at: string;
11482
+ deal_id: string | null;
11483
+ description: string | null;
11484
+ id: string;
11485
+ kind: string;
11486
+ metadata: Json | null;
11487
+ name: string;
11488
+ organization_id: string;
11489
+ start_date: string | null;
11490
+ status: string;
11491
+ target_end_date: string | null;
11492
+ updated_at: string;
11493
+ }, Error, Omit<{
11494
+ actual_end_date?: string | null;
11495
+ client_company_id?: string | null;
11496
+ contract_value?: number | null;
11497
+ created_at?: string;
11498
+ deal_id?: string | null;
11499
+ description?: string | null;
11500
+ id?: string;
11501
+ kind?: string;
11502
+ metadata?: Json | null;
11503
+ name: string;
11504
+ organization_id: string;
11505
+ start_date?: string | null;
11506
+ status?: string;
11507
+ target_end_date?: string | null;
11508
+ updated_at?: string;
11509
+ }, "organization_id">, unknown>;
11510
+ declare function useUpdateProject(): _tanstack_react_query.UseMutationResult<{
11511
+ actual_end_date: string | null;
11512
+ client_company_id: string | null;
11513
+ contract_value: number | null;
11514
+ created_at: string;
11515
+ deal_id: string | null;
11516
+ description: string | null;
11517
+ id: string;
11518
+ kind: string;
11519
+ metadata: Json | null;
11520
+ name: string;
11521
+ organization_id: string;
11522
+ start_date: string | null;
11523
+ status: string;
11524
+ target_end_date: string | null;
11525
+ updated_at: string;
11526
+ }, Error, {
11527
+ id: string;
11528
+ updates: Omit<ProjectUpdate, "organization_id">;
11529
+ }, unknown>;
11530
+ declare function useDeleteProject(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
11531
+
11532
+ declare const milestoneKeys: {
11533
+ all: readonly ["project-milestones"];
11534
+ lists: () => readonly ["project-milestones", "list"];
11535
+ list: (orgId: string | null, filters: MilestoneFilters) => readonly ["project-milestones", "list", string | null, MilestoneFilters];
11536
+ details: () => readonly ["project-milestones", "detail"];
11537
+ detail: (id: string) => readonly ["project-milestones", "detail", string];
11538
+ };
11539
+ /**
11540
+ * Fetches milestones for a project.
11541
+ *
11542
+ * NOTE: The API only supports nested listing via GET /projects/:projectId/milestones.
11543
+ * There is no cross-project milestone endpoint. When filters.projectId is absent,
11544
+ * the query is disabled and returns undefined. Callers that previously relied on
11545
+ * cross-project querying (no projectId) will need to supply a projectId or migrate
11546
+ * to a different approach.
11547
+ *
11548
+ * NOTE: The filters.status field is not forwarded to the API (no querystring support
11549
+ * on the milestones list endpoint). Client-side filtering on the returned array is
11550
+ * required if status filtering is needed.
11551
+ */
11552
+ declare function useMilestones(filters?: MilestoneFilters): _tanstack_react_query.UseQueryResult<{
11553
+ checklist: Json | null;
11554
+ completed_at: string | null;
11555
+ created_at: string;
11556
+ description: string | null;
11557
+ due_date: string | null;
11558
+ id: string;
11559
+ metadata: Json | null;
11560
+ name: string;
11561
+ organization_id: string;
11562
+ project_id: string;
11563
+ sequence: number;
11564
+ status: string;
11565
+ updated_at: string;
11566
+ }[], Error>;
11567
+ declare function useCreateMilestone(): _tanstack_react_query.UseMutationResult<{
11568
+ checklist: Json | null;
11569
+ completed_at: string | null;
11570
+ created_at: string;
11571
+ description: string | null;
11572
+ due_date: string | null;
11573
+ id: string;
11574
+ metadata: Json | null;
11575
+ name: string;
11576
+ organization_id: string;
11577
+ project_id: string;
11578
+ sequence: number;
11579
+ status: string;
11580
+ updated_at: string;
11581
+ }, Error, Omit<{
11582
+ checklist?: Json | null;
11583
+ completed_at?: string | null;
11584
+ created_at?: string;
11585
+ description?: string | null;
11586
+ due_date?: string | null;
11587
+ id?: string;
11588
+ metadata?: Json | null;
11589
+ name: string;
11590
+ organization_id: string;
11591
+ project_id: string;
11592
+ sequence?: number;
11593
+ status?: string;
11594
+ updated_at?: string;
11595
+ }, "organization_id">, unknown>;
11596
+ declare function useUpdateMilestone(): _tanstack_react_query.UseMutationResult<{
11597
+ checklist: Json | null;
11598
+ completed_at: string | null;
11599
+ created_at: string;
11600
+ description: string | null;
11601
+ due_date: string | null;
11602
+ id: string;
11603
+ metadata: Json | null;
11604
+ name: string;
11605
+ organization_id: string;
11606
+ project_id: string;
11607
+ sequence: number;
11608
+ status: string;
11609
+ updated_at: string;
11610
+ }, Error, {
11611
+ id: string;
11612
+ updates: Omit<MilestoneUpdate, "organization_id">;
11613
+ }, unknown>;
11614
+ declare function useDeleteMilestone(): _tanstack_react_query.UseMutationResult<void, Error, {
11615
+ id: string;
11616
+ projectId: string;
11617
+ }, unknown>;
11618
+
11619
+ declare const taskKeys: {
11620
+ all: readonly ["project-tasks"];
11621
+ lists: () => readonly ["project-tasks", "list"];
11622
+ list: (orgId: string | null, filters: TaskFilters) => readonly ["project-tasks", "list", string | null, TaskFilters];
11623
+ details: () => readonly ["project-tasks", "detail"];
11624
+ detail: (id: string) => readonly ["project-tasks", "detail", string];
11625
+ };
11626
+ /**
11627
+ * Fetches tasks for a project.
11628
+ *
11629
+ * NOTE: The API only supports nested listing via GET /projects/:projectId/tasks.
11630
+ * There is no cross-project task endpoint. When filters.projectId is absent,
11631
+ * the query is disabled. Callers that previously relied on cross-project querying
11632
+ * will need to supply a projectId.
11633
+ *
11634
+ * NOTE: filters.type is not forwarded to the API (no querystring support on the
11635
+ * tasks list endpoint for type). Client-side filtering is required if needed.
11636
+ *
11637
+ * Supported API query params: status, milestoneId (mapped to milestone_id).
11638
+ */
11639
+ declare function useTasks(filters?: TaskFilters): _tanstack_react_query.UseQueryResult<{
11640
+ checklist: Json;
11641
+ completed_at: string | null;
11642
+ created_at: string;
11643
+ description: string | null;
11644
+ due_date: string | null;
11645
+ file_url: string | null;
11646
+ id: string;
11647
+ metadata: Json | null;
11648
+ milestone_id: string | null;
11649
+ name: string;
11650
+ organization_id: string;
11651
+ parent_task_id: string | null;
11652
+ project_id: string;
11653
+ resume_context: Json | null;
11654
+ status: string;
11655
+ type: string;
11656
+ updated_at: string;
11657
+ }[], Error>;
11658
+ declare function useDeleteTask(): _tanstack_react_query.UseMutationResult<void, Error, {
11659
+ id: string;
11660
+ projectId: string;
11661
+ }, unknown>;
11662
+
11663
+ declare const noteKeys: {
11664
+ all: readonly ["project-notes"];
11665
+ lists: () => readonly ["project-notes", "list"];
11666
+ list: (orgId: string | null, filters: NoteFilters) => readonly ["project-notes", "list", string | null, NoteFilters];
11667
+ details: () => readonly ["project-notes", "detail"];
11668
+ detail: (id: string) => readonly ["project-notes", "detail", string];
8273
11669
  };
11670
+ /**
11671
+ * Fetches notes for a project.
11672
+ *
11673
+ * NOTE: The API only supports nested listing via GET /projects/:projectId/notes.
11674
+ * There is no cross-project notes endpoint. When filters.projectId is absent,
11675
+ * the query is disabled.
11676
+ *
11677
+ * NOTE: filters.type is not forwarded to the API (the notes list endpoint has no
11678
+ * querystring schema for type filtering). Client-side filtering is required if needed.
11679
+ */
11680
+ declare function useProjectNotes(filters?: NoteFilters): _tanstack_react_query.UseQueryResult<{
11681
+ content: string;
11682
+ created_at: string;
11683
+ created_by: string | null;
11684
+ id: string;
11685
+ metadata: Json | null;
11686
+ milestone_id: string | null;
11687
+ occurred_at: string;
11688
+ organization_id: string;
11689
+ project_id: string;
11690
+ summary: string | null;
11691
+ task_id: string | null;
11692
+ type: string;
11693
+ }[], Error>;
11694
+ declare function useCreateNote(): _tanstack_react_query.UseMutationResult<{
11695
+ content: string;
11696
+ created_at: string;
11697
+ created_by: string | null;
11698
+ id: string;
11699
+ metadata: Json | null;
11700
+ milestone_id: string | null;
11701
+ occurred_at: string;
11702
+ organization_id: string;
11703
+ project_id: string;
11704
+ summary: string | null;
11705
+ task_id: string | null;
11706
+ type: string;
11707
+ }, Error, Omit<{
11708
+ content: string;
11709
+ created_at?: string;
11710
+ created_by?: string | null;
11711
+ id?: string;
11712
+ metadata?: Json | null;
11713
+ milestone_id?: string | null;
11714
+ occurred_at?: string;
11715
+ organization_id: string;
11716
+ project_id: string;
11717
+ summary?: string | null;
11718
+ task_id?: string | null;
11719
+ type?: string;
11720
+ }, "organization_id">, unknown>;
8274
11721
 
8275
- export { OperationsService, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, acquisitionListKeys, calibrationKeys, companyKeys, contactKeys, createUseFeatureAccess, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, isSessionCapable, observabilityKeys, operationsKeys, scheduleKeys, sessionsKeys, sortData, useActivities, useActivityTrend, useAllCalibrationProjects, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCalibrationProject, useCalibrationProjects, useCalibrationRun, useCalibrationRunFull, useCalibrationRuns, useCalibrationSSE, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateCompany, useCreateContact, useCreateDealNote, useCreateDealTask, useCreateList, useCreateProject, useCreateRun, useCreateSchedule, useCreateSession, useDashboardMetrics, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteCompanies, useDeleteContacts, useDeleteDeal, useDeleteExecution, useDeleteList, useDeleteProject, useDeleteRun, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAsync, useExecuteRun, useExecuteWorkflow, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGradeRun, useGraphStats, useList, useListExecutions, useListProgress, useListSchedules, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount as useNotificationCountSSE, useNotifications, usePaginationState, usePatchTask, usePauseSchedule, useRecentExecutionsByResource, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResources, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTestNotification, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateCompany, useUpdateContact, useUpdateList, useUpdateListConfig, useUpdateProject, useUpdateSchedule, useWarningNotification };
8276
- export type { AcqCompanyWithCount, AcqContactWithCompany, AcqDealNote, AcqDealTask, AcqDealTaskKind, ActivityTrendResponse, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CalibrationProgress, CancelExecutionParams, CancelExecutionResult, ChatMessage, CreateScheduleInput, CreateSessionResponse, DealDetail, DeleteExecutionParams, DocFile, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsPageResponse, FailingResource, GetMessagesResponse, ListActivitiesResponse, ListSchedulesFilters, ListSchedulesResponse, MessageEvent, MessageType, ResourcesResponse, RetryExecutionParams, SessionDTO, SessionExecution, SessionExecutionsResponse, SessionListItem, SessionTokenUsage, SortDirection, SortState, SubmitActionRequest, SubmitActionResponse, TaskSchedule, TopFailingResourcesParams, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseBatchedResourcesHealthParams, UseCalibrationSSEOptions, UseExecuteWorkflowOptions, UseExecuteWorkflowParams, UseExecutionHealthParams, UseExecutionLogsParams, UseExecutionPanelStateOptions, UseExecutionPanelStateReturn, UseNotificationCountArgs, UseResourcesHealthParams, UseSSEConnectionOptions, UseScheduledTasksOptions, WebSocketState };
11722
+ export { ApiKeyService, CredentialService, DeploymentService, FEATURE_KEY_ALIASES, OperationsService, OrganizationMembershipService, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, WebhookEndpointService, acquisitionListKeys, calibrationKeys, companyKeys, contactKeys, createFeatureAccessHook, createUseFeatureAccess, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, isSessionCapable, milestoneKeys, noteKeys, observabilityKeys, operationsKeys, projectKeys, scheduleKeys, sessionsKeys, sortData, taskKeys, useActivateDeployment, useActivities, useActivityFilters, useActivityTrend, useAllCalibrationProjects, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCalibrationProject, useCalibrationProjects, useCalibrationRun, useCalibrationRunFull, useCalibrationRuns, useCalibrationSSE, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateProject as useCreateDeliveryProject, useCreateList, useCreateMilestone, useCreateNote, useCreateProject$1 as useCreateProject, useCreateRun, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteProject as useDeleteDeliveryProject, useDeleteTask as useDeleteDeliveryTask, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteMilestone, useDeleteProject$1 as useDeleteProject, useDeleteRun, useDeleteSchedule, useDeleteSession, useDeleteTask$1 as useDeleteTask, useDeleteWebhookEndpoint, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAsync, useExecuteRun, useExecuteWorkflow, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGradeRun, useGraphStats, useList, useListApiKeys, useListDeployments, useListExecutions, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useMilestones, useNotificationCount as useNotificationCountSSE, useNotifications, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, useProject, useProjectNotes, useProjects, useReactivateMembership, useRecentExecutionsByResource, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useSyncDealStage, useTableSelection, useTableSort, useTasks, useTestNotification, useTimeRangeDates, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateProject as useUpdateDeliveryProject, useUpdateList, useUpdateListConfig, useUpdateMemberConfig, useUpdateMilestone, useUpdateProject$1 as useUpdateProject, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification };
11723
+ export type { AcqCompanyWithCount, AcqContactWithCompany, AcqDealNote, AcqDealTask, AcqDealTaskKind, ActivityFilters, ActivityTrendResponse, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CalibrationProgress, CancelExecutionParams, CancelExecutionResult, ChatMessage, CreateApiKeyRequest, CreateApiKeyResponse, CreateCredentialRequest, CreateCredentialResponse, CreateScheduleInput, CreateSessionResponse, CredentialListItem, DealDetail, DeleteExecutionParams, Deployment, DocFile, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsFilters, ExecutionLogsPageResponse, FailingResource, FeatureAccessResult, GetMessagesResponse, ListActivitiesResponse, ListApiKeysResponse, ListCredentialsResponse, ListSchedulesFilters, ListSchedulesResponse, ListWebhookEndpointsResponse, MessageEvent, MessageType, ResourcesResponse, RetryExecutionParams, SessionDTO, SessionExecution, SessionExecutionsResponse, SessionListItem, SessionTokenUsage, SortDirection, SortState, StatusFilter, SubmitActionRequest, SubmitActionResponse, TaskSchedule, TopFailingResourcesParams, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseBatchedResourcesHealthParams, UseCalibrationSSEOptions, UseExecuteWorkflowOptions, UseExecuteWorkflowParams, UseExecutionHealthParams, UseExecutionLogsParams, UseExecutionPanelStateOptions, UseExecutionPanelStateReturn, UseNotificationCountArgs, UseResourcesHealthParams, UseSSEConnectionOptions, UseScheduledTasksOptions, WebSocketState };