@elevasis/ui 1.20.1 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/charts/index.js +3 -2
  2. package/dist/chunk-3KMDHCAR.js +52 -0
  3. package/dist/{chunk-4SY4EQSK.js → chunk-5266RV46.js} +3 -3
  4. package/dist/{chunk-UMFPUM7Q.js → chunk-7TLPKXC2.js} +12 -12
  5. package/dist/{chunk-OFAXUZPZ.js → chunk-AJPFSMEH.js} +528 -336
  6. package/dist/chunk-AWT255UH.js +255 -0
  7. package/dist/{chunk-EMN755L5.js → chunk-CTF6FS2M.js} +10 -216
  8. package/dist/{chunk-C7AD6N23.js → chunk-DLI3F5IV.js} +364 -364
  9. package/dist/{chunk-AQ5MQDSS.js → chunk-EDAYKRPJ.js} +404 -2
  10. package/dist/{chunk-XOTN3X3Z.js → chunk-FATKFO7X.js} +3 -54
  11. package/dist/{chunk-JZEXFQ6N.js → chunk-HOYZWSNV.js} +91 -80
  12. package/dist/{chunk-AWMZCYKH.js → chunk-IAZT3VO6.js} +158 -82
  13. package/dist/{chunk-ERVB3QJQ.js → chunk-N5SDJP44.js} +1 -1
  14. package/dist/{chunk-3DIU726S.js → chunk-NVSKJG3L.js} +25 -4
  15. package/dist/{chunk-VLTVZXP6.js → chunk-QZS5FOIR.js} +2 -2
  16. package/dist/chunk-ROSMICXG.js +668 -0
  17. package/dist/{chunk-JIABC3AE.js → chunk-WAEKXBP3.js} +516 -266
  18. package/dist/{chunk-COTI2QPO.js → chunk-ZHJGTOXP.js} +4 -3
  19. package/dist/components/chat/index.d.ts +202 -0
  20. package/dist/components/chat/index.js +2 -0
  21. package/dist/components/index.css +0 -3
  22. package/dist/components/index.d.ts +37 -37
  23. package/dist/components/index.js +2652 -2902
  24. package/dist/features/auth/index.css +0 -3
  25. package/dist/features/dashboard/index.css +0 -3
  26. package/dist/features/dashboard/index.js +9 -9
  27. package/dist/features/monitoring/index.css +0 -3
  28. package/dist/features/monitoring/index.js +10 -10
  29. package/dist/features/operations/index.css +0 -3
  30. package/dist/features/operations/index.d.ts +245 -10
  31. package/dist/features/operations/index.js +1115 -170
  32. package/dist/features/settings/index.css +0 -3
  33. package/dist/features/settings/index.js +9 -9
  34. package/dist/hooks/index.css +68 -3
  35. package/dist/hooks/index.d.ts +1165 -4
  36. package/dist/hooks/index.js +5 -6
  37. package/dist/hooks/published.css +68 -3
  38. package/dist/hooks/published.d.ts +1165 -4
  39. package/dist/hooks/published.js +4 -5
  40. package/dist/index.css +68 -3
  41. package/dist/index.d.ts +1166 -5
  42. package/dist/index.js +6 -7
  43. package/dist/layout/index.d.ts +4 -4
  44. package/dist/layout/index.js +3 -4
  45. package/dist/provider/index.css +0 -3
  46. package/dist/provider/index.d.ts +1 -1
  47. package/dist/provider/index.js +3 -4
  48. package/dist/provider/published.d.ts +1 -1
  49. package/dist/theme/index.d.ts +1 -1
  50. package/dist/theme/index.js +3 -3
  51. package/dist/types/index.d.ts +1 -1
  52. package/package.json +7 -2
  53. package/dist/chunk-JFRG2JJE.js +0 -47
  54. package/dist/chunk-R3R367QY.js +0 -14
  55. package/dist/theme/presets/__tests__/getPreset.test.d.ts +0 -2
  56. package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +0 -1
  57. package/dist/theme/presets/__tests__/getPreset.test.js +0 -92
  58. package/dist/theme/presets/cyber-volt.d.ts +0 -12
  59. package/dist/theme/presets/cyber-volt.d.ts.map +0 -1
  60. package/dist/theme/presets/cyber-volt.js +0 -70
  61. package/dist/theme/presets/regal.d.ts +0 -8
  62. package/dist/theme/presets/regal.d.ts.map +0 -1
  63. package/dist/theme/presets/regal.js +0 -69
  64. package/dist/theme/presets/rose-gold.d.ts +0 -12
  65. package/dist/theme/presets/rose-gold.d.ts.map +0 -1
  66. package/dist/theme/presets/rose-gold.js +0 -76
