@segment/analytics-react-native
Version:
The hassle-free way to add Segment analytics to your React-Native app.
19 lines • 1.29 kB
TypeScript
import type { RateLimitConfig, BackoffConfig, HttpConfig, SegmentAPISettings, SegmentAPIIntegrations, LoggerType, DeepPartial } from './types';
export declare const validateRateLimitConfig: (config: RateLimitConfig, logger?: LoggerType) => RateLimitConfig;
export declare const validateBackoffConfig: (config: BackoffConfig, logger?: LoggerType, rateLimitConfig?: RateLimitConfig) => BackoffConfig;
/**
* Validates and normalizes integrations from CDN response.
* Returns null if integrations are malformed (triggers fallback to defaults).
*/
export declare const validateIntegrations: (settings: SegmentAPISettings, logger?: LoggerType) => SegmentAPIIntegrations | null;
/**
* Extracts, merges, and validates httpConfig from CDN response.
* Deep-merges with defaults and validates all values.
*/
export declare const extractHttpConfig: (serverConfig: HttpConfig, logger?: LoggerType) => HttpConfig;
/**
* Merge httpConfig from 3 sources with priority: default < CDN < client overrides
* Used during settings initialization to combine default, CDN, and user configs.
*/
export declare const mergeHttpConfig: (cdnConfig: HttpConfig | undefined, clientConfig: DeepPartial<HttpConfig> | undefined, logger?: LoggerType) => HttpConfig;
//# sourceMappingURL=config-validation.d.ts.map