@splitsoftware/splitio-commons 1.2.0 → 1.2.1-rc.3
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 +1 -1
- package/cjs/listeners/node.js +1 -1
- package/cjs/logger/constants.js +3 -1
- package/cjs/logger/index.js +2 -2
- package/cjs/logger/messages/debug.js +1 -1
- package/cjs/logger/messages/error.js +2 -2
- package/cjs/logger/messages/info.js +5 -5
- 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 +11 -10
- package/cjs/sdkClient/clientAttributesDecoration.js +4 -4
- package/cjs/sdkClient/clientCS.js +4 -3
- package/cjs/sdkClient/clientInputValidation.js +14 -14
- package/cjs/sdkClient/sdkClient.js +3 -3
- package/cjs/sdkClient/sdkClientMethod.js +1 -1
- package/cjs/sdkClient/sdkClientMethodCS.js +6 -6
- package/cjs/sdkClient/sdkClientMethodCSWithTT.js +8 -8
- package/cjs/sdkFactory/index.js +8 -8
- 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 -2
- package/cjs/storages/KeyBuilderCS.js +2 -2
- package/cjs/storages/KeyBuilderSS.js +1 -1
- package/cjs/storages/findLatencyIndex.js +1 -1
- package/cjs/storages/inLocalStorage/MySegmentsCacheInLocal.js +1 -1
- package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +12 -12
- package/cjs/storages/inLocalStorage/index.js +3 -3
- package/cjs/storages/inMemory/AttributesCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/ImpressionCountsCacheInMemory.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 +16 -10
- 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 +4 -4
- 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/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 +1 -1
- package/cjs/sync/submitters/impressionCountsSyncTask.js +1 -1
- package/cjs/sync/submitters/impressionsSyncTask.js +3 -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 +12 -12
- package/cjs/trackers/eventTracker.js +3 -3
- package/cjs/trackers/impressionObserver/impressionObserverCS.js +1 -1
- package/cjs/trackers/impressionObserver/impressionObserverSS.js +1 -1
- package/cjs/trackers/impressionsTracker.js +3 -3
- package/cjs/utils/MinEvents.js +2 -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 +2 -14
- 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/index.js +5 -10
- 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/browser.js +10 -0
- package/cjs/utils/settingsValidation/runtime/node.js +22 -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/logger/messages/error.js +1 -1
- package/esm/logger/messages/info.js +4 -4
- package/esm/sdkClient/client.js +2 -1
- package/esm/sdkClient/clientCS.js +2 -1
- package/esm/services/splitApi.js +2 -1
- package/esm/services/splitHttpClient.js +1 -1
- package/esm/storages/inRedis/RedisAdapter.js +7 -1
- 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/UpdateWorkers/SegmentsUpdateWorker.js +1 -1
- package/esm/sync/streaming/pushManager.js +34 -23
- package/esm/sync/submitters/submitterManager.js +2 -1
- package/esm/sync/syncManagerOnline.js +12 -12
- package/esm/utils/inputValidation/eventProperties.js +4 -2
- package/esm/utils/inputValidation/key.js +2 -1
- package/esm/utils/lang/index.js +2 -13
- package/esm/utils/murmur3/legacy.js +39 -0
- package/esm/utils/promise/timeout.js +1 -1
- package/esm/utils/settingsValidation/index.js +1 -6
- package/esm/utils/settingsValidation/runtime/browser.js +6 -0
- package/esm/utils/settingsValidation/runtime/node.js +17 -0
- package/package.json +8 -7
- package/src/evaluator/matchers/ew.ts +4 -4
- package/src/integrations/ga/GoogleAnalyticsToSplit.ts +7 -4
- package/src/integrations/ga/SplitToGoogleAnalytics.ts +7 -4
- package/src/integrations/types.ts +5 -0
- package/src/logger/.DS_Store +0 -0
- package/src/logger/messages/error.ts +1 -1
- package/src/logger/messages/info.ts +4 -4
- package/src/logger/types.ts +4 -0
- package/src/sdkClient/client.ts +2 -1
- package/src/sdkClient/clientCS.ts +3 -1
- package/src/services/splitHttpClient.ts +1 -1
- package/src/storages/types.ts +1 -1
- 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/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/submitterManager.ts +4 -8
- package/src/sync/syncManagerOnline.ts +16 -22
- package/src/types.ts +5 -1
- package/src/utils/inputValidation/eventProperties.ts +4 -2
- package/src/utils/lang/index.ts +0 -14
- package/src/utils/murmur3/legacy.ts +48 -0
- package/src/utils/promise/timeout.ts +1 -1
- package/src/utils/settingsValidation/index.ts +1 -6
- package/src/utils/settingsValidation/runtime/browser.ts +8 -0
- package/src/utils/settingsValidation/runtime/node.ts +22 -0
- package/src/utils/settingsValidation/types.ts +6 -6
- 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/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/sdkManager/sdkManagerMethod.d.ts +6 -0
- package/types/storages/getRegisteredSegments.d.ts +10 -0
- package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +51 -0
- package/types/storages/inMemory/index.d.ts +10 -0
- 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 +1 -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/trackers/telemetryRecorder.d.ts +0 -0
- package/types/types.d.ts +1 -0
- package/types/utils/EventEmitter.d.ts +4 -0
- package/types/utils/lang/errors.d.ts +10 -0
- package/types/utils/lang/index.d.ts +0 -4
- 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/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/types.d.ts +6 -6
|
@@ -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][];
|
|
@@ -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 codesErrorNode: [number, string][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const codesWarnNode: [number, string][];
|
package/types/logger/types.d.ts
CHANGED
|
@@ -6,8 +6,12 @@ export interface ILoggerOptions {
|
|
|
6
6
|
}
|
|
7
7
|
export interface ILogger {
|
|
8
8
|
setLogLevel(logLevel: LogLevel): void;
|
|
9
|
+
debug(msg: any): void;
|
|
9
10
|
debug(msg: string | number, args?: any[]): void;
|
|
11
|
+
info(msg: any): void;
|
|
10
12
|
info(msg: string | number, args?: any[]): void;
|
|
13
|
+
warn(msg: any): void;
|
|
11
14
|
warn(msg: string | number, args?: any[]): void;
|
|
15
|
+
error(msg: any): void;
|
|
12
16
|
error(msg: string | number, args?: any[]): void;
|
|
13
17
|
}
|
|
@@ -8,7 +8,7 @@ export declare function clientAttributesDecoration<TClient extends SplitIO.IClie
|
|
|
8
8
|
getTreatmentWithConfig: (maybeKey: SplitIO.SplitKey, maybeSplit: string, maybeAttributes?: SplitIO.Attributes | undefined) => SplitIO.TreatmentWithConfig | SplitIO.AsyncTreatmentWithConfig;
|
|
9
9
|
getTreatments: (maybeKey: SplitIO.SplitKey, maybeSplits: string[], maybeAttributes?: SplitIO.Attributes | undefined) => SplitIO.Treatments | SplitIO.AsyncTreatments;
|
|
10
10
|
getTreatmentsWithConfig: (maybeKey: SplitIO.SplitKey, maybeSplits: string[], maybeAttributes?: SplitIO.Attributes | undefined) => SplitIO.TreatmentsWithConfig | SplitIO.AsyncTreatmentsWithConfig;
|
|
11
|
-
track: (maybeKey: SplitIO.SplitKey, maybeTT: string, maybeEvent: string, maybeEventValue?: number | undefined, maybeProperties?: SplitIO.Properties | undefined) =>
|
|
11
|
+
track: (maybeKey: SplitIO.SplitKey, maybeTT: string, maybeEvent: string, maybeEventValue?: number | undefined, maybeProperties?: SplitIO.Properties | undefined) => boolean | Promise<boolean>;
|
|
12
12
|
/**
|
|
13
13
|
* Add an attribute to client's in memory attributes storage
|
|
14
14
|
*
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ISdkClientFactoryParams } from '../sdkClient/types';
|
|
2
|
+
import { SplitIO } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Factory of client method for server-side SDKs (ISDK and IAsyncSDK)
|
|
5
|
+
*/
|
|
6
|
+
export declare function sdkManagerMethodFactory(params: ISdkClientFactoryParams): () => SplitIO.IManager | SplitIO.IAsyncManager;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ISplit } from '../dtos/types';
|
|
2
|
+
/**
|
|
3
|
+
* Collect segments from a raw split definition.
|
|
4
|
+
* Exported for testing purposes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function _parseSegments({ conditions }: ISplit): import("../utils/lang/sets").ISet<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Computes the set of segments used by splits.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getRegisteredSegments(splitDefs: string[]): string[];
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ImpressionDataType, EventDataType, StreamingEvent, Method, OperationType } from '../../sync/submitters/types';
|
|
2
|
+
import { TelemetryCacheSync } from '../types';
|
|
3
|
+
export declare class TelemetryCacheInMemory implements TelemetryCacheSync {
|
|
4
|
+
private timeUntilReady?;
|
|
5
|
+
getTimeUntilReady(): number | undefined;
|
|
6
|
+
recordTimeUntilReady(ms: number): void;
|
|
7
|
+
private timeUntilReadyFromCache?;
|
|
8
|
+
getTimeUntilReadyFromCache(): number | undefined;
|
|
9
|
+
recordTimeUntilReadyFromCache(ms: number): void;
|
|
10
|
+
private notReadyUsage;
|
|
11
|
+
getNonReadyUsage(): number;
|
|
12
|
+
recordNonReadyUsage(): void;
|
|
13
|
+
private impressionStats;
|
|
14
|
+
getImpressionStats(type: ImpressionDataType): number;
|
|
15
|
+
recordImpressionStats(type: ImpressionDataType, count: number): void;
|
|
16
|
+
private eventStats;
|
|
17
|
+
getEventStats(type: EventDataType): number;
|
|
18
|
+
recordEventStats(type: EventDataType, count: number): void;
|
|
19
|
+
private lastSync;
|
|
20
|
+
getLastSynchronization(): Record<OperationType, number | undefined>;
|
|
21
|
+
recordSuccessfulSync(resource: OperationType, timeMs: number): void;
|
|
22
|
+
private httpErrors;
|
|
23
|
+
popHttpErrors(): Record<OperationType, {
|
|
24
|
+
[statusCode: string]: number;
|
|
25
|
+
}>;
|
|
26
|
+
recordSyncError(resource: OperationType, status: number): void;
|
|
27
|
+
private httpLatencies;
|
|
28
|
+
popHttpLatencies(): Record<OperationType, number[]>;
|
|
29
|
+
recordSyncLatency(resource: OperationType, latencyMs: number): void;
|
|
30
|
+
private authRejections;
|
|
31
|
+
popAuthRejections(): number;
|
|
32
|
+
recordAuthRejections(): void;
|
|
33
|
+
private tokenRefreshes;
|
|
34
|
+
popTokenRefreshes(): number;
|
|
35
|
+
recordTokenRefreshes(): void;
|
|
36
|
+
private streamingEvents;
|
|
37
|
+
popStreamingEvents(): StreamingEvent[];
|
|
38
|
+
recordStreamingEvents(streamingEvent: StreamingEvent): void;
|
|
39
|
+
private tags;
|
|
40
|
+
popTags(): string[];
|
|
41
|
+
addTag(tag: string): void;
|
|
42
|
+
private sessionLength?;
|
|
43
|
+
getSessionLength(): number | undefined;
|
|
44
|
+
recordSessionLength(ms: number): void;
|
|
45
|
+
private exceptions;
|
|
46
|
+
popExceptions(): Record<Method, number>;
|
|
47
|
+
recordException(method: Method): void;
|
|
48
|
+
private latencies;
|
|
49
|
+
popLatencies(): Record<Method, number[]>;
|
|
50
|
+
recordLatency(method: Method, latencyMs: number): void;
|
|
51
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IStorageFactoryParams, IStorageSync } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* InMemory storage factory for standalone server-side SplitFactory
|
|
4
|
+
*
|
|
5
|
+
* @param params parameters required by EventsCacheSync
|
|
6
|
+
*/
|
|
7
|
+
export declare function InMemoryStorageFactory(params: IStorageFactoryParams): IStorageSync;
|
|
8
|
+
export declare namespace InMemoryStorageFactory {
|
|
9
|
+
var type: import("../types").StorageType;
|
|
10
|
+
}
|
|
File without changes
|
|
@@ -345,7 +345,7 @@ export interface IStorageFactoryParams {
|
|
|
345
345
|
}
|
|
346
346
|
export declare type StorageType = 'MEMORY' | 'LOCALSTORAGE' | 'REDIS' | 'PLUGGABLE';
|
|
347
347
|
export declare type IStorageSyncFactory = {
|
|
348
|
-
type: StorageType;
|
|
348
|
+
readonly type: StorageType;
|
|
349
349
|
(params: IStorageFactoryParams): IStorageSync;
|
|
350
350
|
};
|
|
351
351
|
export declare type IStorageAsyncFactory = {
|
|
@@ -4,4 +4,4 @@ import { IMySegmentsFetcher } from './types';
|
|
|
4
4
|
* Factory of MySegments fetcher.
|
|
5
5
|
* MySegments fetcher is a wrapper around `mySegments` API service that parses the response and handle errors.
|
|
6
6
|
*/
|
|
7
|
-
export declare function mySegmentsFetcherFactory(fetchMySegments: IFetchMySegments
|
|
7
|
+
export declare function mySegmentsFetcherFactory(fetchMySegments: IFetchMySegments): IMySegmentsFetcher;
|
|
@@ -2,4 +2,4 @@ import { ISplitChangesResponse, ISegmentChangesResponse } from '../../../dtos/ty
|
|
|
2
2
|
import { IResponse } from '../../../services/types';
|
|
3
3
|
export declare type ISplitChangesFetcher = (since: number, noCache?: boolean, decorator?: (promise: Promise<IResponse>) => Promise<IResponse>) => Promise<ISplitChangesResponse>;
|
|
4
4
|
export declare type ISegmentChangesFetcher = (since: number, segmentName: string, noCache?: boolean, decorator?: (promise: Promise<ISegmentChangesResponse[]>) => Promise<ISegmentChangesResponse[]>) => Promise<ISegmentChangesResponse[]>;
|
|
5
|
-
export declare type IMySegmentsFetcher = (noCache?: boolean, decorator?: (promise: Promise<IResponse>) => Promise<IResponse>) => Promise<string[]>;
|
|
5
|
+
export declare type IMySegmentsFetcher = (userMatchingKey: string, noCache?: boolean, decorator?: (promise: Promise<IResponse>) => Promise<IResponse>) => Promise<string[]>;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { IPollingManagerCS } from './types';
|
|
2
|
-
import {
|
|
3
|
-
import { ISplitApi } from '../../services/types';
|
|
4
|
-
import { IStorageSync } from '../../storages/types';
|
|
5
|
-
import { ISettings } from '../../types';
|
|
2
|
+
import { ISyncManagerFactoryParams } from '../types';
|
|
6
3
|
/**
|
|
7
4
|
* Expose start / stop mechanism for polling data from services.
|
|
8
5
|
* For client-side API with multiple clients.
|
|
9
6
|
*/
|
|
10
|
-
export declare function pollingManagerCSFactory(
|
|
7
|
+
export declare function pollingManagerCSFactory(params: ISyncManagerFactoryParams): IPollingManagerCS;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { IStorageSync } from '../../storages/types';
|
|
2
|
-
import { IReadinessManager } from '../../readiness/types';
|
|
3
|
-
import { ISplitApi } from '../../services/types';
|
|
4
|
-
import { ISettings } from '../../types';
|
|
5
1
|
import { IPollingManager } from './types';
|
|
2
|
+
import { ISyncManagerFactoryParams } from '../types';
|
|
6
3
|
/**
|
|
7
4
|
* Expose start / stop mechanism for pulling data from services.
|
|
8
5
|
*/
|
|
9
|
-
export declare function pollingManagerSSFactory(
|
|
6
|
+
export declare function pollingManagerSSFactory(params: ISyncManagerFactoryParams): IPollingManager;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ISet } from '../../../utils/lang/sets';
|
|
2
|
+
import { ISegmentsCacheSync, ISplitsCacheSync, IStorageSync } from '../../../storages/types';
|
|
3
|
+
import { ISplitChangesFetcher } from '../fetchers/types';
|
|
4
|
+
import { ISplit } from '../../../dtos/types';
|
|
5
|
+
import { IReadinessManager, ISplitsEventEmitter } from '../../../readiness/types';
|
|
6
|
+
import { ISplitsSyncTask } from '../types';
|
|
7
|
+
import { IFetchSplitChanges } from '../../../services/types';
|
|
8
|
+
import { ISettings } from '../../../types';
|
|
9
|
+
declare type ISplitChangesUpdater = (noCache?: boolean) => Promise<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Collect segments from a raw split definition.
|
|
12
|
+
* Exported for testing purposes.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseSegments({ conditions }: ISplit): ISet<string>;
|
|
15
|
+
interface ISplitMutations {
|
|
16
|
+
added: [string, string][];
|
|
17
|
+
removed: string[];
|
|
18
|
+
segments: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Given the list of splits from /splitChanges endpoint, it returns the mutations,
|
|
22
|
+
* i.e., an object with added splits, removed splits and used segments.
|
|
23
|
+
* Exported for testing purposes.
|
|
24
|
+
*/
|
|
25
|
+
export declare function computeSplitsMutation(entries: ISplit[]): ISplitMutations;
|
|
26
|
+
/**
|
|
27
|
+
* factory of SplitChanges updater (a.k.a, SplitsSyncTask), a task that:
|
|
28
|
+
* - fetches split changes using `splitChangesFetcher`
|
|
29
|
+
* - updates `splitsCache`
|
|
30
|
+
* - uses `splitsEventEmitter` to emit events related to split data updates
|
|
31
|
+
* Exported for testing purposes.
|
|
32
|
+
*/
|
|
33
|
+
export declare function splitChangesUpdaterFactory(splitChangesFetcher: ISplitChangesFetcher, splitsCache: ISplitsCacheSync, segmentsCache: ISegmentsCacheSync, splitsEventEmitter: ISplitsEventEmitter, requestTimeoutBeforeReady: number, retriesOnFailureBeforeReady: number): ISplitChangesUpdater;
|
|
34
|
+
export default function splitsSyncTaskFactory(fetchSplitChanges: IFetchSplitChanges, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): ISplitsSyncTask;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ISet } from '../../../utils/lang/sets';
|
|
2
|
+
import { ISegmentsCacheSync, ISplitsCacheSync, IStorageSync } from '../../../storages/types';
|
|
3
|
+
import { ISplitChangesFetcher } from '../fetchers/types';
|
|
4
|
+
import { ISplit } from '../../../dtos/types';
|
|
5
|
+
import { IReadinessManager, ISplitsEventEmitter } from '../../../readiness/types';
|
|
6
|
+
import { ISplitsSyncTask } from '../types';
|
|
7
|
+
import { IFetchSplitChanges } from '../../../services/types';
|
|
8
|
+
import { ISettings } from '../../../types';
|
|
9
|
+
declare type ISplitChangesUpdater = (noCache?: boolean) => Promise<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Collect segments from a raw split definition.
|
|
12
|
+
* Exported for testing purposes.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseSegments({ conditions }: ISplit): ISet<string>;
|
|
15
|
+
interface ISplitMutations {
|
|
16
|
+
added: [string, string][];
|
|
17
|
+
removed: string[];
|
|
18
|
+
segments: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Given the list of splits from /splitChanges endpoint, it returns the mutations,
|
|
22
|
+
* i.e., an object with added splits, removed splits and used segments.
|
|
23
|
+
* Exported for testing purposes.
|
|
24
|
+
*/
|
|
25
|
+
export declare function computeSplitsMutation(entries: ISplit[]): ISplitMutations;
|
|
26
|
+
/**
|
|
27
|
+
* factory of SplitChanges updater (a.k.a, SplitsSyncTask), a task that:
|
|
28
|
+
* - fetches split changes using `splitChangesFetcher`
|
|
29
|
+
* - updates `splitsCache`
|
|
30
|
+
* - uses `splitsEventEmitter` to emit events related to split data updates
|
|
31
|
+
* Exported for testing purposes.
|
|
32
|
+
*/
|
|
33
|
+
export declare function splitChangesUpdaterFactory(splitChangesFetcher: ISplitChangesFetcher, splitsCache: ISplitsCacheSync, segmentsCache: ISegmentsCacheSync, splitsEventEmitter: ISplitsEventEmitter, requestTimeoutBeforeReady: number, retriesOnFailureBeforeReady: number): ISplitChangesUpdater;
|
|
34
|
+
export default function splitsSyncTaskFactory(fetchSplitChanges: IFetchSplitChanges, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings): ISplitsSyncTask;
|
|
35
|
+
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { IReadinessManager } from '../../readiness/types';
|
|
2
|
-
import { ISplitApi } from '../../services/types';
|
|
3
2
|
import { IStorageSync } from '../../storages/types';
|
|
4
|
-
import { ISettings } from '../../types';
|
|
5
3
|
import { SegmentsData } from '../streaming/SSEHandler/types';
|
|
6
4
|
import { ITask, ISyncTask } from '../types';
|
|
7
5
|
export interface ISplitsSyncTask extends ISyncTask<[noCache?: boolean], boolean> {
|
|
@@ -21,12 +19,3 @@ export interface IPollingManagerCS extends IPollingManager {
|
|
|
21
19
|
remove(matchingKey: string): void;
|
|
22
20
|
get(matchingKey: string): ISegmentsSyncTask | undefined;
|
|
23
21
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Signature of polling manager factory/constructor
|
|
26
|
-
*/
|
|
27
|
-
export declare type IPollingManagerFactoryParams = [
|
|
28
|
-
splitApi: ISplitApi,
|
|
29
|
-
storage: IStorageSync,
|
|
30
|
-
readiness: IReadinessManager,
|
|
31
|
-
settings: ISettings
|
|
32
|
-
];
|
|
@@ -9,5 +9,5 @@ declare type IMySegmentsUpdater = (segmentList?: string[], noCache?: boolean) =>
|
|
|
9
9
|
* - updates `mySegmentsCache`
|
|
10
10
|
* - uses `segmentsEventEmitter` to emit events related to segments data updates
|
|
11
11
|
*/
|
|
12
|
-
export declare function mySegmentsUpdaterFactory(log: ILogger, mySegmentsFetcher: IMySegmentsFetcher, splitsCache: ISplitsCacheSync, mySegmentsCache: ISegmentsCacheSync, segmentsEventEmitter: ISegmentsEventEmitter, requestTimeoutBeforeReady: number, retriesOnFailureBeforeReady: number): IMySegmentsUpdater;
|
|
12
|
+
export declare function mySegmentsUpdaterFactory(log: ILogger, mySegmentsFetcher: IMySegmentsFetcher, splitsCache: ISplitsCacheSync, mySegmentsCache: ISegmentsCacheSync, segmentsEventEmitter: ISegmentsEventEmitter, requestTimeoutBeforeReady: number, retriesOnFailureBeforeReady: number, matchingKey: string): IMySegmentsUpdater;
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IFetchAuth } from '../../../services/types';
|
|
2
|
+
import { IAuthenticate } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Factory of authentication function.
|
|
5
|
+
*
|
|
6
|
+
* @param fetchAuth `SplitAPI.fetchAuth` endpoint
|
|
7
|
+
*/
|
|
8
|
+
export declare function authenticateFactory(fetchAuth: IFetchAuth): IAuthenticate;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the hash of a given user key
|
|
11
|
+
*/
|
|
12
|
+
export declare function hashUserKey(userKey: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IFetchAuthV2 } from '../../../services/types';
|
|
2
|
+
import { IAuthenticateV2 } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Factory of authentication function.
|
|
5
|
+
*
|
|
6
|
+
* @param fetchAuth `SplitAPI.fetchAuth` endpoint
|
|
7
|
+
*/
|
|
8
|
+
export declare function authenticateFactory(fetchAuthV2: IFetchAuthV2): IAuthenticateV2;
|
|
@@ -16,7 +16,7 @@ export declare class SegmentsUpdateWorker implements IUpdateWorker {
|
|
|
16
16
|
* @param {Object} segmentsCache segments data cache
|
|
17
17
|
* @param {Object} segmentsSyncTask task for syncing segments data
|
|
18
18
|
*/
|
|
19
|
-
constructor(
|
|
19
|
+
constructor(segmentsSyncTask: ISegmentsSyncTask, segmentsCache: ISegmentsCacheSync);
|
|
20
20
|
__handleSegmentUpdateCall(): void;
|
|
21
21
|
/**
|
|
22
22
|
* Invoked by NotificationProcessor on SEGMENT_UPDATE event
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IStorageSync } from '../../storages/types';
|
|
3
|
-
import { IReadinessManager } from '../../readiness/types';
|
|
1
|
+
import { IPushManager } from './types';
|
|
4
2
|
import { IPollingManager } from '../polling/types';
|
|
5
|
-
import {
|
|
6
|
-
import { ISettings } from '../../types';
|
|
7
|
-
import { IPlatform } from '../../sdkFactory/types';
|
|
3
|
+
import { ISyncManagerFactoryParams } from '../types';
|
|
8
4
|
/**
|
|
9
5
|
* PushManager factory:
|
|
10
6
|
* - for server-side if key is not provided in settings.
|
|
11
7
|
* - for client-side, with support for multiple clients, if key is provided in settings
|
|
12
8
|
*/
|
|
13
|
-
export declare function pushManagerFactory(
|
|
9
|
+
export declare function pushManagerFactory(params: ISyncManagerFactoryParams, pollingManager: IPollingManager): IPushManager | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pushManagerCSFactory: (params: import("../types").ISyncManagerFactoryParams, pollingManager: import("../polling/types").IPollingManager) => import("./types").IPushManager | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IPushManagerCS } from './types';
|
|
2
|
+
import { IStorageSync } from '../../storages/types';
|
|
3
|
+
import { IReadinessManager } from '../../readiness/types';
|
|
4
|
+
import { IPollingManager } from '../polling/types';
|
|
5
|
+
import { IFetchAuthV2 } from '../../services/types';
|
|
6
|
+
import { ISettings } from '../../types';
|
|
7
|
+
import { IPlatform } from '../../sdkFactory/types';
|
|
8
|
+
/**
|
|
9
|
+
* PushManager factory:
|
|
10
|
+
* - for server-side if key is not provided in settings.
|
|
11
|
+
* - for client-side, with support for multiple clients, if key is provided in settings
|
|
12
|
+
*/
|
|
13
|
+
export default function pushManagerFactory(pollingManager: IPollingManager, storage: IStorageSync, readiness: IReadinessManager, fetchAuthV2: IFetchAuthV2, platform: IPlatform, settings: ISettings): IPushManagerCS | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pushManagerSSFactory: (params: import("../types").ISyncManagerFactoryParams, pollingManager: import("../polling/types").IPollingManager) => import("./types").IPushManager | undefined;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { IMySegmentsUpdateData, IMySegmentsUpdateV2Data, ISegmentUpdateData, ISplitUpdateData, ISplitKillData } from './SSEHandler/types';
|
|
2
2
|
import { ITask } from '../types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { IFetchAuth } from '../../services/types';
|
|
6
|
-
import { IStorageSync } from '../../storages/types';
|
|
7
|
-
import { IEventEmitter, ISettings } from '../../types';
|
|
8
|
-
import { IPlatform } from '../../sdkFactory/types';
|
|
3
|
+
import { ISegmentsSyncTask } from '../polling/types';
|
|
4
|
+
import { IEventEmitter } from '../../types';
|
|
9
5
|
import { ControlType } from './constants';
|
|
10
6
|
export declare type PUSH_SUBSYSTEM_UP = 'PUSH_SUBSYSTEM_UP';
|
|
11
7
|
export declare type PUSH_SUBSYSTEM_DOWN = 'PUSH_SUBSYSTEM_DOWN';
|
|
@@ -30,26 +26,10 @@ export interface IPushEventEmitter extends IEventEmitter {
|
|
|
30
26
|
emit<T extends IPushEvent>(event: T, parsedData?: IParsedData<T>, channel?: T extends MY_SEGMENTS_UPDATE ? string : undefined): boolean;
|
|
31
27
|
}
|
|
32
28
|
/**
|
|
33
|
-
* PushManager
|
|
29
|
+
* PushManager
|
|
34
30
|
*/
|
|
35
31
|
export interface IPushManager extends ITask, IPushEventEmitter {
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* PushManager for client-side with support for multiple clients
|
|
39
|
-
*/
|
|
40
|
-
export interface IPushManagerCS extends IPushManager {
|
|
41
32
|
add(userKey: string, mySegmentsSyncTask: ISegmentsSyncTask): void;
|
|
42
33
|
remove(userKey: string): void;
|
|
43
34
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Signature of push manager factory/constructor
|
|
46
|
-
*/
|
|
47
|
-
export declare type IPushManagerFactoryParams = [
|
|
48
|
-
pollingManager: IPollingManager,
|
|
49
|
-
storage: IStorageSync,
|
|
50
|
-
readiness: IReadinessManager,
|
|
51
|
-
fetchAuth: IFetchAuth,
|
|
52
|
-
platform: IPlatform,
|
|
53
|
-
settings: ISettings
|
|
54
|
-
];
|
|
55
35
|
export {};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ISettings } from '../../types';
|
|
4
|
-
export declare function submitterManagerFactory(settings: ISettings, storage: IStorageSync, splitApi: ISplitApi): import("../types").ISyncTask<[], any>;
|
|
1
|
+
import { ISyncManagerFactoryParams } from '../types';
|
|
2
|
+
export declare function submitterManagerFactory(params: ISyncManagerFactoryParams): import("../types").ISyncTask<[], any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ISyncTask, ITimeTracker } from '../types';
|
|
2
|
+
import { IPostMetricsUsage } from '../../services/types';
|
|
3
|
+
import { IStorageSync, TelemetryCacheSync } from '../../storages/types';
|
|
4
|
+
import { TelemetryStatsPayload } from './types';
|
|
5
|
+
import { ILogger } from '../../logger/types';
|
|
6
|
+
/**
|
|
7
|
+
* Converts `impressions` data from cache into request payload.
|
|
8
|
+
*/
|
|
9
|
+
export declare function telemetryCacheAdapter(telemetryCache: TelemetryCacheSync, storage: IStorageSync): {
|
|
10
|
+
isEmpty(): boolean;
|
|
11
|
+
clear(): void;
|
|
12
|
+
state(): TelemetryStatsPayload;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Sync task that periodically posts impressions data
|
|
16
|
+
*/
|
|
17
|
+
export declare function telemetrySyncTaskFactory(log: ILogger, postMetricsUsage: IPostMetricsUsage, telemetryCache: TelemetryCacheSync, telemetryRefreshRate: number, latencyTracker: ITimeTracker, storage: IStorageSync): ISyncTask;
|