@elevasis/ui 1.3.0 → 1.3.1

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 (40) hide show
  1. package/dist/CoreAuthKitInner-3J4RVQO6.js +43 -0
  2. package/dist/api/index.d.ts +7 -31
  3. package/dist/api/index.js +2 -1
  4. package/dist/auth/context.d.ts +23 -5
  5. package/dist/auth/index.d.ts +37 -34
  6. package/dist/auth/index.js +4 -5
  7. package/dist/{chunk-FDCVFCOQ.js → chunk-2JBWPFHF.js} +23 -20
  8. package/dist/{chunk-OLD3NQLI.js → chunk-72HOBFMP.js} +13 -17
  9. package/dist/{chunk-BZTA7IIL.js → chunk-A3MCANC6.js} +295 -1
  10. package/dist/chunk-FWZJH3TL.js +13 -0
  11. package/dist/{chunk-EZMRFWZQ.js → chunk-JBFFCZI4.js} +1 -1
  12. package/dist/chunk-JGJSZ3UE.js +47 -0
  13. package/dist/{chunk-4KAG5U7A.js → chunk-L2CM2CUA.js} +0 -2
  14. package/dist/{chunk-QQOLC46E.js → chunk-NEK6JKPW.js} +1 -1
  15. package/dist/{chunk-SITSZUFW.js → chunk-PVVQTENF.js} +1 -1
  16. package/dist/{chunk-PCBXNHKY.js → chunk-TZPAA4RC.js} +3 -2
  17. package/dist/{chunk-FLJXZ7YC.js → chunk-UMXDDEAG.js} +1 -3
  18. package/dist/{chunk-BWCC6ZJC.js → chunk-XLV6LYN2.js} +15 -60
  19. package/dist/hooks/index.d.ts +2629 -2
  20. package/dist/hooks/index.js +5 -2
  21. package/dist/hooks/published.d.ts +2629 -2
  22. package/dist/hooks/published.js +4 -1
  23. package/dist/index.d.ts +427 -162
  24. package/dist/index.js +13 -13
  25. package/dist/initialization/index.js +3 -3
  26. package/dist/organization/index.js +3 -3
  27. package/dist/profile/index.js +1 -1
  28. package/dist/provider/index.d.ts +5 -17
  29. package/dist/provider/index.js +6 -7
  30. package/dist/provider/published.d.ts +4 -16
  31. package/dist/provider/published.js +5 -6
  32. package/dist/supabase/index.js +2 -47
  33. package/package.json +3 -3
  34. package/dist/CoreAuthKitInner-KM72EYJS.js +0 -19
  35. package/dist/api/hooks/useApiClient.d.ts +0 -54
  36. package/dist/api/hooks/useApiClient.d.ts.map +0 -1
  37. package/dist/api/hooks/useApiClient.js +0 -185
  38. package/dist/chunk-NIAVTSMB.js +0 -21
  39. package/dist/chunk-QSVZP2NU.js +0 -214
  40. /package/dist/{chunk-Q47SPRY7.js → chunk-TYV5NJV2.js} +0 -0
@@ -1,4 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import * as react from 'react';
2
3
  import { z } from 'zod';
3
4
 