@@ -3,7 +3,7 @@ import { getTimeRangeDates, observabilityKeys } from './chunk-LXHZYSMQ.js';
3
3
  import { GRAPH_CONSTANTS } from './chunk-F6RBK7NJ.js';
4
4
  import { useNotificationAdapter } from './chunk-R7WLWGPO.js';
5
5
  import { HTTP_HEADERS } from './chunk-NVOCKXUQ.js';
6
- import { STALE_TIME_MONITORING, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_DEFAULT, STALE_TIME_ADMIN } from './chunk-IOKL7BKE.js';
6
+ import { STALE_TIME_MONITORING, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, getErrorInfo, formatErrorMessage, getErrorTitle, STALE_TIME_DEFAULT, STALE_TIME_ADMIN } from './chunk-IOKL7BKE.js';
7
7
  import { useStableAccessToken } from './chunk-ALA56RGZ.js';
8
8
  import { useOrganization } from './chunk-DD3CCMCZ.js';
9
9
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
@@ -11,6 +11,7 @@ import { useAuthContext } from './chunk-BRJ3QZ4E.js';
11
11
  import { useQuery, useQueryClient, useMutation, useQueries } from '@tanstack/react-query';
12
12
  import { z } from 'zod';
13
13
  import { useState, useCallback, useMemo, useRef, useEffect, useId } from 'react';
14
+ import { notifications } from '@mantine/notifications';
14
15
  import { useNavigate, useSearch } from '@tanstack/react-router';
15
16
  import { create } from 'zustand';
16
17
  import { persist } from 'zustand/middleware';
@@ -2062,6 +2063,55 @@ function useSSEConnection({
2062
2063
  }, [enabled, connectionKey, url, subscriberId, getAccessToken, manager]);
2063
2064
  return { connected, error };
2064
2065
  }
2066
+ var showInfoNotification = (message) => {
2067
+ notifications.show({
2068
+ title: "Info",
2069
+ message,
2070
+ autoClose: 5e3,
2071
+ color: "blue",
2072
+ position: "top-right"
2073
+ });
2074
+ };
2075
+ var showSuccessNotification = (message) => {
2076
+ notifications.show({
2077
+ title: "Action Successful",
2078
+ message,
2079
+ autoClose: 5e3,
2080
+ color: "green",
2081
+ position: "top-right"
2082
+ });
2083
+ };
2084
+ var showErrorNotification = (error) => {
2085
+ if (error instanceof Error) {
2086
+ error = error.message;
2087
+ }
2088
+ notifications.show({
2089
+ title: "Action Failed",
2090
+ message: error,
2091
+ autoClose: 5e3,
2092
+ color: "red",
2093
+ position: "top-right"
2094
+ });
2095
+ };
2096
+ var showWarningNotification = (message) => {
2097
+ notifications.show({
2098
+ title: "Warning",
2099
+ message,
2100
+ autoClose: 5e3,
2101
+ color: "orange",
2102
+ position: "top-right"
2103
+ });
2104
+ };
2105
+ var showApiErrorNotification = (error) => {
2106
+ const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
2107
+ notifications.show({
2108
+ title: getErrorTitle(code),
2109
+ message: formatErrorMessage(message, requestId, fields, retryAfter),
2110
+ autoClose: retryAfter ? retryAfter * 1e3 : 5e3,
2111
+ color: "red",
2112
+ position: "top-right"
2113
+ });
2114
+ };
2065
2115
 
2066
2116
  // src/hooks/operations/shared/queryKeys.ts
2067
2117
  var operationsKeys = {
@@ -2581,4 +2631,356 @@ function useResourceExecutions({ resourceId, timeRange, enabled = true }) {
2581
2631
  });
