Skip to content

Commit 7f4f080

Browse files
authored
feat: add STALE pre-defined reason (#898)
Adds STALE pre-defined reason, re-orders reasons in source to match spec. Signed-off-by: Todd Baert <[email protected]>
1 parent ce9f65c commit 7f4f080

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

packages/shared/src/evaluation/evaluation.ts

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ export type EvaluationDetails<T extends FlagValue> = {
3838
} & ResolutionDetails<T>;
3939

4040
export const StandardResolutionReasons = {
41+
/**
42+
* The resolved value is static (no dynamic evaluation).
43+
*/
44+
STATIC: 'STATIC',
45+
46+
/**
47+
* The resolved value was configured statically, or otherwise fell back to a pre-configured value.
48+
*/
49+
DEFAULT: 'DEFAULT',
50+
4151
/**
4252
* The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting.
4353
*/
@@ -49,29 +59,24 @@ export const StandardResolutionReasons = {
4959
SPLIT: 'SPLIT',
5060

5161
/**
52-
* The resolved value was the result of the flag being disabled in the management system.
62+
* The resolved value was retrieved from cache.
5363
*/
54-
DISABLED: 'DISABLED',
64+
CACHED: 'CACHED',
5565

5666
/**
57-
* The resolved value was configured statically, or otherwise fell back to a pre-configured value.
67+
* The resolved value was the result of the flag being disabled in the management system.
5868
*/
59-
DEFAULT: 'DEFAULT',
69+
DISABLED: 'DISABLED',
6070

6171
/**
6272
* The reason for the resolved value could not be determined.
6373
*/
6474
UNKNOWN: 'UNKNOWN',
6575

6676
/**
67-
* The resolved value is static (no dynamic evaluation).
68-
*/
69-
STATIC: 'STATIC',
70-
71-
/**
72-
* The resolved value was retrieved from cache.
77+
* The resolved value is non-authoritative or possibly out of date.
7378
*/
74-
CACHED: 'CACHED',
79+
STALE: 'STALE',
7580

7681
/**
7782
* The resolved value was the result of an error.

0 commit comments

Comments
 (0)