@elevasis/ui 2.21.0 → 2.23.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 (81) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/{chunk-DMYELNGA.js → chunk-3HEUGBOT.js} +1 -1
  3. package/dist/{chunk-EGKNRM6P.js → chunk-7PGEGSUM.js} +2 -2
  4. package/dist/{chunk-KVW56ERD.js → chunk-AXXTN44Z.js} +5 -3
  5. package/dist/{chunk-I5WRKH25.js → chunk-D3KQAABP.js} +1 -1
  6. package/dist/{chunk-S7RL77QS.js → chunk-DDZOHLHB.js} +1 -1
  7. package/dist/{chunk-EDX6WIN3.js → chunk-EPV7NU2E.js} +24 -10
  8. package/dist/{chunk-ATEHYDL3.js → chunk-FXWETLEB.js} +6 -2
  9. package/dist/{chunk-7GG6OSD7.js → chunk-GUJUK6EH.js} +2830 -2381
  10. package/dist/{chunk-GBMNCNHX.js → chunk-KVJ3LFH2.js} +3 -1
  11. package/dist/{chunk-VQESMHQV.js → chunk-LJWV4TWV.js} +1 -2
  12. package/dist/{chunk-BJWIKEQG.js → chunk-N6WLOWOD.js} +6 -14
  13. package/dist/{chunk-XLZZOFGM.js → chunk-PTUOINQ2.js} +275 -76
  14. package/dist/{chunk-CZK67OHH.js → chunk-PXGSJNBH.js} +3 -3
  15. package/dist/{chunk-TIIPYB2Z.js → chunk-QZJM3RYI.js} +1 -1
  16. package/dist/{chunk-7YQKVWSD.js → chunk-SQ5JGELM.js} +25 -5
  17. package/dist/{chunk-RX4UWZZR.js → chunk-TKAYX2SP.js} +8 -3
  18. package/dist/{chunk-Q5HC6ENG.js → chunk-XOTJNW4Q.js} +1 -1
  19. package/dist/{chunk-LQU62KHD.js → chunk-YU6MBDVO.js} +1993 -870
  20. package/dist/{chunk-ULZ2B3NC.js → chunk-ZBCTB5CA.js} +1 -1
  21. package/dist/components/index.css +85 -85
  22. package/dist/components/index.d.ts +1651 -1388
  23. package/dist/components/index.js +253 -40
  24. package/dist/components/navigation/index.css +589 -0
  25. package/dist/components/navigation/index.js +3 -3
  26. package/dist/features/auth/index.css +2 -2
  27. package/dist/features/auth/index.d.ts +188 -10
  28. package/dist/features/crm/index.css +2 -2
  29. package/dist/features/crm/index.d.ts +193 -10
  30. package/dist/features/crm/index.js +10 -10
  31. package/dist/features/dashboard/index.css +2 -2
  32. package/dist/features/dashboard/index.js +9 -9
  33. package/dist/features/delivery/index.css +85 -85
  34. package/dist/features/delivery/index.d.ts +193 -10
  35. package/dist/features/delivery/index.js +10 -10
  36. package/dist/features/lead-gen/index.css +2 -2
  37. package/dist/features/lead-gen/index.d.ts +5 -0
  38. package/dist/features/lead-gen/index.js +10 -10
  39. package/dist/features/monitoring/index.css +85 -85
  40. package/dist/features/monitoring/index.d.ts +6 -1
  41. package/dist/features/monitoring/index.js +11 -11
  42. package/dist/features/monitoring/requests/index.css +2 -2
  43. package/dist/features/monitoring/requests/index.d.ts +5 -0
  44. package/dist/features/monitoring/requests/index.js +9 -9
  45. package/dist/features/operations/index.css +2 -2
  46. package/dist/features/operations/index.d.ts +7 -4
  47. package/dist/features/operations/index.js +12 -12
  48. package/dist/features/seo/index.d.ts +5 -0
  49. package/dist/features/settings/index.css +2 -2
  50. package/dist/features/settings/index.d.ts +214 -16
  51. package/dist/features/settings/index.js +11 -11
  52. package/dist/graph/index.css +2 -2
  53. package/dist/hooks/delivery/index.css +2 -2
  54. package/dist/hooks/delivery/index.d.ts +188 -10
  55. package/dist/hooks/index.css +85 -85
  56. package/dist/hooks/index.d.ts +1843 -1538
  57. package/dist/hooks/index.js +8 -8
  58. package/dist/hooks/published.css +85 -85
  59. package/dist/hooks/published.d.ts +1843 -1538
  60. package/dist/hooks/published.js +8 -8
  61. package/dist/index.css +12 -12
  62. package/dist/index.d.ts +346 -35
  63. package/dist/index.js +9 -9
  64. package/dist/initialization/index.d.ts +188 -10
  65. package/dist/layout/index.js +2 -2
  66. package/dist/organization/index.css +589 -0
  67. package/dist/organization/index.js +1 -1
  68. package/dist/profile/index.d.ts +188 -10
  69. package/dist/provider/index.css +384 -0
  70. package/dist/provider/index.d.ts +6 -0
  71. package/dist/provider/index.js +7 -7
  72. package/dist/provider/published.css +463 -0
  73. package/dist/provider/published.d.ts +6 -0
  74. package/dist/provider/published.js +4 -4
  75. package/dist/supabase/index.d.ts +367 -20
  76. package/dist/test-utils/index.d.ts +46 -2
  77. package/dist/test-utils/index.js +102 -1
  78. package/dist/theme/index.js +2 -2
  79. package/dist/types/index.d.ts +199 -13
  80. package/package.json +4 -4
  81. /package/dist/{chunk-6GUW5GGF.js → chunk-6Z3G4U2R.js} +0 -0
