@configdirector/openfeature-server-provider 1.9.1 → 1.11.0

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.
@@ -34,27 +34,40 @@ type ConfigEvaluation = {
34
34
  context?: ConfigDirectorContext;
35
35
  };
36
36
  /**
37
- * The user's context to be sent to ConfigDirector. This context will be used for targeting
38
- * rules evaluation.
37
+ * The context to be sent to ConfigDirector: the user or other entity, such as a device or an
38
+ * organization, that configs are evaluated for. This context will be used for targeting rules
39
+ * evaluation.
39
40
  */
40
41
  type ConfigDirectorContext = {
41
42
  /**
42
- * The user's identifier. This should be a value that uniquely identifies an application
43
- * user.
43
+ * The context's identifier. This should be a value that uniquely identifies the user or other
44
+ * entity among contexts of the same {@link kind}.
44
45
  * In the case of anonymous users, you could generate a UUID or alternatively not provide
45
46
  * the {@link id} and the SDK will generate a random UUID. However, keep in mind that this
46
- * value is used for segmenting users in percentage rollouts, and changes to the {@link id}
47
- * could result in the user being assigned to a different percentile.
47
+ * value is used for segmenting contexts in percentage rollouts, and changes to the {@link id}
48
+ * could result in the context being assigned to a different percentile.
48
49
  */
49
50
  id?: string;
50
51
  /**
51
- * The user's display name. This will be shown in the ConfigDirector dashboard and may be
52
+ * The kind of entity this context represents, such as `user`, `device`, `organization`,
53
+ * `tenant` or `listing`. You can use any other kind that fits your application. A kind has 1
54
+ * to 64 characters, using only lowercase letters (`a`-`z`), digits, `-` and `_`. It is used
55
+ * exactly as given, without trimming or changing its case.
56
+ *
57
+ * A context with an invalid kind is ignored as a whole: the SDK logs an error and evaluates
58
+ * as if no context had been provided.
59
+ *
60
+ * @default "user"
61
+ */
62
+ kind?: string;
63
+ /**
64
+ * The context's display name. This will be shown in the ConfigDirector dashboard and may be
52
65
  * used for targeting rules.
53
66
  */
54
67
  name?: string;
55
68
  /**
56
- * Any arbitrary traits for the current user. They will be shown in the ConfigDirector
57
- * dashboard and may be used for targeting rules.
69
+ * Any arbitrary traits for the context. They will be shown in the ConfigDirector dashboard
70
+ * and may be used for targeting rules.
58
71
  */
59
72
  traits?: {
60
73
  [key: string]: unknown;
@@ -76,9 +89,90 @@ type ConfigDirectorMetaContext = {
76
89
  appVersion?: string;
77
90
  appName?: string;
78
91
  };
79
- type ConnectionMode = "streaming" | "polling";
92
+ type ConnectionMode = "streaming" | "polling" | "offline";
93
+ //#endregion
94
+ //#region ../shared/src/native-values.d.ts
95
+ type NativeJsonValue = boolean | number | string | null | NativeJsonValue[] | {
96
+ [key: string]: NativeJsonValue;
97
+ };
98
+ type NativeValue = boolean | number | string | NativeJsonValue[] | {
99
+ [key: string]: NativeJsonValue;
100
+ };
101
+ type NativeValues = Record<string, NativeValue>;
80
102
  //#endregion
81
103
  //#region ../js-server-sdk/src/types.d.ts
104
+ /**
105
+ * One value an offline client serves for a config key. The config type follows from the value: a
106
+ * boolean, an integral number (`integer`), any other number (`float`), a string, or a plain object
107
+ * or array (`json`).
108
+ */
109
+ type OfflineValue = NativeValue;
110
+ /**
111
+ * The values an offline client serves, keyed by config key. See {@link OfflineValue} for how each
112
+ * value's config type is decided. Every context receives the same value.
113
+ */
114
+ type OfflineValues = NativeValues;
115
+ /**
116
+ * Connection options of the {@link ConfigDirectorClient}
117
+ */
118
+ type ConnectionOptions = {
119
+ /**
120
+ * The connection mode to be used, one of `streaming` (default), `polling` or `offline`.
121
+ * If set to `streaming`, the connection will remain open and receive updates whenever
122
+ * config state is updated on the ConfigDirector dashboard.
123
+ * When set to `polling`, there will be an initial request to retrieve config state during
124
+ * initialization, and additional requests on a `pollingInterval`.
125
+ * When set to `offline`, the client never connects to ConfigDirector and sends nothing: it serves
126
+ * the values read from {@link file} or given in {@link values} to every context, or the in-code
127
+ * default values when neither is given. No SDK key is needed.
128
+ *
129
+ * Defaults to `streaming`
130
+ */
131
+ mode?: ConnectionMode;
132
+ /**
133
+ * The path of a JSON file holding the values to serve in `offline` mode, resolved against the
134
+ * process working directory. The file holds one object with a value per config key, such as
135
+ * `{ "new-checkout": true, "max-items": 20 }`; see {@link OfflineValue} for how the config type
136
+ * of each value is decided. A file that is missing, unreadable, not a JSON object, or holding a
137
+ * value such as `null` makes `initialize` reject with a `ConfigDirectorInitializationError`.
138
+ *
139
+ * Only one of `file` and `values` can be given, and only in `offline` mode; otherwise
140
+ * `initialize` rejects.
141
+ */
142
+ file?: string;
143
+ /**
144
+ * The values to serve in `offline` mode, keyed by config key. A value such as `null` makes
145
+ * `initialize` reject with a `ConfigDirectorInitializationError`.
146
+ *
147
+ * Only one of `file` and `values` can be given, and only in `offline` mode; otherwise
148
+ * `initialize` rejects.
149
+ */
150
+ values?: OfflineValues;
151
+ /**
152
+ * The polling interval in _seconds_ when the `mode` is set to `polling`. This option has no
153
+ * effect in the other modes.
154
+ *
155
+ * Defaults to 300 seconds (5 minutes). The minimum is 60 seconds. A value below the minimum is
156
+ * raised to the minimum and a warning is logged.
157
+ */
158
+ pollingInterval?: number;
159
+ /**
160
+ * The timeout, in milliseconds, to be used in initialization and when updating the context.
161
+ * If streaming is enabled, the operation (initialization or context update) may still succeed
162
+ * after it times out if no unrecoverable errors are encountered (like an invalid SDK key).
163
+ * If streaming is disabled, if the operation times out, it will not be retried. This option has
164
+ * no effect in `offline` mode.
165
+ *
166
+ * Defaults to 3,000 milliseconds (3 seconds)
167
+ */
168
+ timeout?: number;
169
+ /**
170
+ * The base URL to the ConfigDirector SDK server. To be used only when needing to route through a
171
+ * proxy to connect to the ConfigDirector SDK server. Please refer to the docs on how to configure
172
+ * a proxy for the client SDK. This option has no effect in `offline` mode.
173
+ */
174
+ url?: string;
175
+ };
82
176
  /**
83
177
  * Configuration options for the {@link ConfigDirectorClient}
84
178
  */
@@ -90,41 +184,7 @@ type ConfigDirectorClientOptions = {
90
184
  /**
91
185
  * Connection options
92
186
  */
93
- connection?: {
94
- /**
95
- * The connection mode to be used, one of `streaming` (default) or `polling`.
96
- * If set to `streaming`, the connection will remain open and receive updates whenever
97
- * config state is updated on the ConfigDirector dashboard.
98
- * When set to `polling`, there will be an initial request to retrieve config state during
99
- * initialization, and additional requests on a `pollingInterval`.
100
- *
101
- * Defaults to `streaming`
102
- */
103
- mode?: ConnectionMode;
104
- /**
105
- * The polling interval in _seconds_ when the `mode` is set to `polling`. This option has no
106
- * effect when the `mode` is set to `streaming`.
107
- *
108
- * Defaults to 300 seconds (5 minutes). The minimum is 60 seconds. A value below the minimum is
109
- * raised to the minimum and a warning is logged.
110
- */
111
- pollingInterval?: number;
112
- /**
113
- * The timeout, in milliseconds, to be used in initialization and when updating the context.
114
- * If streaming is enabled, the operation (initialization or context update) may still succeed
115
- * after it times out if no unrecoverable errors are encountered (like an invalid SDK key).
116
- * If streaming is disabled, if the operation times out, it will not be retried.
117
- *
118
- * Defaults to 3,000 milliseconds (3 seconds)
119
- */
120
- timeout?: number;
121
- /**
122
- * The base URL to the ConfigDirector SDK server. To be used only when needing to route through a
123
- * proxy to connect to the ConfigDirector SDK server. Please refer to the docs on how to configure
124
- * a proxy for the client SDK.
125
- */
126
- url?: string;
127
- };
187
+ connection?: ConnectionOptions;
128
188
  /**
129
189
  * A logger that implements {@link ConfigDirectorLogger}. It defaults to the ConfigDirector console
130
190
  * logger set to 'warn' level.
@@ -184,6 +244,14 @@ type ConfigDirectorClientOptions = {
184
244
  */
185
245
  hooks?: ClientHooks;
186
246
  };
247
+ /**
248
+ * The options of a client created without an SDK key: the connection mode is `offline`.
249
+ */
250
+ type OfflineClientOptions = ConfigDirectorClientOptions & {
251
+ connection: ConnectionOptions & {
252
+ mode: "offline";
253
+ };
254
+ };
187
255
  type ClientEvents = {
188
256
  configsUpdated: {
189
257
  keys: string[];
@@ -290,6 +358,12 @@ interface ConfigDirectorClient {
290
358
  dispose(): void;
291
359
  }
292
360
  //#endregion
361
+ //#region ../shared/src/errors.d.ts
362
+ declare class ConfigDirectorInitializationError extends Error {
363
+ readonly name: string;
364
+ constructor(message: string);
365
+ }
366
+ //#endregion
293
367
  //#region src/ConfigDirectorProvider.d.ts
294
368
  declare class ConfigDirectorProvider implements Provider {
295
369
  private readonly client;
@@ -297,7 +371,15 @@ declare class ConfigDirectorProvider implements Provider {
297
371
  readonly metadata: ProviderMetadata;
298
372
  readonly runsOn: Paradigm;
299
373
  readonly events: OpenFeatureEventEmitter;
300
- constructor(clientSdkKey: string, clientOptions?: ConfigDirectorClientOptions);
374
+ /**
375
+ * Creates a provider connected to ConfigDirector with the given server SDK key.
376
+ */
377
+ constructor(serverSdkKey: string, clientOptions?: ConfigDirectorClientOptions);
378
+ /**
379
+ * Creates a provider in `offline` mode, which needs no server SDK key: it never connects to
380
+ * ConfigDirector and serves `connection.file` or `connection.values` to every evaluation.
381
+ */
382
+ constructor(clientOptions: OfflineClientOptions);
301
383
  initialize(): Promise<void>;
302
384
  resolveBooleanEvaluation(flagKey: string, defaultValue: boolean, context: EvaluationContext): Promise<ResolutionDetails<boolean>>;
303
385
  resolveStringEvaluation(flagKey: string, defaultValue: string, context: EvaluationContext): Promise<ResolutionDetails<string>>;
@@ -308,5 +390,5 @@ declare class ConfigDirectorProvider implements Provider {
308
390
  private mapContext;
309
391
  }
310
392
  //#endregion
311
- export { type ConfigDirectorClient, type ConfigDirectorClientOptions, type ConfigDirectorContext, type ConfigDirectorLogMessageDecorator, type ConfigDirectorLogger, type ConfigDirectorLoggingLevel, ConfigDirectorProvider, type ConfigValueType };
393
+ export { type ConfigDirectorClient, type ConfigDirectorClientOptions, type ConfigDirectorContext, ConfigDirectorInitializationError, type ConfigDirectorLogMessageDecorator, type ConfigDirectorLogger, type ConfigDirectorLoggingLevel, ConfigDirectorProvider, type ConfigValueType, type OfflineClientOptions, type OfflineValue, type OfflineValues };
312
394
  //# sourceMappingURL=configdirector-openfeature-server-provider.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"configdirector-openfeature-server-provider.d.cts","names":[],"sources":["../../shared/src/types.ts","../../js-server-sdk/src/types.ts","../src/ConfigDirectorProvider.ts"],"mappings":";;;cAAa,cAAA;AAAA,KAUD,UAAA,WAAqB,c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iBAAoB,YAAA,EAAc,SAAA,EAAW,CAAA,EAAG,OAAA,IAAW,IAAA,EAAM,YAAA,CAAa,CAAA;EAlF3C;;;;;;EA0FnC,OAAA;AAAA;;;cC3OW,sBAAA,YAAkC,QAAA;EAAA,iBAC5B,MAAA;EAAA,iBACA,YAAA;EAAA,SAER,QAAA,EAAU,gBAAA;EAAA,SAGV,MAAA,EAAQ,QAAA;EAAA,SACR,MAAA,EAAM,uBAAA;cAEI,YAAA,UAAsB,aAAA,GAAgB,2BAAA;EAiBnD,UAAA,CAAA,GAAU,OAAA;EAMhB,wBAAA,CACE,OAAA,UACA,YAAA,WACA,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA;EAIX,uBAAA,CACE,OAAA,UACA,YAAA,UACA,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA;EAIX,uBAAA,CACE,OAAA,UACA,YAAA,UACA,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA;EAIX,uBAAA,WAAkC,SAAA,CAAA,CAChC,OAAA,UACA,YAAA,EAAc,CAAA,EACd,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA,CAAkB,CAAA;EAM7B,OAAA,CAAA,CAAA,GAAY,OAAA;EAAA,QAKJ,QAAA;EAAA,QAWA,UAAA;AAAA"}
1
+ {"version":3,"file":"configdirector-openfeature-server-provider.d.cts","names":[],"sources":["../../shared/src/types.ts","../../shared/src/native-values.ts","../../js-server-sdk/src/types.ts","../../shared/src/errors.ts","../src/ConfigDirectorProvider.ts"],"mappings":";;;cAAa,cAAA;AAAA,KAUD,UAAA,WAAqB,cAAA;AAAA,KAErB,kBAAA;EAAA,CAAwB,GAAA;AAAA;AAAA,KAExB,eAAA,wCAAuD,kBAAA;AAAA,KAEvD,WAAA;EACV,EAAA;EACA,GAAA;EACA,IAAA,EAAM,UAAA;EACN,KAAA;EACA,OAAA;AAAA;AAAA,KAQU,0BAAA;AAAA,UAEK,oBAAA;EACf,KAA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ext;
35
35
  };
36
36
  /**
37
- * The user's context to be sent to ConfigDirector. This context will be used for targeting
38
- * rules evaluation.
37
+ * The context to be sent to ConfigDirector: the user or other entity, such as a device or an
38
+ * organization, that configs are evaluated for. This context will be used for targeting rules
39
+ * evaluation.
39
40
  */
40
41
  type ConfigDirectorContext = {
41
42
  /**
42
- * The user's identifier. This should be a value that uniquely identifies an application
43
- * user.
43
+ * The context's identifier. This should be a value that uniquely identifies the user or other
44
+ * entity among contexts of the same {@link kind}.
44
45
  * In the case of anonymous users, you could generate a UUID or alternatively not provide
45
46
  * the {@link id} and the SDK will generate a random UUID. However, keep in mind that this
46
- * value is used for segmenting users in percentage rollouts, and changes to the {@link id}
47
- * could result in the user being assigned to a different percentile.
47
+ * value is used for segmenting contexts in percentage rollouts, and changes to the {@link id}
48
+ * could result in the context being assigned to a different percentile.
48
49
  */
49
50
  id?: string;
50
51
  /**
51
- * The user's display name. This will be shown in the ConfigDirector dashboard and may be
52
+ * The kind of entity this context represents, such as `user`, `device`, `organization`,
53
+ * `tenant` or `listing`. You can use any other kind that fits your application. A kind has 1
54
+ * to 64 characters, using only lowercase letters (`a`-`z`), digits, `-` and `_`. It is used
55
+ * exactly as given, without trimming or changing its case.
56
+ *
57
+ * A context with an invalid kind is ignored as a whole: the SDK logs an error and evaluates
58
+ * as if no context had been provided.
59
+ *
60
+ * @default "user"
61
+ */
62
+ kind?: string;
63
+ /**
64
+ * The context's display name. This will be shown in the ConfigDirector dashboard and may be
52
65
  * used for targeting rules.
53
66
  */
54
67
  name?: string;
55
68
  /**
56
- * Any arbitrary traits for the current user. They will be shown in the ConfigDirector
57
- * dashboard and may be used for targeting rules.
69
+ * Any arbitrary traits for the context. They will be shown in the ConfigDirector dashboard
70
+ * and may be used for targeting rules.
58
71
  */
59
72
  traits?: {
60
73
  [key: string]: unknown;
@@ -76,9 +89,90 @@ type ConfigDirectorMetaContext = {
76
89
  appVersion?: string;
77
90
  appName?: string;
78
91
  };
79
- type ConnectionMode = "streaming" | "polling";
92
+ type ConnectionMode = "streaming" | "polling" | "offline";
93
+ //#endregion
94
+ //#region ../shared/src/native-values.d.ts
95
+ type NativeJsonValue = boolean | number | string | null | NativeJsonValue[] | {
96
+ [key: string]: NativeJsonValue;
97
+ };
98
+ type NativeValue = boolean | number | string | NativeJsonValue[] | {
99
+ [key: string]: NativeJsonValue;
100
+ };
101
+ type NativeValues = Record<string, NativeValue>;
80
102
  //#endregion
81
103
  //#region ../js-server-sdk/src/types.d.ts
104
+ /**
105
+ * One value an offline client serves for a config key. The config type follows from the value: a
106
+ * boolean, an integral number (`integer`), any other number (`float`), a string, or a plain object
107
+ * or array (`json`).
108
+ */
109
+ type OfflineValue = NativeValue;
110
+ /**
111
+ * The values an offline client serves, keyed by config key. See {@link OfflineValue} for how each
112
+ * value's config type is decided. Every context receives the same value.
113
+ */
114
+ type OfflineValues = NativeValues;
115
+ /**
116
+ * Connection options of the {@link ConfigDirectorClient}
117
+ */
118
+ type ConnectionOptions = {
119
+ /**
120
+ * The connection mode to be used, one of `streaming` (default), `polling` or `offline`.
121
+ * If set to `streaming`, the connection will remain open and receive updates whenever
122
+ * config state is updated on the ConfigDirector dashboard.
123
+ * When set to `polling`, there will be an initial request to retrieve config state during
124
+ * initialization, and additional requests on a `pollingInterval`.
125
+ * When set to `offline`, the client never connects to ConfigDirector and sends nothing: it serves
126
+ * the values read from {@link file} or given in {@link values} to every context, or the in-code
127
+ * default values when neither is given. No SDK key is needed.
128
+ *
129
+ * Defaults to `streaming`
130
+ */
131
+ mode?: ConnectionMode;
132
+ /**
133
+ * The path of a JSON file holding the values to serve in `offline` mode, resolved against the
134
+ * process working directory. The file holds one object with a value per config key, such as
135
+ * `{ "new-checkout": true, "max-items": 20 }`; see {@link OfflineValue} for how the config type
136
+ * of each value is decided. A file that is missing, unreadable, not a JSON object, or holding a
137
+ * value such as `null` makes `initialize` reject with a `ConfigDirectorInitializationError`.
138
+ *
139
+ * Only one of `file` and `values` can be given, and only in `offline` mode; otherwise
140
+ * `initialize` rejects.
141
+ */
142
+ file?: string;
143
+ /**
144
+ * The values to serve in `offline` mode, keyed by config key. A value such as `null` makes
145
+ * `initialize` reject with a `ConfigDirectorInitializationError`.
146
+ *
147
+ * Only one of `file` and `values` can be given, and only in `offline` mode; otherwise
148
+ * `initialize` rejects.
149
+ */
150
+ values?: OfflineValues;
151
+ /**
152
+ * The polling interval in _seconds_ when the `mode` is set to `polling`. This option has no
153
+ * effect in the other modes.
154
+ *
155
+ * Defaults to 300 seconds (5 minutes). The minimum is 60 seconds. A value below the minimum is
156
+ * raised to the minimum and a warning is logged.
157
+ */
158
+ pollingInterval?: number;
159
+ /**
160
+ * The timeout, in milliseconds, to be used in initialization and when updating the context.
161
+ * If streaming is enabled, the operation (initialization or context update) may still succeed
162
+ * after it times out if no unrecoverable errors are encountered (like an invalid SDK key).
163
+ * If streaming is disabled, if the operation times out, it will not be retried. This option has
164
+ * no effect in `offline` mode.
165
+ *
166
+ * Defaults to 3,000 milliseconds (3 seconds)
167
+ */
168
+ timeout?: number;
169
+ /**
170
+ * The base URL to the ConfigDirector SDK server. To be used only when needing to route through a
171
+ * proxy to connect to the ConfigDirector SDK server. Please refer to the docs on how to configure
172
+ * a proxy for the client SDK. This option has no effect in `offline` mode.
173
+ */
174
+ url?: string;
175
+ };
82
176
  /**
83
177
  * Configuration options for the {@link ConfigDirectorClient}
84
178
  */
@@ -90,41 +184,7 @@ type ConfigDirectorClientOptions = {
90
184
  /**
91
185
  * Connection options
92
186
  */
93
- connection?: {
94
- /**
95
- * The connection mode to be used, one of `streaming` (default) or `polling`.
96
- * If set to `streaming`, the connection will remain open and receive updates whenever
97
- * config state is updated on the ConfigDirector dashboard.
98
- * When set to `polling`, there will be an initial request to retrieve config state during
99
- * initialization, and additional requests on a `pollingInterval`.
100
- *
101
- * Defaults to `streaming`
102
- */
103
- mode?: ConnectionMode;
104
- /**
105
- * The polling interval in _seconds_ when the `mode` is set to `polling`. This option has no
106
- * effect when the `mode` is set to `streaming`.
107
- *
108
- * Defaults to 300 seconds (5 minutes). The minimum is 60 seconds. A value below the minimum is
109
- * raised to the minimum and a warning is logged.
110
- */
111
- pollingInterval?: number;
112
- /**
113
- * The timeout, in milliseconds, to be used in initialization and when updating the context.
114
- * If streaming is enabled, the operation (initialization or context update) may still succeed
115
- * after it times out if no unrecoverable errors are encountered (like an invalid SDK key).
116
- * If streaming is disabled, if the operation times out, it will not be retried.
117
- *
118
- * Defaults to 3,000 milliseconds (3 seconds)
119
- */
120
- timeout?: number;
121
- /**
122
- * The base URL to the ConfigDirector SDK server. To be used only when needing to route through a
123
- * proxy to connect to the ConfigDirector SDK server. Please refer to the docs on how to configure
124
- * a proxy for the client SDK.
125
- */
126
- url?: string;
127
- };
187
+ connection?: ConnectionOptions;
128
188
  /**
129
189
  * A logger that implements {@link ConfigDirectorLogger}. It defaults to the ConfigDirector console
130
190
  * logger set to 'warn' level.
@@ -184,6 +244,14 @@ type ConfigDirectorClientOptions = {
184
244
  */
185
245
  hooks?: ClientHooks;
186
246
  };
247
+ /**
248
+ * The options of a client created without an SDK key: the connection mode is `offline`.
249
+ */
250
+ type OfflineClientOptions = ConfigDirectorClientOptions & {
251
+ connection: ConnectionOptions & {
252
+ mode: "offline";
253
+ };
254
+ };
187
255
  type ClientEvents = {
188
256
  configsUpdated: {
189
257
  keys: string[];
@@ -290,6 +358,12 @@ interface ConfigDirectorClient {
290
358
  dispose(): void;
291
359
  }
292
360
  //#endregion
361
+ //#region ../shared/src/errors.d.ts
362
+ declare class ConfigDirectorInitializationError extends Error {
363
+ readonly name: string;
364
+ constructor(message: string);
365
+ }
366
+ //#endregion
293
367
  //#region src/ConfigDirectorProvider.d.ts
294
368
  declare class ConfigDirectorProvider implements Provider {
295
369
  private readonly client;
@@ -297,7 +371,15 @@ declare class ConfigDirectorProvider implements Provider {
297
371
  readonly metadata: ProviderMetadata;
298
372
  readonly runsOn: Paradigm;
299
373
  readonly events: OpenFeatureEventEmitter;
300
- constructor(clientSdkKey: string, clientOptions?: ConfigDirectorClientOptions);
374
+ /**
375
+ * Creates a provider connected to ConfigDirector with the given server SDK key.
376
+ */
377
+ constructor(serverSdkKey: string, clientOptions?: ConfigDirectorClientOptions);
378
+ /**
379
+ * Creates a provider in `offline` mode, which needs no server SDK key: it never connects to
380
+ * ConfigDirector and serves `connection.file` or `connection.values` to every evaluation.
381
+ */
382
+ constructor(clientOptions: OfflineClientOptions);
301
383
  initialize(): Promise<void>;
302
384
  resolveBooleanEvaluation(flagKey: string, defaultValue: boolean, context: EvaluationContext): Promise<ResolutionDetails<boolean>>;
303
385
  resolveStringEvaluation(flagKey: string, defaultValue: string, context: EvaluationContext): Promise<ResolutionDetails<string>>;
@@ -308,5 +390,5 @@ declare class ConfigDirectorProvider implements Provider {
308
390
  private mapContext;
309
391
  }
310
392
  //#endregion
311
- export { type ConfigDirectorClient, type ConfigDirectorClientOptions, type ConfigDirectorContext, type ConfigDirectorLogMessageDecorator, type ConfigDirectorLogger, type ConfigDirectorLoggingLevel, ConfigDirectorProvider, type ConfigValueType };
393
+ export { type ConfigDirectorClient, type ConfigDirectorClientOptions, type ConfigDirectorContext, ConfigDirectorInitializationError, type ConfigDirectorLogMessageDecorator, type ConfigDirectorLogger, type ConfigDirectorLoggingLevel, ConfigDirectorProvider, type ConfigValueType, type OfflineClientOptions, type OfflineValue, type OfflineValues };
312
394
  //# sourceMappingURL=configdirector-openfeature-server-provider.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"configdirector-openfeature-server-provider.d.mts","names":[],"sources":["../../shared/src/types.ts","../../js-server-sdk/src/types.ts","../src/ConfigDirectorProvider.ts"],"mappings":";;;cAAa,cAAA;AAAA,KAUD,UAAA,WAAqB,cAAA;AAAA,KAErB,kBAAA;EAAA,CAAwB,GAAA;AAAA;AAAA,KAExB,eAAA,wCAAuD,kBAAA;AAAA,KAEvD,WAAA;EACV,EAAA;EACA,GAAA;EACA,IAAA,EAAM,UAAA;EACN,KAAA;EACA,OAAA;AAAA;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AA,iBACA,YAAA;EAAA,SAER,QAAA,EAAU,gBAAA;EAAA,SAGV,MAAA,EAAQ,QAAA;EAAA,SACR,MAAA,EAAM,uBAAA;cAEI,YAAA,UAAsB,aAAA,GAAgB,2BAAA;EAiBnD,UAAA,CAAA,GAAU,OAAA;EAMhB,wBAAA,CACE,OAAA,UACA,YAAA,WACA,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA;EAIX,uBAAA,CACE,OAAA,UACA,YAAA,UACA,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA;EAIX,uBAAA,CACE,OAAA,UACA,YAAA,UACA,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA;EAIX,uBAAA,WAAkC,SAAA,CAAA,CAChC,OAAA,UACA,YAAA,EAAc,CAAA,EACd,OAAA,EAAS,iBAAA,GACR,OAAA,CAAQ,iBAAA,CAAkB,CAAA;EAM7B,OAAA,CAAA,CAAA,GAAY,OAAA;EAAA,QAKJ,QAAA;EAAA,QAWA,UAAA;AAAA"}
1
+ {"version":3,"file":"configdirector-openfeature-server-provider.d.mts","names":[],"sources":["../../shared/src/types.ts","../../shared/src/native-values.ts","../../js-server-sdk/src/types.ts","../../shared/src/errors.ts","../src/ConfigDirectorProvider.ts"],"mappings":";;;cAAa,cAAA;AAAA,KAUD,UAAA,WAAqB,cAAA;AAAA,KAErB,kBAAA;EAAA,CAAwB,GAAA;AAAA;AAAA,KAExB,eAAA,wCAAuD,kBAAA;AAAA,KAEvD,WAAA;EACV,EAAA;EACA,GAAA;EACA,IAAA,EAAM,UAAA;EACN,KAAA;EACA,OAAA;AAAA;AAAA,KAQU,0BAAA;AAAA,UAEK,oBAAA;EACf,KAAA,CAAM,OAAA,aAAoB,IAAA;EAE1B,IAAA,CAAK,OAAA,aAAoB,IAAA;EAEzB,IAAA,CAAK,OAAA,aAAoB,IAAA;EAEzB,KAAA,CAAM,OAAA,aAAoB,IAAA;AAAA;AAAA,UAGX,iCAAA;EACf,e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