@splitsoftware/splitio-commons 1.0.1-rc.5 → 1.2.0

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 (561) hide show
  1. package/CHANGES.txt +13 -3
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/cjs/evaluator/Engine.js +6 -5
  5. package/cjs/evaluator/combiners/and.js +4 -4
  6. package/cjs/evaluator/combiners/ifelseif.js +4 -3
  7. package/cjs/evaluator/condition/index.js +4 -3
  8. package/cjs/evaluator/index.js +7 -7
  9. package/cjs/evaluator/matchers/all.js +2 -1
  10. package/cjs/evaluator/matchers/between.js +2 -1
  11. package/cjs/evaluator/matchers/boolean.js +2 -1
  12. package/cjs/evaluator/matchers/cont_all.js +3 -2
  13. package/cjs/evaluator/matchers/cont_any.js +3 -2
  14. package/cjs/evaluator/matchers/cont_str.js +2 -1
  15. package/cjs/evaluator/matchers/dependency.js +4 -4
  16. package/cjs/evaluator/matchers/eq.js +2 -1
  17. package/cjs/evaluator/matchers/eq_set.js +2 -1
  18. package/cjs/evaluator/matchers/ew.js +2 -1
  19. package/cjs/evaluator/matchers/gte.js +2 -1
  20. package/cjs/evaluator/matchers/index.js +36 -36
  21. package/cjs/evaluator/matchers/lte.js +2 -1
  22. package/cjs/evaluator/matchers/part_of.js +3 -2
  23. package/cjs/evaluator/matchers/segment.js +5 -5
  24. package/cjs/evaluator/matchers/string.js +2 -1
  25. package/cjs/evaluator/matchers/sw.js +2 -1
  26. package/cjs/evaluator/matchers/whitelist.js +2 -1
  27. package/cjs/evaluator/matchersTransform/index.js +12 -12
  28. package/cjs/evaluator/matchersTransform/segment.js +3 -2
  29. package/cjs/evaluator/matchersTransform/set.js +3 -2
  30. package/cjs/evaluator/matchersTransform/unaryNumeric.js +3 -2
  31. package/cjs/evaluator/matchersTransform/whitelist.js +3 -2
  32. package/cjs/evaluator/parser/index.js +16 -16
  33. package/cjs/evaluator/treatments/index.js +2 -1
  34. package/cjs/evaluator/value/index.js +5 -5
  35. package/cjs/evaluator/value/sanitize.js +2 -1
  36. package/cjs/integrations/browser.js +4 -4
  37. package/cjs/integrations/ga/GaToSplit.js +3 -4
  38. package/cjs/integrations/pluggable.js +3 -2
  39. package/cjs/listeners/browser.js +4 -4
  40. package/cjs/listeners/node.js +4 -4
  41. package/cjs/logger/index.js +2 -3
  42. package/cjs/logger/messages/info.js +1 -1
  43. package/cjs/logger/messages/warn.js +2 -2
  44. package/cjs/readiness/readinessManager.js +3 -4
  45. package/cjs/readiness/sdkReadinessManager.js +7 -7
  46. package/cjs/sdkClient/client.js +5 -5
  47. package/cjs/sdkClient/clientAttributesDecoration.js +108 -0
  48. package/cjs/sdkClient/clientCS.js +12 -10
  49. package/cjs/sdkClient/clientInputValidation.js +5 -5
  50. package/cjs/sdkClient/sdkClient.js +5 -6
  51. package/cjs/sdkClient/sdkClientMethodCS.js +4 -5
  52. package/cjs/sdkClient/sdkClientMethodCSWithTT.js +4 -5
  53. package/cjs/sdkFactory/index.js +9 -10
  54. package/cjs/sdkManager/index.js +6 -7
  55. package/cjs/services/splitApi.js +2 -3
  56. package/cjs/services/splitHttpClient.js +3 -4
  57. package/cjs/storages/AbstractSegmentsCacheSync.js +2 -1
  58. package/cjs/storages/AbstractSplitsCacheAsync.js +2 -1
  59. package/cjs/storages/AbstractSplitsCacheSync.js +2 -2
  60. package/cjs/storages/KeyBuilder.js +2 -2
  61. package/cjs/storages/KeyBuilderCS.js +4 -3
  62. package/cjs/storages/KeyBuilderSS.js +4 -3
  63. package/cjs/storages/findLatencyIndex.js +2 -1
  64. package/cjs/storages/inLocalStorage/MySegmentsCacheInLocal.js +4 -3
  65. package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +4 -3
  66. package/cjs/storages/inLocalStorage/index.js +20 -21
  67. package/cjs/storages/inMemory/AttributesCacheInMemory.js +70 -0
  68. package/cjs/storages/inMemory/CountsCacheInMemory.js +2 -1
  69. package/cjs/storages/inMemory/EventsCacheInMemory.js +2 -1
  70. package/cjs/storages/inMemory/ImpressionCountsCacheInMemory.js +2 -1
  71. package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +2 -1
  72. package/cjs/storages/inMemory/InMemoryStorage.js +10 -11
  73. package/cjs/storages/inMemory/InMemoryStorageCS.js +12 -13
  74. package/cjs/storages/inMemory/LatenciesCacheInMemory.js +4 -4
  75. package/cjs/storages/inMemory/MySegmentsCacheInMemory.js +4 -3
  76. package/cjs/storages/inMemory/SegmentsCacheInMemory.js +4 -3
  77. package/cjs/storages/inMemory/SplitsCacheInMemory.js +4 -3
  78. package/cjs/storages/inRedis/CountsCacheInRedis.js +2 -1
  79. package/cjs/storages/inRedis/EventsCacheInRedis.js +2 -1
  80. package/cjs/storages/inRedis/ImpressionsCacheInRedis.js +2 -1
  81. package/cjs/storages/inRedis/LatenciesCacheInRedis.js +4 -4
  82. package/cjs/storages/inRedis/RedisAdapter.js +6 -5
  83. package/cjs/storages/inRedis/SegmentsCacheInRedis.js +2 -1
  84. package/cjs/storages/inRedis/SplitsCacheInRedis.js +4 -3
  85. package/cjs/storages/inRedis/index.js +16 -17
  86. package/cjs/storages/pluggable/SplitsCachePluggable.js +2 -2
  87. package/cjs/storages/pluggable/index.js +8 -8
  88. package/cjs/sync/offline/splitsParser/parseCondition.js +2 -1
  89. package/cjs/sync/offline/splitsParser/splitsParserFromFile.js +3 -3
  90. package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +2 -3
  91. package/cjs/sync/offline/syncManagerOffline.js +3 -4
  92. package/cjs/sync/offline/syncTasks/fromObjectSyncTask.js +4 -5
  93. package/cjs/sync/polling/fetchers/mySegmentsFetcher.js +2 -1
  94. package/cjs/sync/polling/fetchers/segmentChangesFetcher.js +2 -1
  95. package/cjs/sync/polling/fetchers/splitChangesFetcher.js +2 -1
  96. package/cjs/sync/polling/pollingManagerCS.js +6 -6
  97. package/cjs/sync/polling/pollingManagerSS.js +8 -8
  98. package/cjs/sync/polling/syncTasks/mySegmentsSyncTask.js +5 -5
  99. package/cjs/sync/polling/syncTasks/segmentsSyncTask.js +5 -5
  100. package/cjs/sync/polling/syncTasks/splitsSyncTask.js +5 -5
  101. package/cjs/sync/polling/updaters/mySegmentsUpdater.js +2 -3
  102. package/cjs/sync/polling/updaters/segmentChangesUpdater.js +2 -3
  103. package/cjs/sync/polling/updaters/splitChangesUpdater.js +8 -6
  104. package/cjs/sync/streaming/AuthClient/index.js +2 -3
  105. package/cjs/sync/streaming/SSEClient/index.js +2 -1
  106. package/cjs/sync/streaming/SSEHandler/NotificationKeeper.js +2 -1
  107. package/cjs/sync/streaming/SSEHandler/index.js +4 -4
  108. package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +4 -4
  109. package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +4 -4
  110. package/cjs/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
  111. package/cjs/sync/streaming/pushManager.js +18 -17
  112. package/cjs/sync/submitters/submitterSyncTask.js +2 -3
  113. package/cjs/sync/syncTask.js +2 -1
  114. package/cjs/trackers/eventTracker.js +7 -7
  115. package/cjs/trackers/impressionObserver/ImpressionObserver.js +4 -4
  116. package/cjs/trackers/impressionObserver/impressionObserverCS.js +2 -3
  117. package/cjs/trackers/impressionObserver/impressionObserverSS.js +2 -3
  118. package/cjs/trackers/impressionsTracker.js +6 -6
  119. package/cjs/utils/Backoff.js +2 -1
  120. package/cjs/utils/LRUCache/index.js +2 -1
  121. package/cjs/utils/MinEventEmitter.js +2 -1
  122. package/cjs/utils/inputValidation/attribute.js +20 -0
  123. package/cjs/utils/inputValidation/attributes.js +13 -1
  124. package/cjs/utils/inputValidation/trafficTypeExistance.js +2 -3
  125. package/cjs/utils/lang/binarySearch.js +2 -1
  126. package/cjs/utils/lang/objectAssign.js +85 -0
  127. package/cjs/utils/promise/thenable.js +5 -1
  128. package/cjs/utils/promise/timeout.js +2 -1
  129. package/cjs/utils/promise/wrapper.js +2 -1
  130. package/cjs/utils/settingsValidation/impressionsMode.js +2 -1
  131. package/cjs/utils/settingsValidation/index.js +5 -6
  132. package/cjs/utils/settingsValidation/mode.js +2 -1
  133. package/cjs/utils/timeTracker/index.js +7 -8
  134. package/cjs/utils/timeTracker/now/browser.js +2 -2
  135. package/cjs/utils/timeTracker/now/node.js +2 -1
  136. package/cjs/utils/timeTracker/timer.js +3 -2
  137. package/esm/evaluator/Engine.js +3 -3
  138. package/esm/evaluator/combiners/and.js +2 -2
  139. package/esm/evaluator/combiners/ifelseif.js +2 -2
  140. package/esm/evaluator/condition/index.js +2 -2
  141. package/esm/evaluator/index.js +2 -2
  142. package/esm/evaluator/matchers/all.js +1 -1
  143. package/esm/evaluator/matchers/between.js +1 -1
  144. package/esm/evaluator/matchers/boolean.js +1 -1
  145. package/esm/evaluator/matchers/cont_all.js +1 -1
  146. package/esm/evaluator/matchers/cont_any.js +1 -1
  147. package/esm/evaluator/matchers/cont_str.js +1 -1
  148. package/esm/evaluator/matchers/dependency.js +2 -2
  149. package/esm/evaluator/matchers/eq.js +1 -1
  150. package/esm/evaluator/matchers/eq_set.js +1 -1
  151. package/esm/evaluator/matchers/ew.js +1 -1
  152. package/esm/evaluator/matchers/gte.js +1 -1
  153. package/esm/evaluator/matchers/index.js +35 -35
  154. package/esm/evaluator/matchers/lte.js +1 -1
  155. package/esm/evaluator/matchers/part_of.js +1 -1
  156. package/esm/evaluator/matchers/segment.js +2 -2
  157. package/esm/evaluator/matchers/string.js +1 -1
  158. package/esm/evaluator/matchers/sw.js +1 -1
  159. package/esm/evaluator/matchers/whitelist.js +1 -1
  160. package/esm/evaluator/matchersTransform/index.js +5 -5
  161. package/esm/evaluator/matchersTransform/segment.js +1 -1
  162. package/esm/evaluator/matchersTransform/set.js +1 -1
  163. package/esm/evaluator/matchersTransform/unaryNumeric.js +1 -1
  164. package/esm/evaluator/matchersTransform/whitelist.js +1 -1
  165. package/esm/evaluator/parser/index.js +11 -11
  166. package/esm/evaluator/treatments/index.js +1 -1
  167. package/esm/evaluator/value/index.js +3 -3
  168. package/esm/evaluator/value/sanitize.js +1 -1
  169. package/esm/integrations/browser.js +2 -2
  170. package/esm/integrations/ga/GaToSplit.js +1 -1
  171. package/esm/integrations/pluggable.js +1 -1
  172. package/esm/listeners/browser.js +2 -2
  173. package/esm/listeners/node.js +2 -2
  174. package/esm/logger/index.js +1 -1
  175. package/esm/logger/messages/info.js +1 -1
  176. package/esm/logger/messages/warn.js +2 -2
  177. package/esm/readiness/readinessManager.js +1 -1
  178. package/esm/readiness/sdkReadinessManager.js +3 -3
  179. package/esm/sdkClient/client.js +2 -2
  180. package/esm/sdkClient/clientAttributesDecoration.js +104 -0
  181. package/esm/sdkClient/clientCS.js +10 -8
  182. package/esm/sdkClient/clientInputValidation.js +2 -2
  183. package/esm/sdkClient/sdkClient.js +3 -3
  184. package/esm/sdkClient/sdkClientMethodCS.js +4 -4
  185. package/esm/sdkClient/sdkClientMethodCSWithTT.js +4 -4
  186. package/esm/sdkFactory/index.js +6 -6
  187. package/esm/sdkManager/index.js +2 -2
  188. package/esm/services/splitApi.js +1 -1
  189. package/esm/services/splitHttpClient.js +1 -1
  190. package/esm/storages/AbstractSegmentsCacheSync.js +1 -1
  191. package/esm/storages/AbstractSplitsCacheAsync.js +1 -1
  192. package/esm/storages/AbstractSplitsCacheSync.js +1 -1
  193. package/esm/storages/KeyBuilder.js +1 -1
  194. package/esm/storages/KeyBuilderCS.js +2 -2
  195. package/esm/storages/KeyBuilderSS.js +2 -2
  196. package/esm/storages/findLatencyIndex.js +1 -1
  197. package/esm/storages/inLocalStorage/MySegmentsCacheInLocal.js +2 -2
  198. package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +2 -2
  199. package/esm/storages/inLocalStorage/index.js +8 -8
  200. package/esm/storages/inMemory/AttributesCacheInMemory.js +67 -0
  201. package/esm/storages/inMemory/CountsCacheInMemory.js +1 -1
  202. package/esm/storages/inMemory/EventsCacheInMemory.js +1 -1
  203. package/esm/storages/inMemory/ImpressionCountsCacheInMemory.js +1 -1
  204. package/esm/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
  205. package/esm/storages/inMemory/InMemoryStorage.js +5 -5
  206. package/esm/storages/inMemory/InMemoryStorageCS.js +5 -5
  207. package/esm/storages/inMemory/LatenciesCacheInMemory.js +2 -2
  208. package/esm/storages/inMemory/MySegmentsCacheInMemory.js +2 -2
  209. package/esm/storages/inMemory/SegmentsCacheInMemory.js +2 -2
  210. package/esm/storages/inMemory/SplitsCacheInMemory.js +2 -2
  211. package/esm/storages/inRedis/CountsCacheInRedis.js +1 -1
  212. package/esm/storages/inRedis/EventsCacheInRedis.js +1 -1
  213. package/esm/storages/inRedis/ImpressionsCacheInRedis.js +1 -1
  214. package/esm/storages/inRedis/LatenciesCacheInRedis.js +2 -2
  215. package/esm/storages/inRedis/RedisAdapter.js +3 -3
  216. package/esm/storages/inRedis/SegmentsCacheInRedis.js +1 -1
  217. package/esm/storages/inRedis/SplitsCacheInRedis.js +2 -2
  218. package/esm/storages/inRedis/index.js +8 -8
  219. package/esm/storages/pluggable/SplitsCachePluggable.js +1 -1
  220. package/esm/storages/pluggable/index.js +4 -4
  221. package/esm/sync/offline/splitsParser/parseCondition.js +1 -1
  222. package/esm/sync/offline/splitsParser/splitsParserFromFile.js +1 -1
  223. package/esm/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
  224. package/esm/sync/offline/syncManagerOffline.js +2 -2
  225. package/esm/sync/offline/syncTasks/fromObjectSyncTask.js +2 -2
  226. package/esm/sync/polling/fetchers/mySegmentsFetcher.js +1 -1
  227. package/esm/sync/polling/fetchers/segmentChangesFetcher.js +1 -1
  228. package/esm/sync/polling/fetchers/splitChangesFetcher.js +1 -1
  229. package/esm/sync/polling/pollingManagerCS.js +3 -3
  230. package/esm/sync/polling/pollingManagerSS.js +4 -4
  231. package/esm/sync/polling/syncTasks/mySegmentsSyncTask.js +3 -3
  232. package/esm/sync/polling/syncTasks/segmentsSyncTask.js +3 -3
  233. package/esm/sync/polling/syncTasks/splitsSyncTask.js +3 -3
  234. package/esm/sync/polling/updaters/mySegmentsUpdater.js +1 -1
  235. package/esm/sync/polling/updaters/segmentChangesUpdater.js +1 -1
  236. package/esm/sync/polling/updaters/splitChangesUpdater.js +7 -4
  237. package/esm/sync/streaming/AuthClient/index.js +1 -1
  238. package/esm/sync/streaming/SSEClient/index.js +1 -1
  239. package/esm/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
  240. package/esm/sync/streaming/SSEHandler/index.js +2 -2
  241. package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +2 -2
  242. package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
  243. package/esm/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +2 -2
  244. package/esm/sync/streaming/pushManager.js +10 -9
  245. package/esm/sync/submitters/submitterSyncTask.js +1 -1
  246. package/esm/sync/syncTask.js +1 -1
  247. package/esm/trackers/eventTracker.js +3 -3
  248. package/esm/trackers/impressionObserver/ImpressionObserver.js +2 -2
  249. package/esm/trackers/impressionObserver/impressionObserverCS.js +1 -1
  250. package/esm/trackers/impressionObserver/impressionObserverSS.js +1 -1
  251. package/esm/trackers/impressionsTracker.js +3 -3
  252. package/esm/utils/Backoff.js +1 -1
  253. package/esm/utils/LRUCache/index.js +1 -1
  254. package/esm/utils/MinEventEmitter.js +1 -1
  255. package/esm/utils/inputValidation/attribute.js +16 -0
  256. package/esm/utils/inputValidation/attributes.js +11 -0
  257. package/esm/utils/inputValidation/trafficTypeExistance.js +1 -1
  258. package/esm/utils/lang/binarySearch.js +1 -1
  259. package/esm/utils/lang/objectAssign.js +82 -0
  260. package/esm/utils/promise/thenable.js +3 -1
  261. package/esm/utils/promise/timeout.js +1 -1
  262. package/esm/utils/promise/wrapper.js +1 -1
  263. package/esm/utils/settingsValidation/impressionsMode.js +1 -1
  264. package/esm/utils/settingsValidation/index.js +3 -3
  265. package/esm/utils/settingsValidation/mode.js +1 -1
  266. package/esm/utils/timeTracker/index.js +4 -5
  267. package/esm/utils/timeTracker/now/browser.js +1 -2
  268. package/esm/utils/timeTracker/now/node.js +1 -1
  269. package/esm/utils/timeTracker/timer.js +1 -1
  270. package/package.json +2 -3
  271. package/src/evaluator/Engine.ts +3 -3
  272. package/src/evaluator/combiners/and.ts +2 -2
  273. package/src/evaluator/combiners/ifelseif.ts +2 -2
  274. package/src/evaluator/condition/index.ts +2 -2
  275. package/src/evaluator/index.ts +2 -2
  276. package/src/evaluator/matchers/all.ts +1 -1
  277. package/src/evaluator/matchers/between.ts +1 -1
  278. package/src/evaluator/matchers/boolean.ts +1 -1
  279. package/src/evaluator/matchers/cont_all.ts +1 -1
  280. package/src/evaluator/matchers/cont_any.ts +1 -1
  281. package/src/evaluator/matchers/cont_str.ts +1 -1
  282. package/src/evaluator/matchers/dependency.ts +2 -2
  283. package/src/evaluator/matchers/eq.ts +1 -1
  284. package/src/evaluator/matchers/eq_set.ts +1 -1
  285. package/src/evaluator/matchers/ew.ts +1 -1
  286. package/src/evaluator/matchers/gte.ts +1 -1
  287. package/src/evaluator/matchers/index.ts +35 -35
  288. package/src/evaluator/matchers/lte.ts +1 -1
  289. package/src/evaluator/matchers/part_of.ts +1 -1
  290. package/src/evaluator/matchers/segment.ts +2 -2
  291. package/src/evaluator/matchers/string.ts +1 -1
  292. package/src/evaluator/matchers/sw.ts +1 -1
  293. package/src/evaluator/matchers/whitelist.ts +1 -1
  294. package/src/evaluator/matchersTransform/index.ts +5 -5
  295. package/src/evaluator/matchersTransform/segment.ts +1 -1
  296. package/src/evaluator/matchersTransform/set.ts +1 -1
  297. package/src/evaluator/matchersTransform/unaryNumeric.ts +1 -1
  298. package/src/evaluator/matchersTransform/whitelist.ts +1 -1
  299. package/src/evaluator/parser/index.ts +12 -12
  300. package/src/evaluator/treatments/index.ts +1 -1
  301. package/src/evaluator/value/index.ts +3 -3
  302. package/src/evaluator/value/sanitize.ts +1 -1
  303. package/src/integrations/browser.ts +2 -2
  304. package/src/integrations/ga/GaToSplit.ts +1 -1
  305. package/src/integrations/pluggable.ts +1 -1
  306. package/src/listeners/browser.ts +2 -2
  307. package/src/listeners/node.ts +2 -2
  308. package/src/logger/index.ts +1 -1
  309. package/src/logger/messages/info.ts +1 -1
  310. package/src/logger/messages/warn.ts +2 -2
  311. package/src/readiness/readinessManager.ts +2 -2
  312. package/src/readiness/sdkReadinessManager.ts +3 -3
  313. package/src/sdkClient/client.ts +2 -2
  314. package/src/sdkClient/clientAttributesDecoration.ts +122 -0
  315. package/src/sdkClient/clientCS.ts +13 -8
  316. package/src/sdkClient/clientInputValidation.ts +2 -2
  317. package/src/sdkClient/sdkClient.ts +3 -3
  318. package/src/sdkClient/sdkClientMethodCS.ts +4 -2
  319. package/src/sdkClient/sdkClientMethodCSWithTT.ts +4 -2
  320. package/src/sdkFactory/index.ts +6 -6
  321. package/src/sdkManager/index.ts +2 -2
  322. package/src/services/splitApi.ts +1 -1
  323. package/src/services/splitHttpClient.ts +1 -1
  324. package/src/storages/AbstractSegmentsCacheSync.ts +1 -1
  325. package/src/storages/AbstractSplitsCacheAsync.ts +1 -1
  326. package/src/storages/AbstractSplitsCacheSync.ts +1 -1
  327. package/src/storages/KeyBuilder.ts +1 -1
  328. package/src/storages/KeyBuilderCS.ts +2 -2
  329. package/src/storages/KeyBuilderSS.ts +2 -2
  330. package/src/storages/findLatencyIndex.ts +1 -1
  331. package/src/storages/inLocalStorage/MySegmentsCacheInLocal.ts +3 -3
  332. package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +3 -3
  333. package/src/storages/inLocalStorage/index.ts +8 -8
  334. package/src/storages/inMemory/AttributesCacheInMemory.ts +73 -0
  335. package/src/storages/inMemory/CountsCacheInMemory.ts +1 -1
  336. package/src/storages/inMemory/EventsCacheInMemory.ts +1 -1
  337. package/src/storages/inMemory/ImpressionCountsCacheInMemory.ts +1 -1
  338. package/src/storages/inMemory/ImpressionsCacheInMemory.ts +1 -1
  339. package/src/storages/inMemory/InMemoryStorage.ts +5 -5
  340. package/src/storages/inMemory/InMemoryStorageCS.ts +5 -5
  341. package/src/storages/inMemory/LatenciesCacheInMemory.ts +2 -2
  342. package/src/storages/inMemory/MySegmentsCacheInMemory.ts +2 -2
  343. package/src/storages/inMemory/SegmentsCacheInMemory.ts +2 -2
  344. package/src/storages/inMemory/SplitsCacheInMemory.ts +2 -2
  345. package/src/storages/inRedis/CountsCacheInRedis.ts +2 -2
  346. package/src/storages/inRedis/EventsCacheInRedis.ts +1 -1
  347. package/src/storages/inRedis/ImpressionsCacheInRedis.ts +1 -1
  348. package/src/storages/inRedis/LatenciesCacheInRedis.ts +3 -3
  349. package/src/storages/inRedis/RedisAdapter.ts +3 -3
  350. package/src/storages/inRedis/SegmentsCacheInRedis.ts +2 -2
  351. package/src/storages/inRedis/SplitsCacheInRedis.ts +3 -3
  352. package/src/storages/inRedis/index.ts +8 -8
  353. package/src/storages/pluggable/SegmentsCachePluggable.ts +1 -1
  354. package/src/storages/pluggable/SplitsCachePluggable.ts +2 -2
  355. package/src/storages/pluggable/index.ts +4 -4
  356. package/src/storages/types.ts +2 -2
  357. package/src/sync/offline/splitsParser/parseCondition.ts +1 -1
  358. package/src/sync/offline/splitsParser/splitsParserFromFile.ts +1 -1
  359. package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +1 -1
  360. package/src/sync/offline/syncManagerOffline.ts +2 -2
  361. package/src/sync/offline/syncTasks/fromObjectSyncTask.ts +2 -2
  362. package/src/sync/polling/fetchers/mySegmentsFetcher.ts +1 -1
  363. package/src/sync/polling/fetchers/segmentChangesFetcher.ts +1 -1
  364. package/src/sync/polling/fetchers/splitChangesFetcher.ts +1 -1
  365. package/src/sync/polling/pollingManagerCS.ts +3 -3
  366. package/src/sync/polling/pollingManagerSS.ts +4 -4
  367. package/src/sync/polling/syncTasks/mySegmentsSyncTask.ts +3 -3
  368. package/src/sync/polling/syncTasks/segmentsSyncTask.ts +3 -3
  369. package/src/sync/polling/syncTasks/splitsSyncTask.ts +3 -3
  370. package/src/sync/polling/updaters/mySegmentsUpdater.ts +1 -1
  371. package/src/sync/polling/updaters/segmentChangesUpdater.ts +1 -1
  372. package/src/sync/polling/updaters/splitChangesUpdater.ts +6 -3
  373. package/src/sync/streaming/AuthClient/index.ts +1 -1
  374. package/src/sync/streaming/SSEClient/index.ts +1 -1
  375. package/src/sync/streaming/SSEHandler/NotificationKeeper.ts +1 -1
  376. package/src/sync/streaming/SSEHandler/index.ts +2 -2
  377. package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +2 -2
  378. package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +2 -2
  379. package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +2 -2
  380. package/src/sync/streaming/UpdateWorkers/types.ts +1 -1
  381. package/src/sync/streaming/pushManager.ts +10 -9
  382. package/src/sync/submitters/submitterSyncTask.ts +1 -1
  383. package/src/sync/syncTask.ts +1 -1
  384. package/src/trackers/eventTracker.ts +3 -3
  385. package/src/trackers/impressionObserver/ImpressionObserver.ts +2 -2
  386. package/src/trackers/impressionObserver/impressionObserverCS.ts +1 -1
  387. package/src/trackers/impressionObserver/impressionObserverSS.ts +1 -1
  388. package/src/trackers/impressionsTracker.ts +3 -3
  389. package/src/types.ts +39 -0
  390. package/src/utils/Backoff.ts +1 -1
  391. package/src/utils/LRUCache/index.ts +1 -1
  392. package/src/utils/MinEventEmitter.ts +1 -1
  393. package/src/utils/inputValidation/attribute.ts +21 -0
  394. package/src/utils/inputValidation/attributes.ts +14 -0
  395. package/src/utils/inputValidation/trafficTypeExistance.ts +1 -1
  396. package/src/utils/lang/binarySearch.ts +1 -1
  397. package/src/utils/lang/objectAssign.ts +104 -0
  398. package/src/utils/promise/thenable.ts +3 -1
  399. package/src/utils/promise/timeout.ts +1 -1
  400. package/src/utils/promise/wrapper.ts +1 -1
  401. package/src/utils/settingsValidation/impressionsMode.ts +1 -1
  402. package/src/utils/settingsValidation/index.ts +3 -3
  403. package/src/utils/settingsValidation/mode.ts +1 -1
  404. package/src/utils/timeTracker/index.ts +4 -6
  405. package/src/utils/timeTracker/now/browser.ts +1 -3
  406. package/src/utils/timeTracker/now/node.ts +1 -1
  407. package/src/utils/timeTracker/timer.ts +1 -1
  408. package/types/evaluator/Engine.d.ts +1 -1
  409. package/types/evaluator/combiners/and.d.ts +1 -1
  410. package/types/evaluator/combiners/ifelseif.d.ts +1 -1
  411. package/types/evaluator/condition/index.d.ts +1 -1
  412. package/types/evaluator/matchers/all.d.ts +1 -1
  413. package/types/evaluator/matchers/between.d.ts +1 -1
  414. package/types/evaluator/matchers/boolean.d.ts +1 -1
  415. package/types/evaluator/matchers/cont_all.d.ts +1 -1
  416. package/types/evaluator/matchers/cont_any.d.ts +1 -1
  417. package/types/evaluator/matchers/cont_str.d.ts +1 -1
  418. package/types/evaluator/matchers/dependency.d.ts +1 -1
  419. package/types/evaluator/matchers/eq.d.ts +1 -1
  420. package/types/evaluator/matchers/eq_set.d.ts +1 -1
  421. package/types/evaluator/matchers/ew.d.ts +1 -1
  422. package/types/evaluator/matchers/gte.d.ts +1 -1
  423. package/types/evaluator/matchers/index.d.ts +1 -1
  424. package/types/evaluator/matchers/lte.d.ts +1 -1
  425. package/types/evaluator/matchers/part_of.d.ts +1 -1
  426. package/types/evaluator/matchers/segment.d.ts +1 -1
  427. package/types/evaluator/matchers/string.d.ts +1 -1
  428. package/types/evaluator/matchers/sw.d.ts +1 -1
  429. package/types/evaluator/matchers/whitelist.d.ts +1 -1
  430. package/types/evaluator/matchersTransform/index.d.ts +1 -1
  431. package/types/evaluator/matchersTransform/segment.d.ts +1 -1
  432. package/types/evaluator/matchersTransform/set.d.ts +1 -1
  433. package/types/evaluator/matchersTransform/unaryNumeric.d.ts +1 -1
  434. package/types/evaluator/matchersTransform/whitelist.d.ts +1 -1
  435. package/types/evaluator/parser/index.d.ts +1 -1
  436. package/types/evaluator/treatments/index.d.ts +1 -1
  437. package/types/evaluator/value/index.d.ts +1 -1
  438. package/types/evaluator/value/sanitize.d.ts +1 -1
  439. package/types/integrations/browser.d.ts +1 -1
  440. package/types/integrations/pluggable.d.ts +1 -1
  441. package/types/listeners/browser.d.ts +1 -1
  442. package/types/listeners/node.d.ts +1 -1
  443. package/types/logger/browser/{debugLogger.d.ts → DebugLogger.d.ts} +0 -0
  444. package/types/logger/browser/{errorLogger.d.ts → ErrorLogger.d.ts} +0 -0
  445. package/types/logger/browser/{infoLogger.d.ts → InfoLogger.d.ts} +0 -0
  446. package/types/logger/browser/{warnLogger.d.ts → WarnLogger.d.ts} +0 -0
  447. package/types/readiness/sdkReadinessManager.d.ts +1 -1
  448. package/types/sdkClient/client.d.ts +1 -1
  449. package/types/sdkClient/clientAttributesDecoration.d.ts +51 -0
  450. package/types/sdkClient/clientCS.d.ts +2 -1
  451. package/types/sdkClient/clientInputValidation.d.ts +1 -1
  452. package/types/storages/AbstractSegmentsCacheSync.d.ts +1 -1
  453. package/types/storages/AbstractSplitsCacheAsync.d.ts +1 -1
  454. package/types/storages/AbstractSplitsCacheSync.d.ts +1 -1
  455. package/types/storages/KeyBuilder.d.ts +1 -1
  456. package/types/storages/KeyBuilderCS.d.ts +2 -2
  457. package/types/storages/KeyBuilderSS.d.ts +2 -2
  458. package/types/storages/findLatencyIndex.d.ts +1 -1
  459. package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +3 -3
  460. package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +3 -3
  461. package/types/storages/inMemory/AttributesCacheInMemory.d.ts +43 -0
  462. package/types/storages/inMemory/CountsCacheInMemory.d.ts +1 -1
  463. package/types/storages/inMemory/EventsCacheInMemory.d.ts +1 -1
  464. package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +1 -1
  465. package/types/storages/inMemory/ImpressionsCacheInMemory.d.ts +1 -1
  466. package/types/storages/inMemory/LatenciesCacheInMemory.d.ts +1 -1
  467. package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +2 -2
  468. package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +2 -2
  469. package/types/storages/inMemory/SplitsCacheInMemory.d.ts +2 -2
  470. package/types/storages/inRedis/CountsCacheInRedis.d.ts +2 -2
  471. package/types/storages/inRedis/EventsCacheInRedis.d.ts +1 -1
  472. package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +1 -1
  473. package/types/storages/inRedis/LatenciesCacheInRedis.d.ts +2 -2
  474. package/types/storages/inRedis/RedisAdapter.d.ts +1 -1
  475. package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +2 -2
  476. package/types/storages/inRedis/SplitsCacheInRedis.d.ts +3 -3
  477. package/types/storages/pluggable/SegmentsCachePluggable.d.ts +1 -1
  478. package/types/storages/pluggable/SplitsCachePluggable.d.ts +2 -2
  479. package/types/storages/types.d.ts +2 -2
  480. package/types/sync/offline/splitsParser/parseCondition.d.ts +1 -1
  481. package/types/sync/offline/syncTasks/fromObjectSyncTask.d.ts +1 -1
  482. package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +1 -1
  483. package/types/sync/polling/fetchers/segmentChangesFetcher.d.ts +1 -1
  484. package/types/sync/polling/fetchers/splitChangesFetcher.d.ts +1 -1
  485. package/types/sync/polling/pollingManagerCS.d.ts +1 -1
  486. package/types/sync/polling/pollingManagerSS.d.ts +1 -1
  487. package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +1 -1
  488. package/types/sync/polling/syncTasks/segmentsSyncTask.d.ts +1 -1
  489. package/types/sync/polling/syncTasks/splitsSyncTask.d.ts +1 -1
  490. package/types/sync/streaming/SSEClient/index.d.ts +1 -1
  491. package/types/sync/streaming/SSEHandler/NotificationKeeper.d.ts +1 -1
  492. package/types/sync/streaming/SSEHandler/index.d.ts +1 -1
  493. package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +2 -2
  494. package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +2 -2
  495. package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +2 -2
  496. package/types/sync/streaming/UpdateWorkers/types.d.ts +1 -1
  497. package/types/sync/streaming/pushManager.d.ts +1 -1
  498. package/types/sync/syncTask.d.ts +1 -1
  499. package/types/trackers/eventTracker.d.ts +1 -1
  500. package/types/trackers/impressionObserver/ImpressionObserver.d.ts +1 -1
  501. package/types/trackers/impressionObserver/impressionObserverCS.d.ts +1 -1
  502. package/types/trackers/impressionObserver/impressionObserverSS.d.ts +1 -1
  503. package/types/trackers/impressionsTracker.d.ts +1 -1
  504. package/types/types.d.ts +39 -0
  505. package/types/utils/Backoff.d.ts +1 -1
  506. package/types/utils/LRUCache/index.d.ts +1 -1
  507. package/types/utils/MinEventEmitter.d.ts +1 -1
  508. package/types/utils/inputValidation/attribute.d.ts +2 -0
  509. package/types/utils/inputValidation/attributes.d.ts +1 -0
  510. package/types/utils/lang/binarySearch.d.ts +1 -1
  511. package/types/utils/lang/objectAssign.d.ts +3 -0
  512. package/types/utils/promise/thenable.d.ts +1 -2
  513. package/types/utils/promise/timeout.d.ts +1 -1
  514. package/types/utils/promise/wrapper.d.ts +1 -1
  515. package/types/utils/settingsValidation/impressionsMode.d.ts +1 -1
  516. package/types/utils/settingsValidation/mode.d.ts +1 -1
  517. package/types/utils/timeTracker/index.d.ts +2 -2
  518. package/types/utils/timeTracker/now/browser.d.ts +1 -2
  519. package/types/utils/timeTracker/now/node.d.ts +1 -1
  520. package/types/utils/timeTracker/timer.d.ts +1 -1
  521. package/src/logger/.DS_Store +0 -0
  522. package/types/integrations/ga/GaToSplitPlugin.d.ts +0 -3
  523. package/types/integrations/ga/SplitToGaPlugin.d.ts +0 -4
  524. package/types/logger/codes.d.ts +0 -2
  525. package/types/logger/codesConstants.d.ts +0 -117
  526. package/types/logger/codesConstantsBrowser.d.ts +0 -2
  527. package/types/logger/codesConstantsNode.d.ts +0 -14
  528. package/types/logger/codesDebug.d.ts +0 -1
  529. package/types/logger/codesDebugBrowser.d.ts +0 -1
  530. package/types/logger/codesDebugNode.d.ts +0 -1
  531. package/types/logger/codesError.d.ts +0 -1
  532. package/types/logger/codesErrorNode.d.ts +0 -1
  533. package/types/logger/codesInfo.d.ts +0 -1
  534. package/types/logger/codesWarn.d.ts +0 -1
  535. package/types/logger/codesWarnNode.d.ts +0 -1
  536. package/types/logger/debugLogger.d.ts +0 -2
  537. package/types/logger/errorLogger.d.ts +0 -2
  538. package/types/logger/infoLogger.d.ts +0 -2
  539. package/types/logger/messages/debugBrowser.d.ts +0 -1
  540. package/types/logger/messages/debugNode.d.ts +0 -1
  541. package/types/logger/messages/errorNode.d.ts +0 -1
  542. package/types/logger/messages/warnNode.d.ts +0 -1
  543. package/types/logger/noopLogger.d.ts +0 -2
  544. package/types/logger/warnLogger.d.ts +0 -2
  545. package/types/sdkManager/sdkManagerMethod.d.ts +0 -6
  546. package/types/storages/getRegisteredSegments.d.ts +0 -10
  547. package/types/sync/polling/syncTasks/splitsSyncTask.copy.d.ts +0 -35
  548. package/types/sync/polling/syncTasks/splitsSyncTask.morelikeoriginal.d.ts +0 -35
  549. package/types/sync/streaming/AuthClient/indexV1.d.ts +0 -12
  550. package/types/sync/streaming/AuthClient/indexV2.d.ts +0 -8
  551. package/types/sync/streaming/pushManagerCS.d.ts +0 -12
  552. package/types/sync/streaming/pushManagerNoUsers.d.ts +0 -13
  553. package/types/sync/streaming/pushManagerSS.d.ts +0 -11
  554. package/types/sync/syncManagerFromFile.d.ts +0 -2
  555. package/types/sync/syncManagerFromObject.d.ts +0 -2
  556. package/types/sync/syncManagerOffline.d.ts +0 -9
  557. package/types/utils/lang/errors.d.ts +0 -10
  558. package/types/utils/murmur3/commons.d.ts +0 -12
  559. package/types/utils/settingsValidation/buildMetadata.d.ts +0 -3
  560. package/types/utils/settingsValidation/localhost/index.d.ts +0 -9
  561. package/types/utils/settingsValidation/logger.d.ts +0 -11
