@devicechain/dashboards 0.22.0-rc.1 → 0.23.0-rc.1
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/channel-snapshots.d.ts +1 -0
- package/dist/chunks/recorded-extra-C2BHFOCB.js +104 -0
- package/dist/chunks/recorded-extra-C2BHFOCB.js.map +7 -0
- package/dist/history.d.ts +3 -1
- package/dist/hub.d.ts +3 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +229 -64
- package/dist/index.js.map +3 -3
- package/dist/members.d.ts +1 -0
- package/dist/queries.d.ts +20 -0
- package/dist/recorded-extra.d.ts +17 -0
- package/dist/recorded.d.ts +11 -1
- package/dist/recording.d.ts +15 -4
- package/package.json +3 -3
package/dist/members.d.ts
CHANGED
package/dist/queries.d.ts
CHANGED
|
@@ -22,6 +22,26 @@ export interface EntityRelationshipsVariables {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
export declare const DEVICES_FOR_ANCHOR: TypedDocument<EntityRelationshipsResult, EntityRelationshipsVariables>;
|
|
25
|
+
export interface CustomerDevicesResult {
|
|
26
|
+
customerDevices: {
|
|
27
|
+
results: Array<{
|
|
28
|
+
token: string;
|
|
29
|
+
name: string | null;
|
|
30
|
+
}>;
|
|
31
|
+
pagination?: {
|
|
32
|
+
totalRecords: number | null;
|
|
33
|
+
} | null;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface CustomerDevicesVariables {
|
|
37
|
+
criteria: {
|
|
38
|
+
pageNumber: number;
|
|
39
|
+
pageSize: number;
|
|
40
|
+
customer: string;
|
|
41
|
+
relationshipType: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare const CUSTOMER_DEVICES: TypedDocument<CustomerDevicesResult, CustomerDevicesVariables>;
|
|
25
45
|
export interface DevicesByTokenResult {
|
|
26
46
|
devicesByToken: Array<{
|
|
27
47
|
token: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HistoryWindow } from './history';
|
|
2
|
+
import type { MeasurementBucket } from './queries';
|
|
3
|
+
import type { BoardRecording } from './recording';
|
|
4
|
+
import type { LocationSample } from './types';
|
|
5
|
+
export interface SeriesRows {
|
|
6
|
+
name: string;
|
|
7
|
+
rows: number[];
|
|
8
|
+
times: number[];
|
|
9
|
+
}
|
|
10
|
+
export declare function foldBuckets(rec: BoardRecording, groups: ReadonlyArray<{
|
|
11
|
+
deviceToken: string;
|
|
12
|
+
names: ReadonlySet<string>;
|
|
13
|
+
}>, byDevice: ReadonlyMap<string, readonly SeriesRows[]>, window: HistoryWindow, originMs: number, cursor: number): MeasurementBucket[];
|
|
14
|
+
export declare function lastPositions(rec: BoardRecording, tokens: readonly string[], cursor: number, iso: (offsetMs: number) => string): {
|
|
15
|
+
signature: string;
|
|
16
|
+
locations: LocationSample[];
|
|
17
|
+
};
|
package/dist/recorded.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AlarmStreamSink, AlarmSubscription, CommandStreamSink, CommandSubscription, DeviceResolver, LocationStreamSink, LocationSubscription, WidgetDataSource, WidgetStreamSink } from './hub';
|
|
2
2
|
import type { AnchorTarget, DatasourceSelector, EntityCandidateLister } from './types';
|
|
3
|
+
import type { HistoryWindow } from './history';
|
|
4
|
+
import type { MeasurementBucket } from './queries';
|
|
3
5
|
import { type BoardRecording } from './recording';
|
|
4
6
|
import type { MemberSeed, MemberSeedPlan, MemberSink } from './members';
|
|
5
7
|
export declare const RECORDED_HISTORY_WINDOW_MS: number;
|
|
@@ -53,6 +55,10 @@ export declare function createRecordedClock(rec: BoardRecording, options?: {
|
|
|
53
55
|
export interface RecordedSiteOptions {
|
|
54
56
|
siteAnchors?: readonly AnchorTarget[];
|
|
55
57
|
}
|
|
58
|
+
export interface RecordedSourceOptions extends RecordedSiteOptions {
|
|
59
|
+
timeShiftMs?: number;
|
|
60
|
+
}
|
|
61
|
+
export declare function retimeShiftMs(rec: BoardRecording, cursorMs: number, nowMs?: number): number;
|
|
56
62
|
export declare function createRecordedResolver(rec: BoardRecording, options?: RecordedSiteOptions): DeviceResolver;
|
|
57
63
|
export declare function createRecordedLister(rec: BoardRecording, options?: RecordedSiteOptions): EntityCandidateLister;
|
|
58
64
|
export declare class RecordedDataSource implements WidgetDataSource {
|
|
@@ -65,11 +71,14 @@ export declare class RecordedDataSource implements WidgetDataSource {
|
|
|
65
71
|
private readonly unlisten;
|
|
66
72
|
private cursor;
|
|
67
73
|
private stale;
|
|
68
|
-
|
|
74
|
+
private readonly shiftMs;
|
|
75
|
+
constructor(rec: BoardRecording, clock: RecordedClock, options?: RecordedSourceOptions);
|
|
69
76
|
get isStale(): boolean;
|
|
70
77
|
now(): number;
|
|
78
|
+
get timeShiftMs(): number;
|
|
71
79
|
private onClock;
|
|
72
80
|
private iso;
|
|
81
|
+
private shifted;
|
|
73
82
|
private open;
|
|
74
83
|
private resolve;
|
|
75
84
|
private failLater;
|
|
@@ -79,6 +88,7 @@ export declare class RecordedDataSource implements WidgetDataSource {
|
|
|
79
88
|
subscribeAlarms(subscription: AlarmSubscription, sink: AlarmStreamSink): () => void;
|
|
80
89
|
subscribeCommands(_subscription: CommandSubscription, sink: CommandStreamSink): () => void;
|
|
81
90
|
subscribeLocations(subscription: LocationSubscription, sink: LocationStreamSink): () => void;
|
|
91
|
+
bucketMeasurements(datasource: DatasourceSelector, window: HistoryWindow): Promise<MeasurementBucket[]>;
|
|
82
92
|
isDatasourceAvailable(datasource: DatasourceSelector | undefined): Promise<boolean>;
|
|
83
93
|
disposeAll(): void;
|
|
84
94
|
}
|
package/dist/recording.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare const RECORDING_FORMAT_VERSION =
|
|
1
|
+
export declare const RECORDING_FORMAT_VERSION = 2;
|
|
2
|
+
export declare const RECORDING_FORMAT_VERSIONS: readonly [1, 2];
|
|
2
3
|
export declare const RECORDING_KIND = "sitepulse-board-recording";
|
|
3
4
|
declare const ALARM_STATES: readonly ['ACTIVE', 'CLEARED'];
|
|
4
5
|
declare const ALARM_SEVERITIES: readonly ['CRITICAL', 'MAJOR', 'MINOR', 'WARNING'];
|
|
@@ -19,7 +20,7 @@ export interface RecordedDevice {
|
|
|
19
20
|
export interface RecordedChannels {
|
|
20
21
|
measurements: string[];
|
|
21
22
|
alarms: boolean;
|
|
22
|
-
locations:
|
|
23
|
+
locations: boolean;
|
|
23
24
|
commands: false;
|
|
24
25
|
}
|
|
25
26
|
export interface RecordedChapter {
|
|
@@ -43,6 +44,7 @@ export interface RecordedAlarm {
|
|
|
43
44
|
sev: (typeof ALARM_SEVERITIES)[number];
|
|
44
45
|
occ: string;
|
|
45
46
|
ack?: true;
|
|
47
|
+
val?: number;
|
|
46
48
|
}
|
|
47
49
|
export interface RecordedAlarmSnapshot {
|
|
48
50
|
tMs: number;
|
|
@@ -53,9 +55,17 @@ export interface RecordedAlarmSnapshot {
|
|
|
53
55
|
export interface RecordedAlarmEvent extends RecordedAlarm {
|
|
54
56
|
tMs: number;
|
|
55
57
|
}
|
|
58
|
+
export interface RecordedLocationColumns {
|
|
59
|
+
d: number[];
|
|
60
|
+
t: number[];
|
|
61
|
+
lat: number[];
|
|
62
|
+
lon: number[];
|
|
63
|
+
hdg: Array<number | null>;
|
|
64
|
+
spd: Array<number | null>;
|
|
65
|
+
}
|
|
56
66
|
export interface BoardRecording {
|
|
57
67
|
kind: typeof RECORDING_KIND;
|
|
58
|
-
formatVersion: typeof
|
|
68
|
+
formatVersion: (typeof RECORDING_FORMAT_VERSIONS)[number];
|
|
59
69
|
runId: string;
|
|
60
70
|
startedAtUtc: string;
|
|
61
71
|
durationMs: number;
|
|
@@ -77,6 +87,7 @@ export interface BoardRecording {
|
|
|
77
87
|
sourceHashes: Record<string, string>;
|
|
78
88
|
converter: {
|
|
79
89
|
version: number;
|
|
90
|
+
name?: string;
|
|
80
91
|
};
|
|
81
92
|
chapters: RecordedChapter[];
|
|
82
93
|
excerpt?: {
|
|
@@ -88,7 +99,7 @@ export interface BoardRecording {
|
|
|
88
99
|
snapshots: RecordedAlarmSnapshot[];
|
|
89
100
|
events: RecordedAlarmEvent[];
|
|
90
101
|
};
|
|
91
|
-
locations:
|
|
102
|
+
locations: RecordedLocationColumns;
|
|
92
103
|
}
|
|
93
104
|
export declare function recordingBounds(rec: BoardRecording): {
|
|
94
105
|
fromMs: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devicechain/dashboards",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0-rc.1",
|
|
4
4
|
"description": "DeviceChain dashboard runtime — the DashboardHub (telemetry subscription multiplexing over the client wire, plus the alarm, command and location channels) and the dashboard-definition, selector, slot, and binding-manifest types.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devicechain",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@graphql-typed-document-node/core": "^3.2.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@devicechain/client": "0.
|
|
49
|
+
"@devicechain/client": "0.23.0-rc.1",
|
|
50
50
|
"graphql": "^16.0.0 || ^17.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@devicechain/client": "0.
|
|
53
|
+
"@devicechain/client": "0.23.0-rc.1",
|
|
54
54
|
"@types/node": "^26.6.5",
|
|
55
55
|
"graphql": "^17.0.2",
|
|
56
56
|
"typescript": "~7.0.2",
|