@splitsoftware/splitio-commons 2.0.0-rc.3 → 2.0.0-rc.5

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 (527) hide show
  1. package/CHANGES.txt +1 -0
  2. package/cjs/integrations/pluggable.js +2 -2
  3. package/cjs/logger/sdkLogger.js +2 -2
  4. package/cjs/readiness/sdkReadinessManager.js +2 -21
  5. package/cjs/sdkClient/client.js +0 -1
  6. package/cjs/sdkClient/clientAttributesDecoration.js +9 -9
  7. package/cjs/sdkClient/clientCS.js +2 -2
  8. package/cjs/services/splitApi.js +13 -13
  9. package/cjs/services/splitHttpClient.js +2 -2
  10. package/cjs/storages/AbstractSplitsCacheAsync.js +1 -4
  11. package/cjs/storages/AbstractSplitsCacheSync.js +1 -4
  12. package/cjs/storages/dataLoader.js +5 -6
  13. package/cjs/storages/findLatencyIndex.js +1 -1
  14. package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
  15. package/cjs/storages/inMemory/AttributesCacheInMemory.js +10 -10
  16. package/cjs/storages/inMemory/EventsCacheInMemory.js +1 -1
  17. package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
  18. package/cjs/storages/inMemory/InMemoryStorage.js +1 -1
  19. package/cjs/storages/inMemory/InMemoryStorageCS.js +1 -1
  20. package/cjs/storages/inMemory/UniqueKeysCacheInMemoryCS.js +1 -1
  21. package/cjs/storages/inRedis/SplitsCacheInRedis.js +1 -3
  22. package/cjs/storages/inRedis/TelemetryCacheInRedis.js +3 -3
  23. package/cjs/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
  24. package/cjs/storages/pluggable/EventsCachePluggable.js +1 -1
  25. package/cjs/storages/pluggable/ImpressionsCachePluggable.js +1 -1
  26. package/cjs/storages/pluggable/SegmentsCachePluggable.js +1 -1
  27. package/cjs/storages/pluggable/SplitsCachePluggable.js +3 -3
  28. package/cjs/storages/pluggable/TelemetryCachePluggable.js +3 -3
  29. package/cjs/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
  30. package/cjs/storages/pluggable/inMemoryWrapper.js +1 -1
  31. package/cjs/storages/pluggable/index.js +1 -1
  32. package/cjs/storages/pluggable/wrapperAdapter.js +2 -2
  33. package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
  34. package/cjs/sync/offline/syncManagerOffline.js +1 -1
  35. package/cjs/sync/polling/updaters/mySegmentsUpdater.js +3 -3
  36. package/cjs/sync/polling/updaters/segmentChangesUpdater.js +8 -8
  37. package/cjs/sync/polling/updaters/splitChangesUpdater.js +13 -13
  38. package/cjs/sync/streaming/AuthClient/index.js +2 -2
  39. package/cjs/sync/streaming/SSEClient/index.js +4 -7
  40. package/cjs/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
  41. package/cjs/sync/streaming/SSEHandler/NotificationParser.js +5 -4
  42. package/cjs/sync/streaming/SSEHandler/index.js +2 -2
  43. package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
  44. package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
  45. package/cjs/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
  46. package/cjs/sync/streaming/parseUtils.js +13 -13
  47. package/cjs/sync/syncManagerOnline.js +2 -2
  48. package/cjs/sync/syncTask.js +4 -4
  49. package/cjs/trackers/eventTracker.js +2 -2
  50. package/cjs/trackers/impressionsTracker.js +5 -5
  51. package/cjs/trackers/strategy/strategyDebug.js +1 -1
  52. package/cjs/trackers/strategy/strategyNone.js +2 -2
  53. package/cjs/trackers/strategy/strategyOptimized.js +2 -2
  54. package/cjs/trackers/uniqueKeysTracker.js +3 -3
  55. package/cjs/utils/Backoff.js +0 -4
  56. package/cjs/utils/Semver.js +1 -1
  57. package/cjs/utils/base64/index.js +2 -2
  58. package/cjs/utils/decompress/index.js +4 -4
  59. package/cjs/utils/lang/binarySearch.js +2 -2
  60. package/cjs/utils/murmur3/murmur3_128.js +1 -1
  61. package/cjs/utils/murmur3/murmur3_128_x86.js +1 -1
  62. package/cjs/utils/murmur3/murmur3_64.js +1 -1
  63. package/cjs/utils/murmur3/utfx.js +10 -17
  64. package/cjs/utils/promise/wrapper.js +2 -2
  65. package/cjs/utils/settingsValidation/index.js +2 -2
  66. package/cjs/utils/settingsValidation/integrations/common.js +4 -4
  67. package/cjs/utils/settingsValidation/integrations/configurable.js +3 -3
  68. package/cjs/utils/settingsValidation/integrations/pluggable.js +2 -2
  69. package/cjs/utils/settingsValidation/logger/builtinLogger.js +1 -1
  70. package/cjs/utils/settingsValidation/logger/commons.js +1 -1
  71. package/cjs/utils/settingsValidation/logger/pluggableLogger.js +1 -1
  72. package/cjs/utils/settingsValidation/splitFilters.js +8 -11
  73. package/cjs/utils/settingsValidation/storage/storageCS.js +2 -2
  74. package/cjs/utils/settingsValidation/url.js +3 -3
  75. package/esm/integrations/pluggable.js +2 -2
  76. package/esm/logger/sdkLogger.js +2 -2
  77. package/esm/readiness/sdkReadinessManager.js +2 -21
  78. package/esm/sdkClient/client.js +0 -1
  79. package/esm/sdkClient/clientAttributesDecoration.js +9 -9
  80. package/esm/sdkClient/clientCS.js +2 -2
  81. package/esm/services/splitApi.js +13 -13
  82. package/esm/services/splitHttpClient.js +2 -2
  83. package/esm/storages/AbstractSplitsCacheAsync.js +1 -4
  84. package/esm/storages/AbstractSplitsCacheSync.js +1 -4
  85. package/esm/storages/dataLoader.js +5 -6
  86. package/esm/storages/findLatencyIndex.js +1 -1
  87. package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
  88. package/esm/storages/inMemory/AttributesCacheInMemory.js +10 -10
  89. package/esm/storages/inMemory/EventsCacheInMemory.js +1 -1
  90. package/esm/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
  91. package/esm/storages/inMemory/InMemoryStorage.js +1 -1
  92. package/esm/storages/inMemory/InMemoryStorageCS.js +1 -1
  93. package/esm/storages/inMemory/UniqueKeysCacheInMemoryCS.js +1 -1
  94. package/esm/storages/inRedis/SplitsCacheInRedis.js +1 -3
  95. package/esm/storages/inRedis/TelemetryCacheInRedis.js +3 -3
  96. package/esm/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
  97. package/esm/storages/pluggable/EventsCachePluggable.js +1 -1
  98. package/esm/storages/pluggable/ImpressionsCachePluggable.js +1 -1
  99. package/esm/storages/pluggable/SegmentsCachePluggable.js +1 -1
  100. package/esm/storages/pluggable/SplitsCachePluggable.js +3 -3
  101. package/esm/storages/pluggable/TelemetryCachePluggable.js +3 -3
  102. package/esm/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
  103. package/esm/storages/pluggable/inMemoryWrapper.js +1 -1
  104. package/esm/storages/pluggable/index.js +1 -1
  105. package/esm/storages/pluggable/wrapperAdapter.js +2 -2
  106. package/esm/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
  107. package/esm/sync/offline/syncManagerOffline.js +1 -1
  108. package/esm/sync/polling/updaters/mySegmentsUpdater.js +3 -3
  109. package/esm/sync/polling/updaters/segmentChangesUpdater.js +8 -8
  110. package/esm/sync/polling/updaters/splitChangesUpdater.js +13 -13
  111. package/esm/sync/streaming/AuthClient/index.js +2 -2
  112. package/esm/sync/streaming/SSEClient/index.js +4 -7
  113. package/esm/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
  114. package/esm/sync/streaming/SSEHandler/NotificationParser.js +5 -4
  115. package/esm/sync/streaming/SSEHandler/index.js +2 -2
  116. package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
  117. package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
  118. package/esm/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
  119. package/esm/sync/streaming/parseUtils.js +13 -13
  120. package/esm/sync/syncManagerOnline.js +2 -2
  121. package/esm/sync/syncTask.js +4 -4
  122. package/esm/trackers/eventTracker.js +2 -2
  123. package/esm/trackers/impressionsTracker.js +5 -5
  124. package/esm/trackers/strategy/strategyDebug.js +1 -1
  125. package/esm/trackers/strategy/strategyNone.js +2 -2
  126. package/esm/trackers/strategy/strategyOptimized.js +2 -2
  127. package/esm/trackers/uniqueKeysTracker.js +3 -3
  128. package/esm/utils/Backoff.js +0 -4
  129. package/esm/utils/Semver.js +1 -1
  130. package/esm/utils/base64/index.js +2 -2
  131. package/esm/utils/decompress/index.js +4 -4
  132. package/esm/utils/lang/binarySearch.js +2 -2
  133. package/esm/utils/murmur3/murmur3_128.js +1 -1
  134. package/esm/utils/murmur3/murmur3_128_x86.js +1 -1
  135. package/esm/utils/murmur3/murmur3_64.js +1 -1
  136. package/esm/utils/murmur3/utfx.js +10 -17
  137. package/esm/utils/promise/wrapper.js +2 -2
  138. package/esm/utils/settingsValidation/index.js +2 -2
  139. package/esm/utils/settingsValidation/integrations/common.js +4 -4
  140. package/esm/utils/settingsValidation/integrations/configurable.js +3 -3
  141. package/esm/utils/settingsValidation/integrations/pluggable.js +2 -2
  142. package/esm/utils/settingsValidation/logger/builtinLogger.js +1 -1
  143. package/esm/utils/settingsValidation/logger/commons.js +1 -1
  144. package/esm/utils/settingsValidation/logger/pluggableLogger.js +1 -1
  145. package/esm/utils/settingsValidation/splitFilters.js +8 -11
  146. package/esm/utils/settingsValidation/storage/storageCS.js +2 -2
  147. package/esm/utils/settingsValidation/url.js +3 -3
  148. package/package.json +5 -3
  149. package/src/dtos/types.ts +1 -1
  150. package/src/evaluator/Engine.ts +1 -1
  151. package/src/evaluator/combiners/ifelseif.ts +1 -1
  152. package/src/evaluator/condition/index.ts +1 -1
  153. package/src/evaluator/index.ts +1 -1
  154. package/src/evaluator/parser/index.ts +1 -1
  155. package/src/evaluator/types.ts +1 -1
  156. package/src/evaluator/value/index.ts +1 -1
  157. package/src/evaluator/value/sanitize.ts +1 -1
  158. package/src/integrations/pluggable.ts +3 -3
  159. package/src/integrations/types.ts +3 -2
  160. package/src/listeners/browser.ts +3 -2
  161. package/src/logger/index.ts +6 -6
  162. package/src/logger/sdkLogger.ts +4 -4
  163. package/src/logger/types.ts +11 -13
  164. package/src/readiness/readinessManager.ts +5 -4
  165. package/src/readiness/sdkReadinessManager.ts +6 -23
  166. package/src/readiness/types.ts +5 -4
  167. package/src/sdkClient/client.ts +7 -8
  168. package/src/sdkClient/clientAttributesDecoration.ts +11 -11
  169. package/src/sdkClient/clientCS.ts +5 -5
  170. package/src/sdkClient/clientInputValidation.ts +3 -2
  171. package/src/sdkClient/identity.ts +1 -1
  172. package/src/sdkClient/sdkClient.ts +3 -3
  173. package/src/sdkClient/sdkClientMethod.ts +2 -2
  174. package/src/sdkClient/sdkClientMethodCS.ts +5 -5
  175. package/src/sdkFactory/index.ts +3 -3
  176. package/src/sdkFactory/types.ts +7 -6
  177. package/src/sdkManager/index.ts +2 -1
  178. package/src/services/splitApi.ts +13 -13
  179. package/src/services/splitHttpClient.ts +2 -2
  180. package/src/storages/AbstractMySegmentsCacheSync.ts +1 -1
  181. package/src/storages/AbstractSplitsCacheAsync.ts +1 -4
  182. package/src/storages/AbstractSplitsCacheSync.ts +1 -4
  183. package/src/storages/dataLoader.ts +7 -8
  184. package/src/storages/findLatencyIndex.ts +1 -1
  185. package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +1 -6
  186. package/src/storages/inMemory/AttributesCacheInMemory.ts +11 -11
  187. package/src/storages/inMemory/EventsCacheInMemory.ts +2 -2
  188. package/src/storages/inMemory/ImpressionsCacheInMemory.ts +5 -5
  189. package/src/storages/inMemory/InMemoryStorage.ts +1 -1
  190. package/src/storages/inMemory/InMemoryStorageCS.ts +1 -1
  191. package/src/storages/inMemory/UniqueKeysCacheInMemoryCS.ts +1 -1
  192. package/src/storages/inRedis/EventsCacheInRedis.ts +1 -1
  193. package/src/storages/inRedis/ImpressionsCacheInRedis.ts +2 -2
  194. package/src/storages/inRedis/SplitsCacheInRedis.ts +1 -3
  195. package/src/storages/inRedis/TelemetryCacheInRedis.ts +3 -3
  196. package/src/storages/inRedis/UniqueKeysCacheInRedis.ts +1 -1
  197. package/src/storages/pluggable/EventsCachePluggable.ts +2 -2
  198. package/src/storages/pluggable/ImpressionsCachePluggable.ts +3 -3
  199. package/src/storages/pluggable/SegmentsCachePluggable.ts +1 -1
  200. package/src/storages/pluggable/SplitsCachePluggable.ts +3 -3
  201. package/src/storages/pluggable/TelemetryCachePluggable.ts +3 -3
  202. package/src/storages/pluggable/UniqueKeysCachePluggable.ts +1 -1
  203. package/src/storages/pluggable/inMemoryWrapper.ts +1 -1
  204. package/src/storages/pluggable/index.ts +1 -1
  205. package/src/storages/pluggable/wrapperAdapter.ts +2 -2
  206. package/src/storages/types.ts +51 -68
  207. package/src/storages/utils.ts +3 -2
  208. package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +3 -3
  209. package/src/sync/offline/syncManagerOffline.ts +1 -1
  210. package/src/sync/polling/updaters/mySegmentsUpdater.ts +3 -3
  211. package/src/sync/polling/updaters/segmentChangesUpdater.ts +8 -8
  212. package/src/sync/polling/updaters/splitChangesUpdater.ts +13 -13
  213. package/src/sync/streaming/AuthClient/index.ts +2 -2
  214. package/src/sync/streaming/SSEClient/index.ts +4 -7
  215. package/src/sync/streaming/SSEHandler/NotificationKeeper.ts +1 -1
  216. package/src/sync/streaming/SSEHandler/NotificationParser.ts +5 -4
  217. package/src/sync/streaming/SSEHandler/index.ts +2 -2
  218. package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +3 -3
  219. package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +2 -2
  220. package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +4 -4
  221. package/src/sync/streaming/parseUtils.ts +13 -13
  222. package/src/sync/streaming/types.ts +2 -2
  223. package/src/sync/submitters/impressionsSubmitter.ts +2 -2
  224. package/src/sync/submitters/telemetrySubmitter.ts +4 -3
  225. package/src/sync/submitters/types.ts +1 -1
  226. package/src/sync/syncManagerOnline.ts +2 -2
  227. package/src/sync/syncTask.ts +4 -4
  228. package/src/trackers/eventTracker.ts +4 -3
  229. package/src/trackers/impressionObserver/ImpressionObserver.ts +4 -4
  230. package/src/trackers/impressionObserver/buildKey.ts +2 -2
  231. package/src/trackers/impressionObserver/impressionObserverCS.ts +2 -2
  232. package/src/trackers/impressionObserver/impressionObserverSS.ts +2 -2
  233. package/src/trackers/impressionObserver/types.ts +2 -2
  234. package/src/trackers/impressionsTracker.ts +8 -7
  235. package/src/trackers/strategy/strategyDebug.ts +3 -3
  236. package/src/trackers/strategy/strategyNone.ts +4 -4
  237. package/src/trackers/strategy/strategyOptimized.ts +5 -5
  238. package/src/trackers/types.ts +5 -5
  239. package/src/trackers/uniqueKeysTracker.ts +3 -3
  240. package/src/types.ts +37 -1355
  241. package/src/utils/Backoff.ts +0 -4
  242. package/src/utils/MinEventEmitter.ts +2 -3
  243. package/src/utils/MinEvents.ts +2 -2
  244. package/src/utils/Semver.ts +1 -1
  245. package/src/utils/base64/index.ts +2 -2
  246. package/src/utils/constants/index.ts +9 -10
  247. package/src/utils/decompress/index.ts +4 -4
  248. package/src/utils/inputValidation/attributes.ts +1 -1
  249. package/src/utils/inputValidation/eventProperties.ts +1 -1
  250. package/src/utils/inputValidation/key.ts +1 -1
  251. package/src/utils/inputValidation/preloadedData.ts +1 -2
  252. package/src/utils/inputValidation/trafficTypeExistence.ts +2 -2
  253. package/src/utils/key/index.ts +1 -1
  254. package/src/utils/lang/binarySearch.ts +2 -2
  255. package/src/utils/murmur3/murmur3_128.ts +1 -1
  256. package/src/utils/murmur3/murmur3_128_x86.ts +1 -1
  257. package/src/utils/murmur3/murmur3_64.ts +1 -1
  258. package/src/utils/murmur3/utfx.ts +10 -17
  259. package/src/utils/promise/wrapper.ts +2 -2
  260. package/src/utils/settingsValidation/consent.ts +2 -2
  261. package/src/utils/settingsValidation/impressionsMode.ts +1 -1
  262. package/src/utils/settingsValidation/index.ts +2 -2
  263. package/src/utils/settingsValidation/integrations/common.ts +4 -4
  264. package/src/utils/settingsValidation/integrations/configurable.ts +3 -3
  265. package/src/utils/settingsValidation/integrations/pluggable.ts +2 -2
  266. package/src/utils/settingsValidation/logger/builtinLogger.ts +3 -3
  267. package/src/utils/settingsValidation/logger/commons.ts +3 -3
  268. package/src/utils/settingsValidation/logger/pluggableLogger.ts +3 -3
  269. package/src/utils/settingsValidation/splitFilters.ts +9 -12
  270. package/src/utils/settingsValidation/storage/storageCS.ts +5 -4
  271. package/src/utils/settingsValidation/url.ts +3 -3
  272. package/types/index.d.ts +5 -5
  273. package/types/splitio.d.ts +1941 -0
  274. package/types/consent/index.d.ts +0 -2
  275. package/types/consent/sdkUserConsent.d.ts +0 -13
  276. package/types/dtos/types.d.ts +0 -209
  277. package/types/evaluator/Engine.d.ts +0 -15
  278. package/types/evaluator/combiners/and.d.ts +0 -4
  279. package/types/evaluator/combiners/ifelseif.d.ts +0 -3
  280. package/types/evaluator/condition/engineUtils.d.ts +0 -11
  281. package/types/evaluator/condition/index.d.ts +0 -6
  282. package/types/evaluator/convertions/index.d.ts +0 -2
  283. package/types/evaluator/index.d.ts +0 -8
  284. package/types/evaluator/matchers/all.d.ts +0 -1
  285. package/types/evaluator/matchers/between.d.ts +0 -2
  286. package/types/evaluator/matchers/boolean.d.ts +0 -1
  287. package/types/evaluator/matchers/cont_all.d.ts +0 -1
  288. package/types/evaluator/matchers/cont_any.d.ts +0 -1
  289. package/types/evaluator/matchers/cont_str.d.ts +0 -1
  290. package/types/evaluator/matchers/dependency.d.ts +0 -5
  291. package/types/evaluator/matchers/eq.d.ts +0 -1
  292. package/types/evaluator/matchers/eq_set.d.ts +0 -1
  293. package/types/evaluator/matchers/ew.d.ts +0 -1
  294. package/types/evaluator/matchers/gte.d.ts +0 -1
  295. package/types/evaluator/matchers/index.d.ts +0 -7
  296. package/types/evaluator/matchers/large_segment.d.ts +0 -5
  297. package/types/evaluator/matchers/lte.d.ts +0 -1
  298. package/types/evaluator/matchers/matcherTypes.d.ts +0 -10
  299. package/types/evaluator/matchers/part_of.d.ts +0 -1
  300. package/types/evaluator/matchers/segment.d.ts +0 -5
  301. package/types/evaluator/matchers/semver_between.d.ts +0 -2
  302. package/types/evaluator/matchers/semver_eq.d.ts +0 -1
  303. package/types/evaluator/matchers/semver_gte.d.ts +0 -1
  304. package/types/evaluator/matchers/semver_inlist.d.ts +0 -1
  305. package/types/evaluator/matchers/semver_lte.d.ts +0 -1
  306. package/types/evaluator/matchers/string.d.ts +0 -1
  307. package/types/evaluator/matchers/sw.d.ts +0 -1
  308. package/types/evaluator/matchers/whitelist.d.ts +0 -1
  309. package/types/evaluator/matchersTransform/index.d.ts +0 -6
  310. package/types/evaluator/matchersTransform/segment.d.ts +0 -5
  311. package/types/evaluator/matchersTransform/unaryNumeric.d.ts +0 -5
  312. package/types/evaluator/matchersTransform/whitelist.d.ts +0 -5
  313. package/types/evaluator/parser/index.d.ts +0 -5
  314. package/types/evaluator/treatments/index.d.ts +0 -8
  315. package/types/evaluator/types.d.ts +0 -28
  316. package/types/evaluator/value/index.d.ts +0 -7
  317. package/types/evaluator/value/sanitize.d.ts +0 -7
  318. package/types/integrations/pluggable.d.ts +0 -11
  319. package/types/integrations/types.d.ts +0 -18
  320. package/types/listeners/browser.d.ts +0 -40
  321. package/types/listeners/node.d.ts +0 -22
  322. package/types/listeners/types.d.ts +0 -4
  323. package/types/logger/browser/DebugLogger.d.ts +0 -2
  324. package/types/logger/browser/ErrorLogger.d.ts +0 -2
  325. package/types/logger/browser/InfoLogger.d.ts +0 -2
  326. package/types/logger/browser/WarnLogger.d.ts +0 -2
  327. package/types/logger/constants.d.ts +0 -134
  328. package/types/logger/index.d.ts +0 -21
  329. package/types/logger/messages/debug.d.ts +0 -1
  330. package/types/logger/messages/error.d.ts +0 -1
  331. package/types/logger/messages/info.d.ts +0 -1
  332. package/types/logger/messages/warn.d.ts +0 -1
  333. package/types/logger/sdkLogger.d.ts +0 -8
  334. package/types/logger/types.d.ts +0 -17
  335. package/types/readiness/constants.d.ts +0 -7
  336. package/types/readiness/readinessManager.d.ts +0 -6
  337. package/types/readiness/sdkReadinessManager.d.ts +0 -10
  338. package/types/readiness/types.d.ts +0 -67
  339. package/types/sdkClient/client.d.ts +0 -6
  340. package/types/sdkClient/clientAttributesDecoration.d.ts +0 -55
  341. package/types/sdkClient/clientCS.d.ts +0 -9
  342. package/types/sdkClient/clientInputValidation.d.ts +0 -7
  343. package/types/sdkClient/identity.d.ts +0 -2
  344. package/types/sdkClient/sdkClient.d.ts +0 -6
  345. package/types/sdkClient/sdkClientMethod.d.ts +0 -6
  346. package/types/sdkClient/sdkClientMethodCS.d.ts +0 -7
  347. package/types/sdkFactory/index.d.ts +0 -6
  348. package/types/sdkFactory/types.d.ts +0 -85
  349. package/types/sdkManager/index.d.ts +0 -4
  350. package/types/services/decorateHeaders.d.ts +0 -2
  351. package/types/services/splitApi.d.ts +0 -12
  352. package/types/services/splitHttpClient.d.ts +0 -10
  353. package/types/services/types.d.ts +0 -54
  354. package/types/storages/AbstractMySegmentsCacheSync.d.ts +0 -39
  355. package/types/storages/AbstractSplitsCacheAsync.d.ts +0 -38
  356. package/types/storages/AbstractSplitsCacheSync.d.ts +0 -43
  357. package/types/storages/KeyBuilder.d.ts +0 -22
  358. package/types/storages/KeyBuilderCS.d.ts +0 -20
  359. package/types/storages/KeyBuilderSS.d.ts +0 -20
  360. package/types/storages/dataLoader.d.ts +0 -10
  361. package/types/storages/findLatencyIndex.d.ts +0 -7
  362. package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +0 -15
  363. package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +0 -54
  364. package/types/storages/inLocalStorage/constants.d.ts +0 -2
  365. package/types/storages/inLocalStorage/index.d.ts +0 -8
  366. package/types/storages/inMemory/AttributesCacheInMemory.d.ts +0 -44
  367. package/types/storages/inMemory/EventsCacheInMemory.d.ts +0 -35
  368. package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +0 -28
  369. package/types/storages/inMemory/ImpressionsCacheInMemory.d.ts +0 -30
  370. package/types/storages/inMemory/InMemoryStorage.d.ts +0 -10
  371. package/types/storages/inMemory/InMemoryStorageCS.d.ts +0 -10
  372. package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +0 -16
  373. package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +0 -17
  374. package/types/storages/inMemory/SplitsCacheInMemory.d.ts +0 -27
  375. package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +0 -71
  376. package/types/storages/inMemory/UniqueKeysCacheInMemory.d.ts +0 -34
  377. package/types/storages/inMemory/UniqueKeysCacheInMemoryCS.d.ts +0 -35
  378. package/types/storages/inRedis/EventsCacheInRedis.d.ts +0 -32
  379. package/types/storages/inRedis/ImpressionCountsCacheInRedis.d.ts +0 -17
  380. package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +0 -17
  381. package/types/storages/inRedis/RedisAdapter.d.ts +0 -24
  382. package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +0 -21
  383. package/types/storages/inRedis/SplitsCacheInRedis.d.ts +0 -95
  384. package/types/storages/inRedis/TelemetryCacheInRedis.d.ts +0 -35
  385. package/types/storages/inRedis/UniqueKeysCacheInRedis.d.ts +0 -22
  386. package/types/storages/inRedis/constants.d.ts +0 -4
  387. package/types/storages/inRedis/index.d.ts +0 -10
  388. package/types/storages/pluggable/EventsCachePluggable.d.ts +0 -38
  389. package/types/storages/pluggable/ImpressionCountsCachePluggable.d.ts +0 -16
  390. package/types/storages/pluggable/ImpressionsCachePluggable.d.ts +0 -34
  391. package/types/storages/pluggable/SegmentsCachePluggable.d.ts +0 -42
  392. package/types/storages/pluggable/SplitsCachePluggable.d.ts +0 -98
  393. package/types/storages/pluggable/TelemetryCachePluggable.d.ts +0 -34
  394. package/types/storages/pluggable/UniqueKeysCachePluggable.d.ts +0 -20
  395. package/types/storages/pluggable/constants.d.ts +0 -1
  396. package/types/storages/pluggable/inMemoryWrapper.d.ts +0 -12
  397. package/types/storages/pluggable/index.d.ts +0 -9
  398. package/types/storages/pluggable/wrapperAdapter.d.ts +0 -12
  399. package/types/storages/types.d.ts +0 -407
  400. package/types/storages/utils.d.ts +0 -8
  401. package/types/sync/offline/LocalhostFromObject.d.ts +0 -1
  402. package/types/sync/offline/splitsParser/parseCondition.d.ts +0 -7
  403. package/types/sync/offline/splitsParser/splitsParserFromSettings.d.ts +0 -3
  404. package/types/sync/offline/splitsParser/types.d.ts +0 -3
  405. package/types/sync/offline/syncManagerOffline.d.ts +0 -10
  406. package/types/sync/offline/syncTasks/fromObjectSyncTask.d.ts +0 -17
  407. package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +0 -7
  408. package/types/sync/polling/fetchers/segmentChangesFetcher.d.ts +0 -7
  409. package/types/sync/polling/fetchers/splitChangesFetcher.d.ts +0 -7
  410. package/types/sync/polling/fetchers/types.d.ts +0 -5
  411. package/types/sync/polling/pollingManagerCS.d.ts +0 -7
  412. package/types/sync/polling/pollingManagerSS.d.ts +0 -6
  413. package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +0 -9
  414. package/types/sync/polling/syncTasks/segmentsSyncTask.d.ts +0 -9
  415. package/types/sync/polling/syncTasks/splitsSyncTask.d.ts +0 -9
  416. package/types/sync/polling/types.d.ts +0 -33
  417. package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +0 -14
  418. package/types/sync/polling/updaters/segmentChangesUpdater.d.ts +0 -18
  419. package/types/sync/polling/updaters/splitChangesUpdater.d.ts +0 -41
  420. package/types/sync/streaming/AuthClient/index.d.ts +0 -12
  421. package/types/sync/streaming/AuthClient/types.d.ts +0 -17
  422. package/types/sync/streaming/SSEClient/index.d.ts +0 -34
  423. package/types/sync/streaming/SSEClient/types.d.ts +0 -11
  424. package/types/sync/streaming/SSEHandler/NotificationKeeper.d.ts +0 -14
  425. package/types/sync/streaming/SSEHandler/NotificationParser.d.ts +0 -20
  426. package/types/sync/streaming/SSEHandler/index.d.ts +0 -11
  427. package/types/sync/streaming/SSEHandler/types.d.ts +0 -72
  428. package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +0 -9
  429. package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +0 -9
  430. package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +0 -14
  431. package/types/sync/streaming/UpdateWorkers/constants.d.ts +0 -3
  432. package/types/sync/streaming/UpdateWorkers/types.d.ts +0 -4
  433. package/types/sync/streaming/constants.d.ts +0 -34
  434. package/types/sync/streaming/parseUtils.d.ts +0 -34
  435. package/types/sync/streaming/pushManager.d.ts +0 -9
  436. package/types/sync/streaming/types.d.ts +0 -35
  437. package/types/sync/submitters/eventsSubmitter.d.ts +0 -5
  438. package/types/sync/submitters/impressionCountsSubmitter.d.ts +0 -10
  439. package/types/sync/submitters/impressionsSubmitter.d.ts +0 -11
  440. package/types/sync/submitters/submitter.d.ts +0 -12
  441. package/types/sync/submitters/submitterManager.d.ts +0 -3
  442. package/types/sync/submitters/telemetrySubmitter.d.ts +0 -17
  443. package/types/sync/submitters/types.d.ts +0 -217
  444. package/types/sync/submitters/uniqueKeysSubmitter.d.ts +0 -5
  445. package/types/sync/syncManagerOnline.d.ts +0 -13
  446. package/types/sync/syncTask.d.ts +0 -13
  447. package/types/sync/types.d.ts +0 -43
  448. package/types/trackers/eventTracker.d.ts +0 -10
  449. package/types/trackers/impressionObserver/ImpressionObserver.d.ts +0 -8
  450. package/types/trackers/impressionObserver/buildKey.d.ts +0 -2
  451. package/types/trackers/impressionObserver/impressionObserverCS.d.ts +0 -4
  452. package/types/trackers/impressionObserver/impressionObserverSS.d.ts +0 -4
  453. package/types/trackers/impressionObserver/types.d.ts +0 -4
  454. package/types/trackers/impressionsTracker.d.ts +0 -13
  455. package/types/trackers/strategy/strategyDebug.d.ts +0 -9
  456. package/types/trackers/strategy/strategyNone.d.ts +0 -10
  457. package/types/trackers/strategy/strategyOptimized.d.ts +0 -11
  458. package/types/trackers/telemetryTracker.d.ts +0 -3
  459. package/types/trackers/types.d.ts +0 -68
  460. package/types/trackers/uniqueKeysTracker.d.ts +0 -13
  461. package/types/types.d.ts +0 -1398
  462. package/types/utils/Backoff.d.ts +0 -25
  463. package/types/utils/LRUCache/LinkedList.d.ts +0 -34
  464. package/types/utils/LRUCache/index.d.ts +0 -15
  465. package/types/utils/MinEventEmitter.d.ts +0 -12
  466. package/types/utils/MinEvents.d.ts +0 -4
  467. package/types/utils/Semver.d.ts +0 -15
  468. package/types/utils/base64/index.d.ts +0 -30
  469. package/types/utils/constants/browser.d.ts +0 -1
  470. package/types/utils/constants/index.d.ts +0 -83
  471. package/types/utils/decompress/index.d.ts +0 -16
  472. package/types/utils/env/isLocalStorageAvailable.d.ts +0 -1
  473. package/types/utils/env/isNode.d.ts +0 -5
  474. package/types/utils/inputValidation/apiKey.d.ts +0 -7
  475. package/types/utils/inputValidation/attribute.d.ts +0 -2
  476. package/types/utils/inputValidation/attributes.d.ts +0 -4
  477. package/types/utils/inputValidation/event.d.ts +0 -2
  478. package/types/utils/inputValidation/eventProperties.d.ts +0 -6
  479. package/types/utils/inputValidation/eventValue.d.ts +0 -2
  480. package/types/utils/inputValidation/index.d.ts +0 -13
  481. package/types/utils/inputValidation/isOperational.d.ts +0 -4
  482. package/types/utils/inputValidation/key.d.ts +0 -3
  483. package/types/utils/inputValidation/preloadedData.d.ts +0 -3
  484. package/types/utils/inputValidation/split.d.ts +0 -2
  485. package/types/utils/inputValidation/splitExistence.d.ts +0 -7
  486. package/types/utils/inputValidation/splits.d.ts +0 -2
  487. package/types/utils/inputValidation/trafficType.d.ts +0 -2
  488. package/types/utils/inputValidation/trafficTypeExistence.d.ts +0 -9
  489. package/types/utils/jwt/index.d.ts +0 -5
  490. package/types/utils/jwt/types.d.ts +0 -5
  491. package/types/utils/key/index.d.ts +0 -8
  492. package/types/utils/labels/index.d.ts +0 -8
  493. package/types/utils/lang/binarySearch.d.ts +0 -9
  494. package/types/utils/lang/getFnName.d.ts +0 -4
  495. package/types/utils/lang/getGlobal.d.ts +0 -4
  496. package/types/utils/lang/index.d.ts +0 -105
  497. package/types/utils/lang/objectAssign.d.ts +0 -6
  498. package/types/utils/lang/sets.d.ts +0 -3
  499. package/types/utils/murmur3/common.d.ts +0 -12
  500. package/types/utils/murmur3/legacy.d.ts +0 -2
  501. package/types/utils/murmur3/murmur3.d.ts +0 -2
  502. package/types/utils/murmur3/murmur3_128.d.ts +0 -6
  503. package/types/utils/murmur3/murmur3_128_x86.d.ts +0 -7
  504. package/types/utils/murmur3/murmur3_64.d.ts +0 -10
  505. package/types/utils/murmur3/utfx.d.ts +0 -27
  506. package/types/utils/promise/thenable.d.ts +0 -1
  507. package/types/utils/promise/timeout.d.ts +0 -1
  508. package/types/utils/promise/wrapper.d.ts +0 -21
  509. package/types/utils/settingsValidation/consent.d.ts +0 -6
  510. package/types/utils/settingsValidation/impressionsMode.d.ts +0 -3
  511. package/types/utils/settingsValidation/index.d.ts +0 -50
  512. package/types/utils/settingsValidation/integrations/common.d.ts +0 -14
  513. package/types/utils/settingsValidation/integrations/configurable.d.ts +0 -13
  514. package/types/utils/settingsValidation/integrations/pluggable.d.ts +0 -13
  515. package/types/utils/settingsValidation/logger/builtinLogger.d.ts +0 -10
  516. package/types/utils/settingsValidation/logger/commons.d.ts +0 -9
  517. package/types/utils/settingsValidation/logger/pluggableLogger.d.ts +0 -11
  518. package/types/utils/settingsValidation/mode.d.ts +0 -5
  519. package/types/utils/settingsValidation/runtime.d.ts +0 -2
  520. package/types/utils/settingsValidation/splitFilters.d.ts +0 -17
  521. package/types/utils/settingsValidation/storage/storageCS.d.ts +0 -21
  522. package/types/utils/settingsValidation/types.d.ts +0 -30
  523. package/types/utils/settingsValidation/url.d.ts +0 -10
  524. package/types/utils/time/index.d.ts +0 -4
  525. package/types/utils/timeTracker/now/browser.d.ts +0 -1
  526. package/types/utils/timeTracker/now/node.d.ts +0 -1
  527. package/types/utils/timeTracker/timer.d.ts +0 -1
