flagsmith-nodejs
Version:
Flagsmith lets you manage features flags and remote config across web, mobile and server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.
43 lines (42 loc) • 1.8 kB
TypeScript
import { FeatureStateModel } from '../features/models.js';
import { EvaluationContext } from '../evaluation/evaluationContext/evaluationContext.types.js';
import { EvaluationResultSegments } from '../evaluation/models.js';
export declare const all: (iterable: Array<any>) => boolean;
export declare const any: (iterable: Array<any>) => boolean;
export declare const matchingFunctions: {
[x: string]: (thisValue: any, otherValue: any) => any;
};
export declare const semverMatchingFunction: {
[x: string]: ((thisValue: any, otherValue: any) => any) | ((conditionValue: any, traitValue: any) => boolean);
};
export declare const getMatchingFunctions: (semver: boolean) => {
[x: string]: (thisValue: any, otherValue: any) => any;
};
export declare class SegmentConditionModel {
EXCEPTION_OPERATOR_METHODS: {
[key: string]: string;
};
operator: string;
value: string | null | undefined | string[];
property: string | null | undefined;
constructor(operator: string, value?: string | null | undefined | string[], property?: string | null | undefined);
matchesTraitValue(traitValue: any): any;
}
export declare class SegmentRuleModel {
type: string;
rules: SegmentRuleModel[];
conditions: SegmentConditionModel[];
constructor(type: string);
static none(iterable: Array<any>): boolean;
matchingFunction(): CallableFunction;
}
export declare class SegmentModel {
id: number;
name: string;
rules: SegmentRuleModel[];
featureStates: FeatureStateModel[];
constructor(id: number, name: string);
static fromSegmentResult(segmentResults: EvaluationResultSegments, evaluationContext: EvaluationContext): SegmentModel[];
private static createFeatureStatesFromOverrides;
private static createMultivariateValues;
}