@splitsoftware/splitio-commons 1.6.2-rc.1 → 1.6.2-rc.4
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/cjs/listeners/browser.js +1 -2
- package/cjs/logger/constants.js +1 -2
- package/cjs/sdkClient/clientAttributesDecoration.js +1 -1
- package/cjs/sdkFactory/index.js +6 -13
- package/cjs/services/splitApi.js +1 -20
- package/cjs/storages/inMemory/AttributesCacheInMemory.js +1 -1
- package/cjs/sync/submitters/submitterManager.js +0 -3
- package/cjs/trackers/impressionsTracker.js +28 -7
- package/cjs/utils/constants/index.js +2 -3
- package/cjs/utils/key/index.js +1 -1
- package/cjs/utils/settingsValidation/impressionsMode.js +2 -2
- package/cjs/utils/settingsValidation/index.js +1 -3
- package/esm/listeners/browser.js +2 -3
- package/esm/logger/constants.js +0 -1
- package/esm/sdkClient/clientAttributesDecoration.js +1 -1
- package/esm/sdkFactory/index.js +6 -13
- package/esm/services/splitApi.js +1 -20
- package/esm/storages/inMemory/AttributesCacheInMemory.js +1 -1
- package/esm/sync/submitters/submitterManager.js +0 -3
- package/esm/trackers/impressionsTracker.js +28 -7
- package/esm/utils/constants/index.js +0 -1
- package/esm/utils/key/index.js +1 -1
- package/esm/utils/settingsValidation/impressionsMode.js +3 -3
- package/esm/utils/settingsValidation/index.js +1 -3
- package/package.json +4 -5
- package/src/consent/sdkUserConsent.ts +4 -3
- package/src/dtos/types.ts +0 -8
- package/src/evaluator/Engine.ts +3 -3
- package/src/evaluator/combiners/and.ts +1 -1
- package/src/evaluator/combiners/ifelseif.ts +3 -3
- package/src/evaluator/condition/engineUtils.ts +1 -1
- package/src/evaluator/condition/index.ts +6 -6
- package/src/evaluator/index.ts +10 -10
- package/src/evaluator/matchers/all.ts +1 -1
- package/src/evaluator/matchers/between.ts +1 -1
- package/src/evaluator/matchers/boolean.ts +1 -1
- package/src/evaluator/matchers/cont_all.ts +1 -1
- package/src/evaluator/matchers/cont_any.ts +1 -1
- package/src/evaluator/matchers/cont_str.ts +1 -1
- package/src/evaluator/matchers/dependency.ts +1 -1
- package/src/evaluator/matchers/eq.ts +1 -1
- package/src/evaluator/matchers/eq_set.ts +1 -1
- package/src/evaluator/matchers/ew.ts +1 -1
- package/src/evaluator/matchers/gte.ts +1 -1
- package/src/evaluator/matchers/index.ts +1 -1
- package/src/evaluator/matchers/lte.ts +1 -1
- package/src/evaluator/matchers/part_of.ts +1 -1
- package/src/evaluator/matchers/segment.ts +1 -1
- package/src/evaluator/matchers/string.ts +1 -1
- package/src/evaluator/matchers/sw.ts +1 -1
- package/src/evaluator/matchers/whitelist.ts +1 -1
- package/src/evaluator/parser/index.ts +3 -3
- package/src/evaluator/types.ts +6 -6
- package/src/evaluator/value/index.ts +4 -4
- package/src/evaluator/value/sanitize.ts +4 -4
- package/src/integrations/ga/GaToSplit.ts +6 -6
- package/src/integrations/ga/SplitToGa.ts +10 -10
- package/src/integrations/ga/types.ts +4 -4
- package/src/integrations/pluggable.ts +3 -3
- package/src/integrations/types.ts +2 -2
- package/src/listeners/browser.ts +2 -3
- package/src/logger/.DS_Store +0 -0
- package/src/logger/constants.ts +0 -1
- package/src/logger/index.ts +3 -3
- package/src/logger/sdkLogger.ts +1 -2
- package/src/logger/types.ts +0 -16
- package/src/readiness/sdkReadinessManager.ts +1 -1
- package/src/readiness/types.ts +2 -9
- package/src/sdkClient/client.ts +13 -13
- package/src/sdkClient/clientAttributesDecoration.ts +13 -13
- package/src/sdkClient/clientCS.ts +3 -4
- package/src/sdkClient/clientInputValidation.ts +15 -15
- package/src/sdkClient/sdkClient.ts +2 -2
- package/src/sdkClient/sdkClientMethod.ts +2 -2
- package/src/sdkClient/sdkClientMethodCS.ts +9 -9
- package/src/sdkClient/sdkClientMethodCSWithTT.ts +9 -9
- package/src/sdkFactory/index.ts +8 -17
- package/src/sdkFactory/types.ts +8 -11
- package/src/sdkManager/index.ts +5 -5
- package/src/services/splitApi.ts +1 -22
- package/src/services/types.ts +0 -6
- package/src/storages/dataLoader.ts +2 -2
- package/src/storages/inLocalStorage/MySegmentsCacheInLocal.ts +1 -1
- package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +2 -2
- package/src/storages/inLocalStorage/index.ts +3 -2
- package/src/storages/inMemory/AttributesCacheInMemory.ts +13 -12
- package/src/storages/inMemory/EventsCacheInMemory.ts +4 -4
- package/src/storages/inRedis/EventsCacheInRedis.ts +4 -4
- package/src/storages/inRedis/ImpressionsCacheInRedis.ts +1 -1
- package/src/storages/inRedis/RedisAdapter.ts +1 -1
- package/src/storages/inRedis/SegmentsCacheInRedis.ts +1 -1
- package/src/storages/inRedis/SplitsCacheInRedis.ts +1 -1
- package/src/storages/inRedis/TelemetryCacheInRedis.ts +1 -1
- package/src/storages/inRedis/index.ts +3 -2
- package/src/storages/pluggable/EventsCachePluggable.ts +4 -4
- package/src/storages/pluggable/ImpressionsCachePluggable.ts +1 -1
- package/src/storages/pluggable/SegmentsCachePluggable.ts +1 -1
- package/src/storages/pluggable/SplitsCachePluggable.ts +1 -1
- package/src/storages/pluggable/TelemetryCachePluggable.ts +1 -1
- package/src/storages/pluggable/index.ts +3 -3
- package/src/storages/pluggable/wrapperAdapter.ts +1 -1
- package/src/storages/types.ts +46 -35
- package/src/sync/offline/LocalhostFromObject.ts +4 -4
- package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +8 -8
- package/src/sync/polling/updaters/mySegmentsUpdater.ts +1 -1
- package/src/sync/polling/updaters/segmentChangesUpdater.ts +1 -1
- package/src/sync/polling/updaters/splitChangesUpdater.ts +1 -1
- package/src/sync/streaming/SSEHandler/index.ts +1 -1
- package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +1 -1
- package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +1 -1
- package/src/sync/submitters/submitter.ts +1 -1
- package/src/sync/submitters/submitterManager.ts +0 -2
- package/src/sync/submitters/types.ts +3 -22
- package/src/sync/syncTask.ts +1 -1
- package/src/trackers/eventTracker.ts +3 -3
- package/src/trackers/impressionsTracker.ts +37 -15
- package/src/trackers/types.ts +4 -34
- package/src/types.d.ts +1581 -0
- package/src/utils/constants/index.ts +1 -2
- package/src/utils/inputValidation/apiKey.ts +1 -1
- package/src/utils/inputValidation/attribute.ts +1 -1
- package/src/utils/inputValidation/attributes.ts +3 -3
- package/src/utils/inputValidation/event.ts +1 -1
- package/src/utils/inputValidation/eventProperties.ts +3 -3
- package/src/utils/inputValidation/eventValue.ts +1 -1
- package/src/utils/inputValidation/isOperational.ts +1 -1
- package/src/utils/inputValidation/key.ts +3 -3
- package/src/utils/inputValidation/preloadedData.ts +3 -3
- package/src/utils/inputValidation/split.ts +1 -1
- package/src/utils/inputValidation/splitExistance.ts +1 -1
- package/src/utils/inputValidation/splits.ts +1 -1
- package/src/utils/inputValidation/trafficType.ts +1 -1
- package/src/utils/inputValidation/trafficTypeExistance.ts +1 -1
- package/src/utils/key/index.ts +9 -9
- package/src/utils/settingsValidation/consent.ts +1 -2
- package/src/utils/settingsValidation/impressionsMode.ts +6 -6
- package/src/utils/settingsValidation/index.ts +1 -4
- package/src/utils/settingsValidation/integrations/common.ts +1 -1
- package/src/utils/settingsValidation/integrations/configurable.ts +1 -1
- package/src/utils/settingsValidation/integrations/pluggable.ts +1 -2
- package/src/utils/settingsValidation/localhost/builtin.ts +1 -2
- package/src/utils/settingsValidation/localhost/pluggable.ts +1 -2
- package/src/utils/settingsValidation/logger/builtinLogger.ts +1 -2
- package/src/utils/settingsValidation/logger/pluggableLogger.ts +1 -2
- package/src/utils/settingsValidation/splitFilters.ts +7 -9
- package/src/utils/settingsValidation/storage/storageCS.ts +1 -2
- package/cjs/sync/submitters/uniqueKeysSubmitter.js +0 -70
- package/cjs/trackers/strategy/strategyDebug.js +0 -25
- package/cjs/trackers/strategy/strategyNone.js +0 -29
- package/cjs/trackers/strategy/strategyOptimized.js +0 -34
- package/cjs/trackers/uniqueKeysTracker.js +0 -69
- package/cjs/types.js +0 -2
- package/esm/sync/submitters/uniqueKeysSubmitter.js +0 -64
- package/esm/trackers/strategy/strategyDebug.js +0 -21
- package/esm/trackers/strategy/strategyNone.js +0 -25
- package/esm/trackers/strategy/strategyOptimized.js +0 -30
- package/esm/trackers/uniqueKeysTracker.js +0 -65
- package/esm/types.js +0 -1
- package/src/sync/submitters/uniqueKeysSubmitter.ts +0 -79
- package/src/trackers/strategy/strategyDebug.ts +0 -28
- package/src/trackers/strategy/strategyNone.ts +0 -34
- package/src/trackers/strategy/strategyOptimized.ts +0 -42
- package/src/trackers/uniqueKeysTracker.ts +0 -80
- package/src/types.ts +0 -1264
- package/types/consent/index.d.ts +0 -2
- package/types/consent/sdkUserConsent.d.ts +0 -13
- package/types/dtos/types.d.ts +0 -172
- 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 -7
- package/types/evaluator/matchers/all.d.ts +0 -2
- package/types/evaluator/matchers/between.d.ts +0 -3
- package/types/evaluator/matchers/boolean.d.ts +0 -2
- package/types/evaluator/matchers/cont_all.d.ts +0 -2
- package/types/evaluator/matchers/cont_any.d.ts +0 -2
- package/types/evaluator/matchers/cont_str.d.ts +0 -2
- package/types/evaluator/matchers/dependency.d.ts +0 -5
- package/types/evaluator/matchers/eq.d.ts +0 -2
- package/types/evaluator/matchers/eq_set.d.ts +0 -2
- package/types/evaluator/matchers/ew.d.ts +0 -2
- package/types/evaluator/matchers/gte.d.ts +0 -2
- package/types/evaluator/matchers/index.d.ts +0 -7
- package/types/evaluator/matchers/lte.d.ts +0 -2
- package/types/evaluator/matchers/matcherTypes.d.ts +0 -10
- package/types/evaluator/matchers/part_of.d.ts +0 -2
- package/types/evaluator/matchers/segment.d.ts +0 -6
- package/types/evaluator/matchers/string.d.ts +0 -2
- package/types/evaluator/matchers/sw.d.ts +0 -2
- package/types/evaluator/matchers/whitelist.d.ts +0 -3
- package/types/evaluator/matchersTransform/index.d.ts +0 -6
- package/types/evaluator/matchersTransform/segment.d.ts +0 -5
- package/types/evaluator/matchersTransform/set.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/index.d.ts +0 -5
- package/types/integrations/browser.d.ts +0 -12
- package/types/integrations/ga/GaToSplit.d.ts +0 -40
- package/types/integrations/ga/GoogleAnalyticsToSplit.d.ts +0 -3
- package/types/integrations/ga/SplitToGa.d.ts +0 -34
- package/types/integrations/ga/SplitToGoogleAnalytics.d.ts +0 -3
- package/types/integrations/ga/types.d.ts +0 -148
- package/types/integrations/pluggable.d.ts +0 -11
- package/types/integrations/types.d.ts +0 -17
- 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 -142
- package/types/logger/index.d.ts +0 -22
- 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 -11
- package/types/readiness/types.d.ts +0 -60
- package/types/sdkClient/client.d.ts +0 -6
- package/types/sdkClient/clientAttributesDecoration.d.ts +0 -51
- package/types/sdkClient/clientCS.d.ts +0 -10
- package/types/sdkClient/clientInputValidation.d.ts +0 -7
- 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/sdkClient/sdkClientMethodCSWithTT.d.ts +0 -8
- package/types/sdkClient/types.d.ts +0 -18
- package/types/sdkFactory/index.d.ts +0 -6
- package/types/sdkFactory/types.d.ts +0 -82
- package/types/sdkManager/index.d.ts +0 -5
- package/types/services/splitApi.d.ts +0 -11
- package/types/services/splitHttpClient.d.ts +0 -10
- package/types/services/types.d.ts +0 -54
- package/types/storages/AbstractSegmentsCacheSync.d.ts +0 -55
- package/types/storages/AbstractSplitsCacheAsync.d.ts +0 -36
- package/types/storages/AbstractSplitsCacheSync.d.ts +0 -42
- package/types/storages/KeyBuilder.d.ts +0 -14
- package/types/storages/KeyBuilderCS.d.ts +0 -16
- package/types/storages/KeyBuilderSS.d.ts +0 -15
- package/types/storages/dataLoader.d.ts +0 -10
- package/types/storages/findLatencyIndex.d.ts +0 -7
- package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +0 -25
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +0 -51
- 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 -43
- package/types/storages/inMemory/CountsCacheInMemory.d.ts +0 -20
- package/types/storages/inMemory/EventsCacheInMemory.d.ts +0 -35
- package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +0 -24
- 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/LatenciesCacheInMemory.d.ts +0 -20
- package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +0 -22
- package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +0 -19
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +0 -20
- package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +0 -53
- package/types/storages/inRedis/CountsCacheInRedis.d.ts +0 -9
- package/types/storages/inRedis/EventsCacheInRedis.d.ts +0 -32
- package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +0 -18
- package/types/storages/inRedis/LatenciesCacheInRedis.d.ts +0 -9
- package/types/storages/inRedis/RedisAdapter.d.ts +0 -24
- package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +0 -18
- package/types/storages/inRedis/SplitsCacheInRedis.d.ts +0 -91
- package/types/storages/inRedis/TelemetryCacheInRedis.d.ts +0 -20
- package/types/storages/inRedis/constants.d.ts +0 -1
- package/types/storages/inRedis/index.d.ts +0 -10
- package/types/storages/metadataBuilder.d.ts +0 -3
- package/types/storages/pluggable/EventsCachePluggable.d.ts +0 -38
- package/types/storages/pluggable/ImpressionsCachePluggable.d.ts +0 -35
- package/types/storages/pluggable/SegmentsCachePluggable.d.ts +0 -54
- package/types/storages/pluggable/SplitsCachePluggable.d.ts +0 -89
- package/types/storages/pluggable/TelemetryCachePluggable.d.ts +0 -18
- package/types/storages/pluggable/constants.d.ts +0 -1
- package/types/storages/pluggable/inMemoryWrapper.d.ts +0 -13
- 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 -417
- package/types/sync/offline/LocalhostFromFile.d.ts +0 -2
- package/types/sync/offline/LocalhostFromObject.d.ts +0 -2
- package/types/sync/offline/splitsParser/parseCondition.d.ts +0 -7
- package/types/sync/offline/splitsParser/splitsParserFromFile.d.ts +0 -2
- 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 -26
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +0 -13
- package/types/sync/polling/updaters/segmentChangesUpdater.d.ts +0 -18
- package/types/sync/polling/updaters/splitChangesUpdater.d.ts +0 -39
- 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 -67
- package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +0 -6
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +0 -8
- package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +0 -12
- 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/mySegmentsV2utils.d.ts +0 -27
- 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/eventsSyncTask.d.ts +0 -8
- package/types/sync/submitters/impressionCountsSubmitter.d.ts +0 -10
- package/types/sync/submitters/impressionCountsSyncTask.d.ts +0 -13
- package/types/sync/submitters/impressionsSubmitter.d.ts +0 -11
- package/types/sync/submitters/impressionsSyncTask.d.ts +0 -14
- package/types/sync/submitters/metricsSyncTask.d.ts +0 -12
- package/types/sync/submitters/submitter.d.ts +0 -12
- package/types/sync/submitters/submitterManager.d.ts +0 -3
- package/types/sync/submitters/submitterSyncTask.d.ts +0 -10
- package/types/sync/submitters/telemetrySubmitter.d.ts +0 -25
- package/types/sync/submitters/types.d.ts +0 -194
- package/types/sync/submitters/uniqueKeysSubmitter.d.ts +0 -19
- package/types/sync/syncManagerOnline.d.ts +0 -13
- package/types/sync/syncTask.d.ts +0 -13
- package/types/sync/syncTaskComposite.d.ts +0 -5
- package/types/sync/types.d.ts +0 -43
- package/types/trackers/eventTracker.d.ts +0 -10
- package/types/trackers/filter/bloomFilter.d.ts +0 -10
- package/types/trackers/filter/dictionaryFilter.d.ts +0 -8
- package/types/trackers/filter/types.d.ts +0 -5
- 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/impressionObserver/utils.d.ts +0 -13
- 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 -65
- package/types/trackers/uniqueKeysTracker.d.ts +0 -13
- package/types/types.d.ts +0 -1262
- 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 -16
- package/types/utils/MinEventEmitter.d.ts +0 -12
- package/types/utils/MinEvents.d.ts +0 -4
- package/types/utils/base64/index.d.ts +0 -30
- package/types/utils/constants/browser.d.ts +0 -3
- package/types/utils/constants/index.d.ts +0 -63
- 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/splitExistance.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/trafficTypeExistance.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 -7
- 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/maps.d.ts +0 -55
- package/types/utils/lang/objectAssign.d.ts +0 -3
- package/types/utils/lang/sets.d.ts +0 -60
- 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 -52
- 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/localhost/builtin.d.ts +0 -16
- package/types/utils/settingsValidation/localhost/pluggable.d.ts +0 -16
- 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 -1
- package/types/utils/settingsValidation/runtime.d.ts +0 -2
- package/types/utils/settingsValidation/splitFilters.d.ts +0 -16
- package/types/utils/settingsValidation/storage/storageCS.d.ts +0 -21
- package/types/utils/settingsValidation/types.d.ts +0 -32
- package/types/utils/settingsValidation/url.d.ts +0 -10
- package/types/utils/time/index.d.ts +0 -4
- package/types/utils/timeTracker/index.d.ts +0 -70
- 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/consent/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ISdkFactoryContext } from '../sdkFactory/types';
|
|
2
|
-
/**
|
|
3
|
-
* The public user consent API exposed via SplitFactory, used to control if the SDK tracks and sends impressions and events or not.
|
|
4
|
-
*/
|
|
5
|
-
export declare function createUserConsentAPI(params: ISdkFactoryContext): {
|
|
6
|
-
setStatus(consent: unknown): boolean;
|
|
7
|
-
getStatus(): import("../types").ConsentStatus | undefined;
|
|
8
|
-
Status: {
|
|
9
|
-
GRANTED: string;
|
|
10
|
-
DECLINED: string;
|
|
11
|
-
UNKNOWN: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
package/types/dtos/types.d.ts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { SplitIO } from '../types';
|
|
2
|
-
export declare type MaybeThenable<T> = T | Promise<T>;
|
|
3
|
-
/** Split Matchers */
|
|
4
|
-
export declare type IMatcherDataType = null | 'DATETIME' | 'NUMBER';
|
|
5
|
-
export interface IUnaryNumericMatcherData {
|
|
6
|
-
dataType: IMatcherDataType;
|
|
7
|
-
value: number;
|
|
8
|
-
}
|
|
9
|
-
export interface IBetweenMatcherData {
|
|
10
|
-
dataType: IMatcherDataType;
|
|
11
|
-
start: number;
|
|
12
|
-
end: number;
|
|
13
|
-
}
|
|
14
|
-
export interface IWhitelistMatcherData {
|
|
15
|
-
whitelist: string[];
|
|
16
|
-
}
|
|
17
|
-
export interface IInSegmentMatcherData {
|
|
18
|
-
segmentName: string;
|
|
19
|
-
}
|
|
20
|
-
export interface IDependencyMatcherData {
|
|
21
|
-
split: string;
|
|
22
|
-
treatments: string[];
|
|
23
|
-
}
|
|
24
|
-
interface ISplitMatcherBase {
|
|
25
|
-
matcherType: string;
|
|
26
|
-
negate: boolean;
|
|
27
|
-
keySelector: null | {
|
|
28
|
-
trafficType: string;
|
|
29
|
-
attribute: string | null;
|
|
30
|
-
};
|
|
31
|
-
userDefinedSegmentMatcherData?: null | IInSegmentMatcherData;
|
|
32
|
-
whitelistMatcherData?: null | IWhitelistMatcherData;
|
|
33
|
-
unaryNumericMatcherData?: null | IUnaryNumericMatcherData;
|
|
34
|
-
betweenMatcherData?: null | IBetweenMatcherData;
|
|
35
|
-
dependencyMatcherData?: null | IDependencyMatcherData;
|
|
36
|
-
booleanMatcherData?: null | boolean;
|
|
37
|
-
stringMatcherData?: null | string;
|
|
38
|
-
}
|
|
39
|
-
interface IAllKeysMatcher extends ISplitMatcherBase {
|
|
40
|
-
matcherType: 'ALL_KEYS';
|
|
41
|
-
}
|
|
42
|
-
interface IInSegmentMatcher extends ISplitMatcherBase {
|
|
43
|
-
matcherType: 'IN_SEGMENT';
|
|
44
|
-
userDefinedSegmentMatcherData: IInSegmentMatcherData;
|
|
45
|
-
}
|
|
46
|
-
interface IWhitelistMatcher extends ISplitMatcherBase {
|
|
47
|
-
matcherType: 'WHITELIST';
|
|
48
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
49
|
-
}
|
|
50
|
-
interface IEqualToMatcher extends ISplitMatcherBase {
|
|
51
|
-
matcherType: 'EQUAL_TO';
|
|
52
|
-
unaryNumericMatcherData: IUnaryNumericMatcherData;
|
|
53
|
-
}
|
|
54
|
-
interface IGreaterThanOrEqualToMatcher extends ISplitMatcherBase {
|
|
55
|
-
matcherType: 'GREATER_THAN_OR_EQUAL_TO';
|
|
56
|
-
unaryNumericMatcherData: IUnaryNumericMatcherData;
|
|
57
|
-
}
|
|
58
|
-
interface ILessThanOrEqualToMatcher extends ISplitMatcherBase {
|
|
59
|
-
matcherType: 'LESS_THAN_OR_EQUAL_TO';
|
|
60
|
-
unaryNumericMatcherData: IUnaryNumericMatcherData;
|
|
61
|
-
}
|
|
62
|
-
interface IBetweenMatcher extends ISplitMatcherBase {
|
|
63
|
-
matcherType: 'BETWEEN';
|
|
64
|
-
betweenMatcherData: IBetweenMatcherData;
|
|
65
|
-
}
|
|
66
|
-
interface IEqualToSetMatcher extends ISplitMatcherBase {
|
|
67
|
-
matcherType: 'EQUAL_TO_SET';
|
|
68
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
69
|
-
}
|
|
70
|
-
interface IContainsAnyOfSetMatcher extends ISplitMatcherBase {
|
|
71
|
-
matcherType: 'CONTAINS_ANY_OF_SET';
|
|
72
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
73
|
-
}
|
|
74
|
-
interface IContainsAllOfSetMatcher extends ISplitMatcherBase {
|
|
75
|
-
matcherType: 'CONTAINS_ALL_OF_SET';
|
|
76
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
77
|
-
}
|
|
78
|
-
interface IPartOfSetMatcher extends ISplitMatcherBase {
|
|
79
|
-
matcherType: 'PART_OF_SET';
|
|
80
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
81
|
-
}
|
|
82
|
-
interface IStartsWithMatcher extends ISplitMatcherBase {
|
|
83
|
-
matcherType: 'STARTS_WITH';
|
|
84
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
85
|
-
}
|
|
86
|
-
interface IEndsWithMatcher extends ISplitMatcherBase {
|
|
87
|
-
matcherType: 'ENDS_WITH';
|
|
88
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
89
|
-
}
|
|
90
|
-
interface IContainsStringMatcher extends ISplitMatcherBase {
|
|
91
|
-
matcherType: 'CONTAINS_STRING';
|
|
92
|
-
whitelistMatcherData: IWhitelistMatcherData;
|
|
93
|
-
}
|
|
94
|
-
interface IInSplitTreatmentMatcher extends ISplitMatcherBase {
|
|
95
|
-
matcherType: 'IN_SPLIT_TREATMENT';
|
|
96
|
-
dependencyMatcherData: IDependencyMatcherData;
|
|
97
|
-
}
|
|
98
|
-
interface IEqualToBooleanMatcher extends ISplitMatcherBase {
|
|
99
|
-
matcherType: 'EQUAL_TO_BOOLEAN';
|
|
100
|
-
booleanMatcherData: boolean;
|
|
101
|
-
}
|
|
102
|
-
interface IMatchesStringMatcher extends ISplitMatcherBase {
|
|
103
|
-
matcherType: 'MATCHES_STRING';
|
|
104
|
-
stringMatcherData: string;
|
|
105
|
-
}
|
|
106
|
-
export declare type ISplitMatcher = IAllKeysMatcher | IInSegmentMatcher | IWhitelistMatcher | IEqualToMatcher | IGreaterThanOrEqualToMatcher | ILessThanOrEqualToMatcher | IBetweenMatcher | IEqualToSetMatcher | IContainsAnyOfSetMatcher | IContainsAllOfSetMatcher | IPartOfSetMatcher | IStartsWithMatcher | IEndsWithMatcher | IContainsStringMatcher | IInSplitTreatmentMatcher | IEqualToBooleanMatcher | IMatchesStringMatcher;
|
|
107
|
-
/** Split object */
|
|
108
|
-
export interface ISplitPartition {
|
|
109
|
-
treatment: string;
|
|
110
|
-
size: number;
|
|
111
|
-
}
|
|
112
|
-
export interface ISplitCondition {
|
|
113
|
-
matcherGroup: {
|
|
114
|
-
combiner: 'AND';
|
|
115
|
-
matchers: ISplitMatcher[];
|
|
116
|
-
};
|
|
117
|
-
partitions: ISplitPartition[];
|
|
118
|
-
label: string;
|
|
119
|
-
conditionType: 'ROLLOUT' | 'WHITELIST';
|
|
120
|
-
}
|
|
121
|
-
export interface ISplit {
|
|
122
|
-
name: string;
|
|
123
|
-
changeNumber: number;
|
|
124
|
-
killed: boolean;
|
|
125
|
-
defaultTreatment: string;
|
|
126
|
-
trafficTypeName: string;
|
|
127
|
-
conditions: ISplitCondition[];
|
|
128
|
-
status: 'ACTIVE' | 'ARCHIVED';
|
|
129
|
-
seed: number;
|
|
130
|
-
trafficAllocation?: number;
|
|
131
|
-
trafficAllocationSeed?: number;
|
|
132
|
-
configurations?: {
|
|
133
|
-
[treatmentName: string]: string;
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
export declare type ISplitPartial = Pick<ISplit, 'conditions' | 'configurations' | 'trafficTypeName'>;
|
|
137
|
-
/** Interface of the parsed JSON response of `/splitChanges` */
|
|
138
|
-
export interface ISplitChangesResponse {
|
|
139
|
-
till: number;
|
|
140
|
-
splits: ISplit[];
|
|
141
|
-
}
|
|
142
|
-
/** Interface of the parsed JSON response of `/segmentChanges/{segmentName}` */
|
|
143
|
-
export interface ISegmentChangesResponse {
|
|
144
|
-
name: string;
|
|
145
|
-
added: string[];
|
|
146
|
-
removed: string[];
|
|
147
|
-
since: number;
|
|
148
|
-
till: number;
|
|
149
|
-
}
|
|
150
|
-
export interface IMySegmentsResponseItem {
|
|
151
|
-
id: string;
|
|
152
|
-
name: string;
|
|
153
|
-
}
|
|
154
|
-
/** Interface of the parsed JSON response of `/mySegments/{userKey}` */
|
|
155
|
-
export interface IMySegmentsResponse {
|
|
156
|
-
mySegments: IMySegmentsResponseItem[];
|
|
157
|
-
}
|
|
158
|
-
/** Metadata internal type for storages */
|
|
159
|
-
export interface IMetadata {
|
|
160
|
-
/** SDK version */
|
|
161
|
-
s: string;
|
|
162
|
-
/** host IP */
|
|
163
|
-
i: string;
|
|
164
|
-
/** host name */
|
|
165
|
-
n: string;
|
|
166
|
-
}
|
|
167
|
-
export declare type ISplitFiltersValidation = {
|
|
168
|
-
queryString: string | null;
|
|
169
|
-
groupedFilters: Record<SplitIO.SplitFilterType, string[]>;
|
|
170
|
-
validFilters: SplitIO.SplitFilter[];
|
|
171
|
-
};
|
|
172
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ISplit, MaybeThenable } from '../dtos/types';
|
|
2
|
-
import { SplitIO } from '../types';
|
|
3
|
-
import { IStorageAsync, IStorageSync } from '../storages/types';
|
|
4
|
-
import { IEvaluationResult, IEvaluator, ISplitEvaluator } from './types';
|
|
5
|
-
import { ILogger } from '../logger/types';
|
|
6
|
-
export declare class Engine {
|
|
7
|
-
private baseInfo;
|
|
8
|
-
private evaluator;
|
|
9
|
-
constructor(baseInfo: ISplit, evaluator: IEvaluator);
|
|
10
|
-
static parse(log: ILogger, splitFlatStructure: ISplit, storage: IStorageSync | IStorageAsync): Engine;
|
|
11
|
-
getKey(): string;
|
|
12
|
-
getTreatment(key: SplitIO.SplitKey, attributes: SplitIO.Attributes | undefined, splitEvaluator: ISplitEvaluator): MaybeThenable<IEvaluationResult>;
|
|
13
|
-
isGarbage(): boolean;
|
|
14
|
-
getChangeNumber(): number;
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../logger/types';
|
|
2
|
-
/**
|
|
3
|
-
* Get the treatment name given a key, a seed, and the percentage of each treatment.
|
|
4
|
-
*/
|
|
5
|
-
export declare function getTreatment(log: ILogger, key: string, seed: number, treatments: {
|
|
6
|
-
getTreatmentFor: (x: number) => string;
|
|
7
|
-
}): string;
|
|
8
|
-
/**
|
|
9
|
-
* Evaluates the traffic allocation to see if we should apply rollout conditions or not.
|
|
10
|
-
*/
|
|
11
|
-
export declare function shouldApplyRollout(trafficAllocation: number, key: string, trafficAllocationSeed: number): boolean;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { MaybeThenable } from '../../dtos/types';
|
|
2
|
-
import { IEvaluator } from '../types';
|
|
3
|
-
import { ILogger } from '../../logger/types';
|
|
4
|
-
export declare function conditionContext(log: ILogger, matcherEvaluator: (...args: any) => MaybeThenable<boolean>, treatments: {
|
|
5
|
-
getTreatmentFor: (x: number) => string;
|
|
6
|
-
}, label: string, conditionType: 'ROLLOUT' | 'WHITELIST'): IEvaluator;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MaybeThenable } from '../dtos/types';
|
|
2
|
-
import { IStorageAsync, IStorageSync } from '../storages/types';
|
|
3
|
-
import { IEvaluationResult } from './types';
|
|
4
|
-
import { SplitIO } from '../types';
|
|
5
|
-
import { ILogger } from '../logger/types';
|
|
6
|
-
export declare function evaluateFeature(log: ILogger, key: SplitIO.SplitKey, splitName: string, attributes: SplitIO.Attributes | undefined, storage: IStorageSync | IStorageAsync): MaybeThenable<IEvaluationResult>;
|
|
7
|
-
export declare function evaluateFeatures(log: ILogger, key: SplitIO.SplitKey, splitNames: string[], attributes: SplitIO.Attributes | undefined, storage: IStorageSync | IStorageAsync): MaybeThenable<Record<string, IEvaluationResult>>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IDependencyMatcherData, MaybeThenable } from '../../dtos/types';
|
|
2
|
-
import { IStorageAsync, IStorageSync } from '../../storages/types';
|
|
3
|
-
import { ILogger } from '../../logger/types';
|
|
4
|
-
import { IDependencyMatcherValue, ISplitEvaluator } from '../types';
|
|
5
|
-
export declare function dependencyMatcherContext(log: ILogger, { split, treatments }: IDependencyMatcherData, storage: IStorageSync | IStorageAsync): ({ key, attributes }: IDependencyMatcherValue, splitEvaluator: ISplitEvaluator) => MaybeThenable<boolean>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IStorageAsync, IStorageSync } from '../../storages/types';
|
|
2
|
-
import { IMatcher, IMatcherDto } from '../types';
|
|
3
|
-
import { ILogger } from '../../logger/types';
|
|
4
|
-
/**
|
|
5
|
-
* Matcher factory.
|
|
6
|
-
*/
|
|
7
|
-
export declare function matcherFactory(log: ILogger, matcherDto: IMatcherDto, storage?: IStorageSync | IStorageAsync): IMatcher | undefined;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const matcherTypes: Record<string, number>;
|
|
2
|
-
export declare const matcherDataTypes: {
|
|
3
|
-
BOOLEAN: string;
|
|
4
|
-
STRING: string;
|
|
5
|
-
NUMBER: string;
|
|
6
|
-
SET: string;
|
|
7
|
-
DATETIME: string;
|
|
8
|
-
NOT_SPECIFIED: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function matcherTypesMapper(matcherType: string): number;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { MaybeThenable } from '../../dtos/types';
|
|
2
|
-
import { ISegmentsCacheBase } from '../../storages/types';
|
|
3
|
-
import { ILogger } from '../../logger/types';
|
|
4
|
-
export declare function segmentMatcherContext(log: ILogger, segmentName: string, storage: {
|
|
5
|
-
segments: ISegmentsCacheBase;
|
|
6
|
-
}): (key: string) => MaybeThenable<boolean>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IEvaluator } from '../types';
|
|
2
|
-
import { ISplitCondition } from '../../dtos/types';
|
|
3
|
-
import { IStorageAsync, IStorageSync } from '../../storages/types';
|
|
4
|
-
import { ILogger } from '../../logger/types';
|
|
5
|
-
export declare function parser(log: ILogger, conditions: ISplitCondition[], storage: IStorageSync | IStorageAsync): IEvaluator;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ISplitPartition } from '../../dtos/types';
|
|
2
|
-
export declare class Treatments {
|
|
3
|
-
private _ranges;
|
|
4
|
-
private _treatments;
|
|
5
|
-
constructor(ranges: number[], treatments: string[]);
|
|
6
|
-
static parse(data: ISplitPartition[]): Treatments;
|
|
7
|
-
getTreatmentFor(x: number): string;
|
|
8
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IBetweenMatcherData, IDependencyMatcherData, MaybeThenable } from '../dtos/types';
|
|
2
|
-
import { IStorageAsync, IStorageSync } from '../storages/types';
|
|
3
|
-
import { ISet } from '../utils/lang/sets';
|
|
4
|
-
import { SplitIO } from '../types';
|
|
5
|
-
import { ILogger } from '../logger/types';
|
|
6
|
-
export interface IDependencyMatcherValue {
|
|
7
|
-
key: SplitIO.SplitKey;
|
|
8
|
-
attributes?: SplitIO.Attributes;
|
|
9
|
-
}
|
|
10
|
-
export interface IMatcherDto {
|
|
11
|
-
type: number;
|
|
12
|
-
value?: string | number | boolean | string[] | IDependencyMatcherData | ISet<string> | IBetweenMatcherData | null;
|
|
13
|
-
attribute: string | null;
|
|
14
|
-
negate: boolean;
|
|
15
|
-
dataType: string;
|
|
16
|
-
}
|
|
17
|
-
export interface IEvaluation {
|
|
18
|
-
treatment?: string;
|
|
19
|
-
label: string;
|
|
20
|
-
changeNumber?: number;
|
|
21
|
-
config?: string | null;
|
|
22
|
-
}
|
|
23
|
-
export declare type IEvaluationResult = IEvaluation & {
|
|
24
|
-
treatment: string;
|
|
25
|
-
};
|
|
26
|
-
export declare type ISplitEvaluator = (log: ILogger, key: SplitIO.SplitKey, splitName: string, attributes: SplitIO.Attributes | undefined, storage: IStorageSync | IStorageAsync) => MaybeThenable<IEvaluation>;
|
|
27
|
-
export declare type IEvaluator = (key: SplitIO.SplitKey, seed: number, trafficAllocation?: number, trafficAllocationSeed?: number, attributes?: SplitIO.Attributes, splitEvaluator?: ISplitEvaluator) => MaybeThenable<IEvaluation | undefined>;
|
|
28
|
-
export declare type IMatcher = (...args: any) => MaybeThenable<boolean>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SplitIO } from '../../types';
|
|
2
|
-
import { IMatcherDto } from '../types';
|
|
3
|
-
import { ILogger } from '../../logger/types';
|
|
4
|
-
/**
|
|
5
|
-
* Defines value to be matched (key / attribute).
|
|
6
|
-
*/
|
|
7
|
-
export declare function sanitizeValue(log: ILogger, key: string, matcherDto: IMatcherDto, attributes?: SplitIO.Attributes): string | number | boolean | (string | number)[] | import("../types").IDependencyMatcherValue | undefined;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SplitIO } from '../../types';
|
|
2
|
-
import { IDependencyMatcherValue } from '../types';
|
|
3
|
-
import { ILogger } from '../../logger/types';
|
|
4
|
-
/**
|
|
5
|
-
* Sanitize matcher value
|
|
6
|
-
*/
|
|
7
|
-
export declare function sanitize(log: ILogger, matcherTypeID: number, value: string | number | boolean | Array<string | number> | undefined, dataType: string, attributes?: SplitIO.Attributes): string | number | boolean | (string | number)[] | IDependencyMatcherValue | undefined;
|
package/types/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { InMemoryStorageFactory } from './storages/inMemory/InMemoryStorage';
|
|
2
|
-
export { InMemoryStorageCSFactory } from './storages/inMemory/InMemoryStorageCS';
|
|
3
|
-
export { InLocalStorage } from './storages/inLocalStorage';
|
|
4
|
-
export { PluggableStorage } from './storages/pluggable';
|
|
5
|
-
export { InRedisStorage } from './storages/inRedis';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IIntegrationManager, IIntegrationFactoryParams } from './types';
|
|
2
|
-
import { BrowserIntegration } from './ga/types';
|
|
3
|
-
/**
|
|
4
|
-
* IntegrationsManager factory for the browser variant of the isomorphic JS SDK.
|
|
5
|
-
* The integrations manager instantiates integration modules, and bypass tracked events and impressions to them.
|
|
6
|
-
*
|
|
7
|
-
* @param integrations valid integration settings object for browser sdk
|
|
8
|
-
* @param params information of the Sdk factory instance that integrations can access to
|
|
9
|
-
*
|
|
10
|
-
* @returns integration manager or undefined if `integrations` are not present in settings.
|
|
11
|
-
*/
|
|
12
|
-
export declare function integrationsManagerFactory(integrations: BrowserIntegration[], params: IIntegrationFactoryParams): IIntegrationManager | undefined;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/// <reference types="google.analytics" />
|
|
2
|
-
import { SplitIO } from '../../types';
|
|
3
|
-
import { Identity, GoogleAnalyticsToSplitOptions } from './types';
|
|
4
|
-
import { ILogger } from '../../logger/types';
|
|
5
|
-
import { IIntegrationFactoryParams } from '../types';
|
|
6
|
-
export declare const defaultMapper: (model: UniversalAnalytics.Model) => SplitIO.EventData;
|
|
7
|
-
export declare const defaultPrefix = "ga";
|
|
8
|
-
/**
|
|
9
|
-
* Return a new list of identities removing invalid and duplicated ones.
|
|
10
|
-
*
|
|
11
|
-
* @param {Array} identities list of identities
|
|
12
|
-
* @returns list of valid and unique identities. The list might be empty if `identities` is not an array or all its elements are invalid.
|
|
13
|
-
*/
|
|
14
|
-
export declare function validateIdentities(identities?: Identity[]): Identity[];
|
|
15
|
-
/**
|
|
16
|
-
* Checks if EventData fields (except EventTypeId) are valid, and logs corresponding warnings.
|
|
17
|
-
* EventTypeId is validated separately.
|
|
18
|
-
*
|
|
19
|
-
* @param {EventData} data event data instance to validate. Precondition: data != undefined
|
|
20
|
-
* @returns {boolean} Whether the data instance is a valid EventData or not.
|
|
21
|
-
*/
|
|
22
|
-
export declare function validateEventData(log: ILogger, eventData: any): eventData is SplitIO.EventData;
|
|
23
|
-
/**
|
|
24
|
-
* Fixes the passed string value to comply with EventTypeId format, by removing invalid characters and truncating if necessary.
|
|
25
|
-
*
|
|
26
|
-
* @param {object} log factory logger
|
|
27
|
-
* @param {string} eventTypeId string value to fix.
|
|
28
|
-
* @returns {string} Fixed version of `eventTypeId`.
|
|
29
|
-
*/
|
|
30
|
-
export declare function fixEventTypeId(log: ILogger, eventTypeId: any): any;
|
|
31
|
-
/**
|
|
32
|
-
* GaToSplit integration.
|
|
33
|
-
* This function provides the SplitTracker plugin to ga command queue.
|
|
34
|
-
*
|
|
35
|
-
* @param {object} sdkOptions options passed at the SDK integrations settings (isomorphic SDK) or the GoogleAnalyticsToSplit plugin (pluggable browser SDK)
|
|
36
|
-
* @param {object} storage SDK storage passed to track events
|
|
37
|
-
* @param {object} coreSettings core settings used to define an identity if no one provided as SDK or plugin options
|
|
38
|
-
* @param {object} log factory logger
|
|
39
|
-
*/
|
|
40
|
-
export declare function GaToSplit(sdkOptions: GoogleAnalyticsToSplitOptions, params: IIntegrationFactoryParams): void;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/// <reference types="google.analytics" />
|
|
2
|
-
import { SplitIO } from '../../types';
|
|
3
|
-
import { IIntegration } from '../types';
|
|
4
|
-
import { SplitToGoogleAnalyticsOptions } from './types';
|
|
5
|
-
import { ILogger } from '../../logger/types';
|
|
6
|
-
export declare class SplitToGa implements IIntegration {
|
|
7
|
-
static defaultTrackerNames: string[];
|
|
8
|
-
private trackerNames;
|
|
9
|
-
private filter?;
|
|
10
|
-
private mapper?;
|
|
11
|
-
private impressions;
|
|
12
|
-
private events;
|
|
13
|
-
private log;
|
|
14
|
-
static defaultMapper({ type, payload }: SplitIO.IntegrationData): UniversalAnalytics.FieldsObject;
|
|
15
|
-
static getGa(): UniversalAnalytics.ga | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Validates if a given object is a UniversalAnalytics.FieldsObject instance, and logs a warning if not.
|
|
18
|
-
* It checks that the object contains a `hitType`, since it is the minimal field required to send the hit
|
|
19
|
-
* and avoid the GA error `No hit type specified. Aborting hit.`.
|
|
20
|
-
* Other validations (e.g., an `event` hitType must have a `eventCategory` and `eventAction`) are handled
|
|
21
|
-
* and logged (as warnings or errors depending the case) by GA debugger, but the hit is sent anyway.
|
|
22
|
-
*
|
|
23
|
-
* @param {object} log factory logger
|
|
24
|
-
* @param {UniversalAnalytics.FieldsObject} fieldsObject object to validate.
|
|
25
|
-
* @returns {boolean} Whether the data instance is a valid FieldsObject or not.
|
|
26
|
-
*/
|
|
27
|
-
static validateFieldsObject(log: ILogger, fieldsObject: any): fieldsObject is UniversalAnalytics.FieldsObject;
|
|
28
|
-
/**
|
|
29
|
-
* constructor description
|
|
30
|
-
* @param {object} options options passed at the SDK integrations settings (isomorphic SDK) or the SplitToGoogleAnalytics plugin (pluggable browser SDK)
|
|
31
|
-
*/
|
|
32
|
-
constructor(log: ILogger, options: SplitToGoogleAnalyticsOptions);
|
|
33
|
-
queue(data: SplitIO.IntegrationData): void;
|
|
34
|
-
}
|