2582
2632
  }
2583
2633
 
2584
- export { CredentialNameSchema, OperationsService, UuidSchema, createUseFeatureAccess, executionsKeys, isSessionCapable, operationsKeys, scheduleKeys, sessionsKeys, sortData, useActivities, useActivityTrend, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateSchedule, useCreateSession, useDashboardMetrics, useDeleteExecution, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGraphStats, useListSchedules, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, usePaginationState, usePatchTask, usePauseSchedule, useRecentExecutionsByResource, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResources, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateSchedule, useWarningNotification };
2634
+ // src/hooks/operations/calibration/queryKeys.ts
2635
+ var calibrationKeys = {
2636
+ all: ["calibration"],
2637
+ // Projects
2638
+ projects: (org) => [...calibrationKeys.all, "projects", org],
2639
+ projectsByResource: (org, resourceId, resourceType) => [...calibrationKeys.all, "projects", org, resourceId, resourceType],
2640
+ project: (org, projectId) => [...calibrationKeys.all, "project", org, projectId],
2641
+ // Runs
2642
+ runs: (org, projectId) => [...calibrationKeys.all, "runs", org, projectId],
2643
+ run: (org, runId) => [...calibrationKeys.all, "run", org, runId],
2644
+ runFull: (org, runId) => [...calibrationKeys.all, "run-full", org, runId]
2645
+ };
2646
+ function useCalibrationRuns(projectId) {
2647
+ const { apiRequest, organizationId, isReady } = useElevasisServices();
2648
+ return useQuery({
2649
+ queryKey: calibrationKeys.runs(organizationId ?? "none", projectId),
2650
+ queryFn: async () => {
2651
+ const response = await apiRequest(`/calibration/runs?projectId=${projectId}`);
2652
+ return response.runs;
2653
+ },
2654
+ enabled: isReady && !!projectId && !!organizationId
2655
+ });
2656
+ }
2657
+ function useCalibrationRun(runId) {
2658
+ const { apiRequest, organizationId, isReady } = useElevasisServices();
2659
+ return useQuery({
2660
+ queryKey: calibrationKeys.run(organizationId ?? "none", runId),
2661
+ queryFn: async () => {
2662
+ const response = await apiRequest(`/calibration/runs/${runId}`);
2663
+ return response.run;
2664
+ },
2665
+ enabled: isReady && !!runId && !!organizationId
2666
+ });
2667
+ }
2668
+ function useCreateRun() {
2669
+ const { apiRequest, organizationId } = useElevasisServices();
2670
+ const queryClient = useQueryClient();
2671
+ return useMutation({
2672
+ mutationFn: async (input) => {
2673
+ const response = await apiRequest("/calibration/runs", {
2674
+ method: "POST",
2675
+ body: JSON.stringify(input)
2676
+ });
2677
+ return response.run;
2678
+ },
2679
+ onSuccess: (data) => {
2680
+ queryClient.invalidateQueries({
2681
+ queryKey: calibrationKeys.runs(organizationId ?? "none", data.projectId)
2682
+ });
2683
+ },
2684
+ onError: (error) => {
2685
+ showApiErrorNotification(error);
2686
+ }
2687
+ });
2688
+ }
2689
+ function useExecuteRun() {
2690
+ const { apiRequest, organizationId } = useElevasisServices();
2691
+ const queryClient = useQueryClient();
2692
+ return useMutation({
2693
+ mutationFn: async (runId) => {
2694
+ await apiRequest(`/calibration/runs/${runId}/execute`, {
2695
+ method: "POST"
2696
+ });
2697
+ },
2698
+ onSuccess: (_, runId) => {
2699
+ queryClient.invalidateQueries({
2700
+ queryKey: calibrationKeys.run(organizationId ?? "none", runId)
2701
+ });
2702
+ },
2703
+ onError: (error) => {
2704
+ showApiErrorNotification(error);
2705
+ }
2706
+ });
2707
+ }
2708
+ function useDeleteRun() {
2709
+ const { apiRequest, organizationId } = useElevasisServices();
2710
+ const queryClient = useQueryClient();
2711
+ return useMutation({
2712
+ mutationFn: async ({ runId }) => {
2713
+ await apiRequest(`/calibration/runs/${runId}`, {
2714
+ method: "DELETE"
2715
+ });
2716
+ },
2717
+ onSuccess: (_, { projectId }) => {
2718
+ queryClient.invalidateQueries({
2719
+ queryKey: calibrationKeys.runs(organizationId ?? "none", projectId)
2720
+ });
2721
+ },
2722
+ onError: (error) => {
2723
+ showApiErrorNotification(error);
2724
+ }
2725
+ });
2726
+ }
2727
+ function useGradeRun() {
2728
+ const { apiRequest, organizationId } = useElevasisServices();
2729
+ const queryClient = useQueryClient();
2730
+ return useMutation({
2731
+ mutationFn: async ({
2732
+ runId,
2733
+ rubric,
2734
+ graderModel
2735
+ }) => {
2736
+ await apiRequest(`/calibration/runs/${runId}/grade`, {
2737
+ method: "POST",
2738
+ body: JSON.stringify({ rubric, graderModel })
2739
+ });
2740
+ },
2741
+ onSuccess: (_, { runId }) => {
2742
+ queryClient.invalidateQueries({
2743
+ queryKey: calibrationKeys.run(organizationId ?? "none", runId)
2744
+ });
2745
+ queryClient.invalidateQueries({
2746
+ queryKey: calibrationKeys.runFull(organizationId ?? "none", runId)
2747
+ });
2748
+ },
2749
+ onError: (error) => {
2750
+ showApiErrorNotification(error);
2751
+ }
2752
+ });
2753
+ }
2754
+ function useCalibrationRunFull(runId) {
2755
+ const { apiRequest, organizationId, isReady } = useElevasisServices();
2756
+ return useQuery({
2757
+ queryKey: calibrationKeys.runFull(organizationId ?? "none", runId),
2758
+ queryFn: async () => {
2759
+ const response = await apiRequest(`/calibration/runs/${runId}/full`);
2760
+ return response;
2761
+ },
2762
+ enabled: isReady && !!runId && !!organizationId
2763
+ });
2764
+ }
2765
+ function useCalibrationSSE({ runId, manager, apiUrl, enabled = true }) {
2766
+ const queryClient = useQueryClient();
2767
+ const { isReady: isOrganizationReady, organizationId } = useElevasisServices();
2768
+ const { currentMembership } = useOrganization();
2769
+ const currentWorkOSOrganizationId = currentMembership?.organization?.workos_org_id;
2770
+ const [progress, setProgress] = useState({
2771
+ connected: false,
2772
+ events: [],
2773
+ isComplete: false
2774
+ });
2775
+ const sseUrl = `${apiUrl}/api/calibration/runs/${runId}/sse`;
2776
+ const headers = useMemo(() => {
2777
+ const h = {};
2778
+ if (currentWorkOSOrganizationId) h[HTTP_HEADERS.WORKOS_ORGANIZATION_ID] = currentWorkOSOrganizationId;
2779
+ return h;
2780
+ }, [currentWorkOSOrganizationId]);
2781
+ const handleMessage = useCallback(
2782
+ (data) => {
2783
+ try {
2784
+ const event = JSON.parse(data);
2785
+ setProgress((prev) => {
2786
+ const newProgress = {
2787
+ ...prev,
2788
+ events: [...prev.events, event]
2789
+ };
2790
+ switch (event.type) {
2791
+ case "connected":
2792
+ newProgress.connected = true;
2793
+ break;
2794
+ case "calibration-completed":
2795
+ newProgress.isComplete = true;
2796
+ newProgress.summary = event.summary;
2797
+ queryClient.invalidateQueries({
2798
+ queryKey: calibrationKeys.run(currentWorkOSOrganizationId || "none", runId)
2799
+ });
2800
+ queryClient.invalidateQueries({
2801
+ queryKey: calibrationKeys.runFull(currentWorkOSOrganizationId || "none", runId)
2802
+ });
2803
+ break;
2804
+ case "calibration-failed":
2805
+ newProgress.isComplete = true;
2806
+ newProgress.error = event.error;
2807
+ queryClient.invalidateQueries({
2808
+ queryKey: calibrationKeys.run(currentWorkOSOrganizationId || "none", runId)
2809
+ });
2810
+ queryClient.invalidateQueries({
2811
+ queryKey: calibrationKeys.runFull(currentWorkOSOrganizationId || "none", runId)
2812
+ });
2813
+ break;
2814
+ }
2815
+ return newProgress;
2816
+ });
2817
+ } catch {
2818
+ }
2819
+ },
2820
+ [queryClient, currentWorkOSOrganizationId, runId]
2821
+ );
2822
+ const { connected, error } = useSSEConnection({
2823
+ manager,
2824
+ connectionKey: `calibration-${runId}`,
2825
+ url: sseUrl,
2826
+ enabled: enabled && !!runId && !!currentWorkOSOrganizationId && isOrganizationReady,
2827
+ headers,
2828
+ onmessage: handleMessage,
2829
+ onopen: (response) => {
2830
+ if (response.ok) {
2831
+ setProgress((prev) => ({ ...prev, connected: true }));
2832
+ }
2833
+ return void 0;
2834
+ },
2835
+ onerror: () => {
2836
+ setProgress((prev) => ({ ...prev, connected: false }));
2837
+ },
2838
+ onclose: () => {
2839
+ setProgress((prev) => ({ ...prev, connected: false }));
2840
+ }
2841
+ });
2842
+ useEffect(() => {
2843
+ setProgress((prev) => ({ ...prev, connected }));
2844
+ }, [connected]);
2845
+ useEffect(() => {
2846
+ if (error) {
2847
+ setProgress((prev) => ({ ...prev, error }));
2848
+ }
2849
+ }, [error]);
2850
+ useEffect(() => {
2851
+ return () => {
2852
+ setProgress({
2853
+ connected: false,
2854
+ events: [],
2855
+ isComplete: false
2856
+ });
2857
+ };
2858
+ }, [runId, organizationId, isOrganizationReady]);
2859
+ const disconnect = useCallback(() => {
2860
+ manager.closeConnection(`calibration-${runId}`);
2861
+ }, [manager, runId]);
2862
+ const reset = useCallback(() => {
2863
+ setProgress({
2864
+ connected: false,
2865
+ events: [],
2866
+ isComplete: false
2867
+ });
2868
+ }, []);
2869
+ return {
2870
+ ...progress,
2871
+ disconnect,
2872
+ reset
2873
+ };
2874
+ }
2875
+
2876
+ // src/hooks/operations/calibration/useCalibrationProjects.ts
2877
+ function useAllCalibrationProjects() {
2878
+ const { apiRequest, organizationId, isReady } = useElevasisServices();
2879
+ return useQuery({
2880
+ queryKey: calibrationKeys.projects(organizationId ?? "none"),
2881
+ queryFn: async () => {
2882
+ const response = await apiRequest("/calibration/projects");
2883
+ return response.projects;
2884
+ },
2885
+ enabled: isReady && !!organizationId
2886
+ });
2887
+ }
2888
+ function useCalibrationProjects(resourceId, resourceType) {
2889
+ const { apiRequest, organizationId, isReady } = useElevasisServices();
2890
+ return useQuery({
2891
+ queryKey: calibrationKeys.projectsByResource(organizationId ?? "none", resourceId, resourceType),
2892
+ queryFn: async () => {
2893
+ const response = await apiRequest(
2894
+ `/calibration/projects?resourceId=${resourceId}&resourceType=${resourceType}`
2895
+ );
2896
+ return response.projects;
2897
+ },
2898
+ enabled: isReady && !!resourceId && !!resourceType && !!organizationId
2899
+ });
2900
+ }
2901
+ function useCalibrationProject(projectId) {
2902
+ const { apiRequest, organizationId, isReady } = useElevasisServices();
2903
+ return useQuery({
2904
+ queryKey: calibrationKeys.project(organizationId ?? "none", projectId),
2905
+ queryFn: async () => {
2906
+ const response = await apiRequest(`/calibration/projects/${projectId}`);
2907
+ return response.project;
2908
+ },
2909
+ enabled: isReady && !!projectId && !!organizationId
2910
+ });
2911
+ }
2912
+ function useCreateProject() {
2913
+ const { apiRequest, organizationId } = useElevasisServices();
2914
+ const queryClient = useQueryClient();
2915
+ return useMutation({
2916
+ mutationFn: async (input) => {
2917
+ const response = await apiRequest("/calibration/projects", {
2918
+ method: "POST",
2919
+ body: JSON.stringify(input)
2920
+ });
2921
+ return response.project;
2922
+ },
2923
+ onSuccess: (data) => {
2924
+ queryClient.invalidateQueries({
2925
+ queryKey: calibrationKeys.projects(organizationId ?? "none")
2926
+ });
2927
+ queryClient.invalidateQueries({
2928
+ queryKey: calibrationKeys.projectsByResource(organizationId ?? "none", data.resourceId, data.resourceType)
2929
+ });
2930
+ },
2931
+ onError: (error) => {
2932
+ showApiErrorNotification(error);
2933
+ }
2934
+ });
2935
+ }
2936
+ function useUpdateProject() {
2937
+ const { apiRequest, organizationId } = useElevasisServices();
2938
+ const queryClient = useQueryClient();
2939
+ return useMutation({
2940
+ mutationFn: async ({
2941
+ id,
2942
+ ...input
2943
+ }) => {
2944
+ const response = await apiRequest(`/calibration/projects/${id}`, {
2945
+ method: "PATCH",
2946
+ body: JSON.stringify(input)
2947
+ });
2948
+ return response.project;
2949
+ },
2950
+ onSuccess: (data) => {
2951
+ queryClient.invalidateQueries({
2952
+ queryKey: calibrationKeys.projects(organizationId ?? "none")
2953
+ });
2954
+ queryClient.invalidateQueries({
2955
+ queryKey: calibrationKeys.projectsByResource(organizationId ?? "none", data.resourceId, data.resourceType)
2956
+ });
2957
+ queryClient.invalidateQueries({
2958
+ queryKey: calibrationKeys.project(organizationId ?? "none", data.id)
2959
+ });
2960
+ },
2961
+ onError: (error) => {
2962
+ showApiErrorNotification(error);
2963
+ }
2964
+ });
2965
+ }
2966
+ function useDeleteProject() {
2967
+ const { apiRequest } = useElevasisServices();
2968
+ const queryClient = useQueryClient();
2969
+ return useMutation({
2970
+ mutationFn: async (id) => {
2971
+ await apiRequest(`/calibration/projects/${id}`, {
2972
+ method: "DELETE"
2973
+ });
2974
+ },
2975
+ onSuccess: () => {
2976
+ queryClient.invalidateQueries({
2977
+ queryKey: calibrationKeys.all
2978
+ });
2979
+ },
2980
+ onError: (error) => {
2981
+ showApiErrorNotification(error);
2982
+ }
2983
+ });
2984
+ }
2985
+
2986
+ export { CredentialNameSchema, OperationsService, UuidSchema, calibrationKeys, createUseFeatureAccess, executionsKeys, isSessionCapable, operationsKeys, scheduleKeys, sessionsKeys, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, sortData, useActivities, useActivityTrend, useAllCalibrationProjects, useArchiveSession, useArchivedLogs, useBatchDelete, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCalibrationProject, useCalibrationProjects, useCalibrationRun, useCalibrationRunFull, useCalibrationRuns, useCalibrationSSE, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateProject, useCreateRun, useCreateSchedule, useCreateSession, useDashboardMetrics, useDeleteExecution, useDeleteProject, useDeleteRun, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeploymentDocs, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAsync, useExecuteRun, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionPanelState, useExecutions, useGetExecutionHistory, useGetSchedule, useGradeRun, useGraphStats, useListSchedules, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, usePaginationState, usePatchTask, usePauseSchedule, useRecentExecutionsByResource, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResources, useResourcesHealth, useResumeSchedule, useRetryExecution, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTopFailingResources, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateProject, useUpdateSchedule, useWarningNotification };
@@ -1,7 +1,7 @@
1
- import { CredentialNameSchema, UuidSchema, useErrorNotification } from './chunk-AQ5MQDSS.js';
1
+ import { CredentialNameSchema, UuidSchema, useErrorNotification, showApiErrorNotification } from './chunk-EDAYKRPJ.js';
2
2
  import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
