@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.
- package/CHANGES.txt +1 -0
- package/cjs/integrations/pluggable.js +2 -2
- package/cjs/logger/sdkLogger.js +2 -2
- package/cjs/readiness/sdkReadinessManager.js +2 -21
- package/cjs/sdkClient/client.js +0 -1
- package/cjs/sdkClient/clientAttributesDecoration.js +9 -9
- package/cjs/sdkClient/clientCS.js +2 -2
- package/cjs/services/splitApi.js +13 -13
- package/cjs/services/splitHttpClient.js +2 -2
- package/cjs/storages/AbstractSplitsCacheAsync.js +1 -4
- package/cjs/storages/AbstractSplitsCacheSync.js +1 -4
- package/cjs/storages/dataLoader.js +5 -6
- package/cjs/storages/findLatencyIndex.js +1 -1
- package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
- package/cjs/storages/inMemory/AttributesCacheInMemory.js +10 -10
- package/cjs/storages/inMemory/EventsCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/InMemoryStorage.js +1 -1
- package/cjs/storages/inMemory/InMemoryStorageCS.js +1 -1
- package/cjs/storages/inMemory/UniqueKeysCacheInMemoryCS.js +1 -1
- package/cjs/storages/inRedis/SplitsCacheInRedis.js +1 -3
- package/cjs/storages/inRedis/TelemetryCacheInRedis.js +3 -3
- package/cjs/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
- package/cjs/storages/pluggable/EventsCachePluggable.js +1 -1
- package/cjs/storages/pluggable/ImpressionsCachePluggable.js +1 -1
- package/cjs/storages/pluggable/SegmentsCachePluggable.js +1 -1
- package/cjs/storages/pluggable/SplitsCachePluggable.js +3 -3
- package/cjs/storages/pluggable/TelemetryCachePluggable.js +3 -3
- package/cjs/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
- package/cjs/storages/pluggable/inMemoryWrapper.js +1 -1
- package/cjs/storages/pluggable/index.js +1 -1
- package/cjs/storages/pluggable/wrapperAdapter.js +2 -2
- package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
- package/cjs/sync/offline/syncManagerOffline.js +1 -1
- package/cjs/sync/polling/updaters/mySegmentsUpdater.js +3 -3
- package/cjs/sync/polling/updaters/segmentChangesUpdater.js +8 -8
- package/cjs/sync/polling/updaters/splitChangesUpdater.js +13 -13
- package/cjs/sync/streaming/AuthClient/index.js +2 -2
- package/cjs/sync/streaming/SSEClient/index.js +4 -7
- package/cjs/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
- package/cjs/sync/streaming/SSEHandler/NotificationParser.js +5 -4
- package/cjs/sync/streaming/SSEHandler/index.js +2 -2
- package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
- package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
- package/cjs/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
- package/cjs/sync/streaming/parseUtils.js +13 -13
- package/cjs/sync/syncManagerOnline.js +2 -2
- package/cjs/sync/syncTask.js +4 -4
- package/cjs/trackers/eventTracker.js +2 -2
- package/cjs/trackers/impressionsTracker.js +5 -5
- package/cjs/trackers/strategy/strategyDebug.js +1 -1
- package/cjs/trackers/strategy/strategyNone.js +2 -2
- package/cjs/trackers/strategy/strategyOptimized.js +2 -2
- package/cjs/trackers/uniqueKeysTracker.js +3 -3
- package/cjs/utils/Backoff.js +0 -4
- package/cjs/utils/Semver.js +1 -1
- package/cjs/utils/base64/index.js +2 -2
- package/cjs/utils/decompress/index.js +4 -4
- package/cjs/utils/lang/binarySearch.js +2 -2
- package/cjs/utils/murmur3/murmur3_128.js +1 -1
- package/cjs/utils/murmur3/murmur3_128_x86.js +1 -1
- package/cjs/utils/murmur3/murmur3_64.js +1 -1
- package/cjs/utils/murmur3/utfx.js +10 -17
- package/cjs/utils/promise/wrapper.js +2 -2
- package/cjs/utils/settingsValidation/index.js +2 -2
- package/cjs/utils/settingsValidation/integrations/common.js +4 -4
- package/cjs/utils/settingsValidation/integrations/configurable.js +3 -3
- package/cjs/utils/settingsValidation/integrations/pluggable.js +2 -2
- package/cjs/utils/settingsValidation/logger/builtinLogger.js +1 -1
- package/cjs/utils/settingsValidation/logger/commons.js +1 -1
- package/cjs/utils/settingsValidation/logger/pluggableLogger.js +1 -1
- package/cjs/utils/settingsValidation/splitFilters.js +8 -11
- package/cjs/utils/settingsValidation/storage/storageCS.js +2 -2
- package/cjs/utils/settingsValidation/url.js +3 -3
- package/esm/integrations/pluggable.js +2 -2
- package/esm/logger/sdkLogger.js +2 -2
- package/esm/readiness/sdkReadinessManager.js +2 -21
- package/esm/sdkClient/client.js +0 -1
- package/esm/sdkClient/clientAttributesDecoration.js +9 -9
- package/esm/sdkClient/clientCS.js +2 -2
- package/esm/services/splitApi.js +13 -13
- package/esm/services/splitHttpClient.js +2 -2
- package/esm/storages/AbstractSplitsCacheAsync.js +1 -4
- package/esm/storages/AbstractSplitsCacheSync.js +1 -4
- package/esm/storages/dataLoader.js +5 -6
- package/esm/storages/findLatencyIndex.js +1 -1
- package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
- package/esm/storages/inMemory/AttributesCacheInMemory.js +10 -10
- package/esm/storages/inMemory/EventsCacheInMemory.js +1 -1
- package/esm/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
- package/esm/storages/inMemory/InMemoryStorage.js +1 -1
- package/esm/storages/inMemory/InMemoryStorageCS.js +1 -1
- package/esm/storages/inMemory/UniqueKeysCacheInMemoryCS.js +1 -1
- package/esm/storages/inRedis/SplitsCacheInRedis.js +1 -3
- package/esm/storages/inRedis/TelemetryCacheInRedis.js +3 -3
- package/esm/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
- package/esm/storages/pluggable/EventsCachePluggable.js +1 -1
- package/esm/storages/pluggable/ImpressionsCachePluggable.js +1 -1
- package/esm/storages/pluggable/SegmentsCachePluggable.js +1 -1
- package/esm/storages/pluggable/SplitsCachePluggable.js +3 -3
- package/esm/storages/pluggable/TelemetryCachePluggable.js +3 -3
- package/esm/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
- package/esm/storages/pluggable/inMemoryWrapper.js +1 -1
- package/esm/storages/pluggable/index.js +1 -1
- package/esm/storages/pluggable/wrapperAdapter.js +2 -2
- package/esm/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
- package/esm/sync/offline/syncManagerOffline.js +1 -1
- package/esm/sync/polling/updaters/mySegmentsUpdater.js +3 -3
- package/esm/sync/polling/updaters/segmentChangesUpdater.js +8 -8
- package/esm/sync/polling/updaters/splitChangesUpdater.js +13 -13
- package/esm/sync/streaming/AuthClient/index.js +2 -2
- package/esm/sync/streaming/SSEClient/index.js +4 -7
- package/esm/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
- package/esm/sync/streaming/SSEHandler/NotificationParser.js +5 -4
- package/esm/sync/streaming/SSEHandler/index.js +2 -2
- package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
- package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
- package/esm/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
- package/esm/sync/streaming/parseUtils.js +13 -13
- package/esm/sync/syncManagerOnline.js +2 -2
- package/esm/sync/syncTask.js +4 -4
- package/esm/trackers/eventTracker.js +2 -2
- package/esm/trackers/impressionsTracker.js +5 -5
- package/esm/trackers/strategy/strategyDebug.js +1 -1
- package/esm/trackers/strategy/strategyNone.js +2 -2
- package/esm/trackers/strategy/strategyOptimized.js +2 -2
- package/esm/trackers/uniqueKeysTracker.js +3 -3
- package/esm/utils/Backoff.js +0 -4
- package/esm/utils/Semver.js +1 -1
- package/esm/utils/base64/index.js +2 -2
- package/esm/utils/decompress/index.js +4 -4
- package/esm/utils/lang/binarySearch.js +2 -2
- package/esm/utils/murmur3/murmur3_128.js +1 -1
- package/esm/utils/murmur3/murmur3_128_x86.js +1 -1
- package/esm/utils/murmur3/murmur3_64.js +1 -1
- package/esm/utils/murmur3/utfx.js +10 -17
- package/esm/utils/promise/wrapper.js +2 -2
- package/esm/utils/settingsValidation/index.js +2 -2
- package/esm/utils/settingsValidation/integrations/common.js +4 -4
- package/esm/utils/settingsValidation/integrations/configurable.js +3 -3
- package/esm/utils/settingsValidation/integrations/pluggable.js +2 -2
- package/esm/utils/settingsValidation/logger/builtinLogger.js +1 -1
- package/esm/utils/settingsValidation/logger/commons.js +1 -1
- package/esm/utils/settingsValidation/logger/pluggableLogger.js +1 -1
- package/esm/utils/settingsValidation/splitFilters.js +8 -11
- package/esm/utils/settingsValidation/storage/storageCS.js +2 -2
- package/esm/utils/settingsValidation/url.js +3 -3
- package/package.json +5 -3
- package/src/dtos/types.ts +1 -1
- package/src/evaluator/Engine.ts +1 -1
- package/src/evaluator/combiners/ifelseif.ts +1 -1
- package/src/evaluator/condition/index.ts +1 -1
- package/src/evaluator/index.ts +1 -1
- package/src/evaluator/parser/index.ts +1 -1
- package/src/evaluator/types.ts +1 -1
- package/src/evaluator/value/index.ts +1 -1
- package/src/evaluator/value/sanitize.ts +1 -1
- package/src/integrations/pluggable.ts +3 -3
- package/src/integrations/types.ts +3 -2
- package/src/listeners/browser.ts +3 -2
- package/src/logger/index.ts +6 -6
- package/src/logger/sdkLogger.ts +4 -4
- package/src/logger/types.ts +11 -13
- package/src/readiness/readinessManager.ts +5 -4
- package/src/readiness/sdkReadinessManager.ts +6 -23
- package/src/readiness/types.ts +5 -4
- package/src/sdkClient/client.ts +7 -8
- package/src/sdkClient/clientAttributesDecoration.ts +11 -11
- package/src/sdkClient/clientCS.ts +5 -5
- package/src/sdkClient/clientInputValidation.ts +3 -2
- package/src/sdkClient/identity.ts +1 -1
- package/src/sdkClient/sdkClient.ts +3 -3
- package/src/sdkClient/sdkClientMethod.ts +2 -2
- package/src/sdkClient/sdkClientMethodCS.ts +5 -5
- package/src/sdkFactory/index.ts +3 -3
- package/src/sdkFactory/types.ts +7 -6
- package/src/sdkManager/index.ts +2 -1
- package/src/services/splitApi.ts +13 -13
- package/src/services/splitHttpClient.ts +2 -2
- package/src/storages/AbstractMySegmentsCacheSync.ts +1 -1
- package/src/storages/AbstractSplitsCacheAsync.ts +1 -4
- package/src/storages/AbstractSplitsCacheSync.ts +1 -4
- package/src/storages/dataLoader.ts +7 -8
- package/src/storages/findLatencyIndex.ts +1 -1
- package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +1 -6
- package/src/storages/inMemory/AttributesCacheInMemory.ts +11 -11
- package/src/storages/inMemory/EventsCacheInMemory.ts +2 -2
- package/src/storages/inMemory/ImpressionsCacheInMemory.ts +5 -5
- package/src/storages/inMemory/InMemoryStorage.ts +1 -1
- package/src/storages/inMemory/InMemoryStorageCS.ts +1 -1
- package/src/storages/inMemory/UniqueKeysCacheInMemoryCS.ts +1 -1
- package/src/storages/inRedis/EventsCacheInRedis.ts +1 -1
- package/src/storages/inRedis/ImpressionsCacheInRedis.ts +2 -2
- package/src/storages/inRedis/SplitsCacheInRedis.ts +1 -3
- package/src/storages/inRedis/TelemetryCacheInRedis.ts +3 -3
- package/src/storages/inRedis/UniqueKeysCacheInRedis.ts +1 -1
- package/src/storages/pluggable/EventsCachePluggable.ts +2 -2
- package/src/storages/pluggable/ImpressionsCachePluggable.ts +3 -3
- package/src/storages/pluggable/SegmentsCachePluggable.ts +1 -1
- package/src/storages/pluggable/SplitsCachePluggable.ts +3 -3
- package/src/storages/pluggable/TelemetryCachePluggable.ts +3 -3
- package/src/storages/pluggable/UniqueKeysCachePluggable.ts +1 -1
- package/src/storages/pluggable/inMemoryWrapper.ts +1 -1
- package/src/storages/pluggable/index.ts +1 -1
- package/src/storages/pluggable/wrapperAdapter.ts +2 -2
- package/src/storages/types.ts +51 -68
- package/src/storages/utils.ts +3 -2
- package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +3 -3
- package/src/sync/offline/syncManagerOffline.ts +1 -1
- package/src/sync/polling/updaters/mySegmentsUpdater.ts +3 -3
- package/src/sync/polling/updaters/segmentChangesUpdater.ts +8 -8
- package/src/sync/polling/updaters/splitChangesUpdater.ts +13 -13
- package/src/sync/streaming/AuthClient/index.ts +2 -2
- package/src/sync/streaming/SSEClient/index.ts +4 -7
- package/src/sync/streaming/SSEHandler/NotificationKeeper.ts +1 -1
- package/src/sync/streaming/SSEHandler/NotificationParser.ts +5 -4
- package/src/sync/streaming/SSEHandler/index.ts +2 -2
- package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +3 -3
- package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +2 -2
- package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +4 -4
- package/src/sync/streaming/parseUtils.ts +13 -13
- package/src/sync/streaming/types.ts +2 -2
- package/src/sync/submitters/impressionsSubmitter.ts +2 -2
- package/src/sync/submitters/telemetrySubmitter.ts +4 -3
- package/src/sync/submitters/types.ts +1 -1
- package/src/sync/syncManagerOnline.ts +2 -2
- package/src/sync/syncTask.ts +4 -4
- package/src/trackers/eventTracker.ts +4 -3
- package/src/trackers/impressionObserver/ImpressionObserver.ts +4 -4
- package/src/trackers/impressionObserver/buildKey.ts +2 -2
- package/src/trackers/impressionObserver/impressionObserverCS.ts +2 -2
- package/src/trackers/impressionObserver/impressionObserverSS.ts +2 -2
- package/src/trackers/impressionObserver/types.ts +2 -2
- package/src/trackers/impressionsTracker.ts +8 -7
- package/src/trackers/strategy/strategyDebug.ts +3 -3
- package/src/trackers/strategy/strategyNone.ts +4 -4
- package/src/trackers/strategy/strategyOptimized.ts +5 -5
- package/src/trackers/types.ts +5 -5
- package/src/trackers/uniqueKeysTracker.ts +3 -3
- package/src/types.ts +37 -1355
- package/src/utils/Backoff.ts +0 -4
- package/src/utils/MinEventEmitter.ts +2 -3
- package/src/utils/MinEvents.ts +2 -2
- package/src/utils/Semver.ts +1 -1
- package/src/utils/base64/index.ts +2 -2
- package/src/utils/constants/index.ts +9 -10
- package/src/utils/decompress/index.ts +4 -4
- package/src/utils/inputValidation/attributes.ts +1 -1
- package/src/utils/inputValidation/eventProperties.ts +1 -1
- package/src/utils/inputValidation/key.ts +1 -1
- package/src/utils/inputValidation/preloadedData.ts +1 -2
- package/src/utils/inputValidation/trafficTypeExistence.ts +2 -2
- package/src/utils/key/index.ts +1 -1
- package/src/utils/lang/binarySearch.ts +2 -2
- package/src/utils/murmur3/murmur3_128.ts +1 -1
- package/src/utils/murmur3/murmur3_128_x86.ts +1 -1
- package/src/utils/murmur3/murmur3_64.ts +1 -1
- package/src/utils/murmur3/utfx.ts +10 -17
- package/src/utils/promise/wrapper.ts +2 -2
- package/src/utils/settingsValidation/consent.ts +2 -2
- package/src/utils/settingsValidation/impressionsMode.ts +1 -1
- package/src/utils/settingsValidation/index.ts +2 -2
- package/src/utils/settingsValidation/integrations/common.ts +4 -4
- package/src/utils/settingsValidation/integrations/configurable.ts +3 -3
- package/src/utils/settingsValidation/integrations/pluggable.ts +2 -2
- package/src/utils/settingsValidation/logger/builtinLogger.ts +3 -3
- package/src/utils/settingsValidation/logger/commons.ts +3 -3
- package/src/utils/settingsValidation/logger/pluggableLogger.ts +3 -3
- package/src/utils/settingsValidation/splitFilters.ts +9 -12
- package/src/utils/settingsValidation/storage/storageCS.ts +5 -4
- package/src/utils/settingsValidation/url.ts +3 -3
- package/types/index.d.ts +5 -5
- package/types/splitio.d.ts +1941 -0
- package/types/consent/index.d.ts +0 -2
- package/types/consent/sdkUserConsent.d.ts +0 -13
- package/types/dtos/types.d.ts +0 -209
- package/types/evaluator/Engine.d.ts +0 -15
- package/types/evaluator/combiners/and.d.ts +0 -4
- package/types/evaluator/combiners/ifelseif.d.ts +0 -3
- package/types/evaluator/condition/engineUtils.d.ts +0 -11
- package/types/evaluator/condition/index.d.ts +0 -6
- package/types/evaluator/convertions/index.d.ts +0 -2
- package/types/evaluator/index.d.ts +0 -8
- package/types/evaluator/matchers/all.d.ts +0 -1
- package/types/evaluator/matchers/between.d.ts +0 -2
- package/types/evaluator/matchers/boolean.d.ts +0 -1
- package/types/evaluator/matchers/cont_all.d.ts +0 -1
- package/types/evaluator/matchers/cont_any.d.ts +0 -1
- package/types/evaluator/matchers/cont_str.d.ts +0 -1
- package/types/evaluator/matchers/dependency.d.ts +0 -5
- package/types/evaluator/matchers/eq.d.ts +0 -1
- package/types/evaluator/matchers/eq_set.d.ts +0 -1
- package/types/evaluator/matchers/ew.d.ts +0 -1
- package/types/evaluator/matchers/gte.d.ts +0 -1
- package/types/evaluator/matchers/index.d.ts +0 -7
- package/types/evaluator/matchers/large_segment.d.ts +0 -5
- package/types/evaluator/matchers/lte.d.ts +0 -1
- package/types/evaluator/matchers/matcherTypes.d.ts +0 -10
- package/types/evaluator/matchers/part_of.d.ts +0 -1
- package/types/evaluator/matchers/segment.d.ts +0 -5
- package/types/evaluator/matchers/semver_between.d.ts +0 -2
- package/types/evaluator/matchers/semver_eq.d.ts +0 -1
- package/types/evaluator/matchers/semver_gte.d.ts +0 -1
- package/types/evaluator/matchers/semver_inlist.d.ts +0 -1
- package/types/evaluator/matchers/semver_lte.d.ts +0 -1
- package/types/evaluator/matchers/string.d.ts +0 -1
- package/types/evaluator/matchers/sw.d.ts +0 -1
- package/types/evaluator/matchers/whitelist.d.ts +0 -1
- package/types/evaluator/matchersTransform/index.d.ts +0 -6
- package/types/evaluator/matchersTransform/segment.d.ts +0 -5
- package/types/evaluator/matchersTransform/unaryNumeric.d.ts +0 -5
- package/types/evaluator/matchersTransform/whitelist.d.ts +0 -5
- package/types/evaluator/parser/index.d.ts +0 -5
- package/types/evaluator/treatments/index.d.ts +0 -8
- package/types/evaluator/types.d.ts +0 -28
- package/types/evaluator/value/index.d.ts +0 -7
- package/types/evaluator/value/sanitize.d.ts +0 -7
- package/types/integrations/pluggable.d.ts +0 -11
- package/types/integrations/types.d.ts +0 -18
- package/types/listeners/browser.d.ts +0 -40
- package/types/listeners/node.d.ts +0 -22
- package/types/listeners/types.d.ts +0 -4
- package/types/logger/browser/DebugLogger.d.ts +0 -2
- package/types/logger/browser/ErrorLogger.d.ts +0 -2
- package/types/logger/browser/InfoLogger.d.ts +0 -2
- package/types/logger/browser/WarnLogger.d.ts +0 -2
- package/types/logger/constants.d.ts +0 -134
- package/types/logger/index.d.ts +0 -21
- package/types/logger/messages/debug.d.ts +0 -1
- package/types/logger/messages/error.d.ts +0 -1
- package/types/logger/messages/info.d.ts +0 -1
- package/types/logger/messages/warn.d.ts +0 -1
- package/types/logger/sdkLogger.d.ts +0 -8
- package/types/logger/types.d.ts +0 -17
- package/types/readiness/constants.d.ts +0 -7
- package/types/readiness/readinessManager.d.ts +0 -6
- package/types/readiness/sdkReadinessManager.d.ts +0 -10
- package/types/readiness/types.d.ts +0 -67
- package/types/sdkClient/client.d.ts +0 -6
- package/types/sdkClient/clientAttributesDecoration.d.ts +0 -55
- package/types/sdkClient/clientCS.d.ts +0 -9
- package/types/sdkClient/clientInputValidation.d.ts +0 -7
- package/types/sdkClient/identity.d.ts +0 -2
- package/types/sdkClient/sdkClient.d.ts +0 -6
- package/types/sdkClient/sdkClientMethod.d.ts +0 -6
- package/types/sdkClient/sdkClientMethodCS.d.ts +0 -7
- package/types/sdkFactory/index.d.ts +0 -6
- package/types/sdkFactory/types.d.ts +0 -85
- package/types/sdkManager/index.d.ts +0 -4
- package/types/services/decorateHeaders.d.ts +0 -2
- package/types/services/splitApi.d.ts +0 -12
- package/types/services/splitHttpClient.d.ts +0 -10
- package/types/services/types.d.ts +0 -54
- package/types/storages/AbstractMySegmentsCacheSync.d.ts +0 -39
- package/types/storages/AbstractSplitsCacheAsync.d.ts +0 -38
- package/types/storages/AbstractSplitsCacheSync.d.ts +0 -43
- package/types/storages/KeyBuilder.d.ts +0 -22
- package/types/storages/KeyBuilderCS.d.ts +0 -20
- package/types/storages/KeyBuilderSS.d.ts +0 -20
- package/types/storages/dataLoader.d.ts +0 -10
- package/types/storages/findLatencyIndex.d.ts +0 -7
- package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +0 -15
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +0 -54
- package/types/storages/inLocalStorage/constants.d.ts +0 -2
- package/types/storages/inLocalStorage/index.d.ts +0 -8
- package/types/storages/inMemory/AttributesCacheInMemory.d.ts +0 -44
- package/types/storages/inMemory/EventsCacheInMemory.d.ts +0 -35
- package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +0 -28
- package/types/storages/inMemory/ImpressionsCacheInMemory.d.ts +0 -30
- package/types/storages/inMemory/InMemoryStorage.d.ts +0 -10
- package/types/storages/inMemory/InMemoryStorageCS.d.ts +0 -10
- package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +0 -16
- package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +0 -17
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +0 -27
- package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +0 -71
- package/types/storages/inMemory/UniqueKeysCacheInMemory.d.ts +0 -34
- package/types/storages/inMemory/UniqueKeysCacheInMemoryCS.d.ts +0 -35
- package/types/storages/inRedis/EventsCacheInRedis.d.ts +0 -32
- package/types/storages/inRedis/ImpressionCountsCacheInRedis.d.ts +0 -17
- package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +0 -17
- package/types/storages/inRedis/RedisAdapter.d.ts +0 -24
- package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +0 -21
- package/types/storages/inRedis/SplitsCacheInRedis.d.ts +0 -95
- package/types/storages/inRedis/TelemetryCacheInRedis.d.ts +0 -35
- package/types/storages/inRedis/UniqueKeysCacheInRedis.d.ts +0 -22
- package/types/storages/inRedis/constants.d.ts +0 -4
- package/types/storages/inRedis/index.d.ts +0 -10
- package/types/storages/pluggable/EventsCachePluggable.d.ts +0 -38
- package/types/storages/pluggable/ImpressionCountsCachePluggable.d.ts +0 -16
- package/types/storages/pluggable/ImpressionsCachePluggable.d.ts +0 -34
- package/types/storages/pluggable/SegmentsCachePluggable.d.ts +0 -42
- package/types/storages/pluggable/SplitsCachePluggable.d.ts +0 -98
- package/types/storages/pluggable/TelemetryCachePluggable.d.ts +0 -34
- package/types/storages/pluggable/UniqueKeysCachePluggable.d.ts +0 -20
- package/types/storages/pluggable/constants.d.ts +0 -1
- package/types/storages/pluggable/inMemoryWrapper.d.ts +0 -12
- package/types/storages/pluggable/index.d.ts +0 -9
- package/types/storages/pluggable/wrapperAdapter.d.ts +0 -12
- package/types/storages/types.d.ts +0 -407
- package/types/storages/utils.d.ts +0 -8
- package/types/sync/offline/LocalhostFromObject.d.ts +0 -1
- package/types/sync/offline/splitsParser/parseCondition.d.ts +0 -7
- package/types/sync/offline/splitsParser/splitsParserFromSettings.d.ts +0 -3
- package/types/sync/offline/splitsParser/types.d.ts +0 -3
- package/types/sync/offline/syncManagerOffline.d.ts +0 -10
- package/types/sync/offline/syncTasks/fromObjectSyncTask.d.ts +0 -17
- package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/segmentChangesFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/splitChangesFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/types.d.ts +0 -5
- package/types/sync/polling/pollingManagerCS.d.ts +0 -7
- package/types/sync/polling/pollingManagerSS.d.ts +0 -6
- package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +0 -9
- package/types/sync/polling/syncTasks/segmentsSyncTask.d.ts +0 -9
- package/types/sync/polling/syncTasks/splitsSyncTask.d.ts +0 -9
- package/types/sync/polling/types.d.ts +0 -33
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +0 -14
- package/types/sync/polling/updaters/segmentChangesUpdater.d.ts +0 -18
- package/types/sync/polling/updaters/splitChangesUpdater.d.ts +0 -41
- package/types/sync/streaming/AuthClient/index.d.ts +0 -12
- package/types/sync/streaming/AuthClient/types.d.ts +0 -17
- package/types/sync/streaming/SSEClient/index.d.ts +0 -34
- package/types/sync/streaming/SSEClient/types.d.ts +0 -11
- package/types/sync/streaming/SSEHandler/NotificationKeeper.d.ts +0 -14
- package/types/sync/streaming/SSEHandler/NotificationParser.d.ts +0 -20
- package/types/sync/streaming/SSEHandler/index.d.ts +0 -11
- package/types/sync/streaming/SSEHandler/types.d.ts +0 -72
- package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +0 -9
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +0 -9
- package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +0 -14
- package/types/sync/streaming/UpdateWorkers/constants.d.ts +0 -3
- package/types/sync/streaming/UpdateWorkers/types.d.ts +0 -4
- package/types/sync/streaming/constants.d.ts +0 -34
- package/types/sync/streaming/parseUtils.d.ts +0 -34
- package/types/sync/streaming/pushManager.d.ts +0 -9
- package/types/sync/streaming/types.d.ts +0 -35
- package/types/sync/submitters/eventsSubmitter.d.ts +0 -5
- package/types/sync/submitters/impressionCountsSubmitter.d.ts +0 -10
- package/types/sync/submitters/impressionsSubmitter.d.ts +0 -11
- package/types/sync/submitters/submitter.d.ts +0 -12
- package/types/sync/submitters/submitterManager.d.ts +0 -3
- package/types/sync/submitters/telemetrySubmitter.d.ts +0 -17
- package/types/sync/submitters/types.d.ts +0 -217
- package/types/sync/submitters/uniqueKeysSubmitter.d.ts +0 -5
- package/types/sync/syncManagerOnline.d.ts +0 -13
- package/types/sync/syncTask.d.ts +0 -13
- package/types/sync/types.d.ts +0 -43
- package/types/trackers/eventTracker.d.ts +0 -10
- package/types/trackers/impressionObserver/ImpressionObserver.d.ts +0 -8
- package/types/trackers/impressionObserver/buildKey.d.ts +0 -2
- package/types/trackers/impressionObserver/impressionObserverCS.d.ts +0 -4
- package/types/trackers/impressionObserver/impressionObserverSS.d.ts +0 -4
- package/types/trackers/impressionObserver/types.d.ts +0 -4
- package/types/trackers/impressionsTracker.d.ts +0 -13
- package/types/trackers/strategy/strategyDebug.d.ts +0 -9
- package/types/trackers/strategy/strategyNone.d.ts +0 -10
- package/types/trackers/strategy/strategyOptimized.d.ts +0 -11
- package/types/trackers/telemetryTracker.d.ts +0 -3
- package/types/trackers/types.d.ts +0 -68
- package/types/trackers/uniqueKeysTracker.d.ts +0 -13
- package/types/types.d.ts +0 -1398
- package/types/utils/Backoff.d.ts +0 -25
- package/types/utils/LRUCache/LinkedList.d.ts +0 -34
- package/types/utils/LRUCache/index.d.ts +0 -15
- package/types/utils/MinEventEmitter.d.ts +0 -12
- package/types/utils/MinEvents.d.ts +0 -4
- package/types/utils/Semver.d.ts +0 -15
- package/types/utils/base64/index.d.ts +0 -30
- package/types/utils/constants/browser.d.ts +0 -1
- package/types/utils/constants/index.d.ts +0 -83
- package/types/utils/decompress/index.d.ts +0 -16
- package/types/utils/env/isLocalStorageAvailable.d.ts +0 -1
- package/types/utils/env/isNode.d.ts +0 -5
- package/types/utils/inputValidation/apiKey.d.ts +0 -7
- package/types/utils/inputValidation/attribute.d.ts +0 -2
- package/types/utils/inputValidation/attributes.d.ts +0 -4
- package/types/utils/inputValidation/event.d.ts +0 -2
- package/types/utils/inputValidation/eventProperties.d.ts +0 -6
- package/types/utils/inputValidation/eventValue.d.ts +0 -2
- package/types/utils/inputValidation/index.d.ts +0 -13
- package/types/utils/inputValidation/isOperational.d.ts +0 -4
- package/types/utils/inputValidation/key.d.ts +0 -3
- package/types/utils/inputValidation/preloadedData.d.ts +0 -3
- package/types/utils/inputValidation/split.d.ts +0 -2
- package/types/utils/inputValidation/splitExistence.d.ts +0 -7
- package/types/utils/inputValidation/splits.d.ts +0 -2
- package/types/utils/inputValidation/trafficType.d.ts +0 -2
- package/types/utils/inputValidation/trafficTypeExistence.d.ts +0 -9
- package/types/utils/jwt/index.d.ts +0 -5
- package/types/utils/jwt/types.d.ts +0 -5
- package/types/utils/key/index.d.ts +0 -8
- package/types/utils/labels/index.d.ts +0 -8
- package/types/utils/lang/binarySearch.d.ts +0 -9
- package/types/utils/lang/getFnName.d.ts +0 -4
- package/types/utils/lang/getGlobal.d.ts +0 -4
- package/types/utils/lang/index.d.ts +0 -105
- package/types/utils/lang/objectAssign.d.ts +0 -6
- package/types/utils/lang/sets.d.ts +0 -3
- package/types/utils/murmur3/common.d.ts +0 -12
- package/types/utils/murmur3/legacy.d.ts +0 -2
- package/types/utils/murmur3/murmur3.d.ts +0 -2
- package/types/utils/murmur3/murmur3_128.d.ts +0 -6
- package/types/utils/murmur3/murmur3_128_x86.d.ts +0 -7
- package/types/utils/murmur3/murmur3_64.d.ts +0 -10
- package/types/utils/murmur3/utfx.d.ts +0 -27
- package/types/utils/promise/thenable.d.ts +0 -1
- package/types/utils/promise/timeout.d.ts +0 -1
- package/types/utils/promise/wrapper.d.ts +0 -21
- package/types/utils/settingsValidation/consent.d.ts +0 -6
- package/types/utils/settingsValidation/impressionsMode.d.ts +0 -3
- package/types/utils/settingsValidation/index.d.ts +0 -50
- package/types/utils/settingsValidation/integrations/common.d.ts +0 -14
- package/types/utils/settingsValidation/integrations/configurable.d.ts +0 -13
- package/types/utils/settingsValidation/integrations/pluggable.d.ts +0 -13
- package/types/utils/settingsValidation/logger/builtinLogger.d.ts +0 -10
- package/types/utils/settingsValidation/logger/commons.d.ts +0 -9
- package/types/utils/settingsValidation/logger/pluggableLogger.d.ts +0 -11
- package/types/utils/settingsValidation/mode.d.ts +0 -5
- package/types/utils/settingsValidation/runtime.d.ts +0 -2
- package/types/utils/settingsValidation/splitFilters.d.ts +0 -17
- package/types/utils/settingsValidation/storage/storageCS.d.ts +0 -21
- package/types/utils/settingsValidation/types.d.ts +0 -30
- package/types/utils/settingsValidation/url.d.ts +0 -10
- package/types/utils/time/index.d.ts +0 -4
- package/types/utils/timeTracker/now/browser.d.ts +0 -1
- package/types/utils/timeTracker/now/node.d.ts +0 -1
- package/types/utils/timeTracker/timer.d.ts +0 -1
package/types/utils/Backoff.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare class Backoff {
|
|
2
|
-
static __TEST__BASE_MILLIS?: number;
|
|
3
|
-
static __TEST__MAX_MILLIS?: number;
|
|
4
|
-
static DEFAULT_BASE_MILLIS: number;
|
|
5
|
-
static DEFAULT_MAX_MILLIS: number;
|
|
6
|
-
baseMillis: number;
|
|
7
|
-
maxMillis: number;
|
|
8
|
-
attempts: number;
|
|
9
|
-
cb: (...args: any[]) => any;
|
|
10
|
-
timeoutID: ReturnType<typeof setTimeout> | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Schedule function calls with exponential backoff
|
|
13
|
-
*
|
|
14
|
-
* @param {function} cb
|
|
15
|
-
* @param {number} baseMillis
|
|
16
|
-
* @param {number} maxMillis
|
|
17
|
-
*/
|
|
18
|
-
constructor(cb: (...args: any[]) => any, baseMillis?: number, maxMillis?: number);
|
|
19
|
-
/**
|
|
20
|
-
* Schedule a next call to `cb`
|
|
21
|
-
* @returns scheduled delay in milliseconds
|
|
22
|
-
*/
|
|
23
|
-
scheduleCall(): number;
|
|
24
|
-
reset(): void;
|
|
25
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* yallist implementation based on isaacs/yallist (https://github.com/isaacs/yallist/yallist.js),
|
|
3
|
-
* with the minimal features used by the SDK.
|
|
4
|
-
|
|
5
|
-
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
6
|
-
|
|
7
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
9
|
-
copyright notice and this permission notice appear in all copies.
|
|
10
|
-
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
17
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
-
**/
|
|
19
|
-
export declare class Node<T = any> {
|
|
20
|
-
value: T;
|
|
21
|
-
list: LinkedList<T> | null;
|
|
22
|
-
next: Node<T> | null;
|
|
23
|
-
prev: Node<T> | null;
|
|
24
|
-
constructor(value: T, prev: Node<T> | null, next: Node<T> | null, list: LinkedList<T> | null);
|
|
25
|
-
}
|
|
26
|
-
export declare class LinkedList<T = any> {
|
|
27
|
-
tail: Node<T> | null;
|
|
28
|
-
head: Node<T> | null;
|
|
29
|
-
length: number;
|
|
30
|
-
constructor();
|
|
31
|
-
removeNode(node: Node<T> | null): Node<T> | null | undefined;
|
|
32
|
-
unshiftNode(node: Node<T>): void;
|
|
33
|
-
unshift(): number;
|
|
34
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LinkedList, Node } from './LinkedList';
|
|
2
|
-
export declare class LRUCache<K, V> {
|
|
3
|
-
maxLen: number;
|
|
4
|
-
items: Map<K, Node<{
|
|
5
|
-
key: K;
|
|
6
|
-
value: V;
|
|
7
|
-
}>>;
|
|
8
|
-
lru: LinkedList<{
|
|
9
|
-
key: K;
|
|
10
|
-
value: V;
|
|
11
|
-
}>;
|
|
12
|
-
constructor(maxSize?: number);
|
|
13
|
-
get(key: K): V | undefined;
|
|
14
|
-
set(key: K, value: V): boolean;
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IEventEmitter } from '../types';
|
|
2
|
-
export declare class EventEmitter implements IEventEmitter {
|
|
3
|
-
private listeners;
|
|
4
|
-
private registerListener;
|
|
5
|
-
addListener(type: string, listener: (...args: any[]) => void): this;
|
|
6
|
-
on(type: string, listener: (...args: any[]) => void): this;
|
|
7
|
-
once(type: string, listener: (...args: any[]) => void): this;
|
|
8
|
-
removeListener(): void;
|
|
9
|
-
off(): void;
|
|
10
|
-
emit(type: string, ...args: any[]): boolean;
|
|
11
|
-
removeAllListeners(type?: string): this;
|
|
12
|
-
}
|
package/types/utils/Semver.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class Semver {
|
|
2
|
-
private readonly _major;
|
|
3
|
-
private readonly _minor;
|
|
4
|
-
private readonly _patch;
|
|
5
|
-
private readonly _preRelease;
|
|
6
|
-
private readonly _isStable;
|
|
7
|
-
readonly version: string;
|
|
8
|
-
constructor(version: string);
|
|
9
|
-
/**
|
|
10
|
-
* Precedence comparision between 2 Semver objects.
|
|
11
|
-
*
|
|
12
|
-
* @return `0` if `this === toCompare`, `-1` if `this < toCompare`, and `1` if `this > toCompare`
|
|
13
|
-
*/
|
|
14
|
-
compare(toCompare: Semver): number;
|
|
15
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base64 utils in pure JS, for browser, node and others which don't provide globals `btoa` and `atob`.
|
|
3
|
-
* Implementation based on davidchambers/Base64 (https://github.com/davidchambers/Base64.js).
|
|
4
|
-
|
|
5
|
-
Copyright 2019 David Chambers
|
|
6
|
-
|
|
7
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License.
|
|
9
|
-
You may obtain a copy of the License at
|
|
10
|
-
|
|
11
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
|
|
13
|
-
Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
See the License for the specific language governing permissions and
|
|
17
|
-
limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Decode a given string value in Base64 format
|
|
21
|
-
*
|
|
22
|
-
* @param {string} input value to decode
|
|
23
|
-
*/
|
|
24
|
-
export declare function decodeFromBase64(input: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Encode a given string value to Base64 format.
|
|
27
|
-
*
|
|
28
|
-
* @param {string} input value to encode
|
|
29
|
-
*/
|
|
30
|
-
export declare function encodeToBase64(input: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_CACHE_EXPIRATION_IN_MILLIS = 864000000;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { StorageType } from '../../storages/types';
|
|
2
|
-
import { SDKMode } from '../../types';
|
|
3
|
-
export declare const CONTROL = "control";
|
|
4
|
-
export declare const CONTROL_WITH_CONFIG: {
|
|
5
|
-
treatment: string;
|
|
6
|
-
config: null;
|
|
7
|
-
};
|
|
8
|
-
export declare const UNKNOWN = "unknown";
|
|
9
|
-
export declare const NA = "NA";
|
|
10
|
-
export declare const SPLIT_IMPRESSION = "IMPRESSION";
|
|
11
|
-
export declare const SPLIT_EVENT = "EVENT";
|
|
12
|
-
export declare const DEBUG = "DEBUG";
|
|
13
|
-
export declare const OPTIMIZED = "OPTIMIZED";
|
|
14
|
-
export declare const NONE = "NONE";
|
|
15
|
-
export declare const LOCALHOST_MODE: SDKMode;
|
|
16
|
-
export declare const STANDALONE_MODE: SDKMode;
|
|
17
|
-
export declare const PRODUCER_MODE = "producer";
|
|
18
|
-
export declare const CONSUMER_MODE: SDKMode;
|
|
19
|
-
export declare const CONSUMER_PARTIAL_MODE: SDKMode;
|
|
20
|
-
export declare const STORAGE_MEMORY: StorageType;
|
|
21
|
-
export declare const STORAGE_LOCALSTORAGE: StorageType;
|
|
22
|
-
export declare const STORAGE_REDIS: StorageType;
|
|
23
|
-
export declare const STORAGE_PLUGGABLE: StorageType;
|
|
24
|
-
export declare const CONSENT_GRANTED = "GRANTED";
|
|
25
|
-
export declare const CONSENT_DECLINED = "DECLINED";
|
|
26
|
-
export declare const CONSENT_UNKNOWN = "UNKNOWN";
|
|
27
|
-
export declare const GET_TREATMENT = "getTreatment";
|
|
28
|
-
export declare const GET_TREATMENTS = "getTreatments";
|
|
29
|
-
export declare const GET_TREATMENT_WITH_CONFIG = "getTreatmentWithConfig";
|
|
30
|
-
export declare const GET_TREATMENTS_WITH_CONFIG = "getTreatmentsWithConfig";
|
|
31
|
-
export declare const GET_TREATMENTS_BY_FLAG_SET = "getTreatmentsByFlagSet";
|
|
32
|
-
export declare const GET_TREATMENTS_BY_FLAG_SETS = "getTreatmentsByFlagSets";
|
|
33
|
-
export declare const GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SET = "getTreatmentsWithConfigByFlagSet";
|
|
34
|
-
export declare const GET_TREATMENTS_WITH_CONFIG_BY_FLAG_SETS = "getTreatmentsWithConfigByFlagSets";
|
|
35
|
-
export declare const TRACK_FN_LABEL = "track";
|
|
36
|
-
export declare const SPLIT_FN_LABEL = "split";
|
|
37
|
-
export declare const SPLITS_FN_LABEL = "splits";
|
|
38
|
-
export declare const NAMES_FN_LABEL = "names";
|
|
39
|
-
export declare const QUEUED = 0;
|
|
40
|
-
export declare const DROPPED = 1;
|
|
41
|
-
export declare const DEDUPED = 2;
|
|
42
|
-
export declare const STANDALONE_ENUM = 0;
|
|
43
|
-
export declare const CONSUMER_ENUM = 1;
|
|
44
|
-
export declare const CONSUMER_PARTIAL_ENUM = 2;
|
|
45
|
-
export declare const OPTIMIZED_ENUM = 0;
|
|
46
|
-
export declare const DEBUG_ENUM = 1;
|
|
47
|
-
export declare const NONE_ENUM = 2;
|
|
48
|
-
export declare const SPLITS = "sp";
|
|
49
|
-
export declare const IMPRESSIONS = "im";
|
|
50
|
-
export declare const IMPRESSIONS_COUNT = "ic";
|
|
51
|
-
export declare const EVENTS = "ev";
|
|
52
|
-
export declare const TELEMETRY = "te";
|
|
53
|
-
export declare const TOKEN = "to";
|
|
54
|
-
export declare const SEGMENT = "se";
|
|
55
|
-
export declare const MEMBERSHIPS = "ms";
|
|
56
|
-
export declare const TREATMENT = "t";
|
|
57
|
-
export declare const TREATMENTS = "ts";
|
|
58
|
-
export declare const TREATMENT_WITH_CONFIG = "tc";
|
|
59
|
-
export declare const TREATMENTS_WITH_CONFIG = "tcs";
|
|
60
|
-
export declare const TREATMENTS_BY_FLAGSET = "tf";
|
|
61
|
-
export declare const TREATMENTS_BY_FLAGSETS = "tfs";
|
|
62
|
-
export declare const TREATMENTS_WITH_CONFIG_BY_FLAGSET = "tcf";
|
|
63
|
-
export declare const TREATMENTS_WITH_CONFIG_BY_FLAGSETS = "tcfs";
|
|
64
|
-
export declare const TRACK = "tr";
|
|
65
|
-
export declare const CONNECTION_ESTABLISHED = 0;
|
|
66
|
-
export declare const OCCUPANCY_PRI = 10;
|
|
67
|
-
export declare const OCCUPANCY_SEC = 20;
|
|
68
|
-
export declare const STREAMING_STATUS = 30;
|
|
69
|
-
export declare const SSE_CONNECTION_ERROR = 40;
|
|
70
|
-
export declare const TOKEN_REFRESH = 50;
|
|
71
|
-
export declare const ABLY_ERROR = 60;
|
|
72
|
-
export declare const SYNC_MODE_UPDATE = 70;
|
|
73
|
-
export declare const AUTH_REJECTION = 80;
|
|
74
|
-
export declare const STREAMING = 0;
|
|
75
|
-
export declare const POLLING = 1;
|
|
76
|
-
export declare const REQUESTED = 0;
|
|
77
|
-
export declare const NON_REQUESTED = 1;
|
|
78
|
-
export declare const DISABLED = 0;
|
|
79
|
-
export declare const ENABLED = 1;
|
|
80
|
-
export declare const PAUSED = 2;
|
|
81
|
-
export declare const FLAG_SPEC_VERSION = "1.2";
|
|
82
|
-
export declare const IN_SEGMENT = "IN_SEGMENT";
|
|
83
|
-
export declare const IN_LARGE_SEGMENT = "IN_LARGE_SEGMENT";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const algorithms: string | {
|
|
2
|
-
/**
|
|
3
|
-
* Expands GZIP data
|
|
4
|
-
* @param data The data to decompress
|
|
5
|
-
* @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.
|
|
6
|
-
* @returns The decompressed version of the data
|
|
7
|
-
*/
|
|
8
|
-
gunzipSync(data: Uint8Array, out?: Uint8Array | undefined): Uint8Array;
|
|
9
|
-
/**
|
|
10
|
-
* Expands Zlib data
|
|
11
|
-
* @param data The data to decompress
|
|
12
|
-
* @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.
|
|
13
|
-
* @returns The decompressed version of the data
|
|
14
|
-
*/
|
|
15
|
-
unzlibSync(data: Uint8Array, out?: Uint8Array | undefined): Uint8Array;
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isLocalStorageAvailable(): boolean;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../logger/types';
|
|
2
|
-
/** validates the given SDK key */
|
|
3
|
-
export declare function validateApiKey(log: ILogger, maybeSdkKey: any): string | false;
|
|
4
|
-
export declare const usedKeysMap: Record<string, number>;
|
|
5
|
-
/** validates the given SDK key and also warns if it is in use */
|
|
6
|
-
export declare function validateAndTrackApiKey(log: ILogger, maybeSdkKey: any): string | false;
|
|
7
|
-
export declare function releaseApiKey(sdkKey: string): void;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { SplitIO } from '../../types';
|
|
2
|
-
import { ILogger } from '../../logger/types';
|
|
3
|
-
export declare function validateAttributes(log: ILogger, maybeAttrs: any, method: string): SplitIO.Attributes | undefined | false;
|
|
4
|
-
export declare function validateAttributesDeep(log: ILogger, maybeAttributes: Record<string, Object>, method: string): boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { validateApiKey, validateAndTrackApiKey, releaseApiKey } from './apiKey';
|
|
2
|
-
export { validateAttributes } from './attributes';
|
|
3
|
-
export { validateEvent } from './event';
|
|
4
|
-
export { validateEventValue } from './eventValue';
|
|
5
|
-
export { validateEventProperties } from './eventProperties';
|
|
6
|
-
export { validateKey } from './key';
|
|
7
|
-
export { validateSplit } from './split';
|
|
8
|
-
export { validateSplits } from './splits';
|
|
9
|
-
export { validateTrafficType } from './trafficType';
|
|
10
|
-
export { validateIfNotDestroyed, validateIfOperational } from './isOperational';
|
|
11
|
-
export { validateSplitExistence } from './splitExistence';
|
|
12
|
-
export { validateTrafficTypeExistence } from './trafficTypeExistence';
|
|
13
|
-
export { validatePreloadedData } from './preloadedData';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../logger/types';
|
|
2
|
-
import { IReadinessManager } from '../../readiness/types';
|
|
3
|
-
export declare function validateIfNotDestroyed(log: ILogger, readinessManager: IReadinessManager, method: string): boolean;
|
|
4
|
-
export declare function validateIfOperational(log: ILogger, readinessManager: IReadinessManager, method: string, featureFlagNameOrNames?: string | string[] | false): boolean;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IReadinessManager } from '../../readiness/types';
|
|
2
|
-
import { ILogger } from '../../logger/types';
|
|
3
|
-
/**
|
|
4
|
-
* This is defined here and in this format mostly because of the logger and the fact that it's considered a validation at product level.
|
|
5
|
-
* But it's not going to run on the input validation layer. In any case, the most compeling reason to use it as we do is to avoid going to Redis and get a split twice.
|
|
6
|
-
*/
|
|
7
|
-
export declare function validateSplitExistence(log: ILogger, readinessManager: IReadinessManager, splitName: string, labelOrSplitObj: any, method: string): boolean;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ISplitsCacheBase } from '../../storages/types';
|
|
2
|
-
import { IReadinessManager } from '../../readiness/types';
|
|
3
|
-
import { SDKMode } from '../../types';
|
|
4
|
-
import { MaybeThenable } from '../../dtos/types';
|
|
5
|
-
import { ILogger } from '../../logger/types';
|
|
6
|
-
/**
|
|
7
|
-
* Separated from the previous method since on some cases it'll be async.
|
|
8
|
-
*/
|
|
9
|
-
export declare function validateTrafficTypeExistence(log: ILogger, readinessManager: IReadinessManager, splitsCache: ISplitsCacheBase, mode: SDKMode, maybeTT: string, method: string): MaybeThenable<boolean>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SplitIO } from '../../types';
|
|
2
|
-
export declare function getMatching(key: SplitIO.SplitKey): string;
|
|
3
|
-
export declare function getBucketing(key: SplitIO.SplitKey): string | undefined;
|
|
4
|
-
/**
|
|
5
|
-
* Verify type of key and return a valid object key used for get treatment for a
|
|
6
|
-
* specific split.
|
|
7
|
-
*/
|
|
8
|
-
export declare function keyParser(key: SplitIO.SplitKey): SplitIO.SplitKeyObject;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const SPLIT_KILLED = "killed";
|
|
2
|
-
export declare const NO_CONDITION_MATCH = "default rule";
|
|
3
|
-
export declare const SPLIT_NOT_FOUND = "definition not found";
|
|
4
|
-
export declare const SDK_NOT_READY = "not ready";
|
|
5
|
-
export declare const EXCEPTION = "exception";
|
|
6
|
-
export declare const SPLIT_ARCHIVED = "archived";
|
|
7
|
-
export declare const NOT_IN_SPLIT = "not in split";
|
|
8
|
-
export declare const UNSUPPORTED_MATCHER_TYPE = "targeting rule type unsupported by sdk";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Searches the index of the specified `value` inside an ordered array of `items` using the binary search algorithm.
|
|
3
|
-
*
|
|
4
|
-
* @param items the array to be searched
|
|
5
|
-
* @param value the value to be searched for
|
|
6
|
-
* @returns integer number between 0 and `items.length`. This value is the index of the search value,
|
|
7
|
-
* if it is contained in the array, or the index at which the value should be inserted to keep the array ordered.
|
|
8
|
-
*/
|
|
9
|
-
export declare function binarySearch(items: number[], value: number): number;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if the target string ends with the sub string.
|
|
3
|
-
*/
|
|
4
|
-
export declare function endsWith(target: any, sub: any, caseInsensitive?: boolean): boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Loops through a source collection (an object or an array) running iteratee
|
|
7
|
-
* against each element. It returns the first element for which iteratee returned
|
|
8
|
-
* a truthy value and stops the loop.
|
|
9
|
-
* Iteratee receives three arguments (element, key/index, collection)
|
|
10
|
-
*/
|
|
11
|
-
export declare function find<T extends any[] | Record<string, any>, V = T extends any[] ? T[0] : T[keyof T], K = T extends any[] ? number : keyof T & string>(source: T | null | undefined, iteratee: (value: V, key: K, source: T) => boolean): V | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Evaluates iteratee for each element of the source array. Returns the index of the first element
|
|
14
|
-
* for which iteratee returns truthy. If no element is found or there's an issue with the params it returns -1.
|
|
15
|
-
*/
|
|
16
|
-
export declare function findIndex<T>(source: T[], iteratee: (value: T, index: number, source: T[]) => boolean): number;
|
|
17
|
-
/**
|
|
18
|
-
* Executes iteratee for given obj own props.
|
|
19
|
-
*/
|
|
20
|
-
export declare function forOwn<T>(obj: {
|
|
21
|
-
[key: string]: T;
|
|
22
|
-
}, iteratee: (value: T, key: string, obj: {
|
|
23
|
-
[key: string]: T;
|
|
24
|
-
}) => any): {
|
|
25
|
-
[key: string]: T;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Safely retrieve the specified prop from obj. If we can't retrieve
|
|
29
|
-
* that property value, we return the default value.
|
|
30
|
-
*/
|
|
31
|
-
export declare function get(obj: any, prop: any, val?: any): any;
|
|
32
|
-
/**
|
|
33
|
-
* Parses an array into a map of different arrays, grouping by the specified prop value.
|
|
34
|
-
*/
|
|
35
|
-
export declare function groupBy<T extends Record<string, any>>(source: T[], prop: string): Record<string, T[]>;
|
|
36
|
-
/**
|
|
37
|
-
* Checks if a given value is a boolean.
|
|
38
|
-
*/
|
|
39
|
-
export declare function isBoolean(val: any): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Checks if a given value is a finite value of number type or Number object.
|
|
42
|
-
* Unlike `Number.isFinite`, it also tests Number object instances.
|
|
43
|
-
* Unlike global `isFinite`, it returns false if the value is not a number or Number object instance.
|
|
44
|
-
*/
|
|
45
|
-
export declare function isFiniteNumber(val: any): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Checks if a given value is an integer value of number type or Number object.
|
|
48
|
-
* Unlike `Number.isInteger`, it also tests Number object instances.
|
|
49
|
-
*/
|
|
50
|
-
export declare function isIntegerNumber(val: any): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Checks if a given value is a NaN value of number type or Number object.
|
|
53
|
-
* Unlike `Number.isNaN`, it also tests Number object instances.
|
|
54
|
-
* Unlike global `isNan`, it returns false if the value is not a number or Number object instance.
|
|
55
|
-
*/
|
|
56
|
-
export declare function isNaNNumber(val: any): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Validates if a value is an object created by the Object constructor (plain object).
|
|
59
|
-
* It checks `constructor.name` to avoid false negatives when validating values on a separate VM context, which has its own global built-ins.
|
|
60
|
-
*/
|
|
61
|
-
export declare function isObject(obj: any): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Checks if a given value is a string.
|
|
64
|
-
*/
|
|
65
|
-
export declare function isString(val: any): val is string;
|
|
66
|
-
/**
|
|
67
|
-
* String sanitizer. Returns the provided value converted to uppercase if it is a string.
|
|
68
|
-
*/
|
|
69
|
-
export declare function stringToUpperCase(val: any): any;
|
|
70
|
-
/**
|
|
71
|
-
* Deep copy version of Object.assign using recursion.
|
|
72
|
-
* There are some assumptions here. It's for internal use and we don't need verbose errors
|
|
73
|
-
* or to ensure the data types or whatever. Parameters should always be correct (at least have a target and a source, of type object).
|
|
74
|
-
*/
|
|
75
|
-
export declare function merge(target: {
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
}, source: {
|
|
78
|
-
[key: string]: any;
|
|
79
|
-
}, ...rest: any[]): object;
|
|
80
|
-
/**
|
|
81
|
-
* Checks if the target string starts with the sub string.
|
|
82
|
-
*/
|
|
83
|
-
export declare function startsWith(target: any, sub: any): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Transforms a value into a number.
|
|
86
|
-
* Note: We're not expecting anything fancy here. If we are at some point, add more type checks.
|
|
87
|
-
*/
|
|
88
|
-
export declare function toNumber(val: any): number;
|
|
89
|
-
/**
|
|
90
|
-
* Transforms a value into it's string representation.
|
|
91
|
-
*/
|
|
92
|
-
export declare function toString(val: any): string;
|
|
93
|
-
/**
|
|
94
|
-
* Removes duplicate items on an array of strings.
|
|
95
|
-
*/
|
|
96
|
-
export declare function uniq(arr: string[]): string[];
|
|
97
|
-
/**
|
|
98
|
-
* Removes duplicate items on an array of objects using an optional `stringify` function as equality criteria.
|
|
99
|
-
* It uses JSON.stringify as default criteria.
|
|
100
|
-
*/
|
|
101
|
-
export declare function uniqAsStrings<T>(arr: T[], stringify?: (value: T) => string): T[];
|
|
102
|
-
/**
|
|
103
|
-
* Returns a number to be used as ID, which will be unique.
|
|
104
|
-
*/
|
|
105
|
-
export declare function uniqueId(): number;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A tiny polyfill for Object.assign
|
|
3
|
-
*/
|
|
4
|
-
declare type ObjectAssign = (<T, U>(target: T, source: U) => T & U) & (<T, U, V>(target: T, source1: U, source2: V) => T & U & V) & (<T, U, V, W>(target: T, source1: U, source2: V, source3: W) => T & U & V & W) & (<T, U, V, W, Q>(target: T, source1: U, source2: V, source3: W, source4: Q) => T & U & V & W & Q) & (<T, U, V, W, Q, R>(target: T, source1: U, source2: V, source3: W, source4: Q, source5: R) => T & U & V & W & Q & R) & ((target: any, ...sources: any[]) => any);
|
|
5
|
-
export declare const objectAssign: ObjectAssign;
|
|
6
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare function UTF16ToUTF8(key: string): string | undefined;
|
|
2
|
-
/*!
|
|
3
|
-
* +----------------------------------------------------------------------------------+
|
|
4
|
-
* | murmurHash3.js v3.0.0 (http://github.com/karanlyons/murmurHash3.js) |
|
|
5
|
-
* | A TypeScript/JavaScript implementation of MurmurHash3's hashing algorithms. |
|
|
6
|
-
* |----------------------------------------------------------------------------------|
|
|
7
|
-
* | Copyright (c) 2012-2020 Karan Lyons. Freely distributable under the MIT license. |
|
|
8
|
-
* +----------------------------------------------------------------------------------+
|
|
9
|
-
*/
|
|
10
|
-
export declare function x86Multiply(m: number, n: number): number;
|
|
11
|
-
export declare function x86Rotl(m: number, n: number): number;
|
|
12
|
-
export declare function x86Fmix(h: number): number;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* x86 version of Murmur3 for 128bits.
|
|
3
|
-
* Used by hashImpression128 because in JS it is more efficient than the x64 version, no matter the underlying OS/CPU arch.
|
|
4
|
-
*
|
|
5
|
-
* @param {string} str
|
|
6
|
-
*/
|
|
7
|
-
export declare function hash128(str: string, seed?: number): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type Hash64 = {
|
|
2
|
-
hex: string;
|
|
3
|
-
dec: string;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Gets the higher 64 bits of the x64 version of Murmur3 for 128bits, as decimal and hexadecimal number strings.
|
|
7
|
-
* Used for MySegments channel V2 notifications.
|
|
8
|
-
* @param {string} str
|
|
9
|
-
*/
|
|
10
|
-
export declare function hash64(str: string): Hash64;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface utfx {
|
|
2
|
-
encodeUTF16toUTF8(src: () => number | null, dst: (...args: number[]) => string | undefined): void;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Converts and encodes UTF16 characters to UTF8 bytes.
|
|
6
|
-
* @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`
|
|
7
|
-
* if there are no more characters left.
|
|
8
|
-
* @param {!function(number)} dst Bytes destination as a function successively called with the next byte.
|
|
9
|
-
* @expose
|
|
10
|
-
*/
|
|
11
|
-
export declare function encodeUTF16toUTF8(src: () => number | null, dst: (...args: number[]) => string | undefined): void;
|
|
12
|
-
/**
|
|
13
|
-
* Creates a source function for a string.
|
|
14
|
-
* @param {string} s String to read from
|
|
15
|
-
* @returns {!function():number|null} Source function returning the next char code respectively `null` if there are
|
|
16
|
-
* no more characters left.
|
|
17
|
-
* @throws {TypeError} If the argument is invalid
|
|
18
|
-
* @expose
|
|
19
|
-
*/
|
|
20
|
-
export declare function stringSource(s: string): () => number | null;
|
|
21
|
-
/**
|
|
22
|
-
* Creates a destination function for a string.
|
|
23
|
-
* @returns {function(number=):undefined|string} Destination function successively called with the next char code.
|
|
24
|
-
* Returns the final string when called without arguments.
|
|
25
|
-
* @expose
|
|
26
|
-
*/
|
|
27
|
-
export declare function stringDestination(): (...args: number[]) => string | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function thenable(o: any): o is Promise<any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function timeout<T>(ms: number, promise: Promise<T>): Promise<T>;
|