Skip to content

Commit f8e9c0a

Browse files
authored
update js client to support ufc update (#55)
* update js client to support ufc update * get most tests to pass * get tests to pass, albeit with remocking at bottom * remove unobfuscated test, clean up code * update assignment function signatures * address a few pr comments * fully obfuscate mock ufc in test file * update yarn.lock * bump version of common sdk * retrieve polling values from exported constant in common lib
1 parent b2834b9 commit f8e9c0a

18 files changed

+411
-433
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ test-data:
3434
rm -rf $(testDataDir)
3535
mkdir -p $(tempDir)
3636
git clone -b ${branchName} --depth 1 --single-branch ${githubRepoLink} ${gitDataDir}
37-
cp ${gitDataDir}rac-experiments-v3-obfuscated.json ${testDataDir}
38-
cp -r ${gitDataDir}assignment-v2 ${testDataDir}
37+
cp -r ${gitDataDir}ufc ${testDataDir}
3938
rm -rf ${tempDir}
4039

4140
## prepare

docs/js-client-sdk.eppojsclient.getassignment.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/js-client-sdk.eppojsclient.getboolassignment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
**Signature:**
88

99
```typescript
10-
getBoolAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): boolean | null;
10+
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: boolean): boolean;
1111
```
1212

1313
## Parameters
1414

1515
| Parameter | Type | Description |
1616
| --- | --- | --- |
17-
| subjectKey | string | |
1817
| flagKey | string | |
19-
| subjectAttributes | Record&lt;string, any&gt; | _(Optional)_ |
20-
| assignmentHooks | IAssignmentHooks | _(Optional)_ |
18+
| subjectKey | string | |
19+
| subjectAttributes | Record&lt;string, any&gt; | |
20+
| defaultValue | boolean | |
2121

2222
**Returns:**
2323

24-
boolean \| null
24+
boolean
2525

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[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)
4+
5+
## EppoJSClient.getIntegerAssignment() method
6+
7+
**Signature:**
8+
9+
```typescript
10+
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: number): number;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| flagKey | string | |
18+
| subjectKey | string | |
19+
| subjectAttributes | Record&lt;string, any&gt; | |
20+
| defaultValue | number | |
21+
22+
**Returns:**
23+
24+
number
25+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[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)
4+
5+
## EppoJSClient.getJSONAssignment() method
6+
7+
**Signature:**
8+
9+
```typescript
10+
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: object): object;
11+
```
12+
13+
## Parameters
14+
15+
| Parameter | Type | Description |
16+
| --- | --- | --- |
17+
| flagKey | string | |
18+
| subjectKey | string | |
19+
| subjectAttributes | Record&lt;string, any&gt; | |
20+
| defaultValue | object | |
21+
22+
**Returns:**
23+
24+
object
25+

docs/js-client-sdk.eppojsclient.getjsonstringassignment.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/js-client-sdk.eppojsclient.getnumericassignment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
**Signature:**
88

99
```typescript
10-
getNumericAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): number | null;
10+
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: number): number;
1111
```
1212

1313
## Parameters
1414

1515
| Parameter | Type | Description |
1616
| --- | --- | --- |
17-
| subjectKey | string | |
1817
| flagKey | string | |
19-
| subjectAttributes | Record&lt;string, any&gt; | _(Optional)_ |
20-
| assignmentHooks | IAssignmentHooks | _(Optional)_ |
18+
| subjectKey | string | |
19+
| subjectAttributes | Record&lt;string, any&gt; | |
20+
| defaultValue | number | |
2121

2222
**Returns:**
2323

24-
number \| null
24+
number
2525

docs/js-client-sdk.eppojsclient.getparsedjsonassignment.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/js-client-sdk.eppojsclient.getstringassignment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
**Signature:**
88

99
```typescript
10-
getStringAssignment(subjectKey: string, flagKey: string, subjectAttributes?: Record<string, any>, assignmentHooks?: IAssignmentHooks): string | null;
10+
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record<string, any>, defaultValue: string): string;
1111
```
1212

1313
## Parameters
1414

1515
| Parameter | Type | Description |
1616
| --- | --- | --- |
17-
| subjectKey | string | |
1817
| flagKey | string | |
19-
| subjectAttributes | Record&lt;string, any&gt; | _(Optional)_ |
20-
| assignmentHooks | IAssignmentHooks | _(Optional)_ |
18+
| subjectKey | string | |
19+
| subjectAttributes | Record&lt;string, any&gt; | |
20+
| defaultValue | string | |
2121

2222
**Returns:**
2323

24-
string \| null
24+
string
2525

docs/js-client-sdk.eppojsclient.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ export declare class EppoJSClient extends EppoClient
2424
2525
| Method | Modifiers | Description |
2626
| --- | --- | --- |
27-
| [getAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getassignment.md) | | |
28-
| [getBoolAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getboolassignment.md) | | |
29-
| [getJSONStringAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getjsonstringassignment.md) | | |
30-
| [getNumericAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getnumericassignment.md) | | |
31-
| [getParsedJSONAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getparsedjsonassignment.md) | | |
32-
| [getStringAssignment(subjectKey, flagKey, subjectAttributes, assignmentHooks)](./js-client-sdk.eppojsclient.getstringassignment.md) | | |
27+
| [getBoolAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getboolassignment.md) | | |
28+
| [getIntegerAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getintegerassignment.md) | | |
29+
| [getJSONAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getjsonassignment.md) | | |
30+
| [getNumericAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getnumericassignment.md) | | |
31+
| [getStringAssignment(flagKey, subjectKey, subjectAttributes, defaultValue)](./js-client-sdk.eppojsclient.getstringassignment.md) | | |
3332

0 commit comments

Comments
 (0)