Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update js client to support ufc update #55

Merged
merged 10 commits into from
Apr 24, 2024
Merged
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
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ test-data:
rm -rf $(testDataDir)
mkdir -p $(tempDir)
git clone -b ${branchName} --depth 1 --single-branch ${githubRepoLink} ${gitDataDir}
cp ${gitDataDir}rac-experiments-v3-obfuscated.json ${testDataDir}
cp -r ${gitDataDir}assignment-v2 ${testDataDir}
cp -r ${gitDataDir}ufc ${testDataDir}
rm -rf ${tempDir}

## prepare
Expand Down
25 changes: 0 additions & 25 deletions docs/js-client-sdk.eppojsclient.getassignment.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/js-client-sdk.eppojsclient.getboolassignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
**Signature:**

```typescript
getBoolAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): boolean | null;
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: boolean): boolean;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| subjectKey | string | |
| flagKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | _(Optional)_ |
| assignmentHooks | IAssignmentHooks | _(Optional)_ |
| subjectKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | |
| defaultValue | boolean | |

**Returns:**

boolean \| null
boolean

25 changes: 25 additions & 0 deletions docs/js-client-sdk.eppojsclient.getintegerassignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoJSClient](./js-client-sdk.eppojsclient.md) &gt; [getIntegerAssignment](./js-client-sdk.eppojsclient.getintegerassignment.md)

## EppoJSClient.getIntegerAssignment() method

**Signature:**

```typescript
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: number): number;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| flagKey | string | |
| subjectKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | |
| defaultValue | number | |

**Returns:**

number

25 changes: 25 additions & 0 deletions docs/js-client-sdk.eppojsclient.getjsonassignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@eppo/js-client-sdk](./js-client-sdk.md) &gt; [EppoJSClient](./js-client-sdk.eppojsclient.md) &gt; [getJSONAssignment](./js-client-sdk.eppojsclient.getjsonassignment.md)

## EppoJSClient.getJSONAssignment() method

**Signature:**

```typescript
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: object): object;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| flagKey | string | |
| subjectKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | |
| defaultValue | object | |

**Returns:**

object

25 changes: 0 additions & 25 deletions docs/js-client-sdk.eppojsclient.getjsonstringassignment.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/js-client-sdk.eppojsclient.getnumericassignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
**Signature:**

```typescript
getNumericAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): number | null;
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: number): number;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| subjectKey | string | |
| flagKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | _(Optional)_ |
| assignmentHooks | IAssignmentHooks | _(Optional)_ |
| subjectKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | |
| defaultValue | number | |

**Returns:**

number \| null
number

25 changes: 0 additions & 25 deletions docs/js-client-sdk.eppojsclient.getparsedjsonassignment.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/js-client-sdk.eppojsclient.getstringassignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
**Signature:**

```typescript
getStringAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): string | null;
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: string): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| subjectKey | string | |
| flagKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | _(Optional)_ |
| assignmentHooks | IAssignmentHooks | _(Optional)_ |
| subjectKey | string | |
| subjectAttributes | Record&lt;string, any&gt; | |
| defaultValue | string | |

**Returns:**

string \| null
string

11 changes: 5 additions & 6 deletions docs/js-client-sdk.eppojsclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ export declare class EppoJSClient extends EppoClient

| Method | Modifiers | Description |
| --- | --- | --- |
| [getAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getassignment.md) | | |
| [getBoolAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getboolassignment.md) | | |
| [getJSONStringAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getjsonstringassignment.md) | | |
| [getNumericAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getnumericassignment.md) | | |
| [getParsedJSONAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getparsedjsonassignment.md) | | |
| [getStringAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getstringassignment.md) | | |
| [getBoolAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getboolassignment.md) | | |
| [getIntegerAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getintegerassignment.md) | | |
| [getJSONAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getjsonassignment.md) | | |
| [getNumericAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getnumericassignment.md) | | |
| [getStringAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getstringassignment.md) | | |

13 changes: 5 additions & 8 deletions js-client-sdk.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,21 @@

import { EppoClient } from '@eppo/js-client-sdk-common';
import { IAssignmentEvent } from '@eppo/js-client-sdk-common';
import { IAssignmentHooks } from '@eppo/js-client-sdk-common';
import { IAssignmentLogger } from '@eppo/js-client-sdk-common';
import { IEppoClient } from '@eppo/js-client-sdk-common';

// @public
export class EppoJSClient extends EppoClient {
// (undocumented)
getAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): string | null;
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: boolean): boolean;
// (undocumented)
getBoolAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): boolean | null;
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: number): number;
// (undocumented)
getJSONStringAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): string | null;
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: object): object;
// (undocumented)
getNumericAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): number | null;
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: number): number;
// (undocumented)
getParsedJSONAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): object | null;
// (undocumented)
getStringAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): string | null;
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: string): string;
// (undocumented)
static initialized: boolean;
// (undocumented)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eppo/js-client-sdk",
"version": "1.7.3",
"version": "3.0.0",
"description": "Eppo SDK for client-side JavaScript applications",
"main": "dist/index.js",
"files": [
Expand Down Expand Up @@ -58,7 +58,7 @@
"xhr-mock": "^2.5.1"
},
"dependencies": {
"@eppo/js-client-sdk-common": "2.2.3",
"@eppo/js-client-sdk-common": "3.0.1",
"md5": "^2.3.0"
}
}
}
Loading
Loading