@elevasis/ui 2.78.0 → 2.80.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.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-BLXJEIQS.js → chunk-2HXDI4RY.js} +1 -1
- package/dist/{chunk-FI66TKYS.js → chunk-2KXSFLU2.js} +8 -2
- package/dist/{chunk-TVTSASST.js → chunk-34B3ACOZ.js} +9 -1
- package/dist/{chunk-KXNRTJAE.js → chunk-3HMRK3RC.js} +1 -1
- package/dist/{chunk-S3ETKY5C.js → chunk-3UO2CJTR.js} +1 -1
- package/dist/{chunk-YUWR4UX7.js → chunk-52G4B33T.js} +13 -7
- package/dist/{chunk-4A6S4WAT.js → chunk-6IWH757Q.js} +4 -3
- package/dist/{chunk-4TABB2PA.js → chunk-6MWTTBBT.js} +6 -6
- package/dist/{chunk-M3DWVFRT.js → chunk-7A25EJ4A.js} +148 -85
- package/dist/{chunk-SVZR4GYA.js → chunk-A32PJ2DO.js} +1 -1
- package/dist/{chunk-LMAYDNQL.js → chunk-BG7VCCFB.js} +1 -1
- package/dist/{chunk-WGSEITGL.js → chunk-BXFZ676L.js} +222 -191
- package/dist/{chunk-5ZK7K7YP.js → chunk-CIGWHY7C.js} +23 -21
- package/dist/{chunk-FFVZB25A.js → chunk-CSEADI37.js} +3 -3
- package/dist/{chunk-3RK2NNJX.js → chunk-DFGQG32T.js} +1 -1
- package/dist/{chunk-VM2OWOXL.js → chunk-GY7FXTC4.js} +2 -3
- package/dist/{chunk-P6HHXMLJ.js → chunk-HVNDBY42.js} +10 -9
- package/dist/{chunk-VBGXFKZ2.js → chunk-I5SYS6DT.js} +5 -5
- package/dist/{chunk-2GIJBHZT.js → chunk-IIMC4TRH.js} +3 -3
- package/dist/{chunk-JKNIXSJT.js → chunk-JDPPV2XI.js} +21 -14
- package/dist/{chunk-NBG3V52P.js → chunk-JZBMZLD3.js} +1 -1
- package/dist/{chunk-JZQNUQE4.js → chunk-KGUBFIMQ.js} +1 -1
- package/dist/{chunk-GFSOQH3N.js → chunk-MJIDC25O.js} +8 -11
- package/dist/{chunk-IWNVPPWF.js → chunk-MMOR2HQZ.js} +38 -78
- package/dist/{chunk-L42Z3VZM.js → chunk-NGRRAYMO.js} +22 -39
- package/dist/{chunk-TRACEZWZ.js → chunk-NKMBW7WE.js} +26 -21
- package/dist/{chunk-57QSONG5.js → chunk-Q6HRTWA6.js} +1 -1
- package/dist/{chunk-FD3XRRKM.js → chunk-QQKYBGBX.js} +22 -11
- package/dist/{chunk-B74K5EC2.js → chunk-QSN7BWI3.js} +1 -1
- package/dist/{chunk-MWWBHRFO.js → chunk-SPH5WW44.js} +5 -5
- package/dist/{chunk-WJWYTXGQ.js → chunk-T6AOVZAI.js} +14 -10
- package/dist/{chunk-AVGXLMSH.js → chunk-U3GB5PDF.js} +4 -4
- package/dist/{chunk-SU4T5DCZ.js → chunk-VHK5J55Q.js} +8 -8
- package/dist/{chunk-F3YFAATR.js → chunk-VKA4LQ7N.js} +1 -1
- package/dist/{chunk-IYLJ4CBC.js → chunk-W6QOWA3L.js} +11 -10
- package/dist/{chunk-N6K2Q5BM.js → chunk-WDABHUIL.js} +9 -21
- package/dist/{chunk-2LLCOS4V.js → chunk-WOYW24U7.js} +1 -1
- package/dist/{chunk-Y2IHJRHM.js → chunk-XEO2UG4J.js} +15 -9
- package/dist/{chunk-UD657ICS.js → chunk-YJ437RDY.js} +29 -16
- package/dist/{chunk-INCEZAM3.js → chunk-YSFLFD4U.js} +1 -1
- package/dist/{chunk-5OBIZIWW.js → chunk-ZU676PFP.js} +38 -14
- package/dist/components/index.d.ts +18 -6
- 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.js +12 -12
- package/dist/features/clients/index.js +14 -15
- package/dist/features/content/index.js +13 -13
- 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.js +25 -25
- package/dist/features/knowledge/index.js +10 -10
- package/dist/features/lead-gen/index.d.ts +49 -32
- 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.js +13 -13
- 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.js +6 -6
- package/dist/hooks/published.d.ts +332 -99
- package/dist/hooks/published.js +23 -23
- package/dist/hooks/user-notes/index.js +1 -1
- package/dist/initialization/index.d.ts +12 -0
- package/dist/initialization/index.js +1 -1
- package/dist/knowledge/index.js +22 -20
- package/dist/{knowledge-search-index-6GQK55IQ.js → knowledge-search-index-YU6V3FTK.js} +4 -4
- 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.js +1 -1
- package/dist/provider/ElevasisServiceContext.js +1 -1
- package/dist/provider/index.js +10 -10
- package/dist/provider/published.js +10 -10
- package/dist/sse/index.js +14 -0
- package/dist/test-utils/index.js +6 -6
- package/dist/types/index.d.ts +12 -0
- package/dist/utils/index.d.ts +20 -2
- 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-6SSQGWK7.js → chunk-7ZUXA2NW.js} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { eqOrgId, sanitizePostgrestValue, useBatchDeleteRows } from './chunk-
|
|
1
|
+
import { eqOrgId, sanitizePostgrestValue, useBatchDeleteRows } from './chunk-2KXSFLU2.js';
|
|
2
2
|
import { useSupabase } from './chunk-MKH2KOAO.js';
|
|
3
3
|
import { useTableSort, sortData } from './chunk-2Y6AKWGU.js';
|
|
4
4
|
import { useTableSelection } from './chunk-WDBNW44Z.js';
|
|
5
|
-
import { SubshellPageLayout } from './chunk-
|
|
5
|
+
import { SubshellPageLayout } from './chunk-Q6HRTWA6.js';
|
|
6
6
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
7
7
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
8
|
-
import { usePaginationState, PageTitleCaption, StatCard, EmptyState, CustomModal, SubshellContentContainer } from './chunk-
|
|
9
|
-
import { showApiErrorNotification } from './chunk-
|
|
8
|
+
import { usePaginationState, PageTitleCaption, StatCard, EmptyState, CustomModal, SubshellContentContainer } from './chunk-7A25EJ4A.js';
|
|
9
|
+
import { showApiErrorNotification } from './chunk-3HMRK3RC.js';
|
|
10
10
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
11
|
-
import { PAGE_SIZE_DEFAULT } from './chunk-
|
|
11
|
+
import { PAGE_SIZE_DEFAULT } from './chunk-CIGWHY7C.js';
|
|
12
12
|
import { Stack, SimpleGrid, Paper, Select, TextInput, Group, Button, Center, Loader, Table, Checkbox, Text, Badge, Pagination, Title, Anchor, Card, Divider } from '@mantine/core';
|
|
13
13
|
import { IconFileText, IconCircleCheck, IconPencil, IconAlertTriangle, IconEye, IconClick, IconTarget, IconBrain, IconSearch, IconFilterOff, IconExternalLink, IconArrowLeft, IconPercentage, IconChartLine, IconForms } from '@tabler/icons-react';
|
|
14
14
|
import { useState, useMemo } from 'react';
|
|
@@ -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,23 +1,23 @@
|
|
|
1
|
-
import { SubshellLoader } from './chunk-
|
|
2
|
-
import { CollapsibleJsonSection, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, AgentIterationDetailPanel } from './chunk-
|
|
3
|
-
import { useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useSessionMessages, useSessionWebSocket, useSessionExecutions } from './chunk-
|
|
4
|
-
import { findNavigationSurfaceForSystem, getSystemApiInterfaceReadiness } from './chunk-
|
|
1
|
+
import { SubshellLoader } from './chunk-WOYW24U7.js';
|
|
2
|
+
import { CollapsibleJsonSection, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, AgentIterationDetailPanel } from './chunk-QQKYBGBX.js';
|
|
3
|
+
import { useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useSessionMessages, useSessionWebSocket, useSessionExecutions } from './chunk-U3GB5PDF.js';
|
|
4
|
+
import { findNavigationSurfaceForSystem, getSystemApiInterfaceReadiness } from './chunk-DFGQG32T.js';
|
|
5
5
|
import { FormFieldRenderer } from './chunk-3MEXPLWT.js';
|
|
6
6
|
import { ChatInterface, ChatHeader } from './chunk-SNZDFCOQ.js';
|
|
7
7
|
import { mergeSessionMessages } from './chunk-QFGNRKIE.js';
|
|
8
|
-
import { ResourceHealthPanel } from './chunk-
|
|
9
|
-
import { AppShellLoader } from './chunk-
|
|
8
|
+
import { ResourceHealthPanel } from './chunk-6IWH757Q.js';
|
|
9
|
+
import { AppShellLoader } from './chunk-3UO2CJTR.js';
|
|
10
10
|
import { Graph_module_css_default } from './chunk-HENXLGVD.js';
|
|
11
11
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
12
|
-
import { DEFAULT_ORGANIZATION_GRAPH_FILTERS, resolveSemanticIconComponent, CustomModal, useAppearance, useErrorDetail, JsonViewer, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, ConfirmationModal, PageTitleCaption, CollapsibleSection, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, TabCountBadge, ResourceCard, useResourceDefinition, isSessionCapable, useOptionalElevasisSystems, useDeleteTask, useCommandQueue, useSubmitAction, useCommandQueueTask, ContextViewer, useElevasisSystems, buildOrganizationGraph, EmptyState, useExecutionPanelState, useSessions, SessionListItem, useDeleteSession, useEndSession, useCreateSession, topbarHeight, useSession, getSessionView, SubshellContentContainer, ORGANIZATION_NODE_ID, collectResourceFilterFacets, SemanticIcon, useSystemsViewState, aggregateSystemMetrics, useSystemHealth, ORGANIZATION_GRAPH_NODE_KIND_ORDER, formatResourceAttribution, SYSTEM_RESOURCE_KINDS, ORGANIZATION_GRAPH_NODE_KIND_LABELS, ORGANIZATION_GRAPH_EDGE_KIND_LABELS, ORGANIZATION_GRAPH_NODE_KIND_DETAIL_LABELS, ORGANIZATION_GRAPH_NODE_KIND_MEANINGS, ORGANIZATION_GRAPH_EDGE_KIND_MEANINGS } from './chunk-
|
|
13
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
12
|
+
import { DEFAULT_ORGANIZATION_GRAPH_FILTERS, resolveSemanticIconComponent, CustomModal, useAppearance, useErrorDetail, JsonViewer, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, ConfirmationModal, PageTitleCaption, CollapsibleSection, useResolvedTimeRange, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, TabCountBadge, ResourceCard, useResourceDefinition, isSessionCapable, useOptionalElevasisSystems, useDeleteTask, useCommandQueue, useSubmitAction, useCommandQueueTask, ContextViewer, useElevasisSystems, buildOrganizationGraph, EmptyState, useExecutionPanelState, useSessions, SessionListItem, useDeleteSession, useEndSession, useCreateSession, topbarHeight, useSession, getSessionView, SubshellContentContainer, ORGANIZATION_NODE_ID, collectResourceFilterFacets, SemanticIcon, useSystemsViewState, aggregateSystemMetrics, useSystemHealth, ORGANIZATION_GRAPH_NODE_KIND_ORDER, formatResourceAttribution, SYSTEM_RESOURCE_KINDS, ORGANIZATION_GRAPH_NODE_KIND_LABELS, ORGANIZATION_GRAPH_EDGE_KIND_LABELS, ORGANIZATION_GRAPH_NODE_KIND_DETAIL_LABELS, ORGANIZATION_GRAPH_NODE_KIND_MEANINGS, ORGANIZATION_GRAPH_EDGE_KIND_MEANINGS } from './chunk-7A25EJ4A.js';
|
|
13
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-3HMRK3RC.js';
|
|
14
14
|
import { CardHeader } from './chunk-62GVNH5U.js';
|
|
15
15
|
import { useInitialization } from './chunk-P45GQ3ZW.js';
|
|
16
16
|
import { StyledMarkdown } from './chunk-3KMDHCAR.js';
|
|
17
|
-
import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData } from './chunk-
|
|
17
|
+
import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData } from './chunk-2HXDI4RY.js';
|
|
18
18
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
19
|
-
import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, PAGE_SIZE_DEFAULT, listAllSystems, getSystem, compileOrganizationOntology, getSystemAncestors } from './chunk-
|
|
20
|
-
import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-
|
|
19
|
+
import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, PAGE_SIZE_DEFAULT, listAllSystems, getSystem, compileOrganizationOntology, getSystemAncestors } from './chunk-CIGWHY7C.js';
|
|
20
|
+
import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-7ZUXA2NW.js';
|
|
21
21
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
22
22
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
23
23
|
import { Stack, Title, Text, Textarea, Alert, Group, Button, Card, ThemeIcon, Badge, SimpleGrid, Collapse, Divider, Paper, ActionIcon, Space, CopyButton, Center, Tooltip, Code, Menu, Progress, Tabs, Pagination, Loader, SegmentedControl, Box, Select, useMantineTheme, Modal, LoadingOverlay, ScrollArea, Switch, Breadcrumbs, Anchor, Checkbox, UnstyledButton, NumberInput, MultiSelect, TextInput, Accordion, Table } from '@mantine/core';
|
|
@@ -1698,10 +1698,11 @@ function SessionMemory({ memory }) {
|
|
|
1698
1698
|
function ResourcesPage({
|
|
1699
1699
|
initialFilter,
|
|
1700
1700
|
onTypeChange,
|
|
1701
|
-
timeRange,
|
|
1701
|
+
timeRange: timeRangeProp,
|
|
1702
1702
|
onResourceClick,
|
|
1703
1703
|
pageSize = 20
|
|
1704
1704
|
}) {
|
|
1705
|
+
const timeRange = useResolvedTimeRange(timeRangeProp);
|
|
1705
1706
|
const { organizationReady } = useInitialization();
|
|
1706
1707
|
const urlType = initialFilter;
|
|
1707
1708
|
const [selectedFilter, setSelectedFilter] = useState(urlType || "all");
|
|
@@ -1996,13 +1997,14 @@ function AgentPublicAccessControls({ resourceId }) {
|
|
|
1996
1997
|
function ResourceDetailPage({
|
|
1997
1998
|
type,
|
|
1998
1999
|
resourceId,
|
|
1999
|
-
timeRange,
|
|
2000
|
+
timeRange: timeRangeProp,
|
|
2000
2001
|
renderExecutionPanel,
|
|
2001
2002
|
renderExecuteDialog,
|
|
2002
2003
|
onNavigateToResources,
|
|
2003
2004
|
onNavigateToSessions,
|
|
2004
2005
|
onNavigateBack
|
|
2005
2006
|
}) {
|
|
2007
|
+
const timeRange = useResolvedTimeRange(timeRangeProp);
|
|
2006
2008
|
const { organizationReady } = useInitialization();
|
|
2007
2009
|
const { data, isLoading, error } = useResources();
|
|
2008
2010
|
const [connected, setConnected] = useState(false);
|
|
@@ -2220,7 +2222,12 @@ function CommandQueueDetailPage({
|
|
|
2220
2222
|
onNavigateBack,
|
|
2221
2223
|
onViewExecution
|
|
2222
2224
|
}) {
|
|
2223
|
-
const {
|
|
2225
|
+
const {
|
|
2226
|
+
mutate: submitAction,
|
|
2227
|
+
isPending,
|
|
2228
|
+
error: submitError,
|
|
2229
|
+
reset: resetSubmitAction
|
|
2230
|
+
} = useSubmitAction({ notifyOnError: false });
|
|
2224
2231
|
const { mutate: deleteTask, isPending: isDeleting } = useDeleteTask();
|
|
2225
2232
|
const [actionModalOpened, setActionModalOpened] = useState(false);
|
|
2226
2233
|
const [selectedAction, setSelectedAction] = useState(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppearanceContext } from './chunk-
|
|
1
|
+
import { AppearanceContext } from './chunk-7A25EJ4A.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,5 +1,5 @@
|
|
|
1
1
|
import { OrganizationContext } from './chunk-DD3CCMCZ.js';
|
|
2
|
-
import { APIClientError } from './chunk-
|
|
2
|
+
import { APIClientError } from './chunk-CIGWHY7C.js';
|
|
3
3
|
import { createContext, useContext, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { showApiErrorNotification } from './chunk-
|
|
1
|
+
import { showApiErrorNotification } from './chunk-3HMRK3RC.js';
|
|
2
|
+
import { buildQueryString } from './chunk-CIGWHY7C.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,33 +1,17 @@
|
|
|
1
|
-
import { projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-
|
|
2
|
-
import { leadGenListMemberKeys } from './chunk-
|
|
1
|
+
import { projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-MJIDC25O.js';
|
|
2
|
+
import { leadGenListMemberKeys } from './chunk-XEO2UG4J.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-NGRRAYMO.js';
|
|
5
|
+
import { useErrorNotification, activityKeys } from './chunk-ZU676PFP.js';
|
|
6
|
+
import { useNotificationAdapter, dealKeys, acquisitionListKeys, useListsTelemetry, useOptionalElevasisSystems, useSSEConnection } from './chunk-7A25EJ4A.js';
|
|
7
|
+
import { HTTP_HEADERS } from './chunk-KGUBFIMQ.js';
|
|
8
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-3HMRK3RC.js';
|
|
9
|
+
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
10
|
+
import { STALE_TIME_ADMIN } from './chunk-CIGWHY7C.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,12 +229,17 @@ 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();
|
|
240
236
|
},
|
|
241
237
|
enabled: isReady,
|
|
238
|
+
// Deliberately not `isExecutionInFlight`. `DeploymentStatus` is its own vocabulary --
|
|
239
|
+
// 'deploying' | 'active' | 'failed' | 'rolled_back' | 'stopped' -- and only 'deploying'
|
|
240
|
+
// is non-terminal. Three of the other four are absent from the execution statuses, so
|
|
241
|
+
// the shared predicate would read them as in flight and poll a finished deployment
|
|
242
|
+
// forever.
|
|
242
243
|
refetchInterval: (query) => {
|
|
243
244
|
const deployments = query.state.data ?? [];
|
|
244
245
|
return deployments.some((d) => d.status === "deploying") ? 5e3 : false;
|
|
@@ -296,47 +297,6 @@ function useProjectActivities(projectId, enabled = true) {
|
|
|
296
297
|
enabled: isReady && !!projectId && enabled
|
|
297
298
|
});
|
|
298
299
|
}
|
|
299
|
-
function useUpdateOrgRole() {
|
|
300
|
-
const { apiRequest } = useElevasisServices();
|
|
301
|
-
const organization = useContext(OrganizationContext);
|
|
302
|
-
const orgId = organization?.currentSupabaseOrganizationId ?? null;
|
|
303
|
-
const queryClient = useQueryClient();
|
|
304
|
-
return useMutation({
|
|
305
|
-
mutationFn: ({ roleId, input }) => apiRequest(`/organizations/${orgId}/roles/${roleId}`, {
|
|
306
|
-
method: "PATCH",
|
|
307
|
-
body: JSON.stringify(input)
|
|
308
|
-
}),
|
|
309
|
-
onSettled: (_data, _error, { roleId }) => {
|
|
310
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles", orgId] });
|
|
311
|
-
queryClient.invalidateQueries({ queryKey: ["org-role", orgId, roleId] });
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
function useDeleteOrgRole() {
|
|
316
|
-
const { apiRequest } = useElevasisServices();
|
|
317
|
-
const organization = useContext(OrganizationContext);
|
|
318
|
-
const orgId = organization?.currentSupabaseOrganizationId ?? null;
|
|
319
|
-
const queryClient = useQueryClient();
|
|
320
|
-
return useMutation({
|
|
321
|
-
mutationFn: (roleId) => apiRequest(`/organizations/${orgId}/roles/${roleId}`, {
|
|
322
|
-
method: "DELETE"
|
|
323
|
-
}),
|
|
324
|
-
onSettled: () => {
|
|
325
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles", orgId] });
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function useEffectivePermissions(membershipId) {
|
|
330
|
-
const { apiRequest, isReady } = useElevasisServices();
|
|
331
|
-
const organization = useContext(OrganizationContext);
|
|
332
|
-
const orgId = organization?.currentSupabaseOrganizationId ?? null;
|
|
333
|
-
return useQuery({
|
|
334
|
-
queryKey: ["member-roles", orgId, membershipId],
|
|
335
|
-
queryFn: () => apiRequest(`/memberships/${membershipId}/effective-permissions`),
|
|
336
|
-
enabled: isReady && !!membershipId,
|
|
337
|
-
staleTime: STALE_TIME_DEFAULT
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
300
|
function useActivitiesRealtime(organizationId, enabled) {
|
|
341
301
|
const queryClient = useQueryClient();
|
|
342
302
|
const supabase = useSupabase();
|
|
@@ -353,7 +313,7 @@ function useActivitiesRealtime(organizationId, enabled) {
|
|
|
353
313
|
filter: `organization_id=eq.${organizationId}`
|
|
354
314
|
},
|
|
355
315
|
() => {
|
|
356
|
-
queryClient.invalidateQueries({ queryKey:
|
|
316
|
+
queryClient.invalidateQueries({ queryKey: activityKeys.all });
|
|
357
317
|
}
|
|
358
318
|
).subscribe();
|
|
359
319
|
return () => {
|
|
@@ -608,4 +568,4 @@ function useProjectRealtime(projectId) {
|
|
|
608
568
|
});
|
|
609
569
|
}
|
|
610
570
|
|
|
611
|
-
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,29 +1,27 @@
|
|
|
1
|
-
import { acquisitionListKeys } from './chunk-
|
|
2
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
3
|
-
import { APIClientError } from './chunk-
|
|
1
|
+
import { acquisitionListKeys } from './chunk-7A25EJ4A.js';
|
|
2
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-3HMRK3RC.js';
|
|
3
|
+
import { APIClientError, buildQueryString } from './chunk-CIGWHY7C.js';
|
|
4
4
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
5
5
|
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
// src/hooks/acquisition/queryKeys.ts
|
|
9
|
+
var companyKeys = {
|
|
10
|
+
all: ["acquisition-companies"],
|
|
11
|
+
list: (organizationId, filters) => [...companyKeys.all, "list", organizationId, filters],
|
|
12
|
+
facets: (organizationId) => [...companyKeys.all, "facets", organizationId],
|
|
13
|
+
detail: (organizationId, companyId) => [...companyKeys.all, "detail", organizationId, companyId]
|
|
14
|
+
};
|
|
14
15
|
var contactKeys = {
|
|
15
16
|
all: ["acquisition-contacts"],
|
|
16
17
|
list: (organizationId, filters) => [...contactKeys.all, "list", organizationId, filters],
|
|
17
18
|
detail: (organizationId, contactId) => [...contactKeys.all, "detail", organizationId, contactId]
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
const queryString = searchParams.toString();
|
|
26
|
-
return queryString ? `?${queryString}` : "";
|
|
20
|
+
z.object({
|
|
21
|
+
replyBody: z.string().trim().min(1).max(1e4)
|
|
22
|
+
}).strict();
|
|
23
|
+
function deriveActions(deal, actions = []) {
|
|
24
|
+
return actions.filter((a) => a.isAvailableFor(deal)).map(({ key, label, payloadSchema }) => ({ key, label, payloadSchema }));
|
|
27
25
|
}
|
|
28
26
|
function useContacts(filters = {}) {
|
|
29
27
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
@@ -66,7 +64,7 @@ function useCreateContact() {
|
|
|
66
64
|
}),
|
|
67
65
|
onSuccess: () => {
|
|
68
66
|
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
69
|
-
queryClient.invalidateQueries({ queryKey:
|
|
67
|
+
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
70
68
|
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
71
69
|
showSuccessNotification("Contact created");
|
|
72
70
|
},
|
|
@@ -85,7 +83,7 @@ function useUpdateContact(contactId) {
|
|
|
85
83
|
}),
|
|
86
84
|
onSuccess: () => {
|
|
87
85
|
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
88
|
-
queryClient.invalidateQueries({ queryKey:
|
|
86
|
+
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
89
87
|
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
90
88
|
showSuccessNotification("Contact updated");
|
|
91
89
|
},
|
|
@@ -111,7 +109,7 @@ function useDeleteContacts() {
|
|
|
111
109
|
},
|
|
112
110
|
onSuccess: () => {
|
|
113
111
|
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
114
|
-
queryClient.invalidateQueries({ queryKey:
|
|
112
|
+
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
115
113
|
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
116
114
|
showSuccessNotification("Contacts deleted");
|
|
117
115
|
},
|
|
@@ -122,27 +120,12 @@ function useDeleteContacts() {
|
|
|
122
120
|
}
|
|
123
121
|
|
|
124
122
|
// src/hooks/acquisition/useCompanies.ts
|
|
125
|
-
var companyKeys = {
|
|
126
|
-
all: ["acquisition-companies"],
|
|
127
|
-
list: (organizationId, filters) => [...companyKeys.all, "list", organizationId, filters],
|
|
128
|
-
facets: (organizationId) => [...companyKeys.all, "facets", organizationId],
|
|
129
|
-
detail: (organizationId, companyId) => [...companyKeys.all, "detail", organizationId, companyId]
|
|
130
|
-
};
|
|
131
|
-
function buildQueryString2(params) {
|
|
132
|
-
const searchParams = new URLSearchParams();
|
|
133
|
-
for (const [key, value] of Object.entries(params)) {
|
|
134
|
-
if (value === void 0) continue;
|
|
135
|
-
searchParams.set(key, String(value));
|
|
136
|
-
}
|
|
137
|
-
const queryString = searchParams.toString();
|
|
138
|
-
return queryString ? `?${queryString}` : "";
|
|
139
|
-
}
|
|
140
123
|
function useCompanies(filters = {}) {
|
|
141
124
|
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
142
125
|
return useQuery({
|
|
143
126
|
queryKey: companyKeys.list(workOSOrganizationId, filters),
|
|
144
127
|
queryFn: async () => {
|
|
145
|
-
const queryString =
|
|
128
|
+
const queryString = buildQueryString({
|
|
146
129
|
listId: filters.listId,
|
|
147
130
|
search: filters.search,
|
|
148
131
|
domain: filters.domain,
|
|
@@ -190,7 +173,7 @@ function useCreateCompany() {
|
|
|
190
173
|
}),
|
|
191
174
|
onSuccess: () => {
|
|
192
175
|
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
193
|
-
queryClient.invalidateQueries({ queryKey:
|
|
176
|
+
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
194
177
|
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
195
178
|
showSuccessNotification("Company created");
|
|
196
179
|
},
|
|
@@ -209,7 +192,7 @@ function useUpdateCompany(companyId) {
|
|
|
209
192
|
}),
|
|
210
193
|
onSuccess: () => {
|
|
211
194
|
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
212
|
-
queryClient.invalidateQueries({ queryKey:
|
|
195
|
+
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
213
196
|
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
214
197
|
showSuccessNotification("Company updated");
|
|
215
198
|
},
|
|
@@ -235,7 +218,7 @@ function useDeleteCompanies() {
|
|
|
235
218
|
},
|
|
236
219
|
onSuccess: () => {
|
|
237
220
|
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
238
|
-
queryClient.invalidateQueries({ queryKey:
|
|
221
|
+
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
239
222
|
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
240
223
|
showSuccessNotification("Companies deleted");
|
|
241
224
|
},
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { eqOrgId, useBatchDeleteRows } from './chunk-
|
|
2
|
-
import { LEAD_GEN_API_INTERFACE } from './chunk-
|
|
3
|
-
import { useCredentials, useVerifyCredential, useListMembers, useListMember, useTransitionListMember, useDeriveActions, useArtifacts } from './chunk-
|
|
1
|
+
import { eqOrgId, useBatchDeleteRows } from './chunk-2KXSFLU2.js';
|
|
2
|
+
import { LEAD_GEN_API_INTERFACE } from './chunk-52G4B33T.js';
|
|
3
|
+
import { useCredentials, useVerifyCredential, useListMembers, useListMember, useTransitionListMember, useDeriveActions, useArtifacts } from './chunk-XEO2UG4J.js';
|
|
4
4
|
import { useSupabase } from './chunk-MKH2KOAO.js';
|
|
5
|
-
import { useCompanyFacets, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-
|
|
5
|
+
import { useCompanyFacets, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-NGRRAYMO.js';
|
|
6
6
|
import { useTableSort, sortData } from './chunk-2Y6AKWGU.js';
|
|
7
|
-
import { getSystemApiInterfaceReadiness } from './chunk-
|
|
7
|
+
import { getSystemApiInterfaceReadiness } from './chunk-DFGQG32T.js';
|
|
8
8
|
import { sanitizeInput } from './chunk-3MEXPLWT.js';
|
|
9
9
|
import { useTableSelection } from './chunk-WDBNW44Z.js';
|
|
10
|
-
import { SubshellPageLayout } from './chunk-
|
|
10
|
+
import { SubshellPageLayout } from './chunk-Q6HRTWA6.js';
|
|
11
11
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
12
12
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
13
13
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
14
|
-
import { SubshellSidebarSection, LeadGenSidebarMiddle, PageTitleCaption, acquisitionListKeys, useOptionalElevasisSystems, getAllBuildTemplates, getLeadGenStageCatalog, useListsTelemetry, useLists, useAccess, AccessKeys, SubshellContentContainer, CenteredErrorState, StatCard, usePaginationState, EmptyState, CustomModal, useListActions, useList, useListProgress, useListExecutions, useDeleteList, useExecuteAsync, SystemReadinessAlert, useCreateList, JsonViewer, useWorkflowExecution, useInFlightExecutions, useExecutionSSE, useListRecords } from './chunk-
|
|
15
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
14
|
+
import { SubshellSidebarSection, LeadGenSidebarMiddle, PageTitleCaption, acquisitionListKeys, useOptionalElevasisSystems, getAllBuildTemplates, getLeadGenStageCatalog, useListsTelemetry, useLists, useAccess, AccessKeys, SubshellContentContainer, CenteredErrorState, StatCard, usePaginationState, EmptyState, CustomModal, useListActions, useList, useListProgress, useListExecutions, useDeleteList, useExecuteAsync, SystemReadinessAlert, useCreateList, JsonViewer, isExecutionInFlight, useWorkflowExecution, useInFlightExecutions, useExecutionSSE, useListRecords } from './chunk-7A25EJ4A.js';
|
|
15
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-3HMRK3RC.js';
|
|
16
16
|
import { CardHeader } from './chunk-62GVNH5U.js';
|
|
17
17
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
18
|
-
import { PAGE_SIZE_DEFAULT, formatTimeAgo, getSystem } from './chunk-
|
|
18
|
+
import { PAGE_SIZE_DEFAULT, formatTimeAgo, getSystem } from './chunk-CIGWHY7C.js';
|
|
19
|
+
import { REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_REALTIME } from './chunk-6XBZPKMI.js';
|
|
19
20
|
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
20
21
|
import { Stack, Group, Title, Text, Alert, Button, Collapse, Paper, Anchor, Center, Loader, SimpleGrid, Table, Badge, TextInput, Select, Checkbox, Pagination, ActionIcon, Tooltip, Tabs, Switch, Card, Divider, Textarea, ThemeIcon, Box, SegmentedControl, UnstyledButton, Pill, Drawer, JsonInput, NumberInput, MultiSelect, TagsInput, ScrollArea } from '@mantine/core';
|
|
21
22
|
import { IconTarget, IconAlertCircle, IconPlayerPlay, IconArrowRight, IconListDetails, IconPlus, IconAlertTriangle, IconSearch, IconList, IconExternalLink, IconCopy, IconTrash, IconBuilding, IconUsers, IconBolt, IconLayoutDashboard, IconBuildingFactory2, IconMessage, IconArrowLeft, IconCircleDot, IconChevronLeft, IconChevronRight, IconCheck, IconSparkles, IconAddressBook, IconSettings, IconChevronDown, IconRefresh, IconMail, IconUser, IconDatabase } from '@tabler/icons-react';
|
|
@@ -1931,12 +1932,6 @@ function getRunStatusColor(status) {
|
|
|
1931
1932
|
return "gray";
|
|
1932
1933
|
}
|
|
1933
1934
|
}
|
|
1934
|
-
function isRunInFlight(status) {
|
|
1935
|
-
return status === "running" || status === "pending" || status === "queued";
|
|
1936
|
-
}
|
|
1937
|
-
function isRunTerminal(status) {
|
|
1938
|
-
return !isRunInFlight(status);
|
|
1939
|
-
}
|
|
1940
1935
|
function getRunInput(run) {
|
|
1941
1936
|
const payload = asRecord2(run.payload);
|
|
1942
1937
|
return run.input ?? run.inputs ?? payload.input ?? payload.inputs;
|
|
@@ -2616,6 +2611,7 @@ function CredentialRequirementsPanel({
|
|
|
2616
2611
|
function BuildStepRunningWatcher({
|
|
2617
2612
|
listId,
|
|
2618
2613
|
resourceId,
|
|
2614
|
+
refetchInterval,
|
|
2619
2615
|
onRunningChange
|
|
2620
2616
|
}) {
|
|
2621
2617
|
const queryClient = useQueryClient();
|
|
@@ -2625,7 +2621,7 @@ function BuildStepRunningWatcher({
|
|
|
2625
2621
|
enabled: Boolean(resourceId),
|
|
2626
2622
|
limit: 5,
|
|
2627
2623
|
listId,
|
|
2628
|
-
refetchInterval
|
|
2624
|
+
refetchInterval
|
|
2629
2625
|
});
|
|
2630
2626
|
const isRunning = (inFlightQuery.data?.executions.length ?? 0) > 0;
|
|
2631
2627
|
useExecutionSSE(resourceId, {
|
|
@@ -2847,14 +2843,16 @@ function BuildTab({
|
|
|
2847
2843
|
const ids = /* @__PURE__ */ new Set();
|
|
2848
2844
|
const serverExecutionIds = new Set(executions.map((run) => run.executionId));
|
|
2849
2845
|
executions.forEach((run) => {
|
|
2850
|
-
if (run.resourceId &&
|
|
2846
|
+
if (run.resourceId && isExecutionInFlight(run.status)) ids.add(run.resourceId);
|
|
2851
2847
|
});
|
|
2852
2848
|
optimisticRuns.forEach((run) => {
|
|
2853
2849
|
if (serverExecutionIds.has(run.executionId)) return;
|
|
2854
|
-
if (run.resourceId &&
|
|
2850
|
+
if (run.resourceId && isExecutionInFlight(run.status)) ids.add(run.resourceId);
|
|
2855
2851
|
});
|
|
2856
2852
|
return ids;
|
|
2857
2853
|
}, [executions, optimisticRuns]);
|
|
2854
|
+
const anyResourceRunning = runningResourceIds.size > 0 || Object.values(runningResources).some((isRunning) => isRunning);
|
|
2855
|
+
const runningWatcherInterval = anyResourceRunning ? REFETCH_INTERVAL_RUNNING : REFETCH_INTERVAL_REALTIME;
|
|
2858
2856
|
const runningStep = steps.find((step) => {
|
|
2859
2857
|
const resourceId = step.action?.resourceId;
|
|
2860
2858
|
return resourceId ? (runningResources[resourceId] ?? false) || runningResourceIds.has(resourceId) : false;
|
|
@@ -2883,7 +2881,7 @@ function BuildTab({
|
|
|
2883
2881
|
});
|
|
2884
2882
|
}, []);
|
|
2885
2883
|
useEffect(() => {
|
|
2886
|
-
if (!selectedResourceId || !latestRecentRun ||
|
|
2884
|
+
if (!selectedResourceId || !latestRecentRun || isExecutionInFlight(latestRecentRun.status)) return;
|
|
2887
2885
|
if (lastObservedTerminalRunRef.current === latestRecentRun.executionId) return;
|
|
2888
2886
|
lastObservedTerminalRunRef.current = latestRecentRun.executionId;
|
|
2889
2887
|
handleResourceRunningChange(selectedResourceId, false);
|
|
@@ -3034,6 +3032,7 @@ function BuildTab({
|
|
|
3034
3032
|
{
|
|
3035
3033
|
listId: list.id,
|
|
3036
3034
|
resourceId: step.action.resourceId,
|
|
3035
|
+
refetchInterval: runningWatcherInterval,
|
|
3037
3036
|
onRunningChange: handleResourceRunningChange
|
|
3038
3037
|
},
|
|
3039
3038
|
`running-${step.id}`
|
|
@@ -4584,8 +4583,11 @@ function useDeleteSocialPost() {
|
|
|
4584
4583
|
const queryClient = useQueryClient();
|
|
4585
4584
|
return useMutation({
|
|
4586
4585
|
mutationFn: async (postId) => {
|
|
4587
|
-
const { error } = await supabase.from("acq_social_posts").delete().eq("id", postId);
|
|
4586
|
+
const { data, error } = await supabase.from("acq_social_posts").delete().eq("id", postId).select("id");
|
|
4588
4587
|
if (error) throw error;
|
|
4588
|
+
if (!data || data.length === 0) {
|
|
4589
|
+
throw new Error("Post could not be deleted. It may have already been removed or you may not have permission.");
|
|
4590
|
+
}
|
|
4589
4591
|
},
|
|
4590
4592
|
onError: (err) => {
|
|
4591
4593
|
showApiErrorNotification(err);
|
|
@@ -4600,8 +4602,11 @@ function useUpdateSocialPost(postId) {
|
|
|
4600
4602
|
const queryClient = useQueryClient();
|
|
4601
4603
|
return useMutation({
|
|
4602
4604
|
mutationFn: async (fields) => {
|
|
4603
|
-
const { error } = await supabase.from("acq_social_posts").update({ ...fields, updated_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", postId);
|
|
4605
|
+
const { data, error } = await supabase.from("acq_social_posts").update({ ...fields, updated_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", postId).select("id");
|
|
4604
4606
|
if (error) throw error;
|
|
4607
|
+
if (!data || data.length === 0) {
|
|
4608
|
+
throw new Error("Post could not be updated. It may have been removed or you may not have permission.");
|
|
4609
|
+
}
|
|
4605
4610
|
},
|
|
4606
4611
|
onMutate: async (fields) => {
|
|
4607
4612
|
const queryKey = socialPostDetailKeys.detail(postId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
2
|
-
import { SubshellContentContainer } from './chunk-
|
|
2
|
+
import { SubshellContentContainer } from './chunk-7A25EJ4A.js';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var SubshellPageLayout = ({ children, className }) => /* @__PURE__ */ jsx(SubshellContentContainer, { className, children: /* @__PURE__ */ jsx(PageContainer, { children }) });
|