@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
package/CHANGES.txt CHANGED
@@ -1,6 +1,7 @@
1
1
  2.0.0 (October XX, 2024)
2
2
  - Added support for targeting rules based on large segments.
3
3
  - Added `factory.destroy()` method, which invokes the `destroy` method on all SDK clients created by the factory.
4
+ - Added `SplitIO` namespace with the public TypeScript definitions to be reused by the SDKs, rather than having each SDK define its own types.
4
5
  - Updated the handling of timers and async operations inside an `init` factory method to enable lazy initialization of the SDK in standalone mode. This update is intended for the React SDK.
5
6
  - Bugfixing - Fixed an issue with the server-side polling manager that caused dangling timers when the SDK was destroyed before it was ready.
6
7
  - BREAKING CHANGES:
@@ -6,8 +6,8 @@ var constants_1 = require("../utils/constants");
6
6
  * Factory function for IntegrationsManager with pluggable integrations.
7
7
  * The integrations manager instantiates integration, and bypass tracked events and impressions to them.
8
8
  *
9
- * @param integrations validated list of integration factories
10
- * @param params information of the Sdk factory instance that integrations can access to
9
+ * @param integrations - validated list of integration factories
10
+ * @param params - information of the Sdk factory instance that integrations can access to
11
11
  *
12
12
  * @returns integration manager or undefined if `integrations` are not present in settings.
13
13
  */
@@ -6,7 +6,7 @@ var constants_1 = require("./constants");
6
6
  /**
7
7
  * The public Logger utility API exposed via SplitFactory, used to update the log level.
8
8
  *
9
- * @param log the factory logger instance to handle
9
+ * @param log - the factory logger instance to handle
10
10
  */
