@elevasis/ui 2.21.0 → 2.22.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.
- package/dist/app/index.js +2 -2
- package/dist/{chunk-DMYELNGA.js → chunk-3HEUGBOT.js} +1 -1
- package/dist/{chunk-KVW56ERD.js → chunk-AXXTN44Z.js} +5 -3
- package/dist/{chunk-7GG6OSD7.js → chunk-B4FHWKEF.js} +3354 -2918
- package/dist/{chunk-XLZZOFGM.js → chunk-BSZRKBAW.js} +275 -76
- package/dist/{chunk-CZK67OHH.js → chunk-COG4ABRI.js} +3 -3
- package/dist/{chunk-S7RL77QS.js → chunk-DDZOHLHB.js} +1 -1
- package/dist/{chunk-I5WRKH25.js → chunk-GJ7EIABJ.js} +1 -1
- package/dist/{chunk-LQU62KHD.js → chunk-IBUYJXA3.js} +1209 -705
- package/dist/{chunk-EDX6WIN3.js → chunk-IOTLB6ND.js} +3 -3
- package/dist/{chunk-GBMNCNHX.js → chunk-KVJ3LFH2.js} +3 -1
- package/dist/{chunk-VQESMHQV.js → chunk-LJWV4TWV.js} +1 -2
- package/dist/{chunk-EGKNRM6P.js → chunk-LKVBEE63.js} +2 -2
- package/dist/{chunk-BJWIKEQG.js → chunk-LVJGPE6H.js} +6 -14
- package/dist/{chunk-TIIPYB2Z.js → chunk-QZJM3RYI.js} +1 -1
- package/dist/{chunk-7YQKVWSD.js → chunk-SQ5JGELM.js} +25 -5
- package/dist/{chunk-RX4UWZZR.js → chunk-TKAYX2SP.js} +8 -3
- package/dist/{chunk-ATEHYDL3.js → chunk-WWJ6S2HQ.js} +6 -2
- package/dist/{chunk-Q5HC6ENG.js → chunk-XOTJNW4Q.js} +1 -1
- package/dist/{chunk-ULZ2B3NC.js → chunk-ZBCTB5CA.js} +1 -1
- package/dist/components/index.css +85 -85
- package/dist/components/index.d.ts +1646 -1381
- package/dist/components/index.js +236 -30
- package/dist/components/navigation/index.css +589 -0
- package/dist/components/navigation/index.js +3 -3
- package/dist/features/auth/index.css +2 -2
- package/dist/features/auth/index.d.ts +184 -3
- package/dist/features/crm/index.css +2 -2
- package/dist/features/crm/index.d.ts +189 -3
- package/dist/features/crm/index.js +10 -10
- package/dist/features/dashboard/index.css +2 -2
- package/dist/features/dashboard/index.js +9 -9
- package/dist/features/delivery/index.css +85 -85
- package/dist/features/delivery/index.d.ts +189 -3
- package/dist/features/delivery/index.js +10 -10
- package/dist/features/lead-gen/index.css +2 -2
- package/dist/features/lead-gen/index.d.ts +5 -0
- package/dist/features/lead-gen/index.js +10 -10
- package/dist/features/monitoring/index.css +85 -85
- package/dist/features/monitoring/index.d.ts +6 -1
- package/dist/features/monitoring/index.js +11 -11
- package/dist/features/monitoring/requests/index.css +2 -2
- package/dist/features/monitoring/requests/index.d.ts +5 -0
- package/dist/features/monitoring/requests/index.js +9 -9
- package/dist/features/operations/index.css +2 -2
- package/dist/features/operations/index.d.ts +7 -4
- package/dist/features/operations/index.js +12 -12
- package/dist/features/seo/index.d.ts +5 -0
- package/dist/features/settings/index.css +2 -2
- package/dist/features/settings/index.d.ts +210 -9
- package/dist/features/settings/index.js +11 -11
- package/dist/graph/index.css +2 -2
- package/dist/hooks/delivery/index.css +2 -2
- package/dist/hooks/delivery/index.d.ts +184 -3
- package/dist/hooks/index.css +85 -85
- package/dist/hooks/index.d.ts +1815 -1515
- package/dist/hooks/index.js +8 -8
- package/dist/hooks/published.css +85 -85
- package/dist/hooks/published.d.ts +1815 -1515
- package/dist/hooks/published.js +8 -8
- package/dist/index.css +12 -12
- package/dist/index.d.ts +322 -16
- package/dist/index.js +9 -9
- package/dist/initialization/index.d.ts +184 -3
- package/dist/layout/index.js +2 -2
- package/dist/organization/index.css +589 -0
- package/dist/organization/index.js +1 -1
- package/dist/profile/index.d.ts +184 -3
- package/dist/provider/index.css +384 -0
- package/dist/provider/index.d.ts +6 -0
- package/dist/provider/index.js +7 -7
- package/dist/provider/published.css +463 -0
- package/dist/provider/published.d.ts +6 -0
- package/dist/provider/published.js +4 -4
- package/dist/supabase/index.d.ts +359 -6
- package/dist/test-utils/index.d.ts +46 -2
- package/dist/test-utils/index.js +102 -1
- package/dist/theme/index.js +2 -2
- package/dist/types/index.d.ts +195 -6
- package/package.json +2 -2
- /package/dist/{chunk-6GUW5GGF.js → chunk-6Z3G4U2R.js} +0 -0
package/dist/supabase/index.d.ts
CHANGED
|
@@ -1671,6 +1671,7 @@ type Database = {
|
|
|
1671
1671
|
Row: {
|
|
1672
1672
|
config: Json;
|
|
1673
1673
|
created_at: string | null;
|
|
1674
|
+
effective_permissions: string[];
|
|
1674
1675
|
id: string;
|
|
1675
1676
|
membership_status: string | null;
|
|
1676
1677
|
organization_id: string;
|
|
@@ -1682,6 +1683,7 @@ type Database = {
|
|
|
1682
1683
|
Insert: {
|
|
1683
1684
|
config?: Json;
|
|
1684
1685
|
created_at?: string | null;
|
|
1686
|
+
effective_permissions?: string[];
|
|
1685
1687
|
id?: string;
|
|
1686
1688
|
membership_status?: string | null;
|
|
1687
1689
|
organization_id: string;
|
|
@@ -1693,6 +1695,7 @@ type Database = {
|
|
|
1693
1695
|
Update: {
|
|
1694
1696
|
config?: Json;
|
|
1695
1697
|
created_at?: string | null;
|
|
1698
|
+
effective_permissions?: string[];
|
|
1696
1699
|
id?: string;
|
|
1697
1700
|
membership_status?: string | null;
|
|
1698
1701
|
organization_id?: string;
|
|
@@ -1718,6 +1721,147 @@ type Database = {
|
|
|
1718
1721
|
}
|
|
1719
1722
|
];
|
|
1720
1723
|
};
|
|
1724
|
+
org_rol_assignments: {
|
|
1725
|
+
Row: {
|
|
1726
|
+
granted_at: string;
|
|
1727
|
+
granted_by: string | null;
|
|
1728
|
+
membership_id: string;
|
|
1729
|
+
role_id: string;
|
|
1730
|
+
};
|
|
1731
|
+
Insert: {
|
|
1732
|
+
granted_at?: string;
|
|
1733
|
+
granted_by?: string | null;
|
|
1734
|
+
membership_id: string;
|
|
1735
|
+
role_id: string;
|
|
1736
|
+
};
|
|
1737
|
+
Update: {
|
|
1738
|
+
granted_at?: string;
|
|
1739
|
+
granted_by?: string | null;
|
|
1740
|
+
membership_id?: string;
|
|
1741
|
+
role_id?: string;
|
|
1742
|
+
};
|
|
1743
|
+
Relationships: [
|
|
1744
|
+
{
|
|
1745
|
+
foreignKeyName: "org_rol_assignments_granted_by_fkey";
|
|
1746
|
+
columns: ["granted_by"];
|
|
1747
|
+
isOneToOne: false;
|
|
1748
|
+
referencedRelation: "users";
|
|
1749
|
+
referencedColumns: ["id"];
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
foreignKeyName: "org_rol_assignments_membership_id_fkey";
|
|
1753
|
+
columns: ["membership_id"];
|
|
1754
|
+
isOneToOne: false;
|
|
1755
|
+
referencedRelation: "org_memberships";
|
|
1756
|
+
referencedColumns: ["id"];
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
foreignKeyName: "org_rol_assignments_role_id_fkey";
|
|
1760
|
+
columns: ["role_id"];
|
|
1761
|
+
isOneToOne: false;
|
|
1762
|
+
referencedRelation: "org_rol_definitions";
|
|
1763
|
+
referencedColumns: ["id"];
|
|
1764
|
+
}
|
|
1765
|
+
];
|
|
1766
|
+
};
|
|
1767
|
+
org_rol_definitions: {
|
|
1768
|
+
Row: {
|
|
1769
|
+
created_at: string;
|
|
1770
|
+
description: string | null;
|
|
1771
|
+
id: string;
|
|
1772
|
+
is_system: boolean;
|
|
1773
|
+
name: string;
|
|
1774
|
+
organization_id: string | null;
|
|
1775
|
+
slug: string;
|
|
1776
|
+
updated_at: string;
|
|
1777
|
+
};
|
|
1778
|
+
Insert: {
|
|
1779
|
+
created_at?: string;
|
|
1780
|
+
description?: string | null;
|
|
1781
|
+
id?: string;
|
|
1782
|
+
is_system?: boolean;
|
|
1783
|
+
name: string;
|
|
1784
|
+
organization_id?: string | null;
|
|
1785
|
+
slug: string;
|
|
1786
|
+
updated_at?: string;
|
|
1787
|
+
};
|
|
1788
|
+
Update: {
|
|
1789
|
+
created_at?: string;
|
|
1790
|
+
description?: string | null;
|
|
1791
|
+
id?: string;
|
|
1792
|
+
is_system?: boolean;
|
|
1793
|
+
name?: string;
|
|
1794
|
+
organization_id?: string | null;
|
|
1795
|
+
slug?: string;
|
|
1796
|
+
updated_at?: string;
|
|
1797
|
+
};
|
|
1798
|
+
Relationships: [
|
|
1799
|
+
{
|
|
1800
|
+
foreignKeyName: "org_rol_definitions_organization_id_fkey";
|
|
1801
|
+
columns: ["organization_id"];
|
|
1802
|
+
isOneToOne: false;
|
|
1803
|
+
referencedRelation: "organizations";
|
|
1804
|
+
referencedColumns: ["id"];
|
|
1805
|
+
}
|
|
1806
|
+
];
|
|
1807
|
+
};
|
|
1808
|
+
org_rol_grants: {
|
|
1809
|
+
Row: {
|
|
1810
|
+
granted_at: string;
|
|
1811
|
+
permission_key: string;
|
|
1812
|
+
role_id: string;
|
|
1813
|
+
};
|
|
1814
|
+
Insert: {
|
|
1815
|
+
granted_at?: string;
|
|
1816
|
+
permission_key: string;
|
|
1817
|
+
role_id: string;
|
|
1818
|
+
};
|
|
1819
|
+
Update: {
|
|
1820
|
+
granted_at?: string;
|
|
1821
|
+
permission_key?: string;
|
|
1822
|
+
role_id?: string;
|
|
1823
|
+
};
|
|
1824
|
+
Relationships: [
|
|
1825
|
+
{
|
|
1826
|
+
foreignKeyName: "org_rol_grants_permission_key_fkey";
|
|
1827
|
+
columns: ["permission_key"];
|
|
1828
|
+
isOneToOne: false;
|
|
1829
|
+
referencedRelation: "org_rol_permissions";
|
|
1830
|
+
referencedColumns: ["key"];
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
foreignKeyName: "org_rol_grants_role_id_fkey";
|
|
1834
|
+
columns: ["role_id"];
|
|
1835
|
+
isOneToOne: false;
|
|
1836
|
+
referencedRelation: "org_rol_definitions";
|
|
1837
|
+
referencedColumns: ["id"];
|
|
1838
|
+
}
|
|
1839
|
+
];
|
|
1840
|
+
};
|
|
1841
|
+
org_rol_permissions: {
|
|
1842
|
+
Row: {
|
|
1843
|
+
created_at: string;
|
|
1844
|
+
description: string;
|
|
1845
|
+
is_org_grantable: boolean;
|
|
1846
|
+
key: string;
|
|
1847
|
+
updated_at: string;
|
|
1848
|
+
};
|
|
1849
|
+
Insert: {
|
|
1850
|
+
created_at?: string;
|
|
1851
|
+
description: string;
|
|
1852
|
+
is_org_grantable?: boolean;
|
|
1853
|
+
key: string;
|
|
1854
|
+
updated_at?: string;
|
|
1855
|
+
};
|
|
1856
|
+
Update: {
|
|
1857
|
+
created_at?: string;
|
|
1858
|
+
description?: string;
|
|
1859
|
+
is_org_grantable?: boolean;
|
|
1860
|
+
key?: string;
|
|
1861
|
+
updated_at?: string;
|
|
1862
|
+
};
|
|
1863
|
+
Relationships: [];
|
|
1864
|
+
};
|
|
1721
1865
|
organizations: {
|
|
1722
1866
|
Row: {
|
|
1723
1867
|
config: Json;
|
|
@@ -2475,7 +2619,8 @@ type Database = {
|
|
|
2475
2619
|
created_at: string;
|
|
2476
2620
|
description: string | null;
|
|
2477
2621
|
id: string;
|
|
2478
|
-
|
|
2622
|
+
key_hash: string;
|
|
2623
|
+
key_prefix: string | null;
|
|
2479
2624
|
last_triggered_at: string | null;
|
|
2480
2625
|
name: string;
|
|
2481
2626
|
organization_id: string;
|
|
@@ -2488,7 +2633,8 @@ type Database = {
|
|
|
2488
2633
|
created_at?: string;
|
|
2489
2634
|
description?: string | null;
|
|
2490
2635
|
id?: string;
|
|
2491
|
-
|
|
2636
|
+
key_hash: string;
|
|
2637
|
+
key_prefix?: string | null;
|
|
2492
2638
|
last_triggered_at?: string | null;
|
|
2493
2639
|
name: string;
|
|
2494
2640
|
organization_id: string;
|
|
@@ -2501,7 +2647,8 @@ type Database = {
|
|
|
2501
2647
|
created_at?: string;
|
|
2502
2648
|
description?: string | null;
|
|
2503
2649
|
id?: string;
|
|
2504
|
-
|
|
2650
|
+
key_hash?: string;
|
|
2651
|
+
key_prefix?: string | null;
|
|
2505
2652
|
last_triggered_at?: string | null;
|
|
2506
2653
|
name?: string;
|
|
2507
2654
|
organization_id?: string;
|
|
@@ -2547,6 +2694,13 @@ type Database = {
|
|
|
2547
2694
|
Args: never;
|
|
2548
2695
|
Returns: string;
|
|
2549
2696
|
};
|
|
2697
|
+
can_assign_role_in_org: {
|
|
2698
|
+
Args: {
|
|
2699
|
+
p_role_id: string;
|
|
2700
|
+
p_target_membership_id: string;
|
|
2701
|
+
};
|
|
2702
|
+
Returns: boolean;
|
|
2703
|
+
};
|
|
2550
2704
|
current_user_is_platform_admin: {
|
|
2551
2705
|
Args: never;
|
|
2552
2706
|
Returns: boolean;
|
|
@@ -2576,6 +2730,10 @@ type Database = {
|
|
|
2576
2730
|
user_id: string;
|
|
2577
2731
|
}[];
|
|
2578
2732
|
};
|
|
2733
|
+
get_platform_credential_kek: {
|
|
2734
|
+
Args: never;
|
|
2735
|
+
Returns: string;
|
|
2736
|
+
};
|
|
2579
2737
|
get_storage_org_id: {
|
|
2580
2738
|
Args: {
|
|
2581
2739
|
file_path: string;
|
|
@@ -2586,6 +2744,13 @@ type Database = {
|
|
|
2586
2744
|
Args: never;
|
|
2587
2745
|
Returns: string;
|
|
2588
2746
|
};
|
|
2747
|
+
has_org_permission: {
|
|
2748
|
+
Args: {
|
|
2749
|
+
org_id: string;
|
|
2750
|
+
perm_key: string;
|
|
2751
|
+
};
|
|
2752
|
+
Returns: boolean;
|
|
2753
|
+
};
|
|
2589
2754
|
is_org_admin: {
|
|
2590
2755
|
Args: {
|
|
2591
2756
|
org_id: string;
|
|
@@ -2618,6 +2783,22 @@ type Database = {
|
|
|
2618
2783
|
Args: never;
|
|
2619
2784
|
Returns: Json;
|
|
2620
2785
|
};
|
|
2786
|
+
recompute_all_memberships: {
|
|
2787
|
+
Args: never;
|
|
2788
|
+
Returns: undefined;
|
|
2789
|
+
};
|
|
2790
|
+
sync_all_memberships_with_role: {
|
|
2791
|
+
Args: {
|
|
2792
|
+
p_role_id: string;
|
|
2793
|
+
};
|
|
2794
|
+
Returns: undefined;
|
|
2795
|
+
};
|
|
2796
|
+
sync_one_membership: {
|
|
2797
|
+
Args: {
|
|
2798
|
+
p_membership_id: string;
|
|
2799
|
+
};
|
|
2800
|
+
Returns: undefined;
|
|
2801
|
+
};
|
|
2621
2802
|
upsert_user_profile: {
|
|
2622
2803
|
Args: never;
|
|
2623
2804
|
Returns: {
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,6 +5428,13 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
|
|
|
5098
5428
|
Args: never;
|
|
5099
5429
|
Returns: string;
|
|
5100
5430
|
};
|
|
5431
|
+
has_org_permission: {
|
|
5432
|
+
Args: {
|
|
5433
|
+
org_id: string;
|
|
5434
|
+
perm_key: string;
|
|
5435
|
+
};
|
|
5436
|
+
Returns: boolean;
|
|
5437
|
+
};
|
|
5101
5438
|
is_org_admin: {
|
|
5102
5439
|
Args: {
|
|
5103
5440
|
org_id: string;
|
|
@@ -5130,6 +5467,22 @@ declare const useSupabase: () => SupabaseClient<Database, "public", "public", {
|
|
|
5130
5467
|
Args: never;
|
|
5131
5468
|
Returns: Json;
|
|
5132
5469
|
};
|
|
5470
|
+
recompute_all_memberships: {
|
|
5471
|
+
Args: never;
|
|
5472
|
+
Returns: undefined;
|
|
5473
|
+
};
|
|
5474
|
+
sync_all_memberships_with_role: {
|
|
5475
|
+
Args: {
|
|
5476
|
+
p_role_id: string;
|
|
5477
|
+
};
|
|
5478
|
+
Returns: undefined;
|
|
5479
|
+
};
|
|
5480
|
+
sync_one_membership: {
|
|
5481
|
+
Args: {
|
|
5482
|
+
p_membership_id: string;
|
|
5483
|
+
};
|
|
5484
|
+
Returns: undefined;
|
|
5485
|
+
};
|
|
5133
5486
|
upsert_user_profile: {
|
|
5134
5487
|
Args: never;
|
|
5135
5488
|
Returns: {
|
|
@@ -113,5 +113,49 @@ declare function mockFeatureAccess({ allowed, restrictedBy }?: MockFeatureAccess
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
type OrgOsUiRouteContractMode = 'development' | 'production';
|
|
117
|
+
interface OrgOsRouteContractFeature {
|
|
118
|
+
id: string;
|
|
119
|
+
path?: string | null;
|
|
120
|
+
enabled?: boolean;
|
|
121
|
+
devOnly?: boolean;
|
|
122
|
+
}
|
|
123
|
+
interface OrgOsRouteContractOrganizationModel {
|
|
124
|
+
features: readonly OrgOsRouteContractFeature[];
|
|
125
|
+
}
|
|
126
|
+
interface OrgOsUiRouteContractTarget {
|
|
127
|
+
name: string;
|
|
128
|
+
routeTreePath: string;
|
|
129
|
+
featureIds: readonly string[];
|
|
130
|
+
orgModelSource: string;
|
|
131
|
+
shellSource: string;
|
|
132
|
+
}
|
|
133
|
+
interface OrgOsUiRouteContractOptions {
|
|
134
|
+
target: OrgOsUiRouteContractTarget;
|
|
135
|
+
organizationModel: OrgOsRouteContractOrganizationModel;
|
|
136
|
+
routeTreeSource?: string;
|
|
137
|
+
routePaths?: Iterable<string>;
|
|
138
|
+
mode?: OrgOsUiRouteContractMode;
|
|
139
|
+
}
|
|
140
|
+
type OrgOsUiRouteContractIssueKind = 'missing-feature' | 'missing-route';
|
|
141
|
+
interface OrgOsUiRouteContractIssue {
|
|
142
|
+
target: OrgOsUiRouteContractTarget;
|
|
143
|
+
kind: OrgOsUiRouteContractIssueKind;
|
|
144
|
+
featureId: string;
|
|
145
|
+
path?: string;
|
|
146
|
+
ownerFeatureId?: string;
|
|
147
|
+
}
|
|
148
|
+
interface OrgOsUiRouteContractResult {
|
|
149
|
+
issues: OrgOsUiRouteContractIssue[];
|
|
150
|
+
checkedPathCount: number;
|
|
151
|
+
}
|
|
152
|
+
declare function normalizeOrgOsRoutePath(path: string): string;
|
|
153
|
+
declare function extractOrgOsRouteTreeFullPaths(routeTreeSource: string): Set<string>;
|
|
154
|
+
declare function ownsOrgOsFeature(ownerFeatureId: string, featureId: string): boolean;
|
|
155
|
+
declare function collectOrgOsUiRouteContractIssues(options: OrgOsUiRouteContractOptions): OrgOsUiRouteContractResult;
|
|
156
|
+
declare function formatOrgOsUiRouteContractIssue(issue: OrgOsUiRouteContractIssue): string;
|
|
157
|
+
declare function formatOrgOsUiRouteContractFailure(issues: readonly OrgOsUiRouteContractIssue[]): string;
|
|
158
|
+
declare function assertOrgOsUiRouteContract(options: OrgOsUiRouteContractOptions): OrgOsUiRouteContractResult;
|
|
159
|
+
|
|
160
|
+
export { TestProviders, assertOrgOsUiRouteContract, collectOrgOsUiRouteContractIssues, createMockUseAuth, createTestQueryClient, createTestWrapper, extractOrgOsRouteTreeFullPaths, formatOrgOsUiRouteContractFailure, formatOrgOsUiRouteContractIssue, handlers, mockAuthLoading, mockAuthenticatedUser, mockFeatureAccess, mockUnauthenticatedUser, mockUseAuth, mockWorkOSUser, normalizeOrgOsRoutePath, ownsOrgOsFeature, renderWithProviders as render, renderHookWithProviders, renderWithProviders, server };
|
|
161
|
+
export type { CustomRenderHookOptions, CustomRenderOptions, MockFeatureAccessOptions, OrgOsRouteContractFeature, OrgOsRouteContractOrganizationModel, OrgOsUiRouteContractIssue, OrgOsUiRouteContractIssueKind, OrgOsUiRouteContractMode, OrgOsUiRouteContractOptions, OrgOsUiRouteContractResult, OrgOsUiRouteContractTarget, TestProvidersProps };
|
package/dist/test-utils/index.js
CHANGED
|
@@ -18,9 +18,14 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
18
18
|
var test_utils_exports = {};
|
|
19
19
|
__export(test_utils_exports, {
|
|
20
20
|
TestProviders: () => TestProviders,
|
|
21
|
+
assertOrgOsUiRouteContract: () => assertOrgOsUiRouteContract,
|
|
22
|
+
collectOrgOsUiRouteContractIssues: () => collectOrgOsUiRouteContractIssues,
|
|
21
23
|
createMockUseAuth: () => createMockUseAuth,
|
|
22
24
|
createTestQueryClient: () => createTestQueryClient,
|
|
23
25
|
createTestWrapper: () => createTestWrapper,
|
|
26
|
+
extractOrgOsRouteTreeFullPaths: () => extractOrgOsRouteTreeFullPaths,
|
|
27
|
+
formatOrgOsUiRouteContractFailure: () => formatOrgOsUiRouteContractFailure,
|
|
28
|
+
formatOrgOsUiRouteContractIssue: () => formatOrgOsUiRouteContractIssue,
|
|
24
29
|
handlers: () => handlers,
|
|
25
30
|
mockAuthLoading: () => mockAuthLoading,
|
|
26
31
|
mockAuthenticatedUser: () => mockAuthenticatedUser,
|
|
@@ -28,6 +33,8 @@ __export(test_utils_exports, {
|
|
|
28
33
|
mockUnauthenticatedUser: () => mockUnauthenticatedUser,
|
|
29
34
|
mockUseAuth: () => mockUseAuth,
|
|
30
35
|
mockWorkOSUser: () => mockWorkOSUser,
|
|
36
|
+
normalizeOrgOsRoutePath: () => normalizeOrgOsRoutePath,
|
|
37
|
+
ownsOrgOsFeature: () => ownsOrgOsFeature,
|
|
31
38
|
render: () => renderWithProviders,
|
|
32
39
|
renderHookWithProviders: () => renderHookWithProviders,
|
|
33
40
|
renderWithProviders: () => renderWithProviders,
|
|
@@ -133,4 +140,98 @@ function mockFeatureAccess({ allowed = true, restrictedBy } = {}) {
|
|
|
133
140
|
};
|
|
134
141
|
}
|
|
135
142
|
|
|
136
|
-
|
|
143
|
+
// src/test-utils/orgOsUiRouteContract.ts
|
|
144
|
+
function normalizeOrgOsRoutePath(path) {
|
|
145
|
+
const trimmed = path.trim();
|
|
146
|
+
if (!trimmed || trimmed === "/") return "/";
|
|
147
|
+
return trimmed.replace(/\/+$/, "") || "/";
|
|
148
|
+
}
|
|
149
|
+
function extractOrgOsRouteTreeFullPaths(routeTreeSource) {
|
|
150
|
+
const paths = [...routeTreeSource.matchAll(/fullPath:\s*'([^']+)'/g)].map((match) => match[1]).filter((path) => Boolean(path)).map(normalizeOrgOsRoutePath);
|
|
151
|
+
return new Set(paths);
|
|
152
|
+
}
|
|
153
|
+
function ownsOrgOsFeature(ownerFeatureId, featureId) {
|
|
154
|
+
return featureId === ownerFeatureId || featureId.startsWith(`${ownerFeatureId}.`);
|
|
155
|
+
}
|
|
156
|
+
function collectOrgOsUiRouteContractIssues(options) {
|
|
157
|
+
const { target, organizationModel, mode = "production" } = options;
|
|
158
|
+
const routePaths = options.routePaths ?? (options.routeTreeSource ? extractOrgOsRouteTreeFullPaths(options.routeTreeSource) : void 0);
|
|
159
|
+
if (!routePaths) {
|
|
160
|
+
throw new Error("Org OS UI route contract requires either routeTreeSource or routePaths.");
|
|
161
|
+
}
|
|
162
|
+
const normalizedRoutePaths = new Set([...routePaths].map(normalizeOrgOsRoutePath));
|
|
163
|
+
const modelFeatureIds = new Set(organizationModel.features.map((feature) => feature.id));
|
|
164
|
+
const issues = [];
|
|
165
|
+
let checkedPathCount = 0;
|
|
166
|
+
for (const featureId of target.featureIds) {
|
|
167
|
+
if (!modelFeatureIds.has(featureId)) {
|
|
168
|
+
issues.push({
|
|
169
|
+
target,
|
|
170
|
+
kind: "missing-feature",
|
|
171
|
+
featureId
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
for (const feature of organizationModel.features) {
|
|
176
|
+
if (!feature.path || feature.enabled === false) continue;
|
|
177
|
+
if (feature.devOnly && mode === "production") continue;
|
|
178
|
+
const ownerFeatureId = target.featureIds.find((candidate) => ownsOrgOsFeature(candidate, feature.id));
|
|
179
|
+
if (!ownerFeatureId) continue;
|
|
180
|
+
checkedPathCount += 1;
|
|
181
|
+
const path = normalizeOrgOsRoutePath(feature.path);
|
|
182
|
+
if (!normalizedRoutePaths.has(path)) {
|
|
183
|
+
issues.push({
|
|
184
|
+
target,
|
|
185
|
+
kind: "missing-route",
|
|
186
|
+
featureId: feature.id,
|
|
187
|
+
ownerFeatureId,
|
|
188
|
+
path
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return { issues, checkedPathCount };
|
|
193
|
+
}
|
|
194
|
+
function formatOrgOsUiRouteContractIssue(issue) {
|
|
195
|
+
if (issue.kind === "missing-feature") {
|
|
196
|
+
return [
|
|
197
|
+
`[missing-feature] Registered FeatureModule "${issue.featureId}" is not present in ${issue.target.orgModelSource}.`,
|
|
198
|
+
"Fix:",
|
|
199
|
+
`- If the feature should ship in ${issue.target.name}, add it to the organization model.`,
|
|
200
|
+
`- If it should not ship, remove that FeatureModule from ${issue.target.shellSource}.`
|
|
201
|
+
].join("\n");
|
|
202
|
+
}
|
|
203
|
+
return [
|
|
204
|
+
`[missing-route] Feature "${issue.featureId}" points to "${issue.path}", but ${issue.target.routeTreePath} does not contain that path.`,
|
|
205
|
+
`Owner FeatureModule: ${issue.ownerFeatureId}`,
|
|
206
|
+
"Fix one source of truth:",
|
|
207
|
+
`- Add or rename the TanStack route file under ${issue.target.name}/src/routes so routeTree.gen.ts contains "${issue.path}".`,
|
|
208
|
+
`- Or update ${issue.target.orgModelSource} so OrganizationModel.features[].path matches the route that actually exists.`,
|
|
209
|
+
`- Or disable/remove the feature for ${issue.target.name} if this app intentionally does not ship it.`
|
|
210
|
+
].join("\n");
|
|
211
|
+
}
|
|
212
|
+
function formatOrgOsUiRouteContractFailure(issues) {
|
|
213
|
+
const lines = [
|
|
214
|
+
`Org OS UI route contract failed with ${issues.length} issue(s).`,
|
|
215
|
+
"",
|
|
216
|
+
"This check is derived from app-level contracts, not a route allowlist:",
|
|
217
|
+
"- OrganizationModel.features[].path is the expected path source.",
|
|
218
|
+
"- routeTree.gen.ts fullPath entries are the actual generated routes.",
|
|
219
|
+
"- FeatureModule.featureId values define which Org OS branches this shell propagates.",
|
|
220
|
+
"",
|
|
221
|
+
"Do not add route-specific exceptions. Fix the route file, the Org model path, or the app feature registration.",
|
|
222
|
+
""
|
|
223
|
+
];
|
|
224
|
+
for (const issue of issues) {
|
|
225
|
+
lines.push(`Target: ${issue.target.name}`, formatOrgOsUiRouteContractIssue(issue), "");
|
|
226
|
+
}
|
|
227
|
+
return lines.join("\n");
|
|
228
|
+
}
|
|
229
|
+
function assertOrgOsUiRouteContract(options) {
|
|
230
|
+
const result = collectOrgOsUiRouteContractIssues(options);
|
|
231
|
+
if (result.issues.length > 0) {
|
|
232
|
+
throw new Error(formatOrgOsUiRouteContractFailure(result.issues));
|
|
233
|
+
}
|
|
234
|
+
return result;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export { TestProviders, assertOrgOsUiRouteContract, collectOrgOsUiRouteContractIssues, createTestQueryClient, createTestWrapper, extractOrgOsRouteTreeFullPaths, formatOrgOsUiRouteContractFailure, formatOrgOsUiRouteContractIssue, mockFeatureAccess, normalizeOrgOsRoutePath, ownsOrgOsFeature, renderWithProviders as render, renderHookWithProviders, renderWithProviders };
|
package/dist/theme/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useAvailablePresets } from '../chunk-
|
|
2
|
-
export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from '../chunk-
|
|
1
|
+
export { useAvailablePresets } from '../chunk-QZJM3RYI.js';
|
|
2
|
+
export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from '../chunk-XOTJNW4Q.js';
|
|
3
3
|
import '../chunk-WLOQ4IBG.js';
|
|
4
4
|
import '../chunk-I2KLQ2HA.js';
|