@elevasis/ui 2.79.0 → 2.81.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/{CoreAuthKitInner-PSTKG4B3.js → CoreAuthKitInner-5J7P7ZDL.js} +1 -1
- package/dist/api/index.js +6 -6
- package/dist/app/index.d.ts +1 -15
- package/dist/app/index.js +18 -18
- package/dist/auth/index.js +10 -10
- package/dist/charts/index.d.ts +4 -4
- package/dist/charts/index.js +10 -10
- package/dist/{chunk-NCPNKI3V.js → chunk-2HXDI4RY.js} +1 -1
- package/dist/{chunk-TVTSASST.js → chunk-34B3ACOZ.js} +9 -1
- package/dist/{chunk-AZCDL2SS.js → chunk-3ZADOARU.js} +5 -5
- package/dist/{chunk-2IU6BP6F.js → chunk-42C2WVYU.js} +11 -10
- package/dist/{chunk-3ONNZ4SO.js → chunk-52AZTFUR.js} +6 -6
- package/dist/{chunk-MGCXAAX4.js → chunk-5GYJ3IDO.js} +15 -9
- package/dist/{chunk-SJRIO26Q.js → chunk-6J3SCCZ2.js} +2 -2
- package/dist/{chunk-A37T4NIZ.js → chunk-6YWBMLEM.js} +22 -11
- package/dist/{chunk-GWCLI2RX.js → chunk-75OLN23F.js} +22 -39
- package/dist/{chunk-LDQSTEFW.js → chunk-7D4FKBB4.js} +38 -14
- package/dist/{chunk-JZQNUQE4.js → chunk-7RS2NUC6.js} +10 -2
- package/dist/{chunk-7ICEQPBU.js → chunk-AI5OYVLR.js} +1 -1
- package/dist/{chunk-G3WOMHVI.js → chunk-BLYK6I4D.js} +4 -3
- package/dist/{chunk-5ZK7K7YP.js → chunk-DEZW7QDI.js} +38 -25
- package/dist/{chunk-QLEY6Q7K.js → chunk-FPRDEKFY.js} +1 -1
- package/dist/{chunk-SVZR4GYA.js → chunk-G6VHIXWD.js} +1 -1
- package/dist/{chunk-VM2OWOXL.js → chunk-GY7FXTC4.js} +2 -3
- package/dist/{chunk-GFSOQH3N.js → chunk-HDITVHZT.js} +8 -11
- package/dist/{chunk-ASI3FDPC.js → chunk-HDLYC63N.js} +1 -1
- package/dist/{chunk-2GIJBHZT.js → chunk-IIMC4TRH.js} +3 -3
- package/dist/{chunk-22TWX4XG.js → chunk-ILOKKA6L.js} +8 -8
- package/dist/{chunk-4ZHX5KOT.js → chunk-JLKZUO2I.js} +1 -1
- package/dist/{chunk-WJO6QEI7.js → chunk-K635QVGI.js} +33 -78
- package/dist/{chunk-R42OYAQ2.js → chunk-KU7KN5VN.js} +1 -1
- package/dist/{chunk-6AJUWYKS.js → chunk-LGJASP5H.js} +1 -1
- package/dist/{chunk-4IYWLUXA.js → chunk-LTKBVL7D.js} +14 -10
- package/dist/{chunk-INCEZAM3.js → chunk-LTRJZOHA.js} +1 -1
- package/dist/{chunk-RMLWK3IR.js → chunk-O4XUKLRY.js} +1 -1
- package/dist/{chunk-3RK2NNJX.js → chunk-PJN6CMWZ.js} +1 -1
- package/dist/{chunk-KXNRTJAE.js → chunk-PNCJJE4Z.js} +1 -1
- package/dist/{chunk-4VGPEDQF.js → chunk-PSGSFPWA.js} +126 -69
- package/dist/{chunk-QMAIUPXK.js → chunk-QEQXPWOK.js} +23 -231
- package/dist/{chunk-M77G2MGW.js → chunk-QFKOHZM3.js} +3 -3
- package/dist/{chunk-P6HHXMLJ.js → chunk-ROC2TFPS.js} +10 -9
- package/dist/{chunk-QMOBXKW3.js → chunk-SHJYK2X4.js} +222 -191
- package/dist/{chunk-ODXLZZFR.js → chunk-SOBKRB4N.js} +1 -1
- package/dist/{chunk-SXZMHLH6.js → chunk-SWC54W3A.js} +4 -4
- package/dist/{chunk-G4IEH7NX.js → chunk-TLMNBOAG.js} +5 -5
- package/dist/{chunk-N6K2Q5BM.js → chunk-WDABHUIL.js} +9 -21
- package/dist/{chunk-3KCLWJDC.js → chunk-XUL4UBYJ.js} +22 -11
- package/dist/{chunk-UD657ICS.js → chunk-YJ437RDY.js} +29 -16
- package/dist/components/index.d.ts +18 -20
- package/dist/components/index.js +48 -48
- package/dist/components/navigation/index.js +11 -11
- package/dist/execution/index.js +2 -2
- package/dist/features/auth/index.d.ts +1 -1
- package/dist/features/auth/index.js +12 -12
- package/dist/features/clients/index.js +14 -15
- package/dist/features/content/index.js +13 -13
- package/dist/features/crm/index.d.ts +0 -14
- package/dist/features/crm/index.js +16 -16
- package/dist/features/dashboard/index.d.ts +8 -8
- package/dist/features/dashboard/index.js +13 -13
- package/dist/features/delivery/index.d.ts +0 -14
- package/dist/features/delivery/index.js +25 -25
- package/dist/features/knowledge/index.js +10 -10
- package/dist/features/lead-gen/index.d.ts +103 -48
- package/dist/features/lead-gen/index.js +17 -17
- package/dist/features/monitoring/index.d.ts +10 -10
- package/dist/features/monitoring/index.js +15 -15
- package/dist/features/monitoring/requests/index.js +12 -12
- package/dist/features/notes/index.js +1 -1
- package/dist/features/operations/index.d.ts +12 -12
- package/dist/features/operations/index.js +18 -18
- package/dist/features/public-agent-chat/index.js +4 -4
- package/dist/features/seo/index.d.ts +105 -17
- package/dist/features/seo/index.js +13 -13
- package/dist/features/settings/index.d.ts +1 -1
- package/dist/features/settings/index.js +13 -13
- package/dist/hooks/access/index.d.ts +60 -1
- package/dist/hooks/access/index.js +10 -10
- package/dist/hooks/delivery/index.d.ts +0 -14
- package/dist/hooks/delivery/index.js +6 -6
- package/dist/hooks/published.d.ts +286 -107
- package/dist/hooks/published.js +23 -23
- package/dist/hooks/user-notes/index.js +1 -1
- package/dist/initialization/index.d.ts +13 -1
- package/dist/initialization/index.js +1 -1
- package/dist/knowledge/index.d.ts +1 -1
- package/dist/knowledge/index.js +93 -91
- package/dist/{knowledge-search-index-6GQK55IQ.js → knowledge-search-index-UPKXCXQP.js} +91 -91
- package/dist/layout/index.js +14 -14
- package/dist/organization/index.d.ts +17 -1
- package/dist/organization/index.js +2 -2
- package/dist/profile/index.d.ts +1 -1
- package/dist/profile/index.js +1 -1
- package/dist/provider/ElevasisServiceContext.js +1 -1
- package/dist/provider/index.d.ts +0 -14
- package/dist/provider/index.js +10 -10
- package/dist/provider/published.d.ts +0 -14
- package/dist/provider/published.js +10 -10
- package/dist/sse/index.d.ts +7 -1
- package/dist/sse/index.js +36 -2
- package/dist/test-utils/index.d.ts +3 -1
- package/dist/test-utils/index.js +32 -9
- package/dist/types/index.d.ts +13 -15
- package/dist/utils/index.d.ts +25 -7
- package/dist/utils/index.js +4 -4
- package/package.json +24 -14
- /package/dist/{chunk-Y6I3IC45.js → chunk-6XBZPKMI.js} +0 -0
- /package/dist/{chunk-5F3QGBEI.js → chunk-7ZUXA2NW.js} +0 -0
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
import { GetNotificationsQuerySchema, MarkAsReadParamsSchema } from './chunk-
|
|
2
|
-
import { useNotificationAdapter } from './chunk-
|
|
3
|
-
import { getTimeRangeDates } from './chunk-
|
|
1
|
+
import { GetNotificationsQuerySchema, MarkAsReadParamsSchema } from './chunk-GY7FXTC4.js';
|
|
2
|
+
import { useNotificationAdapter } from './chunk-PSGSFPWA.js';
|
|
3
|
+
import { getTimeRangeDates } from './chunk-6XBZPKMI.js';
|
|
4
4
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
5
5
|
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
6
6
|
import { useCallback, useState } from 'react';
|
|
7
7
|
|
|
8
|
+
// src/hooks/activities/queryKeys.ts
|
|
9
|
+
var activityKeys = {
|
|
10
|
+
all: ["activities"],
|
|
11
|
+
list: (organizationId, params) => [...activityKeys.all, "list", organizationId, params],
|
|
12
|
+
trend: (organizationId, params) => [...activityKeys.all, "trend", organizationId, params]
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// src/hooks/monitoring/queryKeys.ts
|
|
16
|
+
var monitoringKeys = {
|
|
17
|
+
all: ["monitoring"],
|
|
18
|
+
executionHealth: (organizationId, timeRange) => [...monitoringKeys.all, "execution-health", organizationId, timeRange],
|
|
19
|
+
executionLogs: (organizationId, params) => [...monitoringKeys.all, "execution-logs", organizationId, params]
|
|
20
|
+
};
|
|
21
|
+
var costAnalyticsKeys = {
|
|
22
|
+
all: ["cost-analytics"],
|
|
23
|
+
summary: (organizationId, timeRange) => [...costAnalyticsKeys.all, "cost-summary", organizationId, timeRange]
|
|
24
|
+
};
|
|
8
25
|
function useActivityTrend(params = {}) {
|
|
9
26
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
10
27
|
return useQuery({
|
|
11
|
-
queryKey:
|
|
28
|
+
queryKey: activityKeys.trend(workOSOrganizationId, params),
|
|
12
29
|
queryFn: async () => {
|
|
13
30
|
const queryParams = new URLSearchParams();
|
|
14
31
|
if (params.activityType) queryParams.set("activityType", params.activityType);
|
|
@@ -32,7 +49,7 @@ function useActivityTrend(params = {}) {
|
|
|
32
49
|
function useActivities(params = {}) {
|
|
33
50
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
34
51
|
return useQuery({
|
|
35
|
-
queryKey:
|
|
52
|
+
queryKey: activityKeys.list(workOSOrganizationId, params),
|
|
36
53
|
queryFn: async () => {
|
|
37
54
|
const queryParams = new URLSearchParams();
|
|
38
55
|
if (params.limit) queryParams.set("limit", params.limit.toString());
|
|
@@ -66,7 +83,7 @@ function useActivities(params = {}) {
|
|
|
66
83
|
function useExecutionLogs(params = {}) {
|
|
67
84
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
68
85
|
return useQuery({
|
|
69
|
-
queryKey:
|
|
86
|
+
queryKey: monitoringKeys.executionLogs(workOSOrganizationId, params),
|
|
70
87
|
queryFn: async () => {
|
|
71
88
|
const queryParams = new URLSearchParams();
|
|
72
89
|
if (params.resourceId) queryParams.set("resourceId", params.resourceId);
|
|
@@ -88,10 +105,17 @@ function useExecutionLogs(params = {}) {
|
|
|
88
105
|
// Real-time data - always refetch on mount/org switch
|
|
89
106
|
});
|
|
90
107
|
}
|
|
108
|
+
|
|
109
|
+
// src/hooks/notifications/queryKeys.ts
|
|
110
|
+
var notificationKeys = {
|
|
111
|
+
all: ["notifications"],
|
|
112
|
+
list: (organizationId, page) => [...notificationKeys.all, organizationId, page],
|
|
113
|
+
unreadCount: (organizationId) => [...notificationKeys.all, "unread-count", organizationId]
|
|
114
|
+
};
|
|
91
115
|
function useNotifications({ limit = 20, offset = 0 } = {}) {
|
|
92
116
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
93
117
|
return useQuery({
|
|
94
|
-
queryKey:
|
|
118
|
+
queryKey: notificationKeys.list(workOSOrganizationId, { limit, offset }),
|
|
95
119
|
queryFn: async () => {
|
|
96
120
|
const params = GetNotificationsQuerySchema.parse({ limit, offset });
|
|
97
121
|
const response = await apiRequest(
|
|
@@ -105,7 +129,7 @@ function useNotifications({ limit = 20, offset = 0 } = {}) {
|
|
|
105
129
|
function useCostSummary(timeRange) {
|
|
106
130
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
107
131
|
return useQuery({
|
|
108
|
-
queryKey:
|
|
132
|
+
queryKey: costAnalyticsKeys.summary(workOSOrganizationId, timeRange),
|
|
109
133
|
queryFn: async () => {
|
|
110
134
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
111
135
|
return apiRequest(`/observability/cost-summary?startDate=${startDate}&endDate=${endDate}`);
|
|
@@ -118,7 +142,7 @@ function useCostSummary(timeRange) {
|
|
|
118
142
|
function useExecutionHealth({ timeRange }) {
|
|
119
143
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
120
144
|
return useQuery({
|
|
121
|
-
queryKey:
|
|
145
|
+
queryKey: monitoringKeys.executionHealth(workOSOrganizationId, timeRange),
|
|
122
146
|
queryFn: async () => {
|
|
123
147
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
124
148
|
return apiRequest(`/observability/dashboard?startDate=${startDate}&endDate=${endDate}`);
|
|
@@ -134,7 +158,7 @@ function useNotificationCount(args) {
|
|
|
134
158
|
const { notificationCount, notificationConnected, notificationError } = args;
|
|
135
159
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
136
160
|
const query = useQuery({
|
|
137
|
-
queryKey:
|
|
161
|
+
queryKey: notificationKeys.unreadCount(workOSOrganizationId),
|
|
138
162
|
queryFn: async () => {
|
|
139
163
|
const response = await apiRequest("/notifications/unread-count");
|
|
140
164
|
return response.count;
|
|
@@ -167,7 +191,7 @@ function useMarkAsRead() {
|
|
|
167
191
|
});
|
|
168
192
|
},
|
|
169
193
|
onSuccess: () => {
|
|
170
|
-
queryClient.invalidateQueries({ queryKey:
|
|
194
|
+
queryClient.invalidateQueries({ queryKey: notificationKeys.all });
|
|
171
195
|
},
|
|
172
196
|
onError: (error) => {
|
|
173
197
|
notify.apiError(error);
|
|
@@ -185,7 +209,7 @@ function useMarkAllAsRead() {
|
|
|
185
209
|
});
|
|
186
210
|
},
|
|
187
211
|
onSuccess: () => {
|
|
188
|
-
queryClient.invalidateQueries({ queryKey:
|
|
212
|
+
queryClient.invalidateQueries({ queryKey: notificationKeys.all });
|
|
189
213
|
},
|
|
190
214
|
onError: (error) => {
|
|
191
215
|
notify.apiError(error);
|
|
@@ -243,7 +267,7 @@ function useTestNotification() {
|
|
|
243
267
|
});
|
|
244
268
|
},
|
|
245
269
|
onSuccess: () => {
|
|
246
|
-
queryClient.invalidateQueries({ queryKey:
|
|
270
|
+
queryClient.invalidateQueries({ queryKey: notificationKeys.all });
|
|
247
271
|
},
|
|
248
272
|
onError: (error) => {
|
|
249
273
|
adapter.apiError(error);
|
|
@@ -302,4 +326,4 @@ function useExecutionLogsFilters(_timeRange) {
|
|
|
302
326
|
return { filters, updateFilter, resetFilters };
|
|
303
327
|
}
|
|
304
328
|
|
|
305
|
-
export { useActivities, useActivityFilters, useActivityTrend, useBatchDelete, useCostSummary, useErrorNotification, useExecutionHealth, useExecutionLogs, useExecutionLogsFilters, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useSuccessNotification, useTestNotification, useWarningNotification };
|
|
329
|
+
export { activityKeys, costAnalyticsKeys, monitoringKeys, notificationKeys, useActivities, useActivityFilters, useActivityTrend, useBatchDelete, useCostSummary, useErrorNotification, useExecutionHealth, useExecutionLogs, useExecutionLogsFilters, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useSuccessNotification, useTestNotification, useWarningNotification };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrganizationContext } from './chunk-DD3CCMCZ.js';
|
|
2
|
-
import { APIClientError } from './chunk-
|
|
2
|
+
import { APIClientError } from './chunk-DEZW7QDI.js';
|
|
3
3
|
import { createContext, useContext, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -44,7 +44,15 @@ var HTTP_HEADERS = {
|
|
|
44
44
|
*/
|
|
45
45
|
WORKOS_ORGANIZATION_ID: "workos-organization-id",
|
|
46
46
|
AGENT_ORGANIZATION: "x-agent-organization",
|
|
47
|
-
AGENT_MODE: "x-agent-mode"
|
|
47
|
+
AGENT_MODE: "x-agent-mode",
|
|
48
|
+
/**
|
|
49
|
+
* Correlation id for one request, echoed on every API response and carried in the
|
|
50
|
+
* `requestId` field of every error envelope. Read on the way in as well: a caller
|
|
51
|
+
* that already has an id for the work (a proxy, or the CLI driving a multi-step
|
|
52
|
+
* operation) sets it and the API adopts it, so one id spans the whole chain instead
|
|
53
|
+
* of each hop minting its own.
|
|
54
|
+
*/
|
|
55
|
+
REQUEST_ID: "x-request-id"
|
|
48
56
|
};
|
|
49
57
|
|
|
50
58
|
// src/api/hooks/useApiClient.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSupabase } from './chunk-MKH2KOAO.js';
|
|
2
|
-
import { useNotificationAdapter } from './chunk-
|
|
2
|
+
import { useNotificationAdapter } from './chunk-PSGSFPWA.js';
|
|
3
3
|
import { useQueryClient, useMutation } from '@tanstack/react-query';
|
|
4
4
|
|
|
5
5
|
// ../core/src/supabase/helpers.ts
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { useCyberColors, useResourcesHealth, EmptyState, CyberLegendItem, CyberAreaChart } from './chunk-
|
|
1
|
+
import { useResolvedTimeRange, useCyberColors, useResourcesHealth, EmptyState, CyberLegendItem, CyberAreaChart } from './chunk-PSGSFPWA.js';
|
|
2
2
|
import { CardHeader } from './chunk-62GVNH5U.js';
|
|
3
|
-
import { getTimeRangeDates, formatBucketTime } from './chunk-
|
|
3
|
+
import { getTimeRangeDates, formatBucketTime } from './chunk-6XBZPKMI.js';
|
|
4
4
|
import { Paper, Center, Loader, Group } from '@mantine/core';
|
|
5
5
|
import { IconActivity, IconChartBar } from '@tabler/icons-react';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
-
function ResourceHealthPanel({ resourceId, resourceType, timeRange }) {
|
|
9
|
+
function ResourceHealthPanel({ resourceId, resourceType, timeRange: timeRangeProp }) {
|
|
10
|
+
const timeRange = useResolvedTimeRange(timeRangeProp);
|
|
10
11
|
const colors = useCyberColors();
|
|
11
12
|
const { startDate, endDate } = useMemo(() => getTimeRangeDates(timeRange), [timeRange]);
|
|
12
13
|
const granularity = ["1h", "24h"].includes(timeRange) ? "hour" : "day";
|
|
@@ -116,28 +116,19 @@ function getErrorInfo(error) {
|
|
|
116
116
|
message: String(error)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
+
var ERROR_TITLES = {
|
|
120
|
+
VALIDATION_ERROR: "Validation Error",
|
|
121
|
+
AUTHENTICATION_FAILED: "Authentication Required",
|
|
122
|
+
FORBIDDEN: "Access Denied",
|
|
123
|
+
NOT_FOUND: "Not Found",
|
|
124
|
+
CONFLICT: "Conflict",
|
|
125
|
+
RATE_LIMIT_EXCEEDED: "Rate Limit Exceeded",
|
|
126
|
+
INTERNAL_SERVER_ERROR: "Server Error",
|
|
127
|
+
SERVICE_UNAVAILABLE: "Service Temporarily Unavailable"
|
|
128
|
+
};
|
|
119
129
|
function getErrorTitle(code) {
|
|
120
130
|
if (!code) return "Error";
|
|
121
|
-
|
|
122
|
-
case "VALIDATION_ERROR":
|
|
123
|
-
return "Validation Error";
|
|
124
|
-
case "AUTHENTICATION_FAILED":
|
|
125
|
-
return "Authentication Required";
|
|
126
|
-
case "FORBIDDEN":
|
|
127
|
-
return "Access Denied";
|
|
128
|
-
case "NOT_FOUND":
|
|
129
|
-
return "Not Found";
|
|
130
|
-
case "CONFLICT":
|
|
131
|
-
return "Conflict";
|
|
132
|
-
case "RATE_LIMIT_EXCEEDED":
|
|
133
|
-
return "Rate Limit Exceeded";
|
|
134
|
-
case "INTERNAL_SERVER_ERROR":
|
|
135
|
-
return "Server Error";
|
|
136
|
-
case "SERVICE_UNAVAILABLE":
|
|
137
|
-
return "Service Temporarily Unavailable";
|
|
138
|
-
default:
|
|
139
|
-
return "Error";
|
|
140
|
-
}
|
|
131
|
+
return ERROR_TITLES[code] ?? "Error";
|
|
141
132
|
}
|
|
142
133
|
function formatErrorMessage(message, requestId, fields, retryAfter) {
|
|
143
134
|
let formatted = message;
|
|
@@ -165,6 +156,17 @@ Request ID: ${requestId}`;
|
|
|
165
156
|
}
|
|
166
157
|
return formatted;
|
|
167
158
|
}
|
|
159
|
+
|
|
160
|
+
// src/utils/queryString.ts
|
|
161
|
+
function buildQueryString(params) {
|
|
162
|
+
const searchParams = new URLSearchParams();
|
|
163
|
+
for (const [key, value] of Object.entries(params)) {
|
|
164
|
+
if (value === void 0) continue;
|
|
165
|
+
searchParams.set(key, String(value));
|
|
166
|
+
}
|
|
167
|
+
const queryString = searchParams.toString();
|
|
168
|
+
return queryString ? `?${queryString}` : "";
|
|
169
|
+
}
|
|
168
170
|
var ORGANIZATION_MODEL_ICON_TOKENS = [
|
|
169
171
|
// Navigation / app areas
|
|
170
172
|
"dashboard",
|
|
@@ -1065,14 +1067,25 @@ var SystemEntrySchema = z.object({
|
|
|
1065
1067
|
* position-derived paths. Both still exist on this schema for backward compat.
|
|
1066
1068
|
*/
|
|
1067
1069
|
systems: z.lazy(() => z.record(z.string().trim().min(1).max(100), SystemEntrySchema)).optional(),
|
|
1068
|
-
/**
|
|
1070
|
+
/**
|
|
1071
|
+
* @deprecated Use systems. Accepted as a compatibility alias during the ontology bridge.
|
|
1072
|
+
*
|
|
1073
|
+
* Accepted on INPUT only. Parsing used to mirror `systems` into this key so that
|
|
1074
|
+
* either spelling could be read off a parsed model, which meant every parsed System
|
|
1075
|
+
* carried the same children twice. Readers that walked both keys then visited each
|
|
1076
|
+
* nested System twice -- `getOrgOsRouteContractSystems` reported 11 checked paths
|
|
1077
|
+
* against command-center's 7 real Systems and would have raised every nested-System
|
|
1078
|
+
* failure as two failures -- and readers that walked this key alone looked correct
|
|
1079
|
+
* while depending entirely on the mirror. Both defects were live. The mirror is gone:
|
|
1080
|
+
* a parsed model now carries children under whichever key the author wrote, so read
|
|
1081
|
+
* `system.systems ?? system.subsystems` (helpers.ts, validation.ts, ontology.ts,
|
|
1082
|
+
* selectDeclaredSystems.ts, validateManifests.ts and SystemOpsView.tsx all do).
|
|
1083
|
+
*/
|
|
1069
1084
|
subsystems: z.lazy(() => z.record(z.string().trim().min(1).max(100), SystemEntrySchema)).optional()
|
|
1070
1085
|
}).strict().refine((system) => system.label !== void 0 || system.title !== void 0, {
|
|
1071
1086
|
path: ["label"],
|
|
1072
1087
|
message: "System must provide label or title"
|
|
1073
|
-
})
|
|
1074
|
-
(system) => system.systems !== void 0 && system.subsystems === void 0 ? { ...system, subsystems: system.systems } : system
|
|
1075
|
-
);
|
|
1088
|
+
});
|
|
1076
1089
|
var SystemsDomainSchema = z.record(z.string(), SystemEntrySchema).refine((record) => Object.entries(record).every(([key, entry]) => entry.id === key), {
|
|
1077
1090
|
message: "Each system entry id must match its map key"
|
|
1078
1091
|
}).default({});
|
|
@@ -1528,4 +1541,4 @@ function setupBrowserMocks() {
|
|
|
1528
1541
|
setupResizeObserver();
|
|
1529
1542
|
}
|
|
1530
1543
|
|
|
1531
|
-
export { APIClientError, API_URL, ActionInvocationSchema, ActionSchema, ActionsDomainSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DescriptionSchema, EntitiesDomainSchema, EntitySchema, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, IconNameSchema, JsonValueSchema, LIMIT_ACTIVITY_FEED, LabelSchema, ModelIdSchema, NodeIdStringSchema, OAUTH_FLOW_TIMEOUT, OntologyIdSchema, OntologyScopeSchema, PAGE_SIZE_DEFAULT, PathSchema, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, SYSTEM_INTERFACE_PROFILES, SystemEntrySchema, SystemIdSchema, SystemInterfaceRefSchema, SystemLifecycleSchema, SystemPathSchema, SystemsDomainSchema, addReadinessIssue, ancestorsOf, childrenOf, compileOrganizationOntology, computeInterfaceReadiness, defaultPathFor, devOnlyFor, findById, findByPath, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatInterfaceIdentity, formatOntologyId, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getResourcesForSystem, getSystem, getSystemAncestors, getSystemReadinessServerErrorDetails, isAPIClientError, isSystemLifecycleVisible, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, parentOf, parseOntologyId, registerBuiltInReadinessProfile, registerReadinessInterfaceMarker, requireCatalogReadiness, requireContractReadiness, requireScopedBinding, resolveReadinessRemedy, resolveSystemConfig, resourceBindingIds, restoreConsole, setupBrowserMocks, suppressKnownWarnings, systemLifecycleAllowsAccess, topLevel, validateEmail };
|
|
1544
|
+
export { APIClientError, API_URL, ActionInvocationSchema, ActionSchema, ActionsDomainSchema, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DescriptionSchema, EntitiesDomainSchema, EntitySchema, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, IconNameSchema, JsonValueSchema, LIMIT_ACTIVITY_FEED, LabelSchema, ModelIdSchema, NodeIdStringSchema, OAUTH_FLOW_TIMEOUT, OntologyIdSchema, OntologyScopeSchema, PAGE_SIZE_DEFAULT, PathSchema, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, SYSTEM_INTERFACE_PROFILES, SystemEntrySchema, SystemIdSchema, SystemInterfaceRefSchema, SystemLifecycleSchema, SystemPathSchema, SystemsDomainSchema, addReadinessIssue, ancestorsOf, buildQueryString, childrenOf, compileOrganizationOntology, computeInterfaceReadiness, defaultPathFor, devOnlyFor, findById, findByPath, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatInterfaceIdentity, formatOntologyId, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getResourcesForSystem, getSystem, getSystemAncestors, getSystemReadinessServerErrorDetails, isAPIClientError, isSystemLifecycleVisible, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, parentOf, parseOntologyId, registerBuiltInReadinessProfile, registerReadinessInterfaceMarker, requireCatalogReadiness, requireContractReadiness, requireScopedBinding, resolveReadinessRemedy, resolveSystemConfig, resourceBindingIds, restoreConsole, setupBrowserMocks, suppressKnownWarnings, systemLifecycleAllowsAccess, topLevel, validateEmail };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppearanceContext } from './chunk-
|
|
1
|
+
import { AppearanceContext } from './chunk-PSGSFPWA.js';
|
|
2
2
|
import { ElevasisServiceContext } from './chunk-BI5VDO2K.js';
|
|
3
3
|
import { useContext, useState, useRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import { Paper, Stack, Title, Text, Group, Button, Anchor, Collapse, Badge, Code } from '@mantine/core';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { UuidSchema } from './chunk-
|
|
1
|
+
import { PaginationQuerySchema, UuidSchema } from './chunk-34B3ACOZ.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var NotificationCategorySchema = z.enum(["info", "queue", "alert", "error", "system"]);
|
|
5
5
|
var GetNotificationsQuerySchema = z.object({
|
|
6
|
-
|
|
7
|
-
offset: z.coerce.number().int().min(0).default(0)
|
|
6
|
+
...PaginationQuerySchema.shape
|
|
8
7
|
});
|
|
9
8
|
var MarkAsReadParamsSchema = z.object({
|
|
10
9
|
id: UuidSchema
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { showApiErrorNotification } from './chunk-
|
|
1
|
+
import { showApiErrorNotification } from './chunk-PNCJJE4Z.js';
|
|
2
|
+
import { buildQueryString } from './chunk-DEZW7QDI.js';
|
|
2
3
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
3
4
|
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
4
5
|
|
|
@@ -95,12 +96,11 @@ function useTasks(filters = {}) {
|
|
|
95
96
|
return useQuery({
|
|
96
97
|
queryKey: taskKeys.list(workOSOrganizationId, filters),
|
|
97
98
|
queryFn: async () => {
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
const path = qs ? `${base}?${qs}` : base;
|
|
99
|
+
const query = buildQueryString({
|
|
100
|
+
status: filters.status || void 0,
|
|
101
|
+
milestone_id: filters.milestoneId || void 0
|
|
102
|
+
});
|
|
103
|
+
const path = `/projects/${filters.projectId}/tasks${query}`;
|
|
104
104
|
const res = await apiRequest(path);
|
|
105
105
|
return res.tasks;
|
|
106
106
|
},
|
|
@@ -223,10 +223,7 @@ function useProjects(filters = {}) {
|
|
|
223
223
|
return useQuery({
|
|
224
224
|
queryKey: projectKeys.list(workOSOrganizationId, filters),
|
|
225
225
|
queryFn: async () => {
|
|
226
|
-
const
|
|
227
|
-
if (filters.kind) params.set("kind", filters.kind);
|
|
228
|
-
const qs = params.toString();
|
|
229
|
-
const path = qs ? `/projects?${qs}` : "/projects";
|
|
226
|
+
const path = `/projects${buildQueryString({ kind: filters.kind || void 0 })}`;
|
|
230
227
|
const res = await apiRequest(path);
|
|
231
228
|
return res.projects;
|
|
232
229
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UuidSchema } from './chunk-
|
|
1
|
+
import { UuidSchema, PageLimitSchema } from './chunk-34B3ACOZ.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var SessionIdParamSchema = z.object({
|
|
@@ -33,10 +33,10 @@ z.object({
|
|
|
33
33
|
z.object({
|
|
34
34
|
userId: UuidSchema.optional(),
|
|
35
35
|
resourceId: z.string().optional(),
|
|
36
|
-
limit:
|
|
36
|
+
limit: PageLimitSchema.default(20)
|
|
37
37
|
}).strict();
|
|
38
38
|
z.object({
|
|
39
|
-
limit:
|
|
39
|
+
limit: PageLimitSchema.default(100),
|
|
40
40
|
cursor: z.coerce.number().int().min(0).optional()
|
|
41
41
|
}).strict();
|
|
42
42
|
var WebSocketSessionTurnSchema = z.object({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useDealDetail, useExecuteAction } from './chunk-
|
|
2
|
-
import { CRM_API_INTERFACE } from './chunk-
|
|
3
|
-
import { useCompany, useContact, deriveActions } from './chunk-
|
|
1
|
+
import { useDealDetail, useExecuteAction } from './chunk-QFKOHZM3.js';
|
|
2
|
+
import { CRM_API_INTERFACE } from './chunk-6J3SCCZ2.js';
|
|
3
|
+
import { useCompany, useContact, deriveActions } from './chunk-75OLN23F.js';
|
|
4
4
|
import { useTableSort, sortData } from './chunk-2Y6AKWGU.js';
|
|
5
|
-
import { getSystemApiInterfaceReadiness } from './chunk-
|
|
5
|
+
import { getSystemApiInterfaceReadiness } from './chunk-PJN6CMWZ.js';
|
|
6
6
|
import { useTableSelection } from './chunk-WDBNW44Z.js';
|
|
7
|
-
import { SubshellPageLayout } from './chunk-
|
|
7
|
+
import { SubshellPageLayout } from './chunk-SOBKRB4N.js';
|
|
8
8
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
9
9
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
10
10
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
11
|
-
import { SubshellSidebarSection, CrmSidebarMiddle, useDealsSummary, useOptionalElevasisSystems, getCrmPipelineCatalog, CenteredErrorState, StatCard, PageTitleCaption, useDeleteDeal, usePaginationState, useDeals, SubshellContentContainer, EmptyState, CustomModal, useCrmActions, ActivityTimeline, ContextViewer, JsonViewer, dealKeys } from './chunk-
|
|
12
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
11
|
+
import { SubshellSidebarSection, CrmSidebarMiddle, useDealsSummary, useOptionalElevasisSystems, getCrmPipelineCatalog, CenteredErrorState, StatCard, PageTitleCaption, useDeleteDeal, usePaginationState, useDeals, SubshellContentContainer, EmptyState, CustomModal, useCrmActions, ActivityTimeline, ContextViewer, JsonViewer, dealKeys } from './chunk-PSGSFPWA.js';
|
|
12
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-PNCJJE4Z.js';
|
|
13
13
|
import { CardHeader } from './chunk-62GVNH5U.js';
|
|
14
|
-
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-
|
|
14
|
+
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-DEZW7QDI.js';
|
|
15
15
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
16
16
|
import { Stack, Paper, Center, Loader, Group, Box, Text, Alert, Table, SimpleGrid, Button, Select, TextInput, Tabs, Checkbox, Badge, Tooltip, Pagination, Title, Code, Card, SegmentedControl, Switch, NumberInput, ColorSwatch, Popover, ActionIcon, Anchor, CopyButton, Divider, Textarea } from '@mantine/core';
|
|
17
17
|
import { IconAddressBook, IconColumns, IconHistory, IconAlertCircle, IconCurrencyDollar, IconChartBar, IconBriefcase, IconTrophy, IconSearch, IconTargetArrow, IconAlertTriangle, IconMessages, IconArrowLeft, IconFileText, IconInbox, IconUser, IconBolt, IconBuilding, IconSettings, IconRestore, IconInfoCircle, IconMailForward, IconPlus, IconArrowRight, IconNote, IconCheck, IconCopy } from '@tabler/icons-react';
|
|
@@ -1,33 +1,17 @@
|
|
|
1
|
-
import { projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-
|
|
2
|
-
import { leadGenListMemberKeys } from './chunk-
|
|
1
|
+
import { projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-HDITVHZT.js';
|
|
2
|
+
import { leadGenListMemberKeys } from './chunk-5GYJ3IDO.js';
|
|
3
3
|
import { useSupabase } from './chunk-MKH2KOAO.js';
|
|
4
|
-
import { companyKeys, contactKeys } from './chunk-
|
|
5
|
-
import { useErrorNotification } from './chunk-
|
|
6
|
-
import { useNotificationAdapter, dealKeys, acquisitionListKeys, useListsTelemetry, useOptionalElevasisSystems, useSSEConnection } from './chunk-
|
|
7
|
-
import { HTTP_HEADERS } from './chunk-
|
|
8
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { companyKeys, contactKeys } from './chunk-75OLN23F.js';
|
|
5
|
+
import { useErrorNotification, activityKeys } from './chunk-7D4FKBB4.js';
|
|
6
|
+
import { useNotificationAdapter, dealKeys, acquisitionListKeys, useListsTelemetry, useOptionalElevasisSystems, useSSEConnection } from './chunk-PSGSFPWA.js';
|
|
7
|
+
import { HTTP_HEADERS } from './chunk-7RS2NUC6.js';
|
|
8
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-PNCJJE4Z.js';
|
|
9
|
+
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
10
|
+
import { STALE_TIME_ADMIN } from './chunk-DEZW7QDI.js';
|
|
11
11
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
12
|
-
import {
|
|
13
|
-
import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
|
|
12
|
+
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
14
13
|
import { notifications } from '@mantine/notifications';
|
|
15
|
-
|
|
16
|
-
function useCreateOrgRole() {
|
|
17
|
-
const { apiRequest } = useElevasisServices();
|
|
18
|
-
const organization = useContext(OrganizationContext);
|
|
19
|
-
const orgId = organization?.currentSupabaseOrganizationId ?? null;
|
|
20
|
-
const queryClient = useQueryClient();
|
|
21
|
-
return useMutation({
|
|
22
|
-
mutationFn: (input) => apiRequest(`/organizations/${orgId}/roles`, {
|
|
23
|
-
method: "POST",
|
|
24
|
-
body: JSON.stringify(input)
|
|
25
|
-
}),
|
|
26
|
-
onSettled: () => {
|
|
27
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles", orgId] });
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
14
|
+
import { useEffect, useState, useRef, useCallback, useMemo } from 'react';
|
|
31
15
|
|
|
32
16
|
// src/hooks/settings/api-keys/apiKeyService.ts
|
|
33
17
|
var ApiKeyService = class {
|
|
@@ -68,10 +52,16 @@ var ApiKeyService = class {
|
|
|
68
52
|
});
|
|
69
53
|
}
|
|
70
54
|
};
|
|
55
|
+
|
|
56
|
+
// src/hooks/settings/api-keys/queryKeys.ts
|
|
57
|
+
var apiKeysKeys = {
|
|
58
|
+
all: ["api-keys"],
|
|
59
|
+
list: (organizationId) => [...apiKeysKeys.all, organizationId]
|
|
60
|
+
};
|
|
71
61
|
function useListApiKeys() {
|
|
72
62
|
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
73
63
|
return useQuery({
|
|
74
|
-
queryKey:
|
|
64
|
+
queryKey: apiKeysKeys.list(workOSOrganizationId),
|
|
75
65
|
queryFn: async () => {
|
|
76
66
|
const service = new ApiKeyService(apiRequest);
|
|
77
67
|
return await service.listApiKeys();
|
|
@@ -89,7 +79,7 @@ function useCreateApiKey() {
|
|
|
89
79
|
return await service.createApiKey(data);
|
|
90
80
|
},
|
|
91
81
|
onSuccess: () => {
|
|
92
|
-
queryClient.invalidateQueries({ queryKey:
|
|
82
|
+
queryClient.invalidateQueries({ queryKey: apiKeysKeys.all });
|
|
93
83
|
notifications.show({
|
|
94
84
|
title: "Success",
|
|
95
85
|
message: "API key created successfully. Please save it immediately!",
|
|
@@ -112,7 +102,7 @@ function useDeleteApiKey() {
|
|
|
112
102
|
return await service.deleteApiKey(keyId);
|
|
113
103
|
},
|
|
114
104
|
onSuccess: () => {
|
|
115
|
-
queryClient.invalidateQueries({ queryKey:
|
|
105
|
+
queryClient.invalidateQueries({ queryKey: apiKeysKeys.all });
|
|
116
106
|
notifications.show({
|
|
117
107
|
title: "Success",
|
|
118
108
|
message: "API key deleted successfully",
|
|
@@ -135,7 +125,7 @@ function useUpdateApiKey() {
|
|
|
135
125
|
return await service.updateApiKey(keyId, { name });
|
|
136
126
|
},
|
|
137
127
|
onSuccess: () => {
|
|
138
|
-
queryClient.invalidateQueries({ queryKey:
|
|
128
|
+
queryClient.invalidateQueries({ queryKey: apiKeysKeys.all });
|
|
139
129
|
notifications.show({
|
|
140
130
|
title: "Success",
|
|
141
131
|
message: "API key renamed successfully",
|
|
@@ -172,6 +162,12 @@ var DeploymentService = class {
|
|
|
172
162
|
}
|
|
173
163
|
};
|
|
174
164
|
|
|
165
|
+
// src/hooks/settings/deployments/queryKeys.ts
|
|
166
|
+
var deploymentsKeys = {
|
|
167
|
+
all: ["deployments"],
|
|
168
|
+
list: (organizationId) => [...deploymentsKeys.all, organizationId]
|
|
169
|
+
};
|
|
170
|
+
|
|
175
171
|
// src/hooks/settings/deployments/useDeploymentActions.ts
|
|
176
172
|
function useActivateDeployment() {
|
|
177
173
|
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
@@ -183,7 +179,7 @@ function useActivateDeployment() {
|
|
|
183
179
|
return service.activateDeployment(deploymentId);
|
|
184
180
|
},
|
|
185
181
|
onSuccess: () => {
|
|
186
|
-
queryClient.invalidateQueries({ queryKey:
|
|
182
|
+
queryClient.invalidateQueries({ queryKey: deploymentsKeys.list(workOSOrganizationId) });
|
|
187
183
|
notifications.show({ title: "Success", message: "Deployment activated", color: "teal" });
|
|
188
184
|
},
|
|
189
185
|
onError: (error) => {
|
|
@@ -202,7 +198,7 @@ function useDeactivateDeployment() {
|
|
|
202
198
|
return service.deactivateDeployment(deploymentId);
|
|
203
199
|
},
|
|
204
200
|
onSuccess: () => {
|
|
205
|
-
queryClient.invalidateQueries({ queryKey:
|
|
201
|
+
queryClient.invalidateQueries({ queryKey: deploymentsKeys.list(workOSOrganizationId) });
|
|
206
202
|
notifications.show({ title: "Success", message: "Deployment deactivated", color: "teal" });
|
|
207
203
|
},
|
|
208
204
|
onError: (error) => {
|
|
@@ -221,7 +217,7 @@ function useDeleteDeployment() {
|
|
|
221
217
|
return service.deleteDeployment(deploymentId);
|
|
222
218
|
},
|
|
223
219
|
onSuccess: () => {
|
|
224
|
-
queryClient.invalidateQueries({ queryKey:
|
|
220
|
+
queryClient.invalidateQueries({ queryKey: deploymentsKeys.list(workOSOrganizationId) });
|
|
225
221
|
notifications.show({ title: "Success", message: "Deployment deleted", color: "teal" });
|
|
226
222
|
},
|
|
227
223
|
onError: (error) => {
|
|
@@ -233,7 +229,7 @@ function useDeleteDeployment() {
|
|
|
233
229
|
function useListDeployments() {
|
|
234
230
|
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
235
231
|
return useQuery({
|
|
236
|
-
queryKey:
|
|
232
|
+
queryKey: deploymentsKeys.list(workOSOrganizationId),
|
|
237
233
|
queryFn: async () => {
|
|
238
234
|
const service = new DeploymentService(apiRequest);
|
|
239
235
|
return await service.listDeployments();
|
|
@@ -301,47 +297,6 @@ function useProjectActivities(projectId, enabled = true) {
|
|
|
301
297
|
enabled: isReady && !!projectId && enabled
|
|
302
298
|
});
|
|
303
299
|
}
|
|
304
|
-
function useUpdateOrgRole() {
|
|
305
|
-
const { apiRequest } = useElevasisServices();
|
|
306
|
-
const organization = useContext(OrganizationContext);
|
|
307
|
-
const orgId = organization?.currentSupabaseOrganizationId ?? null;
|
|
308
|
-
const queryClient = useQueryClient();
|
|
309
|
-
return useMutation({
|
|
310
|
-
mutationFn: ({ roleId, input }) => apiRequest(`/organizations/${orgId}/roles/${roleId}`, {
|
|
311
|
-
method: "PATCH",
|
|
312
|
-
body: JSON.stringify(input)
|
|
313
|
-
}),
|
|
314
|
-
onSettled: (_data, _error, { roleId }) => {
|
|
315
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles", orgId] });
|
|
316
|
-
queryClient.invalidateQueries({ queryKey: ["org-role", orgId, roleId] });
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
function useDeleteOrgRole() {
|
|
321
|
-
const { apiRequest } = useElevasisServices();
|
|
322
|
-
const organization = useContext(OrganizationContext);
|
|
323
|
-
const orgId = organization?.currentSupabaseOrganizationId ?? null;
|
|
324
|
-
const queryClient = useQueryClient();
|
|
325
|
-
return useMutation({
|
|
326
|
-
mutationFn: (roleId) => apiRequest(`/organizations/${orgId}/roles/${roleId}`, {
|
|
327
|
-
method: "DELETE"
|
|
328
|
-
}),
|
|
329
|
-
onSettled: () => {
|
|
330
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles", orgId] });
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
function useEffectivePermissions(membershipId) {
|
|
335
|
-
const { apiRequest, isReady } = useElevasisServices();
|
|
336
|
-
const organization = useContext(OrganizationContext);
|
|
337
|
-
const orgId = organization?.currentSupabaseOrganizationId ?? null;
|
|
338
|
-
return useQuery({
|
|
339
|
-
queryKey: ["member-roles", orgId, membershipId],
|
|
340
|
-
queryFn: () => apiRequest(`/memberships/${membershipId}/effective-permissions`),
|
|
341
|
-
enabled: isReady && !!membershipId,
|
|
342
|
-
staleTime: STALE_TIME_DEFAULT
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
300
|
function useActivitiesRealtime(organizationId, enabled) {
|
|
346
301
|
const queryClient = useQueryClient();
|
|
347
302
|
const supabase = useSupabase();
|
|
@@ -358,7 +313,7 @@ function useActivitiesRealtime(organizationId, enabled) {
|
|
|
358
313
|
filter: `organization_id=eq.${organizationId}`
|
|
359
314
|
},
|
|
360
315
|
() => {
|
|
361
|
-
queryClient.invalidateQueries({ queryKey:
|
|
316
|
+
queryClient.invalidateQueries({ queryKey: activityKeys.all });
|
|
362
317
|
}
|
|
363
318
|
).subscribe();
|
|
364
319
|
return () => {
|
|
@@ -613,4 +568,4 @@ function useProjectRealtime(projectId) {
|
|
|
613
568
|
});
|
|
614
569
|
}
|
|
615
570
|
|
|
616
|
-
export { ApiKeyService, DeploymentService, dealNoteKeys, projectActivityKeys, useActivateDeployment, useActivitiesRealtime, useAddCompaniesToList, useAddContactsToList, useBatchTelemetry, useCreateApiKey, useCreateDealNote,
|
|
571
|
+
export { ApiKeyService, DeploymentService, apiKeysKeys, dealNoteKeys, deploymentsKeys, projectActivityKeys, useActivateDeployment, useActivitiesRealtime, useAddCompaniesToList, useAddContactsToList, useBatchTelemetry, useCreateApiKey, useCreateDealNote, useDeactivateDeployment, useDealNotes, useDeleteApiKey, useDeleteDeployment, useListApiKeys, useListDeployments, useProjectActivities, useProjectRealtime, useRemoveCompaniesFromList, useResourceErrors, useTransitionItem, useTransitionState, useUpdateApiKey, useVisibleResources };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
2
|
-
import { sidebarItemGap, sidebarSubLinkPaddingY, sidebarSubLinkPaddingX, sidebarSubLinkIndent, sidebarHoverDelay, sidebarTransitionDuration, sidebarCollapsedWidth, sidebarWidth, topbarHeight, sidebarToggleIconSize, sidebarSectionPadding, NavigationButton, useAppearance, sidebarGroupChevronSize, sidebarIconInnerSize, SubshellNavItem, useElevasisSystems } from './chunk-
|
|
2
|
+
import { sidebarItemGap, sidebarSubLinkPaddingY, sidebarSubLinkPaddingX, sidebarSubLinkIndent, sidebarHoverDelay, sidebarTransitionDuration, sidebarCollapsedWidth, sidebarWidth, topbarHeight, sidebarToggleIconSize, sidebarSectionPadding, NavigationButton, useAppearance, sidebarGroupChevronSize, sidebarIconInnerSize, SubshellNavItem, useElevasisSystems } from './chunk-PSGSFPWA.js';
|
|
3
3
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { createContext, memo, useEffect, useRef, createElement, useContext, useLayoutEffect, useState, Fragment as Fragment$1 } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { topbarHeight, useAppearance } from './chunk-
|
|
1
|
+
import { topbarHeight, useAppearance } from './chunk-PSGSFPWA.js';
|
|
2
2
|
import { Stack, Title, Button } from '@mantine/core';
|
|
3
3
|
import { IconAlertCircle } from '@tabler/icons-react';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|