Skip to content

Commit 953c4e4

Browse files
committed
doc comments
1 parent fa5baab commit 953c4e4

File tree

1 file changed

+38
-32
lines changed

1 file changed

+38
-32
lines changed

src/i-client-config.ts

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -104,31 +104,18 @@ export interface IPrecomputedClientConfig extends IBaseRequestConfig {
104104
precompute: IPrecompute;
105105
}
106106

107-
export type IEventOptions = {
108-
eventIngestionConfig?: {
109-
/** Number of milliseconds to wait between each batch delivery. Defaults to 10 seconds. */
110-
deliveryIntervalMs?: number;
111-
/** Minimum amount of milliseconds to wait before retrying a failed delivery. Defaults to 5 seconds */
112-
retryIntervalMs?: number;
113-
/** Maximum amount of milliseconds to wait before retrying a failed delivery. Defaults to 30 seconds. */
114-
maxRetryDelayMs?: number;
115-
/** Maximum number of retry attempts before giving up on a batch delivery. Defaults to 3 retries. */
116-
maxRetries?: number;
117-
/** Maximum number of events to send per delivery request. Defaults to 1000 events. */
118-
batchSize?: number;
119-
/**
120-
* Maximum number of events to queue in memory before starting to drop events.
121-
* Note: This is only used if localStorage is not available.
122-
* Defaults to 10000 events.
123-
*/
124-
maxQueueSize?: number;
125-
};
126-
};
127-
107+
/**
108+
* Base options for the EppoClient SDK
109+
*/
128110
export type IApiOptions = {
111+
/**
112+
* Your key for accessing Eppo through the Eppo SDK.
113+
*/
129114
sdkKey: string;
130115

131-
initialConfiguration?: string;
116+
/**
117+
* Override the endpoint the SDK uses to load configuration.
118+
*/
132119
baseUrl?: string;
133120

134121
/**
@@ -178,20 +165,39 @@ export type IApiOptions = {
178165
* - empty: only use the new configuration if the current one is both expired and uninitialized/empty
179166
*/
180167
updateOnFetch?: ServingStoreUpdateStrategy;
168+
169+
/**
170+
* A configuration string to bootstrap the client without having to make a network fetch.
171+
*/
172+
initialConfiguration: string;
181173
};
182174

183-
/**
184-
* Handy options class for when you want to create an offline client.
185-
*/
186-
export class OfflineApiOptions implements IApiOptions {
187-
constructor(
188-
public readonly sdkKey: string,
189-
public readonly initialConfiguration?: string,
190-
) {}
191-
public readonly offline = true;
192-
}
175+
176+
export type IEventOptions = {
177+
eventIngestionConfig?: {
178+
/** Number of milliseconds to wait between each batch delivery. Defaults to 10 seconds. */
179+
deliveryIntervalMs?: number;
180+
/** Minimum amount of milliseconds to wait before retrying a failed delivery. Defaults to 5 seconds */
181+
retryIntervalMs?: number;
182+
/** Maximum amount of milliseconds to wait before retrying a failed delivery. Defaults to 30 seconds. */
183+
maxRetryDelayMs?: number;
184+
/** Maximum number of retry attempts before giving up on a batch delivery. Defaults to 3 retries. */
185+
maxRetries?: number;
186+
/** Maximum number of events to send per delivery request. Defaults to 1000 events. */
187+
batchSize?: number;
188+
/**
189+
* Maximum number of events to queue in memory before starting to drop events.
190+
* Note: This is only used if localStorage is not available.
191+
* Defaults to 10000 events.
192+
*/
193+
maxQueueSize?: number;
194+
};
195+
};
193196

194197
export type IStorageOptions = {
198+
/**
199+
* Custom implementation of the flag configuration store for advanced use-cases.
200+
*/
195201
flagConfigurationStore?: IConfigurationStore<Flag>;
196202

197203
/**

0 commit comments

Comments
 (0)