@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
@@ -1,38 +0,0 @@
1
- import { ISplitsCacheAsync } from './types';
2
- import { ISplit } from '../dtos/types';
3
- /**
4
- * This class provides a skeletal implementation of the ISplitsCacheAsync interface
5
- * to minimize the effort required to implement this interface.
6
- */
7
- export declare abstract class AbstractSplitsCacheAsync implements ISplitsCacheAsync {
8
- abstract addSplit(name: string, split: ISplit): Promise<boolean>;
9
- abstract addSplits(entries: [string, ISplit][]): Promise<boolean[] | void>;
10
- abstract removeSplits(names: string[]): Promise<boolean[] | void>;
11
- abstract getSplit(name: string): Promise<ISplit | null>;
12
- abstract getSplits(names: string[]): Promise<Record<string, ISplit | null>>;
13
- abstract setChangeNumber(changeNumber: number): Promise<boolean | void>;
14
- abstract getChangeNumber(): Promise<number>;
15
- abstract getAll(): Promise<ISplit[]>;
16
- abstract getSplitNames(): Promise<string[]>;
17
- abstract getNamesByFlagSets(flagSets: string[]): Promise<Set<string>[]>;
18
- abstract trafficTypeExists(trafficType: string): Promise<boolean>;
19
- abstract clear(): Promise<boolean | void>;
20
- usesSegments(): Promise<boolean>;
21
- /**
22
- * Check if the splits information is already stored in cache.
23
- * Noop, just keeping the interface. This is used by client-side implementations only.
24
- */
25
- checkCache(): Promise<boolean>;
26
- /**
27
- * Kill `name` split and set `defaultTreatment` and `changeNumber`.
28
- * Used for SPLIT_KILL push notifications.
29
- *
30
- * @param {string} name
31
- * @param {string} defaultTreatment
32
- * @param {number} changeNumber
33
- * @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,
34
- * 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.
35
- * The promise will never be rejected.
36
- */
37
- killLocally(name: string, defaultTreatment: string, changeNumber: number): Promise<boolean>;
38
- }
@@ -1,43 +0,0 @@
1
- import { ISplitsCacheSync } from './types';
2
- import { ISplit } from '../dtos/types';
3
- /**
4
- * This class provides a skeletal implementation of the ISplitsCacheSync interface
5
- * to minimize the effort required to implement this interface.
6
- */
7
- export declare abstract class AbstractSplitsCacheSync implements ISplitsCacheSync {
8
- abstract addSplit(name: string, split: ISplit): boolean;
9
- addSplits(entries: [string, ISplit][]): boolean[];
10
- abstract removeSplit(name: string): boolean;
11
- removeSplits(names: string[]): boolean[];
12
- abstract getSplit(name: string): ISplit | null;
13
- getSplits(names: string[]): Record<string, ISplit | null>;
14
- abstract setChangeNumber(changeNumber: number): boolean | void;
15
- abstract getChangeNumber(): number;
16
- getAll(): ISplit[];
17
- abstract getSplitNames(): string[];
18
- abstract trafficTypeExists(trafficType: string): boolean;
19
- abstract usesSegments(): boolean;
20
- abstract clear(): void;
21
- /**
22
- * Check if the splits information is already stored in cache. This data can be preloaded.
23
- * It is used as condition to emit SDK_SPLITS_CACHE_LOADED, and then SDK_READY_FROM_CACHE.
24
- */
25
- checkCache(): boolean;
26
- /**
27
- * Kill `name` split and set `defaultTreatment` and `changeNumber`.
28
- * Used for SPLIT_KILL push notifications.
29
- *
30
- * @param {string} name
31
- * @param {string} defaultTreatment
32
- * @param {number} changeNumber
33
- * @returns {boolean} `true` if the operation successed updating the split, or `false` if no split is updated,
34
- * 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.
35
- */
36
- killLocally(name: string, defaultTreatment: string, changeNumber: number): boolean;
37
- abstract getNamesByFlagSets(flagSets: string[]): Set<string>[];
38
- }
39
- /**
40
- * Given a parsed split, it returns a boolean flagging if its conditions use segments matchers (rules & whitelists).
41
- * This util is intended to simplify the implementation of `splitsCache::usesSegments` method
42
- */
43
- export declare function usesSegments(split: ISplit): boolean;
@@ -1,22 +0,0 @@
1
- import { ISettings } from '../types';
2
- export declare function validatePrefix(prefix: unknown): string;
3
- export declare class KeyBuilder {
4
- readonly prefix: string;
5
- constructor(prefix?: string);
6
- buildTrafficTypeKey(trafficType: string): string;
7
- buildFlagSetKey(flagSet: string): string;
8
- buildSplitKey(splitName: string): string;
9
- buildSplitsTillKey(): string;
10
- isSplitKey(key: string): boolean;
11
- buildSplitKeyPrefix(): string;
12
- buildSplitsWithSegmentCountKey(): string;
13
- buildSegmentNameKey(segmentName: string): string;
14
- buildSegmentTillKey(segmentName: string): string;
15
- extractKey(builtKey: string): string;
16
- buildHashKey(): string;
17
- }
18
- /**
19
- * Generates a murmur32 hash based on the authorization key, the feature flags filter query, and version of SplitChanges API.
20
- * The hash is in hexadecimal format (8 characters max, 32 bits).
21
- */
22
- export declare function getStorageHash(settings: ISettings): string;
@@ -1,20 +0,0 @@
1
- import { KeyBuilder } from './KeyBuilder';
2
- export interface MySegmentsKeyBuilder {
3
- buildSegmentNameKey(segmentName: string): string;
4
- extractSegmentName(builtSegmentKeyName: string): string | undefined;
5
- buildTillKey(): string;
6
- }
7
- export declare class KeyBuilderCS extends KeyBuilder implements MySegmentsKeyBuilder {
8
- protected readonly regexSplitsCacheKey: RegExp;
9
- protected readonly matchingKey: string;
10
- constructor(prefix: string, matchingKey: string);
11
- /**
12
- * @override
13
- */
14
- buildSegmentNameKey(segmentName: string): string;
15
- extractSegmentName(builtSegmentKeyName: string): string | undefined;
16
- buildLastUpdatedKey(): string;
17
- isSplitsCacheKey(key: string): boolean;
18
- buildTillKey(): string;
19
- }
20
- export declare function myLargeSegmentsKeyBuilder(prefix: string, matchingKey: string): MySegmentsKeyBuilder;
@@ -1,20 +0,0 @@
1
- import { KeyBuilder } from './KeyBuilder';
2
- import { IMetadata } from '../dtos/types';
3
- import { Method } from '../sync/submitters/types';
4
- export declare const METHOD_NAMES: Record<Method, string>;
5
- export declare class KeyBuilderSS extends KeyBuilder {
6
- readonly latencyPrefix: string;
7
- readonly exceptionPrefix: string;
8
- readonly initPrefix: string;
9
- private readonly versionablePrefix;
10
- constructor(prefix: string, metadata: IMetadata);
11
- buildRegisteredSegmentsKey(): string;
12
- buildImpressionsKey(): string;
13
- buildImpressionsCountKey(): string;
14
- buildUniqueKeysKey(): string;
15
- buildEventsKey(): string;
16
- searchPatternForSplitKeys(): string;
17
- buildLatencyKey(method: Method, bucket: number): string;
18
- buildExceptionKey(method: Method): string;
19
- buildInitKey(): string;
20
- }
@@ -1,10 +0,0 @@
1
- import { SplitIO } from '../types';
2
- import { DataLoader } from './types';
3
- /**
4
- * Factory of client-side storage loader
5
- *
6
- * @param preloadedData validated data following the format proposed in https://github.com/godaddy/split-javascript-data-loader
7
- * and extended with a `mySegmentsData` property.
8
- * @returns function to preload the storage
9
- */
10
- export declare function dataLoaderFactory(preloadedData: SplitIO.PreloadedData): DataLoader;
@@ -1,7 +0,0 @@
1
- /**
2
- * Calculates buckets from latency in milliseconds
3
- *
4
- * @param latencyInMs
5
- * @returns a bucket index from 0 to 22 inclusive
6
- */
7
- export declare function findLatencyIndex(latencyInMs: number): number;
@@ -1,15 +0,0 @@
1
- import { ILogger } from '../../logger/types';
2
- import { AbstractMySegmentsCacheSync } from '../AbstractMySegmentsCacheSync';
3
- import type { MySegmentsKeyBuilder } from '../KeyBuilderCS';
4
- export declare class MySegmentsCacheInLocal extends AbstractMySegmentsCacheSync {
5
- private readonly keys;
6
- private readonly log;
7
- constructor(log: ILogger, keys: MySegmentsKeyBuilder);
8
- protected addSegment(name: string): boolean;
9
- protected removeSegment(name: string): boolean;
10
- isInSegment(name: string): boolean;
11
- getRegisteredSegments(): string[];
12
- getKeysCount(): number;
13
- protected setChangeNumber(changeNumber?: number): void;
14
- getChangeNumber(): number;
15
- }
@@ -1,54 +0,0 @@
1
- import { ISplit } from '../../dtos/types';
2
- import { AbstractSplitsCacheSync } from '../AbstractSplitsCacheSync';
3
- import { KeyBuilderCS } from '../KeyBuilderCS';
4
- import { ISettings } from '../../types';
5
- /**
6
- * ISplitsCacheSync implementation that stores split definitions in browser LocalStorage.
7
- */
8
- export declare class SplitsCacheInLocal extends AbstractSplitsCacheSync {
9
- private readonly keys;
10
- private readonly log;
11
- private readonly storageHash;
12
- private readonly flagSetsFilter;
13
- private hasSync?;
14
- private updateNewFilter?;
15
- /**
16
- * @param {KeyBuilderCS} keys
17
- * @param {number | undefined} expirationTimestamp
18
- * @param {ISplitFiltersValidation} splitFiltersValidation
19
- */
20
- constructor(settings: ISettings, keys: KeyBuilderCS, expirationTimestamp?: number);
21
- private _decrementCount;
22
- private _decrementCounts;
23
- private _incrementCounts;
24
- /**
25
- * Removes all splits cache related data from localStorage (splits, counters, changeNumber and lastUpdated).
26
- * We cannot simply call `localStorage.clear()` since that implies removing user items from the storage.
27
- */
28
- clear(): void;
29
- addSplit(name: string, split: ISplit): boolean;
30
- removeSplit(name: string): boolean;
31
- getSplit(name: string): any;
32
- setChangeNumber(changeNumber: number): boolean;
33
- getChangeNumber(): number;
34
- getSplitNames(): string[];
35
- trafficTypeExists(trafficType: string): boolean;
36
- usesSegments(): boolean;
37
- /**
38
- * Check if the splits information is already stored in browser LocalStorage.
39
- * In this function we could add more code to check if the data is valid.
40
- * @override
41
- */
42
- checkCache(): boolean;
43
- /**
44
- * Clean Splits cache if its `lastUpdated` timestamp is older than the given `expirationTimestamp`,
45
- *
46
- * @param {number | undefined} expirationTimestamp if the value is not a number, data will not be cleaned
47
- */
48
- private _checkExpiration;
49
- private _checkFilterQuery;
50
- getNamesByFlagSets(flagSets: string[]): Set<string>[];
51
- private addToFlagSets;
52
- private removeFromFlagSets;
53
- private removeNames;
54
- }
@@ -1,2 +0,0 @@
1
- export declare const LOG_PREFIX = "storage:localstorage: ";
2
- export declare const DEFINED = "1";
@@ -1,8 +0,0 @@
1
- import { IStorageSyncFactory } from '../types';
2
- export interface InLocalStorageOptions {
3
- prefix?: string;
4
- }
5
- /**
6
- * InLocal storage factory for standalone client-side SplitFactory
7
- */
8
- export declare function InLocalStorage(options?: InLocalStorageOptions): IStorageSyncFactory;
@@ -1,44 +0,0 @@
1
- import { SplitIO } from '../../types';
2
- export declare class AttributesCacheInMemory {
3
- private attributesCache;
4
- /**
5
- * Create or update the value for the given attribute
6
- *
7
- * @param {string} attributeName attribute name
8
- * @param {Object} attributeValue attribute value
9
- * @returns {boolean} the attribute was stored
10
- */
11
- setAttribute(attributeName: string, attributeValue: SplitIO.AttributeType): boolean;
12
- /**
13
- * Retrieves the value of a given attribute
14
- *
15
- * @param {string} attributeName attribute name
16
- * @returns {Object?} stored attribute value
17
- */
18
- getAttribute(attributeName: string): SplitIO.AttributeType;
19
- /**
20
- * Create or update all the given attributes
21
- *
22
- * @param {[string, Object]} attributes attributes to create or update
23
- * @returns {boolean} attributes were stored
24
- */
25
- setAttributes(attributes: Record<string, Object>): boolean;
26
- /**
27
- * Retrieve the full attributes map
28
- *
29
- * @returns {Map<string, Object>} stored attributes
30
- */
31
- getAll(): Record<string, SplitIO.AttributeType>;
32
- /**
33
- * Removes a given attribute from the map
34
- *
35
- * @param {string} attributeName attribute to remove
36
- * @returns {boolean} attribute removed
37
- */
38
- removeAttribute(attributeName: string): boolean;
39
- /**
40
- * Clears all attributes stored in the SDK
41
- *
42
- */
43
- clear(): boolean;
44
- }
@@ -1,35 +0,0 @@
1
- import { SplitIO } from '../../types';
2
- import { IEventsCacheSync } from '../types';
3
- export declare class EventsCacheInMemory implements IEventsCacheSync {
4
- private onFullQueue?;
5
- private readonly maxQueue;
6
- private queue;
7
- private queueByteSize;
8
- /**
9
- *
10
- * @param eventsQueueSize number of queued events to call onFullQueueCb.
11
- * Default value is 0, that means no maximum value, in case we want to avoid this being triggered.
12
- */
13
- constructor(eventsQueueSize?: number);
14
- setOnFullQueueCb(cb: () => void): void;
15
- /**
16
- * Add a new event object at the end of the queue.
17
- */
18
- track(data: SplitIO.EventData, size?: number): boolean;
19
- /**
20
- * Clear the data stored on the cache.
21
- */
22
- clear(): void;
23
- /**
24
- * Pop the collected data, used as payload for posting.
25
- */
26
- pop(toMerge?: SplitIO.EventData[]): SplitIO.EventData[];
27
- /**
28
- * Check if the cache is empty.
29
- */
30
- isEmpty(): boolean;
31
- /**
32
- * Check if the cache queue is full and we need to flush it.
33
- */
34
- private _checkForFlush;
35
- }
@@ -1,28 +0,0 @@
1
- import { IImpressionCountsCacheSync } from '../types';
2
- export declare class ImpressionCountsCacheInMemory implements IImpressionCountsCacheSync {
3
- protected cache: Record<string, number>;
4
- private readonly maxStorage;
5
- protected onFullQueue?: () => void;
6
- private cacheSize;
7
- constructor(impressionCountsCacheSize?: number);
8
- /**
9
- * Builds key to be stored in the cache with the featureName and the timeFrame truncated.
10
- */
11
- private _makeKey;
12
- /**
13
- * Increments the quantity of impressions with the passed featureName and timeFrame.
14
- */
15
- track(featureName: string, timeFrame: number, amount: number): void;
16
- /**
17
- * Pop the collected data, used as payload for posting.
18
- */
19
- pop(toMerge?: Record<string, number>): Record<string, number>;
20
- /**
21
- * Clear the data stored on the cache.
22
- */
23
- clear(): void;
24
- /**
25
- * Check if the cache is empty.
26
- */
27
- isEmpty(): boolean;
28
- }
@@ -1,30 +0,0 @@
1
- import { IImpressionsCacheSync } from '../types';
2
- import { ImpressionDTO } from '../../types';
3
- export declare class ImpressionsCacheInMemory implements IImpressionsCacheSync {
4
- private onFullQueue?;
5
- private readonly maxQueue;
6
- private queue;
7
- /**
8
- *
9
- * @param impressionsQueueSize number of queued impressions to call onFullQueueCb.
10
- * Default value is 0, that means no maximum value, in case we want to avoid this being triggered.
11
- */
12
- constructor(impressionsQueueSize?: number);
13
- setOnFullQueueCb(cb: () => void): void;
14
- /**
15
- * Store impressions in sequential order
16
- */
17
- track(data: ImpressionDTO[]): void;
18
- /**
19
- * Clear the data stored on the cache.
20
- */
21
- clear(): void;
22
- /**
23
- * Pop the collected data, used as payload for posting.
24
- */
25
- pop(toMerge?: ImpressionDTO[]): ImpressionDTO[];
26
- /**
27
- * Check if the cache is empty.
28
- */
29
- isEmpty(): boolean;
30
- }
@@ -1,10 +0,0 @@
1
- import { IStorageFactoryParams, IStorageSync } from '../types';
2
- /**
3
- * InMemory storage factory for standalone server-side SplitFactory
4
- *
5
- * @param params parameters required by EventsCacheSync
6
- */
7
- export declare function InMemoryStorageFactory(params: IStorageFactoryParams): IStorageSync;
8
- export declare namespace InMemoryStorageFactory {
9
- var type: import("../types").StorageType;
10
- }
@@ -1,10 +0,0 @@
1
- import { IStorageSync, IStorageFactoryParams } from '../types';
2
- /**
3
- * InMemory storage factory for standalone client-side SplitFactory
4
- *
5
- * @param params parameters required by EventsCacheSync
6
- */
7
- export declare function InMemoryStorageCSFactory(params: IStorageFactoryParams): IStorageSync;
8
- export declare namespace InMemoryStorageCSFactory {
9
- var type: import("../types").StorageType;
10
- }
@@ -1,16 +0,0 @@
1
- import { AbstractMySegmentsCacheSync } from '../AbstractMySegmentsCacheSync';
2
- /**
3
- * Default MySegmentsCacheInMemory implementation that stores MySegments in memory.
4
- * Supported by all JS runtimes.
5
- */
6
- export declare class MySegmentsCacheInMemory extends AbstractMySegmentsCacheSync {
7
- private segmentCache;
8
- private cn?;
9
- protected addSegment(name: string): boolean;
10
- protected removeSegment(name: string): boolean;
11
- isInSegment(name: string): boolean;
12
- protected setChangeNumber(changeNumber?: number): void;
13
- getChangeNumber(): number;
14
- getRegisteredSegments(): string[];
15
- getKeysCount(): number;
16
- }
@@ -1,17 +0,0 @@
1
- import { ISegmentsCacheSync } from '../types';
2
- /**
3
- * Default ISplitsCacheSync implementation for server-side that stores segments definitions in memory.
4
- */
5
- export declare class SegmentsCacheInMemory implements ISegmentsCacheSync {
6
- private segmentCache;
7
- private segmentChangeNumber;
8
- update(name: string, addedKeys: string[], removedKeys: string[], changeNumber: number): boolean;
9
- isInSegment(name: string, key: string): boolean;
10
- clear(): void;
11
- private _registerSegment;
12
- registerSegments(names: string[]): boolean;
13
- getRegisteredSegments(): string[];
14
- getKeysCount(): number;
15
- getChangeNumber(name: string): number;
16
- resetSegments(): boolean;
17
- }
@@ -1,27 +0,0 @@
1
- import { ISplit, ISplitFiltersValidation } from '../../dtos/types';
2
- import { AbstractSplitsCacheSync } from '../AbstractSplitsCacheSync';
3
- /**
4
- * Default ISplitsCacheSync implementation that stores split definitions in memory.
5
- */
6
- export declare class SplitsCacheInMemory extends AbstractSplitsCacheSync {
7
- private flagSetsFilter;
8
- private splitsCache;
9
- private ttCache;
10
- private changeNumber;
11
- private segmentsCount;
12
- private flagSetsCache;
13
- constructor(splitFiltersValidation?: ISplitFiltersValidation);
14
- clear(): void;
15
- addSplit(name: string, split: ISplit): boolean;
16
- removeSplit(name: string): boolean;
17
- getSplit(name: string): ISplit | null;
18
- setChangeNumber(changeNumber: number): boolean;
19
- getChangeNumber(): number;
20
- getSplitNames(): string[];
21
- trafficTypeExists(trafficType: string): boolean;
22
- usesSegments(): boolean;
23
- getNamesByFlagSets(flagSets: string[]): Set<string>[];
24
- private addToFlagSets;
25
- private removeFromFlagSets;
26
- private removeNames;
27
- }
@@ -1,71 +0,0 @@
1
- import { ImpressionDataType, EventDataType, StreamingEvent, Method, OperationType, TelemetryUsageStatsPayload, UpdatesFromSSEEnum, UpdatesFromSSE } from '../../sync/submitters/types';
2
- import { ISegmentsCacheSync, ISplitsCacheSync, IStorageFactoryParams, ITelemetryCacheSync } from '../types';
3
- export declare const MAX_LATENCY_BUCKET_COUNT = 23;
4
- export declare function newBuckets(): number[];
5
- /**
6
- * Record telemetry if mode is not localhost.
7
- * All factory instances track telemetry on server-side, and 0.1% on client-side.
8
- */
9
- export declare function shouldRecordTelemetry({ settings }: IStorageFactoryParams): boolean;
10
- export declare class TelemetryCacheInMemory implements ITelemetryCacheSync {
11
- private splits?;
12
- private segments?;
13
- private largeSegments?;
14
- constructor(splits?: ISplitsCacheSync | undefined, segments?: ISegmentsCacheSync | undefined, largeSegments?: ISegmentsCacheSync | undefined);
15
- private e;
16
- isEmpty(): boolean;
17
- clear(): void;
18
- pop(): TelemetryUsageStatsPayload;
19
- /** Config stats */
20
- private timeUntilReady?;
21
- getTimeUntilReady(): number | undefined;
22
- recordTimeUntilReady(ms: number): void;
23
- private timeUntilReadyFromCache?;
24
- getTimeUntilReadyFromCache(): number | undefined;
25
- recordTimeUntilReadyFromCache(ms: number): void;
26
- private notReadyUsage;
27
- getNonReadyUsage(): number;
28
- recordNonReadyUsage(): void;
29
- /** Usage stats */
30
- private impressionStats;
31
- getImpressionStats(type: ImpressionDataType): number;
32
- recordImpressionStats(type: ImpressionDataType, count: number): void;
33
- private eventStats;
34
- getEventStats(type: EventDataType): number;
35
- recordEventStats(type: EventDataType, count: number): void;
36
- private lastSync;
37
- getLastSynchronization(): Partial<Record<OperationType, number | undefined>>;
38
- recordSuccessfulSync(resource: OperationType, timeMs: number): void;
39
- private httpErrors;
40
- popHttpErrors(): Partial<Record<OperationType, {
41
- [statusCode: string]: number;
42
- }>>;
43
- recordHttpError(resource: OperationType, status: number): void;
44
- private httpLatencies;
45
- popHttpLatencies(): Partial<Record<OperationType, number[]>>;
46
- recordHttpLatency(resource: OperationType, latencyMs: number): void;
47
- private authRejections;
48
- popAuthRejections(): number;
49
- recordAuthRejections(): void;
50
- private tokenRefreshes;
51
- popTokenRefreshes(): number;
52
- recordTokenRefreshes(): void;
53
- private streamingEvents;
54
- popStreamingEvents(): StreamingEvent[];
55
- recordStreamingEvents(streamingEvent: StreamingEvent): void;
56
- private tags;
57
- popTags(): string[];
58
- addTag(tag: string): void;
59
- private sessionLength?;
60
- getSessionLength(): number | undefined;
61
- recordSessionLength(ms: number): void;
62
- private exceptions;
63
- popExceptions(): Partial<Record<Method, number>>;
64
- recordException(method: Method): void;
65
- private latencies;
66
- popLatencies(): Partial<Record<Method, number[]>>;
67
- recordLatency(method: Method, latencyMs: number): void;
68
- private updatesFromSSE;
69
- popUpdatesFromSSE(): UpdatesFromSSE;
70
- recordUpdatesFromSSE(type: UpdatesFromSSEEnum): void;
71
- }
@@ -1,34 +0,0 @@
1
- import { IUniqueKeysCacheBase } from '../types';
2
- import { UniqueKeysPayloadSs } from '../../sync/submitters/types';
3
- /**
4
- * Converts `uniqueKeys` data from cache into request payload for SS.
5
- */
6
- export declare function fromUniqueKeysCollector(uniqueKeys: {
7
- [featureName: string]: Set<string>;
8
- }): UniqueKeysPayloadSs;
9
- export declare class UniqueKeysCacheInMemory implements IUniqueKeysCacheBase {
10
- protected onFullQueue?: () => void;
11
- private readonly maxStorage;
12
- private uniqueTrackerSize;
13
- protected uniqueKeysTracker: {
14
- [featureName: string]: Set<string>;
15
- };
16
- constructor(uniqueKeysQueueSize?: number);
17
- setOnFullQueueCb(cb: () => void): void;
18
- /**
19
- * Store unique keys per feature.
20
- */
21
- track(userKey: string, featureName: string): void;
22
- /**
23
- * Clear the data stored on the cache.
24
- */
25
- clear(): void;
26
- /**
27
- * Pop the collected data, used as payload for posting.
28
- */
29
- pop(): UniqueKeysPayloadSs;
30
- /**
31
- * Check if the cache is empty.
32
- */
33
- isEmpty(): boolean;
34
- }
@@ -1,35 +0,0 @@
1
- import { IUniqueKeysCacheBase } from '../types';
2
- import { UniqueKeysPayloadCs } from '../../sync/submitters/types';
3
- export declare class UniqueKeysCacheInMemoryCS implements IUniqueKeysCacheBase {
4
- private onFullQueue?;
5
- private readonly maxStorage;
6
- private uniqueTrackerSize;
7
- private uniqueKeysTracker;
8
- /**
9
- *
10
- * @param impressionsQueueSize number of queued impressions to call onFullQueueCb.
11
- * Default value is 0, that means no maximum value, in case we want to avoid this being triggered.
12
- */
13
- constructor(uniqueKeysQueueSize?: number);
14
- setOnFullQueueCb(cb: () => void): void;
15
- /**
16
- * Store unique keys per feature.
17
- */
18
- track(userKey: string, featureName: string): void;
19
- /**
20
- * Clear the data stored on the cache.
21
- */
22
- clear(): void;
23
- /**
24
- * Pop the collected data, used as payload for posting.
25
- */
26
- pop(): UniqueKeysPayloadCs;
27
- /**
28
- * Check if the cache is empty.
29
- */
30
- isEmpty(): boolean;
31
- /**
32
- * Converts `uniqueKeys` data from cache into request payload.
33
- */
34
- private fromUniqueKeysCollector;
35
- }
@@ -1,32 +0,0 @@
1
- import { IEventsCacheAsync } from '../types';
2
- import { IMetadata } from '../../dtos/types';
3
- import { SplitIO } from '../../types';
4
- import { ILogger } from '../../logger/types';
5
- import { StoredEventWithMetadata } from '../../sync/submitters/types';
6
- import type { RedisAdapter } from './RedisAdapter';
7
- export declare class EventsCacheInRedis implements IEventsCacheAsync {
8
- private readonly log;
9
- private readonly key;
10
- private readonly redis;
11
- private readonly metadata;
12
- constructor(log: ILogger, key: string, redis: RedisAdapter, metadata: IMetadata);
13
- /**
14
- * Add a new event object into the queue.
15
- * Unlike `impressions::track`, result promise is never rejected.
16
- */
17
- track(eventData: SplitIO.EventData): Promise<boolean>;
18
- /**
19
- * Generates the JSON as we'll store it on Redis.
20
- */
21
- private _toJSON;
22
- count(): Promise<number>;
23
- drop(count?: number): Promise<any>;
24
- /**
25
- * Pop the given number of events from the storage.
26
- * The returned promise rejects if the redis operation fails.
27
- *
28
- * NOTE: this method doesn't take into account MAX_EVENT_SIZE or MAX_QUEUE_BYTE_SIZE limits.
29
- * It is the submitter responsability to handle that.
30
- */
31
- popNWithMetadata(count: number): Promise<StoredEventWithMetadata[]>;
32
- }