@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.
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /* tslint: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
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Configuration = void 0;
16
+ class Configuration {
17
+ constructor(param = {}) {
18
+ var _a;
19
+ this.apiKey = param.apiKey;
20
+ this.username = param.username;
21
+ this.password = param.password;
22
+ this.accessToken = param.accessToken;
23
+ this.awsv4 = param.awsv4;
24
+ this.basePath = param.basePath;
25
+ this.serverIndex = param.serverIndex;
26
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
27
+ this.formDataCtor = param.formDataCtor;
28
+ }
29
+ /**
30
+ * Check if the given MIME is a JSON MIME.
31
+ * JSON MIME examples:
32
+ * application/json
33
+ * application/json; charset=UTF8
34
+ * APPLICATION/JSON
35
+ * application/vnd.company+json
36
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
37
+ * @return True if the given MIME is JSON, false otherwise.
38
+ */
39
+ isJsonMime(mime) {
40
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
41
+ return mime !== null && jsonMime.test(mime);
42
+ }
43
+ }
44
+ exports.Configuration = Configuration;
@@ -0,0 +1,332 @@
1
+ /**
2
+ * Split Tests
3
+ * Inspect split test definitions and performance results.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import type { RequestArgs } from './base';
15
+ import { BaseAPI } from './base';
16
+ export interface ListSplitTests200Response {
17
+ 'splitTests': Array<SplitTest>;
18
+ }
19
+ export interface ModelError {
20
+ /**
21
+ * Human-readable error message.
22
+ */
23
+ 'message'?: string;
24
+ }
25
+ /**
26
+ * Split test definition with variation metadata.
27
+ */
28
+ export interface SplitTest {
29
+ /**
30
+ * Unique split test UUID.
31
+ */
32
+ 'id': string;
33
+ /**
34
+ * Human-readable split test name.
35
+ */
36
+ 'name': string;
37
+ /**
38
+ * Stable split test code used by tracking and assignment logic.
39
+ */
40
+ 'code': string;
41
+ /**
42
+ * Date the split test starts serving.
43
+ */
44
+ 'startDate': string;
45
+ /**
46
+ * Date the split test stops serving.
47
+ */
48
+ 'endDate': string;
49
+ /**
50
+ * Winning variation UUID when a winner has been chosen; otherwise `null`.
51
+ */
52
+ 'winnerId': string | null;
53
+ /**
54
+ * Variations configured for this split test.
55
+ */
56
+ 'variations': Array<SplitTestVariation>;
57
+ }
58
+ /**
59
+ * Aggregated variation metrics for a single breakdown group.
60
+ */
61
+ export interface SplitTestResultBreakdown {
62
+ /**
63
+ * Breakdown group key (for example, `mobile`, `Chrome`, or a domain).
64
+ */
65
+ 'name': string;
66
+ /**
67
+ * Session count for this group.
68
+ */
69
+ 'sessions': number;
70
+ /**
71
+ * Total tracked order value for this group in minor currency units.
72
+ */
73
+ 'value': number;
74
+ /**
75
+ * Number of orders recorded for this group.
76
+ */
77
+ 'orderCount': number;
78
+ /**
79
+ * Average order value for this group.
80
+ */
81
+ 'averageOrderValue': number;
82
+ /**
83
+ * Average tracked value per session for this group.
84
+ */
85
+ 'valuePerSession': number;
86
+ /**
87
+ * Difference versus control variation for the selected metric.
88
+ */
89
+ 'controlDifference'?: number | null;
90
+ }
91
+ /**
92
+ * Event-level metrics for a variation.
93
+ */
94
+ export interface SplitTestResultEvent {
95
+ /**
96
+ * Event name (for example, `purchase` or `add-to-cart`).
97
+ */
98
+ 'name': string;
99
+ /**
100
+ * Number of sessions that triggered this event.
101
+ */
102
+ 'events': number;
103
+ /**
104
+ * Percentage of sessions that triggered this event.
105
+ */
106
+ 'conversionRate': number;
107
+ /**
108
+ * Difference in conversion rate versus the control variation.
109
+ */
110
+ 'controlDifference'?: number | null;
111
+ /**
112
+ * Average value per conversion for this event when available.
113
+ */
114
+ 'valuePerConversion'?: number | null;
115
+ }
116
+ /**
117
+ * Aggregated metrics for a single split test variation.
118
+ */
119
+ export interface SplitTestResultVariation {
120
+ /**
121
+ * Variation label.
122
+ */
123
+ 'name': string;
124
+ /**
125
+ * Number of sessions assigned to this variation.
126
+ */
127
+ 'sessions': number;
128
+ /**
129
+ * Total tracked order value in minor currency units.
130
+ */
131
+ 'value': number;
132
+ /**
133
+ * Average order value for conversion events.
134
+ */
135
+ 'averageOrderValue': number;
136
+ /**
137
+ * Average tracked value per session.
138
+ */
139
+ 'valuePerSession': number;
140
+ /**
141
+ * Event metrics for this variation.
142
+ */
143
+ 'events': Array<SplitTestResultEvent>;
144
+ /**
145
+ * Optional subgroup metrics when a breakdown dimension is requested.
146
+ */
147
+ 'breakdowns'?: Array<SplitTestResultBreakdown>;
148
+ }
149
+ /**
150
+ * Aggregated performance summary for a split test.
151
+ */
152
+ export interface SplitTestResults {
153
+ /**
154
+ * Split test name.
155
+ */
156
+ 'name': string;
157
+ /**
158
+ * Total session count across all returned variations.
159
+ */
160
+ 'sessions': number;
161
+ /**
162
+ * Distinct event names present in the result set.
163
+ */
164
+ 'events': Array<string>;
165
+ 'controlVariation': SplitTestResultVariation;
166
+ /**
167
+ * Per-variation performance metrics.
168
+ */
169
+ 'variations': Array<SplitTestResultVariation>;
170
+ }
171
+ /**
172
+ * Basic variation metadata for a split test definition.
173
+ */
174
+ export interface SplitTestVariation {
175
+ /**
176
+ * Unique variation UUID.
177
+ */
178
+ 'id': string;
179
+ /**
180
+ * Variation label.
181
+ */
182
+ 'name': string;
183
+ /**
184
+ * Whether this variation is the control baseline.
185
+ */
186
+ 'control': boolean;
187
+ /**
188
+ * Whether this variation is currently active for assignment.
189
+ */
190
+ 'active': boolean;
191
+ }
192
+ /**
193
+ * SplitTestsApi - axios parameter creator
194
+ */
195
+ export declare const SplitTestsApiAxiosParamCreator: (configuration?: Configuration) => {
196
+ /**
197
+ * Get aggregate split test results and optional breakdowns.
198
+ * @summary Get split test results
199
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
200
+ * @param {string} splitTestId UUID of the split test to fetch detailed results for.
201
+ * @param {GetSplitTestResultsBreakdownEnum} [breakdown] Optional dimension used to group variation metrics in &#x60;breakdowns&#x60;.
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ getSplitTestResults: (project: string, splitTestId: string, breakdown?: GetSplitTestResultsBreakdownEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
206
+ /**
207
+ * List split tests for inspector tooling.
208
+ * @summary List split tests
209
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
210
+ * @param {string} [search] Case-insensitive search term matched against split test name and code.
211
+ * @param {ListSplitTestsStateEnum} [state] Filter for which split tests to return (&#x60;active&#x60; for currently running tests, &#x60;all&#x60; for every test).
212
+ * @param {*} [options] Override http request option.
213
+ * @throws {RequiredError}
214
+ */
215
+ listSplitTests: (project: string, search?: string, state?: ListSplitTestsStateEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
216
+ };
217
+ /**
218
+ * SplitTestsApi - functional programming interface
219
+ */
220
+ export declare const SplitTestsApiFp: (configuration?: Configuration) => {
221
+ /**
222
+ * Get aggregate split test results and optional breakdowns.
223
+ * @summary Get split test results
224
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
225
+ * @param {string} splitTestId UUID of the split test to fetch detailed results for.
226
+ * @param {GetSplitTestResultsBreakdownEnum} [breakdown] Optional dimension used to group variation metrics in &#x60;breakdowns&#x60;.
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ getSplitTestResults(project: string, splitTestId: string, breakdown?: GetSplitTestResultsBreakdownEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SplitTestResults>>;
231
+ /**
232
+ * List split tests for inspector tooling.
233
+ * @summary List split tests
234
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
235
+ * @param {string} [search] Case-insensitive search term matched against split test name and code.
236
+ * @param {ListSplitTestsStateEnum} [state] Filter for which split tests to return (&#x60;active&#x60; for currently running tests, &#x60;all&#x60; for every test).
237
+ * @param {*} [options] Override http request option.
238
+ * @throws {RequiredError}
239
+ */
240
+ listSplitTests(project: string, search?: string, state?: ListSplitTestsStateEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSplitTests200Response>>;
241
+ };
242
+ /**
243
+ * SplitTestsApi - factory interface
244
+ */
245
+ export declare const SplitTestsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
246
+ /**
247
+ * Get aggregate split test results and optional breakdowns.
248
+ * @summary Get split test results
249
+ * @param {SplitTestsApiGetSplitTestResultsRequest} requestParameters Request parameters.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ getSplitTestResults(requestParameters: SplitTestsApiGetSplitTestResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise<SplitTestResults>;
254
+ /**
255
+ * List split tests for inspector tooling.
256
+ * @summary List split tests
257
+ * @param {SplitTestsApiListSplitTestsRequest} requestParameters Request parameters.
258
+ * @param {*} [options] Override http request option.
259
+ * @throws {RequiredError}
260
+ */
261
+ listSplitTests(requestParameters: SplitTestsApiListSplitTestsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListSplitTests200Response>;
262
+ };
263
+ /**
264
+ * Request parameters for getSplitTestResults operation in SplitTestsApi.
265
+ */
266
+ export interface SplitTestsApiGetSplitTestResultsRequest {
267
+ /**
268
+ * Project identifier used to scope split test data for the current integration context.
269
+ */
270
+ readonly project: string;
271
+ /**
272
+ * UUID of the split test to fetch detailed results for.
273
+ */
274
+ readonly splitTestId: string;
275
+ /**
276
+ * Optional dimension used to group variation metrics in &#x60;breakdowns&#x60;.
277
+ */
278
+ readonly breakdown?: GetSplitTestResultsBreakdownEnum;
279
+ }
280
+ /**
281
+ * Request parameters for listSplitTests operation in SplitTestsApi.
282
+ */
283
+ export interface SplitTestsApiListSplitTestsRequest {
284
+ /**
285
+ * Project identifier used to scope split test data for the current integration context.
286
+ */
287
+ readonly project: string;
288
+ /**
289
+ * Case-insensitive search term matched against split test name and code.
290
+ */
291
+ readonly search?: string;
292
+ /**
293
+ * Filter for which split tests to return (&#x60;active&#x60; for currently running tests, &#x60;all&#x60; for every test).
294
+ */
295
+ readonly state?: ListSplitTestsStateEnum;
296
+ }
297
+ /**
298
+ * SplitTestsApi - object-oriented interface
299
+ */
300
+ export declare class SplitTestsApi extends BaseAPI {
301
+ /**
302
+ * Get aggregate split test results and optional breakdowns.
303
+ * @summary Get split test results
304
+ * @param {SplitTestsApiGetSplitTestResultsRequest} requestParameters Request parameters.
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ */
308
+ getSplitTestResults(requestParameters: SplitTestsApiGetSplitTestResultsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SplitTestResults, any, {}>>;
309
+ /**
310
+ * List split tests for inspector tooling.
311
+ * @summary List split tests
312
+ * @param {SplitTestsApiListSplitTestsRequest} requestParameters Request parameters.
313
+ * @param {*} [options] Override http request option.
314
+ * @throws {RequiredError}
315
+ */
316
+ listSplitTests(requestParameters: SplitTestsApiListSplitTestsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSplitTests200Response, any, {}>>;
317
+ }
318
+ export declare const GetSplitTestResultsBreakdownEnum: {
319
+ readonly None: "none";
320
+ readonly Device: "device";
321
+ readonly Platform: "platform";
322
+ readonly Browser: "browser";
323
+ readonly Country: "country";
324
+ readonly Territory: "territory";
325
+ readonly Domain: "domain";
326
+ };
327
+ export type GetSplitTestResultsBreakdownEnum = typeof GetSplitTestResultsBreakdownEnum[keyof typeof GetSplitTestResultsBreakdownEnum];
328
+ export declare const ListSplitTestsStateEnum: {
329
+ readonly Active: "active";
330
+ readonly All: "all";
331
+ };
332
+ export type ListSplitTestsStateEnum = typeof ListSplitTestsStateEnum[keyof typeof ListSplitTestsStateEnum];
@@ -0,0 +1,235 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, toPathString, createRequestFunction } from './common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
+ /**
30
+ * SplitTestsApi - axios parameter creator
31
+ */
32
+ export const SplitTestsApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * Get aggregate split test results and optional breakdowns.
36
+ * @summary Get split test results
37
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
38
+ * @param {string} splitTestId UUID of the split test to fetch detailed results for.
39
+ * @param {GetSplitTestResultsBreakdownEnum} [breakdown] Optional dimension used to group variation metrics in &#x60;breakdowns&#x60;.
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ getSplitTestResults: (project_1, splitTestId_1, breakdown_1, ...args_1) => __awaiter(this, [project_1, splitTestId_1, breakdown_1, ...args_1], void 0, function* (project, splitTestId, breakdown, options = {}) {
44
+ // verify required parameter 'project' is not null or undefined
45
+ assertParamExists('getSplitTestResults', 'project', project);
46
+ // verify required parameter 'splitTestId' is not null or undefined
47
+ assertParamExists('getSplitTestResults', 'splitTestId', splitTestId);
48
+ const localVarPath = `/v1/split-tests/{splitTestId}/results`
49
+ .replace('{splitTestId}', encodeURIComponent(String(splitTestId)));
50
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
51
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
52
+ let baseOptions;
53
+ if (configuration) {
54
+ baseOptions = configuration.baseOptions;
55
+ }
56
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
57
+ const localVarHeaderParameter = {};
58
+ const localVarQueryParameter = {};
59
+ // authentication session-oauth required
60
+ // oauth required
61
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
62
+ // authentication api-key required
63
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
64
+ if (project !== undefined) {
65
+ localVarQueryParameter['project'] = project;
66
+ }
67
+ if (breakdown !== undefined) {
68
+ localVarQueryParameter['breakdown'] = breakdown;
69
+ }
70
+ localVarHeaderParameter['Accept'] = 'application/json';
71
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
72
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
73
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
74
+ return {
75
+ url: toPathString(localVarUrlObj),
76
+ options: localVarRequestOptions,
77
+ };
78
+ }),
79
+ /**
80
+ * List split tests for inspector tooling.
81
+ * @summary List split tests
82
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
83
+ * @param {string} [search] Case-insensitive search term matched against split test name and code.
84
+ * @param {ListSplitTestsStateEnum} [state] Filter for which split tests to return (&#x60;active&#x60; for currently running tests, &#x60;all&#x60; for every test).
85
+ * @param {*} [options] Override http request option.
86
+ * @throws {RequiredError}
87
+ */
88
+ listSplitTests: (project_1, search_1, state_1, ...args_1) => __awaiter(this, [project_1, search_1, state_1, ...args_1], void 0, function* (project, search, state, options = {}) {
89
+ // verify required parameter 'project' is not null or undefined
90
+ assertParamExists('listSplitTests', 'project', project);
91
+ const localVarPath = `/v1/split-tests`;
92
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
93
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
94
+ let baseOptions;
95
+ if (configuration) {
96
+ baseOptions = configuration.baseOptions;
97
+ }
98
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
99
+ const localVarHeaderParameter = {};
100
+ const localVarQueryParameter = {};
101
+ // authentication session-oauth required
102
+ // oauth required
103
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
104
+ // authentication api-key required
105
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
106
+ if (project !== undefined) {
107
+ localVarQueryParameter['project'] = project;
108
+ }
109
+ if (search !== undefined) {
110
+ localVarQueryParameter['search'] = search;
111
+ }
112
+ if (state !== undefined) {
113
+ localVarQueryParameter['state'] = state;
114
+ }
115
+ localVarHeaderParameter['Accept'] = 'application/json';
116
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
117
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
118
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
119
+ return {
120
+ url: toPathString(localVarUrlObj),
121
+ options: localVarRequestOptions,
122
+ };
123
+ }),
124
+ };
125
+ };
126
+ /**
127
+ * SplitTestsApi - functional programming interface
128
+ */
129
+ export const SplitTestsApiFp = function (configuration) {
130
+ const localVarAxiosParamCreator = SplitTestsApiAxiosParamCreator(configuration);
131
+ return {
132
+ /**
133
+ * Get aggregate split test results and optional breakdowns.
134
+ * @summary Get split test results
135
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
136
+ * @param {string} splitTestId UUID of the split test to fetch detailed results for.
137
+ * @param {GetSplitTestResultsBreakdownEnum} [breakdown] Optional dimension used to group variation metrics in &#x60;breakdowns&#x60;.
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ getSplitTestResults(project, splitTestId, breakdown, options) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ var _a, _b, _c;
144
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSplitTestResults(project, splitTestId, breakdown, options);
145
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
146
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['SplitTestsApi.getSplitTestResults']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
147
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
148
+ });
149
+ },
150
+ /**
151
+ * List split tests for inspector tooling.
152
+ * @summary List split tests
153
+ * @param {string} project Project identifier used to scope split test data for the current integration context.
154
+ * @param {string} [search] Case-insensitive search term matched against split test name and code.
155
+ * @param {ListSplitTestsStateEnum} [state] Filter for which split tests to return (&#x60;active&#x60; for currently running tests, &#x60;all&#x60; for every test).
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ */
159
+ listSplitTests(project, search, state, options) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ var _a, _b, _c;
162
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listSplitTests(project, search, state, options);
163
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
164
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['SplitTestsApi.listSplitTests']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
165
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
166
+ });
167
+ },
168
+ };
169
+ };
170
+ /**
171
+ * SplitTestsApi - factory interface
172
+ */
173
+ export const SplitTestsApiFactory = function (configuration, basePath, axios) {
174
+ const localVarFp = SplitTestsApiFp(configuration);
175
+ return {
176
+ /**
177
+ * Get aggregate split test results and optional breakdowns.
178
+ * @summary Get split test results
179
+ * @param {SplitTestsApiGetSplitTestResultsRequest} requestParameters Request parameters.
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ getSplitTestResults(requestParameters, options) {
184
+ return localVarFp.getSplitTestResults(requestParameters.project, requestParameters.splitTestId, requestParameters.breakdown, options).then((request) => request(axios, basePath));
185
+ },
186
+ /**
187
+ * List split tests for inspector tooling.
188
+ * @summary List split tests
189
+ * @param {SplitTestsApiListSplitTestsRequest} requestParameters Request parameters.
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ listSplitTests(requestParameters, options) {
194
+ return localVarFp.listSplitTests(requestParameters.project, requestParameters.search, requestParameters.state, options).then((request) => request(axios, basePath));
195
+ },
196
+ };
197
+ };
198
+ /**
199
+ * SplitTestsApi - object-oriented interface
200
+ */
201
+ export class SplitTestsApi extends BaseAPI {
202
+ /**
203
+ * Get aggregate split test results and optional breakdowns.
204
+ * @summary Get split test results
205
+ * @param {SplitTestsApiGetSplitTestResultsRequest} requestParameters Request parameters.
206
+ * @param {*} [options] Override http request option.
207
+ * @throws {RequiredError}
208
+ */
209
+ getSplitTestResults(requestParameters, options) {
210
+ return SplitTestsApiFp(this.configuration).getSplitTestResults(requestParameters.project, requestParameters.splitTestId, requestParameters.breakdown, options).then((request) => request(this.axios, this.basePath));
211
+ }
212
+ /**
213
+ * List split tests for inspector tooling.
214
+ * @summary List split tests
215
+ * @param {SplitTestsApiListSplitTestsRequest} requestParameters Request parameters.
216
+ * @param {*} [options] Override http request option.
217
+ * @throws {RequiredError}
218
+ */
219
+ listSplitTests(requestParameters, options) {
220
+ return SplitTestsApiFp(this.configuration).listSplitTests(requestParameters.project, requestParameters.search, requestParameters.state, options).then((request) => request(this.axios, this.basePath));
221
+ }
222
+ }
223
+ export const GetSplitTestResultsBreakdownEnum = {
224
+ None: 'none',
225
+ Device: 'device',
226
+ Platform: 'platform',
227
+ Browser: 'browser',
228
+ Country: 'country',
229
+ Territory: 'territory',
230
+ Domain: 'domain',
231
+ };
232
+ export const ListSplitTestsStateEnum = {
233
+ Active: 'active',
234
+ All: 'all',
235
+ };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Split Tests
3
+ * Inspect split test definitions and performance results.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ export declare const COLLECTION_FORMATS: {
16
+ csv: string;
17
+ ssv: string;
18
+ tsv: string;
19
+ pipes: string;
20
+ };
21
+ export interface RequestArgs {
22
+ url: string;
23
+ options: RawAxiosRequestConfig;
24
+ }
25
+ export declare class BaseAPI {
26
+ protected basePath: string;
27
+ protected axios: AxiosInstance;
28
+ protected configuration: Configuration | undefined;
29
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
30
+ }
31
+ export declare class RequiredError extends Error {
32
+ field: string;
33
+ constructor(field: string, msg?: string);
34
+ }
35
+ interface ServerMap {
36
+ [key: string]: {
37
+ url: string;
38
+ description: string;
39
+ }[];
40
+ }
41
+ export declare const operationServerMap: ServerMap;
42
+ export {};