-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathevaluationResult.types.ts
More file actions
71 lines (69 loc) · 1.55 KB
/
evaluationResult.types.ts
File metadata and controls
71 lines (69 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Feature name.
*/
export type Name = string;
/**
* Indicates if the feature flag is enabled.
*/
export type Enabled = boolean;
/**
* Feature flag value.
*/
export type Value = string | number | boolean | null;
/**
* Reason for the feature flag evaluation.
*/
export type Reason = string;
/**
* Segment name.
*/
export type Name1 = string;
/**
* List of segments which the provided context belongs to.
*/
export type Segments = SegmentResult[];
/**
* Evaluation result object containing the used context, flag evaluation results, and segments used in the evaluation.
*/
export interface EvaluationResult {
flags: Flags;
segments: Segments;
[k: string]: unknown;
}
/**
* Feature flags evaluated for the context, mapped by feature names.
*/
export interface Flags {
[k: string]: FlagResult;
}
export interface FlagResult {
name: Name;
enabled: Enabled;
value: Value;
reason: Reason;
metadata?: FeatureMetadata;
[k: string]: unknown;
}
/**
* Additional metadata associated with the feature.
*/
export interface FeatureMetadata {
[k: string]: unknown;
}
export interface SegmentResult {
name: Name1;
metadata?: SegmentMetadata;
[k: string]: unknown;
}
/**
* Additional metadata associated with the segment.
*/
export interface SegmentMetadata {
[k: string]: unknown;
}