c8y-nitro 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/README.md +19 -43
  2. package/dist/_virtual/rolldown_runtime.mjs +32 -0
  3. package/dist/client.d.mts +122 -0
  4. package/dist/client.mjs +63 -0
  5. package/dist/index.mjs +5 -2
  6. package/dist/module/docker.mjs +1 -1
  7. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/index.mjs +63 -0
  8. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/Client.mjs +284 -0
  9. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/AlarmService.mjs +198 -0
  10. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/AlarmStatus.mjs +16 -0
  11. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/alarm/index.mjs +4 -0
  12. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationAvailability.mjs +12 -0
  13. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationBinaryService.mjs +166 -0
  14. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationService.mjs +604 -0
  15. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationType.mjs +11 -0
  16. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/BillingMode.mjs +9 -0
  17. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/IApplicationInstanceDetails.mjs +11 -0
  18. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/Isolation.mjs +9 -0
  19. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/application/index.mjs +9 -0
  20. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/AuditRecordType.mjs +33 -0
  21. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/AuditService.mjs +95 -0
  22. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/ChangeType.mjs +15 -0
  23. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/audit/index.mjs +5 -0
  24. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BasicAuth.mjs +69 -0
  25. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuth.mjs +52 -0
  26. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuthFromSessionStorage.mjs +43 -0
  27. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/CookieAuth.mjs +53 -0
  28. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/FetchClient.mjs +82 -0
  29. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/MicroserviceClientRequestAuth.mjs +50 -0
  30. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/NodeJSCookieAuth.mjs +19 -0
  31. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Paging.mjs +68 -0
  32. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/QueriesUtil.mjs +225 -0
  33. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Service.mjs +186 -0
  34. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/Severity.mjs +18 -0
  35. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/core/index.mjs +13 -0
  36. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationBulkService.mjs +67 -0
  37. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationSecurityMode.mjs +13 -0
  38. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationService.mjs +362 -0
  39. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationStatus.mjs +16 -0
  40. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/device-registration/index.mjs +6 -0
  41. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/EventBinaryService.mjs +102 -0
  42. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/EventService.mjs +147 -0
  43. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/event/index.mjs +4 -0
  44. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/feature/FeatureService.mjs +89 -0
  45. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/feature/index.mjs +3 -0
  46. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/gettext-typed.mjs +7 -0
  47. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/gettext.mjs +9 -0
  48. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/identity/IdentityService.mjs +181 -0
  49. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryBinaryService.mjs +149 -0
  50. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryService.mjs +842 -0
  51. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory/index.mjs +4 -0
  52. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory-role/InventoryRoleService.mjs +139 -0
  53. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/inventory-role/index.mjs +3 -0
  54. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/ISeriesFilter.mjs +10 -0
  55. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/MeasurementService.mjs +205 -0
  56. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/measurement/index.mjs +4 -0
  57. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkGeneralStatus.mjs +20 -0
  58. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkService.mjs +157 -0
  59. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkStatus.mjs +16 -0
  60. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationService.mjs +133 -0
  61. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/OperationStatus.mjs +16 -0
  62. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/operation/index.mjs +7 -0
  63. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/public_api.mjs +84 -0
  64. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/MetaChannel.mjs +11 -0
  65. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/Realtime.mjs +103 -0
  66. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/realtime/index.mjs +3 -0
  67. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/services.mjs +54 -0
  68. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-groups/SmartGroupsService.mjs +158 -0
  69. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-rules/SmartRulesService.mjs +158 -0
  70. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/smart-rules/index.mjs +3 -0
  71. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/system-options/SystemOptionsService.mjs +82 -0
  72. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/system-options/index.mjs +3 -0
  73. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantService.mjs +373 -0
  74. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantStatus.mjs +11 -0
  75. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/TfaStrategy.mjs +14 -0
  76. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant/index.mjs +5 -0
  77. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/ITenantLoginOptions.mjs +29 -0
  78. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/TenantLoginOptionsService.mjs +217 -0
  79. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/index.mjs +4 -0
  80. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-options/TenantOptionsService.mjs +183 -0
  81. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-options/index.mjs +3 -0
  82. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-security-options/TenantSecurityOptionsService.mjs +52 -0
  83. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/tenant-security-options/index.mjs +3 -0
  84. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/trusted-certificates/CrlService.mjs +112 -0
  85. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/trusted-certificates/TrustedCertificateService.mjs +299 -0
  86. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/trusted-certificates/index.mjs +4 -0
  87. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/PasswordStrength.mjs +10 -0
  88. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/UserInventoryRoleService.mjs +133 -0
  89. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/UserService.mjs +730 -0
  90. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/index.mjs +5 -0
  91. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-group/UserGroupService.mjs +306 -0
  92. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-group/index.mjs +3 -0
  93. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-role/UserRoleService.mjs +70 -0
  94. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user-role/index.mjs +3 -0
  95. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/Client.d.mts +218 -0
  96. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/AlarmService.d.mts +153 -0
  97. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/AlarmStatus.d.mts +15 -0
  98. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/IAlarm.d.mts +84 -0
  99. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/alarm/SeverityFilter.d.mts +6 -0
  100. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationAvailability.d.mts +8 -0
  101. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationBinaryService.d.mts +46 -0
  102. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationService.d.mts +339 -0
  103. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/ApplicationType.d.mts +9 -0
  104. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/BillingMode.d.mts +7 -0
  105. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplication.d.mts +30 -0
  106. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationBinary.d.mts +12 -0
  107. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationInstanceDetails.d.mts +71 -0
  108. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationReference.d.mts +19 -0
  109. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IApplicationVersion.d.mts +17 -0
  110. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IDeviceRegistrationProvider.d.mts +9 -0
  111. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IManifest.d.mts +81 -0
  112. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IProvider.d.mts +8 -0
  113. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/IUploadParamsOverride.d.mts +9 -0
  114. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/application/Isolation.d.mts +7 -0
  115. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/AuditRecordType.d.mts +32 -0
  116. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/AuditService.d.mts +77 -0
  117. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/ChangeType.d.mts +11 -0
  118. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/IAuditRecord.d.mts +39 -0
  119. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/audit/IChange.d.mts +31 -0
  120. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/BasicAuth.d.mts +35 -0
  121. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/BearerAuth.d.mts +21 -0
  122. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/BearerAuthFromSessionStorage.d.mts +24 -0
  123. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/CookieAuth.d.mts +26 -0
  124. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/FetchClient.d.mts +24 -0
  125. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IAuthentication.d.mts +27 -0
  126. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/ICustomProperties.d.mts +10 -0
  127. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/ICustomPropertiesMap.d.mts +8 -0
  128. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IFetchClient.d.mts +13 -0
  129. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IFetchOptions.d.mts +24 -0
  130. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IFetchResponse.d.mts +28 -0
  131. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IIdentified.d.mts +8 -0
  132. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IMicroserviceSubscriptions.d.mts +18 -0
  133. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/INamed.d.mts +8 -0
  134. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IResult.d.mts +29 -0
  135. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IResultBase.d.mts +9 -0
  136. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/IResultList.d.mts +39 -0
  137. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/ISource.d.mts +20 -0
  138. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/MicroserviceClientRequestAuth.d.mts +36 -0
  139. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/NodeJSCookieAuth.d.mts +14 -0
  140. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/Paging.d.mts +70 -0
  141. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/QueriesUtil.d.mts +168 -0
  142. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/Service.d.mts +48 -0
  143. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/core/Severity.d.mts +17 -0
  144. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationBulkService.d.mts +43 -0
  145. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationSecurityMode.d.mts +11 -0
  146. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationService.d.mts +296 -0
  147. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/DeviceRegistrationStatus.d.mts +12 -0
  148. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/IDeviceCredentials.d.mts +25 -0
  149. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/IDeviceRegistration.d.mts +79 -0
  150. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/device-registration/IDeviceRegistrationBulkResult.d.mts +29 -0
  151. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/EventBinaryService.d.mts +67 -0
  152. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/EventService.d.mts +120 -0
  153. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/IEvent.d.mts +42 -0
  154. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/event/IEventBinary.d.mts +28 -0
  155. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/feature/FeatureService.d.mts +59 -0
  156. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/feature/IFeatureToggle.d.mts +30 -0
  157. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/identity/IExternalIdentity.d.mts +27 -0
  158. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/identity/IdentityService.d.mts +107 -0
  159. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory/IManagedObject.d.mts +95 -0
  160. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory/InventoryBinaryService.d.mts +50 -0
  161. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory/InventoryService.d.mts +594 -0
  162. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/inventory-role/InventoryRoleService.d.mts +111 -0
  163. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/IMeasurement.d.mts +61 -0
  164. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/IMeasurementFilter.d.mts +59 -0
  165. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/ISeries.d.mts +60 -0
  166. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/ISeriesFilter.d.mts +48 -0
  167. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/measurement/MeasurementService.d.mts +163 -0
  168. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/IOperation.d.mts +27 -0
  169. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/IOperationBulk.d.mts +58 -0
  170. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/IOperationBulkProgress.d.mts +29 -0
  171. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationBulkGeneralStatus.d.mts +16 -0
  172. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationBulkService.d.mts +130 -0
  173. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationBulkStatus.d.mts +12 -0
  174. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationService.d.mts +111 -0
  175. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/operation/OperationStatus.d.mts +12 -0
  176. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/realtime/Realtime.d.mts +69 -0
  177. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/smart-groups/SmartGroupsService.d.mts +126 -0
  178. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/smart-rules/IRule.d.mts +22 -0
  179. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/smart-rules/SmartRulesService.d.mts +90 -0
  180. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/system-options/ISystemOption.d.mts +21 -0
  181. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/system-options/SystemOptionsService.d.mts +57 -0
  182. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ICurrentTenant.d.mts +25 -0
  183. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ISupportUser.d.mts +8 -0
  184. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ITenant.d.mts +28 -0
  185. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ITenantReference.d.mts +8 -0
  186. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/ITfaSettings.d.mts +32 -0
  187. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/TenantService.d.mts +264 -0
  188. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/TenantStatus.d.mts +7 -0
  189. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant/TfaStrategy.d.mts +12 -0
  190. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-login-options/ITenantLoginOptions.d.mts +159 -0
  191. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-login-options/TenantLoginOptionsService.d.mts +176 -0
  192. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-options/ITenantOption.d.mts +12 -0
  193. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-options/ITenantOptionDetailParams.d.mts +13 -0
  194. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-options/TenantOptionsService.d.mts +150 -0
  195. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-policy/ITenantPolicy.d.mts +13 -0
  196. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-security-options/ITenantSecurityOption.d.mts +10 -0
  197. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/tenant-security-options/TenantSecurityOptionsService.d.mts +39 -0
  198. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/CrlService.d.mts +75 -0
  199. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/ICertificateRevocation.d.mts +14 -0
  200. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/ITrustedCertificate.d.mts +75 -0
  201. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/trusted-certificates/TrustedCertificateService.d.mts +181 -0
  202. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/ICurrentUser.d.mts +39 -0
  203. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/IResetPassword.d.mts +15 -0
  204. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/ITotp.d.mts +9 -0
  205. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/ITotpStatus.d.mts +7 -0
  206. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/IUser.d.mts +77 -0
  207. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/IUserInventoryRole.d.mts +16 -0
  208. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/PasswordStrength.d.mts +8 -0
  209. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/UserInventoryRoleService.d.mts +108 -0
  210. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user/UserService.d.mts +400 -0
  211. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-group/IDevicePermissions.d.mts +8 -0
  212. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-group/IUserGroup.d.mts +44 -0
  213. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-group/UserGroupService.d.mts +215 -0
  214. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-role/IRole.d.mts +12 -0
  215. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-role/IRoleReference.d.mts +19 -0
  216. package/dist/node_modules/.pnpm/@c8y_client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/src/user-role/UserRoleService.d.mts +57 -0
  217. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/index.mjs +18 -0
  218. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.mjs +29 -0
  219. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.mjs +32 -0
  220. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.mjs +21 -0
  221. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.mjs +47 -0
  222. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/state.mjs +33 -0
  223. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.mjs +26 -0
  224. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.mjs +40 -0
  225. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serial.mjs +24 -0
  226. package/dist/node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.mjs +62 -0
  227. package/dist/node_modules/.pnpm/b2a@1.1.2/node_modules/b2a/lib/index.mjs +44 -0
  228. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.mjs +20 -0
  229. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
  230. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.mjs +12 -0
  231. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.mjs +23 -0
  232. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.mjs +12 -0
  233. package/dist/node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.mjs +158 -0
  234. package/dist/node_modules/.pnpm/cometd-nodejs-client@1.0.2/node_modules/cometd-nodejs-client/cometd-nodejs-client.mjs +120 -0
  235. package/dist/node_modules/.pnpm/cometd@4.0.8/node_modules/cometd/cometd.mjs +2658 -0
  236. package/dist/node_modules/.pnpm/cross-fetch@4.1.0_encoding@0.1.13/node_modules/cross-fetch/dist/node-ponyfill.mjs +24 -0
  237. package/dist/node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.mjs +84 -0
  238. package/dist/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.mjs +27 -0
  239. package/dist/node_modules/.pnpm/encoding@0.1.13/node_modules/encoding/lib/encoding.mjs +60 -0
  240. package/dist/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.mjs +18 -0
  241. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +12 -0
  242. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +12 -0
  243. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +12 -0
  244. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +12 -0
  245. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +12 -0
  246. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +12 -0
  247. package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +12 -0
  248. package/dist/node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.mjs +12 -0
  249. package/dist/node_modules/.pnpm/es-set-tostringtag@2.1.0/node_modules/es-set-tostringtag/index.mjs +32 -0
  250. package/dist/node_modules/.pnpm/form-data@4.0.4/node_modules/form-data/index.d.mts +50 -0
  251. package/dist/node_modules/.pnpm/form-data@4.0.4/node_modules/form-data/lib/form_data.mjs +247 -0
  252. package/dist/node_modules/.pnpm/form-data@4.0.4/node_modules/form-data/lib/populate.mjs +16 -0
  253. package/dist/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +58 -0
  254. package/dist/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +13 -0
  255. package/dist/node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.mjs +357 -0
  256. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.mjs +14 -0
  257. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.mjs +12 -0
  258. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.mjs +25 -0
  259. package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.mjs +12 -0
  260. package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.mjs +19 -0
  261. package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.mjs +21 -0
  262. package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.mjs +35 -0
  263. package/dist/node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.mjs +16 -0
  264. package/dist/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +16 -0
  265. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.mjs +349 -0
  266. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.mjs +194 -0
  267. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.mjs +34 -0
  268. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.mjs +141 -0
  269. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.mjs +53 -0
  270. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.mjs +458 -0
  271. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.mjs +154 -0
  272. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.mjs +172 -0
  273. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.mjs +2587 -0
  274. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.mjs +2223 -0
  275. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.mjs +230 -0
  276. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.mjs +428 -0
  277. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.mjs +430 -0
  278. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.mjs +233 -0
  279. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.mjs +295 -0
  280. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.mjs +126 -0
  281. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.mjs +198 -0
  282. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.mjs +183 -0
  283. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.mjs +45 -0
  284. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.mjs +110 -0
  285. package/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.mjs +93 -0
  286. package/dist/node_modules/.pnpm/isomorphic-cometd@1.1.0_cometd-nodejs-client@1.0.2_cometd@4.0.8/node_modules/isomorphic-cometd/node.mjs +18 -0
  287. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.mjs +12 -0
  288. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.mjs +12 -0
  289. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.mjs +14 -0
  290. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.mjs +12 -0
  291. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.mjs +12 -0
  292. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.mjs +12 -0
  293. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.mjs +12 -0
  294. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.mjs +17 -0
  295. package/dist/node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.mjs +7051 -0
  296. package/dist/node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.mjs +21 -0
  297. package/dist/node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.mjs +123 -0
  298. package/dist/node_modules/.pnpm/node-fetch@2.7.0_encoding@0.1.13/node_modules/node-fetch/lib/index.mjs +1174 -0
  299. package/dist/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.mjs +48 -0
  300. package/dist/node_modules/.pnpm/tr46@0.0.3/node_modules/tr46/index.mjs +145 -0
  301. package/dist/node_modules/.pnpm/tr46@0.0.3/node_modules/tr46/lib/mappingTable.mjs +35563 -0
  302. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +31 -0
  303. package/dist/node_modules/.pnpm/webidl-conversions@3.0.1/node_modules/webidl-conversions/lib/index.mjs +122 -0
  304. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/URL-impl.mjs +145 -0
  305. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/URL.mjs +174 -0
  306. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/public-api.mjs +21 -0
  307. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/url-state-machine.mjs +878 -0
  308. package/dist/node_modules/.pnpm/whatwg-url@5.0.0/node_modules/whatwg-url/lib/utils.mjs +22 -0
  309. package/dist/package.mjs +1 -1
  310. package/dist/utils/client.d.mts +1 -1
  311. package/dist/utils/client.mjs +4 -1
  312. package/dist/utils/credentials.d.mts +1 -1
  313. package/dist/utils/credentials.mjs +2 -1
  314. package/dist/utils/resources.d.mts +1 -1
  315. package/package.json +8 -4
