Skip to content

Commit e1353e5

Browse files
authored
Update Eppo sdk common lib to v1.2.0 (#17)
* update sdk common lib to latest * update generated docs
1 parent 871aebf commit e1353e5

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

js-client-sdk.api.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
55
```ts
66

7-
// @public
8-
export function getInstance(): IEppoClient;
7+
import { EppoClient } from '@eppo/js-client-sdk-common';
8+
import { IAssignmentEvent } from '@eppo/js-client-sdk-common';
9+
import { IAssignmentLogger } from '@eppo/js-client-sdk-common';
10+
import { IEppoClient } from '@eppo/js-client-sdk-common';
911

1012
// @public
11-
export interface IAssignmentEvent {
12-
experiment: string;
13-
subject: string;
13+
export class EppoJSClient extends EppoClient {
1414
// (undocumented)
15-
subjectAttributes: Record<string, any>;
16-
timestamp: string;
17-
variation: string;
15+
static instance: EppoJSClient;
1816
}
1917

2018
// @public
21-
export interface IAssignmentLogger {
22-
logAssignment(assignment: IAssignmentEvent): void;
23-
}
19+
export function getInstance(): IEppoClient;
20+
21+
export { IAssignmentEvent }
22+
23+
export { IAssignmentLogger }
2424

2525
// @public
2626
export interface IClientConfig {
@@ -29,10 +29,7 @@ export interface IClientConfig {
2929
baseUrl?: string;
3030
}
3131

32-
// @public
33-
export interface IEppoClient {
34-
getAssignment(subjectKey: string, experimentKey: string, subjectAttributes?: Record<string, any>): string;
35-
}
32+
export { IEppoClient }
3633

3734
// @public
3835
export function init(config: IClientConfig): Promise<IEppoClient>;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eppo/js-client-sdk",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Eppo SDK for client-side JavaScript applications",
55
"main": "dist/index.js",
66
"files": [
@@ -56,7 +56,7 @@
5656
"xhr-mock": "^2.5.1"
5757
},
5858
"dependencies": {
59-
"@eppo/js-client-sdk-common": "1.1.0",
59+
"@eppo/js-client-sdk-common": "^1.2.0",
6060
"axios": "^0.27.2",
6161
"md5": "^2.3.0"
6262
}

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ export interface IClientConfig {
3737
export { IAssignmentLogger, IAssignmentEvent, IEppoClient } from '@eppo/js-client-sdk-common';
3838

3939
const localStorage = new EppoLocalStorage();
40+
41+
/**
42+
* Client for assigning experiment variations.
43+
* @public
44+
*/
4045
export class EppoJSClient extends EppoClient {
4146
public static instance: EppoJSClient = new EppoJSClient(localStorage);
4247
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@
289289
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
290290
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
291291

292-
"@eppo/js-client-sdk-common@1.1.0":
293-
version "1.1.0"
294-
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-1.1.0.tgz#490bb69b48ae8c0ab4aa9baf26f11f06a9c5233d"
295-
integrity sha512-sREoQxJYQhmVt98/lygZVOausca6MFtqxQQwm8+DZW0bBMkDrfPkhZQ1tL84ux0KnrzRhOU4xy0NZypOBLg7Vw==
292+
"@eppo/js-client-sdk-common@^1.2.0":
293+
version "1.2.0"
294+
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-1.2.0.tgz#b5267127f9e2b2cfde79f1e8d05058ccb358420f"
295+
integrity sha512-deqSbrutzXdWyKFydXcIUViuCoyvbWIp2ZKX+4Eowbb86NDbB9VGEa55f5ET/+Z8xZ+QcCZ4kuEisIkRD6nlxA==
296296
dependencies:
297297
axios "^0.27.2"
298298
md5 "^2.3.0"

0 commit comments

Comments
 (0)