@splitsoftware/splitio-commons 1.16.1-rc.1 → 1.16.1-rc.11
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/CHANGES.txt +4 -0
- package/cjs/logger/constants.js +5 -4
- package/cjs/logger/messages/info.js +2 -1
- package/cjs/logger/messages/warn.js +1 -1
- package/cjs/readiness/readinessManager.js +7 -12
- package/cjs/services/splitApi.js +5 -9
- package/cjs/storages/AbstractSegmentsCacheSync.js +41 -12
- package/cjs/storages/AbstractSplitsCacheAsync.js +2 -2
- package/cjs/storages/AbstractSplitsCacheSync.js +7 -5
- package/cjs/storages/KeyBuilder.js +0 -3
- package/cjs/storages/KeyBuilderCS.js +6 -0
- package/cjs/storages/dataLoader.js +1 -1
- package/cjs/storages/inLocalStorage/MySegmentsCacheInLocal.js +29 -52
- package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +4 -16
- package/cjs/storages/inMemory/MySegmentsCacheInMemory.js +9 -40
- package/cjs/storages/inMemory/SplitsCacheInMemory.js +6 -15
- package/cjs/sync/polling/fetchers/mySegmentsFetcher.js +4 -11
- package/cjs/sync/polling/fetchers/segmentChangesFetcher.js +1 -1
- package/cjs/sync/polling/pollingManagerCS.js +33 -51
- package/cjs/sync/polling/syncTasks/mySegmentsSyncTask.js +2 -2
- package/cjs/sync/polling/updaters/mySegmentsUpdater.js +14 -20
- package/cjs/sync/streaming/AuthClient/index.js +1 -1
- package/cjs/sync/streaming/SSEHandler/index.js +3 -6
- package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +15 -9
- package/cjs/sync/streaming/constants.js +3 -4
- package/cjs/sync/streaming/parseUtils.js +14 -9
- package/cjs/sync/streaming/pushManager.js +29 -55
- package/cjs/sync/submitters/telemetrySubmitter.js +0 -2
- package/cjs/sync/syncManagerOnline.js +14 -24
- package/cjs/utils/constants/index.js +4 -5
- package/cjs/utils/settingsValidation/index.js +1 -5
- package/esm/logger/constants.js +2 -1
- package/esm/logger/messages/info.js +2 -1
- package/esm/logger/messages/warn.js +1 -1
- package/esm/readiness/readinessManager.js +7 -12
- package/esm/services/splitApi.js +6 -10
- package/esm/storages/AbstractSegmentsCacheSync.js +41 -12
- package/esm/storages/AbstractSplitsCacheAsync.js +2 -2
- package/esm/storages/AbstractSplitsCacheSync.js +5 -3
- package/esm/storages/KeyBuilder.js +0 -3
- package/esm/storages/KeyBuilderCS.js +6 -0
- package/esm/storages/dataLoader.js +1 -1
- package/esm/storages/inLocalStorage/MySegmentsCacheInLocal.js +29 -52
- package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +5 -17
- package/esm/storages/inMemory/MySegmentsCacheInMemory.js +9 -40
- package/esm/storages/inMemory/SplitsCacheInMemory.js +7 -16
- package/esm/sync/polling/fetchers/mySegmentsFetcher.js +4 -11
- package/esm/sync/polling/fetchers/segmentChangesFetcher.js +1 -1
- package/esm/sync/polling/pollingManagerCS.js +34 -52
- package/esm/sync/polling/syncTasks/mySegmentsSyncTask.js +2 -2
- package/esm/sync/polling/updaters/mySegmentsUpdater.js +12 -18
- package/esm/sync/streaming/AuthClient/index.js +1 -1
- package/esm/sync/streaming/SSEHandler/index.js +4 -7
- package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +15 -9
- package/esm/sync/streaming/constants.js +2 -3
- package/esm/sync/streaming/parseUtils.js +12 -8
- package/esm/sync/streaming/pushManager.js +32 -57
- package/esm/sync/submitters/telemetrySubmitter.js +0 -2
- package/esm/sync/syncManagerOnline.js +15 -25
- package/esm/utils/constants/index.js +2 -3
- package/esm/utils/settingsValidation/index.js +1 -5
- package/package.json +1 -1
- package/src/dtos/types.ts +7 -8
- package/src/logger/constants.ts +2 -1
- package/src/logger/messages/info.ts +2 -1
- package/src/logger/messages/warn.ts +1 -1
- package/src/readiness/readinessManager.ts +7 -9
- package/src/readiness/types.ts +0 -1
- package/src/services/splitApi.ts +7 -12
- package/src/services/splitHttpClient.ts +1 -1
- package/src/services/types.ts +2 -3
- package/src/storages/AbstractSegmentsCacheSync.ts +53 -12
- package/src/storages/AbstractSplitsCacheAsync.ts +2 -2
- package/src/storages/AbstractSplitsCacheSync.ts +7 -5
- package/src/storages/KeyBuilder.ts +0 -3
- package/src/storages/KeyBuilderCS.ts +9 -0
- package/src/storages/dataLoader.ts +1 -1
- package/src/storages/inLocalStorage/MySegmentsCacheInLocal.ts +26 -56
- package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +5 -20
- package/src/storages/inMemory/MySegmentsCacheInMemory.ts +10 -44
- package/src/storages/inMemory/SplitsCacheInMemory.ts +7 -13
- package/src/storages/types.ts +10 -8
- package/src/sync/polling/fetchers/mySegmentsFetcher.ts +7 -14
- package/src/sync/polling/fetchers/segmentChangesFetcher.ts +1 -1
- package/src/sync/polling/fetchers/types.ts +2 -2
- package/src/sync/polling/pollingManagerCS.ts +29 -61
- package/src/sync/polling/syncTasks/mySegmentsSyncTask.ts +12 -13
- package/src/sync/polling/types.ts +8 -8
- package/src/sync/polling/updaters/mySegmentsUpdater.ts +17 -18
- package/src/sync/streaming/AuthClient/index.ts +1 -1
- package/src/sync/streaming/SSEClient/index.ts +4 -6
- package/src/sync/streaming/SSEHandler/index.ts +5 -9
- package/src/sync/streaming/SSEHandler/types.ts +13 -25
- package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +17 -12
- package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +1 -1
- package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +1 -1
- package/src/sync/streaming/UpdateWorkers/types.ts +2 -2
- package/src/sync/streaming/constants.ts +2 -3
- package/src/sync/streaming/parseUtils.ts +19 -11
- package/src/sync/streaming/pushManager.ts +38 -68
- package/src/sync/streaming/types.ts +11 -13
- package/src/sync/submitters/telemetrySubmitter.ts +0 -2
- package/src/sync/submitters/types.ts +3 -6
- package/src/sync/syncManagerOnline.ts +11 -19
- package/src/types.ts +1 -26
- package/src/utils/constants/index.ts +2 -3
- package/src/utils/settingsValidation/index.ts +1 -5
- package/types/dtos/types.d.ts +7 -8
- package/types/logger/constants.d.ts +2 -1
- package/types/readiness/types.d.ts +0 -1
- package/types/services/decorateHeaders.d.ts +2 -0
- package/types/services/splitApi.d.ts +1 -1
- package/types/services/splitHttpClient.d.ts +1 -1
- package/types/services/types.d.ts +2 -3
- package/types/storages/AbstractSegmentsCacheSync.d.ts +9 -11
- package/types/storages/AbstractSplitsCacheAsync.d.ts +1 -1
- package/types/storages/AbstractSplitsCacheSync.d.ts +4 -4
- package/types/storages/KeyBuilder.d.ts +0 -1
- package/types/storages/KeyBuilderCS.d.ts +2 -0
- package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +2 -12
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +1 -1
- package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +3 -9
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +1 -2
- package/types/storages/types.d.ts +8 -7
- package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +2 -2
- package/types/sync/polling/fetchers/types.d.ts +2 -2
- package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +4 -3
- package/types/sync/polling/types.d.ts +8 -12
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +3 -2
- package/types/sync/streaming/SSEHandler/types.d.ts +13 -22
- package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +2 -3
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +2 -1
- package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +3 -2
- package/types/sync/streaming/UpdateWorkers/types.d.ts +2 -2
- package/types/sync/streaming/constants.d.ts +2 -3
- package/types/sync/streaming/parseUtils.d.ts +4 -5
- package/types/sync/streaming/pushManager.d.ts +0 -2
- package/types/sync/streaming/pushManagerCS_Spec1_3.d.ts +9 -0
- package/types/sync/streaming/pushManager_Spec1_3.d.ts +9 -0
- package/types/sync/streaming/types.d.ts +9 -10
- package/types/sync/submitters/types.d.ts +3 -6
- package/types/types.d.ts +0 -25
- package/types/utils/constants/index.d.ts +2 -3
- package/types/utils/settingsValidation/index.d.ts +0 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IMySegmentsResponse } from '../dtos/types';
|
|
2
|
+
import { MySegmentsData } from '../sync/polling/types';
|
|
1
3
|
import { ISegmentsCacheSync } from './types';
|
|
2
4
|
/**
|
|
3
5
|
* This class provides a skeletal implementation of the ISegmentsCacheSync interface
|
|
@@ -22,7 +24,7 @@ export declare abstract class AbstractSegmentsCacheSync implements ISegmentsCach
|
|
|
22
24
|
/**
|
|
23
25
|
* clear the cache.
|
|
24
26
|
*/
|
|
25
|
-
|
|
27
|
+
clear(): void;
|
|
26
28
|
/**
|
|
27
29
|
* For server-side synchronizer: add the given list of segments to the cache, with an empty list of keys. The segments that already exist are not modified.
|
|
28
30
|
* For client-side synchronizer: the method is not used.
|
|
@@ -39,18 +41,14 @@ export declare abstract class AbstractSegmentsCacheSync implements ISegmentsCach
|
|
|
39
41
|
*/
|
|
40
42
|
abstract getKeysCount(): number;
|
|
41
43
|
/**
|
|
42
|
-
* For server-side synchronizer:
|
|
43
|
-
* For client-side synchronizer:
|
|
44
|
-
*/
|
|
45
|
-
setChangeNumber(name: string, changeNumber: number): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* For server-side synchronizer: get the change number of `name` segment.
|
|
48
|
-
* For client-side synchronizer: the method is not used.
|
|
44
|
+
* For server-side synchronizer: change number of `name` segment.
|
|
45
|
+
* For client-side synchronizer: change number of mySegments.
|
|
49
46
|
*/
|
|
50
|
-
|
|
47
|
+
abstract setChangeNumber(name?: string, changeNumber?: number): boolean | void;
|
|
48
|
+
abstract getChangeNumber(name: string): number;
|
|
51
49
|
/**
|
|
52
50
|
* For server-side synchronizer: the method is not used.
|
|
53
|
-
* For client-side synchronizer:
|
|
51
|
+
* For client-side synchronizer: it resets or updates the cache.
|
|
54
52
|
*/
|
|
55
|
-
resetSegments(
|
|
53
|
+
resetSegments(segmentsData: MySegmentsData | IMySegmentsResponse): boolean;
|
|
56
54
|
}
|
|
@@ -18,7 +18,7 @@ export declare abstract class AbstractSplitsCacheAsync implements ISplitsCacheAs
|
|
|
18
18
|
abstract getNamesByFlagSets(flagSets: string[]): Promise<ISet<string>[]>;
|
|
19
19
|
abstract trafficTypeExists(trafficType: string): Promise<boolean>;
|
|
20
20
|
abstract clear(): Promise<boolean | void>;
|
|
21
|
-
|
|
21
|
+
usesSegments(): Promise<boolean>;
|
|
22
22
|
/**
|
|
23
23
|
* Check if the splits information is already stored in cache.
|
|
24
24
|
* Noop, just keeping the interface. This is used by client-side implementations only.
|
|
@@ -12,12 +12,12 @@ export declare abstract class AbstractSplitsCacheSync implements ISplitsCacheSyn
|
|
|
12
12
|
removeSplits(names: string[]): boolean[];
|
|
13
13
|
abstract getSplit(name: string): ISplit | null;
|
|
14
14
|
getSplits(names: string[]): Record<string, ISplit | null>;
|
|
15
|
-
abstract setChangeNumber(changeNumber: number): boolean;
|
|
15
|
+
abstract setChangeNumber(changeNumber: number): boolean | void;
|
|
16
16
|
abstract getChangeNumber(): number;
|
|
17
17
|
getAll(): ISplit[];
|
|
18
18
|
abstract getSplitNames(): string[];
|
|
19
19
|
abstract trafficTypeExists(trafficType: string): boolean;
|
|
20
|
-
abstract
|
|
20
|
+
abstract usesSegments(): boolean;
|
|
21
21
|
abstract clear(): void;
|
|
22
22
|
/**
|
|
23
23
|
* Check if the splits information is already stored in cache. This data can be preloaded.
|
|
@@ -39,6 +39,6 @@ export declare abstract class AbstractSplitsCacheSync implements ISplitsCacheSyn
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Given a parsed split, it returns a boolean flagging if its conditions use segments matchers (rules & whitelists).
|
|
42
|
-
* This util is intended to simplify the implementation of `splitsCache::
|
|
42
|
+
* This util is intended to simplify the implementation of `splitsCache::usesSegments` method
|
|
43
43
|
*/
|
|
44
|
-
export declare function
|
|
44
|
+
export declare function usesSegments(split: ISplit): boolean;
|
|
@@ -10,7 +10,6 @@ export declare class KeyBuilder {
|
|
|
10
10
|
isSplitKey(key: string): boolean;
|
|
11
11
|
buildSplitKeyPrefix(): string;
|
|
12
12
|
buildSplitsWithSegmentCountKey(): string;
|
|
13
|
-
buildSplitsWithLargeSegmentCountKey(): string;
|
|
14
13
|
buildSegmentNameKey(segmentName: string): string;
|
|
15
14
|
buildSegmentTillKey(segmentName: string): string;
|
|
16
15
|
extractKey(builtKey: string): string;
|
|
@@ -3,6 +3,7 @@ export interface MySegmentsKeyBuilder {
|
|
|
3
3
|
buildSegmentNameKey(segmentName: string): string;
|
|
4
4
|
extractSegmentName(builtSegmentKeyName: string): string | undefined;
|
|
5
5
|
extractOldSegmentKey(builtSegmentKeyName: string): string | undefined;
|
|
6
|
+
buildTillKey(): string;
|
|
6
7
|
}
|
|
7
8
|
export declare class KeyBuilderCS extends KeyBuilder implements MySegmentsKeyBuilder {
|
|
8
9
|
protected readonly regexSplitsCacheKey: RegExp;
|
|
@@ -16,5 +17,6 @@ export declare class KeyBuilderCS extends KeyBuilder implements MySegmentsKeyBui
|
|
|
16
17
|
extractOldSegmentKey(builtSegmentKeyName: string): string | undefined;
|
|
17
18
|
buildLastUpdatedKey(): string;
|
|
18
19
|
isSplitsCacheKey(key: string): boolean;
|
|
20
|
+
buildTillKey(): string;
|
|
19
21
|
}
|
|
20
22
|
export declare function myLargeSegmentsKeyBuilder(prefix: string, matchingKey: string): MySegmentsKeyBuilder;
|
|
@@ -5,21 +5,11 @@ export declare class MySegmentsCacheInLocal extends AbstractSegmentsCacheSync {
|
|
|
5
5
|
private readonly keys;
|
|
6
6
|
private readonly log;
|
|
7
7
|
constructor(log: ILogger, keys: MySegmentsKeyBuilder);
|
|
8
|
-
/**
|
|
9
|
-
* Removes list of segments from localStorage
|
|
10
|
-
* @NOTE this method is not being used at the moment.
|
|
11
|
-
*/
|
|
12
|
-
clear(): void;
|
|
13
8
|
addToSegment(name: string): boolean;
|
|
14
9
|
removeFromSegment(name: string): boolean;
|
|
15
10
|
isInSegment(name: string): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Reset (update) the cached list of segments with the given list, removing and adding segments if necessary.
|
|
18
|
-
*
|
|
19
|
-
* @param {string[]} segmentNames list of segment names
|
|
20
|
-
* @returns boolean indicating if the cache was updated (i.e., given list was different from the cached one)
|
|
21
|
-
*/
|
|
22
|
-
resetSegments(names: string[]): boolean;
|
|
23
11
|
getRegisteredSegments(): string[];
|
|
24
12
|
getKeysCount(): number;
|
|
13
|
+
setChangeNumber(name?: string, changeNumber?: number): void;
|
|
14
|
+
getChangeNumber(): number;
|
|
25
15
|
}
|
|
@@ -34,7 +34,7 @@ export declare class SplitsCacheInLocal extends AbstractSplitsCacheSync {
|
|
|
34
34
|
getChangeNumber(): number;
|
|
35
35
|
getSplitNames(): string[];
|
|
36
36
|
trafficTypeExists(trafficType: string): boolean;
|
|
37
|
-
|
|
37
|
+
usesSegments(): boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Check if the splits information is already stored in browser LocalStorage.
|
|
40
40
|
* In this function we could add more code to check if the data is valid.
|
|
@@ -5,18 +5,12 @@ import { AbstractSegmentsCacheSync } from '../AbstractSegmentsCacheSync';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class MySegmentsCacheInMemory extends AbstractSegmentsCacheSync {
|
|
7
7
|
private segmentCache;
|
|
8
|
-
|
|
8
|
+
private cn?;
|
|
9
9
|
addToSegment(name: string): boolean;
|
|
10
10
|
removeFromSegment(name: string): boolean;
|
|
11
11
|
isInSegment(name: string): boolean;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* @NOTE based on the way we use segments in the browser, this way is the best option
|
|
15
|
-
*
|
|
16
|
-
* @param {string[]} names list of segment names
|
|
17
|
-
* @returns boolean indicating if the cache was updated (i.e., given list was different from the cached one)
|
|
18
|
-
*/
|
|
19
|
-
resetSegments(names: string[]): boolean;
|
|
12
|
+
setChangeNumber(name?: string, changeNumber?: number): void;
|
|
13
|
+
getChangeNumber(): number;
|
|
20
14
|
getRegisteredSegments(): string[];
|
|
21
15
|
getKeysCount(): number;
|
|
22
16
|
}
|
|
@@ -11,7 +11,6 @@ export declare class SplitsCacheInMemory extends AbstractSplitsCacheSync {
|
|
|
11
11
|
private ttCache;
|
|
12
12
|
private changeNumber;
|
|
13
13
|
private segmentsCount;
|
|
14
|
-
private largeSegmentsCount;
|
|
15
14
|
private flagSetsCache;
|
|
16
15
|
constructor(splitFiltersValidation?: ISplitFiltersValidation);
|
|
17
16
|
clear(): void;
|
|
@@ -22,7 +21,7 @@ export declare class SplitsCacheInMemory extends AbstractSplitsCacheSync {
|
|
|
22
21
|
getChangeNumber(): number;
|
|
23
22
|
getSplitNames(): string[];
|
|
24
23
|
trafficTypeExists(trafficType: string): boolean;
|
|
25
|
-
|
|
24
|
+
usesSegments(): boolean;
|
|
26
25
|
getNamesByFlagSets(flagSets: string[]): ISet<string>[];
|
|
27
26
|
private addToFlagSets;
|
|
28
27
|
private removeFromFlagSets;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { MaybeThenable, ISplit } from '../dtos/types';
|
|
1
|
+
import { MaybeThenable, ISplit, IMySegmentsResponse } from '../dtos/types';
|
|
2
|
+
import { MySegmentsData } from '../sync/polling/types';
|
|
2
3
|
import { EventDataType, HttpErrors, HttpLatencies, ImpressionDataType, LastSync, Method, MethodExceptions, MethodLatencies, MultiMethodExceptions, MultiMethodLatencies, MultiConfigs, OperationType, StoredEventWithMetadata, StoredImpressionWithMetadata, StreamingEvent, UniqueKeysPayloadCs, UniqueKeysPayloadSs, TelemetryUsageStatsPayload, UpdatesFromSSEEnum } from '../sync/submitters/types';
|
|
3
4
|
import { SplitIO, ImpressionDTO, ISettings } from '../types';
|
|
4
5
|
import { ISet } from '../utils/lang/sets';
|
|
@@ -189,7 +190,7 @@ export interface ISplitsCacheBase {
|
|
|
189
190
|
getAll(): MaybeThenable<ISplit[]>;
|
|
190
191
|
getSplitNames(): MaybeThenable<string[]>;
|
|
191
192
|
trafficTypeExists(trafficType: string): MaybeThenable<boolean>;
|
|
192
|
-
|
|
193
|
+
usesSegments(): MaybeThenable<boolean>;
|
|
193
194
|
clear(): MaybeThenable<boolean | void>;
|
|
194
195
|
checkCache(): MaybeThenable<boolean>;
|
|
195
196
|
killLocally(name: string, defaultTreatment: string, changeNumber: number): MaybeThenable<boolean>;
|
|
@@ -200,12 +201,12 @@ export interface ISplitsCacheSync extends ISplitsCacheBase {
|
|
|
200
201
|
removeSplits(names: string[]): boolean[];
|
|
201
202
|
getSplit(name: string): ISplit | null;
|
|
202
203
|
getSplits(names: string[]): Record<string, ISplit | null>;
|
|
203
|
-
setChangeNumber(changeNumber: number): boolean;
|
|
204
|
+
setChangeNumber(changeNumber: number): boolean | void;
|
|
204
205
|
getChangeNumber(): number;
|
|
205
206
|
getAll(): ISplit[];
|
|
206
207
|
getSplitNames(): string[];
|
|
207
208
|
trafficTypeExists(trafficType: string): boolean;
|
|
208
|
-
|
|
209
|
+
usesSegments(): boolean;
|
|
209
210
|
clear(): void;
|
|
210
211
|
checkCache(): boolean;
|
|
211
212
|
killLocally(name: string, defaultTreatment: string, changeNumber: number): boolean;
|
|
@@ -221,7 +222,7 @@ export interface ISplitsCacheAsync extends ISplitsCacheBase {
|
|
|
221
222
|
getAll(): Promise<ISplit[]>;
|
|
222
223
|
getSplitNames(): Promise<string[]>;
|
|
223
224
|
trafficTypeExists(trafficType: string): Promise<boolean>;
|
|
224
|
-
|
|
225
|
+
usesSegments(): Promise<boolean>;
|
|
225
226
|
clear(): Promise<boolean | void>;
|
|
226
227
|
checkCache(): Promise<boolean>;
|
|
227
228
|
killLocally(name: string, defaultTreatment: string, changeNumber: number): Promise<boolean>;
|
|
@@ -245,9 +246,9 @@ export interface ISegmentsCacheSync extends ISegmentsCacheBase {
|
|
|
245
246
|
registerSegments(names: string[]): boolean;
|
|
246
247
|
getRegisteredSegments(): string[];
|
|
247
248
|
getKeysCount(): number;
|
|
248
|
-
setChangeNumber(name: string, changeNumber: number): boolean;
|
|
249
|
+
setChangeNumber(name: string, changeNumber: number): boolean | void;
|
|
249
250
|
getChangeNumber(name: string): number;
|
|
250
|
-
resetSegments(
|
|
251
|
+
resetSegments(segmentsData: MySegmentsData | IMySegmentsResponse): boolean;
|
|
251
252
|
clear(): void;
|
|
252
253
|
}
|
|
253
254
|
export interface ISegmentsCacheAsync extends ISegmentsCacheBase {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IFetchMemberships } from '../../../services/types';
|
|
2
2
|
import { IMySegmentsFetcher } from './types';
|
|
3
3
|
/**
|
|
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(
|
|
7
|
+
export declare function mySegmentsFetcherFactory(fetchMemberships: IFetchMemberships): IMySegmentsFetcher;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ISplitChangesResponse, ISegmentChangesResponse } from '../../../dtos/types';
|
|
1
|
+
import { ISplitChangesResponse, ISegmentChangesResponse, IMembershipsResponse } from '../../../dtos/types';
|
|
2
2
|
import { IResponse } from '../../../services/types';
|
|
3
3
|
export declare type ISplitChangesFetcher = (since: number, noCache?: boolean, till?: number, decorator?: (promise: Promise<IResponse>) => Promise<IResponse>) => Promise<ISplitChangesResponse>;
|
|
4
4
|
export declare type ISegmentChangesFetcher = (since: number, segmentName: string, noCache?: boolean, till?: number, decorator?: (promise: Promise<ISegmentChangesResponse[]>) => Promise<ISegmentChangesResponse[]>) => Promise<ISegmentChangesResponse[]>;
|
|
5
|
-
export declare type IMySegmentsFetcher = (userMatchingKey: string, noCache?: boolean, decorator?: (promise: Promise<IResponse>) => Promise<IResponse>) => Promise<
|
|
5
|
+
export declare type IMySegmentsFetcher = (userMatchingKey: string, noCache?: boolean, decorator?: (promise: Promise<IResponse>) => Promise<IResponse>) => Promise<IMembershipsResponse>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IStorageSync } from '../../../storages/types';
|
|
2
|
+
import { IReadinessManager } from '../../../readiness/types';
|
|
2
3
|
import { IMySegmentsSyncTask } from '../types';
|
|
3
|
-
import {
|
|
4
|
+
import { IFetchMemberships } from '../../../services/types';
|
|
4
5
|
import { ISettings } from '../../../types';
|
|
5
6
|
/**
|
|
6
7
|
* Creates a sync task that periodically executes a `mySegmentsUpdater` task
|
|
7
8
|
*/
|
|
8
|
-
export declare function mySegmentsSyncTaskFactory(
|
|
9
|
+
export declare function mySegmentsSyncTaskFactory(fetchMemberships: IFetchMemberships, storage: IStorageSync, readiness: IReadinessManager, settings: ISettings, matchingKey: string): IMySegmentsSyncTask;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ISplit } from '../../dtos/types';
|
|
2
2
|
import { IReadinessManager } from '../../readiness/types';
|
|
3
3
|
import { IStorageSync } from '../../storages/types';
|
|
4
|
+
import { MEMBERSHIP_LS_UPDATE, MEMBERSHIP_MS_UPDATE } from '../streaming/types';
|
|
4
5
|
import { ITask, ISyncTask } from '../types';
|
|
5
6
|
export interface ISplitsSyncTask extends ISyncTask<[noCache?: boolean, till?: number, splitUpdateNotification?: {
|
|
6
7
|
payload: ISplit;
|
|
@@ -9,9 +10,11 @@ export interface ISplitsSyncTask extends ISyncTask<[noCache?: boolean, till?: nu
|
|
|
9
10
|
}
|
|
10
11
|
export interface ISegmentsSyncTask extends ISyncTask<[fetchOnlyNew?: boolean, segmentName?: string, noCache?: boolean, till?: number], boolean> {
|
|
11
12
|
}
|
|
12
|
-
export declare type MySegmentsData =
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
export declare type MySegmentsData = {
|
|
14
|
+
type: MEMBERSHIP_MS_UPDATE | MEMBERSHIP_LS_UPDATE;
|
|
15
|
+
cn: number;
|
|
16
|
+
added: string[];
|
|
17
|
+
removed: string[];
|
|
15
18
|
};
|
|
16
19
|
export interface IMySegmentsSyncTask extends ISyncTask<[segmentsData?: MySegmentsData, noCache?: boolean], boolean> {
|
|
17
20
|
}
|
|
@@ -19,19 +22,12 @@ export interface IPollingManager extends ITask {
|
|
|
19
22
|
syncAll(): Promise<any>;
|
|
20
23
|
splitsSyncTask: ISplitsSyncTask;
|
|
21
24
|
segmentsSyncTask: ISyncTask;
|
|
22
|
-
largeSegmentsSyncTask?: ISyncTask;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* PollingManager for client-side with support for multiple clients
|
|
26
28
|
*/
|
|
27
29
|
export interface IPollingManagerCS extends IPollingManager {
|
|
28
|
-
add(matchingKey: string, readiness: IReadinessManager, storage: IStorageSync):
|
|
29
|
-
msSyncTask: IMySegmentsSyncTask;
|
|
30
|
-
mlsSyncTask?: IMySegmentsSyncTask;
|
|
31
|
-
};
|
|
30
|
+
add(matchingKey: string, readiness: IReadinessManager, storage: IStorageSync): IMySegmentsSyncTask;
|
|
32
31
|
remove(matchingKey: string): void;
|
|
33
|
-
get(matchingKey: string):
|
|
34
|
-
msSyncTask: IMySegmentsSyncTask;
|
|
35
|
-
mlsSyncTask?: IMySegmentsSyncTask;
|
|
36
|
-
} | undefined;
|
|
32
|
+
get(matchingKey: string): IMySegmentsSyncTask | undefined;
|
|
37
33
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IMySegmentsFetcher } from '../fetchers/types';
|
|
2
|
-
import {
|
|
2
|
+
import { IStorageSync } from '../../../storages/types';
|
|
3
|
+
import { ISegmentsEventEmitter } from '../../../readiness/types';
|
|
3
4
|
import { ILogger } from '../../../logger/types';
|
|
4
5
|
import { MySegmentsData } from '../types';
|
|
5
6
|
declare type IMySegmentsUpdater = (segmentList?: MySegmentsData, noCache?: boolean) => Promise<boolean>;
|
|
@@ -9,5 +10,5 @@ declare type IMySegmentsUpdater = (segmentList?: MySegmentsData, noCache?: boole
|
|
|
9
10
|
* - updates `mySegmentsCache`
|
|
10
11
|
* - uses `segmentsEventEmitter` to emit events related to segments data updates
|
|
11
12
|
*/
|
|
12
|
-
export declare function mySegmentsUpdaterFactory(log: ILogger, mySegmentsFetcher: IMySegmentsFetcher,
|
|
13
|
+
export declare function mySegmentsUpdaterFactory(log: ILogger, mySegmentsFetcher: IMySegmentsFetcher, storage: IStorageSync, segmentsEventEmitter: ISegmentsEventEmitter, requestTimeoutBeforeReady: number, retriesOnFailureBeforeReady: number, matchingKey: string): IMySegmentsUpdater;
|
|
13
14
|
export {};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { ControlType } from '../constants';
|
|
2
|
-
import {
|
|
3
|
-
export interface IMySegmentsUpdateData {
|
|
4
|
-
type: MY_SEGMENTS_UPDATE;
|
|
5
|
-
changeNumber: number;
|
|
6
|
-
includesPayload: boolean;
|
|
7
|
-
segmentList?: string[];
|
|
8
|
-
}
|
|
2
|
+
import { SEGMENT_UPDATE, SPLIT_UPDATE, SPLIT_KILL, CONTROL, OCCUPANCY, MEMBERSHIP_LS_UPDATE, MEMBERSHIP_MS_UPDATE } from '../types';
|
|
9
3
|
export declare enum Compression {
|
|
10
4
|
None = 0,
|
|
11
5
|
Gzip = 1,
|
|
@@ -21,25 +15,21 @@ export interface KeyList {
|
|
|
21
15
|
a?: string[];
|
|
22
16
|
r?: string[];
|
|
23
17
|
}
|
|
24
|
-
|
|
25
|
-
type:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
c
|
|
29
|
-
d
|
|
30
|
-
u: UpdateStrategy;
|
|
31
|
-
}
|
|
32
|
-
export interface IMyLargeSegmentsUpdateData {
|
|
33
|
-
type: MY_LARGE_SEGMENTS_UPDATE;
|
|
34
|
-
changeNumber: number;
|
|
35
|
-
largeSegments: string[];
|
|
36
|
-
c: Compression;
|
|
37
|
-
d: string;
|
|
18
|
+
interface IMembershipUpdateData<T extends string> {
|
|
19
|
+
type: T;
|
|
20
|
+
cn: number;
|
|
21
|
+
n?: string[];
|
|
22
|
+
c?: Compression;
|
|
23
|
+
d?: string;
|
|
38
24
|
u: UpdateStrategy;
|
|
39
25
|
i?: number;
|
|
40
26
|
h?: number;
|
|
41
27
|
s?: number;
|
|
42
28
|
}
|
|
29
|
+
export interface IMembershipMSUpdateData extends IMembershipUpdateData<MEMBERSHIP_MS_UPDATE> {
|
|
30
|
+
}
|
|
31
|
+
export interface IMembershipLSUpdateData extends IMembershipUpdateData<MEMBERSHIP_LS_UPDATE> {
|
|
32
|
+
}
|
|
43
33
|
export interface ISegmentUpdateData {
|
|
44
34
|
type: SEGMENT_UPDATE;
|
|
45
35
|
changeNumber: number;
|
|
@@ -68,7 +58,7 @@ export interface IOccupancyData {
|
|
|
68
58
|
publishers: number;
|
|
69
59
|
};
|
|
70
60
|
}
|
|
71
|
-
export declare type INotificationData =
|
|
61
|
+
export declare type INotificationData = IMembershipMSUpdateData | IMembershipLSUpdateData | ISegmentUpdateData | ISplitUpdateData | ISplitKillData | IControlData | IOccupancyData;
|
|
72
62
|
export declare type INotificationMessage = {
|
|
73
63
|
parsedData: INotificationData;
|
|
74
64
|
channel: string;
|
|
@@ -79,3 +69,4 @@ export declare type INotificationError = Event & {
|
|
|
79
69
|
parsedData?: any;
|
|
80
70
|
message?: string;
|
|
81
71
|
};
|
|
72
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { IMySegmentsSyncTask } from '../../polling/types';
|
|
1
|
+
import { IMySegmentsSyncTask, MySegmentsData } from '../../polling/types';
|
|
2
2
|
import { IUpdateWorker } from './types';
|
|
3
3
|
import { ITelemetryTracker } from '../../../trackers/types';
|
|
4
|
-
import { UpdatesFromSSEEnum } from '../../submitters/types';
|
|
5
4
|
/**
|
|
6
5
|
* MySegmentsUpdateWorker factory
|
|
7
6
|
*/
|
|
8
|
-
export declare function MySegmentsUpdateWorker(mySegmentsSyncTask: IMySegmentsSyncTask, telemetryTracker: ITelemetryTracker,
|
|
7
|
+
export declare function MySegmentsUpdateWorker(mySegmentsSyncTask: IMySegmentsSyncTask, telemetryTracker: ITelemetryTracker): IUpdateWorker<[mySegmentsData?: Pick<MySegmentsData, 'type' | 'cn'>, payload?: Pick<MySegmentsData, 'added' | 'removed'>, delay?: number]>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ILogger } from '../../../logger/types';
|
|
2
2
|
import { ISegmentsCacheSync } from '../../../storages/types';
|
|
3
3
|
import { ISegmentsSyncTask } from '../../polling/types';
|
|
4
|
+
import { ISegmentUpdateData } from '../SSEHandler/types';
|
|
4
5
|
import { IUpdateWorker } from './types';
|
|
5
6
|
/**
|
|
6
7
|
* SegmentsUpdateWorker factory
|
|
7
8
|
*/
|
|
8
|
-
export declare function SegmentsUpdateWorker(log: ILogger, segmentsSyncTask: ISegmentsSyncTask, segmentsCache: ISegmentsCacheSync): IUpdateWorker
|
|
9
|
+
export declare function SegmentsUpdateWorker(log: ILogger, segmentsSyncTask: ISegmentsSyncTask, segmentsCache: ISegmentsCacheSync): IUpdateWorker<[ISegmentUpdateData]>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { ISplit } from '../../../dtos/types';
|
|
1
2
|
import { ILogger } from '../../../logger/types';
|
|
2
3
|
import { ISplitsEventEmitter } from '../../../readiness/types';
|
|
3
4
|
import { ISplitsCacheSync } from '../../../storages/types';
|
|
4
5
|
import { ITelemetryTracker } from '../../../trackers/types';
|
|
5
6
|
import { ISegmentsSyncTask, ISplitsSyncTask } from '../../polling/types';
|
|
6
|
-
import { ISplitKillData } from '../SSEHandler/types';
|
|
7
|
+
import { ISplitKillData, ISplitUpdateData } from '../SSEHandler/types';
|
|
7
8
|
import { IUpdateWorker } from './types';
|
|
8
9
|
/**
|
|
9
10
|
* SplitsUpdateWorker factory
|
|
10
11
|
*/
|
|
11
|
-
export declare function SplitsUpdateWorker(log: ILogger, splitsCache: ISplitsCacheSync, splitsSyncTask: ISplitsSyncTask, splitsEventEmitter: ISplitsEventEmitter, telemetryTracker: ITelemetryTracker, segmentsSyncTask?: ISegmentsSyncTask): IUpdateWorker & {
|
|
12
|
+
export declare function SplitsUpdateWorker(log: ILogger, splitsCache: ISplitsCacheSync, splitsSyncTask: ISplitsSyncTask, splitsEventEmitter: ISplitsEventEmitter, telemetryTracker: ITelemetryTracker, segmentsSyncTask?: ISegmentsSyncTask): IUpdateWorker<[updateData: ISplitUpdateData, payload?: ISplit]> & {
|
|
12
13
|
killSplit(event: ISplitKillData): void;
|
|
13
14
|
};
|
|
@@ -19,12 +19,11 @@ export declare const PUSH_SUBSYSTEM_UP = "PUSH_SUBSYSTEM_UP";
|
|
|
19
19
|
* triggers `startPolling` and `stopWorkers` calls
|
|
20
20
|
*/
|
|
21
21
|
export declare const PUSH_SUBSYSTEM_DOWN = "PUSH_SUBSYSTEM_DOWN";
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
22
|
+
export declare const MEMBERSHIP_MS_UPDATE = "MEMBERSHIP_MS_UPDATE";
|
|
23
|
+
export declare const MEMBERSHIP_LS_UPDATE = "MEMBERSHIP_LS_UPDATE";
|
|
24
24
|
export declare const SEGMENT_UPDATE = "SEGMENT_UPDATE";
|
|
25
25
|
export declare const SPLIT_KILL = "SPLIT_KILL";
|
|
26
26
|
export declare const SPLIT_UPDATE = "SPLIT_UPDATE";
|
|
27
|
-
export declare const MY_LARGE_SEGMENTS_UPDATE = "MY_LARGE_SEGMENTS_UPDATE";
|
|
28
27
|
export declare const CONTROL = "CONTROL";
|
|
29
28
|
export declare const OCCUPANCY = "OCCUPANCY";
|
|
30
29
|
export declare enum ControlType {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Compression, KeyList } from './SSEHandler/types';
|
|
1
|
+
import { Compression, IMembershipMSUpdateData, KeyList } from './SSEHandler/types';
|
|
2
|
+
import { ISplit } from '../../dtos/types';
|
|
2
3
|
/**
|
|
3
4
|
* Decode, decompress and parse the provided 'data' into a KeyList object
|
|
4
5
|
*
|
|
@@ -28,8 +29,6 @@ export declare function parseBitmap(data: string, compression: Compression): Uin
|
|
|
28
29
|
export declare function isInBitmap(bitmap: Uint8Array, hash64hex: string): boolean;
|
|
29
30
|
/**
|
|
30
31
|
* Parse feature flags notifications for instant feature flag updates
|
|
31
|
-
*
|
|
32
|
-
* @param {ISplitUpdateData} data
|
|
33
|
-
* @returns {KeyList}
|
|
34
32
|
*/
|
|
35
|
-
export declare function parseFFUpdatePayload(compression: Compression, data: string):
|
|
33
|
+
export declare function parseFFUpdatePayload(compression: Compression, data: string): ISplit | undefined;
|
|
34
|
+
export declare function getDelay(parsedData: Pick<IMembershipMSUpdateData, 'i' | 'h' | 's'>, matchingKey: string): number;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { IPushManager } from './types';
|
|
2
2
|
import { IPollingManager } from '../polling/types';
|
|
3
|
-
import { IMyLargeSegmentsUpdateData } from './SSEHandler/types';
|
|
4
3
|
import { ISdkFactoryContextSync } from '../../sdkFactory/types';
|
|
5
|
-
export declare function getDelay(parsedData: Pick<IMyLargeSegmentsUpdateData, 'i' | 'h' | 's'>, matchingKey: string): number;
|
|
6
4
|
/**
|
|
7
5
|
* PushManager factory:
|
|
8
6
|
* - for server-side if key is not provided in settings.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPushManager } from './types';
|
|
2
|
+
import { IPollingManager } from '../polling/types';
|
|
3
|
+
import { ISdkFactoryContextSync } from '../../sdkFactory/types';
|
|
4
|
+
/**
|
|
5
|
+
* PushManager factory:
|
|
6
|
+
* - for server-side if key is not provided in settings.
|
|
7
|
+
* - for client-side, with support for multiple clients, if key is provided in settings
|
|
8
|
+
*/
|
|
9
|
+
export declare function pushManagerFactory(params: ISdkFactoryContextSync, pollingManager: IPollingManager): IPushManager | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPushManager } from './types';
|
|
2
|
+
import { IPollingManager } from '../polling/types';
|
|
3
|
+
import { ISdkFactoryContextSync } from '../../sdkFactory/types';
|
|
4
|
+
/**
|
|
5
|
+
* PushManager factory:
|
|
6
|
+
* - for server-side if key is not provided in settings.
|
|
7
|
+
* - for client-side, with support for multiple clients, if key is provided in settings
|
|
8
|
+
*/
|
|
9
|
+
export declare function pushManagerFactory(params: ISdkFactoryContextSync, pollingManager: IPollingManager): IPushManager | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMembershipMSUpdateData, IMembershipLSUpdateData, ISegmentUpdateData, ISplitUpdateData, ISplitKillData, INotificationData } from './SSEHandler/types';
|
|
2
2
|
import { ITask } from '../types';
|
|
3
3
|
import { IMySegmentsSyncTask } from '../polling/types';
|
|
4
4
|
import { IEventEmitter } from '../../types';
|
|
@@ -7,30 +7,29 @@ export declare type PUSH_SUBSYSTEM_UP = 'PUSH_SUBSYSTEM_UP';
|
|
|
7
7
|
export declare type PUSH_SUBSYSTEM_DOWN = 'PUSH_SUBSYSTEM_DOWN';
|
|
8
8
|
export declare type PUSH_NONRETRYABLE_ERROR = 'PUSH_NONRETRYABLE_ERROR';
|
|
9
9
|
export declare type PUSH_RETRYABLE_ERROR = 'PUSH_RETRYABLE_ERROR';
|
|
10
|
-
export declare type
|
|
11
|
-
export declare type
|
|
10
|
+
export declare type MEMBERSHIP_MS_UPDATE = 'MEMBERSHIP_MS_UPDATE';
|
|
11
|
+
export declare type MEMBERSHIP_LS_UPDATE = 'MEMBERSHIP_LS_UPDATE';
|
|
12
12
|
export declare type SEGMENT_UPDATE = 'SEGMENT_UPDATE';
|
|
13
13
|
export declare type SPLIT_KILL = 'SPLIT_KILL';
|
|
14
14
|
export declare type SPLIT_UPDATE = 'SPLIT_UPDATE';
|
|
15
|
-
export declare type MY_LARGE_SEGMENTS_UPDATE = 'MY_LARGE_SEGMENTS_UPDATE';
|
|
16
15
|
export declare type CONTROL = 'CONTROL';
|
|
17
16
|
export declare type OCCUPANCY = 'OCCUPANCY';
|
|
18
|
-
export declare type IPushEvent = PUSH_SUBSYSTEM_UP | PUSH_SUBSYSTEM_DOWN | PUSH_NONRETRYABLE_ERROR | PUSH_RETRYABLE_ERROR |
|
|
19
|
-
declare type IParsedData<T extends IPushEvent> = T extends
|
|
17
|
+
export declare type IPushEvent = PUSH_SUBSYSTEM_UP | PUSH_SUBSYSTEM_DOWN | PUSH_NONRETRYABLE_ERROR | PUSH_RETRYABLE_ERROR | MEMBERSHIP_MS_UPDATE | MEMBERSHIP_LS_UPDATE | SEGMENT_UPDATE | SPLIT_UPDATE | SPLIT_KILL | ControlType.STREAMING_RESET;
|
|
18
|
+
declare type IParsedData<T extends IPushEvent> = T extends MEMBERSHIP_MS_UPDATE ? IMembershipMSUpdateData : T extends MEMBERSHIP_LS_UPDATE ? IMembershipLSUpdateData : T extends SEGMENT_UPDATE ? ISegmentUpdateData : T extends SPLIT_UPDATE ? ISplitUpdateData : T extends SPLIT_KILL ? ISplitKillData : INotificationData;
|
|
20
19
|
/**
|
|
21
20
|
* EventEmitter used as Feedback Loop between the SyncManager and PushManager,
|
|
22
21
|
* where the latter pushes messages and the former consumes it
|
|
23
22
|
*/
|
|
24
23
|
export interface IPushEventEmitter extends IEventEmitter {
|
|
25
|
-
once<T extends IPushEvent>(event: T, listener: (parsedData: IParsedData<T
|
|
26
|
-
on<T extends IPushEvent>(event: T, listener: (parsedData: IParsedData<T
|
|
27
|
-
emit<T extends IPushEvent>(event: T, parsedData?: IParsedData<T
|
|
24
|
+
once<T extends IPushEvent>(event: T, listener: (parsedData: IParsedData<T>) => void): this;
|
|
25
|
+
on<T extends IPushEvent>(event: T, listener: (parsedData: IParsedData<T>) => void): this;
|
|
26
|
+
emit<T extends IPushEvent>(event: T, parsedData?: IParsedData<T>): boolean;
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
30
29
|
* PushManager
|
|
31
30
|
*/
|
|
32
31
|
export interface IPushManager extends ITask, IPushEventEmitter {
|
|
33
|
-
add(userKey: string, mySegmentsSyncTask: IMySegmentsSyncTask
|
|
32
|
+
add(userKey: string, mySegmentsSyncTask: IMySegmentsSyncTask): void;
|
|
34
33
|
remove(userKey: string): void;
|
|
35
34
|
}
|
|
36
35
|
export {};
|
|
@@ -90,7 +90,7 @@ export declare type DROPPED = 1;
|
|
|
90
90
|
export declare type DEDUPED = 2;
|
|
91
91
|
export declare type ImpressionDataType = QUEUED | DROPPED | DEDUPED;
|
|
92
92
|
export declare type EventDataType = QUEUED | DROPPED;
|
|
93
|
-
export declare type UpdatesFromSSEEnum = SPLITS |
|
|
93
|
+
export declare type UpdatesFromSSEEnum = SPLITS | MEMBERSHIPS;
|
|
94
94
|
export declare type SPLITS = 'sp';
|
|
95
95
|
export declare type IMPRESSIONS = 'im';
|
|
96
96
|
export declare type IMPRESSIONS_COUNT = 'ic';
|
|
@@ -98,9 +98,8 @@ export declare type EVENTS = 'ev';
|
|
|
98
98
|
export declare type TELEMETRY = 'te';
|
|
99
99
|
export declare type TOKEN = 'to';
|
|
100
100
|
export declare type SEGMENT = 'se';
|
|
101
|
-
export declare type
|
|
102
|
-
export declare type
|
|
103
|
-
export declare type OperationType = SPLITS | IMPRESSIONS | IMPRESSIONS_COUNT | EVENTS | TELEMETRY | TOKEN | SEGMENT | MY_SEGMENT | MY_LARGE_SEGMENT;
|
|
101
|
+
export declare type MEMBERSHIPS = 'ms';
|
|
102
|
+
export declare type OperationType = SPLITS | IMPRESSIONS | IMPRESSIONS_COUNT | EVENTS | TELEMETRY | TOKEN | SEGMENT | MEMBERSHIPS;
|
|
104
103
|
export declare type LastSync = Partial<Record<OperationType, number | undefined>>;
|
|
105
104
|
export declare type HttpErrors = Partial<Record<OperationType, {
|
|
106
105
|
[statusCode: string]: number;
|
|
@@ -177,7 +176,6 @@ export declare type RefreshRates = {
|
|
|
177
176
|
sp: number;
|
|
178
177
|
se?: number;
|
|
179
178
|
ms?: number;
|
|
180
|
-
mls?: number;
|
|
181
179
|
im: number;
|
|
182
180
|
ev: number;
|
|
183
181
|
te: number;
|
|
@@ -198,7 +196,6 @@ export declare type TelemetryConfigStats = {
|
|
|
198
196
|
};
|
|
199
197
|
export declare type TelemetryConfigStatsPayload = TelemetryConfigStats & {
|
|
200
198
|
sE: boolean;
|
|
201
|
-
lE?: boolean;
|
|
202
199
|
rR: RefreshRates;
|
|
203
200
|
uO: UrlOverrides;
|
|
204
201
|
iQ: number;
|