@kelvininc/js-client-sdk 7.9.1 → 7.12.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/CHANGELOG.md +45 -0
- package/dist/cjs/core/http.d.ts +11 -1
- package/dist/cjs/core/http.js +16 -1
- package/dist/cjs/core/http.js.map +1 -1
- package/dist/cjs/models/generated/alarm.d.ts +2 -0
- package/dist/cjs/models/generated/alarm.js +1 -0
- package/dist/cjs/models/generated/alarm.js.map +1 -1
- package/dist/cjs/models/generated/alarmClustering.d.ts +21 -0
- package/dist/cjs/models/generated/alarmClustering.js +21 -0
- package/dist/cjs/models/generated/alarmClustering.js.map +1 -0
- package/dist/cjs/models/generated/alarmItem.d.ts +2 -0
- package/dist/cjs/models/generated/alarmItem.js +1 -0
- package/dist/cjs/models/generated/alarmItem.js.map +1 -1
- package/dist/cjs/models/generated/alarmTag.d.ts +23 -0
- package/dist/cjs/models/generated/alarmTag.js +22 -0
- package/dist/cjs/models/generated/alarmTag.js.map +1 -0
- package/dist/cjs/models/generated/alarmTagItem.d.ts +23 -0
- package/dist/cjs/models/generated/alarmTagItem.js +22 -0
- package/dist/cjs/models/generated/alarmTagItem.js.map +1 -0
- package/dist/cjs/models/generated/alarmTagListPaginated.d.ts +21 -0
- package/dist/cjs/models/generated/alarmTagListPaginated.js +22 -0
- package/dist/cjs/models/generated/alarmTagListPaginated.js.map +1 -0
- package/dist/cjs/models/generated/bridge.d.ts +24 -0
- package/dist/cjs/models/generated/bridge.js.map +1 -1
- package/dist/cjs/models/generated/bridgeDataStreamItem.d.ts +9 -0
- package/dist/cjs/models/generated/bridgeDataStreamItem.js.map +1 -1
- package/dist/cjs/models/generated/bridgeDataStreamListPaginated.d.ts +3 -0
- package/dist/cjs/models/generated/bridgeDataStreamListPaginated.js.map +1 -1
- package/dist/cjs/models/generated/bridgeItem.d.ts +21 -0
- package/dist/cjs/models/generated/bridgeItem.js.map +1 -1
- package/dist/cjs/models/generated/bridgeListPaginated.d.ts +3 -0
- package/dist/cjs/models/generated/bridgeListPaginated.js.map +1 -1
- package/dist/cjs/models/generated/carbonEmissionsInstanceSettingItem.d.ts +25 -0
- package/dist/cjs/models/generated/carbonEmissionsInstanceSettingItem.js +23 -0
- package/dist/cjs/models/generated/carbonEmissionsInstanceSettingItem.js.map +1 -0
- package/dist/cjs/models/generated/controlChangeClustering.d.ts +21 -0
- package/dist/cjs/models/generated/controlChangeClustering.js +21 -0
- package/dist/cjs/models/generated/controlChangeClustering.js.map +1 -0
- package/dist/cjs/models/generated/emissionsDashboard.d.ts +2 -2
- package/dist/cjs/models/generated/emissionsDashboard.js +1 -1
- package/dist/cjs/models/generated/emissionsDashboard.js.map +1 -1
- package/dist/cjs/models/generated/fullMap.d.ts +49 -0
- package/dist/cjs/models/generated/fullMap.js +38 -0
- package/dist/cjs/models/generated/fullMap.js.map +1 -0
- package/dist/cjs/models/generated/fullMapListPaginated.d.ts +21 -0
- package/dist/cjs/models/generated/fullMapListPaginated.js +22 -0
- package/dist/cjs/models/generated/fullMapListPaginated.js.map +1 -0
- package/dist/cjs/models/generated/index.d.ts +9 -0
- package/dist/cjs/models/generated/index.js +9 -0
- package/dist/cjs/models/generated/index.js.map +1 -1
- package/dist/cjs/models/generated/mQTTTopicItem.d.ts +18 -0
- package/dist/cjs/models/generated/mQTTTopicItem.js.map +1 -1
- package/dist/cjs/models/generated/mQTTTopicList.d.ts +3 -0
- package/dist/cjs/models/generated/mQTTTopicList.js.map +1 -1
- package/dist/cjs/models/generated/mapItem.d.ts +8 -4
- package/dist/cjs/models/generated/mapItem.js +4 -2
- package/dist/cjs/models/generated/mapItem.js.map +1 -1
- package/dist/cjs/models/generated/mapModel.d.ts +4 -0
- package/dist/cjs/models/generated/mapModel.js +2 -0
- package/dist/cjs/models/generated/mapModel.js.map +1 -1
- package/dist/cjs/models/generated/mapVersionItem.d.ts +4 -2
- package/dist/cjs/models/generated/mapVersionItem.js +2 -1
- package/dist/cjs/models/generated/mapVersionItem.js.map +1 -1
- package/dist/cjs/models/generated/metricListPaginated.d.ts +1 -1
- package/dist/cjs/models/generated/metricListPaginated.js.map +1 -1
- package/dist/cjs/models/generated/page.d.ts +21 -0
- package/dist/cjs/models/generated/page.js +21 -0
- package/dist/cjs/models/generated/page.js.map +1 -0
- package/dist/cjs/models/generated/rulePayload.d.ts +2 -0
- package/dist/cjs/models/generated/rulePayload.js +1 -0
- package/dist/cjs/models/generated/rulePayload.js.map +1 -1
- package/dist/cjs/models/generated/storageData.d.ts +15 -0
- package/dist/cjs/models/generated/storageData.js.map +1 -1
- package/dist/cjs/models/generated/storageMetric.d.ts +18 -0
- package/dist/cjs/models/generated/storageMetric.js.map +1 -1
- package/dist/cjs/models/generated/storageMetricListPaginated.d.ts +3 -0
- package/dist/cjs/models/generated/storageMetricListPaginated.js.map +1 -1
- package/dist/cjs/models/generated/workload.d.ts +4 -2
- package/dist/cjs/models/generated/workload.js +2 -1
- package/dist/cjs/models/generated/workload.js.map +1 -1
- package/dist/cjs/models/generated/workloadItem.d.ts +4 -2
- package/dist/cjs/models/generated/workloadItem.js +2 -1
- package/dist/cjs/models/generated/workloadItem.js.map +1 -1
- package/dist/cjs/services/generated/api/alarm.service.d.ts +50 -2
- package/dist/cjs/services/generated/api/alarm.service.js +113 -0
- package/dist/cjs/services/generated/api/alarm.service.js.map +1 -1
- package/dist/cjs/services/generated/api/asset.service.d.ts +1 -1
- package/dist/cjs/services/generated/api/asset.service.js +1 -1
- package/dist/cjs/services/generated/api/asset.service.js.map +1 -1
- package/dist/cjs/services/generated/api/bridge.service.d.ts +50 -50
- package/dist/cjs/services/generated/api/bridge.service.js +50 -50
- package/dist/cjs/services/generated/api/bridge.service.js.map +1 -1
- package/dist/cjs/services/generated/api/controlChange.service.d.ts +9 -2
- package/dist/cjs/services/generated/api/controlChange.service.js +15 -0
- package/dist/cjs/services/generated/api/controlChange.service.js.map +1 -1
- package/dist/cjs/services/generated/api/instance.service.d.ts +16 -2
- package/dist/cjs/services/generated/api/instance.service.js +34 -0
- package/dist/cjs/services/generated/api/instance.service.js.map +1 -1
- package/dist/cjs/services/generated/api/map.service.d.ts +4 -2
- package/dist/cjs/services/generated/api/map.service.js +10 -2
- package/dist/cjs/services/generated/api/map.service.js.map +1 -1
- package/dist/cjs/services/generated/api/rule.service.d.ts +1 -1
- package/dist/cjs/services/generated/api/rule.service.js +1 -1
- package/dist/cjs/services/generated/api/rule.service.js.map +1 -1
- package/dist/cjs/services/generated/api/storage.service.d.ts +31 -31
- package/dist/cjs/services/generated/api/storage.service.js +31 -31
- package/dist/cjs/services/generated/api/storage.service.js.map +1 -1
- package/dist/cjs/services/generated/api/uI.service.d.ts +16 -4
- package/dist/cjs/services/generated/api/uI.service.js +41 -4
- package/dist/cjs/services/generated/api/uI.service.js.map +1 -1
- package/dist/cjs/services/generated/api/workload.service.d.ts +8 -1
- package/dist/cjs/services/generated/api/workload.service.js +14 -0
- package/dist/cjs/services/generated/api/workload.service.js.map +1 -1
- package/dist/cjs/services/generated/models/aCPStatusUpdateData.d.ts +1 -0
- package/dist/cjs/services/generated/models/aCPStatusUpdateData.js.map +1 -1
- package/dist/cjs/services/generated/models/alarmClusteringData.d.ts +11 -0
- package/dist/cjs/services/generated/models/alarmClusteringData.js +3 -0
- package/dist/cjs/services/generated/models/alarmClusteringData.js.map +1 -0
- package/dist/cjs/services/generated/models/alarmCreateData.d.ts +1 -0
- package/dist/cjs/services/generated/models/alarmCreateData.js.map +1 -1
- package/dist/cjs/services/generated/models/alarmListData.d.ts +1 -0
- package/dist/cjs/services/generated/models/alarmListData.js.map +1 -1
- package/dist/cjs/services/generated/models/alarmTagCreateData.d.ts +7 -0
- package/dist/cjs/services/generated/models/alarmTagCreateData.js +3 -0
- package/dist/cjs/services/generated/models/alarmTagCreateData.js.map +1 -0
- package/dist/cjs/services/generated/models/alarmTagUpdateData.d.ts +6 -0
- package/dist/cjs/services/generated/models/alarmTagUpdateData.js +3 -0
- package/dist/cjs/services/generated/models/alarmTagUpdateData.js.map +1 -0
- package/dist/cjs/services/generated/models/alarmUpdateData.d.ts +1 -0
- package/dist/cjs/services/generated/models/alarmUpdateData.js.map +1 -1
- package/dist/cjs/services/generated/models/bridgeDeployData.d.ts +5 -5
- package/dist/cjs/services/generated/models/bridgeDeployData.js.map +1 -1
- package/dist/cjs/services/generated/models/carbonEmissionsSettingData.d.ts +15 -0
- package/dist/cjs/services/generated/models/carbonEmissionsSettingData.js +3 -0
- package/dist/cjs/services/generated/models/carbonEmissionsSettingData.js.map +1 -0
- package/dist/cjs/services/generated/models/controlChangeClusteringData.d.ts +12 -0
- package/dist/cjs/services/generated/models/controlChangeClusteringData.js +3 -0
- package/dist/cjs/services/generated/models/controlChangeClusteringData.js.map +1 -0
- package/dist/cjs/services/generated/models/controlChangeListData.d.ts +2 -1
- package/dist/cjs/services/generated/models/controlChangeListData.js.map +1 -1
- package/dist/cjs/services/generated/models/failureOverviewData.d.ts +1 -0
- package/dist/cjs/services/generated/models/failureOverviewData.js.map +1 -1
- package/dist/cjs/services/generated/models/index.d.ts +7 -0
- package/dist/cjs/services/generated/models/index.js +7 -0
- package/dist/cjs/services/generated/models/index.js.map +1 -1
- package/dist/cjs/services/generated/models/kelvinCarbonEmissionsInstanceSettingUpdateData.d.ts +7 -0
- package/dist/cjs/services/generated/models/kelvinCarbonEmissionsInstanceSettingUpdateData.js +3 -0
- package/dist/cjs/services/generated/models/kelvinCarbonEmissionsInstanceSettingUpdateData.js.map +1 -0
- package/dist/cjs/services/generated/models/mapCreateData.d.ts +3 -1
- package/dist/cjs/services/generated/models/mapCreateData.js.map +1 -1
- package/dist/cjs/services/generated/models/mapUpdateData.d.ts +3 -1
- package/dist/cjs/services/generated/models/mapUpdateData.js.map +1 -1
- package/dist/cjs/services/generated/models/processesListData.d.ts +8 -0
- package/dist/cjs/services/generated/models/processesListData.js +3 -0
- package/dist/cjs/services/generated/models/processesListData.js.map +1 -0
- package/dist/cjs/services/generated/models/rulePayloadData.d.ts +1 -0
- package/dist/cjs/services/generated/models/rulePayloadData.js.map +1 -1
- package/dist/cjs/services/generated/types/alarm.service.types.d.ts +43 -1
- package/dist/cjs/services/generated/types/alarm.service.types.js.map +1 -1
- package/dist/cjs/services/generated/types/controlChange.service.types.d.ts +7 -1
- package/dist/cjs/services/generated/types/controlChange.service.types.js.map +1 -1
- package/dist/cjs/services/generated/types/instance.service.types.d.ts +11 -1
- package/dist/cjs/services/generated/types/instance.service.types.js.map +1 -1
- package/dist/cjs/services/generated/types/map.service.types.d.ts +2 -0
- package/dist/cjs/services/generated/types/map.service.types.js.map +1 -1
- package/dist/cjs/services/generated/types/uI.service.types.d.ts +13 -1
- package/dist/cjs/services/generated/types/uI.service.types.js.map +1 -1
- package/dist/cjs/services/generated/types/workload.service.types.d.ts +6 -0
- package/dist/cjs/services/generated/types/workload.service.types.js.map +1 -1
- package/dist/esm/core/http.d.ts +11 -1
- package/dist/esm/core/http.js +15 -0
- package/dist/esm/core/http.js.map +1 -1
- package/dist/esm/models/generated/alarm.d.ts +2 -0
- package/dist/esm/models/generated/alarm.js +1 -0
- package/dist/esm/models/generated/alarm.js.map +1 -1
- package/dist/esm/models/generated/alarmClustering.d.ts +21 -0
- package/dist/esm/models/generated/alarmClustering.js +17 -0
- package/dist/esm/models/generated/alarmClustering.js.map +1 -0
- package/dist/esm/models/generated/alarmItem.d.ts +2 -0
- package/dist/esm/models/generated/alarmItem.js +1 -0
- package/dist/esm/models/generated/alarmItem.js.map +1 -1
- package/dist/esm/models/generated/alarmTag.d.ts +23 -0
- package/dist/esm/models/generated/alarmTag.js +18 -0
- package/dist/esm/models/generated/alarmTag.js.map +1 -0
- package/dist/esm/models/generated/alarmTagItem.d.ts +23 -0
- package/dist/esm/models/generated/alarmTagItem.js +18 -0
- package/dist/esm/models/generated/alarmTagItem.js.map +1 -0
- package/dist/esm/models/generated/alarmTagListPaginated.d.ts +21 -0
- package/dist/esm/models/generated/alarmTagListPaginated.js +18 -0
- package/dist/esm/models/generated/alarmTagListPaginated.js.map +1 -0
- package/dist/esm/models/generated/bridge.d.ts +24 -0
- package/dist/esm/models/generated/bridge.js.map +1 -1
- package/dist/esm/models/generated/bridgeDataStreamItem.d.ts +9 -0
- package/dist/esm/models/generated/bridgeDataStreamItem.js.map +1 -1
- package/dist/esm/models/generated/bridgeDataStreamListPaginated.d.ts +3 -0
- package/dist/esm/models/generated/bridgeDataStreamListPaginated.js.map +1 -1
- package/dist/esm/models/generated/bridgeItem.d.ts +21 -0
- package/dist/esm/models/generated/bridgeItem.js.map +1 -1
- package/dist/esm/models/generated/bridgeListPaginated.d.ts +3 -0
- package/dist/esm/models/generated/bridgeListPaginated.js.map +1 -1
- package/dist/esm/models/generated/carbonEmissionsInstanceSettingItem.d.ts +25 -0
- package/dist/esm/models/generated/carbonEmissionsInstanceSettingItem.js +19 -0
- package/dist/esm/models/generated/carbonEmissionsInstanceSettingItem.js.map +1 -0
- package/dist/esm/models/generated/controlChangeClustering.d.ts +21 -0
- package/dist/esm/models/generated/controlChangeClustering.js +17 -0
- package/dist/esm/models/generated/controlChangeClustering.js.map +1 -0
- package/dist/esm/models/generated/emissionsDashboard.d.ts +2 -2
- package/dist/esm/models/generated/emissionsDashboard.js +1 -1
- package/dist/esm/models/generated/emissionsDashboard.js.map +1 -1
- package/dist/esm/models/generated/fullMap.d.ts +49 -0
- package/dist/esm/models/generated/fullMap.js +34 -0
- package/dist/esm/models/generated/fullMap.js.map +1 -0
- package/dist/esm/models/generated/fullMapListPaginated.d.ts +21 -0
- package/dist/esm/models/generated/fullMapListPaginated.js +18 -0
- package/dist/esm/models/generated/fullMapListPaginated.js.map +1 -0
- package/dist/esm/models/generated/index.d.ts +9 -0
- package/dist/esm/models/generated/index.js +9 -0
- package/dist/esm/models/generated/index.js.map +1 -1
- package/dist/esm/models/generated/mQTTTopicItem.d.ts +18 -0
- package/dist/esm/models/generated/mQTTTopicItem.js.map +1 -1
- package/dist/esm/models/generated/mQTTTopicList.d.ts +3 -0
- package/dist/esm/models/generated/mQTTTopicList.js.map +1 -1
- package/dist/esm/models/generated/mapItem.d.ts +8 -4
- package/dist/esm/models/generated/mapItem.js +4 -2
- package/dist/esm/models/generated/mapItem.js.map +1 -1
- package/dist/esm/models/generated/mapModel.d.ts +4 -0
- package/dist/esm/models/generated/mapModel.js +2 -0
- package/dist/esm/models/generated/mapModel.js.map +1 -1
- package/dist/esm/models/generated/mapVersionItem.d.ts +4 -2
- package/dist/esm/models/generated/mapVersionItem.js +2 -1
- package/dist/esm/models/generated/mapVersionItem.js.map +1 -1
- package/dist/esm/models/generated/metricListPaginated.d.ts +1 -1
- package/dist/esm/models/generated/metricListPaginated.js.map +1 -1
- package/dist/esm/models/generated/page.d.ts +21 -0
- package/dist/esm/models/generated/page.js +17 -0
- package/dist/esm/models/generated/page.js.map +1 -0
- package/dist/esm/models/generated/rulePayload.d.ts +2 -0
- package/dist/esm/models/generated/rulePayload.js +1 -0
- package/dist/esm/models/generated/rulePayload.js.map +1 -1
- package/dist/esm/models/generated/storageData.d.ts +15 -0
- package/dist/esm/models/generated/storageData.js.map +1 -1
- package/dist/esm/models/generated/storageMetric.d.ts +18 -0
- package/dist/esm/models/generated/storageMetric.js.map +1 -1
- package/dist/esm/models/generated/storageMetricListPaginated.d.ts +3 -0
- package/dist/esm/models/generated/storageMetricListPaginated.js.map +1 -1
- package/dist/esm/models/generated/workload.d.ts +4 -2
- package/dist/esm/models/generated/workload.js +2 -1
- package/dist/esm/models/generated/workload.js.map +1 -1
- package/dist/esm/models/generated/workloadItem.d.ts +4 -2
- package/dist/esm/models/generated/workloadItem.js +2 -1
- package/dist/esm/models/generated/workloadItem.js.map +1 -1
- package/dist/esm/services/generated/api/alarm.service.d.ts +50 -2
- package/dist/esm/services/generated/api/alarm.service.js +114 -1
- package/dist/esm/services/generated/api/alarm.service.js.map +1 -1
- package/dist/esm/services/generated/api/asset.service.d.ts +1 -1
- package/dist/esm/services/generated/api/asset.service.js +1 -1
- package/dist/esm/services/generated/api/asset.service.js.map +1 -1
- package/dist/esm/services/generated/api/bridge.service.d.ts +50 -50
- package/dist/esm/services/generated/api/bridge.service.js +50 -50
- package/dist/esm/services/generated/api/bridge.service.js.map +1 -1
- package/dist/esm/services/generated/api/controlChange.service.d.ts +9 -2
- package/dist/esm/services/generated/api/controlChange.service.js +16 -1
- package/dist/esm/services/generated/api/controlChange.service.js.map +1 -1
- package/dist/esm/services/generated/api/instance.service.d.ts +16 -2
- package/dist/esm/services/generated/api/instance.service.js +35 -1
- package/dist/esm/services/generated/api/instance.service.js.map +1 -1
- package/dist/esm/services/generated/api/map.service.d.ts +4 -2
- package/dist/esm/services/generated/api/map.service.js +10 -2
- package/dist/esm/services/generated/api/map.service.js.map +1 -1
- package/dist/esm/services/generated/api/rule.service.d.ts +1 -1
- package/dist/esm/services/generated/api/rule.service.js +1 -1
- package/dist/esm/services/generated/api/rule.service.js.map +1 -1
- package/dist/esm/services/generated/api/storage.service.d.ts +31 -31
- package/dist/esm/services/generated/api/storage.service.js +31 -31
- package/dist/esm/services/generated/api/storage.service.js.map +1 -1
- package/dist/esm/services/generated/api/uI.service.d.ts +16 -4
- package/dist/esm/services/generated/api/uI.service.js +42 -5
- package/dist/esm/services/generated/api/uI.service.js.map +1 -1
- package/dist/esm/services/generated/api/workload.service.d.ts +8 -1
- package/dist/esm/services/generated/api/workload.service.js +14 -0
- package/dist/esm/services/generated/api/workload.service.js.map +1 -1
- package/dist/esm/services/generated/models/aCPStatusUpdateData.d.ts +1 -0
- package/dist/esm/services/generated/models/aCPStatusUpdateData.js.map +1 -1
- package/dist/esm/services/generated/models/alarmClusteringData.d.ts +11 -0
- package/dist/esm/services/generated/models/alarmClusteringData.js +1 -0
- package/dist/esm/services/generated/models/alarmClusteringData.js.map +1 -0
- package/dist/esm/services/generated/models/alarmCreateData.d.ts +1 -0
- package/dist/esm/services/generated/models/alarmCreateData.js.map +1 -1
- package/dist/esm/services/generated/models/alarmListData.d.ts +1 -0
- package/dist/esm/services/generated/models/alarmListData.js.map +1 -1
- package/dist/esm/services/generated/models/alarmTagCreateData.d.ts +7 -0
- package/dist/esm/services/generated/models/alarmTagCreateData.js +1 -0
- package/dist/esm/services/generated/models/alarmTagCreateData.js.map +1 -0
- package/dist/esm/services/generated/models/alarmTagUpdateData.d.ts +6 -0
- package/dist/esm/services/generated/models/alarmTagUpdateData.js +1 -0
- package/dist/esm/services/generated/models/alarmTagUpdateData.js.map +1 -0
- package/dist/esm/services/generated/models/alarmUpdateData.d.ts +1 -0
- package/dist/esm/services/generated/models/alarmUpdateData.js.map +1 -1
- package/dist/esm/services/generated/models/bridgeDeployData.d.ts +5 -5
- package/dist/esm/services/generated/models/bridgeDeployData.js.map +1 -1
- package/dist/esm/services/generated/models/carbonEmissionsSettingData.d.ts +15 -0
- package/dist/esm/services/generated/models/carbonEmissionsSettingData.js +1 -0
- package/dist/esm/services/generated/models/carbonEmissionsSettingData.js.map +1 -0
- package/dist/esm/services/generated/models/controlChangeClusteringData.d.ts +12 -0
- package/dist/esm/services/generated/models/controlChangeClusteringData.js +1 -0
- package/dist/esm/services/generated/models/controlChangeClusteringData.js.map +1 -0
- package/dist/esm/services/generated/models/controlChangeListData.d.ts +2 -1
- package/dist/esm/services/generated/models/controlChangeListData.js.map +1 -1
- package/dist/esm/services/generated/models/failureOverviewData.d.ts +1 -0
- package/dist/esm/services/generated/models/failureOverviewData.js.map +1 -1
- package/dist/esm/services/generated/models/index.d.ts +7 -0
- package/dist/esm/services/generated/models/index.js +7 -0
- package/dist/esm/services/generated/models/index.js.map +1 -1
- package/dist/esm/services/generated/models/kelvinCarbonEmissionsInstanceSettingUpdateData.d.ts +7 -0
- package/dist/esm/services/generated/models/kelvinCarbonEmissionsInstanceSettingUpdateData.js +1 -0
- package/dist/esm/services/generated/models/kelvinCarbonEmissionsInstanceSettingUpdateData.js.map +1 -0
- package/dist/esm/services/generated/models/mapCreateData.d.ts +3 -1
- package/dist/esm/services/generated/models/mapCreateData.js.map +1 -1
- package/dist/esm/services/generated/models/mapUpdateData.d.ts +3 -1
- package/dist/esm/services/generated/models/mapUpdateData.js.map +1 -1
- package/dist/esm/services/generated/models/processesListData.d.ts +8 -0
- package/dist/esm/services/generated/models/processesListData.js +1 -0
- package/dist/esm/services/generated/models/processesListData.js.map +1 -0
- package/dist/esm/services/generated/models/rulePayloadData.d.ts +1 -0
- package/dist/esm/services/generated/models/rulePayloadData.js.map +1 -1
- package/dist/esm/services/generated/types/alarm.service.types.d.ts +43 -1
- package/dist/esm/services/generated/types/alarm.service.types.js.map +1 -1
- package/dist/esm/services/generated/types/controlChange.service.types.d.ts +7 -1
- package/dist/esm/services/generated/types/controlChange.service.types.js.map +1 -1
- package/dist/esm/services/generated/types/instance.service.types.d.ts +11 -1
- package/dist/esm/services/generated/types/instance.service.types.js.map +1 -1
- package/dist/esm/services/generated/types/map.service.types.d.ts +2 -0
- package/dist/esm/services/generated/types/map.service.types.js.map +1 -1
- package/dist/esm/services/generated/types/uI.service.types.d.ts +13 -1
- package/dist/esm/services/generated/types/uI.service.types.js.map +1 -1
- package/dist/esm/services/generated/types/workload.service.types.d.ts +6 -0
- package/dist/esm/services/generated/types/workload.service.types.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ const base_service_1 = require("../../base.service");
|
|
|
9
9
|
class StorageService extends base_service_1.BaseService {
|
|
10
10
|
/**
|
|
11
11
|
* Create Historian Metric
|
|
12
|
-
* Create Historian Metric
|
|
12
|
+
* Create Historian Metric Create one or more data values for defined times for one or more specific <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs on the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a>. <span style=\"color: #ff0000;font-weight: bold;\">WARNING</span> : If a value already exists at the defined time, then it will be overwriten with the new payload value. The old value will be lost and is not recoverable ! **Permission Required:** `kelvin.permission.storage.create`
|
|
13
13
|
* @param storage Storage create schema
|
|
14
14
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
15
15
|
*/
|
|
@@ -24,7 +24,7 @@ class StorageService extends base_service_1.BaseService {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Delete Historian Range
|
|
27
|
-
* Delete Historian Range will delete all associated time series values
|
|
27
|
+
* Delete Historian Range will delete all associated time series values for selected <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs between a given time range. **Permission Required:** `kelvin.permission.storage.delete`
|
|
28
28
|
* @param storage Body of the request
|
|
29
29
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
30
30
|
*/
|
|
@@ -39,7 +39,7 @@ class StorageService extends base_service_1.BaseService {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Download Historian Metrics
|
|
42
|
-
* Download Historian Metrics
|
|
42
|
+
* Download Historian Metrics Returns a **CSV file** with time series data within a for a given time range and given list of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the parameter `selectors`. The downloaded csv file will contain six columns; `name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> ), `time` ( Timestamp when the data was recorded from source ), `asset_name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> ), `source` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> that has recorded the data ), `target` ( Custom parameter set by user ), `value` ( value recorded ). **Permission Required:** `kelvin.permission.storage.read`
|
|
43
43
|
* @param query Request Schema
|
|
44
44
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
45
45
|
*/
|
|
@@ -54,7 +54,7 @@ class StorageService extends base_service_1.BaseService {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Get Historian Metric Advanced Range
|
|
57
|
-
* Get Historian Metric Advanced Range
|
|
57
|
+
* Get Historian Metric Advanced Range Returns a list of recorded values or calculated statistics from the database for one or multiple <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs based on a time range. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`
|
|
58
58
|
* @param body Advanced range schema
|
|
59
59
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
60
60
|
*/
|
|
@@ -69,10 +69,10 @@ class StorageService extends base_service_1.BaseService {
|
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Get Historian Metric Last
|
|
72
|
-
* Get Historian Metric Last
|
|
73
|
-
* @param name Metric
|
|
74
|
-
* @param assetName
|
|
75
|
-
* @param fields List of field
|
|
72
|
+
* Get Historian Metric Last Returns the last recorded value in the database for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`
|
|
73
|
+
* @param name Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.
|
|
74
|
+
* @param assetName Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.
|
|
75
|
+
* @param fields List of wanted field keys that are recorded in the payload. Normally this will be value.</p> If there are other unique keys/value pairs in the payload, then you can create a list of all keys to retrieve the values. e.g. 'value, key2'. If the key does not exist in the stored payload, that key will return with a value `null`.
|
|
76
76
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
77
77
|
*/
|
|
78
78
|
static getHistorianMetricLast({ name, assetName, fields }, options) {
|
|
@@ -96,7 +96,7 @@ class StorageService extends base_service_1.BaseService {
|
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Get Historian Metric Last Advanced
|
|
99
|
-
* Get Historian Metric Last Advanced
|
|
99
|
+
* Get Historian Metric Last Advanced Returns an array of last recorded values in the database for each of the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the POST. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`
|
|
100
100
|
* @param query Request for multiple Metric selectors
|
|
101
101
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
102
102
|
*/
|
|
@@ -111,17 +111,17 @@ class StorageService extends base_service_1.BaseService {
|
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Get Historian Metric Range
|
|
114
|
-
* Get Historian Metric Range
|
|
115
|
-
* @param name Metric
|
|
116
|
-
* @param assetName
|
|
117
|
-
* @param startTime
|
|
118
|
-
* @param endTime
|
|
119
|
-
* @param agg
|
|
120
|
-
* @param timeBucket
|
|
121
|
-
* @param timeShift
|
|
122
|
-
* @param fill
|
|
123
|
-
* @param order Order of the
|
|
124
|
-
* @param fields
|
|
114
|
+
* Get Historian Metric Range Returns a list of recorded values or calculated statistics from the database for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair based on a time range. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`
|
|
115
|
+
* @param name Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.
|
|
116
|
+
* @param assetName Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.
|
|
117
|
+
* @param startTime Start time of the recorded time to collect the payload data from the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a> in ISO 8601 UTC date/time format. Example; '2022-07-08T08:41:01.657916Z'.
|
|
118
|
+
* @param endTime End time of the recorded time to collect the payload data from the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a> in ISO 8601 UTC date/time format. Example; '2022-07-08T08:41:01.657916Z'.
|
|
119
|
+
* @param agg Perform mathematical calculations on a group of data.</p> For numerical data there are twelve mathematical options available; `none` , `count`,`distinct`, `integral`, `mean`, `median`, `mode`, `spread`, `stddev`, `sum`, `max`, `min`.</p> For text based data there are three types of mathematical options available; `count`, `distinct`, `mode`. The default is `none`.</p> When using this parameter, you must also use the parameters `time_bucket` which defines how to group the data and `fields` which defines which payload data to use.
|
|
120
|
+
* @param timeBucket Group the data by time frame for the `agg` parameter calculations.</p> The time can be adjusted with these time units `ns`, `ms`, `s`, `m`, `h`. e.g. `8765h` equates to is 8,765 hours which is approximately one year.
|
|
121
|
+
* @param timeShift Shift the time buckets from the epoch. Every time bucket starts from epoch so, if you want to calculate the time bucket starting on a different date and time, you'll need to set this. Example: `5m`, `1h`, `1w`.
|
|
122
|
+
* @param fill Fills any group of data, which is defined by the `time_bucket` parameter, with a calculated value when there is no data in the database.</p> There are five options available; `none`, `null`, `linear`, `previous`, fixed integer value.</p> `none` will ignore the group. `null`, `previous` and fixed integer value will be added as the value for the empty group. `linear` will perform a linear regression to calculated the groups' value.</p> The default is `none`.
|
|
123
|
+
* @param order Order of the results for the timestamp parameter.</p> There are two options available (capital letters is required); `ASC` for ascending and `DESC` for descending. The default is `ASC`.
|
|
124
|
+
* @param fields Array of strings which each string representing one key inside the payload. Normally there will be only one key labeled `value`.
|
|
125
125
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
126
126
|
*/
|
|
127
127
|
static getHistorianMetricRange({ name, assetName, startTime, endTime, agg, timeBucket, timeShift, fill, order, fields }, options) {
|
|
@@ -166,15 +166,15 @@ class StorageService extends base_service_1.BaseService {
|
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* List Historian Metric
|
|
169
|
-
* List Historian Metric **Pagination Sortable Columns:** `storage_metric.name`, `storage_metric.asset_name` **Permission Required:** `kelvin.permission.storage.read`
|
|
170
|
-
* @param name Metric name
|
|
171
|
-
* @param assetName
|
|
172
|
-
* @param search Search metrics
|
|
173
|
-
* @param pageSize Number of objects to be returned
|
|
174
|
-
* @param startingAfter
|
|
175
|
-
* @param endingBefore
|
|
176
|
-
* @param sortBy
|
|
177
|
-
* @param sortAsc
|
|
169
|
+
* List Historian Metric Returns a dictionary with a data property containing a filtered array of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair objects on the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a>. **Pagination Sortable Columns:** `storage_metric.name`, `storage_metric.asset_name` **Permission Required:** `kelvin.permission.storage.read`
|
|
170
|
+
* @param name Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.
|
|
171
|
+
* @param assetName Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.
|
|
172
|
+
* @param search Search and filter the return list. Both the Display Name and the Name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> and <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metrics</a> will be included in the search field criteria. This is given as an array, for example `[pump,fan]`.</p> The search is case insensitive and will find partial matches as well. For example if a <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/#asset' target='_blank'>Kelvin Asset</a> name or display name is `centrifugal_pump`, then a match will be made if the search string is `pum` or `FUGaL`.
|
|
173
|
+
* @param pageSize Number of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair objects to be returned. Page size can be between 1 and 1000 objects.</p> The default is 20 <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair objects.
|
|
174
|
+
* @param startingAfter An alphanumeric string to move to the next page of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the list.</p> The alphanumeric string which are the bookmarks for the beginning and end of the current list is given in the previous JSON response value under the key pagination -> previous_page and pagination -> next_page respectively.</p> The pagination -> next_page alphanumeric string should be used here to show a list of the next page of results.
|
|
175
|
+
* @param endingBefore An alphanumeric string to move to the previous page of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the list.</p> The alphanumeric string which are the bookmarks for the beginning and end of the current list is given in the previous JSON response value under the key pagination -> previous_page and pagination -> next_page respectively.</p> The pagination -> previous_page alphanumeric string should be used here to show a list of the previous page of results.
|
|
176
|
+
* @param sortBy Sort the results by one of the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> parameters. Only one parameter can be selected.</p> There are two parameter options; `name` and `asset.name`.</p> The default is `asset.name`
|
|
177
|
+
* @param sortAsc Sorting order for the results according to the `sort_by` parameter.</p> There are two options; `true` (ascending order) and `false` (descending order).</p> The default is `true` (ascending).
|
|
178
178
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
179
179
|
*/
|
|
180
180
|
static listHistorianMetric({ name, assetName, search, pageSize, startingAfter, endingBefore, sortBy, sortAsc } = {}, options) {
|
|
@@ -213,7 +213,7 @@ class StorageService extends base_service_1.BaseService {
|
|
|
213
213
|
}
|
|
214
214
|
/**
|
|
215
215
|
* Update Historian Metric
|
|
216
|
-
* Update Historian Metric
|
|
216
|
+
* Update Historian Metric Updates the `title` parameter of a <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair. **Permission Required:** `kelvin.permission.storage.update`
|
|
217
217
|
* @param storage Body of the request
|
|
218
218
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
219
219
|
*/
|
|
@@ -228,7 +228,7 @@ class StorageService extends base_service_1.BaseService {
|
|
|
228
228
|
}
|
|
229
229
|
/**
|
|
230
230
|
* Upload Historian Metrics
|
|
231
|
-
* Upload Historian Metrics
|
|
231
|
+
* Upload Historian Metrics Accepts a **CSV file** with time series data within a for a given time range and given list of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the parameter `selectors`. The csv file should contain six columns in a comma delimited csv file; `name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> ), `time` ( Timestamp when the data was recorded from source ), `asset_name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> ), `source` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> that has recorded the data - this value is optional ), `target` ( Custom parameter set by user - this value is optional ), `value` ( value recorded ). The first row must contain the column headers; `name,time,asset_name,source,target,value`. **Permission Required:** `kelvin.permission.storage.create`
|
|
232
232
|
* @param file CSV File
|
|
233
233
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
234
234
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.service.js","sourceRoot":"","sources":["../../../../../src/services/generated/api/storage.service.ts"],"names":[],"mappings":";;;AAEA,4CAA0E;AAC1E,qDAAiD;AAWjD;;GAEG;AAEH,MAAa,cAAe,SAAQ,0BAAW;IAE9C;;;;;OAKG;IAEH,MAAM,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAgC,EAAE,OAA+B;QAEtG,MAAM,aAAa,GAAmB;YACrC,MAAM,EAAE,MAAuB;SAC/B,CAAC;QACF,aAAa,CAAC,IAAI,GAAG,OAAO,CAAC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,CAAC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAA6B,yBAAyB,EAAE,aAAa,EAAE,mCAA0B,CAAC,CAAC;IACvH,CAAC;IAED;;;;;OAKG;IAEH,MAAM,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAgC,EAAE,OAA+B;QAEtG,MAAM,aAAa,GAAmB;YACrC,MAAM,EAAE,MAAuB;SAC/B,CAAC;QACF,aAAa,CAAC,IAAI,GAAG,OAAO,CAAC;QAE7B,aAAa,CAAC,SAAS,GAAG,kBAAkB,CAAC;QAC7C,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAkB,2BAA2B,EAAE,aAAa,CAAC,CAAC;IAClF,CAAC;IAED;;;;;OAKG;IAEH,MAAM,CAAC,sBAAsB,CAAC,EAAE,IAAI,EAAiC,EAAE,OAA+B;QAErG,MAAM,aAAa,GAAmB;YACrC,MAAM,EAAE,MAAuB;SAC/B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,QAAQ,EAAE,CAAC;QAClC,IAAI,IAAI,IAAI,IAAI,EAAE;YACjB,UAAU,CAAC,MAAM,CAAC,MAAM,EAAO,IAAI,CAAC,CAAC;SACrC;QACD,aAAa,CAAC,IAAI,GAAG,UAAU,CAAC;QAEhC,aAAa,CAAC,SAAS,GAAG,kBAAkB,CAAC;QAC7C,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAkB,2BAA2B,EAAE,aAAa,CAAC,CAAC;IAClF,CAAC;CACD;AAzTD,wCAyTC","sourcesContent":["import { Observable } from 'rxjs';\nimport { EKvHttpMethod, IKvHttpRequest, IKvHttpRequestOptions, IKvHttpResponse } from '../../../core/http';\nimport { StorageData, StorageMetricListPaginated } from '../../../models';\nimport { BaseService } from '../../base.service';\nimport {\n\tICreateHistorianMetricParams,\n\tIDeleteHistorianRangeParams,\n\tIDownloadHistorianMetricsParams,\n\tIGetHistorianMetricAdvancedRangeParams, IGetHistorianMetricLastAdvancedParams, IGetHistorianMetricLastParams, IGetHistorianMetricRangeParams,\n\tIListHistorianMetricParams,\n\tIUpdateHistorianMetricParams,\n\tIUploadHistorianMetricsParams\n} from '../types';\n\n/**\n * @category Service\n */\n\nexport class StorageService extends BaseService {\n\n\t/**\n\t * Create Historian Metric\n\t * Create Historian Metric persists time series data. **Note:** * If a Metric timestamp already exists on the database, this endpoint will overwrite the stored payload with the new payload value. **Payload Details:** * `name`: name of the Metric * `source`: application that generated the data. Example: `modbus` * `asset_name`: name of the Asset * `payload`: data to persist * `timestamp`: RFC3339 timestamps with added micro-second precision **Permission Required:** `kelvin.permission.storage.create`\n\t * @param storage Storage create schema\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic createHistorianMetric({ storage }: ICreateHistorianMetricParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = storage;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/create`, requestConfig);\n\t}\n\n\t/**\n\t * Delete Historian Range\n\t * Delete Historian Range will delete all associated time series values between a given time-range. **Payload Details:** * `start_time`: supports RFC3339 timestamps with added micro-second precision * `end_time`: supports RFC3339 timestamps with added micro-second precision **Permission Required:** `kelvin.permission.storage.delete`\n\t * @param storage Body of the request\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic deleteHistorianRange({ storage }: IDeleteHistorianRangeParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = storage;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/range/delete`, requestConfig);\n\t}\n\n\t/**\n\t * Download Historian Metrics\n\t * Download Historian Metrics returns a **CSV file** with time series data for a given time range List of Metric selectors. **Payload Description:** * `start_time` supports RFC3339 timestamps with added micro-second precision * `end_time` supports RFC3339 timestamps with added micro-second precision * `time_bucket` uses an human readable format which is covered in more detail in https://golang.org/pkg/time/#ParseDuration. Example: `5m`, `1h`, `1w` * `time_shift` is used to shift the time buckets from the epoch. Every time bucket starts from epoch so, if you want to calculate the time bucket starting on a different date and time, you'll need to set this. Example: `5m`, `1h`, `1w` * `fill` allows you to fill missing points from a time bucket. Check below for supported fill values. * `agg` allows you to choose an aggregation. Check below for supported aggregations. **Supported Fill:** * `none`: Default behaviour. * `null`: Fills the missing points with null string * `linear`: Performs a linear regression * `previous`: Uses the previous non-empty value * `int value`: Fills the missing points with the specified number **Supported Aggregations:** * Numeric types (`int32`, `int64`, etc) are: `none`, `count`, `distinct`, `integral`, `mean`, `median`, `mode`, `spread`, `stddev`, `sum`, `max` & `min` * Non-numeric types (`text`, etc) are: `count`, `distinct` and `mode` **Permission Required:** `kelvin.permission.storage.read`\n\t * @param query Request Schema\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic downloadHistorianMetrics({ query }: IDownloadHistorianMetricsParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = query;\n\n\t\trequestConfig.mediaType = 'text/csv';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/range/download`, requestConfig);\n\t}\n\n\t/**\n\t * Get Historian Metric Advanced Range\n\t * Get Historian Metric Advanced Range returns time series data for a given time range and a list of Metric selectors. **Payload Description:** * `start_time` supports RFC3339 timestamps with added micro-second precision * `end_time` supports RFC3339 timestamps with added micro-second precision * `time_bucket` uses an human readable format which is covered in more detail in https://golang.org/pkg/time/#ParseDuration. Example: `5m`, `1h`, `1w` * `time_shift` is used to shift the time buckets from the epoch. Every time bucket starts from epoch so, if you want to calculate the time bucket starting on a different date and time, you'll need to set this. Example: `5m`, `1h`, `1w` * `fill` allows you to fill missing points from a time bucket. Check below for supported fill values. * `agg` allows you to choose an aggregation. Check below for supported aggregations. **Supported Fill:** * `none`: Default behaviour. * `null`: Fills the missing points with null string * `linear`: Performs a linear regression * `previous`: Uses the previous non-empty value * `int value`: Fills the missing points with the specified number **Supported Aggregations:** * Numeric types (`int32`, `int64`, etc) are: `none`, `count`, `distinct`, `integral`, `mean`, `median`, `mode`, `spread`, `stddev`, `sum`, `max` & `min` * Non-numeric types (`text`, etc) are: `count`, `distinct` and `mode` **Permission Required:** `kelvin.permission.storage.read`\n\t * @param body Advanced range schema\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricAdvancedRange({ body }: IGetHistorianMetricAdvancedRangeParams, options?: IKvHttpRequestOptions): Observable<StorageData[]> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = body;\n\n\t\trequestConfig.mediaType = 'application/x-json-stream';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData[]>(`/storage/historian/range/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * Get Historian Metric Last\n\t * Get Historian Metric Last returns the last value inserted on the time series database for a single Metric. The calculation is based on the most recent timestamp available for the Metric. **Permission Required:** `kelvin.permission.storage.read`\n\t * @param name Metric Name\n\t * @param assetName Asset name\n\t * @param fields List of field identifiers\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricLast({ name, assetName, fields }: IGetHistorianMetricLastParams, options?: IKvHttpRequestOptions): Observable<StorageData> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'get' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (name != null) {\n\t\t\tqueryParameters['name'] = name;\n\t\t}\n\n\t\tif (assetName != null) {\n\t\t\tqueryParameters['asset_name'] = assetName;\n\t\t}\n\n\t\tif (fields != null) {\n\t\t\tqueryParameters['fields'] = fields;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData>(`/storage/historian/last/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * Get Historian Metric Last Advanced\n\t * Get Historian Metric Last Advanced returns the last values inserted on the time series database for a list of Metric selectors. The calculation is based on the most recent timestamp available for each Metric. **Permission Required:** `kelvin.permission.storage.read`\n\t * @param query Request for multiple Metric selectors\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricLastAdvanced({ query }: IGetHistorianMetricLastAdvancedParams, options?: IKvHttpRequestOptions): Observable<StorageData[]> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = query;\n\n\t\trequestConfig.mediaType = 'application/x-json-stream';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData[]>(`/storage/historian/last/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * Get Historian Metric Range\n\t * Get Historian Metric Range returns time series data for a given time range and a list of Metric selectors. **Payload Description:** * `start_time` supports RFC3339 timestamps with added micro-second precision * `end_time` supports RFC3339 timestamps with added micro-second precision * `time_bucket` uses an human readable format which is covered in more detail in https://golang.org/pkg/time/#ParseDuration. Example: `5m`, `1h`, `1w` * `time_shift` is used to shift the time buckets from the epoch. Every time bucket starts from epoch so, if you want to calculate the time bucket starting on a different date and time, you'll need to set this. Example: `5m`, `1h`, `1w` * `fill` allows you to fill missing points from a time bucket. Check below for supported fill values. * `agg` allows you to choose an aggregation. Check below for supported aggregations. **Supported Fill:** * `none`: Default behaviour. * `null`: Fills the missing points with null string * `linear`: Performs a linear regression * `previous`: Uses the previous non-empty value * `int value`: Fills the missing points with the specified number **Supported Aggregations:** * Numeric types (`int32`, `int64`, etc) are: `none`, `count`, `distinct`, `integral`, `mean`, `median`, `mode`, `spread`, `stddev`, `sum`, `max` & `min` * Non-numeric types (`text`, etc) are: `count`, `distinct` and `mode` **Permission Required:** `kelvin.permission.storage.read`\n\t * @param name Metric Name\n\t * @param assetName Asset name\n\t * @param startTime Value for the start of the range for which to get data\n\t * @param endTime Value for the end of the range for which to get data\n\t * @param agg Aggregation\n\t * @param timeBucket Interval for which to group by, in human readable format\n\t * @param timeShift Interval by which to shift the time buckets, from epoch\n\t * @param fill Filling for empty time buckets (check description for possible values)\n\t * @param order Order of the data\n\t * @param fields Fields\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricRange({ name, assetName, startTime, endTime, agg, timeBucket, timeShift, fill, order, fields }: IGetHistorianMetricRangeParams, options?: IKvHttpRequestOptions): Observable<StorageData[]> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'get' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (name != null) {\n\t\t\tqueryParameters['name'] = name;\n\t\t}\n\n\t\tif (assetName != null) {\n\t\t\tqueryParameters['asset_name'] = assetName;\n\t\t}\n\n\t\tif (startTime != null) {\n\t\t\tqueryParameters['start_time'] = startTime.toISOString();\n\t\t}\n\n\t\tif (endTime != null) {\n\t\t\tqueryParameters['end_time'] = endTime.toISOString();\n\t\t}\n\n\t\tif (agg != null) {\n\t\t\tqueryParameters['agg'] = agg;\n\t\t}\n\n\t\tif (timeBucket != null) {\n\t\t\tqueryParameters['time_bucket'] = timeBucket;\n\t\t}\n\n\t\tif (timeShift != null) {\n\t\t\tqueryParameters['time_shift'] = timeShift;\n\t\t}\n\n\t\tif (fill != null) {\n\t\t\tqueryParameters['fill'] = fill;\n\t\t}\n\n\t\tif (order != null) {\n\t\t\tqueryParameters['order'] = order;\n\t\t}\n\n\t\tif (fields != null) {\n\t\t\tqueryParameters['fields'] = fields;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\n\t\trequestConfig.mediaType = 'application/x-json-stream';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData[]>(`/storage/historian/range/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * List Historian Metric\n\t * List Historian Metric **Pagination Sortable Columns:** `storage_metric.name`, `storage_metric.asset_name` **Permission Required:** `kelvin.permission.storage.read`\n\t * @param name Metric name\n\t * @param assetName Asset name\n\t * @param search Search metrics by name or asset_name\n\t * @param pageSize Number of objects to be returned, between 1 and 1000. Default: 20\n\t * @param startingAfter Lower bound cursor for use in pagination\n\t * @param endingBefore Upper bound cursor for use in pagination\n\t * @param sortBy Parameter to sort by. Must be one of the sortable columns\n\t * @param sortAsc Order of sorting is Ascending. Possible Values: true/false. Default: true\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic listHistorianMetric({ name, assetName, search, pageSize, startingAfter, endingBefore, sortBy, sortAsc }: IListHistorianMetricParams = {}, options?: IKvHttpRequestOptions): Observable<StorageMetricListPaginated> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'get' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (name != null) {\n\t\t\tqueryParameters['name'] = name;\n\t\t}\n\n\t\tif (assetName != null) {\n\t\t\tqueryParameters['asset_name'] = assetName;\n\t\t}\n\n\t\tif (search != null) {\n\t\t\tqueryParameters['search'] = search;\n\t\t}\n\n\t\tif (pageSize != null) {\n\t\t\tqueryParameters['page_size'] = pageSize;\n\t\t}\n\n\t\tif (startingAfter != null) {\n\t\t\tqueryParameters['starting_after'] = startingAfter;\n\t\t}\n\n\t\tif (endingBefore != null) {\n\t\t\tqueryParameters['ending_before'] = endingBefore;\n\t\t}\n\n\t\tif (sortBy != null) {\n\t\t\tqueryParameters['sort_by'] = sortBy;\n\t\t}\n\n\t\tif (sortAsc != null) {\n\t\t\tqueryParameters['sort_asc'] = sortAsc;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageMetricListPaginated>(`/storage/historian/list`, requestConfig, StorageMetricListPaginated);\n\t}\n\n\t/**\n\t * Update Historian Metric\n\t * Update Historian Metric allows updating the **title** of a Metric. **Permission Required:** `kelvin.permission.storage.update`\n\t * @param storage Body of the request\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic updateHistorianMetric({ storage }: IUpdateHistorianMetricParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = storage;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/update`, requestConfig);\n\t}\n\n\t/**\n\t * Upload Historian Metrics\n\t * Upload Historian Metrics allows sending a **CSV file** with time series data to be persisted. **Permission Required:** `kelvin.permission.storage.create`\n\t * @param file CSV File\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic uploadHistorianMetrics({ file }: IUploadHistorianMetricsParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\tconst formParams = new FormData();\n\t\tif (file != null) {\n\t\t\tformParams.append('file', <any>file);\n\t\t}\n\t\trequestConfig.data = formParams;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/upload`, requestConfig);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.service.js","sourceRoot":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O,CAAkB,2BAA2B,EAAE,aAAa,CAAC,CAAC;IAClF,CAAC;CACD;AAzTD,wCAyTC","sourcesContent":["import { Observable } from 'rxjs';\nimport { EKvHttpMethod, IKvHttpRequest, IKvHttpRequestOptions, IKvHttpResponse } from '../../../core/http';\nimport { StorageData, StorageMetricListPaginated } from '../../../models';\nimport { BaseService } from '../../base.service';\nimport {\n\tICreateHistorianMetricParams,\n\tIDeleteHistorianRangeParams,\n\tIDownloadHistorianMetricsParams,\n\tIGetHistorianMetricAdvancedRangeParams, IGetHistorianMetricLastAdvancedParams, IGetHistorianMetricLastParams, IGetHistorianMetricRangeParams,\n\tIListHistorianMetricParams,\n\tIUpdateHistorianMetricParams,\n\tIUploadHistorianMetricsParams\n} from '../types';\n\n/**\n * @category Service\n */\n\nexport class StorageService extends BaseService {\n\n\t/**\n\t * Create Historian Metric\n\t * Create Historian Metric Create one or more data values for defined times for one or more specific <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs on the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a>. <span style=\\"color: #ff0000;font-weight: bold;\\">WARNING</span> : If a value already exists at the defined time, then it will be overwriten with the new payload value. The old value will be lost and is not recoverable ! **Permission Required:** `kelvin.permission.storage.create`\n\t * @param storage Storage create schema\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic createHistorianMetric({ storage }: ICreateHistorianMetricParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = storage;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/create`, requestConfig);\n\t}\n\n\t/**\n\t * Delete Historian Range\n\t * Delete Historian Range will delete all associated time series values for selected <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs between a given time range. **Permission Required:** `kelvin.permission.storage.delete`\n\t * @param storage Body of the request\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic deleteHistorianRange({ storage }: IDeleteHistorianRangeParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = storage;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/range/delete`, requestConfig);\n\t}\n\n\t/**\n\t * Download Historian Metrics\n\t * Download Historian Metrics Returns a **CSV file** with time series data within a for a given time range and given list of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the parameter `selectors`. The downloaded csv file will contain six columns; `name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> ), `time` ( Timestamp when the data was recorded from source ), `asset_name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> ), `source` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> that has recorded the data ), `target` ( Custom parameter set by user ), `value` ( value recorded ). **Permission Required:** `kelvin.permission.storage.read`\n\t * @param query Request Schema\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic downloadHistorianMetrics({ query }: IDownloadHistorianMetricsParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = query;\n\n\t\trequestConfig.mediaType = 'text/csv';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/range/download`, requestConfig);\n\t}\n\n\t/**\n\t * Get Historian Metric Advanced Range\n\t * Get Historian Metric Advanced Range Returns a list of recorded values or calculated statistics from the database for one or multiple <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs based on a time range. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`\n\t * @param body Advanced range schema\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricAdvancedRange({ body }: IGetHistorianMetricAdvancedRangeParams, options?: IKvHttpRequestOptions): Observable<StorageData[]> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = body;\n\n\t\trequestConfig.mediaType = 'application/x-json-stream';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData[]>(`/storage/historian/range/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * Get Historian Metric Last\n\t * Get Historian Metric Last Returns the last recorded value in the database for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`\n\t * @param name Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.\n\t * @param assetName Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.\n\t * @param fields List of wanted field keys that are recorded in the payload. Normally this will be value.</p> If there are other unique keys/value pairs in the payload, then you can create a list of all keys to retrieve the values. e.g. 'value, key2'. If the key does not exist in the stored payload, that key will return with a value `null`.\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricLast({ name, assetName, fields }: IGetHistorianMetricLastParams, options?: IKvHttpRequestOptions): Observable<StorageData> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'get' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (name != null) {\n\t\t\tqueryParameters['name'] = name;\n\t\t}\n\n\t\tif (assetName != null) {\n\t\t\tqueryParameters['asset_name'] = assetName;\n\t\t}\n\n\t\tif (fields != null) {\n\t\t\tqueryParameters['fields'] = fields;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData>(`/storage/historian/last/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * Get Historian Metric Last Advanced\n\t * Get Historian Metric Last Advanced Returns an array of last recorded values in the database for each of the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the POST. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`\n\t * @param query Request for multiple Metric selectors\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricLastAdvanced({ query }: IGetHistorianMetricLastAdvancedParams, options?: IKvHttpRequestOptions): Observable<StorageData[]> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = query;\n\n\t\trequestConfig.mediaType = 'application/x-json-stream';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData[]>(`/storage/historian/last/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * Get Historian Metric Range\n\t * Get Historian Metric Range Returns a list of recorded values or calculated statistics from the database for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair based on a time range. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a>) that records the data to be online. **Permission Required:** `kelvin.permission.storage.read`\n\t * @param name Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.\n\t * @param assetName Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.\n\t * @param startTime Start time of the recorded time to collect the payload data from the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a> in ISO 8601 UTC date/time format. Example; '2022-07-08T08:41:01.657916Z'.\n\t * @param endTime End time of the recorded time to collect the payload data from the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a> in ISO 8601 UTC date/time format. Example; '2022-07-08T08:41:01.657916Z'.\n\t * @param agg Perform mathematical calculations on a group of data.</p> For numerical data there are twelve mathematical options available; `none` , `count`,`distinct`, `integral`, `mean`, `median`, `mode`, `spread`, `stddev`, `sum`, `max`, `min`.</p> For text based data there are three types of mathematical options available; `count`, `distinct`, `mode`. The default is `none`.</p> When using this parameter, you must also use the parameters `time_bucket` which defines how to group the data and `fields` which defines which payload data to use.\n\t * @param timeBucket Group the data by time frame for the `agg` parameter calculations.</p> The time can be adjusted with these time units `ns`, `ms`, `s`, `m`, `h`. e.g. `8765h` equates to is 8,765 hours which is approximately one year.\n\t * @param timeShift Shift the time buckets from the epoch. Every time bucket starts from epoch so, if you want to calculate the time bucket starting on a different date and time, you'll need to set this. Example: `5m`, `1h`, `1w`.\n\t * @param fill Fills any group of data, which is defined by the `time_bucket` parameter, with a calculated value when there is no data in the database.</p> There are five options available; `none`, `null`, `linear`, `previous`, fixed integer value.</p> `none` will ignore the group. `null`, `previous` and fixed integer value will be added as the value for the empty group. `linear` will perform a linear regression to calculated the groups' value.</p> The default is `none`.\n\t * @param order Order of the results for the timestamp parameter.</p> There are two options available (capital letters is required); `ASC` for ascending and `DESC` for descending. The default is `ASC`.\n\t * @param fields Array of strings which each string representing one key inside the payload. Normally there will be only one key labeled `value`.\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getHistorianMetricRange({ name, assetName, startTime, endTime, agg, timeBucket, timeShift, fill, order, fields }: IGetHistorianMetricRangeParams, options?: IKvHttpRequestOptions): Observable<StorageData[]> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'get' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (name != null) {\n\t\t\tqueryParameters['name'] = name;\n\t\t}\n\n\t\tif (assetName != null) {\n\t\t\tqueryParameters['asset_name'] = assetName;\n\t\t}\n\n\t\tif (startTime != null) {\n\t\t\tqueryParameters['start_time'] = startTime.toISOString();\n\t\t}\n\n\t\tif (endTime != null) {\n\t\t\tqueryParameters['end_time'] = endTime.toISOString();\n\t\t}\n\n\t\tif (agg != null) {\n\t\t\tqueryParameters['agg'] = agg;\n\t\t}\n\n\t\tif (timeBucket != null) {\n\t\t\tqueryParameters['time_bucket'] = timeBucket;\n\t\t}\n\n\t\tif (timeShift != null) {\n\t\t\tqueryParameters['time_shift'] = timeShift;\n\t\t}\n\n\t\tif (fill != null) {\n\t\t\tqueryParameters['fill'] = fill;\n\t\t}\n\n\t\tif (order != null) {\n\t\t\tqueryParameters['order'] = order;\n\t\t}\n\n\t\tif (fields != null) {\n\t\t\tqueryParameters['fields'] = fields;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\n\t\trequestConfig.mediaType = 'application/x-json-stream';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageData[]>(`/storage/historian/range/get`, requestConfig, StorageData);\n\t}\n\n\t/**\n\t * List Historian Metric\n\t * List Historian Metric Returns a dictionary with a data property containing a filtered array of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair objects on the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform' target='_blank'>Kelvin Platform</a>. **Pagination Sortable Columns:** `storage_metric.name`, `storage_metric.asset_name` **Permission Required:** `kelvin.permission.storage.read`\n\t * @param name Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.\n\t * @param assetName Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `_` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.\n\t * @param search Search and filter the return list. Both the Display Name and the Name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> and <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metrics</a> will be included in the search field criteria. This is given as an array, for example `[pump,fan]`.</p> The search is case insensitive and will find partial matches as well. For example if a <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/#asset' target='_blank'>Kelvin Asset</a> name or display name is `centrifugal_pump`, then a match will be made if the search string is `pum` or `FUGaL`.\n\t * @param pageSize Number of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair objects to be returned. Page size can be between 1 and 1000 objects.</p> The default is 20 <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair objects.\n\t * @param startingAfter An alphanumeric string to move to the next page of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the list.</p> The alphanumeric string which are the bookmarks for the beginning and end of the current list is given in the previous JSON response value under the key pagination -> previous_page and pagination -> next_page respectively.</p> The pagination -> next_page alphanumeric string should be used here to show a list of the next page of results.\n\t * @param endingBefore An alphanumeric string to move to the previous page of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the list.</p> The alphanumeric string which are the bookmarks for the beginning and end of the current list is given in the previous JSON response value under the key pagination -> previous_page and pagination -> next_page respectively.</p> The pagination -> previous_page alphanumeric string should be used here to show a list of the previous page of results.\n\t * @param sortBy Sort the results by one of the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> parameters. Only one parameter can be selected.</p> There are two parameter options; `name` and `asset.name`.</p> The default is `asset.name`\n\t * @param sortAsc Sorting order for the results according to the `sort_by` parameter.</p> There are two options; `true` (ascending order) and `false` (descending order).</p> The default is `true` (ascending).\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic listHistorianMetric({ name, assetName, search, pageSize, startingAfter, endingBefore, sortBy, sortAsc }: IListHistorianMetricParams = {}, options?: IKvHttpRequestOptions): Observable<StorageMetricListPaginated> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'get' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (name != null) {\n\t\t\tqueryParameters['name'] = name;\n\t\t}\n\n\t\tif (assetName != null) {\n\t\t\tqueryParameters['asset_name'] = assetName;\n\t\t}\n\n\t\tif (search != null) {\n\t\t\tqueryParameters['search'] = search;\n\t\t}\n\n\t\tif (pageSize != null) {\n\t\t\tqueryParameters['page_size'] = pageSize;\n\t\t}\n\n\t\tif (startingAfter != null) {\n\t\t\tqueryParameters['starting_after'] = startingAfter;\n\t\t}\n\n\t\tif (endingBefore != null) {\n\t\t\tqueryParameters['ending_before'] = endingBefore;\n\t\t}\n\n\t\tif (sortBy != null) {\n\t\t\tqueryParameters['sort_by'] = sortBy;\n\t\t}\n\n\t\tif (sortAsc != null) {\n\t\t\tqueryParameters['sort_asc'] = sortAsc;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<StorageMetricListPaginated>(`/storage/historian/list`, requestConfig, StorageMetricListPaginated);\n\t}\n\n\t/**\n\t * Update Historian Metric\n\t * Update Historian Metric Updates the `title` parameter of a <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pair. **Permission Required:** `kelvin.permission.storage.update`\n\t * @param storage Body of the request\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic updateHistorianMetric({ storage }: IUpdateHistorianMetricParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\trequestConfig.data = storage;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/update`, requestConfig);\n\t}\n\n\t/**\n\t * Upload Historian Metrics\n\t * Upload Historian Metrics Accepts a **CSV file** with time series data within a for a given time range and given list of <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> pairs in the parameter `selectors`. The csv file should contain six columns in a comma delimited csv file; `name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/' target='_blank'>Kelvin Metric</a> ), `time` ( Timestamp when the data was recorded from source ), `asset_name` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/' target='_blank'>Kelvin Assets</a> ), `source` ( <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/' target='_blank'>Kelvin App</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/' target='_blank'>Kelvin Bridge</a> that has recorded the data - this value is optional ), `target` ( Custom parameter set by user - this value is optional ), `value` ( value recorded ). The first row must contain the column headers; `name,time,asset_name,source,target,value`. **Permission Required:** `kelvin.permission.storage.create`\n\t * @param file CSV File\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic uploadHistorianMetrics({ file }: IUploadHistorianMetricsParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\t\tconst formParams = new FormData();\n\t\tif (file != null) {\n\t\t\tformParams.append('file', <any>file);\n\t\t}\n\t\trequestConfig.data = formParams;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<IKvHttpResponse>(`/storage/historian/upload`, requestConfig);\n\t}\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { IKvHttpRequestOptions } from '../../../core/http';
|
|
3
|
-
import { EmissionsDashboard } from '../../../models';
|
|
3
|
+
import { EmissionsDashboard, FullMapListPaginated } from '../../../models';
|
|
4
4
|
import { BaseService } from '../../base.service';
|
|
5
|
-
import { IGetEmissionsDashboardParams } from '../types';
|
|
5
|
+
import { IGetEmissionsDashboardParams, IListProcessesParams } from '../types';
|
|
6
6
|
/**
|
|
7
7
|
* @category Service
|
|
8
8
|
*/
|
|
@@ -10,8 +10,20 @@ export declare class UIService extends BaseService {
|
|
|
10
10
|
/**
|
|
11
11
|
* Get Emissions Dashboard
|
|
12
12
|
* Get Emissions Dashboard endpoint that will provide the data to be presented in the maps/emissions dashboard **Permission Required:** `kelvin.permission.ui.read`
|
|
13
|
-
* @param
|
|
13
|
+
* @param groupName The assets group name filter
|
|
14
14
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
15
15
|
*/
|
|
16
|
-
static getEmissionsDashboard({
|
|
16
|
+
static getEmissionsDashboard({ groupName }: IGetEmissionsDashboardParams, options?: IKvHttpRequestOptions): Observable<EmissionsDashboard>;
|
|
17
|
+
/**
|
|
18
|
+
* List Processes
|
|
19
|
+
* List Processes **Pagination Sortable Columns:** `map.name`, `map.title`, `start_date`, `mode`, `map.asset_name` **Permission Required:** `kelvin.permission.ui.read`
|
|
20
|
+
* @param processes Processes list schema
|
|
21
|
+
* @param pageSize Number of objects to be returned, between 1 and 1000. Default: 20
|
|
22
|
+
* @param startingAfter Lower bound cursor for use in pagination
|
|
23
|
+
* @param endingBefore Upper bound cursor for use in pagination
|
|
24
|
+
* @param sortBy Parameter to sort by. Must be one of the sortable columns
|
|
25
|
+
* @param sortAsc Order of sorting is Ascending. Possible Values: true/false. Default: true
|
|
26
|
+
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
27
|
+
*/
|
|
28
|
+
static listProcesses({ processes, pageSize, startingAfter, endingBefore, sortBy, sortAsc }: IListProcessesParams, options?: IKvHttpRequestOptions): Observable<FullMapListPaginated>;
|
|
17
29
|
}
|
|
@@ -10,22 +10,59 @@ class UIService extends base_service_1.BaseService {
|
|
|
10
10
|
/**
|
|
11
11
|
* Get Emissions Dashboard
|
|
12
12
|
* Get Emissions Dashboard endpoint that will provide the data to be presented in the maps/emissions dashboard **Permission Required:** `kelvin.permission.ui.read`
|
|
13
|
-
* @param
|
|
13
|
+
* @param groupName The assets group name filter
|
|
14
14
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
15
15
|
*/
|
|
16
|
-
static getEmissionsDashboard({
|
|
16
|
+
static getEmissionsDashboard({ groupName }, options) {
|
|
17
17
|
const requestConfig = {
|
|
18
18
|
method: 'get'
|
|
19
19
|
};
|
|
20
20
|
const queryParameters = {};
|
|
21
|
-
if (
|
|
22
|
-
queryParameters['
|
|
21
|
+
if (groupName != null) {
|
|
22
|
+
queryParameters['group_name'] = groupName;
|
|
23
23
|
}
|
|
24
24
|
requestConfig.params = queryParameters;
|
|
25
25
|
requestConfig.mediaType = 'application/json';
|
|
26
26
|
requestConfig.options = options;
|
|
27
27
|
return this.request(`/ui/emissions/dashboard/get`, requestConfig, models_1.EmissionsDashboard);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* List Processes
|
|
31
|
+
* List Processes **Pagination Sortable Columns:** `map.name`, `map.title`, `start_date`, `mode`, `map.asset_name` **Permission Required:** `kelvin.permission.ui.read`
|
|
32
|
+
* @param processes Processes list schema
|
|
33
|
+
* @param pageSize Number of objects to be returned, between 1 and 1000. Default: 20
|
|
34
|
+
* @param startingAfter Lower bound cursor for use in pagination
|
|
35
|
+
* @param endingBefore Upper bound cursor for use in pagination
|
|
36
|
+
* @param sortBy Parameter to sort by. Must be one of the sortable columns
|
|
37
|
+
* @param sortAsc Order of sorting is Ascending. Possible Values: true/false. Default: true
|
|
38
|
+
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
39
|
+
*/
|
|
40
|
+
static listProcesses({ processes, pageSize, startingAfter, endingBefore, sortBy, sortAsc }, options) {
|
|
41
|
+
const requestConfig = {
|
|
42
|
+
method: 'post'
|
|
43
|
+
};
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
if (pageSize != null) {
|
|
46
|
+
queryParameters['page_size'] = pageSize;
|
|
47
|
+
}
|
|
48
|
+
if (startingAfter != null) {
|
|
49
|
+
queryParameters['starting_after'] = startingAfter;
|
|
50
|
+
}
|
|
51
|
+
if (endingBefore != null) {
|
|
52
|
+
queryParameters['ending_before'] = endingBefore;
|
|
53
|
+
}
|
|
54
|
+
if (sortBy != null) {
|
|
55
|
+
queryParameters['sort_by'] = sortBy;
|
|
56
|
+
}
|
|
57
|
+
if (sortAsc != null) {
|
|
58
|
+
queryParameters['sort_asc'] = sortAsc;
|
|
59
|
+
}
|
|
60
|
+
requestConfig.params = queryParameters;
|
|
61
|
+
requestConfig.data = processes;
|
|
62
|
+
requestConfig.mediaType = 'application/json';
|
|
63
|
+
requestConfig.options = options;
|
|
64
|
+
return this.request(`/ui/processes/list`, requestConfig, models_1.FullMapListPaginated);
|
|
65
|
+
}
|
|
29
66
|
}
|
|
30
67
|
exports.UIService = UIService;
|
|
31
68
|
//# sourceMappingURL=uI.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uI.service.js","sourceRoot":"","sources":["../../../../../src/services/generated/api/uI.service.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"uI.service.js","sourceRoot":"","sources":["../../../../../src/services/generated/api/uI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O,IAAI,IAAI,EAAE;YACpB,eAAe,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;SACtC;QAED,aAAa,CAAC,MAAM,GAAG,eAAe,CAAC;QACvC,aAAa,CAAC,IAAI,GAAG,SAAS,CAAC;QAE/B,aAAa,CAAC,SAAS,GAAG,kBAAkB,CAAC;QAC7C,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAuB,oBAAoB,EAAE,aAAa,EAAE,6BAAoB,CAAC,CAAC;IACtG,CAAC;CACD;AA3ED,8BA2EC","sourcesContent":["import { Observable } from 'rxjs';\nimport { EKvHttpMethod, IKvHttpRequest, IKvHttpRequestOptions } from '../../../core/http';\nimport { EmissionsDashboard, FullMapListPaginated } from '../../../models';\nimport { BaseService } from '../../base.service';\nimport {\n\tIGetEmissionsDashboardParams,\n\tIListProcessesParams\n} from '../types';\n\n/**\n * @category Service\n */\n\nexport class UIService extends BaseService {\n\n\t/**\n\t * Get Emissions Dashboard\n\t * Get Emissions Dashboard endpoint that will provide the data to be presented in the maps/emissions dashboard **Permission Required:** `kelvin.permission.ui.read`\n\t * @param groupName The assets group name filter\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic getEmissionsDashboard({ groupName }: IGetEmissionsDashboardParams, options?: IKvHttpRequestOptions): Observable<EmissionsDashboard> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'get' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (groupName != null) {\n\t\t\tqueryParameters['group_name'] = groupName;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<EmissionsDashboard>(`/ui/emissions/dashboard/get`, requestConfig, EmissionsDashboard);\n\t}\n\n\t/**\n\t * List Processes\n\t * List Processes **Pagination Sortable Columns:** `map.name`, `map.title`, `start_date`, `mode`, `map.asset_name` **Permission Required:** `kelvin.permission.ui.read`\n\t * @param processes Processes list schema\n\t * @param pageSize Number of objects to be returned, between 1 and 1000. Default: 20\n\t * @param startingAfter Lower bound cursor for use in pagination\n\t * @param endingBefore Upper bound cursor for use in pagination\n\t * @param sortBy Parameter to sort by. Must be one of the sortable columns\n\t * @param sortAsc Order of sorting is Ascending. Possible Values: true/false. Default: true\n\t * @param {IKvHttpRequestOptions} options Request optional parameters\n\t */\n\n\tstatic listProcesses({ processes, pageSize, startingAfter, endingBefore, sortBy, sortAsc }: IListProcessesParams, options?: IKvHttpRequestOptions): Observable<FullMapListPaginated> {\n\n\t\tconst requestConfig: IKvHttpRequest = {\n\t\t\tmethod: 'post' as EKvHttpMethod\n\t\t};\n\n\t\tconst queryParameters = {};\n\t\tif (pageSize != null) {\n\t\t\tqueryParameters['page_size'] = pageSize;\n\t\t}\n\n\t\tif (startingAfter != null) {\n\t\t\tqueryParameters['starting_after'] = startingAfter;\n\t\t}\n\n\t\tif (endingBefore != null) {\n\t\t\tqueryParameters['ending_before'] = endingBefore;\n\t\t}\n\n\t\tif (sortBy != null) {\n\t\t\tqueryParameters['sort_by'] = sortBy;\n\t\t}\n\n\t\tif (sortAsc != null) {\n\t\t\tqueryParameters['sort_asc'] = sortAsc;\n\t\t}\n\n\t\trequestConfig.params = queryParameters;\n\t\trequestConfig.data = processes;\n\n\t\trequestConfig.mediaType = 'application/json';\n\t\trequestConfig.options = options;\n\n\t\treturn this.request<FullMapListPaginated>(`/ui/processes/list`, requestConfig, FullMapListPaginated);\n\t}\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { IKvHttpRequestOptions, IKvHttpResponse } from '../../../core/http';
|
|
3
3
|
import { Workload, WorkloadListPaginated, WorkloadLogs, WorkloadTelemetry } from '../../../models';
|
|
4
4
|
import { BaseService } from '../../base.service';
|
|
5
|
-
import { IDeployWorkloadParams, IGetWorkloadLogsParams, IGetWorkloadParams, IGetWorkloadTelemetryParams, IListWorkloadParams, IStartWorkloadParams, IStopWorkloadParams, IUndeployWorkloadParams } from '../types';
|
|
5
|
+
import { IDeployWorkloadParams, IDownloadWorkloadPackageFileParams, IGetWorkloadLogsParams, IGetWorkloadParams, IGetWorkloadTelemetryParams, IListWorkloadParams, IStartWorkloadParams, IStopWorkloadParams, IUndeployWorkloadParams } from '../types';
|
|
6
6
|
/**
|
|
7
7
|
* @category Service
|
|
8
8
|
*/
|
|
@@ -14,6 +14,13 @@ export declare class WorkloadService extends BaseService {
|
|
|
14
14
|
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
15
15
|
*/
|
|
16
16
|
static deployWorkload({ workload }: IDeployWorkloadParams, options?: IKvHttpRequestOptions): Observable<Workload>;
|
|
17
|
+
/**
|
|
18
|
+
* Download Workload Package File
|
|
19
|
+
* Download Workload Package File **Permission Required:** `kelvin.permission.workload.read`
|
|
20
|
+
* @param workloadName Workload name
|
|
21
|
+
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
22
|
+
*/
|
|
23
|
+
static downloadWorkloadPackageFile({ workloadName }: IDownloadWorkloadPackageFileParams, options?: IKvHttpRequestOptions): Observable<IKvHttpResponse>;
|
|
17
24
|
/**
|
|
18
25
|
* Get Workload
|
|
19
26
|
* Get Workload **Permission Required:** `kelvin.permission.workload.read`
|
|
@@ -22,6 +22,20 @@ class WorkloadService extends base_service_1.BaseService {
|
|
|
22
22
|
requestConfig.options = options;
|
|
23
23
|
return this.request(`/workloads/deploy`, requestConfig, models_1.Workload);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Download Workload Package File
|
|
27
|
+
* Download Workload Package File **Permission Required:** `kelvin.permission.workload.read`
|
|
28
|
+
* @param workloadName Workload name
|
|
29
|
+
* @param {IKvHttpRequestOptions} options Request optional parameters
|
|
30
|
+
*/
|
|
31
|
+
static downloadWorkloadPackageFile({ workloadName }, options) {
|
|
32
|
+
const requestConfig = {
|
|
33
|
+
method: 'get'
|
|
34
|
+
};
|
|
35
|
+
requestConfig.mediaType = 'application/zip';
|
|
36
|
+
requestConfig.options = options;
|
|
37
|
+
return this.request(`/workloads/${encodeURIComponent(String(workloadName))}/download`, requestConfig);
|
|
38
|
+
}
|
|
25
39
|
/**
|
|
26
40
|
* Get Workload
|
|
27
41
|
* Get Workload **Permission Required:** `kelvin.permission.workload.read`
|