@@ -0,0 +1,730 @@
1
+ import { __awaiter } from "../../../../../../../../tslib@2.8.1/node_modules/tslib/tslib.es6.mjs";
2
+ import { Service } from "../core/Service.mjs";
3
+ import "../core/index.mjs";
4
+ import { UserInventoryRoleService } from "./UserInventoryRoleService.mjs";
5
+
6
+ //#region node_modules/.pnpm/@c8y+client@1023.17.8_encoding@0.1.13/node_modules/@c8y/client/lib/esm2015/src/user/UserService.js
7
+ /**
8
+ * @description
9
+ * This service allows for managing users.
10
+ */
11
+ var UserService = class extends Service {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.baseUrl = "user";
15
+ this.currentUserUrl = "currentUser";
16
+ this.passwordResetUrl = "passwordReset";
17
+ this.validateResetTokenUrl = "passwordReset/validate";
18
+ this.currentUserPhoneUrl = "currentUserPhone";
19
+ this.verifyTFACodeUrl = "pin";
20
+ this.totpCurrentUserURL = `${this.currentUserUrl}/totpSecret`;
21
+ this.verifyTOTPCodeUrl = `${this.totpCurrentUserURL}/verify`;
22
+ this.activateTOTPCodeUrl = `${this.totpCurrentUserURL}/activity`;
23
+ this.revokeTOTPSecretUrl = "totpSecret/revoke";
24
+ this.propertyName = "users";
25
+ }
26
+ get listUrl() {
27
+ return `${this.client.tenant}/users`;
28
+ }
29
+ get newsletterEmailsUrl() {
30
+ return `${this.client.tenant}/users/newsletterEmails`;
31
+ }
32
+ get currentUserPasswordUrl() {
33
+ return `${this.currentUserUrl}/password`;
34
+ }
35
+ get revokeAllTokensUrl() {
36
+ return `/logout/${this.client.tenant}/allUsers`;
37
+ }
38
+ /**
39
+ * Gets the details of given user.
40
+ *
41
+ * @param {string | number | IUser} entityOrId User's id or user object.
42
+ * @param {object} params Additional query params.
43
+ *
44
+ * @returns Returns promise object that is resolved with the IUser wrapped by IResult.
45
+ *
46
+ * **Example**
47
+ * ```typescript
48
+ *
49
+ * const userId: number = 1;
50
+ * const params = { withCertificates: true };
51
+ *
52
+ * (async () => {
53
+ * const { data, res } = await userService.detail(userId, params);
54
+ * })();
55
+ * ```
56
+ * User password is never returned in GET response. Authentication mechanism is provided by another interface.
57
+ */
58
+ detail(entityOrId_1) {
59
+ const _super = Object.create(null, { detail: { get: () => super.detail } });
60
+ return __awaiter(this, arguments, void 0, function* (entityOrId, params = {}) {
61
+ return _super.detail.call(this, entityOrId, params);
62
+ });
63
+ }
64
+ /**
65
+ * Creates a new user.
66
+ *
67
+ * @param {IUser} entity User object.
68
+ *
69
+ * @returns {IResult<IUser>} Returns promise object that is resolved with the details of newly created user.
70
+ *
71
+ * **Example**
72
+ * ```typescript
73
+ *
74
+ * const userObject: IUser = {
75
+ * userName: "newUser",
76
+ * password: "userPassword12!@"
77
+ * };
78
+ *
79
+ * (async () => {
80
+ * const {data, res} = await userService.create(userObject);
81
+ * })();
82
+ * ```
83
+ */
84
+ create(entity) {
85
+ const _super = Object.create(null, { create: { get: () => super.create } });
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ return _super.create.call(this, entity);
88
+ });
89
+ }
90
+ /**
91
+ * Updates user data.
92
+ *
93
+ * @param {Partial<IUser>} entity User is partially updatable.
94
+ *
95
+ * @returns {IResult<IUserGroup>} Returns promise object that is resolved with the saved user object.
96
+ *
97
+ * **Example**
98
+ * ```typescript
99
+ *
100
+ * const partialUpdateObject: Partial<IUser> = {
101
+ * "id" : "myuser",
102
+ * "userName" : "newUserName",
103
+ * "email": "newUserEmail@example.com"
104
+ * ...
105
+ * }
106
+ *
107
+ * (async () => {
108
+ * const {data, res} = await userService.update(partialUpdateObject);
109
+ * })();
110
+ * ```
111
+ * When user is updated with changed permissions or groups, suitable audit record is created with type
112
+ * 'User' and activity 'User updated'.
113
+ */
114
+ update(entity) {
115
+ const _super = Object.create(null, { update: { get: () => super.update } });
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ return _super.update.call(this, entity);
118
+ });
119
+ }
120
+ /**
121
+ * Gets the list of users filtered by parameters.
122
+ *
123
+ * @param {object} filter Object containing filters for querying users.
124
+ *
125
+ * @returns Returns promise object that is resolved with the IUser wrapped by IResultList.
126
+ *
127
+ * **Example**
128
+ * ```typescript
129
+ *
130
+ * const filter: object = {
131
+ * pageSize: 100,
132
+ * withTotalPages: true
133
+ * };
134
+ *
135
+ * (async () => {
136
+ * const {data, res, paging} = await userService.list(filter);
137
+ * })();
138
+ * ```
139
+ */
140
+ list() {
141
+ const _super = Object.create(null, { list: { get: () => super.list } });
142
+ return __awaiter(this, arguments, void 0, function* (filter = {}) {
143
+ return _super.list.call(this, filter);
144
+ });
145
+ }
146
+ /**
147
+ * Removes user.
148
+ *
149
+ * @param {number|IIdentified} entityOrId User's id or user object.
150
+ *
151
+ * @returns Returns promise object that is resolved with the IResult of null.
152
+ *
153
+ * **Example**
154
+ * ```typescript
155
+ *
156
+ * const userId: string = "uniqueUserId";
157
+ *
158
+ * (async () => {
159
+ * const {data, res} = await userService.delete(userGroupId);
160
+ * })();
161
+ * ```
162
+ */
163
+ delete(entityOrId) {
164
+ const _super = Object.create(null, { delete: { get: () => super.delete } });
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ return _super.delete.call(this, entityOrId);
167
+ });
168
+ }
169
+ /**
170
+ * Create instance of User Inventory Role Service related with given User.
171
+ *
172
+ * @param {string|number|IUser} entityOrId User's id or user object.
173
+ *
174
+ * @returns Returns UserInventoryRoleService object that is related with given User.
175
+ *
176
+ * **Example**
177
+ * ```typescript
178
+ *
179
+ * const userId: string = "uniqueUserId";
180
+ *
181
+ * const userInventoryRoleService = userService.inventoryAssignment(userGroupId);
182
+ * (async () => {
183
+ * const {data, res} = await userInventoryRoleService.create(...);
184
+ * })();
185
+ * ```
186
+ */
187
+ inventoryAssignment(entityOrId) {
188
+ return new UserInventoryRoleService(this.getDetailUrl(entityOrId), this.client);
189
+ }
190
+ /**
191
+ * Gets user that is currently logged in.
192
+ *
193
+ * @returns Returns promise object that is resolved with the IUser wrapped by IResult.
194
+ *
195
+ * Note that this method will fail to retrieve the current user if the user is a service user.
196
+ *
197
+ * **Example**
198
+ * ```typescript
199
+ *
200
+ * (async () => {
201
+ * const {data, res} = await userService.current();
202
+ * })();
203
+ * ```
204
+ */
205
+ current() {
206
+ return __awaiter(this, void 0, void 0, function* () {
207
+ const res = yield this.fetch(this.currentUserUrl, { headers: {
208
+ "content-type": "application/json",
209
+ Accept: "application/vnd.com.nsn.cumulocity.user+json;"
210
+ } });
211
+ return {
212
+ res,
213
+ data: yield res.json()
214
+ };
215
+ });
216
+ }
217
+ /**
218
+ * Gets user that is currently logged in with the list of all roles assigned.
219
+ *
220
+ * @returns Returns promise object that is resolved with the ICurrenUser wrapped by IResult.
221
+ *
222
+ * **Example**
223
+ * ```typescript
224
+ *
225
+ * (async () => {
226
+ * const {data, res} = await userService.currentWithEffectiveRoles();
227
+ * })();
228
+ * ```
229
+ */
230
+ currentWithEffectiveRoles() {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ const res = yield this.fetch(this.currentUserUrl, { headers: {
233
+ "content-type": "application/json",
234
+ Accept: "application/vnd.com.nsn.cumulocity.currentUser+json;"
235
+ } });
236
+ return {
237
+ res,
238
+ data: yield res.json()
239
+ };
240
+ });
241
+ }
242
+ /**
243
+ * Updates the current user
244
+ *
245
+ * @param {IUser} user The user object with the properties to be updated
246
+ *
247
+ * @return Returns promise object resolved with the IUser wrapped by IResult
248
+ */
249
+ updateCurrent(user) {
250
+ return __awaiter(this, void 0, void 0, function* () {
251
+ const mimeType = "application/vnd.com.nsn.cumulocity.user+json";
252
+ const headers = {
253
+ "content-type": mimeType,
254
+ Accept: mimeType
255
+ };
256
+ const body = JSON.stringify(this.onBeforeUpdate(user));
257
+ const res = yield this.fetch(this.currentUserUrl, {
258
+ headers,
259
+ body,
260
+ method: "PUT"
261
+ });
262
+ return {
263
+ res,
264
+ data: yield res.json()
265
+ };
266
+ });
267
+ }
268
+ /**
269
+ * Sends an email message with a link allowing user to reset their password.
270
+ *
271
+ * @param {string} email The email address to send the message to.
272
+ * @param {string} tenantId The id of user's tenant (if cannot be inferred from URL).
273
+ *
274
+ * @returns Returns a request result object.
275
+ *
276
+ * **Example**
277
+ * ```typescript
278
+ * const email = 'user@example.com';
279
+ * const tenantId = 't123456';
280
+ *
281
+ * (async () => {
282
+ * const { res, data } = await userService.sendPasswordResetMail(email, tenantId);
283
+ * })();
284
+ * ```
285
+ */
286
+ sendPasswordResetMail(email, tenantId) {
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ const headers = {
289
+ "content-type": "application/json",
290
+ accept: "application/json"
291
+ };
292
+ const method = "POST";
293
+ const url = this.passwordResetUrl;
294
+ const params = tenantId ? { tenantId } : {};
295
+ const body = JSON.stringify({ email });
296
+ return {
297
+ res: yield this.fetch(url, {
298
+ headers,
299
+ method,
300
+ params,
301
+ body
302
+ }),
303
+ data: null
304
+ };
305
+ });
306
+ }
307
+ /**
308
+ * Resets user's password to a new one.
309
+ *
310
+ * @param {IResetPassword} newPassword Object with token, user's email, new password and its strength indicator.
311
+ * @param {string} tenantId The id of user's tenant (if cannot be inferred from URL).
312
+ *
313
+ * @returns Returns a request result object.
314
+ *
315
+ * **Example**
316
+ * ```typescript
317
+ * const newPassword: IResetPassword = {
318
+ * token: '123123ASDAWERER@#!WEDS$@#!WADA#A#EA#EA#EA',
319
+ * email: 'user@example.com',
320
+ * newPassword: 'myNewPassword',
321
+ * passwordStrength: PasswordStrength.GREEN
322
+ * };
323
+ * const tenantId = 't123456';
324
+ *
325
+ * (async () => {
326
+ * const { res, data } = await userService.resetPassword(newPassword, tenantId);
327
+ * })();
328
+ * ```
329
+ */
330
+ resetPassword(newPassword, tenantId) {
331
+ return __awaiter(this, void 0, void 0, function* () {
332
+ const headers = {
333
+ "content-type": "application/json",
334
+ accept: "application/json"
335
+ };
336
+ const method = "PUT";
337
+ const url = this.passwordResetUrl;
338
+ const params = tenantId ? { tenantId } : {};
339
+ const body = JSON.stringify(newPassword);
340
+ return {
341
+ res: yield this.fetch(url, {
342
+ headers,
343
+ method,
344
+ params,
345
+ body
346
+ }),
347
+ data: null
348
+ };
349
+ });
350
+ }
351
+ /**
352
+ * Validates a password reset token for a specific user and tenant.
353
+ *
354
+ * @param token - The reset token to validate.
355
+ * @param email - The email address of the user.
356
+ * @returns A promise that resolves to an IResult object containing the response and null data.
357
+ *
358
+ * @example
359
+ * ```typescript
360
+ * async function checkTokenStatus(token: string, email: string) {
361
+ * try {
362
+ * await userService.validateResetToken(token, email);
363
+ * return 'valid';
364
+ * } catch (e) {
365
+ * if (e.res?.status === 422) {
366
+ * return 'expired';
367
+ * } else {
368
+ * return 'invalid';
369
+ * }
370
+ * }
371
+ * }
372
+ * ```
373
+ */
374
+ validateResetToken(token, email) {
375
+ return __awaiter(this, void 0, void 0, function* () {
376
+ const headers = {
377
+ "content-type": "application/json",
378
+ accept: "application/json"
379
+ };
380
+ const method = "GET";
381
+ const url = this.validateResetTokenUrl;
382
+ const params = {
383
+ token,
384
+ email
385
+ };
386
+ return {
387
+ res: yield this.fetch(url, {
388
+ headers,
389
+ method,
390
+ params
391
+ }),
392
+ data: null
393
+ };
394
+ });
395
+ }
396
+ /**
397
+ * Verifies TFA code which is sent via SMS. If invoked with string '0', new TFA code will be sent.
398
+ *
399
+ * @param {string} pin The code to verify.
400
+ *
401
+ * @returns Returns a status object.
402
+ *
403
+ * **Example**
404
+ * ```typescript
405
+ *
406
+ * (async () => {
407
+ * const {data, res} = await userService.verifyTFACode('123123');
408
+ * })();
409
+ * ```
410
+ */
411
+ verifyTFACode(pin) {
412
+ return __awaiter(this, void 0, void 0, function* () {
413
+ const method = "POST";
414
+ const body = JSON.stringify({ pin });
415
+ return {
416
+ res: yield this.fetch(this.verifyTFACodeUrl, {
417
+ headers: {
418
+ "content-type": "application/json",
419
+ accept: "application/json"
420
+ },
421
+ body,
422
+ method
423
+ }),
424
+ data: null
425
+ };
426
+ });
427
+ }
428
+ /**
429
+ * Verifies TFA code which is generated by a TOTP app.
430
+ *
431
+ * @param {string} code The code to verify.
432
+ *
433
+ * @returns Returns a status object.
434
+ *
435
+ * **Example**
436
+ * ```typescript
437
+ *
438
+ * (async () => {
439
+ * const {data, res} = await userService.verifyTotpCode('123123');
440
+ * })();
441
+ * ```
442
+ */
443
+ verifyTotpCode(code) {
444
+ return __awaiter(this, void 0, void 0, function* () {
445
+ const method = "POST";
446
+ const headers = { "content-type": "application/json" };
447
+ const body = JSON.stringify({ code });
448
+ return {
449
+ res: yield this.fetch(this.verifyTOTPCodeUrl, {
450
+ headers,
451
+ body,
452
+ method
453
+ }),
454
+ data: null
455
+ };
456
+ });
457
+ }
458
+ /**
459
+ * Verifies TFA code which is generated by a TOTP app.
460
+ *
461
+ * @returns Returns a status object.
462
+ *
463
+ * **Example**
464
+ * ```typescript
465
+ *
466
+ * (async () => {
467
+ * const {data, res} = await userService.activateTotp();
468
+ * })();
469
+ * ```
470
+ */
471
+ activateTotp() {
472
+ return __awaiter(this, void 0, void 0, function* () {
473
+ const method = "POST";
474
+ const headers = { "content-type": "application/json" };
475
+ const body = JSON.stringify({ isActive: true });
476
+ return {
477
+ res: yield this.fetch(this.activateTOTPCodeUrl, {
478
+ headers,
479
+ body,
480
+ method
481
+ }),
482
+ data: null
483
+ };
484
+ });
485
+ }
486
+ /**
487
+ * Checks if TOTP is activated and enforced.
488
+ *
489
+ * @returns Returns an object of ITotpStatus if it is active.
490
+ *
491
+ * **Example**
492
+ * ```typescript
493
+ *
494
+ * (async () => {
495
+ * const {data, res} = await userService.getActivityTotp();
496
+ * console.log(data.isActive);
497
+ * })();
498
+ * ```
499
+ */
500
+ getActivityTotp() {
501
+ return __awaiter(this, void 0, void 0, function* () {
502
+ const method = "GET";
503
+ const res = yield this.fetch(this.activateTOTPCodeUrl, {
504
+ headers: { "content-type": "application/json" },
505
+ method
506
+ });
507
+ return {
508
+ res,
509
+ data: yield res.json()
510
+ };
511
+ });
512
+ }
513
+ /**
514
+ * Generates a secret which can be used to setup two-factor authentication with TOTP.
515
+ *
516
+ * @returns Returns the secret and an URL to a QR Code.
517
+ *
518
+ * **Example**
519
+ * ```typescript
520
+ *
521
+ * (async () => {
522
+ * const {data, res} = await userService.generateTotpSecret();
523
+ * console.log(secret);
524
+ * })();
525
+ * ```
526
+ */
527
+ generateTotpSecret() {
528
+ return __awaiter(this, void 0, void 0, function* () {
529
+ const method = "POST";
530
+ const res = yield this.fetch(this.totpCurrentUserURL, {
531
+ headers: {
532
+ "content-type": "application/json",
533
+ accept: "application/json"
534
+ },
535
+ method
536
+ });
537
+ return {
538
+ res,
539
+ data: yield res.json()
540
+ };
541
+ });
542
+ }
543
+ /**
544
+ * Revokes a specific user's TOTP secret.
545
+ *
546
+ * @param {IUser} user User whose TOTP secret to revoke.
547
+ *
548
+ * @returns Status object
549
+ */
550
+ totpRevokeSecret(user) {
551
+ return __awaiter(this, void 0, void 0, function* () {
552
+ const url = `${this.getDetailUrl(user)}/${this.revokeTOTPSecretUrl}`;
553
+ return {
554
+ res: yield this.fetch(url, {
555
+ headers: { accept: "application/json" },
556
+ method: "DELETE"
557
+ }),
558
+ data: null
559
+ };
560
+ });
561
+ }
562
+ /**
563
+ * Saves phone number for the current user.
564
+ * @param phoneNumber Phone number to save.
565
+ * @returns Server response and data with updated current user object.
566
+ */
567
+ savePhoneNumber(phoneNumber) {
568
+ return __awaiter(this, void 0, void 0, function* () {
569
+ const url = this.currentUserPhoneUrl;
570
+ const options = {
571
+ method: "PUT",
572
+ headers: {
573
+ "content-type": "application/json",
574
+ accept: "application/json"
575
+ },
576
+ body: JSON.stringify({ phone: phoneNumber })
577
+ };
578
+ const res = yield this.fetch(url, options);
579
+ return {
580
+ res,
581
+ data: yield res.json()
582
+ };
583
+ });
584
+ }
585
+ /**
586
+ * Gets the list of emails of users subscribed for newsletter
587
+ * on the current tenant and its subtenants.
588
+ * @returns Server response and data with email addresses as plain text.
589
+ */
590
+ getNewsletterEmails() {
591
+ return __awaiter(this, void 0, void 0, function* () {
592
+ const url = this.newsletterEmailsUrl;
593
+ const res = yield this.fetch(url, {
594
+ method: "GET",
595
+ headers: { accept: "text/plain" }
596
+ });
597
+ return {
598
+ res,
599
+ data: yield res.text()
600
+ };
601
+ });
602
+ }
603
+ /**
604
+ * Changes password for user.
605
+ *
606
+ * @param {string | number | IUser} entityOrId User's id or user object.
607
+ * @param {string} newPassword New user password.
608
+ * @param {string} currentUserPassword The password of the currently logged user.
609
+ *
610
+ * @returns Returns a result object.
611
+ */
612
+ changeUserPassword(entityOrId, newPassword, currentUserPassword) {
613
+ return __awaiter(this, void 0, void 0, function* () {
614
+ const method = "PUT";
615
+ const headers = { "content-type": "application/json" };
616
+ const body = JSON.stringify({
617
+ newPassword,
618
+ currentUserPassword
619
+ });
620
+ return {
621
+ res: yield this.fetch(this.changeUserPasswordUrl(entityOrId), {
622
+ headers,
623
+ body,
624
+ method
625
+ }),
626
+ data: null
627
+ };
628
+ });
629
+ }
630
+ /**
631
+ * Changes password for current user.
632
+ *
633
+ * @param {string} newPassword New password for current user.
634
+ * @param {string} currentUserPassword The password of the currently logged user.
635
+ *
636
+ * @returns Returns a result object. During this action if preferred login mode is OAI_SECURE new jwt cookie will be set.
637
+ */
638
+ changeCurrentUserPassword(newPassword, currentUserPassword) {
639
+ return __awaiter(this, void 0, void 0, function* () {
640
+ const method = "PUT";
641
+ const headers = { "content-type": "application/json" };
642
+ const body = JSON.stringify({
643
+ newPassword,
644
+ currentUserPassword
645
+ });
646
+ return {
647
+ res: yield this.fetch(this.currentUserPasswordUrl, {
648
+ headers,
649
+ body,
650
+ method
651
+ }),
652
+ data: null
653
+ };
654
+ });
655
+ }
656
+ /**
657
+ * Revoke tokens for all users. All users logged with "OAI-Secure" or "Single sign-on redirect" will be logged out.
658
+ *
659
+ * @returns Returns a result object.
660
+ */
661
+ revokeTokens() {
662
+ return __awaiter(this, void 0, void 0, function* () {
663
+ const method = "POST";
664
+ return {
665
+ res: yield this.fetch(this.revokeAllTokensUrl, {
666
+ headers: { "content-type": "application/json" },
667
+ method
668
+ }),
669
+ data: null
670
+ };
671
+ });
672
+ }
673
+ hasRole(user, roleId) {
674
+ return this.hasRoleInUser(user, roleId) || this.hasRoleInGroups(user, roleId);
675
+ }
676
+ hasAllRoles(user, roleIds) {
677
+ return roleIds.every((roleId) => this.hasRole(user, roleId));
678
+ }
679
+ hasAnyRole(user, roleIds) {
680
+ return roleIds.some((roleId) => this.hasRole(user, roleId));
681
+ }
682
+ hasAnyGlobalRole(user, globalRoleIds) {
683
+ return globalRoleIds.some((globalRoleId) => this.hasGlobalRoleInUser(user, globalRoleId));
684
+ }
685
+ isDeviceUser(user) {
686
+ return user.id.match(/^device_/);
687
+ }
688
+ isServiceUser(user) {
689
+ return user.id.match(/^service_/);
690
+ }
691
+ onBeforeUpdate(user) {
692
+ const obj = Object.assign({}, user);
693
+ delete obj.id;
694
+ delete obj.userName;
695
+ return obj;
696
+ }
697
+ getDetailUrl(entityOrId) {
698
+ return `${this.listUrl}/${encodeURIComponent(this.getId(entityOrId))}`;
699
+ }
700
+ getId(entityOrId) {
701
+ let id;
702
+ if (typeof entityOrId === "object" && entityOrId.id) id = entityOrId.id;
703
+ else if (typeof entityOrId === "object" && entityOrId.userName) id = entityOrId.userName;
704
+ else id = entityOrId;
705
+ return String(id);
706
+ }
707
+ hasRoleInUser(user, roleId) {
708
+ const effectiveRoles = user.effectiveRoles || [];
709
+ return this.hasRoleInReferences(user && user.roles && user.roles.references || [], roleId) || effectiveRoles.some(({ id }) => roleId === id);
710
+ }
711
+ hasRoleInGroups(user, roleId) {
712
+ return (user && user.groups && user.groups.references || []).some((groupRef) => this.hasRoleInReferences(groupRef.group.roles.references, roleId));
713
+ }
714
+ hasRoleInReferences(references, roleId) {
715
+ return references.some((ref) => ref.role.id === roleId);
716
+ }
717
+ changeUserPasswordUrl(entityOrId) {
718
+ return `${this.client.tenant}/users/${this.getId(entityOrId)}/password`;
719
+ }
720
+ hasGlobalRoleInUser(user, globalRoleId) {
721
+ var _a;
722
+ return (((_a = user === null || user === void 0 ? void 0 : user.groups) === null || _a === void 0 ? void 0 : _a.references) || []).map((gR) => {
723
+ var _a;
724
+ return (_a = gR === null || gR === void 0 ? void 0 : gR.group) === null || _a === void 0 ? void 0 : _a.id;
725
+ }).some((id) => id === globalRoleId);
726
+ }
727
+ };
728
+
729
+ //#endregion
730
+ export { UserService };