@splitsoftware/splitio-commons 1.6.2-rc.3 → 1.6.2-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/cjs/sdkClient/clientAttributesDecoration.js +1 -1
- package/cjs/storages/inMemory/AttributesCacheInMemory.js +1 -1
- package/esm/sdkClient/clientAttributesDecoration.js +1 -1
- package/esm/storages/inMemory/AttributesCacheInMemory.js +1 -1
- package/package.json +4 -5
- package/src/sdkClient/clientAttributesDecoration.ts +6 -6
- package/src/sdkClient/clientCS.ts +3 -3
- package/src/sdkClient/sdkClientMethodCSWithTT.ts +3 -3
- package/src/storages/inMemory/AttributesCacheInMemory.ts +13 -12
- package/src/types.d.ts +5 -70
- package/types/consent/index.d.ts +0 -2
- package/types/consent/sdkUserConsent.d.ts +0 -6
- package/types/dtos/types.d.ts +0 -166
- 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 -7
- package/types/evaluator/matchers/all.d.ts +0 -2
- package/types/evaluator/matchers/between.d.ts +0 -3
- package/types/evaluator/matchers/boolean.d.ts +0 -2
- package/types/evaluator/matchers/cont_all.d.ts +0 -2
- package/types/evaluator/matchers/cont_any.d.ts +0 -2
- package/types/evaluator/matchers/cont_str.d.ts +0 -2
- package/types/evaluator/matchers/dependency.d.ts +0 -5
- package/types/evaluator/matchers/eq.d.ts +0 -2
- package/types/evaluator/matchers/eq_set.d.ts +0 -2
- package/types/evaluator/matchers/ew.d.ts +0 -2
- package/types/evaluator/matchers/gte.d.ts +0 -2
- package/types/evaluator/matchers/index.d.ts +0 -7
- package/types/evaluator/matchers/lte.d.ts +0 -2
- package/types/evaluator/matchers/matcherTypes.d.ts +0 -10
- package/types/evaluator/matchers/part_of.d.ts +0 -2
- package/types/evaluator/matchers/segment.d.ts +0 -6
- package/types/evaluator/matchers/string.d.ts +0 -2
- package/types/evaluator/matchers/sw.d.ts +0 -2
- package/types/evaluator/matchers/whitelist.d.ts +0 -3
- package/types/evaluator/matchersTransform/index.d.ts +0 -6
- package/types/evaluator/matchersTransform/segment.d.ts +0 -5
- package/types/evaluator/matchersTransform/set.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/index.d.ts +0 -5
- package/types/integrations/browser.d.ts +0 -12
- package/types/integrations/ga/GaToSplit.d.ts +0 -40
- package/types/integrations/ga/GoogleAnalyticsToSplit.d.ts +0 -3
- package/types/integrations/ga/SplitToGa.d.ts +0 -34
- package/types/integrations/ga/SplitToGoogleAnalytics.d.ts +0 -3
- package/types/integrations/ga/types.d.ts +0 -148
- package/types/integrations/pluggable.d.ts +0 -11
- package/types/integrations/types.d.ts +0 -17
- 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 -141
- package/types/logger/index.d.ts +0 -20
- 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 -7
- package/types/logger/types.d.ts +0 -6
- package/types/readiness/constants.d.ts +0 -7
- package/types/readiness/readinessManager.d.ts +0 -6
- package/types/readiness/sdkReadinessManager.d.ts +0 -11
- package/types/readiness/types.d.ts +0 -54
- package/types/sdkClient/client.d.ts +0 -6
- package/types/sdkClient/clientAttributesDecoration.d.ts +0 -51
- package/types/sdkClient/clientCS.d.ts +0 -9
- package/types/sdkClient/clientInputValidation.d.ts +0 -7
- 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/sdkClient/sdkClientMethodCSWithTT.d.ts +0 -8
- package/types/sdkFactory/index.d.ts +0 -6
- package/types/sdkFactory/types.d.ts +0 -80
- package/types/sdkManager/index.d.ts +0 -5
- package/types/services/splitApi.d.ts +0 -11
- package/types/services/splitHttpClient.d.ts +0 -10
- package/types/services/types.d.ts +0 -50
- package/types/storages/AbstractSegmentsCacheSync.d.ts +0 -55
- package/types/storages/AbstractSplitsCacheAsync.d.ts +0 -36
- package/types/storages/AbstractSplitsCacheSync.d.ts +0 -42
- package/types/storages/KeyBuilder.d.ts +0 -14
- package/types/storages/KeyBuilderCS.d.ts +0 -16
- package/types/storages/KeyBuilderSS.d.ts +0 -15
- package/types/storages/dataLoader.d.ts +0 -10
- package/types/storages/findLatencyIndex.d.ts +0 -7
- package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +0 -25
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +0 -50
- 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 -43
- package/types/storages/inMemory/EventsCacheInMemory.d.ts +0 -35
- package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +0 -24
- 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 -22
- package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +0 -19
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +0 -20
- package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +0 -53
- package/types/storages/inRedis/EventsCacheInRedis.d.ts +0 -32
- package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +0 -18
- package/types/storages/inRedis/RedisAdapter.d.ts +0 -24
- package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +0 -18
- package/types/storages/inRedis/SplitsCacheInRedis.d.ts +0 -91
- package/types/storages/inRedis/TelemetryCacheInRedis.d.ts +0 -20
- package/types/storages/inRedis/constants.d.ts +0 -1
- package/types/storages/inRedis/index.d.ts +0 -10
- package/types/storages/metadataBuilder.d.ts +0 -3
- package/types/storages/pluggable/EventsCachePluggable.d.ts +0 -38
- package/types/storages/pluggable/ImpressionsCachePluggable.d.ts +0 -35
- package/types/storages/pluggable/SegmentsCachePluggable.d.ts +0 -54
- package/types/storages/pluggable/SplitsCachePluggable.d.ts +0 -89
- package/types/storages/pluggable/TelemetryCachePluggable.d.ts +0 -18
- package/types/storages/pluggable/constants.d.ts +0 -1
- package/types/storages/pluggable/inMemoryWrapper.d.ts +0 -13
- package/types/storages/pluggable/index.d.ts +0 -10
- package/types/storages/pluggable/wrapperAdapter.d.ts +0 -12
- package/types/storages/types.d.ts +0 -430
- package/types/sync/offline/LocalhostFromObject.d.ts +0 -2
- 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 -26
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +0 -13
- package/types/sync/polling/updaters/segmentChangesUpdater.d.ts +0 -18
- package/types/sync/polling/updaters/splitChangesUpdater.d.ts +0 -39
- 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 -67
- package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +0 -6
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +0 -8
- package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +0 -12
- 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/mySegmentsV2utils.d.ts +0 -27
- 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 -25
- package/types/sync/submitters/types.d.ts +0 -177
- 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/impressionObserver/utils.d.ts +0 -13
- package/types/trackers/impressionsTracker.d.ts +0 -15
- package/types/trackers/telemetryTracker.d.ts +0 -3
- package/types/trackers/types.d.ts +0 -36
- 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 -16
- package/types/utils/MinEventEmitter.d.ts +0 -12
- package/types/utils/MinEvents.d.ts +0 -4
- package/types/utils/base64/index.d.ts +0 -30
- package/types/utils/constants/browser.d.ts +0 -3
- package/types/utils/constants/index.d.ts +0 -62
- 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/splitExistance.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/trafficTypeExistance.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 -7
- 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/maps.d.ts +0 -55
- package/types/utils/lang/objectAssign.d.ts +0 -3
- package/types/utils/lang/sets.d.ts +0 -60
- 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 -5
- package/types/utils/settingsValidation/impressionsMode.d.ts +0 -3
- package/types/utils/settingsValidation/index.d.ts +0 -51
- 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 -12
- package/types/utils/settingsValidation/localhost/builtin.d.ts +0 -15
- package/types/utils/settingsValidation/localhost/pluggable.d.ts +0 -15
- 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 -1
- package/types/utils/settingsValidation/runtime.d.ts +0 -2
- package/types/utils/settingsValidation/splitFilters.d.ts +0 -15
- package/types/utils/settingsValidation/storage/storageCS.d.ts +0 -20
- package/types/utils/settingsValidation/types.d.ts +0 -32
- 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,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if the target string ends with the sub string.
|
|
3
|
-
*/
|
|
4
|
-
export declare function endsWith(target: any, sub: any, caseInsensitive?: boolean): boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Loops through a source collection (an object or an array) running iteratee
|
|
7
|
-
* against each element. It returns the first element for which iteratee returned
|
|
8
|
-
* a truthy value and stops the loop.
|
|
9
|
-
* Iteratee receives three arguments (element, key/index, collection)
|
|
10
|
-
*/
|
|
11
|
-
export declare function find<T extends any[] | Record<string, any>, V = T extends any[] ? T[0] : T[keyof T], K = T extends any[] ? number : keyof T & string>(source: T | null | undefined, iteratee: (value: V, key: K, source: T) => boolean): V | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Evaluates iteratee for each element of the source array. Returns the index of the first element
|
|
14
|
-
* for which iteratee returns truthy. If no element is found or there's an issue with the params it returns -1.
|
|
15
|
-
*/
|
|
16
|
-
export declare function findIndex<T>(source: T[], iteratee: (value: T, index: number, source: T[]) => boolean): number;
|
|
17
|
-
/**
|
|
18
|
-
* Executes iteratee for given obj own props.
|
|
19
|
-
*/
|
|
20
|
-
export declare function forOwn<T>(obj: {
|
|
21
|
-
[key: string]: T;
|
|
22
|
-
}, iteratee: (value: T, key: string, obj: {
|
|
23
|
-
[key: string]: T;
|
|
24
|
-
}) => any): {
|
|
25
|
-
[key: string]: T;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Safely retrieve the specified prop from obj. If we can't retrieve
|
|
29
|
-
* that property value, we return the default value.
|
|
30
|
-
*/
|
|
31
|
-
export declare function get(obj: any, prop: any, val?: any): any;
|
|
32
|
-
/**
|
|
33
|
-
* Parses an array into a map of different arrays, grouping by the specified prop value.
|
|
34
|
-
*/
|
|
35
|
-
export declare function groupBy<T extends Record<string, any>>(source: T[], prop: string): Record<string, T[]>;
|
|
36
|
-
/**
|
|
37
|
-
* Checks if a given value is a boolean.
|
|
38
|
-
*/
|
|
39
|
-
export declare function isBoolean(val: any): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Checks if a given value is a finite value of number type or Number object.
|
|
42
|
-
* Unlike `Number.isFinite`, it also tests Number object instances.
|
|
43
|
-
* Unlike global `isFinite`, it returns false if the value is not a number or Number object instance.
|
|
44
|
-
*/
|
|
45
|
-
export declare function isFiniteNumber(val: any): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Checks if a given value is an integer value of number type or Number object.
|
|
48
|
-
* Unlike `Number.isInteger`, it also tests Number object instances.
|
|
49
|
-
*/
|
|
50
|
-
export declare function isIntegerNumber(val: any): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Checks if a given value is a NaN value of number type or Number object.
|
|
53
|
-
* Unlike `Number.isNaN`, it also tests Number object instances.
|
|
54
|
-
* Unlike global `isNan`, it returns false if the value is not a number or Number object instance.
|
|
55
|
-
*/
|
|
56
|
-
export declare function isNaNNumber(val: any): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Validates if a value is an object created by the Object constructor (plain object).
|
|
59
|
-
* It checks `constructor.name` to avoid false negatives when validating values on a separate VM context, which has its own global built-ins.
|
|
60
|
-
*/
|
|
61
|
-
export declare function isObject(obj: any): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Checks if a given value is a string.
|
|
64
|
-
*/
|
|
65
|
-
export declare function isString(val: any): val is string;
|
|
66
|
-
/**
|
|
67
|
-
* String sanitizer. Returns the provided value converted to uppercase if it is a string.
|
|
68
|
-
*/
|
|
69
|
-
export declare function stringToUpperCase(val: any): any;
|
|
70
|
-
/**
|
|
71
|
-
* Deep copy version of Object.assign using recursion.
|
|
72
|
-
* There are some assumptions here. It's for internal use and we don't need verbose errors
|
|
73
|
-
* or to ensure the data types or whatever. Parameters should always be correct (at least have a target and a source, of type object).
|
|
74
|
-
*/
|
|
75
|
-
export declare function merge(target: {
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
}, source: {
|
|
78
|
-
[key: string]: any;
|
|
79
|
-
}, ...rest: any[]): object;
|
|
80
|
-
/**
|
|
81
|
-
* Checks if the target string starts with the sub string.
|
|
82
|
-
*/
|
|
83
|
-
export declare function startsWith(target: any, sub: any): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Transforms a value into a number.
|
|
86
|
-
* Note: We're not expecting anything fancy here. If we are at some point, add more type checks.
|
|
87
|
-
*/
|
|
88
|
-
export declare function toNumber(val: any): number;
|
|
89
|
-
/**
|
|
90
|
-
* Transforms a value into it's string representation.
|
|
91
|
-
*/
|
|
92
|
-
export declare function toString(val: any): string;
|
|
93
|
-
/**
|
|
94
|
-
* Removes duplicate items on an array of strings.
|
|
95
|
-
*/
|
|
96
|
-
export declare function uniq(arr: string[]): string[];
|
|
97
|
-
/**
|
|
98
|
-
* Removes duplicate items on an array of objects using an optional `stringify` function as equality criteria.
|
|
99
|
-
* It uses JSON.stringify as default criteria.
|
|
100
|
-
*/
|
|
101
|
-
export declare function uniqAsStrings<T>(arr: T[], stringify?: (value: T) => string): T[];
|
|
102
|
-
/**
|
|
103
|
-
* Returns a number to be used as ID, which will be unique.
|
|
104
|
-
*/
|
|
105
|
-
export declare function uniqueId(): number;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Map implementation based on es6-map polyfill (https://github.com/medikoo/es6-map/blob/master/polyfill.js),
|
|
3
|
-
* with the minimal features used by the SDK.
|
|
4
|
-
|
|
5
|
-
Copyright (C) 2013 Mariusz Nowak (www.medikoo.com)
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in
|
|
15
|
-
all copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
THE SOFTWARE.
|
|
24
|
-
**/
|
|
25
|
-
export interface IMap<K, V> {
|
|
26
|
-
set(key: K, value: V): this;
|
|
27
|
-
clear(): void;
|
|
28
|
-
delete(key: K): boolean;
|
|
29
|
-
get(key: K): V | undefined;
|
|
30
|
-
readonly size: number;
|
|
31
|
-
}
|
|
32
|
-
export declare class MapPoly<K, V> implements IMap<K, V> {
|
|
33
|
-
private __mapKeysData__;
|
|
34
|
-
private __mapValuesData__;
|
|
35
|
-
constructor(entries?: readonly (readonly [K, V])[] | null);
|
|
36
|
-
clear(): void;
|
|
37
|
-
set(key: K, value: V): this;
|
|
38
|
-
delete(key: K): boolean;
|
|
39
|
-
get(key: K): V | undefined;
|
|
40
|
-
get size(): number;
|
|
41
|
-
}
|
|
42
|
-
interface IMapConstructor {
|
|
43
|
-
new (): IMap<any, any>;
|
|
44
|
-
new <K, V>(entries?: readonly (readonly [K, V])[] | null): IMap<K, V>;
|
|
45
|
-
readonly prototype: IMap<any, any>;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* return the Map constructor to use. If native Map is not available or it doesn't support the required features (e.g., IE11),
|
|
49
|
-
* a ponyfill with minimal features is returned instead.
|
|
50
|
-
*
|
|
51
|
-
* Exported for testing purposes only.
|
|
52
|
-
*/
|
|
53
|
-
export declare function __getMapConstructor(): IMapConstructor;
|
|
54
|
-
export declare const _Map: IMapConstructor;
|
|
55
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare type ObjectAssign = (<T, U>(target: T, source: U) => T & U) & (<T, U, V>(target: T, source1: U, source2: V) => T & U & V) & (<T, U, V, W>(target: T, source1: U, source2: V, source3: W) => T & U & V & W) & (<T, U, V, W, Q>(target: T, source1: U, source2: V, source3: W, source4: Q) => T & U & V & W & Q) & (<T, U, V, W, Q, R>(target: T, source1: U, source2: V, source3: W, source4: Q, source5: R) => T & U & V & W & Q & R) & ((target: any, ...sources: any[]) => any);
|
|
2
|
-
export declare const objectAssign: ObjectAssign;
|
|
3
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set implementation based on es6-set polyfill (https://github.com/medikoo/es6-set/blob/master/polyfill.js),
|
|
3
|
-
* with the minimal features used by the SDK.
|
|
4
|
-
|
|
5
|
-
Copyright (C) 2013 Mariusz Nowak (www.medikoo.com)
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in
|
|
15
|
-
all copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
THE SOFTWARE.
|
|
24
|
-
**/
|
|
25
|
-
export interface ISet<T> {
|
|
26
|
-
add(value: T): this;
|
|
27
|
-
clear(): void;
|
|
28
|
-
delete(value: T): boolean;
|
|
29
|
-
forEach(callbackfn: (value: T, value2: T, set: ISet<T>) => void, thisArg?: any): void;
|
|
30
|
-
has(value: T): boolean;
|
|
31
|
-
readonly size: number;
|
|
32
|
-
}
|
|
33
|
-
export declare class SetPoly<T> implements ISet<T> {
|
|
34
|
-
__setData__: T[];
|
|
35
|
-
constructor(values?: readonly T[] | null);
|
|
36
|
-
clear(): void;
|
|
37
|
-
add(value: T): this;
|
|
38
|
-
delete(value: T): boolean;
|
|
39
|
-
has(value: T): boolean;
|
|
40
|
-
forEach(callbackfn: (value: T, value2: T, set: SetPoly<T>) => void, thisArg?: any): void;
|
|
41
|
-
get size(): number;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* return an array containing the items of the given set.
|
|
45
|
-
* @param set Set or SetPoly instance
|
|
46
|
-
*/
|
|
47
|
-
export declare function setToArray<T>(set: ISet<T>): T[];
|
|
48
|
-
interface ISetConstructor {
|
|
49
|
-
new <T = any>(values?: readonly T[] | null): ISet<T>;
|
|
50
|
-
readonly prototype: ISet<any>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* return the Set constructor to use. If `Array.from` built-in or native Set is not available or it doesn't support the required features,
|
|
54
|
-
* a ponyfill with minimal features is returned instead.
|
|
55
|
-
*
|
|
56
|
-
* Exported for testing purposes only.
|
|
57
|
-
*/
|
|
58
|
-
export declare function __getSetConstructor(): ISetConstructor;
|
|
59
|
-
export declare const _Set: ISetConstructor;
|
|
60
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare function UTF16ToUTF8(key: string): string | undefined;
|
|
2
|
-
/*!
|
|
3
|
-
* +----------------------------------------------------------------------------------+
|
|
4
|
-
* | murmurHash3.js v3.0.0 (http://github.com/karanlyons/murmurHash3.js) |
|
|
5
|
-
* | A TypeScript/JavaScript implementation of MurmurHash3's hashing algorithms. |
|
|
6
|
-
* |----------------------------------------------------------------------------------|
|
|
7
|
-
* | Copyright (c) 2012-2020 Karan Lyons. Freely distributable under the MIT license. |
|
|
8
|
-
* +----------------------------------------------------------------------------------+
|
|
9
|
-
*/
|
|
10
|
-
export declare function x86Multiply(m: number, n: number): number;
|
|
11
|
-
export declare function x86Rotl(m: number, n: number): number;
|
|
12
|
-
export declare function x86Fmix(h: number): number;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* x86 version of Murmur3 for 128bits.
|
|
3
|
-
* Used by hashImpression128 because in JS it is more efficient than the x64 version, no matter the underlying OS/CPU arch.
|
|
4
|
-
*
|
|
5
|
-
* @param {string} str
|
|
6
|
-
*/
|
|
7
|
-
export declare function hash128(str: string, seed?: number): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type Hash64 = {
|
|
2
|
-
hex: string;
|
|
3
|
-
dec: string;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Gets the higher 64 bits of the x64 version of Murmur3 for 128bits, as decimal and hexadecimal number strings.
|
|
7
|
-
* Used for MySegments channel V2 notifications.
|
|
8
|
-
* @param {string} str
|
|
9
|
-
*/
|
|
10
|
-
export declare function hash64(str: string): Hash64;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface utfx {
|
|
2
|
-
encodeUTF16toUTF8(src: () => number | null, dst: (...args: number[]) => string | undefined): void;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Converts and encodes UTF16 characters to UTF8 bytes.
|
|
6
|
-
* @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`
|
|
7
|
-
* if there are no more characters left.
|
|
8
|
-
* @param {!function(number)} dst Bytes destination as a function successively called with the next byte.
|
|
9
|
-
* @expose
|
|
10
|
-
*/
|
|
11
|
-
export declare function encodeUTF16toUTF8(src: () => number | null, dst: (...args: number[]) => string | undefined): void;
|
|
12
|
-
/**
|
|
13
|
-
* Creates a source function for a string.
|
|
14
|
-
* @param {string} s String to read from
|
|
15
|
-
* @returns {!function():number|null} Source function returning the next char code respectively `null` if there are
|
|
16
|
-
* no more characters left.
|
|
17
|
-
* @throws {TypeError} If the argument is invalid
|
|
18
|
-
* @expose
|
|
19
|
-
*/
|
|
20
|
-
export declare function stringSource(s: string): () => number | null;
|
|
21
|
-
/**
|
|
22
|
-
* Creates a destination function for a string.
|
|
23
|
-
* @returns {function(number=):undefined|string} Destination function successively called with the next char code.
|
|
24
|
-
* Returns the final string when called without arguments.
|
|
25
|
-
* @expose
|
|
26
|
-
*/
|
|
27
|
-
export declare function stringDestination(): (...args: number[]) => string | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function thenable(o: any): o is Promise<any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function timeout<T>(ms: number, promise: Promise<T>): Promise<T>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* wraps a given promise in a new one with a default onRejected function,
|
|
3
|
-
* that handles the promise rejection if not other onRejected handler is provided.
|
|
4
|
-
*
|
|
5
|
-
* Caveats:
|
|
6
|
-
* - There are some cases where the `defaultOnRejected` handler is not invoked
|
|
7
|
-
* and the promise rejection must be handled by the user (same as the Promise spec):
|
|
8
|
-
* - using async/await syntax with a transpiler to Promises
|
|
9
|
-
* - setting an `onFinally` handler as the first handler (e.g. `promiseWrapper(Promise.reject()).finally(...)`)
|
|
10
|
-
* - setting more than one handler with at least one of them being an onRejected handler
|
|
11
|
-
* - If the wrapped promise is rejected when using native async/await syntax, the `defaultOnRejected` handler is invoked
|
|
12
|
-
* and neither the catch block nor the remaining try block are executed.
|
|
13
|
-
*
|
|
14
|
-
* @param customPromise promise to wrap
|
|
15
|
-
* @param defaultOnRejected default onRejected function
|
|
16
|
-
* @returns a promise that doesn't need to be handled for rejection (except when using async/await syntax) and
|
|
17
|
-
* includes a method named `hasOnFulfilled` that returns true if the promise has attached an onFulfilled handler.
|
|
18
|
-
*/
|
|
19
|
-
export declare function promiseWrapper<T>(customPromise: Promise<T>, defaultOnRejected: (_: any) => any): Promise<T> & {
|
|
20
|
-
hasOnFulfilled: () => boolean;
|
|
21
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ISettingsValidationParams } from './types';
|
|
2
|
-
import { ISettings } from '../../types';
|
|
3
|
-
export declare const base: {
|
|
4
|
-
mode: import("../../types").SDKMode;
|
|
5
|
-
core: {
|
|
6
|
-
authorizationKey: undefined;
|
|
7
|
-
key: undefined;
|
|
8
|
-
trafficType: undefined;
|
|
9
|
-
labelsEnabled: boolean;
|
|
10
|
-
IPAddressesEnabled: undefined;
|
|
11
|
-
};
|
|
12
|
-
scheduler: {
|
|
13
|
-
featuresRefreshRate: number;
|
|
14
|
-
segmentsRefreshRate: number;
|
|
15
|
-
telemetryRefreshRate: number;
|
|
16
|
-
impressionsRefreshRate: number;
|
|
17
|
-
offlineRefreshRate: number;
|
|
18
|
-
eventsPushRate: number;
|
|
19
|
-
eventsQueueSize: number;
|
|
20
|
-
impressionsQueueSize: number;
|
|
21
|
-
pushRetryBackoffBase: number;
|
|
22
|
-
};
|
|
23
|
-
urls: {
|
|
24
|
-
sdk: string;
|
|
25
|
-
events: string;
|
|
26
|
-
auth: string;
|
|
27
|
-
streaming: string;
|
|
28
|
-
telemetry: string;
|
|
29
|
-
};
|
|
30
|
-
storage: undefined;
|
|
31
|
-
debug: undefined;
|
|
32
|
-
impressionListener: undefined;
|
|
33
|
-
version: undefined;
|
|
34
|
-
integrations: undefined;
|
|
35
|
-
streamingEnabled: boolean;
|
|
36
|
-
sync: {
|
|
37
|
-
splitFilters: undefined;
|
|
38
|
-
impressionsMode: string;
|
|
39
|
-
localhostMode: undefined;
|
|
40
|
-
enabled: boolean;
|
|
41
|
-
};
|
|
42
|
-
log: undefined;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Validates the given config and use it to build a settings object.
|
|
46
|
-
* NOTE: it doesn't validate the Api Key. Call `validateApikey` or `validateAndTrackApiKey` for that after settings validation.
|
|
47
|
-
*
|
|
48
|
-
* @param config user defined configuration
|
|
49
|
-
* @param validationParams defaults and fields validators used to validate and creates a settings object from a given config
|
|
50
|
-
*/
|
|
51
|
-
export declare function settingsValidation(config: unknown, validationParams: ISettingsValidationParams): ISettings;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* This function validates `settings.integrations` object
|
|
4
|
-
*
|
|
5
|
-
* @param {any} settings config object provided by the user to initialize the sdk
|
|
6
|
-
* @param {function} integrationValidator filter used to remove invalid integration items
|
|
7
|
-
* @param {string} extraWarning optional string used to better describe why an item might be invalid
|
|
8
|
-
*
|
|
9
|
-
* @returns {Array} array of valid integration items. The array might be empty if `settings` object does not have valid integrations.
|
|
10
|
-
*/
|
|
11
|
-
export declare function validateIntegrations(settings: {
|
|
12
|
-
log: ILogger;
|
|
13
|
-
integrations?: any;
|
|
14
|
-
}, integrationValidator: (integrationItem: any) => boolean, extraWarning?: string): any[];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* This function validates `settings.integrations` object that consists of a list of configuration items, used by the isomorphic JS SDK.
|
|
4
|
-
*
|
|
5
|
-
* @param {any} settings config object provided by the user to initialize the sdk
|
|
6
|
-
* @param {Array<string>} validIntegrationTypes list of integration types to filter from `settings.integrations`
|
|
7
|
-
*
|
|
8
|
-
* @returns {Array} array of valid integration items. The array might be empty if `settings` object does not have valid integrations.
|
|
9
|
-
*/
|
|
10
|
-
export declare function validateConfigurableIntegrations(settings: {
|
|
11
|
-
log: ILogger;
|
|
12
|
-
integrations?: any;
|
|
13
|
-
}, validIntegrationTypes?: string[]): any[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ISettings, ILogger } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* This function validates `settings.integrations` object that consists of a list of pluggable integration factories.
|
|
4
|
-
*
|
|
5
|
-
* @param {any} settings config object provided by the user to initialize the sdk
|
|
6
|
-
*
|
|
7
|
-
* @returns {Array} array of valid integration factories. The array might be empty if `settings` object does not have valid integrations.
|
|
8
|
-
*/
|
|
9
|
-
export declare function validatePluggableIntegrations(settings: {
|
|
10
|
-
log: ILogger;
|
|
11
|
-
integrations?: any;
|
|
12
|
-
}): ISettings['integrations'];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SDKMode, ILogger } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* This function validates `settings.sync.localhostMode` object
|
|
4
|
-
*
|
|
5
|
-
* @param {any} settings config object provided by the user to initialize the sdk
|
|
6
|
-
*
|
|
7
|
-
* @returns {Object} provided localhost mode module at `settings.sync.localhostMode` if valid, or a default LocalhostFromObject instance if not provided or invalid
|
|
8
|
-
*/
|
|
9
|
-
export declare function validateLocalhostWithDefault(settings: {
|
|
10
|
-
log: ILogger;
|
|
11
|
-
sync: {
|
|
12
|
-
localhostMode?: any;
|
|
13
|
-
};
|
|
14
|
-
mode: SDKMode;
|
|
15
|
-
}): any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SDKMode, ILogger } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* This function validates `settings.sync.localhostMode` object
|
|
4
|
-
*
|
|
5
|
-
* @param {any} settings config object provided by the user to initialize the sdk
|
|
6
|
-
*
|
|
7
|
-
* @returns {Object | undefined} provided localhost mode module at `settings.sync.localhostMode`, or undefined if it is not provided or invalid
|
|
8
|
-
*/
|
|
9
|
-
export declare function validateLocalhost(settings: {
|
|
10
|
-
log: ILogger;
|
|
11
|
-
sync: {
|
|
12
|
-
localhostMode?: any;
|
|
13
|
-
};
|
|
14
|
-
mode: SDKMode;
|
|
15
|
-
}): any;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validates the `debug` property at config and use it to set the log level.
|
|
4
|
-
*
|
|
5
|
-
* @param settings user config object, with an optional `debug` property of type boolean or string log level.
|
|
6
|
-
* @returns a logger instance with the log level at `settings.debug`. If `settings.debug` is invalid or not provided, `initialLogLevel` is used.
|
|
7
|
-
*/
|
|
8
|
-
export declare function validateLogger(settings: {
|
|
9
|
-
debug: unknown;
|
|
10
|
-
}): ILogger;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LogLevel } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the LogLevel for the given debugValue or undefined if it is invalid,
|
|
4
|
-
* i.e., if the debugValue is not a boolean or LogLevel string.
|
|
5
|
-
*
|
|
6
|
-
* @param debugValue debug value at config
|
|
7
|
-
* @returns LogLevel of the given debugValue or undefined if the provided value is invalid
|
|
8
|
-
*/
|
|
9
|
-
export declare function getLogLevel(debugValue: unknown): LogLevel | undefined;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validates the `debug` property at config and use it to set the logger.
|
|
4
|
-
*
|
|
5
|
-
* @param settings user config object, with an optional `debug` property of type boolean, string log level or a Logger object.
|
|
6
|
-
* @returns a logger instance, that might be: the provided logger at `settings.debug`, or one with the given `debug` log level,
|
|
7
|
-
* or one with NONE log level if `debug` is not defined or invalid.
|
|
8
|
-
*/
|
|
9
|
-
export declare function validateLogger(settings: {
|
|
10
|
-
debug: unknown;
|
|
11
|
-
}): ILogger;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function mode(key: string, mode: string): string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ISplitFiltersValidation, ILogger } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validates `splitFilters` configuration object and parses it into a query string for filtering splits on `/splitChanges` fetch.
|
|
4
|
-
*
|
|
5
|
-
* @param {ILogger} log logger
|
|
6
|
-
* @param {any} maybeSplitFilters split filters configuration param provided by the user
|
|
7
|
-
* @param {string} mode settings mode
|
|
8
|
-
* @returns it returns an object with the following properties:
|
|
9
|
-
* - `validFilters`: the validated `splitFilters` configuration object defined by the user.
|
|
10
|
-
* - `queryString`: the parsed split filter query. it is null if all filters are invalid or all values in filters are invalid.
|
|
11
|
-
* - `groupedFilters`: list of values grouped by filter type.
|
|
12
|
-
*
|
|
13
|
-
* @throws Error if the some of the grouped list of values per filter exceeds the max allowed length
|
|
14
|
-
*/
|
|
15
|
-
export declare function validateSplitFilters(log: ILogger, maybeSplitFilters: any, mode: string): ISplitFiltersValidation;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ISettings, SDKMode, ILogger } from '../../../types';
|
|
2
|
-
import { IStorageFactoryParams, IStorageSync } from '../../../storages/types';
|
|
3
|
-
export declare function __InLocalStorageMockFactory(params: IStorageFactoryParams): IStorageSync;
|
|
4
|
-
export declare namespace __InLocalStorageMockFactory {
|
|
5
|
-
var type: import("../../../types").StorageType;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* This function validates `settings.storage` object
|
|
9
|
-
*
|
|
10
|
-
* @param {any} settings config object provided by the user to initialize the sdk
|
|
11
|
-
*
|
|
12
|
-
* @returns {Object} valid storage factory. Default to `InMemoryStorageCSFactory` if the provided storage is invalid or not compatible with the sdk mode if mode is standalone or localhost
|
|
13
|
-
*
|
|
14
|
-
* @throws error if mode is consumer and the provided storage is not compatible
|
|
15
|
-
*/
|
|
16
|
-
export declare function validateStorageCS(settings: {
|
|
17
|
-
log: ILogger;
|
|
18
|
-
storage?: any;
|
|
19
|
-
mode: SDKMode;
|
|
20
|
-
}): ISettings['storage'];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ISettings } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Parameters used to specialize the settings validation for each API variant
|
|
4
|
-
* (client-side, server-side) and environment (Node server, Browser, etc)
|
|
5
|
-
*/
|
|
6
|
-
export interface ISettingsValidationParams {
|
|
7
|
-
/**
|
|
8
|
-
* Object of values to overwrite base settings.
|
|
9
|
-
* Version and startup properties are required, because they are not defined in the base settings.
|
|
10
|
-
*/
|
|
11
|
-
defaults: Partial<ISettings> & {
|
|
12
|
-
version: string;
|
|
13
|
-
} & {
|
|
14
|
-
startup: ISettings['startup'];
|
|
15
|
-
};
|
|
16
|
-
/** If true, validates core.key */
|
|
17
|
-
acceptKey?: boolean;
|
|
18
|
-
/** If true, validates core.trafficType */
|
|
19
|
-
acceptTT?: boolean;
|
|
20
|
-
/** Define runtime values (`settings.runtime`) */
|
|
21
|
-
runtime: (settings: ISettings) => ISettings['runtime'];
|
|
22
|
-
/** Storage validator (`settings.storage`) */
|
|
23
|
-
storage?: (settings: ISettings) => ISettings['storage'];
|
|
24
|
-
/** Integrations validator (`settings.integrations`) */
|
|
25
|
-
integrations?: (settings: ISettings) => ISettings['integrations'];
|
|
26
|
-
/** Logger validator (`settings.debug`) */
|
|
27
|
-
logger: (settings: ISettings) => ISettings['log'];
|
|
28
|
-
/** Localhost mode validator (`settings.sync.localhostMode`) */
|
|
29
|
-
localhost?: (settings: ISettings) => ISettings['sync']['localhostMode'];
|
|
30
|
-
/** User consent validator (`settings.userConsent`) */
|
|
31
|
-
consent: (settings: ISettings) => ISettings['userConsent'];
|
|
32
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ISettings } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Get URL based on a given target (path).
|
|
4
|
-
* ATM, it is only used for testing purposes.
|
|
5
|
-
*
|
|
6
|
-
* @param settings settings object
|
|
7
|
-
* @param target url path
|
|
8
|
-
* @return complete url
|
|
9
|
-
*/
|
|
10
|
-
export declare function url(settings: ISettings, target: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const now: () => number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function now(): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function timer(now: () => number): () => number;
|