@deviceinsight/ng-ui-api-client 10.36.0-SNAPSHOT

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.
Files changed (267) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +104 -0
  3. package/lib/cjs/index.d.ts +44 -0
  4. package/lib/cjs/index.d.ts.map +1 -0
  5. package/lib/cjs/index.js +59 -0
  6. package/lib/cjs/src/adx.d.ts +22 -0
  7. package/lib/cjs/src/adx.d.ts.map +1 -0
  8. package/lib/cjs/src/adx.js +49 -0
  9. package/lib/cjs/src/adxData.d.ts +57 -0
  10. package/lib/cjs/src/adxData.d.ts.map +1 -0
  11. package/lib/cjs/src/adxData.js +71 -0
  12. package/lib/cjs/src/aggregation.d.ts +38 -0
  13. package/lib/cjs/src/aggregation.d.ts.map +1 -0
  14. package/lib/cjs/src/aggregation.js +6 -0
  15. package/lib/cjs/src/asset.d.ts +90 -0
  16. package/lib/cjs/src/asset.d.ts.map +1 -0
  17. package/lib/cjs/src/asset.js +282 -0
  18. package/lib/cjs/src/assetDefinition.d.ts +28 -0
  19. package/lib/cjs/src/assetDefinition.d.ts.map +1 -0
  20. package/lib/cjs/src/assetDefinition.js +60 -0
  21. package/lib/cjs/src/assetGroup.d.ts +39 -0
  22. package/lib/cjs/src/assetGroup.d.ts.map +1 -0
  23. package/lib/cjs/src/assetGroup.js +122 -0
  24. package/lib/cjs/src/assetGroupDefinition.d.ts +25 -0
  25. package/lib/cjs/src/assetGroupDefinition.d.ts.map +1 -0
  26. package/lib/cjs/src/assetGroupDefinition.js +55 -0
  27. package/lib/cjs/src/assetGroupHierarchies.d.ts +29 -0
  28. package/lib/cjs/src/assetGroupHierarchies.d.ts.map +1 -0
  29. package/lib/cjs/src/assetGroupHierarchies.js +14 -0
  30. package/lib/cjs/src/auditLog.d.ts +26 -0
  31. package/lib/cjs/src/auditLog.d.ts.map +1 -0
  32. package/lib/cjs/src/auditLog.js +17 -0
  33. package/lib/cjs/src/authorities.d.ts +9 -0
  34. package/lib/cjs/src/authorities.d.ts.map +1 -0
  35. package/lib/cjs/src/authorities.js +20 -0
  36. package/lib/cjs/src/authorizationServers.d.ts +32 -0
  37. package/lib/cjs/src/authorizationServers.d.ts.map +1 -0
  38. package/lib/cjs/src/authorizationServers.js +20 -0
  39. package/lib/cjs/src/axios.d.ts +11 -0
  40. package/lib/cjs/src/axios.d.ts.map +1 -0
  41. package/lib/cjs/src/axios.js +41 -0
  42. package/lib/cjs/src/blobox.d.ts +66 -0
  43. package/lib/cjs/src/blobox.d.ts.map +1 -0
  44. package/lib/cjs/src/blobox.js +171 -0
  45. package/lib/cjs/src/bundles.d.ts +46 -0
  46. package/lib/cjs/src/bundles.d.ts.map +1 -0
  47. package/lib/cjs/src/bundles.js +72 -0
  48. package/lib/cjs/src/commands.d.ts +21 -0
  49. package/lib/cjs/src/commands.d.ts.map +1 -0
  50. package/lib/cjs/src/commands.js +19 -0
  51. package/lib/cjs/src/configuration.d.ts +82 -0
  52. package/lib/cjs/src/configuration.d.ts.map +1 -0
  53. package/lib/cjs/src/configuration.js +48 -0
  54. package/lib/cjs/src/dataProcessingDefinition.d.ts +116 -0
  55. package/lib/cjs/src/dataProcessingDefinition.d.ts.map +1 -0
  56. package/lib/cjs/src/dataProcessingDefinition.js +144 -0
  57. package/lib/cjs/src/datapoint.d.ts +34 -0
  58. package/lib/cjs/src/datapoint.d.ts.map +1 -0
  59. package/lib/cjs/src/datapoint.js +119 -0
  60. package/lib/cjs/src/dryRun.d.ts +28 -0
  61. package/lib/cjs/src/dryRun.d.ts.map +1 -0
  62. package/lib/cjs/src/dryRun.js +90 -0
  63. package/lib/cjs/src/event.d.ts +22 -0
  64. package/lib/cjs/src/event.d.ts.map +1 -0
  65. package/lib/cjs/src/event.js +94 -0
  66. package/lib/cjs/src/grantedAccess.d.ts +11 -0
  67. package/lib/cjs/src/grantedAccess.d.ts.map +1 -0
  68. package/lib/cjs/src/grantedAccess.js +50 -0
  69. package/lib/cjs/src/initialAccountGroupAssignmentRules.d.ts +11 -0
  70. package/lib/cjs/src/initialAccountGroupAssignmentRules.d.ts.map +1 -0
  71. package/lib/cjs/src/initialAccountGroupAssignmentRules.js +23 -0
  72. package/lib/cjs/src/kpi.d.ts +30 -0
  73. package/lib/cjs/src/kpi.d.ts.map +1 -0
  74. package/lib/cjs/src/kpi.js +16 -0
  75. package/lib/cjs/src/licenses.d.ts +11 -0
  76. package/lib/cjs/src/licenses.d.ts.map +1 -0
  77. package/lib/cjs/src/licenses.js +24 -0
  78. package/lib/cjs/src/locale.d.ts +5 -0
  79. package/lib/cjs/src/locale.d.ts.map +1 -0
  80. package/lib/cjs/src/locale.js +11 -0
  81. package/lib/cjs/src/namedquery.d.ts +3 -0
  82. package/lib/cjs/src/namedquery.d.ts.map +1 -0
  83. package/lib/cjs/src/namedquery.js +16 -0
  84. package/lib/cjs/src/notificationTemplates.d.ts +23 -0
  85. package/lib/cjs/src/notificationTemplates.d.ts.map +1 -0
  86. package/lib/cjs/src/notificationTemplates.js +36 -0
  87. package/lib/cjs/src/oauth.d.ts +32 -0
  88. package/lib/cjs/src/oauth.d.ts.map +1 -0
  89. package/lib/cjs/src/oauth.js +87 -0
  90. package/lib/cjs/src/pagination.d.ts +43 -0
  91. package/lib/cjs/src/pagination.d.ts.map +1 -0
  92. package/lib/cjs/src/pagination.js +18 -0
  93. package/lib/cjs/src/powerBi.d.ts +15 -0
  94. package/lib/cjs/src/powerBi.d.ts.map +1 -0
  95. package/lib/cjs/src/powerBi.js +8 -0
  96. package/lib/cjs/src/preparedCommand.d.ts +23 -0
  97. package/lib/cjs/src/preparedCommand.d.ts.map +1 -0
  98. package/lib/cjs/src/preparedCommand.js +30 -0
  99. package/lib/cjs/src/property.d.ts +23 -0
  100. package/lib/cjs/src/property.d.ts.map +1 -0
  101. package/lib/cjs/src/property.js +27 -0
  102. package/lib/cjs/src/remoteservice.d.ts +14 -0
  103. package/lib/cjs/src/remoteservice.d.ts.map +1 -0
  104. package/lib/cjs/src/remoteservice.js +14 -0
  105. package/lib/cjs/src/role.d.ts +20 -0
  106. package/lib/cjs/src/role.d.ts.map +1 -0
  107. package/lib/cjs/src/role.js +61 -0
  108. package/lib/cjs/src/ruleDefinition.d.ts +62 -0
  109. package/lib/cjs/src/ruleDefinition.d.ts.map +1 -0
  110. package/lib/cjs/src/ruleDefinition.js +73 -0
  111. package/lib/cjs/src/shadowKeys.d.ts +6 -0
  112. package/lib/cjs/src/shadowKeys.d.ts.map +1 -0
  113. package/lib/cjs/src/shadowKeys.js +11 -0
  114. package/lib/cjs/src/subscription.d.ts +8 -0
  115. package/lib/cjs/src/subscription.d.ts.map +1 -0
  116. package/lib/cjs/src/subscription.js +28 -0
  117. package/lib/cjs/src/tsi.d.ts +78 -0
  118. package/lib/cjs/src/tsi.d.ts.map +1 -0
  119. package/lib/cjs/src/tsi.js +25 -0
  120. package/lib/cjs/src/units.d.ts +4 -0
  121. package/lib/cjs/src/units.d.ts.map +1 -0
  122. package/lib/cjs/src/units.js +12 -0
  123. package/lib/cjs/src/user.d.ts +78 -0
  124. package/lib/cjs/src/user.d.ts.map +1 -0
  125. package/lib/cjs/src/user.js +149 -0
  126. package/lib/cjs/src/userGroup.d.ts +33 -0
  127. package/lib/cjs/src/userGroup.d.ts.map +1 -0
  128. package/lib/cjs/src/userGroup.js +116 -0
  129. package/lib/cjs/src/ux4iot.d.ts +6 -0
  130. package/lib/cjs/src/ux4iot.d.ts.map +1 -0
  131. package/lib/cjs/src/ux4iot.js +13 -0
  132. package/lib/cjs/src/version.d.ts +2 -0
  133. package/lib/cjs/src/version.d.ts.map +1 -0
  134. package/lib/cjs/src/version.js +14 -0
  135. package/lib/esm/index.d.ts +44 -0
  136. package/lib/esm/index.d.ts.map +1 -0
  137. package/lib/esm/index.js +43 -0
  138. package/lib/esm/src/adx.d.ts +22 -0
  139. package/lib/esm/src/adx.d.ts.map +1 -0
  140. package/lib/esm/src/adx.js +44 -0
  141. package/lib/esm/src/adxData.d.ts +57 -0
  142. package/lib/esm/src/adxData.d.ts.map +1 -0
  143. package/lib/esm/src/adxData.js +64 -0
  144. package/lib/esm/src/aggregation.d.ts +38 -0
  145. package/lib/esm/src/aggregation.d.ts.map +1 -0
  146. package/lib/esm/src/aggregation.js +2 -0
  147. package/lib/esm/src/asset.d.ts +90 -0
  148. package/lib/esm/src/asset.d.ts.map +1 -0
  149. package/lib/esm/src/asset.js +245 -0
  150. package/lib/esm/src/assetDefinition.d.ts +28 -0
  151. package/lib/esm/src/assetDefinition.d.ts.map +1 -0
  152. package/lib/esm/src/assetDefinition.js +48 -0
  153. package/lib/esm/src/assetGroup.d.ts +39 -0
  154. package/lib/esm/src/assetGroup.d.ts.map +1 -0
  155. package/lib/esm/src/assetGroup.js +103 -0
  156. package/lib/esm/src/assetGroupDefinition.d.ts +25 -0
  157. package/lib/esm/src/assetGroupDefinition.d.ts.map +1 -0
  158. package/lib/esm/src/assetGroupDefinition.js +46 -0
  159. package/lib/esm/src/assetGroupHierarchies.d.ts +29 -0
  160. package/lib/esm/src/assetGroupHierarchies.d.ts.map +1 -0
  161. package/lib/esm/src/assetGroupHierarchies.js +9 -0
  162. package/lib/esm/src/auditLog.d.ts +26 -0
  163. package/lib/esm/src/auditLog.d.ts.map +1 -0
  164. package/lib/esm/src/auditLog.js +12 -0
  165. package/lib/esm/src/authorities.d.ts +9 -0
  166. package/lib/esm/src/authorities.d.ts.map +1 -0
  167. package/lib/esm/src/authorities.js +13 -0
  168. package/lib/esm/src/authorizationServers.d.ts +32 -0
  169. package/lib/esm/src/authorizationServers.d.ts.map +1 -0
  170. package/lib/esm/src/authorizationServers.js +9 -0
  171. package/lib/esm/src/axios.d.ts +11 -0
  172. package/lib/esm/src/axios.d.ts.map +1 -0
  173. package/lib/esm/src/axios.js +34 -0
  174. package/lib/esm/src/blobox.d.ts +66 -0
  175. package/lib/esm/src/blobox.d.ts.map +1 -0
  176. package/lib/esm/src/blobox.js +118 -0
  177. package/lib/esm/src/bundles.d.ts +46 -0
  178. package/lib/esm/src/bundles.d.ts.map +1 -0
  179. package/lib/esm/src/bundles.js +56 -0
  180. package/lib/esm/src/commands.d.ts +21 -0
  181. package/lib/esm/src/commands.d.ts.map +1 -0
  182. package/lib/esm/src/commands.js +14 -0
  183. package/lib/esm/src/configuration.d.ts +82 -0
  184. package/lib/esm/src/configuration.d.ts.map +1 -0
  185. package/lib/esm/src/configuration.js +38 -0
  186. package/lib/esm/src/dataProcessingDefinition.d.ts +116 -0
  187. package/lib/esm/src/dataProcessingDefinition.d.ts.map +1 -0
  188. package/lib/esm/src/dataProcessingDefinition.js +124 -0
  189. package/lib/esm/src/datapoint.d.ts +34 -0
  190. package/lib/esm/src/datapoint.d.ts.map +1 -0
  191. package/lib/esm/src/datapoint.js +107 -0
  192. package/lib/esm/src/dryRun.d.ts +28 -0
  193. package/lib/esm/src/dryRun.d.ts.map +1 -0
  194. package/lib/esm/src/dryRun.js +77 -0
  195. package/lib/esm/src/event.d.ts +22 -0
  196. package/lib/esm/src/event.d.ts.map +1 -0
  197. package/lib/esm/src/event.js +83 -0
  198. package/lib/esm/src/grantedAccess.d.ts +11 -0
  199. package/lib/esm/src/grantedAccess.d.ts.map +1 -0
  200. package/lib/esm/src/grantedAccess.js +42 -0
  201. package/lib/esm/src/initialAccountGroupAssignmentRules.d.ts +11 -0
  202. package/lib/esm/src/initialAccountGroupAssignmentRules.d.ts.map +1 -0
  203. package/lib/esm/src/initialAccountGroupAssignmentRules.js +16 -0
  204. package/lib/esm/src/kpi.d.ts +30 -0
  205. package/lib/esm/src/kpi.d.ts.map +1 -0
  206. package/lib/esm/src/kpi.js +11 -0
  207. package/lib/esm/src/licenses.d.ts +11 -0
  208. package/lib/esm/src/licenses.d.ts.map +1 -0
  209. package/lib/esm/src/licenses.js +16 -0
  210. package/lib/esm/src/locale.d.ts +5 -0
  211. package/lib/esm/src/locale.d.ts.map +1 -0
  212. package/lib/esm/src/locale.js +7 -0
  213. package/lib/esm/src/namedquery.d.ts +3 -0
  214. package/lib/esm/src/namedquery.d.ts.map +1 -0
  215. package/lib/esm/src/namedquery.js +11 -0
  216. package/lib/esm/src/notificationTemplates.d.ts +23 -0
  217. package/lib/esm/src/notificationTemplates.d.ts.map +1 -0
  218. package/lib/esm/src/notificationTemplates.js +27 -0
  219. package/lib/esm/src/oauth.d.ts +32 -0
  220. package/lib/esm/src/oauth.d.ts.map +1 -0
  221. package/lib/esm/src/oauth.js +76 -0
  222. package/lib/esm/src/pagination.d.ts +43 -0
  223. package/lib/esm/src/pagination.d.ts.map +1 -0
  224. package/lib/esm/src/pagination.js +13 -0
  225. package/lib/esm/src/powerBi.d.ts +15 -0
  226. package/lib/esm/src/powerBi.d.ts.map +1 -0
  227. package/lib/esm/src/powerBi.js +4 -0
  228. package/lib/esm/src/preparedCommand.d.ts +23 -0
  229. package/lib/esm/src/preparedCommand.d.ts.map +1 -0
  230. package/lib/esm/src/preparedCommand.js +21 -0
  231. package/lib/esm/src/property.d.ts +23 -0
  232. package/lib/esm/src/property.d.ts.map +1 -0
  233. package/lib/esm/src/property.js +19 -0
  234. package/lib/esm/src/remoteservice.d.ts +14 -0
  235. package/lib/esm/src/remoteservice.d.ts.map +1 -0
  236. package/lib/esm/src/remoteservice.js +8 -0
  237. package/lib/esm/src/role.d.ts +20 -0
  238. package/lib/esm/src/role.d.ts.map +1 -0
  239. package/lib/esm/src/role.js +48 -0
  240. package/lib/esm/src/ruleDefinition.d.ts +62 -0
  241. package/lib/esm/src/ruleDefinition.d.ts.map +1 -0
  242. package/lib/esm/src/ruleDefinition.js +56 -0
  243. package/lib/esm/src/shadowKeys.d.ts +6 -0
  244. package/lib/esm/src/shadowKeys.d.ts.map +1 -0
  245. package/lib/esm/src/shadowKeys.js +7 -0
  246. package/lib/esm/src/subscription.d.ts +8 -0
  247. package/lib/esm/src/subscription.d.ts.map +1 -0
  248. package/lib/esm/src/subscription.js +22 -0
  249. package/lib/esm/src/tsi.d.ts +78 -0
  250. package/lib/esm/src/tsi.d.ts.map +1 -0
  251. package/lib/esm/src/tsi.js +19 -0
  252. package/lib/esm/src/units.d.ts +4 -0
  253. package/lib/esm/src/units.d.ts.map +1 -0
  254. package/lib/esm/src/units.js +7 -0
  255. package/lib/esm/src/user.d.ts +78 -0
  256. package/lib/esm/src/user.d.ts.map +1 -0
  257. package/lib/esm/src/user.js +124 -0
  258. package/lib/esm/src/userGroup.d.ts +33 -0
  259. package/lib/esm/src/userGroup.d.ts.map +1 -0
  260. package/lib/esm/src/userGroup.js +94 -0
  261. package/lib/esm/src/ux4iot.d.ts +6 -0
  262. package/lib/esm/src/ux4iot.d.ts.map +1 -0
  263. package/lib/esm/src/ux4iot.js +8 -0
  264. package/lib/esm/src/version.d.ts +2 -0
  265. package/lib/esm/src/version.d.ts.map +1 -0
  266. package/lib/esm/src/version.js +10 -0
  267. package/package.json +54 -0
