@c8y/client 1018.487.7 → 1018.496.6

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 (437) hide show
  1. package/NOTICES +1 -1
  2. package/lib/bundles/client.umd.js +36 -5
  3. package/lib/bundles/client.umd.js.map +1 -1
  4. package/lib/bundles/client.umd.min.js +1 -1
  5. package/lib/bundles/client.umd.min.js.map +1 -1
  6. package/lib/cjs/index.d.ts +2 -0
  7. package/lib/cjs/src/Client.d.ts +190 -0
  8. package/lib/cjs/src/alarm/AlarmService.d.ts +98 -0
  9. package/lib/cjs/src/alarm/AlarmStatus.d.ts +9 -0
  10. package/lib/cjs/src/alarm/IAlarm.d.ts +57 -0
  11. package/lib/cjs/src/alarm/index.d.ts +4 -0
  12. package/lib/cjs/src/application/ApplicationAvailability.d.ts +6 -0
  13. package/lib/cjs/src/application/ApplicationBinaryService.d.ts +40 -0
  14. package/lib/cjs/src/application/ApplicationService.d.ts +325 -0
  15. package/lib/cjs/src/application/ApplicationType.d.ts +7 -0
  16. package/lib/cjs/src/application/BillingMode.d.ts +5 -0
  17. package/lib/cjs/src/application/IApplication.d.ts +22 -0
  18. package/lib/cjs/src/application/IApplicationBinary.d.ts +9 -0
  19. package/lib/cjs/src/application/IApplicationInstanceDetails.d.ts +68 -0
  20. package/lib/cjs/src/application/IApplicationReference.d.ts +16 -0
  21. package/lib/cjs/src/application/IApplicationVersion.d.ts +15 -0
  22. package/lib/cjs/src/application/IDeviceRegistrationProvider.d.ts +7 -0
  23. package/lib/cjs/src/application/IManifest.d.ts +34 -0
  24. package/lib/cjs/src/application/IProvider.d.ts +6 -0
  25. package/lib/cjs/src/application/IUploadParamsOverride.d.ts +7 -0
  26. package/lib/cjs/src/application/Isolation.d.ts +5 -0
  27. package/lib/cjs/src/application/index.d.ts +16 -0
  28. package/lib/cjs/src/audit/AuditRecordType.d.ts +19 -0
  29. package/lib/cjs/src/audit/AuditService.d.ts +72 -0
  30. package/lib/cjs/src/audit/ChangeType.d.ts +9 -0
  31. package/lib/cjs/src/audit/IAuditRecord.d.ts +36 -0
  32. package/lib/cjs/src/audit/IChange.d.ts +28 -0
  33. package/lib/cjs/src/audit/index.d.ts +6 -0
  34. package/lib/cjs/src/core/BasicAuth.d.ts +25 -0
  35. package/lib/cjs/src/core/BearerAuth.d.ts +13 -0
  36. package/lib/cjs/src/core/CookieAuth.d.ts +19 -0
  37. package/lib/cjs/src/core/FetchClient.d.ts +18 -0
  38. package/lib/cjs/src/core/IAuthentication.d.ts +23 -0
  39. package/lib/cjs/src/core/ICustomProperties.d.ts +8 -0
  40. package/lib/cjs/src/core/ICustomPropertiesMap.d.ts +5 -0
  41. package/lib/cjs/src/core/IFetchClient.d.ts +10 -0
  42. package/lib/cjs/src/core/IFetchOptions.d.ts +21 -0
  43. package/lib/cjs/src/core/IFetchResponse.d.ts +26 -0
  44. package/lib/cjs/src/core/IIdentified.d.ts +6 -0
  45. package/lib/cjs/src/core/IMicroserviceSubscriptions.d.ts +16 -0
  46. package/lib/cjs/src/core/INamed.d.ts +5 -0
  47. package/lib/cjs/src/core/IResult.d.ts +26 -0
  48. package/lib/cjs/src/core/IResultBase.d.ts +6 -0
  49. package/lib/cjs/src/core/IResultList.d.ts +36 -0
  50. package/lib/cjs/src/core/ISource.d.ts +18 -0
  51. package/lib/cjs/src/core/MicroserviceClientRequestAuth.d.ts +32 -0
  52. package/lib/cjs/src/core/NodeJSCookieAuth.d.ts +11 -0
  53. package/lib/cjs/src/core/Paging.d.ts +63 -0
  54. package/lib/cjs/src/core/QueriesUtil.d.ts +95 -0
  55. package/lib/cjs/src/core/Service.d.ts +45 -0
  56. package/lib/cjs/src/core/Severity.d.ts +11 -0
  57. package/lib/cjs/src/core/index.d.ts +23 -0
  58. package/lib/cjs/src/device-registration/DeviceRegistrationBulkService.d.ts +41 -0
  59. package/lib/cjs/src/device-registration/DeviceRegistrationSecurityMode.d.ts +9 -0
  60. package/lib/cjs/src/device-registration/DeviceRegistrationService.d.ts +199 -0
  61. package/lib/cjs/src/device-registration/DeviceRegistrationStatus.d.ts +10 -0
  62. package/lib/cjs/src/device-registration/IDeviceCredentials.d.ts +23 -0
  63. package/lib/cjs/src/device-registration/IDeviceRegistration.d.ts +76 -0
  64. package/lib/cjs/src/device-registration/IDeviceRegistrationBulkResult.d.ts +27 -0
  65. package/lib/cjs/src/device-registration/index.d.ts +8 -0
  66. package/lib/cjs/src/event/EventBinaryService.d.ts +64 -0
  67. package/lib/cjs/src/event/EventService.d.ts +114 -0
  68. package/lib/cjs/src/event/IEvent.d.ts +39 -0
  69. package/lib/cjs/src/event/IEventBinary.d.ts +26 -0
  70. package/lib/cjs/src/event/index.d.ts +5 -0
  71. package/lib/cjs/src/gettext.d.ts +3 -0
  72. package/lib/cjs/src/identity/IExternalIdentity.d.ts +24 -0
  73. package/lib/cjs/src/identity/IdentityService.d.ts +102 -0
  74. package/lib/cjs/src/identity/index.d.ts +3 -0
  75. package/lib/cjs/src/inventory/IManagedObject.d.ts +88 -0
  76. package/lib/cjs/src/inventory/InventoryBinaryService.d.ts +45 -0
  77. package/lib/cjs/src/inventory/InventoryService.d.ts +526 -0
  78. package/lib/cjs/src/inventory/index.d.ts +4 -0
  79. package/lib/cjs/src/inventory-role/InventoryRoleService.d.ts +105 -0
  80. package/lib/cjs/src/inventory-role/index.d.ts +2 -0
  81. package/lib/cjs/src/measurement/IMeasurement.d.ts +58 -0
  82. package/lib/cjs/src/measurement/ISeries.d.ts +58 -0
  83. package/lib/cjs/src/measurement/ISeriesFilter.d.ts +38 -0
  84. package/lib/cjs/src/measurement/MeasurementService.d.ts +121 -0
  85. package/lib/cjs/src/measurement/MeasurementService.js +1 -1
  86. package/lib/cjs/src/measurement/MeasurementService.js.map +1 -1
  87. package/lib/cjs/src/measurement/index.d.ts +5 -0
  88. package/lib/cjs/src/operation/IOperation.d.ts +24 -0
  89. package/lib/cjs/src/operation/IOperationBulk.d.ts +55 -0
  90. package/lib/cjs/src/operation/IOperationBulkProgress.d.ts +27 -0
  91. package/lib/cjs/src/operation/OperationBulkGeneralStatus.d.ts +14 -0
  92. package/lib/cjs/src/operation/OperationBulkService.d.ts +124 -0
  93. package/lib/cjs/src/operation/OperationBulkStatus.d.ts +10 -0
  94. package/lib/cjs/src/operation/OperationService.d.ts +105 -0
  95. package/lib/cjs/src/operation/OperationStatus.d.ts +10 -0
  96. package/lib/cjs/src/operation/index.d.ts +9 -0
  97. package/lib/cjs/src/public_api.d.ts +25 -0
  98. package/lib/cjs/src/realtime/MetaChannel.d.ts +7 -0
  99. package/lib/cjs/src/realtime/Realtime.d.ts +60 -0
  100. package/lib/cjs/src/realtime/Realtime.js +35 -4
  101. package/lib/cjs/src/realtime/Realtime.js.map +1 -1
  102. package/lib/cjs/src/realtime/index.d.ts +2 -0
  103. package/lib/cjs/src/services.d.ts +24 -0
  104. package/lib/cjs/src/smart-groups/SmartGroupsService.d.ts +203 -0
  105. package/lib/cjs/src/smart-groups/index.d.ts +2 -0
  106. package/lib/cjs/src/smart-rules/IRule.d.ts +20 -0
  107. package/lib/cjs/src/smart-rules/SmartRulesService.d.ts +87 -0
  108. package/lib/cjs/src/smart-rules/index.d.ts +3 -0
  109. package/lib/cjs/src/system-options/ISystemOption.d.ts +19 -0
  110. package/lib/cjs/src/system-options/SystemOptionsService.d.ts +52 -0
  111. package/lib/cjs/src/system-options/index.d.ts +3 -0
  112. package/lib/cjs/src/tenant/ICurrentTenant.d.ts +12 -0
  113. package/lib/cjs/src/tenant/ITenant.d.ts +23 -0
  114. package/lib/cjs/src/tenant/ITenantReference.d.ts +5 -0
  115. package/lib/cjs/src/tenant/ITfaSettings.d.ts +29 -0
  116. package/lib/cjs/src/tenant/TenantService.d.ts +240 -0
  117. package/lib/cjs/src/tenant/TenantStatus.d.ts +5 -0
  118. package/lib/cjs/src/tenant/TfaStrategy.d.ts +10 -0
  119. package/lib/cjs/src/tenant/index.d.ts +8 -0
  120. package/lib/cjs/src/tenant-login-options/ITenantLoginOptions.d.ts +152 -0
  121. package/lib/cjs/src/tenant-login-options/TenantLoginOptionsService.d.ts +170 -0
  122. package/lib/cjs/src/tenant-login-options/index.d.ts +3 -0
  123. package/lib/cjs/src/tenant-options/ITenantOption.d.ts +10 -0
  124. package/lib/cjs/src/tenant-options/ITenantOptionDetailParams.d.ts +11 -0
  125. package/lib/cjs/src/tenant-options/TenantOptionsService.d.ts +144 -0
  126. package/lib/cjs/src/tenant-options/index.d.ts +4 -0
  127. package/lib/cjs/src/tenant-security-options/ITenantSecurityOption.d.ts +8 -0
  128. package/lib/cjs/src/tenant-security-options/TenantSecurityOptionsService.d.ts +35 -0
  129. package/lib/cjs/src/tenant-security-options/index.d.ts +3 -0
  130. package/lib/cjs/src/trusted-certificates/ITrustedCertificate.d.ts +68 -0
  131. package/lib/cjs/src/trusted-certificates/TrustedCertificateService.d.ts +146 -0
  132. package/lib/cjs/src/trusted-certificates/index.d.ts +3 -0
  133. package/lib/cjs/src/user/ICurrentUser.d.ts +35 -0
  134. package/lib/cjs/src/user/IResetPassword.d.ts +12 -0
  135. package/lib/cjs/src/user/ITotp.d.ts +7 -0
  136. package/lib/cjs/src/user/ITotpStatus.d.ts +5 -0
  137. package/lib/cjs/src/user/IUser.d.ts +72 -0
  138. package/lib/cjs/src/user/IUserInventoryRole.d.ts +13 -0
  139. package/lib/cjs/src/user/PasswordStrength.d.ts +6 -0
  140. package/lib/cjs/src/user/UserInventoryRoleService.d.ts +101 -0
  141. package/lib/cjs/src/user/UserService.d.ts +364 -0
  142. package/lib/cjs/src/user/index.d.ts +10 -0
  143. package/lib/cjs/src/user-group/IDevicePermissions.d.ts +6 -0
  144. package/lib/cjs/src/user-group/IUserGroup.d.ts +31 -0
  145. package/lib/cjs/src/user-group/UserGroupService.d.ts +208 -0
  146. package/lib/cjs/src/user-group/index.d.ts +4 -0
  147. package/lib/cjs/src/user-role/IRole.d.ts +10 -0
  148. package/lib/cjs/src/user-role/IRoleReference.d.ts +16 -0
  149. package/lib/cjs/src/user-role/UserRoleService.d.ts +52 -0
  150. package/lib/cjs/src/user-role/index.d.ts +4 -0
  151. package/lib/esm2015/index.d.ts +2 -0
  152. package/lib/esm2015/src/Client.d.ts +190 -0
  153. package/lib/esm2015/src/alarm/AlarmService.d.ts +98 -0
  154. package/lib/esm2015/src/alarm/AlarmStatus.d.ts +9 -0
  155. package/lib/esm2015/src/alarm/IAlarm.d.ts +57 -0
  156. package/lib/esm2015/src/alarm/index.d.ts +4 -0
  157. package/lib/esm2015/src/application/ApplicationAvailability.d.ts +6 -0
  158. package/lib/esm2015/src/application/ApplicationBinaryService.d.ts +40 -0
  159. package/lib/esm2015/src/application/ApplicationService.d.ts +325 -0
  160. package/lib/esm2015/src/application/ApplicationType.d.ts +7 -0
  161. package/lib/esm2015/src/application/BillingMode.d.ts +5 -0
  162. package/lib/esm2015/src/application/IApplication.d.ts +22 -0
  163. package/lib/esm2015/src/application/IApplicationBinary.d.ts +9 -0
  164. package/lib/esm2015/src/application/IApplicationInstanceDetails.d.ts +68 -0
  165. package/lib/esm2015/src/application/IApplicationReference.d.ts +16 -0
  166. package/lib/esm2015/src/application/IApplicationVersion.d.ts +15 -0
  167. package/lib/esm2015/src/application/IDeviceRegistrationProvider.d.ts +7 -0
  168. package/lib/esm2015/src/application/IManifest.d.ts +34 -0
  169. package/lib/esm2015/src/application/IProvider.d.ts +6 -0
  170. package/lib/esm2015/src/application/IUploadParamsOverride.d.ts +7 -0
  171. package/lib/esm2015/src/application/Isolation.d.ts +5 -0
  172. package/lib/esm2015/src/application/index.d.ts +16 -0
  173. package/lib/esm2015/src/audit/AuditRecordType.d.ts +19 -0
  174. package/lib/esm2015/src/audit/AuditService.d.ts +72 -0
  175. package/lib/esm2015/src/audit/ChangeType.d.ts +9 -0
  176. package/lib/esm2015/src/audit/IAuditRecord.d.ts +36 -0
  177. package/lib/esm2015/src/audit/IChange.d.ts +28 -0
  178. package/lib/esm2015/src/audit/index.d.ts +6 -0
  179. package/lib/esm2015/src/core/BasicAuth.d.ts +25 -0
  180. package/lib/esm2015/src/core/BearerAuth.d.ts +13 -0
  181. package/lib/esm2015/src/core/CookieAuth.d.ts +19 -0
  182. package/lib/esm2015/src/core/FetchClient.d.ts +18 -0
  183. package/lib/esm2015/src/core/IAuthentication.d.ts +23 -0
  184. package/lib/esm2015/src/core/ICustomProperties.d.ts +8 -0
  185. package/lib/esm2015/src/core/ICustomPropertiesMap.d.ts +5 -0
  186. package/lib/esm2015/src/core/IFetchClient.d.ts +10 -0
  187. package/lib/esm2015/src/core/IFetchOptions.d.ts +21 -0
  188. package/lib/esm2015/src/core/IFetchResponse.d.ts +26 -0
  189. package/lib/esm2015/src/core/IIdentified.d.ts +6 -0
  190. package/lib/esm2015/src/core/IMicroserviceSubscriptions.d.ts +16 -0
  191. package/lib/esm2015/src/core/INamed.d.ts +5 -0
  192. package/lib/esm2015/src/core/IResult.d.ts +26 -0
  193. package/lib/esm2015/src/core/IResultBase.d.ts +6 -0
  194. package/lib/esm2015/src/core/IResultList.d.ts +36 -0
  195. package/lib/esm2015/src/core/ISource.d.ts +18 -0
  196. package/lib/esm2015/src/core/MicroserviceClientRequestAuth.d.ts +32 -0
  197. package/lib/esm2015/src/core/NodeJSCookieAuth.d.ts +11 -0
  198. package/lib/esm2015/src/core/Paging.d.ts +63 -0
  199. package/lib/esm2015/src/core/QueriesUtil.d.ts +95 -0
  200. package/lib/esm2015/src/core/Service.d.ts +45 -0
  201. package/lib/esm2015/src/core/Severity.d.ts +11 -0
  202. package/lib/esm2015/src/core/index.d.ts +23 -0
  203. package/lib/esm2015/src/device-registration/DeviceRegistrationBulkService.d.ts +41 -0
  204. package/lib/esm2015/src/device-registration/DeviceRegistrationSecurityMode.d.ts +9 -0
  205. package/lib/esm2015/src/device-registration/DeviceRegistrationService.d.ts +199 -0
  206. package/lib/esm2015/src/device-registration/DeviceRegistrationStatus.d.ts +10 -0
  207. package/lib/esm2015/src/device-registration/IDeviceCredentials.d.ts +23 -0
  208. package/lib/esm2015/src/device-registration/IDeviceRegistration.d.ts +76 -0
  209. package/lib/esm2015/src/device-registration/IDeviceRegistrationBulkResult.d.ts +27 -0
  210. package/lib/esm2015/src/device-registration/index.d.ts +8 -0
  211. package/lib/esm2015/src/event/EventBinaryService.d.ts +64 -0
  212. package/lib/esm2015/src/event/EventService.d.ts +114 -0
  213. package/lib/esm2015/src/event/IEvent.d.ts +39 -0
  214. package/lib/esm2015/src/event/IEventBinary.d.ts +26 -0
  215. package/lib/esm2015/src/event/index.d.ts +5 -0
  216. package/lib/esm2015/src/gettext.d.ts +3 -0
  217. package/lib/esm2015/src/identity/IExternalIdentity.d.ts +24 -0
  218. package/lib/esm2015/src/identity/IdentityService.d.ts +102 -0
  219. package/lib/esm2015/src/identity/index.d.ts +3 -0
  220. package/lib/esm2015/src/inventory/IManagedObject.d.ts +88 -0
  221. package/lib/esm2015/src/inventory/InventoryBinaryService.d.ts +45 -0
  222. package/lib/esm2015/src/inventory/InventoryService.d.ts +526 -0
  223. package/lib/esm2015/src/inventory/index.d.ts +4 -0
  224. package/lib/esm2015/src/inventory-role/InventoryRoleService.d.ts +105 -0
  225. package/lib/esm2015/src/inventory-role/index.d.ts +2 -0
  226. package/lib/esm2015/src/measurement/IMeasurement.d.ts +58 -0
  227. package/lib/esm2015/src/measurement/ISeries.d.ts +58 -0
  228. package/lib/esm2015/src/measurement/ISeriesFilter.d.ts +38 -0
  229. package/lib/esm2015/src/measurement/MeasurementService.d.ts +121 -0
  230. package/lib/esm2015/src/measurement/MeasurementService.js +1 -1
  231. package/lib/esm2015/src/measurement/MeasurementService.js.map +1 -1
  232. package/lib/esm2015/src/measurement/index.d.ts +5 -0
  233. package/lib/esm2015/src/operation/IOperation.d.ts +24 -0
  234. package/lib/esm2015/src/operation/IOperationBulk.d.ts +55 -0
  235. package/lib/esm2015/src/operation/IOperationBulkProgress.d.ts +27 -0
  236. package/lib/esm2015/src/operation/OperationBulkGeneralStatus.d.ts +14 -0
  237. package/lib/esm2015/src/operation/OperationBulkService.d.ts +124 -0
  238. package/lib/esm2015/src/operation/OperationBulkStatus.d.ts +10 -0
  239. package/lib/esm2015/src/operation/OperationService.d.ts +105 -0
  240. package/lib/esm2015/src/operation/OperationStatus.d.ts +10 -0
  241. package/lib/esm2015/src/operation/index.d.ts +9 -0
  242. package/lib/esm2015/src/public_api.d.ts +25 -0
  243. package/lib/esm2015/src/realtime/MetaChannel.d.ts +7 -0
  244. package/lib/esm2015/src/realtime/Realtime.d.ts +60 -0
  245. package/lib/esm2015/src/realtime/Realtime.js +36 -5
  246. package/lib/esm2015/src/realtime/Realtime.js.map +1 -1
  247. package/lib/esm2015/src/realtime/index.d.ts +2 -0
  248. package/lib/esm2015/src/services.d.ts +24 -0
  249. package/lib/esm2015/src/smart-groups/SmartGroupsService.d.ts +203 -0
  250. package/lib/esm2015/src/smart-groups/index.d.ts +2 -0
  251. package/lib/esm2015/src/smart-rules/IRule.d.ts +20 -0
  252. package/lib/esm2015/src/smart-rules/SmartRulesService.d.ts +87 -0
  253. package/lib/esm2015/src/smart-rules/index.d.ts +3 -0
  254. package/lib/esm2015/src/system-options/ISystemOption.d.ts +19 -0
  255. package/lib/esm2015/src/system-options/SystemOptionsService.d.ts +52 -0
  256. package/lib/esm2015/src/system-options/index.d.ts +3 -0
  257. package/lib/esm2015/src/tenant/ICurrentTenant.d.ts +12 -0
  258. package/lib/esm2015/src/tenant/ITenant.d.ts +23 -0
  259. package/lib/esm2015/src/tenant/ITenantReference.d.ts +5 -0
  260. package/lib/esm2015/src/tenant/ITfaSettings.d.ts +29 -0
  261. package/lib/esm2015/src/tenant/TenantService.d.ts +240 -0
  262. package/lib/esm2015/src/tenant/TenantStatus.d.ts +5 -0
  263. package/lib/esm2015/src/tenant/TfaStrategy.d.ts +10 -0
  264. package/lib/esm2015/src/tenant/index.d.ts +8 -0
  265. package/lib/esm2015/src/tenant-login-options/ITenantLoginOptions.d.ts +152 -0
  266. package/lib/esm2015/src/tenant-login-options/TenantLoginOptionsService.d.ts +170 -0
  267. package/lib/esm2015/src/tenant-login-options/index.d.ts +3 -0
  268. package/lib/esm2015/src/tenant-options/ITenantOption.d.ts +10 -0
  269. package/lib/esm2015/src/tenant-options/ITenantOptionDetailParams.d.ts +11 -0
  270. package/lib/esm2015/src/tenant-options/TenantOptionsService.d.ts +144 -0
  271. package/lib/esm2015/src/tenant-options/index.d.ts +4 -0
  272. package/lib/esm2015/src/tenant-security-options/ITenantSecurityOption.d.ts +8 -0
  273. package/lib/esm2015/src/tenant-security-options/TenantSecurityOptionsService.d.ts +35 -0
  274. package/lib/esm2015/src/tenant-security-options/index.d.ts +3 -0
  275. package/lib/esm2015/src/trusted-certificates/ITrustedCertificate.d.ts +68 -0
  276. package/lib/esm2015/src/trusted-certificates/TrustedCertificateService.d.ts +146 -0
  277. package/lib/esm2015/src/trusted-certificates/index.d.ts +3 -0
  278. package/lib/esm2015/src/user/ICurrentUser.d.ts +35 -0
  279. package/lib/esm2015/src/user/IResetPassword.d.ts +12 -0
  280. package/lib/esm2015/src/user/ITotp.d.ts +7 -0
  281. package/lib/esm2015/src/user/ITotpStatus.d.ts +5 -0
  282. package/lib/esm2015/src/user/IUser.d.ts +72 -0
  283. package/lib/esm2015/src/user/IUserInventoryRole.d.ts +13 -0
  284. package/lib/esm2015/src/user/PasswordStrength.d.ts +6 -0
  285. package/lib/esm2015/src/user/UserInventoryRoleService.d.ts +101 -0
  286. package/lib/esm2015/src/user/UserService.d.ts +364 -0
  287. package/lib/esm2015/src/user/index.d.ts +10 -0
  288. package/lib/esm2015/src/user-group/IDevicePermissions.d.ts +6 -0
  289. package/lib/esm2015/src/user-group/IUserGroup.d.ts +31 -0
  290. package/lib/esm2015/src/user-group/UserGroupService.d.ts +208 -0
  291. package/lib/esm2015/src/user-group/index.d.ts +4 -0
  292. package/lib/esm2015/src/user-role/IRole.d.ts +10 -0
  293. package/lib/esm2015/src/user-role/IRoleReference.d.ts +16 -0
  294. package/lib/esm2015/src/user-role/UserRoleService.d.ts +52 -0
  295. package/lib/esm2015/src/user-role/index.d.ts +4 -0
  296. package/lib/index.d.ts +1 -0
  297. package/lib/src/Client.d.ts +1 -0
  298. package/lib/src/alarm/AlarmService.d.ts +1 -0
  299. package/lib/src/alarm/AlarmStatus.d.ts +1 -0
  300. package/lib/src/alarm/IAlarm.d.ts +1 -0
  301. package/lib/src/alarm/index.d.ts +1 -0
  302. package/lib/src/application/ApplicationAvailability.d.ts +1 -0
  303. package/lib/src/application/ApplicationBinaryService.d.ts +1 -0
  304. package/lib/src/application/ApplicationService.d.ts +1 -0
  305. package/lib/src/application/ApplicationType.d.ts +1 -0
  306. package/lib/src/application/BillingMode.d.ts +1 -0
  307. package/lib/src/application/IApplication.d.ts +1 -0
  308. package/lib/src/application/IApplicationBinary.d.ts +1 -0
  309. package/lib/src/application/IApplicationInstanceDetails.d.ts +1 -0
  310. package/lib/src/application/IApplicationReference.d.ts +1 -0
  311. package/lib/src/application/IApplicationVersion.d.ts +1 -0
  312. package/lib/src/application/IDeviceRegistrationProvider.d.ts +1 -0
  313. package/lib/src/application/IManifest.d.ts +1 -0
  314. package/lib/src/application/IProvider.d.ts +1 -0
  315. package/lib/src/application/IUploadParamsOverride.d.ts +1 -0
  316. package/lib/src/application/Isolation.d.ts +1 -0
  317. package/lib/src/application/index.d.ts +1 -0
  318. package/lib/src/audit/AuditRecordType.d.ts +1 -0
  319. package/lib/src/audit/AuditService.d.ts +1 -0
  320. package/lib/src/audit/ChangeType.d.ts +1 -0
  321. package/lib/src/audit/IAuditRecord.d.ts +1 -0
  322. package/lib/src/audit/IChange.d.ts +1 -0
  323. package/lib/src/audit/index.d.ts +1 -0
  324. package/lib/src/core/BasicAuth.d.ts +1 -0
  325. package/lib/src/core/BearerAuth.d.ts +1 -0
  326. package/lib/src/core/CookieAuth.d.ts +1 -0
  327. package/lib/src/core/FetchClient.d.ts +1 -0
  328. package/lib/src/core/IAuthentication.d.ts +1 -0
  329. package/lib/src/core/ICustomProperties.d.ts +1 -0
  330. package/lib/src/core/ICustomPropertiesMap.d.ts +1 -0
  331. package/lib/src/core/IFetchClient.d.ts +1 -0
  332. package/lib/src/core/IFetchOptions.d.ts +1 -0
  333. package/lib/src/core/IFetchResponse.d.ts +1 -0
  334. package/lib/src/core/IIdentified.d.ts +1 -0
  335. package/lib/src/core/IMicroserviceSubscriptions.d.ts +1 -0
  336. package/lib/src/core/INamed.d.ts +1 -0
  337. package/lib/src/core/IResult.d.ts +1 -0
  338. package/lib/src/core/IResultBase.d.ts +1 -0
  339. package/lib/src/core/IResultList.d.ts +1 -0
  340. package/lib/src/core/ISource.d.ts +1 -0
  341. package/lib/src/core/MicroserviceClientRequestAuth.d.ts +1 -0
  342. package/lib/src/core/NodeJSCookieAuth.d.ts +1 -0
  343. package/lib/src/core/Paging.d.ts +1 -0
  344. package/lib/src/core/QueriesUtil.d.ts +1 -0
  345. package/lib/src/core/Service.d.ts +1 -0
  346. package/lib/src/core/Severity.d.ts +1 -0
  347. package/lib/src/core/index.d.ts +1 -0
  348. package/lib/src/device-registration/DeviceRegistrationBulkService.d.ts +1 -0
  349. package/lib/src/device-registration/DeviceRegistrationSecurityMode.d.ts +1 -0
  350. package/lib/src/device-registration/DeviceRegistrationService.d.ts +1 -0
  351. package/lib/src/device-registration/DeviceRegistrationStatus.d.ts +1 -0
  352. package/lib/src/device-registration/IDeviceCredentials.d.ts +1 -0
  353. package/lib/src/device-registration/IDeviceRegistration.d.ts +1 -0
  354. package/lib/src/device-registration/IDeviceRegistrationBulkResult.d.ts +1 -0
  355. package/lib/src/device-registration/index.d.ts +1 -0
  356. package/lib/src/event/EventBinaryService.d.ts +1 -0
  357. package/lib/src/event/EventService.d.ts +1 -0
  358. package/lib/src/event/IEvent.d.ts +1 -0
  359. package/lib/src/event/IEventBinary.d.ts +1 -0
  360. package/lib/src/event/index.d.ts +1 -0
  361. package/lib/src/gettext.d.ts +1 -0
  362. package/lib/src/identity/IExternalIdentity.d.ts +1 -0
  363. package/lib/src/identity/IdentityService.d.ts +1 -0
  364. package/lib/src/identity/index.d.ts +1 -0
  365. package/lib/src/inventory/IManagedObject.d.ts +1 -0
  366. package/lib/src/inventory/InventoryBinaryService.d.ts +1 -0
  367. package/lib/src/inventory/InventoryService.d.ts +1 -0
  368. package/lib/src/inventory/index.d.ts +1 -0
  369. package/lib/src/inventory-role/InventoryRoleService.d.ts +1 -0
  370. package/lib/src/inventory-role/index.d.ts +1 -0
  371. package/lib/src/measurement/IMeasurement.d.ts +2 -1
  372. package/lib/src/measurement/ISeries.d.ts +1 -0
  373. package/lib/src/measurement/ISeriesFilter.d.ts +1 -0
  374. package/lib/src/measurement/MeasurementService.d.ts +1 -0
  375. package/lib/src/measurement/index.d.ts +1 -0
  376. package/lib/src/operation/IOperation.d.ts +1 -0
  377. package/lib/src/operation/IOperationBulk.d.ts +1 -0
  378. package/lib/src/operation/IOperationBulkProgress.d.ts +1 -0
  379. package/lib/src/operation/OperationBulkGeneralStatus.d.ts +1 -0
  380. package/lib/src/operation/OperationBulkService.d.ts +1 -0
  381. package/lib/src/operation/OperationBulkStatus.d.ts +1 -0
  382. package/lib/src/operation/OperationService.d.ts +1 -0
  383. package/lib/src/operation/OperationStatus.d.ts +1 -0
  384. package/lib/src/operation/index.d.ts +1 -0
  385. package/lib/src/public_api.d.ts +1 -0
  386. package/lib/src/realtime/MetaChannel.d.ts +1 -0
  387. package/lib/src/realtime/Realtime.d.ts +26 -4
  388. package/lib/src/realtime/index.d.ts +1 -0
  389. package/lib/src/services.d.ts +1 -0
  390. package/lib/src/smart-groups/SmartGroupsService.d.ts +1 -0
  391. package/lib/src/smart-groups/index.d.ts +1 -0
  392. package/lib/src/smart-rules/IRule.d.ts +1 -0
  393. package/lib/src/smart-rules/SmartRulesService.d.ts +1 -0
  394. package/lib/src/smart-rules/index.d.ts +1 -0
  395. package/lib/src/system-options/ISystemOption.d.ts +1 -0
  396. package/lib/src/system-options/SystemOptionsService.d.ts +1 -0
  397. package/lib/src/system-options/index.d.ts +1 -0
  398. package/lib/src/tenant/ICurrentTenant.d.ts +1 -0
  399. package/lib/src/tenant/ITenant.d.ts +1 -0
  400. package/lib/src/tenant/ITenantReference.d.ts +1 -0
  401. package/lib/src/tenant/ITfaSettings.d.ts +1 -0
  402. package/lib/src/tenant/TenantService.d.ts +1 -0
  403. package/lib/src/tenant/TenantStatus.d.ts +1 -0
  404. package/lib/src/tenant/TfaStrategy.d.ts +1 -0
  405. package/lib/src/tenant/index.d.ts +1 -0
  406. package/lib/src/tenant-login-options/ITenantLoginOptions.d.ts +1 -0
  407. package/lib/src/tenant-login-options/TenantLoginOptionsService.d.ts +1 -0
  408. package/lib/src/tenant-login-options/index.d.ts +1 -0
  409. package/lib/src/tenant-options/ITenantOption.d.ts +1 -0
  410. package/lib/src/tenant-options/ITenantOptionDetailParams.d.ts +1 -0
  411. package/lib/src/tenant-options/TenantOptionsService.d.ts +1 -0
  412. package/lib/src/tenant-options/index.d.ts +1 -0
  413. package/lib/src/tenant-security-options/ITenantSecurityOption.d.ts +1 -0
  414. package/lib/src/tenant-security-options/TenantSecurityOptionsService.d.ts +1 -0
  415. package/lib/src/tenant-security-options/index.d.ts +1 -0
  416. package/lib/src/trusted-certificates/ITrustedCertificate.d.ts +1 -0
  417. package/lib/src/trusted-certificates/TrustedCertificateService.d.ts +1 -0
  418. package/lib/src/trusted-certificates/index.d.ts +1 -0
  419. package/lib/src/user/ICurrentUser.d.ts +1 -0
  420. package/lib/src/user/IResetPassword.d.ts +1 -0
  421. package/lib/src/user/ITotp.d.ts +1 -0
  422. package/lib/src/user/ITotpStatus.d.ts +1 -0
  423. package/lib/src/user/IUser.d.ts +1 -0
  424. package/lib/src/user/IUserInventoryRole.d.ts +1 -0
  425. package/lib/src/user/PasswordStrength.d.ts +1 -0
  426. package/lib/src/user/UserInventoryRoleService.d.ts +1 -0
  427. package/lib/src/user/UserService.d.ts +1 -0
  428. package/lib/src/user/index.d.ts +1 -0
  429. package/lib/src/user-group/IDevicePermissions.d.ts +1 -0
  430. package/lib/src/user-group/IUserGroup.d.ts +1 -0
  431. package/lib/src/user-group/UserGroupService.d.ts +1 -0
  432. package/lib/src/user-group/index.d.ts +1 -0
  433. package/lib/src/user-role/IRole.d.ts +1 -0
  434. package/lib/src/user-role/IRoleReference.d.ts +1 -0
  435. package/lib/src/user-role/UserRoleService.d.ts +1 -0
  436. package/lib/src/user-role/index.d.ts +1 -0
  437. package/package.json +9 -3
