-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement assignment logger * generated docs * 0.0.2
- Loading branch information
Showing
17 changed files
with
300 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentEvent](./js-client-sdk.iassignmentevent.md) > [experiment](./js-client-sdk.iassignmentevent.experiment.md) | ||
|
||
## IAssignmentEvent.experiment property | ||
|
||
An Eppo experiment key | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
experiment: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentEvent](./js-client-sdk.iassignmentevent.md) | ||
|
||
## IAssignmentEvent interface | ||
|
||
Holds data about the variation a subject was assigned to. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface IAssignmentEvent | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [experiment](./js-client-sdk.iassignmentevent.experiment.md) | string | An Eppo experiment key | | ||
| [subject](./js-client-sdk.iassignmentevent.subject.md) | string | The entity or user that was assigned to a variation | | ||
| [subjectAttributes](./js-client-sdk.iassignmentevent.subjectattributes.md) | Record<string, any> | | | ||
| [timestamp](./js-client-sdk.iassignmentevent.timestamp.md) | string | The time the subject was exposed to the variation. | | ||
| [variation](./js-client-sdk.iassignmentevent.variation.md) | string | The assigned variation | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentEvent](./js-client-sdk.iassignmentevent.md) > [subject](./js-client-sdk.iassignmentevent.subject.md) | ||
|
||
## IAssignmentEvent.subject property | ||
|
||
The entity or user that was assigned to a variation | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
subject: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentEvent](./js-client-sdk.iassignmentevent.md) > [subjectAttributes](./js-client-sdk.iassignmentevent.subjectattributes.md) | ||
|
||
## IAssignmentEvent.subjectAttributes property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
subjectAttributes: Record<string, any>; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentEvent](./js-client-sdk.iassignmentevent.md) > [timestamp](./js-client-sdk.iassignmentevent.timestamp.md) | ||
|
||
## IAssignmentEvent.timestamp property | ||
|
||
The time the subject was exposed to the variation. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
timestamp: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentEvent](./js-client-sdk.iassignmentevent.md) > [variation](./js-client-sdk.iassignmentevent.variation.md) | ||
|
||
## IAssignmentEvent.variation property | ||
|
||
The assigned variation | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
variation: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentLogger](./js-client-sdk.iassignmentlogger.md) > [logAssignment](./js-client-sdk.iassignmentlogger.logassignment.md) | ||
|
||
## IAssignmentLogger.logAssignment() method | ||
|
||
Invoked when a subject is assigned to an experiment variation. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
logAssignment(assignment: IAssignmentEvent): void; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| assignment | [IAssignmentEvent](./js-client-sdk.iassignmentevent.md) | holds the variation an experiment subject was assigned to | | ||
|
||
<b>Returns:</b> | ||
|
||
void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IAssignmentLogger](./js-client-sdk.iassignmentlogger.md) | ||
|
||
## IAssignmentLogger interface | ||
|
||
Implement this interface log variation assignments to your data warehouse. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface IAssignmentLogger | ||
``` | ||
|
||
## Methods | ||
|
||
| Method | Description | | ||
| --- | --- | | ||
| [logAssignment(assignment)](./js-client-sdk.iassignmentlogger.logassignment.md) | Invoked when a subject is assigned to an experiment variation. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@eppo/js-client-sdk](./js-client-sdk.md) > [IClientConfig](./js-client-sdk.iclientconfig.md) > [assignmentLogger](./js-client-sdk.iclientconfig.assignmentlogger.md) | ||
|
||
## IClientConfig.assignmentLogger property | ||
|
||
Pass a logging implementation to send variation assignments to your data warehouse. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
assignmentLogger?: IAssignmentLogger; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Holds data about the variation a subject was assigned to. | ||
* @public | ||
*/ | ||
export interface IAssignmentEvent { | ||
/** | ||
* An Eppo experiment key | ||
*/ | ||
experiment: string; | ||
|
||
/** | ||
* The assigned variation | ||
*/ | ||
variation: string; | ||
|
||
/** | ||
* The entity or user that was assigned to a variation | ||
*/ | ||
subject: string; | ||
|
||
/** | ||
* The time the subject was exposed to the variation. | ||
*/ | ||
timestamp: string; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
subjectAttributes: Record<string, any>; | ||
} | ||
|
||
/** | ||
* Implement this interface log variation assignments to your data warehouse. | ||
* @public | ||
*/ | ||
export interface IAssignmentLogger { | ||
/** | ||
* Invoked when a subject is assigned to an experiment variation. | ||
* @param assignment holds the variation an experiment subject was assigned to | ||
* @public | ||
*/ | ||
logAssignment(assignment: IAssignmentEvent): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.