|
8 | 8 |
|
9 | 9 | import { Agent } from 'http';
|
10 | 10 |
|
| 11 | +// @public |
| 12 | +export interface AndCondition { |
| 13 | + conditions?: Array<OneOfCondition>; |
| 14 | +} |
| 15 | + |
| 16 | +// @public |
| 17 | +export type EvaluationContext = { |
| 18 | + randomizationId?: string; |
| 19 | +}; |
| 20 | + |
11 | 21 | // @public
|
12 | 22 | export interface ExplicitParameterValue {
|
13 | 23 | value: string;
|
@@ -38,14 +48,51 @@ export interface ListVersionsResult {
|
38 | 48 | versions: Version[];
|
39 | 49 | }
|
40 | 50 |
|
| 51 | +// @public |
| 52 | +export interface MicroPercentRange { |
| 53 | + microPercentLowerBound?: number; |
| 54 | + microPercentUpperBound?: number; |
| 55 | +} |
| 56 | + |
41 | 57 | // @public
|
42 | 58 | export interface NamedCondition {
|
| 59 | + condition: OneOfCondition; |
43 | 60 | name: string;
|
44 | 61 | }
|
45 | 62 |
|
| 63 | +// @public |
| 64 | +export interface OneOfCondition { |
| 65 | + andCondition?: AndCondition; |
| 66 | + false?: Record<string, never>; |
| 67 | + orCondition?: OrCondition; |
| 68 | + percent?: PercentCondition; |
| 69 | + true?: Record<string, never>; |
| 70 | +} |
| 71 | + |
| 72 | +// @public |
| 73 | +export interface OrCondition { |
| 74 | + conditions?: Array<OneOfCondition>; |
| 75 | +} |
| 76 | + |
46 | 77 | // @public
|
47 | 78 | export type ParameterValueType = 'STRING' | 'BOOLEAN' | 'NUMBER' | 'JSON';
|
48 | 79 |
|
| 80 | +// @public |
| 81 | +export interface PercentCondition { |
| 82 | + microPercent?: number; |
| 83 | + microPercentRange?: MicroPercentRange; |
| 84 | + percentOperator?: PercentConditionOperator; |
| 85 | + seed?: string; |
| 86 | +} |
| 87 | + |
| 88 | +// @public |
| 89 | +export enum PercentConditionOperator { |
| 90 | + BETWEEN = "BETWEEN", |
| 91 | + GREATER_THAN = "GREATER_THAN", |
| 92 | + LESS_OR_EQUAL = "LESS_OR_EQUAL", |
| 93 | + UNKNOWN = "UNKNOWN" |
| 94 | +} |
| 95 | + |
49 | 96 | // @public
|
50 | 97 | export class RemoteConfig {
|
51 | 98 | // (undocumented)
|
@@ -120,7 +167,7 @@ export type ServerConfig = {
|
120 | 167 | export interface ServerTemplate {
|
121 | 168 | cache: ServerTemplateData;
|
122 | 169 | defaultConfig: ServerConfig;
|
123 |
| - evaluate(): ServerConfig; |
| 170 | + evaluate(context?: EvaluationContext): ServerConfig; |
124 | 171 | load(): Promise<void>;
|
125 | 172 | }
|
126 | 173 |
|
|
0 commit comments