@@ -409,7 +409,6 @@ type Database = {
409
409
  acq_deals: {
410
410
  Row: {
411
411
  activity_log: Json;
412
- cached_stage: string | null;
413
412
  closed_lost_at: string | null;
414
413
  closed_lost_reason: string | null;
415
414
  contact_email: string;
@@ -424,6 +423,7 @@ type Database = {
424
423
  organization_id: string;
425
424
  payment_link_sent_at: string | null;
426
425
  payment_received_at: string | null;
426
+ pipeline_key: string;
427
427
  proposal_data: Json | null;
428
428
  proposal_generated_at: string | null;
429
429
  proposal_pdf_url: string | null;
@@ -431,10 +431,11 @@ type Database = {
431
431
  proposal_reviewed_by: string | null;
432
432
  proposal_sent_at: string | null;
433
433
  proposal_signed_at: string | null;
434
- proposal_status: string | null;
435
434
  signature_envelope_id: string | null;
436
435
  source_list_id: string | null;
437
436
  source_type: string | null;
437
+ stage_key: string | null;
438
+ state_key: string | null;
438
439
  stripe_payment_id: string | null;
439
440
  stripe_payment_link: string | null;
440
441
  stripe_payment_link_id: string | null;
@@ -443,7 +444,6 @@ type Database = {
443
444
  };
444
445
  Insert: {
445
446
  activity_log?: Json;
446
- cached_stage?: string | null;
447
447
  closed_lost_at?: string | null;
448
448
  closed_lost_reason?: string | null;
449
449
  contact_email: string;
@@ -458,6 +458,7 @@ type Database = {
458
458
  organization_id: string;
459
459
  payment_link_sent_at?: string | null;
460
460
  payment_received_at?: string | null;
461
+ pipeline_key?: string;
461
462
  proposal_data?: Json | null;
462
463
  proposal_generated_at?: string | null;
463
464
  proposal_pdf_url?: string | null;
@@ -465,10 +466,11 @@ type Database = {
465
466
  proposal_reviewed_by?: string | null;
466
467
  proposal_sent_at?: string | null;
467
468
  proposal_signed_at?: string | null;
468
- proposal_status?: string | null;
469
469
  signature_envelope_id?: string | null;
470
470
  source_list_id?: string | null;
471
471
  source_type?: string | null;
472
+ stage_key?: string | null;
473
+ state_key?: string | null;
472
474
  stripe_payment_id?: string | null;
473
475
  stripe_payment_link?: string | null;
474
476
  stripe_payment_link_id?: string | null;
@@ -477,7 +479,6 @@ type Database = {
477
479
  };
478
480
  Update: {
479
481
  activity_log?: Json;
480
- cached_stage?: string | null;
481
482
  closed_lost_at?: string | null;
482
483
  closed_lost_reason?: string | null;
483
484
  contact_email?: string;
@@ -492,6 +493,7 @@ type Database = {
492
493
  organization_id?: string;
493
494
  payment_link_sent_at?: string | null;
494
495
  payment_received_at?: string | null;
496
+ pipeline_key?: string;
495
497
  proposal_data?: Json | null;
496
498
  proposal_generated_at?: string | null;
497
499
  proposal_pdf_url?: string | null;
@@ -499,10 +501,11 @@ type Database = {
499
501
  proposal_reviewed_by?: string | null;
500
502
  proposal_sent_at?: string | null;
501
503
  proposal_signed_at?: string | null;
502
- proposal_status?: string | null;
503
504
  signature_envelope_id?: string | null;
504
505
  source_list_id?: string | null;
505
506
  source_type?: string | null;
507
+ stage_key?: string | null;
508
+ state_key?: string | null;
506
509
  stripe_payment_id?: string | null;
507
510
  stripe_payment_link?: string | null;
508
511
  stripe_payment_link_id?: string | null;
@@ -1671,6 +1674,7 @@ type Database = {
1671
1674
  Row: {
1672
1675
  config: Json;
1673
1676
  created_at: string | null;
1677
+ effective_permissions: string[];
1674
1678
  id: string;
1675
1679
  membership_status: string | null;
1676
1680
  organization_id: string;
@@ -1682,6 +1686,7 @@ type Database = {
1682
1686
  Insert: {
1683
1687
  config?: Json;
1684
1688
  created_at?: string | null;
1689
+ effective_permissions?: string[];
1685
1690
  id?: string;
1686
1691
  membership_status?: string | null;
1687
1692
  organization_id: string;
@@ -1693,6 +1698,7 @@ type Database = {
1693
1698
  Update: {
1694
1699
  config?: Json;
1695
1700
  created_at?: string | null;
1701
+ effective_permissions?: string[];
1696
1702
  id?: string;
1697
1703
  membership_status?: string | null;
1698
1704
  organization_id?: string;
@@ -1718,6 +1724,147 @@ type Database = {
1718
1724
  }
1719
1725
  ];
1720
1726
  };
1727
+ org_rol_assignments: {
1728
+ Row: {
1729
+ granted_at: string;
1730
+ granted_by: string | null;
1731
+ membership_id: string;
1732
+ role_id: string;
1733
+ };
1734
+ Insert: {
1735
+ granted_at?: string;
1736
+ granted_by?: string | null;
1737
+ membership_id: string;
1738
+ role_id: string;
1739
+ };
1740
+ Update: {
1741
+ granted_at?: string;
1742
+ granted_by?: string | null;
1743
+ membership_id?: string;
1744
+ role_id?: string;
1745
+ };
1746
+ Relationships: [
1747
+ {
1748
+ foreignKeyName: "org_rol_assignments_granted_by_fkey";
1749
+ columns: ["granted_by"];
1750
+ isOneToOne: false;
1751
+ referencedRelation: "users";
1752
+ referencedColumns: ["id"];
1753
+ },
1754
+ {
1755
+ foreignKeyName: "org_rol_assignments_membership_id_fkey";
1756
+ columns: ["membership_id"];
1757
+ isOneToOne: false;
1758
+ referencedRelation: "org_memberships";
1759
+ referencedColumns: ["id"];
1760
+ },
1761
+ {
1762
+ foreignKeyName: "org_rol_assignments_role_id_fkey";
1763
+ columns: ["role_id"];
1764
+ isOneToOne: false;
1765
+ referencedRelation: "org_rol_definitions";
1766
+ referencedColumns: ["id"];
1767
+ }
1768
+ ];
1769
+ };
1770
+ org_rol_definitions: {
1771
+ Row: {
1772
+ created_at: string;
1773
+ description: string | null;
1774
+ id: string;
1775
+ is_system: boolean;
1776
+ name: string;
1777
+ organization_id: string | null;
1778
+ slug: string;
1779
+ updated_at: string;
1780
+ };
1781
+ Insert: {
1782
+ created_at?: string;
1783
+ description?: string | null;
1784
+ id?: string;
1785
+ is_system?: boolean;
1786
+ name: string;
1787
+ organization_id?: string | null;
1788
+ slug: string;
1789
+ updated_at?: string;
1790
+ };
1791
+ Update: {
1792
+ created_at?: string;
1793
+ description?: string | null;
1794
+ id?: string;
1795
+ is_system?: boolean;
1796
+ name?: string;
1797
+ organization_id?: string | null;
1798
+ slug?: string;
1799
+ updated_at?: string;
1800
+ };
1801
+ Relationships: [
1802
+ {
1803
+ foreignKeyName: "org_rol_definitions_organization_id_fkey";
1804
+ columns: ["organization_id"];
1805
+ isOneToOne: false;
1806
+ referencedRelation: "organizations";
1807
+ referencedColumns: ["id"];
1808
+ }
1809
+ ];
1810
+ };
1811
+ org_rol_grants: {
1812
+ Row: {
1813
+ granted_at: string;
1814
+ permission_key: string;
1815
+ role_id: string;
1816
+ };
1817
+ Insert: {
1818
+ granted_at?: string;
1819
+ permission_key: string;
1820
+ role_id: string;
1821
+ };
1822
+ Update: {
1823
+ granted_at?: string;
1824
+ permission_key?: string;
1825
+ role_id?: string;
1826
+ };
1827
+ Relationships: [
1828
+ {
1829
+ foreignKeyName: "org_rol_grants_permission_key_fkey";
1830
+ columns: ["permission_key"];
1831
+ isOneToOne: false;
1832
+ referencedRelation: "org_rol_permissions";
1833
+ referencedColumns: ["key"];
1834
+ },
1835
+ {
1836
+ foreignKeyName: "org_rol_grants_role_id_fkey";
1837
+ columns: ["role_id"];
1838
+ isOneToOne: false;
1839
+ referencedRelation: "org_rol_definitions";
1840
+ referencedColumns: ["id"];
1841
+ }
1842
+ ];
1843
+ };
1844
+ org_rol_permissions: {
1845
+ Row: {
1846
+ created_at: string;
1847
+ description: string;
1848
+ is_org_grantable: boolean;
1849
+ key: string;
1850
+ updated_at: string;
1851
+ };
1852
+ Insert: {
1853
+ created_at?: string;
1854
+ description: string;
1855
+ is_org_grantable?: boolean;
1856
+ key: string;
1857
+ updated_at?: string;
1858
+ };
1859
+ Update: {
1860
+ created_at?: string;
1861
+ description?: string;
1862
+ is_org_grantable?: boolean;
1863
+ key?: string;
1864
+ updated_at?: string;
1865
+ };
1866
+ Relationships: [];
1867
+ };
1721
1868
  organizations: {
1722
1869
  Row: {
1723
1870
  config: Json;
@@ -2475,7 +2622,8 @@ type Database = {
2475
2622
  created_at: string;
2476
2623
  description: string | null;
2477
2624
  id: string;
2478
- key: string;
2625
+ key_hash: string;
2626
+ key_prefix: string | null;
2479
2627
  last_triggered_at: string | null;
2480
2628
  name: string;
2481
2629
  organization_id: string;
@@ -2488,7 +2636,8 @@ type Database = {
2488
2636
  created_at?: string;
2489
2637
  description?: string | null;
2490
2638
  id?: string;
2491
- key: string;
2639
+ key_hash: string;
2640
+ key_prefix?: string | null;
2492
2641
  last_triggered_at?: string | null;
2493
2642
  name: string;
2494
2643
  organization_id: string;
@@ -2501,7 +2650,8 @@ type Database = {
2501
2650
  created_at?: string;
2502
2651
  description?: string | null;
2503
2652
  id?: string;
2504
- key?: string;
2653
+ key_hash?: string;
2654
+ key_prefix?: string | null;
2505
2655
  last_triggered_at?: string | null;
2506
2656
  name?: string;
2507
2657
  organization_id?: string;
@@ -2547,6 +2697,13 @@ type Database = {
2547
2697
  Args: never;
2548
2698
  Returns: string;
2549
2699
  };
2700
+ can_assign_role_in_org: {
2701
+ Args: {
2702
+ p_role_id: string;
2703
+ p_target_membership_id: string;
2704
+ };
2705
+ Returns: boolean;
2706
+ };
2550
2707
  current_user_is_platform_admin: {
2551
2708
  Args: never;
2552
2709
  Returns: boolean;
@@ -2576,6 +2733,10 @@ type Database = {
2576
2733
  user_id: string;
2577
2734
  }[];
2578
2735
  };
2736
+ get_platform_credential_kek: {
2737
+ Args: never;
2738
+ Returns: string;
2739
+ };
2579
2740
  get_storage_org_id: {
2580
2741
  Args: {
2581
2742
  file_path: string;
@@ -2586,9 +2747,10 @@ type Database = {
2586
2747
  Args: never;
2587
2748
  Returns: string;
2588
2749
  };
2589
- is_org_admin: {
2750
+ has_org_permission: {
2590
2751
  Args: {
2591
2752
  org_id: string;
2753
+ perm_key: string;
2592
2754
  };
2593
2755
  Returns: boolean;
2594
2756
  };
@@ -2618,6 +2780,22 @@ type Database = {
2618
2780
  Args: never;
2619
2781
  Returns: Json;
2620
2782
  };
2783
+ recompute_all_memberships: {
2784
+ Args: never;
2785
+ Returns: undefined;
2786
+ };
2787
+ sync_all_memberships_with_role: {
2788
+ Args: {
2789
+ p_role_id: string;
2790
+ };
2791
+ Returns: undefined;
2792
+ };
2793
+ sync_one_membership: {
2794
+ Args: {
2795
+ p_membership_id: string;
2796
+ };
2797
+ Returns: undefined;
2798
+ };
2621
2799
  upsert_user_profile: {
2622
2800
  Args: never;
2623
2801
  Returns: {
@@ -3024,7 +3202,6 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3024
3202
  acq_deals: {
3025
3203
  Row: {
3026
3204
  activity_log: Json;
3027
- cached_stage: string | null;
3028
3205
  closed_lost_at: string | null;
3029
3206
  closed_lost_reason: string | null;
3030
3207
  contact_email: string;
@@ -3039,6 +3216,7 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3039
3216
  organization_id: string;
3040
3217
  payment_link_sent_at: string | null;
3041
3218
  payment_received_at: string | null;
3219
+ pipeline_key: string;
3042
3220
  proposal_data: Json | null;
3043
3221
  proposal_generated_at: string | null;
3044
3222
  proposal_pdf_url: string | null;
@@ -3046,10 +3224,11 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3046
3224
  proposal_reviewed_by: string | null;
3047
3225
  proposal_sent_at: string | null;
3048
3226
  proposal_signed_at: string | null;
3049
- proposal_status: string | null;
3050
3227
  signature_envelope_id: string | null;
3051
3228
  source_list_id: string | null;
3052
3229
  source_type: string | null;
3230
+ stage_key: string | null;
3231
+ state_key: string | null;
3053
3232
  stripe_payment_id: string | null;
3054
3233
  stripe_payment_link: string | null;
3055
3234
  stripe_payment_link_id: string | null;
@@ -3058,7 +3237,6 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3058
3237
  };
3059
3238
  Insert: {
3060
3239
  activity_log?: Json;
3061
- cached_stage?: string | null;
3062
3240
  closed_lost_at?: string | null;
3063
3241
  closed_lost_reason?: string | null;
3064
3242
  contact_email: string;
@@ -3073,6 +3251,7 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3073
3251
  organization_id: string;
3074
3252
  payment_link_sent_at?: string | null;
3075
3253
  payment_received_at?: string | null;
3254
+ pipeline_key?: string;
3076
3255
  proposal_data?: Json | null;
3077
3256
  proposal_generated_at?: string | null;
3078
3257
  proposal_pdf_url?: string | null;
@@ -3080,10 +3259,11 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3080
3259
  proposal_reviewed_by?: string | null;
3081
3260
  proposal_sent_at?: string | null;
3082
3261
  proposal_signed_at?: string | null;
3083
- proposal_status?: string | null;
3084
3262
  signature_envelope_id?: string | null;
3085
3263
  source_list_id?: string | null;
3086
3264
  source_type?: string | null;
3265
+ stage_key?: string | null;
3266
+ state_key?: string | null;
3087
3267
  stripe_payment_id?: string | null;
3088
3268
  stripe_payment_link?: string | null;
3089
3269
  stripe_payment_link_id?: string | null;
@@ -3092,7 +3272,6 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3092
3272
  };
3093
3273
  Update: {
3094
3274
  activity_log?: Json;
3095
- cached_stage?: string | null;
3096
3275
  closed_lost_at?: string | null;
3097
3276
  closed_lost_reason?: string | null;
3098
3277
  contact_email?: string;
@@ -3107,6 +3286,7 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3107
3286
  organization_id?: string;
3108
3287
  payment_link_sent_at?: string | null;
3109
3288
  payment_received_at?: string | null;
3289
+ pipeline_key?: string;
3110
3290
  proposal_data?: Json | null;
3111
3291
  proposal_generated_at?: string | null;
3112
3292
  proposal_pdf_url?: string | null;
@@ -3114,10 +3294,11 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
3114
3294
  proposal_reviewed_by?: string | null;
3115
3295
  proposal_sent_at?: string | null;
3116
3296
  proposal_signed_at?: string | null;
3117
- proposal_status?: string | null;
3118
3297
  signature_envelope_id?: string | null;
3119
3298
  source_list_id?: string | null;
3120
3299
  source_type?: string | null;
3300
+ stage_key?: string | null;
3301
+ state_key?: string | null;
3121
3302
  stripe_payment_id?: string | null;
3122
3303
  stripe_payment_link?: string | null;
3123
3304
  stripe_payment_link_id?: string | null;
@@ -4231,6 +4412,7 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
4231
4412
  Row: {
4232
4413
  config: Json;
4233
4414
  created_at: string | null;
4415
+ effective_permissions: string[];
4234
4416
  id: string;
4235
4417
  membership_status: string | null;
4236
4418
  organization_id: string;
@@ -4242,6 +4424,7 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
4242
4424
  Insert: {
4243
4425
  config?: Json;
4244
4426
  created_at?: string | null;
4427
+ effective_permissions?: string[];
4245
4428
  id?: string;
4246
4429
  membership_status?: string | null;
4247
4430
  organization_id: string;
@@ -4253,6 +4436,7 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
4253
4436
  Update: {
4254
4437
  config?: Json;
4255
4438
  created_at?: string | null;
4439
+ effective_permissions?: string[];
4256
4440
  id?: string;
4257
4441
  membership_status?: string | null;
4258
4442
  organization_id?: string;
@@ -4275,6 +4459,138 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
4275
4459
  referencedColumns: ["id"];
4276
4460
  }];
4277
4461
  };
4462
+ org_rol_assignments: {
4463
+ Row: {
4464
+ granted_at: string;
4465
+ granted_by: string | null;
4466
+ membership_id: string;
4467
+ role_id: string;
4468
+ };
4469
+ Insert: {
4470
+ granted_at?: string;
4471
+ granted_by?: string | null;
4472
+ membership_id: string;
4473
+ role_id: string;
4474
+ };
4475
+ Update: {
4476
+ granted_at?: string;
4477
+ granted_by?: string | null;
4478
+ membership_id?: string;
4479
+ role_id?: string;
4480
+ };
4481
+ Relationships: [{
4482
+ foreignKeyName: "org_rol_assignments_granted_by_fkey";
4483
+ columns: ["granted_by"];
4484
+ isOneToOne: false;
4485
+ referencedRelation: "users";
4486
+ referencedColumns: ["id"];
4487
+ }, {
4488
+ foreignKeyName: "org_rol_assignments_membership_id_fkey";
4489
+ columns: ["membership_id"];
4490
+ isOneToOne: false;
4491
+ referencedRelation: "org_memberships";
4492
+ referencedColumns: ["id"];
4493
+ }, {
4494
+ foreignKeyName: "org_rol_assignments_role_id_fkey";
4495
+ columns: ["role_id"];
4496
+ isOneToOne: false;
4497
+ referencedRelation: "org_rol_definitions";
4498
+ referencedColumns: ["id"];
4499
+ }];
4500
+ };
4501
+ org_rol_definitions: {
4502
+ Row: {
4503
+ created_at: string;
4504
+ description: string | null;
4505
+ id: string;
4506
+ is_system: boolean;
4507
+ name: string;
4508
+ organization_id: string | null;
4509
+ slug: string;
4510
+ updated_at: string;
4511
+ };
4512
+ Insert: {
4513
+ created_at?: string;
4514
+ description?: string | null;
4515
+ id?: string;
4516
+ is_system?: boolean;
4517
+ name: string;
4518
+ organization_id?: string | null;
4519
+ slug: string;
4520
+ updated_at?: string;
4521
+ };
4522
+ Update: {
4523
+ created_at?: string;
4524
+ description?: string | null;
4525
+ id?: string;
4526
+ is_system?: boolean;
4527
+ name?: string;
4528
+ organization_id?: string | null;
4529
+ slug?: string;
4530
+ updated_at?: string;
4531
+ };
4532
+ Relationships: [{
4533
+ foreignKeyName: "org_rol_definitions_organization_id_fkey";
4534
+ columns: ["organization_id"];
4535
+ isOneToOne: false;
4536
+ referencedRelation: "organizations";
4537
+ referencedColumns: ["id"];
4538
+ }];
4539
+ };
4540
+ org_rol_grants: {
4541
+ Row: {
4542
+ granted_at: string;
4543
+ permission_key: string;
4544
+ role_id: string;
4545
+ };
4546
+ Insert: {
4547
+ granted_at?: string;
4548
+ permission_key: string;
4549
+ role_id: string;
4550
+ };
4551
+ Update: {
4552
+ granted_at?: string;
4553
+ permission_key?: string;
4554
+ role_id?: string;
4555
+ };
4556
+ Relationships: [{
4557
+ foreignKeyName: "org_rol_grants_permission_key_fkey";
4558
+ columns: ["permission_key"];
4559
+ isOneToOne: false;
4560
+ referencedRelation: "org_rol_permissions";
4561
+ referencedColumns: ["key"];
4562
+ }, {
4563
+ foreignKeyName: "org_rol_grants_role_id_fkey";
4564
+ columns: ["role_id"];
4565
+ isOneToOne: false;
4566
+ referencedRelation: "org_rol_definitions";
4567
+ referencedColumns: ["id"];
4568
+ }];
4569
+ };
4570
+ org_rol_permissions: {
4571
+ Row: {
4572
+ created_at: string;
4573
+ description: string;
4574
+ is_org_grantable: boolean;
4575
+ key: string;
4576
+ updated_at: string;
4577
+ };
4578
+ Insert: {
4579
+ created_at?: string;
4580
+ description: string;
4581
+ is_org_grantable?: boolean;
4582
+ key: string;
4583
+ updated_at?: string;
4584
+ };
4585
+ Update: {
4586
+ created_at?: string;
4587
+ description?: string;
4588
+ is_org_grantable?: boolean;
4589
+ key?: string;
4590
+ updated_at?: string;
4591
+ };
4592
+ Relationships: [];
4593
+ };
4278
4594
  organizations: {
4279
4595
  Row: {
4280
4596
  config: Json;
@@ -4991,7 +5307,8 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
4991
5307
  created_at: string;
4992
5308
  description: string | null;
4993
5309
  id: string;
4994
- key: string;
5310
+ key_hash: string;
5311
+ key_prefix: string | null;
4995
5312
  last_triggered_at: string | null;
4996
5313
  name: string;
4997
5314
  organization_id: string;
@@ -5004,7 +5321,8 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
5004
5321
  created_at?: string;
5005
5322
  description?: string | null;
5006
5323
  id?: string;
5007
- key: string;
5324
+ key_hash: string;
5325
+ key_prefix?: string | null;
5008
5326
  last_triggered_at?: string | null;
5009
5327
  name: string;
5010
5328
  organization_id: string;
@@ -5017,7 +5335,8 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
5017
5335
  created_at?: string;
5018
5336
  description?: string | null;
5019
5337
  id?: string;
5020
- key?: string;
5338
+ key_hash?: string;
5339
+ key_prefix?: string | null;
5021
5340
  last_triggered_at?: string | null;
5022
5341
  name?: string;
5023
5342
  organization_id?: string;
@@ -5059,6 +5378,13 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
5059
5378
  Args: never;
5060
5379
  Returns: string;
5061
5380
  };
5381
+ can_assign_role_in_org: {
5382
+ Args: {
5383
+ p_role_id: string;
5384
+ p_target_membership_id: string;
5385
+ };
5386
+ Returns: boolean;
5387
+ };
5062
5388
  current_user_is_platform_admin: {
5063
5389
  Args: never;
5064
5390
  Returns: boolean;
@@ -5088,6 +5414,10 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
5088
5414
  user_id: string;
5089
5415
  }[];
5090
5416
  };
5417
+ get_platform_credential_kek: {
5418
+ Args: never;
5419
+ Returns: string;
5420
+ };
5091
5421
  get_storage_org_id: {
5092
5422
  Args: {
5093
5423
  file_path: string;
@@ -5098,9 +5428,10 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
5098
5428
  Args: never;
5099
5429
  Returns: string;
5100
5430
  };
5101
- is_org_admin: {
5431
+ has_org_permission: {
5102
5432
  Args: {
5103
5433
  org_id: string;
5434
+ perm_key: string;
5104
5435
  };
5105
5436
  Returns: boolean;
5106
5437
  };
@@ -5130,6 +5461,22 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
5130
5461
  Args: never;
5131
5462
  Returns: Json;
5132
5463
  };
5464
+ recompute_all_memberships: {
5465
+ Args: never;
5466
+ Returns: undefined;
5467
+ };
5468
+ sync_all_memberships_with_role: {
5469
+ Args: {
5470
+ p_role_id: string;
5471
+ };
5472
+ Returns: undefined;
5473
+ };
5474
+ sync_one_membership: {
5475
+ Args: {
5476
+ p_membership_id: string;
5477
+ };
5478
+ Returns: undefined;
5479
+ };
5133
5480
  upsert_user_profile: {
5134
5481
  Args: never;
5135
5482
  Returns: {