3
3
  import { useNotificationAdapter } from './chunk-R7WLWGPO.js';
4
- import { GC_TIME_SHORT, STALE_TIME_MONITORING, GC_TIME_MEDIUM, STALE_TIME_DEFAULT, getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-IOKL7BKE.js';
4
+ import { GC_TIME_SHORT, STALE_TIME_MONITORING, GC_TIME_MEDIUM, STALE_TIME_DEFAULT } from './chunk-IOKL7BKE.js';
5
5
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
6
6
  import { z } from 'zod';
7
7
  import { create } from 'zustand';
@@ -979,57 +979,6 @@ function useListWebhookEndpoints() {
979
979
  enabled: isReady
980
980
  });
981
981
  }
982
- var showInfoNotification = (message) => {
983
- notifications.show({
984
- title: "Info",
985
- message,
986
- autoClose: 5e3,
987
- color: "blue",
988
- position: "top-right"
989
- });
990
- };
991
- var showSuccessNotification = (message) => {
992
- notifications.show({
993
- title: "Action Successful",
994
- message,
995
- autoClose: 5e3,
996
- color: "green",
997
- position: "top-right"
998
- });
999
- };
1000
- var showErrorNotification = (error) => {
1001
- if (error instanceof Error) {
1002
- error = error.message;
1003
- }
1004
- notifications.show({
1005
- title: "Action Failed",
1006
- message: error,
1007
- autoClose: 5e3,
1008
- color: "red",
1009
- position: "top-right"
1010
- });
1011
- };
1012
- var showWarningNotification = (message) => {
1013
- notifications.show({
1014
- title: "Warning",
1015
- message,
1016
- autoClose: 5e3,
1017
- color: "orange",
1018
- position: "top-right"
1019
- });
1020
- };
1021
- var showApiErrorNotification = (error) => {
1022
- const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
1023
- notifications.show({
1024
- title: getErrorTitle(code),
1025
- message: formatErrorMessage(message, requestId, fields, retryAfter),
1026
- autoClose: retryAfter ? retryAfter * 1e3 : 5e3,
1027
- color: "red",
1028
- position: "top-right"
1029
- });
1030
- };
1031
-
1032
- // src/hooks/settings/webhooks/useCreateWebhookEndpoint.ts
1033
982
  function useCreateWebhookEndpoint() {
1034
983
  const { apiRequest } = useElevasisServices();
1035
984
  const queryClient = useQueryClient();
@@ -1092,4 +1041,4 @@ function useUpdateWebhookEndpoint() {
1092
1041
  });
