@algolia/client-abtesting 5.0.0-alpha.11 → 5.0.0-alpha.111

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.
Files changed (60) hide show
  1. package/dist/builds/browser.d.ts +24 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +24 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/{client-abtesting.cjs.js → client-abtesting.cjs} +333 -318
  6. package/dist/client-abtesting.esm.browser.js +543 -554
  7. package/dist/client-abtesting.esm.node.js +333 -316
  8. package/dist/client-abtesting.umd.js +2 -2
  9. package/dist/model/aBTest.d.ts +51 -39
  10. package/dist/model/aBTest.d.ts.map +1 -1
  11. package/dist/model/aBTestResponse.d.ts +14 -14
  12. package/dist/model/aBTestResponse.d.ts.map +1 -1
  13. package/dist/model/abTestsVariant.d.ts +14 -14
  14. package/dist/model/abTestsVariant.d.ts.map +1 -1
  15. package/dist/model/abTestsVariantSearchParams.d.ts +3 -3
  16. package/dist/model/abTestsVariantSearchParams.d.ts.map +1 -1
  17. package/dist/model/addABTestsRequest.d.ts +15 -15
  18. package/dist/model/addABTestsRequest.d.ts.map +1 -1
  19. package/dist/model/addABTestsVariant.d.ts +3 -3
  20. package/dist/model/addABTestsVariant.d.ts.map +1 -1
  21. package/dist/model/clientMethodProps.d.ts +108 -100
  22. package/dist/model/clientMethodProps.d.ts.map +1 -1
  23. package/dist/model/currency.d.ts +19 -0
  24. package/dist/model/currency.d.ts.map +1 -0
  25. package/dist/model/customSearchParams.d.ts +6 -3
  26. package/dist/model/customSearchParams.d.ts.map +1 -1
  27. package/dist/model/errorBase.d.ts +6 -6
  28. package/dist/model/errorBase.d.ts.map +1 -1
  29. package/dist/model/filterEffects.d.ts +10 -0
  30. package/dist/model/filterEffects.d.ts.map +1 -0
  31. package/dist/model/filterEffectsEmptySearch.d.ts +14 -0
  32. package/dist/model/filterEffectsEmptySearch.d.ts.map +1 -0
  33. package/dist/model/filterEffectsOutliers.d.ts +14 -0
  34. package/dist/model/filterEffectsOutliers.d.ts.map +1 -0
  35. package/dist/model/index.d.ts +15 -11
  36. package/dist/model/index.d.ts.map +1 -1
  37. package/dist/model/listABTestsResponse.d.ts +15 -15
  38. package/dist/model/listABTestsResponse.d.ts.map +1 -1
  39. package/dist/model/variant.d.ts +81 -50
  40. package/dist/model/variant.d.ts.map +1 -1
  41. package/dist/src/abtestingClient.d.ts +128 -124
  42. package/dist/src/abtestingClient.d.ts.map +1 -1
  43. package/index.js +1 -1
  44. package/model/aBTest.ts +27 -12
  45. package/model/aBTestResponse.ts +4 -4
  46. package/model/abTestsVariant.ts +4 -4
  47. package/model/abTestsVariantSearchParams.ts +1 -1
  48. package/model/addABTestsRequest.ts +4 -4
  49. package/model/addABTestsVariant.ts +1 -1
  50. package/model/clientMethodProps.ts +54 -46
  51. package/model/currency.ts +23 -0
  52. package/model/customSearchParams.ts +4 -1
  53. package/model/errorBase.ts +1 -1
  54. package/model/filterEffects.ts +13 -0
  55. package/model/filterEffectsEmptySearch.ts +16 -0
  56. package/model/filterEffectsOutliers.ts +16 -0
  57. package/model/index.ts +5 -1
  58. package/model/listABTestsResponse.ts +5 -5
  59. package/model/variant.ts +60 -20
  60. package/package.json +10 -9
@@ -1,18 +1,18 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  export type AbTestsVariant = {
4
4
  /**
5
- * The index performing the A/B test.
5
+ * A/B test index.
6
6
  */
7
7
  index: string;
8
8
 
9
9
  /**
10
- * The traffic percentage for the A/B test.
10
+ * A/B test traffic percentage.
11
11
  */
12
12
  trafficPercentage: number;
13
13
 
14
14
  /**
15
- * The A/B test description.
15
+ * A/B test description.
16
16
  */
17
17
  description?: string;
18
18
  };
@@ -1,4 +1,4 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  import type { AbTestsVariant } from './abTestsVariant';
4
4
  import type { CustomSearchParams } from './customSearchParams';
@@ -1,4 +1,4 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  import type { AddABTestsVariant } from './addABTestsVariant';
4
4
 
@@ -9,12 +9,12 @@ export type AddABTestsRequest = {
9
9
  name: string;
10
10
 
11
11
  /**
12
- * List of 2 variants for the A/B test.
12
+ * A/B test variants.
13
13
  */
14
- variant: AddABTestsVariant[];
14
+ variants: AddABTestsVariant[];
15
15
 
16
16
  /**
17
- * End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
17
+ * End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
18
18
  */
19
19
  endAt: string;
20
20
  };
@@ -1,4 +1,4 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  import type { AbTestsVariant } from './abTestsVariant';
4
4
  import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
@@ -1,101 +1,109 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  /**
4
- * Properties for the `del` method.
4
+ * Properties for the `customDelete` method.
5
5
  */
6
- export type DelProps = {
6
+ export type CustomDeleteProps = {
7
7
  /**
8
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
8
+ * Path of the endpoint, anything after \"/1\" must be specified.
9
9
  */
10
10
  path: string;
11
11
  /**
12
- * Query parameters to be applied to the current query.
12
+ * Query parameters to apply to the current query.
13
13
  */
14
14
  parameters?: Record<string, any>;
15
15
  };
16
16
 
17
17
  /**
18
- * Properties for the `deleteABTest` method.
18
+ * Properties for the `customGet` method.
19
19
  */
20
- export type DeleteABTestProps = {
20
+ export type CustomGetProps = {
21
21
  /**
22
- * The A/B test ID.
22
+ * Path of the endpoint, anything after \"/1\" must be specified.
23
23
  */
24
- id: number;
24
+ path: string;
25
+ /**
26
+ * Query parameters to apply to the current query.
27
+ */
28
+ parameters?: Record<string, any>;
25
29
  };
26
30
 
27
31
  /**
28
- * Properties for the `get` method.
32
+ * Properties for the `customPost` method.
29
33
  */
30
- export type GetProps = {
34
+ export type CustomPostProps = {
31
35
  /**
32
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
36
+ * Path of the endpoint, anything after \"/1\" must be specified.
33
37
  */
34
38
  path: string;
35
39
  /**
36
- * Query parameters to be applied to the current query.
40
+ * Query parameters to apply to the current query.
37
41
  */
38
42
  parameters?: Record<string, any>;
39
- };
40
-
41
- /**
42
- * Properties for the `getABTest` method.
43
- */
44
- export type GetABTestProps = {
45
43
  /**
46
- * The A/B test ID.
44
+ * Parameters to send with the custom request.
47
45
  */
48
- id: number;
46
+ body?: Record<string, any>;
49
47
  };
50
48
 
51
49
  /**
52
- * Properties for the `listABTests` method.
50
+ * Properties for the `customPut` method.
53
51
  */
54
- export type ListABTestsProps = {
52
+ export type CustomPutProps = {
55
53
  /**
56
- * Position of the starting record. Used for paging. 0 is the first record.
54
+ * Path of the endpoint, anything after \"/1\" must be specified.
57
55
  */
58
- offset?: number;
56
+ path: string;
59
57
  /**
60
- * Number of records to return. Limit is the size of the page.
58
+ * Query parameters to apply to the current query.
61
59
  */
62
- limit?: number;
60
+ parameters?: Record<string, any>;
61
+ /**
62
+ * Parameters to send with the custom request.
63
+ */
64
+ body?: Record<string, any>;
63
65
  };
64
66
 
65
67
  /**
66
- * Properties for the `post` method.
68
+ * Properties for the `deleteABTest` method.
67
69
  */
68
- export type PostProps = {
69
- /**
70
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
71
- */
72
- path: string;
70
+ export type DeleteABTestProps = {
73
71
  /**
74
- * Query parameters to be applied to the current query.
72
+ * Unique A/B test ID.
75
73
  */
76
- parameters?: Record<string, any>;
74
+ id: number;
75
+ };
76
+
77
+ /**
78
+ * Properties for the `getABTest` method.
79
+ */
80
+ export type GetABTestProps = {
77
81
  /**
78
- * The parameters to send with the custom request.
82
+ * Unique A/B test ID.
79
83
  */
80
- body?: Record<string, any>;
84
+ id: number;
81
85
  };
82
86
 
83
87
  /**
84
- * Properties for the `put` method.
88
+ * Properties for the `listABTests` method.
85
89
  */
86
- export type PutProps = {
90
+ export type ListABTestsProps = {
87
91
  /**
88
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
92
+ * Position of the first item to return.
89
93
  */
90
- path: string;
94
+ offset?: number;
91
95
  /**
92
- * Query parameters to be applied to the current query.
96
+ * Number of items to return.
93
97
  */
94
- parameters?: Record<string, any>;
98
+ limit?: number;
95
99
  /**
96
- * The parameters to send with the custom request.
100
+ * Only return A/B tests for indices starting with this prefix.
97
101
  */
98
- body?: Record<string, any>;
102
+ indexPrefix?: string;
103
+ /**
104
+ * Only return A/B tests for indices ending with this suffix.
105
+ */
106
+ indexSuffix?: string;
99
107
  };
100
108
 
101
109
  /**
@@ -103,7 +111,7 @@ export type PutProps = {
103
111
  */
104
112
  export type StopABTestProps = {
105
113
  /**
106
- * The A/B test ID.
114
+ * Unique A/B test ID.
107
115
  */
108
116
  id: number;
109
117
  };
@@ -0,0 +1,23 @@
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
+ export type Currency = {
4
+ /**
5
+ * Currency code.
6
+ */
7
+ currency?: string;
8
+
9
+ /**
10
+ * Revenue for this currency.
11
+ */
12
+ revenue?: number;
13
+
14
+ /**
15
+ * Mean for this currency.
16
+ */
17
+ mean?: number;
18
+
19
+ /**
20
+ * Standard deviation for this currency.
21
+ */
22
+ standardDeviation?: number;
23
+ };
@@ -1,5 +1,8 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
+ /**
4
+ * Applies search parameters from [a restricted set of options](https://www.algolia.com/doc/api-reference/api-methods/add-ab-test/#method-param-customsearchparameters). Only use this parameter if the two variants use the same index.
5
+ */
3
6
  export type CustomSearchParams = {
4
7
  customSearchParameters: Record<string, any>;
5
8
  };
@@ -1,4 +1,4 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  /**
4
4
  * Error.
@@ -0,0 +1,13 @@
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 { FilterEffectsEmptySearch } from './filterEffectsEmptySearch';
4
+ import type { FilterEffectsOutliers } from './filterEffectsOutliers';
5
+
6
+ /**
7
+ * A/B test filter effects resulting from configuration settings.
8
+ */
9
+ export type FilterEffects = {
10
+ outliers?: FilterEffectsOutliers;
11
+
12
+ emptySearch?: FilterEffectsEmptySearch;
13
+ };
@@ -0,0 +1,16 @@
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
+ * Empty searches removed from the A/B test as a result of configuration settings.
5
+ */
6
+ export type FilterEffectsEmptySearch = {
7
+ /**
8
+ * Number of users removed from the A/B test.
9
+ */
10
+ usersCount?: number;
11
+
12
+ /**
13
+ * Number of tracked searches removed from the A/B test.
14
+ */
15
+ trackedSearchesCount?: number;
16
+ };
@@ -0,0 +1,16 @@
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
+ * Outliers removed from the A/B test as a result of configuration settings.
5
+ */
6
+ export type FilterEffectsOutliers = {
7
+ /**
8
+ * Number of users removed from the A/B test.
9
+ */
10
+ usersCount?: number;
11
+
12
+ /**
13
+ * Number of tracked searches removed from the A/B test.
14
+ */
15
+ trackedSearchesCount?: number;
16
+ };
package/model/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  export * from './aBTest';
4
4
  export * from './aBTestResponse';
@@ -6,8 +6,12 @@ export * from './abTestsVariant';
6
6
  export * from './abTestsVariantSearchParams';
7
7
  export * from './addABTestsRequest';
8
8
  export * from './addABTestsVariant';
9
+ export * from './currency';
9
10
  export * from './customSearchParams';
10
11
  export * from './errorBase';
12
+ export * from './filterEffects';
13
+ export * from './filterEffectsEmptySearch';
14
+ export * from './filterEffectsOutliers';
11
15
  export * from './listABTestsResponse';
12
16
  export * from './variant';
13
17
  export * from './clientMethodProps';
@@ -1,20 +1,20 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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
2
 
3
3
  import type { ABTest } from './aBTest';
4
4
 
5
5
  export type ListABTestsResponse = {
6
6
  /**
7
- * List of A/B tests.
7
+ * A/B tests.
8
8
  */
9
- abtests: ABTest[];
9
+ abtests: ABTest[] | null;
10
10
 
11
11
  /**
12
- * Number of A/B tests found for the app.
12
+ * Number of A/B tests implemented.
13
13
  */
14
14
  count: number;
15
15
 
16
16
  /**
17
- * Number of A/B tests retrievable.
17
+ * Number of retrievable A/B tests.
18
18
  */
19
19
  total: number;
20
20
  };
package/model/variant.ts CHANGED
@@ -1,63 +1,103 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
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 { Currency } from './currency';
4
+ import type { FilterEffects } from './filterEffects';
2
5
 
3
6
  export type Variant = {
4
7
  /**
5
- * Average click position for the variant.
8
+ * Number of add-to-cart events for this variant.
9
+ */
10
+ addToCartCount: number;
11
+
12
+ /**
13
+ * Variant\'s [add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate).
14
+ */
15
+ addToCartRate: number | null;
16
+
17
+ /**
18
+ * Variant\'s [average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position).
6
19
  */
7
- averageClickPosition: number;
20
+ averageClickPosition: number | null;
8
21
 
9
22
  /**
10
- * Distinct click count for the variant.
23
+ * Number of click events for this variant.
11
24
  */
12
25
  clickCount: number;
13
26
 
14
27
  /**
15
- * Click through rate for the variant.
28
+ * Variant\'s [click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
16
29
  */
17
- clickThroughRate: number;
30
+ clickThroughRate: number | null;
18
31
 
19
32
  /**
20
- * Distinct conversion count for the variant.
33
+ * Number of click events for this variant.
21
34
  */
22
35
  conversionCount: number;
23
36
 
24
37
  /**
25
- * Conversion rate for the variant.
38
+ * Variant\'s [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
39
+ */
40
+ conversionRate: number | null;
41
+
42
+ /**
43
+ * A/B test currencies.
26
44
  */
27
- conversionRate: number;
45
+ currencies?: Record<string, Currency>;
28
46
 
29
47
  /**
30
- * The A/B test description.
48
+ * A/B test description.
31
49
  */
32
50
  description: string;
33
51
 
34
52
  /**
35
- * The index performing the A/B test.
53
+ * The estimated number of searches that will need to be run to achieve the desired confidence level and statistical power. A `minimumDetectableEffect` must be set in the `configuration` object for this to be used.
54
+ */
55
+ estimatedSampleSize?: number;
56
+
57
+ filterEffects?: FilterEffects;
58
+
59
+ /**
60
+ * A/B test index.
36
61
  */
37
62
  index: string;
38
63
 
39
64
  /**
40
- * The number of occurrences.
65
+ * Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for that variant.
66
+ */
67
+ noResultCount: number | null;
68
+
69
+ /**
70
+ * Number of purchase events for this variant.
41
71
  */
42
- noResultCount: number;
72
+ purchaseCount: number;
43
73
 
44
74
  /**
45
- * The number of search during the A/B test.
75
+ * Variant\'s [purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate).
46
76
  */
47
- searchCount: number;
77
+ purchaseRate: number | null;
48
78
 
49
79
  /**
50
- * The number of tracked search click.
80
+ * Number of searches carried out during the A/B test.
51
81
  */
52
- trackedSearchCount: number;
82
+ searchCount: number | null;
53
83
 
54
84
  /**
55
- * The traffic percentage for the A/B test.
85
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
86
+ */
87
+ trackedSearchCount?: number;
88
+
89
+ /**
90
+ * A/B test traffic percentage.
56
91
  */
57
92
  trafficPercentage: number;
58
93
 
59
94
  /**
60
- * The number of user during the A/B test.
95
+ * Number of users during the A/B test.
96
+ */
97
+ userCount: number | null;
98
+
99
+ /**
100
+ * Number of users that performed a tracked search during the A/B test.
61
101
  */
62
- userCount: number;
102
+ trackedUserCount: number | null;
63
103
  };
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@algolia/client-abtesting",
3
- "version": "5.0.0-alpha.11",
3
+ "version": "5.0.0-alpha.111",
4
4
  "description": "JavaScript client for client-abtesting",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
7
7
  "author": "Algolia",
8
+ "type": "module",
8
9
  "exports": {
9
10
  ".": {
10
11
  "node": {
11
12
  "import": "./dist/client-abtesting.esm.node.js",
12
13
  "module": "./dist/client-abtesting.esm.node.js",
13
- "require": "./dist/client-abtesting.cjs.js",
14
- "default": "./dist/client-abtesting.cjs.js"
14
+ "require": "./dist/client-abtesting.cjs",
15
+ "default": "./dist/client-abtesting.cjs"
15
16
  },
16
17
  "default": {
17
18
  "umd": "./dist/client-abtesting.umd.js",
@@ -38,14 +39,14 @@
38
39
  "clean": "rm -rf ./dist || true"
39
40
  },
40
41
  "dependencies": {
41
- "@algolia/client-common": "5.0.0-alpha.11",
42
- "@algolia/requester-browser-xhr": "5.0.0-alpha.11",
43
- "@algolia/requester-node-http": "5.0.0-alpha.11"
42
+ "@algolia/client-common": "5.0.0-alpha.112",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.112",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.112"
44
45
  },
45
46
  "devDependencies": {
46
- "@types/node": "16.11.47",
47
- "rollup": "2.78.1",
48
- "typescript": "4.7.4"
47
+ "@types/node": "20.12.5",
48
+ "rollup": "4.14.0",
49
+ "typescript": "5.4.4"
49
50
  },
50
51
  "engines": {
51
52
  "node": ">= 14.0.0"