@@ -51,8 +51,8 @@ interface ISplitMutations {
51
51
  * If there are defined filters and one feature flag doesn't match with them, its status is changed to 'ARCHIVE' to avoid storing it
52
52
  * If there are set filter defined, names filter is ignored
53
53
  *
54
- * @param featureFlag feature flag to be evaluated
55
- * @param filters splitFiltersValidation bySet | byName
54
+ * @param featureFlag - feature flag to be evaluated
55
+ * @param filters - splitFiltersValidation bySet | byName
56
56
  */
57
57
  function matchFilters(featureFlag: ISplit, filters: ISplitFiltersValidation) {
58
58
  const { bySet: setsFilter, byName: namesFilter, byPrefix: prefixFilter } = filters.groupedFilters;
@@ -100,13 +100,13 @@ export function computeSplitsMutation(entries: ISplit[], filters: ISplitFiltersV
100
100
  * - updates `splitsCache`
101
101
  * - uses `splitsEventEmitter` to emit events related to split data updates
102
102
  *
103
- * @param log Logger instance
104
- * @param splitChangesFetcher Fetcher of `/splitChanges`
105
- * @param splits Splits storage, with sync or async methods
106
- * @param segments Segments storage, with sync or async methods
107
- * @param splitsEventEmitter Optional readiness manager. Not required for synchronizer or producer mode.
108
- * @param requestTimeoutBeforeReady How long the updater will wait for the request to timeout. Default 0, i.e., never timeout.
109
- * @param retriesOnFailureBeforeReady How many retries on `/splitChanges` we the updater do in case of failure or timeout. Default 0, i.e., no retries.
103
+ * @param log - Logger instance
104
+ * @param splitChangesFetcher - Fetcher of `/splitChanges`
105
+ * @param splits - Splits storage, with sync or async methods
106
+ * @param segments - Segments storage, with sync or async methods
107
+ * @param splitsEventEmitter - Optional readiness manager. Not required for synchronizer or producer mode.
108
+ * @param requestTimeoutBeforeReady - How long the updater will wait for the request to timeout. Default 0, i.e., never timeout.
109
+ * @param retriesOnFailureBeforeReady - How many retries on `/splitChanges` we the updater do in case of failure or timeout. Default 0, i.e., no retries.
110
110
  */
111
111
  export function splitChangesUpdaterFactory(
112
112
  log: ILogger,
@@ -142,14 +142,14 @@ export function splitChangesUpdaterFactory(
142
142
  * SplitChanges updater returns a promise that resolves with a `false` boolean value if it fails to fetch splits or synchronize them with the storage.
143
143
  * Returned promise will not be rejected.
144
144
  *
145
- * @param {boolean | undefined} noCache true to revalidate data to fetch
146
- * @param {boolean | undefined} till query param to bypass CDN requests
145
+ * @param noCache - true to revalidate data to fetch
146
+ * @param till - query param to bypass CDN requests
147
147
  */
148
148
  return function splitChangesUpdater(noCache?: boolean, till?: number, splitUpdateNotification?: { payload: ISplit, changeNumber: number }) {
149
149
 
150
150
  /**
151
- * @param {number} since current changeNumber at splitsCache
152
- * @param {number} retry current number of retry attempts
151
+ * @param since - current changeNumber at splitsCache
152
+ * @param retry - current number of retry attempts
153
153
  */
154
154
  function _splitChangesUpdater(since: number, retry = 0): Promise<boolean> {
155
155
  log.debug(SYNC_SPLITS_FETCH, [since]);
@@ -8,13 +8,13 @@ import { hash } from '../../../utils/murmur3/murmur3';
8
8
  /**
9
9
  * Factory of authentication function.
10
10
  *
11
- * @param fetchAuth `SplitAPI.fetchAuth` endpoint
11
+ * @param fetchAuth - `SplitAPI.fetchAuth` endpoint
12
12
  */
13
13
  export function authenticateFactory(fetchAuth: IFetchAuth): IAuthenticate {
14
14
 
15
15
  /**
16
16
  * Run authentication requests to Auth Server, and returns a promise that resolves with the decoded JTW token.
17
- * @param {string[] | undefined} userKeys set of user Keys to track membership updates. It is undefined for server-side API.
17
+ * @param userKeys - set of user Keys to track membership updates. It is undefined for server-side API.
18
18
  */
19
19
  return function authenticate(userKeys?: string[]): Promise<IAuthToken> {
20
20
  return fetchAuth(userKeys)
@@ -14,8 +14,8 @@ const CONTROL_CHANNEL_REGEX = /^control_/;
14
14
  /**
15
15
  * Build metadata headers for SSE connection.
16
16
  *
17
- * @param {ISettings} settings Validated settings.
18
- * @returns {Record<string, string>} Headers object
17
+ * @param settings - Validated settings.
18
+ * @returns Headers object
19
19
  */
20
20
  function buildSSEHeaders(settings: ISettings) {
21
21
  const headers: Record<string, string> = {
@@ -45,8 +45,8 @@ export class SSEClient implements ISSEClient {
45
45
  /**
46
46
  * SSEClient constructor.
47
47
  *
48
- * @param settings Validated settings.
49
- * @param platform object containing environment-specific dependencies
48
+ * @param settings - Validated settings.
49
+ * @param platform - object containing environment-specific dependencies
50
50
  * @throws 'EventSource API is not available.' if EventSource is not available.
51
51
  */
52
52
  constructor(private settings: ISettings, { getEventSource, getOptions }: IPlatform) {
@@ -64,9 +64,6 @@ export class SSEClient implements ISSEClient {
64
64
 
65
65
  /**
66
66
  * Open the connection with a given authToken
67
- *
68
- * @param {IAuthTokenPushEnabled} authToken
69
- * @throws {TypeError} Will throw an error if `authToken` is undefined
70
67
  */
71
68
  open(authToken: IAuthTokenPushEnabled) {
72
69
  this.close(); // it closes connection if previously opened
@@ -10,7 +10,7 @@ const STREAMING_EVENT_TYPES: StreamingEventType[] = [OCCUPANCY_PRI, OCCUPANCY_SE
10
10
  /**
11
11
  * Factory of notification keeper, which process OCCUPANCY and CONTROL notifications and emits the corresponding push events.
12
12
  *
13
- * @param pushEmitter emitter for events related to streaming support
13
+ * @param pushEmitter - emitter for events related to streaming support
14
14
  */
15
15
  // @TODO update logic to handle OCCUPANCY for any region and rename according to new spec (e.g.: PUSH_SUBSYSTEM_UP --> PUSH_SUBSYSTEM_UP)
16
16
  export function notificationKeeperFactory(pushEmitter: IPushEventEmitter, telemetryTracker: ITelemetryTracker) {
@@ -7,8 +7,9 @@ import { INotificationMessage, INotificationError } from './types';
7
7
  * HTTP errors handled by Ably (e.g., 400 due to invalid token, 401 due to expired token, 500) have the `data` property.
8
8
  * Other network and HTTP errors do not have this property.
9
9
  *
10
- * @param {Object} error
11
- * @throws {SyntaxError} if `error.data` is an invalid JSON string
10
+ * @param error - The error event to parse
11
+ * @returns parsed notification error
12
+ * @throws SyntaxError if `error.data` is an invalid JSON string
12
13
  */
13
14
  export function errorParser(error: Event): INotificationError {
14
15
  // @ts-ignore
@@ -21,10 +22,10 @@ export function errorParser(error: Event): INotificationError {
21
22
  * Parses the `data` JSON string of a given SSE message notifications.
22
23
  * Also assigns the type OCCUPANCY, if it corresponds, so that all supported messages (e.g., SPLIT_UPDATE, CONTROL) have a type.
23
24
  *
24
- * @param message
25
+ * @param message - The message event to parse
25
26
  * @returns parsed notification message or undefined if the given event data is falsy (e.g, '' or undefined).
26
27
  * For example, the EventSource implementation of React-Native for iOS emits a message event with empty data for Ably keepalive comments.
27
- * @throws {SyntaxError} if `message.data` or `JSON.parse(message.data).data` are invalid JSON strings
28
+ * @throws SyntaxError if `message.data` or `JSON.parse(message.data).data` are invalid JSON strings
28
29
  */
29
30
  export function messageParser(message: MessageEvent): INotificationMessage | undefined {
30
31
  if (!message.data) return;
@@ -12,8 +12,8 @@ import { ITelemetryTracker } from '../../../trackers/types';
12
12
  /**
13
13
  * Factory for SSEHandler, which processes SSEClient messages and emits the corresponding push events.
14
14
  *
15
- * @param log factory logger
16
- * @param pushEmitter emitter for events related to streaming support
15
+ * @param log - factory logger
16
+ * @param pushEmitter - emitter for events related to streaming support
17
17
  */
18
18
  export function SSEHandlerFactory(log: ILogger, pushEmitter: IPushEventEmitter, telemetryTracker: ITelemetryTracker): ISseEventHandler {
19
19
 
@@ -87,9 +87,9 @@ export function MySegmentsUpdateWorker(log: ILogger, storage: Pick<IStorageSync,
87
87
  /**
88
88
  * Invoked by NotificationProcessor on MY_(LARGE)_SEGMENTS_UPDATE notifications
89
89
  *
90
- * @param changeNumber change number of the notification
91
- * @param segmentsData data for KeyList or SegmentRemoval instant updates
92
- * @param delay optional time to wait for BoundedFetchRequest or BoundedFetchRequest updates
90
+ * @param changeNumber - change number of the notification
91
+ * @param segmentsData - data for KeyList or SegmentRemoval instant updates
92
+ * @param delay - optional time to wait for BoundedFetchRequest or BoundedFetchRequest updates
93
93
  */
94
94
  put(mySegmentsData: Pick<MySegmentsData, 'type' | 'cn'>, payload?: Pick<MySegmentsData, 'added' | 'removed'>, delay?: number) {
95
95
  const { type, cn } = mySegmentsData;
@@ -84,8 +84,8 @@ export function SegmentsUpdateWorker(log: ILogger, segmentsSyncTask: ISegmentsSy
84
84
  /**
85
85
  * Invoked by NotificationProcessor on SEGMENT_UPDATE event
86
86
  *
87
- * @param {number} changeNumber change number of the SEGMENT_UPDATE notification
88
- * @param {string} segmentName segment name of the SEGMENT_UPDATE notification
87
+ * @param changeNumber - change number of the SEGMENT_UPDATE notification
88
+ * @param segmentName - segment name of the SEGMENT_UPDATE notification
89
89
  */
90
90
  put({ changeNumber, segmentName }: ISegmentUpdateData) {
91
91
  if (!segments[segmentName]) segments[segmentName] = SegmentUpdateWorker(segmentName);
@@ -69,7 +69,7 @@ export function SplitsUpdateWorker(log: ILogger, splitsCache: ISplitsCacheSync,
69
69
  /**
70
70
  * Invoked by NotificationProcessor on SPLIT_UPDATE event
71
71
  *
72
- * @param {number} changeNumber change number of the SPLIT_UPDATE notification
72
+ * @param changeNumber - change number of the SPLIT_UPDATE notification
73
73
  */
74
74
  function put({ changeNumber, pcn }: ISplitUpdateData, _payload?: ISplit) {
75
75
  const currentChangeNumber = splitsCache.getChangeNumber();
@@ -94,9 +94,9 @@ export function SplitsUpdateWorker(log: ILogger, splitsCache: ISplitsCacheSync,
94
94
  /**
95
95
  * Invoked by NotificationProcessor on SPLIT_KILL event
96
96
  *
97
- * @param {number} changeNumber change number of the SPLIT_UPDATE notification
98
- * @param {string} splitName name of split to kill
99
- * @param {string} defaultTreatment default treatment value
97
+ * @param changeNumber - change number of the SPLIT_UPDATE notification
98
+ * @param splitName - name of split to kill
99
+ * @param defaultTreatment - default treatment value
100
100
  */
101
101
  killSplit({ changeNumber, splitName, defaultTreatment }: ISplitKillData) {
102
102
  if (splitsCache.killLocally(splitName, defaultTreatment, changeNumber)) {
@@ -19,9 +19,9 @@ function StringToUint8Array(myString: string) {
19
19
  /**
20
20
  * Decode and decompress 'data' with 'compression' algorithm
21
21
  *
22
- * @param {string} data
23
- * @param {number} compression 1 GZIP, 2 ZLIB
24
- * @returns {Uint8Array}
22
+ * @param data - base64 encoded string
23
+ * @param compression - 1 GZIP, 2 ZLIB
24
+ * @returns
25
25
  * @throws if data string cannot be decoded, decompressed or the provided compression value is invalid (not 1 or 2)
26
26
  */
27
27
  function decompress(data: string, compression: Compression) {
@@ -37,10 +37,10 @@ function decompress(data: string, compression: Compression) {
37
37
  /**
38
38
  * Decode, decompress and parse the provided 'data' into a KeyList object
39
39
  *
40
- * @param {string} data
41
- * @param {number} compression
42
- * @param {boolean} avoidPrecisionLoss true as default, set it as false if dont need to avoid precission loss
43
- * @returns {{a?: string[], r?: string[] }}
40
+ * @param data - base64 encoded string
41
+ * @param compression - 1 GZIP, 2 ZLIB
42
+ * @param avoidPrecisionLoss - true as default, set it as false if dont need to avoid precission loss
43
+ * @returns keyList
44
44
  * @throws if data string cannot be decoded, decompressed or parsed
45
45
  */
46
46
  export function parseKeyList(data: string, compression: Compression, avoidPrecisionLoss = true): KeyList {
@@ -54,9 +54,9 @@ export function parseKeyList(data: string, compression: Compression, avoidPrecis
54
54
  /**
55
55
  * Decode, decompress and parse the provided 'data' into a Bitmap object
56
56
  *
57
- * @param {string} data
58
- * @param {number} compression
59
- * @returns {Uint8Array}
57
+ * @param data - base64 encoded string
58
+ * @param compression - 1 GZIP, 2 ZLIB
59
+ * @returns Bitmap
60
60
  * @throws if data string cannot be decoded or decompressed
61
61
  */
62
62
  export function parseBitmap(data: string, compression: Compression) {
@@ -66,9 +66,9 @@ export function parseBitmap(data: string, compression: Compression) {
66
66
  /**
67
67
  * Check if the 'bitmap' bit at 'hash64hex' position is 1
68
68
  *
69
- * @param {Uint8Array} bitmap
70
- * @param {string} hash64hex 16-chars string, representing a number in hexa
71
- * @returns {boolean}
69
+ * @param bitmap - Uint8Array bitmap
70
+ * @param hash64hex - 16-chars string, representing a number in hexa
71
+ * @returns whether the provided 'hash64hex' index is set in the bitmap
72
72
  */
73
73
  export function isInBitmap(bitmap: Uint8Array, hash64hex: string) {
74
74
  // using the lowest 32 bits as index, to avoid losing precision when converting to number
@@ -1,7 +1,7 @@
1
1
  import { IMembershipMSUpdateData, IMembershipLSUpdateData, ISegmentUpdateData, ISplitUpdateData, ISplitKillData, INotificationData } from './SSEHandler/types';
2
2
  import { ITask } from '../types';
3
3
  import { IMySegmentsSyncTask } from '../polling/types';
4
- import { IEventEmitter } from '../../types';
4
+ import SplitIO from '../../../types/splitio';
5
5
  import { ControlType } from './constants';
6
6
 
7
7
  // Internal SDK events, subscribed by SyncManager and PushManager
@@ -34,7 +34,7 @@ type IParsedData<T extends IPushEvent> =
34
34
  * EventEmitter used as Feedback Loop between the SyncManager and PushManager,
35
35
  * where the latter pushes messages and the former consumes it
36
36
  */
37
- export interface IPushEventEmitter extends IEventEmitter {
37
+ export interface IPushEventEmitter extends SplitIO.IEventEmitter {
38
38
  once<T extends IPushEvent>(event: T, listener: (parsedData: IParsedData<T>) => void): this;
39
39
  on<T extends IPushEvent>(event: T, listener: (parsedData: IParsedData<T>) => void): this;
40
40
  emit<T extends IPushEvent>(event: T, parsedData?: IParsedData<T>): boolean;
@@ -1,5 +1,5 @@
1
1
  import { groupBy, forOwn } from '../../utils/lang';
2
- import { ImpressionDTO } from '../../types';
2
+ import SplitIO from '../../../types/splitio';
3
3
  import { submitterFactory } from './submitter';
4
4
  import { ImpressionsPayload } from './types';
5
5
  import { SUBMITTERS_PUSH_FULL_QUEUE } from '../../logger/constants';
@@ -10,7 +10,7 @@ const DATA_NAME = 'impressions';
10
10
  /**
11
11
  * Converts `impressions` data from cache into request payload.
12
12
  */
13
- export function fromImpressionsCollector(sendLabels: boolean, data: ImpressionDTO[]): ImpressionsPayload {
13
+ export function fromImpressionsCollector(sendLabels: boolean, data: SplitIO.ImpressionDTO[]): ImpressionsPayload {
14
14
  let groupedByFeature = groupBy(data, 'feature');
15
15
  let dto: ImpressionsPayload = [];
16
16
 
@@ -3,7 +3,8 @@ import { submitterFactory, firstPushWindowDecorator } from './submitter';
3
3
  import { TelemetryConfigStatsPayload, TelemetryConfigStats } from './types';
4
4
  import { CONSUMER_MODE, CONSUMER_ENUM, STANDALONE_MODE, CONSUMER_PARTIAL_MODE, STANDALONE_ENUM, CONSUMER_PARTIAL_ENUM, OPTIMIZED, DEBUG, NONE, DEBUG_ENUM, OPTIMIZED_ENUM, NONE_ENUM, CONSENT_GRANTED, CONSENT_DECLINED, CONSENT_UNKNOWN } from '../../utils/constants';
5
5
  import { SDK_READY, SDK_READY_FROM_CACHE } from '../../readiness/constants';
6
- import { ConsentStatus, ISettings, SDKMode, SplitIO } from '../../types';
6
+ import { ISettings } from '../../types';
7
+ import SplitIO from '../../../types/splitio';
7
8
  import { base } from '../../utils/settingsValidation';
8
9
  import { usedKeysMap } from '../../utils/inputValidation/apiKey';
9
10
  import { timer } from '../../utils/timeTracker/timer';
@@ -27,7 +28,7 @@ const USER_CONSENT_MAP = {
27
28
  [CONSENT_UNKNOWN]: 1,
28
29
  [CONSENT_GRANTED]: 2,
29
30
  [CONSENT_DECLINED]: 3
30
- } as Record<ConsentStatus, number>;
31
+ } as Record<SplitIO.ConsentStatus, number>;
31
32
 
32
33
  function getActiveFactories() {
33
34
  return Object.keys(usedKeysMap).length;
@@ -51,7 +52,7 @@ function getTelemetryFlagSetsStats(splitFiltersValidation: ISplitFiltersValidati
51
52
  return { flagSetsTotal, flagSetsIgnored };
52
53
  }
53
54
 
54
- export function getTelemetryConfigStats(mode: SDKMode, storageType: string): TelemetryConfigStats {
55
+ export function getTelemetryConfigStats(mode: SplitIO.SDKMode, storageType: string): TelemetryConfigStats {
55
56
  return {
56
57
  oM: OPERATION_MODE_MAP[mode], // @ts-ignore lower case of storage type
57
58
  st: storageType.toLowerCase(),
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-use-before-define */
2
2
  import { IMetadata } from '../../dtos/types';
3
- import { SplitIO } from '../../types';
3
+ import SplitIO from '../../../types/splitio';
4
4
  import { ISyncTask } from '../types';
5
5
 
6
6
  export type ImpressionsPayload = {
@@ -14,9 +14,9 @@ import { ISdkFactoryContextSync } from '../sdkFactory/types';
14
14
  * Online SyncManager factory.
15
15
  * Can be used for server-side API, and client-side API with or without multiple clients.
16
16
  *
17
- * @param pollingManagerFactory allows to specialize the SyncManager for server-side or client-side API by passing
17
+ * @param pollingManagerFactory - allows to specialize the SyncManager for server-side or client-side API by passing
18
18
  * `pollingManagerSSFactory` or `pollingManagerCSFactory` respectively.
19
- * @param pushManagerFactory optional to build a SyncManager with or without streaming support
19
+ * @param pushManagerFactory - optional to build a SyncManager with or without streaming support
20
20
  */
21
21
  export function syncManagerOnlineFactory(
22
22
  pollingManagerFactory?: (params: ISdkFactoryContextSync) => IPollingManager,
@@ -6,10 +6,10 @@ import { ISyncTask } from './types';
6
6
  * Creates an object that handles the periodic execution of a given task via "start" and "stop" methods.
7
7
  * The task can be also executed by calling the "execute" method. Multiple calls run sequentially to avoid race conditions (e.g., submitters executed on SDK destroy or full queue, while periodic execution is pending).
8
8
  *
9
- * @param log Logger instance.
10
- * @param task Task to execute that returns a promise that NEVER REJECTS. Otherwise, periodic execution can result in Unhandled Promise Rejections.
11
- * @param period Period in milliseconds to execute the task.
12
- * @param taskName Optional task name for logging.
9
+ * @param log - Logger instance.
10
+ * @param task - Task to execute that returns a promise that NEVER REJECTS. Otherwise, periodic execution can result in Unhandled Promise Rejections.
11
+ * @param period - Period in milliseconds to execute the task.
12
+ * @param taskName - Optional task name for logging.
13
13
  * @returns A sync task that wraps the given task.
14
14
  */
15
15
  export function syncTaskFactory<Input extends any[], Output = any>(log: ILogger, task: (...args: Input) => Promise<Output>, period: number, taskName = 'task'): ISyncTask<Input, Output> {
@@ -2,7 +2,8 @@ import { objectAssign } from '../utils/lang/objectAssign';
2
2
  import { thenable } from '../utils/promise/thenable';
3
3
  import { IEventsCacheBase, ITelemetryCacheAsync, ITelemetryCacheSync } from '../storages/types';
4
4
  import { IEventsHandler, IEventTracker } from './types';
5
- import { ISettings, SplitIO } from '../types';
5
+ import { ISettings } from '../types';
6
+ import SplitIO from '../../types/splitio';
6
7
  import { EVENTS_TRACKER_SUCCESS, ERROR_EVENTS_TRACKER } from '../logger/constants';
7
8
  import { CONSENT_DECLINED, DROPPED, QUEUED } from '../utils/constants';
8
9
  import { isConsumerMode } from '../utils/settingsValidation/mode';
@@ -10,8 +11,8 @@ import { isConsumerMode } from '../utils/settingsValidation/mode';
10
11
  /**
11
12
  * Event tracker stores events in cache and pass them to the integrations manager if provided.
12
13
  *
13
- * @param eventsCache cache to save events
14
- * @param integrationsManager optional event handler used for integrations
14
+ * @param eventsCache - cache to save events
15
+ * @param integrationsManager - optional event handler used for integrations
15
16
  */
16
17
  export function eventTrackerFactory(
17
18
  settings: ISettings,
@@ -1,17 +1,17 @@
1
- import { ImpressionDTO } from '../../types';
1
+ import SplitIO from '../../../types/splitio';
2
2
  import { LRUCache } from '../../utils/LRUCache';
3
3
  import { IImpressionObserver } from './types';
4
4
 
5
5
  export class ImpressionObserver<K extends string | number = string> implements IImpressionObserver {
6
6
  private cache: LRUCache<K, number>;
7
- private hasher: (impression: ImpressionDTO) => K;
7
+ private hasher: (impression: SplitIO.ImpressionDTO) => K;
8
8
 
9
- constructor(size: number, hasher: (impression: ImpressionDTO) => K) {
9
+ constructor(size: number, hasher: (impression: SplitIO.ImpressionDTO) => K) {
10
10
  this.cache = new LRUCache(size);
11
11
  this.hasher = hasher;
12
12
  }
13
13
 
14
- testAndSet(impression: ImpressionDTO) {
14
+ testAndSet(impression: SplitIO.ImpressionDTO) {
15
15
  const hash = this.hasher(impression);
16
16
  const previous = this.cache.get(hash);
17
17
  this.cache.set(hash, impression.time);
@@ -1,5 +1,5 @@
1
- import { ImpressionDTO } from '../../types';
1
+ import SplitIO from '../../../types/splitio';
2
2
 
3
- export function buildKey(impression: ImpressionDTO) {
3
+ export function buildKey(impression: SplitIO.ImpressionDTO) {
4
4
  return `${impression.keyName}:${impression.feature}:${impression.treatment}:${impression.label}:${impression.changeNumber}`;
5
5
  }
@@ -1,9 +1,9 @@
1
1
  import { ImpressionObserver } from './ImpressionObserver';
2
2
  import { hash } from '../../utils/murmur3/murmur3';
3
3
  import { buildKey } from './buildKey';
4
- import { ImpressionDTO } from '../../types';
4
+ import SplitIO from '../../../types/splitio';
5
5
 
6
- export function hashImpression32(impression: ImpressionDTO) {
6
+ export function hashImpression32(impression: SplitIO.ImpressionDTO) {
7
7
  return hash(buildKey(impression));
8
8
  }
9
9
 
@@ -1,9 +1,9 @@
1
1
  import { ImpressionObserver } from './ImpressionObserver';
2
2
  import { hash128 } from '../../utils/murmur3/murmur3_128_x86';
3
3
  import { buildKey } from './buildKey';
4
- import { ImpressionDTO } from '../../types';
4
+ import SplitIO from '../../../types/splitio';
5
5
 
6
- export function hashImpression128(impression: ImpressionDTO) {
6
+ export function hashImpression128(impression: SplitIO.ImpressionDTO) {
7
7
  return hash128(buildKey(impression));
8
8
  }
9
9
 
@@ -1,5 +1,5 @@
1
- import { ImpressionDTO } from '../../types';
1
+ import SplitIO from '../../../types/splitio';
2
2
 
3
3
  export interface IImpressionObserver {
4
- testAndSet(impression: ImpressionDTO): number | undefined
4
+ testAndSet(impression: SplitIO.ImpressionDTO): number | undefined
5
5
  }
@@ -2,18 +2,19 @@ import { objectAssign } from '../utils/lang/objectAssign';
2
2
  import { thenable } from '../utils/promise/thenable';
3
3
  import { IImpressionsCacheBase, ITelemetryCacheSync, ITelemetryCacheAsync } from '../storages/types';
4
4
  import { IImpressionsHandler, IImpressionsTracker, IStrategy } from './types';
5
- import { SplitIO, ImpressionDTO, ISettings } from '../types';
5
+ import { ISettings } from '../types';
6
6
  import { IMPRESSIONS_TRACKER_SUCCESS, ERROR_IMPRESSIONS_TRACKER, ERROR_IMPRESSIONS_LISTENER } from '../logger/constants';
7
7
  import { CONSENT_DECLINED, DEDUPED, QUEUED } from '../utils/constants';
8
+ import SplitIO from '../../types/splitio';
8
9
 
9
10
  /**
10
11
  * Impressions tracker stores impressions in cache and pass them to the listener and integrations manager if provided.
11
12
  *
12
- * @param impressionsCache cache to save impressions
13
- * @param metadata runtime metadata (ip, hostname and version)
14
- * @param impressionListener optional impression listener
15
- * @param integrationsManager optional integrations manager
16
- * @param strategy strategy for impressions tracking.
13
+ * @param impressionsCache - cache to save impressions
14
+ * @param metadata - runtime metadata (ip, hostname and version)
15
+ * @param impressionListener - optional impression listener
16
+ * @param integrationsManager - optional integrations manager
17
+ * @param strategy - strategy for impressions tracking.
17
18
  */
18
19
  export function impressionsTrackerFactory(
19
20
  settings: ISettings,
@@ -27,7 +28,7 @@ export function impressionsTrackerFactory(
27
28
  const { log, impressionListener, runtime: { ip, hostname }, version } = settings;
28
29
 
29
30
  return {
30
- track(impressions: ImpressionDTO[], attributes?: SplitIO.Attributes) {
31
+ track(impressions: SplitIO.ImpressionDTO[], attributes?: SplitIO.Attributes) {
31
32
  if (settings.userConsent === CONSENT_DECLINED) return;
32
33
 
33
34
  const impressionsCount = impressions.length;
@@ -1,11 +1,11 @@
1
- import { ImpressionDTO } from '../../types';
1
+ import SplitIO from '../../../types/splitio';
2
2
  import { IImpressionObserver } from '../impressionObserver/types';
3
3
  import { IStrategy } from '../types';
4
4
 
5
5
  /**
6
6
  * Debug strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
7
7
  *
8
- * @param impressionsObserver impression observer. Previous time (pt property) is included in impression instances
8
+ * @param impressionsObserver - impression observer. Previous time (pt property) is included in impression instances
9
9
  * @returns IStrategyResult
10
10
  */
11
11
  export function strategyDebugFactory(
@@ -13,7 +13,7 @@ export function strategyDebugFactory(
13
13
  ): IStrategy {
14
14
 
15
15
  return {
16
- process(impressions: ImpressionDTO[]) {
16
+ process(impressions: SplitIO.ImpressionDTO[]) {
17
17
  impressions.forEach((impression) => {
18
18
  // Adds previous time if it is enabled
19
19
  impression.pt = impressionsObserver.testAndSet(impression);
@@ -1,12 +1,12 @@
1
1
  import { IImpressionCountsCacheBase } from '../../storages/types';
2
- import { ImpressionDTO } from '../../types';
2
+ import SplitIO from '../../../types/splitio';
3
3
  import { IStrategy, IUniqueKeysTracker } from '../types';
4
4
 
5
5
  /**
6
6
  * None strategy for impressions tracker.
7
7
  *
8
- * @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
9
- * @param uniqueKeysTracker unique keys tracker in charge of tracking the unique keys per split.
8
+ * @param impressionsCounter - cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
9
+ * @param uniqueKeysTracker - unique keys tracker in charge of tracking the unique keys per split.
10
10
  * @returns IStrategyResult
11
11
  */
12
12
  export function strategyNoneFactory(
@@ -15,7 +15,7 @@ export function strategyNoneFactory(
15
15
  ): IStrategy {
16
16
 
17
17
  return {
18
- process(impressions: ImpressionDTO[]) {
18
+ process(impressions: SplitIO.ImpressionDTO[]) {
19
19
  impressions.forEach((impression) => {
20
20
  const now = Date.now();
21
21
  // Increments impression counter per featureName
@@ -1,5 +1,5 @@
1
1
  import { IImpressionCountsCacheBase } from '../../storages/types';
2
- import { ImpressionDTO } from '../../types';
2
+ import SplitIO from '../../../types/splitio';
3
3
  import { truncateTimeFrame } from '../../utils/time';
4
4
  import { IImpressionObserver } from '../impressionObserver/types';
5
5
  import { IStrategy } from '../types';
@@ -7,8 +7,8 @@ import { IStrategy } from '../types';
7
7
  /**
8
8
  * Optimized strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
9
9
  *
10
- * @param impressionsObserver impression observer. previous time (pt property) is included in impression instances
11
- * @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
10
+ * @param impressionsObserver - impression observer. previous time (pt property) is included in impression instances
11
+ * @param impressionsCounter - cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
12
12
  * @returns IStrategyResult
13
13
  */
14
14
  export function strategyOptimizedFactory(
@@ -17,8 +17,8 @@ export function strategyOptimizedFactory(
17
17
  ): IStrategy {
18
18
 
19
19
  return {
20
- process(impressions: ImpressionDTO[]) {
21
- const impressionsToStore: ImpressionDTO[] = [];
20
+ process(impressions: SplitIO.ImpressionDTO[]) {
21
+ const impressionsToStore: SplitIO.ImpressionDTO[] = [];
22
22
  impressions.forEach((impression) => {
23
23
  impression.pt = impressionsObserver.testAndSet(impression);
24
24
 
@@ -1,4 +1,4 @@
1
- import { SplitIO, ImpressionDTO } from '../types';
1
+ import SplitIO from '../../types/splitio';
2
2
  import { StreamingEventType, Method, OperationType, UpdatesFromSSEEnum } from '../sync/submitters/types';
3
3
  import { IEventsCacheBase } from '../storages/types';
4
4
  import { NetworkError } from '../services/types';
@@ -18,7 +18,7 @@ export interface IImpressionsHandler {
18
18
  }
19
19
 
20
20
  export interface IImpressionsTracker {
21
- track(impressions: ImpressionDTO[], attributes?: SplitIO.Attributes): void
21
+ track(impressions: SplitIO.ImpressionDTO[], attributes?: SplitIO.Attributes): void
22
22
  }
23
23
 
24
24
  /** Telemetry tracker */
@@ -71,11 +71,11 @@ export interface IUniqueKeysTracker {
71
71
  }
72
72
 
73
73
  export interface IStrategyResult {
74
- impressionsToStore: ImpressionDTO[],
75
- impressionsToListener: ImpressionDTO[],
74
+ impressionsToStore: SplitIO.ImpressionDTO[],
75
+ impressionsToListener: SplitIO.ImpressionDTO[],
76
76
  deduped: number
77
77
  }
78
78
 
79
79
  export interface IStrategy {
80
- process(impressions: ImpressionDTO[]): IStrategyResult
80
+ process(impressions: SplitIO.ImpressionDTO[]): IStrategyResult
81
81
  }
@@ -14,9 +14,9 @@ const noopFilterAdapter = {
14
14
  * Unique Keys Tracker will be in charge of checking if the MTK was already sent to the BE in the last period
15
15
  * or schedule to be sent; if not it will be added in an internal cache and sent in the next post.
16
16
  *
17
- * @param log Logger instance
18
- * @param uniqueKeysCache cache to save unique keys
19
- * @param filterAdapter filter adapter
17
+ * @param log - Logger instance
18
+ * @param uniqueKeysCache - cache to save unique keys
19
+ * @param filterAdapter - filter adapter
20
20
  */
21
21
  export function uniqueKeysTrackerFactory(
22
22
  log: ILogger,