@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,36 @@
|
|
|
1
|
+
import { IEvent } from '../event';
|
|
2
|
+
import { Severity } from '../core';
|
|
3
|
+
import { AuditRecordType } from './AuditRecordType';
|
|
4
|
+
import { IChange } from './IChange';
|
|
5
|
+
/**
|
|
6
|
+
* IAuditRecord implements the IEvent interface.
|
|
7
|
+
* Keep in mind that the mandantory fragments from IEvent are
|
|
8
|
+
* also mandantory for IAuditRecord.
|
|
9
|
+
*/
|
|
10
|
+
export interface IAuditRecord extends IEvent {
|
|
11
|
+
/**
|
|
12
|
+
* User which created the audit record
|
|
13
|
+
*/
|
|
14
|
+
user?: string;
|
|
15
|
+
/**
|
|
16
|
+
* To which application the record belongs to
|
|
17
|
+
*/
|
|
18
|
+
application?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Description what the audit record is about
|
|
21
|
+
*/
|
|
22
|
+
activity?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Severity of the record
|
|
25
|
+
*/
|
|
26
|
+
severity?: Severity;
|
|
27
|
+
/**
|
|
28
|
+
* A specific type to which the record belongs to
|
|
29
|
+
*/
|
|
30
|
+
type: AuditRecordType;
|
|
31
|
+
/**
|
|
32
|
+
* Change status of the record
|
|
33
|
+
*/
|
|
34
|
+
changes?: Set<IChange>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=IAuditRecord.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ChangeType } from './ChangeType';
|
|
2
|
+
/**
|
|
3
|
+
* IChange interface belongs to IAuditRecord and
|
|
4
|
+
* keeps track what type and which attributes are changed.
|
|
5
|
+
*/
|
|
6
|
+
export interface IChange {
|
|
7
|
+
/**
|
|
8
|
+
* Which attribute was touched
|
|
9
|
+
*/
|
|
10
|
+
attribute: string;
|
|
11
|
+
/**
|
|
12
|
+
* Of which type
|
|
13
|
+
*/
|
|
14
|
+
type: string;
|
|
15
|
+
/**
|
|
16
|
+
* Which value was set before
|
|
17
|
+
*/
|
|
18
|
+
previousValue: any;
|
|
19
|
+
/**
|
|
20
|
+
* What is the current value
|
|
21
|
+
*/
|
|
22
|
+
newValue: any;
|
|
23
|
+
/**
|
|
24
|
+
* Of which type was the change, see [[ChangeType]]
|
|
25
|
+
*/
|
|
26
|
+
changeType: ChangeType;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=IChange.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IAuthentication, ICredentials } from './IAuthentication';
|
|
2
|
+
/**
|
|
3
|
+
* Allows to use Basic-Auth for Authorization to the
|
|
4
|
+
* Cumulocity API.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BasicAuth implements IAuthentication {
|
|
7
|
+
user: string;
|
|
8
|
+
/**
|
|
9
|
+
* Authenticates the given user against the given tenant.
|
|
10
|
+
* @param name
|
|
11
|
+
* @param password
|
|
12
|
+
* @param tenant
|
|
13
|
+
*/
|
|
14
|
+
constructor(credentials?: ICredentials);
|
|
15
|
+
updateCredentials({ tenant, user, password, token, tfa }?: ICredentials): string;
|
|
16
|
+
getFetchOptions(options: any): any;
|
|
17
|
+
getCometdHandshake(config?: {
|
|
18
|
+
ext?: object;
|
|
19
|
+
}): {
|
|
20
|
+
ext?: object;
|
|
21
|
+
};
|
|
22
|
+
logout(): void;
|
|
23
|
+
private getCookieValue;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=BasicAuth.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAuthentication, ICredentials } from './IAuthentication';
|
|
2
|
+
export declare class BearerAuth implements IAuthentication {
|
|
3
|
+
constructor(token?: string);
|
|
4
|
+
getFetchOptions(options: any): any;
|
|
5
|
+
updateCredentials({ token }: ICredentials): undefined;
|
|
6
|
+
getCometdHandshake(config?: {
|
|
7
|
+
ext?: any;
|
|
8
|
+
}): {
|
|
9
|
+
ext?: any;
|
|
10
|
+
};
|
|
11
|
+
logout(): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=BearerAuth.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IAuthentication, ICredentials } from './IAuthentication';
|
|
2
|
+
/**
|
|
3
|
+
* Allows to use Cookies for Authorization to the
|
|
4
|
+
* Cumulocity API.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CookieAuth implements IAuthentication {
|
|
7
|
+
user: string;
|
|
8
|
+
private logoutUrl;
|
|
9
|
+
updateCredentials({ user }?: ICredentials): string;
|
|
10
|
+
getFetchOptions(options: any): any;
|
|
11
|
+
getCometdHandshake(config?: {
|
|
12
|
+
ext?: object;
|
|
13
|
+
}): {
|
|
14
|
+
ext?: object;
|
|
15
|
+
};
|
|
16
|
+
logout(): Promise<import("./IFetchResponse").IFetchResponse>;
|
|
17
|
+
private getCookieValue;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=CookieAuth.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IFetchClient } from './IFetchClient';
|
|
2
|
+
import { IFetchOptions } from './IFetchOptions';
|
|
3
|
+
import { IFetchResponse } from './IFetchResponse';
|
|
4
|
+
import { IAuthentication } from './IAuthentication';
|
|
5
|
+
export declare class FetchClient implements IFetchClient {
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
tenant: string;
|
|
8
|
+
defaultHeaders: {};
|
|
9
|
+
constructor(authOrBaseUrl?: IAuthentication | string, baseUrl?: string);
|
|
10
|
+
setAuth(auth: IAuthentication): void;
|
|
11
|
+
fetch(url: string, init?: IFetchOptions): Promise<IFetchResponse>;
|
|
12
|
+
getUrl(url?: string, options?: IFetchOptions): string;
|
|
13
|
+
getFetchOptions(options?: IFetchOptions): IFetchOptions;
|
|
14
|
+
getCometdHandshake(config?: any): any;
|
|
15
|
+
private resolveServerUrl;
|
|
16
|
+
private adjustOptionsForFormData;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=FetchClient.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used for header based Authentication.
|
|
3
|
+
*/
|
|
4
|
+
export interface IAuthentication {
|
|
5
|
+
updateCredentials(credentials: ICredentials): string | undefined;
|
|
6
|
+
getFetchOptions(options?: object): object;
|
|
7
|
+
getCometdHandshake(config?: object): object;
|
|
8
|
+
logout(): any;
|
|
9
|
+
}
|
|
10
|
+
export interface ICredentials {
|
|
11
|
+
tenant?: string;
|
|
12
|
+
user?: string;
|
|
13
|
+
password?: string;
|
|
14
|
+
token?: string;
|
|
15
|
+
tfa?: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export interface IMicroserviceClientRequestHeaders {
|
|
19
|
+
cookie?: string;
|
|
20
|
+
authorization?: string;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=IAuthentication.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IFetchOptions } from './IFetchOptions';
|
|
2
|
+
import { IFetchResponse } from './IFetchResponse';
|
|
3
|
+
export interface IFetchClient {
|
|
4
|
+
tenant?: string;
|
|
5
|
+
fetch(url: string, init?: IFetchOptions): Promise<IFetchResponse>;
|
|
6
|
+
getFetchOptions(options?: IFetchOptions): IFetchOptions;
|
|
7
|
+
getCometdHandshake(config?: any): any;
|
|
8
|
+
getUrl(url: string, options?: IFetchOptions): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=IFetchClient.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import FormData from 'form-data';
|
|
2
|
+
/**
|
|
3
|
+
* Data that you want to pass into your request. Based on
|
|
4
|
+
* fetch RequestInit.
|
|
5
|
+
*/
|
|
6
|
+
export interface IFetchOptions extends Omit<RequestInit, 'body'> {
|
|
7
|
+
/**
|
|
8
|
+
* Parameters added to the url
|
|
9
|
+
*/
|
|
10
|
+
params?: object;
|
|
11
|
+
/**
|
|
12
|
+
* The headers to attach
|
|
13
|
+
*/
|
|
14
|
+
headers?: HeadersInit | any;
|
|
15
|
+
body?: FormData | RequestInit['body'];
|
|
16
|
+
/**
|
|
17
|
+
* Parameters added as body
|
|
18
|
+
*/
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=IFetchOptions.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response from server
|
|
3
|
+
*/
|
|
4
|
+
export interface IFetchResponse extends Response {
|
|
5
|
+
/**
|
|
6
|
+
* HTTP status code
|
|
7
|
+
*/
|
|
8
|
+
status: number;
|
|
9
|
+
/**
|
|
10
|
+
* HTTP headers
|
|
11
|
+
*/
|
|
12
|
+
headers: Headers;
|
|
13
|
+
/**
|
|
14
|
+
* Data in arrayBuffer format
|
|
15
|
+
*/
|
|
16
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
17
|
+
/**
|
|
18
|
+
* Data in json format
|
|
19
|
+
*/
|
|
20
|
+
json(): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Data in text format
|
|
23
|
+
*/
|
|
24
|
+
text(): Promise<string>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=IFetchResponse.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response returned by the microservice subscription endpoint.
|
|
3
|
+
* Contains an array of credentials that can be used to access subscribed tenants.
|
|
4
|
+
*/
|
|
5
|
+
export interface IMicroserviceSubscriptionsResponse {
|
|
6
|
+
users: IMicroserviceSubscription[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Not to be confused with ICredentials as 'name' is used instead of 'user' for the username.
|
|
10
|
+
*/
|
|
11
|
+
export interface IMicroserviceSubscription {
|
|
12
|
+
tenant: string;
|
|
13
|
+
name: string;
|
|
14
|
+
password: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=IMicroserviceSubscriptions.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IFetchResponse } from './IFetchResponse';
|
|
2
|
+
import { IResultBase } from './IResultBase';
|
|
3
|
+
/**
|
|
4
|
+
* The IResult interface splits up the server
|
|
5
|
+
* response in different fragments, namely in:
|
|
6
|
+
* + data
|
|
7
|
+
* + res
|
|
8
|
+
*
|
|
9
|
+
* @param TData generic type
|
|
10
|
+
*/
|
|
11
|
+
export interface IResult<TData> extends IResultBase<TData> {
|
|
12
|
+
/**
|
|
13
|
+
* Holds the data from server response in a generic way.
|
|
14
|
+
* TData could be of any type, for example:
|
|
15
|
+
* + [[IManagedObject]]
|
|
16
|
+
* + [[IAlarm]]
|
|
17
|
+
* + [[IAuditRecord]]
|
|
18
|
+
* + ...
|
|
19
|
+
*/
|
|
20
|
+
data: TData;
|
|
21
|
+
/**
|
|
22
|
+
* Server response of type [[IFetchResponse]].
|
|
23
|
+
*/
|
|
24
|
+
res: IFetchResponse;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=IResult.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IFetchResponse } from './IFetchResponse';
|
|
2
|
+
import { Paging } from './Paging';
|
|
3
|
+
import { IResultBase } from './IResultBase';
|
|
4
|
+
/**
|
|
5
|
+
* The IResultList<TData> interface splits up the server
|
|
6
|
+
* response in different fragments, namely in:
|
|
7
|
+
* + data[]
|
|
8
|
+
* + paging
|
|
9
|
+
* + res
|
|
10
|
+
*
|
|
11
|
+
* @param TData generic type
|
|
12
|
+
*/
|
|
13
|
+
export interface IResultList<TData> extends IResultBase<TData> {
|
|
14
|
+
/**
|
|
15
|
+
* Holds the data from server response in a generic way.
|
|
16
|
+
* TData could be of any type, for example:
|
|
17
|
+
* + [[IManagedObject]]
|
|
18
|
+
* + [[IAlarm]]
|
|
19
|
+
* + [[IAuditRecord]]
|
|
20
|
+
* + ...
|
|
21
|
+
*
|
|
22
|
+
* Response data as array.
|
|
23
|
+
*/
|
|
24
|
+
data: TData[];
|
|
25
|
+
/**
|
|
26
|
+
* Server response of type [[IFetchResponse]].
|
|
27
|
+
*/
|
|
28
|
+
res: IFetchResponse;
|
|
29
|
+
/**
|
|
30
|
+
* Paging allows you to query the next and previous data chunks
|
|
31
|
+
* in a convenient way. You can also go to a specific page or just read
|
|
32
|
+
* page information about the current data chunk. For a detailed view see [[Paging]]
|
|
33
|
+
*/
|
|
34
|
+
paging?: Paging<TData>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=IResultList.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISource can be used when an id is mandantory.
|
|
3
|
+
*/
|
|
4
|
+
export interface ISource {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Name of the resource
|
|
11
|
+
*/
|
|
12
|
+
name?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Link to the resource
|
|
15
|
+
*/
|
|
16
|
+
self?: string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=ISource.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IAuthentication, IMicroserviceClientRequestHeaders } from './IAuthentication';
|
|
2
|
+
/**
|
|
3
|
+
* Allows to use either Cookie-Auth or Basic-Auth
|
|
4
|
+
* of a microservice client request header
|
|
5
|
+
* for Authorization to the Cumulocity API.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MicroserviceClientRequestAuth implements IAuthentication {
|
|
8
|
+
protected authTokenFromCookie: string | undefined;
|
|
9
|
+
protected authTokenFromHeader: string | undefined;
|
|
10
|
+
protected xsrfToken: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Authenticates using the credentials which were
|
|
13
|
+
* provided within the request headers of the
|
|
14
|
+
* client call to the microservice.
|
|
15
|
+
* @param headers
|
|
16
|
+
*/
|
|
17
|
+
constructor(headers?: IMicroserviceClientRequestHeaders);
|
|
18
|
+
updateCredentials(): string;
|
|
19
|
+
getFetchOptions(options: any): any;
|
|
20
|
+
getCometdHandshake(config?: {
|
|
21
|
+
ext?: {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
}): {
|
|
25
|
+
ext?: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
logout(): void;
|
|
30
|
+
protected getCookieValue(headers: IMicroserviceClientRequestHeaders, name: string): string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=MicroserviceClientRequestAuth.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IFetchResponse } from './IFetchResponse';
|
|
2
|
+
import { MicroserviceClientRequestAuth } from './MicroserviceClientRequestAuth';
|
|
3
|
+
/**
|
|
4
|
+
* Extracts the `authorization` cookie from the `set-cookie` header of a response.
|
|
5
|
+
*
|
|
6
|
+
* Meant to be used in none browser environments like nodejs which don't deal with cookies.
|
|
7
|
+
*/
|
|
8
|
+
export declare class NodeJSCookieAuth extends MicroserviceClientRequestAuth {
|
|
9
|
+
constructor(cookieResponse: IFetchResponse);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=NodeJSCookieAuth.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Service } from './Service';
|
|
2
|
+
import { IResultList } from './IResultList';
|
|
3
|
+
/**
|
|
4
|
+
* Paging allows you to query the next and previous data chunks
|
|
5
|
+
* in a convenient way. You can also go to a specific page or just read
|
|
6
|
+
* page information about the current data chunk.
|
|
7
|
+
* Note that page numbers are generated by backend
|
|
8
|
+
* and may be used as offset rather than a continuous range of positive numbers
|
|
9
|
+
* (e.g. in case of users with restricted permissions).
|
|
10
|
+
*/
|
|
11
|
+
export declare class Paging<TData> {
|
|
12
|
+
/**
|
|
13
|
+
* Holds the number of the current page, so in fact
|
|
14
|
+
* the data chunk you are looking at.
|
|
15
|
+
*/
|
|
16
|
+
currentPage: number;
|
|
17
|
+
/**
|
|
18
|
+
* Holds the number of the next page.
|
|
19
|
+
*/
|
|
20
|
+
nextPage: number;
|
|
21
|
+
/**
|
|
22
|
+
* Holds the number of the previous page.
|
|
23
|
+
*/
|
|
24
|
+
prevPage: number;
|
|
25
|
+
/**
|
|
26
|
+
* Holds the number of the maximum data that you will
|
|
27
|
+
* get with the response.
|
|
28
|
+
*/
|
|
29
|
+
pageSize: number;
|
|
30
|
+
/**
|
|
31
|
+
* Holds the number of total pages regarding to the
|
|
32
|
+
* given page size.
|
|
33
|
+
*/
|
|
34
|
+
totalPages: number;
|
|
35
|
+
private service;
|
|
36
|
+
private filter;
|
|
37
|
+
constructor(service: Service<TData>, statistics: any, filter: object);
|
|
38
|
+
/**
|
|
39
|
+
* Gets the next page of available data from the server.
|
|
40
|
+
* @param filter
|
|
41
|
+
*/
|
|
42
|
+
next(filter?: object): Promise<IResultList<TData>>;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the previous page of available data from server.
|
|
45
|
+
* @param filter
|
|
46
|
+
*/
|
|
47
|
+
prev(filter?: object): Promise<IResultList<TData>>;
|
|
48
|
+
/**
|
|
49
|
+
* Method used by next(), prev() and goto() to call the service.list method.
|
|
50
|
+
* It is public so it can be overriden in special cases (like children objects
|
|
51
|
+
* in inventory).
|
|
52
|
+
* @param filter
|
|
53
|
+
*/
|
|
54
|
+
list(filter?: object): Promise<IResultList<TData>>;
|
|
55
|
+
/**
|
|
56
|
+
* Goes to the page that you define as page parameter.
|
|
57
|
+
* @param page
|
|
58
|
+
* @param filter
|
|
59
|
+
*/
|
|
60
|
+
goto(page: number, filter?: object): Promise<IResultList<TData>>;
|
|
61
|
+
private getFilter;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=Paging.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare class QueriesUtil {
|
|
2
|
+
protected operatorFns: {
|
|
3
|
+
__not: (operand: any) => string;
|
|
4
|
+
__and: (operand: any) => string;
|
|
5
|
+
__or: (operand: any) => string;
|
|
6
|
+
__eq: (operand: any, contextKey: any) => string;
|
|
7
|
+
__gt: (operand: any, contextKey: any) => string;
|
|
8
|
+
__ge: (operand: any, contextKey: any) => string;
|
|
9
|
+
__lt: (operand: any, contextKey: any) => string;
|
|
10
|
+
__le: (operand: any, contextKey: any) => string;
|
|
11
|
+
__in: (operand: any, contextKey: any) => any;
|
|
12
|
+
__bygroupid: (operand: any) => string;
|
|
13
|
+
__has: (operand: any) => string;
|
|
14
|
+
__useFilterQueryString: (queryString: string) => string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Builds query string from provided query object.
|
|
18
|
+
*
|
|
19
|
+
* @param query Object containing filters and sort order for querying managed objects. Supported filters are:
|
|
20
|
+
* - **__and** - Specifies conditions, e.g. `{__and: [{__has: 'c8y_IsDevice'}, {'count': {__gt: 0}}]}`.
|
|
21
|
+
* - **__or** - Specifies alternative conditions, e.g. `{__or: [{__bygroupid: 10300}, {__bygroupid: 10400}]}`.
|
|
22
|
+
* - **__eq** - Specified fragment must be equal to given value, e.g. `{'status': 'AVAILABLE'}` (no nested object required).
|
|
23
|
+
* - **__lt** - Specified fragment must be less then given value, e.g. `{'count': {__lt: 10}}`.
|
|
24
|
+
* - **__gt** - Specified fragment must be greater then given value, e.g. `{'count': {__gt: 0}}`.
|
|
25
|
+
* - **__in** - Specified fragment must be equal to one of values in the list, e.g. `{'status': {__in: ['AVAILABLE', 'UNAVAILABLE']}}`.
|
|
26
|
+
* - **__not** - Negates condition, e.g. `{__not: {'status': 'AVAILABLE'}}`.
|
|
27
|
+
* - **__bygroupid** - True if filtered managed object is assigned to given group, e.g. `{__bygroupid: 10300}`.
|
|
28
|
+
* - **__has** - Specified fragment must have a value defined, e.g. `{__has: 'c8y_IsDevice'}`.
|
|
29
|
+
* - **__useFilterQueryString** - Gets rid of the `$filter=()… $orderby=…` parts of a query and keeps only what's between the most
|
|
30
|
+
* exterior parentheses of the $filter.
|
|
31
|
+
* EXAMPLE: takes a query of the form
|
|
32
|
+
* `$filter=(name eq 'RaspPi*') $orderby=name asc`
|
|
33
|
+
* and turns it into
|
|
34
|
+
* `name eq 'RaspPi*'`
|
|
35
|
+
* This is necessary for searching for smart groups, which are identified by their own query
|
|
36
|
+
* that needs to be passed through.
|
|
37
|
+
*
|
|
38
|
+
* Note: if you want to specify the order, you need to wrap your filters within `__filter` property and then add `__orderby` with the array of field paths and sort directions (1 for ascending, -1 for descending), for example:
|
|
39
|
+
* - `{ __filter: { ... }, __orderby: [{ 'creationTime': -1 }, { 'name': 1 }] }`
|
|
40
|
+
*
|
|
41
|
+
* @returns {string} Returns a query string ready to be sent in request params to backend.
|
|
42
|
+
*
|
|
43
|
+
* **Example**
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const query = {
|
|
46
|
+
* __filter: {
|
|
47
|
+
* 'name': 'My Device*',
|
|
48
|
+
* 'c8y_Availability.status': {
|
|
49
|
+
* __in: ['AVAILABLE', 'UNAVAILABLE']
|
|
50
|
+
* },
|
|
51
|
+
* 'creationTime': {
|
|
52
|
+
* __lt: '2015-11-30T13:28:123Z'
|
|
53
|
+
* },
|
|
54
|
+
* 'c8y_ActiveAlarmsStatus.critical': {
|
|
55
|
+
* __gt: 0
|
|
56
|
+
* },
|
|
57
|
+
* __or: [
|
|
58
|
+
* {__not: {__has: 'c8y_ActiveAlarmsStatus.major'}},
|
|
59
|
+
* {
|
|
60
|
+
* __or: [
|
|
61
|
+
* {__bygroupid: 10300},
|
|
62
|
+
* {__bygroupid: 10400}
|
|
63
|
+
* ]
|
|
64
|
+
* }
|
|
65
|
+
* ]
|
|
66
|
+
* },
|
|
67
|
+
* __orderby: [
|
|
68
|
+
* {'name': 1},
|
|
69
|
+
* {'creationTime': -1},
|
|
70
|
+
* {'c8y_ActiveAlarmsStatus.critical': -1}
|
|
71
|
+
* ]
|
|
72
|
+
* };
|
|
73
|
+
*
|
|
74
|
+
* const params = {
|
|
75
|
+
* query: queriesUtil.buildQuery(query)
|
|
76
|
+
* };
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
buildQuery(query: any): string;
|
|
80
|
+
buildQueryFilter(queryFilter: any, _queryKey?: any, _glueType?: any): string;
|
|
81
|
+
buildQueryOrderby(queryOrderbys: any): string;
|
|
82
|
+
addAndFilter(query: any, filter: any): any;
|
|
83
|
+
addOrFilter(query: any, filter: any): any;
|
|
84
|
+
addFilter(query: any, filter: any, operator: 'and' | 'or'): any;
|
|
85
|
+
prependOrderbys(query: any, orderbys: any): any;
|
|
86
|
+
appendOrderbys(query: any, orderbys: any): any;
|
|
87
|
+
addOrderbys(query: any, orderbys: any, how: 'prepend' | 'append'): any;
|
|
88
|
+
extractAndMergeOrderBys(queries: string[]): string;
|
|
89
|
+
protected glue(stmts: any[], type: string): any;
|
|
90
|
+
protected quoteString(s: any): any;
|
|
91
|
+
protected skipEmptyObjects(objs: any[]): any[];
|
|
92
|
+
protected isEmptyObject(obj: object): boolean;
|
|
93
|
+
private escapeSingleQuote;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=QueriesUtil.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IFetchClient } from './IFetchClient';
|
|
2
|
+
import { IFetchOptions } from './IFetchOptions';
|
|
3
|
+
import { IFetchResponse } from './IFetchResponse';
|
|
4
|
+
import { IIdentified } from './IIdentified';
|
|
5
|
+
import { IResult } from './IResult';
|
|
6
|
+
import { IResultList } from './IResultList';
|
|
7
|
+
import { Paging } from './Paging';
|
|
8
|
+
import { Realtime } from '../realtime/index';
|
|
9
|
+
export declare abstract class Service<TData extends IIdentified> {
|
|
10
|
+
protected client: IFetchClient;
|
|
11
|
+
protected realtime?: Realtime;
|
|
12
|
+
protected propertyName: string;
|
|
13
|
+
protected abstract baseUrl: string;
|
|
14
|
+
protected abstract listUrl: string;
|
|
15
|
+
protected channel: string;
|
|
16
|
+
private cache;
|
|
17
|
+
constructor(client: IFetchClient, realtime?: Realtime);
|
|
18
|
+
list(filter?: object): Promise<IResultList<TData>>;
|
|
19
|
+
protected detail(entityOrId: string | number | IIdentified, filter?: object): Promise<IResult<TData>>;
|
|
20
|
+
protected create(entity: Partial<TData>): Promise<IResult<TData>>;
|
|
21
|
+
protected update(entity: Partial<TData>): Promise<IResult<TData>>;
|
|
22
|
+
protected delete(entityOrId: string | number | IIdentified, params?: any): Promise<IResult<null>>;
|
|
23
|
+
protected onBeforeCreate(obj: Partial<TData>): Partial<TData>;
|
|
24
|
+
protected onBeforeUpdate(objWithId: Partial<TData>): Partial<TData>;
|
|
25
|
+
protected changeFetchOptions(options: any, _url?: string): any;
|
|
26
|
+
protected getUrl(url?: string): string;
|
|
27
|
+
protected getEntityId(entityOrId: string | number | IIdentified): string;
|
|
28
|
+
protected getDetailUrl(entityOrId: string | number | IIdentified): string;
|
|
29
|
+
protected fetch(url: string, init?: IFetchOptions): Promise<IFetchResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Checks the response for errors and throws exceptions, otherwise returns the response as is.
|
|
32
|
+
*
|
|
33
|
+
* @param response The response from server.
|
|
34
|
+
*
|
|
35
|
+
* @returns If no errors are detected, it returns the same response.
|
|
36
|
+
*
|
|
37
|
+
* @throws If an error is detected, it throws `{ res, data }`, where `data` contains error details from server.
|
|
38
|
+
*/
|
|
39
|
+
protected handleErrorStatusCodes(response: IFetchResponse): Promise<IFetchResponse>;
|
|
40
|
+
protected mimeType(type: string): string;
|
|
41
|
+
protected getIdString(reference: number | string | IIdentified): string;
|
|
42
|
+
protected getPaging(json: any, filter: object): Paging<TData>;
|
|
43
|
+
protected getCurrentPageFromLink(link?: string): number;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=Service.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './Service';
|
|
2
|
+
export * from './FetchClient';
|
|
3
|
+
export * from './IAuthentication';
|
|
4
|
+
export * from './BasicAuth';
|
|
5
|
+
export * from './BearerAuth';
|
|
6
|
+
export * from './CookieAuth';
|
|
7
|
+
export * from './MicroserviceClientRequestAuth';
|
|
8
|
+
export * from './NodeJSCookieAuth';
|
|
9
|
+
export * from './IIdentified';
|
|
10
|
+
export * from './INamed';
|
|
11
|
+
export * from './IResult';
|
|
12
|
+
export * from './IResultList';
|
|
13
|
+
export * from './IFetchOptions';
|
|
14
|
+
export * from './IFetchResponse';
|
|
15
|
+
export * from './IFetchClient';
|
|
16
|
+
export * from './IMicroserviceSubscriptions';
|
|
17
|
+
export * from './Paging';
|
|
18
|
+
export * from './ISource';
|
|
19
|
+
export * from './Severity';
|
|
20
|
+
export * from './ICustomProperties';
|
|
21
|
+
export * from './ICustomPropertiesMap';
|
|
22
|
+
export * from './QueriesUtil';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|