/** * Check Feature Flag Enabled Service * Checks if a feature flag is enabled for the given context */ import { type ServiceOptions, type IsEnabledResponse } from '@plyaz/types/api'; import type { FeatureFlagContext } from '@plyaz/types/features'; import type { EndpointsList } from '@/api/endpoints'; import type { FetchResponse } from 'fetchff'; /** * Request payload for checkFeatureFlagEnabled */ export interface CheckFeatureFlagEnabledPayload { key: TKey; context?: FeatureFlagContext; } /** * Check if a feature flag is enabled * Uses endpoint: POST /feature-flags/:key/enabled * * @param payload - Flag key and optional context * @param options - Optional service options * @returns Promise * * @example * ```typescript * // Basic usage * const result = await checkFeatureFlagEnabled({ key: 'new-dashboard' }); * if (result.data.isEnabled) { * // Show new dashboard * } * * // With user context * const result = await checkFeatureFlagEnabled({ * key: 'premium-feature', * context: { userId: 'user-123', userRole: 'premium' } * }); * ``` */ export declare function checkFeatureFlagEnabled(payload: CheckFeatureFlagEnabledPayload, options?: ServiceOptions): Promise>; //# sourceMappingURL=checkFeatureFlagEnabled.d.ts.map