@@ -0,0 +1,51 @@
1
+ import { SplitIO } from '../types';
2
+ import { ILogger } from '../logger/types';
3
+ /**
4
+ * Add in memory attributes storage methods and combine them with any attribute received from the getTreatment/s call
5
+ */
6
+ export declare function clientAttributesDecoration<TClient extends SplitIO.IClient | SplitIO.IAsyncClient>(log: ILogger, client: TClient): TClient & {
7
+ getTreatment: (maybeKey: SplitIO.SplitKey, maybeSplit: string, maybeAttributes?: SplitIO.Attributes | undefined) => string | SplitIO.AsyncTreatment;
8
+ getTreatmentWithConfig: (maybeKey: SplitIO.SplitKey, maybeSplit: string, maybeAttributes?: SplitIO.Attributes | undefined) => SplitIO.TreatmentWithConfig | SplitIO.AsyncTreatmentWithConfig;
9
+ getTreatments: (maybeKey: SplitIO.SplitKey, maybeSplits: string[], maybeAttributes?: SplitIO.Attributes | undefined) => SplitIO.Treatments | SplitIO.AsyncTreatments;
10
+ getTreatmentsWithConfig: (maybeKey: SplitIO.SplitKey, maybeSplits: string[], maybeAttributes?: SplitIO.Attributes | undefined) => SplitIO.TreatmentsWithConfig | SplitIO.AsyncTreatmentsWithConfig;
11
+ track: (maybeKey: SplitIO.SplitKey, maybeTT: string, maybeEvent: string, maybeEventValue?: number | undefined, maybeProperties?: SplitIO.Properties | undefined) => import("../dtos/types").MaybeThenable<boolean>;
12
+ /**
13
+ * Add an attribute to client's in memory attributes storage
14
+ *
15
+ * @param {string} attributeName Attrinute name
16
+ * @param {string, number, boolean, list} attributeValue Attribute value
17
+ * @returns {boolean} true if the attribute was stored and false otherways
18
+ */
19
+ setAttribute(attributeName: string, attributeValue: Object): boolean;
20
+ /**
21
+ * Returns the attribute with the given key
22
+ *
23
+ * @param {string} attributeName Attribute name
24
+ * @returns {Object} Attribute with the given key
25
+ */
26
+ getAttribute(attributeName: string): Object;
27
+ /**
28
+ * Add to client's in memory attributes storage the attributes in 'attributes'
29
+ *
30
+ * @param {Object} attributes Object with attributes to store
31
+ * @returns true if attributes were stored an false otherways
32
+ */
33
+ setAttributes(attributes: Record<string, Object>): boolean;
34
+ /**
35
+ * Return all the attributes stored in client's in memory attributes storage
36
+ *
37
+ * @returns {Object} returns all the stored attributes
38
+ */
39
+ getAttributes(): Record<string, Object>;
40
+ /**
41
+ * Removes from client's in memory attributes storage the attribute with the given key
42
+ *
43
+ * @param {string} attributeName
44
+ * @returns {boolean} true if attribute was removed and false otherways
45
+ */
46
+ removeAttribute(attributeName: string): boolean;
47
+ /**
48
+ * Remove all the stored attributes in the client's in memory attribute storage
49
+ */
50
+ clearAttributes(): boolean;
51
+ };
@@ -1,3 +1,4 @@
1
+ import { ILogger } from '../logger/types';
1
2
  import { SplitIO } from '../types';
