@algolia/client-abtesting 5.0.0-alpha.9 → 5.0.0-alpha.91

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 +5 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +5 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/{client-abtesting.cjs.js → client-abtesting.cjs} +324 -318
  6. package/dist/client-abtesting.esm.browser.js +506 -548
  7. package/dist/client-abtesting.esm.node.js +324 -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/currenciesValue.d.ts +19 -0
  24. package/dist/model/currenciesValue.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 +73 -50
  40. package/dist/model/variant.d.ts.map +1 -1
  41. package/dist/src/abtestingClient.d.ts +126 -124
  42. package/dist/src/abtestingClient.d.ts.map +1 -1
  43. package/index.js +1 -1
  44. package/model/aBTest.ts +25 -10
  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 +23 -15
  51. package/model/currenciesValue.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 +4 -4
  59. package/model/variant.ts +43 -13
  60. package/package.json +30 -13
@@ -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,15 +1,15 @@
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
  * Properties for the `del` method.
5
5
  */
6
6
  export type DelProps = {
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
  };
@@ -19,7 +19,7 @@ export type DelProps = {
19
19
  */
20
20
  export type DeleteABTestProps = {
21
21
  /**
22
- * The A/B test ID.
22
+ * Unique A/B test ID.
23
23
  */
24
24
  id: number;
25
25
  };
@@ -29,11 +29,11 @@ export type DeleteABTestProps = {
29
29
  */
30
30
  export type GetProps = {
31
31
  /**
32
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
32
+ * Path of the endpoint, anything after \"/1\" must be specified.
33
33
  */
34
34
  path: string;
35
35
  /**
36
- * Query parameters to be applied to the current query.
36
+ * Query parameters to apply to the current query.
37
37
  */
38
38
  parameters?: Record<string, any>;
39
39
  };
@@ -43,7 +43,7 @@ export type GetProps = {
43
43
  */
44
44
  export type GetABTestProps = {
45
45
  /**
46
- * The A/B test ID.
46
+ * Unique A/B test ID.
47
47
  */
48
48
  id: number;
49
49
  };
@@ -57,9 +57,17 @@ export type ListABTestsProps = {
57
57
  */
58
58
  offset?: number;
59
59
  /**
60
- * Number of records to return. Limit is the size of the page.
60
+ * Number of records to return (page size).
61
61
  */
62
62
  limit?: number;
63
+ /**
64
+ * Only return A/B tests for indices starting with this prefix.
65
+ */
66
+ indexPrefix?: string;
67
+ /**
68
+ * Only return A/B tests for indices ending with this suffix.
69
+ */
70
+ indexSuffix?: string;
63
71
  };
64
72
 
65
73
  /**
@@ -67,15 +75,15 @@ export type ListABTestsProps = {
67
75
  */
68
76
  export type PostProps = {
69
77
  /**
70
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
78
+ * Path of the endpoint, anything after \"/1\" must be specified.
71
79
  */
72
80
  path: string;
73
81
  /**
74
- * Query parameters to be applied to the current query.
82
+ * Query parameters to apply to the current query.
75
83
  */
76
84
  parameters?: Record<string, any>;
77
85
  /**
78
- * The parameters to send with the custom request.
86
+ * Parameters to send with the custom request.
79
87
  */
80
88
  body?: Record<string, any>;
81
89
  };
@@ -85,15 +93,15 @@ export type PostProps = {
85
93
  */
86
94
  export type PutProps = {
87
95
  /**
88
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
96
+ * Path of the endpoint, anything after \"/1\" must be specified.
89
97
  */
90
98
  path: string;
91
99
  /**
92
- * Query parameters to be applied to the current query.
100
+ * Query parameters to apply to the current query.
93
101
  */
94
102
  parameters?: Record<string, any>;
95
103
  /**
96
- * The parameters to send with the custom request.
104
+ * Parameters to send with the custom request.
97
105
  */
98
106
  body?: Record<string, any>;
99
107
  };
@@ -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 CurrenciesValue = {
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 './currenciesValue';
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
9
  abtests: ABTest[];
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,93 @@
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 { CurrenciesValue } from './currenciesValue';
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;
16
+
17
+ /**
18
+ * Variant\'s [average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position).
6
19
  */
7
20
  averageClickPosition: number;
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
30
  clickThroughRate: number;
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).
26
39
  */
27
40
  conversionRate: number;
28
41
 
29
42
  /**
30
- * The A/B test description.
43
+ * A/B test currencies.
44
+ */
45
+ currencies: Record<string, CurrenciesValue>;
46
+
47
+ /**
48
+ * A/B test description.
31
49
  */
32
50
  description: string;
33
51
 
52
+ filterEffects?: FilterEffects;
53
+
34
54
  /**
35
- * The index performing the A/B test.
55
+ * A/B test index.
36
56
  */
37
57
  index: string;
38
58
 
39
59
  /**
40
- * The number of occurrences.
60
+ * Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for that variant.
41
61
  */
42
62
  noResultCount: number;
43
63
 
44
64
  /**
45
- * The number of search during the A/B test.
65
+ * Number of purchase events for this variant.
66
+ */
67
+ purchaseCount: number;
68
+
69
+ /**
70
+ * Variant\'s [purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate).
71
+ */
72
+ purchaseRate: number;
73
+
74
+ /**
75
+ * Number of searches carried out during the A/B test.
46
76
  */
47
77
  searchCount: number;
48
78
 
49
79
  /**
50
- * The number of tracked search click.
80
+ * Number of tracked searches. This is the number of search requests where the `clickAnalytics` parameter is `true`.
51
81
  */
52
82
  trackedSearchCount: number;
53
83
 
54
84
  /**
55
- * The traffic percentage for the A/B test.
85
+ * A/B test traffic percentage.
56
86
  */
57
87
  trafficPercentage: number;
58
88
 
59
89
  /**
60
- * The number of user during the A/B test.
90
+ * Number of users during the A/B test.
61
91
  */
62
92
  userCount: number;
63
93
  };
package/package.json CHANGED
@@ -1,16 +1,33 @@
1
1
  {
2
2
  "name": "@algolia/client-abtesting",
3
- "version": "5.0.0-alpha.9",
3
+ "version": "5.0.0-alpha.91",
4
4
  "description": "JavaScript client for client-abtesting",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
7
7
  "author": "Algolia",
8
- "main": "index.js",
9
- "jsdelivr": "dist/client-abtesting.umd.js",
10
- "unpkg": "dist/client-abtesting.umd.js",
11
- "module": "dist/client-abtesting.esm.node.js",
12
- "browser": "dist/client-abtesting.umd.js",
13
- "types": "index.d.ts",
8
+ "type": "module",
9
+ "exports": {
10
+ ".": {
11
+ "node": {
12
+ "import": "./dist/client-abtesting.esm.node.js",
13
+ "module": "./dist/client-abtesting.esm.node.js",
14
+ "require": "./dist/client-abtesting.cjs",
15
+ "default": "./dist/client-abtesting.cjs"
16
+ },
17
+ "default": {
18
+ "umd": "./dist/client-abtesting.umd.js",
19
+ "module": "./dist/client-abtesting.esm.browser.js",
20
+ "import": "./dist/client-abtesting.esm.browser.js",
21
+ "default": "./dist/client-abtesting.umd.js"
22
+ }
23
+ },
24
+ "./src/*": "./src/*.ts",
25
+ "./model": "./model/index.ts"
26
+ },
27
+ "jsdelivr": "./dist/client-abtesting.umd.js",
28
+ "unpkg": "./dist/client-abtesting.umd.js",
29
+ "browser": "./dist/client-abtesting.umd.js",
30
+ "types": "./index.d.ts",
14
31
  "files": [
15
32
  "dist",
16
33
  "model",
@@ -22,14 +39,14 @@
22
39
  "clean": "rm -rf ./dist || true"
23
40
  },
24
41
  "dependencies": {
25
- "@algolia/client-common": "5.0.0-alpha.9",
26
- "@algolia/requester-browser-xhr": "5.0.0-alpha.9",
27
- "@algolia/requester-node-http": "5.0.0-alpha.9"
42
+ "@algolia/client-common": "5.0.0-alpha.92",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.92",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.92"
28
45
  },
29
46
  "devDependencies": {
30
- "@types/node": "16.11.47",
31
- "rollup": "2.77.2",
32
- "typescript": "4.7.4"
47
+ "@types/node": "20.9.0",
48
+ "rollup": "4.3.0",
49
+ "typescript": "5.2.2"
33
50
  },
34
51
  "engines": {
35
52
  "node": ">= 14.0.0"