1093
1042
  }
1094
1043
 
1095
- export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OrganizationMembershipService, WebhookEndpointService, filterByDomainFilters, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, transformMembershipToTableRow, useActivateDeployment, useActivityFilters, useCommandViewDomainFilters, useCreateApiKey, useCreateCredential, useCreateWebhookEndpoint, useCredentials, useDeactivateDeployment, useDeactivateMembership, useDeleteApiKey, useDeleteCredential, useDeleteDeployment, useDeleteWebhookEndpoint, useExecutionLogsFilters, useListApiKeys, useListDeployments, useListWebhookEndpoints, useOrganizationMembers, useReactivateMembership, useResourceSearch, useResourcesDomainFilters, useStatusFilter, useTimeRangeDates, useUpdateApiKey, useUpdateCredential, useUpdateMemberConfig, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources };
1044
+ export { ApiKeyService, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OrganizationMembershipService, WebhookEndpointService, filterByDomainFilters, transformMembershipToTableRow, useActivateDeployment, useActivityFilters, useCommandViewDomainFilters, useCreateApiKey, useCreateCredential, useCreateWebhookEndpoint, useCredentials, useDeactivateDeployment, useDeactivateMembership, useDeleteApiKey, useDeleteCredential, useDeleteDeployment, useDeleteWebhookEndpoint, useExecutionLogsFilters, useListApiKeys, useListDeployments, useListWebhookEndpoints, useOrganizationMembers, useReactivateMembership, useResourceSearch, useResourcesDomainFilters, useStatusFilter, useTimeRangeDates, useUpdateApiKey, useUpdateCredential, useUpdateMemberConfig, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources };