Skip to content

Commit 3c43383

Browse files
fix(specs): BREAKING CHANGE - make AB test pValue optional (generated)
algolia/api-clients-automation#7066 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Steven Evans <steven.evans@algolia.com>
1 parent d18631e commit 3c43383

14 files changed

Lines changed: 133 additions & 13 deletions

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"files": [
2828
{
2929
"path": "packages/algoliasearch/dist/algoliasearch.umd.js",
30-
"maxSize": "22KB"
30+
"maxSize": "22.25KB"
3131
},
3232
{
3333
"path": "packages/algoliasearch/dist/lite/builds/browser.umd.js",

‎packages/abtesting/model/aBTestConfiguration.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

3+
import type { AnalysisMethod } from './analysisMethod';
34
import type { ErrorCorrectionType } from './errorCorrectionType';
45
import type { MetricsFilter } from './metricsFilter';
56
import type { MinimumDetectableEffect } from './minimumDetectableEffect';
7+
import type { PrimaryMetric } from './primaryMetric';
68

79
/**
810
* A/B test configuration.
@@ -16,4 +18,8 @@ export type ABTestConfiguration = {
1618
filters?: Array<MetricsFilter> | undefined;
1719

1820
errorCorrection?: ErrorCorrectionType | undefined;
21+
22+
method?: AnalysisMethod | undefined;
23+
24+
primaryMetric?: PrimaryMetric | undefined;
1925
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
/**
4+
* A/B test statistical analysis method. When omitted, the test is treated as `frequentist`. The server doesn\'t write a default value back to the configuration.
5+
*/
6+
export type AnalysisMethod = 'bayesian' | 'frequentist';
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
import type { MetricEvidence } from './metricEvidence';
4+
5+
/**
6+
* 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.
7+
*/
8+
export type BayesianMetricResult = {
9+
/**
10+
* Probability that this variant is better than the control.
11+
*/
12+
probabilityToBeBetter?: number | undefined;
13+
14+
/**
15+
* Lower bound of the 95% credible interval for the relative effect (variant/control minus 1).
16+
*/
17+
relativeEffectCILow?: number | undefined;
18+
19+
/**
20+
* Upper bound of the 95% credible interval for the relative effect (variant/control minus 1).
21+
*/
22+
relativeEffectCIHigh?: number | undefined;
23+
24+
evidence?: MetricEvidence | undefined;
25+
};

‎packages/abtesting/model/clientMethodProps.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

3+
import type { AnalysisMethod } from '../model/analysisMethod';
34
import type { Direction } from '../model/direction';
45
import type { MetricName } from '../model/metricName';
56
import type { SaveSettingsRequest } from '../model/saveSettingsRequest';
@@ -100,6 +101,10 @@ export type GetABTestProps = {
100101
* Unique A/B test identifier.
101102
*/
102103
id: number;
104+
/**
105+
* 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.
106+
*/
107+
methods?: Array<AnalysisMethod> | undefined;
103108
};
104109

105110
/**
@@ -132,6 +137,10 @@ export type GetTimeseriesProps = {
132137
* List of metrics to retrieve. If not specified, all metrics are returned.
133138
*/
134139
metric?: Array<MetricName> | undefined;
140+
/**
141+
* 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.
142+
*/
143+
methods?: Array<AnalysisMethod> | undefined;
135144
};
136145

137146
/**
@@ -158,6 +167,10 @@ export type ListABTestsProps = {
158167
* 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.
159168
*/
160169
direction?: Direction | undefined;
170+
/**
171+
* 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.
172+
*/
173+
methods?: Array<AnalysisMethod> | undefined;
161174
};
162175

163176
/**
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
/**
4+
* 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.
5+
*/
6+
export type EvidenceStatus = 'enough' | 'not_enough' | 'collecting' | 'no_data' | 'unavailable';

‎packages/abtesting/model/index.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export * from './abTestsVariant';
88
export * from './abTestsVariantSearchParams';
99
export * from './addABTestsRequest';
1010
export * from './addABTestsVariant';
11+
export * from './analysisMethod';
12+
export * from './bayesianMetricResult';
1113
export * from './clientMethodProps';
1214
export * from './conflictResponse';
1315
export * from './createMetric';
@@ -21,16 +23,19 @@ export * from './errorCorrectionType';
2123
export * from './estimateABTestRequest';
2224
export * from './estimateABTestResponse';
2325
export * from './estimateConfiguration';
26+
export * from './evidenceStatus';
2427
export * from './featureSettings';
2528
export * from './filterEffects';
2629
export * from './listABTestsResponse';
2730
export * from './metricDate';
31+
export * from './metricEvidence';
2832
export * from './metricMetadata';
2933
export * from './metricName';
3034
export * from './metricResult';
3135
export * from './metricsFilter';
3236
export * from './minimumDetectableEffect';
3337
export * from './outliersFilter';
38+
export * from './primaryMetric';
3439
export * from './saveSettingsRequest';
3540
export * from './status';
3641
export * from './timeseries';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
import type { EvidenceStatus } from './evidenceStatus';
4+
5+
/**
6+
* 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.
7+
*/
8+
export type MetricEvidence = {
9+
status: EvidenceStatus;
10+
};

‎packages/abtesting/model/metricMetadata.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
export type MetricMetadata = {
77
/**
8-
* Only present in case the metric is \'revenue\'. 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).
8+
* 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).
99
*/
1010
winsorizedValue?: number | undefined;
1111

‎packages/abtesting/model/metricName.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type MetricName =
66
| 'user_count'
77
| 'tracked_user_count'
88
| 'no_result_count'
9+
| 'tracked_no_result_count'
910
| 'add_to_cart_count'
1011
| 'purchase_count'
1112
| 'clicked_search_count'
@@ -15,4 +16,6 @@ export type MetricName =
1516
| 'add_to_cart_rate'
1617
| 'purchase_rate'
1718
| 'average_click_position'
18-
| 'revenue';
19+
| 'revenue'
20+
| 'revenue_per_search'
21+
| 'average_order_value';

0 commit comments

Comments
 (0)