@burdenoff/microfe-bigconsole 2026.1115.3 → 2026.1115.5
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/bigconsole/pages/DataSinkViewPage.js +234 -238
- package/dist/bigconsole/types/index.d.ts +0 -14
- package/dist/generated/wspace-operations.d.ts +0 -124
- package/dist/generated/wspace-operations.js +69 -1186
- package/package.json +4 -4
- package/dist/bigconsole/hooks/useDataSinkSubscription.d.ts +0 -29
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -110
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-bigconsole",
|
|
3
|
-
"version": "2026.1115.
|
|
3
|
+
"version": "2026.1115.5",
|
|
4
4
|
"description": "BigConsole - AI-powered analytics and dashboard platform",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@apollo/client": "^4.2.0",
|
|
73
|
-
"@burdenoff/fe-libs": "2026.1113.
|
|
73
|
+
"@burdenoff/fe-libs": "2026.1113.11",
|
|
74
74
|
"@burdenoff/fluidgrids-fe-sdk": "2026.1021.2",
|
|
75
75
|
"@iconify/react": "^6.0.2",
|
|
76
76
|
"@monaco-editor/react": "^4.7.0",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"zustand": "^5.0.3"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@burdenoff/fe-libs": "2026.1113.
|
|
108
|
+
"@burdenoff/fe-libs": "2026.1113.11",
|
|
109
109
|
"@burdenoff/fluidgrids-fe-sdk": "2026.1021.2",
|
|
110
110
|
"@burdenoff/toolchain": "2026.1107.14",
|
|
111
111
|
"@graphql-codegen/add": "7.1.1",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"postcss": "8.5.29",
|
|
172
172
|
"source-map-js": "1.2.2",
|
|
173
173
|
"@eslint/eslintrc": "3.3.7",
|
|
174
|
-
"@burdenoff/fe-libs": "2026.1113.
|
|
174
|
+
"@burdenoff/fe-libs": "2026.1113.11"
|
|
175
175
|
},
|
|
176
176
|
"patchedDependencies": {
|
|
177
177
|
"braces@3.0.3": "patches/braces@3.0.3.patch",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { DataSink } from '../types';
|
|
2
|
-
interface UseDataSinkSubscriptionOptions {
|
|
3
|
-
/** Specific DataSink ID to subscribe to (sink-level updates) */
|
|
4
|
-
dataSinkId?: string;
|
|
5
|
-
/** Workspace ID for workspace-level events */
|
|
6
|
-
workspaceId?: string;
|
|
7
|
-
/** Whether subscriptions are enabled */
|
|
8
|
-
enabled?: boolean;
|
|
9
|
-
/** Callback when sink-level update received */
|
|
10
|
-
onUpdate?: (dataSink: DataSink) => void;
|
|
11
|
-
/** Callback when workspace-level event received */
|
|
12
|
-
onWorkspaceEvent?: (event: DataSinkWorkspaceEvent) => void;
|
|
13
|
-
}
|
|
14
|
-
interface DataSinkWorkspaceEvent {
|
|
15
|
-
type: 'CREATED' | 'UPDATED' | 'REFRESHED' | 'DELETED';
|
|
16
|
-
dataSink: DataSink;
|
|
17
|
-
timestamp: string;
|
|
18
|
-
actorId?: string;
|
|
19
|
-
}
|
|
20
|
-
interface UseDataSinkSubscriptionResult {
|
|
21
|
-
/** Whether subscriptions are active */
|
|
22
|
-
isSubscribed: boolean;
|
|
23
|
-
/** Last update timestamp */
|
|
24
|
-
lastUpdate: Date | null;
|
|
25
|
-
/** Subscription error */
|
|
26
|
-
error: Error | null;
|
|
27
|
-
}
|
|
28
|
-
export declare function useDataSinkSubscription({ dataSinkId, workspaceId, enabled, onUpdate, onWorkspaceEvent, }: UseDataSinkSubscriptionOptions): UseDataSinkSubscriptionResult;
|
|
29
|
-
export default useDataSinkSubscription;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { useDataSinkStore as e } from "../store/dataSinkStore.js";
|
|
2
|
-
import { DataSinkDataUpdatedDocument as t, DataSinkUpdatedDocument as n } from "../../generated/wspace-operations.js";
|
|
3
|
-
import { useCallback as r, useEffect as i, useState as a } from "react";
|
|
4
|
-
import { useSubscription as o } from "@apollo/client/react";
|
|
5
|
-
// src/bigconsole/hooks/useDataSinkSubscription.ts
|
|
6
|
-
function s(e) {
|
|
7
|
-
let t = e instanceof Error ? e.message : String(e);
|
|
8
|
-
return t.includes("Async Iterable") || t.includes("Observable") || t.includes("WebSocket") || t.includes("Subscription field must return");
|
|
9
|
-
}
|
|
10
|
-
function c(e) {
|
|
11
|
-
return {
|
|
12
|
-
id: e.id,
|
|
13
|
-
workspaceId: e.workspaceId,
|
|
14
|
-
tenantId: e.tenantId,
|
|
15
|
-
name: e.name || null,
|
|
16
|
-
description: e.description || null,
|
|
17
|
-
key: e.key,
|
|
18
|
-
fluidGridsWorkflowId: e.fluidGridsWorkflowId || null,
|
|
19
|
-
fluidGridsWorkflowExecutionId: e.fluidGridsWorkflowExecutionId || null,
|
|
20
|
-
config: e.config || null,
|
|
21
|
-
dataStats: e.dataStats || null,
|
|
22
|
-
lastRefreshedAt: e.lastRefreshedAt || (/* @__PURE__ */ new Date()).toISOString(),
|
|
23
|
-
lastRefreshedBy: e.lastRefreshedBy || null,
|
|
24
|
-
expiresAt: e.expiresAt || null,
|
|
25
|
-
nextRefreshAt: e.nextRefreshAt || null,
|
|
26
|
-
ttl: e.ttl ?? 0,
|
|
27
|
-
version: e.version ?? 1,
|
|
28
|
-
sizeBytes: e.sizeBytes ?? 0,
|
|
29
|
-
isActive: e.isActive ?? !0,
|
|
30
|
-
fieldMaskingEnabled: e.fieldMaskingEnabled ?? !1,
|
|
31
|
-
fieldMaskingRules: e.fieldMaskingRules || null,
|
|
32
|
-
status: e.status || "ready",
|
|
33
|
-
statusChangedAt: e.statusChangedAt || null,
|
|
34
|
-
statusChangedBy: e.statusChangedBy || null,
|
|
35
|
-
setupState: e.setupState || "not_started",
|
|
36
|
-
refresh: e.refresh || null,
|
|
37
|
-
exports: e.exports || null,
|
|
38
|
-
alerts: e.alerts || null,
|
|
39
|
-
quota: e.quota || null,
|
|
40
|
-
metadata: e.metadata || null,
|
|
41
|
-
createdAt: e.createdAt,
|
|
42
|
-
createdBy: e.createdBy || "",
|
|
43
|
-
updatedAt: e.updatedAt,
|
|
44
|
-
updatedBy: e.updatedBy || "",
|
|
45
|
-
deletedAt: e.deletedAt || null,
|
|
46
|
-
deletedBy: e.deletedBy || null
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function l({ dataSinkId: l, workspaceId: u, enabled: d = !0, onUpdate: f, onWorkspaceEvent: p }) {
|
|
50
|
-
let [m, h] = a(null), [g, _] = a(null), v = e((e) => e.updateDataSink), y = e((e) => e.addDataSink), b = e((e) => e.removeDataSink), x = r((e) => {
|
|
51
|
-
let t = c(e);
|
|
52
|
-
v(t.id, t), h(/* @__PURE__ */ new Date()), f?.(t);
|
|
53
|
-
}, [v, f]), S = r((e, t, n, r) => {
|
|
54
|
-
let i = c(t), a = {
|
|
55
|
-
type: e,
|
|
56
|
-
dataSink: i,
|
|
57
|
-
timestamp: n,
|
|
58
|
-
actorId: r
|
|
59
|
-
};
|
|
60
|
-
switch (h(new Date(n)), e) {
|
|
61
|
-
case "CREATED":
|
|
62
|
-
y(i);
|
|
63
|
-
break;
|
|
64
|
-
case "UPDATED":
|
|
65
|
-
case "REFRESHED":
|
|
66
|
-
v(i.id, i);
|
|
67
|
-
break;
|
|
68
|
-
case "DELETED": b(i.id);
|
|
69
|
-
}
|
|
70
|
-
p?.(a);
|
|
71
|
-
}, [
|
|
72
|
-
y,
|
|
73
|
-
v,
|
|
74
|
-
b,
|
|
75
|
-
p
|
|
76
|
-
]), { loading: C, error: w } = o(t, {
|
|
77
|
-
variables: { id: l },
|
|
78
|
-
skip: !d || !l,
|
|
79
|
-
onData: ({ data: e }) => {
|
|
80
|
-
e.data?.dataSinkDataUpdated && x(e.data.dataSinkDataUpdated);
|
|
81
|
-
},
|
|
82
|
-
onError: (e) => {
|
|
83
|
-
s(e) || _(e instanceof Error ? e : /* @__PURE__ */ Error("Subscription error"));
|
|
84
|
-
}
|
|
85
|
-
}), { loading: T, error: E } = o(n, {
|
|
86
|
-
variables: { workspaceId: u ?? "" },
|
|
87
|
-
skip: !d || !u,
|
|
88
|
-
onData: ({ data: e }) => {
|
|
89
|
-
if (e.data?.dataSinkUpdated) {
|
|
90
|
-
let t = e.data.dataSinkUpdated;
|
|
91
|
-
S(t.type, t.dataSink, t.timestamp, t.actorId);
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
onError: (e) => {
|
|
95
|
-
s(e) || _(e instanceof Error ? e : /* @__PURE__ */ Error("Subscription error"));
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
i(() => {}, [
|
|
99
|
-
d,
|
|
100
|
-
l,
|
|
101
|
-
u
|
|
102
|
-
]);
|
|
103
|
-
let D = w || E || g, O = D && !s(D) ? D : null;
|
|
104
|
-
return i(() => {}, [O]), {
|
|
105
|
-
isSubscribed: !!(d && (l && !C || u && !T)),
|
|
106
|
-
lastUpdate: m,
|
|
107
|
-
error: O
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
export { l as default, l as useDataSinkSubscription };
|