4
5
  /**
@@ -260,6 +261,2212 @@ interface AgentMemory {
260
261
  history: MemoryEntry[];
261
262
  }
262
263
 
264
+ type Json = string | number | boolean | null | {
265
+ [key: string]: Json | undefined;
266
+ } | Json[];
267
+ type Database = {
268
+ __InternalSupabase: {
269
+ PostgrestVersion: "12.2.3 (519615d)";
270
+ };
271
+ public: {
272
+ Tables: {
273
+ acq_companies: {
274
+ Row: {
275
+ attio_company_id: string | null;
276
+ batch_id: string | null;
277
+ category: string | null;
278
+ category_pain: string | null;
279
+ created_at: string;
280
+ domain: string | null;
281
+ enrichment_data: Json | null;
282
+ filter_reason: string | null;
283
+ founded_year: number | null;
284
+ id: string;
285
+ linkedin_url: string | null;
286
+ location_city: string | null;
287
+ location_state: string | null;
288
+ name: string;
289
+ num_employees: number | null;
290
+ organization_id: string;
291
+ pipeline_status: Json;
292
+ segment: string | null;
293
+ source: string | null;
294
+ status: string;
295
+ updated_at: string;
296
+ website: string | null;
297
+ };
298
+ Insert: {
299
+ attio_company_id?: string | null;
300
+ batch_id?: string | null;
301
+ category?: string | null;
302
+ category_pain?: string | null;
303
+ created_at?: string;
304
+ domain?: string | null;
305
+ enrichment_data?: Json | null;
306
+ filter_reason?: string | null;
307
+ founded_year?: number | null;
308
+ id?: string;
309
+ linkedin_url?: string | null;
310
+ location_city?: string | null;
311
+ location_state?: string | null;
312
+ name: string;
313
+ num_employees?: number | null;
314
+ organization_id: string;
315
+ pipeline_status?: Json;
316
+ segment?: string | null;
317
+ source?: string | null;
318
+ status?: string;
319
+ updated_at?: string;
320
+ website?: string | null;
321
+ };
322
+ Update: {
323
+ attio_company_id?: string | null;
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 | 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;
340
+ segment?: string | null;
341
+ source?: string | null;
342
+ status?: string;
343
+ updated_at?: string;
344
+ website?: string | null;
345
+ };
346
+ Relationships: [
347
+ {
348
+ foreignKeyName: "acq_companies_organization_id_fkey";
349
+ columns: ["organization_id"];
350
+ isOneToOne: false;
351
+ referencedRelation: "organizations";
352
+ referencedColumns: ["id"];
353
+ }
354
+ ];
355
+ };
356
+ acq_contacts: {
357
+ Row: {
358
+ attio_person_id: string | null;
359
+ batch_id: string | null;
360
+ brochure_first_viewed_at: string | null;
361
+ brochure_view_count: number;
362
+ company_id: string | null;
363
+ created_at: string;
364
+ email: string;
365
+ email_valid: string | null;
366
+ enrichment_data: Json;
367
+ filter_reason: string | null;
368
+ first_name: string | null;
369
+ headline: string | null;
370
+ id: string;
371
+ last_name: string | null;
372
+ linkedin_url: string | null;
373
+ nurture: boolean;
374
+ opening_line: string | null;
375
+ organization_id: string;
376
+ pipeline_status: Json;
377
+ source: string | null;
378
+ source_id: string | null;
379
+ status: string;
380
+ title: string | null;
381
+ updated_at: string;
382
+ };
383
+ Insert: {
384
+ attio_person_id?: string | null;
385
+ batch_id?: string | null;
386
+ brochure_first_viewed_at?: string | null;
387
+ brochure_view_count?: number;
388
+ company_id?: string | null;
389
+ created_at?: string;
390
+ email: string;
391
+ email_valid?: string | null;
392
+ enrichment_data?: Json;
393
+ filter_reason?: string | null;
394
+ first_name?: string | null;
395
+ headline?: string | null;
396
+ id?: string;
397
+ last_name?: string | null;
398
+ linkedin_url?: string | null;
399
+ nurture?: boolean;
400
+ opening_line?: string | null;
401
+ organization_id: string;
402
+ pipeline_status?: Json;
403
+ source?: string | null;
404
+ source_id?: string | null;
405
+ status?: string;
406
+ title?: string | null;
407
+ updated_at?: string;
408
+ };
409
+ Update: {
410
+ attio_person_id?: string | null;
411
+ batch_id?: string | null;
412
+ brochure_first_viewed_at?: string | null;
413
+ brochure_view_count?: number;
414
+ company_id?: string | null;
415
+ created_at?: string;
416
+ email?: string;
417
+ email_valid?: string | null;
418
+ enrichment_data?: Json;
419
+ filter_reason?: string | null;
420
+ first_name?: string | null;
421
+ headline?: string | null;
422
+ id?: string;
423
+ last_name?: string | null;
424
+ linkedin_url?: string | null;
425
+ nurture?: boolean;
426
+ opening_line?: string | null;
427
+ organization_id?: string;
428
+ pipeline_status?: Json;
429
+ source?: string | null;
430
+ source_id?: string | null;
431
+ status?: string;
432
+ title?: string | null;
433
+ updated_at?: string;
434
+ };
435
+ Relationships: [
436
+ {
437
+ foreignKeyName: "acq_contacts_company_id_fkey";
438
+ columns: ["company_id"];
439
+ isOneToOne: false;
440
+ referencedRelation: "acq_companies";
441
+ referencedColumns: ["id"];
442
+ },
443
+ {
444
+ foreignKeyName: "acq_contacts_organization_id_fkey";
445
+ columns: ["organization_id"];
446
+ isOneToOne: false;
447
+ referencedRelation: "organizations";
448
+ referencedColumns: ["id"];
449
+ }
450
+ ];
451
+ };
452
+ acq_content: {
453
+ Row: {
454
+ body: string | null;
455
+ created_at: string;
456
+ id: string;
457
+ organization_id: string;
458
+ pillar: string;
459
+ status: string;
460
+ title: string;
461
+ updated_at: string;
462
+ };
463
+ Insert: {
464
+ body?: string | null;
465
+ created_at?: string;
466
+ id?: string;
467
+ organization_id: string;
468
+ pillar: string;
469
+ status?: string;
470
+ title: string;
471
+ updated_at?: string;
472
+ };
473
+ Update: {
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
+ Relationships: [
484
+ {
485
+ foreignKeyName: "acq_content_organization_id_fkey";
486
+ columns: ["organization_id"];
487
+ isOneToOne: false;
488
+ referencedRelation: "organizations";
489
+ referencedColumns: ["id"];
490
+ }
491
+ ];
492
+ };
493
+ acq_content_distributions: {
494
+ Row: {
495
+ adapted_body: string | null;
496
+ checklist: Json | null;
497
+ content_id: string;
498
+ created_at: string;
499
+ format: string;
500
+ id: string;
501
+ media_urls: Json;
502
+ metrics: Json;
503
+ metrics_updated_at: string | null;
504
+ organization_id: string;
505
+ platform: string;
506
+ platform_content: Json | null;
507
+ platform_post_id: string | null;
508
+ platform_url: string | null;
509
+ published_at: string | null;
510
+ status: string;
511
+ updated_at: string;
512
+ };
513
+ Insert: {
514
+ adapted_body?: string | null;
515
+ checklist?: Json | null;
516
+ content_id: string;
517
+ created_at?: string;
518
+ format: string;
519
+ id?: string;
520
+ media_urls?: Json;
521
+ metrics?: Json;
522
+ metrics_updated_at?: string | null;
523
+ organization_id: string;
524
+ platform: string;
525
+ platform_content?: Json | null;
526
+ platform_post_id?: string | null;
527
+ platform_url?: string | null;
528
+ published_at?: string | null;
529
+ status?: string;
530
+ updated_at?: string;
531
+ };
532
+ Update: {
533
+ adapted_body?: string | null;
534
+ checklist?: Json | null;
535
+ content_id?: string;
536
+ created_at?: string;
537
+ format?: string;
538
+ id?: string;
539
+ media_urls?: Json;
540
+ metrics?: Json;
541
+ metrics_updated_at?: string | null;
542
+ organization_id?: string;
543
+ platform?: string;
544
+ platform_content?: Json | null;
545
+ platform_post_id?: string | null;
546
+ platform_url?: string | null;
547
+ published_at?: string | null;
548
+ status?: string;
549
+ updated_at?: string;
550
+ };
551
+ Relationships: [
552
+ {
553
+ foreignKeyName: "acq_content_distributions_content_id_fkey";
554
+ columns: ["content_id"];
555
+ isOneToOne: false;
556
+ referencedRelation: "acq_content";
557
+ referencedColumns: ["id"];
558
+ },
559
+ {
560
+ foreignKeyName: "acq_content_distributions_organization_id_fkey";
561
+ columns: ["organization_id"];
562
+ isOneToOne: false;
563
+ referencedRelation: "organizations";
564
+ referencedColumns: ["id"];
565
+ }
566
+ ];
567
+ };
568
+ acq_deals: {
569
+ Row: {
570
+ activity_log: Json;
571
+ attio_deal_id: string;
572
+ cached_stage: string | null;
573
+ closed_lost_at: string | null;
574
+ closed_lost_reason: string | null;
575
+ contact_email: string;
576
+ contact_id: string | null;
577
+ created_at: string;
578
+ discovery_data: Json | null;
579
+ discovery_submitted_at: string | null;
580
+ discovery_submitted_by: string | null;
581
+ id: string;
582
+ initial_fee: number | null;
583
+ monthly_fee: number | null;
584
+ organization_id: string;
585
+ payment_link_sent_at: string | null;
586
+ payment_received_at: string | null;
587
+ proposal_data: Json | null;
588
+ proposal_generated_at: string | null;
589
+ proposal_pdf_url: string | null;
590
+ proposal_reviewed_at: string | null;
591
+ proposal_reviewed_by: string | null;
592
+ proposal_sent_at: string | null;
593
+ proposal_signed_at: string | null;
594
+ proposal_status: string | null;
595
+ signature_envelope_id: string | null;
596
+ source_list_id: string | null;
597
+ source_type: string | null;
598
+ stripe_payment_id: string | null;
599
+ stripe_payment_link: string | null;
600
+ stripe_payment_link_id: string | null;
601
+ stripe_subscription_id: string | null;
602
+ updated_at: string;
603
+ };
604
+ Insert: {
605
+ activity_log?: Json;
606
+ attio_deal_id: string;
607
+ cached_stage?: string | null;
608
+ closed_lost_at?: string | null;
609
+ closed_lost_reason?: string | null;
610
+ contact_email: string;
611
+ contact_id?: string | null;
612
+ created_at?: string;
613
+ discovery_data?: Json | null;
614
+ discovery_submitted_at?: string | null;
615
+ discovery_submitted_by?: string | null;
616
+ id?: string;
617
+ initial_fee?: number | null;
618
+ monthly_fee?: number | null;
619
+ organization_id: string;
620
+ payment_link_sent_at?: string | null;
621
+ payment_received_at?: string | null;
622
+ proposal_data?: Json | null;
623
+ proposal_generated_at?: string | null;
624
+ proposal_pdf_url?: string | null;
625
+ proposal_reviewed_at?: string | null;
626
+ proposal_reviewed_by?: string | null;
627
+ proposal_sent_at?: string | null;
628
+ proposal_signed_at?: string | null;
629
+ proposal_status?: string | null;
630
+ signature_envelope_id?: string | null;
631
+ source_list_id?: string | null;
632
+ source_type?: string | null;
633
+ stripe_payment_id?: string | null;
634
+ stripe_payment_link?: string | null;
635
+ stripe_payment_link_id?: string | null;
636
+ stripe_subscription_id?: string | null;
637
+ updated_at?: string;
638
+ };
639
+ Update: {
640
+ activity_log?: Json;
641
+ attio_deal_id?: string;
642
+ cached_stage?: string | null;
643
+ closed_lost_at?: string | null;
644
+ closed_lost_reason?: string | null;
645
+ contact_email?: string;
646
+ contact_id?: string | null;
647
+ created_at?: string;
648
+ discovery_data?: Json | null;
649
+ discovery_submitted_at?: string | null;
650
+ discovery_submitted_by?: string | null;
651
+ id?: string;
652
+ initial_fee?: number | null;
653
+ monthly_fee?: number | null;
654
+ organization_id?: string;
655
+ payment_link_sent_at?: string | null;
656
+ payment_received_at?: string | null;
657
+ proposal_data?: Json | null;
658
+ proposal_generated_at?: string | null;
659
+ proposal_pdf_url?: string | null;
660
+ proposal_reviewed_at?: string | null;
661
+ proposal_reviewed_by?: string | null;
662
+ proposal_sent_at?: string | null;
663
+ proposal_signed_at?: string | null;
664
+ proposal_status?: string | null;
665
+ signature_envelope_id?: string | null;
666
+ source_list_id?: string | null;
667
+ source_type?: string | null;
668
+ stripe_payment_id?: string | null;
669
+ stripe_payment_link?: string | null;
670
+ stripe_payment_link_id?: string | null;
671
+ stripe_subscription_id?: string | null;
672
+ updated_at?: string;
673
+ };
674
+ Relationships: [
675
+ {
676
+ foreignKeyName: "acq_deals_contact_id_fkey";
677
+ columns: ["contact_id"];
678
+ isOneToOne: false;
679
+ referencedRelation: "acq_contacts";
680
+ referencedColumns: ["id"];
681
+ },
682
+ {
683
+ foreignKeyName: "acq_deals_organization_id_fkey";
684
+ columns: ["organization_id"];
685
+ isOneToOne: false;
686
+ referencedRelation: "organizations";
687
+ referencedColumns: ["id"];
688
+ },
689
+ {
690
+ foreignKeyName: "acq_deals_source_list_id_fkey";
691
+ columns: ["source_list_id"];
692
+ isOneToOne: false;
693
+ referencedRelation: "acq_lists";
694
+ referencedColumns: ["id"];
695
+ }
696
+ ];
697
+ };
698
+ acq_list_members: {
699
+ Row: {
700
+ added_at: string;
701
+ added_by: string | null;
702
+ contact_id: string;
703
+ id: string;
704
+ list_id: string;
705
+ };
706
+ Insert: {
707
+ added_at?: string;
708
+ added_by?: string | null;
709
+ contact_id: string;
710
+ id?: string;
711
+ list_id: string;
712
+ };
713
+ Update: {
714
+ added_at?: string;
715
+ added_by?: string | null;
716
+ contact_id?: string;
717
+ id?: string;
718
+ list_id?: string;
719
+ };
720
+ Relationships: [
721
+ {
722
+ foreignKeyName: "acq_list_members_contact_id_fkey";
723
+ columns: ["contact_id"];
724
+ isOneToOne: false;
725
+ referencedRelation: "acq_contacts";
726
+ referencedColumns: ["id"];
727
+ },
728
+ {
729
+ foreignKeyName: "acq_list_members_list_id_fkey";
730
+ columns: ["list_id"];
731
+ isOneToOne: false;
732
+ referencedRelation: "acq_lists";
733
+ referencedColumns: ["id"];
734
+ }
735
+ ];
736
+ };
737
+ acq_lists: {
738
+ Row: {
739
+ batch_ids: string[];
740
+ completed_at: string | null;
741
+ created_at: string;
742
+ description: string | null;
743
+ id: string;
744
+ instantly_campaign_id: string | null;
745
+ launched_at: string | null;
746
+ metadata: Json;
747
+ name: string;
748
+ organization_id: string;
749
+ status: string;
750
+ type: string;
751
+ };
752
+ Insert: {
753
+ batch_ids?: string[];
754
+ completed_at?: string | null;
755
+ created_at?: string;
756
+ description?: string | null;
757
+ id?: string;
758
+ instantly_campaign_id?: string | null;
759
+ launched_at?: string | null;
760
+ metadata?: Json;
761
+ name: string;
762
+ organization_id: string;
763
+ status?: string;
764
+ type?: string;
765
+ };
766
+ Update: {
767
+ batch_ids?: string[];
768
+ completed_at?: string | null;
769
+ created_at?: string;
770
+ description?: string | null;
771
+ id?: string;
772
+ instantly_campaign_id?: string | null;
773
+ launched_at?: string | null;
774
+ metadata?: Json;
775
+ name?: string;
776
+ organization_id?: string;
777
+ status?: string;
778
+ type?: string;
779
+ };
780
+ Relationships: [
781
+ {
782
+ foreignKeyName: "acq_lists_organization_id_fkey";
783
+ columns: ["organization_id"];
784
+ isOneToOne: false;
785
+ referencedRelation: "organizations";
786
+ referencedColumns: ["id"];
787
+ }
788
+ ];
789
+ };
790
+ acq_seo_metrics: {
791
+ Row: {
792
+ ai_citations: Json | null;
793
+ avg_position: number | null;
794
+ clicks: number | null;
795
+ created_at: string;
796
+ cta_clicks: number | null;
797
+ ctr: number | null;
798
+ data_point_count: number | null;
799
+ faq_count: number | null;
800
+ form_submissions: number | null;
801
+ id: string;
802
+ impressions: number | null;
803
+ organization_id: string;
804
+ period: string;
805
+ quality_score: number | null;
806
+ readability: number | null;
807
+ scroll_100: number | null;
808
+ scroll_25: number | null;
809
+ scroll_50: number | null;
810
+ scroll_75: number | null;
811
+ seo_page_id: string;
812
+ word_count: number | null;
813
+ };
814
+ Insert: {
815
+ ai_citations?: Json | null;
816
+ avg_position?: number | null;
817
+ clicks?: number | null;
818
+ created_at?: string;
819
+ cta_clicks?: number | null;
820
+ ctr?: number | null;
821
+ data_point_count?: number | null;
822
+ faq_count?: number | null;
823
+ form_submissions?: number | null;
824
+ id?: string;
825
+ impressions?: number | null;
826
+ organization_id: string;
827
+ period: string;
828
+ quality_score?: number | null;
829
+ readability?: number | null;
830
+ scroll_100?: number | null;
831
+ scroll_25?: number | null;
832
+ scroll_50?: number | null;
833
+ scroll_75?: number | null;
834
+ seo_page_id: string;
835
+ word_count?: number | null;
836
+ };
837
+ Update: {
838
+ ai_citations?: Json | null;
839
+ avg_position?: number | null;
840
+ clicks?: number | null;
841
+ created_at?: string;
842
+ cta_clicks?: number | null;
843
+ ctr?: number | null;
844
+ data_point_count?: number | null;
845
+ faq_count?: number | null;
846
+ form_submissions?: number | null;
847
+ id?: string;
848
+ impressions?: number | null;
849
+ organization_id?: string;
850
+ period?: string;
851
+ quality_score?: number | null;
852
+ readability?: number | null;
853
+ scroll_100?: number | null;
854
+ scroll_25?: number | null;
855
+ scroll_50?: number | null;
856
+ scroll_75?: number | null;
857
+ seo_page_id?: string;
858
+ word_count?: number | null;
859
+ };
860
+ Relationships: [
861
+ {
862
+ foreignKeyName: "acq_seo_metrics_organization_id_fkey";
863
+ columns: ["organization_id"];
864
+ isOneToOne: false;
865
+ referencedRelation: "organizations";
866
+ referencedColumns: ["id"];
867
+ },
868
+ {
869
+ foreignKeyName: "acq_seo_metrics_seo_page_id_fkey";
870
+ columns: ["seo_page_id"];
871
+ isOneToOne: false;
872
+ referencedRelation: "acq_seo_pages";
873
+ referencedColumns: ["id"];
874
+ }
875
+ ];
876
+ };
877
+ acq_seo_pages: {
878
+ Row: {
879
+ city: string | null;
880
+ content: Json | null;
881
+ created_at: string;
882
+ faq_items: Json | null;
883
+ hero_image_url: string | null;
884
+ id: string;
885
+ internal_links: Json | null;
886
+ local_data: Json | null;
887
+ meta_description: string | null;
888
+ organization_id: string;
889
+ page_type: string;
890
+ published_at: string | null;
891
+ refreshed_at: string | null;
892
+ schema_markup: Json | null;
893
+ slug: string;
894
+ state: string | null;
895
+ status: string;
896
+ title: string;
897
+ updated_at: string;
898
+ use_case: string | null;
899
+ vertical: string;
900
+ };
901
+ Insert: {
902
+ city?: string | null;
903
+ content?: Json | null;
904
+ created_at?: string;
905
+ faq_items?: Json | null;
906
+ hero_image_url?: string | null;
907
+ id?: string;
908
+ internal_links?: Json | null;
909
+ local_data?: Json | null;
910
+ meta_description?: string | null;
911
+ organization_id: string;
912
+ page_type: string;
913
+ published_at?: string | null;
914
+ refreshed_at?: string | null;
915
+ schema_markup?: Json | null;
916
+ slug: string;
917
+ state?: string | null;
918
+ status?: string;
919
+ title: string;
920
+ updated_at?: string;
921
+ use_case?: string | null;
922
+ vertical: string;
923
+ };
924
+ Update: {
925
+ city?: string | null;
926
+ content?: Json | null;
927
+ created_at?: string;
928
+ faq_items?: Json | null;
929
+ hero_image_url?: string | null;
930
+ id?: string;
931
+ internal_links?: Json | null;
932
+ local_data?: Json | null;
933
+ meta_description?: string | null;
934
+ organization_id?: string;
935
+ page_type?: string;
936
+ published_at?: string | null;
937
+ refreshed_at?: string | null;
938
+ schema_markup?: Json | null;
939
+ slug?: string;
940
+ state?: string | null;
941
+ status?: string;
942
+ title?: string;
943
+ updated_at?: string;
944
+ use_case?: string | null;
945
+ vertical?: string;
946
+ };
947
+ Relationships: [
948
+ {
949
+ foreignKeyName: "acq_seo_pages_organization_id_fkey";
950
+ columns: ["organization_id"];
951
+ isOneToOne: false;
952
+ referencedRelation: "organizations";
953
+ referencedColumns: ["id"];
954
+ }
955
+ ];
956
+ };
957
+ acq_social_posts: {
958
+ Row: {
959
+ author_name: string;
960
+ author_url: string | null;
961
+ comments_count: number;
962
+ created_at: string;
963
+ discovered_at: string;
964
+ engagement_count: number;
965
+ feedback: string | null;
966
+ final_response: string | null;
967
+ fully_reviewed: boolean;
968
+ id: string;
969
+ initial_draft: string | null;
970
+ matched_keywords: string[];
971
+ matched_query: string | null;
972
+ metadata: Json;
973
+ organization_id: string;
974
+ platform: string;
975
+ platform_post_id: string;
976
+ post_text: string;
977
+ post_title: string;
978
+ post_url: string;
979
+ posted_at: string;
980
+ relevance_score: number;
981
+ responded_at: string | null;
982
+ reviewed_at: string | null;
983
+ skip_reason: string | null;
984
+ source_category: string | null;
985
+ status: string;
986
+ updated_at: string;
987
+ };
988
+ Insert: {
989
+ author_name: string;
990
+ author_url?: string | null;
991
+ comments_count?: number;
992
+ created_at?: string;
993
+ discovered_at?: string;
994
+ engagement_count?: number;
995
+ feedback?: string | null;
996
+ final_response?: string | null;
997
+ fully_reviewed?: boolean;
998
+ id?: string;
999
+ initial_draft?: string | null;
1000
+ matched_keywords?: string[];
1001
+ matched_query?: string | null;
1002
+ metadata?: Json;
1003
+ organization_id: string;
1004
+ platform: string;
1005
+ platform_post_id: string;
1006
+ post_text: string;
1007
+ post_title: string;
1008
+ post_url: string;
1009
+ posted_at: string;
1010
+ relevance_score?: number;
1011
+ responded_at?: string | null;
1012
+ reviewed_at?: string | null;
1013
+ skip_reason?: string | null;
1014
+ source_category?: string | null;
1015
+ status?: string;
1016
+ updated_at?: string;
1017
+ };
1018
+ Update: {
1019
+ author_name?: string;
1020
+ author_url?: string | null;
1021
+ comments_count?: number;
1022
+ created_at?: string;
1023
+ discovered_at?: string;
1024
+ engagement_count?: number;
1025
+ feedback?: string | null;
1026
+ final_response?: string | null;
1027
+ fully_reviewed?: boolean;
1028
+ id?: string;
1029
+ initial_draft?: string | null;
1030
+ matched_keywords?: string[];
1031
+ matched_query?: string | null;
1032
+ metadata?: Json;
1033
+ organization_id?: string;
1034
+ platform?: string;
1035
+ platform_post_id?: string;
1036
+ post_text?: string;
1037
+ post_title?: string;
1038
+ post_url?: string;
1039
+ posted_at?: string;
1040
+ relevance_score?: number;
1041
+ responded_at?: string | null;
1042
+ reviewed_at?: string | null;
1043
+ skip_reason?: string | null;
1044
+ source_category?: string | null;
1045
+ status?: string;
1046
+ updated_at?: string;
1047
+ };
1048
+ Relationships: [
1049
+ {
1050
+ foreignKeyName: "acq_social_posts_organization_id_fkey";
1051
+ columns: ["organization_id"];
1052
+ isOneToOne: false;
1053
+ referencedRelation: "organizations";
1054
+ referencedColumns: ["id"];
1055
+ }
1056
+ ];
1057
+ };
1058
+ activities: {
1059
+ Row: {
1060
+ activity_type: string;
1061
+ actor_id: string | null;
1062
+ actor_type: string | null;
1063
+ created_at: string;
1064
+ description: string | null;
1065
+ entity_id: string;
1066
+ entity_name: string | null;
1067
+ entity_type: string;
1068
+ id: string;
1069
+ metadata: Json | null;
1070
+ occurred_at: string;
1071
+ organization_id: string;
1072
+ status: string;
1073
+ title: string;
1074
+ };
1075
+ Insert: {
1076
+ activity_type: string;
1077
+ actor_id?: string | null;
1078
+ actor_type?: string | null;
1079
+ created_at?: string;
1080
+ description?: string | null;
1081
+ entity_id: string;
1082
+ entity_name?: string | null;
1083
+ entity_type: string;
1084
+ id?: string;
1085
+ metadata?: Json | null;
1086
+ occurred_at?: string;
1087
+ organization_id: string;
1088
+ status: string;
1089
+ title: string;
1090
+ };
1091
+ Update: {
1092
+ activity_type?: string;
1093
+ actor_id?: string | null;
1094
+ actor_type?: string | null;
1095
+ created_at?: string;
1096
+ description?: string | null;
1097
+ entity_id?: string;
1098
+ entity_name?: string | null;
1099
+ entity_type?: string;
1100
+ id?: string;
1101
+ metadata?: Json | null;
1102
+ occurred_at?: string;
1103
+ organization_id?: string;
1104
+ status?: string;
1105
+ title?: string;
1106
+ };
1107
+ Relationships: [
1108
+ {
1109
+ foreignKeyName: "activities_organization_id_fkey";
1110
+ columns: ["organization_id"];
1111
+ isOneToOne: false;
1112
+ referencedRelation: "organizations";
1113
+ referencedColumns: ["id"];
1114
+ }
1115
+ ];
1116
+ };
1117
+ api_keys: {
1118
+ Row: {
1119
+ created_at: string | null;
1120
+ id: string;
1121
+ key_hash: string;
1122
+ last_used_at: string | null;
1123
+ name: string;
1124
+ organization_id: string;
1125
+ };
1126
+ Insert: {
1127
+ created_at?: string | null;
1128
+ id?: string;
1129
+ key_hash: string;
1130
+ last_used_at?: string | null;
1131
+ name: string;
1132
+ organization_id: string;
1133
+ };
1134
+ Update: {
1135
+ created_at?: string | null;
1136
+ id?: string;
1137
+ key_hash?: string;
1138
+ last_used_at?: string | null;
1139
+ name?: string;
1140
+ organization_id?: string;
1141
+ };
1142
+ Relationships: [
1143
+ {
1144
+ foreignKeyName: "api_keys_organization_id_fkey";
1145
+ columns: ["organization_id"];
1146
+ isOneToOne: false;
1147
+ referencedRelation: "organizations";
1148
+ referencedColumns: ["id"];
1149
+ }
1150
+ ];
1151
+ };
1152
+ calibration_projects: {
1153
+ Row: {
1154
+ created_at: string | null;
1155
+ description: string | null;
1156
+ id: string;
1157
+ name: string;
1158
+ organization_id: string;
1159
+ resource_id: string;
1160
+ resource_type: string;
1161
+ updated_at: string | null;
1162
+ };
1163
+ Insert: {
1164
+ created_at?: string | null;
1165
+ description?: string | null;
1166
+ id?: string;
1167
+ name: string;
1168
+ organization_id: string;
1169
+ resource_id: string;
1170
+ resource_type: string;
1171
+ updated_at?: string | null;
1172
+ };
1173
+ Update: {
1174
+ created_at?: string | null;
1175
+ description?: string | null;
1176
+ id?: string;
1177
+ name?: string;
1178
+ organization_id?: string;
1179
+ resource_id?: string;
1180
+ resource_type?: string;
1181
+ updated_at?: string | null;
1182
+ };
1183
+ Relationships: [
1184
+ {
1185
+ foreignKeyName: "calibration_projects_organization_id_fkey";
1186
+ columns: ["organization_id"];
1187
+ isOneToOne: false;
1188
+ referencedRelation: "organizations";
1189
+ referencedColumns: ["id"];
1190
+ }
1191
+ ];
1192
+ };
1193
+ calibration_runs: {
1194
+ Row: {
1195
+ completed_at: string | null;
1196
+ config_variants: Json;
1197
+ created_at: string | null;
1198
+ description: string | null;
1199
+ execution_mode: string;
1200
+ grader_model: string | null;
1201
+ grading_rubric: Json | null;
1202
+ id: string;
1203
+ name: string;
1204
+ organization_id: string;
1205
+ project_id: string;
1206
+ results: Json;
1207
+ status: string;
1208
+ test_inputs: Json;
1209
+ };
1210
+ Insert: {
1211
+ completed_at?: string | null;
1212
+ config_variants: Json;
1213
+ created_at?: string | null;
1214
+ description?: string | null;
1215
+ execution_mode?: string;
1216
+ grader_model?: string | null;
1217
+ grading_rubric?: Json | null;
1218
+ id?: string;
1219
+ name: string;
1220
+ organization_id: string;
1221
+ project_id: string;
1222
+ results?: Json;
1223
+ status?: string;
1224
+ test_inputs: Json;
1225
+ };
1226
+ Update: {
1227
+ completed_at?: string | null;
1228
+ config_variants?: Json;
1229
+ created_at?: string | null;
1230
+ description?: string | null;
1231
+ execution_mode?: string;
1232
+ grader_model?: string | null;
1233
+ grading_rubric?: Json | null;
1234
+ id?: string;
1235
+ name?: string;
1236
+ organization_id?: string;
1237
+ project_id?: string;
1238
+ results?: Json;
1239
+ status?: string;
1240
+ test_inputs?: Json;
1241
+ };
1242
+ Relationships: [
1243
+ {
1244
+ foreignKeyName: "calibration_runs_organization_id_fkey";
1245
+ columns: ["organization_id"];
1246
+ isOneToOne: false;
1247
+ referencedRelation: "organizations";
1248
+ referencedColumns: ["id"];
1249
+ },
1250
+ {
1251
+ foreignKeyName: "calibration_runs_project_id_fkey";
1252
+ columns: ["project_id"];
1253
+ isOneToOne: false;
1254
+ referencedRelation: "calibration_projects";
1255
+ referencedColumns: ["id"];
1256
+ }
1257
+ ];
1258
+ };
1259
+ command_queue: {
1260
+ Row: {
1261
+ action_payload: Json | null;
1262
+ actions: Json;
1263
+ completed_at: string | null;
1264
+ completed_by: string | null;
1265
+ context: Json;
1266
+ created_at: string;
1267
+ description: string | null;
1268
+ expires_at: string | null;
1269
+ human_checkpoint: string | null;
1270
+ id: string;
1271
+ idempotency_key: string | null;
1272
+ metadata: Json | null;
1273
+ organization_id: string;
1274
+ origin_execution_id: string;
1275
+ origin_resource_id: string;
1276
+ origin_resource_type: string;
1277
+ priority: number;
1278
+ selected_action: string | null;
1279
+ status: string;
1280
+ target_execution_id: string | null;
1281
+ target_resource_id: string | null;
1282
+ target_resource_type: string | null;
1283
+ };
1284
+ Insert: {
1285
+ action_payload?: Json | null;
1286
+ actions: Json;
1287
+ completed_at?: string | null;
1288
+ completed_by?: string | null;
1289
+ context: Json;
1290
+ created_at?: string;
1291
+ description?: string | null;
1292
+ expires_at?: string | null;
1293
+ human_checkpoint?: string | null;
1294
+ id?: string;
1295
+ idempotency_key?: string | null;
1296
+ metadata?: Json | null;
1297
+ organization_id: string;
1298
+ origin_execution_id: string;
1299
+ origin_resource_id: string;
1300
+ origin_resource_type: string;
1301
+ priority?: number;
1302
+ selected_action?: string | null;
1303
+ status?: string;
1304
+ target_execution_id?: string | null;
1305
+ target_resource_id?: string | null;
1306
+ target_resource_type?: string | null;
1307
+ };
1308
+ Update: {
1309
+ action_payload?: Json | null;
1310
+ actions?: Json;
1311
+ completed_at?: string | null;
1312
+ completed_by?: string | null;
1313
+ context?: Json;
1314
+ created_at?: string;
1315
+ description?: string | null;
1316
+ expires_at?: string | null;
1317
+ human_checkpoint?: string | null;
1318
+ id?: string;
1319
+ idempotency_key?: string | null;
1320
+ metadata?: Json | null;
1321
+ organization_id?: string;
1322
+ origin_execution_id?: string;
1323
+ origin_resource_id?: string;
1324
+ origin_resource_type?: string;
1325
+ priority?: number;
1326
+ selected_action?: string | null;
1327
+ status?: string;
1328
+ target_execution_id?: string | null;
1329
+ target_resource_id?: string | null;
1330
+ target_resource_type?: string | null;
1331
+ };
1332
+ Relationships: [
1333
+ {
1334
+ foreignKeyName: "command_queue_completed_by_fkey";
1335
+ columns: ["completed_by"];
1336
+ isOneToOne: false;
1337
+ referencedRelation: "users";
1338
+ referencedColumns: ["id"];
1339
+ },
1340
+ {
1341
+ foreignKeyName: "command_queue_organization_id_fkey";
1342
+ columns: ["organization_id"];
1343
+ isOneToOne: false;
1344
+ referencedRelation: "organizations";
1345
+ referencedColumns: ["id"];
1346
+ },
1347
+ {
1348
+ foreignKeyName: "command_queue_target_execution_id_fkey";
1349
+ columns: ["target_execution_id"];
1350
+ isOneToOne: false;
1351
+ referencedRelation: "execution_logs";
1352
+ referencedColumns: ["execution_id"];
1353
+ }
1354
+ ];
1355
+ };
1356
+ credentials: {
1357
+ Row: {
1358
+ created_at: string;
1359
+ created_by: string | null;
1360
+ encrypted_value: string;
1361
+ id: string;
1362
+ name: string;
1363
+ organization_id: string;
1364
+ provider: string | null;
1365
+ type: string;
1366
+ updated_at: string;
1367
+ };
1368
+ Insert: {
1369
+ created_at?: string;
1370
+ created_by?: string | null;
1371
+ encrypted_value: string;
1372
+ id?: string;
1373
+ name: string;
1374
+ organization_id: string;
1375
+ provider?: string | null;
1376
+ type?: string;
1377
+ updated_at?: string;
1378
+ };
1379
+ Update: {
1380
+ created_at?: string;
1381
+ created_by?: string | null;
1382
+ encrypted_value?: string;
1383
+ id?: string;
1384
+ name?: string;
1385
+ organization_id?: string;
1386
+ provider?: string | null;
1387
+ type?: string;
1388
+ updated_at?: string;
1389
+ };
1390
+ Relationships: [
1391
+ {
1392
+ foreignKeyName: "credentials_created_by_fkey";
1393
+ columns: ["created_by"];
1394
+ isOneToOne: false;
1395
+ referencedRelation: "users";
1396
+ referencedColumns: ["id"];
1397
+ },
1398
+ {
1399
+ foreignKeyName: "credentials_organization_id_fkey";
1400
+ columns: ["organization_id"];
1401
+ isOneToOne: false;
1402
+ referencedRelation: "organizations";
1403
+ referencedColumns: ["id"];
1404
+ }
1405
+ ];
1406
+ };
1407
+ deployments: {
1408
+ Row: {
1409
+ compiled_docs: Json | null;
1410
+ created_at: string;
1411
+ deployment_version: string | null;
1412
+ documentation: Json | null;
1413
+ error_message: string | null;
1414
+ id: string;
1415
+ organization_id: string;
1416
+ pid: number | null;
1417
+ port: number | null;
1418
+ sdk_version: string;
1419
+ status: string;
1420
+ tarball_path: string | null;
1421
+ updated_at: string;
1422
+ };
1423
+ Insert: {
1424
+ compiled_docs?: Json | null;
1425
+ created_at?: string;
1426
+ deployment_version?: string | null;
1427
+ documentation?: Json | null;
1428
+ error_message?: string | null;
1429
+ id?: string;
1430
+ organization_id: string;
1431
+ pid?: number | null;
1432
+ port?: number | null;
1433
+ sdk_version: string;
1434
+ status?: string;
1435
+ tarball_path?: string | null;
1436
+ updated_at?: string;
1437
+ };
1438
+ Update: {
1439
+ compiled_docs?: Json | null;
1440
+ created_at?: string;
1441
+ deployment_version?: string | null;
1442
+ documentation?: Json | null;
1443
+ error_message?: string | null;
1444
+ id?: string;
1445
+ organization_id?: string;
1446
+ pid?: number | null;
1447
+ port?: number | null;
1448
+ sdk_version?: string;
1449
+ status?: string;
1450
+ tarball_path?: string | null;
1451
+ updated_at?: string;
1452
+ };
1453
+ Relationships: [
1454
+ {
1455
+ foreignKeyName: "deployments_organization_id_fkey";
1456
+ columns: ["organization_id"];
1457
+ isOneToOne: false;
1458
+ referencedRelation: "organizations";
1459
+ referencedColumns: ["id"];
1460
+ }
1461
+ ];
1462
+ };
1463
+ execution_errors: {
1464
+ Row: {
1465
+ created_at: string | null;
1466
+ error_category: string;
1467
+ error_message: string;
1468
+ error_severity: string;
1469
+ error_stack_trace: string | null;
1470
+ error_type: string;
1471
+ execution_id: string;
1472
+ id: string;
1473
+ metadata: Json | null;
1474
+ occurred_at: string;
1475
+ organization_id: string;
1476
+ resolved: boolean;
1477
+ resolved_at: string | null;
1478
+ resolved_by: string | null;
1479
+ };
1480
+ Insert: {
1481
+ created_at?: string | null;
1482
+ error_category: string;
1483
+ error_message: string;
1484
+ error_severity: string;
1485
+ error_stack_trace?: string | null;
1486
+ error_type: string;
1487
+ execution_id: string;
1488
+ id?: string;
1489
+ metadata?: Json | null;
1490
+ occurred_at?: string;
1491
+ organization_id: string;
1492
+ resolved?: boolean;
1493
+ resolved_at?: string | null;
1494
+ resolved_by?: string | null;
1495
+ };
1496
+ Update: {
1497
+ created_at?: string | null;
1498
+ error_category?: string;
1499
+ error_message?: string;
1500
+ error_severity?: string;
1501
+ error_stack_trace?: string | null;
1502
+ error_type?: string;
1503
+ execution_id?: string;
1504
+ id?: string;
1505
+ metadata?: Json | null;
1506
+ occurred_at?: string;
1507
+ organization_id?: string;
1508
+ resolved?: boolean;
1509
+ resolved_at?: string | null;
1510
+ resolved_by?: string | null;
1511
+ };
1512
+ Relationships: [
1513
+ {
1514
+ foreignKeyName: "execution_errors_execution_id_fkey";
1515
+ columns: ["execution_id"];
1516
+ isOneToOne: false;
1517
+ referencedRelation: "execution_logs";
1518
+ referencedColumns: ["execution_id"];
1519
+ },
1520
+ {
1521
+ foreignKeyName: "execution_errors_organization_id_fkey";
1522
+ columns: ["organization_id"];
1523
+ isOneToOne: false;
1524
+ referencedRelation: "organizations";
1525
+ referencedColumns: ["id"];
1526
+ },
1527
+ {
1528
+ foreignKeyName: "execution_errors_resolved_by_fkey";
1529
+ columns: ["resolved_by"];
1530
+ isOneToOne: false;
1531
+ referencedRelation: "users";
1532
+ referencedColumns: ["id"];
1533
+ }
1534
+ ];
1535
+ };
1536
+ execution_logs: {
1537
+ Row: {
1538
+ api_version: string | null;
1539
+ completed_at: string | null;
1540
+ created_at: string | null;
1541
+ error: string | null;
1542
+ execution_id: string;
1543
+ input: Json | null;
1544
+ last_heartbeat_at: string | null;
1545
+ logs: Json | null;
1546
+ organization_id: string;
1547
+ origin_execution_id: string | null;
1548
+ output: Json | null;
1549
+ resource_id: string;
1550
+ resource_status: string;
1551
+ resource_type: string;
1552
+ resource_version: string | null;
1553
+ sdk_version: string | null;
1554
+ session_id: string | null;
1555
+ session_turn_number: number | null;
1556
+ started_at: string;
1557
+ status: string;
1558
+ trigger_type: string | null;
1559
+ updated_at: string | null;
1560
+ user_id: string | null;
1561
+ };
1562
+ Insert: {
1563
+ api_version?: string | null;
1564
+ completed_at?: string | null;
1565
+ created_at?: string | null;
1566
+ error?: string | null;
1567
+ execution_id?: string;
1568
+ input?: Json | null;
1569
+ last_heartbeat_at?: string | null;
1570
+ logs?: Json | null;
1571
+ organization_id: string;
1572
+ origin_execution_id?: string | null;
1573
+ output?: Json | null;
1574
+ resource_id: string;
1575
+ resource_status?: string;
1576
+ resource_type?: string;
1577
+ resource_version?: string | null;
1578
+ sdk_version?: string | null;
1579
+ session_id?: string | null;
1580
+ session_turn_number?: number | null;
1581
+ started_at?: string;
1582
+ status: string;
1583
+ trigger_type?: string | null;
1584
+ updated_at?: string | null;
1585
+ user_id?: string | null;
1586
+ };
1587
+ Update: {
1588
+ api_version?: string | null;
1589
+ completed_at?: string | null;
1590
+ created_at?: string | null;
1591
+ error?: string | null;
1592
+ execution_id?: string;
1593
+ input?: Json | null;
1594
+ last_heartbeat_at?: string | null;
1595
+ logs?: Json | null;
1596
+ organization_id?: string;
1597
+ origin_execution_id?: string | null;
1598
+ output?: Json | null;
1599
+ resource_id?: string;
1600
+ resource_status?: string;
1601
+ resource_type?: string;
1602
+ resource_version?: string | null;
1603
+ sdk_version?: string | null;
1604
+ session_id?: string | null;
1605
+ session_turn_number?: number | null;
1606
+ started_at?: string;
1607
+ status?: string;
1608
+ trigger_type?: string | null;
1609
+ updated_at?: string | null;
1610
+ user_id?: string | null;
1611
+ };
1612
+ Relationships: [
1613
+ {
1614
+ foreignKeyName: "execution_history_organization_id_fkey";
1615
+ columns: ["organization_id"];
1616
+ isOneToOne: false;
1617
+ referencedRelation: "organizations";
1618
+ referencedColumns: ["id"];
1619
+ },
1620
+ {
1621
+ foreignKeyName: "execution_logs_origin_execution_id_fkey";
1622
+ columns: ["origin_execution_id"];
1623
+ isOneToOne: false;
1624
+ referencedRelation: "execution_logs";
1625
+ referencedColumns: ["execution_id"];
1626
+ },
1627
+ {
1628
+ foreignKeyName: "execution_logs_session_id_fkey";
1629
+ columns: ["session_id"];
1630
+ isOneToOne: false;
1631
+ referencedRelation: "sessions";
1632
+ referencedColumns: ["session_id"];
1633
+ },
1634
+ {
1635
+ foreignKeyName: "execution_logs_user_id_fkey";
1636
+ columns: ["user_id"];
1637
+ isOneToOne: false;
1638
+ referencedRelation: "users";
1639
+ referencedColumns: ["id"];
1640
+ }
1641
+ ];
1642
+ };
1643
+ execution_metrics: {
1644
+ Row: {
1645
+ ai_call_count: number;
1646
+ ai_calls: Json | null;
1647
+ automation_savings_usd: number | null;
1648
+ created_at: string | null;
1649
+ duration_ms: number | null;
1650
+ execution_id: string;
1651
+ organization_id: string;
1652
+ resource_id: string;
1653
+ total_cost_usd: number;
1654
+ total_input_tokens: number;
1655
+ total_output_tokens: number;
1656
+ };
1657
+ Insert: {
1658
+ ai_call_count: number;
1659
+ ai_calls?: Json | null;
1660
+ automation_savings_usd?: number | null;
1661
+ created_at?: string | null;
1662
+ duration_ms?: number | null;
1663
+ execution_id: string;
1664
+ organization_id: string;
1665
+ resource_id: string;
1666
+ total_cost_usd: number;
1667
+ total_input_tokens: number;
1668
+ total_output_tokens: number;
1669
+ };
1670
+ Update: {
1671
+ ai_call_count?: number;
1672
+ ai_calls?: Json | null;
1673
+ automation_savings_usd?: number | null;
1674
+ created_at?: string | null;
1675
+ duration_ms?: number | null;
1676
+ execution_id?: string;
1677
+ organization_id?: string;
1678
+ resource_id?: string;
1679
+ total_cost_usd?: number;
1680
+ total_input_tokens?: number;
1681
+ total_output_tokens?: number;
1682
+ };
1683
+ Relationships: [
1684
+ {
1685
+ foreignKeyName: "execution_metrics_execution_id_fkey";
1686
+ columns: ["execution_id"];
1687
+ isOneToOne: true;
1688
+ referencedRelation: "execution_logs";
1689
+ referencedColumns: ["execution_id"];
1690
+ },
1691
+ {
1692
+ foreignKeyName: "execution_metrics_organization_id_fkey";
1693
+ columns: ["organization_id"];
1694
+ isOneToOne: false;
1695
+ referencedRelation: "organizations";
1696
+ referencedColumns: ["id"];
1697
+ }
1698
+ ];
1699
+ };
1700
+ notifications: {
1701
+ Row: {
1702
+ action_url: string | null;
1703
+ category: string;
1704
+ created_at: string | null;
1705
+ id: string;
1706
+ message: string;
1707
+ organization_id: string;
1708
+ read: boolean | null;
1709
+ read_at: string | null;
1710
+ title: string;
1711
+ user_id: string;
1712
+ };
1713
+ Insert: {
1714
+ action_url?: string | null;
1715
+ category: string;
1716
+ created_at?: string | null;
1717
+ id?: string;
1718
+ message: string;
1719
+ organization_id: string;
1720
+ read?: boolean | null;
1721
+ read_at?: string | null;
1722
+ title: string;
1723
+ user_id: string;
1724
+ };
1725
+ Update: {
1726
+ action_url?: string | null;
1727
+ category?: string;
1728
+ created_at?: string | null;
1729
+ id?: string;
1730
+ message?: string;
1731
+ organization_id?: string;
1732
+ read?: boolean | null;
1733
+ read_at?: string | null;
1734
+ title?: string;
1735
+ user_id?: string;
1736
+ };
1737
+ Relationships: [
1738
+ {
1739
+ foreignKeyName: "notifications_organization_id_fkey";
1740
+ columns: ["organization_id"];
1741
+ isOneToOne: false;
1742
+ referencedRelation: "organizations";
1743
+ referencedColumns: ["id"];
1744
+ },
1745
+ {
1746
+ foreignKeyName: "notifications_user_id_fkey";
1747
+ columns: ["user_id"];
1748
+ isOneToOne: false;
1749
+ referencedRelation: "users";
1750
+ referencedColumns: ["id"];
1751
+ }
1752
+ ];
1753
+ };
1754
+ org_invitations: {
1755
+ Row: {
1756
+ accept_invitation_url: string | null;
1757
+ accepted_at: string | null;
1758
+ created_at: string | null;
1759
+ email: string;
1760
+ expires_at: string;
1761
+ id: string;
1762
+ invitation_state: string | null;
1763
+ invitation_token: string | null;
1764
+ inviter_user_id: string | null;
1765
+ organization_id: string | null;
1766
+ revoked_at: string | null;
1767
+ role_slug: string | null;
1768
+ updated_at: string | null;
1769
+ workos_invitation_id: string;
1770
+ };
1771
+ Insert: {
1772
+ accept_invitation_url?: string | null;
1773
+ accepted_at?: string | null;
1774
+ created_at?: string | null;
1775
+ email: string;
1776
+ expires_at: string;
1777
+ id?: string;
1778
+ invitation_state?: string | null;
1779
+ invitation_token?: string | null;
1780
+ inviter_user_id?: string | null;
1781
+ organization_id?: string | null;
1782
+ revoked_at?: string | null;
1783
+ role_slug?: string | null;
1784
+ updated_at?: string | null;
1785
+ workos_invitation_id: string;
1786
+ };
1787
+ Update: {
1788
+ accept_invitation_url?: string | null;
1789
+ accepted_at?: string | null;
1790
+ created_at?: string | null;
1791
+ email?: string;
1792
+ expires_at?: string;
1793
+ id?: string;
1794
+ invitation_state?: string | null;
1795
+ invitation_token?: string | null;
1796
+ inviter_user_id?: string | null;
1797
+ organization_id?: string | null;
1798
+ revoked_at?: string | null;
1799
+ role_slug?: string | null;
1800
+ updated_at?: string | null;
1801
+ workos_invitation_id?: string;
1802
+ };
1803
+ Relationships: [
1804
+ {
1805
+ foreignKeyName: "org_invitations_inviter_user_id_fkey";
1806
+ columns: ["inviter_user_id"];
1807
+ isOneToOne: false;
1808
+ referencedRelation: "users";
1809
+ referencedColumns: ["id"];
1810
+ },
1811
+ {
1812
+ foreignKeyName: "org_invitations_organization_id_fkey";
1813
+ columns: ["organization_id"];
1814
+ isOneToOne: false;
1815
+ referencedRelation: "organizations";
1816
+ referencedColumns: ["id"];
1817
+ }
1818
+ ];
1819
+ };
1820
+ org_memberships: {
1821
+ Row: {
1822
+ config: Json;
1823
+ created_at: string | null;
1824
+ id: string;
1825
+ membership_status: string | null;
1826
+ organization_id: string;
1827
+ role_slug: string | null;
1828
+ updated_at: string | null;
1829
+ user_id: string;
1830
+ workos_membership_id: string | null;
1831
+ };
1832
+ Insert: {
1833
+ config?: Json;
1834
+ created_at?: string | null;
1835
+ id?: string;
1836
+ membership_status?: string | null;
1837
+ organization_id: string;
1838
+ role_slug?: string | null;
1839
+ updated_at?: string | null;
1840
+ user_id: string;
1841
+ workos_membership_id?: string | null;
1842
+ };
1843
+ Update: {
1844
+ config?: Json;
1845
+ created_at?: string | null;
1846
+ id?: string;
1847
+ membership_status?: string | null;
1848
+ organization_id?: string;
1849
+ role_slug?: string | null;
1850
+ updated_at?: string | null;
1851
+ user_id?: string;
1852
+ workos_membership_id?: string | null;
1853
+ };
1854
+ Relationships: [
1855
+ {
1856
+ foreignKeyName: "org_memberships_organization_id_fkey";
1857
+ columns: ["organization_id"];
1858
+ isOneToOne: false;
1859
+ referencedRelation: "organizations";
1860
+ referencedColumns: ["id"];
1861
+ },
1862
+ {
1863
+ foreignKeyName: "org_memberships_user_id_fkey";
1864
+ columns: ["user_id"];
1865
+ isOneToOne: false;
1866
+ referencedRelation: "users";
1867
+ referencedColumns: ["id"];
1868
+ }
1869
+ ];
1870
+ };
1871
+ organizations: {
1872
+ Row: {
1873
+ config: Json;
1874
+ created_at: string;
1875
+ id: string;
1876
+ is_test: boolean;
1877
+ metadata: Json;
1878
+ name: string;
1879
+ status: string;
1880
+ updated_at: string;
1881
+ workos_org_id: string;
1882
+ };
1883
+ Insert: {
1884
+ config?: Json;
1885
+ created_at?: string;
1886
+ id?: string;
1887
+ is_test?: boolean;
1888
+ metadata?: Json;
1889
+ name: string;
1890
+ status?: string;
1891
+ updated_at?: string;
1892
+ workos_org_id: string;
1893
+ };
1894
+ Update: {
1895
+ config?: Json;
1896
+ created_at?: string;
1897
+ id?: string;
1898
+ is_test?: boolean;
1899
+ metadata?: Json;
1900
+ name?: string;
1901
+ status?: string;
1902
+ updated_at?: string;
1903
+ workos_org_id?: string;
1904
+ };
1905
+ Relationships: [];
1906
+ };
1907
+ session_messages: {
1908
+ Row: {
1909
+ created_at: string | null;
1910
+ id: string;
1911
+ message: string;
1912
+ message_index: number | null;
1913
+ message_type: string | null;
1914
+ metadata: Json | null;
1915
+ role: string;
1916
+ session_id: string;
1917
+ session_turn_number: number;
1918
+ };
1919
+ Insert: {
1920
+ created_at?: string | null;
1921
+ id: string;
1922
+ message: string;
1923
+ message_index?: number | null;
1924
+ message_type?: string | null;
1925
+ metadata?: Json | null;
1926
+ role: string;
1927
+ session_id: string;
1928
+ session_turn_number: number;
1929
+ };
1930
+ Update: {
1931
+ created_at?: string | null;
1932
+ id?: string;
1933
+ message?: string;
1934
+ message_index?: number | null;
1935
+ message_type?: string | null;
1936
+ metadata?: Json | null;
1937
+ role?: string;
1938
+ session_id?: string;
1939
+ session_turn_number?: number;
1940
+ };
1941
+ Relationships: [
1942
+ {
1943
+ foreignKeyName: "session_messages_session_id_fkey";
1944
+ columns: ["session_id"];
1945
+ isOneToOne: false;
1946
+ referencedRelation: "sessions";
1947
+ referencedColumns: ["session_id"];
1948
+ }
1949
+ ];
1950
+ };
1951
+ sessions: {
1952
+ Row: {
1953
+ context_window_size: number;
1954
+ created_at: string | null;
1955
+ cumulative_input_tokens: number;
1956
+ cumulative_output_tokens: number;
1957
+ deleted_at: string | null;
1958
+ ended_at: string | null;
1959
+ memory_snapshot: Json;
1960
+ metadata: Json | null;
1961
+ organization_id: string;
1962
+ resource_id: string;
1963
+ session_id: string;
1964
+ session_total_turns: number | null;
1965
+ updated_at: string | null;
1966
+ user_id: string | null;
1967
+ };
1968
+ Insert: {
1969
+ context_window_size?: number;
1970
+ created_at?: string | null;
1971
+ cumulative_input_tokens?: number;
1972
+ cumulative_output_tokens?: number;
1973
+ deleted_at?: string | null;
1974
+ ended_at?: string | null;
1975
+ memory_snapshot: Json;
1976
+ metadata?: Json | null;
1977
+ organization_id: string;
1978
+ resource_id: string;
1979
+ session_id?: string;
1980
+ session_total_turns?: number | null;
1981
+ updated_at?: string | null;
1982
+ user_id?: string | null;
1983
+ };
1984
+ Update: {
1985
+ context_window_size?: number;
1986
+ created_at?: string | null;
1987
+ cumulative_input_tokens?: number;
1988
+ cumulative_output_tokens?: number;
1989
+ deleted_at?: string | null;
1990
+ ended_at?: string | null;
1991
+ memory_snapshot?: Json;
1992
+ metadata?: Json | null;
1993
+ organization_id?: string;
1994
+ resource_id?: string;
1995
+ session_id?: string;
1996
+ session_total_turns?: number | null;
1997
+ updated_at?: string | null;
1998
+ user_id?: string | null;
1999
+ };
2000
+ Relationships: [
2001
+ {
2002
+ foreignKeyName: "fk_organization";
2003
+ columns: ["organization_id"];
2004
+ isOneToOne: false;
2005
+ referencedRelation: "organizations";
2006
+ referencedColumns: ["id"];
2007
+ },
2008
+ {
2009
+ foreignKeyName: "fk_user";
2010
+ columns: ["user_id"];
2011
+ isOneToOne: false;
2012
+ referencedRelation: "users";
2013
+ referencedColumns: ["id"];
2014
+ }
2015
+ ];
2016
+ };
2017
+ task_schedules: {
2018
+ Row: {
2019
+ created_at: string;
2020
+ current_step: number;
2021
+ description: string | null;
2022
+ id: string;
2023
+ idempotency_key: string | null;
2024
+ last_execution_id: string | null;
2025
+ last_run_at: string | null;
2026
+ max_retries: number;
2027
+ metadata: Json | null;
2028
+ name: string;
2029
+ next_run_at: string | null;
2030
+ organization_id: string;
2031
+ origin_execution_id: string | null;
2032
+ origin_resource_id: string | null;
2033
+ origin_resource_type: string | null;
2034
+ retry_count: number;
2035
+ schedule_config: Json;
2036
+ status: string;
2037
+ target_resource_id: string;
2038
+ target_resource_type: string;
2039
+ updated_at: string;
2040
+ };
2041
+ Insert: {
2042
+ created_at?: string;
2043
+ current_step?: number;
2044
+ description?: string | null;
2045
+ id?: string;
2046
+ idempotency_key?: string | null;
2047
+ last_execution_id?: string | null;
2048
+ last_run_at?: string | null;
2049
+ max_retries?: number;
2050
+ metadata?: Json | null;
2051
+ name: string;
2052
+ next_run_at?: string | null;
2053
+ organization_id: string;
2054
+ origin_execution_id?: string | null;
2055
+ origin_resource_id?: string | null;
2056
+ origin_resource_type?: string | null;
2057
+ retry_count?: number;
2058
+ schedule_config: Json;
2059
+ status?: string;
2060
+ target_resource_id: string;
2061
+ target_resource_type: string;
2062
+ updated_at?: string;
2063
+ };
2064
+ Update: {
2065
+ created_at?: string;
2066
+ current_step?: number;
2067
+ description?: string | null;
2068
+ id?: string;
2069
+ idempotency_key?: string | null;
2070
+ last_execution_id?: string | null;
2071
+ last_run_at?: string | null;
2072
+ max_retries?: number;
2073
+ metadata?: Json | null;
2074
+ name?: string;
2075
+ next_run_at?: string | null;
2076
+ organization_id?: string;
2077
+ origin_execution_id?: string | null;
2078
+ origin_resource_id?: string | null;
2079
+ origin_resource_type?: string | null;
2080
+ retry_count?: number;
2081
+ schedule_config?: Json;
2082
+ status?: string;
2083
+ target_resource_id?: string;
2084
+ target_resource_type?: string;
2085
+ updated_at?: string;
2086
+ };
2087
+ Relationships: [
2088
+ {
2089
+ foreignKeyName: "task_schedules_organization_id_fkey";
2090
+ columns: ["organization_id"];
2091
+ isOneToOne: false;
2092
+ referencedRelation: "organizations";
2093
+ referencedColumns: ["id"];
2094
+ }
2095
+ ];
2096
+ };
2097
+ training_assessments: {
2098
+ Row: {
2099
+ answers: Json | null;
2100
+ assessment_slug: string;
2101
+ attempted_at: string;
2102
+ course_slug: string;
2103
+ id: string;
2104
+ organization_id: string;
2105
+ passed: boolean;
2106
+ score: number;
2107
+ user_id: string;
2108
+ };
2109
+ Insert: {
2110
+ answers?: Json | null;
2111
+ assessment_slug: string;
2112
+ attempted_at?: string;
2113
+ course_slug: string;
2114
+ id?: string;
2115
+ organization_id: string;
2116
+ passed: boolean;
2117
+ score: number;
2118
+ user_id: string;
2119
+ };
2120
+ Update: {
2121
+ answers?: Json | null;
2122
+ assessment_slug?: string;
2123
+ attempted_at?: string;
2124
+ course_slug?: string;
2125
+ id?: string;
2126
+ organization_id?: string;
2127
+ passed?: boolean;
2128
+ score?: number;
2129
+ user_id?: string;
2130
+ };
2131
+ Relationships: [
2132
+ {
2133
+ foreignKeyName: "training_assessments_organization_id_fkey";
2134
+ columns: ["organization_id"];
2135
+ isOneToOne: false;
2136
+ referencedRelation: "organizations";
2137
+ referencedColumns: ["id"];
2138
+ },
2139
+ {
2140
+ foreignKeyName: "training_assessments_user_id_fkey";
2141
+ columns: ["user_id"];
2142
+ isOneToOne: false;
2143
+ referencedRelation: "users";
2144
+ referencedColumns: ["id"];
2145
+ }
2146
+ ];
2147
+ };
2148
+ training_certifications: {
2149
+ Row: {
2150
+ awarded_at: string;
2151
+ certification_slug: string;
2152
+ id: string;
2153
+ organization_id: string;
2154
+ user_id: string;
2155
+ };
2156
+ Insert: {
2157
+ awarded_at?: string;
2158
+ certification_slug: string;
2159
+ id?: string;
2160
+ organization_id: string;
2161
+ user_id: string;
2162
+ };
2163
+ Update: {
2164
+ awarded_at?: string;
2165
+ certification_slug?: string;
2166
+ id?: string;
2167
+ organization_id?: string;
2168
+ user_id?: string;
2169
+ };
2170
+ Relationships: [
2171
+ {
2172
+ foreignKeyName: "training_certifications_organization_id_fkey";
2173
+ columns: ["organization_id"];
2174
+ isOneToOne: false;
2175
+ referencedRelation: "organizations";
2176
+ referencedColumns: ["id"];
2177
+ },
2178
+ {
2179
+ foreignKeyName: "training_certifications_user_id_fkey";
2180
+ columns: ["user_id"];
2181
+ isOneToOne: false;
2182
+ referencedRelation: "users";
2183
+ referencedColumns: ["id"];
2184
+ }
2185
+ ];
2186
+ };
2187
+ training_progress: {
2188
+ Row: {
2189
+ completed_at: string;
2190
+ course_slug: string;
2191
+ id: string;
2192
+ lesson_slug: string;
2193
+ organization_id: string;
2194
+ user_id: string;
2195
+ };
2196
+ Insert: {
2197
+ completed_at?: string;
2198
+ course_slug: string;
2199
+ id?: string;
2200
+ lesson_slug: string;
2201
+ organization_id: string;
2202
+ user_id: string;
2203
+ };
2204
+ Update: {
2205
+ completed_at?: string;
2206
+ course_slug?: string;
2207
+ id?: string;
2208
+ lesson_slug?: string;
2209
+ organization_id?: string;
2210
+ user_id?: string;
2211
+ };
2212
+ Relationships: [
2213
+ {
2214
+ foreignKeyName: "training_progress_organization_id_fkey";
2215
+ columns: ["organization_id"];
2216
+ isOneToOne: false;
2217
+ referencedRelation: "organizations";
2218
+ referencedColumns: ["id"];
2219
+ },
2220
+ {
2221
+ foreignKeyName: "training_progress_user_id_fkey";
2222
+ columns: ["user_id"];
2223
+ isOneToOne: false;
2224
+ referencedRelation: "users";
2225
+ referencedColumns: ["id"];
2226
+ }
2227
+ ];
2228
+ };
2229
+ users: {
2230
+ Row: {
2231
+ config: Json;
2232
+ created_at: string;
2233
+ display_name: string | null;
2234
+ email: string;
2235
+ first_name: string | null;
2236
+ id: string;
2237
+ is_active: boolean;
2238
+ is_platform_admin: boolean | null;
2239
+ last_login_at: string | null;
2240
+ last_name: string | null;
2241
+ last_visited_org: string | null;
2242
+ profile_picture_url: string | null;
2243
+ updated_at: string;
2244
+ workos_user_id: string | null;
2245
+ };
2246
+ Insert: {
2247
+ config?: Json;
2248
+ created_at?: string;
2249
+ display_name?: string | null;
2250
+ email: string;
2251
+ first_name?: string | null;
2252
+ id?: string;
2253
+ is_active?: boolean;
2254
+ is_platform_admin?: boolean | null;
2255
+ last_login_at?: string | null;
2256
+ last_name?: string | null;
2257
+ last_visited_org?: string | null;
2258
+ profile_picture_url?: string | null;
2259
+ updated_at?: string;
2260
+ workos_user_id?: string | null;
2261
+ };
2262
+ Update: {
2263
+ config?: Json;
2264
+ created_at?: string;
2265
+ display_name?: string | null;
2266
+ email?: string;
2267
+ first_name?: string | null;
2268
+ id?: string;
2269
+ is_active?: boolean;
2270
+ is_platform_admin?: boolean | null;
2271
+ last_login_at?: string | null;
2272
+ last_name?: string | null;
2273
+ last_visited_org?: string | null;
2274
+ profile_picture_url?: string | null;
2275
+ updated_at?: string;
2276
+ workos_user_id?: string | null;
2277
+ };
2278
+ Relationships: [
2279
+ {
2280
+ foreignKeyName: "user_profiles_last_visited_org_fkey";
2281
+ columns: ["last_visited_org"];
2282
+ isOneToOne: false;
2283
+ referencedRelation: "organizations";
2284
+ referencedColumns: ["id"];
2285
+ }
2286
+ ];
2287
+ };
2288
+ webhook_endpoints: {
2289
+ Row: {
2290
+ created_at: string;
2291
+ description: string | null;
2292
+ id: string;
2293
+ key: string;
2294
+ last_triggered_at: string | null;
2295
+ name: string;
2296
+ organization_id: string;
2297
+ request_count: number;
2298
+ resource_id: string | null;
2299
+ status: string;
2300
+ updated_at: string;
2301
+ };
2302
+ Insert: {
2303
+ created_at?: string;
2304
+ description?: string | null;
2305
+ id?: string;
2306
+ key: string;
2307
+ last_triggered_at?: string | null;
2308
+ name: string;
2309
+ organization_id: string;
2310
+ request_count?: number;
2311
+ resource_id?: string | null;
2312
+ status?: string;
2313
+ updated_at?: string;
2314
+ };
2315
+ Update: {
2316
+ created_at?: string;
2317
+ description?: string | null;
2318
+ id?: string;
2319
+ key?: string;
2320
+ last_triggered_at?: string | null;
2321
+ name?: string;
2322
+ organization_id?: string;
2323
+ request_count?: number;
2324
+ resource_id?: string | null;
2325
+ status?: string;
2326
+ updated_at?: string;
2327
+ };
2328
+ Relationships: [
2329
+ {
2330
+ foreignKeyName: "webhook_endpoints_organization_id_fkey";
2331
+ columns: ["organization_id"];
2332
+ isOneToOne: false;
2333
+ referencedRelation: "organizations";
2334
+ referencedColumns: ["id"];
2335
+ }
2336
+ ];
2337
+ };
2338
+ };
2339
+ Views: {
2340
+ [_ in never]: never;
2341
+ };
2342
+ Functions: {
2343
+ acq_default_checklist: {
2344
+ Args: {
2345
+ p_platform: string;
2346
+ };
2347
+ Returns: Json;
2348
+ };
2349
+ append_deal_activity: {
2350
+ Args: {
2351
+ p_activity: Json;
2352
+ p_deal_id: string;
2353
+ p_organization_id: string;
2354
+ };
2355
+ Returns: undefined;
2356
+ };
2357
+ auth_jwt_claims: {
2358
+ Args: never;
2359
+ Returns: Json;
2360
+ };
2361
+ auth_uid_safe: {
2362
+ Args: never;
2363
+ Returns: string;
2364
+ };
2365
+ current_user_is_platform_admin: {
2366
+ Args: never;
2367
+ Returns: boolean;
2368
+ };
2369
+ current_user_supabase_id: {
2370
+ Args: never;
2371
+ Returns: string;
2372
+ };
2373
+ detect_stalled_executions: {
2374
+ Args: never;
2375
+ Returns: undefined;
2376
+ };
2377
+ execute_session_turn: {
2378
+ Args: {
2379
+ p_session_id: string;
2380
+ };
2381
+ Returns: {
2382
+ created_at: string;
2383
+ ended_at: string;
2384
+ memory_snapshot: Json;
2385
+ metadata: Json;
2386
+ organization_id: string;
2387
+ resource_id: string;
2388
+ session_id: string;
2389
+ session_total_turns: number;
2390
+ updated_at: string;
2391
+ user_id: string;
2392
+ }[];
2393
+ };
2394
+ get_storage_org_id: {
2395
+ Args: {
2396
+ file_path: string;
2397
+ };
2398
+ Returns: string;
2399
+ };
2400
+ get_workos_user_id: {
2401
+ Args: never;
2402
+ Returns: string;
2403
+ };
2404
+ is_org_admin: {
2405
+ Args: {
2406
+ org_id: string;
2407
+ };
2408
+ Returns: boolean;
2409
+ };
2410
+ is_org_member: {
2411
+ Args: {
2412
+ org_id: string;
2413
+ };
2414
+ Returns: boolean;
2415
+ };
2416
+ link_workos_membership_on_accept: {
2417
+ Args: {
2418
+ p_email: string;
2419
+ p_organization_id: string;
2420
+ p_workos_membership_id: string;
2421
+ };
2422
+ Returns: boolean;
2423
+ };
2424
+ pre_provision_invited_user: {
2425
+ Args: {
2426
+ p_email: string;
2427
+ p_organization_id: string;
2428
+ p_role_slug?: string;
2429
+ };
2430
+ Returns: Json;
2431
+ };
2432
+ process_due_schedules: {
2433
+ Args: never;
2434
+ Returns: Json;
2435
+ };
2436
+ upsert_user_profile: {
2437
+ Args: never;
2438
+ Returns: {
2439
+ profile_display_name: string;
2440
+ profile_email: string;
2441
+ profile_id: string;
2442
+ profile_workos_user_id: string;
2443
+ }[];
2444
+ };
2445
+ };
2446
+ Enums: {
2447
+ [_ in never]: never;
2448
+ };
2449
+ CompositeTypes: {
2450
+ [_ in never]: never;
2451
+ };
2452
+ };
2453
+ };
2454
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
2455
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
2456
+ type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
2457
+ schema: keyof DatabaseWithoutInternals;
2458
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
2459
+ schema: keyof DatabaseWithoutInternals;
2460
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
2461
+ schema: keyof DatabaseWithoutInternals;
2462
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
2463
+ Row: infer R;
2464
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
2465
+ Row: infer R;
2466
+ } ? R : never : never;
2467
+
2468
+ type SupabaseUserProfile = Tables<'users'>;
2469
+
263
2470
  /**
264
2471
  * Action configuration for HITL tasks
265
2472
  * Defines available user actions and their behavior
@@ -525,6 +2732,108 @@ interface SessionDTO {
525
2732
  endedAt?: Date | null;
526
2733
  }
527
2734
 
2735
+ /**
2736
+ * Multi-tenancy configuration types
2737
+ *
2738
+ * Config is stored in dedicated `config` columns (NOT nested in metadata):
2739
+ * - organizations.config: Org-level feature config
2740
+ * - org_memberships.config: Per-user-per-org feature overrides
2741
+ * - users.config: User-global config (training)
2742
+ */
2743
+ /**
2744
+ * Valid course groups (matches Category type from training)
2745
+ */
2746
+ type CourseGroup = 'foundation' | 'sales' | 'technical';
2747
+ /**
2748
+ * Org-level feature config (stored in organizations.config)
2749
+ * Controls which features are available to all org members
2750
+ * Valid feature keys: operations, monitoring, acquisition, calibration, seo
2751
+ */
2752
+ interface OrgFeatureConfig {
2753
+ features?: {
2754
+ operations?: boolean;
2755
+ monitoring?: boolean;
2756
+ acquisition?: boolean;
2757
+ calibration?: boolean;
2758
+ seo?: boolean;
2759
+ };
2760
+ training?: {
2761
+ allowed_course_groups?: CourseGroup[];
2762
+ };
2763
+ }
2764
+ /**
2765
+ * Per-user-per-org config (stored in org_memberships.config)
2766
+ * Overrides org-level feature config for specific users
2767
+ */
2768
+ type MembershipFeatureConfig = OrgFeatureConfig;
2769
+ /**
2770
+ * User-global config (stored in users.config)
2771
+ * Training and theme are user-specific, NOT org-specific
2772
+ */
2773
+ interface UserConfig {
2774
+ training?: {
2775
+ enabled?: boolean;
2776
+ allowed_courses?: string[];
2777
+ allowed_course_groups?: CourseGroup[];
2778
+ };
2779
+ theme?: {
2780
+ preset?: 'default' | 'tactical' | 'regal' | 'cyber-volt' | 'aurora' | 'rose-gold' | 'midnight' | 'ember' | 'obsidian' | 'honey' | 'abyss' | 'canopy' | 'slate' | 'cyber-strike' | 'cyber-flux' | 'cyber-void';
2781
+ colorScheme?: 'light' | 'dark' | 'auto';
2782
+ };
2783
+ onboarding?: {
2784
+ completed?: boolean;
2785
+ completedAt?: string;
2786
+ role?: string;
2787
+ primaryUseCase?: string[];
2788
+ experienceLevel?: string;
2789
+ /** Onboarding guide system state (set by checklist/tour system) */
2790
+ guides?: {
2791
+ completedIds?: string[];
2792
+ dismissed?: boolean;
2793
+ completedAt?: string;
2794
+ };
2795
+ };
2796
+ }
2797
+
2798
+ /**
2799
+ * Organization Membership types based on WorkOS API
2800
+ */
2801
+ interface OrganizationMembership {
2802
+ object: 'organization_membership';
2803
+ id: string;
2804
+ userId: string;
2805
+ organizationId: string;
2806
+ role: {
2807
+ slug: string;
2808
+ };
2809
+ status: 'active' | 'inactive';
2810
+ createdAt: string;
2811
+ updatedAt: string;
2812
+ }
2813
+ /**
2814
+ * Extended membership with user and organization details for UI
2815
+ */
2816
+ interface MembershipWithDetails extends OrganizationMembership {
2817
+ user?: {
2818
+ id: string;
2819
+ email: string;
2820
+ firstName?: string;
2821
+ lastName?: string;
2822
+ profilePictureUrl?: string;
2823
+ };
2824
+ organization?: {
2825
+ id: string;
2826
+ name: string;
2827
+ workos_org_id: string;
2828
+ primaryDomain?: string;
2829
+ is_test?: boolean;
2830
+ status?: string;
2831
+ metadata?: Record<string, unknown>;
2832
+ config?: OrgFeatureConfig;
2833
+ };
2834
+ config?: MembershipFeatureConfig;
2835
+ }
2836
+
528
2837
  /**
529
2838
  * Time range selector for dashboard metrics
530
2839
  */
