@splitsoftware/splitio-commons 2.0.0-rc.3 → 2.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/types/index.d.ts +5 -5
- package/types/splitio.d.ts +2293 -0
- package/types/consent/index.d.ts +0 -2
- package/types/consent/sdkUserConsent.d.ts +0 -13
- package/types/dtos/types.d.ts +0 -209
- package/types/evaluator/Engine.d.ts +0 -15
- package/types/evaluator/combiners/and.d.ts +0 -4
- package/types/evaluator/combiners/ifelseif.d.ts +0 -3
- package/types/evaluator/condition/engineUtils.d.ts +0 -11
- package/types/evaluator/condition/index.d.ts +0 -6
- package/types/evaluator/convertions/index.d.ts +0 -2
- package/types/evaluator/index.d.ts +0 -8
- package/types/evaluator/matchers/all.d.ts +0 -1
- package/types/evaluator/matchers/between.d.ts +0 -2
- package/types/evaluator/matchers/boolean.d.ts +0 -1
- package/types/evaluator/matchers/cont_all.d.ts +0 -1
- package/types/evaluator/matchers/cont_any.d.ts +0 -1
- package/types/evaluator/matchers/cont_str.d.ts +0 -1
- package/types/evaluator/matchers/dependency.d.ts +0 -5
- package/types/evaluator/matchers/eq.d.ts +0 -1
- package/types/evaluator/matchers/eq_set.d.ts +0 -1
- package/types/evaluator/matchers/ew.d.ts +0 -1
- package/types/evaluator/matchers/gte.d.ts +0 -1
- package/types/evaluator/matchers/index.d.ts +0 -7
- package/types/evaluator/matchers/large_segment.d.ts +0 -5
- package/types/evaluator/matchers/lte.d.ts +0 -1
- package/types/evaluator/matchers/matcherTypes.d.ts +0 -10
- package/types/evaluator/matchers/part_of.d.ts +0 -1
- package/types/evaluator/matchers/segment.d.ts +0 -5
- package/types/evaluator/matchers/semver_between.d.ts +0 -2
- package/types/evaluator/matchers/semver_eq.d.ts +0 -1
- package/types/evaluator/matchers/semver_gte.d.ts +0 -1
- package/types/evaluator/matchers/semver_inlist.d.ts +0 -1
- package/types/evaluator/matchers/semver_lte.d.ts +0 -1
- package/types/evaluator/matchers/string.d.ts +0 -1
- package/types/evaluator/matchers/sw.d.ts +0 -1
- package/types/evaluator/matchers/whitelist.d.ts +0 -1
- package/types/evaluator/matchersTransform/index.d.ts +0 -6
- package/types/evaluator/matchersTransform/segment.d.ts +0 -5
- package/types/evaluator/matchersTransform/unaryNumeric.d.ts +0 -5
- package/types/evaluator/matchersTransform/whitelist.d.ts +0 -5
- package/types/evaluator/parser/index.d.ts +0 -5
- package/types/evaluator/treatments/index.d.ts +0 -8
- package/types/evaluator/types.d.ts +0 -28
- package/types/evaluator/value/index.d.ts +0 -7
- package/types/evaluator/value/sanitize.d.ts +0 -7
- package/types/integrations/pluggable.d.ts +0 -11
- package/types/integrations/types.d.ts +0 -18
- package/types/listeners/browser.d.ts +0 -40
- package/types/listeners/node.d.ts +0 -22
- package/types/listeners/types.d.ts +0 -4
- package/types/logger/browser/DebugLogger.d.ts +0 -2
- package/types/logger/browser/ErrorLogger.d.ts +0 -2
- package/types/logger/browser/InfoLogger.d.ts +0 -2
- package/types/logger/browser/WarnLogger.d.ts +0 -2
- package/types/logger/constants.d.ts +0 -134
- package/types/logger/index.d.ts +0 -21
- package/types/logger/messages/debug.d.ts +0 -1
- package/types/logger/messages/error.d.ts +0 -1
- package/types/logger/messages/info.d.ts +0 -1
- package/types/logger/messages/warn.d.ts +0 -1
- package/types/logger/sdkLogger.d.ts +0 -8
- package/types/logger/types.d.ts +0 -17
- package/types/readiness/constants.d.ts +0 -7
- package/types/readiness/readinessManager.d.ts +0 -6
- package/types/readiness/sdkReadinessManager.d.ts +0 -10
- package/types/readiness/types.d.ts +0 -67
- package/types/sdkClient/client.d.ts +0 -6
- package/types/sdkClient/clientAttributesDecoration.d.ts +0 -55
- package/types/sdkClient/clientCS.d.ts +0 -9
- package/types/sdkClient/clientInputValidation.d.ts +0 -7
- package/types/sdkClient/identity.d.ts +0 -2
- package/types/sdkClient/sdkClient.d.ts +0 -6
- package/types/sdkClient/sdkClientMethod.d.ts +0 -6
- package/types/sdkClient/sdkClientMethodCS.d.ts +0 -7
- package/types/sdkFactory/index.d.ts +0 -6
- package/types/sdkFactory/types.d.ts +0 -85
- package/types/sdkManager/index.d.ts +0 -4
- package/types/services/decorateHeaders.d.ts +0 -2
- package/types/services/splitApi.d.ts +0 -12
- package/types/services/splitHttpClient.d.ts +0 -10
- package/types/services/types.d.ts +0 -54
- package/types/storages/AbstractMySegmentsCacheSync.d.ts +0 -39
- package/types/storages/AbstractSplitsCacheAsync.d.ts +0 -38
- package/types/storages/AbstractSplitsCacheSync.d.ts +0 -43
- package/types/storages/KeyBuilder.d.ts +0 -22
- package/types/storages/KeyBuilderCS.d.ts +0 -20
- package/types/storages/KeyBuilderSS.d.ts +0 -20
- package/types/storages/dataLoader.d.ts +0 -10
- package/types/storages/findLatencyIndex.d.ts +0 -7
- package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +0 -15
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +0 -54
- package/types/storages/inLocalStorage/constants.d.ts +0 -2
- package/types/storages/inLocalStorage/index.d.ts +0 -8
- package/types/storages/inMemory/AttributesCacheInMemory.d.ts +0 -44
- package/types/storages/inMemory/EventsCacheInMemory.d.ts +0 -35
- package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +0 -28
- package/types/storages/inMemory/ImpressionsCacheInMemory.d.ts +0 -30
- package/types/storages/inMemory/InMemoryStorage.d.ts +0 -10
- package/types/storages/inMemory/InMemoryStorageCS.d.ts +0 -10
- package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +0 -16
- package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +0 -17
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +0 -27
- package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +0 -71
- package/types/storages/inMemory/UniqueKeysCacheInMemory.d.ts +0 -34
- package/types/storages/inMemory/UniqueKeysCacheInMemoryCS.d.ts +0 -35
- package/types/storages/inRedis/EventsCacheInRedis.d.ts +0 -32
- package/types/storages/inRedis/ImpressionCountsCacheInRedis.d.ts +0 -17
- package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +0 -17
- package/types/storages/inRedis/RedisAdapter.d.ts +0 -24
- package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +0 -21
- package/types/storages/inRedis/SplitsCacheInRedis.d.ts +0 -95
- package/types/storages/inRedis/TelemetryCacheInRedis.d.ts +0 -35
- package/types/storages/inRedis/UniqueKeysCacheInRedis.d.ts +0 -22
- package/types/storages/inRedis/constants.d.ts +0 -4
- package/types/storages/inRedis/index.d.ts +0 -10
- package/types/storages/pluggable/EventsCachePluggable.d.ts +0 -38
- package/types/storages/pluggable/ImpressionCountsCachePluggable.d.ts +0 -16
- package/types/storages/pluggable/ImpressionsCachePluggable.d.ts +0 -34
- package/types/storages/pluggable/SegmentsCachePluggable.d.ts +0 -42
- package/types/storages/pluggable/SplitsCachePluggable.d.ts +0 -98
- package/types/storages/pluggable/TelemetryCachePluggable.d.ts +0 -34
- package/types/storages/pluggable/UniqueKeysCachePluggable.d.ts +0 -20
- package/types/storages/pluggable/constants.d.ts +0 -1
- package/types/storages/pluggable/inMemoryWrapper.d.ts +0 -12
- package/types/storages/pluggable/index.d.ts +0 -9
- package/types/storages/pluggable/wrapperAdapter.d.ts +0 -12
- package/types/storages/types.d.ts +0 -407
- package/types/storages/utils.d.ts +0 -8
- package/types/sync/offline/LocalhostFromObject.d.ts +0 -1
- package/types/sync/offline/splitsParser/parseCondition.d.ts +0 -7
- package/types/sync/offline/splitsParser/splitsParserFromSettings.d.ts +0 -3
- package/types/sync/offline/splitsParser/types.d.ts +0 -3
- package/types/sync/offline/syncManagerOffline.d.ts +0 -10
- package/types/sync/offline/syncTasks/fromObjectSyncTask.d.ts +0 -17
- package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/segmentChangesFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/splitChangesFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/types.d.ts +0 -5
- package/types/sync/polling/pollingManagerCS.d.ts +0 -7
- package/types/sync/polling/pollingManagerSS.d.ts +0 -6
- package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +0 -9
- package/types/sync/polling/syncTasks/segmentsSyncTask.d.ts +0 -9
- package/types/sync/polling/syncTasks/splitsSyncTask.d.ts +0 -9
- package/types/sync/polling/types.d.ts +0 -33
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +0 -14
- package/types/sync/polling/updaters/segmentChangesUpdater.d.ts +0 -18
- package/types/sync/polling/updaters/splitChangesUpdater.d.ts +0 -41
- package/types/sync/streaming/AuthClient/index.d.ts +0 -12
- package/types/sync/streaming/AuthClient/types.d.ts +0 -17
- package/types/sync/streaming/SSEClient/index.d.ts +0 -34
- package/types/sync/streaming/SSEClient/types.d.ts +0 -11
- package/types/sync/streaming/SSEHandler/NotificationKeeper.d.ts +0 -14
- package/types/sync/streaming/SSEHandler/NotificationParser.d.ts +0 -20
- package/types/sync/streaming/SSEHandler/index.d.ts +0 -11
- package/types/sync/streaming/SSEHandler/types.d.ts +0 -72
- package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +0 -9
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +0 -9
- package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +0 -14
- package/types/sync/streaming/UpdateWorkers/constants.d.ts +0 -3
- package/types/sync/streaming/UpdateWorkers/types.d.ts +0 -4
- package/types/sync/streaming/constants.d.ts +0 -34
- package/types/sync/streaming/parseUtils.d.ts +0 -34
- package/types/sync/streaming/pushManager.d.ts +0 -9
- package/types/sync/streaming/types.d.ts +0 -35
- package/types/sync/submitters/eventsSubmitter.d.ts +0 -5
- package/types/sync/submitters/impressionCountsSubmitter.d.ts +0 -10
- package/types/sync/submitters/impressionsSubmitter.d.ts +0 -11
- package/types/sync/submitters/submitter.d.ts +0 -12
- package/types/sync/submitters/submitterManager.d.ts +0 -3
- package/types/sync/submitters/telemetrySubmitter.d.ts +0 -17
- package/types/sync/submitters/types.d.ts +0 -217
- package/types/sync/submitters/uniqueKeysSubmitter.d.ts +0 -5
- package/types/sync/syncManagerOnline.d.ts +0 -13
- package/types/sync/syncTask.d.ts +0 -13
- package/types/sync/types.d.ts +0 -43
- package/types/trackers/eventTracker.d.ts +0 -10
- package/types/trackers/impressionObserver/ImpressionObserver.d.ts +0 -8
- package/types/trackers/impressionObserver/buildKey.d.ts +0 -2
- package/types/trackers/impressionObserver/impressionObserverCS.d.ts +0 -4
- package/types/trackers/impressionObserver/impressionObserverSS.d.ts +0 -4
- package/types/trackers/impressionObserver/types.d.ts +0 -4
- package/types/trackers/impressionsTracker.d.ts +0 -13
- package/types/trackers/strategy/strategyDebug.d.ts +0 -9
- package/types/trackers/strategy/strategyNone.d.ts +0 -10
- package/types/trackers/strategy/strategyOptimized.d.ts +0 -11
- package/types/trackers/telemetryTracker.d.ts +0 -3
- package/types/trackers/types.d.ts +0 -68
- package/types/trackers/uniqueKeysTracker.d.ts +0 -13
- package/types/types.d.ts +0 -1398
- package/types/utils/Backoff.d.ts +0 -25
- package/types/utils/LRUCache/LinkedList.d.ts +0 -34
- package/types/utils/LRUCache/index.d.ts +0 -15
- package/types/utils/MinEventEmitter.d.ts +0 -12
- package/types/utils/MinEvents.d.ts +0 -4
- package/types/utils/Semver.d.ts +0 -15
- package/types/utils/base64/index.d.ts +0 -30
- package/types/utils/constants/browser.d.ts +0 -1
- package/types/utils/constants/index.d.ts +0 -83
- package/types/utils/decompress/index.d.ts +0 -16
- package/types/utils/env/isLocalStorageAvailable.d.ts +0 -1
- package/types/utils/env/isNode.d.ts +0 -5
- package/types/utils/inputValidation/apiKey.d.ts +0 -7
- package/types/utils/inputValidation/attribute.d.ts +0 -2
- package/types/utils/inputValidation/attributes.d.ts +0 -4
- package/types/utils/inputValidation/event.d.ts +0 -2
- package/types/utils/inputValidation/eventProperties.d.ts +0 -6
- package/types/utils/inputValidation/eventValue.d.ts +0 -2
- package/types/utils/inputValidation/index.d.ts +0 -13
- package/types/utils/inputValidation/isOperational.d.ts +0 -4
- package/types/utils/inputValidation/key.d.ts +0 -3
- package/types/utils/inputValidation/preloadedData.d.ts +0 -3
- package/types/utils/inputValidation/split.d.ts +0 -2
- package/types/utils/inputValidation/splitExistence.d.ts +0 -7
- package/types/utils/inputValidation/splits.d.ts +0 -2
- package/types/utils/inputValidation/trafficType.d.ts +0 -2
- package/types/utils/inputValidation/trafficTypeExistence.d.ts +0 -9
- package/types/utils/jwt/index.d.ts +0 -5
- package/types/utils/jwt/types.d.ts +0 -5
- package/types/utils/key/index.d.ts +0 -8
- package/types/utils/labels/index.d.ts +0 -8
- package/types/utils/lang/binarySearch.d.ts +0 -9
- package/types/utils/lang/getFnName.d.ts +0 -4
- package/types/utils/lang/getGlobal.d.ts +0 -4
- package/types/utils/lang/index.d.ts +0 -105
- package/types/utils/lang/objectAssign.d.ts +0 -6
- package/types/utils/lang/sets.d.ts +0 -3
- package/types/utils/murmur3/common.d.ts +0 -12
- package/types/utils/murmur3/legacy.d.ts +0 -2
- package/types/utils/murmur3/murmur3.d.ts +0 -2
- package/types/utils/murmur3/murmur3_128.d.ts +0 -6
- package/types/utils/murmur3/murmur3_128_x86.d.ts +0 -7
- package/types/utils/murmur3/murmur3_64.d.ts +0 -10
- package/types/utils/murmur3/utfx.d.ts +0 -27
- package/types/utils/promise/thenable.d.ts +0 -1
- package/types/utils/promise/timeout.d.ts +0 -1
- package/types/utils/promise/wrapper.d.ts +0 -21
- package/types/utils/settingsValidation/consent.d.ts +0 -6
- package/types/utils/settingsValidation/impressionsMode.d.ts +0 -3
- package/types/utils/settingsValidation/index.d.ts +0 -50
- package/types/utils/settingsValidation/integrations/common.d.ts +0 -14
- package/types/utils/settingsValidation/integrations/configurable.d.ts +0 -13
- package/types/utils/settingsValidation/integrations/pluggable.d.ts +0 -13
- package/types/utils/settingsValidation/logger/builtinLogger.d.ts +0 -10
- package/types/utils/settingsValidation/logger/commons.d.ts +0 -9
- package/types/utils/settingsValidation/logger/pluggableLogger.d.ts +0 -11
- package/types/utils/settingsValidation/mode.d.ts +0 -5
- package/types/utils/settingsValidation/runtime.d.ts +0 -2
- package/types/utils/settingsValidation/splitFilters.d.ts +0 -17
- package/types/utils/settingsValidation/storage/storageCS.d.ts +0 -21
- package/types/utils/settingsValidation/types.d.ts +0 -30
- package/types/utils/settingsValidation/url.d.ts +0 -10
- package/types/utils/time/index.d.ts +0 -4
- package/types/utils/timeTracker/now/browser.d.ts +0 -1
- package/types/utils/timeTracker/now/node.d.ts +0 -1
- package/types/utils/timeTracker/timer.d.ts +0 -1
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { IMetadata } from '../../dtos/types';
|
|
2
|
-
import { SplitIO } from '../../types';
|
|
3
|
-
import { ISyncTask } from '../types';
|
|
4
|
-
export declare type ImpressionsPayload = {
|
|
5
|
-
/** Split name */
|
|
6
|
-
f: string;
|
|
7
|
-
/** Key Impressions */
|
|
8
|
-
i: {
|
|
9
|
-
/** User Key */
|
|
10
|
-
k: string;
|
|
11
|
-
/** Treatment */
|
|
12
|
-
t: string;
|
|
13
|
-
/** Timestamp */
|
|
14
|
-
m: number;
|
|
15
|
-
/** ChangeNumber */
|
|
16
|
-
c: number;
|
|
17
|
-
/** Rule label */
|
|
18
|
-
r?: string;
|
|
19
|
-
/** Bucketing Key */
|
|
20
|
-
b?: string;
|
|
21
|
-
/** Previous time */
|
|
22
|
-
pt?: number;
|
|
23
|
-
}[];
|
|
24
|
-
}[];
|
|
25
|
-
export declare type ImpressionCountsPayload = {
|
|
26
|
-
pf: {
|
|
27
|
-
/** Split name */
|
|
28
|
-
f: string;
|
|
29
|
-
/** Time Frame */
|
|
30
|
-
m: number;
|
|
31
|
-
/** Count */
|
|
32
|
-
rc: number;
|
|
33
|
-
}[];
|
|
34
|
-
};
|
|
35
|
-
export declare type UniqueKeysItemSs = {
|
|
36
|
-
/** Split name */
|
|
37
|
-
f: string;
|
|
38
|
-
/** keyNames */
|
|
39
|
-
ks: string[];
|
|
40
|
-
};
|
|
41
|
-
export declare type UniqueKeysPayloadSs = {
|
|
42
|
-
keys: UniqueKeysItemSs[];
|
|
43
|
-
};
|
|
44
|
-
export declare type UniqueKeysPayloadCs = {
|
|
45
|
-
keys: {
|
|
46
|
-
/** keyNames */
|
|
47
|
-
k: string;
|
|
48
|
-
/** Split name */
|
|
49
|
-
fs: string[];
|
|
50
|
-
}[];
|
|
51
|
-
};
|
|
52
|
-
export declare type StoredImpressionWithMetadata = {
|
|
53
|
-
/** Metadata */
|
|
54
|
-
m: IMetadata;
|
|
55
|
-
/** Stored impression */
|
|
56
|
-
i: {
|
|
57
|
-
/** keyName */
|
|
58
|
-
k: string;
|
|
59
|
-
/** bucketingKey */
|
|
60
|
-
b?: string;
|
|
61
|
-
/** Split name */
|
|
62
|
-
f: string;
|
|
63
|
-
/** treatment */
|
|
64
|
-
t: string;
|
|
65
|
-
/** label */
|
|
66
|
-
r: string;
|
|
67
|
-
/** changeNumber */
|
|
68
|
-
c: number;
|
|
69
|
-
/** time */
|
|
70
|
-
m: number;
|
|
71
|
-
/** previous time */
|
|
72
|
-
pt?: number;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
export declare type StoredEventWithMetadata = {
|
|
76
|
-
/** Metadata */
|
|
77
|
-
m: IMetadata;
|
|
78
|
-
/** Stored event */
|
|
79
|
-
e: SplitIO.EventData;
|
|
80
|
-
};
|
|
81
|
-
export declare type MultiMethodLatencies = Map<string, MethodLatencies>;
|
|
82
|
-
export declare type MultiMethodExceptions = Map<string, MethodExceptions>;
|
|
83
|
-
export declare type MultiConfigs = Map<string, TelemetryConfigStats>;
|
|
84
|
-
/**
|
|
85
|
-
* Telemetry usage stats
|
|
86
|
-
*/
|
|
87
|
-
export declare type QUEUED = 0;
|
|
88
|
-
export declare type DROPPED = 1;
|
|
89
|
-
export declare type DEDUPED = 2;
|
|
90
|
-
export declare type ImpressionDataType = QUEUED | DROPPED | DEDUPED;
|
|
91
|
-
export declare type EventDataType = QUEUED | DROPPED;
|
|
92
|
-
export declare type UpdatesFromSSEEnum = SPLITS | MEMBERSHIPS;
|
|
93
|
-
export declare type SPLITS = 'sp';
|
|
94
|
-
export declare type IMPRESSIONS = 'im';
|
|
95
|
-
export declare type IMPRESSIONS_COUNT = 'ic';
|
|
96
|
-
export declare type EVENTS = 'ev';
|
|
97
|
-
export declare type TELEMETRY = 'te';
|
|
98
|
-
export declare type TOKEN = 'to';
|
|
99
|
-
export declare type SEGMENT = 'se';
|
|
100
|
-
export declare type MEMBERSHIPS = 'ms';
|
|
101
|
-
export declare type OperationType = SPLITS | IMPRESSIONS | IMPRESSIONS_COUNT | EVENTS | TELEMETRY | TOKEN | SEGMENT | MEMBERSHIPS;
|
|
102
|
-
export declare type LastSync = Partial<Record<OperationType, number | undefined>>;
|
|
103
|
-
export declare type HttpErrors = Partial<Record<OperationType, {
|
|
104
|
-
[statusCode: string]: number;
|
|
105
|
-
}>>;
|
|
106
|
-
export declare type HttpLatencies = Partial<Record<OperationType, Array<number>>>;
|
|
107
|
-
export declare type TREATMENT = 't';
|
|
108
|
-
export declare type TREATMENTS = 'ts';
|
|
109
|
-
export declare type TREATMENT_WITH_CONFIG = 'tc';
|
|
110
|
-
export declare type TREATMENTS_WITH_CONFIG = 'tcs';
|
|
111
|
-
export declare type TRACK = 'tr';
|
|
112
|
-
export declare type TREATMENTS_BY_FLAGSET = 'tf';
|
|
113
|
-
export declare type TREATMENTS_BY_FLAGSETS = 'tfs';
|
|
114
|
-
export declare type TREATMENTS_WITH_CONFIG_BY_FLAGSET = 'tcf';
|
|
115
|
-
export declare type TREATMENTS_WITH_CONFIG_BY_FLAGSETS = 'tcfs';
|
|
116
|
-
export declare type Method = TREATMENT | TREATMENTS | TREATMENT_WITH_CONFIG | TREATMENTS_WITH_CONFIG | TRACK | TREATMENTS_BY_FLAGSET | TREATMENTS_BY_FLAGSETS | TREATMENTS_WITH_CONFIG_BY_FLAGSET | TREATMENTS_WITH_CONFIG_BY_FLAGSETS;
|
|
117
|
-
export declare type MethodLatencies = Partial<Record<Method, Array<number>>>;
|
|
118
|
-
export declare type MethodExceptions = Partial<Record<Method, number>>;
|
|
119
|
-
export declare type CONNECTION_ESTABLISHED = 0;
|
|
120
|
-
export declare type OCCUPANCY_PRI = 10;
|
|
121
|
-
export declare type OCCUPANCY_SEC = 20;
|
|
122
|
-
export declare type STREAMING_STATUS = 30;
|
|
123
|
-
export declare type SSE_CONNECTION_ERROR = 40;
|
|
124
|
-
export declare type TOKEN_REFRESH = 50;
|
|
125
|
-
export declare type ABLY_ERROR = 60;
|
|
126
|
-
export declare type SYNC_MODE_UPDATE = 70;
|
|
127
|
-
export declare type StreamingEventType = CONNECTION_ESTABLISHED | OCCUPANCY_PRI | OCCUPANCY_SEC | STREAMING_STATUS | SSE_CONNECTION_ERROR | TOKEN_REFRESH | ABLY_ERROR | SYNC_MODE_UPDATE;
|
|
128
|
-
export declare type StreamingEvent = {
|
|
129
|
-
e: StreamingEventType;
|
|
130
|
-
d?: number;
|
|
131
|
-
t: number;
|
|
132
|
-
};
|
|
133
|
-
export declare type TelemetryUsageStats = {
|
|
134
|
-
mL?: MethodLatencies;
|
|
135
|
-
mE?: MethodExceptions;
|
|
136
|
-
};
|
|
137
|
-
export declare type UpdatesFromSSE = {
|
|
138
|
-
sp?: number;
|
|
139
|
-
ms?: number;
|
|
140
|
-
mls?: number;
|
|
141
|
-
};
|
|
142
|
-
export declare type TelemetryUsageStatsPayload = TelemetryUsageStats & {
|
|
143
|
-
lS: LastSync;
|
|
144
|
-
hE: HttpErrors;
|
|
145
|
-
hL: HttpLatencies;
|
|
146
|
-
tR: number;
|
|
147
|
-
aR: number;
|
|
148
|
-
iQ: number;
|
|
149
|
-
iDe: number;
|
|
150
|
-
iDr: number;
|
|
151
|
-
spC?: number;
|
|
152
|
-
seC?: number;
|
|
153
|
-
skC?: number;
|
|
154
|
-
lsC?: number;
|
|
155
|
-
lskC?: number;
|
|
156
|
-
sL?: number;
|
|
157
|
-
eQ: number;
|
|
158
|
-
eD: number;
|
|
159
|
-
sE: Array<StreamingEvent>;
|
|
160
|
-
t?: Array<string>;
|
|
161
|
-
ufs?: UpdatesFromSSE;
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Telemetry config stats
|
|
165
|
-
*/
|
|
166
|
-
export declare type STANDALONE_ENUM = 0;
|
|
167
|
-
export declare type CONSUMER_ENUM = 1;
|
|
168
|
-
export declare type CONSUMER_PARTIAL_ENUM = 2;
|
|
169
|
-
export declare type OperationMode = STANDALONE_ENUM | CONSUMER_ENUM | CONSUMER_PARTIAL_ENUM;
|
|
170
|
-
export declare type OPTIMIZED_ENUM = 0;
|
|
171
|
-
export declare type DEBUG_ENUM = 1;
|
|
172
|
-
export declare type NONE_ENUM = 2;
|
|
173
|
-
export declare type ImpressionsMode = OPTIMIZED_ENUM | DEBUG_ENUM | NONE_ENUM;
|
|
174
|
-
export declare type RefreshRates = {
|
|
175
|
-
sp: number;
|
|
176
|
-
se?: number;
|
|
177
|
-
ms?: number;
|
|
178
|
-
im: number;
|
|
179
|
-
ev: number;
|
|
180
|
-
te: number;
|
|
181
|
-
};
|
|
182
|
-
export declare type UrlOverrides = {
|
|
183
|
-
s: boolean;
|
|
184
|
-
e: boolean;
|
|
185
|
-
a: boolean;
|
|
186
|
-
st: boolean;
|
|
187
|
-
t: boolean;
|
|
188
|
-
};
|
|
189
|
-
export declare type TelemetryConfigStats = {
|
|
190
|
-
oM: OperationMode;
|
|
191
|
-
st: 'memory' | 'redis' | 'pluggable' | 'localstorage';
|
|
192
|
-
aF: number;
|
|
193
|
-
rF: number;
|
|
194
|
-
t?: Array<string>;
|
|
195
|
-
};
|
|
196
|
-
export declare type TelemetryConfigStatsPayload = TelemetryConfigStats & {
|
|
197
|
-
sE: boolean;
|
|
198
|
-
rR: RefreshRates;
|
|
199
|
-
uO: UrlOverrides;
|
|
200
|
-
iQ: number;
|
|
201
|
-
eQ: number;
|
|
202
|
-
iM: ImpressionsMode;
|
|
203
|
-
iL: boolean;
|
|
204
|
-
hP: boolean;
|
|
205
|
-
tR: number;
|
|
206
|
-
tC?: number;
|
|
207
|
-
nR: number;
|
|
208
|
-
i?: Array<string>;
|
|
209
|
-
uC: number;
|
|
210
|
-
fsT: number;
|
|
211
|
-
fsI: number;
|
|
212
|
-
};
|
|
213
|
-
export interface ISubmitterManager extends ISyncTask {
|
|
214
|
-
start(onlyTelemetry?: boolean): void;
|
|
215
|
-
stop(allExceptTelemetry?: boolean): void;
|
|
216
|
-
execute(onlyTelemetry?: boolean): Promise<any>;
|
|
217
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ISyncManagerCS } from './types';
|
|
2
|
-
import { IPushManager } from './streaming/types';
|
|
3
|
-
import { IPollingManager } from './polling/types';
|
|
4
|
-
import { ISdkFactoryContextSync } from '../sdkFactory/types';
|
|
5
|
-
/**
|
|
6
|
-
* Online SyncManager factory.
|
|
7
|
-
* Can be used for server-side API, and client-side API with or without multiple clients.
|
|
8
|
-
*
|
|
9
|
-
* @param pollingManagerFactory allows to specialize the SyncManager for server-side or client-side API by passing
|
|
10
|
-
* `pollingManagerSSFactory` or `pollingManagerCSFactory` respectively.
|
|
11
|
-
* @param pushManagerFactory optional to build a SyncManager with or without streaming support
|
|
12
|
-
*/
|
|
13
|
-
export declare function syncManagerOnlineFactory(pollingManagerFactory?: (params: ISdkFactoryContextSync) => IPollingManager, pushManagerFactory?: (params: ISdkFactoryContextSync, pollingManager: IPollingManager) => IPushManager | undefined): (params: ISdkFactoryContextSync) => ISyncManagerCS;
|
package/types/sync/syncTask.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../logger/types';
|
|
2
|
-
import { ISyncTask } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Creates an object that handles the periodic execution of a given task via "start" and "stop" methods.
|
|
5
|
-
* The task can be also executed by calling the "execute" method. Multiple calls run sequentially to avoid race conditions (e.g., submitters executed on SDK destroy or full queue, while periodic execution is pending).
|
|
6
|
-
*
|
|
7
|
-
* @param log Logger instance.
|
|
8
|
-
* @param task Task to execute that returns a promise that NEVER REJECTS. Otherwise, periodic execution can result in Unhandled Promise Rejections.
|
|
9
|
-
* @param period Period in milliseconds to execute the task.
|
|
10
|
-
* @param taskName Optional task name for logging.
|
|
11
|
-
* @returns A sync task that wraps the given task.
|
|
12
|
-
*/
|
|
13
|
-
export declare function syncTaskFactory<Input extends any[], Output = any>(log: ILogger, task: (...args: Input) => Promise<Output>, period: number, taskName?: string): ISyncTask<Input, Output>;
|
package/types/sync/types.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { IReadinessManager } from '../readiness/types';
|
|
2
|
-
import { IStorageSync } from '../storages/types';
|
|
3
|
-
import { IPollingManager } from './polling/types';
|
|
4
|
-
import { IPushManager } from './streaming/types';
|
|
5
|
-
import { ISubmitterManager } from './submitters/types';
|
|
6
|
-
export interface ITask<Input extends any[] = []> {
|
|
7
|
-
/**
|
|
8
|
-
* Start periodic execution of the task
|
|
9
|
-
*/
|
|
10
|
-
start(...args: Input): any;
|
|
11
|
-
/**
|
|
12
|
-
* Stop periodic execution of the task
|
|
13
|
-
*/
|
|
14
|
-
stop(): any;
|
|
15
|
-
/**
|
|
16
|
-
* Returns true if the task periodic execution is running
|
|
17
|
-
*/
|
|
18
|
-
isRunning(): boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ISyncTask<Input extends any[] = [], Output = any> extends ITask<Input> {
|
|
21
|
-
/**
|
|
22
|
-
* Start periodic execution of the task, and returns the promise of the first execution
|
|
23
|
-
*/
|
|
24
|
-
start(...args: Input): Promise<Output> | void;
|
|
25
|
-
/**
|
|
26
|
-
* Explicitly executes the task. It can be invoked multiple times. Returns a promise when the task is resolved
|
|
27
|
-
*/
|
|
28
|
-
execute(...args: Input): Promise<Output>;
|
|
29
|
-
/**
|
|
30
|
-
* Returns true if the task is being executed
|
|
31
|
-
*/
|
|
32
|
-
isExecuting(): boolean;
|
|
33
|
-
}
|
|
34
|
-
/** SyncManager */
|
|
35
|
-
export interface ISyncManager extends ITask {
|
|
36
|
-
flush(): Promise<any>;
|
|
37
|
-
pushManager?: IPushManager;
|
|
38
|
-
pollingManager?: IPollingManager;
|
|
39
|
-
submitterManager?: ISubmitterManager;
|
|
40
|
-
}
|
|
41
|
-
export interface ISyncManagerCS extends ISyncManager {
|
|
42
|
-
shared(matchingKey: string, readinessManager: IReadinessManager, storage: IStorageSync): Pick<ISyncManager, 'stop' | 'flush'> | undefined;
|
|
43
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IEventsCacheBase, ITelemetryCacheAsync, ITelemetryCacheSync } from '../storages/types';
|
|
2
|
-
import { IEventsHandler, IEventTracker } from './types';
|
|
3
|
-
import { ISettings } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Event tracker stores events in cache and pass them to the integrations manager if provided.
|
|
6
|
-
*
|
|
7
|
-
* @param eventsCache cache to save events
|
|
8
|
-
* @param integrationsManager optional event handler used for integrations
|
|
9
|
-
*/
|
|
10
|
-
export declare function eventTrackerFactory(settings: ISettings, eventsCache: IEventsCacheBase, whenInit: (cb: () => void) => void, integrationsManager?: IEventsHandler, telemetryCache?: ITelemetryCacheSync | ITelemetryCacheAsync): IEventTracker;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ImpressionDTO } from '../../types';
|
|
2
|
-
import { IImpressionObserver } from './types';
|
|
3
|
-
export declare class ImpressionObserver<K extends string | number = string> implements IImpressionObserver {
|
|
4
|
-
private cache;
|
|
5
|
-
private hasher;
|
|
6
|
-
constructor(size: number, hasher: (impression: ImpressionDTO) => K);
|
|
7
|
-
testAndSet(impression: ImpressionDTO): number | undefined;
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IImpressionsCacheBase, ITelemetryCacheSync, ITelemetryCacheAsync } from '../storages/types';
|
|
2
|
-
import { IImpressionsHandler, IImpressionsTracker, IStrategy } from './types';
|
|
3
|
-
import { ISettings } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Impressions tracker stores impressions in cache and pass them to the listener and integrations manager if provided.
|
|
6
|
-
*
|
|
7
|
-
* @param impressionsCache cache to save impressions
|
|
8
|
-
* @param metadata runtime metadata (ip, hostname and version)
|
|
9
|
-
* @param impressionListener optional impression listener
|
|
10
|
-
* @param integrationsManager optional integrations manager
|
|
11
|
-
* @param strategy strategy for impressions tracking.
|
|
12
|
-
*/
|
|
13
|
-
export declare function impressionsTrackerFactory(settings: ISettings, impressionsCache: IImpressionsCacheBase, strategy: IStrategy, whenInit: (cb: () => void) => void, integrationsManager?: IImpressionsHandler, telemetryCache?: ITelemetryCacheSync | ITelemetryCacheAsync): IImpressionsTracker;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IImpressionObserver } from '../impressionObserver/types';
|
|
2
|
-
import { IStrategy } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Debug strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
|
|
5
|
-
*
|
|
6
|
-
* @param impressionsObserver impression observer. Previous time (pt property) is included in impression instances
|
|
7
|
-
* @returns IStrategyResult
|
|
8
|
-
*/
|
|
9
|
-
export declare function strategyDebugFactory(impressionsObserver: IImpressionObserver): IStrategy;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IImpressionCountsCacheBase } from '../../storages/types';
|
|
2
|
-
import { IStrategy, IUniqueKeysTracker } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* None strategy for impressions tracker.
|
|
5
|
-
*
|
|
6
|
-
* @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
|
|
7
|
-
* @param uniqueKeysTracker unique keys tracker in charge of tracking the unique keys per split.
|
|
8
|
-
* @returns IStrategyResult
|
|
9
|
-
*/
|
|
10
|
-
export declare function strategyNoneFactory(impressionsCounter: IImpressionCountsCacheBase, uniqueKeysTracker: IUniqueKeysTracker): IStrategy;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IImpressionCountsCacheBase } from '../../storages/types';
|
|
2
|
-
import { IImpressionObserver } from '../impressionObserver/types';
|
|
3
|
-
import { IStrategy } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Optimized strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
|
|
6
|
-
*
|
|
7
|
-
* @param impressionsObserver impression observer. previous time (pt property) is included in impression instances
|
|
8
|
-
* @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
|
|
9
|
-
* @returns IStrategyResult
|
|
10
|
-
*/
|
|
11
|
-
export declare function strategyOptimizedFactory(impressionsObserver: IImpressionObserver, impressionsCounter: IImpressionCountsCacheBase): IStrategy;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ITelemetryCacheSync, ITelemetryCacheAsync } from '../storages/types';
|
|
2
|
-
import { ITelemetryTracker } from './types';
|
|
3
|
-
export declare function telemetryTrackerFactory(telemetryCache?: ITelemetryCacheSync | ITelemetryCacheAsync, now?: () => number): ITelemetryTracker;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { SplitIO, ImpressionDTO } from '../types';
|
|
2
|
-
import { StreamingEventType, Method, OperationType, UpdatesFromSSEEnum } from '../sync/submitters/types';
|
|
3
|
-
import { IEventsCacheBase } from '../storages/types';
|
|
4
|
-
import { NetworkError } from '../services/types';
|
|
5
|
-
/** Events tracker */
|
|
6
|
-
export interface IEventsHandler {
|
|
7
|
-
handleEvent(eventData: SplitIO.EventData): any;
|
|
8
|
-
}
|
|
9
|
-
export declare type IEventTracker = IEventsCacheBase;
|
|
10
|
-
/** Impressions tracker */
|
|
11
|
-
export interface IImpressionsHandler {
|
|
12
|
-
handleImpression(impressionData: SplitIO.ImpressionData): any;
|
|
13
|
-
}
|
|
14
|
-
export interface IImpressionsTracker {
|
|
15
|
-
track(impressions: ImpressionDTO[], attributes?: SplitIO.Attributes): void;
|
|
16
|
-
}
|
|
17
|
-
/** Telemetry tracker */
|
|
18
|
-
export declare type AUTH_REJECTION = 80;
|
|
19
|
-
export interface ITelemetryTracker {
|
|
20
|
-
/**
|
|
21
|
-
* Creates a telemetry evaluator tracker, to record Latencies, Exceptions and NonReadyUsage of client operations (getTreatments and track method calls)
|
|
22
|
-
*/
|
|
23
|
-
trackEval(method: Method): (label?: string) => void;
|
|
24
|
-
/**
|
|
25
|
-
* Creates a telemetry runtime tracker, to record Latencies and Exceptions of HTTP requests
|
|
26
|
-
*/
|
|
27
|
-
trackHttp(method: OperationType): (error?: NetworkError) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Records session length
|
|
30
|
-
*/
|
|
31
|
-
sessionLength(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Records streaming event
|
|
34
|
-
*/
|
|
35
|
-
streamingEvent(e: StreamingEventType | AUTH_REJECTION, d?: number): void;
|
|
36
|
-
/**
|
|
37
|
-
* Records tag
|
|
38
|
-
*/
|
|
39
|
-
addTag(tag: string): void;
|
|
40
|
-
/**
|
|
41
|
-
* Records updates from sse
|
|
42
|
-
*/
|
|
43
|
-
trackUpdatesFromSSE(type: UpdatesFromSSEEnum): void;
|
|
44
|
-
}
|
|
45
|
-
export interface IFilterAdapter {
|
|
46
|
-
add(key: string, featureName: string): boolean;
|
|
47
|
-
contains(key: string, featureName: string): boolean;
|
|
48
|
-
clear(): void;
|
|
49
|
-
refreshRate?: number;
|
|
50
|
-
}
|
|
51
|
-
export interface IImpressionSenderAdapter {
|
|
52
|
-
recordUniqueKeys(data: Object): void;
|
|
53
|
-
recordImpressionCounts(data: Object): void;
|
|
54
|
-
}
|
|
55
|
-
/** Unique keys tracker */
|
|
56
|
-
export interface IUniqueKeysTracker {
|
|
57
|
-
start(): void;
|
|
58
|
-
stop(): void;
|
|
59
|
-
track(key: string, featureName: string): void;
|
|
60
|
-
}
|
|
61
|
-
export interface IStrategyResult {
|
|
62
|
-
impressionsToStore: ImpressionDTO[];
|
|
63
|
-
impressionsToListener: ImpressionDTO[];
|
|
64
|
-
deduped: number;
|
|
65
|
-
}
|
|
66
|
-
export interface IStrategy {
|
|
67
|
-
process(impressions: ImpressionDTO[]): IStrategyResult;
|
|
68
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../logger/types';
|
|
2
|
-
import { IUniqueKeysCacheBase } from '../storages/types';
|
|
3
|
-
import { IFilterAdapter, IUniqueKeysTracker } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Trackes uniques keys
|
|
6
|
-
* Unique Keys Tracker will be in charge of checking if the MTK was already sent to the BE in the last period
|
|
7
|
-
* or schedule to be sent; if not it will be added in an internal cache and sent in the next post.
|
|
8
|
-
*
|
|
9
|
-
* @param log Logger instance
|
|
10
|
-
* @param uniqueKeysCache cache to save unique keys
|
|
11
|
-
* @param filterAdapter filter adapter
|
|
12
|
-
*/
|
|
13
|
-
export declare function uniqueKeysTrackerFactory(log: ILogger, uniqueKeysCache: IUniqueKeysCacheBase, filterAdapter?: IFilterAdapter): IUniqueKeysTracker;
|