@golemio/fypr 1.10.1-dev.2784614109 → 1.10.1-dev.2788272269
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/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js +1 -2
- package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js.map +1 -1
- package/dist/output-gateway/interfaces/IOGInformationPanelScopes.d.ts +2 -2
- package/docs/implementation_documentation.md +1 -1
- package/docs/openapi-output.yaml +4 -9
- package/package.json +1 -1
|
@@ -32,9 +32,8 @@ let InformationPanelOutputTransformation = class InformationPanelOutputTransform
|
|
|
32
32
|
}));
|
|
33
33
|
}
|
|
34
34
|
if (embeds?.includes(_sch_1.SCOPE_DEVICE_STATUS)) {
|
|
35
|
-
result.
|
|
35
|
+
result.device_status = deviceStatus
|
|
36
36
|
? {
|
|
37
|
-
device_id: deviceStatus.device_id,
|
|
38
37
|
last_contact: deviceStatus.last_contact ? new Date(deviceStatus.last_contact).toISOString() : null,
|
|
39
38
|
status: deviceStatus.status,
|
|
40
39
|
}
|
package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationPanelOutputTransformation.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/transformations/InformationPanelOutputTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,sDAAyE;AAGzE,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,+CAA2D;IAA9G;;QACa,SAAI,GAAG,sCAAsC,CAAC;QAE9C,mBAAc,GAAG,CAAC,IAAsB,EAAE,MAAiB,EAAyB,EAAE,CAClG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAwD,EAAE,EAAE,CAClE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CACrE,CAAC;QAEU,qBAAgB,GAAG,CAC/B,OAA2D,EAC3D,MAAiB,EACE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAE5F,sBAAiB,GAAG,CAAC,KAAqB,EAAE,MAAiB,EAAuB,EAAE;YAC5F,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,KAGvE,CAAC;YACF,MAAM,MAAM,GAAwB;gBAChC,GAAG,IAAI;gBACP,OAAO,EAAE,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACnD,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC;aAC9C,CAAC;YACF,IAAI,MAAM,EAAE,QAAQ,CAAC,mBAAY,CAAC,IAAI,gBAAgB,EAAE,MAAM,EAAE,CAAC;gBAC7D,MAAM,CAAC,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;oBAChF,UAAU;oBACV,IAAI;oBACJ,UAAU;oBACV,MAAM;iBACT,CAAC,CAAC,CAAC;YACR,CAAC;YACD,IAAI,MAAM,EAAE,QAAQ,CAAC,0BAAmB,CAAC,EAAE,CAAC;gBACxC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"InformationPanelOutputTransformation.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/transformations/InformationPanelOutputTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,sDAAyE;AAGzE,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,+CAA2D;IAA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
|
10
|
-
export type IOGDeviceStatus = IDCIPStatusOverview
|
|
10
|
+
export type IOGDeviceStatus = Omit<IDCIPStatusOverview, "device_id">;
|
|
11
11
|
export interface IOGInformationPanelScopes {
|
|
12
12
|
routes: IOGPresetRoutes[];
|
|
13
|
-
|
|
13
|
+
device_status: IOGDeviceStatus | null;
|
|
14
14
|
}
|
|
@@ -350,7 +350,7 @@ Výsledky jsou řazeny dle `source_created_at ASC` (nejstarší záznamy první,
|
|
|
350
350
|
|
|
351
351
|
- volitelné query parametry pro připojení souvisejících dat (embed/join, pouze pro `information-panels`); parametr lze opakovat pro připojení více zdrojů najednou (`scopes=routes&scopes=device_status`):
|
|
352
352
|
- `scopes=routes` — připojí k infopanelům související linky (`routes`) z navázaných tabulek presetů
|
|
353
|
-
- `scopes=device_status` — připojí k infopanelu aktuální DCIP stav zařízení (`
|
|
353
|
+
- `scopes=device_status` — připojí k infopanelu aktuální DCIP stav zařízení (`device_status: { last_contact, status } | null`) dle shody `device_id`
|
|
354
354
|
|
|
355
355
|
- chybové stavové kódy:
|
|
356
356
|
- `400` — neznámý `:kind`, neplatný `limit` (mimo rozsah 1–10000), záporný `offset`,
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -165,7 +165,7 @@ paths:
|
|
|
165
165
|
request more than one (e.g. scopes=routes&scopes=device_status). "routes" adds
|
|
166
166
|
routes directly to each panel with preset routes grouped by preset name.
|
|
167
167
|
"device_status" adds the latest DCIP device status (matched by device_id) as a
|
|
168
|
-
|
|
168
|
+
device_status object, or null when no status has been reported for that device.
|
|
169
169
|
Only valid for information-panels.
|
|
170
170
|
- name: state
|
|
171
171
|
in: query
|
|
@@ -461,14 +461,9 @@ components:
|
|
|
461
461
|
DeviceStatus:
|
|
462
462
|
type: object
|
|
463
463
|
required:
|
|
464
|
-
- device_id
|
|
465
464
|
- last_contact
|
|
466
465
|
- status
|
|
467
466
|
properties:
|
|
468
|
-
device_id:
|
|
469
|
-
type: string
|
|
470
|
-
example: "bustec127"
|
|
471
|
-
description: Identifier of the device, as reported by DCIP.
|
|
472
467
|
last_contact:
|
|
473
468
|
type: string
|
|
474
469
|
format: date-time
|
|
@@ -1177,7 +1172,7 @@ components:
|
|
|
1177
1172
|
Returned by the list endpoint GET /v1/information-panels.
|
|
1178
1173
|
When ?scopes=routes is provided, the response includes a routes array directly
|
|
1179
1174
|
on each panel with preset routes grouped by preset name.
|
|
1180
|
-
When ?scopes=device_status is provided, the response includes a
|
|
1175
|
+
When ?scopes=device_status is provided, the response includes a device_status object
|
|
1181
1176
|
(or null) with the latest DCIP status matched by device_id.
|
|
1182
1177
|
allOf:
|
|
1183
1178
|
- $ref: "#/components/schemas/ElementReadOnly"
|
|
@@ -1192,11 +1187,11 @@ components:
|
|
|
1192
1187
|
description: >-
|
|
1193
1188
|
Additional resources included when ?scopes=routes or ?scopes=device_status is
|
|
1194
1189
|
requested. routes is present only when the panel has presets with associated
|
|
1195
|
-
routes;
|
|
1190
|
+
routes; device_status is present (possibly null) whenever ?scopes=device_status
|
|
1196
1191
|
is requested.
|
|
1197
1192
|
type: object
|
|
1198
1193
|
properties:
|
|
1199
|
-
|
|
1194
|
+
device_status:
|
|
1200
1195
|
allOf:
|
|
1201
1196
|
- $ref: "#/components/schemas/DeviceStatus"
|
|
1202
1197
|
nullable: true
|