@kb-labs/studio-data-client 2.89.0 → 2.94.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/index.d.ts +20 -5
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -1554,7 +1554,7 @@ interface ObservabilityDataSource {
|
|
|
1554
1554
|
getRelatedLogs(id: string): Promise<{
|
|
1555
1555
|
total: number;
|
|
1556
1556
|
logs: LogRecord[];
|
|
1557
|
-
correlationKeys:
|
|
1557
|
+
correlationKeys: Record<string, unknown>;
|
|
1558
1558
|
}>;
|
|
1559
1559
|
/**
|
|
1560
1560
|
* Get historical metrics time-series data
|
|
@@ -1949,7 +1949,7 @@ declare class HttpObservabilitySource implements ObservabilityDataSource {
|
|
|
1949
1949
|
getRelatedLogs(id: string): Promise<{
|
|
1950
1950
|
total: number;
|
|
1951
1951
|
logs: LogRecord[];
|
|
1952
|
-
correlationKeys:
|
|
1952
|
+
correlationKeys: Record<string, unknown>;
|
|
1953
1953
|
}>;
|
|
1954
1954
|
getMetricsHistory(query: MetricsHistoryQuery): Promise<HistoricalDataPoint[]>;
|
|
1955
1955
|
getMetricsHeatmap(query: MetricsHeatmapQuery): Promise<HeatmapCell[]>;
|
|
@@ -2465,9 +2465,24 @@ declare const queryKeys: {
|
|
|
2465
2465
|
};
|
|
2466
2466
|
|
|
2467
2467
|
declare function useHealthStatus(source: SystemDataSource): _tanstack_react_query.UseQueryResult<HealthStatus, Error>;
|
|
2468
|
-
declare function useReadyStatus(source: SystemDataSource): _tanstack_react_query.UseQueryResult<
|
|
2469
|
-
|
|
2470
|
-
|
|
2468
|
+
declare function useReadyStatus(source: SystemDataSource): _tanstack_react_query.UseQueryResult<_kb_labs_rest_api_contracts.ReadyResponse | _kb_labs_rest_api_contracts.NotReadyResponse | {
|
|
2469
|
+
ready: true;
|
|
2470
|
+
}, Error>;
|
|
2471
|
+
declare function useSystemInfo(source: SystemDataSource): _tanstack_react_query.UseQueryResult<_kb_labs_rest_api_contracts.SystemInfoPayload | {
|
|
2472
|
+
cwd: string;
|
|
2473
|
+
repo: undefined;
|
|
2474
|
+
profiles: never[];
|
|
2475
|
+
plugins: never[];
|
|
2476
|
+
apiVersion: string;
|
|
2477
|
+
}, Error>;
|
|
2478
|
+
declare function useCapabilities(source: SystemDataSource): _tanstack_react_query.UseQueryResult<_kb_labs_rest_api_contracts.SystemCapabilitiesPayload | {
|
|
2479
|
+
commands: string[];
|
|
2480
|
+
adapters: {
|
|
2481
|
+
queue: string[];
|
|
2482
|
+
storage: string[];
|
|
2483
|
+
auth: string[];
|
|
2484
|
+
};
|
|
2485
|
+
}, Error>;
|
|
2471
2486
|
|
|
2472
2487
|
declare function useWorkflowRuns(source: WorkflowDataSource, filters?: WorkflowRunsFilters): _tanstack_react_query.UseQueryResult<WorkflowRunsListResponse, Error>;
|
|
2473
2488
|
declare function useWorkflowRun(runId: string | null, source: WorkflowDataSource): _tanstack_react_query.UseQueryResult<WorkflowRun | null, Error>;
|
package/dist/index.js
CHANGED
|
@@ -1160,7 +1160,6 @@ var HttpObservabilitySource = class {
|
|
|
1160
1160
|
return {
|
|
1161
1161
|
ok: true,
|
|
1162
1162
|
data: response
|
|
1163
|
-
// HttpClient auto-unwraps envelope
|
|
1164
1163
|
};
|
|
1165
1164
|
} catch (error) {
|
|
1166
1165
|
throw new KBError(
|
|
@@ -3228,12 +3227,11 @@ function useHealthStatus(source) {
|
|
|
3228
3227
|
});
|
|
3229
3228
|
}
|
|
3230
3229
|
function useReadyStatus(source) {
|
|
3231
|
-
const httpSource = source;
|
|
3232
3230
|
return useQuery({
|
|
3233
3231
|
queryKey: qk.system.health.ready(),
|
|
3234
3232
|
queryFn: async () => {
|
|
3235
|
-
if (
|
|
3236
|
-
return
|
|
3233
|
+
if (source.getReady) {
|
|
3234
|
+
return source.getReady();
|
|
3237
3235
|
}
|
|
3238
3236
|
return {
|
|
3239
3237
|
ready: true
|
|
@@ -3246,12 +3244,11 @@ function useReadyStatus(source) {
|
|
|
3246
3244
|
});
|
|
3247
3245
|
}
|
|
3248
3246
|
function useSystemInfo(source) {
|
|
3249
|
-
const httpSource = source;
|
|
3250
3247
|
return useQuery({
|
|
3251
3248
|
queryKey: qk.system.info(),
|
|
3252
3249
|
queryFn: async () => {
|
|
3253
|
-
if (
|
|
3254
|
-
return
|
|
3250
|
+
if (source.getInfo) {
|
|
3251
|
+
return source.getInfo();
|
|
3255
3252
|
}
|
|
3256
3253
|
return {
|
|
3257
3254
|
cwd: process.cwd(),
|
|
@@ -3266,12 +3263,11 @@ function useSystemInfo(source) {
|
|
|
3266
3263
|
});
|
|
3267
3264
|
}
|
|
3268
3265
|
function useCapabilities(source) {
|
|
3269
|
-
const httpSource = source;
|
|
3270
3266
|
return useQuery({
|
|
3271
3267
|
queryKey: qk.system.capabilities(),
|
|
3272
3268
|
queryFn: async () => {
|
|
3273
|
-
if (
|
|
3274
|
-
return
|
|
3269
|
+
if (source.getCapabilities) {
|
|
3270
|
+
return source.getCapabilities();
|
|
3275
3271
|
}
|
|
3276
3272
|
return {
|
|
3277
3273
|
commands: ["audit", "release", "devlink", "mind", "analytics"],
|