@@ -1537,6 +3846,43 @@ declare function useMarkAllAsRead(): _tanstack_react_query.UseMutationResult<voi
1537
3846
  */
1538
3847
  declare function useNotificationCount(): _tanstack_react_query.UseQueryResult<number, Error>;
1539
3848
 
3849
+ /**
3850
+ * Hook that provides a standardized error notification handler
3851
+ * for use in React Query mutation hooks.
3852
+ *
3853
+ * Delegates to the active NotificationAdapter so it works in any
3854
+ * consumer (Mantine, Sonner, console fallback, etc.)
3855
+ *
3856
+ * @example
3857
+ * ```typescript
3858
+ * const mutation = useMutation({
3859
+ * mutationFn: deleteApiKey,
3860
+ * onError: useErrorNotification()
3861
+ * })
3862
+ * ```
3863
+ */
3864
+ declare function useErrorNotification(): (error: unknown) => void;
3865
+
3866
+ /**
3867
+ * Hook that provides a standardized success notification handler.
3868
+ * Delegates to the active NotificationAdapter.
3869
+ */
3870
+ declare function useSuccessNotification(): (title: string, message: string) => void;
3871
+
3872
+ /**
3873
+ * Hook that provides a standardized warning notification handler.
3874
+ * Delegates to the active NotificationAdapter.
3875
+ */
3876
+ declare function useWarningNotification(): (title: string, message: string) => void;
3877
+
3878
+ /**
3879
+ * Generic batch delete hook. Deletes multiple rows from a Supabase table by ID.
3880
+ *
3881
+ * @param tableName - Supabase table name (e.g. 'acq_social_posts')
3882
+ * @param invalidateQueryKeys - Array of query key prefixes to invalidate on success
3883
+ */
3884
+ declare function useBatchDelete(tableName: string, invalidateQueryKeys: readonly (readonly unknown[])[]): _tanstack_react_query.UseMutationResult<void, Error, string[], unknown>;
3885
+
1540
3886
  /**
1541
3887
  * Query key factories for observability hooks.
1542
3888
  * Scoped by organizationId for cache isolation between tenants.
@@ -1923,5 +4269,286 @@ declare class OperationsService {
1923
4269
  archiveSession(sessionId: string): Promise<void>;
1924
4270
  }
1925
4271
 
1926
- export { OperationsService, executionsKeys, observabilityKeys, scheduleKeys, useActivities, useActivityTrend, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCommandQueue, useCommandQueueTotals, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useDeleteTask, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutions, useGetExecutionHistory, useGetSchedule, useListSchedules, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, usePatchTask, usePauseSchedule, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useSubmitAction, useTopFailingResources, useUnresolveError, useUpdateAnchor, useUpdateSchedule };
1927
- export type { ActivityTrendResponse, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CancelExecutionParams, CancelExecutionResult, CostBreakdownItem, CreateScheduleInput, CreateSessionResponse, DeleteExecutionParams, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsPageResponse, FailingResource, ListActivitiesResponse, ListSchedulesFilters, ListSchedulesResponse, ResourcesResponse, RetryExecutionParams, SessionListItem, SubmitActionRequest, SubmitActionResponse, TaskSchedule, TopFailingResourcesParams, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseExecutionHealthParams, UseExecutionLogsParams };
4272
+ /**
4273
+ * Shared hook for pagination state management.
4274
+ * Encapsulates page state, offset calculation, and reset-on-filter-change.
4275
+ *
4276
+ * @param pageSize - Number of items per page
4277
+ * @param resetDeps - When any dependency changes, page resets to 1. Omit to disable auto-reset.
4278
+ * @param total - When provided, automatically retreats to the last valid page if the current page becomes empty (e.g., after bulk deletion).
4279
+ */
4280
+ declare function usePaginationState(pageSize: number, resetDeps?: unknown[], total?: number): {
4281
+ page: number;
4282
+ setPage: react.Dispatch<react.SetStateAction<number>>;
4283
+ offset: number;
4284
+ totalPages: (total: number) => number;
4285
+ };
4286
+
4287
+ /**
4288
+ * Generic table row selection hook.
4289
+ * Tracks selected IDs, provides toggle/toggleAll/clear, and computes selection state.
4290
+ *
4291
+ * @param items - Current page items (must have `id: string`)
4292
+ * @param allItems - All items across all pages (for "select all" to work across pages). Defaults to `items`.
4293
+ */
4294
+ declare function useTableSelection<T extends {
4295
+ id: string;
4296
+ }>(items: T[], allItems?: T[]): {
4297
+ selectedIds: Set<string>;
4298
+ toggle: (id: string) => void;
4299
+ togglePage: () => void;
4300
+ clear: () => void;
4301
+ isPageAllSelected: boolean;
4302
+ isPagePartiallySelected: boolean;
4303
+ selectedCount: number;
4304
+ isSelected: (id: string) => boolean;
4305
+ };
4306
+
4307
+ type SortDirection = 'asc' | 'desc';
4308
+ interface SortState {
4309
+ column: string;
4310
+ direction: SortDirection;
4311
+ }
4312
+ /**
4313
+ * Generic table sorting hook.
4314
+ * Manages sort column + direction, and provides a sort utility for client-side data.
4315
+ */
4316
+ declare function useTableSort(defaultColumn: string, defaultDirection?: SortDirection): {
4317
+ sort: SortState;
4318
+ toggleSort: (column: string) => void;
4319
+ };
4320
+ /**
4321
+ * Sort an array of items by a column using accessor functions.
4322
+ *
4323
+ * @param data - Array to sort (not mutated)
4324
+ * @param sort - Current sort state
4325
+ * @param accessors - Map of column name → accessor function
4326
+ */
4327
+ declare function sortData<T>(data: T[], sort: SortState, accessors: Record<string, (item: T) => string | number | boolean | null | undefined>): T[];
4328
+ /**
4329
+ * Hook that combines useTableSort with memoized sortData.
4330
+ * Returns the sort state, toggle function, and a memoized sort function.
4331
+ */
4332
+ declare function useSortedData<T>(data: T[], defaultColumn: string, accessors: Record<string, (item: T) => string | number | boolean | null | undefined>, defaultDirection?: SortDirection): {
4333
+ sorted: T[];
4334
+ sort: SortState;
4335
+ toggleSort: (column: string) => void;
4336
+ };
4337
+
4338
+ interface InitializationError {
4339
+ layer: 'auth' | 'profile' | 'organization';
4340
+ message: string;
4341
+ originalError?: Error;
4342
+ }
4343
+ interface AppInitializationState {
4344
+ userReady: boolean;
4345
+ organizationReady: boolean;
4346
+ allReady: boolean;
4347
+ isInitializing: boolean;
4348
+ error: InitializationError | null;
4349
+ retry: () => void;
4350
+ profile: SupabaseUserProfile | null;
4351
+ }
4352
+
4353
+ /**
4354
+ * The value exposed by OrganizationProvider to all consumers.
4355
+ */
4356
+ interface OrganizationContextValue {
4357
+ /** WorkOS organization ID of the currently selected organization. */
4358
+ currentWorkOSOrganizationId: string | null;
4359
+ /** Supabase (UUID) organization ID of the currently selected organization. */
4360
+ currentSupabaseOrganizationId: string | null;
4361
+ /** Full membership record for the currently selected organization. */
4362
+ currentMembership: MembershipWithDetails | null;
4363
+ /** All memberships for the authenticated user. */
4364
+ memberships: MembershipWithDetails[];
4365
+ /** True while the initial membership list is being fetched. */
4366
+ isInitializing: boolean;
4367
+ /** True while a subsequent org switch / refresh is in flight. */
4368
+ isOrgRefreshing: boolean;
4369
+ /** Error message if the membership fetch or org switch failed. */
4370
+ error: string | null;
4371
+ /**
4372
+ * Switch the active organization.
4373
+ *
4374
+ * Persists the selection to `last_visited_org` on the user profile and
4375
+ * invalidates all org-scoped TanStack Query cache entries.
4376
+ *
4377
+ * @param workosOrgId - WorkOS organization ID to switch to.
4378
+ */
4379
+ switchOrganization: (workosOrgId: string) => void;
4380
+ /**
4381
+ * Re-fetch memberships and retry org selection after an error.
4382
+ */
4383
+ retry: () => Promise<void>;
4384
+ }
4385
+
4386
+ type RestrictionSource = 'org' | 'membership' | null;
4387
+ interface FeatureAccessResult {
4388
+ allowed: boolean;
4389
+ restrictedBy: RestrictionSource;
4390
+ }
4391
+ /**
4392
+ * Factory that creates a `useFeatureAccess` hook scoped to the consumer's
4393
+ * feature configuration.
4394
+ *
4395
+ * @param useInitialization - Initialization hook providing `profile` and `organizationReady`
4396
+ * @param useOrganization - Organization hook providing `currentMembership`
4397
+ * @param optInFeatures - Feature keys that are disabled by default (must be explicitly enabled)
4398
+ * @param getCoursesByGroup - Resolver that maps a course group name to its course slugs
4399
+ *
4400
+ * @example
4401
+ * ```typescript
4402
+ * // In your app's feature-access module
4403
+ * import { createUseFeatureAccess } from '@repo/ui/hooks'
4404
+ * import { useInitialization } from '@repo/ui/initialization'
4405
+ * import { useOrganization } from '@repo/ui/organization'
4406
+ * import { getCoursesByGroup } from './training/registry'
4407
+ *
4408
+ * export const useFeatureAccess = createUseFeatureAccess({
4409
+ * useInitialization,
4410
+ * useOrganization,
4411
+ * optInFeatures: ['acquisition', 'calibration'],
4412
+ * getCoursesByGroup,
4413
+ * })
4414
+ * ```
4415
+ */
4416
+ declare function createUseFeatureAccess({ useInitialization, useOrganization, optInFeatures, getCoursesByGroup }: {
4417
+ useInitialization: () => Pick<AppInitializationState, 'profile' | 'organizationReady'>;
4418
+ useOrganization: () => Pick<OrganizationContextValue, 'currentMembership'>;
4419
+ optInFeatures?: string[];
4420
+ getCoursesByGroup?: (group: CourseGroup) => string[];
4421
+ }): () => {
4422
+ orgConfig: OrgFeatureConfig | undefined;
4423
+ membershipConfig: OrgFeatureConfig | undefined;
4424
+ userConfig: UserConfig | undefined;
4425
+ hasFeature: (featureKey: string) => boolean;
4426
+ checkFeature: (featureKey: string) => FeatureAccessResult;
4427
+ hasTrainingAccess: () => boolean;
4428
+ getAllowedCourses: () => string[] | null;
4429
+ getResolvedCourseAccess: () => string[] | null;
4430
+ hasAccessToCourse: (courseSlug: string) => boolean;
4431
+ getEnabledGroups: () => CourseGroup[];
4432
+ isReady: boolean;
4433
+ };
4434
+
4435
+ interface EventSourceMessage {
4436
+ id: string;
4437
+ event: string;
4438
+ data: string;
4439
+ retry?: number;
4440
+ }
4441
+
4442
+ interface FetchEventSourceWithTokenRefreshOptions {
4443
+ url: string;
4444
+ getToken: () => Promise<string | undefined>;
4445
+ headers?: Record<string, string>;
4446
+ signal: AbortSignal;
4447
+ /** Delay in ms before reconnecting after token refresh. Defaults to 2000. */
4448
+ tokenRefreshDelayMs?: number;
4449
+ onopen?: (response: Response) => void | Promise<void>;
4450
+ onmessage?: (event: EventSourceMessage) => void;
4451
+ onerror?: (error: unknown) => void;
4452
+ onclose?: () => void;
4453
+ }
4454
+
4455
+ interface SSEConnectionManagerOptions {
4456
+ /** Grace period in ms before closing idle connections. Defaults to 5000. */
4457
+ closeGracePeriodMs?: number;
4458
+ }
4459
+ /**
4460
+ * SSE Connection Manager
4461
+ *
4462
+ * Ensures only ONE SSE connection exists per endpoint, preventing duplicate
4463
+ * connections when components re-render or remount.
4464
+ *
4465
+ * Benefits:
4466
+ * - Prevents resource waste from duplicate connections
4467
+ * - Eliminates race conditions from overlapping connections
4468
+ * - Automatically manages connection lifecycle
4469
+ * - Shares single connection across multiple subscribers
4470
+ */
4471
+ declare class SSEConnectionManager {
4472
+ private connections;
4473
+ private closeGracePeriodMs;
4474
+ constructor(options?: SSEConnectionManagerOptions);
4475
+ /**
4476
+ * Subscribe to an SSE endpoint
4477
+ *
4478
+ * If a connection already exists for this endpoint, reuses it.
4479
+ * Otherwise, creates a new connection.
4480
+ *
4481
+ * @param key - Unique identifier for the connection (e.g., 'notifications', 'resource-executive-agent')
4482
+ * @param subscriberId - Unique identifier for this subscriber (usually component instance)
4483
+ * @param options - SSE connection options
4484
+ * @returns Unsubscribe function to call when component unmounts
4485
+ */
4486
+ subscribe(key: string, subscriberId: string, options: Omit<FetchEventSourceWithTokenRefreshOptions, 'signal'>): () => void;
4487
+ /**
4488
+ * Unsubscribe from an SSE endpoint
4489
+ *
4490
+ * If this is the last subscriber, closes the connection after grace period.
4491
+ */
4492
+ private unsubscribe;
4493
+ /**
4494
+ * Force close a connection and all its subscribers
4495
+ */
4496
+ closeConnection(key: string): void;
4497
+ /**
4498
+ * Get current connection status
4499
+ */
4500
+ getConnectionInfo(): Map<string, {
4501
+ url: string;
4502
+ subscribers: number;
4503
+ }>;
4504
+ }
4505
+
4506
+ interface UseSSEConnectionOptions {
4507
+ manager: SSEConnectionManager;
4508
+ /** Shared connection key — all subscribers with the same key share ONE connection. */
4509
+ connectionKey: string;
4510
+ url: string;
4511
+ /** When false the subscription is skipped. Defaults to true. */
4512
+ enabled?: boolean;
4513
+ headers?: Record<string, string>;
4514
+ /** Called for each non-empty SSE message with the raw `event.data` string. */
4515
+ onmessage: (data: string) => void;
4516
+ /**
4517
+ * Called when the connection opens. Return a non-empty string to set it as
4518
+ * the error state (e.g. `response.status === 403 ? 'Access denied' : undefined`).
4519
+ */
4520
+ onopen?: (response: Response) => string | void;
4521
+ onerror?: (err: Error) => void;
4522
+ onclose?: () => void;
4523
+ }
4524
+ /**
4525
+ * Generic SSE subscription hook.
4526
+ *
4527
+ * Handles token refresh, connection state, subscriber ID generation, and
4528
+ * subscribe/cleanup lifecycle via the shared SSEConnectionManager.
4529
+ *
4530
+ * Domain-specific event parsing (e.g. `ExecutionSSEEvent`) stays in the
4531
+ * caller's `onmessage` handler.
4532
+ *
4533
+ * @example
4534
+ * ```typescript
4535
+ * const { connected, error } = useSSEConnection({
4536
+ * manager: sseConnectionManager,
4537
+ * connectionKey: `resource-${resourceId}`,
4538
+ * url: `${API_URL}/api/execution-engine/sse/${resourceId}`,
4539
+ * enabled: isOrganizationReady,
4540
+ * headers: { [HTTP_HEADERS.WORKOS_ORGANIZATION_ID]: orgId },
4541
+ * onmessage: (data) => {
4542
+ * const event = JSON.parse(data)
4543
+ * // handle domain-specific event
4544
+ * },
4545
+ * })
4546
+ * ```
4547
+ */
4548
+ declare function useSSEConnection({ manager, connectionKey, url, enabled, headers, onmessage, onopen, onerror, onclose }: UseSSEConnectionOptions): {
4549
+ connected: boolean;
4550
+ error: string | null;
4551
+ };
4552
+
4553
+ export { OperationsService, createUseFeatureAccess, executionsKeys, observabilityKeys, scheduleKeys, sortData, useActivities, useActivityTrend, useBatchDelete, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCommandQueue, useCommandQueueTotals, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useDeleteTask, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogs, useExecutions, useGetExecutionHistory, useGetSchedule, useListSchedules, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, usePaginationState, usePatchTask, usePauseSchedule, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResources, useResumeSchedule, useRetryExecution, useSSEConnection, useSortedData, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTopFailingResources, useUnresolveError, useUpdateAnchor, useUpdateSchedule, useWarningNotification };
4554
+ export type { ActivityTrendResponse, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CancelExecutionParams, CancelExecutionResult, CostBreakdownItem, CreateScheduleInput, CreateSessionResponse, DeleteExecutionParams, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsPageResponse, FailingResource, ListActivitiesResponse, ListSchedulesFilters, ListSchedulesResponse, ResourcesResponse, RetryExecutionParams, SessionListItem, SortDirection, SortState, SubmitActionRequest, SubmitActionResponse, TaskSchedule, TopFailingResourcesParams, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseExecutionHealthParams, UseExecutionLogsParams, UseSSEConnectionOptions };