@@ -6,11 +6,17 @@ import { LDEvaluationDetail } from '../LDEvaluationDetail';
66 * Contextual information provided to evaluation stages.
77 */
88export interface EvaluationSeriesContext {
9+ /**
10+ * The flag key the evaluation is for.
11+ */
912 readonly flagKey : string ;
1013 /**
1114 * Optional in case evaluations are performed before a context is set.
1215 */
1316 readonly context ?: LDContext ;
17+ /**
18+ * The default value that was provided.
19+ */
1420 readonly defaultValue : unknown ;
1521
1622 /**
@@ -33,13 +39,19 @@ export interface EvaluationSeriesData {
3339 * Meta-data about a hook implementation.
3440 */
3541export interface HookMetadata {
42+ /**
43+ * Name of the hook.
44+ */
3645 readonly name : string ;
3746}
3847
3948/**
40- * Contextual information provided to evaluation stages.
49+ * Contextual information provided to identify stages.
4150 */
4251export interface IdentifySeriesContext {
52+ /**
53+ * The context associated with the identify operation.
54+ */
4355 readonly context : LDContext ;
4456 /**
4557 * The timeout, in seconds, associated with the identify operation.
@@ -48,7 +60,7 @@ export interface IdentifySeriesContext {
4860}
4961
5062/**
51- * Implementation specific hook data for evaluation stages.
63+ * Implementation specific hook data for identify stages.
5264 *
5365 * Hook implementations can use this to store data needed between stages.
5466 */
@@ -58,13 +70,20 @@ export interface IdentifySeriesData {
5870
5971/**
6072 * The status an identify operation completed with.
73+ *
74+ * An example in which an error may occur is lack of network connectivity
75+ * preventing the SDK from functioning.
6176 */
6277export type IdentifySeriesStatus = 'completed' | 'error' ;
6378
6479/**
6580 * The result applies to a single identify operation. An operation may complete
6681 * with an error and then later complete successfully. Only the first completion
67- * will be executed in the evaluation series.
82+ * will be executed in the identify series.
83+ *
84+ * For example, a network issue may cause an identify to error since the SDK
85+ * can't refresh its cached data from the cloud at that moment, but then later
86+ * the when the network issue is resolved, the SDK will refresh cached data.
6887 */
6988export interface IdentifySeriesResult {
7089 status : IdentifySeriesStatus ;
0 commit comments