@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,22 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmignore
|
|
3
|
+
.openapi-generator-ignore
|
|
4
|
+
README.md
|
|
5
|
+
api.ts
|
|
6
|
+
base.ts
|
|
7
|
+
common.ts
|
|
8
|
+
configuration.ts
|
|
9
|
+
docs/Error.md
|
|
10
|
+
docs/ListSplitTests200Response.md
|
|
11
|
+
docs/SplitTest.md
|
|
12
|
+
docs/SplitTestResultBreakdown.md
|
|
13
|
+
docs/SplitTestResultEvent.md
|
|
14
|
+
docs/SplitTestResultVariation.md
|
|
15
|
+
docs/SplitTestResults.md
|
|
16
|
+
docs/SplitTestVariation.md
|
|
17
|
+
docs/SplitTestsApi.md
|
|
18
|
+
git_push.sh
|
|
19
|
+
index.ts
|
|
20
|
+
package.json
|
|
21
|
+
tsconfig.esm.json
|
|
22
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.23.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
## @teemill/split-tests@1.0.0
|
|
2
|
+
|
|
3
|
+
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
|
+
|
|
5
|
+
Environment
|
|
6
|
+
* Node.js
|
|
7
|
+
* Webpack
|
|
8
|
+
* Browserify
|
|
9
|
+
|
|
10
|
+
Language level
|
|
11
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
+
* ES6
|
|
13
|
+
|
|
14
|
+
Module system
|
|
15
|
+
* CommonJS
|
|
16
|
+
* ES6 module system
|
|
17
|
+
|
|
18
|
+
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
|
|
19
|
+
|
|
20
|
+
### Building
|
|
21
|
+
|
|
22
|
+
To build and compile the typescript sources to javascript use:
|
|
23
|
+
```
|
|
24
|
+
npm install
|
|
25
|
+
npm run build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Publishing
|
|
29
|
+
|
|
30
|
+
First build the package then run `npm publish`
|
|
31
|
+
|
|
32
|
+
### Consuming
|
|
33
|
+
|
|
34
|
+
navigate to the folder of your consuming project and run one of the following commands.
|
|
35
|
+
|
|
36
|
+
_published:_
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
npm install @teemill/split-tests@1.0.0 --save
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
_unPublished (not recommended):_
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Documentation for API Endpoints
|
|
49
|
+
|
|
50
|
+
All URIs are relative to *https://api.localhost:8080*
|
|
51
|
+
|
|
52
|
+
Class | Method | HTTP request | Description
|
|
53
|
+
------------ | ------------- | ------------- | -------------
|
|
54
|
+
*SplitTestsApi* | [**getSplitTestResults**](docs/SplitTestsApi.md#getsplittestresults) | **GET** /v1/split-tests/{splitTestId}/results | Get split test results
|
|
55
|
+
*SplitTestsApi* | [**listSplitTests**](docs/SplitTestsApi.md#listsplittests) | **GET** /v1/split-tests | List split tests
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Documentation For Models
|
|
59
|
+
|
|
60
|
+
- [ListSplitTests200Response](docs/ListSplitTests200Response.md)
|
|
61
|
+
- [ModelError](docs/ModelError.md)
|
|
62
|
+
- [SplitTest](docs/SplitTest.md)
|
|
63
|
+
- [SplitTestResultBreakdown](docs/SplitTestResultBreakdown.md)
|
|
64
|
+
- [SplitTestResultEvent](docs/SplitTestResultEvent.md)
|
|
65
|
+
- [SplitTestResultVariation](docs/SplitTestResultVariation.md)
|
|
66
|
+
- [SplitTestResults](docs/SplitTestResults.md)
|
|
67
|
+
- [SplitTestVariation](docs/SplitTestVariation.md)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
<a id="documentation-for-authorization"></a>
|
|
71
|
+
## Documentation For Authorization
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
Authentication schemes defined for the API:
|
|
75
|
+
<a id="api-key"></a>
|
|
76
|
+
### api-key
|
|
77
|
+
|
|
78
|
+
- **Type**: API key
|
|
79
|
+
- **API key parameter name**: Authorization
|
|
80
|
+
- **Location**: HTTP header
|
|
81
|
+
|
|
82
|
+
<a id="session-oauth"></a>
|
|
83
|
+
### session-oauth
|
|
84
|
+
|
|
85
|
+
- **Type**: OAuth
|
|
86
|
+
- **Flow**: password
|
|
87
|
+
- **Authorization URL**:
|
|
88
|
+
- **Scopes**: N/A
|
|
89
|
+
|
package/api.ts
ADDED
|
@@ -0,0 +1,469 @@
|
|
|
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
|
+
import type { Configuration } from './configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common';
|
|
22
|
+
import type { RequestArgs } from './base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
|
+
|
|
26
|
+
export interface ListSplitTests200Response {
|
|
27
|
+
'splitTests': Array<SplitTest>;
|
|
28
|
+
}
|
|
29
|
+
export interface ModelError {
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable error message.
|
|
32
|
+
*/
|
|
33
|
+
'message'?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Split test definition with variation metadata.
|
|
37
|
+
*/
|
|
38
|
+
export interface SplitTest {
|
|
39
|
+
/**
|
|
40
|
+
* Unique split test UUID.
|
|
41
|
+
*/
|
|
42
|
+
'id': string;
|
|
43
|
+
/**
|
|
44
|
+
* Human-readable split test name.
|
|
45
|
+
*/
|
|
46
|
+
'name': string;
|
|
47
|
+
/**
|
|
48
|
+
* Stable split test code used by tracking and assignment logic.
|
|
49
|
+
*/
|
|
50
|
+
'code': string;
|
|
51
|
+
/**
|
|
52
|
+
* Date the split test starts serving.
|
|
53
|
+
*/
|
|
54
|
+
'startDate': string;
|
|
55
|
+
/**
|
|
56
|
+
* Date the split test stops serving.
|
|
57
|
+
*/
|
|
58
|
+
'endDate': string;
|
|
59
|
+
/**
|
|
60
|
+
* Winning variation UUID when a winner has been chosen; otherwise `null`.
|
|
61
|
+
*/
|
|
62
|
+
'winnerId': string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Variations configured for this split test.
|
|
65
|
+
*/
|
|
66
|
+
'variations': Array<SplitTestVariation>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Aggregated variation metrics for a single breakdown group.
|
|
70
|
+
*/
|
|
71
|
+
export interface SplitTestResultBreakdown {
|
|
72
|
+
/**
|
|
73
|
+
* Breakdown group key (for example, `mobile`, `Chrome`, or a domain).
|
|
74
|
+
*/
|
|
75
|
+
'name': string;
|
|
76
|
+
/**
|
|
77
|
+
* Session count for this group.
|
|
78
|
+
*/
|
|
79
|
+
'sessions': number;
|
|
80
|
+
/**
|
|
81
|
+
* Total tracked order value for this group in minor currency units.
|
|
82
|
+
*/
|
|
83
|
+
'value': number;
|
|
84
|
+
/**
|
|
85
|
+
* Number of orders recorded for this group.
|
|
86
|
+
*/
|
|
87
|
+
'orderCount': number;
|
|
88
|
+
/**
|
|
89
|
+
* Average order value for this group.
|
|
90
|
+
*/
|
|
91
|
+
'averageOrderValue': number;
|
|
92
|
+
/**
|
|
93
|
+
* Average tracked value per session for this group.
|
|
94
|
+
*/
|
|
95
|
+
'valuePerSession': number;
|
|
96
|
+
/**
|
|
97
|
+
* Difference versus control variation for the selected metric.
|
|
98
|
+
*/
|
|
99
|
+
'controlDifference'?: number | null;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Event-level metrics for a variation.
|
|
103
|
+
*/
|
|
104
|
+
export interface SplitTestResultEvent {
|
|
105
|
+
/**
|
|
106
|
+
* Event name (for example, `purchase` or `add-to-cart`).
|
|
107
|
+
*/
|
|
108
|
+
'name': string;
|
|
109
|
+
/**
|
|
110
|
+
* Number of sessions that triggered this event.
|
|
111
|
+
*/
|
|
112
|
+
'events': number;
|
|
113
|
+
/**
|
|
114
|
+
* Percentage of sessions that triggered this event.
|
|
115
|
+
*/
|
|
116
|
+
'conversionRate': number;
|
|
117
|
+
/**
|
|
118
|
+
* Difference in conversion rate versus the control variation.
|
|
119
|
+
*/
|
|
120
|
+
'controlDifference'?: number | null;
|
|
121
|
+
/**
|
|
122
|
+
* Average value per conversion for this event when available.
|
|
123
|
+
*/
|
|
124
|
+
'valuePerConversion'?: number | null;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Aggregated metrics for a single split test variation.
|
|
128
|
+
*/
|
|
129
|
+
export interface SplitTestResultVariation {
|
|
130
|
+
/**
|
|
131
|
+
* Variation label.
|
|
132
|
+
*/
|
|
133
|
+
'name': string;
|
|
134
|
+
/**
|
|
135
|
+
* Number of sessions assigned to this variation.
|
|
136
|
+
*/
|
|
137
|
+
'sessions': number;
|
|
138
|
+
/**
|
|
139
|
+
* Total tracked order value in minor currency units.
|
|
140
|
+
*/
|
|
141
|
+
'value': number;
|
|
142
|
+
/**
|
|
143
|
+
* Average order value for conversion events.
|
|
144
|
+
*/
|
|
145
|
+
'averageOrderValue': number;
|
|
146
|
+
/**
|
|
147
|
+
* Average tracked value per session.
|
|
148
|
+
*/
|
|
149
|
+
'valuePerSession': number;
|
|
150
|
+
/**
|
|
151
|
+
* Event metrics for this variation.
|
|
152
|
+
*/
|
|
153
|
+
'events': Array<SplitTestResultEvent>;
|
|
154
|
+
/**
|
|
155
|
+
* Optional subgroup metrics when a breakdown dimension is requested.
|
|
156
|
+
*/
|
|
157
|
+
'breakdowns'?: Array<SplitTestResultBreakdown>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Aggregated performance summary for a split test.
|
|
161
|
+
*/
|
|
162
|
+
export interface SplitTestResults {
|
|
163
|
+
/**
|
|
164
|
+
* Split test name.
|
|
165
|
+
*/
|
|
166
|
+
'name': string;
|
|
167
|
+
/**
|
|
168
|
+
* Total session count across all returned variations.
|
|
169
|
+
*/
|
|
170
|
+
'sessions': number;
|
|
171
|
+
/**
|
|
172
|
+
* Distinct event names present in the result set.
|
|
173
|
+
*/
|
|
174
|
+
'events': Array<string>;
|
|
175
|
+
'controlVariation': SplitTestResultVariation;
|
|
176
|
+
/**
|
|
177
|
+
* Per-variation performance metrics.
|
|
178
|
+
*/
|
|
179
|
+
'variations': Array<SplitTestResultVariation>;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Basic variation metadata for a split test definition.
|
|
183
|
+
*/
|
|
184
|
+
export interface SplitTestVariation {
|
|
185
|
+
/**
|
|
186
|
+
* Unique variation UUID.
|
|
187
|
+
*/
|
|
188
|
+
'id': string;
|
|
189
|
+
/**
|
|
190
|
+
* Variation label.
|
|
191
|
+
*/
|
|
192
|
+
'name': string;
|
|
193
|
+
/**
|
|
194
|
+
* Whether this variation is the control baseline.
|
|
195
|
+
*/
|
|
196
|
+
'control': boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Whether this variation is currently active for assignment.
|
|
199
|
+
*/
|
|
200
|
+
'active': boolean;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* SplitTestsApi - axios parameter creator
|
|
205
|
+
*/
|
|
206
|
+
export const SplitTestsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
207
|
+
return {
|
|
208
|
+
/**
|
|
209
|
+
* Get aggregate split test results and optional breakdowns.
|
|
210
|
+
* @summary Get split test results
|
|
211
|
+
* @param {string} project Project identifier used to scope split test data for the current integration context.
|
|
212
|
+
* @param {string} splitTestId UUID of the split test to fetch detailed results for.
|
|
213
|
+
* @param {GetSplitTestResultsBreakdownEnum} [breakdown] Optional dimension used to group variation metrics in `breakdowns`.
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
getSplitTestResults: async (project: string, splitTestId: string, breakdown?: GetSplitTestResultsBreakdownEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
218
|
+
// verify required parameter 'project' is not null or undefined
|
|
219
|
+
assertParamExists('getSplitTestResults', 'project', project)
|
|
220
|
+
// verify required parameter 'splitTestId' is not null or undefined
|
|
221
|
+
assertParamExists('getSplitTestResults', 'splitTestId', splitTestId)
|
|
222
|
+
const localVarPath = `/v1/split-tests/{splitTestId}/results`
|
|
223
|
+
.replace('{splitTestId}', encodeURIComponent(String(splitTestId)));
|
|
224
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
225
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
226
|
+
let baseOptions;
|
|
227
|
+
if (configuration) {
|
|
228
|
+
baseOptions = configuration.baseOptions;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
232
|
+
const localVarHeaderParameter = {} as any;
|
|
233
|
+
const localVarQueryParameter = {} as any;
|
|
234
|
+
|
|
235
|
+
// authentication session-oauth required
|
|
236
|
+
// oauth required
|
|
237
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
238
|
+
|
|
239
|
+
// authentication api-key required
|
|
240
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
241
|
+
|
|
242
|
+
if (project !== undefined) {
|
|
243
|
+
localVarQueryParameter['project'] = project;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (breakdown !== undefined) {
|
|
247
|
+
localVarQueryParameter['breakdown'] = breakdown;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
251
|
+
|
|
252
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
253
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
254
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
255
|
+
|
|
256
|
+
return {
|
|
257
|
+
url: toPathString(localVarUrlObj),
|
|
258
|
+
options: localVarRequestOptions,
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
* List split tests for inspector tooling.
|
|
263
|
+
* @summary List split tests
|
|
264
|
+
* @param {string} project Project identifier used to scope split test data for the current integration context.
|
|
265
|
+
* @param {string} [search] Case-insensitive search term matched against split test name and code.
|
|
266
|
+
* @param {ListSplitTestsStateEnum} [state] Filter for which split tests to return (`active` for currently running tests, `all` for every test).
|
|
267
|
+
* @param {*} [options] Override http request option.
|
|
268
|
+
* @throws {RequiredError}
|
|
269
|
+
*/
|
|
270
|
+
listSplitTests: async (project: string, search?: string, state?: ListSplitTestsStateEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
271
|
+
// verify required parameter 'project' is not null or undefined
|
|
272
|
+
assertParamExists('listSplitTests', 'project', project)
|
|
273
|
+
const localVarPath = `/v1/split-tests`;
|
|
274
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
275
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
276
|
+
let baseOptions;
|
|
277
|
+
if (configuration) {
|
|
278
|
+
baseOptions = configuration.baseOptions;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
282
|
+
const localVarHeaderParameter = {} as any;
|
|
283
|
+
const localVarQueryParameter = {} as any;
|
|
284
|
+
|
|
285
|
+
// authentication session-oauth required
|
|
286
|
+
// oauth required
|
|
287
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
288
|
+
|
|
289
|
+
// authentication api-key required
|
|
290
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
291
|
+
|
|
292
|
+
if (project !== undefined) {
|
|
293
|
+
localVarQueryParameter['project'] = project;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (search !== undefined) {
|
|
297
|
+
localVarQueryParameter['search'] = search;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (state !== undefined) {
|
|
301
|
+
localVarQueryParameter['state'] = state;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
305
|
+
|
|
306
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
307
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
308
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
309
|
+
|
|
310
|
+
return {
|
|
311
|
+
url: toPathString(localVarUrlObj),
|
|
312
|
+
options: localVarRequestOptions,
|
|
313
|
+
};
|
|
314
|
+
},
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* SplitTestsApi - functional programming interface
|
|
320
|
+
*/
|
|
321
|
+
export const SplitTestsApiFp = function(configuration?: Configuration) {
|
|
322
|
+
const localVarAxiosParamCreator = SplitTestsApiAxiosParamCreator(configuration)
|
|
323
|
+
return {
|
|
324
|
+
/**
|
|
325
|
+
* Get aggregate split test results and optional breakdowns.
|
|
326
|
+
* @summary Get split test results
|
|
327
|
+
* @param {string} project Project identifier used to scope split test data for the current integration context.
|
|
328
|
+
* @param {string} splitTestId UUID of the split test to fetch detailed results for.
|
|
329
|
+
* @param {GetSplitTestResultsBreakdownEnum} [breakdown] Optional dimension used to group variation metrics in `breakdowns`.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
*/
|
|
333
|
+
async getSplitTestResults(project: string, splitTestId: string, breakdown?: GetSplitTestResultsBreakdownEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SplitTestResults>> {
|
|
334
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSplitTestResults(project, splitTestId, breakdown, options);
|
|
335
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
336
|
+
const localVarOperationServerBasePath = operationServerMap['SplitTestsApi.getSplitTestResults']?.[localVarOperationServerIndex]?.url;
|
|
337
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
338
|
+
},
|
|
339
|
+
/**
|
|
340
|
+
* List split tests for inspector tooling.
|
|
341
|
+
* @summary List split tests
|
|
342
|
+
* @param {string} project Project identifier used to scope split test data for the current integration context.
|
|
343
|
+
* @param {string} [search] Case-insensitive search term matched against split test name and code.
|
|
344
|
+
* @param {ListSplitTestsStateEnum} [state] Filter for which split tests to return (`active` for currently running tests, `all` for every test).
|
|
345
|
+
* @param {*} [options] Override http request option.
|
|
346
|
+
* @throws {RequiredError}
|
|
347
|
+
*/
|
|
348
|
+
async listSplitTests(project: string, search?: string, state?: ListSplitTestsStateEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSplitTests200Response>> {
|
|
349
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listSplitTests(project, search, state, options);
|
|
350
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
351
|
+
const localVarOperationServerBasePath = operationServerMap['SplitTestsApi.listSplitTests']?.[localVarOperationServerIndex]?.url;
|
|
352
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
353
|
+
},
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* SplitTestsApi - factory interface
|
|
359
|
+
*/
|
|
360
|
+
export const SplitTestsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
361
|
+
const localVarFp = SplitTestsApiFp(configuration)
|
|
362
|
+
return {
|
|
363
|
+
/**
|
|
364
|
+
* Get aggregate split test results and optional breakdowns.
|
|
365
|
+
* @summary Get split test results
|
|
366
|
+
* @param {SplitTestsApiGetSplitTestResultsRequest} requestParameters Request parameters.
|
|
367
|
+
* @param {*} [options] Override http request option.
|
|
368
|
+
* @throws {RequiredError}
|
|
369
|
+
*/
|
|
370
|
+
getSplitTestResults(requestParameters: SplitTestsApiGetSplitTestResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise<SplitTestResults> {
|
|
371
|
+
return localVarFp.getSplitTestResults(requestParameters.project, requestParameters.splitTestId, requestParameters.breakdown, options).then((request) => request(axios, basePath));
|
|
372
|
+
},
|
|
373
|
+
/**
|
|
374
|
+
* List split tests for inspector tooling.
|
|
375
|
+
* @summary List split tests
|
|
376
|
+
* @param {SplitTestsApiListSplitTestsRequest} requestParameters Request parameters.
|
|
377
|
+
* @param {*} [options] Override http request option.
|
|
378
|
+
* @throws {RequiredError}
|
|
379
|
+
*/
|
|
380
|
+
listSplitTests(requestParameters: SplitTestsApiListSplitTestsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListSplitTests200Response> {
|
|
381
|
+
return localVarFp.listSplitTests(requestParameters.project, requestParameters.search, requestParameters.state, options).then((request) => request(axios, basePath));
|
|
382
|
+
},
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Request parameters for getSplitTestResults operation in SplitTestsApi.
|
|
388
|
+
*/
|
|
389
|
+
export interface SplitTestsApiGetSplitTestResultsRequest {
|
|
390
|
+
/**
|
|
391
|
+
* Project identifier used to scope split test data for the current integration context.
|
|
392
|
+
*/
|
|
393
|
+
readonly project: string
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* UUID of the split test to fetch detailed results for.
|
|
397
|
+
*/
|
|
398
|
+
readonly splitTestId: string
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Optional dimension used to group variation metrics in `breakdowns`.
|
|
402
|
+
*/
|
|
403
|
+
readonly breakdown?: GetSplitTestResultsBreakdownEnum
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Request parameters for listSplitTests operation in SplitTestsApi.
|
|
408
|
+
*/
|
|
409
|
+
export interface SplitTestsApiListSplitTestsRequest {
|
|
410
|
+
/**
|
|
411
|
+
* Project identifier used to scope split test data for the current integration context.
|
|
412
|
+
*/
|
|
413
|
+
readonly project: string
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Case-insensitive search term matched against split test name and code.
|
|
417
|
+
*/
|
|
418
|
+
readonly search?: string
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Filter for which split tests to return (`active` for currently running tests, `all` for every test).
|
|
422
|
+
*/
|
|
423
|
+
readonly state?: ListSplitTestsStateEnum
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* SplitTestsApi - object-oriented interface
|
|
428
|
+
*/
|
|
429
|
+
export class SplitTestsApi extends BaseAPI {
|
|
430
|
+
/**
|
|
431
|
+
* Get aggregate split test results and optional breakdowns.
|
|
432
|
+
* @summary Get split test results
|
|
433
|
+
* @param {SplitTestsApiGetSplitTestResultsRequest} requestParameters Request parameters.
|
|
434
|
+
* @param {*} [options] Override http request option.
|
|
435
|
+
* @throws {RequiredError}
|
|
436
|
+
*/
|
|
437
|
+
public getSplitTestResults(requestParameters: SplitTestsApiGetSplitTestResultsRequest, options?: RawAxiosRequestConfig) {
|
|
438
|
+
return SplitTestsApiFp(this.configuration).getSplitTestResults(requestParameters.project, requestParameters.splitTestId, requestParameters.breakdown, options).then((request) => request(this.axios, this.basePath));
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* List split tests for inspector tooling.
|
|
443
|
+
* @summary List split tests
|
|
444
|
+
* @param {SplitTestsApiListSplitTestsRequest} requestParameters Request parameters.
|
|
445
|
+
* @param {*} [options] Override http request option.
|
|
446
|
+
* @throws {RequiredError}
|
|
447
|
+
*/
|
|
448
|
+
public listSplitTests(requestParameters: SplitTestsApiListSplitTestsRequest, options?: RawAxiosRequestConfig) {
|
|
449
|
+
return SplitTestsApiFp(this.configuration).listSplitTests(requestParameters.project, requestParameters.search, requestParameters.state, options).then((request) => request(this.axios, this.basePath));
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export const GetSplitTestResultsBreakdownEnum = {
|
|
454
|
+
None: 'none',
|
|
455
|
+
Device: 'device',
|
|
456
|
+
Platform: 'platform',
|
|
457
|
+
Browser: 'browser',
|
|
458
|
+
Country: 'country',
|
|
459
|
+
Territory: 'territory',
|
|
460
|
+
Domain: 'domain',
|
|
461
|
+
} as const;
|
|
462
|
+
export type GetSplitTestResultsBreakdownEnum = typeof GetSplitTestResultsBreakdownEnum[keyof typeof GetSplitTestResultsBreakdownEnum];
|
|
463
|
+
export const ListSplitTestsStateEnum = {
|
|
464
|
+
Active: 'active',
|
|
465
|
+
All: 'all',
|
|
466
|
+
} as const;
|
|
467
|
+
export type ListSplitTestsStateEnum = typeof ListSplitTestsStateEnum[keyof typeof ListSplitTestsStateEnum];
|
|
468
|
+
|
|
469
|
+
|
package/base.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
import type { Configuration } from './configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
20
|
+
import globalAxios from 'axios';
|
|
21
|
+
|
|
22
|
+
export const BASE_PATH = "https://api.localhost:8080".replace(/\/+$/, "");
|
|
23
|
+
|
|
24
|
+
export const COLLECTION_FORMATS = {
|
|
25
|
+
csv: ",",
|
|
26
|
+
ssv: " ",
|
|
27
|
+
tsv: "\t",
|
|
28
|
+
pipes: "|",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface RequestArgs {
|
|
32
|
+
url: string;
|
|
33
|
+
options: RawAxiosRequestConfig;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class BaseAPI {
|
|
37
|
+
protected configuration: Configuration | undefined;
|
|
38
|
+
|
|
39
|
+
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
40
|
+
if (configuration) {
|
|
41
|
+
this.configuration = configuration;
|
|
42
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export class RequiredError extends Error {
|
|
48
|
+
constructor(public field: string, msg?: string) {
|
|
49
|
+
super(msg);
|
|
50
|
+
this.name = "RequiredError"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ServerMap {
|
|
55
|
+
[key: string]: {
|
|
56
|
+
url: string,
|
|
57
|
+
description: string,
|
|
58
|
+
}[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const operationServerMap: ServerMap = {
|
|
62
|
+
}
|