@reflag/node-sdk 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +835 -0
- package/dist/package.json +49 -0
- package/dist/src/batch-buffer.js +85 -0
- package/dist/src/batch-buffer.js.map +1 -0
- package/dist/src/cache.js +71 -0
- package/dist/src/cache.js.map +1 -0
- package/dist/src/client.js +1141 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/config.js +98 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/edgeClient.js +32 -0
- package/dist/src/edgeClient.js.map +1 -0
- package/dist/src/fetch-http-client.js +85 -0
- package/dist/src/fetch-http-client.js.map +1 -0
- package/dist/src/flusher.js +56 -0
- package/dist/src/flusher.js.map +1 -0
- package/dist/src/inRequestCache.js +72 -0
- package/dist/src/inRequestCache.js.map +1 -0
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/periodicallyUpdatingCache.js +78 -0
- package/dist/src/periodicallyUpdatingCache.js.map +1 -0
- package/dist/src/rate-limiter.js +52 -0
- package/dist/src/rate-limiter.js.map +1 -0
- package/dist/src/types.js +6 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils.js +207 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/types/src/batch-buffer.d.ts +27 -0
- package/dist/types/src/batch-buffer.d.ts.map +1 -0
- package/dist/types/src/cache.d.ts +16 -0
- package/dist/types/src/cache.d.ts.map +1 -0
- package/dist/types/src/client.d.ts +410 -0
- package/dist/types/src/client.d.ts.map +1 -0
- package/dist/types/src/config.d.ts +20 -0
- package/dist/types/src/config.d.ts.map +1 -0
- package/dist/types/src/edgeClient.d.ts +25 -0
- package/dist/types/src/edgeClient.d.ts.map +1 -0
- package/dist/types/src/fetch-http-client.d.ts +20 -0
- package/dist/types/src/fetch-http-client.d.ts.map +1 -0
- package/dist/types/src/flusher.d.ts +4 -0
- package/dist/types/src/flusher.d.ts.map +1 -0
- package/dist/types/src/inRequestCache.d.ts +7 -0
- package/dist/types/src/inRequestCache.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/periodicallyUpdatingCache.d.ts +16 -0
- package/dist/types/src/periodicallyUpdatingCache.d.ts.map +1 -0
- package/dist/types/src/rate-limiter.d.ts +14 -0
- package/dist/types/src/rate-limiter.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +639 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/src/utils.d.ts +65 -0
- package/dist/types/src/utils.d.ts.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
import { newEvaluator, RuleFilter } from "@reflag/flag-evaluation";
|
|
2
|
+
/**
|
|
3
|
+
* Describes the meta context associated with tracking.
|
|
4
|
+
**/
|
|
5
|
+
export type TrackingMeta = {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the user or company is active.
|
|
8
|
+
**/
|
|
9
|
+
active?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Describes the attributes of a user, company or event.
|
|
13
|
+
**/
|
|
14
|
+
export type Attributes = Record<string, any>;
|
|
15
|
+
/**
|
|
16
|
+
* Describes a feature event. Can be "check" or "evaluate".
|
|
17
|
+
**/
|
|
18
|
+
export type FlagEvent = {
|
|
19
|
+
/**
|
|
20
|
+
* The action that was performed.
|
|
21
|
+
**/
|
|
22
|
+
action: "evaluate" | "evaluate-config" | "check" | "check-config";
|
|
23
|
+
/**
|
|
24
|
+
* The feature key.
|
|
25
|
+
**/
|
|
26
|
+
key: string;
|
|
27
|
+
/**
|
|
28
|
+
* The feature targeting version (optional).
|
|
29
|
+
**/
|
|
30
|
+
targetingVersion: number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The result of targeting evaluation.
|
|
33
|
+
**/
|
|
34
|
+
evalResult: boolean | {
|
|
35
|
+
key: string;
|
|
36
|
+
payload: any;
|
|
37
|
+
} | {
|
|
38
|
+
key: undefined;
|
|
39
|
+
payload: undefined;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The context that was used for evaluation.
|
|
43
|
+
**/
|
|
44
|
+
evalContext?: Record<string, any>;
|
|
45
|
+
/**
|
|
46
|
+
* The result of evaluation of each rule (optional).
|
|
47
|
+
**/
|
|
48
|
+
evalRuleResults?: boolean[];
|
|
49
|
+
/**
|
|
50
|
+
* The missing fields in the evaluation context (optional).
|
|
51
|
+
**/
|
|
52
|
+
evalMissingFields?: string[];
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* A remotely managed configuration value for a feature.
|
|
56
|
+
*/
|
|
57
|
+
export type RawFlagRemoteConfig = {
|
|
58
|
+
/**
|
|
59
|
+
* The key of the matched configuration value.
|
|
60
|
+
*/
|
|
61
|
+
key: string;
|
|
62
|
+
/**
|
|
63
|
+
* The version of the targeting rules used to select the config value.
|
|
64
|
+
*/
|
|
65
|
+
targetingVersion?: number;
|
|
66
|
+
/**
|
|
67
|
+
* The optional user-supplied payload data.
|
|
68
|
+
*/
|
|
69
|
+
payload: any;
|
|
70
|
+
/**
|
|
71
|
+
* The rule results of the evaluation (optional).
|
|
72
|
+
*/
|
|
73
|
+
ruleEvaluationResults?: boolean[];
|
|
74
|
+
/**
|
|
75
|
+
* The missing fields in the evaluation context (optional).
|
|
76
|
+
*/
|
|
77
|
+
missingContextFields?: string[];
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Describes a feature.
|
|
81
|
+
*/
|
|
82
|
+
export interface RawFlag {
|
|
83
|
+
/**
|
|
84
|
+
* The key of the feature.
|
|
85
|
+
*/
|
|
86
|
+
key: string;
|
|
87
|
+
/**
|
|
88
|
+
* If the feature is enabled.
|
|
89
|
+
*/
|
|
90
|
+
isEnabled: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* The version of the targeting used to evaluate if the feature is enabled (optional).
|
|
93
|
+
*/
|
|
94
|
+
targetingVersion?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The remote configuration value for the feature.
|
|
97
|
+
*/
|
|
98
|
+
config?: RawFlagRemoteConfig;
|
|
99
|
+
/**
|
|
100
|
+
* The rule results of the evaluation (optional).
|
|
101
|
+
*/
|
|
102
|
+
ruleEvaluationResults?: boolean[];
|
|
103
|
+
/**
|
|
104
|
+
* The missing fields in the evaluation context (optional).
|
|
105
|
+
*/
|
|
106
|
+
missingContextFields?: string[];
|
|
107
|
+
}
|
|
108
|
+
export type EmptyFlagRemoteConfig = {
|
|
109
|
+
key: undefined;
|
|
110
|
+
payload: undefined;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* A remotely managed configuration value for a feature.
|
|
114
|
+
*/
|
|
115
|
+
export type FlagRemoteConfig = {
|
|
116
|
+
/**
|
|
117
|
+
* The key of the matched configuration value.
|
|
118
|
+
*/
|
|
119
|
+
key: string;
|
|
120
|
+
/**
|
|
121
|
+
* The optional user-supplied payload data.
|
|
122
|
+
*/
|
|
123
|
+
payload: any;
|
|
124
|
+
} | EmptyFlagRemoteConfig;
|
|
125
|
+
/**
|
|
126
|
+
* Describes a feature
|
|
127
|
+
*/
|
|
128
|
+
export interface Flag<TConfig extends FlagType["config"] = EmptyFlagRemoteConfig> {
|
|
129
|
+
/**
|
|
130
|
+
* The key of the feature.
|
|
131
|
+
*/
|
|
132
|
+
key: string;
|
|
133
|
+
/**
|
|
134
|
+
* If the feature is enabled.
|
|
135
|
+
*/
|
|
136
|
+
isEnabled: boolean;
|
|
137
|
+
config: ({
|
|
138
|
+
key: string;
|
|
139
|
+
} & TConfig) | EmptyFlagRemoteConfig;
|
|
140
|
+
/**
|
|
141
|
+
* Track feature usage in Reflag.
|
|
142
|
+
*/
|
|
143
|
+
track(): Promise<void>;
|
|
144
|
+
}
|
|
145
|
+
export type FlagType = {
|
|
146
|
+
config?: {
|
|
147
|
+
payload: any;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
export type FlagOverride = (FlagType & {
|
|
151
|
+
isEnabled: boolean;
|
|
152
|
+
config?: {
|
|
153
|
+
key: string;
|
|
154
|
+
};
|
|
155
|
+
}) | boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Describes a feature definition.
|
|
158
|
+
*/
|
|
159
|
+
export type FlagDefinition = {
|
|
160
|
+
/**
|
|
161
|
+
* The key of the feature.
|
|
162
|
+
*/
|
|
163
|
+
key: string;
|
|
164
|
+
/**
|
|
165
|
+
* Description of the feature.
|
|
166
|
+
*/
|
|
167
|
+
description: string | null;
|
|
168
|
+
/**
|
|
169
|
+
* The targeting rules for the feature.
|
|
170
|
+
*/
|
|
171
|
+
flag: {
|
|
172
|
+
/**
|
|
173
|
+
* The version of the targeting rules.
|
|
174
|
+
*/
|
|
175
|
+
version: number;
|
|
176
|
+
/**
|
|
177
|
+
* The targeting rules.
|
|
178
|
+
*/
|
|
179
|
+
rules: {
|
|
180
|
+
/**
|
|
181
|
+
* The filter for the rule.
|
|
182
|
+
*/
|
|
183
|
+
filter: RuleFilter;
|
|
184
|
+
}[];
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* The remote configuration for the feature.
|
|
188
|
+
*/
|
|
189
|
+
config?: {
|
|
190
|
+
/**
|
|
191
|
+
* The version of the remote configuration.
|
|
192
|
+
*/
|
|
193
|
+
version: number;
|
|
194
|
+
/**
|
|
195
|
+
* The variants of the remote configuration.
|
|
196
|
+
*/
|
|
197
|
+
variants: FlagConfigVariant[];
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Describes a collection of evaluated features.
|
|
202
|
+
*
|
|
203
|
+
* @remarks
|
|
204
|
+
* You should extend the Flags interface to define the available features.
|
|
205
|
+
*/
|
|
206
|
+
export interface Flags {
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Describes a collection of evaluated feature.
|
|
210
|
+
*
|
|
211
|
+
* @remarks
|
|
212
|
+
* This types falls back to a generic Record<string, Flag> if the Flags interface
|
|
213
|
+
* has not been extended.
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
216
|
+
export type TypedFlags = keyof Flags extends never ? Record<string, Flag> : {
|
|
217
|
+
[FlagKey in keyof Flags]: Flags[FlagKey] extends FlagType ? Flag<Flags[FlagKey]["config"]> : Flag;
|
|
218
|
+
};
|
|
219
|
+
export type TypedFlagKey = keyof TypedFlags;
|
|
220
|
+
/**
|
|
221
|
+
* Describes the feature overrides.
|
|
222
|
+
*/
|
|
223
|
+
export type FlagOverrides = Partial<keyof Flags extends never ? Record<string, FlagOverride> : {
|
|
224
|
+
[FlagKey in keyof Flags]: Flags[FlagKey] extends FlagOverride ? Flags[FlagKey] : Exclude<FlagOverride, "config">;
|
|
225
|
+
}>;
|
|
226
|
+
export type FlagOverridesFn = (context: Context) => FlagOverrides;
|
|
227
|
+
/**
|
|
228
|
+
* Describes a remote feature config variant.
|
|
229
|
+
*/
|
|
230
|
+
export type FlagConfigVariant = {
|
|
231
|
+
/**
|
|
232
|
+
* The filter for the variant.
|
|
233
|
+
*/
|
|
234
|
+
filter: RuleFilter;
|
|
235
|
+
/**
|
|
236
|
+
* The optional user-supplied payload data.
|
|
237
|
+
*/
|
|
238
|
+
payload: any;
|
|
239
|
+
/**
|
|
240
|
+
* The key of the variant.
|
|
241
|
+
*/
|
|
242
|
+
key: string;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* (Internal) Describes a specific feature in the API response.
|
|
246
|
+
*
|
|
247
|
+
* @internal
|
|
248
|
+
*/
|
|
249
|
+
export type FlagAPIResponse = {
|
|
250
|
+
/**
|
|
251
|
+
* The key of the feature.
|
|
252
|
+
*/
|
|
253
|
+
key: string;
|
|
254
|
+
/**
|
|
255
|
+
* Description of the feature.
|
|
256
|
+
*/
|
|
257
|
+
description: string | null;
|
|
258
|
+
/**
|
|
259
|
+
* The targeting rules for the feature.
|
|
260
|
+
*/
|
|
261
|
+
targeting: {
|
|
262
|
+
/**
|
|
263
|
+
* The version of the targeting rules.
|
|
264
|
+
*/
|
|
265
|
+
version: number;
|
|
266
|
+
/**
|
|
267
|
+
* The targeting rules.
|
|
268
|
+
*/
|
|
269
|
+
rules: {
|
|
270
|
+
/**
|
|
271
|
+
* The filter for the rule.
|
|
272
|
+
*/
|
|
273
|
+
filter: RuleFilter;
|
|
274
|
+
}[];
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* The remote configuration for the feature.
|
|
278
|
+
*/
|
|
279
|
+
config?: {
|
|
280
|
+
/**
|
|
281
|
+
* The version of the remote configuration.
|
|
282
|
+
*/
|
|
283
|
+
version: number;
|
|
284
|
+
/**
|
|
285
|
+
* The variants of the remote configuration.
|
|
286
|
+
*/
|
|
287
|
+
variants: FlagConfigVariant[];
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* (Internal) Describes the response of the features endpoint.
|
|
292
|
+
*
|
|
293
|
+
* @internal
|
|
294
|
+
*/
|
|
295
|
+
export type FlagsAPIResponse = {
|
|
296
|
+
/**
|
|
297
|
+
* The feature definitions.
|
|
298
|
+
*/
|
|
299
|
+
features: FlagAPIResponse[];
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* (Internal) Flag definitions with the addition of a pre-prepared
|
|
303
|
+
* evaluators functions for the rules.
|
|
304
|
+
*
|
|
305
|
+
* @internal
|
|
306
|
+
*/
|
|
307
|
+
export type CachedFlagDefinition = FlagAPIResponse & {
|
|
308
|
+
enabledEvaluator: ReturnType<typeof newEvaluator<boolean>>;
|
|
309
|
+
configEvaluator: ReturnType<typeof newEvaluator<any>> | undefined;
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* (Internal) Describes the response of the evaluated features endpoint.
|
|
313
|
+
*
|
|
314
|
+
* @internal
|
|
315
|
+
*/
|
|
316
|
+
export type EvaluatedFlagsAPIResponse = {
|
|
317
|
+
/**
|
|
318
|
+
* True if request successful.
|
|
319
|
+
*/
|
|
320
|
+
success: true;
|
|
321
|
+
/**
|
|
322
|
+
* True if additional context for user or company was found and used for evaluation on the remote server.
|
|
323
|
+
*/
|
|
324
|
+
remoteContextUsed: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* The feature definitions.
|
|
327
|
+
*/
|
|
328
|
+
features: Record<string, RawFlag>;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* Describes the response of a HTTP client.
|
|
332
|
+
*
|
|
333
|
+
* @typeParam TResponse - The type of the response body.
|
|
334
|
+
*/
|
|
335
|
+
export type HttpClientResponse<TResponse> = {
|
|
336
|
+
/**
|
|
337
|
+
* The status code of the response.
|
|
338
|
+
**/
|
|
339
|
+
status: number;
|
|
340
|
+
/**
|
|
341
|
+
* Indicates that the request succeeded.
|
|
342
|
+
**/
|
|
343
|
+
ok: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* The body of the response if available.
|
|
346
|
+
**/
|
|
347
|
+
body: TResponse | undefined;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Defines the interface for an HTTP client.
|
|
351
|
+
*
|
|
352
|
+
* @remarks
|
|
353
|
+
* This interface is used to abstract the HTTP client implementation from the SDK.
|
|
354
|
+
* Define your own implementation of this interface to use a different HTTP client.
|
|
355
|
+
**/
|
|
356
|
+
export interface HttpClient {
|
|
357
|
+
/**
|
|
358
|
+
* Sends a POST request to the specified URL.
|
|
359
|
+
*
|
|
360
|
+
* @param url - The URL to send the request to.
|
|
361
|
+
* @param headers - The headers to include in the request.
|
|
362
|
+
* @param body - The body of the request.
|
|
363
|
+
* @returns The response from the server.
|
|
364
|
+
**/
|
|
365
|
+
post<TBody, TResponse>(url: string, headers: Record<string, string>, body: TBody): Promise<HttpClientResponse<TResponse>>;
|
|
366
|
+
/**
|
|
367
|
+
* Sends a GET request to the specified URL.
|
|
368
|
+
*
|
|
369
|
+
* @param url - The URL to send the request to.
|
|
370
|
+
* @param headers - The headers to include in the request.
|
|
371
|
+
* @returns The response from the server.
|
|
372
|
+
**/
|
|
373
|
+
get<TResponse>(url: string, headers: Record<string, string>, timeoutMs: number): Promise<HttpClientResponse<TResponse>>;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Logger interface for logging messages
|
|
377
|
+
*/
|
|
378
|
+
export interface Logger {
|
|
379
|
+
/**
|
|
380
|
+
* Log a debug messages
|
|
381
|
+
*
|
|
382
|
+
* @param message - The message to log
|
|
383
|
+
* @param data - Optional data to log
|
|
384
|
+
*/
|
|
385
|
+
debug: (message: string, data?: any) => void;
|
|
386
|
+
/**
|
|
387
|
+
* Log an info messages
|
|
388
|
+
*
|
|
389
|
+
* @param message - The message to log
|
|
390
|
+
* @param data - Optional data to log
|
|
391
|
+
*/
|
|
392
|
+
info: (message: string, data?: any) => void;
|
|
393
|
+
/**
|
|
394
|
+
* Log a warning messages
|
|
395
|
+
*
|
|
396
|
+
* @param message - The message to log
|
|
397
|
+
* @param data - Optional data to log
|
|
398
|
+
*/
|
|
399
|
+
warn: (message: string, data?: any) => void;
|
|
400
|
+
/**
|
|
401
|
+
* Log an error messages
|
|
402
|
+
*
|
|
403
|
+
* @param message - The message to log
|
|
404
|
+
* @param data - Optional data to log
|
|
405
|
+
*/
|
|
406
|
+
error: (message: string, data?: any) => void;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* A cache for storing values.
|
|
410
|
+
*
|
|
411
|
+
* @typeParam T - The type of the value.
|
|
412
|
+
**/
|
|
413
|
+
export type Cache<T> = {
|
|
414
|
+
/**
|
|
415
|
+
* Get the value.
|
|
416
|
+
* @returns The value or `undefined` if the value is not available.
|
|
417
|
+
**/
|
|
418
|
+
get: () => T | undefined;
|
|
419
|
+
/**
|
|
420
|
+
* Refresh the value immediately and return it, or `undefined` if the value is not available.
|
|
421
|
+
*
|
|
422
|
+
* @returns The value or `undefined` if the value is not available.
|
|
423
|
+
**/
|
|
424
|
+
refresh: () => Promise<T | undefined>;
|
|
425
|
+
/**
|
|
426
|
+
* If a refresh is in progress, wait for it to complete.
|
|
427
|
+
*
|
|
428
|
+
* @returns A promise that resolves when the refresh is complete.
|
|
429
|
+
**/
|
|
430
|
+
waitRefresh: () => Promise<void> | undefined;
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* Options for configuring the BatchBuffer.
|
|
434
|
+
*
|
|
435
|
+
* @template T - The type of items in the buffer.
|
|
436
|
+
*/
|
|
437
|
+
export type BatchBufferOptions<T> = {
|
|
438
|
+
/**
|
|
439
|
+
* A function that handles flushing the items in the buffer.
|
|
440
|
+
**/
|
|
441
|
+
flushHandler: (items: T[]) => Promise<void>;
|
|
442
|
+
/**
|
|
443
|
+
* The logger to use for logging (optional).
|
|
444
|
+
**/
|
|
445
|
+
logger?: Logger;
|
|
446
|
+
/**
|
|
447
|
+
* The maximum size of the buffer before it is flushed.
|
|
448
|
+
*
|
|
449
|
+
* @defaultValue `100`
|
|
450
|
+
**/
|
|
451
|
+
maxSize?: number;
|
|
452
|
+
/**
|
|
453
|
+
* The interval in milliseconds at which the buffer is flushed.
|
|
454
|
+
* @remarks
|
|
455
|
+
* If `0`, the buffer is flushed only when `maxSize` is reached.
|
|
456
|
+
* @defaultValue `1000`
|
|
457
|
+
**/
|
|
458
|
+
intervalMs?: number;
|
|
459
|
+
/**
|
|
460
|
+
* Whether to flush the buffer on exit.
|
|
461
|
+
*
|
|
462
|
+
* @defaultValue `true`
|
|
463
|
+
*/
|
|
464
|
+
flushOnExit?: boolean;
|
|
465
|
+
};
|
|
466
|
+
export type CacheStrategy = "periodically-update" | "in-request";
|
|
467
|
+
/**
|
|
468
|
+
* Defines the options for the SDK client.
|
|
469
|
+
*
|
|
470
|
+
**/
|
|
471
|
+
export type ClientOptions = {
|
|
472
|
+
/**
|
|
473
|
+
* The secret key used to authenticate with the Reflag API.
|
|
474
|
+
**/
|
|
475
|
+
secretKey?: string;
|
|
476
|
+
/**
|
|
477
|
+
* @deprecated
|
|
478
|
+
* Use `apiBaseUrl` instead.
|
|
479
|
+
**/
|
|
480
|
+
host?: string;
|
|
481
|
+
/**
|
|
482
|
+
* The host to send requests to (optional).
|
|
483
|
+
**/
|
|
484
|
+
apiBaseUrl?: string;
|
|
485
|
+
/**
|
|
486
|
+
* The logger to use for logging (optional). Default is info level logging to console.
|
|
487
|
+
**/
|
|
488
|
+
logger?: Logger;
|
|
489
|
+
/**
|
|
490
|
+
* Use the console logger, but set a log level. Ineffective if a custom logger is provided.
|
|
491
|
+
**/
|
|
492
|
+
logLevel?: LogLevel;
|
|
493
|
+
/**
|
|
494
|
+
* The features to "enable" as fallbacks when the API is unavailable (optional).
|
|
495
|
+
* Can be an array of feature keys, or a record of feature keys and boolean or object values.
|
|
496
|
+
*
|
|
497
|
+
* If a record is supplied instead of array, the values of each key are either the
|
|
498
|
+
* configuration values or the boolean value `true`.
|
|
499
|
+
**/
|
|
500
|
+
fallbackFlags?: TypedFlagKey[] | Record<TypedFlagKey, Exclude<FlagOverride, false>>;
|
|
501
|
+
/**
|
|
502
|
+
* The HTTP client to use for sending requests (optional). Default is the built-in fetch client.
|
|
503
|
+
**/
|
|
504
|
+
httpClient?: HttpClient;
|
|
505
|
+
/**
|
|
506
|
+
* The timeout in milliseconds for fetching feature targeting data (optional).
|
|
507
|
+
* Default is 10000 ms.
|
|
508
|
+
**/
|
|
509
|
+
fetchTimeoutMs?: number;
|
|
510
|
+
/**
|
|
511
|
+
* Number of times to retry fetching feature definitions (optional).
|
|
512
|
+
* Default is 3 times.
|
|
513
|
+
**/
|
|
514
|
+
flagsFetchRetries?: number;
|
|
515
|
+
/**
|
|
516
|
+
* The options for the batch buffer (optional).
|
|
517
|
+
* If not provided, the default options are used.
|
|
518
|
+
**/
|
|
519
|
+
batchOptions?: Omit<BatchBufferOptions<any>, "flushHandler" | "logger">;
|
|
520
|
+
/**
|
|
521
|
+
* If a filename is specified, feature targeting results be overridden with
|
|
522
|
+
* the values from this file. The file should be a JSON object with flag
|
|
523
|
+
* keys as keys, and boolean or object as values.
|
|
524
|
+
*
|
|
525
|
+
* If a function is specified, the function will be called with the context
|
|
526
|
+
* and should return a record of flag keys and boolean or object values.
|
|
527
|
+
*
|
|
528
|
+
* Defaults to "reflagFlags.json".
|
|
529
|
+
**/
|
|
530
|
+
flagOverrides?: string | ((context: Context) => FlagOverrides);
|
|
531
|
+
/**
|
|
532
|
+
* In offline mode, no data is sent or fetched from the the Reflag API.
|
|
533
|
+
* This is useful for testing or development.
|
|
534
|
+
*/
|
|
535
|
+
offline?: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* If set to `false`, no evaluation events will be emitted.
|
|
538
|
+
*/
|
|
539
|
+
emitEvaluationEvents?: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* The path to the config file. If supplied, the config file will be loaded.
|
|
542
|
+
* Defaults to `reflag.config.json` when NODE_ENV is not production. Can also be
|
|
543
|
+
* set through the environment variable REFLAG_CONFIG_FILE.
|
|
544
|
+
*/
|
|
545
|
+
configFile?: string;
|
|
546
|
+
/**
|
|
547
|
+
* The cache strategy to use for the client (optional, defaults to "periodically-update").
|
|
548
|
+
**/
|
|
549
|
+
cacheStrategy?: CacheStrategy;
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* Defines the options for tracking of entities.
|
|
553
|
+
*
|
|
554
|
+
**/
|
|
555
|
+
export type TrackOptions = {
|
|
556
|
+
/**
|
|
557
|
+
* The attributes associated with the event.
|
|
558
|
+
**/
|
|
559
|
+
attributes?: Attributes;
|
|
560
|
+
/**
|
|
561
|
+
* The meta context associated with the event.
|
|
562
|
+
**/
|
|
563
|
+
meta?: TrackingMeta;
|
|
564
|
+
};
|
|
565
|
+
/**
|
|
566
|
+
* Describes the current user context, company context, and other context.
|
|
567
|
+
* This is used to determine if feature targeting matches and to track events.
|
|
568
|
+
**/
|
|
569
|
+
export type Context = {
|
|
570
|
+
/**
|
|
571
|
+
* The user context. If no `id` key is set, the whole object is ignored.
|
|
572
|
+
*/
|
|
573
|
+
user?: {
|
|
574
|
+
/**
|
|
575
|
+
* The identifier of the user.
|
|
576
|
+
*/
|
|
577
|
+
id: string | number | undefined;
|
|
578
|
+
/**
|
|
579
|
+
* The name of the user.
|
|
580
|
+
*/
|
|
581
|
+
name?: string | undefined;
|
|
582
|
+
/**
|
|
583
|
+
* The email of the user.
|
|
584
|
+
*/
|
|
585
|
+
email?: string | undefined;
|
|
586
|
+
/**
|
|
587
|
+
* The avatar URL of the user.
|
|
588
|
+
*/
|
|
589
|
+
avatar?: string | undefined;
|
|
590
|
+
/**
|
|
591
|
+
* Custom attributes of the user.
|
|
592
|
+
*/
|
|
593
|
+
[k: string]: any;
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
* The company context. If no `id` key is set, the whole object is ignored.
|
|
597
|
+
*/
|
|
598
|
+
company?: {
|
|
599
|
+
/**
|
|
600
|
+
* The identifier of the company.
|
|
601
|
+
*/
|
|
602
|
+
id: string | number | undefined;
|
|
603
|
+
/**
|
|
604
|
+
* The name of the company.
|
|
605
|
+
*/
|
|
606
|
+
name?: string | undefined;
|
|
607
|
+
/**
|
|
608
|
+
* The avatar URL of the company.
|
|
609
|
+
*/
|
|
610
|
+
avatar?: string | undefined;
|
|
611
|
+
/**
|
|
612
|
+
* Custom attributes of the company.
|
|
613
|
+
*/
|
|
614
|
+
[k: string]: any;
|
|
615
|
+
};
|
|
616
|
+
/**
|
|
617
|
+
* The other context. This is used for any additional context that is not related to user or company.
|
|
618
|
+
*/
|
|
619
|
+
other?: Record<string, any>;
|
|
620
|
+
};
|
|
621
|
+
/**
|
|
622
|
+
* A context with tracking option.
|
|
623
|
+
**/
|
|
624
|
+
export interface ContextWithTracking extends Context {
|
|
625
|
+
/**
|
|
626
|
+
* Enable tracking for the context.
|
|
627
|
+
* If set to `false`, tracking will be disabled for the context. Default is `true`.
|
|
628
|
+
*/
|
|
629
|
+
enableTracking?: boolean;
|
|
630
|
+
/**
|
|
631
|
+
* The meta context used to update the user or company when syncing is required during
|
|
632
|
+
* feature retrieval.
|
|
633
|
+
*/
|
|
634
|
+
meta?: TrackingMeta;
|
|
635
|
+
}
|
|
636
|
+
export declare const LOG_LEVELS: readonly ["DEBUG", "INFO", "WARN", "ERROR"];
|
|
637
|
+
export type LogLevel = (typeof LOG_LEVELS)[number];
|
|
638
|
+
export type IdType = string | number;
|
|
639
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;IAEI;AACJ,MAAM,MAAM,YAAY,GAAG;IACzB;;QAEI;IACJ,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;IAEI;AACJ,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE7C;;IAEI;AACJ,MAAM,MAAM,SAAS,GAAG;IACtB;;QAEI;IACJ,MAAM,EAAE,UAAU,GAAG,iBAAiB,GAAG,OAAO,GAAG,cAAc,CAAC;IAElE;;QAEI;IACJ,GAAG,EAAE,MAAM,CAAC;IAEZ;;QAEI;IACJ,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC;;QAEI;IACJ,UAAU,EACN,OAAO,GACP;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,GAAG,CAAA;KAAE,GAC7B;QAAE,GAAG,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,SAAS,CAAA;KAAE,CAAC;IAE3C;;QAEI;IACJ,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAElC;;QAEI;IACJ,eAAe,CAAC,EAAE,OAAO,EAAE,CAAC;IAE5B;;QAEI;IACJ,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,G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