@c8y/client 1018.487.7 → 1018.497.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICES +1 -1
- package/lib/bundles/client.umd.js +36 -5
- package/lib/bundles/client.umd.js.map +1 -1
- package/lib/bundles/client.umd.min.js +1 -1
- package/lib/bundles/client.umd.min.js.map +1 -1
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/src/Client.d.ts +190 -0
- package/lib/cjs/src/alarm/AlarmService.d.ts +98 -0
- package/lib/cjs/src/alarm/AlarmStatus.d.ts +9 -0
- package/lib/cjs/src/alarm/IAlarm.d.ts +57 -0
- package/lib/cjs/src/alarm/index.d.ts +4 -0
- package/lib/cjs/src/application/ApplicationAvailability.d.ts +6 -0
- package/lib/cjs/src/application/ApplicationBinaryService.d.ts +40 -0
- package/lib/cjs/src/application/ApplicationService.d.ts +325 -0
- package/lib/cjs/src/application/ApplicationType.d.ts +7 -0
- package/lib/cjs/src/application/BillingMode.d.ts +5 -0
- package/lib/cjs/src/application/IApplication.d.ts +22 -0
- package/lib/cjs/src/application/IApplicationBinary.d.ts +9 -0
- package/lib/cjs/src/application/IApplicationInstanceDetails.d.ts +68 -0
- package/lib/cjs/src/application/IApplicationReference.d.ts +16 -0
- package/lib/cjs/src/application/IApplicationVersion.d.ts +15 -0
- package/lib/cjs/src/application/IDeviceRegistrationProvider.d.ts +7 -0
- package/lib/cjs/src/application/IManifest.d.ts +34 -0
- package/lib/cjs/src/application/IProvider.d.ts +6 -0
- package/lib/cjs/src/application/IUploadParamsOverride.d.ts +7 -0
- package/lib/cjs/src/application/Isolation.d.ts +5 -0
- package/lib/cjs/src/application/index.d.ts +16 -0
- package/lib/cjs/src/audit/AuditRecordType.d.ts +19 -0
- package/lib/cjs/src/audit/AuditService.d.ts +72 -0
- package/lib/cjs/src/audit/ChangeType.d.ts +9 -0
- package/lib/cjs/src/audit/IAuditRecord.d.ts +36 -0
- package/lib/cjs/src/audit/IChange.d.ts +28 -0
- package/lib/cjs/src/audit/index.d.ts +6 -0
- package/lib/cjs/src/core/BasicAuth.d.ts +25 -0
- package/lib/cjs/src/core/BearerAuth.d.ts +13 -0
- package/lib/cjs/src/core/CookieAuth.d.ts +19 -0
- package/lib/cjs/src/core/FetchClient.d.ts +18 -0
- package/lib/cjs/src/core/IAuthentication.d.ts +23 -0
- package/lib/cjs/src/core/ICustomProperties.d.ts +8 -0
- package/lib/cjs/src/core/ICustomPropertiesMap.d.ts +5 -0
- package/lib/cjs/src/core/IFetchClient.d.ts +10 -0
- package/lib/cjs/src/core/IFetchOptions.d.ts +21 -0
- package/lib/cjs/src/core/IFetchResponse.d.ts +26 -0
- package/lib/cjs/src/core/IIdentified.d.ts +6 -0
- package/lib/cjs/src/core/IMicroserviceSubscriptions.d.ts +16 -0
- package/lib/cjs/src/core/INamed.d.ts +5 -0
- package/lib/cjs/src/core/IResult.d.ts +26 -0
- package/lib/cjs/src/core/IResultBase.d.ts +6 -0
- package/lib/cjs/src/core/IResultList.d.ts +36 -0
- package/lib/cjs/src/core/ISource.d.ts +18 -0
- package/lib/cjs/src/core/MicroserviceClientRequestAuth.d.ts +32 -0
- package/lib/cjs/src/core/NodeJSCookieAuth.d.ts +11 -0
- package/lib/cjs/src/core/Paging.d.ts +63 -0
- package/lib/cjs/src/core/QueriesUtil.d.ts +95 -0
- package/lib/cjs/src/core/Service.d.ts +45 -0
- package/lib/cjs/src/core/Severity.d.ts +11 -0
- package/lib/cjs/src/core/index.d.ts +23 -0
- package/lib/cjs/src/device-registration/DeviceRegistrationBulkService.d.ts +41 -0
- package/lib/cjs/src/device-registration/DeviceRegistrationSecurityMode.d.ts +9 -0
- package/lib/cjs/src/device-registration/DeviceRegistrationService.d.ts +199 -0
- package/lib/cjs/src/device-registration/DeviceRegistrationStatus.d.ts +10 -0
- package/lib/cjs/src/device-registration/IDeviceCredentials.d.ts +23 -0
- package/lib/cjs/src/device-registration/IDeviceRegistration.d.ts +76 -0
- package/lib/cjs/src/device-registration/IDeviceRegistrationBulkResult.d.ts +27 -0
- package/lib/cjs/src/device-registration/index.d.ts +8 -0
- package/lib/cjs/src/event/EventBinaryService.d.ts +64 -0
- package/lib/cjs/src/event/EventService.d.ts +114 -0
- package/lib/cjs/src/event/IEvent.d.ts +39 -0
- package/lib/cjs/src/event/IEventBinary.d.ts +26 -0
- package/lib/cjs/src/event/index.d.ts +5 -0
- package/lib/cjs/src/gettext.d.ts +3 -0
- package/lib/cjs/src/identity/IExternalIdentity.d.ts +24 -0
- package/lib/cjs/src/identity/IdentityService.d.ts +102 -0
- package/lib/cjs/src/identity/index.d.ts +3 -0
- package/lib/cjs/src/inventory/IManagedObject.d.ts +88 -0
- package/lib/cjs/src/inventory/InventoryBinaryService.d.ts +45 -0
- package/lib/cjs/src/inventory/InventoryService.d.ts +526 -0
- package/lib/cjs/src/inventory/index.d.ts +4 -0
- package/lib/cjs/src/inventory-role/InventoryRoleService.d.ts +105 -0
- package/lib/cjs/src/inventory-role/index.d.ts +2 -0
- package/lib/cjs/src/measurement/IMeasurement.d.ts +58 -0
- package/lib/cjs/src/measurement/ISeries.d.ts +58 -0
- package/lib/cjs/src/measurement/ISeriesFilter.d.ts +38 -0
- package/lib/cjs/src/measurement/MeasurementService.d.ts +121 -0
- package/lib/cjs/src/measurement/MeasurementService.js +1 -1
- package/lib/cjs/src/measurement/MeasurementService.js.map +1 -1
- package/lib/cjs/src/measurement/index.d.ts +5 -0
- package/lib/cjs/src/operation/IOperation.d.ts +24 -0
- package/lib/cjs/src/operation/IOperationBulk.d.ts +55 -0
- package/lib/cjs/src/operation/IOperationBulkProgress.d.ts +27 -0
- package/lib/cjs/src/operation/OperationBulkGeneralStatus.d.ts +14 -0
- package/lib/cjs/src/operation/OperationBulkService.d.ts +124 -0
- package/lib/cjs/src/operation/OperationBulkStatus.d.ts +10 -0
- package/lib/cjs/src/operation/OperationService.d.ts +105 -0
- package/lib/cjs/src/operation/OperationStatus.d.ts +10 -0
- package/lib/cjs/src/operation/index.d.ts +9 -0
- package/lib/cjs/src/public_api.d.ts +25 -0
- package/lib/cjs/src/realtime/MetaChannel.d.ts +7 -0
- package/lib/cjs/src/realtime/Realtime.d.ts +60 -0
- package/lib/cjs/src/realtime/Realtime.js +35 -4
- package/lib/cjs/src/realtime/Realtime.js.map +1 -1
- package/lib/cjs/src/realtime/index.d.ts +2 -0
- package/lib/cjs/src/services.d.ts +24 -0
- package/lib/cjs/src/smart-groups/SmartGroupsService.d.ts +203 -0
- package/lib/cjs/src/smart-groups/index.d.ts +2 -0
- package/lib/cjs/src/smart-rules/IRule.d.ts +20 -0
- package/lib/cjs/src/smart-rules/SmartRulesService.d.ts +87 -0
- package/lib/cjs/src/smart-rules/index.d.ts +3 -0
- package/lib/cjs/src/system-options/ISystemOption.d.ts +19 -0
- package/lib/cjs/src/system-options/SystemOptionsService.d.ts +52 -0
- package/lib/cjs/src/system-options/index.d.ts +3 -0
- package/lib/cjs/src/tenant/ICurrentTenant.d.ts +12 -0
- package/lib/cjs/src/tenant/ITenant.d.ts +23 -0
- package/lib/cjs/src/tenant/ITenantReference.d.ts +5 -0
- package/lib/cjs/src/tenant/ITfaSettings.d.ts +29 -0
- package/lib/cjs/src/tenant/TenantService.d.ts +240 -0
- package/lib/cjs/src/tenant/TenantStatus.d.ts +5 -0
- package/lib/cjs/src/tenant/TfaStrategy.d.ts +10 -0
- package/lib/cjs/src/tenant/index.d.ts +8 -0
- package/lib/cjs/src/tenant-login-options/ITenantLoginOptions.d.ts +152 -0
- package/lib/cjs/src/tenant-login-options/TenantLoginOptionsService.d.ts +170 -0
- package/lib/cjs/src/tenant-login-options/index.d.ts +3 -0
- package/lib/cjs/src/tenant-options/ITenantOption.d.ts +10 -0
- package/lib/cjs/src/tenant-options/ITenantOptionDetailParams.d.ts +11 -0
- package/lib/cjs/src/tenant-options/TenantOptionsService.d.ts +144 -0
- package/lib/cjs/src/tenant-options/index.d.ts +4 -0
- package/lib/cjs/src/tenant-security-options/ITenantSecurityOption.d.ts +8 -0
- package/lib/cjs/src/tenant-security-options/TenantSecurityOptionsService.d.ts +35 -0
- package/lib/cjs/src/tenant-security-options/index.d.ts +3 -0
- package/lib/cjs/src/trusted-certificates/ITrustedCertificate.d.ts +68 -0
- package/lib/cjs/src/trusted-certificates/TrustedCertificateService.d.ts +146 -0
- package/lib/cjs/src/trusted-certificates/index.d.ts +3 -0
- package/lib/cjs/src/user/ICurrentUser.d.ts +35 -0
- package/lib/cjs/src/user/IResetPassword.d.ts +12 -0
- package/lib/cjs/src/user/ITotp.d.ts +7 -0
- package/lib/cjs/src/user/ITotpStatus.d.ts +5 -0
- package/lib/cjs/src/user/IUser.d.ts +72 -0
- package/lib/cjs/src/user/IUserInventoryRole.d.ts +13 -0
- package/lib/cjs/src/user/PasswordStrength.d.ts +6 -0
- package/lib/cjs/src/user/UserInventoryRoleService.d.ts +101 -0
- package/lib/cjs/src/user/UserService.d.ts +364 -0
- package/lib/cjs/src/user/index.d.ts +10 -0
- package/lib/cjs/src/user-group/IDevicePermissions.d.ts +6 -0
- package/lib/cjs/src/user-group/IUserGroup.d.ts +31 -0
- package/lib/cjs/src/user-group/UserGroupService.d.ts +208 -0
- package/lib/cjs/src/user-group/index.d.ts +4 -0
- package/lib/cjs/src/user-role/IRole.d.ts +10 -0
- package/lib/cjs/src/user-role/IRoleReference.d.ts +16 -0
- package/lib/cjs/src/user-role/UserRoleService.d.ts +52 -0
- package/lib/cjs/src/user-role/index.d.ts +4 -0
- package/lib/esm2015/index.d.ts +2 -0
- package/lib/esm2015/src/Client.d.ts +190 -0
- package/lib/esm2015/src/alarm/AlarmService.d.ts +98 -0
- package/lib/esm2015/src/alarm/AlarmStatus.d.ts +9 -0
- package/lib/esm2015/src/alarm/IAlarm.d.ts +57 -0
- package/lib/esm2015/src/alarm/index.d.ts +4 -0
- package/lib/esm2015/src/application/ApplicationAvailability.d.ts +6 -0
- package/lib/esm2015/src/application/ApplicationBinaryService.d.ts +40 -0
- package/lib/esm2015/src/application/ApplicationService.d.ts +325 -0
- package/lib/esm2015/src/application/ApplicationType.d.ts +7 -0
- package/lib/esm2015/src/application/BillingMode.d.ts +5 -0
- package/lib/esm2015/src/application/IApplication.d.ts +22 -0
- package/lib/esm2015/src/application/IApplicationBinary.d.ts +9 -0
- package/lib/esm2015/src/application/IApplicationInstanceDetails.d.ts +68 -0
- package/lib/esm2015/src/application/IApplicationReference.d.ts +16 -0
- package/lib/esm2015/src/application/IApplicationVersion.d.ts +15 -0
- package/lib/esm2015/src/application/IDeviceRegistrationProvider.d.ts +7 -0
- package/lib/esm2015/src/application/IManifest.d.ts +34 -0
- package/lib/esm2015/src/application/IProvider.d.ts +6 -0
- package/lib/esm2015/src/application/IUploadParamsOverride.d.ts +7 -0
- package/lib/esm2015/src/application/Isolation.d.ts +5 -0
- package/lib/esm2015/src/application/index.d.ts +16 -0
- package/lib/esm2015/src/audit/AuditRecordType.d.ts +19 -0
- package/lib/esm2015/src/audit/AuditService.d.ts +72 -0
- package/lib/esm2015/src/audit/ChangeType.d.ts +9 -0
- package/lib/esm2015/src/audit/IAuditRecord.d.ts +36 -0
- package/lib/esm2015/src/audit/IChange.d.ts +28 -0
- package/lib/esm2015/src/audit/index.d.ts +6 -0
- package/lib/esm2015/src/core/BasicAuth.d.ts +25 -0
- package/lib/esm2015/src/core/BearerAuth.d.ts +13 -0
- package/lib/esm2015/src/core/CookieAuth.d.ts +19 -0
- package/lib/esm2015/src/core/FetchClient.d.ts +18 -0
- package/lib/esm2015/src/core/IAuthentication.d.ts +23 -0
- package/lib/esm2015/src/core/ICustomProperties.d.ts +8 -0
- package/lib/esm2015/src/core/ICustomPropertiesMap.d.ts +5 -0
- package/lib/esm2015/src/core/IFetchClient.d.ts +10 -0
- package/lib/esm2015/src/core/IFetchOptions.d.ts +21 -0
- package/lib/esm2015/src/core/IFetchResponse.d.ts +26 -0
- package/lib/esm2015/src/core/IIdentified.d.ts +6 -0
- package/lib/esm2015/src/core/IMicroserviceSubscriptions.d.ts +16 -0
- package/lib/esm2015/src/core/INamed.d.ts +5 -0
- package/lib/esm2015/src/core/IResult.d.ts +26 -0
- package/lib/esm2015/src/core/IResultBase.d.ts +6 -0
- package/lib/esm2015/src/core/IResultList.d.ts +36 -0
- package/lib/esm2015/src/core/ISource.d.ts +18 -0
- package/lib/esm2015/src/core/MicroserviceClientRequestAuth.d.ts +32 -0
- package/lib/esm2015/src/core/NodeJSCookieAuth.d.ts +11 -0
- package/lib/esm2015/src/core/Paging.d.ts +63 -0
- package/lib/esm2015/src/core/QueriesUtil.d.ts +95 -0
- package/lib/esm2015/src/core/Service.d.ts +45 -0
- package/lib/esm2015/src/core/Severity.d.ts +11 -0
- package/lib/esm2015/src/core/index.d.ts +23 -0
- package/lib/esm2015/src/device-registration/DeviceRegistrationBulkService.d.ts +41 -0
- package/lib/esm2015/src/device-registration/DeviceRegistrationSecurityMode.d.ts +9 -0
- package/lib/esm2015/src/device-registration/DeviceRegistrationService.d.ts +199 -0
- package/lib/esm2015/src/device-registration/DeviceRegistrationStatus.d.ts +10 -0
- package/lib/esm2015/src/device-registration/IDeviceCredentials.d.ts +23 -0
- package/lib/esm2015/src/device-registration/IDeviceRegistration.d.ts +76 -0
- package/lib/esm2015/src/device-registration/IDeviceRegistrationBulkResult.d.ts +27 -0
- package/lib/esm2015/src/device-registration/index.d.ts +8 -0
- package/lib/esm2015/src/event/EventBinaryService.d.ts +64 -0
- package/lib/esm2015/src/event/EventService.d.ts +114 -0
- package/lib/esm2015/src/event/IEvent.d.ts +39 -0
- package/lib/esm2015/src/event/IEventBinary.d.ts +26 -0
- package/lib/esm2015/src/event/index.d.ts +5 -0
- package/lib/esm2015/src/gettext.d.ts +3 -0
- package/lib/esm2015/src/identity/IExternalIdentity.d.ts +24 -0
- package/lib/esm2015/src/identity/IdentityService.d.ts +102 -0
- package/lib/esm2015/src/identity/index.d.ts +3 -0
- package/lib/esm2015/src/inventory/IManagedObject.d.ts +88 -0
- package/lib/esm2015/src/inventory/InventoryBinaryService.d.ts +45 -0
- package/lib/esm2015/src/inventory/InventoryService.d.ts +526 -0
- package/lib/esm2015/src/inventory/index.d.ts +4 -0
- package/lib/esm2015/src/inventory-role/InventoryRoleService.d.ts +105 -0
- package/lib/esm2015/src/inventory-role/index.d.ts +2 -0
- package/lib/esm2015/src/measurement/IMeasurement.d.ts +58 -0
- package/lib/esm2015/src/measurement/ISeries.d.ts +58 -0
- package/lib/esm2015/src/measurement/ISeriesFilter.d.ts +38 -0
- package/lib/esm2015/src/measurement/MeasurementService.d.ts +121 -0
- package/lib/esm2015/src/measurement/MeasurementService.js +1 -1
- package/lib/esm2015/src/measurement/MeasurementService.js.map +1 -1
- package/lib/esm2015/src/measurement/index.d.ts +5 -0
- package/lib/esm2015/src/operation/IOperation.d.ts +24 -0
- package/lib/esm2015/src/operation/IOperationBulk.d.ts +55 -0
- package/lib/esm2015/src/operation/IOperationBulkProgress.d.ts +27 -0
- package/lib/esm2015/src/operation/OperationBulkGeneralStatus.d.ts +14 -0
- package/lib/esm2015/src/operation/OperationBulkService.d.ts +124 -0
- package/lib/esm2015/src/operation/OperationBulkStatus.d.ts +10 -0
- package/lib/esm2015/src/operation/OperationService.d.ts +105 -0
- package/lib/esm2015/src/operation/OperationStatus.d.ts +10 -0
- package/lib/esm2015/src/operation/index.d.ts +9 -0
- package/lib/esm2015/src/public_api.d.ts +25 -0
- package/lib/esm2015/src/realtime/MetaChannel.d.ts +7 -0
- package/lib/esm2015/src/realtime/Realtime.d.ts +60 -0
- package/lib/esm2015/src/realtime/Realtime.js +36 -5
- package/lib/esm2015/src/realtime/Realtime.js.map +1 -1
- package/lib/esm2015/src/realtime/index.d.ts +2 -0
- package/lib/esm2015/src/services.d.ts +24 -0
- package/lib/esm2015/src/smart-groups/SmartGroupsService.d.ts +203 -0
- package/lib/esm2015/src/smart-groups/index.d.ts +2 -0
- package/lib/esm2015/src/smart-rules/IRule.d.ts +20 -0
- package/lib/esm2015/src/smart-rules/SmartRulesService.d.ts +87 -0
- package/lib/esm2015/src/smart-rules/index.d.ts +3 -0
- package/lib/esm2015/src/system-options/ISystemOption.d.ts +19 -0
- package/lib/esm2015/src/system-options/SystemOptionsService.d.ts +52 -0
- package/lib/esm2015/src/system-options/index.d.ts +3 -0
- package/lib/esm2015/src/tenant/ICurrentTenant.d.ts +12 -0
- package/lib/esm2015/src/tenant/ITenant.d.ts +23 -0
- package/lib/esm2015/src/tenant/ITenantReference.d.ts +5 -0
- package/lib/esm2015/src/tenant/ITfaSettings.d.ts +29 -0
- package/lib/esm2015/src/tenant/TenantService.d.ts +240 -0
- package/lib/esm2015/src/tenant/TenantStatus.d.ts +5 -0
- package/lib/esm2015/src/tenant/TfaStrategy.d.ts +10 -0
- package/lib/esm2015/src/tenant/index.d.ts +8 -0
- package/lib/esm2015/src/tenant-login-options/ITenantLoginOptions.d.ts +152 -0
- package/lib/esm2015/src/tenant-login-options/TenantLoginOptionsService.d.ts +170 -0
- package/lib/esm2015/src/tenant-login-options/index.d.ts +3 -0
- package/lib/esm2015/src/tenant-options/ITenantOption.d.ts +10 -0
- package/lib/esm2015/src/tenant-options/ITenantOptionDetailParams.d.ts +11 -0
- package/lib/esm2015/src/tenant-options/TenantOptionsService.d.ts +144 -0
- package/lib/esm2015/src/tenant-options/index.d.ts +4 -0
- package/lib/esm2015/src/tenant-security-options/ITenantSecurityOption.d.ts +8 -0
- package/lib/esm2015/src/tenant-security-options/TenantSecurityOptionsService.d.ts +35 -0
- package/lib/esm2015/src/tenant-security-options/index.d.ts +3 -0
- package/lib/esm2015/src/trusted-certificates/ITrustedCertificate.d.ts +68 -0
- package/lib/esm2015/src/trusted-certificates/TrustedCertificateService.d.ts +146 -0
- package/lib/esm2015/src/trusted-certificates/index.d.ts +3 -0
- package/lib/esm2015/src/user/ICurrentUser.d.ts +35 -0
- package/lib/esm2015/src/user/IResetPassword.d.ts +12 -0
- package/lib/esm2015/src/user/ITotp.d.ts +7 -0
- package/lib/esm2015/src/user/ITotpStatus.d.ts +5 -0
- package/lib/esm2015/src/user/IUser.d.ts +72 -0
- package/lib/esm2015/src/user/IUserInventoryRole.d.ts +13 -0
- package/lib/esm2015/src/user/PasswordStrength.d.ts +6 -0
- package/lib/esm2015/src/user/UserInventoryRoleService.d.ts +101 -0
- package/lib/esm2015/src/user/UserService.d.ts +364 -0
- package/lib/esm2015/src/user/index.d.ts +10 -0
- package/lib/esm2015/src/user-group/IDevicePermissions.d.ts +6 -0
- package/lib/esm2015/src/user-group/IUserGroup.d.ts +31 -0
- package/lib/esm2015/src/user-group/UserGroupService.d.ts +208 -0
- package/lib/esm2015/src/user-group/index.d.ts +4 -0
- package/lib/esm2015/src/user-role/IRole.d.ts +10 -0
- package/lib/esm2015/src/user-role/IRoleReference.d.ts +16 -0
- package/lib/esm2015/src/user-role/UserRoleService.d.ts +52 -0
- package/lib/esm2015/src/user-role/index.d.ts +4 -0
- package/lib/index.d.ts +1 -0
- package/lib/src/Client.d.ts +1 -0
- package/lib/src/alarm/AlarmService.d.ts +1 -0
- package/lib/src/alarm/AlarmStatus.d.ts +1 -0
- package/lib/src/alarm/IAlarm.d.ts +1 -0
- package/lib/src/alarm/index.d.ts +1 -0
- package/lib/src/application/ApplicationAvailability.d.ts +1 -0
- package/lib/src/application/ApplicationBinaryService.d.ts +1 -0
- package/lib/src/application/ApplicationService.d.ts +1 -0
- package/lib/src/application/ApplicationType.d.ts +1 -0
- package/lib/src/application/BillingMode.d.ts +1 -0
- package/lib/src/application/IApplication.d.ts +1 -0
- package/lib/src/application/IApplicationBinary.d.ts +1 -0
- package/lib/src/application/IApplicationInstanceDetails.d.ts +1 -0
- package/lib/src/application/IApplicationReference.d.ts +1 -0
- package/lib/src/application/IApplicationVersion.d.ts +1 -0
- package/lib/src/application/IDeviceRegistrationProvider.d.ts +1 -0
- package/lib/src/application/IManifest.d.ts +1 -0
- package/lib/src/application/IProvider.d.ts +1 -0
- package/lib/src/application/IUploadParamsOverride.d.ts +1 -0
- package/lib/src/application/Isolation.d.ts +1 -0
- package/lib/src/application/index.d.ts +1 -0
- package/lib/src/audit/AuditRecordType.d.ts +1 -0
- package/lib/src/audit/AuditService.d.ts +1 -0
- package/lib/src/audit/ChangeType.d.ts +1 -0
- package/lib/src/audit/IAuditRecord.d.ts +1 -0
- package/lib/src/audit/IChange.d.ts +1 -0
- package/lib/src/audit/index.d.ts +1 -0
- package/lib/src/core/BasicAuth.d.ts +1 -0
- package/lib/src/core/BearerAuth.d.ts +1 -0
- package/lib/src/core/CookieAuth.d.ts +1 -0
- package/lib/src/core/FetchClient.d.ts +1 -0
- package/lib/src/core/IAuthentication.d.ts +1 -0
- package/lib/src/core/ICustomProperties.d.ts +1 -0
- package/lib/src/core/ICustomPropertiesMap.d.ts +1 -0
- package/lib/src/core/IFetchClient.d.ts +1 -0
- package/lib/src/core/IFetchOptions.d.ts +1 -0
- package/lib/src/core/IFetchResponse.d.ts +1 -0
- package/lib/src/core/IIdentified.d.ts +1 -0
- package/lib/src/core/IMicroserviceSubscriptions.d.ts +1 -0
- package/lib/src/core/INamed.d.ts +1 -0
- package/lib/src/core/IResult.d.ts +1 -0
- package/lib/src/core/IResultBase.d.ts +1 -0
- package/lib/src/core/IResultList.d.ts +1 -0
- package/lib/src/core/ISource.d.ts +1 -0
- package/lib/src/core/MicroserviceClientRequestAuth.d.ts +1 -0
- package/lib/src/core/NodeJSCookieAuth.d.ts +1 -0
- package/lib/src/core/Paging.d.ts +1 -0
- package/lib/src/core/QueriesUtil.d.ts +1 -0
- package/lib/src/core/Service.d.ts +1 -0
- package/lib/src/core/Severity.d.ts +1 -0
- package/lib/src/core/index.d.ts +1 -0
- package/lib/src/device-registration/DeviceRegistrationBulkService.d.ts +1 -0
- package/lib/src/device-registration/DeviceRegistrationSecurityMode.d.ts +1 -0
- package/lib/src/device-registration/DeviceRegistrationService.d.ts +1 -0
- package/lib/src/device-registration/DeviceRegistrationStatus.d.ts +1 -0
- package/lib/src/device-registration/IDeviceCredentials.d.ts +1 -0
- package/lib/src/device-registration/IDeviceRegistration.d.ts +1 -0
- package/lib/src/device-registration/IDeviceRegistrationBulkResult.d.ts +1 -0
- package/lib/src/device-registration/index.d.ts +1 -0
- package/lib/src/event/EventBinaryService.d.ts +1 -0
- package/lib/src/event/EventService.d.ts +1 -0
- package/lib/src/event/IEvent.d.ts +1 -0
- package/lib/src/event/IEventBinary.d.ts +1 -0
- package/lib/src/event/index.d.ts +1 -0
- package/lib/src/gettext.d.ts +1 -0
- package/lib/src/identity/IExternalIdentity.d.ts +1 -0
- package/lib/src/identity/IdentityService.d.ts +1 -0
- package/lib/src/identity/index.d.ts +1 -0
- package/lib/src/inventory/IManagedObject.d.ts +1 -0
- package/lib/src/inventory/InventoryBinaryService.d.ts +1 -0
- package/lib/src/inventory/InventoryService.d.ts +1 -0
- package/lib/src/inventory/index.d.ts +1 -0
- package/lib/src/inventory-role/InventoryRoleService.d.ts +1 -0
- package/lib/src/inventory-role/index.d.ts +1 -0
- package/lib/src/measurement/IMeasurement.d.ts +2 -1
- package/lib/src/measurement/ISeries.d.ts +1 -0
- package/lib/src/measurement/ISeriesFilter.d.ts +1 -0
- package/lib/src/measurement/MeasurementService.d.ts +1 -0
- package/lib/src/measurement/index.d.ts +1 -0
- package/lib/src/operation/IOperation.d.ts +1 -0
- package/lib/src/operation/IOperationBulk.d.ts +1 -0
- package/lib/src/operation/IOperationBulkProgress.d.ts +1 -0
- package/lib/src/operation/OperationBulkGeneralStatus.d.ts +1 -0
- package/lib/src/operation/OperationBulkService.d.ts +1 -0
- package/lib/src/operation/OperationBulkStatus.d.ts +1 -0
- package/lib/src/operation/OperationService.d.ts +1 -0
- package/lib/src/operation/OperationStatus.d.ts +1 -0
- package/lib/src/operation/index.d.ts +1 -0
- package/lib/src/public_api.d.ts +1 -0
- package/lib/src/realtime/MetaChannel.d.ts +1 -0
- package/lib/src/realtime/Realtime.d.ts +26 -4
- package/lib/src/realtime/index.d.ts +1 -0
- package/lib/src/services.d.ts +1 -0
- package/lib/src/smart-groups/SmartGroupsService.d.ts +1 -0
- package/lib/src/smart-groups/index.d.ts +1 -0
- package/lib/src/smart-rules/IRule.d.ts +1 -0
- package/lib/src/smart-rules/SmartRulesService.d.ts +1 -0
- package/lib/src/smart-rules/index.d.ts +1 -0
- package/lib/src/system-options/ISystemOption.d.ts +1 -0
- package/lib/src/system-options/SystemOptionsService.d.ts +1 -0
- package/lib/src/system-options/index.d.ts +1 -0
- package/lib/src/tenant/ICurrentTenant.d.ts +1 -0
- package/lib/src/tenant/ITenant.d.ts +1 -0
- package/lib/src/tenant/ITenantReference.d.ts +1 -0
- package/lib/src/tenant/ITfaSettings.d.ts +1 -0
- package/lib/src/tenant/TenantService.d.ts +1 -0
- package/lib/src/tenant/TenantStatus.d.ts +1 -0
- package/lib/src/tenant/TfaStrategy.d.ts +1 -0
- package/lib/src/tenant/index.d.ts +1 -0
- package/lib/src/tenant-login-options/ITenantLoginOptions.d.ts +1 -0
- package/lib/src/tenant-login-options/TenantLoginOptionsService.d.ts +1 -0
- package/lib/src/tenant-login-options/index.d.ts +1 -0
- package/lib/src/tenant-options/ITenantOption.d.ts +1 -0
- package/lib/src/tenant-options/ITenantOptionDetailParams.d.ts +1 -0
- package/lib/src/tenant-options/TenantOptionsService.d.ts +1 -0
- package/lib/src/tenant-options/index.d.ts +1 -0
- package/lib/src/tenant-security-options/ITenantSecurityOption.d.ts +1 -0
- package/lib/src/tenant-security-options/TenantSecurityOptionsService.d.ts +1 -0
- package/lib/src/tenant-security-options/index.d.ts +1 -0
- package/lib/src/trusted-certificates/ITrustedCertificate.d.ts +1 -0
- package/lib/src/trusted-certificates/TrustedCertificateService.d.ts +1 -0
- package/lib/src/trusted-certificates/index.d.ts +1 -0
- package/lib/src/user/ICurrentUser.d.ts +1 -0
- package/lib/src/user/IResetPassword.d.ts +1 -0
- package/lib/src/user/ITotp.d.ts +1 -0
- package/lib/src/user/ITotpStatus.d.ts +1 -0
- package/lib/src/user/IUser.d.ts +1 -0
- package/lib/src/user/IUserInventoryRole.d.ts +1 -0
- package/lib/src/user/PasswordStrength.d.ts +1 -0
- package/lib/src/user/UserInventoryRoleService.d.ts +1 -0
- package/lib/src/user/UserService.d.ts +1 -0
- package/lib/src/user/index.d.ts +1 -0
- package/lib/src/user-group/IDevicePermissions.d.ts +1 -0
- package/lib/src/user-group/IUserGroup.d.ts +1 -0
- package/lib/src/user-group/UserGroupService.d.ts +1 -0
- package/lib/src/user-group/index.d.ts +1 -0
- package/lib/src/user-role/IRole.d.ts +1 -0
- package/lib/src/user-role/IRoleReference.d.ts +1 -0
- package/lib/src/user-role/UserRoleService.d.ts +1 -0
- package/lib/src/user-role/index.d.ts +1 -0
- package/package.json +9 -3
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { IIdentified, Service, IResult } from '../core';
|
|
2
|
+
import { IUser } from './IUser';
|
|
3
|
+
import { ICurrentUser } from './ICurrentUser';
|
|
4
|
+
import { UserInventoryRoleService } from './UserInventoryRoleService';
|
|
5
|
+
import { IResetPassword } from './IResetPassword';
|
|
6
|
+
import { ITotp } from './ITotp';
|
|
7
|
+
import { ITotpStatus } from './ITotpStatus';
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* This service allows for managing users.
|
|
11
|
+
*/
|
|
12
|
+
export declare class UserService extends Service<IUser> {
|
|
13
|
+
protected get listUrl(): string;
|
|
14
|
+
protected baseUrl: string;
|
|
15
|
+
protected currentUserUrl: string;
|
|
16
|
+
protected passwordResetUrl: string;
|
|
17
|
+
protected currentUserPhoneUrl: string;
|
|
18
|
+
protected verifyTFACodeUrl: string;
|
|
19
|
+
protected totpCurrentUserURL: string;
|
|
20
|
+
protected verifyTOTPCodeUrl: string;
|
|
21
|
+
protected activateTOTPCodeUrl: string;
|
|
22
|
+
protected revokeTOTPSecretUrl: string;
|
|
23
|
+
protected get newsletterEmailsUrl(): string;
|
|
24
|
+
protected get currentUserPasswordUrl(): string;
|
|
25
|
+
protected get revokeAllTokensUrl(): string;
|
|
26
|
+
protected propertyName: string;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the details of given user.
|
|
29
|
+
*
|
|
30
|
+
* @param {string | number | IUser} entityOrId User's id or user object.
|
|
31
|
+
*
|
|
32
|
+
* @returns Returns promise object that is resolved with the IUser wrapped by IResult.
|
|
33
|
+
*
|
|
34
|
+
* **Example**
|
|
35
|
+
* ```typescript
|
|
36
|
+
*
|
|
37
|
+
* const userId: number = 1;
|
|
38
|
+
*
|
|
39
|
+
* (async () => {
|
|
40
|
+
* const {data, res} = await userService.detail(userId);
|
|
41
|
+
* })();
|
|
42
|
+
* ```
|
|
43
|
+
* User password is never returned in GET response. Authentication mechanism is provided by another interface.
|
|
44
|
+
*/
|
|
45
|
+
detail(entityOrId: string | number | IUser): Promise<IResult<IUser>>;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a new user.
|
|
48
|
+
*
|
|
49
|
+
* @param {IUser} entity User object.
|
|
50
|
+
*
|
|
51
|
+
* @returns {IResult<IUser>} Returns promise object that is resolved with the details of newly created user.
|
|
52
|
+
*
|
|
53
|
+
* **Example**
|
|
54
|
+
* ```typescript
|
|
55
|
+
*
|
|
56
|
+
* const userObject: IUser = {
|
|
57
|
+
* userName: "newUser",
|
|
58
|
+
* password: "userPassword12!@"
|
|
59
|
+
* };
|
|
60
|
+
*
|
|
61
|
+
* (async () => {
|
|
62
|
+
* const {data, res} = await userService.create(userObject);
|
|
63
|
+
* })();
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
create(entity: IUser): Promise<IResult<IUser>>;
|
|
67
|
+
/**
|
|
68
|
+
* Updates user data.
|
|
69
|
+
*
|
|
70
|
+
* @param {Partial<IUser>} entity User is partially updatable.
|
|
71
|
+
*
|
|
72
|
+
* @returns {IResult<IUserGroup>} Returns promise object that is resolved with the saved user object.
|
|
73
|
+
*
|
|
74
|
+
* **Example**
|
|
75
|
+
* ```typescript
|
|
76
|
+
*
|
|
77
|
+
* const partialUpdateObject: Partial<IUser> = {
|
|
78
|
+
* "id" : "myuser",
|
|
79
|
+
* "userName" : "newUserName",
|
|
80
|
+
* "email": "newUserEmail@example.com"
|
|
81
|
+
* ...
|
|
82
|
+
* }
|
|
83
|
+
*
|
|
84
|
+
* (async () => {
|
|
85
|
+
* const {data, res} = await userService.update(partialUpdateObject);
|
|
86
|
+
* })();
|
|
87
|
+
* ```
|
|
88
|
+
* When user is updated with changed permissions or groups, suitable audit record is created with type
|
|
89
|
+
* 'User' and activity 'User updated'.
|
|
90
|
+
*/
|
|
91
|
+
update(entity: Partial<IUser>): Promise<IResult<IUser>>;
|
|
92
|
+
/**
|
|
93
|
+
* Gets the list of users filtered by parameters.
|
|
94
|
+
*
|
|
95
|
+
* @param {object} filter Object containing filters for querying users.
|
|
96
|
+
*
|
|
97
|
+
* @returns Returns promise object that is resolved with the IUser wrapped by IResultList.
|
|
98
|
+
*
|
|
99
|
+
* **Example**
|
|
100
|
+
* ```typescript
|
|
101
|
+
*
|
|
102
|
+
* const filter: object = {
|
|
103
|
+
* pageSize: 100,
|
|
104
|
+
* withTotalPages: true
|
|
105
|
+
* };
|
|
106
|
+
*
|
|
107
|
+
* (async () => {
|
|
108
|
+
* const {data, res, paging} = await userService.list(filter);
|
|
109
|
+
* })();
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
list(filter?: object): Promise<import("../core").IResultList<IUser>>;
|
|
113
|
+
/**
|
|
114
|
+
* Removes user.
|
|
115
|
+
*
|
|
116
|
+
* @param {number|IIdentified} entityOrId User's id or user object.
|
|
117
|
+
*
|
|
118
|
+
* @returns Returns promise object that is resolved with the IResult of null.
|
|
119
|
+
*
|
|
120
|
+
* **Example**
|
|
121
|
+
* ```typescript
|
|
122
|
+
*
|
|
123
|
+
* const userId: string = "uniqueUserId";
|
|
124
|
+
*
|
|
125
|
+
* (async () => {
|
|
126
|
+
* const {data, res} = await userService.delete(userGroupId);
|
|
127
|
+
* })();
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
delete(entityOrId: string | number | IIdentified): Promise<IResult<null>>;
|
|
131
|
+
/**
|
|
132
|
+
* Create instance of User Inventory Role Service related with given User.
|
|
133
|
+
*
|
|
134
|
+
* @param {string|number|IUser} entityOrId User's id or user object.
|
|
135
|
+
*
|
|
136
|
+
* @returns Returns UserInventoryRoleService object that is related with given User.
|
|
137
|
+
*
|
|
138
|
+
* **Example**
|
|
139
|
+
* ```typescript
|
|
140
|
+
*
|
|
141
|
+
* const userId: string = "uniqueUserId";
|
|
142
|
+
*
|
|
143
|
+
* const userInventoryRoleService = userService.inventoryAssignment(userGroupId);
|
|
144
|
+
* (async () => {
|
|
145
|
+
* const {data, res} = await userInventoryRoleService.create(...);
|
|
146
|
+
* })();
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
inventoryAssignment(entityOrId: string | number | IUser): UserInventoryRoleService;
|
|
150
|
+
/**
|
|
151
|
+
* Gets user that is currently logged in.
|
|
152
|
+
*
|
|
153
|
+
* @returns Returns promise object that is resolved with the IUser wrapped by IResult.
|
|
154
|
+
*
|
|
155
|
+
* **Example**
|
|
156
|
+
* ```typescript
|
|
157
|
+
*
|
|
158
|
+
* (async () => {
|
|
159
|
+
* const {data, res} = await userService.current();
|
|
160
|
+
* })();
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
current(): Promise<IResult<IUser>>;
|
|
164
|
+
/**
|
|
165
|
+
* Gets user that is currently logged in with the list of all roles assigned.
|
|
166
|
+
*
|
|
167
|
+
* @returns Returns promise object that is resolved with the ICurrenUser wrapped by IResult.
|
|
168
|
+
*
|
|
169
|
+
* **Example**
|
|
170
|
+
* ```typescript
|
|
171
|
+
*
|
|
172
|
+
* (async () => {
|
|
173
|
+
* const {data, res} = await userService.currentWithEffectiveRoles();
|
|
174
|
+
* })();
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
currentWithEffectiveRoles(): Promise<IResult<ICurrentUser>>;
|
|
178
|
+
/**
|
|
179
|
+
* Updates the current user
|
|
180
|
+
*
|
|
181
|
+
* @param {IUser} user The user object with the properties to be updated
|
|
182
|
+
*
|
|
183
|
+
* @return Returns promise object resolved with the IUser wrapped by IResult
|
|
184
|
+
*/
|
|
185
|
+
updateCurrent(user: IUser): Promise<IResult<IUser>>;
|
|
186
|
+
/**
|
|
187
|
+
* Sends an email message with a link allowing user to reset their password.
|
|
188
|
+
*
|
|
189
|
+
* @param {string} email The email address to send the message to.
|
|
190
|
+
* @param {string} tenantId The id of user's tenant (if cannot be inferred from URL).
|
|
191
|
+
*
|
|
192
|
+
* @returns Returns a request result object.
|
|
193
|
+
*
|
|
194
|
+
* **Example**
|
|
195
|
+
* ```typescript
|
|
196
|
+
* const email = 'user@example.com';
|
|
197
|
+
* const tenantId = 't123456';
|
|
198
|
+
*
|
|
199
|
+
* (async () => {
|
|
200
|
+
* const { res, data } = await userService.sendPasswordResetMail(email, tenantId);
|
|
201
|
+
* })();
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
sendPasswordResetMail(email: string, tenantId?: string): Promise<IResult<null>>;
|
|
205
|
+
/**
|
|
206
|
+
* Resets user's password to a new one.
|
|
207
|
+
*
|
|
208
|
+
* @param {IResetPassword} newPassword Object with token, user's email, new password and its strength indicator.
|
|
209
|
+
* @param {string} tenantId The id of user's tenant (if cannot be inferred from URL).
|
|
210
|
+
*
|
|
211
|
+
* @returns Returns a request result object.
|
|
212
|
+
*
|
|
213
|
+
* **Example**
|
|
214
|
+
* ```typescript
|
|
215
|
+
* const newPassword: IResetPassword = {
|
|
216
|
+
* token: '123123ASDAWERER@#!WEDS$@#!WADA#A#EA#EA#EA',
|
|
217
|
+
* email: 'user@example.com',
|
|
218
|
+
* newPassword: 'myNewPassword',
|
|
219
|
+
* passwordStrength: PasswordStrength.GREEN
|
|
220
|
+
* };
|
|
221
|
+
* const tenantId = 't123456';
|
|
222
|
+
*
|
|
223
|
+
* (async () => {
|
|
224
|
+
* const { res, data } = await userService.resetPassword(newPassword, tenantId);
|
|
225
|
+
* })();
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
resetPassword(newPassword: IResetPassword, tenantId?: string): Promise<IResult<null>>;
|
|
229
|
+
/**
|
|
230
|
+
* Verifies TFA code which is sent via SMS. If invoked with string '0', new TFA code will be sent.
|
|
231
|
+
*
|
|
232
|
+
* @param {string} pin The code to verify.
|
|
233
|
+
*
|
|
234
|
+
* @returns Returns a status object.
|
|
235
|
+
*
|
|
236
|
+
* **Example**
|
|
237
|
+
* ```typescript
|
|
238
|
+
*
|
|
239
|
+
* (async () => {
|
|
240
|
+
* const {data, res} = await userService.verifyTFACode('123123');
|
|
241
|
+
* })();
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
verifyTFACode(pin: string): Promise<IResult<null>>;
|
|
245
|
+
/**
|
|
246
|
+
* Verifies TFA code which is generated by a TOTP app.
|
|
247
|
+
*
|
|
248
|
+
* @param {string} code The code to verify.
|
|
249
|
+
*
|
|
250
|
+
* @returns Returns a status object.
|
|
251
|
+
*
|
|
252
|
+
* **Example**
|
|
253
|
+
* ```typescript
|
|
254
|
+
*
|
|
255
|
+
* (async () => {
|
|
256
|
+
* const {data, res} = await userService.verifyTotpCode('123123');
|
|
257
|
+
* })();
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
260
|
+
verifyTotpCode(code: any): Promise<IResult<null>>;
|
|
261
|
+
/**
|
|
262
|
+
* Verifies TFA code which is generated by a TOTP app.
|
|
263
|
+
*
|
|
264
|
+
* @returns Returns a status object.
|
|
265
|
+
*
|
|
266
|
+
* **Example**
|
|
267
|
+
* ```typescript
|
|
268
|
+
*
|
|
269
|
+
* (async () => {
|
|
270
|
+
* const {data, res} = await userService.activateTotp();
|
|
271
|
+
* })();
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
activateTotp(): Promise<IResult<null>>;
|
|
275
|
+
/**
|
|
276
|
+
* Checks if TOTP is activated and enforced.
|
|
277
|
+
*
|
|
278
|
+
* @returns Returns an object of ITotpStatus if it is active.
|
|
279
|
+
*
|
|
280
|
+
* **Example**
|
|
281
|
+
* ```typescript
|
|
282
|
+
*
|
|
283
|
+
* (async () => {
|
|
284
|
+
* const {data, res} = await userService.getActivityTotp();
|
|
285
|
+
* console.log(data.isActive);
|
|
286
|
+
* })();
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
getActivityTotp(): Promise<IResult<ITotpStatus>>;
|
|
290
|
+
/**
|
|
291
|
+
* Generates a secret which can be used to setup two-factor authentication with TOTP.
|
|
292
|
+
*
|
|
293
|
+
* @returns Returns the secret and an URL to a QR Code.
|
|
294
|
+
*
|
|
295
|
+
* **Example**
|
|
296
|
+
* ```typescript
|
|
297
|
+
*
|
|
298
|
+
* (async () => {
|
|
299
|
+
* const {data, res} = await userService.generateTotpSecret();
|
|
300
|
+
* console.log(secret);
|
|
301
|
+
* })();
|
|
302
|
+
* ```
|
|
303
|
+
*/
|
|
304
|
+
generateTotpSecret(): Promise<IResult<ITotp>>;
|
|
305
|
+
/**
|
|
306
|
+
* Revokes a specific user's TOTP secret.
|
|
307
|
+
*
|
|
308
|
+
* @param {IUser} user User whose TOTP secret to revoke.
|
|
309
|
+
*
|
|
310
|
+
* @returns Status object
|
|
311
|
+
*/
|
|
312
|
+
totpRevokeSecret(user: IUser): Promise<IResult<null>>;
|
|
313
|
+
/**
|
|
314
|
+
* Saves phone number for the current user.
|
|
315
|
+
* @param phoneNumber Phone number to save.
|
|
316
|
+
* @returns Server response and data with updated current user object.
|
|
317
|
+
*/
|
|
318
|
+
savePhoneNumber(phoneNumber: string): Promise<IResult<ICurrentUser>>;
|
|
319
|
+
/**
|
|
320
|
+
* Gets the list of emails of users subscribed for newsletter
|
|
321
|
+
* on the current tenant and its subtenants.
|
|
322
|
+
* @returns Server response and data with email addresses as plain text.
|
|
323
|
+
*/
|
|
324
|
+
getNewsletterEmails(): Promise<IResult<string>>;
|
|
325
|
+
/**
|
|
326
|
+
* Changes password for user.
|
|
327
|
+
*
|
|
328
|
+
* @param {string | number | IUser} entityOrId User's id or user object.
|
|
329
|
+
* @param {string} newPassword New user password.
|
|
330
|
+
* @param {string} currentUserPassword The password of the currently logged user.
|
|
331
|
+
*
|
|
332
|
+
* @returns Returns a result object.
|
|
333
|
+
*/
|
|
334
|
+
changeUserPassword(entityOrId: string | number | IUser, newPassword: string, currentUserPassword: string): Promise<IResult<null>>;
|
|
335
|
+
/**
|
|
336
|
+
* Changes password for current user.
|
|
337
|
+
*
|
|
338
|
+
* @param {string} newPassword New password for current user.
|
|
339
|
+
* @param {string} currentUserPassword The password of the currently logged user.
|
|
340
|
+
*
|
|
341
|
+
* @returns Returns a result object. During this action if preferred login mode is OAI_SECURE new jwt cookie will be set.
|
|
342
|
+
*/
|
|
343
|
+
changeCurrentUserPassword(newPassword: string, currentUserPassword: string): Promise<IResult<null>>;
|
|
344
|
+
/**
|
|
345
|
+
* Revoke tokens for all users. All users logged with "OAI-Secure" or "Single sign-on redirect" will be logged out.
|
|
346
|
+
*
|
|
347
|
+
* @returns Returns a result object.
|
|
348
|
+
*/
|
|
349
|
+
revokeTokens(): Promise<IResult<null>>;
|
|
350
|
+
hasRole(user: IUser, roleId: string): boolean;
|
|
351
|
+
hasAllRoles(user: IUser, roleIds: string[]): boolean;
|
|
352
|
+
hasAnyRole(user: IUser, roleIds: string[]): boolean;
|
|
353
|
+
hasAnyGlobalRole(user: IUser, globalRoleIds: number[]): boolean;
|
|
354
|
+
isDeviceUser(user: IUser): RegExpMatchArray;
|
|
355
|
+
protected onBeforeUpdate(user: IUser): any;
|
|
356
|
+
protected getDetailUrl(entityOrId: string | number | IUser): string;
|
|
357
|
+
protected getId(entityOrId: string | number | IUser): string;
|
|
358
|
+
protected hasRoleInUser(user: any, roleId: any): any;
|
|
359
|
+
protected hasRoleInGroups(user: any, roleId: any): any;
|
|
360
|
+
protected hasRoleInReferences(references: any, roleId: any): any;
|
|
361
|
+
protected changeUserPasswordUrl(entityOrId: string | number | IUser): string;
|
|
362
|
+
protected hasGlobalRoleInUser(user: IUser, globalRoleId: number): any;
|
|
363
|
+
}
|
|
364
|
+
//# sourceMappingURL=UserService.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './IUser';
|
|
2
|
+
export * from './ICurrentUser';
|
|
3
|
+
export * from './IUserInventoryRole';
|
|
4
|
+
export * from './ITotp';
|
|
5
|
+
export * from './ITotpStatus';
|
|
6
|
+
export * from './UserService';
|
|
7
|
+
export * from './UserInventoryRoleService';
|
|
8
|
+
export * from './IResetPassword';
|
|
9
|
+
export * from './PasswordStrength';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ICustomProperties } from '../core';
|
|
2
|
+
import { IRoleReferences } from '../user-role';
|
|
3
|
+
import { IUserReferences } from '../user';
|
|
4
|
+
import { IApplication } from '../application';
|
|
5
|
+
import { IDevicePermissions } from './IDevicePermissions';
|
|
6
|
+
/** Description of IUserGroup interface */
|
|
7
|
+
export interface IUserGroup {
|
|
8
|
+
/** Uniquely identifies a User Group */
|
|
9
|
+
id?: number;
|
|
10
|
+
/** Descriptive Name of the Group */
|
|
11
|
+
name?: string;
|
|
12
|
+
/** Description of the Group */
|
|
13
|
+
description?: string;
|
|
14
|
+
/** Object contains all role references assigned to group */
|
|
15
|
+
roles?: IRoleReferences;
|
|
16
|
+
/** List of device permissions */
|
|
17
|
+
devicePermissions?: IDevicePermissions;
|
|
18
|
+
/** List of applications */
|
|
19
|
+
applications?: IApplication[];
|
|
20
|
+
/** List of custom properties */
|
|
21
|
+
customProperties?: ICustomProperties;
|
|
22
|
+
/** Link to this Resource */
|
|
23
|
+
self: string;
|
|
24
|
+
/** Object contains all user assigned to group */
|
|
25
|
+
users?: IUserReferences;
|
|
26
|
+
/**
|
|
27
|
+
* Other custom keys
|
|
28
|
+
*/
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=IUserGroup.d.ts.map
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { Service, IIdentified, IResult, ISource, IResultList } from '../core';
|
|
2
|
+
import { IUserGroup } from './IUserGroup';
|
|
3
|
+
import { IRoleReference } from '../user-role';
|
|
4
|
+
import { IUserReference } from '../user';
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
* This service allows for managing user groups.
|
|
8
|
+
*/
|
|
9
|
+
export declare class UserGroupService extends Service<IUserGroup> {
|
|
10
|
+
protected baseUrl: string;
|
|
11
|
+
protected propertyName: string;
|
|
12
|
+
protected get listUrl(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Gets the details of given user group.
|
|
15
|
+
*
|
|
16
|
+
* @param {string|number|IUserGroup} entityOrId Group's id or role object.
|
|
17
|
+
*
|
|
18
|
+
* @returns Returns promise object that is resolved with the IUserGroup wrapped by IResult.
|
|
19
|
+
*
|
|
20
|
+
* **Example**
|
|
21
|
+
* ```typescript
|
|
22
|
+
*
|
|
23
|
+
* const groupId: number = 1;
|
|
24
|
+
*
|
|
25
|
+
* (async () => {
|
|
26
|
+
* const {data, res} = await userGroupService.detail(roleId);
|
|
27
|
+
* })();
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
detail(entityOrId: string | number | IUserGroup): Promise<IResult<IUserGroup>>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new user group.
|
|
33
|
+
*
|
|
34
|
+
* @param {IUserGroup} entity User Group object.
|
|
35
|
+
*
|
|
36
|
+
* @returns {IResult<IUserGroup>} Returns promise object that is resolved with
|
|
37
|
+
* the details of newly created user group.
|
|
38
|
+
*
|
|
39
|
+
* **Example**
|
|
40
|
+
* ```typescript
|
|
41
|
+
*
|
|
42
|
+
* const userGroupObject: IUserGroup = {
|
|
43
|
+
* name: "new user group"
|
|
44
|
+
* };
|
|
45
|
+
*
|
|
46
|
+
* (async () => {
|
|
47
|
+
* const {data, res} = await userGroupService.create(userGroupObject);
|
|
48
|
+
* })();
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
create(entity: Partial<IUserGroup>): Promise<IResult<IUserGroup>>;
|
|
52
|
+
/**
|
|
53
|
+
* Updates user group data.
|
|
54
|
+
*
|
|
55
|
+
* @param {Partial<IUserGroup>} entity User group is partially updatable.
|
|
56
|
+
*
|
|
57
|
+
* @returns {IResult<IUserGroup>} Returns promise object that is resolved with the saved user group object.
|
|
58
|
+
*
|
|
59
|
+
* **Example**
|
|
60
|
+
* ```typescript
|
|
61
|
+
*
|
|
62
|
+
* const partialUpdateObject: Partial<IUserGroup> = {
|
|
63
|
+
* "id" : 1,
|
|
64
|
+
* "self" : "[URL to this resource]",
|
|
65
|
+
* "name" : "PlatformAdministrators",
|
|
66
|
+
* ...
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
69
|
+
* (async () => {
|
|
70
|
+
* const {data, res} = await userGroupService.update(partialUpdateObject);
|
|
71
|
+
* })();
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
update(entity: Partial<IUserGroup>): Promise<IResult<IUserGroup>>;
|
|
75
|
+
/**
|
|
76
|
+
* Gets the list of user groups filtered by parameters.
|
|
77
|
+
*
|
|
78
|
+
* @param {object} filter Object containing filters for querying User Groups.
|
|
79
|
+
*
|
|
80
|
+
* @returns Returns promise object that is resolved with the IUserGroup wrapped by IResultList.
|
|
81
|
+
*
|
|
82
|
+
* **Example**
|
|
83
|
+
* ```typescript
|
|
84
|
+
*
|
|
85
|
+
* const filter: object = {
|
|
86
|
+
* severity: Severity.MAJOR,
|
|
87
|
+
* pageSize: 100,
|
|
88
|
+
* withTotalPages: true
|
|
89
|
+
* };
|
|
90
|
+
*
|
|
91
|
+
* (async () => {
|
|
92
|
+
* const {data, res, paging} = await userGroupService.list(filter);
|
|
93
|
+
* })();
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
list(filter?: object): Promise<IResultList<IUserGroup>>;
|
|
97
|
+
/**
|
|
98
|
+
* Removes user group.
|
|
99
|
+
*
|
|
100
|
+
* @param {number | IIdentified} entityOrId User group's id or user group object.
|
|
101
|
+
*
|
|
102
|
+
* @returns Returns promise object that is resolved with the IResult of null.
|
|
103
|
+
*
|
|
104
|
+
* **Example**
|
|
105
|
+
* ```typescript
|
|
106
|
+
*
|
|
107
|
+
* const userGroupId: number = 1;
|
|
108
|
+
*
|
|
109
|
+
* (async () => {
|
|
110
|
+
* const {data, res} = await userGroupService.delete(userGroupId);
|
|
111
|
+
* })();
|
|
112
|
+
* ```
|
|
113
|
+
* When group is removed, suitable audit records are created with type 'User'
|
|
114
|
+
* and activity 'User updated' with information that user has been removed from group.
|
|
115
|
+
*
|
|
116
|
+
* Please, note that the ADMINS and DEVICES groups can not be deleted.
|
|
117
|
+
*/
|
|
118
|
+
delete(entityOrId: number | IIdentified): Promise<IResult<null>>;
|
|
119
|
+
/**
|
|
120
|
+
* Assign role to user group.
|
|
121
|
+
*
|
|
122
|
+
* @param {string | number | Partial<IUserGroup>} entityOrId User group's id or user group object.
|
|
123
|
+
* @param {string | Partial<ISource>} childEntityOrSelf Url to role resource or IRoleReference object.
|
|
124
|
+
*
|
|
125
|
+
* @returns Returns promise object that is resolved with the IRoleReference wrapped by IResult.
|
|
126
|
+
*
|
|
127
|
+
* **Example**
|
|
128
|
+
* ```typescript
|
|
129
|
+
*
|
|
130
|
+
* const userGroupId: number = 1;
|
|
131
|
+
* const roleResource: string = "[URL to the Role resource]";
|
|
132
|
+
*
|
|
133
|
+
* (async () => {
|
|
134
|
+
* const {data, res} = await userGroupService.addRoleToGroup(userGroupId, roleResource);
|
|
135
|
+
* })();
|
|
136
|
+
* ```
|
|
137
|
+
* When role is assigned to user, suitable audit record is created with type 'User' and activity 'User updated'.
|
|
138
|
+
*/
|
|
139
|
+
addRoleToGroup(entityOrId: string | number | Partial<IUserGroup>, childEntityOrSelf: string | Partial<ISource>): Promise<IResult<IRoleReference>>;
|
|
140
|
+
/**
|
|
141
|
+
* Unassign role from user
|
|
142
|
+
*
|
|
143
|
+
* @param {string | number | Partial<IUserGroup>} entityOrId User group's id or user group object.
|
|
144
|
+
* @param {string | Partial<ISource>} childEntityOrSelf Url to user resource or IRoleReference object.
|
|
145
|
+
*
|
|
146
|
+
* @returns Returns promise object that is resolved with the IResult of null.
|
|
147
|
+
*
|
|
148
|
+
* **Example**
|
|
149
|
+
* ```typescript
|
|
150
|
+
*
|
|
151
|
+
* const userGroupId: number = 1;
|
|
152
|
+
* const userResource: string = "[URL to the Role resource]";
|
|
153
|
+
*
|
|
154
|
+
* (async () => {
|
|
155
|
+
* const {data, res} = await userGroupService.removeRoleFromGroup(userGroupId, userResource);
|
|
156
|
+
* })();
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
removeRoleFromGroup(entityOrId: string | number | Partial<IUserGroup>, childEntityOrSelf: string | Partial<ISource>): Promise<IResult<null>>;
|
|
160
|
+
/**
|
|
161
|
+
* Assign user to user group.
|
|
162
|
+
*
|
|
163
|
+
* @param {string | number | Partial<IUserGroup>} entityOrId User group's id or user group object.
|
|
164
|
+
* @param {string | Partial<ISource>} childEntityOrSelf Url to user resource or IUserReference object.
|
|
165
|
+
*
|
|
166
|
+
* @returns Returns promise object that is resolved with the IUserReference wrapped by IResult.
|
|
167
|
+
*
|
|
168
|
+
* **Example**
|
|
169
|
+
* ```typescript
|
|
170
|
+
*
|
|
171
|
+
* const userGroupId: number = 1;
|
|
172
|
+
* const userResource: string = "[URL to the User resource]";
|
|
173
|
+
*
|
|
174
|
+
* (async () => {
|
|
175
|
+
* const {data, res} = await userGroupService.addUserToGroup(userGroupId, userResource);
|
|
176
|
+
* })();
|
|
177
|
+
* ```
|
|
178
|
+
* When user is added to group, suitable audit record is created with type 'User' and activity 'User updated'.
|
|
179
|
+
*/
|
|
180
|
+
addUserToGroup(entityOrId: string | number | Partial<IUserGroup>, childEntityOrSelf: string | Partial<ISource>): Promise<IResult<IUserReference>>;
|
|
181
|
+
/**
|
|
182
|
+
* Remove user from a group
|
|
183
|
+
*
|
|
184
|
+
* @param {string | number | Partial<IUserGroup>} entityOrId User group's id or user group object.
|
|
185
|
+
* @param {string | Partial<ISource>} childEntityOrSelf Url to user resource or IUserReference object.
|
|
186
|
+
*
|
|
187
|
+
* @returns Returns promise object that is resolved with the IResult of null.
|
|
188
|
+
*
|
|
189
|
+
* **Example**
|
|
190
|
+
* ```typescript
|
|
191
|
+
*
|
|
192
|
+
* const userGroupId: number = 1;
|
|
193
|
+
* const userResource: string = "[URL to the User resource]";
|
|
194
|
+
*
|
|
195
|
+
* (async () => {
|
|
196
|
+
* const {data, res} = await userGroupService.removeUserFromGroup(userGroupId, userResource);
|
|
197
|
+
* })();
|
|
198
|
+
* ```
|
|
199
|
+
* When user is removed from group, suitable audit record is created with type 'User' and activity 'User updated'.
|
|
200
|
+
*/
|
|
201
|
+
removeUserFromGroup(entityOrId: string | number | Partial<IUserGroup>, childEntityOrSelf: string | Partial<ISource>): Promise<IResult<null>>;
|
|
202
|
+
protected getSelf(childReference: string | Partial<ISource>): string;
|
|
203
|
+
private getChildUrl;
|
|
204
|
+
private getChildReferenceAsBody;
|
|
205
|
+
private addChild;
|
|
206
|
+
private removeChild;
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=UserGroupService.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Description of IRole interface */
|
|
2
|
+
export interface IRole {
|
|
3
|
+
/** Uniquely identifies a Role */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Descriptive Name of the Role */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Link to this Resource - optional property */
|
|
8
|
+
self?: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=IRole.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IRole } from './IRole';
|
|
2
|
+
/** Description of IRoleReferences interface */
|
|
3
|
+
export interface IRoleReferences {
|
|
4
|
+
/** List of role references */
|
|
5
|
+
references: IRoleReference[];
|
|
6
|
+
/** Link to this Resource */
|
|
7
|
+
self: string;
|
|
8
|
+
}
|
|
9
|
+
/** Description of IRoleReference interface */
|
|
10
|
+
export interface IRoleReference {
|
|
11
|
+
/** A role resource being referenced */
|
|
12
|
+
role: IRole;
|
|
13
|
+
/** Link to this Resource */
|
|
14
|
+
self: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=IRoleReference.d.ts.map
|