@splitsoftware/splitio-commons 1.2.0 → 1.2.1-rc.10
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/evaluator/Engine.js +6 -6
- package/cjs/evaluator/combiners/and.js +1 -1
- package/cjs/evaluator/combiners/ifelseif.js +2 -2
- package/cjs/evaluator/condition/engineUtils.js +2 -2
- package/cjs/evaluator/condition/index.js +4 -4
- package/cjs/evaluator/index.js +5 -5
- package/cjs/evaluator/matchers/cont_all.js +1 -1
- package/cjs/evaluator/matchers/cont_any.js +1 -1
- package/cjs/evaluator/matchers/cont_str.js +1 -1
- package/cjs/evaluator/matchers/dependency.js +1 -1
- package/cjs/evaluator/matchers/eq_set.js +1 -1
- package/cjs/evaluator/matchers/ew.js +3 -3
- package/cjs/evaluator/matchers/part_of.js +1 -1
- package/cjs/evaluator/matchers/segment.js +1 -1
- package/cjs/evaluator/matchers/sw.js +1 -1
- package/cjs/evaluator/matchers/whitelist.js +1 -1
- package/cjs/evaluator/matchersTransform/index.js +12 -12
- package/cjs/evaluator/parser/index.js +6 -6
- package/cjs/evaluator/treatments/index.js +1 -1
- package/cjs/evaluator/value/index.js +1 -1
- package/cjs/evaluator/value/sanitize.js +4 -4
- package/cjs/integrations/browser.js +3 -3
- package/cjs/integrations/ga/GaToSplit.js +14 -14
- package/cjs/integrations/ga/GoogleAnalyticsToSplit.js +5 -3
- package/cjs/integrations/ga/SplitToGa.js +1 -1
- package/cjs/integrations/ga/SplitToGoogleAnalytics.js +4 -2
- package/cjs/listeners/browser.js +15 -11
- package/cjs/listeners/node.js +1 -1
- package/cjs/logger/constants.js +8 -3
- package/cjs/logger/index.js +2 -2
- package/cjs/logger/messages/debug.js +4 -4
- package/cjs/logger/messages/error.js +5 -4
- package/cjs/logger/messages/info.js +10 -8
- package/cjs/logger/messages/warn.js +1 -1
- package/cjs/logger/sdkLogger.js +1 -1
- package/cjs/readiness/readinessManager.js +2 -2
- package/cjs/readiness/sdkReadinessManager.js +4 -4
- package/cjs/sdkClient/client.js +13 -11
- package/cjs/sdkClient/clientAttributesDecoration.js +4 -4
- package/cjs/sdkClient/clientCS.js +4 -3
- package/cjs/sdkClient/clientInputValidation.js +20 -22
- package/cjs/sdkClient/sdkClient.js +3 -6
- package/cjs/sdkClient/sdkClientMethod.js +1 -1
- package/cjs/sdkClient/sdkClientMethodCS.js +6 -10
- package/cjs/sdkClient/sdkClientMethodCSWithTT.js +7 -15
- package/cjs/sdkFactory/index.js +14 -12
- package/cjs/sdkFactory/userConsentProps.js +37 -0
- package/cjs/sdkManager/index.js +11 -11
- package/cjs/services/splitApi.js +3 -2
- package/cjs/services/splitHttpClient.js +3 -3
- package/cjs/storages/KeyBuilder.js +2 -6
- package/cjs/storages/KeyBuilderCS.js +13 -3
- package/cjs/storages/KeyBuilderSS.js +1 -1
- package/cjs/storages/findLatencyIndex.js +1 -1
- package/cjs/storages/inLocalStorage/MySegmentsCacheInLocal.js +24 -4
- package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +12 -12
- package/cjs/storages/inLocalStorage/index.js +4 -4
- package/cjs/storages/inMemory/AttributesCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/ImpressionCountsCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +15 -1
- package/cjs/storages/inMemory/InMemoryStorage.js +1 -1
- package/cjs/storages/inMemory/InMemoryStorageCS.js +1 -1
- package/cjs/storages/inMemory/LatenciesCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/MySegmentsCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/SegmentsCacheInMemory.js +2 -2
- package/cjs/storages/inMemory/SplitsCacheInMemory.js +5 -5
- package/cjs/storages/inRedis/LatenciesCacheInRedis.js +1 -1
- package/cjs/storages/inRedis/RedisAdapter.js +24 -11
- package/cjs/storages/inRedis/SegmentsCacheInRedis.js +1 -1
- package/cjs/storages/inRedis/SplitsCacheInRedis.js +3 -3
- package/cjs/storages/inRedis/index.js +1 -1
- package/cjs/storages/pluggable/SegmentsCachePluggable.js +1 -1
- package/cjs/storages/pluggable/SplitsCachePluggable.js +3 -3
- package/cjs/storages/pluggable/inMemoryWrapper.js +4 -4
- package/cjs/storages/pluggable/index.js +6 -6
- package/cjs/sync/offline/LocalhostFromFile.js +1 -1
- package/cjs/sync/offline/LocalhostFromObject.js +1 -1
- package/cjs/sync/offline/splitsParser/parseCondition.js +1 -1
- package/cjs/sync/offline/splitsParser/splitsParserFromFile.js +13 -13
- package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +3 -3
- package/cjs/sync/offline/syncManagerOffline.js +1 -1
- package/cjs/sync/offline/syncTasks/fromObjectSyncTask.js +2 -2
- package/cjs/sync/polling/fetchers/mySegmentsFetcher.js +2 -2
- package/cjs/sync/polling/fetchers/segmentChangesFetcher.js +1 -1
- package/cjs/sync/polling/pollingManagerCS.js +8 -7
- package/cjs/sync/polling/pollingManagerSS.js +5 -4
- package/cjs/sync/polling/syncTasks/mySegmentsSyncTask.js +1 -1
- package/cjs/sync/polling/syncTasks/segmentsSyncTask.js +1 -1
- package/cjs/sync/polling/syncTasks/splitsSyncTask.js +1 -1
- package/cjs/sync/polling/updaters/mySegmentsUpdater.js +3 -3
- package/cjs/sync/polling/updaters/segmentChangesUpdater.js +2 -2
- package/cjs/sync/polling/updaters/splitChangesUpdater.js +2 -2
- package/cjs/sync/streaming/AuthClient/index.js +4 -5
- package/cjs/sync/streaming/SSEClient/index.js +2 -1
- package/cjs/sync/streaming/SSEHandler/NotificationParser.js +1 -1
- package/cjs/sync/streaming/SSEHandler/index.js +3 -3
- package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +1 -1
- package/cjs/sync/streaming/mySegmentsV2utils.js +1 -1
- package/cjs/sync/streaming/pushManager.js +46 -35
- package/cjs/sync/submitters/eventsSyncTask.js +17 -5
- package/cjs/sync/submitters/impressionCountsSyncTask.js +1 -1
- package/cjs/sync/submitters/impressionsSyncTask.js +15 -3
- package/cjs/sync/submitters/metricsSyncTask.js +3 -3
- package/cjs/sync/submitters/submitterManager.js +6 -5
- package/cjs/sync/submitters/submitterSyncTask.js +1 -1
- package/cjs/sync/syncManagerOnline.js +21 -17
- package/cjs/trackers/eventTracker.js +11 -4
- package/cjs/trackers/impressionObserver/impressionObserverCS.js +1 -1
- package/cjs/trackers/impressionObserver/impressionObserverSS.js +1 -1
- package/cjs/trackers/impressionObserver/utils.js +8 -1
- package/cjs/trackers/impressionsTracker.js +9 -8
- package/cjs/utils/MinEvents.js +2 -1
- package/cjs/utils/consent.js +10 -0
- package/cjs/utils/constants/index.js +5 -1
- package/cjs/utils/inputValidation/apiKey.js +1 -1
- package/cjs/utils/inputValidation/attribute.js +4 -4
- package/cjs/utils/inputValidation/attributes.js +2 -2
- package/cjs/utils/inputValidation/event.js +1 -1
- package/cjs/utils/inputValidation/eventProperties.js +7 -5
- package/cjs/utils/inputValidation/eventValue.js +1 -1
- package/cjs/utils/inputValidation/key.js +6 -5
- package/cjs/utils/inputValidation/preloadedData.js +8 -8
- package/cjs/utils/inputValidation/split.js +1 -1
- package/cjs/utils/inputValidation/splits.js +2 -2
- package/cjs/utils/inputValidation/trafficType.js +1 -1
- package/cjs/utils/inputValidation/trafficTypeExistance.js +1 -1
- package/cjs/utils/jwt/index.js +1 -1
- package/cjs/utils/key/index.js +3 -3
- package/cjs/utils/lang/index.js +13 -16
- package/cjs/utils/lang/maps.js +16 -2
- package/cjs/utils/murmur3/common.js +1 -1
- package/cjs/utils/murmur3/legacy.js +44 -0
- package/cjs/utils/murmur3/murmur3.js +10 -10
- package/cjs/utils/murmur3/murmur3_128.js +1 -1
- package/cjs/utils/murmur3/murmur3_128_x86.js +37 -37
- package/cjs/utils/murmur3/murmur3_64.js +1 -1
- package/cjs/utils/promise/timeout.js +1 -1
- package/cjs/utils/settingsValidation/consent.js +16 -0
- package/cjs/utils/settingsValidation/impressionsMode.js +6 -6
- package/cjs/utils/settingsValidation/index.js +32 -14
- package/cjs/utils/settingsValidation/integrations/configurable.js +1 -1
- package/cjs/utils/settingsValidation/integrations/pluggable.js +1 -1
- package/cjs/utils/settingsValidation/localhost/builtin.js +2 -2
- package/cjs/utils/settingsValidation/logger/builtinLogger.js +3 -3
- package/cjs/utils/settingsValidation/logger/commons.js +1 -1
- package/cjs/utils/settingsValidation/logger/pluggableLogger.js +1 -1
- package/cjs/utils/settingsValidation/runtime.js +11 -0
- package/cjs/utils/settingsValidation/splitFilters.js +1 -1
- package/cjs/utils/settingsValidation/storage/storageCS.js +1 -1
- package/cjs/utils/timeTracker/index.js +3 -3
- package/esm/evaluator/matchers/ew.js +4 -4
- package/esm/integrations/ga/GoogleAnalyticsToSplit.js +4 -2
- package/esm/integrations/ga/SplitToGoogleAnalytics.js +4 -2
- package/esm/listeners/browser.js +14 -10
- package/esm/logger/constants.js +5 -2
- package/esm/logger/messages/debug.js +3 -3
- package/esm/logger/messages/error.js +4 -3
- package/esm/logger/messages/info.js +9 -7
- package/esm/sdkClient/client.js +4 -2
- package/esm/sdkClient/clientCS.js +2 -1
- package/esm/sdkClient/clientInputValidation.js +6 -8
- package/esm/sdkClient/sdkClient.js +1 -4
- package/esm/sdkClient/sdkClientMethodCS.js +1 -5
- package/esm/sdkClient/sdkClientMethodCSWithTT.js +1 -9
- package/esm/sdkFactory/index.js +8 -6
- package/esm/sdkFactory/userConsentProps.js +33 -0
- package/esm/services/splitApi.js +2 -1
- package/esm/services/splitHttpClient.js +1 -1
- package/esm/storages/KeyBuilder.js +2 -6
- package/esm/storages/KeyBuilderCS.js +11 -1
- package/esm/storages/inLocalStorage/MySegmentsCacheInLocal.js +23 -3
- package/esm/storages/inLocalStorage/index.js +1 -1
- package/esm/storages/inMemory/ImpressionsCacheInMemory.js +15 -1
- package/esm/storages/inMemory/InMemoryStorage.js +1 -1
- package/esm/storages/inMemory/InMemoryStorageCS.js +1 -1
- package/esm/storages/inRedis/RedisAdapter.js +15 -2
- package/esm/storages/pluggable/index.js +2 -2
- package/esm/sync/offline/splitsParser/splitsParserFromFile.js +1 -1
- package/esm/sync/polling/fetchers/mySegmentsFetcher.js +2 -2
- package/esm/sync/polling/fetchers/segmentChangesFetcher.js +2 -2
- package/esm/sync/polling/pollingManagerCS.js +2 -1
- package/esm/sync/polling/pollingManagerSS.js +2 -1
- package/esm/sync/polling/syncTasks/mySegmentsSyncTask.js +1 -1
- package/esm/sync/polling/updaters/mySegmentsUpdater.js +2 -2
- package/esm/sync/streaming/AuthClient/index.js +1 -2
- package/esm/sync/streaming/SSEClient/index.js +2 -1
- package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +1 -1
- package/esm/sync/streaming/pushManager.js +34 -23
- package/esm/sync/submitters/eventsSyncTask.js +18 -6
- package/esm/sync/submitters/impressionsSyncTask.js +13 -1
- package/esm/sync/submitters/submitterManager.js +2 -1
- package/esm/sync/syncManagerOnline.js +21 -17
- package/esm/trackers/eventTracker.js +8 -1
- package/esm/trackers/impressionObserver/utils.js +7 -1
- package/esm/trackers/impressionsTracker.js +6 -5
- package/esm/utils/consent.js +6 -0
- package/esm/utils/constants/index.js +4 -0
- package/esm/utils/inputValidation/attributes.js +1 -1
- package/esm/utils/inputValidation/eventProperties.js +4 -2
- package/esm/utils/inputValidation/key.js +2 -1
- package/esm/utils/lang/index.js +12 -15
- package/esm/utils/lang/maps.js +14 -1
- package/esm/utils/murmur3/legacy.js +39 -0
- package/esm/utils/promise/timeout.js +1 -1
- package/esm/utils/settingsValidation/consent.js +12 -0
- package/esm/utils/settingsValidation/impressionsMode.js +7 -7
- package/esm/utils/settingsValidation/index.js +28 -10
- package/esm/utils/settingsValidation/runtime.js +7 -0
- package/package.json +7 -7
- package/src/evaluator/matchers/ew.ts +4 -4
- package/src/evaluator/parser/index.ts +1 -1
- package/src/evaluator/types.ts +2 -2
- package/src/evaluator/value/index.ts +2 -2
- package/src/evaluator/value/sanitize.ts +2 -2
- package/src/integrations/ga/GoogleAnalyticsToSplit.ts +7 -4
- package/src/integrations/ga/SplitToGoogleAnalytics.ts +7 -4
- package/src/integrations/pluggable.ts +2 -2
- package/src/integrations/types.ts +5 -0
- package/src/listeners/browser.ts +13 -9
- package/src/logger/.DS_Store +0 -0
- package/src/logger/constants.ts +5 -2
- package/src/logger/messages/debug.ts +3 -3
- package/src/logger/messages/error.ts +4 -3
- package/src/logger/messages/info.ts +9 -7
- package/src/logger/types.ts +4 -0
- package/src/sdkClient/client.ts +4 -2
- package/src/sdkClient/clientCS.ts +3 -1
- package/src/sdkClient/clientInputValidation.ts +8 -7
- package/src/sdkClient/sdkClient.ts +2 -5
- package/src/sdkClient/sdkClientMethodCS.ts +1 -6
- package/src/sdkClient/sdkClientMethodCSWithTT.ts +2 -11
- package/src/sdkFactory/index.ts +9 -7
- package/src/sdkFactory/types.ts +2 -1
- package/src/sdkFactory/userConsentProps.ts +40 -0
- package/src/services/splitHttpClient.ts +1 -1
- package/src/storages/KeyBuilder.ts +2 -6
- package/src/storages/KeyBuilderCS.ts +13 -1
- package/src/storages/inLocalStorage/MySegmentsCacheInLocal.ts +23 -3
- package/src/storages/inLocalStorage/index.ts +1 -1
- package/src/storages/inMemory/ImpressionsCacheInMemory.ts +22 -1
- package/src/storages/inMemory/InMemoryStorage.ts +1 -1
- package/src/storages/inMemory/InMemoryStorageCS.ts +1 -1
- package/src/storages/inRedis/RedisAdapter.ts +8 -2
- package/src/storages/pluggable/index.ts +2 -2
- package/src/storages/types.ts +6 -2
- package/src/sync/offline/splitsParser/splitsParserFromFile.ts +1 -1
- package/src/sync/polling/fetchers/mySegmentsFetcher.ts +2 -1
- package/src/sync/polling/fetchers/types.ts +1 -0
- package/src/sync/polling/pollingManagerCS.ts +3 -6
- package/src/sync/polling/pollingManagerSS.ts +3 -8
- package/src/sync/polling/syncTasks/mySegmentsSyncTask.ts +2 -1
- package/src/sync/polling/types.ts +0 -12
- package/src/sync/polling/updaters/mySegmentsUpdater.ts +2 -1
- package/src/sync/streaming/AuthClient/index.ts +1 -2
- package/src/sync/streaming/SSEClient/index.ts +2 -1
- package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +1 -1
- package/src/sync/streaming/pushManager.ts +39 -37
- package/src/sync/streaming/types.ts +5 -25
- package/src/sync/submitters/eventsSyncTask.ts +19 -6
- package/src/sync/submitters/impressionsSyncTask.ts +16 -1
- package/src/sync/submitters/submitterManager.ts +4 -8
- package/src/sync/syncManagerOnline.ts +27 -27
- package/src/sync/types.ts +4 -1
- package/src/trackers/eventTracker.ts +11 -3
- package/src/trackers/impressionObserver/utils.ts +8 -1
- package/src/trackers/impressionsTracker.ts +7 -8
- package/src/types.ts +26 -1
- package/src/utils/consent.ts +8 -0
- package/src/utils/constants/index.ts +5 -0
- package/src/utils/inputValidation/attributes.ts +1 -2
- package/src/utils/inputValidation/eventProperties.ts +4 -2
- package/src/utils/lang/index.ts +15 -18
- package/src/utils/lang/maps.ts +15 -1
- package/src/utils/murmur3/legacy.ts +48 -0
- package/src/utils/promise/timeout.ts +1 -1
- package/src/utils/settingsValidation/consent.ts +16 -0
- package/src/utils/settingsValidation/impressionsMode.ts +8 -8
- package/src/utils/settingsValidation/index.ts +29 -10
- package/src/utils/settingsValidation/runtime.ts +9 -0
- package/src/utils/settingsValidation/types.ts +12 -6
- package/types/evaluator/types.d.ts +2 -2
- package/types/evaluator/value/index.d.ts +1 -1
- package/types/evaluator/value/sanitize.d.ts +1 -1
- package/types/integrations/ga/GaToSplitPlugin.d.ts +3 -0
- package/types/integrations/ga/GoogleAnalyticsToSplit.d.ts +2 -2
- package/types/integrations/ga/SplitToGaPlugin.d.ts +4 -0
- package/types/integrations/ga/SplitToGoogleAnalytics.d.ts +2 -3
- package/types/integrations/types.d.ts +4 -0
- package/types/logger/browser/{DebugLogger.d.ts → debugLogger.d.ts} +0 -0
- package/types/logger/browser/{ErrorLogger.d.ts → errorLogger.d.ts} +0 -0
- package/types/logger/browser/{InfoLogger.d.ts → infoLogger.d.ts} +0 -0
- package/types/logger/browser/{WarnLogger.d.ts → warnLogger.d.ts} +0 -0
- package/types/logger/codes.d.ts +2 -0
- package/types/logger/codesConstants.d.ts +117 -0
- package/types/logger/codesConstantsBrowser.d.ts +2 -0
- package/types/logger/codesConstantsNode.d.ts +14 -0
- package/types/logger/codesDebug.d.ts +1 -0
- package/types/logger/codesDebugBrowser.d.ts +1 -0
- package/types/logger/codesDebugNode.d.ts +1 -0
- package/types/logger/codesError.d.ts +1 -0
- package/types/logger/codesErrorNode.d.ts +1 -0
- package/types/logger/codesInfo.d.ts +1 -0
- package/types/logger/codesWarn.d.ts +1 -0
- package/types/logger/codesWarnNode.d.ts +1 -0
- package/types/logger/constants.d.ts +5 -2
- package/types/logger/debugLogger.d.ts +2 -0
- package/types/logger/errorLogger.d.ts +2 -0
- package/types/logger/infoLogger.d.ts +2 -0
- package/types/logger/messages/debugBrowser.d.ts +1 -0
- package/types/logger/messages/debugNode.d.ts +1 -0
- package/types/logger/messages/errorNode.d.ts +1 -0
- package/types/logger/messages/warnNode.d.ts +1 -0
- package/types/logger/noopLogger.d.ts +2 -0
- package/types/logger/types.d.ts +4 -0
- package/types/logger/warnLogger.d.ts +2 -0
- package/types/sdkClient/clientAttributesDecoration.d.ts +1 -1
- package/types/sdkClient/clientInputValidation.d.ts +2 -3
- package/types/sdkFactory/types.d.ts +1 -1
- package/types/sdkFactory/userConsentProps.d.ts +6 -0
- package/types/sdkManager/sdkManagerMethod.d.ts +6 -0
- package/types/storages/KeyBuilderCS.d.ts +2 -0
- package/types/storages/getRegisteredSegments.d.ts +10 -0
- package/types/storages/inMemory/ImpressionsCacheInMemory.d.ts +9 -0
- package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +51 -0
- package/types/storages/inMemory/index.d.ts +10 -0
- package/types/storages/inRedis/RedisAdapter.d.ts +1 -1
- package/types/storages/inRedis/TelemetryCacheInRedis.d.ts +0 -0
- package/types/storages/parseSegments.d.ts +6 -0
- package/types/storages/pluggable/TelemetryCachePluggable.d.ts +2 -0
- package/types/storages/types.d.ts +3 -1
- package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +1 -1
- package/types/sync/polling/fetchers/types.d.ts +1 -1
- package/types/sync/polling/pollingManagerCS.d.ts +2 -5
- package/types/sync/polling/pollingManagerSS.d.ts +2 -5
- package/types/sync/polling/syncTasks/splitsSyncTask.copy.d.ts +35 -0
- package/types/sync/polling/syncTasks/splitsSyncTask.morelikeoriginal.d.ts +35 -0
- package/types/sync/polling/types.d.ts +0 -11
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +1 -1
- package/types/sync/streaming/AuthClient/indexV1.d.ts +12 -0
- package/types/sync/streaming/AuthClient/indexV2.d.ts +8 -0
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +1 -1
- package/types/sync/streaming/pushManager.d.ts +3 -7
- package/types/sync/streaming/pushManagerCS.d.ts +1 -0
- package/types/sync/streaming/pushManagerNoUsers.d.ts +13 -0
- package/types/sync/streaming/pushManagerSS.d.ts +1 -0
- package/types/sync/streaming/types.d.ts +3 -23
- package/types/sync/submitters/submitterManager.d.ts +2 -4
- package/types/sync/submitters/telemetrySyncTask.d.ts +17 -0
- package/types/sync/syncManagerFromFile.d.ts +2 -0
- package/types/sync/syncManagerFromObject.d.ts +2 -0
- package/types/sync/syncManagerOffline.d.ts +9 -0
- package/types/sync/syncManagerOnline.d.ts +3 -3
- package/types/sync/types.d.ts +3 -0
- package/types/trackers/eventTracker.d.ts +2 -2
- package/types/trackers/impressionObserver/utils.d.ts +4 -0
- package/types/trackers/impressionsTracker.d.ts +2 -3
- package/types/trackers/telemetryRecorder.d.ts +0 -0
- package/types/types.d.ts +22 -0
- package/types/utils/EventEmitter.d.ts +4 -0
- package/types/utils/consent.d.ts +2 -0
- package/types/utils/constants/index.d.ts +3 -0
- package/types/utils/lang/errors.d.ts +10 -0
- package/types/utils/lang/index.d.ts +6 -5
- package/types/utils/lang/maps.d.ts +7 -0
- package/types/utils/murmur3/commons.d.ts +12 -0
- package/types/utils/murmur3/legacy.d.ts +2 -0
- package/types/utils/settingsValidation/buildMetadata.d.ts +3 -0
- package/types/utils/settingsValidation/consent.d.ts +6 -0
- package/types/utils/settingsValidation/impressionsMode.d.ts +1 -1
- package/types/utils/settingsValidation/localhost/index.d.ts +9 -0
- package/types/utils/settingsValidation/logger.d.ts +11 -0
- package/types/utils/settingsValidation/runtime/browser.d.ts +2 -0
- package/types/utils/settingsValidation/runtime/node.d.ts +2 -0
- package/types/utils/settingsValidation/runtime.d.ts +2 -0
- package/types/utils/settingsValidation/types.d.ts +12 -6
- package/types/utils/settingsValidation/userConsent.d.ts +5 -0
|
@@ -32,3 +32,8 @@ export const STORAGE_MEMORY: StorageType = 'MEMORY';
|
|
|
32
32
|
export const STORAGE_LOCALSTORAGE: StorageType = 'LOCALSTORAGE';
|
|
33
33
|
export const STORAGE_REDIS: StorageType = 'REDIS';
|
|
34
34
|
export const STORAGE_PLUGGABLE: StorageType = 'PLUGGABLE';
|
|
35
|
+
|
|
36
|
+
// User consent
|
|
37
|
+
export const CONSENT_GRANTED = 'GRANTED'; // The user has granted consent for tracking events and impressions
|
|
38
|
+
export const CONSENT_DECLINED = 'DECLINED'; // The user has declined consent for tracking events and impressions
|
|
39
|
+
export const CONSENT_UNKNOWN = 'UNKNOWN'; // The user has neither granted nor declined consent for tracking events and impressions
|
|
@@ -6,7 +6,7 @@ import { ERROR_NOT_PLAIN_OBJECT } from '../../logger/constants';
|
|
|
6
6
|
|
|
7
7
|
export function validateAttributes(log: ILogger, maybeAttrs: any, method: string): SplitIO.Attributes | undefined | false {
|
|
8
8
|
// Attributes are optional
|
|
9
|
-
if (
|
|
9
|
+
if (maybeAttrs == undefined || isObject(maybeAttrs)) // eslint-disable-line eqeqeq
|
|
10
10
|
return maybeAttrs;
|
|
11
11
|
|
|
12
12
|
log.error(ERROR_NOT_PLAIN_OBJECT, [method, 'attributes']);
|
|
@@ -23,5 +23,4 @@ export function validateAttributesDeep(log: ILogger, maybeAttributes: Record<str
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
return result;
|
|
26
|
-
|
|
27
26
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { isObject,
|
|
1
|
+
import { isObject, isString, isFiniteNumber, isBoolean } from '../lang';
|
|
2
|
+
import { objectAssign } from '../lang/objectAssign';
|
|
2
3
|
import { SplitIO } from '../../types';
|
|
3
4
|
import { ILogger } from '../../logger/types';
|
|
4
5
|
import { ERROR_NOT_PLAIN_OBJECT, ERROR_SIZE_EXCEEDED, WARN_SETTING_NULL, WARN_TRIMMING_PROPERTIES } from '../../logger/constants';
|
|
@@ -22,7 +23,8 @@ export function validateEventProperties(log: ILogger, maybeProperties: any, meth
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
const keys = Object.keys(maybeProperties);
|
|
25
|
-
|
|
26
|
+
// Shallow clone
|
|
27
|
+
const clone = objectAssign({}, maybeProperties);
|
|
26
28
|
// To avoid calculating the size twice we'll return it from here.
|
|
27
29
|
const output = {
|
|
28
30
|
properties: clone,
|
package/src/utils/lang/index.ts
CHANGED
|
@@ -89,7 +89,7 @@ export function get(obj: any, prop: any, val: any): any {
|
|
|
89
89
|
/**
|
|
90
90
|
* Parses an array into a map of different arrays, grouping by the specified prop value.
|
|
91
91
|
*/
|
|
92
|
-
export function groupBy<T extends Record<string, any
|
|
92
|
+
export function groupBy<T extends Record<string, any>>(source: T[], prop: string): Record<string, T[]> {
|
|
93
93
|
const map: Record<string, any[]> = {};
|
|
94
94
|
|
|
95
95
|
if (Array.isArray(source) && isString(prop)) {
|
|
@@ -151,10 +151,14 @@ export function isNaNNumber(val: any): boolean {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
* Validates if a value is an object
|
|
154
|
+
* Validates if a value is an object created by the Object constructor (plain object).
|
|
155
|
+
* It checks `constructor.name` to avoid false negatives when validating values on a separate VM context, which has its own global built-ins.
|
|
155
156
|
*/
|
|
156
|
-
export function isObject(obj: any)
|
|
157
|
-
return obj !== null && typeof obj === 'object' &&
|
|
157
|
+
export function isObject(obj: any) {
|
|
158
|
+
return obj !== null && typeof obj === 'object' && (
|
|
159
|
+
obj.constructor === Object ||
|
|
160
|
+
(obj.constructor != null && obj.constructor.name === 'Object')
|
|
161
|
+
);
|
|
158
162
|
}
|
|
159
163
|
|
|
160
164
|
/**
|
|
@@ -164,6 +168,13 @@ export function isString(val: any): val is string {
|
|
|
164
168
|
return typeof val === 'string' || val instanceof String;
|
|
165
169
|
}
|
|
166
170
|
|
|
171
|
+
/**
|
|
172
|
+
* String sanitizer. Returns the provided value converted to uppercase if it is a string.
|
|
173
|
+
*/
|
|
174
|
+
export function stringToUpperCase(val: any) {
|
|
175
|
+
return isString(val) ? val.toUpperCase() : val;
|
|
176
|
+
}
|
|
177
|
+
|
|
167
178
|
/**
|
|
168
179
|
* Deep copy version of Object.assign using recursion.
|
|
169
180
|
* There are some assumptions here. It's for internal use and we don't need verbose errors
|
|
@@ -194,20 +205,6 @@ export function merge(target: { [key: string]: any }, source: { [key: string]: a
|
|
|
194
205
|
return res;
|
|
195
206
|
}
|
|
196
207
|
|
|
197
|
-
/**
|
|
198
|
-
* Shallow clone an object
|
|
199
|
-
*/
|
|
200
|
-
export function shallowClone(obj: any): any {
|
|
201
|
-
const keys = Object.keys(obj);
|
|
202
|
-
const output: Record<string, any> = {};
|
|
203
|
-
|
|
204
|
-
for (let i = 0; i < keys.length; i++) {
|
|
205
|
-
output[keys[i]] = obj[keys[i]];
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return output;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
208
|
/**
|
|
212
209
|
* Checks if the target string starts with the sub string.
|
|
213
210
|
*/
|
package/src/utils/lang/maps.ts
CHANGED
|
@@ -79,4 +79,18 @@ interface IMapConstructor {
|
|
|
79
79
|
readonly prototype: IMap<any, any>;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
/**
|
|
83
|
+
* return the Map constructor to use. If native Map is not available or it doesn't support the required features (e.g., IE11),
|
|
84
|
+
* a ponyfill with minimal features is returned instead.
|
|
85
|
+
*
|
|
86
|
+
* Exported for testing purposes only.
|
|
87
|
+
*/
|
|
88
|
+
export function __getMapConstructor(): IMapConstructor {
|
|
89
|
+
// eslint-disable-next-line compat/compat
|
|
90
|
+
if (typeof Array.from === 'function' && typeof Map === 'function' && Map.prototype && Map.prototype.values) {
|
|
91
|
+
return Map;
|
|
92
|
+
}
|
|
93
|
+
return MapPoly;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const _Map = __getMapConstructor();
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Deprecated hashing function, used for split bucketing. Replaced by murmur3
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
// JAVA reference implementation for the hashing function.
|
|
5
|
+
//
|
|
6
|
+
// int h = 0;
|
|
7
|
+
// for (int i = 0; i < key.length(); i++) {
|
|
8
|
+
// h = 31 * h + key.charAt(i);
|
|
9
|
+
// }
|
|
10
|
+
// return h ^ seed; // XOR the hash and seed
|
|
11
|
+
//
|
|
12
|
+
|
|
13
|
+
function ToInteger(x: number) {
|
|
14
|
+
x = Number(x);
|
|
15
|
+
return x < 0 ? Math.ceil(x) : Math.floor(x);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function modulo(a: number, b: number) {
|
|
19
|
+
return a - Math.floor(a / b) * b;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function ToUint32(x: number) {
|
|
23
|
+
return modulo(ToInteger(x), Math.pow(2, 32));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function ToInt32(x: number) {
|
|
27
|
+
let uint32 = ToUint32(x);
|
|
28
|
+
|
|
29
|
+
if (uint32 >= Math.pow(2, 31)) {
|
|
30
|
+
return uint32 - Math.pow(2, 32);
|
|
31
|
+
} else {
|
|
32
|
+
return uint32;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function hash(str: string, seed: number): number {
|
|
37
|
+
let h = 0;
|
|
38
|
+
|
|
39
|
+
for (let i = 0; i < str.length; i++) {
|
|
40
|
+
h = ToInt32(ToInt32(31 * h) + str.charCodeAt(i));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return ToInt32(h ^ seed);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function bucket(str: string, seed: number): number {
|
|
47
|
+
return Math.abs(hash(str, seed) % 100) + 1;
|
|
48
|
+
}
|
|
@@ -3,7 +3,7 @@ export function timeout<T>(ms: number, promise: Promise<T>): Promise<T> {
|
|
|
3
3
|
|
|
4
4
|
return new Promise((resolve, reject) => {
|
|
5
5
|
const tid = setTimeout(() => {
|
|
6
|
-
reject(new Error(`Operation timed out because it exceeded the configured time limit of ${ms}ms.`));
|
|
6
|
+
reject(new Error(`Operation timed out because it exceeded the configured time limit of ${ms} ms.`));
|
|
7
7
|
}, ms);
|
|
8
8
|
|
|
9
9
|
promise.then((res) => {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ERROR_INVALID_CONFIG_PARAM } from '../../logger/constants';
|
|
2
|
+
import { ILogger } from '../../logger/types';
|
|
3
|
+
import { ConsentStatus } from '../../types';
|
|
4
|
+
import { CONSENT_DECLINED, CONSENT_GRANTED, CONSENT_UNKNOWN } from '../constants';
|
|
5
|
+
import { stringToUpperCase } from '../lang';
|
|
6
|
+
|
|
7
|
+
const userConsentValues = [CONSENT_DECLINED, CONSENT_GRANTED, CONSENT_UNKNOWN];
|
|
8
|
+
|
|
9
|
+
export function validateConsent({ userConsent, log }: { userConsent?: any, log: ILogger }): ConsentStatus {
|
|
10
|
+
userConsent = stringToUpperCase(userConsent);
|
|
11
|
+
|
|
12
|
+
if (userConsentValues.indexOf(userConsent) > -1) return userConsent;
|
|
13
|
+
|
|
14
|
+
log.error(ERROR_INVALID_CONFIG_PARAM, ['userConsent', userConsentValues, CONSENT_GRANTED]);
|
|
15
|
+
return CONSENT_GRANTED;
|
|
16
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ERROR_INVALID_CONFIG_PARAM } from '../../logger/constants';
|
|
2
2
|
import { ILogger } from '../../logger/types';
|
|
3
3
|
import { SplitIO } from '../../types';
|
|
4
4
|
import { DEBUG, OPTIMIZED } from '../constants';
|
|
5
|
+
import { stringToUpperCase } from '../lang';
|
|
5
6
|
|
|
6
|
-
export function validImpressionsMode(log: ILogger, impressionsMode:
|
|
7
|
-
impressionsMode = impressionsMode
|
|
8
|
-
if ([DEBUG, OPTIMIZED].indexOf(impressionsMode) === -1) {
|
|
9
|
-
log.error(ERROR_INVALID_IMPRESSIONS_MODE, [[DEBUG, OPTIMIZED], OPTIMIZED]);
|
|
10
|
-
impressionsMode = OPTIMIZED;
|
|
11
|
-
}
|
|
7
|
+
export function validImpressionsMode(log: ILogger, impressionsMode: any): SplitIO.ImpressionsMode {
|
|
8
|
+
impressionsMode = stringToUpperCase(impressionsMode);
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
if ([DEBUG, OPTIMIZED].indexOf(impressionsMode) > -1) return impressionsMode;
|
|
11
|
+
|
|
12
|
+
log.error(ERROR_INVALID_CONFIG_PARAM, ['impressionsMode', [DEBUG, OPTIMIZED], OPTIMIZED]);
|
|
13
|
+
return OPTIMIZED;
|
|
14
14
|
}
|
|
@@ -5,6 +5,8 @@ import { STANDALONE_MODE, OPTIMIZED, LOCALHOST_MODE } from '../constants';
|
|
|
5
5
|
import { validImpressionsMode } from './impressionsMode';
|
|
6
6
|
import { ISettingsValidationParams } from './types';
|
|
7
7
|
import { ISettings } from '../../types';
|
|
8
|
+
import { validateKey } from '../inputValidation/key';
|
|
9
|
+
import { validateTrafficType } from '../inputValidation/trafficType';
|
|
8
10
|
|
|
9
11
|
const base = {
|
|
10
12
|
// Define which kind of object you want to retrieve from SplitFactory
|
|
@@ -38,6 +40,8 @@ const base = {
|
|
|
38
40
|
eventsPushRate: 60,
|
|
39
41
|
// how many events will be queued before flushing
|
|
40
42
|
eventsQueueSize: 500,
|
|
43
|
+
// how many impressions will be queued before flushing
|
|
44
|
+
impressionsQueueSize: 30000,
|
|
41
45
|
// backoff base seconds to wait before re attempting to connect to push notifications
|
|
42
46
|
pushRetryBackoffBase: 1,
|
|
43
47
|
},
|
|
@@ -78,11 +82,6 @@ const base = {
|
|
|
78
82
|
localhostMode: undefined
|
|
79
83
|
},
|
|
80
84
|
|
|
81
|
-
runtime: {
|
|
82
|
-
ip: false,
|
|
83
|
-
hostname: false
|
|
84
|
-
},
|
|
85
|
-
|
|
86
85
|
// Logger
|
|
87
86
|
log: undefined
|
|
88
87
|
};
|
|
@@ -100,7 +99,7 @@ function fromSecondsToMillis(n: number) {
|
|
|
100
99
|
*/
|
|
101
100
|
export function settingsValidation(config: unknown, validationParams: ISettingsValidationParams) {
|
|
102
101
|
|
|
103
|
-
const { defaults, runtime, storage, integrations, logger, localhost } = validationParams;
|
|
102
|
+
const { defaults, runtime, storage, integrations, logger, localhost, consent } = validationParams;
|
|
104
103
|
|
|
105
104
|
// creates a settings object merging base, defaults and config objects.
|
|
106
105
|
const withDefaults = merge({}, base, defaults, config) as ISettings;
|
|
@@ -132,14 +131,30 @@ export function settingsValidation(config: unknown, validationParams: ISettingsV
|
|
|
132
131
|
// @ts-ignore, modify readonly prop
|
|
133
132
|
if (storage) withDefaults.storage = storage(withDefaults);
|
|
134
133
|
|
|
135
|
-
//
|
|
136
|
-
if (
|
|
137
|
-
withDefaults.core.key
|
|
134
|
+
// Validate key and TT (for client-side)
|
|
135
|
+
if (validationParams.acceptKey) {
|
|
136
|
+
const maybeKey = withDefaults.core.key;
|
|
137
|
+
// Although `key` is required in client-side, it can be omitted in LOCALHOST mode. In that case, the value `localhost_key` is used.
|
|
138
|
+
if (withDefaults.mode === LOCALHOST_MODE && maybeKey === undefined) {
|
|
139
|
+
withDefaults.core.key = 'localhost_key';
|
|
140
|
+
} else {
|
|
141
|
+
// Keeping same behaviour than JS SDK: if settings key or TT are invalid,
|
|
142
|
+
// `false` value is used as binded key/TT of the default client, which leads to some issues.
|
|
143
|
+
// @ts-ignore, @TODO handle invalid keys as a non-recoverable error?
|
|
144
|
+
withDefaults.core.key = validateKey(log, maybeKey, 'Client instantiation');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (validationParams.acceptTT) {
|
|
148
|
+
const maybeTT = withDefaults.core.trafficType;
|
|
149
|
+
if (maybeTT !== undefined) { // @ts-ignore
|
|
150
|
+
withDefaults.core.trafficType = validateTrafficType(log, maybeTT, 'Client instantiation');
|
|
151
|
+
}
|
|
152
|
+
}
|
|
138
153
|
}
|
|
139
154
|
|
|
140
155
|
// Current ip/hostname information
|
|
141
156
|
// @ts-ignore, modify readonly prop
|
|
142
|
-
|
|
157
|
+
withDefaults.runtime = runtime(withDefaults);
|
|
143
158
|
|
|
144
159
|
// ensure a valid list of integrations.
|
|
145
160
|
// `integrations` returns an array of valid integration items.
|
|
@@ -164,5 +179,9 @@ export function settingsValidation(config: unknown, validationParams: ISettingsV
|
|
|
164
179
|
// ensure a valid impressionsMode
|
|
165
180
|
withDefaults.sync.impressionsMode = validImpressionsMode(log, withDefaults.sync.impressionsMode);
|
|
166
181
|
|
|
182
|
+
// ensure a valid user consent value
|
|
183
|
+
// @ts-ignore, modify readonly prop
|
|
184
|
+
withDefaults.userConsent = consent(withDefaults);
|
|
185
|
+
|
|
167
186
|
return withDefaults;
|
|
168
187
|
}
|
|
@@ -6,18 +6,24 @@ import { ISettings } from '../../types';
|
|
|
6
6
|
*/
|
|
7
7
|
export interface ISettingsValidationParams {
|
|
8
8
|
/**
|
|
9
|
-
* Object of values to overwrite
|
|
10
|
-
* Version and startup properties are
|
|
9
|
+
* Object of values to overwrite base settings.
|
|
10
|
+
* Version and startup properties are required, because they are not defined in the base settings.
|
|
11
11
|
*/
|
|
12
12
|
defaults: Partial<ISettings> & { version: string } & { startup: ISettings['startup'] },
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
13
|
+
/** If true, validates core.key */
|
|
14
|
+
acceptKey?: boolean,
|
|
15
|
+
/** If true, validates core.trafficType */
|
|
16
|
+
acceptTT?: boolean,
|
|
17
|
+
/** Define runtime values (`settings.runtime`) */
|
|
18
|
+
runtime: (settings: ISettings) => ISettings['runtime'],
|
|
19
|
+
/** Storage validator (`settings.storage`) */
|
|
16
20
|
storage?: (settings: ISettings) => ISettings['storage'],
|
|
17
|
-
/** Integrations validator */
|
|
21
|
+
/** Integrations validator (`settings.integrations`) */
|
|
18
22
|
integrations?: (settings: ISettings) => ISettings['integrations'],
|
|
19
23
|
/** Logger validator (`settings.debug`) */
|
|
20
24
|
logger: (settings: ISettings) => ISettings['log'],
|
|
21
25
|
/** Localhost mode validator (`settings.sync.localhostMode`) */
|
|
22
26
|
localhost?: (settings: ISettings) => ISettings['sync']['localhostMode'],
|
|
27
|
+
/** User consent validator (`settings.userConsent`) */
|
|
28
|
+
consent: (settings: ISettings) => ISettings['userConsent'],
|
|
23
29
|
}
|
|
@@ -5,7 +5,7 @@ import { SplitIO } from '../types';
|
|
|
5
5
|
import { ILogger } from '../logger/types';
|
|
6
6
|
export interface IDependencyMatcherValue {
|
|
7
7
|
key: SplitIO.SplitKey;
|
|
8
|
-
attributes
|
|
8
|
+
attributes?: SplitIO.Attributes;
|
|
9
9
|
}
|
|
10
10
|
export interface IMatcherDto {
|
|
11
11
|
type: number;
|
|
@@ -23,6 +23,6 @@ export interface IEvaluation {
|
|
|
23
23
|
export declare type IEvaluationResult = IEvaluation & {
|
|
24
24
|
treatment: string;
|
|
25
25
|
};
|
|
26
|
-
export declare type ISplitEvaluator = (log: ILogger, key: SplitIO.SplitKey, splitName: string, attributes: SplitIO.Attributes, storage: IStorageSync | IStorageAsync) => MaybeThenable<IEvaluation>;
|
|
26
|
+
export declare type ISplitEvaluator = (log: ILogger, key: SplitIO.SplitKey, splitName: string, attributes: SplitIO.Attributes | undefined, storage: IStorageSync | IStorageAsync) => MaybeThenable<IEvaluation>;
|
|
27
27
|
export declare type IEvaluator = (key: SplitIO.SplitKey, seed: number, trafficAllocation?: number, trafficAllocationSeed?: number, attributes?: SplitIO.Attributes, splitEvaluator?: ISplitEvaluator) => MaybeThenable<IEvaluation | undefined>;
|
|
28
28
|
export declare type IMatcher = (...args: any) => MaybeThenable<boolean>;
|
|
@@ -4,4 +4,4 @@ import { ILogger } from '../../logger/types';
|
|
|
4
4
|
/**
|
|
5
5
|
* Defines value to be matched (key / attribute).
|
|
6
6
|
*/
|
|
7
|
-
export declare function sanitizeValue(log: ILogger, key: string, matcherDto: IMatcherDto, attributes
|
|
7
|
+
export declare function sanitizeValue(log: ILogger, key: string, matcherDto: IMatcherDto, attributes?: SplitIO.Attributes): string | number | boolean | (string | number)[] | import("../types").IDependencyMatcherValue | undefined;
|
|
@@ -4,4 +4,4 @@ import { ILogger } from '../../logger/types';
|
|
|
4
4
|
/**
|
|
5
5
|
* Sanitize matcher value
|
|
6
6
|
*/
|
|
7
|
-
export declare function sanitize(log: ILogger, matcherTypeID: number, value: string | number | boolean | Array<string | number> | undefined, dataType: string, attributes
|
|
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;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IntegrationFactory } from '../types';
|
|
2
2
|
import { GoogleAnalyticsToSplitOptions } from './types';
|
|
3
|
-
export declare function GoogleAnalyticsToSplit(options: GoogleAnalyticsToSplitOptions):
|
|
3
|
+
export declare function GoogleAnalyticsToSplit(options: GoogleAnalyticsToSplitOptions): IntegrationFactory;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IIntegrationFactoryParams } from '../types';
|
|
2
|
+
import SplitToGa from './SplitToGa';
|
|
3
|
+
import { SplitToGoogleAnalyticsOptions } from './types';
|
|
4
|
+
export declare function SplitToGoogleAnalytics(options?: SplitToGoogleAnalyticsOptions): (params: IIntegrationFactoryParams) => SplitToGa;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SplitToGa } from './SplitToGa';
|
|
1
|
+
import { IntegrationFactory } from '../types';
|
|
3
2
|
import { SplitToGoogleAnalyticsOptions } from './types';
|
|
4
|
-
export declare function SplitToGoogleAnalytics(options?: SplitToGoogleAnalyticsOptions):
|
|
3
|
+
export declare function SplitToGoogleAnalytics(options?: SplitToGoogleAnalyticsOptions): IntegrationFactory;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export declare const DEBUG_0 = 0;
|
|
2
|
+
export declare const DEBUG_1 = 1;
|
|
3
|
+
export declare const DEBUG_2 = 2;
|
|
4
|
+
export declare const DEBUG_3 = 3;
|
|
5
|
+
export declare const DEBUG_4 = 4;
|
|
6
|
+
export declare const DEBUG_5 = 5;
|
|
7
|
+
export declare const DEBUG_6 = 6;
|
|
8
|
+
export declare const DEBUG_7 = 7;
|
|
9
|
+
export declare const DEBUG_8 = 8;
|
|
10
|
+
export declare const DEBUG_9 = 9;
|
|
11
|
+
export declare const DEBUG_10 = 10;
|
|
12
|
+
export declare const DEBUG_11 = 11;
|
|
13
|
+
export declare const DEBUG_12 = 12;
|
|
14
|
+
export declare const DEBUG_13 = 13;
|
|
15
|
+
export declare const DEBUG_14 = 14;
|
|
16
|
+
export declare const DEBUG_15 = 15;
|
|
17
|
+
export declare const DEBUG_16 = 16;
|
|
18
|
+
export declare const DEBUG_17 = 17;
|
|
19
|
+
export declare const DEBUG_18 = 18;
|
|
20
|
+
export declare const DEBUG_19 = 19;
|
|
21
|
+
export declare const DEBUG_20 = 20;
|
|
22
|
+
export declare const DEBUG_21 = 21;
|
|
23
|
+
export declare const DEBUG_22 = 22;
|
|
24
|
+
export declare const DEBUG_23 = 23;
|
|
25
|
+
export declare const DEBUG_24 = 24;
|
|
26
|
+
export declare const DEBUG_25 = 25;
|
|
27
|
+
export declare const DEBUG_31 = 31;
|
|
28
|
+
export declare const DEBUG_32 = 32;
|
|
29
|
+
export declare const DEBUG_33 = 33;
|
|
30
|
+
export declare const DEBUG_36 = 36;
|
|
31
|
+
export declare const DEBUG_42 = 42;
|
|
32
|
+
export declare const DEBUG_43 = 43;
|
|
33
|
+
export declare const DEBUG_44 = 44;
|
|
34
|
+
export declare const DEBUG_45 = 45;
|
|
35
|
+
export declare const DEBUG_46 = 46;
|
|
36
|
+
export declare const DEBUG_47 = 47;
|
|
37
|
+
export declare const DEBUG_48 = 48;
|
|
38
|
+
export declare const DEBUG_49 = 49;
|
|
39
|
+
export declare const DEBUG_50 = 50;
|
|
40
|
+
export declare const DEBUG_51 = 51;
|
|
41
|
+
export declare const INFO_0 = 100;
|
|
42
|
+
export declare const INFO_1 = 101;
|
|
43
|
+
export declare const INFO_2 = 102;
|
|
44
|
+
export declare const INFO_3 = 103;
|
|
45
|
+
export declare const INFO_4 = 104;
|
|
46
|
+
export declare const INFO_5 = 105;
|
|
47
|
+
export declare const INFO_6 = 106;
|
|
48
|
+
export declare const INFO_7 = 107;
|
|
49
|
+
export declare const INFO_8 = 108;
|
|
50
|
+
export declare const INFO_9 = 109;
|
|
51
|
+
export declare const INFO_10 = 110;
|
|
52
|
+
export declare const INFO_11 = 111;
|
|
53
|
+
export declare const INFO_12 = 112;
|
|
54
|
+
export declare const INFO_13 = 113;
|
|
55
|
+
export declare const INFO_14 = 114;
|
|
56
|
+
export declare const INFO_15 = 115;
|
|
57
|
+
export declare const INFO_16 = 116;
|
|
58
|
+
export declare const INFO_17 = 117;
|
|
59
|
+
export declare const INFO_18 = 118;
|
|
60
|
+
export declare const INFO_19 = 119;
|
|
61
|
+
export declare const INFO_20 = 120;
|
|
62
|
+
export declare const INFO_21 = 121;
|
|
63
|
+
export declare const WARN_0 = 200;
|
|
64
|
+
export declare const WARN_1 = 201;
|
|
65
|
+
export declare const WARN_2 = 202;
|
|
66
|
+
export declare const WARN_4 = 204;
|
|
67
|
+
export declare const WARN_5 = 205;
|
|
68
|
+
export declare const WARN_6 = 206;
|
|
69
|
+
export declare const WARN_7 = 207;
|
|
70
|
+
export declare const WARN_8 = 208;
|
|
71
|
+
export declare const WARN_9 = 209;
|
|
72
|
+
export declare const WARN_10 = 210;
|
|
73
|
+
export declare const WARN_11 = 211;
|
|
74
|
+
export declare const WARN_12 = 212;
|
|
75
|
+
export declare const WARN_13 = 213;
|
|
76
|
+
export declare const WARN_14 = 214;
|
|
77
|
+
export declare const WARN_15 = 215;
|
|
78
|
+
export declare const WARN_17 = 217;
|
|
79
|
+
export declare const WARN_18 = 218;
|
|
80
|
+
export declare const WARN_19 = 219;
|
|
81
|
+
export declare const WARN_20 = 220;
|
|
82
|
+
export declare const WARN_21 = 221;
|
|
83
|
+
export declare const WARN_22 = 222;
|
|
84
|
+
export declare const WARN_23 = 223;
|
|
85
|
+
export declare const WARN_24 = 224;
|
|
86
|
+
export declare const WARN_25 = 225;
|
|
87
|
+
export declare const ERROR_0 = 300;
|
|
88
|
+
export declare const ERROR_2 = 302;
|
|
89
|
+
export declare const ERROR_3 = 303;
|
|
90
|
+
export declare const ERROR_4 = 304;
|
|
91
|
+
export declare const ERROR_5 = 305;
|
|
92
|
+
export declare const ERROR_7 = 307;
|
|
93
|
+
export declare const ERROR_9 = 309;
|
|
94
|
+
export declare const ERROR_10 = 310;
|
|
95
|
+
export declare const ERROR_11 = 311;
|
|
96
|
+
export declare const ERROR_12 = 312;
|
|
97
|
+
export declare const ERROR_13 = 313;
|
|
98
|
+
export declare const ERROR_14 = 314;
|
|
99
|
+
export declare const ERROR_15 = 315;
|
|
100
|
+
export declare const ERROR_16 = 316;
|
|
101
|
+
export declare const ERROR_17 = 317;
|
|
102
|
+
export declare const ERROR_18 = 318;
|
|
103
|
+
export declare const ERROR_19 = 319;
|
|
104
|
+
export declare const ERROR_20 = 320;
|
|
105
|
+
export declare const ERROR_21 = 321;
|
|
106
|
+
export declare const ERROR_22 = 322;
|
|
107
|
+
export declare const ERROR_23 = 323;
|
|
108
|
+
export declare const ERROR_24 = 324;
|
|
109
|
+
export declare const ERROR_25 = 325;
|
|
110
|
+
export declare const ERROR_26 = 326;
|
|
111
|
+
export declare const ERROR_32 = 332;
|
|
112
|
+
export declare const ERROR_33 = 333;
|
|
113
|
+
export declare const ERROR_34 = 334;
|
|
114
|
+
export declare const ERROR_35 = 335;
|
|
115
|
+
export declare const ERROR_36 = 336;
|
|
116
|
+
export declare const ERROR_37 = 337;
|
|
117
|
+
export declare const ERROR_38 = 338;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const DEBUG_28 = 28;
|
|
2
|
+
export declare const DEBUG_29 = 29;
|
|
3
|
+
export declare const DEBUG_30 = 30;
|
|
4
|
+
export declare const ERROR_1 = 301;
|
|
5
|
+
export declare const DEBUG_39 = 39;
|
|
6
|
+
export declare const DEBUG_40 = 40;
|
|
7
|
+
export declare const DEBUG_41 = 41;
|
|
8
|
+
export declare const ERROR_8 = 308;
|
|
9
|
+
export declare const DEBUG_34 = 34;
|
|
10
|
+
export declare const DEBUG_35 = 35;
|
|
11
|
+
export declare const ERROR_6 = 306;
|
|
12
|
+
export declare const WARN_3 = 203;
|
|
13
|
+
export declare const DEBUG_37 = 37;
|
|
14
|
+
export declare const DEBUG_38 = 38;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesDebug: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesDebugBrowser: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesDebugNode: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesError: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesErrorNode: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesInfo: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesWarn: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesWarnNode: [number, string][];
|
|
@@ -60,13 +60,15 @@ export declare const STREAMING_RECONNECT = 111;
|
|
|
60
60
|
export declare const STREAMING_CONNECTING = 112;
|
|
61
61
|
export declare const STREAMING_DISABLED = 113;
|
|
62
62
|
export declare const STREAMING_DISCONNECTING = 114;
|
|
63
|
-
export declare const
|
|
63
|
+
export declare const SUBMITTERS_PUSH_FULL_QUEUE = 115;
|
|
64
64
|
export declare const SUBMITTERS_PUSH = 116;
|
|
65
65
|
export declare const SYNC_START_POLLING = 117;
|
|
66
66
|
export declare const SYNC_CONTINUE_POLLING = 118;
|
|
67
67
|
export declare const SYNC_STOP_POLLING = 119;
|
|
68
68
|
export declare const EVENTS_TRACKER_SUCCESS = 120;
|
|
69
69
|
export declare const IMPRESSIONS_TRACKER_SUCCESS = 121;
|
|
70
|
+
export declare const USER_CONSENT_UPDATED = 122;
|
|
71
|
+
export declare const USER_CONSENT_NOT_UPDATED = 123;
|
|
70
72
|
export declare const ENGINE_VALUE_INVALID = 200;
|
|
71
73
|
export declare const ENGINE_VALUE_NO_ATTRIBUTES = 201;
|
|
72
74
|
export declare const CLIENT_NO_LISTENER = 202;
|
|
@@ -112,10 +114,11 @@ export declare const ERROR_INVALID_KEY_OBJECT = 317;
|
|
|
112
114
|
export declare const ERROR_INVALID = 318;
|
|
113
115
|
export declare const ERROR_EMPTY = 319;
|
|
114
116
|
export declare const ERROR_EMPTY_ARRAY = 320;
|
|
115
|
-
export declare const
|
|
117
|
+
export declare const ERROR_INVALID_CONFIG_PARAM = 321;
|
|
116
118
|
export declare const ERROR_HTTP = 322;
|
|
117
119
|
export declare const ERROR_LOCALHOST_MODULE_REQUIRED = 323;
|
|
118
120
|
export declare const ERROR_STORAGE_INVALID = 324;
|
|
121
|
+
export declare const ERROR_NOT_BOOLEAN = 325;
|
|
119
122
|
export declare const LOG_PREFIX_SETTINGS = "settings";
|
|
120
123
|
export declare const LOG_PREFIX_INSTANTIATION = "Factory instantiation";
|
|
121
124
|
export declare const LOG_PREFIX_ENGINE = "engine";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesDebugBrowser: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesDebugNode: [number, string][];
|