@bucketco/browser-sdk
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -49,2 +49,3 @@ import { FeaturesOptions } from './feature/features'; | ||
private liveSatisfaction; | ||
private liveSatisfactionInit; | ||
private featuresClient; | ||
@@ -93,3 +94,3 @@ constructor(publishableKey: string, context?: BucketContext, opts?: InitOptions); | ||
getFeatures(): import('./feature/features').Features | undefined; | ||
stop(): void; | ||
stop(): Promise<void>; | ||
} |
@@ -10,12 +10,8 @@ import { APIFeaturesResponse } from './features'; | ||
staleAt: number; | ||
success: boolean; | ||
features: APIFeaturesResponse | undefined; | ||
attemptCount: number; | ||
features: APIFeaturesResponse; | ||
} | ||
export declare function parseAPIFeaturesResponse(featuresInput: any): APIFeaturesResponse | undefined; | ||
export interface CacheResult { | ||
features: APIFeaturesResponse | undefined; | ||
features: APIFeaturesResponse; | ||
stale: boolean; | ||
success: boolean; | ||
attemptCount: number; | ||
} | ||
@@ -31,6 +27,4 @@ export declare class FeatureCache { | ||
}); | ||
set(key: string, { success, features, attemptCount, }: { | ||
success: boolean; | ||
features?: APIFeaturesResponse; | ||
attemptCount: number; | ||
set(key: string, { features, }: { | ||
features: APIFeaturesResponse; | ||
}): CacheData; | ||
@@ -37,0 +31,0 @@ get(key: string): CacheResult | undefined; |
@@ -18,3 +18,2 @@ import { BucketContext } from '../context'; | ||
staleWhileRevalidate?: boolean; | ||
failureRetryAttempts?: number | false; | ||
}; | ||
@@ -25,3 +24,2 @@ type Config = { | ||
staleWhileRevalidate: boolean; | ||
failureRetryAttempts: number | false; | ||
}; | ||
@@ -55,6 +53,7 @@ export declare const DEFAULT_FEATURES_CONFIG: Config; | ||
initialize(): Promise<void>; | ||
private setFeatures; | ||
getFeatures(): Features | undefined; | ||
private fetchParams; | ||
private maybeFetchFeatures; | ||
fetchFeatures(): Promise<APIFeaturesResponse>; | ||
fetchFeatures(): Promise<APIFeaturesResponse | undefined>; | ||
/** | ||
@@ -61,0 +60,0 @@ * Send a feature "check" event. |
{ | ||
"name": "@bucketco/browser-sdk", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"packageManager": "yarn@4.1.1", | ||
@@ -61,3 +61,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "f944554d25ac07c2a71f73afd6eff21ef57418a4" | ||
"gitHead": "640fec6372802a8ca9d3aee4cbfb615077f4f11b" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
874406
4425