/** * Evaluate Feature Flag Service * Evaluates a single feature flag with full details */ import { type ServiceOptions, type EvaluateFlagResponse } 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 evaluateFeatureFlag */ export interface EvaluateFeatureFlagPayload { key: TKey; context?: FeatureFlagContext; } /** * Evaluate a feature flag with full details * Uses endpoint: POST /feature-flags/:key/evaluate * * @param payload - Flag key and optional context * @param options - Optional service options * @returns Promise * * @example * ```typescript * // Basic usage * const result = await evaluateFeatureFlag({ key: 'experiment-a' }); * console.log(result.data.data.value); // 'variant-1' * console.log(result.data.data.reason); // 'matched rule: premium users' * * // With context * const result = await evaluateFeatureFlag({ * key: 'pricing-tier', * context: { userId: 'user-123', attributes: { plan: 'enterprise' } } * }); * ``` */ export declare function evaluateFeatureFlag(payload: EvaluateFeatureFlagPayload, options?: ServiceOptions): Promise>>; //# sourceMappingURL=evaluateFeatureFlag.d.ts.map