@splitsoftware/splitio-commons 1.6.1 → 1.6.2-rc.0

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.
@@ -0,0 +1,13 @@
1
+ import { ISdkFactoryContextSync } from '../../sdkFactory/types';
2
+ import { ISet } from '../../utils/lang/sets';
3
+ import { UniqueKeysPayload } from './types';
4
+ /**
5
+ * Converts `uniqueKeys` data from cache into request payload.
6
+ */
7
+ export declare function fromUniqueKeysCollector(uniqueKeys: {
8
+ [featureName: string]: ISet<string>;
9
+ }): UniqueKeysPayload;
10
+ /**
11
+ * Submitter that periodically posts impression counts
12
+ */
13
+ export declare function uniqueKeysSubmitterFactory(params: ISdkFactoryContextSync): import("../types").ISyncTask<[], void>;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,10 @@
1
+ import { IImpressionCountsCacheSync } 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: IImpressionCountsCacheSync, uniqueKeysTracker: IUniqueKeysTracker): IStrategy;
@@ -0,0 +1,11 @@
1
+ import { IImpressionCountsCacheSync } 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: IImpressionCountsCacheSync): IStrategy;
@@ -0,0 +1,13 @@
1
+ import { ILogger } from '../logger/types';
2
+ import { IFilterAdapter, IUniqueKeysTracker } from './types';
3
+ /**
4
+ * Trackes uniques keys
5
+ * Unique Keys Tracker will be in charge of checking if the MTK was already sent to the BE in the last period
6
+ * or schedule to be sent; if not it will be added in an internal cache and sent in the next post.
7
+ *
8
+ * @param log Logger instance
9
+ * @param filterAdapter filter adapter
10
+ * @param cacheSize optional internal cache size
11
+ * @param maxBulkSize optional max MTKs bulk size
12
+ */
13
+ export declare function uniqueKeysTrackerFactory(log: ILogger, filterAdapter?: IFilterAdapter, cacheSize?: number): IUniqueKeysTracker;