@@ -0,0 +1,118 @@
1
+ import { getAxios, extractData } from './axios';
2
+ const createUrl = (type, id, path) => {
3
+ return ['', 'v2', type, id ? encodeURIComponent(id) : null, 'blobs', path]
4
+ .filter((segment) => segment != null)
5
+ .join('/');
6
+ };
7
+ const readObject = (type, id, path, asArrayBuffer) => getAxios()
8
+ .get(createUrl(type, id, path), asArrayBuffer ? { responseType: 'arraybuffer' } : {})
9
+ .then(extractData);
10
+ const writeObject = (type, id, path, value, headers, axiosInstance) => (axiosInstance ?? getAxios()).post(createUrl(type, id, path), value, headers ? { headers } : undefined);
11
+ const deleteObject = (type, id, path) => getAxios().delete(createUrl(type, id, path));
12
+ const checkObject = (type, id, path) => getAxios().head(createUrl(type, id, path));
13
+ export const readAssetObject = (assetUrn, path, asArrayBuffer) => readObject('assets', assetUrn, path, !!asArrayBuffer);
14
+ export const writeAssetObject = (assetUrn, path, value, headers, axiosInstance) => writeObject('assets', assetUrn, path, value, headers, axiosInstance);
15
+ export const deleteAssetObject = (assetUrn, path) => deleteObject('assets', assetUrn, path);
16
+ /*
17
+ * Asset Definition Blobox
18
+ */
19
+ export const readAssetDefinitionObject = (assetDefinitionId, path, asArrayBuffer) => readObject('assetDefinitions', assetDefinitionId, path, !!asArrayBuffer);
20
+ export const writeAssetDefinitionObject = (assetDefinitionId, path, value, headers, axiosInstance) => writeObject('assetDefinitions', assetDefinitionId, path, value, headers, axiosInstance);
21
+ export const deleteAssetDefinitionObject = (assetDefinitionId, path) => deleteObject('assetDefinitions', assetDefinitionId, path);
22
+ /*
23
+ * Asset Group Blobox
24
+ */
25
+ export const readAssetGroupObject = (assetGroupId, path, asArrayBuffer) => readObject('assetGroups', assetGroupId, path, !!asArrayBuffer);
26
+ export const writeAssetGroupObject = (assetGroupId, path, value, headers, axiosInstance) => writeObject('assetGroups', assetGroupId, path, value, headers, axiosInstance);
27
+ export const deleteAssetGroupObject = (assetGroupId, path) => deleteObject('assetGroups', assetGroupId, path);
28
+ /*
29
+ * Tenant Blobox
30
+ */
31
+ export const readTenantObject = (path, asArrayBuffer) => readObject('tenant', undefined, path, !!asArrayBuffer);
32
+ export const writeTenantObject = (path, value, headers, axiosInstance) => writeObject('tenant', undefined, path, value, headers, axiosInstance);
33
+ export const deleteTenantObject = (path) => deleteObject('tenant', undefined, path);
34
+ export const readUIConfigurations = () => readTenantObject('uiConfigurations/default');
35
+ export const writeUIConfigurations = (value) => writeTenantObject('uiConfigurations/default', value);
36
+ export const deleteUIConfigurations = () => deleteTenantObject('uiConfigurations/default');
37
+ export const readConditionMonitoringPriorities = () => readTenantObject('uiConfigurations/conditionmonitoringpriorities');
38
+ export const writeConditionMonitoringPriorities = (value) => writeTenantObject('uiConfigurations/conditionmonitoringpriorities', value);
39
+ export const deleteConditionMonitoringPriorities = () => deleteTenantObject('uiConfigurations/conditionmonitoringpriorities');
40
+ export const readEULA = (localeCode) => readTenantObject(`terms/eula-${localeCode}`, true);
41
+ export const readEULAList = () => readTenantObject('terms?meta=true');
42
+ export const writeEULA = (localeCode, value, fileName, axiosInstance) => writeTenantObject(`terms/eula-${localeCode}`, value, {
43
+ 'X-Blob-Meta-Filename': fileName,
44
+ 'Content-Type': 'application/pdf'
45
+ }, axiosInstance);
46
+ export const deleteEULA = (localeCode) => deleteTenantObject(`terms/eula-${localeCode}`);
47
+ export const readLegalPage = (legalPage) => readTenantObject(`terms/${legalPage}`);
48
+ /*
49
+ * User Blobox
50
+ */
51
+ const checkAccountObject = (path) => checkObject('accounts', 'me', path);
52
+ export const readAccountObject = (path) => readObject('accounts', 'me', path, false);
53
+ export const writeAccountObject = (path, value) => writeObject('accounts', 'me', path, value);
54
+ export const deleteAccountObject = (path) => deleteObject('accounts', 'me', path);
55
+ export const checkStartPage = () => checkAccountObject('uiConfigurations/startpage');
56
+ export const readStartPage = () => readAccountObject('uiConfigurations/startpage');
57
+ export const writeStartPage = (value) => writeAccountObject('uiConfigurations/startpage', value);
58
+ export const writeReleaseNotesVersionsViewed = (value) => writeAccountObject('uiConfigurations/releasenotesversionsviewed', value);
59
+ export const readReleaseNotesVersionsViewed = () => readAccountObject('uiConfigurations/releasenotesversionsviewed');
60
+ export const readReleaseNotesSubscription = () => readAccountObject('uiConfigurations/releasenotessubscription');
61
+ export const writeReleaseNotesSubscription = (value) => writeAccountObject('uiConfigurations/releasenotessubscription', value);
62
+ export const checkShowUserDocumentation = () => checkAccountObject('uiConfigurations/showuserdocumentation');
63
+ export const readShowUserDocumentation = () => readAccountObject('uiConfigurations/showuserdocumentation');
64
+ export const writeShowUserDocumentation = (value) => writeAccountObject('uiConfigurations/showuserdocumentation', value);
65
+ export const writePaginationSettings = (value) => writeAccountObject('uiConfigurations/paginationsettings', value);
66
+ export const readPaginationSettings = () => readAccountObject('uiConfigurations/paginationsettings');
67
+ export const writeFavorites = (value) => writeAccountObject('uiConfigurations/favorites', value);
68
+ export const readFavorites = () => readAccountObject('uiConfigurations/favorites');
69
+ export const deleteStartPage = () => deleteAccountObject('uiConfigurations/startpage');
70
+ export const writeAdvancedSearchDefaultProperties = (defaultProperties, context) => writeAccountObject(`uiConfigurations/advsearchprops${context}`, defaultProperties);
71
+ export const readAdvancedSearchDefaultProperties = (context) => readAccountObject(`uiConfigurations/advsearchprops${context}`);
72
+ /*
73
+ Asset Blob Series
74
+ */
75
+ export const readAssetBlobSeries = (assetUrn, from, to) => {
76
+ const params = {
77
+ from: new Date(from).toISOString(),
78
+ to: new Date(to).toISOString()
79
+ };
80
+ return Promise.all([
81
+ getAxios()
82
+ .get(`/beta/assets/${encodeURIComponent(assetUrn)}/blobSeries/assetBlobs`, {
83
+ params
84
+ })
85
+ .then(extractData),
86
+ getAxios()
87
+ .get(`/beta/assets/${encodeURIComponent(assetUrn)}/blobSeries/assetBlobs`, {
88
+ params: { ...params, meta: true }
89
+ })
90
+ .then(extractData)
91
+ ]).then(([urls, metaData]) => {
92
+ return urls.map((url, index) => {
93
+ const urlSegments = url.split('/');
94
+ const uniqueKey = urlSegments.slice(urlSegments.length - 2).join('/');
95
+ return { ...metaData[index], blobUniqueKey: uniqueKey };
96
+ });
97
+ });
98
+ };
99
+ export const downloadAssetBlobSeriesItem = (assetUrn, itemKey) => getAxios()
100
+ .get(`/beta/assets/${encodeURIComponent(assetUrn)}/blobSeries/assetBlobs/${itemKey}`, {
101
+ responseType: 'arraybuffer'
102
+ })
103
+ .then(extractData);
104
+ /*
105
+ Administration Blob
106
+ */
107
+ export const readAccountGroupObject = (accountGroupId, path, asArrayBuffer) => getAxios()
108
+ .get(`/beta/administration/accountGroups/${accountGroupId}/blobs/${path}`, asArrayBuffer ? { responseType: 'arraybuffer' } : {})
109
+ .then(extractData);
110
+ /*
111
+ Account Groups Blob
112
+ */
113
+ export const readAccountGroupObjectBasedOnMembership = (accountGroupId, path, asArrayBuffer) => readObject('accountGroups', accountGroupId, path, !!asArrayBuffer);
114
+ export const writeAccountGroupObject = (accountGroupId, path, value, headers, axiosInstance) => writeObject('accountGroups', accountGroupId, path, value, headers, axiosInstance);
115
+ export const deleteAccountGroupObject = (accountGroupId, path) => deleteObject('accountGroups', accountGroupId, path);
116
+ export const readAzureB2cConfiguration = async () => {
117
+ return readTenantObject('uiConfigurations/adb2c');
118
+ };
@@ -0,0 +1,46 @@
1
+ import { Pageable, PaginationSettings } from './pagination';
2
+ import { AxiosInstance } from 'axios';
3
+ export declare type BundleRequest = {
4
+ name: string;
5
+ };
6
+ export declare type Bundle = BundleRequest & {
7
+ id: string;
8
+ createdAt: string;
9
+ createdBy: string;
10
+ };
11
+ export declare type BundleFileMetadata = {
12
+ id: string;
13
+ name: string;
14
+ size: number;
15
+ checksum?: string;
16
+ };
17
+ export declare type BundleVersionRequest = {
18
+ draft: boolean;
19
+ name: string;
20
+ description?: string;
21
+ };
22
+ export declare type BundleVersion = BundleVersionRequest & {
23
+ id: string;
24
+ createdAt: string;
25
+ createdBy: string;
26
+ releasedAt: string | null | undefined;
27
+ releasedBy: string | null | undefined;
28
+ fileCount: number;
29
+ };
30
+ export declare type BundleFileLink = {
31
+ downloadLink: string;
32
+ };
33
+ export declare const fetchAllBundles: () => Promise<Bundle[]>;
34
+ export declare const fetchBundle: (id: string) => Promise<Bundle>;
35
+ export declare const createBundle: (bundle: BundleRequest) => Promise<Bundle>;
36
+ export declare const deleteBundle: (id: string) => Promise<any>;
37
+ export declare const fetchBundleVersions: (bundleId: string, paginationSettings?: PaginationSettings | undefined, draft?: boolean | undefined) => Promise<Pageable<BundleVersion>>;
38
+ export declare const fetchBundleVersion: (bundleId: string, versionId: string) => Promise<BundleVersion>;
39
+ export declare const createBundleVersion: (bundleId: string, version: BundleVersionRequest) => Promise<BundleVersion>;
40
+ export declare const releaseBundleVersion: (bundleId: string, versionId: string) => Promise<BundleVersion>;
41
+ export declare const deleteBundleVersion: (bundleId: string, versionId: string) => Promise<any>;
42
+ export declare const createBundleFile: (bundleId: string, versionId: string, data: FormData, axiosInstance?: AxiosInstance | undefined) => Promise<any>;
43
+ export declare const fetchBundleFiles: (bundleId: string, versionId: string) => Promise<BundleFileMetadata[]>;
44
+ export declare const downloadBundleFile: (bundleId: string, versionId: string, fileId: string) => Promise<BundleFileLink>;
45
+ export declare const deleteBundleFile: (bundleId: string, versionId: string, fileId: string) => Promise<any>;
46
+ //# sourceMappingURL=bundles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundles.d.ts","sourceRoot":"","sources":["../../../src/bundles.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEpC,oBAAY,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,MAAM,GAAG,aAAa,GAAG;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,oBAAY,aAAa,GAAG,oBAAoB,GAAG;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,QAAQ,MAAM,EAAE,CAElD,CAAC;AAEF,eAAO,MAAM,WAAW,OAAQ,MAAM,KAAG,QAAQ,MAAM,CAEtD,CAAC;AAEF,eAAO,MAAM,YAAY,WAAY,aAAa,KAAG,QAAQ,MAAM,CAElE,CAAC;AAEF,eAAO,MAAM,YAAY,OAAQ,MAAM,KAAG,QAAQ,GAAG,CAEpD,CAAC;AAEF,eAAO,MAAM,mBAAmB,aACrB,MAAM,uFAGd,QAAQ,SAAS,aAAa,CAAC,CAajC,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAAc,MAAM,aAAa,MAAM,KAAG,QAAQ,aAAa,CAE7F,CAAC;AAEF,eAAO,MAAM,mBAAmB,aAAc,MAAM,WAAW,oBAAoB,KAAG,QAAQ,aAAa,CAE1G,CAAC;AAEF,eAAO,MAAM,oBAAoB,aAAc,MAAM,aAAa,MAAM,KAAG,QAAQ,aAAa,CAE/F,CAAC;AAEF,eAAO,MAAM,mBAAmB,aAAc,MAAM,aAAa,MAAM,KAAG,QAAQ,GAAG,CAEpF,CAAC;AAEF,eAAO,MAAM,gBAAgB,aAClB,MAAM,aACL,MAAM,QACX,QAAQ,gDAEZ,QAAQ,GAAG,CAOb,CAAC;AAEF,eAAO,MAAM,gBAAgB,aAAc,MAAM,aAAa,MAAM,KAAG,QAAQ,kBAAkB,EAAE,CAElG,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAAc,MAAM,aAAa,MAAM,UAAU,MAAM,KAAG,QAAQ,cAAc,CAE9G,CAAC;AAEF,eAAO,MAAM,gBAAgB,aAAc,MAAM,aAAa,MAAM,UAAU,MAAM,KAAG,QAAQ,GAAG,CAEjG,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { extractData, getAxios } from './axios';
2
+ export const fetchAllBundles = () => {
3
+ return getAxios().get(`/v2/bundles`).then(extractData);
4
+ };
5
+ export const fetchBundle = (id) => {
6
+ return getAxios().get(`/v2/bundles/${id}`).then(extractData);
7
+ };
8
+ export const createBundle = (bundle) => {
9
+ return getAxios().post(`/v2/bundles`, bundle).then(extractData);
10
+ };
11
+ export const deleteBundle = (id) => {
12
+ return getAxios().delete(`/v2/bundles/${id}`);
13
+ };
14
+ export const fetchBundleVersions = (bundleId, paginationSettings, draft) => {
15
+ const { page = 0, size = 1000, sort = '' } = paginationSettings || {};
16
+ return getAxios()
17
+ .get(`/v2/bundles/${bundleId}/versions`, {
18
+ params: {
19
+ page,
20
+ size,
21
+ sort: (sort && `${sort.property},${sort.direction}`) || '',
22
+ ignoreCase: true,
23
+ draft
24
+ }
25
+ })
26
+ .then(extractData);
27
+ };
28
+ export const fetchBundleVersion = (bundleId, versionId) => {
29
+ return getAxios().get(`/v2/bundles/${bundleId}/versions/${versionId}`).then(extractData);
30
+ };
31
+ export const createBundleVersion = (bundleId, version) => {
32
+ return getAxios().post(`/v2/bundles/${bundleId}/versions`, version).then(extractData);
33
+ };
34
+ export const releaseBundleVersion = (bundleId, versionId) => {
35
+ return getAxios().put(`/v2/bundles/${bundleId}/versions/${versionId}/release`).then(extractData);
36
+ };
37
+ export const deleteBundleVersion = (bundleId, versionId) => {
38
+ return getAxios().delete(`/v2/bundles/${bundleId}/versions/${versionId}`);
39
+ };
40
+ export const createBundleFile = (bundleId, versionId, data, axiosInstance) => {
41
+ return (axiosInstance ?? getAxios()).post(`/v2/bundles/${bundleId}/versions/${versionId}/files`, data, {
42
+ headers: {
43
+ 'content-type': 'multipart/form-data'
44
+ },
45
+ timeout: 15 * 60 * 1000
46
+ });
47
+ };
48
+ export const fetchBundleFiles = (bundleId, versionId) => {
49
+ return getAxios().get(`/v2/bundles/${bundleId}/versions/${versionId}/files`).then(extractData);
50
+ };
51
+ export const downloadBundleFile = (bundleId, versionId, fileId) => {
52
+ return getAxios().get(`/v2/bundles/${bundleId}/versions/${versionId}/files/${fileId}`).then(extractData);
53
+ };
54
+ export const deleteBundleFile = (bundleId, versionId, fileId) => {
55
+ return getAxios().delete(`/v2/bundles/${bundleId}/versions/${versionId}/files/${fileId}`);
56
+ };
@@ -0,0 +1,21 @@
1
+ export declare type CommandType = {
2
+ id: number;
3
+ sentAt: Date;
4
+ expiresAt: Date;
5
+ content: {
6
+ type: string;
7
+ };
8
+ };
9
+ export declare type CommandResult = {
10
+ id: number;
11
+ receivedAt: Date;
12
+ content: {
13
+ type: string;
14
+ errorCode: number;
15
+ properties: any;
16
+ items: Array<any> | null | undefined;
17
+ };
18
+ };
19
+ export declare const invokeDiscoveryCommand: (gatewayId: number, discoveryParameters: any) => Promise<CommandType>;
20
+ export declare const fetchSentCommandResponses: (gatewayId: number, commandId: number) => Promise<Array<CommandResult>>;
21
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/commands.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,IAAI,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;CACF,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,IAAI,CAAC;IACjB,OAAO,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,GAAG,CAAC;QAChB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;KACrC,CAAC;CACF,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,uBAAuB,GAAG,KAAG,QAAQ,WAAW,CASvG,CAAC;AAEF,eAAO,MAAM,yBAAyB,cAAe,MAAM,aAAa,MAAM,KAAG,QAAQ,MAAM,aAAa,CAAC,CAE5G,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { getAxios, extractData } from './axios';
2
+ export const invokeDiscoveryCommand = (gatewayId, discoveryParameters) => {
3
+ const discoveryPayload = {
4
+ expirySeconds: 60,
5
+ content: {
6
+ type: 'discoveryCommand',
7
+ discoveryParameters
8
+ }
9
+ };
10
+ return getAxios().post(`/v2/gateways/${gatewayId}/commands`, discoveryPayload).then(extractData);
11
+ };
12
+ export const fetchSentCommandResponses = (gatewayId, commandId) => {
13
+ return getAxios().get(`/v2/gateways/${gatewayId}/commands/${commandId}/responses`).then(extractData);
14
+ };
@@ -0,0 +1,82 @@
1
+ import type { Asset } from './asset';
2
+ import type { PaginationSettings } from './pagination';
3
+ declare type Datatype = 'Float' | 'String' | 'Boolean' | 'Binary' | 'Integer';
4
+ declare type ModbusType = 'output' | 'input' | 'inputbit' | 'outputbit';
5
+ declare type OperationMode = 'read' | 'write' | 'readWrite';
6
+ declare type ModbusWidth = 16 | 32 | 64;
7
+ declare type AbstractConfigurationBody = {
8
+ samplingInterval: number;
9
+ assetUrn: string | null | undefined;
10
+ assetTypeUrn?: string;
11
+ };
12
+ export declare type ModbusConfigurationBody = AbstractConfigurationBody & {
13
+ configurationType: 'modbus';
14
+ useSameTimestamp: boolean;
15
+ pollingDelay: number;
16
+ disableBlockReading: boolean;
17
+ useSerial: boolean;
18
+ ip: string | null | undefined;
19
+ port: number | null | undefined;
20
+ serialDevice: string | null | undefined;
21
+ serialParity: string | null | undefined;
22
+ serialBaudrate: number | null | undefined;
23
+ serialDataBit: number | null | undefined;
24
+ serialStopBit: number | null | undefined;
25
+ serialMode: string | null | undefined;
26
+ connectorElements: Array<ModbusConnectorElement>;
27
+ };
28
+ export declare type TestDataConfigurationBody = AbstractConfigurationBody & {
29
+ configurationType: 'testData';
30
+ interval?: number;
31
+ randomValue?: boolean;
32
+ randomIndex?: boolean;
33
+ datapointKey?: string;
34
+ datatype?: Datatype;
35
+ values?: Array<number>;
36
+ };
37
+ export declare type DataVariable = {
38
+ nodeId: string;
39
+ nodeIdType: string;
40
+ nodeIdNamespaceIndex: number;
41
+ key: string;
42
+ samplingInterval: number | null | undefined;
43
+ polling: boolean;
44
+ queueSize: number | null | undefined;
45
+ publishingInterval: number | null | undefined;
46
+ transformArrayToString: boolean | null | undefined;
47
+ arrayStringDelimiter: string | null | undefined;
48
+ };
49
+ export declare type Configuration = {
50
+ id?: number;
51
+ name: string;
52
+ content: ModbusConfigurationBody | TestDataConfigurationBody;
53
+ };
54
+ export declare type ModbusConnectorElement = {
55
+ reactableKey?: string;
56
+ type: 'modbusElement';
57
+ key: string;
58
+ datatype: Datatype;
59
+ unit: string;
60
+ address: number;
61
+ slave: number;
62
+ factor: number;
63
+ modbusType: ModbusType;
64
+ signed: boolean;
65
+ mode: OperationMode;
66
+ samplingInterval: (number | string) | null | undefined;
67
+ hexString: boolean;
68
+ bigEndian: boolean;
69
+ stringLength: number;
70
+ width: ModbusWidth | null | undefined;
71
+ };
72
+ export declare type ConfigurationListObject = Record<string, Configuration>;
73
+ export declare type ConfigurationKeyToId = Record<string, number>;
74
+ export declare const fetchConfigurations: (assetId: number) => Promise<ConfigurationListObject>;
75
+ export declare const fetchConfigurationByName: (name: string) => Promise<Configuration>;
76
+ export declare const createConfiguration: (configuration: Configuration) => Promise<Configuration>;
77
+ export declare const updateConfiguration: (configuration: Configuration) => Promise<Configuration>;
78
+ export declare const deleteConfiguration: (id: number) => Promise<any>;
79
+ export declare const assignConfigurationsToAsset: (assetId: number, configurationKeyToIdObject: ConfigurationKeyToId) => Promise<ConfigurationListObject>;
80
+ export declare const fetchAssignedGatewaysToConfiguration: (id: number, paginationSettings?: PaginationSettings | undefined) => Promise<Asset[]>;
81
+ export {};
82
+ //# sourceMappingURL=configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/configuration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAErD,aAAK,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtE,aAAK,UAAU,GA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CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,oBAAY,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEpE,oBAAY,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1D,eAAO,MAAM,mBAAmB,YAAa,MAAM,KAAG,QAAQ,uBAAuB,CAEpF,CAAC;AAEF,eAAO,MAAM,wBAAwB,SAAU,MAAM,KAAG,QAAQ,aAAa,CAI5E,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBAAmB,aAAa,KAAG,QAAQ,aAAa,CAEvF,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBAAmB,aAAa,KAAG,QAAQ,aAAa,CAIvF,CAAC;AAEF,eAAO,MAAM,mBAAmB,OAAQ,MAAM,KAAG,QAAQ,GAAG,CAE3D,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAC9B,MAAM,8BACa,oBAAoB,KAC9C,QAAQ,uBAAuB,CAEjC,CAAC;AAEF,eAAO,MAAM,oCAAoC,OAC5C,MAAM,0DAER,QAAQ,KAAK,EAAE,CAcjB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { getAxios, extractData } from './axios';
2
+ export const fetchConfigurations = (assetId) => {
3
+ return getAxios().get(`/v2/assets/${assetId}/configurations`).then(extractData);
4
+ };
5
+ export const fetchConfigurationByName = (name) => {
6
+ return getAxios()
7
+ .get(`/v2/configurations/name/${encodeURIComponent(name)}`)
8
+ .then(extractData);
9
+ };
10
+ export const createConfiguration = (configuration) => {
11
+ return getAxios().post(`/v2/configurations`, configuration).then(extractData);
12
+ };
13
+ export const updateConfiguration = (configuration) => {
14
+ return getAxios() // $FlowIgnore configuration.id is present in update case
15
+ .put(`/v2/configurations/${configuration.id}`, configuration)
16
+ .then(extractData);
17
+ };
18
+ export const deleteConfiguration = (id) => {
19
+ return getAxios().delete(`/v2/configurations/${id}`);
20
+ };
21
+ export const assignConfigurationsToAsset = (assetId, configurationKeyToIdObject) => {
22
+ return getAxios().put(`/v2/assets/${assetId}/configurations`, configurationKeyToIdObject).then(extractData);
23
+ };
24
+ export const fetchAssignedGatewaysToConfiguration = (id, paginationSettings) => {
25
+ const settings = paginationSettings
26
+ ? { ...paginationSettings }
27
+ : {
28
+ page: 0,
29
+ size: 1000,
30
+ sort: ''
31
+ };
32
+ return getAxios()
33
+ .get(`/v2/configurations/${id}/gateways`, {
34
+ params: settings
35
+ })
36
+ .then(extractData)
37
+ .then((pageable) => pageable.content);
38
+ };
@@ -0,0 +1,116 @@
1
+ import type { Pageable, PaginationSettings } from './pagination';
2
+ export declare type DataProcessingDefinitionDatapointDataType = 'BOOLEAN' | 'DOUBLE' | 'LONG' | 'TEXT';
3
+ export declare type DataProcessingDefinitionProcessingDefType = 'expressionPD';
4
+ export declare type DataProcessingDefinitionProcessingPeriod = 'INSTANT' | 'MIN1' | 'MIN15' | 'MIN30' | 'HOUR';
5
+ export declare type DataProcessingDefinitionDatapoint = {
6
+ datapointKey: string;
7
+ variableName: string;
8
+ dataType: DataProcessingDefinitionDatapointDataType;
9
+ requiresValueInCurrentPeriod: boolean;
10
+ };
11
+ export declare type DataProcessingDefinitionOutput = {
12
+ outputKey: string;
13
+ variableName: string;
14
+ };
15
+ export declare type DataProcessingDefinitionBody = {
16
+ id?: string;
17
+ version?: number;
18
+ processingDefType: string;
19
+ kpiName: string;
20
+ processingPeriod: DataProcessingDefinitionProcessingPeriod;
21
+ resetTo: string;
22
+ ensureBoundaryValues: boolean;
23
+ expression: string;
24
+ input: Array<DataProcessingDefinitionDatapoint>;
25
+ output: Array<DataProcessingDefinitionOutput>;
26
+ publishAsDatapointValues?: boolean;
27
+ };
28
+ export declare type DataProcessingDefinition = {
29
+ id: number;
30
+ directlyAssigned: boolean;
31
+ etag?: string | null | undefined;
32
+ definition: DataProcessingDefinitionBody;
33
+ };
34
+ export declare type DataProcessingDefinitionAssignment = {
35
+ id: number;
36
+ kpiName: string;
37
+ };
38
+ export declare type AssetAssignment = {
39
+ assetId: number;
40
+ assetUrn: string;
41
+ assetName: string;
42
+ };
43
+ export declare type DataProcessingDefinitionAssetAssignment = DataProcessingDefinitionAssignment & {
44
+ assignedToAssets: Array<AssetAssignment>;
45
+ };
46
+ export declare type AssetGroupAssignment = {
47
+ assetGroupId: number;
48
+ assetGroupName: string;
49
+ assetGroupDisplayName: string;
50
+ };
51
+ export declare type DataProcessingDefinitionAssetGroupAssignment = DataProcessingDefinitionAssignment & {
52
+ assignedToAssetGroups: Array<AssetGroupAssignment>;
53
+ };
54
+ export declare type AccountGroupAssignment = {
55
+ accountGroupId: number;
56
+ accountGroupName: string;
57
+ accountGroupDisplayName: string;
58
+ };
59
+ export declare type DataProcessingDefinitionAccountGroupAssignment = DataProcessingDefinitionAssignment & {
60
+ accessesForAccountGroups: Array<AccountGroupAssignment>;
61
+ };
62
+ export declare type DataProcessingDefinitionValidation = {
63
+ id: number;
64
+ name: string;
65
+ compatibleDatapoints: Array<string>;
66
+ missingDatapoints: Array<string>;
67
+ };
68
+ export declare type DataProcessingDefinitionAccessList = {
69
+ accountGroupId: number;
70
+ };
71
+ declare type EvaluationsParamsInput = {
72
+ variableName: string;
73
+ datapointKey: string;
74
+ dataType: string;
75
+ };
76
+ export declare type EvaluationsParams = {
77
+ expression: string;
78
+ period: string;
79
+ from: string;
80
+ to: string;
81
+ inputs: Array<EvaluationsParamsInput>;
82
+ };
83
+ export declare type DataProcessingDefinitionEvaluationSeries = {
84
+ series: Array<{
85
+ variable: string;
86
+ type: string;
87
+ data: Array<[string, number]>;
88
+ }>;
89
+ };
90
+ export declare type DataProcessingDefinitionsListFilterSettings = {
91
+ kpiName?: string;
92
+ publishAsDatapointValues?: string;
93
+ };
94
+ export declare const listDataProcessingDefinitions: (filterSettings: DataProcessingDefinitionsListFilterSettings, paginationSettings: PaginationSettings) => Promise<Pageable<DataProcessingDefinition>>;
95
+ export declare const listDataProcessingDefinitionAssetAssignments: (dataProcessingDefinitionIds: Array<number>) => Promise<Array<DataProcessingDefinitionAssetAssignment>>;
96
+ export declare const listDataProcessingDefinitionAssetGroupAssignments: (dataProcessingDefinitionIds: Array<number>) => Promise<Array<DataProcessingDefinitionAssetGroupAssignment>>;
97
+ export declare const listDataProcessingDefinitionAccountGroupAssignments: (dataProcessingDefinitionIds: Array<number>) => Promise<Array<DataProcessingDefinitionAccountGroupAssignment>>;
98
+ export declare const getDataProcessingDefinitionById: (definitionId: number) => Promise<DataProcessingDefinition>;
99
+ export declare const fetchDataProcessingDefinitionsAssignedToAsset: (assetId: number) => Promise<Array<DataProcessingDefinition>>;
100
+ export declare const fetchDataProcessingDefinitionsAssignedToAssetGroup: (assetGroupId: number) => Promise<Array<DataProcessingDefinition>>;
101
+ export declare const createDataProcessingDefinition: (dataProcessingDefinition: {
102
+ definition: DataProcessingDefinitionBody;
103
+ assetIdsWithAccess?: number[];
104
+ accountGroupIdsWithAccess?: number[];
105
+ }) => Promise<DataProcessingDefinition>;
106
+ export declare const updateDataProcessingDefinition: (data: DataProcessingDefinition) => Promise<DataProcessingDefinition>;
107
+ export declare const assignDataProcessingDefinitionsToAsset: (assetId: number, dataProcessingDefinitionIds: Array<number>) => Promise<Array<number>>;
108
+ export declare const assignDataProcessingDefinitionsToAssetGroup: (assetGroupId: number, dataProcessingDefinitionIds: Array<number>) => Promise<Array<number>>;
109
+ export declare const deleteDataProcessingDefinition: (dataProcessingDefinitionId: number) => Promise<any>;
110
+ export declare const validateDataProcessingDefinitionForAssetGroup: (dataProcessingDefinition: DataProcessingDefinition, assetGroupId: number, paginationSettings: PaginationSettings) => Promise<Pageable<DataProcessingDefinitionValidation>>;
111
+ export declare const listDataProcessingDefinitionAccesses: (definitionId: number) => Promise<DataProcessingDefinitionAccessList>;
112
+ export declare const addAccessToDataProcessingDefinition: (definitionId: number, accountGroupId: number) => Promise<any>;
113
+ export declare const removeAccessToDataProcessingDefinition: (definitionId: number, accountGroupId: number) => Promise<any>;
114
+ export declare const getDataProcessingDefinitionEvaluations: (urn: string, params: EvaluationsParams) => Promise<DataProcessingDefinitionEvaluationSeries>;
115
+ export {};
116
+ //# sourceMappingURL=dataProcessingDefinition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataProcessingDefinition.d.ts","sourceRoot":"","sources":["../../../src/dataProcessingDefinition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAE/D,oBAAY,yCAAyC,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/F,oBAAY,yCAAyC,GAAG,cAAc,CAAC;AAEvE,oBAAY,wCAAwC,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEvG,oBAAY,iCAAiC,GAAG;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,yCAAyC,CAAC;IACpD,4BAA4B,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF,oBAAY,8BAA8B,GAAG;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,wCAAwC,CAAC;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,iCAAiC,CAAC,CAAC;IAChD,MAAM,EAAE,KAAK,CAAC,8BAA8B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 -0,0 +1,124 @@
1
+ import { extractData, getAxios } from './axios';
2
+ export const listDataProcessingDefinitions = (filterSettings, paginationSettings) => {
3
+ const settings = paginationSettings || {
4
+ page: 0,
5
+ size: 10,
6
+ sort: ''
7
+ };
8
+ const { page, size, sort } = settings;
9
+ const params = {
10
+ ...filterSettings,
11
+ page,
12
+ size,
13
+ sort: (sort && `${sort.property},${sort.direction}`) || '',
14
+ ignoreCase: true
15
+ };
16
+ return getAxios()
17
+ .get('/v2/dataProcessingDefinitions', {
18
+ params
19
+ })
20
+ .then(extractData);
21
+ };
22
+ export const listDataProcessingDefinitionAssetAssignments = (dataProcessingDefinitionIds) => {
23
+ return getAxios()
24
+ .get('/v2/dataProcessingDefinitions/assets', {
25
+ params: {
26
+ id: dataProcessingDefinitionIds
27
+ }
28
+ })
29
+ .then(extractData);
30
+ };
31
+ export const listDataProcessingDefinitionAssetGroupAssignments = (dataProcessingDefinitionIds) => {
32
+ return getAxios()
33
+ .get('/v2/dataProcessingDefinitions/assetGroups', {
34
+ params: {
35
+ id: dataProcessingDefinitionIds
36
+ }
37
+ })
38
+ .then(extractData);
39
+ };
40
+ export const listDataProcessingDefinitionAccountGroupAssignments = (dataProcessingDefinitionIds) => {
41
+ return getAxios()
42
+ .get('/v2/dataProcessingDefinitions/accesses', {
43
+ params: {
44
+ id: dataProcessingDefinitionIds
45
+ }
46
+ })
47
+ .then(extractData);
48
+ };
49
+ export const getDataProcessingDefinitionById = (definitionId) => {
50
+ return getAxios()
51
+ .get(`/v2/dataProcessingDefinitions/${definitionId}`)
52
+ .then((response) => {
53
+ const data = extractData(response);
54
+ const etag = response.headers?.etag || '';
55
+ return { ...data, etag };
56
+ });
57
+ };
58
+ export const fetchDataProcessingDefinitionsAssignedToAsset = (assetId) => {
59
+ return getAxios().get(`/v2/assets/${assetId}/dataProcessingDefinitions`).then(extractData);
60
+ };
61
+ export const fetchDataProcessingDefinitionsAssignedToAssetGroup = (assetGroupId) => {
62
+ return getAxios().get(`/v2/assetGroups/${assetGroupId}/dataProcessingDefinitions`).then(extractData);
63
+ };
64
+ export const createDataProcessingDefinition = (dataProcessingDefinition) => {
65
+ return getAxios().post('/v2/dataProcessingDefinitions', dataProcessingDefinition).then(extractData);
66
+ };
67
+ export const updateDataProcessingDefinition = (data) => {
68
+ const { etag, ...dataProcessingDefinition } = data;
69
+ return getAxios()
70
+ .put(`/v2/dataProcessingDefinitions/${dataProcessingDefinition.id}`, dataProcessingDefinition, {
71
+ headers: etag
72
+ ? {
73
+ 'If-Match': etag
74
+ }
75
+ : {}
76
+ })
77
+ .then(extractData);
78
+ };
79
+ export const assignDataProcessingDefinitionsToAsset = (assetId, dataProcessingDefinitionIds) => {
80
+ return getAxios()
81
+ .put(`/v2/assets/${assetId}/dataProcessingDefinitionsById`, dataProcessingDefinitionIds)
82
+ .then(extractData);
83
+ };
84
+ export const assignDataProcessingDefinitionsToAssetGroup = (assetGroupId, dataProcessingDefinitionIds) => {
85
+ return getAxios()
86
+ .put(`/v2/assetGroups/${assetGroupId}/dataProcessingDefinitionsById`, dataProcessingDefinitionIds)
87
+ .then(extractData);
88
+ };
89
+ export const deleteDataProcessingDefinition = (dataProcessingDefinitionId) => {
90
+ return getAxios().delete(`/v2/dataProcessingDefinitions/${dataProcessingDefinitionId}`);
91
+ };
92
+ export const validateDataProcessingDefinitionForAssetGroup = (dataProcessingDefinition, assetGroupId, paginationSettings) => {
93
+ const { definition } = dataProcessingDefinition;
94
+ const settings = paginationSettings || {
95
+ page: 0,
96
+ size: 10,
97
+ sort: ''
98
+ };
99
+ const { page, size, sort } = settings;
100
+ return getAxios()
101
+ .post(`/v2/assetGroups/${assetGroupId}/dataProcessingDefinitionValidation`, {
102
+ definition
103
+ }, {
104
+ params: {
105
+ page,
106
+ size,
107
+ sort: sort ? `${sort.property},${sort.direction}` : '',
108
+ ignoreCase: true
109
+ }
110
+ })
111
+ .then(extractData);
112
+ };
113
+ export const listDataProcessingDefinitionAccesses = (definitionId) => {
114
+ return getAxios().get(`/v2/dataProcessingDefinitions/${definitionId}/access`).then(extractData);
115
+ };
116
+ export const addAccessToDataProcessingDefinition = (definitionId, accountGroupId) => {
117
+ return getAxios().put(`/v2/dataProcessingDefinitions/${definitionId}/access/${accountGroupId}`);
118
+ };
119
+ export const removeAccessToDataProcessingDefinition = (definitionId, accountGroupId) => {
120
+ return getAxios().delete(`/v2/dataProcessingDefinitions/${definitionId}/access/${accountGroupId}`);
121
+ };
122
+ export const getDataProcessingDefinitionEvaluations = (urn, params) => getAxios()
123
+ .post(`/v2/dataProcessingDefinitionEvaluations/${encodeURIComponent(urn)}`, params)
124
+ .then(extractData);