@@ -0,0 +1,60 @@
1
+ import type { CometD, SubscriptionHandle, Listener as CometDListener, Callback as CometDCallback, HandshakeMessage as CometDHandshakeMessage, Message as CometDMessage } from 'cometd';
2
+ import { IFetchClient } from '../core';
3
+ export interface ICometdConfig {
4
+ url: string;
5
+ logLevel?: string;
6
+ requestHeaders?: any;
7
+ appendMessageTypeToURL?: boolean;
8
+ stickyReconnect?: boolean;
9
+ }
10
+ export declare class Realtime {
11
+ private client;
12
+ private url;
13
+ protected cometd: CometD;
14
+ /**
15
+ * Allows to set up a realtime (websocket or long-polling) connection to the platform.
16
+ * @param client The fetch client instance to use
17
+ * @param url The URL to connect to
18
+ * @param handshakeCallback A function which is called on succeeded or failed handshake
19
+ */
20
+ constructor(client: IFetchClient, url?: string, handshakeCallback?: any);
21
+ /**
22
+ * Subscribes to a realtime channel to listen for data.
23
+ * @param channel The channel to connect to
24
+ * @param callback A function to call when data is received
25
+ */
26
+ subscribe(channel: string, callback: CometDCallback): SubscriptionHandle;
27
+ /**
28
+ * Cancels the listening to a channel.
29
+ * @param subscription The subscription object returned by subscribe()
30
+ */
31
+ unsubscribe(subscription: SubscriptionHandle): void;
32
+ /**
33
+ * Allows to listen to Cometd handshake to find out if e.g. the connection was reestablished.
34
+ */
35
+ addHandshakeListener(callback: (msg: CometDHandshakeMessage) => void): SubscriptionHandle;
36
+ /**
37
+ * Allows to listen to Cometd connection to e.g. detect when connection was lost.
38
+ */
39
+ addConnectListener(callback: (msg: CometDMessage) => void): SubscriptionHandle;
40
+ /**
41
+ * Removes the subscription obtained with a call to `addHandshakeListener` or `addConnectListener`.
42
+ */
43
+ removeListener(subscriptionHandle: SubscriptionHandle): void;
44
+ /**
45
+ * Resubscribes as necessary in case of a re-handshake.
46
+ */
47
+ resubscribe(subscriptionHandle: SubscriptionHandle): SubscriptionHandle;
48
+ /**
49
+ * Disconnects the current connection.
50
+ */
51
+ disconnect(disconnectCallback?: CometDListener): void;
52
+ /**
53
+ * Returns true if the CometD instance is disconnected or disconnecting.
54
+ */
55
+ isDisconnected(): boolean;
56
+ private checkConnection;
57
+ private handshake;
58
+ private metaHandshake;
59
+ }
60
+ //# sourceMappingURL=Realtime.d.ts.map
@@ -13,12 +13,13 @@ class Realtime {
13
13
  constructor(client, url = '/notification/realtime', handshakeCallback) {
14
14
  this.client = client;
15
15
  this.url = url;
16
- this.cometd = new isomorphic_cometd_1.CometD();
17
16
  this.metaHandshake = msg => {
18
17
  if (!msg.successful) {
19
18
  throw new Error('Handshake failed');
20
19
  }
21
20
  };
21
+ this.cometd = new isomorphic_cometd_1.CometD({});
22
+ // does not actually seem to be needed/supported? Just keeping to satisfy unit test snapshots
22
23
  this.cometd.websocketEnabled = true;
23
24
  this.cometd.addListener(MetaChannel_1.MetaChannel.HANDSHAKE, handshakeCallback || this.metaHandshake);
24
25
  }
@@ -38,11 +39,41 @@ class Realtime {
38
39
  unsubscribe(subscription) {
39
40
  return this.cometd.unsubscribe(subscription);
40
41
  }
42
+ /**
43
+ * Allows to listen to Cometd handshake to find out if e.g. the connection was reestablished.
44
+ */
45
+ addHandshakeListener(callback) {
46
+ return this.cometd.addListener(MetaChannel_1.MetaChannel.HANDSHAKE, callback);
47
+ }
48
+ /**
49
+ * Allows to listen to Cometd connection to e.g. detect when connection was lost.
50
+ */
51
+ addConnectListener(callback) {
52
+ return this.cometd.addListener(MetaChannel_1.MetaChannel.CONNECT, callback);
53
+ }
54
+ /**
55
+ * Removes the subscription obtained with a call to `addHandshakeListener` or `addConnectListener`.
56
+ */
57
+ removeListener(subscriptionHandle) {
58
+ return this.cometd.removeListener(subscriptionHandle);
59
+ }
60
+ /**
61
+ * Resubscribes as necessary in case of a re-handshake.
62
+ */
63
+ resubscribe(subscriptionHandle) {
64
+ return this.cometd.resubscribe(subscriptionHandle);
65
+ }
41
66
  /**
42
67
  * Disconnects the current connection.
43
68
  */
44
- disconnect() {
45
- this.cometd.disconnect();
69
+ disconnect(disconnectCallback = undefined) {
70
+ this.cometd.disconnect(disconnectCallback);
71
+ }
72
+ /**
73
+ * Returns true if the CometD instance is disconnected or disconnecting.
74
+ */
75
+ isDisconnected() {
76
+ return this.cometd.isDisconnected();
46
77
  }
47
78
  checkConnection() {
48
79
  const { cometd, client, url } = this;
@@ -57,7 +88,7 @@ class Realtime {
57
88
  }
58
89
  }
59
90
  handshake(config) {
60
- this.cometd.handshake(config);
91
+ this.cometd.handshake(config, undefined);
61
92
  }
62
93
  }
63
94
  exports.Realtime = Realtime;
@@ -1 +1 @@
1
- {"version":3,"file":"Realtime.js","sourceRoot":"","sources":["../../../../src/realtime/Realtime.ts"],"names":[],"mappings":";;;AAAA,yDAA2C;AAE3C,+CAA4C;AAU5C,MAAa,QAAQ;IAGnB;;;;;OAKG;IACH,YACU,MAAoB,EACpB,MAAc,wBAAwB,EAC9C,iBAAkB;QAFV,WAAM,GAAN,MAAM,CAAc;QACpB,QAAG,GAAH,GAAG,CAAmC;QAVxC,WAAM,GAAW,IAAI,0BAAM,EAAE,CAAC;QA2D9B,kBAAa,GAAG,GAAG,CAAC,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE;gBACnB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAlDA,IAAI,CAAC,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,yBAAW,CAAC,SAAS,EAAE,iBAAiB,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC;IAC1F,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,OAAe,EAAE,QAA6B;QACtD,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,YAAoB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAEO,eAAe;QACrB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QACrC,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE;YAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG;gBACb,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;gBACvB,cAAc,EAAE,OAAO;aACxB,CAAC;YACF,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC;SAC7C;IACH,CAAC;IAEO,SAAS,CAAC,MAAc;QAC9B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CAOF;AAjED,4BAiEC"}
1
+ {"version":3,"file":"Realtime.js","sourceRoot":"","sources":["../../../../src/realtime/Realtime.ts"],"names":[],"mappings":";;;AAAA,yDAAwD;AAWxD,+CAA4C;AAU5C,MAAa,QAAQ;IAGnB;;;;;OAKG;IACH,YACU,MAAoB,EACpB,MAAc,wBAAwB,EAC9C,iBAAkB;QAFV,WAAM,GAAN,MAAM,CAAc;QACpB,QAAG,GAAH,GAAG,CAAmC;QAsFxC,kBAAa,GAAG,GAAG,CAAC,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE;gBACnB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAvFA,IAAI,CAAC,MAAM,GAAG,IAAI,0BAAS,CAAC,EAAyB,CAAC,CAAC;QACvD,6FAA6F;QAC5F,IAAI,CAAC,MAAc,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,yBAAW,CAAC,SAAS,EAAE,iBAAiB,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC;IAC1F,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,OAAe,EAAE,QAAwB;QACjD,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,YAAgC;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,QAA+C;QAClE,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,yBAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,QAAsC;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,yBAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,kBAAsC;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,kBAAsC;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,qBAAqC,SAAS;QACvD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACtC,CAAC;IAEO,eAAe;QACrB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QACrC,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE;YAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG;gBACb,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;gBACvB,cAAc,EAAE,OAAO;aACxB,CAAC;YACF,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC;SAC7C;IACH,CAAC;IAEO,SAAS,CAAC,MAAc;QAC9B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC;CAOF;AAtGD,4BAsGC"}
@@ -0,0 +1,2 @@
1
+ export * from './Realtime';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,24 @@
1
+ export { FetchClient, BasicAuth } from './core';
2
+ export { EventService, EventBinaryService } from './event';
3
+ export { InventoryService, InventoryBinaryService } from './inventory';
4
+ export { MeasurementService } from './measurement';
5
+ export { AlarmService } from './alarm';
6
+ export { OperationBulkService, OperationService } from './operation';
7
+ export { ApplicationService } from './application';
8
+ export { UserService } from './user';
9
+ export { TenantService } from './tenant';
10
+ export { SystemOptionsService } from './system-options';
11
+ export { TenantOptionsService } from './tenant-options';
12
+ export { TenantSecurityOptionsService } from './tenant-security-options';
13
+ export { TenantLoginOptionsService } from './tenant-login-options';
14
+ export { AuditService } from './audit';
15
+ export { InventoryRoleService } from './inventory-role';
16
+ export { DeviceRegistrationService, DeviceRegistrationBulkService } from './device-registration';
17
+ export { UserRoleService } from './user-role';
18
+ export { UserGroupService } from './user-group';
19
+ export { Realtime } from './realtime';
20
+ export { IdentityService } from './identity';
21
+ export { TrustedCertificateService } from './trusted-certificates';
22
+ export { SmartGroupsService } from './smart-groups';
23
+ export { SmartRulesService } from './smart-rules';
24
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1,203 @@
1
+ import { IFetchClient, IResult } from '../core';
2
+ import { Service } from '../core/Service';
3
+ import { IdReference, IManagedObject } from '../inventory';
4
+ export declare class SmartGroupsService extends Service<IManagedObject> {
5
+ protected baseUrl: string;
6
+ protected listUrl: string;
7
+ private applicationService;
8
+ private readonly SMART_GROUP_TYPE;
9
+ private readonly SMART_GROUP_FRAGMENT_TYPE;
10
+ private readonly DEVICE_GROUP_FRAGMENT_TYPE;
11
+ private readonly DEVICE_GROUP_TYPE;
12
+ private readonly DEVICE_SUBGROUP_TYPE;
13
+ private readonly COLUMNS_CONFIG_FRAGMENT;
14
+ private readonly FILTER_CONFIG_FRAGMENT;
15
+ private readonly QUERY_STRING_FRAGMENT;
16
+ private readonly SMART_GROUPS_V2_MICROSERVICE_APP_NAME;
17
+ private readonly SMART_GROUPS_V2_MICROSERVICE_BASE_PATH;
18
+ private readonly SMART_GROUPS_V2_MICROSERVICE_ENDPOINT_PATH;
19
+ constructor(client: IFetchClient);
20
+ /**
21
+ * Gets the details of managed object
22
+ *
23
+ * @param {IdReference} entityOrId Entity or Id of the ManagedObject.
24
+ * @param {object} filter Filter object.
25
+ *
26
+ * @returns Response wrapped in [[IResult]]
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ *
31
+ * const id: string = '1';
32
+ * const filter: any = { withChildren: false };
33
+ *
34
+ * (async () => {
35
+ * const {data, res} = await smartGroupsService.detail(id, filter);
36
+ * })();
37
+ * ```
38
+ */
39
+ detail(entityOrId: IdReference, filter?: object): Promise<IResult<IManagedObject>>;
40
+ /**
41
+ * Creates a smart group managed object with columns configuration.
42
+ *
43
+ * @param {object} smartGroup Dynamic group managed object.
44
+ * @param {object} deviceQueryString Columns configuration query string to filter the new group.
45
+ * @param {object} configurableColumns Configurable columns definitions.
46
+ * @param {object} filterConfig Columns filter configuration for the new group.
47
+ *
48
+ * @returns Response wrapped in [[IResult]]
49
+ *
50
+ * **Example**
51
+ * ```typescript
52
+ *
53
+ * const smartGroup = { name: 'newName', type: 'c8y_DynamicGroup', c8y_IsDynamicGroup: {} };
54
+ * const deviceQueryString = 'c8y_DeviceQueryString: "$filter=(name eq 'test*') $orderby=c8y_Hardware.model asc';
55
+ * const configurableColumns = [
56
+ * {headerName: 'Status', active: false, key: 'status'},
57
+ * {headerName: 'Name', active: true, key: 'name', filter: { externalFilterQuery: { name: { names: ['test*'] } } }},
58
+ * {headerName: 'Model', active: true, key: 'model'}
59
+ * ];
60
+ *
61
+ * (async () => {
62
+ * await smartGroupsService.create({ smartGroup, deviceQueryString, configurableColumns });
63
+ * })();
64
+ *
65
+ * Note: filterConfig has been removed as a default property to the input object.
66
+ * Now it is part of the configurable columns properties as it is shown above.
67
+ * You can still pass it as an optional parameter.
68
+ * ( const filterConfig = [{ name: { names: ['test*'] } }] )
69
+ * ```
70
+ */
71
+ create(obj: Partial<IManagedObject>): Promise<IResult<IManagedObject>>;
72
+ /**
73
+ * Updates smart group managed object with given id.
74
+ *
75
+ * @param {Partial<IManagedObject>} mo Partial managed object of the smart group.
76
+ * @param {object} filter Filter object.
77
+ *
78
+ * @returns Response wrapped in [[IResult]]
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ *
83
+ * const smartGroup = { id: '1', name: 'newName' };
84
+ *
85
+ * (async () => {
86
+ * await smartGroupsService.update(smartGroup);
87
+ * })();
88
+ * ```
89
+ */
90
+ update(mo: Partial<IManagedObject>, filter?: object): Promise<IResult<IManagedObject>>;
91
+ /**
92
+ * Updates smart group v2 managed object with given id.
93
+ *
94
+ * @param {Partial<IManagedObject>} mo Partial managed object of the smart group v2.
95
+ * @param {object} filter Filter object.
96
+ *
97
+ * @returns Response wrapped in [[IResult]]
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ *
102
+ * const smartGroupV2 = { id: '1', name: 'newName' };
103
+ *
104
+ * (async () => {
105
+ * await smartGroupsService.updateSmartGroupV2(smartGroupV2);
106
+ * })();
107
+ * ```
108
+ */
109
+ updateSmartGroupV2(mo: Partial<IManagedObject>, filter?: object): Promise<IResult<IManagedObject>>;
110
+ /**
111
+ * Removes managed object with given id.
112
+ *
113
+ * @param {IManagedObject} group Managed object of the group.
114
+ * @param {object} params Additional query params.
115
+ *
116
+ * @returns Response wrapped in [[IResult]]
117
+ *
118
+ * @example
119
+ * ```typescript
120
+ *
121
+ * const group = { id: '1' } as IManagedObject;
122
+ * const params: any = {
123
+ * withChildren: false
124
+ * }
125
+ *
126
+ * (async () => {
127
+ * await smartGroupsService.delete(group, params);
128
+ * })();
129
+ * ```
130
+ */
131
+ delete(entityOrId: IdReference, params?: any): Promise<IResult<null>>;
132
+ /**
133
+ * Checks if the smart groups v2 microservice is installed.
134
+ *
135
+ * @returns Response wrapped in [[IResult]]
136
+ *
137
+ * @example
138
+ * ```typescript
139
+ *
140
+ * (async () => {
141
+ * const {data, res} = await smartGroupsService.isSmartGroupsV2MicroserviceInstalled();
142
+ * })();
143
+ * ```
144
+ */
145
+ isSmartGroupsV2MicroserviceInstalled(): Promise<IResult<boolean>>;
146
+ /**
147
+ * Checks whether a given managed object is a smart group
148
+ *
149
+ * @param {IManagedObject} mo Managed object to check.
150
+ *
151
+ * @returns boolean
152
+ *
153
+ * @example
154
+ * ```typescript
155
+ *
156
+ * const mo: IManagedObject = {id: 1, type: "c8y_DeviceGroup", c8y_IsDeviceGroup: {}} as IManagedObject;
157
+ *
158
+ * (() => {
159
+ * const isSmartGroup = smartGroupsService.isSmartGroup(mo);
160
+ * })();
161
+ * ```
162
+ */
163
+ isSmartGroup(mo: Partial<IManagedObject>): boolean;
164
+ /**
165
+ * Checks whether a given managed object is a smart group v2
166
+ *
167
+ * @param {IManagedObject} mo Managed object to check.
168
+ *
169
+ * @returns boolean
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ *
174
+ * const mo: IManagedObject = {id: 1, type: "c8y_DeviceGroup", c8y_IsDeviceGroup: {}} as IManagedObject;
175
+ *
176
+ * (() => {
177
+ * const isSmartGroup = smartGroupsService.isSmartGroupV2(mo);
178
+ * })();
179
+ * ```
180
+ */
181
+ isSmartGroupV2(mo: Partial<IManagedObject>): boolean;
182
+ /**
183
+ * Removes smart group v2 managed object with given id.
184
+ *
185
+ * @param {IdReference} entityOrId entity or Id of the ManagedObject.
186
+ *
187
+ * @returns Response wrapped in [[IResult]]
188
+ *
189
+ * @example
190
+ * ```typescript
191
+ *
192
+ * const id: string = '1';
193
+ *
194
+ * (async () => {
195
+ * await smartGroupsService.removeSmartGroupV2(id);
196
+ * })();
197
+ * ```
198
+ */
199
+ removeSmartGroupV2(entityOrId: IdReference): Promise<IResult<null>>;
200
+ protected getUrl(url?: string): string;
201
+ private createSmartGroupV2;
202
+ }
203
+ //# sourceMappingURL=SmartGroupsService.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './SmartGroupsService';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
1
+ export interface IRule {
2
+ id: number | string;
3
+ cepModuleId?: string;
4
+ c8y_Context?: {
5
+ id?: number | string;
6
+ context?: string;
7
+ };
8
+ name: string;
9
+ body?: string;
10
+ config?: object;
11
+ type?: string;
12
+ enabled: boolean;
13
+ enabledSources?: string[];
14
+ lastUpdated?: string;
15
+ ruleTemplateName: string;
16
+ disabledSources?: string[];
17
+ creationTime?: string;
18
+ _active?: boolean;
19
+ }
20
+ //# sourceMappingURL=IRule.d.ts.map
@@ -0,0 +1,87 @@
1
+ import { IResult } from '../core';
2
+ import { IFetchClient } from '../core/IFetchClient';
3
+ import { Service } from '../core/Service';
4
+ import { IdReference } from '../inventory';
5
+ import { IRule } from './IRule';
6
+ export declare class SmartRulesService extends Service<IRule> {
7
+ private static readonly microserviceName;
8
+ protected readonly baseUrl = "service/smartrule";
9
+ protected readonly listUrl: any;
10
+ private readonly rulesUrl;
11
+ private readonly unupdatableFields;
12
+ private microserviceAvailable;
13
+ private applicationService;
14
+ constructor(client: IFetchClient);
15
+ /**
16
+ * Checks if the smart rules microservice is subscribed and available to user.
17
+ *
18
+ * **Example**
19
+ * ```typescript
20
+ *
21
+ * (async () => {
22
+ * const isAvailable = await smartRulesService.isMicroserviceAvailable();
23
+ * })();
24
+ * ```
25
+ */
26
+ isMicroserviceAvailable(): Promise<boolean>;
27
+ /**
28
+ * Gets a list of smart rules for given managed object.
29
+ *
30
+ * @param {IdReference} entityOrId Entity or Id of the ManagedObject.
31
+ *
32
+ * @returns Response wrapped in [[IResult]]
33
+ *
34
+ * **Example**
35
+ * ```typescript
36
+ *
37
+ * const id: string = '1';
38
+ *
39
+ * (async () => {
40
+ * const {data, res} = await smartRulesService.listByContext(id);
41
+ * })();
42
+ * ```
43
+ */
44
+ listByContext(entityOrId: IdReference): Promise<IResult<IRule[]>>;
45
+ /**
46
+ * Deactivates smart rule for given entities list.
47
+ *
48
+ * @param {Partial<IRule>} rule Smart rule managed object.
49
+ * @param {IdReference[]} entitiesOrIdsList List of entities or Id of the ManagedObjects.
50
+ *
51
+ * @returns Response wrapped in [[IResult]]
52
+ *
53
+ * **Example**
54
+ * ```typescript
55
+ *
56
+ * const rule: IRule = {id: '1', enabledSources: ['2', '3'],...};
57
+ * const entityOrIdList: IdReference[] = ['2'];
58
+ * (async () => {
59
+ * const {data, res} = await smartRulesService.bulkDeactivateEnabledSources(rule, entityOrIdList);
60
+ * })();
61
+ * ```
62
+ */
63
+ bulkDeactivateEnabledSources(rule: Partial<IRule>, entitiesOrIdsList: IdReference[]): Promise<IResult<IRule>>;
64
+ /**
65
+ * Updates smart rule.
66
+ *
67
+ * @param {Parial<IRule>} rule Smart rule managed object.
68
+ *
69
+ * @returns Response wrapped in [[IResult]]
70
+ *
71
+ * **Example**
72
+ * ```typescript
73
+ *
74
+ * const rule: IRule = {id: '1', enabledSources: ['2', '3'],...};
75
+ * (async () => {
76
+ * const {data, res} = await smartRulesService.updateSmartRule(rule);
77
+ * })();
78
+ * ```
79
+ */
80
+ update(rule: Partial<IRule>): Promise<IResult<IRule>>;
81
+ private disableEnabledSources;
82
+ private getListOfStringIds;
83
+ private getSmartRulesUrl;
84
+ private removeUnclonableFields;
85
+ private contextRulesUrl;
86
+ }
87
+ //# sourceMappingURL=SmartRulesService.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './IRule';
2
+ export * from './SmartRulesService';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This interface holds all fragments which describes a
3
+ * system option object.
4
+ */
5
+ export interface ISystemOption {
6
+ /**
7
+ * Category of option
8
+ */
9
+ category: string;
10
+ /**
11
+ * Key of option
12
+ */
13
+ key: string;
14
+ /**
15
+ * Value of option
16
+ */
17
+ value?: string;
18
+ }
19
+ //# sourceMappingURL=ISystemOption.d.ts.map
@@ -0,0 +1,52 @@
1
+ import { Service, IResult, IResultList } from '../core';
2
+ import { ISystemOption } from './ISystemOption';
3
+ export declare class SystemOptionsService extends Service<ISystemOption> {
4
+ protected baseUrl: string;
5
+ protected listUrl: string;
6
+ protected propertyName: string;
7
+ /**
8
+ * Gets the details of given system option.
9
+ *
10
+ * @param {string|number|IIdentified} option System option object with mandantory fragments.
11
+ *
12
+ * @returns Response wrapped in [[IResult]]
13
+ *
14
+ * **Example**
15
+ * ```typescript
16
+ *
17
+ * const option: ISystemOption = {
18
+ * category: 'alarm.type.mapping',
19
+ * key: 'temp_to_high'
20
+ * };
21
+ *
22
+ * (async () => {
23
+ * const {data, res} = await systemOptionsService.detail(option);
24
+ * })();
25
+ * ```
26
+ */
27
+ detail(option: ISystemOption): Promise<IResult<ISystemOption>>;
28
+ /**
29
+ * Gets the list of system options filtered by parameters.
30
+ *
31
+ * @returns Response wrapped in [[IResultList]]
32
+ *
33
+ * @param {object} filter Object containing filters for querying system options.
34
+ *
35
+ * **Example**
36
+ * ```typescript
37
+ *
38
+ * const filter: object = {
39
+ * pageSize: 100,
40
+ * withTotalPages: true
41
+ * };
42
+ *
43
+ * (async () => {
44
+ * const {data, res, paging} = await systemOptionsService.list(filter);
45
+ * })();
46
+ * ```
47
+ */
48
+ list(filter?: object): Promise<IResultList<ISystemOption>>;
49
+ protected getDetailUrl(option: ISystemOption): string;
50
+ protected onBeforeCreate(obj: ISystemOption): any;
51
+ }
52
+ //# sourceMappingURL=SystemOptionsService.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './ISystemOption';
2
+ export * from './SystemOptionsService';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { IApplicationReferences } from '../application';
2
+ import { ICustomPropertiesMap } from '../core';
3
+ export interface ICurrentTenant extends ICustomPropertiesMap {
4
+ name: string;
5
+ domainName: string;
6
+ allowCreateTenants: boolean;
7
+ /**
8
+ * Containing both owned and subscribed applications
9
+ */
10
+ applications?: IApplicationReferences;
11
+ }
12
+ //# sourceMappingURL=ICurrentTenant.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { TenantStatus } from './';
2
+ import { IApplicationReferences } from '../application';
3
+ export interface ITenant {
4
+ id?: string;
5
+ domain?: string;
6
+ status?: TenantStatus;
7
+ company?: string;
8
+ contactName?: string;
9
+ contactPhone?: string;
10
+ applications?: IApplicationReferences;
11
+ ownedApplications?: IApplicationReferences;
12
+ adminName?: string;
13
+ adminPass?: string;
14
+ adminEmail?: string;
15
+ sendPasswordResetEmail?: boolean;
16
+ parent?: string;
17
+ allowCreateTenants?: boolean;
18
+ storageLimitPerDevice?: number;
19
+ creationTime?: string;
20
+ tenantPolicyId?: number | string;
21
+ customProperties?: any;
22
+ }
23
+ //# sourceMappingURL=ITenant.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { ITenant } from './';
2
+ export interface ITenantReference {
3
+ tenant: ITenant;
4
+ }
5
+ //# sourceMappingURL=ITenantReference.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { TfaStrategy } from './TfaStrategy';
2
+ export interface ITfaSettings {
3
+ /**
4
+ * Two-factor authentication is enforced on system level.
5
+ */
6
+ enforcedOnSystemLevel: boolean;
7
+ /**
8
+ * Two-factor authentication is enabled on system level.
9
+ */
10
+ enabledOnSystemLevel: boolean;
11
+ /**
12
+ * Two-factor authentication is enabled on tenant level.
13
+ */
14
+ enabledOnTenantLevel: boolean;
15
+ /**
16
+ * Two-factor authentication is enforced for specific users group.
17
+ */
18
+ enforcedUsersGroup: string;
19
+ /**
20
+ * Represents a strategy used for two-factor authentication.
21
+ * There are two possible TFA strategies: SMS and TOTP. Only one of them can be active at a time.
22
+ */
23
+ strategy: TfaStrategy;
24
+ /**
25
+ * TOTP is enforced on tenant level.
26
+ */
27
+ totpEnforcedOnTenantLevel: boolean;
28
+ }
29
+ //# sourceMappingURL=ITfaSettings.d.ts.map