@algolia/client-abtesting 5.0.0-alpha.1
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/dist/builds/browser.d.ts +6 -0
- package/dist/builds/browser.d.ts.map +1 -0
- package/dist/builds/node.d.ts +6 -0
- package/dist/builds/node.d.ts.map +1 -0
- package/dist/client-abtesting.cjs.js +316 -0
- package/dist/client-abtesting.esm.browser.js +1025 -0
- package/dist/client-abtesting.esm.node.js +311 -0
- package/dist/client-abtesting.umd.js +2 -0
- package/dist/model/aBTest.d.ts +40 -0
- package/dist/model/aBTest.d.ts.map +1 -0
- package/dist/model/aBTestResponse.d.ts +15 -0
- package/dist/model/aBTestResponse.d.ts.map +1 -0
- package/dist/model/abTestsVariant.d.ts +15 -0
- package/dist/model/abTestsVariant.d.ts.map +1 -0
- package/dist/model/abTestsVariantSearchParams.d.ts +4 -0
- package/dist/model/abTestsVariantSearchParams.d.ts.map +1 -0
- package/dist/model/addABTestsRequest.d.ts +16 -0
- package/dist/model/addABTestsRequest.d.ts.map +1 -0
- package/dist/model/addABTestsVariant.d.ts +4 -0
- package/dist/model/addABTestsVariant.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +101 -0
- package/dist/model/clientMethodProps.d.ts.map +1 -0
- package/dist/model/customSearchParams.d.ts +4 -0
- package/dist/model/customSearchParams.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts +7 -0
- package/dist/model/errorBase.d.ts.map +1 -0
- package/dist/model/index.d.ts +12 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/listABTestsResponse.d.ts +16 -0
- package/dist/model/listABTestsResponse.d.ts.map +1 -0
- package/dist/model/variant.d.ts +51 -0
- package/dist/model/variant.d.ts.map +1 -0
- package/dist/src/abtestingClient.d.ts +114 -0
- package/dist/src/abtestingClient.d.ts.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/model/aBTest.ts +42 -0
- package/model/aBTestResponse.ts +16 -0
- package/model/abTestsVariant.ts +16 -0
- package/model/abTestsVariantSearchParams.ts +6 -0
- package/model/addABTestsRequest.ts +18 -0
- package/model/addABTestsVariant.ts +6 -0
- package/model/clientMethodProps.ts +109 -0
- package/model/customSearchParams.ts +5 -0
- package/model/errorBase.ts +8 -0
- package/model/index.ts +13 -0
- package/model/listABTestsResponse.ts +18 -0
- package/model/variant.ts +52 -0
- package/package.json +35 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare type Variant = {
|
|
2
|
+
/**
|
|
3
|
+
* Average click position for the variant.
|
|
4
|
+
*/
|
|
5
|
+
averageClickPosition: number;
|
|
6
|
+
/**
|
|
7
|
+
* Distinct click count for the variant.
|
|
8
|
+
*/
|
|
9
|
+
clickCount: number;
|
|
10
|
+
/**
|
|
11
|
+
* Click through rate for the variant.
|
|
12
|
+
*/
|
|
13
|
+
clickThroughRate: number;
|
|
14
|
+
/**
|
|
15
|
+
* Distinct conversion count for the variant.
|
|
16
|
+
*/
|
|
17
|
+
conversionCount: number;
|
|
18
|
+
/**
|
|
19
|
+
* Conversion rate for the variant.
|
|
20
|
+
*/
|
|
21
|
+
conversionRate: number;
|
|
22
|
+
/**
|
|
23
|
+
* The A/B test description.
|
|
24
|
+
*/
|
|
25
|
+
description: string;
|
|
26
|
+
/**
|
|
27
|
+
* The index performing the A/B test.
|
|
28
|
+
*/
|
|
29
|
+
index: string;
|
|
30
|
+
/**
|
|
31
|
+
* The number of occurrences.
|
|
32
|
+
*/
|
|
33
|
+
noResultCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* The number of search during the A/B test.
|
|
36
|
+
*/
|
|
37
|
+
searchCount: number;
|
|
38
|
+
/**
|
|
39
|
+
* The number of tracked search click.
|
|
40
|
+
*/
|
|
41
|
+
trackedSearchCount: number;
|
|
42
|
+
/**
|
|
43
|
+
* The traffic percentage for the A/B test.
|
|
44
|
+
*/
|
|
45
|
+
trafficPercentage: number;
|
|
46
|
+
/**
|
|
47
|
+
* The number of user during the A/B test.
|
|
48
|
+
*/
|
|
49
|
+
userCount: number;
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=variant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/model/variant.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO,GAAG;IACpB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
|
|
2
|
+
import type { ABTest } from '../model/aBTest';
|
|
3
|
+
import type { ABTestResponse } from '../model/aBTestResponse';
|
|
4
|
+
import type { AddABTestsRequest } from '../model/addABTestsRequest';
|
|
5
|
+
import type { DelProps, DeleteABTestProps, GetProps, GetABTestProps, ListABTestsProps, PostProps, PutProps, StopABTestProps } from '../model/clientMethodProps';
|
|
6
|
+
import type { ListABTestsResponse } from '../model/listABTestsResponse';
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.1";
|
|
8
|
+
export declare const REGIONS: readonly ["de", "us"];
|
|
9
|
+
export declare type Region = typeof REGIONS[number];
|
|
10
|
+
export declare function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
11
|
+
region?: Region;
|
|
12
|
+
}): {
|
|
13
|
+
transporter: import("@algolia/client-common").Transporter;
|
|
14
|
+
/**
|
|
15
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
16
|
+
*/
|
|
17
|
+
readonly _ua: string;
|
|
18
|
+
/**
|
|
19
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
20
|
+
*
|
|
21
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
22
|
+
* @param version - The version of the agent.
|
|
23
|
+
*/
|
|
24
|
+
addAlgoliaAgent(segment: string, version?: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new A/B test with provided configuration. You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants.
|
|
27
|
+
*
|
|
28
|
+
* @summary Create a test.
|
|
29
|
+
* @param addABTestsRequest - The addABTestsRequest object.
|
|
30
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
31
|
+
*/
|
|
32
|
+
addABTests(addABTestsRequest: AddABTestsRequest, requestOptions?: RequestOptions): Promise<ABTestResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
35
|
+
*
|
|
36
|
+
* @summary Send requests to the Algolia REST API.
|
|
37
|
+
* @param del - The del object.
|
|
38
|
+
* @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
39
|
+
* @param del.parameters - Query parameters to be applied to the current query.
|
|
40
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
41
|
+
*/
|
|
42
|
+
del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete a test.
|
|
45
|
+
*
|
|
46
|
+
* @summary Delete a test.
|
|
47
|
+
* @param deleteABTest - The deleteABTest object.
|
|
48
|
+
* @param deleteABTest.id - The A/B test ID.
|
|
49
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
50
|
+
*/
|
|
51
|
+
deleteABTest({ id }: DeleteABTestProps, requestOptions?: RequestOptions): Promise<ABTestResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
54
|
+
*
|
|
55
|
+
* @summary Send requests to the Algolia REST API.
|
|
56
|
+
* @param get - The get object.
|
|
57
|
+
* @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
58
|
+
* @param get.parameters - Query parameters to be applied to the current query.
|
|
59
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
60
|
+
*/
|
|
61
|
+
get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
62
|
+
/**
|
|
63
|
+
* Returns metadata and metrics for an A/B test.
|
|
64
|
+
*
|
|
65
|
+
* @summary Get a test.
|
|
66
|
+
* @param getABTest - The getABTest object.
|
|
67
|
+
* @param getABTest.id - The A/B test ID.
|
|
68
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
69
|
+
*/
|
|
70
|
+
getABTest({ id }: GetABTestProps, requestOptions?: RequestOptions): Promise<ABTest>;
|
|
71
|
+
/**
|
|
72
|
+
* Fetch all existing A/B tests for App that are available for the current API Key. When no data has been processed, the metrics will be returned as null.
|
|
73
|
+
*
|
|
74
|
+
* @summary List all tests.
|
|
75
|
+
* @param listABTests - The listABTests object.
|
|
76
|
+
* @param listABTests.offset - Position of the starting record. Used for paging. 0 is the first record.
|
|
77
|
+
* @param listABTests.limit - Number of records to return. Limit is the size of the page.
|
|
78
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
79
|
+
*/
|
|
80
|
+
listABTests({ offset, limit }: ListABTestsProps, requestOptions?: RequestOptions): Promise<ListABTestsResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
83
|
+
*
|
|
84
|
+
* @summary Send requests to the Algolia REST API.
|
|
85
|
+
* @param post - The post object.
|
|
86
|
+
* @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
87
|
+
* @param post.parameters - Query parameters to be applied to the current query.
|
|
88
|
+
* @param post.body - The parameters to send with the custom request.
|
|
89
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
90
|
+
*/
|
|
91
|
+
post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
92
|
+
/**
|
|
93
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
94
|
+
*
|
|
95
|
+
* @summary Send requests to the Algolia REST API.
|
|
96
|
+
* @param put - The put object.
|
|
97
|
+
* @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
98
|
+
* @param put.parameters - Query parameters to be applied to the current query.
|
|
99
|
+
* @param put.body - The parameters to send with the custom request.
|
|
100
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
101
|
+
*/
|
|
102
|
+
put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
103
|
+
/**
|
|
104
|
+
* Marks the A/B test as stopped. At this point, the test is over and cannot be restarted. As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests. Associated metadata and metrics are still stored.
|
|
105
|
+
*
|
|
106
|
+
* @summary Stop a test.
|
|
107
|
+
* @param stopABTest - The stopABTest object.
|
|
108
|
+
* @param stopABTest.id - The A/B test ID.
|
|
109
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
110
|
+
*/
|
|
111
|
+
stopABTest({ id }: StopABTestProps, requestOptions?: RequestOptions): Promise<ABTestResponse>;
|
|
112
|
+
};
|
|
113
|
+
export declare type AbtestingClient = ReturnType<typeof createAbtestingClient>;
|
|
114
|
+
//# sourceMappingURL=abtestingClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abtestingClient.d.ts","sourceRoot":"","sources":["../../../../packages/client-abtesting/src/abtestingClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,eAAe,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,oBAAY,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAW5C,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAuBxC;;OAEG;;IAIH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAGxD;;;;;;OAMG;kCAEkB,iBAAiB,mBACnB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAsC1B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;OAOG;yBAEO,iBAAiB,mBACR,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;OAOG;sBAEO,cAAc,mBACL,cAAc,GAC9B,QAAQ,MAAM,CAAC;IAsBlB;;;;;;;;OAQG;mCAEkB,gBAAgB,mBAClB,cAAc,GAC9B,QAAQ,mBAAmB,CAAC;IAuB/B;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;OAOG;uBAEO,eAAe,mBACN,cAAc,GAC9B,QAAQ,cAAc,CAAC;EAwB7B;AAED,oBAAY,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/model/aBTest.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { Variant } from './variant';
|
|
4
|
+
|
|
5
|
+
export type ABTest = {
|
|
6
|
+
/**
|
|
7
|
+
* The A/B test ID.
|
|
8
|
+
*/
|
|
9
|
+
abTestID: number;
|
|
10
|
+
/**
|
|
11
|
+
* A/B test significance based on click data. Should be > 0.95 to be considered significant (no matter which variant is winning).
|
|
12
|
+
*/
|
|
13
|
+
clickSignificance: number;
|
|
14
|
+
/**
|
|
15
|
+
* A/B test significance based on conversion data. Should be > 0.95 to be considered significant (no matter which variant is winning).
|
|
16
|
+
*/
|
|
17
|
+
conversionSignificance: number;
|
|
18
|
+
/**
|
|
19
|
+
* End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
20
|
+
*/
|
|
21
|
+
endAt: string;
|
|
22
|
+
/**
|
|
23
|
+
* Update date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
24
|
+
*/
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
/**
|
|
27
|
+
* Creation date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
28
|
+
*/
|
|
29
|
+
createdAt: string;
|
|
30
|
+
/**
|
|
31
|
+
* A/B test name.
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Status of the A/B test.
|
|
36
|
+
*/
|
|
37
|
+
status: string;
|
|
38
|
+
/**
|
|
39
|
+
* List of A/B test variant.
|
|
40
|
+
*/
|
|
41
|
+
variants: Variant[];
|
|
42
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export type ABTestResponse = {
|
|
4
|
+
/**
|
|
5
|
+
* The index performing the A/B test.
|
|
6
|
+
*/
|
|
7
|
+
index: string;
|
|
8
|
+
/**
|
|
9
|
+
* The A/B test ID.
|
|
10
|
+
*/
|
|
11
|
+
abTestID: number;
|
|
12
|
+
/**
|
|
13
|
+
* TaskID of the task to wait for.
|
|
14
|
+
*/
|
|
15
|
+
taskID: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export type AbTestsVariant = {
|
|
4
|
+
/**
|
|
5
|
+
* The index performing the A/B test.
|
|
6
|
+
*/
|
|
7
|
+
index: string;
|
|
8
|
+
/**
|
|
9
|
+
* The traffic percentage for the A/B test.
|
|
10
|
+
*/
|
|
11
|
+
trafficPercentage: number;
|
|
12
|
+
/**
|
|
13
|
+
* The A/B test description.
|
|
14
|
+
*/
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
4
|
+
import type { CustomSearchParams } from './customSearchParams';
|
|
5
|
+
|
|
6
|
+
export type AbTestsVariantSearchParams = AbTestsVariant & CustomSearchParams;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { AddABTestsVariant } from './addABTestsVariant';
|
|
4
|
+
|
|
5
|
+
export type AddABTestsRequest = {
|
|
6
|
+
/**
|
|
7
|
+
* A/B test name.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* List of 2 variants for the A/B test.
|
|
12
|
+
*/
|
|
13
|
+
variant: AddABTestsVariant[];
|
|
14
|
+
/**
|
|
15
|
+
* End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ.
|
|
16
|
+
*/
|
|
17
|
+
endAt: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { AbTestsVariant } from './abTestsVariant';
|
|
4
|
+
import type { AbTestsVariantSearchParams } from './abTestsVariantSearchParams';
|
|
5
|
+
|
|
6
|
+
export type AddABTestsVariant = AbTestsVariant | AbTestsVariantSearchParams;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Properties for the `del` method.
|
|
5
|
+
*/
|
|
6
|
+
export type DelProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
9
|
+
*/
|
|
10
|
+
path: string;
|
|
11
|
+
/**
|
|
12
|
+
* Query parameters to be applied to the current query.
|
|
13
|
+
*/
|
|
14
|
+
parameters?: Record<string, any>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Properties for the `deleteABTest` method.
|
|
19
|
+
*/
|
|
20
|
+
export type DeleteABTestProps = {
|
|
21
|
+
/**
|
|
22
|
+
* The A/B test ID.
|
|
23
|
+
*/
|
|
24
|
+
id: number;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Properties for the `get` method.
|
|
29
|
+
*/
|
|
30
|
+
export type GetProps = {
|
|
31
|
+
/**
|
|
32
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
33
|
+
*/
|
|
34
|
+
path: string;
|
|
35
|
+
/**
|
|
36
|
+
* Query parameters to be applied to the current query.
|
|
37
|
+
*/
|
|
38
|
+
parameters?: Record<string, any>;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Properties for the `getABTest` method.
|
|
43
|
+
*/
|
|
44
|
+
export type GetABTestProps = {
|
|
45
|
+
/**
|
|
46
|
+
* The A/B test ID.
|
|
47
|
+
*/
|
|
48
|
+
id: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Properties for the `listABTests` method.
|
|
53
|
+
*/
|
|
54
|
+
export type ListABTestsProps = {
|
|
55
|
+
/**
|
|
56
|
+
* Position of the starting record. Used for paging. 0 is the first record.
|
|
57
|
+
*/
|
|
58
|
+
offset?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Number of records to return. Limit is the size of the page.
|
|
61
|
+
*/
|
|
62
|
+
limit?: number;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Properties for the `post` method.
|
|
67
|
+
*/
|
|
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;
|
|
73
|
+
/**
|
|
74
|
+
* Query parameters to be applied to the current query.
|
|
75
|
+
*/
|
|
76
|
+
parameters?: Record<string, any>;
|
|
77
|
+
/**
|
|
78
|
+
* The parameters to send with the custom request.
|
|
79
|
+
*/
|
|
80
|
+
body?: Record<string, any>;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Properties for the `put` method.
|
|
85
|
+
*/
|
|
86
|
+
export type PutProps = {
|
|
87
|
+
/**
|
|
88
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
89
|
+
*/
|
|
90
|
+
path: string;
|
|
91
|
+
/**
|
|
92
|
+
* Query parameters to be applied to the current query.
|
|
93
|
+
*/
|
|
94
|
+
parameters?: Record<string, any>;
|
|
95
|
+
/**
|
|
96
|
+
* The parameters to send with the custom request.
|
|
97
|
+
*/
|
|
98
|
+
body?: Record<string, any>;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Properties for the `stopABTest` method.
|
|
103
|
+
*/
|
|
104
|
+
export type StopABTestProps = {
|
|
105
|
+
/**
|
|
106
|
+
* The A/B test ID.
|
|
107
|
+
*/
|
|
108
|
+
id: number;
|
|
109
|
+
};
|
package/model/index.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export * from './aBTest';
|
|
4
|
+
export * from './aBTestResponse';
|
|
5
|
+
export * from './abTestsVariant';
|
|
6
|
+
export * from './abTestsVariantSearchParams';
|
|
7
|
+
export * from './addABTestsRequest';
|
|
8
|
+
export * from './addABTestsVariant';
|
|
9
|
+
export * from './customSearchParams';
|
|
10
|
+
export * from './errorBase';
|
|
11
|
+
export * from './listABTestsResponse';
|
|
12
|
+
export * from './variant';
|
|
13
|
+
export * from './clientMethodProps';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { ABTest } from './aBTest';
|
|
4
|
+
|
|
5
|
+
export type ListABTestsResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* List of A/B tests.
|
|
8
|
+
*/
|
|
9
|
+
abtests: ABTest[];
|
|
10
|
+
/**
|
|
11
|
+
* Number of A/B tests found for the app.
|
|
12
|
+
*/
|
|
13
|
+
count: number;
|
|
14
|
+
/**
|
|
15
|
+
* Number of A/B tests retrievable.
|
|
16
|
+
*/
|
|
17
|
+
total: number;
|
|
18
|
+
};
|
package/model/variant.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export type Variant = {
|
|
4
|
+
/**
|
|
5
|
+
* Average click position for the variant.
|
|
6
|
+
*/
|
|
7
|
+
averageClickPosition: number;
|
|
8
|
+
/**
|
|
9
|
+
* Distinct click count for the variant.
|
|
10
|
+
*/
|
|
11
|
+
clickCount: number;
|
|
12
|
+
/**
|
|
13
|
+
* Click through rate for the variant.
|
|
14
|
+
*/
|
|
15
|
+
clickThroughRate: number;
|
|
16
|
+
/**
|
|
17
|
+
* Distinct conversion count for the variant.
|
|
18
|
+
*/
|
|
19
|
+
conversionCount: number;
|
|
20
|
+
/**
|
|
21
|
+
* Conversion rate for the variant.
|
|
22
|
+
*/
|
|
23
|
+
conversionRate: number;
|
|
24
|
+
/**
|
|
25
|
+
* The A/B test description.
|
|
26
|
+
*/
|
|
27
|
+
description: string;
|
|
28
|
+
/**
|
|
29
|
+
* The index performing the A/B test.
|
|
30
|
+
*/
|
|
31
|
+
index: string;
|
|
32
|
+
/**
|
|
33
|
+
* The number of occurrences.
|
|
34
|
+
*/
|
|
35
|
+
noResultCount: number;
|
|
36
|
+
/**
|
|
37
|
+
* The number of search during the A/B test.
|
|
38
|
+
*/
|
|
39
|
+
searchCount: number;
|
|
40
|
+
/**
|
|
41
|
+
* The number of tracked search click.
|
|
42
|
+
*/
|
|
43
|
+
trackedSearchCount: number;
|
|
44
|
+
/**
|
|
45
|
+
* The traffic percentage for the A/B test.
|
|
46
|
+
*/
|
|
47
|
+
trafficPercentage: number;
|
|
48
|
+
/**
|
|
49
|
+
* The number of user during the A/B test.
|
|
50
|
+
*/
|
|
51
|
+
userCount: number;
|
|
52
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@algolia/client-abtesting",
|
|
3
|
+
"version": "5.0.0-alpha.1",
|
|
4
|
+
"description": "JavaScript client for client-abtesting",
|
|
5
|
+
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
|
+
"license": "MIT",
|
|
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",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"model",
|
|
17
|
+
"index.js",
|
|
18
|
+
"index.d.ts"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"clean": "rm -rf ./dist"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@algolia/client-common": "5.0.0-alpha.1",
|
|
25
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.1",
|
|
26
|
+
"@algolia/requester-node-http": "5.0.0-alpha.1"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "16.11.45",
|
|
30
|
+
"typescript": "4.7.4"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">= 14.0.0"
|
|
34
|
+
}
|
|
35
|
+
}
|