2
3
  /**
3
4
  * Decorator that binds a key and (optionally) a traffic type to client methods
@@ -6,4 +7,4 @@ import { SplitIO } from '../types';
6
7
  * @param key validated split key
7
8
  * @param trafficType validated traffic type
8
9
  */
9
- export default function clientCSDecorator(client: SplitIO.IClient, key: SplitIO.SplitKey, trafficType?: string): SplitIO.ICsClient;
10
+ export declare function clientCSDecorator(log: ILogger, client: SplitIO.IClient, key: SplitIO.SplitKey, trafficType?: string): SplitIO.ICsClient;
@@ -5,4 +5,4 @@ import { ILogger } from '../logger/types';
5
5
  * Decorator that validates the input before actually executing the client methods.
6
6
  * We should "guard" the client here, while not polluting the "real" implementation of those methods.
7
7
  */
8
- export default function clientInputValidationDecorator<TClient extends SplitIO.IClient | SplitIO.IAsyncClient>(log: ILogger, client: TClient, readinessManager: IReadinessManager, isStorageSync?: boolean): TClient;
8
+ export declare function clientInputValidationDecorator<TClient extends SplitIO.IClient | SplitIO.IAsyncClient>(log: ILogger, client: TClient, readinessManager: IReadinessManager, isStorageSync?: boolean): TClient;
@@ -3,7 +3,7 @@ import { ISegmentsCacheSync } from './types';
3
3
  * This class provides a skeletal implementation of the ISegmentsCacheSync interface
