@devicechain/dashboards 0.26.0 → 0.27.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.
@@ -12,6 +12,11 @@ export interface AlarmSearchCriteriaInput {
12
12
  deviceType?: string | null;
13
13
  startTime?: string | null;
14
14
  endTime?: string | null;
15
+ anchor?: AlarmAnchorInput | null;
16
+ }
17
+ export interface AlarmAnchorInput {
18
+ type: string;
19
+ token: string;
15
20
  }
16
21
  export interface AlarmsQueryResult {
17
22
  alarms: {
@@ -76,6 +81,7 @@ export interface AlarmStreamVariables {
76
81
  state?: string | null;
77
82
  severity?: string | null;
78
83
  alarmKey?: string | null;
84
+ anchor?: AlarmAnchorInput | null;
79
85
  }
80
86
  export declare const ALARM_STREAM: TypedDocument<AlarmStreamResult, AlarmStreamVariables>;
81
87
  export interface AlarmMutationVariables {
package/dist/queries.d.ts CHANGED
@@ -1,29 +1,29 @@
1
1
  import type { TypedDocument } from '@devicechain/client';
2
- export interface EntityRelationshipsResult {
3
- entityRelationships: {
2
+ export interface CustomerDevicesResult {
3
+ customerDevices: {
4
4
  results: Array<{
5
- source: {
5
+ token: string;
6
+ name: string | null;
7
+ deviceType?: {
6
8
  token: string;
7
- };
9
+ } | null;
8
10
  }>;
9
11
  pagination?: {
10
12
  totalRecords: number | null;
11
13
  } | null;
12
14
  };
13
15
  }
14
- export interface EntityRelationshipsVariables {
16
+ export interface CustomerDevicesVariables {
15
17
  criteria: {
16
18
  pageNumber: number;
17
19
  pageSize: number;
18
- sourceType: string;
19
- targetType: string;
20
- target: string;
21
- relationshipType?: string | null;
20
+ customer: string;
21
+ relationshipType: string;
22
22
  };
23
23
  }
24
- export declare const DEVICES_FOR_ANCHOR: TypedDocument<EntityRelationshipsResult, EntityRelationshipsVariables>;
25
- export interface CustomerDevicesResult {
26
- customerDevices: {
24
+ export declare const CUSTOMER_DEVICES: TypedDocument<CustomerDevicesResult, CustomerDevicesVariables>;
25
+ export interface AnchorDevicesResult {
26
+ anchorDevices: {
27
27
  results: Array<{
28
28
  token: string;
29
29
  name: string | null;
@@ -36,15 +36,16 @@ export interface CustomerDevicesResult {
36
36
  } | null;
37
37
  };
38
38
  }
39
- export interface CustomerDevicesVariables {
39
+ export interface AnchorDevicesVariables {
40
40
  criteria: {
41
41
  pageNumber: number;
42
42
  pageSize: number;
43
- customer: string;
44
- relationshipType: string;
43
+ targetType: string;
44
+ target: string;
45
+ relationshipType?: string | null;
45
46
  };
46
47
  }
47
- export declare const CUSTOMER_DEVICES: TypedDocument<CustomerDevicesResult, CustomerDevicesVariables>;
48
+ export declare const ANCHOR_DEVICES: TypedDocument<AnchorDevicesResult, AnchorDevicesVariables>;
48
49
  export interface DevicesByTokenResult {
49
50
  devicesByToken: Array<{
50
51
  token: string;
@@ -90,6 +91,8 @@ export interface EntityListVariables {
90
91
  criteria: {
91
92
  pageNumber: number;
92
93
  pageSize: number;
94
+ areaTypeToken?: string | null;
95
+ assetTypeToken?: string | null;
93
96
  };
94
97
  }
95
98
  export declare const LIST_DEVICES: TypedDocument<{
@@ -1,3 +1,4 @@
1
+ import type { AnchorTarget } from './types';
1
2
  export declare const RECORDING_FORMAT_VERSION = 2;
2
3
  export declare const RECORDING_FORMAT_VERSIONS: readonly [1, 2];
3
4
  export declare const RECORDING_KIND = "sitepulse-board-recording";
@@ -64,6 +65,9 @@ export interface RecordedLocationColumns {
64
65
  spd: Array<number | null>;
65
66
  }
66
67
  export type RecordedDeclarations = Record<string, string[]>;
68
+ export interface RecordedAnchor extends AnchorTarget {
69
+ devices: string[];
70
+ }
67
71
  export interface BoardRecording {
68
72
  kind: typeof RECORDING_KIND;
69
73
  formatVersion: (typeof RECORDING_FORMAT_VERSIONS)[number];
@@ -80,6 +84,7 @@ export interface BoardRecording {
80
84
  clock: RecordedClockSegment[];
81
85
  devices: RecordedDevice[];
82
86
  declaredMetrics?: RecordedDeclarations;
87
+ anchors?: RecordedAnchor[];
83
88
  channels: RecordedChannels;
84
89
  board: {
85
90
  path: string;
package/dist/slots.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type AnchorTarget, type DashboardDefinition, type LocationSelection, type SlotBinding, type SlotDefinition, type SlotScope, type WidgetInstance } from './types';
1
+ import { type AnchorTarget, type DashboardDefinition, type LocationSelection, type SlotBinding, type SlotDefinition, type SlotCandidates, type SlotScope, type WidgetInstance } from './types';
2
2
  export declare function sameBinding(a: SlotBinding | undefined, b: SlotBinding | undefined): boolean;
3
3
  export declare function nextSlotName(slots: Record<string, SlotDefinition>): string;
4
4
  export declare function migrateToSlots(def: DashboardDefinition): DashboardDefinition;
@@ -7,6 +7,7 @@ export declare function clearWidgetDatasource(def: DashboardDefinition, widgetId
7
7
  export declare function pruneSlots(def: DashboardDefinition): DashboardDefinition;
8
8
  export declare function anchorSlotNames(def: DashboardDefinition): string[];
9
9
  export declare function setSlotScope(def: DashboardDefinition, slotName: string, scope: SlotScope | undefined): DashboardDefinition;
10
+ export declare function setSlotCandidates(def: DashboardDefinition, slotName: string, candidates: SlotCandidates | undefined): DashboardDefinition;
10
11
  export declare function widgetBinding(def: DashboardDefinition, widget: WidgetInstance): SlotBinding | undefined;
11
12
  export declare function widgetSlotName(widget: WidgetInstance): string | undefined;
12
13
  export type ConcreteSelector = {
package/dist/types.d.ts CHANGED
@@ -226,6 +226,11 @@ export interface SlotDefinition {
226
226
  label?: string;
227
227
  defaultBinding?: SlotBinding;
228
228
  scope?: SlotScope;
229
+ candidates?: SlotCandidates;
230
+ }
231
+ export interface SlotCandidates {
232
+ areaType?: string;
233
+ assetType?: string;
229
234
  }
230
235
  export type EntityListKind = 'device' | 'customer' | 'area' | 'asset';
231
236
  export type EntityCandidateLister = (kind: EntityListKind) => Promise<Array<{
@@ -0,0 +1,4 @@
1
+ import { type MemberResolver } from './context';
2
+ import type { DashboardDefinition, EntityCandidateLister, SlotBinding } from './types';
3
+ export declare function hasRootAnchorSlots(definition: DashboardDefinition): boolean;
4
+ export declare function resolveViewerBindings(definition: DashboardDefinition, base: Record<string, SlotBinding>, overlay: Record<string, SlotBinding>, resolver: MemberResolver, lister?: EntityCandidateLister): Promise<Record<string, SlotBinding>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devicechain/dashboards",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
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.26.0",
49
+ "@devicechain/client": "0.27.0",
50
50
  "graphql": "^16.0.0 || ^17.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@devicechain/client": "0.26.0",
53
+ "@devicechain/client": "0.27.0",
54
54
  "@types/node": "^26.6.5",
55
55
  "graphql": "^17.0.2",
56
56
  "typescript": "~7.0.2",