@algolia/abtesting 1.25.0 → 1.26.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/README.md +4 -4
- package/dist/browser.d.ts +292 -14
- package/dist/builds/browser.js +190 -7
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +5 -5
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +6 -6
- package/dist/builds/fetch.js +190 -7
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +190 -7
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +190 -7
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +190 -7
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +292 -14
- package/dist/node.d.cts +292 -14
- package/dist/node.d.ts +292 -14
- package/dist/src/abtestingV3Client.cjs +190 -7
- package/dist/src/abtestingV3Client.cjs.map +1 -1
- package/dist/src/abtestingV3Client.js +190 -7
- package/dist/src/abtestingV3Client.js.map +1 -1
- package/dist/worker.d.ts +292 -14
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -40,11 +40,11 @@ All of our clients comes with type definition, and are available for both browse
|
|
|
40
40
|
### With a package manager
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
yarn add @algolia/abtesting@1.
|
|
43
|
+
yarn add @algolia/abtesting@1.26.0
|
|
44
44
|
# or
|
|
45
|
-
npm install @algolia/abtesting@1.
|
|
45
|
+
npm install @algolia/abtesting@1.26.0
|
|
46
46
|
# or
|
|
47
|
-
pnpm add @algolia/abtesting@1.
|
|
47
|
+
pnpm add @algolia/abtesting@1.26.0
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### Without a package manager
|
|
@@ -52,7 +52,7 @@ pnpm add @algolia/abtesting@1.25.0
|
|
|
52
52
|
Add the following JavaScript snippet to the <head> of your website:
|
|
53
53
|
|
|
54
54
|
```html
|
|
55
|
-
<script src="https://cdn.jsdelivr.net/npm/@algolia/abtesting@1.
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/@algolia/abtesting@1.26.0/dist/builds/browser.umd.js"></script>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
2
|
import { CreateClientOptions, RequestOptions, AlgoliaHttpResponse, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* A/B test statistical analysis method. When omitted, new A/B tests use `bayesian`. They use `frequentist` instead only if no primary metric that supports Bayesian analysis is available. The selected method is saved in the A/B test configuration. Older A/B tests, created before methods were saved, may have no method in their configuration. These tests use `frequentist`.
|
|
6
|
+
*/
|
|
7
|
+
type AnalysisMethod = 'bayesian' | 'frequentist';
|
|
8
|
+
|
|
4
9
|
/**
|
|
5
10
|
* Multiple-testing correction method applied when evaluating metric significance.
|
|
6
11
|
*/
|
|
@@ -34,7 +39,7 @@ type MetricsFilter = {
|
|
|
34
39
|
type EffectMetric = 'addToCartRate' | 'clickThroughRate' | 'conversionRate' | 'purchaseRate' | 'noResultsRate';
|
|
35
40
|
|
|
36
41
|
/**
|
|
37
|
-
* Configuration for the smallest difference between test variants you want to detect.
|
|
42
|
+
* Configuration for the smallest difference between test variants you want to detect, used to estimate the required sample size.
|
|
38
43
|
*/
|
|
39
44
|
type MinimumDetectableEffect = {
|
|
40
45
|
/**
|
|
@@ -44,6 +49,11 @@ type MinimumDetectableEffect = {
|
|
|
44
49
|
metric: EffectMetric;
|
|
45
50
|
};
|
|
46
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Primary metric for Bayesian analysis. Required when `method` is `bayesian`. When `method` is omitted and the test defaults to `bayesian`, the default primary metric is `conversion_rate`, or the first metric in `metrics` that supports Bayesian analysis if `metrics` doesn\'t include conversion rate. If the request includes a non-empty `metrics` list, this metric must be in that list. Revenue per search requires access to revenue analytics.
|
|
54
|
+
*/
|
|
55
|
+
type PrimaryMetric = 'add_to_cart_rate' | 'click_through_rate' | 'conversion_rate' | 'purchase_rate' | 'revenue_per_search';
|
|
56
|
+
|
|
47
57
|
/**
|
|
48
58
|
* A/B test configuration.
|
|
49
59
|
*/
|
|
@@ -54,6 +64,8 @@ type ABTestConfiguration = {
|
|
|
54
64
|
*/
|
|
55
65
|
filters?: Array<MetricsFilter> | undefined;
|
|
56
66
|
errorCorrection?: ErrorCorrectionType | undefined;
|
|
67
|
+
method?: AnalysisMethod | undefined;
|
|
68
|
+
primaryMetric?: PrimaryMetric | undefined;
|
|
57
69
|
};
|
|
58
70
|
|
|
59
71
|
/**
|
|
@@ -75,12 +87,43 @@ type Decision = {
|
|
|
75
87
|
*/
|
|
76
88
|
type Status = 'active' | 'stopped' | 'expired' | 'failed';
|
|
77
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Whether this variant metric\'s result is trustworthy yet. This doesn\'t mean the A/B test has ended, and it doesn\'t declare a winning variant. - `enough`. Enough evidence has accumulated to trust this metric\'s result for this variant. - `not_enough`. Evidence was computed but hasn\'t reached the threshold yet. - `collecting`. Evidence is still accumulating, so it\'s too early to report a verdict. - `no_data`. No usable data for this variant metric, and none is expected for it. - `unavailable`. Evidence can\'t be computed for this variant metric\'s comparison.
|
|
92
|
+
*/
|
|
93
|
+
type EvidenceStatus = 'enough' | 'not_enough' | 'collecting' | 'no_data' | 'unavailable';
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Evidence status for this variant metric\'s comparison with the control. Only present when the API has an evidence status for the comparison. Omitted when evidence isn\'t applicable or no status exists.
|
|
97
|
+
*/
|
|
98
|
+
type MetricEvidence = {
|
|
99
|
+
status: EvidenceStatus;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Bayesian inference results for this variant metric. Omitted when Bayesian results aren\'t requested or no Bayesian result is available for this metric. Individual inference fields can be omitted when their values aren\'t available.
|
|
104
|
+
*/
|
|
105
|
+
type BayesianMetricResult = {
|
|
106
|
+
/**
|
|
107
|
+
* Probability that this variant is better than the control.
|
|
108
|
+
*/
|
|
109
|
+
probabilityToBeBetter?: number | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Lower bound of the 95% credible interval for the relative effect (variant/control minus 1).
|
|
112
|
+
*/
|
|
113
|
+
relativeEffectCILow?: number | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Upper bound of the 95% credible interval for the relative effect (variant/control minus 1).
|
|
116
|
+
*/
|
|
117
|
+
relativeEffectCIHigh?: number | undefined;
|
|
118
|
+
evidence?: MetricEvidence | undefined;
|
|
119
|
+
};
|
|
120
|
+
|
|
78
121
|
/**
|
|
79
122
|
* Metric specific metadata.
|
|
80
123
|
*/
|
|
81
124
|
type MetricMetadata = {
|
|
82
125
|
/**
|
|
83
|
-
* Only present
|
|
126
|
+
* Only present for `revenue` metrics. It is the amount exceeding the 95th percentile of global revenue transactions involved in the AB Test. This amount is not considered when calculating statistical significance. It is tied to a per revenue-currency pair contrary to other global filter effects (such as outliers and empty search count).
|
|
84
127
|
*/
|
|
85
128
|
winsorizedValue?: number | undefined;
|
|
86
129
|
/**
|
|
@@ -90,11 +133,17 @@ type MetricMetadata = {
|
|
|
90
133
|
};
|
|
91
134
|
|
|
92
135
|
type MetricResult = {
|
|
136
|
+
/**
|
|
137
|
+
* Metric name. Revenue per search results use `revenue_per_search`.
|
|
138
|
+
*/
|
|
93
139
|
name: string;
|
|
94
140
|
/**
|
|
95
141
|
* Date and time when the metric was last updated, in RFC 3339 format.
|
|
96
142
|
*/
|
|
97
143
|
updatedAt: string;
|
|
144
|
+
/**
|
|
145
|
+
* Metric value. For `revenue_per_search`, this is the winsorized mean revenue per search in the specified currency.
|
|
146
|
+
*/
|
|
98
147
|
value: number;
|
|
99
148
|
/**
|
|
100
149
|
* The upper bound of the 95% confidence interval for the metric value. The confidence interval is calculated using either the relative ratio or relative difference between the metric values for the control and the variant. Relative ratio is used for metrics that are ratios (e.g., click-through rate, conversion rate), while relative difference is used for continuous metrics (e.g., revenue).
|
|
@@ -105,11 +154,11 @@ type MetricResult = {
|
|
|
105
154
|
*/
|
|
106
155
|
valueCILow?: number | undefined;
|
|
107
156
|
/**
|
|
108
|
-
*
|
|
157
|
+
* P-value for this variant compared to the control. Omitted when no p-value is available for this metric.
|
|
109
158
|
*/
|
|
110
|
-
pValue
|
|
159
|
+
pValue?: number | undefined;
|
|
111
160
|
/**
|
|
112
|
-
* Dimension defined during test creation.
|
|
161
|
+
* Dimension defined during test creation. For revenue metrics, including `revenue_per_search`, this is the currency.
|
|
113
162
|
*/
|
|
114
163
|
dimension?: string | undefined;
|
|
115
164
|
metadata?: MetricMetadata | undefined;
|
|
@@ -121,6 +170,7 @@ type MetricResult = {
|
|
|
121
170
|
* Whether the pValue is significant or not based on the critical value and the error correction algorithm used.
|
|
122
171
|
*/
|
|
123
172
|
significant?: boolean | undefined;
|
|
173
|
+
bayesian?: BayesianMetricResult | undefined;
|
|
124
174
|
};
|
|
125
175
|
|
|
126
176
|
/**
|
|
@@ -219,6 +269,10 @@ type ABTest = {
|
|
|
219
269
|
* A/B test name.
|
|
220
270
|
*/
|
|
221
271
|
name: string;
|
|
272
|
+
/**
|
|
273
|
+
* Expected outcome of the A/B test.
|
|
274
|
+
*/
|
|
275
|
+
hypothesis: string;
|
|
222
276
|
status: Status;
|
|
223
277
|
/**
|
|
224
278
|
* A/B test variants. The first variant is your _control_ index, typically your production index. All of the additional variants are indexes with changed settings that you want to test against the control.
|
|
@@ -243,6 +297,72 @@ type ABTestResponse = {
|
|
|
243
297
|
taskID: number;
|
|
244
298
|
};
|
|
245
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Feature-specific settings captured for a variant.
|
|
302
|
+
*/
|
|
303
|
+
type FeatureSettings = {
|
|
304
|
+
/**
|
|
305
|
+
* Name of the feature the settings belong to.
|
|
306
|
+
*/
|
|
307
|
+
name: string;
|
|
308
|
+
/**
|
|
309
|
+
* Feature settings payload. The shape depends on the feature.
|
|
310
|
+
*/
|
|
311
|
+
settings: any | null;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Settings captured for one A/B test variant.
|
|
316
|
+
*/
|
|
317
|
+
type VariantSettings = {
|
|
318
|
+
/**
|
|
319
|
+
* One-based index of the variant within the A/B test. The control is variant 1.
|
|
320
|
+
*/
|
|
321
|
+
variantId: number;
|
|
322
|
+
/**
|
|
323
|
+
* Whether the variant\'s settings have been applied to the control index.
|
|
324
|
+
*/
|
|
325
|
+
applied: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Feature-specific settings captured for the variant.
|
|
328
|
+
*/
|
|
329
|
+
featuresSettings?: Array<FeatureSettings> | undefined;
|
|
330
|
+
/**
|
|
331
|
+
* Index settings captured for the variant.
|
|
332
|
+
*/
|
|
333
|
+
indexSettings?: Record<string, unknown> | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Date and time when the variant\'s settings were applied to the control index, in RFC 3339 format.
|
|
336
|
+
*/
|
|
337
|
+
applyTimestamp?: string | undefined;
|
|
338
|
+
/**
|
|
339
|
+
* Date and time when the applied settings were reverted on the control index, in RFC 3339 format.
|
|
340
|
+
*/
|
|
341
|
+
revertTimestamp?: string | undefined;
|
|
342
|
+
/**
|
|
343
|
+
* Date and time when the variant\'s settings were captured, in RFC 3339 format.
|
|
344
|
+
*/
|
|
345
|
+
declaredTimestamp?: string | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* Date and time when the captured settings expired, in RFC 3339 format.
|
|
348
|
+
*/
|
|
349
|
+
expiredTimestamp?: string | undefined;
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Captured settings of an A/B test.
|
|
354
|
+
*/
|
|
355
|
+
type ABTestSettingsResponse = {
|
|
356
|
+
/**
|
|
357
|
+
* Captured settings for each variant of the A/B test.
|
|
358
|
+
*/
|
|
359
|
+
abtestSettings: Array<VariantSettings>;
|
|
360
|
+
/**
|
|
361
|
+
* Whether another active A/B test is using the control index.
|
|
362
|
+
*/
|
|
363
|
+
controlIndexInUse: boolean;
|
|
364
|
+
};
|
|
365
|
+
|
|
246
366
|
type AbTestsVariant = {
|
|
247
367
|
/**
|
|
248
368
|
* Index name of the A/B test variant (case-sensitive).
|
|
@@ -288,6 +408,10 @@ type AddABTestsRequest = {
|
|
|
288
408
|
* A/B test name.
|
|
289
409
|
*/
|
|
290
410
|
name: string;
|
|
411
|
+
/**
|
|
412
|
+
* Expected outcome of the A/B test.
|
|
413
|
+
*/
|
|
414
|
+
hypothesis?: string | undefined;
|
|
291
415
|
/**
|
|
292
416
|
* A/B test variants.
|
|
293
417
|
*/
|
|
@@ -379,8 +503,31 @@ type Timeseries = {
|
|
|
379
503
|
*/
|
|
380
504
|
type Direction = 'asc' | 'desc';
|
|
381
505
|
|
|
382
|
-
type MetricName = 'search_count' | 'tracked_search_count' | 'user_count' | 'tracked_user_count' | 'no_result_count' | 'add_to_cart_count' | 'purchase_count' | 'clicked_search_count' | 'converted_search_count' | 'click_through_rate' | 'conversion_rate' | 'add_to_cart_rate' | 'purchase_rate' | 'average_click_position' | 'revenue';
|
|
506
|
+
type MetricName = 'search_count' | 'tracked_search_count' | 'user_count' | 'tracked_user_count' | 'no_result_count' | 'tracked_no_result_count' | 'add_to_cart_count' | 'purchase_count' | 'clicked_search_count' | 'converted_search_count' | 'click_through_rate' | 'conversion_rate' | 'add_to_cart_rate' | 'purchase_rate' | 'average_click_position' | 'revenue' | 'revenue_per_search' | 'average_order_value';
|
|
383
507
|
|
|
508
|
+
/**
|
|
509
|
+
* Options for capturing a variant\'s settings.
|
|
510
|
+
*/
|
|
511
|
+
type SaveSettingsRequest = {
|
|
512
|
+
/**
|
|
513
|
+
* Whether to also capture the variant\'s index settings and feature-specific settings. This must be true for A/B tests whose variants use different indices so that the captured variant settings can later be applied.
|
|
514
|
+
*/
|
|
515
|
+
saveFeaturesSettings?: boolean | undefined;
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Properties for the `applyVariantSettings` method.
|
|
520
|
+
*/
|
|
521
|
+
type ApplyVariantSettingsProps = {
|
|
522
|
+
/**
|
|
523
|
+
* Unique A/B test identifier.
|
|
524
|
+
*/
|
|
525
|
+
id: number;
|
|
526
|
+
/**
|
|
527
|
+
* One-based index of the A/B test variant. The control is variant 1.
|
|
528
|
+
*/
|
|
529
|
+
variantId: number;
|
|
530
|
+
};
|
|
384
531
|
/**
|
|
385
532
|
* Properties for the `customDelete` method.
|
|
386
533
|
*/
|
|
@@ -466,6 +613,19 @@ type GetABTestProps = {
|
|
|
466
613
|
* Unique A/B test identifier.
|
|
467
614
|
*/
|
|
468
615
|
id: number;
|
|
616
|
+
/**
|
|
617
|
+
* Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
618
|
+
*/
|
|
619
|
+
methods?: Array<AnalysisMethod> | undefined;
|
|
620
|
+
};
|
|
621
|
+
/**
|
|
622
|
+
* Properties for the `getABTestSettings` method.
|
|
623
|
+
*/
|
|
624
|
+
type GetABTestSettingsProps = {
|
|
625
|
+
/**
|
|
626
|
+
* Unique A/B test identifier.
|
|
627
|
+
*/
|
|
628
|
+
id: number;
|
|
469
629
|
};
|
|
470
630
|
/**
|
|
471
631
|
* Properties for the `getTimeseries` method.
|
|
@@ -487,6 +647,10 @@ type GetTimeseriesProps = {
|
|
|
487
647
|
* List of metrics to retrieve. If not specified, all metrics are returned.
|
|
488
648
|
*/
|
|
489
649
|
metric?: Array<MetricName> | undefined;
|
|
650
|
+
/**
|
|
651
|
+
* Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
652
|
+
*/
|
|
653
|
+
methods?: Array<AnalysisMethod> | undefined;
|
|
490
654
|
};
|
|
491
655
|
/**
|
|
492
656
|
* Properties for the `listABTests` method.
|
|
@@ -512,6 +676,24 @@ type ListABTestsProps = {
|
|
|
512
676
|
* Sort order for A/B tests by start date. Use \'asc\' for ascending or \'desc\' for descending. Active A/B tests are always listed first.
|
|
513
677
|
*/
|
|
514
678
|
direction?: Direction | undefined;
|
|
679
|
+
/**
|
|
680
|
+
* Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
681
|
+
*/
|
|
682
|
+
methods?: Array<AnalysisMethod> | undefined;
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Properties for the `saveVariantSettings` method.
|
|
686
|
+
*/
|
|
687
|
+
type SaveVariantSettingsProps = {
|
|
688
|
+
/**
|
|
689
|
+
* Unique A/B test identifier.
|
|
690
|
+
*/
|
|
691
|
+
id: number;
|
|
692
|
+
/**
|
|
693
|
+
* One-based index of the A/B test variant. The control is variant 1.
|
|
694
|
+
*/
|
|
695
|
+
variantId: number;
|
|
696
|
+
saveSettingsRequest: SaveSettingsRequest;
|
|
515
697
|
};
|
|
516
698
|
/**
|
|
517
699
|
* Properties for the `stopABTest` method.
|
|
@@ -523,7 +705,7 @@ type StopABTestProps = {
|
|
|
523
705
|
id: number;
|
|
524
706
|
};
|
|
525
707
|
|
|
526
|
-
declare const apiClientVersion = "1.
|
|
708
|
+
declare const apiClientVersion = "1.26.0";
|
|
527
709
|
declare const REGIONS: readonly ["de", "us"];
|
|
528
710
|
type Region = (typeof REGIONS)[number];
|
|
529
711
|
type RegionOptions = {
|
|
@@ -584,6 +766,33 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
584
766
|
* @see addABTests for the plain version.
|
|
585
767
|
*/
|
|
586
768
|
addABTestsWithHTTPInfo(addABTestsRequest: AddABTestsRequest, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTestResponse>>;
|
|
769
|
+
/**
|
|
770
|
+
* Applies the captured settings of the given variant to the control index. The settings must first be captured with the `saveVariantSettings` operation. To revert previously applied settings on the control index, use this operation with the control variant (variant 1). Settings can be applied up to 14 days after the A/B test ends, and reverted up to 15 days after. Later requests return `400`. Each set of captured settings can only be applied once, and settings that were reverted can\'t be applied again. Both cases return `400`. The control index must not be in use by an active A/B test. Otherwise, the request returns `422`.
|
|
771
|
+
*
|
|
772
|
+
* Required API Key ACLs:
|
|
773
|
+
* - analytics
|
|
774
|
+
* - editSettings
|
|
775
|
+
* @param applyVariantSettings - The applyVariantSettings object.
|
|
776
|
+
* @param applyVariantSettings.id - Unique A/B test identifier.
|
|
777
|
+
* @param applyVariantSettings.variantId - One-based index of the A/B test variant. The control is variant 1.
|
|
778
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
779
|
+
*/
|
|
780
|
+
applyVariantSettings({ id, variantId }: ApplyVariantSettingsProps, requestOptions?: RequestOptions): Promise<void>;
|
|
781
|
+
/**
|
|
782
|
+
* Applies the captured settings of the given variant to the control index. The settings must first be captured with the `saveVariantSettings` operation. To revert previously applied settings on the control index, use this operation with the control variant (variant 1). Settings can be applied up to 14 days after the A/B test ends, and reverted up to 15 days after. Later requests return `400`. Each set of captured settings can only be applied once, and settings that were reverted can\'t be applied again. Both cases return `400`. The control index must not be in use by an active A/B test. Otherwise, the request returns `422`.
|
|
783
|
+
*
|
|
784
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
785
|
+
*
|
|
786
|
+
* Required API Key ACLs:
|
|
787
|
+
* - analytics
|
|
788
|
+
* - editSettings
|
|
789
|
+
* @param applyVariantSettings - The applyVariantSettings object.
|
|
790
|
+
* @param applyVariantSettings.id - Unique A/B test identifier.
|
|
791
|
+
* @param applyVariantSettings.variantId - One-based index of the A/B test variant. The control is variant 1.
|
|
792
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
793
|
+
* @see applyVariantSettings for the plain version.
|
|
794
|
+
*/
|
|
795
|
+
applyVariantSettingsWithHTTPInfo({ id, variantId }: ApplyVariantSettingsProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<void>>;
|
|
587
796
|
/**
|
|
588
797
|
* This method lets you send requests to the Algolia REST API.
|
|
589
798
|
* @param customDelete - The customDelete object.
|
|
@@ -715,9 +924,10 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
715
924
|
* - analytics
|
|
716
925
|
* @param getABTest - The getABTest object.
|
|
717
926
|
* @param getABTest.id - Unique A/B test identifier.
|
|
927
|
+
* @param getABTest.methods - Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
718
928
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
719
929
|
*/
|
|
720
|
-
getABTest({ id }: GetABTestProps, requestOptions?: RequestOptions): Promise<ABTest>;
|
|
930
|
+
getABTest({ id, methods }: GetABTestProps, requestOptions?: RequestOptions): Promise<ABTest>;
|
|
721
931
|
/**
|
|
722
932
|
* Retrieves the details for an A/B test by its ID.
|
|
723
933
|
*
|
|
@@ -727,10 +937,34 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
727
937
|
* - analytics
|
|
728
938
|
* @param getABTest - The getABTest object.
|
|
729
939
|
* @param getABTest.id - Unique A/B test identifier.
|
|
940
|
+
* @param getABTest.methods - Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
730
941
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
731
942
|
* @see getABTest for the plain version.
|
|
732
943
|
*/
|
|
733
|
-
getABTestWithHTTPInfo({ id }: GetABTestProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTest>>;
|
|
944
|
+
getABTestWithHTTPInfo({ id, methods }: GetABTestProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTest>>;
|
|
945
|
+
/**
|
|
946
|
+
* Retrieves the settings captured for each variant of an A/B test, and whether another active A/B test is using the control index. Settings are captured by the `saveVariantSettings` operation. The response includes an entry for the control (variant 1) alongside the captured variant, so the control\'s original configuration can be restored later. Returns `404` if the A/B test doesn\'t exist or no settings have been captured for it.
|
|
947
|
+
*
|
|
948
|
+
* Required API Key ACLs:
|
|
949
|
+
* - analytics
|
|
950
|
+
* @param getABTestSettings - The getABTestSettings object.
|
|
951
|
+
* @param getABTestSettings.id - Unique A/B test identifier.
|
|
952
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
953
|
+
*/
|
|
954
|
+
getABTestSettings({ id }: GetABTestSettingsProps, requestOptions?: RequestOptions): Promise<ABTestSettingsResponse>;
|
|
955
|
+
/**
|
|
956
|
+
* Retrieves the settings captured for each variant of an A/B test, and whether another active A/B test is using the control index. Settings are captured by the `saveVariantSettings` operation. The response includes an entry for the control (variant 1) alongside the captured variant, so the control\'s original configuration can be restored later. Returns `404` if the A/B test doesn\'t exist or no settings have been captured for it.
|
|
957
|
+
*
|
|
958
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
959
|
+
*
|
|
960
|
+
* Required API Key ACLs:
|
|
961
|
+
* - analytics
|
|
962
|
+
* @param getABTestSettings - The getABTestSettings object.
|
|
963
|
+
* @param getABTestSettings.id - Unique A/B test identifier.
|
|
964
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
965
|
+
* @see getABTestSettings for the plain version.
|
|
966
|
+
*/
|
|
967
|
+
getABTestSettingsWithHTTPInfo({ id }: GetABTestSettingsProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTestSettingsResponse>>;
|
|
734
968
|
/**
|
|
735
969
|
* Retrieves timeseries for an A/B test by its ID.
|
|
736
970
|
*
|
|
@@ -741,9 +975,10 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
741
975
|
* @param getTimeseries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
742
976
|
* @param getTimeseries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
743
977
|
* @param getTimeseries.metric - List of metrics to retrieve. If not specified, all metrics are returned.
|
|
978
|
+
* @param getTimeseries.methods - Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
744
979
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
745
980
|
*/
|
|
746
|
-
getTimeseries({ id, startDate, endDate, metric }: GetTimeseriesProps, requestOptions?: RequestOptions): Promise<Timeseries>;
|
|
981
|
+
getTimeseries({ id, startDate, endDate, metric, methods }: GetTimeseriesProps, requestOptions?: RequestOptions): Promise<Timeseries>;
|
|
747
982
|
/**
|
|
748
983
|
* Retrieves timeseries for an A/B test by its ID.
|
|
749
984
|
*
|
|
@@ -756,10 +991,11 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
756
991
|
* @param getTimeseries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
757
992
|
* @param getTimeseries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
758
993
|
* @param getTimeseries.metric - List of metrics to retrieve. If not specified, all metrics are returned.
|
|
994
|
+
* @param getTimeseries.methods - Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
759
995
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
760
996
|
* @see getTimeseries for the plain version.
|
|
761
997
|
*/
|
|
762
|
-
getTimeseriesWithHTTPInfo({ id, startDate, endDate, metric }: GetTimeseriesProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Timeseries>>;
|
|
998
|
+
getTimeseriesWithHTTPInfo({ id, startDate, endDate, metric, methods }: GetTimeseriesProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Timeseries>>;
|
|
763
999
|
/**
|
|
764
1000
|
* Lists all A/B tests you configured for this application.
|
|
765
1001
|
*
|
|
@@ -771,9 +1007,10 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
771
1007
|
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
772
1008
|
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
773
1009
|
* @param listABTests.direction - Sort order for A/B tests by start date. Use \'asc\' for ascending or \'desc\' for descending. Active A/B tests are always listed first.
|
|
1010
|
+
* @param listABTests.methods - Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
774
1011
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
775
1012
|
*/
|
|
776
|
-
listABTests({ offset, limit, indexPrefix, indexSuffix, direction }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<ListABTestsResponse>;
|
|
1013
|
+
listABTests({ offset, limit, indexPrefix, indexSuffix, direction, methods }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<ListABTestsResponse>;
|
|
777
1014
|
/**
|
|
778
1015
|
* Lists all A/B tests you configured for this application.
|
|
779
1016
|
*
|
|
@@ -787,10 +1024,40 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
787
1024
|
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
788
1025
|
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
789
1026
|
* @param listABTests.direction - Sort order for A/B tests by start date. Use \'asc\' for ascending or \'desc\' for descending. Active A/B tests are always listed first.
|
|
1027
|
+
* @param listABTests.methods - Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn\'t change the test configuration or compute missing results. Duplicate values aren\'t allowed.
|
|
790
1028
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
791
1029
|
* @see listABTests for the plain version.
|
|
792
1030
|
*/
|
|
793
|
-
listABTestsWithHTTPInfo({ offset, limit, indexPrefix, indexSuffix, direction }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<AlgoliaHttpResponse<ListABTestsResponse>>;
|
|
1031
|
+
listABTestsWithHTTPInfo({ offset, limit, indexPrefix, indexSuffix, direction, methods }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<AlgoliaHttpResponse<ListABTestsResponse>>;
|
|
1032
|
+
/**
|
|
1033
|
+
* Captures the settings of the given variant and of the control, then stops the A/B test. The captured settings can later be applied to the control index with the `applyVariantSettings` operation, and read back with the `getABTestSettings` operation. The A/B test must have reached 80% of its planned duration. Earlier requests return `400`. Settings can only be captured once per A/B test. A second request returns `409`. `synonyms` and `enableRules` are not captured, so applying the captured settings never changes them on the control index.
|
|
1034
|
+
*
|
|
1035
|
+
* Required API Key ACLs:
|
|
1036
|
+
* - analytics
|
|
1037
|
+
* - editSettings
|
|
1038
|
+
* @param saveVariantSettings - The saveVariantSettings object.
|
|
1039
|
+
* @param saveVariantSettings.id - Unique A/B test identifier.
|
|
1040
|
+
* @param saveVariantSettings.variantId - One-based index of the A/B test variant. The control is variant 1.
|
|
1041
|
+
* @param saveVariantSettings.saveSettingsRequest - The saveSettingsRequest object.
|
|
1042
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1043
|
+
*/
|
|
1044
|
+
saveVariantSettings({ id, variantId, saveSettingsRequest }: SaveVariantSettingsProps, requestOptions?: RequestOptions): Promise<void>;
|
|
1045
|
+
/**
|
|
1046
|
+
* Captures the settings of the given variant and of the control, then stops the A/B test. The captured settings can later be applied to the control index with the `applyVariantSettings` operation, and read back with the `getABTestSettings` operation. The A/B test must have reached 80% of its planned duration. Earlier requests return `400`. Settings can only be captured once per A/B test. A second request returns `409`. `synonyms` and `enableRules` are not captured, so applying the captured settings never changes them on the control index.
|
|
1047
|
+
*
|
|
1048
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1049
|
+
*
|
|
1050
|
+
* Required API Key ACLs:
|
|
1051
|
+
* - analytics
|
|
1052
|
+
* - editSettings
|
|
1053
|
+
* @param saveVariantSettings - The saveVariantSettings object.
|
|
1054
|
+
* @param saveVariantSettings.id - Unique A/B test identifier.
|
|
1055
|
+
* @param saveVariantSettings.variantId - One-based index of the A/B test variant. The control is variant 1.
|
|
1056
|
+
* @param saveVariantSettings.saveSettingsRequest - The saveSettingsRequest object.
|
|
1057
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1058
|
+
* @see saveVariantSettings for the plain version.
|
|
1059
|
+
*/
|
|
1060
|
+
saveVariantSettingsWithHTTPInfo({ id, variantId, saveSettingsRequest }: SaveVariantSettingsProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<void>>;
|
|
794
1061
|
/**
|
|
795
1062
|
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
796
1063
|
*
|
|
@@ -816,6 +1083,17 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
816
1083
|
stopABTestWithHTTPInfo({ id }: StopABTestProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTestResponse>>;
|
|
817
1084
|
};
|
|
818
1085
|
|
|
1086
|
+
type ConflictResponse = {
|
|
1087
|
+
/**
|
|
1088
|
+
* Status code.
|
|
1089
|
+
*/
|
|
1090
|
+
status: number;
|
|
1091
|
+
/**
|
|
1092
|
+
* Response message.
|
|
1093
|
+
*/
|
|
1094
|
+
message: string;
|
|
1095
|
+
};
|
|
1096
|
+
|
|
819
1097
|
/**
|
|
820
1098
|
* Error.
|
|
821
1099
|
*/
|
|
@@ -826,4 +1104,4 @@ type ErrorBase = Record<string, any> & {
|
|
|
826
1104
|
declare function abtestingV3Client(appId: string, apiKey: string, region?: Region | undefined, options?: ClientOptions | undefined): AbtestingV3Client;
|
|
827
1105
|
type AbtestingV3Client = ReturnType<typeof createAbtestingV3Client>;
|
|
828
1106
|
|
|
829
|
-
export { type ABTest, type ABTestConfiguration, type ABTestResponse, type AbTestsVariant, type AbTestsVariantSearchParams, type AbtestingV3Client, type AddABTestsRequest, type AddABTestsVariant, type CreateMetric, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type CustomSearchParams, type Decision, type DeleteABTestProps, type Direction, type EffectMetric, type EmptySearchFilter, type ErrorBase, type ErrorCorrectionType, type EstimateABTestRequest, type EstimateABTestResponse, type EstimateConfiguration, type FilterEffects, type GetABTestProps, type GetTimeseriesProps, type ListABTestsProps, type ListABTestsResponse, type MetricDate, type MetricMetadata, type MetricName, type MetricResult, type MetricsFilter, type MinimumDetectableEffect, type OutliersFilter, type Region, type RegionOptions, type Status, type StopABTestProps, type Timeseries, type TimeseriesVariant, type Variant, type VariantMetadata, abtestingV3Client, apiClientVersion };
|
|
1107
|
+
export { type ABTest, type ABTestConfiguration, type ABTestResponse, type ABTestSettingsResponse, type AbTestsVariant, type AbTestsVariantSearchParams, type AbtestingV3Client, type AddABTestsRequest, type AddABTestsVariant, type AnalysisMethod, type ApplyVariantSettingsProps, type BayesianMetricResult, type ConflictResponse, type CreateMetric, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type CustomSearchParams, type Decision, type DeleteABTestProps, type Direction, type EffectMetric, type EmptySearchFilter, type ErrorBase, type ErrorCorrectionType, type EstimateABTestRequest, type EstimateABTestResponse, type EstimateConfiguration, type EvidenceStatus, type FeatureSettings, type FilterEffects, type GetABTestProps, type GetABTestSettingsProps, type GetTimeseriesProps, type ListABTestsProps, type ListABTestsResponse, type MetricDate, type MetricEvidence, type MetricMetadata, type MetricName, type MetricResult, type MetricsFilter, type MinimumDetectableEffect, type OutliersFilter, type PrimaryMetric, type Region, type RegionOptions, type SaveSettingsRequest, type SaveVariantSettingsProps, type Status, type StopABTestProps, type Timeseries, type TimeseriesVariant, type Variant, type VariantMetadata, type VariantSettings, abtestingV3Client, apiClientVersion };
|