Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 56 additions & 1 deletion src/i-client-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export interface IClientConfig {
/** Amount of time in milliseconds to wait between API calls to refresh configuration data. Default of 30_000 (30s). */
pollingIntervalMs?: number;

/** Configuration settings for the event dispatcher */
/**
* Configuration settings for the event dispatcher.
* @deprecated Eppo has discontinued eventing support. Event tracking will be handled by Datadog SDKs.
*/
Comment on lines +55 to +58
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well start flagging this as deprecated so we can rip out in a future version! 🪓

eventTracking?: {
/** Maximum number of events to send per delivery request. Defaults to 1000 events. */
batchSize?: number;
Expand All @@ -74,3 +77,55 @@ export interface IClientConfig {
retryIntervalMs?: number;
};
}

/**
* Configuration used for offline initialization of the Eppo client.
* Offline initialization allows the SDK to be used without making any network requests.
* @public
*/
export interface IOfflineClientConfig {
/**
* The full flags configuration JSON string as returned by the Eppo API.
* This should be the complete response from the /flag-config/v1/config endpoint.
*
* Expected format:
* ```json
* {
* "createdAt": "2024-04-17T19:40:53.716Z",
* "format": "SERVER",
* "environment": { "name": "production" },
* "flags": { ... }
* }
* ```
*/
flagsConfiguration: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opted to deviate from our client JS SDK and follow in the footsteps of python and iOS using the more user-friendly and information-rich wire format.


/**
* Optional bandit models configuration JSON string as returned by the Eppo API.
* This should be the complete response from the bandit parameters endpoint.
*
* Expected format:
* ```json
* {
* "updatedAt": "2024-04-17T19:40:53.716Z",
* "bandits": { ... }
* }
* ```
*/
banditsConfiguration?: string;

/**
* Optional assignment logger for sending variation assignments to your data warehouse.
* Required for experiment analysis.
*/
assignmentLogger?: IAssignmentLogger;

/** Optional bandit logger for sending bandit actions to your data warehouse */
banditLogger?: IBanditLogger;

/**
* Whether to throw an error if initialization fails. (default: true)
* If false, the client will be initialized with an empty configuration.
*/
throwOnFailedInitialization?: boolean;
}
Loading