@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
@@ -113,5 +113,49 @@ declare function mockFeatureAccess({ allowed, restrictedBy }?: MockFeatureAccess
113
113
  };
114
114
  };
115
115
 
116
- export { TestProviders, createMockUseAuth, createTestQueryClient, createTestWrapper, handlers, mockAuthLoading, mockAuthenticatedUser, mockFeatureAccess, mockUnauthenticatedUser, mockUseAuth, mockWorkOSUser, renderWithProviders as render, renderHookWithProviders, renderWithProviders, server };
117
- export type { CustomRenderHookOptions, CustomRenderOptions, MockFeatureAccessOptions, TestProvidersProps };
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 };
@@ -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
- export { TestProviders, createTestQueryClient, createTestWrapper, mockFeatureAccess, renderWithProviders as render, renderHookWithProviders, renderWithProviders };
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 };
@@ -1,4 +1,4 @@
1
- export { useAvailablePresets } from '../chunk-TIIPYB2Z.js';
2
- export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from '../chunk-Q5HC6ENG.js';
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';
@@ -999,7 +999,6 @@ type Database = {
999
999
  acq_deals: {
1000
1000
  Row: {
1001
1001
  activity_log: Json;
1002
- cached_stage: string | null;
1003
1002
  closed_lost_at: string | null;
1004
1003
  closed_lost_reason: string | null;
1005
1004
  contact_email: string;
@@ -1014,6 +1013,7 @@ type Database = {
1014
1013
  organization_id: string;
1015
1014
  payment_link_sent_at: string | null;
1016
1015
  payment_received_at: string | null;
1016
+ pipeline_key: string;
1017
1017
  proposal_data: Json | null;
1018
1018
  proposal_generated_at: string | null;
1019
1019
  proposal_pdf_url: string | null;
@@ -1021,10 +1021,11 @@ type Database = {
1021
1021
  proposal_reviewed_by: string | null;
1022
1022
  proposal_sent_at: string | null;
1023
1023
  proposal_signed_at: string | null;
1024
- proposal_status: string | null;
1025
1024
  signature_envelope_id: string | null;
1026
1025
  source_list_id: string | null;
1027
1026
  source_type: string | null;
1027
+ stage_key: string | null;
1028
+ state_key: string | null;
1028
1029
  stripe_payment_id: string | null;
1029
1030
  stripe_payment_link: string | null;
1030
1031
  stripe_payment_link_id: string | null;
@@ -1033,7 +1034,6 @@ type Database = {
1033
1034
  };
1034
1035
  Insert: {
1035
1036
  activity_log?: Json;
1036
- cached_stage?: string | null;
1037
1037
  closed_lost_at?: string | null;
1038
1038
  closed_lost_reason?: string | null;
1039
1039
  contact_email: string;
@@ -1048,6 +1048,7 @@ type Database = {
1048
1048
  organization_id: string;
1049
1049
  payment_link_sent_at?: string | null;
1050
1050
  payment_received_at?: string | null;
1051
+ pipeline_key?: string;
1051
1052
  proposal_data?: Json | null;
1052
1053
  proposal_generated_at?: string | null;
1053
1054
  proposal_pdf_url?: string | null;
@@ -1055,10 +1056,11 @@ type Database = {
1055
1056
  proposal_reviewed_by?: string | null;
1056
1057
  proposal_sent_at?: string | null;
1057
1058
  proposal_signed_at?: string | null;
1058
- proposal_status?: string | null;
1059
1059
  signature_envelope_id?: string | null;
1060
1060
  source_list_id?: string | null;
1061
1061
  source_type?: string | null;
1062
+ stage_key?: string | null;
1063
+ state_key?: string | null;
1062
1064
  stripe_payment_id?: string | null;
1063
1065
  stripe_payment_link?: string | null;
1064
1066
  stripe_payment_link_id?: string | null;
@@ -1067,7 +1069,6 @@ type Database = {
1067
1069
  };
1068
1070
  Update: {
1069
1071
  activity_log?: Json;
1070
- cached_stage?: string | null;
1071
1072
  closed_lost_at?: string | null;
1072
1073
  closed_lost_reason?: string | null;
1073
1074
  contact_email?: string;
@@ -1082,6 +1083,7 @@ type Database = {
1082
1083
  organization_id?: string;
1083
1084
  payment_link_sent_at?: string | null;
1084
1085
  payment_received_at?: string | null;
1086
+ pipeline_key?: string;
1085
1087
  proposal_data?: Json | null;
1086
1088
  proposal_generated_at?: string | null;
1087
1089
  proposal_pdf_url?: string | null;
@@ -1089,10 +1091,11 @@ type Database = {
1089
1091
  proposal_reviewed_by?: string | null;
1090
1092
  proposal_sent_at?: string | null;
1091
1093
  proposal_signed_at?: string | null;
1092
- proposal_status?: string | null;
1093
1094
  signature_envelope_id?: string | null;
1094
1095
  source_list_id?: string | null;
1095
1096
  source_type?: string | null;
1097
+ stage_key?: string | null;
1098
+ state_key?: string | null;
1096
1099
  stripe_payment_id?: string | null;
1097
1100
  stripe_payment_link?: string | null;
1098
1101
  stripe_payment_link_id?: string | null;
@@ -2261,6 +2264,7 @@ type Database = {
2261
2264
  Row: {
2262
2265
  config: Json;
2263
2266
  created_at: string | null;
2267
+ effective_permissions: string[];
2264
2268
  id: string;
2265
2269
  membership_status: string | null;
2266
2270
  organization_id: string;
@@ -2272,6 +2276,7 @@ type Database = {
2272
2276
  Insert: {
2273
2277
  config?: Json;
2274
2278
  created_at?: string | null;
2279
+ effective_permissions?: string[];
2275
2280
  id?: string;
2276
2281
  membership_status?: string | null;
2277
2282
  organization_id: string;
@@ -2283,6 +2288,7 @@ type Database = {
2283
2288
  Update: {
2284
2289
  config?: Json;
2285
2290
  created_at?: string | null;
2291
+ effective_permissions?: string[];
2286
2292
  id?: string;
2287
2293
  membership_status?: string | null;
2288
2294
  organization_id?: string;
@@ -2308,6 +2314,147 @@ type Database = {
2308
2314
  }
2309
2315
  ];
2310
2316
  };
2317
+ org_rol_assignments: {
2318
+ Row: {
2319
+ granted_at: string;
2320
+ granted_by: string | null;
2321
+ membership_id: string;
2322
+ role_id: string;
2323
+ };
2324
+ Insert: {
2325
+ granted_at?: string;
2326
+ granted_by?: string | null;
2327
+ membership_id: string;
2328
+ role_id: string;
2329
+ };
2330
+ Update: {
2331
+ granted_at?: string;
2332
+ granted_by?: string | null;
2333
+ membership_id?: string;
2334
+ role_id?: string;
2335
+ };
2336
+ Relationships: [
2337
+ {
2338
+ foreignKeyName: "org_rol_assignments_granted_by_fkey";
2339
+ columns: ["granted_by"];
2340
+ isOneToOne: false;
2341
+ referencedRelation: "users";
2342
+ referencedColumns: ["id"];
2343
+ },
2344
+ {
2345
+ foreignKeyName: "org_rol_assignments_membership_id_fkey";
2346
+ columns: ["membership_id"];
2347
+ isOneToOne: false;
2348
+ referencedRelation: "org_memberships";
2349
+ referencedColumns: ["id"];
2350
+ },
2351
+ {
2352
+ foreignKeyName: "org_rol_assignments_role_id_fkey";
2353
+ columns: ["role_id"];
2354
+ isOneToOne: false;
2355
+ referencedRelation: "org_rol_definitions";
2356
+ referencedColumns: ["id"];
2357
+ }
2358
+ ];
2359
+ };
2360
+ org_rol_definitions: {
2361
+ Row: {
2362
+ created_at: string;
2363
+ description: string | null;
2364
+ id: string;
2365
+ is_system: boolean;
2366
+ name: string;
2367
+ organization_id: string | null;
2368
+ slug: string;
2369
+ updated_at: string;
2370
+ };
2371
+ Insert: {
2372
+ created_at?: string;
2373
+ description?: string | null;
2374
+ id?: string;
2375
+ is_system?: boolean;
2376
+ name: string;
2377
+ organization_id?: string | null;
2378
+ slug: string;
2379
+ updated_at?: string;
2380
+ };
2381
+ Update: {
2382
+ created_at?: string;
2383
+ description?: string | null;
2384
+ id?: string;
2385
+ is_system?: boolean;
2386
+ name?: string;
2387
+ organization_id?: string | null;
2388
+ slug?: string;
2389
+ updated_at?: string;
2390
+ };
2391
+ Relationships: [
2392
+ {
2393
+ foreignKeyName: "org_rol_definitions_organization_id_fkey";
2394
+ columns: ["organization_id"];
2395
+ isOneToOne: false;
2396
+ referencedRelation: "organizations";
2397
+ referencedColumns: ["id"];
2398
+ }
2399
+ ];
2400
+ };
2401
+ org_rol_grants: {
2402
+ Row: {
2403
+ granted_at: string;
2404
+ permission_key: string;
2405
+ role_id: string;
2406
+ };
2407
+ Insert: {
2408
+ granted_at?: string;
2409
+ permission_key: string;
2410
+ role_id: string;
2411
+ };
2412
+ Update: {
2413
+ granted_at?: string;
2414
+ permission_key?: string;
2415
+ role_id?: string;
2416
+ };
2417
+ Relationships: [
2418
+ {
2419
+ foreignKeyName: "org_rol_grants_permission_key_fkey";
2420
+ columns: ["permission_key"];
2421
+ isOneToOne: false;
2422
+ referencedRelation: "org_rol_permissions";
2423
+ referencedColumns: ["key"];
2424
+ },
2425
+ {
2426
+ foreignKeyName: "org_rol_grants_role_id_fkey";
2427
+ columns: ["role_id"];
2428
+ isOneToOne: false;
2429
+ referencedRelation: "org_rol_definitions";
2430
+ referencedColumns: ["id"];
2431
+ }
2432
+ ];
2433
+ };
2434
+ org_rol_permissions: {
2435
+ Row: {
2436
+ created_at: string;
2437
+ description: string;
2438
+ is_org_grantable: boolean;
2439
+ key: string;
2440
+ updated_at: string;
2441
+ };
2442
+ Insert: {
2443
+ created_at?: string;
2444
+ description: string;
2445
+ is_org_grantable?: boolean;
2446
+ key: string;
2447
+ updated_at?: string;
2448
+ };
2449
+ Update: {
2450
+ created_at?: string;
2451
+ description?: string;
2452
+ is_org_grantable?: boolean;
2453
+ key?: string;
2454
+ updated_at?: string;
2455
+ };
2456
+ Relationships: [];
2457
+ };
2311
2458
  organizations: {
2312
2459
  Row: {
2313
2460
  config: Json;
@@ -3065,7 +3212,8 @@ type Database = {
3065
3212
  created_at: string;
3066
3213
  description: string | null;
3067
3214
  id: string;
3068
- key: string;
3215
+ key_hash: string;
3216
+ key_prefix: string | null;
3069
3217
  last_triggered_at: string | null;
3070
3218
  name: string;
3071
3219
  organization_id: string;
@@ -3078,7 +3226,8 @@ type Database = {
3078
3226
  created_at?: string;
3079
3227
  description?: string | null;
3080
3228
  id?: string;
3081
- key: string;
3229
+ key_hash: string;
3230
+ key_prefix?: string | null;
3082
3231
  last_triggered_at?: string | null;
3083
3232
  name: string;
3084
3233
  organization_id: string;
@@ -3091,7 +3240,8 @@ type Database = {
3091
3240
  created_at?: string;
3092
3241
  description?: string | null;
3093
3242
  id?: string;
3094
- key?: string;
3243
+ key_hash?: string;
3244
+ key_prefix?: string | null;
3095
3245
  last_triggered_at?: string | null;
3096
3246
  name?: string;
3097
3247
  organization_id?: string;
@@ -3137,6 +3287,13 @@ type Database = {
3137
3287
  Args: never;
3138
3288
  Returns: string;
3139
3289
  };
3290
+ can_assign_role_in_org: {
3291
+ Args: {
3292
+ p_role_id: string;
3293
+ p_target_membership_id: string;
3294
+ };
3295
+ Returns: boolean;
3296
+ };
3140
3297
  current_user_is_platform_admin: {
3141
3298
  Args: never;
3142
3299
  Returns: boolean;
@@ -3166,6 +3323,10 @@ type Database = {
3166
3323
  user_id: string;
3167
3324
  }[];
3168
3325
  };
3326
+ get_platform_credential_kek: {
3327
+ Args: never;
3328
+ Returns: string;
3329
+ };
3169
3330
  get_storage_org_id: {
3170
3331
  Args: {
3171
3332
  file_path: string;
@@ -3176,9 +3337,10 @@ type Database = {
3176
3337
  Args: never;
3177
3338
  Returns: string;
3178
3339
  };
3179
- is_org_admin: {
3340
+ has_org_permission: {
3180
3341
  Args: {
3181
3342
  org_id: string;
3343
+ perm_key: string;
3182
3344
  };
3183
3345
  Returns: boolean;
3184
3346
  };
@@ -3208,6 +3370,22 @@ type Database = {
3208
3370
  Args: never;
3209
3371
  Returns: Json;
3210
3372
  };
3373
+ recompute_all_memberships: {
3374
+ Args: never;
3375
+ Returns: undefined;
3376
+ };
3377
+ sync_all_memberships_with_role: {
3378
+ Args: {
3379
+ p_role_id: string;
3380
+ };
3381
+ Returns: undefined;
3382
+ };
3383
+ sync_one_membership: {
3384
+ Args: {
3385
+ p_membership_id: string;
3386
+ };
3387
+ Returns: undefined;
3388
+ };
3211
3389
  upsert_user_profile: {
3212
3390
  Args: never;
3213
3391
  Returns: {
@@ -4658,7 +4836,7 @@ interface NotificationCountUpdatedEvent {
4658
4836
  */
4659
4837
  type NotificationSSEEvent = NotificationCountUpdatedEvent;
4660
4838
 
4661
- type ActivityType = 'workflow_execution' | 'agent_run' | 'hitl_action' | 'webhook_received' | 'webhook_executed' | 'webhook_failed' | 'credential_change' | 'api_key_change' | 'deployment_change' | 'membership_change';
4839
+ type ActivityType = 'workflow_execution' | 'agent_run' | 'hitl_action' | 'webhook_received' | 'webhook_executed' | 'webhook_failed' | 'credential_change' | 'credential_read' | 'api_key_change' | 'deployment_change' | 'membership_change';
4662
4840
  type ActivityStatus = 'success' | 'failure' | 'pending' | 'approved' | 'rejected' | 'completed';
4663
4841
  interface Activity {
4664
4842
  id: string;
@@ -4927,8 +5105,15 @@ interface WebhookEndpoint {
4927
5105
  * Unique opaque key used in the inbound URL.
4928
5106
  * Format: `wh_` + 32 crypto-random hex chars (128 bits of entropy).
4929
5107
  * This key IS the credential — it must be kept secret.
5108
+ * Set ONLY on the return value of `create()` — undefined on list/get/getEndpointByKey responses.
4930
5109
  */
4931
- key: string;
5110
+ key?: string;
5111
+ /**
5112
+ * First 8 characters of the plaintext key for display and grep hints.
5113
+ * Safe to show in list views — not sufficient to reconstruct the full key.
5114
+ * Null on legacy rows that predate the key_hash migration.
5115
+ */
5116
+ keyPrefix: string | null;
4932
5117
  /** User-facing label (e.g., "Zapier → Lead Intake") */
4933
5118
  name: string;
4934
5119
  /** Optional description for the endpoint */
@@ -4980,7 +5165,8 @@ type UpdateWebhookEndpointRequest = z.infer<typeof UpdateWebhookEndpointRequestS
4980
5165
  declare const WebhookEndpointResponseSchema: z.ZodObject<{
4981
5166
  id: z.ZodString;
4982
5167
  organizationId: z.ZodString;
4983
- key: z.ZodString;
5168
+ key: z.ZodOptional<z.ZodString>;
5169
+ keyPrefix: z.ZodNullable<z.ZodString>;
4984
5170
  name: z.ZodString;
4985
5171
  description: z.ZodNullable<z.ZodString>;
4986
5172
  resourceId: z.ZodNullable<z.ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/ui",
3
- "version": "2.21.0",
3
+ "version": "2.23.0",
4
4
  "description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -225,9 +225,9 @@
225
225
  "@testing-library/jest-dom": "^6.9.1",
226
226
  "msw": "^2.11.0",
227
227
  "vitest": "^3.2.4",
228
- "@repo/core": "0.11.0",
229
- "@repo/eslint-config": "0.0.0",
230
- "@repo/typescript-config": "0.0.0"
228
+ "@repo/core": "0.13.0",
229
+ "@repo/typescript-config": "0.0.0",
230
+ "@repo/eslint-config": "0.0.0"
231
231
  },
232
232
  "dependencies": {
233
233
  "@dagrejs/dagre": "^1.1.4",
File without changes