@teemill/split-tests 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +22 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +89 -0
- package/api.ts +469 -0
- package/base.ts +62 -0
- package/common.ts +161 -0
- package/configuration.ts +121 -0
- package/dist/api.d.ts +332 -0
- package/dist/api.js +242 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +46 -0
- package/dist/common.d.ts +70 -0
- package/dist/common.js +172 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +332 -0
- package/dist/esm/api.js +235 -0
- package/dist/esm/base.d.ts +42 -0
- package/dist/esm/base.js +41 -0
- package/dist/esm/common.d.ts +70 -0
- package/dist/esm/common.js +159 -0
- package/dist/esm/configuration.d.ts +98 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/docs/Error.md +20 -0
- package/docs/ListSplitTests200Response.md +20 -0
- package/docs/SplitTest.md +33 -0
- package/docs/SplitTestResultBreakdown.md +33 -0
- package/docs/SplitTestResultEvent.md +29 -0
- package/docs/SplitTestResultVariation.md +33 -0
- package/docs/SplitTestResults.md +29 -0
- package/docs/SplitTestVariation.md +27 -0
- package/docs/SplitTestsApi.md +130 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +33 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# SplitTestResults
|
|
2
|
+
|
|
3
|
+
Aggregated performance summary for a split test.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**name** | **string** | Split test name. | [default to undefined]
|
|
10
|
+
**sessions** | **number** | Total session count across all returned variations. | [default to undefined]
|
|
11
|
+
**events** | **Array<string>** | Distinct event names present in the result set. | [default to undefined]
|
|
12
|
+
**controlVariation** | [**SplitTestResultVariation**](SplitTestResultVariation.md) | | [default to undefined]
|
|
13
|
+
**variations** | [**Array<SplitTestResultVariation>**](SplitTestResultVariation.md) | Per-variation performance metrics. | [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { SplitTestResults } from '@teemill/split-tests';
|
|
19
|
+
|
|
20
|
+
const instance: SplitTestResults = {
|
|
21
|
+
name,
|
|
22
|
+
sessions,
|
|
23
|
+
events,
|
|
24
|
+
controlVariation,
|
|
25
|
+
variations,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# SplitTestVariation
|
|
2
|
+
|
|
3
|
+
Basic variation metadata for a split test definition.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | Unique variation UUID. | [default to undefined]
|
|
10
|
+
**name** | **string** | Variation label. | [default to undefined]
|
|
11
|
+
**control** | **boolean** | Whether this variation is the control baseline. | [default to undefined]
|
|
12
|
+
**active** | **boolean** | Whether this variation is currently active for assignment. | [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { SplitTestVariation } from '@teemill/split-tests';
|
|
18
|
+
|
|
19
|
+
const instance: SplitTestVariation = {
|
|
20
|
+
id,
|
|
21
|
+
name,
|
|
22
|
+
control,
|
|
23
|
+
active,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# SplitTestsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.localhost:8080*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**getSplitTestResults**](#getsplittestresults) | **GET** /v1/split-tests/{splitTestId}/results | Get split test results|
|
|
8
|
+
|[**listSplitTests**](#listsplittests) | **GET** /v1/split-tests | List split tests|
|
|
9
|
+
|
|
10
|
+
# **getSplitTestResults**
|
|
11
|
+
> SplitTestResults getSplitTestResults()
|
|
12
|
+
|
|
13
|
+
Get aggregate split test results and optional breakdowns.
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
SplitTestsApi,
|
|
20
|
+
Configuration
|
|
21
|
+
} from '@teemill/split-tests';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new SplitTestsApi(configuration);
|
|
25
|
+
|
|
26
|
+
let project: string; //Project identifier used to scope split test data for the current integration context. (default to undefined)
|
|
27
|
+
let splitTestId: string; //UUID of the split test to fetch detailed results for. (default to undefined)
|
|
28
|
+
let breakdown: 'none' | 'device' | 'platform' | 'browser' | 'country' | 'territory' | 'domain'; //Optional dimension used to group variation metrics in `breakdowns`. (optional) (default to undefined)
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.getSplitTestResults(
|
|
31
|
+
project,
|
|
32
|
+
splitTestId,
|
|
33
|
+
breakdown
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Parameters
|
|
38
|
+
|
|
39
|
+
|Name | Type | Description | Notes|
|
|
40
|
+
|------------- | ------------- | ------------- | -------------|
|
|
41
|
+
| **project** | [**string**] | Project identifier used to scope split test data for the current integration context. | defaults to undefined|
|
|
42
|
+
| **splitTestId** | [**string**] | UUID of the split test to fetch detailed results for. | defaults to undefined|
|
|
43
|
+
| **breakdown** | [**'none' | 'device' | 'platform' | 'browser' | 'country' | 'territory' | 'domain'**]**Array<'none' | 'device' | 'platform' | 'browser' | 'country' | 'territory' | 'domain'>** | Optional dimension used to group variation metrics in `breakdowns`. | (optional) defaults to undefined|
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Return type
|
|
47
|
+
|
|
48
|
+
**SplitTestResults**
|
|
49
|
+
|
|
50
|
+
### Authorization
|
|
51
|
+
|
|
52
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
53
|
+
|
|
54
|
+
### HTTP request headers
|
|
55
|
+
|
|
56
|
+
- **Content-Type**: Not defined
|
|
57
|
+
- **Accept**: application/json
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### HTTP response details
|
|
61
|
+
| Status code | Description | Response headers |
|
|
62
|
+
|-------------|-------------|------------------|
|
|
63
|
+
|**200** | Split test results | - |
|
|
64
|
+
|**401** | Not authorised to access this resource | - |
|
|
65
|
+
|**403** | Forbidden | - |
|
|
66
|
+
|**404** | Resource not found | - |
|
|
67
|
+
|**500** | Internal server error | - |
|
|
68
|
+
|
|
69
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
70
|
+
|
|
71
|
+
# **listSplitTests**
|
|
72
|
+
> ListSplitTests200Response listSplitTests()
|
|
73
|
+
|
|
74
|
+
List split tests for inspector tooling.
|
|
75
|
+
|
|
76
|
+
### Example
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
import {
|
|
80
|
+
SplitTestsApi,
|
|
81
|
+
Configuration
|
|
82
|
+
} from '@teemill/split-tests';
|
|
83
|
+
|
|
84
|
+
const configuration = new Configuration();
|
|
85
|
+
const apiInstance = new SplitTestsApi(configuration);
|
|
86
|
+
|
|
87
|
+
let project: string; //Project identifier used to scope split test data for the current integration context. (default to undefined)
|
|
88
|
+
let search: string; //Case-insensitive search term matched against split test name and code. (optional) (default to undefined)
|
|
89
|
+
let state: 'active' | 'all'; //Filter for which split tests to return (`active` for currently running tests, `all` for every test). (optional) (default to undefined)
|
|
90
|
+
|
|
91
|
+
const { status, data } = await apiInstance.listSplitTests(
|
|
92
|
+
project,
|
|
93
|
+
search,
|
|
94
|
+
state
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Parameters
|
|
99
|
+
|
|
100
|
+
|Name | Type | Description | Notes|
|
|
101
|
+
|------------- | ------------- | ------------- | -------------|
|
|
102
|
+
| **project** | [**string**] | Project identifier used to scope split test data for the current integration context. | defaults to undefined|
|
|
103
|
+
| **search** | [**string**] | Case-insensitive search term matched against split test name and code. | (optional) defaults to undefined|
|
|
104
|
+
| **state** | [**'active' | 'all'**]**Array<'active' | 'all'>** | Filter for which split tests to return (`active` for currently running tests, `all` for every test). | (optional) defaults to undefined|
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Return type
|
|
108
|
+
|
|
109
|
+
**ListSplitTests200Response**
|
|
110
|
+
|
|
111
|
+
### Authorization
|
|
112
|
+
|
|
113
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
114
|
+
|
|
115
|
+
### HTTP request headers
|
|
116
|
+
|
|
117
|
+
- **Content-Type**: Not defined
|
|
118
|
+
- **Accept**: application/json
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### HTTP response details
|
|
122
|
+
| Status code | Description | Response headers |
|
|
123
|
+
|-------------|-------------|------------------|
|
|
124
|
+
|**200** | Split test list | - |
|
|
125
|
+
|**401** | Not authorised to access this resource | - |
|
|
126
|
+
|**403** | Forbidden | - |
|
|
127
|
+
|**500** | Internal server error | - |
|
|
128
|
+
|
|
129
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
130
|
+
|
package/git_push.sh
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
+
#
|
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
+
|
|
6
|
+
git_user_id=$1
|
|
7
|
+
git_repo_id=$2
|
|
8
|
+
release_note=$3
|
|
9
|
+
git_host=$4
|
|
10
|
+
|
|
11
|
+
if [ "$git_host" = "" ]; then
|
|
12
|
+
git_host="github.com"
|
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
|
17
|
+
git_user_id="Teemill"
|
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
|
22
|
+
git_repo_id="public-api"
|
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ "$release_note" = "" ]; then
|
|
27
|
+
release_note="Minor update"
|
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Initialize the local directory as a Git repository
|
|
32
|
+
git init
|
|
33
|
+
|
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
|
35
|
+
git add .
|
|
36
|
+
|
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
+
git commit -m "$release_note"
|
|
39
|
+
|
|
40
|
+
# Sets the new remote
|
|
41
|
+
git_remote=$(git remote)
|
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
+
|
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
+
else
|
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
git pull origin master
|
|
54
|
+
|
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
package/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Split Tests
|
|
5
|
+
* Inspect split test definitions and performance results.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export * from "./api";
|
|
17
|
+
export * from "./configuration";
|
|
18
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teemill/split-tests",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "OpenAPI client for @teemill/split-tests",
|
|
5
|
+
"author": "OpenAPI-Generator Contributors",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/Teemill/public-api.git"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"axios",
|
|
12
|
+
"typescript",
|
|
13
|
+
"openapi-client",
|
|
14
|
+
"openapi-generator",
|
|
15
|
+
"@teemill/split-tests"
|
|
16
|
+
],
|
|
17
|
+
"license": "Unlicense",
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"typings": "./dist/index.d.ts",
|
|
20
|
+
"module": "./dist/esm/index.js",
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc && tsc -p tsconfig.esm.json",
|
|
24
|
+
"prepare": "npm run build"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"axios": "^1.16.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "12.11.5 - 12.20.42",
|
|
31
|
+
"typescript": "^4.0 || ^5.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"target": "ES6",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"noImplicitAny": true,
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"rootDir": ".",
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"typeRoots": [
|
|
11
|
+
"node_modules/@types"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"exclude": [
|
|
15
|
+
"dist",
|
|
16
|
+
"node_modules"
|
|
17
|
+
]
|
|
18
|
+
}
|