@syncular/console 0.0.6-158 → 0.0.6-165
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/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useConsoleApi.d.ts +113 -97
- package/dist/hooks/useConsoleApi.d.ts.map +1 -1
- package/dist/hooks/useConsoleApi.js +368 -520
- package/dist/hooks/useConsoleApi.js.map +1 -1
- package/dist/hooks/useLiveEvents.d.ts.map +1 -1
- package/dist/hooks/useLiveEvents.js +2 -94
- package/dist/hooks/useLiveEvents.js.map +1 -1
- package/dist/lib/topology.d.ts +2 -2
- package/dist/lib/topology.d.ts.map +1 -1
- package/dist/lib/topology.js.map +1 -1
- package/dist/lib/types.d.ts +58 -170
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js +1 -1
- package/dist/pages/Config.d.ts.map +1 -1
- package/dist/pages/Config.js +2 -1
- package/dist/pages/Config.js.map +1 -1
- package/package.json +4 -4
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useConsoleApi.ts +552 -756
- package/src/hooks/useLiveEvents.ts +2 -115
- package/src/lib/topology.ts +3 -3
- package/src/lib/types.ts +104 -187
- package/src/pages/Config.tsx +3 -1
- package/web-dist/assets/index-BXJahjhP.js +86 -0
- package/web-dist/index.html +1 -1
- package/dist/hooks/useRequestEvents.d.ts +0 -7
- package/dist/hooks/useRequestEvents.d.ts.map +0 -1
- package/dist/hooks/useRequestEvents.js +0 -33
- package/dist/hooks/useRequestEvents.js.map +0 -1
- package/src/hooks/useRequestEvents.ts +0 -35
- package/web-dist/assets/index-CU9G_QwF.js +0 -86
package/web-dist/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<meta name="syncular-sentry-environment" content="" />
|
|
11
11
|
<meta name="syncular-sentry-release" content="" />
|
|
12
12
|
<title>@syncular Console</title>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-BXJahjhP.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-D_fQabjS.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body class="syncular-console-root min-h-screen bg-background text-foreground">
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRequestEvents.d.ts","sourceRoot":"","sources":["../../src/hooks/useRequestEvents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,wBAAgB,sBAAsB;;yBA0BrC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React Query hooks for Request Events
|
|
3
|
-
*/
|
|
4
|
-
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
5
|
-
import { useApiClient, useConnection } from './ConnectionContext.js';
|
|
6
|
-
import { useInstanceContext } from './useInstanceContext.js';
|
|
7
|
-
export function useClearEventsMutation() {
|
|
8
|
-
const client = useApiClient();
|
|
9
|
-
const { config: connectionConfig } = useConnection();
|
|
10
|
-
const { instanceId } = useInstanceContext();
|
|
11
|
-
const queryClient = useQueryClient();
|
|
12
|
-
return useMutation({
|
|
13
|
-
mutationFn: async () => {
|
|
14
|
-
if (!client || !connectionConfig)
|
|
15
|
-
throw new Error('Not connected');
|
|
16
|
-
const queryString = new URLSearchParams();
|
|
17
|
-
if (instanceId)
|
|
18
|
-
queryString.set('instanceId', instanceId);
|
|
19
|
-
const suffix = queryString.toString();
|
|
20
|
-
const response = await fetch(`${connectionConfig.serverUrl}/console/events${suffix ? `?${suffix}` : ''}`, {
|
|
21
|
-
method: 'DELETE',
|
|
22
|
-
headers: { Authorization: `Bearer ${connectionConfig.token}` },
|
|
23
|
-
});
|
|
24
|
-
if (!response.ok)
|
|
25
|
-
throw new Error('Failed to clear events');
|
|
26
|
-
return response.json();
|
|
27
|
-
},
|
|
28
|
-
onSuccess: () => {
|
|
29
|
-
queryClient.invalidateQueries({ queryKey: ['console', 'events'] });
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=useRequestEvents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRequestEvents.js","sourceRoot":"","sources":["../../src/hooks/useRequestEvents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,sBAAsB,GAAG;IACvC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,aAAa,EAAE,CAAC;IACrD,MAAM,EAAE,UAAU,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAC5C,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,OAAO,WAAW,CAAwC;QACxD,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB;gBAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;YACnE,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;YAC1C,IAAI,UAAU;gBAAE,WAAW,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;YAC1D,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;YACtC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,GAAG,gBAAgB,CAAC,SAAS,kBAAkB,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAC3E;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,gBAAgB,CAAC,KAAK,EAAE,EAAE;aAC/D,CACF,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;YAC5D,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;QAAA,CACxB;QACD,SAAS,EAAE,GAAG,EAAE,CAAC;YACf,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QAAA,CACpE;KACF,CAAC,CAAC;AAAA,CACJ"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React Query hooks for Request Events
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { useApiClient, useConnection } from './ConnectionContext';
|
|
7
|
-
import { useInstanceContext } from './useInstanceContext';
|
|
8
|
-
|
|
9
|
-
export function useClearEventsMutation() {
|
|
10
|
-
const client = useApiClient();
|
|
11
|
-
const { config: connectionConfig } = useConnection();
|
|
12
|
-
const { instanceId } = useInstanceContext();
|
|
13
|
-
const queryClient = useQueryClient();
|
|
14
|
-
|
|
15
|
-
return useMutation<{ deletedCount: number }, Error, void>({
|
|
16
|
-
mutationFn: async () => {
|
|
17
|
-
if (!client || !connectionConfig) throw new Error('Not connected');
|
|
18
|
-
const queryString = new URLSearchParams();
|
|
19
|
-
if (instanceId) queryString.set('instanceId', instanceId);
|
|
20
|
-
const suffix = queryString.toString();
|
|
21
|
-
const response = await fetch(
|
|
22
|
-
`${connectionConfig.serverUrl}/console/events${suffix ? `?${suffix}` : ''}`,
|
|
23
|
-
{
|
|
24
|
-
method: 'DELETE',
|
|
25
|
-
headers: { Authorization: `Bearer ${connectionConfig.token}` },
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
if (!response.ok) throw new Error('Failed to clear events');
|
|
29
|
-
return response.json();
|
|
30
|
-
},
|
|
31
|
-
onSuccess: () => {
|
|
32
|
-
queryClient.invalidateQueries({ queryKey: ['console', 'events'] });
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
}
|