4
4
  * to minimize the effort required to implement this interface.
5
5
  */
6
- export default abstract class AbstractSegmentsCacheSync implements ISegmentsCacheSync {
6
+ export declare abstract class AbstractSegmentsCacheSync implements ISegmentsCacheSync {
7
7
  /**
8
8
  * For server-side synchronizer: add `segmentKeys` list of keys to `name` segment.
9
9
  * For client-side synchronizer: add `name` segment to the cache. `segmentKeys` is undefined.
@@ -3,7 +3,7 @@ import { ISplitsCacheAsync } from './types';
3
3
  * This class provides a skeletal implementation of the ISplitsCacheAsync interface
4
4
  * to minimize the effort required to implement this interface.
5
5
  */
6
- export default abstract class AbstractSplitsCacheAsync implements ISplitsCacheAsync {
6
+ export declare abstract class AbstractSplitsCacheAsync implements ISplitsCacheAsync {
7
7
  abstract addSplit(name: string, split: string): Promise<boolean>;
8
8
  abstract addSplits(entries: [string, string][]): Promise<boolean[] | void>;
9
9
  abstract removeSplits(names: string[]): Promise<boolean[] | void>;
@@ -4,7 +4,7 @@ import { ISplit } from '../dtos/types';
4
4
  * This class provides a skeletal implementation of the ISplitsCacheSync interface
5
5
  * to minimize the effort required to implement this interface.
6
6
  */
7
- export default abstract class AbstractSplitsCacheSync implements ISplitsCacheSync {
7
+ export declare abstract class AbstractSplitsCacheSync implements ISplitsCacheSync {
8
8
  abstract addSplit(name: string, split: string): boolean;
9
9
  addSplits(entries: [string, string][]): boolean[];
10
10
  abstract removeSplit(name: string): boolean;
@@ -1,5 +1,5 @@
1
1
  export declare function validatePrefix(prefix: unknown): string;
2
- export default class KeyBuilder {
2
+ export declare class KeyBuilder {
3
3
  protected readonly prefix: string;
4
4
  constructor(prefix?: string);
5
5
  buildTrafficTypeKey(trafficType: string): string;
@@ -1,5 +1,5 @@
1
- import KeyBuilder from './KeyBuilder';
2
- export default class KeyBuilderCS extends KeyBuilder {
1
+ import { KeyBuilder } from './KeyBuilder';
2
+ export declare class KeyBuilderCS extends KeyBuilder {
3
3
  protected readonly regexSplitsCacheKey: RegExp;
4
4
  protected readonly matchingKey: string;
5
5
  constructor(prefix: string, matchingKey: string);
@@ -1,6 +1,6 @@
1
- import KeyBuilder from './KeyBuilder';
1
+ import { KeyBuilder } from './KeyBuilder';
2
2
  import { IMetadata } from '../dtos/types';
3
- export default class KeyBuilderSS extends KeyBuilder {
3
+ export declare class KeyBuilderSS extends KeyBuilder {
4
4
  protected readonly metadata: IMetadata;
5
5
  constructor(prefix: string, metadata: IMetadata);
6
6
  buildRegisteredSegmentsKey(): string;
@@ -1 +1 @@
1
- export default function findLatencyIndex(latency: number, min?: number, max?: number, base?: number): number;
1
+ export declare function findLatencyIndex(latency: number, min?: number, max?: number, base?: number): number;
@@ -1,7 +1,7 @@
1
1
  import { ILogger } from '../../logger/types';
2
- import AbstractSegmentsCacheSync from '../AbstractSegmentsCacheSync';
3
- import KeyBuilderCS from '../KeyBuilderCS';
4
- export default class MySegmentsCacheInLocal extends AbstractSegmentsCacheSync {
2
+ import { AbstractSegmentsCacheSync } from '../AbstractSegmentsCacheSync';
3
+ import { KeyBuilderCS } from '../KeyBuilderCS';
4
+ export declare class MySegmentsCacheInLocal extends AbstractSegmentsCacheSync {
5
5
  private readonly keys;
6
6
  private readonly log;
7
7
  constructor(log: ILogger, keys: KeyBuilderCS);
@@ -1,11 +1,11 @@
1
1
  import { ISplitFiltersValidation } from '../../dtos/types';
2
- import AbstractSplitsCacheSync from '../AbstractSplitsCacheSync';
3
- import KeyBuilderCS from '../KeyBuilderCS';
2
+ import { AbstractSplitsCacheSync } from '../AbstractSplitsCacheSync';
3
+ import { KeyBuilderCS } from '../KeyBuilderCS';
4
4
  import { ILogger } from '../../logger/types';
5
5
  /**
6
6
  * ISplitsCacheSync implementation that stores split definitions in browser LocalStorage.
7
7
  */
8
- export default class SplitsCacheInLocal extends AbstractSplitsCacheSync {
8
+ export declare class SplitsCacheInLocal extends AbstractSplitsCacheSync {
9
9
  private readonly log;
10
10
  private readonly keys;
11
11
  private readonly splitFiltersValidation;
@@ -0,0 +1,43 @@
1
+ export declare class AttributesCacheInMemory {
2
+ private attributesCache;
3
+ /**
4
+ * Create or update the value for the given attribute
5
+ *
6
+ * @param {string} attributeName attribute name
7
+ * @param {Object} attributeValue attribute value
8
+ * @returns {boolean} the attribute was stored
9
+ */
10
+ setAttribute(attributeName: string, attributeValue: Object): boolean;
11
+ /**
12
+ * Retrieves the value of a given attribute
13
+ *
14
+ * @param {string} attributeName attribute name
15
+ * @returns {Object?} stored attribute value
16
+ */
17
+ getAttribute(attributeName: string): Object;
18
+ /**
19
+ * Create or update all the given attributes
20
+ *
21
+ * @param {[string, Object]} attributes attributes to create or update
22
+ * @returns {boolean} attributes were stored
23
+ */
24
+ setAttributes(attributes: Record<string, Object>): boolean;
25
+ /**
26
+ * Retrieve the full attributes map
27
+ *
28
+ * @returns {Map<string, Object>} stored attributes
29
+ */
30
+ getAll(): Record<string, Object>;
31
+ /**
32
+ * Removes a given attribute from the map
33
+ *
34
+ * @param {string} attributeName attribute to remove
35
+ * @returns {boolean} attribute removed
36
+ */
37
+ removeAttribute(attributeName: string): boolean;
38
+ /**
39
+ * Clears all attributes stored in the SDK
40
+ *
41
+ */
42
+ clear(): boolean;
43
+ }
@@ -1,5 +1,5 @@
1
1
  import { ICountsCacheSync } from '../types';
2
- export default class CountsCacheInMemory implements ICountsCacheSync {
2
+ export declare class CountsCacheInMemory implements ICountsCacheSync {
3
3
  private counters;
4
4
  /**
5
5
  * Add counts.
@@ -1,6 +1,6 @@
1
1
  import { SplitIO } from '../../types';
2
2
  import { IEventsCacheSync } from '../types';
3
- export default class EventsCacheInMemory implements IEventsCacheSync {
3
+ export declare class EventsCacheInMemory implements IEventsCacheSync {
4
4
  private onFullQueue?;
5
5
  private readonly maxQueue;
6
6
  private queue;
@@ -1,5 +1,5 @@
1
1
  import { IImpressionCountsCacheSync } from '../types';
2
- export default class ImpressionCountsCacheInMemory implements IImpressionCountsCacheSync {
2
+ export declare class ImpressionCountsCacheInMemory implements IImpressionCountsCacheSync {
3
3
  private cache;
4
4
  /**
5
5
  * Builds key to be stored in the cache with the featureName and the timeFrame truncated.
@@ -1,6 +1,6 @@
1
1
  import { IImpressionsCacheSync } from '../types';
2
2
  import { ImpressionDTO } from '../../types';
3
- export default class ImpressionsCacheInMemory implements IImpressionsCacheSync {
3
+ export declare class ImpressionsCacheInMemory implements IImpressionsCacheSync {
4
4
  private queue;
5
5
  /**
6
6
  * Store impressions in sequential order
@@ -1,5 +1,5 @@
1
1
  import { ILatenciesCacheSync } from '../types';
2
- export default class LatenciesCacheInMemory implements ILatenciesCacheSync {
2
+ export declare class LatenciesCacheInMemory implements ILatenciesCacheSync {
3
3
  private counters;
4
4
  /**
5
5
  * Add latencies.
@@ -1,9 +1,9 @@
1
- import AbstractSegmentsCacheSync from '../AbstractSegmentsCacheSync';
1
+ import { AbstractSegmentsCacheSync } from '../AbstractSegmentsCacheSync';
2
2
  /**
3
3
  * Default MySegmentsCacheInMemory implementation that stores MySegments in memory.
4
4
  * Supported by all JS runtimes.
5
5
  */
6
- export default class MySegmentsCacheInMemory extends AbstractSegmentsCacheSync {
6
+ export declare class MySegmentsCacheInMemory extends AbstractSegmentsCacheSync {
7
7
  private segmentCache;
8
8
  clear(): void;
9
9
  addToSegment(name: string): boolean;
@@ -1,9 +1,9 @@
1
- import AbstractSegmentsCacheSync from '../AbstractSegmentsCacheSync';
1
+ import { AbstractSegmentsCacheSync } from '../AbstractSegmentsCacheSync';
2
2
  /**
3
3
  * Default ISplitsCacheSync implementation that stores split definitions in memory.
4
4
  * Supported by all JS runtimes.
5
5
  */
6
- export default class SegmentsCacheInMemory extends AbstractSegmentsCacheSync {
6
+ export declare class SegmentsCacheInMemory extends AbstractSegmentsCacheSync {
7
7
  private segmentCache;
8
8
  private segmentChangeNumber;
9
9
  addToSegment(name: string, segmentKeys: string[]): boolean;
@@ -1,9 +1,9 @@
1
- import AbstractSplitsCacheSync from '../AbstractSplitsCacheSync';
1
+ import { AbstractSplitsCacheSync } from '../AbstractSplitsCacheSync';
2
2
  /**
3
3
  * Default ISplitsCacheSync implementation that stores split definitions in memory.
4
4
  * Supported by all JS runtimes.
5
5
  */
6
- export default class SplitsCacheInMemory extends AbstractSplitsCacheSync {
6
+ export declare class SplitsCacheInMemory extends AbstractSplitsCacheSync {
7
7
  private splitsCache;
8
8
  private ttCache;
9
9
  private changeNumber;
@@ -1,7 +1,7 @@
1
1
  import { ICountsCacheAsync } from '../types';
2
- import KeyBuilderSS from '../KeyBuilderSS';
2
+ import { KeyBuilderSS } from '../KeyBuilderSS';
3
3
  import { Redis } from 'ioredis';
4
- export default class CountsCacheInRedis implements ICountsCacheAsync {
4
+ export declare class CountsCacheInRedis implements ICountsCacheAsync {
5
5
  private readonly redis;
6
6
  private readonly keys;
7
7
  constructor(keys: KeyBuilderSS, redis: Redis);
@@ -4,7 +4,7 @@ import { Redis } from 'ioredis';
4
4
  import { SplitIO } from '../../types';
5
5
  import { ILogger } from '../../logger/types';
6
6
  import { StoredEventWithMetadata } from '../../sync/submitters/types';
7
- export default class EventsCacheInRedis implements IEventsCacheAsync {
7
+ export declare class EventsCacheInRedis implements IEventsCacheAsync {
8
8
  private readonly log;
9
9
  private readonly key;
10
10
  private readonly redis;
@@ -4,7 +4,7 @@ import { ImpressionDTO } from '../../types';
4
4
  import { Redis } from 'ioredis';
5
5
  import { StoredImpressionWithMetadata } from '../../sync/submitters/types';
6
6
  import { ILogger } from '../../logger/types';
7
- export default class ImpressionsCacheInRedis implements IImpressionsCacheAsync {
7
+ export declare class ImpressionsCacheInRedis implements IImpressionsCacheAsync {
8
8
  private readonly log;
9
9
  private readonly key;
10
10
  private readonly redis;
@@ -1,7 +1,7 @@
1
1
  import { ILatenciesCacheAsync } from '../types';
2
- import KeyBuilderSS from '../KeyBuilderSS';
2
+ import { KeyBuilderSS } from '../KeyBuilderSS';
3
3
  import { Redis } from 'ioredis';
4
- export default class LatenciesCacheInRedis implements ILatenciesCacheAsync {
4
+ export declare class LatenciesCacheInRedis implements ILatenciesCacheAsync {
5
5
  private readonly redis;
6
6
  private readonly keys;
7
7
  constructor(keys: KeyBuilderSS, redis: Redis);
@@ -3,7 +3,7 @@ import { ILogger } from '../../logger/types';
3
3
  /**
4
4
  * Redis adapter on top of the library of choice (written with ioredis) for some extra control.
5
5
  */
6
- export default class RedisAdapter extends ioredis {
6
+ export declare class RedisAdapter extends ioredis {
7
7
  private readonly log;
8
8
  private _options;
9
9
  private _notReadyCommandsQueue?;
@@ -1,8 +1,8 @@
1
1
  import { Redis } from 'ioredis';
2
2
  import { ILogger } from '../../logger/types';
3
- import KeyBuilderSS from '../KeyBuilderSS';
3
+ import { KeyBuilderSS } from '../KeyBuilderSS';
4
4
  import { ISegmentsCacheAsync } from '../types';
5
- export default class SegmentsCacheInRedis implements ISegmentsCacheAsync {
5
+ export declare class SegmentsCacheInRedis implements ISegmentsCacheAsync {
6
6
  private readonly log;
7
7
  private readonly redis;
8
8
  private readonly keys;
@@ -1,12 +1,12 @@
1
- import KeyBuilderSS from '../KeyBuilderSS';
1
+ import { KeyBuilderSS } from '../KeyBuilderSS';
2
2
  import { Redis } from 'ioredis';
3
3
  import { ILogger } from '../../logger/types';
4
- import AbstractSplitsCacheAsync from '../AbstractSplitsCacheAsync';
4
+ import { AbstractSplitsCacheAsync } from '../AbstractSplitsCacheAsync';
5
5
  /**
6
6
  * ISplitsCacheAsync implementation that stores split definitions in Redis.
7
7
  * Supported by Node.
8
8
  */
9
- export default class SplitsCacheInRedis extends AbstractSplitsCacheAsync {
9
+ export declare class SplitsCacheInRedis extends AbstractSplitsCacheAsync {
10
10
  private readonly log;
11
11
  private readonly redis;
12
12
  private readonly keys;
@@ -1,4 +1,4 @@
1
- import KeyBuilderSS from '../KeyBuilderSS';
1
+ import { KeyBuilderSS } from '../KeyBuilderSS';
2
2
  import { IPluggableStorageWrapper, ISegmentsCacheAsync } from '../types';
3
3
  import { ILogger } from '../../logger/types';
4
4
  /**
@@ -1,7 +1,7 @@
1
- import KeyBuilder from '../KeyBuilder';
1
+ import { KeyBuilder } from '../KeyBuilder';
2
2
  import { IPluggableStorageWrapper } from '../types';
3
3
  import { ILogger } from '../../logger/types';
4
- import AbstractSplitsCacheAsync from '../AbstractSplitsCacheAsync';
4
+ import { AbstractSplitsCacheAsync } from '../AbstractSplitsCacheAsync';
5
5
  /**
6
6
  * ISplitsCacheAsync implementation for pluggable storages.
7
7
  */
@@ -65,7 +65,7 @@ export interface IPluggableStorageWrapper {
65
65
  getMany: (keys: string[]) => Promise<(string | null)[]>;
66
66
  /** Integer operations */
67
67
  /**
68
- * Increments in 1 the given `key` value or set it in 1 if the value doesn't exist.
68
+ * Increments in 1 the given `key` value or set it to 1 if the value doesn't exist.
69
69
  *
70
70
  * @function incr
71
71
  * @param {string} key Key to increment
@@ -74,7 +74,7 @@ export interface IPluggableStorageWrapper {
74
74
  */
75
75
  incr: (key: string) => Promise<number>;
76
76
  /**
77
- * Decrements in 1 the given `key` value or set it in -1 if the value doesn't exist.
77
+ * Decrements in 1 the given `key` value or set it to -1 if the value doesn't exist.
78
78
  *
79
79
  * @function decr
80
80
  * @param {string} key Key to decrement
@@ -4,4 +4,4 @@ export interface IMockSplitEntry {
4
4
  keys?: string[];
5
5
  config?: string;
6
6
  }
7
- export default function parseCondition(data: IMockSplitEntry): ISplitCondition;
7
+ export declare function parseCondition(data: IMockSplitEntry): ISplitCondition;
@@ -12,6 +12,6 @@ export declare function fromObjectUpdaterFactory(splitsParser: ISplitsParser, st
12
12
  /**
13
13
  * PollingManager in Offline mode
14
14
  */
15
- export default function fromObjectSyncTaskFactory(splitsParser: ISplitsParser, storage: {
15
+ export declare function fromObjectSyncTaskFactory(splitsParser: ISplitsParser, storage: {
16
16
  splits: ISplitsCacheSync;
17
17
  }, readiness: IReadinessManager, settings: ISettings): ISyncTask<[], boolean>;
@@ -4,4 +4,4 @@ import { IMySegmentsFetcher } from './types';
4
4
  * Factory of MySegments fetcher.
5
5
  * MySegments fetcher is a wrapper around `mySegments` API service that parses the response and handle errors.
6
6
  */
7
- export default function mySegmentsFetcherFactory(fetchMySegments: IFetchMySegments, userMatchingKey: string): IMySegmentsFetcher;
7
+ export declare function mySegmentsFetcherFactory(fetchMySegments: IFetchMySegments, userMatchingKey: string): IMySegmentsFetcher;
@@ -4,4 +4,4 @@ import { ISegmentChangesFetcher } from './types';
4
4
  * Factory of SegmentChanges fetcher.
5
5
  * SegmentChanges fetcher is a wrapper around `segmentChanges` API service that parses the response and handle errors and retries.
6
6
  */
7
- export default function segmentChangesFetcherFactory(fetchSegmentChanges: IFetchSegmentChanges): ISegmentChangesFetcher;
7
+ export declare function segmentChangesFetcherFactory(fetchSegmentChanges: IFetchSegmentChanges): ISegmentChangesFetcher;
@@ -4,4 +4,4 @@ import { ISplitChangesFetcher } from './types';
4
4
  * Factory of SplitChanges fetcher.
5
5
  * SplitChanges fetcher is a wrapper around `splitChanges` API service that parses the response and handle errors.
6
6
  */
7
- export default function splitChangesFetcherFactory(fetchSplitChanges: IFetchSplitChanges): ISplitChangesFetcher;
7
+ export declare function splitChangesFetcherFactory(fetchSplitChanges: IFetchSplitChanges): ISplitChangesFetcher;
@@ -7,4 +7,4 @@ import { ISettings } from '../../types';
7
7
  * Expose start / stop mechanism for polling data from services.
8
8
  * For client-side API with multiple clients.
9
9
  */
10
- export default function pollingManagerCSFactory(splitApi: ISplitApi, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): IPollingManagerCS;
10
+ export declare function pollingManagerCSFactory(splitApi: ISplitApi, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): IPollingManagerCS;
@@ -6,4 +6,4 @@ import { IPollingManager } from './types';
6
6
  /**
7
7
  * Expose start / stop mechanism for pulling data from services.
8
8
  */
9
- export default function pollingManagerSSFactory(splitApi: ISplitApi, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): IPollingManager;
9
+ export declare function pollingManagerSSFactory(splitApi: ISplitApi, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): IPollingManager;
@@ -6,4 +6,4 @@ import { ISettings } from '../../../types';
6
6
  /**
7
7
  * Creates a sync task that periodically executes a `mySegmentsUpdater` task
8
8
  */
9
- export default function mySegmentsSyncTaskFactory(fetchMySegments: IFetchMySegments, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings, matchingKey: string): ISegmentsSyncTask;
9
+ export declare function mySegmentsSyncTaskFactory(fetchMySegments: IFetchMySegments, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings, matchingKey: string): ISegmentsSyncTask;
@@ -6,4 +6,4 @@ import { ISettings } from '../../../types';
6
6
  /**
7
7
  * Creates a sync task that periodically executes a `segmentChangesUpdater` task
8
8
  */
9
- export default function segmentsSyncTaskFactory(fetchSegmentChanges: IFetchSegmentChanges, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): ISegmentsSyncTask;
9
+ export declare function segmentsSyncTaskFactory(fetchSegmentChanges: IFetchSegmentChanges, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): ISegmentsSyncTask;
@@ -6,4 +6,4 @@ import { ISettings } from '../../../types';
6
6
  /**
7
7
  * Creates a sync task that periodically executes a `splitChangesUpdater` task
8
8
  */
9
- export default function splitsSyncTaskFactory(fetchSplitChanges: IFetchSplitChanges, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): ISplitsSyncTask;
9
+ export declare function splitsSyncTaskFactory(fetchSplitChanges: IFetchSplitChanges, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): ISplitsSyncTask;
@@ -5,7 +5,7 @@ import { ISSEClient, ISseEventHandler } from './types';
5
5
  /**
6
6
  * Handles streaming connections with EventSource API
7
7
  */
8
- export default class SSEClient implements ISSEClient {
8
+ export declare class SSEClient implements ISSEClient {
9
9
  eventSource?: IEventSourceConstructor;
10
10
  streamingUrl: string;
11
11
  connection?: InstanceType<IEventSourceConstructor>;
@@ -5,7 +5,7 @@ import { IPushEventEmitter } from '../types';
5
5
  *
6
6
  * @param pushEmitter emitter for events related to streaming support
7
7
  */
8
- export default function notificationKeeperFactory(pushEmitter: IPushEventEmitter): {
8
+ export declare function notificationKeeperFactory(pushEmitter: IPushEventEmitter): {
9
9
  handleOpen(): void;
10
10
  isStreamingUp(): boolean;
11
11
  handleOccupancyEvent(publishers: number, channel: string, timestamp: number): void;
@@ -7,4 +7,4 @@ import { ILogger } from '../../../logger/types';
7
7
  * @param log factory logger
8
8
  * @param pushEmitter emitter for events related to streaming support
9
9
  */
10
- export default function SSEHandlerFactory(log: ILogger, pushEmitter: IPushEventEmitter): ISseEventHandler;
10
+ export declare function SSEHandlerFactory(log: ILogger, pushEmitter: IPushEventEmitter): ISseEventHandler;
@@ -1,11 +1,11 @@
1
1
  import { ISegmentsSyncTask } from '../../polling/types';
2
- import Backoff from '../../../utils/Backoff';
2
+ import { Backoff } from '../../../utils/Backoff';
3
3
  import { IUpdateWorker } from './types';
4
4
  import { SegmentsData } from '../SSEHandler/types';
5
5
  /**
6
6
  * MySegmentsUpdateWorker class
7
7
  */
8
- export default class MySegmentsUpdateWorker implements IUpdateWorker {
8
+ export declare class MySegmentsUpdateWorker implements IUpdateWorker {
9
9
  private readonly mySegmentsSyncTask;
10
10
  private maxChangeNumber;
11
11
  private handleNewEvent;
@@ -1,12 +1,12 @@
1
1
  import { ISegmentsCacheSync } from '../../../storages/types';
2
- import Backoff from '../../../utils/Backoff';
2
+ import { Backoff } from '../../../utils/Backoff';
3
3
  import { ISegmentsSyncTask } from '../../polling/types';
4
4
  import { ISegmentUpdateData } from '../SSEHandler/types';
5
5
  import { IUpdateWorker } from './types';
6
6
  /**
7
7
  * SegmentUpdateWorker class
8
8
  */
9
- export default class SegmentsUpdateWorker implements IUpdateWorker {
9
+ export declare class SegmentsUpdateWorker implements IUpdateWorker {
10
10
  private readonly segmentsCache;
11
11
  private readonly segmentsSyncTask;
12
12
  private readonly maxChangeNumbers;
@@ -1,13 +1,13 @@
1
1
  import { ISplitsEventEmitter } from '../../../readiness/types';
2
2
  import { ISplitsCacheSync } from '../../../storages/types';
3
- import Backoff from '../../../utils/Backoff';
3
+ import { Backoff } from '../../../utils/Backoff';
4
4
  import { ISegmentsSyncTask, ISplitsSyncTask } from '../../polling/types';
5
5
  import { ISplitKillData, ISplitUpdateData } from '../SSEHandler/types';
6
6
  import { IUpdateWorker } from './types';
7
7
  /**
8
8
  * SplitsUpdateWorker class
9
9
  */
10
- export default class SplitsUpdateWorker implements IUpdateWorker {
10
+ export declare class SplitsUpdateWorker implements IUpdateWorker {
11
11
  private readonly splitsCache;
12
12
  private readonly splitsSyncTask;
13
13
  private readonly splitsEventEmitter;
@@ -1,4 +1,4 @@
1
- import Backoff from '../../../utils/Backoff';
1
+ import { Backoff } from '../../../utils/Backoff';
2
2
  export interface IUpdateWorker {
3
3
  readonly backoff: Backoff;
4
4
  put(...args: any[]): void;
@@ -10,4 +10,4 @@ import { IPlatform } from '../../sdkFactory/types';
10
10
  * - for server-side if key is not provided in settings.
11
11
  * - for client-side, with support for multiple clients, if key is provided in settings
12
12
  */
13
- export default function pushManagerFactory(pollingManager: IPollingManager, storage: IStorageSync, readiness: IReadinessManager, fetchAuth: IFetchAuth, platform: IPlatform, settings: ISettings): IPushManagerCS | undefined;
13
+ export declare function pushManagerFactory(pollingManager: IPollingManager, storage: IStorageSync, readiness: IReadinessManager, fetchAuth: IFetchAuth, platform: IPlatform, settings: ISettings): IPushManagerCS | undefined;
@@ -11,4 +11,4 @@ import { ISyncTask } from './types';
11
11
  * @param taskName Optional task name for logging.
12
12
  * @returns A sync task that wraps the given task.
13
13
  */
14
- export default function syncTaskFactory<Input extends any[], Output = any>(log: ILogger, task: (...args: Input) => Promise<Output>, period: number, taskName?: string): ISyncTask<Input, Output>;
14
+ export declare function syncTaskFactory<Input extends any[], Output = any>(log: ILogger, task: (...args: Input) => Promise<Output>, period: number, taskName?: string): ISyncTask<Input, Output>;
@@ -7,4 +7,4 @@ import { ILogger } from '../logger/types';
7
7
  * @param eventsCache cache to save events
8
8
  * @param integrationsManager optional event handler used for integrations
9
9
  */
10
- export default function eventTrackerFactory(log: ILogger, eventsCache: IEventsCacheBase, integrationsManager?: IEventsHandler): IEventTracker;
10
+ export declare function eventTrackerFactory(log: ILogger, eventsCache: IEventsCacheBase, integrationsManager?: IEventsHandler): IEventTracker;
@@ -1,6 +1,6 @@
1
1
  import { ImpressionDTO } from '../../types';
2
2
  import { IImpressionObserver } from './types';
3
- export default class ImpressionObserver<K extends string | number = string> implements IImpressionObserver {
3
+ export declare class ImpressionObserver<K extends string | number = string> implements IImpressionObserver {
4
4
  private cache;
5
5
  private hasher;
6
6
  constructor(size: number, hasher: (impression: ImpressionDTO) => K);
@@ -1,4 +1,4 @@
1
- import ImpressionObserver from './ImpressionObserver';
1
+ import { ImpressionObserver } from './ImpressionObserver';
2
2
  import { ImpressionDTO } from '../../types';
3
3
  export declare function hashImpression32(impression: ImpressionDTO): number;
4
4
  export declare function impressionObserverCSFactory(): ImpressionObserver<number>;
@@ -1,4 +1,4 @@
1
- import ImpressionObserver from './ImpressionObserver';
1
+ import { ImpressionObserver } from './ImpressionObserver';
2
2
  import { ImpressionDTO } from '../../types';
3
3
  export declare function hashImpression128(impression: ImpressionDTO): string;
4
4
  export declare function impressionObserverSSFactory(): ImpressionObserver<string>;