fluxai-sdk
Version:
FluxAI JavaScript SDK for A/B experiment routing
21 lines (20 loc) • 790 B
text/typescript
interface ShouldEnterParams {
experiment: string;
userId: string;
attributes?: Record<string, any>;
apiKey: string;
}
/**
* Checks if a given end-user should enter a specific experiment.
* Sends request to FluxAI backend's /should-enter endpoint using the provided API key.
*
* @param {ShouldEnterParams} params - Parameters for the experiment entry check.
* @returns {Promise<{ allow: boolean | null, reason?: string, user_attributes?: Record<string, any>, allowed_conditions?: Record<string, any> }>}
*/
export declare function routecheck({ experiment, userId, attributes, apiKey, }: ShouldEnterParams): Promise<{
allow: boolean | null;
reason?: string;
user_attributes?: Record<string, any>;
allowed_conditions?: Record<string, any>;
}>;
export {};