11
11
  function createLoggerAPI(log) {
12
12
  function setLogLevel(logLevel) {
@@ -26,7 +26,7 @@ function createLoggerAPI(log) {
26
26
  },
27
27
  /**
28
28
  * Sets a custom log Level for the SDK.
29
- * @param {string} logLevel - Custom LogLevel value.
29
+ * @param logLevel - Custom LogLevel value.
30
30
  */
31
31
  setLogLevel: setLogLevel,
32
32
  /**
@@ -12,8 +12,8 @@ var REMOVE_LISTENER_EVENT = 'removeListener';
12
12
  * SdkReadinessManager factory, which provides the public status API of SDK clients and manager: ready promise, readiness event emitter and constants (SDK_READY, etc).
13
13
  * It also updates logs related warnings and errors.
14
14
  *
15
- * @param readyTimeout time in millis to emit SDK_READY_TIME_OUT event
16
- * @param readinessManager optional readinessManager to use. only used internally for `shared` method
15
+ * @param readyTimeout - time in millis to emit SDK_READY_TIME_OUT event
16
+ * @param readinessManager - optional readinessManager to use. only used internally for `shared` method
17
17
  */
18
18
  function sdkReadinessManagerFactory(EventEmitter, settings, readinessManager) {
19
19
  if (readinessManager === void 0) { readinessManager = (0, readinessManager_1.readinessManagerFactory)(EventEmitter, settings); }
@@ -76,25 +76,6 @@ function sdkReadinessManagerFactory(EventEmitter, settings, readinessManager) {
76
76
  SDK_UPDATE: constants_1.SDK_UPDATE,
77
77
  SDK_READY_TIMED_OUT: constants_1.SDK_READY_TIMED_OUT,
78
78
  },
79
- /**
80
- * Returns a promise that will be resolved once the SDK has finished loading (SDK_READY event emitted) or rejected if the SDK has timedout (SDK_READY_TIMED_OUT event emitted).
81
- * As it's meant to provide similar flexibility to the event approach, given that the SDK might be eventually ready after a timeout event, calling the `ready` method after the
82
- * SDK had timed out will return a new promise that should eventually resolve if the SDK gets ready.
83
- *
84
- * Caveats: the method was designed to avoid an unhandled Promise rejection if the rejection case is not handled, so that `onRejected` handler is optional when using promises.
85
- * However, when using async/await syntax, the rejection should be explicitly propagated like in the following example:
86
- * ```
87
- * try {
88
- * await client.ready().catch((e) => { throw e; });
89
- * // SDK is ready
90
- * } catch(e) {
91
- * // SDK has timedout
92
- * }
93
- * ```
94
- *
95
- * @function ready
96
- * @returns {Promise<void>}
97
- */
98
79
  ready: function () {
99
80
  if (readinessManager.hasTimedout()) {
100
81
  if (!readinessManager.isReady()) {
@@ -165,7 +165,6 @@ function clientFactory(params) {
165
165
  getTreatmentsByFlagSet: getTreatmentsByFlagSet,
166
166
  getTreatmentsWithConfigByFlagSet: getTreatmentsWithConfigByFlagSet,
167
167
  track: track,
168
- isClientSide: false
169
168
  };
170
169
  }
171
170
  exports.clientFactory = clientFactory;
@@ -66,9 +66,9 @@ function clientAttributesDecoration(log, client) {
66
66
  /**
67
67
  * Add an attribute to client's in memory attributes storage
68
68
  *
69
- * @param {string} attributeName Attrinute name
70
- * @param {string, number, boolean, list} attributeValue Attribute value
71
- * @returns {boolean} true if the attribute was stored and false otherways
69
+ * @param attributeName - Attribute name
70
+ * @param attributeValue - Attribute value
71
+ * @returns true if the attribute was stored and false otherways
72
72
  */
73
73
  setAttribute: function (attributeName, attributeValue) {
74
74
  var attribute = {};
@@ -81,8 +81,8 @@ function clientAttributesDecoration(log, client) {
81
81
  /**
82
82
  * Returns the attribute with the given name
83
83
  *
84
- * @param {string} attributeName Attribute name
85
- * @returns {Object} Attribute with the given name
84
+ * @param attributeName - Attribute name
85
+ * @returns Attribute with the given name
86
86
  */
87
87
  getAttribute: function (attributeName) {
88
88
  log.debug("retrieved attribute " + attributeName);
@@ -91,7 +91,7 @@ function clientAttributesDecoration(log, client) {
91
91
  /**
92
92
  * Add to client's in memory attributes storage the attributes in 'attributes'
93
93
  *
94
- * @param {Object} attributes Object with attributes to store
94
+ * @param attributes - Object with attributes to store
95
95
  * @returns true if attributes were stored an false otherways
96
96
  */
97
97
  setAttributes: function (attributes) {
@@ -102,7 +102,7 @@ function clientAttributesDecoration(log, client) {
102
102
  /**
103
103
  * Return all the attributes stored in client's in memory attributes storage
104
104
  *
105
- * @returns {Object} returns all the stored attributes
105
+ * @returns returns all the stored attributes
106
106
  */
107
107
  getAttributes: function () {
108
108
  return attributeStorage.getAll();
@@ -110,8 +110,8 @@ function clientAttributesDecoration(log, client) {
110
110
  /**
111
111
  * Removes from client's in memory attributes storage the attribute with the given name
112
112
  *
113
- * @param {string} attributeName
114
- * @returns {boolean} true if attribute was removed and false otherways
113
+ * @param attributeName - Attribute name
114
+ * @returns true if attribute was removed and false otherways
115
115
  */
116
116
  removeAttribute: function (attributeName) {
117
117
  log.debug("removed attribute " + attributeName);
@@ -6,8 +6,8 @@ var clientAttributesDecoration_1 = require("./clientAttributesDecoration");
6
6
  /**
7
7
  * Decorator that binds a key to client methods
8
8
  *
9
- * @param client sync client instance
10
- * @param key validated split key
9
+ * @param client - sync client instance
10
+ * @param key - validated split key
11
11
  */
12
12
  function clientCSDecorator(log, client, key) {
13
13
  var clientCS = (0, clientAttributesDecoration_1.clientAttributesDecoration)(log, client);
@@ -12,9 +12,9 @@ function userKeyToQueryParam(userKey) {
12
12
  /**
13
13
  * Factory of SplitApi objects, which group the collection of Split HTTP endpoints used by the SDK
14
14
  *
15
- * @param settings validated settings object
16
- * @param platform object containing environment-specific dependencies
17
- * @param telemetryTracker telemetry tracker
15
+ * @param settings - validated settings object
16
+ * @param platform - object containing environment-specific dependencies
17
+ * @param telemetryTracker - telemetry tracker
18
18
  */
19
19
  function splitApiFactory(settings, platform, telemetryTracker) {
20
20
  var urls = settings.urls;
@@ -67,8 +67,8 @@ function splitApiFactory(settings, platform, telemetryTracker) {
67
67
  /**
68
68
  * Post events.
69
69
  *
70
- * @param body Events bulk payload
71
- * @param headers Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
70
+ * @param body - Events bulk payload
71
+ * @param headers - Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
72
72
  */
73
73
  postEventsBulk: function (body, headers) {
74
74
  var url = urls.events + "/events/bulk";
@@ -77,8 +77,8 @@ function splitApiFactory(settings, platform, telemetryTracker) {
77
77
  /**
78
78
  * Post impressions.
79
79
  *
80
- * @param body Impressions bulk payload
81
- * @param headers Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
80
+ * @param body - Impressions bulk payload
81
+ * @param headers - Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
82
82
  */
83
83
  postTestImpressionsBulk: function (body, headers) {
84
84
  var url = urls.events + "/testImpressions/bulk";
@@ -92,8 +92,8 @@ function splitApiFactory(settings, platform, telemetryTracker) {
92
92
  /**
93
93
  * Post impressions counts.
94
94
  *
95
- * @param body Impressions counts payload
96
- * @param headers Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
95
+ * @param body - Impressions counts payload
96
+ * @param headers - Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
97
97
  */
98
98
  postTestImpressionsCount: function (body, headers) {
99
99
  var url = urls.events + "/testImpressions/count";
@@ -102,8 +102,8 @@ function splitApiFactory(settings, platform, telemetryTracker) {
102
102
  /**
103
103
  * Post unique keys for client side.
104
104
  *
105
- * @param body unique keys payload
106
- * @param headers Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
105
+ * @param body - unique keys payload
106
+ * @param headers - Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
107
107
  */
108
108
  postUniqueKeysBulkCs: function (body, headers) {
109
109
  var url = urls.telemetry + "/v1/keys/cs";
@@ -112,8 +112,8 @@ function splitApiFactory(settings, platform, telemetryTracker) {
112
112
  /**
113
113
  * Post unique keys for server side.
114
114
  *
115
- * @param body unique keys payload
116
- * @param headers Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
115
+ * @param body - unique keys payload
116
+ * @param headers - Optionals headers to overwrite default ones. For example, it is used in producer mode to overwrite metadata headers.
117
117
  */
118
118
  postUniqueKeysBulkSs: function (body, headers) {
119
119
  var url = urls.telemetry + "/v1/keys/ss";
@@ -8,8 +8,8 @@ var messageNoFetch = 'Global fetch API is not available.';
8
8
  /**
9
9
  * Factory of Split HTTP clients, which are HTTP clients with predefined headers for Split endpoints.
10
10
  *
11
- * @param settings SDK settings, used to access authorizationKey, logger instance and metadata (SDK version, ip and hostname) to set additional headers
12
- * @param platform object containing environment-specific dependencies
11
+ * @param settings - SDK settings, used to access authorizationKey, logger instance and metadata (SDK version, ip and hostname) to set additional headers
12
+ * @param platform - object containing environment-specific dependencies
13
13
  */
14
14
  function splitHttpClientFactory(settings, _a) {
15
15
  var getOptions = _a.getOptions, getFetch = _a.getFetch;
@@ -25,10 +25,7 @@ var AbstractSplitsCacheAsync = /** @class */ (function () {
25
25
  * Kill `name` split and set `defaultTreatment` and `changeNumber`.
26
26
  * Used for SPLIT_KILL push notifications.
27
27
  *
28
- * @param {string} name
29
- * @param {string} defaultTreatment
30
- * @param {number} changeNumber
31
- * @returns {Promise} a promise that is resolved once the split kill operation is performed. The fulfillment value is a boolean: `true` if the operation successed updating the split or `false` if no split is updated,
28
+ * @returns a promise that is resolved once the split kill operation is performed. The fulfillment value is a boolean: `true` if the operation successed updating the split or `false` if no split is updated,
32
29
  * for instance, if the `changeNumber` is old, or if the split is not found (e.g., `/splitchanges` hasn't been fetched yet), or if the storage fails to apply the update.
33
30
  * The promise will never be rejected.
34
31
  */
@@ -41,10 +41,7 @@ var AbstractSplitsCacheSync = /** @class */ (function () {
41
41
  * Kill `name` split and set `defaultTreatment` and `changeNumber`.
42
42
  * Used for SPLIT_KILL push notifications.
43
43
  *
44
- * @param {string} name
45
- * @param {string} defaultTreatment
46
- * @param {number} changeNumber
47
- * @returns {boolean} `true` if the operation successed updating the split, or `false` if no split is updated,
44
+ * @returns `true` if the operation successed updating the split, or `false` if no split is updated,
48
45
  * for instance, if the `changeNumber` is old, or if the split is not found (e.g., `/splitchanges` hasn't been fetched yet), or if the storage fails to apply the update.
49
46
  */
50
47
  AbstractSplitsCacheSync.prototype.killLocally = function (name, defaultTreatment, changeNumber) {
@@ -5,7 +5,7 @@ var browser_1 = require("../utils/constants/browser");
5
5
  /**
6
6
  * Factory of client-side storage loader
7
7
  *
8
- * @param preloadedData validated data following the format proposed in https://github.com/godaddy/split-javascript-data-loader
8
+ * @param preloadedData - validated data following the format proposed in https://github.com/godaddy/split-javascript-data-loader
9
9
  * and extended with a `mySegmentsData` property.
10
10
  * @returns function to preload the storage
11
11
  */
@@ -14,12 +14,11 @@ function dataLoaderFactory(preloadedData) {
14
14
  * Storage-agnostic adaptation of `loadDataIntoLocalStorage` function
15
15
  * (https://github.com/godaddy/split-javascript-data-loader/blob/master/src/load-data.js)
16
16
  *
17
- * @param storage object containing `splits` and `segments` cache (client-side variant)
18
- * @param userId user key string of the provided MySegmentsCache
19
- *
20
- * @TODO extend to support SegmentsCache (server-side variant) by making `userId` optional and adding the corresponding logic.
21
- * @TODO extend to load data on shared mySegments storages. Be specific when emitting SDK_READY_FROM_CACHE on shared clients. Maybe the serializer should provide the `useSegments` flag.
17
+ * @param storage - object containing `splits` and `segments` cache (client-side variant)
18
+ * @param userId - user key string of the provided MySegmentsCache
22
19
  */
20
+ // @TODO extend to support SegmentsCache (server-side variant) by making `userId` optional and adding the corresponding logic.
21
+ // @TODO extend to load data on shared mySegments storages. Be specific when emitting SDK_READY_FROM_CACHE on shared clients. Maybe the serializer should provide the `useSegments` flag.
23
22
  return function loadData(storage, userId) {
24
23
  // Do not load data if current preloadedData is empty
25
24
  if (Object.keys(preloadedData).length === 0)
@@ -8,7 +8,7 @@ var BASE = 1.5;
8
8
  /**
9
9
  * Calculates buckets from latency in milliseconds
10
10
  *
11
- * @param latencyInMs
11
+ * @param latencyInMs - latency in milliseconds
12
12
  * @returns a bucket index from 0 to 22 inclusive
13
13
  */
14
14
  function findLatencyIndex(latencyInMs) {
@@ -12,11 +12,6 @@ var sets_1 = require("../../utils/lang/sets");
12
12
  */
13
13
  var SplitsCacheInLocal = /** @class */ (function (_super) {
14
14
  (0, tslib_1.__extends)(SplitsCacheInLocal, _super);
15
- /**
16
- * @param {KeyBuilderCS} keys
17
- * @param {number | undefined} expirationTimestamp
18
- * @param {ISplitFiltersValidation} splitFiltersValidation
19
- */
20
15
  function SplitsCacheInLocal(settings, keys, expirationTimestamp) {
21
16
  var _this = _super.call(this) || this;
22
17
  _this.keys = keys;
@@ -197,7 +192,7 @@ var SplitsCacheInLocal = /** @class */ (function (_super) {
197
192
  /**
198
193
  * Clean Splits cache if its `lastUpdated` timestamp is older than the given `expirationTimestamp`,
199
194
  *
200
- * @param {number | undefined} expirationTimestamp if the value is not a number, data will not be cleaned
195
+ * @param expirationTimestamp - if the value is not a number, data will not be cleaned
201
196
  */
202
197
  SplitsCacheInLocal.prototype._checkExpiration = function (expirationTimestamp) {
203
198
  var value = localStorage.getItem(this.keys.buildLastUpdatedKey());
@@ -9,9 +9,9 @@ var AttributesCacheInMemory = /** @class */ (function () {
9
9
  /**
10
10
  * Create or update the value for the given attribute
11
11
  *
12
- * @param {string} attributeName attribute name
13
- * @param {Object} attributeValue attribute value
14
- * @returns {boolean} the attribute was stored
12
+ * @param attributeName - attribute name
13
+ * @param attributeValue - attribute value
14
+ * @returns the attribute was stored
15
15
  */
16
16
  AttributesCacheInMemory.prototype.setAttribute = function (attributeName, attributeValue) {
17
17
  this.attributesCache[attributeName] = attributeValue;
@@ -20,8 +20,8 @@ var AttributesCacheInMemory = /** @class */ (function () {
20
20
  /**
21
21
  * Retrieves the value of a given attribute
22
22
  *
23
- * @param {string} attributeName attribute name
24
- * @returns {Object?} stored attribute value
23
+ * @param attributeName - attribute name
24
+ * @returns stored attribute value
25
25
  */
26
26
  AttributesCacheInMemory.prototype.getAttribute = function (attributeName) {
27
27
  return this.attributesCache[attributeName];
@@ -29,8 +29,8 @@ var AttributesCacheInMemory = /** @class */ (function () {
29
29
  /**
30
30
  * Create or update all the given attributes
31
31
  *
32
- * @param {[string, Object]} attributes attributes to create or update
33
- * @returns {boolean} attributes were stored
32
+ * @param attributes - attributes to create or update
33
+ * @returns attributes were stored
34
34
  */
35
35
  AttributesCacheInMemory.prototype.setAttributes = function (attributes) {
36
36
  this.attributesCache = (0, objectAssign_1.objectAssign)(this.attributesCache, attributes);
@@ -39,7 +39,7 @@ var AttributesCacheInMemory = /** @class */ (function () {
39
39
  /**
40
40
  * Retrieve the full attributes map
41
41
  *
42
- * @returns {Map<string, Object>} stored attributes
42
+ * @returns stored attributes
43
43
  */
44
44
  AttributesCacheInMemory.prototype.getAll = function () {
45
45
  return this.attributesCache;
@@ -47,8 +47,8 @@ var AttributesCacheInMemory = /** @class */ (function () {
47
47
  /**
48
48
  * Removes a given attribute from the map
49
49
  *
50
- * @param {string} attributeName attribute to remove
51
- * @returns {boolean} attribute removed
50
+ * @param attributeName - attribute to remove
51
+ * @returns attribute removed
52
52
  */
53
53
  AttributesCacheInMemory.prototype.removeAttribute = function (attributeName) {
54
54
  if (Object.keys(this.attributesCache).indexOf(attributeName) >= 0) {
@@ -5,7 +5,7 @@ var MAX_QUEUE_BYTE_SIZE = 5 * 1024 * 1024; // 5M
5
5
  var EventsCacheInMemory = /** @class */ (function () {
6
6
  /**
7
7
  *
8
- * @param eventsQueueSize number of queued events to call onFullQueueCb.
8
+ * @param eventsQueueSize - number of queued events to call onFullQueueCb.
9
9
  * Default value is 0, that means no maximum value, in case we want to avoid this being triggered.
10
10
  */
11
11
  function EventsCacheInMemory(eventsQueueSize) {
@@ -4,7 +4,7 @@ exports.ImpressionsCacheInMemory = void 0;
4
4
  var ImpressionsCacheInMemory = /** @class */ (function () {
5
5
  /**
6
6
  *
7
- * @param impressionsQueueSize number of queued impressions to call onFullQueueCb.
7
+ * @param impressionsQueueSize - number of queued impressions to call onFullQueueCb.
8
8
  * Default value is 0, that means no maximum value, in case we want to avoid this being triggered.
9
9
  */
10
10
  function ImpressionsCacheInMemory(impressionsQueueSize) {
@@ -12,7 +12,7 @@ var UniqueKeysCacheInMemory_1 = require("./UniqueKeysCacheInMemory");
12
12
  /**
13
13
  * InMemory storage factory for standalone server-side SplitFactory
14
14
  *
15
- * @param params parameters required by EventsCacheSync
15
+ * @param params - parameters required by EventsCacheSync
16
16
  */
17
17
  function InMemoryStorageFactory(params) {
18
18
  var _a = params.settings, _b = _a.scheduler, impressionsQueueSize = _b.impressionsQueueSize, eventsQueueSize = _b.eventsQueueSize, _c = _a.sync, impressionsMode = _c.impressionsMode, __splitFiltersValidation = _c.__splitFiltersValidation;
@@ -12,7 +12,7 @@ var UniqueKeysCacheInMemoryCS_1 = require("./UniqueKeysCacheInMemoryCS");
12
12
  /**
13
13
  * InMemory storage factory for standalone client-side SplitFactory
14
14
  *
15
- * @param params parameters required by EventsCacheSync
15
+ * @param params - parameters required by EventsCacheSync
16
16
  */
17
17
  function InMemoryStorageCSFactory(params) {
18
18
  var _a = params.settings, _b = _a.scheduler, impressionsQueueSize = _b.impressionsQueueSize, eventsQueueSize = _b.eventsQueueSize, _c = _a.sync, impressionsMode = _c.impressionsMode, __splitFiltersValidation = _c.__splitFiltersValidation;
@@ -6,7 +6,7 @@ var sets_1 = require("../../utils/lang/sets");
6
6
  var UniqueKeysCacheInMemoryCS = /** @class */ (function () {
7
7
  /**
8
8
  *
9
- * @param impressionsQueueSize number of queued impressions to call onFullQueueCb.
9
+ * @param impressionsQueueSize - number of queued impressions to call onFullQueueCb.
10
10
  * Default value is 0, that means no maximum value, in case we want to avoid this being triggered.
11
11
  */
12
12
  function UniqueKeysCacheInMemoryCS(uniqueKeysQueueSize) {
@@ -164,10 +164,8 @@ var SplitsCacheInRedis = /** @class */ (function (_super) {
164
164
  * Get list of all split definitions.
165
165
  * The returned promise is resolved with the list of split definitions,
166
166
  * or rejected if redis operation fails.
167
- *
168
- * @TODO we need to benchmark which is the maximun number of commands we could
169
- * pipeline without kill redis performance.
170
167
  */
168
+ // @TODO we need to benchmark which is the maximun number of commands we could pipeline without kill redis performance.
171
169
  SplitsCacheInRedis.prototype.getAll = function () {
172
170
  var _this = this;
173
171
  return this.redis.keys(this.keys.searchPatternForSplitKeys())
@@ -10,9 +10,9 @@ var utils_1 = require("../utils");
10
10
  var TelemetryCacheInRedis = /** @class */ (function () {
11
11
  /**
12
12
  * Create a Telemetry cache that uses Redis as storage.
13
- * @param log Logger instance.
14
- * @param keys Key builder.
15
- * @param redis Redis client.
13
+ * @param log - Logger instance.
14
+ * @param keys - Key builder.
15
+ * @param redis - Redis client.
16
16
  */
17
17
  function TelemetryCacheInRedis(log, keys, redis) {
18
18
  this.log = log;
@@ -54,7 +54,7 @@ var UniqueKeysCacheInRedis = /** @class */ (function (_super) {
54
54
  };
55
55
  /**
56
56
  * Async consumer API, used by synchronizer.
57
- * @param count number of items to pop from the queue. If not provided or equal 0, all items will be popped.
57
+ * @param count - number of items to pop from the queue. If not provided or equal 0, all items will be popped.
58
58
  */
59
59
  UniqueKeysCacheInRedis.prototype.popNRaw = function (count) {
60
60
  var _this = this;
@@ -11,7 +11,7 @@ var EventsCachePluggable = /** @class */ (function () {
11
11
  }
12
12
  /**
13
13
  * Push given event to the storage.
14
- * @param eventData Event item to push.
14
+ * @param eventData - Event item to push.
15
15
  * @returns A promise that is resolved with a boolean value indicating if the push operation succeeded or failed.
16
16
  * Unlike `impressions::track`, The promise will never be rejected.
17
17
  */
@@ -11,7 +11,7 @@ var ImpressionsCachePluggable = /** @class */ (function () {
11
11
  }
12
12
  /**
13
13
  * Push given impressions to the storage.
14
- * @param impressions List of impresions to push.
14
+ * @param impressions - List of impresions to push.
15
15
  * @returns A promise that is resolved if the push operation succeeded
16
16
  * or rejected if the wrapper operation fails.
17
17
  */
@@ -71,7 +71,7 @@ var SegmentsCachePluggable = /** @class */ (function () {
71
71
  SegmentsCachePluggable.prototype.getRegisteredSegments = function () {
72
72
  return this.wrapper.getItems(this.keys.buildRegisteredSegmentsKey());
73
73
  };
74
- /** @TODO implement if required by DataLoader or Producer mode */
74
+ // @TODO implement if required by DataLoader or Producer mode
75
75
  SegmentsCachePluggable.prototype.clear = function () {
76
76
  return Promise.resolve(true);
77
77
  };
@@ -13,9 +13,9 @@ var SplitsCachePluggable = /** @class */ (function (_super) {
13
13
  (0, tslib_1.__extends)(SplitsCachePluggable, _super);
14
14
  /**
15
15
  * Create a SplitsCache that uses a storage wrapper.
16
- * @param log Logger instance.
17
- * @param keys Key builder.
18
- * @param wrapper Adapted wrapper storage.
16
+ * @param log - Logger instance.
17
+ * @param keys - Key builder.
18
+ * @param wrapper - Adapted wrapper storage.
19
19
  */
20
20
  function SplitsCachePluggable(log, keys, wrapper, splitFiltersValidation) {
21
21
  var _this = _super.call(this) || this;
@@ -10,9 +10,9 @@ var utils_1 = require("../utils");
10
10
  var TelemetryCachePluggable = /** @class */ (function () {
11
11
  /**
12
12
  * Create a Telemetry cache that uses a storage wrapper.
13
- * @param log Logger instance.
14
- * @param keys Key builder.
15
- * @param wrapper Adapted wrapper storage.
13
+ * @param log - Logger instance.
14
+ * @param keys - Key builder.
15
+ * @param wrapper - Adapted wrapper storage.
16
16
  */
17
17
  function TelemetryCachePluggable(log, keys, wrapper) {
18
18
  this.log = log;
@@ -48,7 +48,7 @@ var UniqueKeysCachePluggable = /** @class */ (function (_super) {
48
48
  };
49
49
  /**
50
50
  * Async consumer API, used by synchronizer.
51
- * @param count number of items to pop from the queue. If not provided or equal 0, all items will be popped.
51
+ * @param count - number of items to pop from the queue. If not provided or equal 0, all items will be popped.
52
52
  */
53
53
  UniqueKeysCachePluggable.prototype.popNRaw = function (count) {
54
54
  var _this = this;
@@ -8,7 +8,7 @@ var sets_1 = require("../../utils/lang/sets");
8
8
  * The `_cache` property is the object were items are stored.
9
9
  * Intended for testing purposes.
10
10
  *
11
- * @param connDelay delay in millis for `connect` resolve. If not provided, `connect` resolves immediately.
11
+ * @param connDelay - delay in millis for `connect` resolve. If not provided, `connect` resolves immediately.
12
12
  */
13
13
  function inMemoryWrapperFactory(connDelay) {
14
14
  var _cache = {};
@@ -27,7 +27,7 @@ var NO_VALID_WRAPPER_INTERFACE = 'The provided wrapper instance doesn’t follow
27
27
  /**
28
28
  * Validate pluggable storage factory options.
29
29
  *
30
- * @param options user options
30
+ * @param options - user options
31
31
  * @throws Will throw an error if the options are invalid. Example: wrapper is not provided or doesn't have some methods.
32
32
  */
33
33
  function validatePluggableStorageOptions(options) {
@@ -25,8 +25,8 @@ exports.METHODS_TO_PROMISE_WRAP = [
25
25
  * Adapter of the Pluggable Storage Wrapper.
26
26
  * Used to handle exceptions as rejected promises, in order to simplify the error handling on storages.
27
27
  *
28
- * @param log logger instance
29
- * @param wrapper storage wrapper to adapt
28
+ * @param log - logger instance
29
+ * @param wrapper - storage wrapper to adapt
30
30
  * @returns an adapted version of the given storage wrapper
31
31
  */
32
32
  function wrapperAdapter(log, wrapper) {
@@ -33,7 +33,7 @@ function splitsParserFromSettingsFactory() {
33
33
  }
34
34
  /**
35
35
  *
36
- * @param settings validated object with mocked features mapping.
36
+ * @param settings - validated object with mocked features mapping.
37
37
  */
38
38
  return function splitsParserFromSettings(settings) {
39
39
  var features = settings.features || {};
@@ -11,7 +11,7 @@ function flush() {
11
11
  * Offline SyncManager factory.
12
12
  * Can be used for server-side API, and client-side API with or without multiple clients.
13
13
  *
14
- * @param splitsParser e.g., `splitsParserFromFile`, `splitsParserFromSettings`.
14
+ * @param splitsParser - e.g., `splitsParserFromFile`, `splitsParserFromSettings`.
15
15
  */
16
16
  function syncManagerOfflineFactory(splitsParserFactory) {
17
17
  /**
@@ -66,12 +66,12 @@ function mySegmentsUpdaterFactory(log, mySegmentsFetcher, storage, segmentsEvent
66
66
  * MySegments updater returns a promise that resolves with a `false` boolean value if it fails to fetch mySegments or synchronize them with the storage.
67
67
  * Returned promise will not be rejected.
68
68
  *
69
- * @param {SegmentsData | undefined} segmentsData it can be:
69
+ * @param segmentsData - it can be:
70
70
  * (1) the list of mySegments names to sync in the storage,
71
71
  * (2) an object with a segment name and action (true: add, or false: delete) to update the storage,
72
72
  * (3) or `undefined`, for which the updater will fetch mySegments in order to sync the storage.
73
- * @param {boolean | undefined} noCache true to revalidate data to fetch
74
- * @param {boolean | undefined} till query param to bypass CDN requests
73
+ * @param noCache - true to revalidate data to fetch
74
+ * @param till - query param to bypass CDN requests
75
75
  */
76
76
  return function mySegmentsUpdater(segmentsData, noCache, till) {
77
77
  return _mySegmentsUpdater(0, segmentsData, noCache, till);